diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/AbxPackageStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/AbxPackageStore.java index 60cb97672..f3671630f 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/AbxPackageStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/AbxPackageStore.java @@ -22,7 +22,7 @@ import com.vmware.pscoe.iac.artifact.model.abx.AbxPackageContent; import com.vmware.pscoe.iac.artifact.model.abx.AbxPackageDescriptor; import com.vmware.pscoe.iac.artifact.aria.model.VraNgSecret; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.apache.commons.lang3.NotImplementedException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/AbxReleaseManager.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/AbxReleaseManager.java index 12be198a5..09a3e0a7b 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/AbxReleaseManager.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/AbxReleaseManager.java @@ -31,7 +31,7 @@ import com.vmware.pscoe.iac.artifact.model.abx.AbxAction; import com.vmware.pscoe.iac.artifact.model.abx.AbxActionVersion; import com.vmware.pscoe.iac.artifact.model.abx.AbxPackageDescriptor; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; public class AbxReleaseManager { private final Logger logger = LoggerFactory.getLogger(AbxReleaseManager.class); diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/PackageStoreFactory.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/PackageStoreFactory.java index a1c27815d..e8a245532 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/PackageStoreFactory.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/PackageStoreFactory.java @@ -25,6 +25,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import com.vmware.pscoe.iac.artifact.aria.configuration.ConfigurationVraNg; import com.vmware.pscoe.iac.artifact.cli.CliManagerFactory; import com.vmware.pscoe.iac.artifact.cli.CliManagerVrops; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/VraNgPackageStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/package/VraNgPackageStore.java similarity index 99% rename from common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/VraNgPackageStore.java rename to common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/package/VraNgPackageStore.java index f392c7f10..2f1135763 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/VraNgPackageStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/package/VraNgPackageStore.java @@ -31,7 +31,7 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageAdapter; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageContent; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import com.vmware.pscoe.iac.artifact.aria.store.VraNgTypeStoreFactory; import org.slf4j.Logger; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNg.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/rest/RestClientVraNg.java similarity index 99% rename from common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNg.java rename to common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/rest/RestClientVraNg.java index cdc9758da..ca87bb233 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNg.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/rest/RestClientVraNg.java @@ -12,7 +12,7 @@ * This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. * #L% */ -package com.vmware.pscoe.iac.artifact.rest; +package com.vmware.pscoe.iac.artifact.aria.rest; import java.io.File; import java.net.URISyntaxException; @@ -73,7 +73,7 @@ public class RestClientVraNg extends RestClientVraNgPrimitive { * @param configuration configuration vra * @param restTemplate rest template */ - protected RestClientVraNg(final ConfigurationVraNg configuration, final RestTemplate restTemplate) { + public RestClientVraNg(final ConfigurationVraNg configuration, final RestTemplate restTemplate) { super(configuration, restTemplate); } diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNgAuthNInterceptor.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/rest/RestClientVraNgAuthNInterceptor.java similarity index 85% rename from common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNgAuthNInterceptor.java rename to common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/rest/RestClientVraNgAuthNInterceptor.java index 3499ad3c2..e49a2331e 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNgAuthNInterceptor.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/rest/RestClientVraNgAuthNInterceptor.java @@ -12,13 +12,14 @@ * This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. * #L% */ -package com.vmware.pscoe.iac.artifact.rest; +package com.vmware.pscoe.iac.artifact.aria.rest; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.jayway.jsonpath.DocumentContext; import com.jayway.jsonpath.JsonPath; import com.vmware.pscoe.iac.artifact.aria.configuration.ConfigurationVraNg; +import com.vmware.pscoe.iac.artifact.rest.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.*; @@ -47,7 +48,7 @@ public class RestClientVraNgAuthNInterceptor extends RestClientRequestIntercepto private String tokenType; private LocalDateTime tokenExpirationDate; - protected RestClientVraNgAuthNInterceptor(ConfigurationVraNg configuration, RestTemplate restTemplate) { + public RestClientVraNgAuthNInterceptor(ConfigurationVraNg configuration, RestTemplate restTemplate) { super(configuration, restTemplate); this.tokenType = DEFAULT_TOKEN_TYPE; } @@ -60,9 +61,9 @@ public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttp acquireToken(request); } if (this.token != null) { - request.getHeaders().add("Authorization", this.tokenType + " " + this.token); + request.getHeaders().add("Authorization", this.tokenType + " " + this.token); } - + return execution.execute(request, body); } catch (Exception e) { throw new RuntimeException(e); @@ -77,7 +78,8 @@ private void acquireToken(HttpRequest request) throws JsonProcessingException { } else { logger.info("Acquiring refresh token with credentials"); ResponseEntity requestWithCredentialsResponse = this.requestWithCredentials(request); - DocumentContext requestWithCredentialsResponseBody = JsonPath.parse(requestWithCredentialsResponse.getBody()); + DocumentContext requestWithCredentialsResponseBody = JsonPath + .parse(requestWithCredentialsResponse.getBody()); refreshToken = requestWithCredentialsResponseBody.read("$.refresh_token"); } @@ -87,16 +89,18 @@ private void acquireToken(HttpRequest request) throws JsonProcessingException { final int expiresIn = responseBody.jsonString().contains("expires_in") ? responseBody.read("$.expires_in") : 0; this.tokenExpirationDate = now.plus(expiresIn, ChronoField.SECOND_OF_MINUTE.getBaseUnit()); this.token = responseBody.jsonString().contains("access_token") ? responseBody.read("$.access_token") : null; - String tokenTypeFromResponse = responseBody.jsonString().contains("token_type") ? responseBody.read("$.token_type") : null; + String tokenTypeFromResponse = responseBody.jsonString().contains("token_type") + ? responseBody.read("$.token_type") + : null; this.setTokenType(tokenTypeFromResponse); } private ResponseEntity requestWithRefreshToken(HttpRequest request, String refreshToken) { final URI tokenUri = UriComponentsBuilder.newInstance() - .scheme(request.getURI().getScheme()) - .host(this.getConfiguration().getAuthHost()) - .port(this.getConfiguration().getPort()) - .path(SERVICE_REFRESH_TOKEN).build().toUri(); + .scheme(request.getURI().getScheme()) + .host(this.getConfiguration().getAuthHost()) + .port(this.getConfiguration().getPort()) + .path(SERVICE_REFRESH_TOKEN).build().toUri(); logger.info("Token URI: {}", tokenUri); // Prepare Headers @@ -114,12 +118,12 @@ private ResponseEntity requestWithRefreshToken(HttpRequest request, Stri private ResponseEntity requestWithCredentials(HttpRequest request) throws JsonProcessingException { final URI tokenUri = UriComponentsBuilder.newInstance() - .scheme(request.getURI().getScheme()) - .host(this.getConfiguration().getAuthHost()) - .port(this.getConfiguration().getPort()) - .path(SERVICE_CREDENTIALS) - .queryParam("access_token") - .build().toUri(); + .scheme(request.getURI().getScheme()) + .host(this.getConfiguration().getAuthHost()) + .port(this.getConfiguration().getPort()) + .path(SERVICE_CREDENTIALS) + .queryParam("access_token") + .build().toUri(); logger.info("Auth URL: {}", tokenUri); @@ -147,7 +151,8 @@ private ResponseEntity requestWithCredentials(HttpRequest request) throw } private boolean isRequestInBlackList(HttpRequest request) { - return request.getURI().getPath().contains(SERVICE_REFRESH_TOKEN) || request.getURI().getPath().contains(SERVICE_CREDENTIALS); + return request.getURI().getPath().contains(SERVICE_REFRESH_TOKEN) + || request.getURI().getPath().contains(SERVICE_CREDENTIALS); } private boolean hasValidToken() { @@ -161,7 +166,7 @@ private boolean isValidTokenType(String tokenType) { private void setTokenType(String newTokenType) { if (this.isValidTokenType(newTokenType)) { // Capitalized for case sensitive Auth schemes - this.tokenType = newTokenType.substring(0,1).toUpperCase() + newTokenType.substring(1).toLowerCase(); + this.tokenType = newTokenType.substring(0, 1).toUpperCase() + newTokenType.substring(1).toLowerCase(); } else if (this.tokenType == null) { this.tokenType = DEFAULT_TOKEN_TYPE; } diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNgPrimitive.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/rest/RestClientVraNgPrimitive.java similarity index 99% rename from common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNgPrimitive.java rename to common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/rest/RestClientVraNgPrimitive.java index 682bd7b78..42329633c 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNgPrimitive.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/rest/RestClientVraNgPrimitive.java @@ -15,7 +15,7 @@ /** * Package. */ -package com.vmware.pscoe.iac.artifact.rest; +package com.vmware.pscoe.iac.artifact.aria.rest; import java.io.File; import java.io.IOException; @@ -38,7 +38,7 @@ import com.vmware.pscoe.iac.artifact.model.abx.AbxAction; import com.vmware.pscoe.iac.artifact.model.abx.AbxActionVersion; import com.vmware.pscoe.iac.artifact.model.abx.AbxConstant; - +import com.vmware.pscoe.iac.artifact.rest.RestClient; import com.vmware.pscoe.iac.artifact.aria.model.VraNgApprovalPolicy; import com.vmware.pscoe.iac.artifact.aria.model.VraNgBlueprint; import com.vmware.pscoe.iac.artifact.aria.model.VraNgCatalogEntitlement; @@ -68,7 +68,7 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgSubscription; import com.vmware.pscoe.iac.artifact.aria.model.VraNgWorkflowContentSource; -import com.vmware.pscoe.iac.artifact.utils.VraNgOrganizationUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgOrganizationUtil; import org.apache.commons.lang3.StringUtils; import org.apache.hc.core5.net.URIBuilder; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/AbstractVraNgStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/AbstractVraNgStore.java index 647a480e2..670c8389d 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/AbstractVraNgStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/AbstractVraNgStore.java @@ -19,8 +19,8 @@ import com.vmware.pscoe.iac.artifact.model.Package; import com.vmware.pscoe.iac.artifact.aria.model.VraNgIntegration; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; -import com.vmware.pscoe.iac.artifact.utils.VraNgIntegrationUtils; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgIntegrationUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgApprovalPolicyStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgApprovalPolicyStore.java index 703e5ceff..f2adc6edc 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgApprovalPolicyStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgApprovalPolicyStore.java @@ -20,7 +20,7 @@ import com.google.gson.stream.JsonReader; import com.vmware.pscoe.iac.artifact.aria.model.VraNgApprovalPolicy; import com.vmware.pscoe.iac.artifact.store.filters.CustomFolderFileFilter; -import com.vmware.pscoe.iac.artifact.utils.VraNgOrganizationUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgOrganizationUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgBlueprintStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgBlueprintStore.java index cceb8160c..c0eeb14f4 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgBlueprintStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgBlueprintStore.java @@ -21,7 +21,7 @@ import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import com.google.gson.stream.JsonReader; -import com.vmware.pscoe.iac.artifact.VraNgReleaseManager; +import com.vmware.pscoe.iac.artifact.aria.store.helpers.VraNgReleaseManager; import com.vmware.pscoe.iac.artifact.model.Package; import com.vmware.pscoe.iac.artifact.aria.model.VraNgBlueprint; import com.vmware.pscoe.iac.artifact.store.filters.CustomFolderFolderFilter; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgContentSharingPolicyStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgContentSharingPolicyStore.java index 6b7b6cca4..00bd15660 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgContentSharingPolicyStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgContentSharingPolicyStore.java @@ -39,7 +39,7 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgContentSourceBase; import com.vmware.pscoe.iac.artifact.aria.model.VraNgItem; import com.vmware.pscoe.iac.artifact.store.filters.CustomFolderFileFilter; -import com.vmware.pscoe.iac.artifact.utils.VraNgOrganizationUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgOrganizationUtil; public class VraNgContentSharingPolicyStore extends AbstractVraNgStore { /** diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgContentSourceStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgContentSourceStore.java index 206d1b459..6ed200b12 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgContentSourceStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgContentSourceStore.java @@ -34,9 +34,9 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; import com.vmware.pscoe.iac.artifact.aria.model.VraNgWorkflow; import com.vmware.pscoe.iac.artifact.aria.model.VraNgWorkflowContentSource; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import com.vmware.pscoe.iac.artifact.store.filters.CustomFolderFileFilter; -import com.vmware.pscoe.iac.artifact.utils.VraNgIntegrationUtils; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgIntegrationUtils; import org.apache.commons.lang3.StringUtils; /** diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgCustomResourceStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgCustomResourceStore.java index 20c1703fb..02e491205 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgCustomResourceStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgCustomResourceStore.java @@ -25,10 +25,10 @@ import com.vmware.pscoe.iac.artifact.model.Package; import com.vmware.pscoe.iac.artifact.aria.model.VraNgCustomResource; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import com.vmware.pscoe.iac.artifact.store.filters.CustomFolderFileFilter; -import com.vmware.pscoe.iac.artifact.utils.VraNgOrganizationUtil; -import com.vmware.pscoe.iac.artifact.utils.VraNgProjectUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgOrganizationUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgProjectUtil; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgDay2ActionsPolicyStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgDay2ActionsPolicyStore.java index eb2458ef8..a255070ee 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgDay2ActionsPolicyStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgDay2ActionsPolicyStore.java @@ -20,7 +20,7 @@ import com.google.gson.stream.JsonReader; import com.vmware.pscoe.iac.artifact.aria.model.VraNgDay2ActionsPolicy; import com.vmware.pscoe.iac.artifact.store.filters.CustomFolderFileFilter; -import com.vmware.pscoe.iac.artifact.utils.VraNgOrganizationUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgOrganizationUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgDeploymentLimitPolicyStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgDeploymentLimitPolicyStore.java index cf44d9cc0..35a85395d 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgDeploymentLimitPolicyStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgDeploymentLimitPolicyStore.java @@ -20,7 +20,7 @@ import com.google.gson.stream.JsonReader; import com.vmware.pscoe.iac.artifact.aria.model.VraNgDeploymentLimitPolicy; import com.vmware.pscoe.iac.artifact.store.filters.CustomFolderFileFilter; -import com.vmware.pscoe.iac.artifact.utils.VraNgOrganizationUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgOrganizationUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgEntitlementStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgEntitlementStore.java index 60ead5d1a..289982e1b 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgEntitlementStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgEntitlementStore.java @@ -39,7 +39,7 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgContentSourceType; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; import com.vmware.pscoe.iac.artifact.aria.model.VraNgProject; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import com.vmware.pscoe.iac.artifact.store.filters.CustomFolderFileFilter; import org.apache.commons.lang3.StringUtils; import org.yaml.snakeyaml.DumperOptions; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgLeasePolicyStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgLeasePolicyStore.java index 50718ddd8..3c5a01757 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgLeasePolicyStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgLeasePolicyStore.java @@ -25,7 +25,7 @@ import java.util.List; import java.util.Map; -import com.vmware.pscoe.iac.artifact.utils.VraNgOrganizationUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgOrganizationUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgPropertyGroupStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgPropertyGroupStore.java index 701d7b208..39b77fcb6 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgPropertyGroupStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgPropertyGroupStore.java @@ -31,10 +31,10 @@ import com.vmware.pscoe.iac.artifact.model.Package; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPropertyGroup; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import com.vmware.pscoe.iac.artifact.store.filters.CustomFolderFileFilter; -import com.vmware.pscoe.iac.artifact.utils.VraNgOrganizationUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgOrganizationUtil; import static com.vmware.pscoe.iac.artifact.aria.store.VraNgDirs.DIR_PROPERTY_GROUPS; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgResourceActionStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgResourceActionStore.java index d14eae3e3..3f9deebe2 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgResourceActionStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgResourceActionStore.java @@ -24,7 +24,7 @@ import com.vmware.pscoe.iac.artifact.model.Package; import com.vmware.pscoe.iac.artifact.aria.model.VraNgResourceAction; import com.vmware.pscoe.iac.artifact.store.filters.CustomFolderFileFilter; -import com.vmware.pscoe.iac.artifact.utils.VraNgProjectUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgProjectUtil; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgResourceQuotaPolicyStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgResourceQuotaPolicyStore.java index 7d882ff18..8fb00c4ec 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgResourceQuotaPolicyStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgResourceQuotaPolicyStore.java @@ -32,7 +32,7 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgResourceQuotaPolicy; import com.vmware.pscoe.iac.artifact.store.filters.CustomFolderFileFilter; -import com.vmware.pscoe.iac.artifact.utils.VraNgOrganizationUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgOrganizationUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgSubscriptionStore.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgSubscriptionStore.java index b35828d25..d4888e586 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgSubscriptionStore.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgSubscriptionStore.java @@ -26,9 +26,9 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; import com.vmware.pscoe.iac.artifact.aria.model.VraNgProject; import com.vmware.pscoe.iac.artifact.aria.model.VraNgSubscription; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import com.vmware.pscoe.iac.artifact.store.filters.CustomFolderFileFilter; -import com.vmware.pscoe.iac.artifact.utils.VraNgOrganizationUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgOrganizationUtil; import org.apache.commons.io.FileUtils; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgTypeStoreFactory.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgTypeStoreFactory.java index ad697bd2b..f3fb3be1c 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgTypeStoreFactory.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VraNgTypeStoreFactory.java @@ -22,7 +22,7 @@ import com.vmware.pscoe.iac.artifact.model.Package; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageContent; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import static com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageContent.ContentType.APPROVAL_POLICY; import static com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageContent.ContentType.BLUEPRINT; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VrangContentSourceUtils.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VrangContentSourceUtils.java index 653f9e2f8..327de9f22 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VrangContentSourceUtils.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/VrangContentSourceUtils.java @@ -25,7 +25,7 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgContentSource; import com.vmware.pscoe.iac.artifact.aria.model.VraNgContentSourceBase; import com.vmware.pscoe.iac.artifact.aria.model.VraNgContentSourceType; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/VraNgReleaseManager.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/helpers/VraNgReleaseManager.java similarity index 86% rename from common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/VraNgReleaseManager.java rename to common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/helpers/VraNgReleaseManager.java index 49f2d117c..3cfbddfed 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/VraNgReleaseManager.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/store/helpers/VraNgReleaseManager.java @@ -12,7 +12,7 @@ * This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. * #L% */ -package com.vmware.pscoe.iac.artifact; +package com.vmware.pscoe.iac.artifact.aria.store.helpers; import java.text.DateFormat; import java.text.SimpleDateFormat; @@ -28,8 +28,7 @@ import org.slf4j.LoggerFactory; import com.vmware.pscoe.iac.artifact.aria.model.VraNgBlueprint; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; - +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; public class VraNgReleaseManager { @@ -41,16 +40,17 @@ public VraNgReleaseManager(RestClientVraNg restClient) { this.restClient = restClient; } - public void releaseContent(String contentType, List contentNames, String version, boolean releaseIfNotUpdated) { + public void releaseContent(String contentType, List contentNames, String version, + boolean releaseIfNotUpdated) { if (contentType.equals("blueprint") || contentType.equals("all")) { List blueprints = this.restClient.getAllBlueprints(); if (contentNames.size() > 0) { blueprints = blueprints.stream() - .filter(bp -> contentNames.contains(bp.getName())) - .collect(Collectors.toList()); + .filter(bp -> contentNames.contains(bp.getName())) + .collect(Collectors.toList()); } - + List invalidBlueprints = new ArrayList<>(); blueprints.forEach(bp -> { if (this.restClient.isBlueprintVersionPresent(bp.getId(), version)) { @@ -59,7 +59,8 @@ public void releaseContent(String contentType, List contentNames, String }); if (invalidBlueprints.size() > 0) { - throw new RuntimeException("Blueprints [" + String.join(", ", invalidBlueprints) + "] already have a released version " + version); + throw new RuntimeException("Blueprints [" + String.join(", ", invalidBlueprints) + + "] already have a released version " + version); } blueprints.forEach(bp -> { @@ -76,6 +77,7 @@ public void releaseContent(String contentType, List contentNames, String /** * Attempt to generate a next version and release it. + * * @param blueprint blueprint */ public void releaseNextVersion(VraNgBlueprint blueprint) { @@ -86,17 +88,20 @@ public void releaseNextVersion(VraNgBlueprint blueprint) { try { this.releaseVersion(blueprint, nextVersion); } catch (Exception e) { - // Attempt to fix versions imported in reverse order, which produces an Error on imports + // Attempt to fix versions imported in reverse order, which produces an Error on + // imports logger.warn("Couldn't release version '{}'. Attempting to release date version", nextVersion); this.releaseVersion(blueprint, this.getDateVersion()); } } /** - * Release a new version of the blueprint provided that there is no previous version or there are + * Release a new version of the blueprint provided that there is no previous + * version or there are * changes in the content since the latest released version. + * * @param blueprint blueprint - * @param version new version + * @param version new version */ public void releaseVersion(VraNgBlueprint blueprint, String version) { String latestVersion = this.restClient.getBlueprintLastUpdatedVersion(blueprint.getId()); @@ -109,8 +114,10 @@ public void releaseVersion(VraNgBlueprint blueprint, String version) { } /** - * Perform a check whether the blueprint content has been updated since the latest released version. - * @param blueprint blueprint + * Perform a check whether the blueprint content has been updated since the + * latest released version. + * + * @param blueprint blueprint * @param latestVersion latest version * @return true if there are changes */ @@ -130,8 +137,10 @@ private boolean isUpdated(VraNgBlueprint blueprint, String latestVersion) { * * MAJOR * * MAJOR.MINOR * * MAJOR.MINOR.PATCH - * A datetime-based version will be returned if the previous version format does not match + * A datetime-based version will be returned if the previous version format does + * not match * any of the supported formats. + * * @param version previous version * @return next version */ @@ -147,15 +156,19 @@ private String getNextVersion(String version) { Matcher majorMinorPatch = Pattern.compile("([0-9]+)\\.([0-9]+)\\.([0-9]+)").matcher(version); if (majorMinorPatch.matches()) { - logger.debug("Detected version pattern MAJOR.MINOR.PATCH from {} with incrementable segment '{}'", version, majorMinorPatch.group(3)); + logger.debug("Detected version pattern MAJOR.MINOR.PATCH from {} with incrementable segment '{}'", version, + majorMinorPatch.group(3)); // increment the patch segment - return majorMinorPatch.group(1) + "." + majorMinorPatch.group(2) + "." + (Integer.parseInt(majorMinorPatch.group(3)) + 1); + return majorMinorPatch.group(1) + "." + majorMinorPatch.group(2) + "." + + (Integer.parseInt(majorMinorPatch.group(3)) + 1); } else if (majorMinor.matches()) { - logger.debug("Detected version pattern MAJOR.MINOR from '{}' with incrementable segment '{}'", version, majorMinor.group(2)); + logger.debug("Detected version pattern MAJOR.MINOR from '{}' with incrementable segment '{}'", version, + majorMinor.group(2)); // increment the minor segment return majorMinor.group(1) + "." + (Integer.parseInt(majorMinor.group(2)) + 1); } else if (major.matches()) { - logger.debug("Detected version pattern MAJOR from '{}' with incrementable segment '{}'", version, major.group(1)); + logger.debug("Detected version pattern MAJOR from '{}' with incrementable segment '{}'", version, + major.group(1)); // increment the major segment return Integer.toString(Integer.parseInt(major.group(1)) + 1); } else { @@ -167,6 +180,7 @@ private String getNextVersion(String version) { /** * Create a version based on the current date and time. + * * @return datetime-based version */ private String getDateVersion() { diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/utils/VraNgIntegrationUtils.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/utils/VraNgIntegrationUtils.java similarity index 92% rename from common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/utils/VraNgIntegrationUtils.java rename to common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/utils/VraNgIntegrationUtils.java index 72ad8e97a..7ae6a4696 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/utils/VraNgIntegrationUtils.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/utils/VraNgIntegrationUtils.java @@ -12,10 +12,10 @@ * This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. * #L% */ -package com.vmware.pscoe.iac.artifact.utils; +package com.vmware.pscoe.iac.artifact.aria.utils; import com.vmware.pscoe.iac.artifact.aria.model.VraNgIntegration; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import java.util.List; import java.util.Optional; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/utils/VraNgOrganizationUtil.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/utils/VraNgOrganizationUtil.java similarity index 91% rename from common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/utils/VraNgOrganizationUtil.java rename to common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/utils/VraNgOrganizationUtil.java index 8c73bb05a..c602cfc59 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/utils/VraNgOrganizationUtil.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/utils/VraNgOrganizationUtil.java @@ -12,11 +12,11 @@ * This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. * #L% */ -package com.vmware.pscoe.iac.artifact.utils; +package com.vmware.pscoe.iac.artifact.aria.utils; import com.vmware.pscoe.iac.artifact.aria.configuration.ConfigurationVraNg; import com.vmware.pscoe.iac.artifact.aria.model.VraNgOrganization; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNgPrimitive; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNgPrimitive; import org.apache.commons.lang3.StringUtils; public final class VraNgOrganizationUtil { diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/utils/VraNgProjectUtil.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/utils/VraNgProjectUtil.java similarity index 92% rename from common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/utils/VraNgProjectUtil.java rename to common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/utils/VraNgProjectUtil.java index dda4bffce..a52eefc28 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/utils/VraNgProjectUtil.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/utils/VraNgProjectUtil.java @@ -12,9 +12,9 @@ * This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. * #L% */ -package com.vmware.pscoe.iac.artifact.utils; +package com.vmware.pscoe.iac.artifact.aria.utils; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/utils/package-info.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/utils/package-info.java similarity index 92% rename from common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/utils/package-info.java rename to common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/utils/package-info.java index 7eefaa9e4..c54de2289 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/utils/package-info.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/aria/utils/package-info.java @@ -17,4 +17,4 @@ * Package that represents IAC Artifact. * */ -package com.vmware.pscoe.iac.artifact.utils; +package com.vmware.pscoe.iac.artifact.aria.utils; diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientFactory.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientFactory.java index 6ae8744b0..faccfc68c 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientFactory.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientFactory.java @@ -23,6 +23,9 @@ import javax.net.ssl.SSLContext; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNgAuthNInterceptor; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNgPrimitive; import com.vmware.pscoe.iac.artifact.rest.client.vrli.RestClientVrliAuthInterceptor; import com.vmware.pscoe.iac.artifact.rest.client.vrli.RestClientVrliV1; import com.vmware.pscoe.iac.artifact.rest.client.vrli.RestClientVrliV2; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/helpers/vrang/RestClientVraNgPrimitiveTestDouble.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/helpers/vrang/RestClientVraNgPrimitiveTestDouble.java index 9813a484d..eb55d0186 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/helpers/vrang/RestClientVraNgPrimitiveTestDouble.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/helpers/vrang/RestClientVraNgPrimitiveTestDouble.java @@ -14,7 +14,7 @@ */ package com.vmware.pscoe.iac.artifact.helpers.vrang; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNgPrimitive; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNgPrimitive; import com.vmware.pscoe.iac.artifact.aria.configuration.ConfigurationVraNg; import org.apache.hc.core5.net.URIBuilder; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/rest/vrang/RestClientVraNgPrimitiveTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/rest/vrang/RestClientVraNgPrimitiveTest.java index 53909ad24..90538546a 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/rest/vrang/RestClientVraNgPrimitiveTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/rest/vrang/RestClientVraNgPrimitiveTest.java @@ -14,7 +14,7 @@ */ package com.vmware.pscoe.iac.artifact.rest.vrang; -import static com.vmware.pscoe.iac.artifact.utils.VraNgOrganizationUtil.getOrganization; +import static com.vmware.pscoe.iac.artifact.aria.utils.VraNgOrganizationUtil.getOrganization; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -68,7 +68,7 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgOrganization; import com.vmware.pscoe.iac.artifact.aria.model.VraNgProject; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPropertyGroup; -import com.vmware.pscoe.iac.artifact.utils.VraNgOrganizationUtil; +import com.vmware.pscoe.iac.artifact.aria.utils.VraNgOrganizationUtil; @SuppressWarnings("unchecked") class RestClientVraNgPrimitiveTest { diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgApprovalPolicyStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgApprovalPolicyStoreTest.java index daf28f2e8..debb0c7e6 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgApprovalPolicyStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgApprovalPolicyStoreTest.java @@ -27,7 +27,7 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgOrganization; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPolicy; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgBlueprintStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgBlueprintStoreTest.java index be487d2d4..d5fa20115 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgBlueprintStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgBlueprintStoreTest.java @@ -23,7 +23,7 @@ import com.vmware.pscoe.iac.artifact.model.PackageType; import com.vmware.pscoe.iac.artifact.aria.model.VraNgBlueprint; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.junit.Rule; import org.junit.internal.runners.statements.ExpectException; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgCatalogItemStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgCatalogItemStoreTest.java index 92ee53f22..16b556d5a 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgCatalogItemStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgCatalogItemStoreTest.java @@ -27,7 +27,7 @@ import com.vmware.pscoe.iac.artifact.model.PackageFactory; import com.vmware.pscoe.iac.artifact.model.PackageType; import com.vmware.pscoe.iac.artifact.aria.model.*; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgContentSharingPolicyStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgContentSharingPolicyStoreTest.java index d4083dd86..73550b456 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgContentSharingPolicyStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgContentSharingPolicyStoreTest.java @@ -46,7 +46,7 @@ import com.vmware.pscoe.iac.artifact.helpers.FsMocks; import com.vmware.pscoe.iac.artifact.model.PackageFactory; import com.vmware.pscoe.iac.artifact.model.PackageType; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; public class VraNgContentSharingPolicyStoreTest { /** diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgContentSourceStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgContentSourceStoreTest.java index 340e66d5b..a0a1c0875 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgContentSourceStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgContentSourceStoreTest.java @@ -23,7 +23,7 @@ import com.vmware.pscoe.iac.artifact.model.PackageType; import com.vmware.pscoe.iac.artifact.aria.model.*; import com.vmware.pscoe.iac.artifact.rest.RestClient; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.junit.Rule; import org.junit.jupiter.api.AfterEach; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgCustomResourceStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgCustomResourceStoreTest.java index 1b7bc25ce..34c3dbb81 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgCustomResourceStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgCustomResourceStoreTest.java @@ -43,7 +43,7 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgCustomResource; import com.vmware.pscoe.iac.artifact.aria.model.VraNgIntegration; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.apache.commons.io.FileUtils; import org.junit.Rule; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgDay2ActionsPolicyStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgDay2ActionsPolicyStoreTest.java index cb3f5fd1b..75e98a3d9 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgDay2ActionsPolicyStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgDay2ActionsPolicyStoreTest.java @@ -22,7 +22,7 @@ import com.vmware.pscoe.iac.artifact.model.PackageFactory; import com.vmware.pscoe.iac.artifact.model.PackageType; import com.vmware.pscoe.iac.artifact.aria.model.*; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgDeploymentLimitPolicyStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgDeploymentLimitPolicyStoreTest.java index 441d84d5b..1be556bdc 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgDeploymentLimitPolicyStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgDeploymentLimitPolicyStoreTest.java @@ -22,7 +22,7 @@ import com.vmware.pscoe.iac.artifact.model.PackageFactory; import com.vmware.pscoe.iac.artifact.model.PackageType; import com.vmware.pscoe.iac.artifact.aria.model.*; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgEntitlementStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgEntitlementStoreTest.java index 28c4f3db2..905adfc3a 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgEntitlementStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgEntitlementStoreTest.java @@ -23,7 +23,7 @@ import com.vmware.pscoe.iac.artifact.model.PackageType; import com.vmware.pscoe.iac.artifact.aria.model.*; import com.vmware.pscoe.iac.artifact.rest.RestClient; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.junit.Rule; import org.junit.jupiter.api.AfterEach; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgLeasePolicyStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgLeasePolicyStoreTest.java index 43e0814ad..187fb35a7 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgLeasePolicyStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgLeasePolicyStoreTest.java @@ -22,7 +22,7 @@ import com.vmware.pscoe.iac.artifact.model.PackageFactory; import com.vmware.pscoe.iac.artifact.model.PackageType; import com.vmware.pscoe.iac.artifact.aria.model.*; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgPropertyGroupStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgPropertyGroupStoreTest.java index 09a7b133f..45a88eecc 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgPropertyGroupStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgPropertyGroupStoreTest.java @@ -24,7 +24,7 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgOrganization; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPropertyGroup; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgReleaseManagerTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgReleaseManagerTest.java index a73f913b5..e6c892a84 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgReleaseManagerTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgReleaseManagerTest.java @@ -14,8 +14,8 @@ */ package com.vmware.pscoe.iac.artifact.aria.store; -import com.vmware.pscoe.iac.artifact.VraNgReleaseManager; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.store.helpers.VraNgReleaseManager; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import com.vmware.pscoe.iac.artifact.aria.model.VraNgBlueprint; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgResourceActionStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgResourceActionStoreTest.java index f673ef3fe..58e018595 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgResourceActionStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgResourceActionStoreTest.java @@ -23,7 +23,7 @@ import com.vmware.pscoe.iac.artifact.model.PackageType; import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; import com.vmware.pscoe.iac.artifact.aria.model.VraNgResourceAction; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.junit.Rule; import org.junit.jupiter.api.AfterEach; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgResourceQuotaPolicyStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgResourceQuotaPolicyStoreTest.java index deaaee44f..c32e33dc6 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgResourceQuotaPolicyStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgResourceQuotaPolicyStoreTest.java @@ -22,7 +22,7 @@ import com.vmware.pscoe.iac.artifact.model.PackageFactory; import com.vmware.pscoe.iac.artifact.model.PackageType; import com.vmware.pscoe.iac.artifact.aria.model.*; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.junit.Rule; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgSubscriptionStoreTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgSubscriptionStoreTest.java index b903e66d7..96ae3e9ff 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgSubscriptionStoreTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/store/vrang/VraNgSubscriptionStoreTest.java @@ -56,7 +56,7 @@ import com.vmware.pscoe.iac.artifact.aria.model.VraNgPackageDescriptor; import com.vmware.pscoe.iac.artifact.aria.model.VraNgProject; import com.vmware.pscoe.iac.artifact.aria.model.VraNgSubscription; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; public class VraNgSubscriptionStoreTest { @Rule diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/utils/VraNgProjectUtilTest.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/utils/VraNgProjectUtilTest.java index f437cb24a..64e30fd4a 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/utils/VraNgProjectUtilTest.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/utils/VraNgProjectUtilTest.java @@ -12,14 +12,14 @@ * This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. * #L% */ -package com.vmware.pscoe.iac.artifact.utils; +package com.vmware.pscoe.iac.artifact.aria.utils; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; import com.vmware.pscoe.iac.artifact.helpers.stubs.ResourceActionMockBuilder; import com.vmware.pscoe.iac.artifact.aria.model.VraNgResourceAction; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mockito; diff --git a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/utils/package-info.java b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/utils/package-info.java index b14a181ef..a06381942 100644 --- a/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/utils/package-info.java +++ b/common/artifact-manager/src/test/java/com/vmware/pscoe/iac/artifact/utils/package-info.java @@ -17,4 +17,4 @@ * Package that represents ProjectUtil Tests. * */ -package com.vmware.pscoe.iac.artifact.utils; +package com.vmware.pscoe.iac.artifact.aria.utils; diff --git a/maven/plugins/vrealize/src/main/java/com/vmware/pscoe/maven/plugins/ReleaseMojo.java b/maven/plugins/vrealize/src/main/java/com/vmware/pscoe/maven/plugins/ReleaseMojo.java index 771323976..013502da9 100644 --- a/maven/plugins/vrealize/src/main/java/com/vmware/pscoe/maven/plugins/ReleaseMojo.java +++ b/maven/plugins/vrealize/src/main/java/com/vmware/pscoe/maven/plugins/ReleaseMojo.java @@ -17,12 +17,12 @@ import java.util.Arrays; import com.vmware.pscoe.iac.artifact.AbxReleaseManager; -import com.vmware.pscoe.iac.artifact.VraNgReleaseManager; +import com.vmware.pscoe.iac.artifact.aria.store.helpers.VraNgReleaseManager; import com.vmware.pscoe.iac.artifact.configuration.ConfigurationException; import com.vmware.pscoe.iac.artifact.aria.configuration.ConfigurationVraNg; import com.vmware.pscoe.iac.artifact.model.PackageType; import com.vmware.pscoe.iac.artifact.rest.RestClientFactory; -import com.vmware.pscoe.iac.artifact.rest.RestClientVraNg; +import com.vmware.pscoe.iac.artifact.aria.rest.RestClientVraNg; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.LifecyclePhase;