summaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'asdc-controller/src/test')
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java192
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/client/SdcNotificationWithSol004PackageTest.java358
-rw-r--r--asdc-controller/src/test/resources/application-test.yaml6
-rw-r--r--asdc-controller/src/test/resources/download/service-Testserviceforpnf-csar.csarbin0 -> 96641 bytes
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vgw/ETSI_PACKAGE/VENDOR_LICENSE/vendor-license-model.xml1
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vgw/ETSI_PACKAGE/VF_LICENSE/vf-license-model.xml1
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vgw/ETSI_PACKAGE/vgw6.csarbin43363 -> 0 bytes
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vgw/SDC_RESOURCE_CSAR/vgw_sdc_resource.csarbin117441 -> 0 bytes
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vgw/VENDOR_LICENSE/vendor-license-model.xml1
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vgw/VF_LICENSE/vf-license-model.xml1
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vgw/dmaap-notification-message.json66
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vgw/etsi-catalog-package-onboading-job-status-error-package-exists.json20
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vgw/etsi-catalog-package-onboading-job-status-error.json20
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vgw/etsi-catalog-package-onboading-job-status-successful.json27
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vgw/service-Vgwservicev1-csar.csarbin121635 -> 0 bytes
-rw-r--r--asdc-controller/src/test/resources/schema.sql1
16 files changed, 167 insertions, 527 deletions
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java
index 3db017cac5..eafb42a3d9 100644
--- a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java
+++ b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java
@@ -320,33 +320,6 @@ public class ASDCControllerITTest extends BaseTest {
}
}
- private ArtifactInfoImpl constructPnfServiceArtifact() {
- ArtifactInfoImpl artifactInfo = new ArtifactInfoImpl();
- artifactInfo.setArtifactType(ASDCConfiguration.TOSCA_CSAR);
- artifactInfo.setArtifactURL("/download/service-pnfservice.csar");
- artifactInfo.setArtifactName("service-pnfservice.csar");
- artifactInfo.setArtifactVersion("1.0");
- artifactInfo.setArtifactUUID(artifactUuid);
- return artifactInfo;
- }
-
- /**
- * Construct the PnfResourceInfo based on the resource-Test140Pnf-template.yml from
- * service-Testservice140-csar.csar.
- */
- private ResourceInfoImpl constructPnfResourceInfo() {
- ResourceInfoImpl resourceInfo = new ResourceInfoImpl();
- resourceInfo.setResourceInstanceName("PNF CDS Test");
- resourceInfo.setResourceInvariantUUID("17d9d183-cee5-4a46-b5c4-6d5203f7d2e8");
- resourceInfo.setResoucreType("PNF");
- resourceInfo.setCategory("Application L4+");
- resourceInfo.setSubcategory("Firewall");
- resourceInfo.setResourceUUID("aa5d0562-80e7-43e9-af74-3085e57ab09f");
- resourceInfo.setResourceCustomizationUUID("9f01263a-eaf7-4d98-a37b-3785f751903e");
- resourceInfo.setResourceVersion("1.0");
- return resourceInfo;
- }
-
/**
* Testing with the service-Svc140-VF-csar.csar.
*/
@@ -479,6 +452,144 @@ public class ASDCControllerITTest extends BaseTest {
}
}
+ /**
+ * Test with service-pnfservice.csar.
+ */
+ @Test
+ public void treatNotification_ValidPnfResource_With_Software_Version_ExpectedOutput() {
+
+ /**
+ * service UUID/invariantUUID from global metadata in service-PnfServiceTestCds-template.yml.
+ */
+ String serviceUuid = "888d93bd-ef31-4ab8-9d9e-3935e9a71845";// "77cf276e-905c-43f6-8d54-dda474be2f2e";
+ String serviceInvariantUuid = "e5c5fd11-392f-4aa7-aeeb-b340c596d4bd";// "913e6776-4bc3-49b9-b399-b5bb4690f0c7";
+
+ initMockAaiServer(serviceUuid, serviceInvariantUuid);
+
+ NotificationDataImpl notificationData = new NotificationDataImpl();
+ notificationData.setServiceUUID(serviceUuid);
+ notificationData.setDistributionID(distributionId);
+ notificationData.setServiceInvariantUUID(serviceInvariantUuid);
+ notificationData.setServiceVersion("1.0");
+
+ ResourceInfoImpl resourceInfo = constructPnfResourceInfoWithSWV();
+ List<ResourceInfoImpl> resourceInfoList = new ArrayList<>();
+ resourceInfoList.add(resourceInfo);
+ notificationData.setResources(resourceInfoList);
+
+ ArtifactInfoImpl artifactInfo = constructPnfServiceArtifactWithSWV();
+ List<ArtifactInfoImpl> artifactInfoList = new ArrayList<>();
+ artifactInfoList.add(artifactInfo);
+ notificationData.setServiceArtifacts(artifactInfoList);
+
+ try {
+ asdcController.treatNotification(notificationData);
+
+ logger.info("Checking the database for PNF ingestion");
+
+ /**
+ * Check the tosca csar entity, it should be the same as provided from NotficationData.
+ */
+ ToscaCsar toscaCsar = toscaCsarRepository.findById(artifactUuid)
+ .orElseThrow(() -> new EntityNotFoundException("Tosca csar: " + artifactUuid + " not found"));
+ assertEquals("tosca csar UUID", artifactUuid, toscaCsar.getArtifactUUID());
+ assertEquals("tosca csar name", "service-Testserviceforpnf-csar.csar", toscaCsar.getName());
+ assertEquals("tosca csar version", "1.0", toscaCsar.getVersion());
+ assertNull("tosca csar descrption", toscaCsar.getDescription());
+ assertEquals("tosca csar checksum", "MANUAL_RECORD", toscaCsar.getArtifactChecksum());
+ assertEquals("toscar csar URL", "/download/service-Testserviceforpnf-csar.csar", toscaCsar.getUrl());
+
+ /**
+ * Check the service entity, it should be the same as global metadata information in
+ * service-Testservice140-template.yml inside csar.
+ */
+ Service service = serviceRepository.findById(serviceUuid)
+ .orElseThrow(() -> new EntityNotFoundException("Service: " + serviceUuid + " not found"));
+
+ /**
+ * Check PNF resource, it should be the same as metadata in the topology template in
+ * service-PnfServiceTestCds-template.yml OR global metadata in the resource-PnfServiceTestCds-template.yml
+ */
+ String pnfResourceKey = "72a2c44c-bb8a-4086-824b-0662d40bcd68";
+
+ /**
+ * Check PNF resource customization, it should be the same as metadata in the topology template in
+ * service-PnfServiceTestCds-template.yml OR global metadata in the resource-PnfServiceTestCds-template.yml
+ */
+ String pnfCustomizationKey = "96642e60-17cd-48c1-875d-b00b08fdb37b";// "9f01263a-eaf7-4d98-a37b-3785f751903e";
+ PnfResourceCustomization pnfCustomization = pnfCustomizationRepository.findById(pnfCustomizationKey)
+ .orElseThrow(() -> new EntityNotFoundException(
+ "PNF resource customization: " + pnfCustomizationKey + " not found"));
+ assertEquals("model customizationUUID", pnfCustomizationKey, pnfCustomization.getModelCustomizationUUID());
+ assertEquals("model instance name", "VSP_WithPNFD 1", pnfCustomization.getModelInstanceName());
+ assertEquals("NF type", "", pnfCustomization.getNfType());
+ assertEquals("NF Role", "", pnfCustomization.getNfRole());
+ assertEquals("NF function", "", pnfCustomization.getNfFunction());
+ assertEquals("NF naming code", "", pnfCustomization.getNfNamingCode());
+ assertEquals("PNF resource model UUID", pnfResourceKey, pnfCustomization.getPnfResources().getModelUUID());
+ assertEquals("Multi stage design", "", pnfCustomization.getMultiStageDesign());
+ assertNull("resource input", pnfCustomization.getResourceInput());
+ assertEquals("cds blueprint name(sdnc_model_name property)", "pm_control",
+ pnfCustomization.getBlueprintName());
+ assertEquals("cds blueprint version(sdnc_model_version property)", "1.0.0",
+ pnfCustomization.getBlueprintVersion());
+ assertEquals("default software version", "4.0.0", pnfCustomization.getDefaultSoftwareVersion());
+ assertTrue("skip post instantiation configuration", pnfCustomization.isSkipPostInstConf());
+ assertEquals("controller actor", "SO-REF-DATA", pnfCustomization.getControllerActor());
+
+ /**
+ * Check the pnf resource customization with service mapping
+ */
+ List<PnfResourceCustomization> pnfCustList = service.getPnfCustomizations();
+ assertEquals("PNF resource customization entity", 1, pnfCustList.size());
+ assertEquals(pnfCustomizationKey, pnfCustList.get(0).getModelCustomizationUUID());
+
+ /**
+ * Check the watchdog for component distribution status
+ */
+ List<WatchdogComponentDistributionStatus> distributionList =
+ watchdogCDStatusRepository.findByDistributionId(this.distributionId);
+ assertNotNull(distributionList);
+ assertEquals(1, distributionList.size());
+ WatchdogComponentDistributionStatus distributionStatus = distributionList.get(0);
+ assertEquals("COMPONENT_DONE_OK", distributionStatus.getComponentDistributionStatus());
+ assertEquals("SO", distributionStatus.getComponentName());
+
+
+ } catch (Exception e) {
+ logger.info(e.getMessage(), e);
+ fail(e.getMessage());
+ }
+ }
+
+
+ private ArtifactInfoImpl constructPnfServiceArtifact() {
+ ArtifactInfoImpl artifactInfo = new ArtifactInfoImpl();
+ artifactInfo.setArtifactType(ASDCConfiguration.TOSCA_CSAR);
+ artifactInfo.setArtifactURL("/download/service-pnfservice.csar");
+ artifactInfo.setArtifactName("service-pnfservice.csar");
+ artifactInfo.setArtifactVersion("1.0");
+ artifactInfo.setArtifactUUID(artifactUuid);
+ return artifactInfo;
+ }
+
+ /**
+ * Construct the PnfResourceInfo based on the resource-Test140Pnf-template.yml from
+ * service-Testservice140-csar.csar.
+ */
+ private ResourceInfoImpl constructPnfResourceInfo() {
+ ResourceInfoImpl resourceInfo = new ResourceInfoImpl();
+ resourceInfo.setResourceInstanceName("PNF CDS Test");
+ resourceInfo.setResourceInvariantUUID("17d9d183-cee5-4a46-b5c4-6d5203f7d2e8");
+ resourceInfo.setResoucreType("PNF");
+ resourceInfo.setCategory("Application L4+");
+ resourceInfo.setSubcategory("Firewall");
+ resourceInfo.setResourceUUID("aa5d0562-80e7-43e9-af74-3085e57ab09f");
+ resourceInfo.setResourceCustomizationUUID("9f01263a-eaf7-4d98-a37b-3785f751903e");
+ resourceInfo.setResourceVersion("1.0");
+ return resourceInfo;
+ }
+
private ArtifactInfoImpl constructVnfServiceArtifact() {
ArtifactInfoImpl artifactInfo = new ArtifactInfoImpl();
artifactInfo.setArtifactType(ASDCConfiguration.TOSCA_CSAR);
@@ -505,4 +616,31 @@ public class ASDCControllerITTest extends BaseTest {
resourceInfo.setArtifacts(Collections.EMPTY_LIST);
return resourceInfo;
}
+
+ private ArtifactInfoImpl constructPnfServiceArtifactWithSWV() {
+ ArtifactInfoImpl artifactInfo = new ArtifactInfoImpl();
+ artifactInfo.setArtifactType(ASDCConfiguration.TOSCA_CSAR);
+ artifactInfo.setArtifactURL("/download/service-Testserviceforpnf-csar.csar");// service-pnfservice.csar");
+ artifactInfo.setArtifactName("service-Testserviceforpnf-csar.csar");// "service-pnfservice.csar");
+ artifactInfo.setArtifactVersion("1.0");
+ artifactInfo.setArtifactUUID(artifactUuid);
+ return artifactInfo;
+ }
+
+ /**
+ * Construct the PnfResourceInfo based on the resource-Test140Pnf-template.yml from
+ * service-Testservice140-csar.csar.
+ */
+ private ResourceInfoImpl constructPnfResourceInfoWithSWV() {
+ ResourceInfoImpl resourceInfo = new ResourceInfoImpl();
+ resourceInfo.setResourceInstanceName("PNF CDS Test");
+ resourceInfo.setResourceInvariantUUID("bf150ca9-b8d3-4450-b50a-d80382a12462");// "17d9d183-cee5-4a46-b5c4-6d5203f7d2e8");
+ resourceInfo.setResoucreType("PNF");
+ resourceInfo.setCategory("Application L4+");
+ resourceInfo.setSubcategory("Firewall");
+ resourceInfo.setResourceUUID("72a2c44c-bb8a-4086-824b-0662d40bcd68");// "aa5d0562-80e7-43e9-af74-3085e57ab09f");
+ resourceInfo.setResourceCustomizationUUID("96642e60-17cd-48c1-875d-b00b08fdb37b");// "9f01263a-eaf7-4d98-a37b-3785f751903e");
+ resourceInfo.setResourceVersion("1.0");
+ return resourceInfo;
+ }
}
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/client/SdcNotificationWithSol004PackageTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/client/SdcNotificationWithSol004PackageTest.java
deleted file mode 100644
index 2e8da35f3e..0000000000
--- a/asdc-controller/src/test/java/org/onap/so/asdc/client/SdcNotificationWithSol004PackageTest.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2020 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.asdc.client;
-
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.equalTo;
-import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
-import static com.github.tomakehurst.wiremock.client.WireMock.get;
-import static com.github.tomakehurst.wiremock.client.WireMock.getRequestedFor;
-import static com.github.tomakehurst.wiremock.client.WireMock.ok;
-import static com.github.tomakehurst.wiremock.client.WireMock.okJson;
-import static com.github.tomakehurst.wiremock.client.WireMock.post;
-import static com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
-import static com.github.tomakehurst.wiremock.client.WireMock.verify;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-import static org.onap.sdc.utils.DistributionStatusEnum.COMPONENT_DONE_ERROR;
-import static org.onap.sdc.utils.DistributionStatusEnum.COMPONENT_DONE_OK;
-import static org.springframework.http.HttpHeaders.ACCEPT;
-import static org.springframework.http.MediaType.APPLICATION_OCTET_STREAM_VALUE;
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.List;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.so.asdc.BaseTest;
-import org.onap.so.asdc.client.exceptions.ASDCControllerException;
-import org.onap.so.asdc.client.test.emulators.DistributionClientEmulator;
-import org.onap.so.asdc.client.test.emulators.NotificationDataImpl;
-import org.onap.so.db.catalog.data.repository.ServiceRepository;
-import org.onap.so.db.request.beans.WatchdogComponentDistributionStatus;
-import org.onap.so.db.request.beans.WatchdogComponentDistributionStatusId;
-import org.onap.so.db.request.data.repository.WatchdogComponentDistributionStatusRepository;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import com.google.gson.GsonBuilder;
-
-/**
- * @author Waqas Ikram (waqas.ikram@est.tech)
- *
- */
-public class SdcNotificationWithSol004PackageTest extends BaseTest {
-
- private final static Logger LOGGER = LoggerFactory.getLogger(SdcNotificationWithSol004PackageTest.class);
- private static final String ETSI_CATALOG_PACKAGE_ONBOARDING_URL = "/api/catalog/v1/vnfpackages";
- private static final String COMPONENT_NAME = "SO";
- private static final String CSAR_ID = "8f0b72e1-b6d6-42b6-a808-c60b17f04d7a";
- private static final String SDC_GET_RESOURCE_URL = "/sdc/v1/catalog/resources/" + CSAR_ID + "/toscaModel";
- private static final String ETSI_CATALOG_PACKAGE_ONBOARDING_REQUEST = "{\"csarId\": \"" + CSAR_ID + "\"}";
- private static final String DISTRIBUTION_ID = "35f20eb9-238a-4cc2-96dc-0a08f71bc209";
- private static final String VGW_RESOURCE_PATH = "src/test/resources/resource-examples/vgw";
- private static final String SERVICE_UUID = "e051ff77-fb79-451c-8457-1cbf94e4db8f";
- private static final String SERVICE_INVARIANT_UUID = "c2ce924f-0aa1-4777-9b42-c0fec006a883";
- private static final String JOB_ID = "57c13120-0a03-4d2e-837a-7c41d61e4a30";
- private static final String ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_STATUS_URL = "/api/catalog/v1/jobs/" + JOB_ID;
- private static final String ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_RESPONSE = "{\"jobId\": \"" + JOB_ID + "\"}";
-
- @Autowired
- private ASDCController asdcController;
-
- private DistributionClientEmulator distributionClient;
-
- @Autowired
- private WatchdogComponentDistributionStatusRepository watchdogComponentDistributionStatusRepository;
-
- @Autowired
- protected ServiceRepository serviceRepository;
-
- @Before
- public void setUp() {
- distributionClient = new DistributionClientEmulator();
- distributionClient.setResourcePath(getAbsolutePath(VGW_RESOURCE_PATH));
- asdcController.setDistributionClient(distributionClient);
- try {
- asdcController.initASDC();
- } catch (final ASDCControllerException controllerException) {
- LOGGER.error(controllerException.getMessage(), controllerException);
- fail(controllerException.getMessage());
- }
- }
-
- @After
- public void shutDown() {
- try {
- if (serviceRepository.existsById(SERVICE_UUID)) {
- LOGGER.debug("Deleting existing service using {} ", SERVICE_UUID);
- serviceRepository.deleteById(SERVICE_UUID);
- }
-
- final WatchdogComponentDistributionStatusId distributionId = new WatchdogComponentDistributionStatusId();
- distributionId.setDistributionId(DISTRIBUTION_ID);
- distributionId.setComponentName(COMPONENT_NAME);
- if (watchdogComponentDistributionStatusRepository.existsById(distributionId)) {
- LOGGER.debug("Deleting existing WatchdogComponentDistributionStatus using {} ", distributionId);
- watchdogComponentDistributionStatusRepository.deleteById(distributionId);
- }
- asdcController.closeASDC();
- } catch (final ASDCControllerException asdcControllerException) {
- LOGGER.error(asdcControllerException.getMessage(), asdcControllerException);
- fail(asdcControllerException.getMessage());
- }
- }
-
- @Test
- public void testTreatNotification_vgwServiceContainingSol004Package_successfullyOnboard() throws IOException {
- initMockAaiServer(SERVICE_UUID, SERVICE_INVARIANT_UUID);
-
- wireMockServer.stubFor(get(SDC_GET_RESOURCE_URL)
- .willReturn(aResponse().withBody(getFileContent(
- Paths.get(getAbsolutePath(VGW_RESOURCE_PATH), "SDC_RESOURCE_CSAR", "vgw_sdc_resource.csar"))))
- .withHeader(ACCEPT, equalTo(APPLICATION_OCTET_STREAM_VALUE)));
-
- wireMockServer.stubFor(post(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_URL))
- .willReturn(okJson(ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_RESPONSE)));
-
- wireMockServer.stubFor(get(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_STATUS_URL))
- .willReturn(okJson(new String(getFileContent(Paths.get(getAbsolutePath(VGW_RESOURCE_PATH),
- "etsi-catalog-package-onboading-job-status-successful.json"))))));
-
- asdcController.treatNotification(getNotificationDataImplObject());
-
- final List<WatchdogComponentDistributionStatus> distributionList =
- watchdogComponentDistributionStatusRepository.findByDistributionId(DISTRIBUTION_ID);
- assertNotNull(distributionList);
- assertEquals(1, distributionList.size());
- final WatchdogComponentDistributionStatus distributionStatus = distributionList.get(0);
- assertEquals(COMPONENT_DONE_OK.toString(), distributionStatus.getComponentDistributionStatus());
- assertEquals(COMPONENT_NAME, distributionStatus.getComponentName());
-
- verify(postRequestedFor(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_URL))
- .withRequestBody(equalToJson(ETSI_CATALOG_PACKAGE_ONBOARDING_REQUEST)));
-
- verify(getRequestedFor(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_STATUS_URL)));
- }
-
- @Test
- public void testTreatNotification_vgwServiceUnableToGeSdcResource_successfullyOnboard() throws IOException {
- initMockAaiServer(SERVICE_UUID, SERVICE_INVARIANT_UUID);
-
- wireMockServer
- .stubFor(get(SDC_GET_RESOURCE_URL).willReturn(aResponse().withStatus(HttpStatus.NOT_FOUND.value()))
- .withHeader(ACCEPT, equalTo(APPLICATION_OCTET_STREAM_VALUE)));
-
- asdcController.treatNotification(getNotificationDataImplObject());
-
- final List<WatchdogComponentDistributionStatus> distributionList =
- watchdogComponentDistributionStatusRepository.findByDistributionId(DISTRIBUTION_ID);
- assertNotNull(distributionList);
- assertEquals(1, distributionList.size());
- final WatchdogComponentDistributionStatus distributionStatus = distributionList.get(0);
- assertEquals(COMPONENT_DONE_OK.toString(), distributionStatus.getComponentDistributionStatus());
- assertEquals(COMPONENT_NAME, distributionStatus.getComponentName());
- }
-
- @Test
- public void testTreatNotification_vgwServiceContainingNonEtsiSdcResource_successfullyOnboard() throws IOException {
-
- initMockAaiServer(SERVICE_UUID, SERVICE_INVARIANT_UUID);
-
- wireMockServer.stubFor(get(SDC_GET_RESOURCE_URL)
- .willReturn(aResponse().withBody(getFileContent(
- Paths.get(getAbsolutePath(VGW_RESOURCE_PATH), "service-Vgwservicev1-csar.csar"))))
- .withHeader(ACCEPT, equalTo(APPLICATION_OCTET_STREAM_VALUE)));
-
- asdcController.treatNotification(getNotificationDataImplObject());
-
- final List<WatchdogComponentDistributionStatus> distributionList =
- watchdogComponentDistributionStatusRepository.findByDistributionId(DISTRIBUTION_ID);
- assertNotNull(distributionList);
- assertEquals(1, distributionList.size());
- final WatchdogComponentDistributionStatus distributionStatus = distributionList.get(0);
- assertEquals(COMPONENT_DONE_OK.toString(), distributionStatus.getComponentDistributionStatus());
- assertEquals(COMPONENT_NAME, distributionStatus.getComponentName());
-
- }
-
- @Test
- public void testTreatNotification_vgwServiceContainingSol004Package_onnboardRequestToEtsiCatalogReturnsBadGatway_distributionStatusError()
- throws IOException {
- initMockAaiServer(SERVICE_UUID, SERVICE_INVARIANT_UUID);
-
- wireMockServer.stubFor(get(SDC_GET_RESOURCE_URL)
- .willReturn(aResponse().withBody(getFileContent(
- Paths.get(getAbsolutePath(VGW_RESOURCE_PATH), "SDC_RESOURCE_CSAR", "vgw_sdc_resource.csar"))))
- .withHeader(ACCEPT, equalTo(APPLICATION_OCTET_STREAM_VALUE)));
-
- wireMockServer.stubFor(post(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_URL))
- .willReturn(aResponse().withStatus(HttpStatus.BAD_GATEWAY.value())));
-
- asdcController.treatNotification(getNotificationDataImplObject());
-
- final List<WatchdogComponentDistributionStatus> distributionList =
- watchdogComponentDistributionStatusRepository.findByDistributionId(DISTRIBUTION_ID);
- assertNotNull(distributionList);
- assertEquals(1, distributionList.size());
- final WatchdogComponentDistributionStatus distributionStatus = distributionList.get(0);
- assertEquals(COMPONENT_DONE_ERROR.toString(), distributionStatus.getComponentDistributionStatus());
- assertEquals(COMPONENT_NAME, distributionStatus.getComponentName());
-
- verify(postRequestedFor(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_URL))
- .withRequestBody(equalToJson(ETSI_CATALOG_PACKAGE_ONBOARDING_REQUEST)));
-
- }
-
- @Test
- public void testTreatNotification_vgwServiceContainingSol004Package_getJobStatusReturnsBadGatway_distributionStatusError()
- throws IOException {
- initMockAaiServer(SERVICE_UUID, SERVICE_INVARIANT_UUID);
-
- wireMockServer.stubFor(get(SDC_GET_RESOURCE_URL)
- .willReturn(aResponse().withBody(getFileContent(
- Paths.get(getAbsolutePath(VGW_RESOURCE_PATH), "SDC_RESOURCE_CSAR", "vgw_sdc_resource.csar"))))
- .withHeader(ACCEPT, equalTo(APPLICATION_OCTET_STREAM_VALUE)));
-
- wireMockServer.stubFor(post(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_URL))
- .willReturn(okJson(ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_RESPONSE)));
-
- wireMockServer.stubFor(get(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_STATUS_URL))
- .willReturn(aResponse().withStatus(HttpStatus.BAD_GATEWAY.value())));
-
- asdcController.treatNotification(getNotificationDataImplObject());
-
- final List<WatchdogComponentDistributionStatus> distributionList =
- watchdogComponentDistributionStatusRepository.findByDistributionId(DISTRIBUTION_ID);
- assertNotNull(distributionList);
- assertEquals(1, distributionList.size());
- final WatchdogComponentDistributionStatus distributionStatus = distributionList.get(0);
- assertEquals(COMPONENT_DONE_ERROR.toString(), distributionStatus.getComponentDistributionStatus());
- assertEquals(COMPONENT_NAME, distributionStatus.getComponentName());
-
- verify(postRequestedFor(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_URL))
- .withRequestBody(equalToJson(ETSI_CATALOG_PACKAGE_ONBOARDING_REQUEST)));
-
- verify(getRequestedFor(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_STATUS_URL)));
-
- }
-
- @Test
- public void testTreatNotification_vgwServiceContainingSol004Package_getJobStatusBodyWithStatusError_distributionStatusError()
- throws IOException {
-
- initMockAaiServer(SERVICE_UUID, SERVICE_INVARIANT_UUID);
-
- wireMockServer.stubFor(get(SDC_GET_RESOURCE_URL)
- .willReturn(aResponse().withBody(getFileContent(
- Paths.get(getAbsolutePath(VGW_RESOURCE_PATH), "SDC_RESOURCE_CSAR", "vgw_sdc_resource.csar"))))
- .withHeader(ACCEPT, equalTo(APPLICATION_OCTET_STREAM_VALUE)));
-
- wireMockServer.stubFor(post(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_URL))
- .willReturn(okJson(ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_RESPONSE)));
-
- wireMockServer.stubFor(get(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_STATUS_URL))
- .willReturn(okJson(new String(getFileContent(Paths.get(getAbsolutePath(VGW_RESOURCE_PATH),
- "etsi-catalog-package-onboading-job-status-error.json"))))));
-
- asdcController.treatNotification(getNotificationDataImplObject());
-
- final List<WatchdogComponentDistributionStatus> distributionList =
- watchdogComponentDistributionStatusRepository.findByDistributionId(DISTRIBUTION_ID);
- assertNotNull(distributionList);
- assertEquals(1, distributionList.size());
- final WatchdogComponentDistributionStatus distributionStatus = distributionList.get(0);
- assertEquals(COMPONENT_DONE_ERROR.toString(), distributionStatus.getComponentDistributionStatus());
- assertEquals(COMPONENT_NAME, distributionStatus.getComponentName());
-
- verify(postRequestedFor(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_URL))
- .withRequestBody(equalToJson(ETSI_CATALOG_PACKAGE_ONBOARDING_REQUEST)));
-
- verify(getRequestedFor(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_STATUS_URL)));
-
-
- }
-
- @Test
- public void testTreatNotification_vgwServiceContainingSol004PackageAndPackageAlreadyExistsInEtsiCatalog_successfullyOnboard()
- throws IOException {
- initMockAaiServer(SERVICE_UUID, SERVICE_INVARIANT_UUID);
-
- wireMockServer.stubFor(get(SDC_GET_RESOURCE_URL)
- .willReturn(aResponse().withBody(getFileContent(
- Paths.get(getAbsolutePath(VGW_RESOURCE_PATH), "SDC_RESOURCE_CSAR", "vgw_sdc_resource.csar"))))
- .withHeader(ACCEPT, equalTo(APPLICATION_OCTET_STREAM_VALUE)));
-
- wireMockServer.stubFor(post(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_URL))
- .willReturn(okJson(ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_RESPONSE)));
-
- wireMockServer.stubFor(get(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_STATUS_URL))
- .willReturn(okJson(new String(getFileContent(Paths.get(getAbsolutePath(VGW_RESOURCE_PATH),
- "etsi-catalog-package-onboading-job-status-error-package-exists.json"))))));
-
- asdcController.treatNotification(getNotificationDataImplObject());
-
- final List<WatchdogComponentDistributionStatus> distributionList =
- watchdogComponentDistributionStatusRepository.findByDistributionId(DISTRIBUTION_ID);
- assertNotNull(distributionList);
- assertEquals(1, distributionList.size());
- final WatchdogComponentDistributionStatus distributionStatus = distributionList.get(0);
- assertEquals(COMPONENT_DONE_OK.toString(), distributionStatus.getComponentDistributionStatus());
- assertEquals(COMPONENT_NAME, distributionStatus.getComponentName());
-
- verify(postRequestedFor(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_URL))
- .withRequestBody(equalToJson(ETSI_CATALOG_PACKAGE_ONBOARDING_REQUEST)));
-
- verify(getRequestedFor(urlEqualTo(ETSI_CATALOG_PACKAGE_ONBOARDING_JOB_STATUS_URL)));
- }
-
-
- private byte[] getFileContent(final Path path) throws IOException {
- return Files.readAllBytes(path);
- }
-
- private NotificationDataImpl getNotificationDataImplObject() throws IOException {
- final Path filePath = Paths.get(getAbsolutePath(VGW_RESOURCE_PATH), "dmaap-notification-message.json");
- final byte[] bytes = Files.readAllBytes(filePath);
-
- return new GsonBuilder().setPrettyPrinting().create().fromJson(new String(bytes), NotificationDataImpl.class);
- }
-
- /**
- * Mock the AAI using wireshark.
- */
- private void initMockAaiServer(final String serviceUuid, final String serviceInvariantUuid) {
- final String modelEndpoint = "/aai/v21/service-design-and-creation/models/model/" + serviceInvariantUuid
- + "/model-vers/model-ver/" + serviceUuid + "?depth=0";
-
- wireMockServer.stubFor(post(urlEqualTo(modelEndpoint)).willReturn(ok()));
- }
-
- private String getAbsolutePath(final String path) {
- final File file = new File(path);
- return file.getAbsolutePath();
- }
-}
diff --git a/asdc-controller/src/test/resources/application-test.yaml b/asdc-controller/src/test/resources/application-test.yaml
index 60cd2d9f2a..31ec987152 100644
--- a/asdc-controller/src/test/resources/application-test.yaml
+++ b/asdc-controller/src/test/resources/application-test.yaml
@@ -105,8 +105,4 @@ mso:
sdc:
endpoint: http://localhost:${wiremock.server.port}
-
-etsi-catalog-manager:
- endpoint: http://localhost:${wiremock.server.port}/api/catalog/v1
- rest:
- timeoutInSeconds: 5
+ \ No newline at end of file
diff --git a/asdc-controller/src/test/resources/download/service-Testserviceforpnf-csar.csar b/asdc-controller/src/test/resources/download/service-Testserviceforpnf-csar.csar
new file mode 100644
index 0000000000..d061012e62
--- /dev/null
+++ b/asdc-controller/src/test/resources/download/service-Testserviceforpnf-csar.csar
Binary files differ
diff --git a/asdc-controller/src/test/resources/resource-examples/vgw/ETSI_PACKAGE/VENDOR_LICENSE/vendor-license-model.xml b/asdc-controller/src/test/resources/resource-examples/vgw/ETSI_PACKAGE/VENDOR_LICENSE/vendor-license-model.xml
deleted file mode 100644
index 6499a58fab..0000000000
--- a/asdc-controller/src/test/resources/resource-examples/vgw/ETSI_PACKAGE/VENDOR_LICENSE/vendor-license-model.xml
+++ /dev/null
@@ -1 +0,0 @@
-<vendor-license-model xmlns="http://xmlns.openecomp.org/asdc/license-model/1.0"><vendor-name>VLM</vendor-name><entitlement-pool-list><entitlement-pool><entitlement-pool-invariant-uuid>d6dea4a3db6b415ba50f17cb3311d046</entitlement-pool-invariant-uuid><entitlement-pool-uuid>04B01ABDE6CA4A9FBA75ACC023C6FEDA</entitlement-pool-uuid><version>1.0</version><name>EP</name><description/><increments/><manufacturer-reference-number>2345</manufacturer-reference-number><operational-scope><value/></operational-scope><start-date/><expiry-date/><threshold-value><unit/><value/></threshold-value><sp-limits/><vendor-limits/></entitlement-pool></entitlement-pool-list><license-key-group-list><license-key-group><version>1.0</version><name>LKG</name><description/><type>Unique</type><increments/><manufacturerReferenceNumber/><license-key-group-invariant-uuid>55ddeb1a87be4fbb95a9bd74b4d745ca</license-key-group-invariant-uuid><license-key-group-uuid>81117C9B092C4C70AFF76833373CE7F4</license-key-group-uuid><operational-scope><value/></operational-scope><start-date/><expiry-date/><threshold-value><unit>Absolute</unit><value>23456789</value></threshold-value><sp-limits/><vendor-limits/></license-key-group></license-key-group-list></vendor-license-model> \ No newline at end of file
diff --git a/asdc-controller/src/test/resources/resource-examples/vgw/ETSI_PACKAGE/VF_LICENSE/vf-license-model.xml b/asdc-controller/src/test/resources/resource-examples/vgw/ETSI_PACKAGE/VF_LICENSE/vf-license-model.xml
deleted file mode 100644
index 581a3acb7f..0000000000
--- a/asdc-controller/src/test/resources/resource-examples/vgw/ETSI_PACKAGE/VF_LICENSE/vf-license-model.xml
+++ /dev/null
@@ -1 +0,0 @@
-<vf-license-model xmlns="http://xmlns.openecomp.org/asdc/license-model/1.0"><vendor-name>VLM</vendor-name><vf-id>fa87b9536b704787981357393f36b3fc</vf-id><feature-group-list><feature-group><entitlement-pool-list><entitlement-pool><name>EP</name><description/><increments/><entitlement-pool-invariant-uuid>d6dea4a3db6b415ba50f17cb3311d046</entitlement-pool-invariant-uuid><entitlement-pool-uuid>04B01ABDE6CA4A9FBA75ACC023C6FEDA</entitlement-pool-uuid><manufacturer-reference-number>2345</manufacturer-reference-number><operational-scope><value/></operational-scope><start-date/><expiry-date/><threshold-value><unit/><value/></threshold-value><version>1.0</version><sp-limits/><vendor-limits/></entitlement-pool></entitlement-pool-list><license-key-group-list><license-key-group><name>LKG</name><description/><type>Unique</type><increments/><license-key-group-invariant-uuid>55ddeb1a87be4fbb95a9bd74b4d745ca</license-key-group-invariant-uuid><license-key-group-uuid>81117C9B092C4C70AFF76833373CE7F4</license-key-group-uuid><manufacturer-reference-number/><operational-scope><value/></operational-scope><start-date/><expiry-date/><threshold-value><unit>Absolute</unit><value>23456789</value></threshold-value><version>1.0</version><sp-limits/><vendor-limits/></license-key-group></license-key-group-list><name>FG</name><feature-group-uuid>2218d90f94944a94952be83354847631</feature-group-uuid><description/><part-number>234594</part-number></feature-group></feature-group-list></vf-license-model> \ No newline at end of file
diff --git a/asdc-controller/src/test/resources/resource-examples/vgw/ETSI_PACKAGE/vgw6.csar b/asdc-controller/src/test/resources/resource-examples/vgw/ETSI_PACKAGE/vgw6.csar
deleted file mode 100644
index 56dbb2bce0..0000000000
--- a/asdc-controller/src/test/resources/resource-examples/vgw/ETSI_PACKAGE/vgw6.csar
+++ /dev/null
Binary files differ
diff --git a/asdc-controller/src/test/resources/resource-examples/vgw/SDC_RESOURCE_CSAR/vgw_sdc_resource.csar b/asdc-controller/src/test/resources/resource-examples/vgw/SDC_RESOURCE_CSAR/vgw_sdc_resource.csar
deleted file mode 100644
index 9eb240d9a7..0000000000
--- a/asdc-controller/src/test/resources/resource-examples/vgw/SDC_RESOURCE_CSAR/vgw_sdc_resource.csar
+++ /dev/null
Binary files differ
diff --git a/asdc-controller/src/test/resources/resource-examples/vgw/VENDOR_LICENSE/vendor-license-model.xml b/asdc-controller/src/test/resources/resource-examples/vgw/VENDOR_LICENSE/vendor-license-model.xml
deleted file mode 100644
index 6499a58fab..0000000000
--- a/asdc-controller/src/test/resources/resource-examples/vgw/VENDOR_LICENSE/vendor-license-model.xml
+++ /dev/null
@@ -1 +0,0 @@
-<vendor-license-model xmlns="http://xmlns.openecomp.org/asdc/license-model/1.0"><vendor-name>VLM</vendor-name><entitlement-pool-list><entitlement-pool><entitlement-pool-invariant-uuid>d6dea4a3db6b415ba50f17cb3311d046</entitlement-pool-invariant-uuid><entitlement-pool-uuid>04B01ABDE6CA4A9FBA75ACC023C6FEDA</entitlement-pool-uuid><version>1.0</version><name>EP</name><description/><increments/><manufacturer-reference-number>2345</manufacturer-reference-number><operational-scope><value/></operational-scope><start-date/><expiry-date/><threshold-value><unit/><value/></threshold-value><sp-limits/><vendor-limits/></entitlement-pool></entitlement-pool-list><license-key-group-list><license-key-group><version>1.0</version><name>LKG</name><description/><type>Unique</type><increments/><manufacturerReferenceNumber/><license-key-group-invariant-uuid>55ddeb1a87be4fbb95a9bd74b4d745ca</license-key-group-invariant-uuid><license-key-group-uuid>81117C9B092C4C70AFF76833373CE7F4</license-key-group-uuid><operational-scope><value/></operational-scope><start-date/><expiry-date/><threshold-value><unit>Absolute</unit><value>23456789</value></threshold-value><sp-limits/><vendor-limits/></license-key-group></license-key-group-list></vendor-license-model> \ No newline at end of file
diff --git a/asdc-controller/src/test/resources/resource-examples/vgw/VF_LICENSE/vf-license-model.xml b/asdc-controller/src/test/resources/resource-examples/vgw/VF_LICENSE/vf-license-model.xml
deleted file mode 100644
index 581a3acb7f..0000000000
--- a/asdc-controller/src/test/resources/resource-examples/vgw/VF_LICENSE/vf-license-model.xml
+++ /dev/null
@@ -1 +0,0 @@
-<vf-license-model xmlns="http://xmlns.openecomp.org/asdc/license-model/1.0"><vendor-name>VLM</vendor-name><vf-id>fa87b9536b704787981357393f36b3fc</vf-id><feature-group-list><feature-group><entitlement-pool-list><entitlement-pool><name>EP</name><description/><increments/><entitlement-pool-invariant-uuid>d6dea4a3db6b415ba50f17cb3311d046</entitlement-pool-invariant-uuid><entitlement-pool-uuid>04B01ABDE6CA4A9FBA75ACC023C6FEDA</entitlement-pool-uuid><manufacturer-reference-number>2345</manufacturer-reference-number><operational-scope><value/></operational-scope><start-date/><expiry-date/><threshold-value><unit/><value/></threshold-value><version>1.0</version><sp-limits/><vendor-limits/></entitlement-pool></entitlement-pool-list><license-key-group-list><license-key-group><name>LKG</name><description/><type>Unique</type><increments/><license-key-group-invariant-uuid>55ddeb1a87be4fbb95a9bd74b4d745ca</license-key-group-invariant-uuid><license-key-group-uuid>81117C9B092C4C70AFF76833373CE7F4</license-key-group-uuid><manufacturer-reference-number/><operational-scope><value/></operational-scope><start-date/><expiry-date/><threshold-value><unit>Absolute</unit><value>23456789</value></threshold-value><version>1.0</version><sp-limits/><vendor-limits/></license-key-group></license-key-group-list><name>FG</name><feature-group-uuid>2218d90f94944a94952be83354847631</feature-group-uuid><description/><part-number>234594</part-number></feature-group></feature-group-list></vf-license-model> \ No newline at end of file
diff --git a/asdc-controller/src/test/resources/resource-examples/vgw/dmaap-notification-message.json b/asdc-controller/src/test/resources/resource-examples/vgw/dmaap-notification-message.json
deleted file mode 100644
index 8c42c9c3e9..0000000000
--- a/asdc-controller/src/test/resources/resource-examples/vgw/dmaap-notification-message.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "distributionID": "35f20eb9-238a-4cc2-96dc-0a08f71bc209",
- "serviceName": "VgwServiceV1",
- "serviceVersion": "1.0",
- "serviceUUID": "e051ff77-fb79-451c-8457-1cbf94e4db8f",
- "serviceDescription": "Test VGW Service",
- "serviceInvariantUUID": "c2ce924f-0aa1-4777-9b42-c0fec006a883",
- "resources": [
- {
- "resourceInstanceName": "VgwVspV1 0",
- "resourceName": "VgwVspV1",
- "resourceVersion": "1.0",
- "resourceType": "VF",
- "resourceUUID": "655aa939-d589-4333-8cc6-8fcb15db858a",
- "resourceInvariantUUID": "c53a0c91-35f6-40ff-bcda-f75030cfaf2d",
- "resourceCustomizationUUID": "db1673e1-351a-4d04-8e2f-84b2b4c52cc7",
- "category": "Generic",
- "subcategory": "Network Service",
- "artifacts": [
- {
- "artifactName": "vf-license-model.xml",
- "artifactType": "VF_LICENSE",
- "artifactURL": "/VF_LICENSE/vf-license-model.xml",
- "artifactChecksum": "NjMwZDc0YzhiNDRlZDAyYjIxMmFlM2M0MWRkZjFmNDA\u003d",
- "artifactDescription": "VF license file",
- "artifactTimeout": 120,
- "artifactUUID": "8dda263d-90bb-4b3d-b8e0-0048222dc658",
- "artifactVersion": "1"
- },
- {
- "artifactName": "vgw6.csar",
- "artifactType": "ETSI_PACKAGE",
- "artifactURL": "/ETSI_PACKAGE/vgw6.csar",
- "artifactChecksum": "NjdmNGU3ZDlkODQ0YTUzMTU5NjZmOThiYjMxNTJiNGI\u003d",
- "artifactDescription": "Artifact created from csar",
- "artifactTimeout": 120,
- "artifactUUID": "9e9930b8-898e-4b8b-999e-66c43e1611f4",
- "artifactVersion": "1"
- },
- {
- "artifactName": "vendor-license-model.xml",
- "artifactType": "VENDOR_LICENSE",
- "artifactURL": "/VENDOR_LICENSE/vendor-license-model.xml",
- "artifactChecksum": "NGNmNzU4MDhjN2FjMTJkNWIxMjNkZDZhOWQyYzU0ZjA\u003d",
- "artifactDescription": " Vendor license file",
- "artifactTimeout": 120,
- "artifactUUID": "b3f7a4cf-6a35-4f66-b800-cd4a9a0e9719",
- "artifactVersion": "1"
- }
- ]
- }
- ],
- "serviceArtifacts": [
- {
- "artifactName": "service-Vgwservicev1-csar.csar",
- "artifactType": "TOSCA_CSAR",
- "artifactURL": "/service-Vgwservicev1-csar.csar",
- "artifactChecksum": "MzcxNTMwMDhmNGY0MjRkMjFkNzk1MDNjOTVhNjQzMmE\u003d",
- "artifactDescription": "TOSCA definition package of the asset",
- "artifactTimeout": 0,
- "artifactUUID": "0cc70c6e-6ddc-4ecc-8052-d9f1433c14b8",
- "artifactVersion": "1"
- }
- ],
- "workloadContext": "Production"
-}
diff --git a/asdc-controller/src/test/resources/resource-examples/vgw/etsi-catalog-package-onboading-job-status-error-package-exists.json b/asdc-controller/src/test/resources/resource-examples/vgw/etsi-catalog-package-onboading-job-status-error-package-exists.json
deleted file mode 100644
index 8dc07b9613..0000000000
--- a/asdc-controller/src/test/resources/resource-examples/vgw/etsi-catalog-package-onboading-job-status-error-package-exists.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "jobId": "57c13120-0a03-4d2e-837a-7c41d61e4a30",
- "responseDescriptor":
- {
- "status": "error",
- "progress": "255",
- "statusDescription": "VNF package() already exists.",
- "errorCode": "1",
- "responseId": "2",
- "responseHistoryList": [
- {
- "status": "processing",
- "progress": "5",
- "statusDescription": "Start CSAR(8f0b72e1-b6d6-42b6-a808-c60b17f04d7a) distribute.",
- "errorCode": "0",
- "responseId": "1"
- }
- ]
- }
-}
diff --git a/asdc-controller/src/test/resources/resource-examples/vgw/etsi-catalog-package-onboading-job-status-error.json b/asdc-controller/src/test/resources/resource-examples/vgw/etsi-catalog-package-onboading-job-status-error.json
deleted file mode 100644
index 13f346fb7a..0000000000
--- a/asdc-controller/src/test/resources/resource-examples/vgw/etsi-catalog-package-onboading-job-status-error.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "jobId": "57c13120-0a03-4d2e-837a-7c41d61e4a30",
- "responseDescriptor":
- {
- "status": "error",
- "progress": "255",
- "statusDescription": "Failed to query artifacts(resources) from sdc.",
- "errorCode": "0",
- "responseId": "2",
- "responseHistoryList": [
- {
- "status": "processing",
- "progress": "5",
- "statusDescription": "Start CSAR(8f0b72e1-b6d6-42b6-a808-c60b17f04d7a) distribute.",
- "errorCode": "0",
- "responseId": "1"
- }
- ]
- }
-}
diff --git a/asdc-controller/src/test/resources/resource-examples/vgw/etsi-catalog-package-onboading-job-status-successful.json b/asdc-controller/src/test/resources/resource-examples/vgw/etsi-catalog-package-onboading-job-status-successful.json
deleted file mode 100644
index b5dc1fe4f2..0000000000
--- a/asdc-controller/src/test/resources/resource-examples/vgw/etsi-catalog-package-onboading-job-status-successful.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "jobId": "57c13120-0a03-4d2e-837a-7c41d61e4a30",
- "responseDescriptor":
- {
- "status": "finished",
- "progress": "100",
- "statusDescription": "CSAR(8f0b72e1-b6d6-42b6-a808-c60b17f04d7a) distribute successfully.",
- "errorCode": "0",
- "responseId": "3",
- "responseHistoryList": [
- {
- "status": "processing",
- "progress": "30",
- "statusDescription": "Save CSAR(8f0b72e1-b6d6-42b6-a808-c60b17f04d7a) to database.",
- "errorCode": "0",
- "responseId": "2"
- },
- {
- "status": "processing",
- "progress": "5",
- "statusDescription": "Start CSAR(8f0b72e1-b6d6-42b6-a808-c60b17f04d7a) distribute.",
- "errorCode": "0",
- "responseId": "1"
- }
- ]
- }
-}
diff --git a/asdc-controller/src/test/resources/resource-examples/vgw/service-Vgwservicev1-csar.csar b/asdc-controller/src/test/resources/resource-examples/vgw/service-Vgwservicev1-csar.csar
deleted file mode 100644
index eaed092b00..0000000000
--- a/asdc-controller/src/test/resources/resource-examples/vgw/service-Vgwservicev1-csar.csar
+++ /dev/null
Binary files differ
diff --git a/asdc-controller/src/test/resources/schema.sql b/asdc-controller/src/test/resources/schema.sql
index f94f74da97..1260461b1b 100644
--- a/asdc-controller/src/test/resources/schema.sql
+++ b/asdc-controller/src/test/resources/schema.sql
@@ -1205,6 +1205,7 @@ CREATE TABLE IF NOT EXISTS `pnf_resource_customization` (
`CDS_BLUEPRINT_VERSION` varchar(20) DEFAULT NULL,
`SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true,
`CONTROLLER_ACTOR` varchar(200) DEFAULT NULL,
+ `DEFAULT_SOFTWARE_VERSION` varchar(4000) DEFAULT NULL,
PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`),
KEY `fk_pnf_resource_customization__pnf_resource1_idx` (`PNF_RESOURCE_MODEL_UUID`),
CONSTRAINT `fk_pnf_resource_customization__pnf_resource1` FOREIGN KEY (`PNF_RESOURCE_MODEL_UUID`) REFERENCES `pnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE