summaryrefslogtreecommitdiffstats
path: root/asdctool
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2021-08-18 14:34:33 +0100
committerMichael Morris <michael.morris@est.tech>2021-08-26 12:13:58 +0000
commitaea64ba99fa9c9b51112b30aeb0872c4cdb89759 (patch)
tree8645ba4b820f8615e54ecd053f7232c2fcd7dca9 /asdctool
parent5a0703ffad1492ec6b6c78143f63dca83ee030d2 (diff)
Validate the Resource Model before importing VSP
Validates the Resource Model selected during the Import VSP. This model must be aligned with one of the models that the imported VSP relates to. Fix VSP package retrieval to get the exact version from the VSP chosen during the Import VSP process. Introduces a client in the Catalog to retrieve from the Onboarding backend a VSP information using its Id and version Id. Change-Id: Ic8fb52b6daadc0e7203c81a9c15c3e46d5b9fffb Issue-ID: SDC-3675 Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'asdctool')
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb7
-rw-r--r--asdctool/src/main/resources/config/configuration.yaml4
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/configuration/ConfigurationUploaderTest.java19
3 files changed, 14 insertions, 16 deletions
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb
index c5b7f635d0..0f11a3e6f1 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb
@@ -251,13 +251,6 @@ artifactsIndex: resources
heatEnvArtifactHeader: ""
heatEnvArtifactFooter: ""
-onboarding:
- protocol: http
- host: <%= @host_ip %>
- port: <%= @catalog_port %>
- downloadCsarUri: "/onboarding-api/v1.0/vendor-software-products/packages"
- healthCheckUri: "/onboarding-api/v1.0/healthcheck"
-
# #GSS IDNS
switchoverDetector:
gBeFqdn:
diff --git a/asdctool/src/main/resources/config/configuration.yaml b/asdctool/src/main/resources/config/configuration.yaml
index 50093055d0..4e0e4128b4 100644
--- a/asdctool/src/main/resources/config/configuration.yaml
+++ b/asdctool/src/main/resources/config/configuration.yaml
@@ -293,7 +293,9 @@ onboarding:
protocol: http
host: localhost
port: 8080
- downloadCsarUri: "/onboarding-api/v1.0/vendor-software-products/packages"
+ getVspPackageUri: "/onboarding-api/v1.0/vendor-software-products/packages/%s?versionId=%s" # /onboarding-api/v1.0/vendor-software-products/packages/:vspId?versionId=:vspVersionId
+ getLatestVspPackageUri: "/onboarding-api/v1.0/vendor-software-products/packages/%s" # /onboarding-api/v1.0/vendor-software-products/packages/:vspId
+ getVspUri: "/onboarding-api/v1.0/vendor-software-products/%s/versions/%s" # /onboarding-api/v1.0/vendor-software-products/:vspId/versions/:vspVersionId
healthCheckUri: "/onboarding-api/v1.0/healthcheck"
switchoverDetector:
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/configuration/ConfigurationUploaderTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/configuration/ConfigurationUploaderTest.java
index 3a7fd0e11b..40f0faed21 100644
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/configuration/ConfigurationUploaderTest.java
+++ b/asdctool/src/test/java/org/openecomp/sdc/asdctool/configuration/ConfigurationUploaderTest.java
@@ -20,19 +20,22 @@
package org.openecomp.sdc.asdctool.configuration;
-import org.junit.Test;
-public class ConfigurationUploaderTest {
+import static org.junit.jupiter.api.Assertions.assertEquals;
- private ConfigurationUploader createTestSubject() {
- return new ConfigurationUploader();
- }
+import org.junit.jupiter.api.Test;
+
+class ConfigurationUploaderTest {
@Test
- public void testUploadConfigurationFiles() throws Exception {
- String appConfigDir = "src/main/resources/config/";
+ void testUploadConfigurationFiles() {
+ final var appConfigDir = "src/main/resources/config/";
- // default test
+ //when
ConfigurationUploader.uploadConfigurationFiles(appConfigDir);
+
+ //then
+ assertEquals(appConfigDir, System.getProperty("config.home"));
+ assertEquals(appConfigDir + "Artifact-Generator.properties", System.getProperty("artifactgenerator.config"));
}
}