@Test void tagsShouldIncludeDefaultTags() { Map<String, String> result = underTest.getTags(ENVIRONMENT); assertThat(result) .containsEntry(DefaultApplicationTag.CREATOR_CRN.key(), USER_CRN) .containsEntry(DefaultApplicationTag.ENVIRONMENT_CRN.key(), ENV_CRN) .containsEntry(DefaultApplicationTag.RESOURCE_CRN.key(), NETWORK_CRN); }
public Map<String, String> getTags(EnvironmentDto environmentDto) { Map<String, String> userDefinedTags = environmentDto.getTags().getUserDefinedTags(); Map<String, String> accountTags = getAccountTags(environmentDto.getAccountId()); Map<String, String> defaultTags = getDefaultTags(environmentDto, userDefinedTags, accountTags); CDPTagMergeRequest mergeRequest = CDPTagMergeRequest.Builder .builder() .withEnvironmentTags(environmentDto.getTags().getUserDefinedTags()) .withPlatform(environmentDto.getCloudPlatform()) .withRequestTags(defaultTags) .build(); return costTagging.mergeTags(mergeRequest); }
NetworkTagProvider { public Map<String, String> getTags(EnvironmentDto environmentDto) { Map<String, String> userDefinedTags = environmentDto.getTags().getUserDefinedTags(); Map<String, String> accountTags = getAccountTags(environmentDto.getAccountId()); Map<String, String> defaultTags = getDefaultTags(environmentDto, userDefinedTags, accountTags); CDPTagMergeRequest mergeRequest = CDPTagMergeRequest.Builder .builder() .withEnvironmentTags(environmentDto.getTags().getUserDefinedTags()) .withPlatform(environmentDto.getCloudPlatform()) .withRequestTags(defaultTags) .build(); return costTagging.mergeTags(mergeRequest); } }
NetworkTagProvider { public Map<String, String> getTags(EnvironmentDto environmentDto) { Map<String, String> userDefinedTags = environmentDto.getTags().getUserDefinedTags(); Map<String, String> accountTags = getAccountTags(environmentDto.getAccountId()); Map<String, String> defaultTags = getDefaultTags(environmentDto, userDefinedTags, accountTags); CDPTagMergeRequest mergeRequest = CDPTagMergeRequest.Builder .builder() .withEnvironmentTags(environmentDto.getTags().getUserDefinedTags()) .withPlatform(environmentDto.getCloudPlatform()) .withRequestTags(defaultTags) .build(); return costTagging.mergeTags(mergeRequest); } NetworkTagProvider(EntitlementService entitlementService,
            AccountTagService accountTagService,
            DefaultInternalAccountTagService defaultInternalAccountTagService,
            AccountTagToAccountTagResponsesConverter accountTagToAccountTagResponsesConverter,
            CostTagging costTagging,
            CrnUserDetailsService crnUserDetailsService); }
NetworkTagProvider { public Map<String, String> getTags(EnvironmentDto environmentDto) { Map<String, String> userDefinedTags = environmentDto.getTags().getUserDefinedTags(); Map<String, String> accountTags = getAccountTags(environmentDto.getAccountId()); Map<String, String> defaultTags = getDefaultTags(environmentDto, userDefinedTags, accountTags); CDPTagMergeRequest mergeRequest = CDPTagMergeRequest.Builder .builder() .withEnvironmentTags(environmentDto.getTags().getUserDefinedTags()) .withPlatform(environmentDto.getCloudPlatform()) .withRequestTags(defaultTags) .build(); return costTagging.mergeTags(mergeRequest); } NetworkTagProvider(EntitlementService entitlementService,
            AccountTagService accountTagService,
            DefaultInternalAccountTagService defaultInternalAccountTagService,
            AccountTagToAccountTagResponsesConverter accountTagToAccountTagResponsesConverter,
            CostTagging costTagging,
            CrnUserDetailsService crnUserDetailsService); Map<String, String> getTags(EnvironmentDto environmentDto); }
NetworkTagProvider { public Map<String, String> getTags(EnvironmentDto environmentDto) { Map<String, String> userDefinedTags = environmentDto.getTags().getUserDefinedTags(); Map<String, String> accountTags = getAccountTags(environmentDto.getAccountId()); Map<String, String> defaultTags = getDefaultTags(environmentDto, userDefinedTags, accountTags); CDPTagMergeRequest mergeRequest = CDPTagMergeRequest.Builder .builder() .withEnvironmentTags(environmentDto.getTags().getUserDefinedTags()) .withPlatform(environmentDto.getCloudPlatform()) .withRequestTags(defaultTags) .build(); return costTagging.mergeTags(mergeRequest); } NetworkTagProvider(EntitlementService entitlementService,
            AccountTagService accountTagService,
            DefaultInternalAccountTagService defaultInternalAccountTagService,
            AccountTagToAccountTagResponsesConverter accountTagToAccountTagResponsesConverter,
            CostTagging costTagging,
            CrnUserDetailsService crnUserDetailsService); Map<String, String> getTags(EnvironmentDto environmentDto);  }