From d801fdc32a34621aed239f5429c55cda0344eac9 Mon Sep 17 00:00:00 2001 From: romaingimbert Date: Thu, 7 Mar 2019 09:23:10 +0100 Subject: Improve nbi status -add components to check connectivity with onap (sdc, aai, so, dmaap) -activate full status with ?fullStatus=true -change test -change mock tests folders Change-Id: Iddcd7fce3c1b3b5abfea14c46b2f611f27057319 Issue-ID: EXTAPI-209 Signed-off-by: romaingimbert --- .../java/org/onap/nbi/OnapComponentsUrlPaths.java | 8 +- .../apis/hub/service/CheckDMaaPEventsManager.java | 14 +- .../onap/nbi/apis/servicecatalog/SdcClient.java | 13 ++ .../onap/nbi/apis/serviceinventory/AaiClient.java | 219 +++++++++--------- .../onap/nbi/apis/serviceinventory/BaseClient.java | 23 ++ .../org/onap/nbi/apis/serviceorder/SoClient.java | 12 + .../java/org/onap/nbi/apis/status/OnapClient.java | 81 +++++++ .../org/onap/nbi/apis/status/StatusResource.java | 52 +++-- .../org/onap/nbi/apis/status/StatusService.java | 5 + .../onap/nbi/apis/status/StatusServiceImpl.java | 12 +- .../nbi/apis/status/model/ApplicationStatus.java | 4 +- .../onap/nbi/apis/status/model/OnapModuleType.java | 46 ++++ .../features/04--StatusRessourceTest.feature | 36 ++- .../aai/aai_get_6490_service-subscriptions.json | 36 +++ .../mappings/aai/aai_get_customer_6490.json | 18 ++ .../mappings/aai/aai_get_customer_generic.json | 18 ++ .../resources/mappings/aai/aai_get_customers.json | 34 +++ .../aai/aai_get_generic_service-subscriptions.json | 20 ++ ...i_get_service-subscription-Ansible-service.json | 52 +++++ .../aai/aai_get_service-subscription_vnf.json | 58 +++++ .../aai/aai_get_service-subscriptionsVFW.json | 43 ++++ ...service-subscriptionsvFW-service-2VF-based.json | 43 ++++ .../resources/mappings/aai/aai_get_service_3.json | 19 ++ .../aai/aai_get_service_3_format_resource_url.json | 26 +++ .../mappings/aai/aai_get_service_instance.json | 52 +++++ .../mappings/aai/aai_get_service_instance_2.json | 55 +++++ ...get_service_instance_2_format_resource_url.json | 62 ++++++ ...i_get_service_instance_format_resource_url.json | 59 +++++ .../resources/mappings/aai/aai_get_tenants.json | 167 ++++++++++++++ .../resources/mappings/aai/aai_put_customer.json | 12 + .../mappings/aai/aai_put_customer_service.json | 12 + .../aai_get_6490_service-subscriptions.json | 36 --- .../resources/mappings/aai_get_customer_6490.json | 18 -- .../mappings/aai_get_customer_generic.json | 18 -- .../aai_get_generic_service-subscriptions.json | 20 -- ...i_get_service-subscription-Ansible-service.json | 52 ----- .../mappings/aai_get_service-subscription_vnf.json | 58 ----- .../mappings/aai_get_service-subscriptionsVFW.json | 43 ---- ...service-subscriptionsvFW-service-2VF-based.json | 43 ---- src/test/resources/mappings/aai_get_service_3.json | 19 -- .../aai_get_service_3_format_resource_url.json | 26 --- .../mappings/aai_get_service_instance.json | 52 ----- .../mappings/aai_get_service_instance_2.json | 55 ----- ...get_service_instance_2_format_resource_url.json | 62 ------ ...i_get_service_instance_format_resource_url.json | 59 ----- src/test/resources/mappings/aai_get_tenants.json | 167 -------------- src/test/resources/mappings/aai_put_customer.json | 12 - .../mappings/aai_put_customer_service.json | 12 - .../mappings/dmaap/dmaap_get_aaievents.json | 16 ++ .../resources/mappings/dmaap_get_aaievents.json | 16 -- src/test/resources/mappings/sdc/sdc_find.json | 244 +++++++++++++++++++++ ...c_get_1e3feeb0-8e36-46c6-862c-236d9c626439.json | 213 ++++++++++++++++++ ...1e3feeb0-8e36-46c6-862c-236d9c626439_tosca.json | 10 + ...0-8e36-46c6-862c-236d9c626439_withoutTosca.json | 213 ++++++++++++++++++ ...84e5-f0e5-44c5-ab95-38fb4bf77064_toscafile.json | 10 + ...84e5-f0e5-44c5-ab95-38fb4bf77064_withTosca.json | 213 ++++++++++++++++++ .../mappings/sdc/sdc_get_artifactTypes.json | 68 ++++++ src/test/resources/mappings/sdc_find.json | 244 --------------------- ...c_get_1e3feeb0-8e36-46c6-862c-236d9c626439.json | 213 ------------------ ...1e3feeb0-8e36-46c6-862c-236d9c626439_tosca.json | 10 - ...0-8e36-46c6-862c-236d9c626439_withoutTosca.json | 213 ------------------ ...84e5-f0e5-44c5-ab95-38fb4bf77064_toscafile.json | 10 - ...84e5-f0e5-44c5-ab95-38fb4bf77064_withTosca.json | 213 ------------------ .../mappings/so/so_delete_service_instance.json | 18 ++ .../so/so_e2e_delete_service_instance.json | 15 ++ src/test/resources/mappings/so/so_get_.json | 20 ++ src/test/resources/mappings/so/so_get_e2e.json | 25 +++ .../resources/mappings/so/so_get_e2e_delete.json | 25 +++ .../resources/mappings/so/so_get_healthcheck.json | 12 + src/test/resources/mappings/so/so_healthcheck.xml | 23 ++ .../so/so_post_create_service_instance.json | 18 ++ .../so/so_post_e2e_create_service_instance.json | 18 ++ .../mappings/so_delete_service_instance.json | 18 -- .../mappings/so_e2e_delete_service_instance.json | 15 -- src/test/resources/mappings/so_get_.json | 20 -- src/test/resources/mappings/so_get_e2e.json | 25 --- src/test/resources/mappings/so_get_e2e_delete.json | 25 --- .../mappings/so_post_create_service_instance.json | 18 -- .../so_post_e2e_create_service_instance.json | 18 -- 79 files changed, 2333 insertions(+), 1949 deletions(-) create mode 100644 src/main/java/org/onap/nbi/apis/status/OnapClient.java create mode 100644 src/main/java/org/onap/nbi/apis/status/model/OnapModuleType.java create mode 100644 src/test/resources/mappings/aai/aai_get_6490_service-subscriptions.json create mode 100644 src/test/resources/mappings/aai/aai_get_customer_6490.json create mode 100644 src/test/resources/mappings/aai/aai_get_customer_generic.json create mode 100644 src/test/resources/mappings/aai/aai_get_customers.json create mode 100644 src/test/resources/mappings/aai/aai_get_generic_service-subscriptions.json create mode 100644 src/test/resources/mappings/aai/aai_get_service-subscription-Ansible-service.json create mode 100644 src/test/resources/mappings/aai/aai_get_service-subscription_vnf.json create mode 100644 src/test/resources/mappings/aai/aai_get_service-subscriptionsVFW.json create mode 100644 src/test/resources/mappings/aai/aai_get_service-subscriptionsvFW-service-2VF-based.json create mode 100644 src/test/resources/mappings/aai/aai_get_service_3.json create mode 100644 src/test/resources/mappings/aai/aai_get_service_3_format_resource_url.json create mode 100644 src/test/resources/mappings/aai/aai_get_service_instance.json create mode 100644 src/test/resources/mappings/aai/aai_get_service_instance_2.json create mode 100644 src/test/resources/mappings/aai/aai_get_service_instance_2_format_resource_url.json create mode 100644 src/test/resources/mappings/aai/aai_get_service_instance_format_resource_url.json create mode 100644 src/test/resources/mappings/aai/aai_get_tenants.json create mode 100644 src/test/resources/mappings/aai/aai_put_customer.json create mode 100644 src/test/resources/mappings/aai/aai_put_customer_service.json delete mode 100644 src/test/resources/mappings/aai_get_6490_service-subscriptions.json delete mode 100644 src/test/resources/mappings/aai_get_customer_6490.json delete mode 100644 src/test/resources/mappings/aai_get_customer_generic.json delete mode 100644 src/test/resources/mappings/aai_get_generic_service-subscriptions.json delete mode 100644 src/test/resources/mappings/aai_get_service-subscription-Ansible-service.json delete mode 100644 src/test/resources/mappings/aai_get_service-subscription_vnf.json delete mode 100644 src/test/resources/mappings/aai_get_service-subscriptionsVFW.json delete mode 100644 src/test/resources/mappings/aai_get_service-subscriptionsvFW-service-2VF-based.json delete mode 100644 src/test/resources/mappings/aai_get_service_3.json delete mode 100644 src/test/resources/mappings/aai_get_service_3_format_resource_url.json delete mode 100644 src/test/resources/mappings/aai_get_service_instance.json delete mode 100644 src/test/resources/mappings/aai_get_service_instance_2.json delete mode 100644 src/test/resources/mappings/aai_get_service_instance_2_format_resource_url.json delete mode 100644 src/test/resources/mappings/aai_get_service_instance_format_resource_url.json delete mode 100644 src/test/resources/mappings/aai_get_tenants.json delete mode 100644 src/test/resources/mappings/aai_put_customer.json delete mode 100644 src/test/resources/mappings/aai_put_customer_service.json create mode 100644 src/test/resources/mappings/dmaap/dmaap_get_aaievents.json delete mode 100644 src/test/resources/mappings/dmaap_get_aaievents.json create mode 100644 src/test/resources/mappings/sdc/sdc_find.json create mode 100644 src/test/resources/mappings/sdc/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439.json create mode 100644 src/test/resources/mappings/sdc/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_tosca.json create mode 100644 src/test/resources/mappings/sdc/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_withoutTosca.json create mode 100644 src/test/resources/mappings/sdc/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_toscafile.json create mode 100644 src/test/resources/mappings/sdc/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_withTosca.json create mode 100644 src/test/resources/mappings/sdc/sdc_get_artifactTypes.json delete mode 100644 src/test/resources/mappings/sdc_find.json delete mode 100644 src/test/resources/mappings/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439.json delete mode 100644 src/test/resources/mappings/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_tosca.json delete mode 100644 src/test/resources/mappings/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_withoutTosca.json delete mode 100644 src/test/resources/mappings/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_toscafile.json delete mode 100644 src/test/resources/mappings/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_withTosca.json create mode 100644 src/test/resources/mappings/so/so_delete_service_instance.json create mode 100644 src/test/resources/mappings/so/so_e2e_delete_service_instance.json create mode 100644 src/test/resources/mappings/so/so_get_.json create mode 100644 src/test/resources/mappings/so/so_get_e2e.json create mode 100644 src/test/resources/mappings/so/so_get_e2e_delete.json create mode 100644 src/test/resources/mappings/so/so_get_healthcheck.json create mode 100644 src/test/resources/mappings/so/so_healthcheck.xml create mode 100644 src/test/resources/mappings/so/so_post_create_service_instance.json create mode 100644 src/test/resources/mappings/so/so_post_e2e_create_service_instance.json delete mode 100644 src/test/resources/mappings/so_delete_service_instance.json delete mode 100644 src/test/resources/mappings/so_e2e_delete_service_instance.json delete mode 100644 src/test/resources/mappings/so_get_.json delete mode 100644 src/test/resources/mappings/so_get_e2e.json delete mode 100644 src/test/resources/mappings/so_get_e2e_delete.json delete mode 100644 src/test/resources/mappings/so_post_create_service_instance.json delete mode 100644 src/test/resources/mappings/so_post_e2e_create_service_instance.json (limited to 'src') diff --git a/src/main/java/org/onap/nbi/OnapComponentsUrlPaths.java b/src/main/java/org/onap/nbi/OnapComponentsUrlPaths.java index 80563d5..428788d 100644 --- a/src/main/java/org/onap/nbi/OnapComponentsUrlPaths.java +++ b/src/main/java/org/onap/nbi/OnapComponentsUrlPaths.java @@ -27,6 +27,8 @@ public final class OnapComponentsUrlPaths { public static final String SDC_ROOT_URL = "/sdc/v1/catalog/services"; public static final String SDC_GET_PATH = "/metadata"; public static final String SDC_TOSCA_PATH = "/toscaModel"; + public static final String SDC_HEALTH_CHECK = "/sdc/v1/artifactTypes"; + // AAI public static final String AAI_GET_TENANTS_PATH = @@ -36,6 +38,8 @@ public final class OnapComponentsUrlPaths { "/aai/v14/business/customers/customer/$customerId/service-subscriptions"; public static final String AAI_PUT_SERVICE_FOR_CUSTOMER_PATH = "/aai/v14/business/customers/customer/$customerId/service-subscriptions/service-subscription/"; + public static final String AAI_HEALTH_CHECK = + "/aai/v14/business/customers"; public static final String AAI_GET_SERVICE = "/aai/v14/nodes/service-instances/service-instance/$serviceId"; public static final String AAI_GET_SERVICE_CUSTOMER = @@ -43,6 +47,7 @@ public final class OnapComponentsUrlPaths { public static final String AAI_GET_SERVICE_INSTANCES_PATH = "/aai/v14/business/customers/customer/$customerId/service-subscriptions/service-subscription/$serviceSpecName/service-instances/"; + // MSO public static final String MSO_CREATE_SERVICE_INSTANCE_PATH = "/onap/so/infra/serviceInstantiation/v7/serviceInstances/"; public static final String MSO_GET_REQUEST_STATUS_PATH = "/onap/so/infra/orchestrationRequests/v7/"; @@ -50,7 +55,8 @@ public final class OnapComponentsUrlPaths { public static final String MSO_CREATE_E2ESERVICE_INSTANCE_PATH = "/onap/so/infra/e2eServiceInstances/v3"; public static final String MSO_DELETE_E2ESERVICE_INSTANCE_PATH = "/onap/so/infra/e2eServiceInstances/v3/"; public static final String MSO_GET_E2EREQUEST_STATUS_PATH = "/onap/so/infra/e2eServiceInstances/v3/$serviceId/operations/$operationId"; - + public static final String MSO_HEALTH_CHECK = "/globalhealthcheck"; + // DMaaP Message Router REST Client public static final String DMAAP_CONSUME_EVENTS = "/events/$topic/$consumergroup/$consumerid?timeout=$timeout"; diff --git a/src/main/java/org/onap/nbi/apis/hub/service/CheckDMaaPEventsManager.java b/src/main/java/org/onap/nbi/apis/hub/service/CheckDMaaPEventsManager.java index 6e2811f..7cd2287 100644 --- a/src/main/java/org/onap/nbi/apis/hub/service/CheckDMaaPEventsManager.java +++ b/src/main/java/org/onap/nbi/apis/hub/service/CheckDMaaPEventsManager.java @@ -88,12 +88,8 @@ public class CheckDMaaPEventsManager { ObjectMapper mapper = new ObjectMapper(); - String dmaapGetEventsUrlFormated = dmaapGetEventsUrl.replace("$topic", topic); - dmaapGetEventsUrlFormated = dmaapGetEventsUrlFormated.replace("$consumergroup", consumerGroup); - dmaapGetEventsUrlFormated = dmaapGetEventsUrlFormated.replace("$consumerid", consumerId); - dmaapGetEventsUrlFormated = dmaapGetEventsUrlFormated.replace("$timeout", timeout); - List dmaapResponse = callDMaaPGetEvents(dmaapGetEventsUrlFormated); + List dmaapResponse = callDMaaPGetEvents(); if (!CollectionUtils.isEmpty(dmaapResponse)) { for (int i = 0; i < dmaapResponse.size(); i++) { String aaiEventString = dmaapResponse.get(i); @@ -158,7 +154,13 @@ public class CheckDMaaPEventsManager { } } - public List callDMaaPGetEvents(String dmaapGetEventsUrlFormated) { + public List callDMaaPGetEvents() { + + String dmaapGetEventsUrlFormated = dmaapGetEventsUrl.replace("$topic", topic); + dmaapGetEventsUrlFormated = dmaapGetEventsUrlFormated.replace("$consumergroup", consumerGroup); + dmaapGetEventsUrlFormated = dmaapGetEventsUrlFormated.replace("$consumerid", consumerId); + dmaapGetEventsUrlFormated = dmaapGetEventsUrlFormated.replace("$timeout", timeout); + if (logger.isDebugEnabled()) { logger.debug("Calling DMaaP Url : " + dmaapGetEventsUrlFormated); diff --git a/src/main/java/org/onap/nbi/apis/servicecatalog/SdcClient.java b/src/main/java/org/onap/nbi/apis/servicecatalog/SdcClient.java index e25ab4e..419a34a 100644 --- a/src/main/java/org/onap/nbi/apis/servicecatalog/SdcClient.java +++ b/src/main/java/org/onap/nbi/apis/servicecatalog/SdcClient.java @@ -71,15 +71,19 @@ public class SdcClient { private String sdcGetUrl; private String sdcFindUrl; + private String sdcHealthCheck; @PostConstruct private void setUpAndLogSDCUrl() { sdcGetUrl= new StringBuilder().append(sdcHost).append(OnapComponentsUrlPaths.SDC_ROOT_URL+"/{id}"+OnapComponentsUrlPaths.SDC_GET_PATH).toString(); sdcFindUrl = new StringBuilder().append(sdcHost).append(OnapComponentsUrlPaths.SDC_ROOT_URL).toString(); + sdcHealthCheck = new StringBuilder().append(sdcHost).append(OnapComponentsUrlPaths.SDC_HEALTH_CHECK).toString(); + LOGGER.info("SDC GET url : "+sdcGetUrl); LOGGER.info("SDC FIND url : "+ sdcFindUrl); + LOGGER.info("SDC HealthCheck : "+ sdcHealthCheck); } @@ -111,6 +115,15 @@ public class SdcClient { } + public List callCheckConnectivity() { + + UriComponentsBuilder callURI = UriComponentsBuilder.fromHttpUrl(sdcHealthCheck); + ResponseEntity response = callSdc(callURI.build().encode().toUri()); + return (List) response.getBody(); + + } + + public File callGetWithAttachment(String toscaModelUrl) { StringBuilder urlBuilder = new StringBuilder().append(sdcHost).append(toscaModelUrl); diff --git a/src/main/java/org/onap/nbi/apis/serviceinventory/AaiClient.java b/src/main/java/org/onap/nbi/apis/serviceinventory/AaiClient.java index 5424db5..0becb02 100644 --- a/src/main/java/org/onap/nbi/apis/serviceinventory/AaiClient.java +++ b/src/main/java/org/onap/nbi/apis/serviceinventory/AaiClient.java @@ -1,15 +1,14 @@ /** * Copyright (c) 2018 Orange * - * 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 + * 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. + * 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. */ package org.onap.nbi.apis.serviceinventory; @@ -24,134 +23,146 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; +import org.springframework.http.converter.StringHttpMessageConverter; import org.springframework.stereotype.Service; @Service public class AaiClient extends BaseClient { - public static final String CUSTOMER_ID = "$customerId"; + public static final String CUSTOMER_ID = "$customerId"; - @Value("${aai.host}") - private String aaiHost; + @Value("${aai.host}") + private String aaiHost; - @Value("${aai.header.authorization}") - private String aaiHeaderAuthorization; + @Value("${aai.header.authorization}") + private String aaiHeaderAuthorization; - @Value("${aai.api.id}") - private String aaiApiId; + @Value("${aai.api.id}") + private String aaiApiId; - @Value("${aai.header.transaction.id}") - private String aaiTransactionId; + @Value("${aai.header.transaction.id}") + private String aaiTransactionId; - private static final String HEADER_AUTHORIZATION = "Authorization"; - private static final String X_FROM_APP_ID = "X-FromAppId"; - private static final Logger LOGGER = LoggerFactory.getLogger(AaiClient.class); - private static final String X_TRANSACTION_ID = "X-TransactionId"; + private static final String HEADER_AUTHORIZATION = "Authorization"; + private static final String X_FROM_APP_ID = "X-FromAppId"; + private static final Logger LOGGER = LoggerFactory.getLogger(AaiClient.class); + private static final String X_TRANSACTION_ID = "X-TransactionId"; - private String aaiServiceUrl; - private String aaiServiceCustomerUrl; - private String aaiServicesUrl; - private String aaiServicesInstancesUrl; + private String aaiServiceUrl; + private String aaiServiceCustomerUrl; + private String aaiServicesUrl; + private String aaiServicesInstancesUrl; + private String aaiHealthCheckUrl; - @PostConstruct - private void setUpAndlogAAIUrl() { - aaiServiceUrl = new StringBuilder().append(aaiHost) - .append(OnapComponentsUrlPaths.AAI_GET_SERVICE).toString(); - aaiServiceCustomerUrl = new StringBuilder().append(aaiHost) - .append(OnapComponentsUrlPaths.AAI_GET_SERVICE_CUSTOMER).toString(); - aaiServicesUrl = new StringBuilder().append(aaiHost) - .append(OnapComponentsUrlPaths.AAI_GET_SERVICES_FOR_CUSTOMER_PATH).toString(); - aaiServicesInstancesUrl = new StringBuilder().append(aaiHost) - .append(OnapComponentsUrlPaths.AAI_GET_SERVICE_INSTANCES_PATH).toString(); + @PostConstruct + private void setUpAndlogAAIUrl() { + aaiServiceUrl = new StringBuilder().append(aaiHost) + .append(OnapComponentsUrlPaths.AAI_GET_SERVICE).toString(); + aaiServiceCustomerUrl = new StringBuilder().append(aaiHost) + .append(OnapComponentsUrlPaths.AAI_GET_SERVICE_CUSTOMER).toString(); + aaiServicesUrl = new StringBuilder().append(aaiHost) + .append(OnapComponentsUrlPaths.AAI_GET_SERVICES_FOR_CUSTOMER_PATH).toString(); + aaiServicesInstancesUrl = new StringBuilder().append(aaiHost) + .append(OnapComponentsUrlPaths.AAI_GET_SERVICE_INSTANCES_PATH).toString(); + aaiHealthCheckUrl = new StringBuilder().append(aaiHost) + .append(OnapComponentsUrlPaths.AAI_HEALTH_CHECK).toString(); - LOGGER.info("AAI service url : " + aaiServiceUrl); - LOGGER.info("AAI services url : " + aaiServicesUrl); - LOGGER.info("AAI service instances url : " + aaiServicesInstancesUrl); + LOGGER.info("AAI service url : " + aaiServiceUrl); + LOGGER.info("AAI services url : " + aaiServicesUrl); + LOGGER.info("AAI service instances url : " + aaiServicesInstancesUrl); + LOGGER.info("AAI aaiHealthCheckUrl : " + aaiHealthCheckUrl); - } + } - private HttpHeaders buildRequestHeaderForAAI() { + private HttpHeaders buildRequestHeaderForAAI() { - HttpHeaders httpHeaders = new HttpHeaders(); - httpHeaders.add(HEADER_AUTHORIZATION, aaiHeaderAuthorization); - httpHeaders.add(X_FROM_APP_ID, aaiApiId); - httpHeaders.add("Accept", "application/json"); - httpHeaders.add("Content-Type", "application/json"); - httpHeaders.add(X_TRANSACTION_ID, aaiTransactionId); + HttpHeaders httpHeaders = new HttpHeaders(); + httpHeaders.add(HEADER_AUTHORIZATION, aaiHeaderAuthorization); + httpHeaders.add(X_FROM_APP_ID, aaiApiId); + httpHeaders.add("Accept", "application/json"); + httpHeaders.add("Content-Type", "application/json"); + httpHeaders.add(X_TRANSACTION_ID, aaiTransactionId); - return httpHeaders; + return httpHeaders; - } + } - public Map getCatalogService(String customerId, String serviceSpecName, String serviceId) { + public Map getCatalogService(String customerId, String serviceSpecName, String serviceId) { - String callUrlFormated = aaiServiceUrl.replace(CUSTOMER_ID, customerId); - callUrlFormated = callUrlFormated.replace("$serviceSpecName", serviceSpecName); - callUrlFormated = callUrlFormated.replace("$serviceId", serviceId); + String callUrlFormated = aaiServiceUrl.replace(CUSTOMER_ID, customerId); + callUrlFormated = callUrlFormated.replace("$serviceSpecName", serviceSpecName); + callUrlFormated = callUrlFormated.replace("$serviceId", serviceId); - ResponseEntity response = callApiGet(callUrlFormated, buildRequestHeaderForAAI()); - if (response != null && response.getStatusCode().equals(HttpStatus.OK)) { - return (LinkedHashMap) response.getBody(); + ResponseEntity response = callApiGet(callUrlFormated, buildRequestHeaderForAAI()); + if (response != null && response.getStatusCode().equals(HttpStatus.OK)) { + return (LinkedHashMap) response.getBody(); + } + return null; } - return null; - } - - public Map getService(String serviceId) { - // Retrieve the Service Instance using AAI node query - String callUrlFormated = aaiServiceUrl.replace("$serviceId", serviceId); - ResponseEntity response = callApiGet(callUrlFormated, buildRequestHeaderForAAI()); - if (response != null && response.getStatusCode().equals(HttpStatus.OK)) { - return (LinkedHashMap) response.getBody(); + + public Map getService(String serviceId) { + // Retrieve the Service Instance using AAI node query + String callUrlFormated = aaiServiceUrl.replace("$serviceId", serviceId); + ResponseEntity response = callApiGet(callUrlFormated, buildRequestHeaderForAAI()); + if (response != null && response.getStatusCode().equals(HttpStatus.OK)) { + return (LinkedHashMap) response.getBody(); + } + return null; } - return null; - } - public Map getServiceCustomer(String serviceId) { + public Map getServiceCustomer(String serviceId) { - String callUrlFormated = aaiServiceCustomerUrl.replace("$serviceId", serviceId); - ResponseEntity response = callApiGet(callUrlFormated, buildRequestHeaderForAAI()); - if (response != null && response.getStatusCode().equals(HttpStatus.OK)) { - return (LinkedHashMap) response.getBody(); + String callUrlFormated = aaiServiceCustomerUrl.replace("$serviceId", serviceId); + try { + ResponseEntity response = callApiGet(callUrlFormated, buildRequestHeaderForAAI()); + return (LinkedHashMap) response.getBody(); + } catch (BackendFunctionalException e) { + LOGGER.error("error on calling {} , {}", callUrlFormated.toString(), e); + return null; + } } - return null; - } - - public Map getVNF(String relatedLink) { - - StringBuilder callURL = new StringBuilder().append(aaiHost).append(relatedLink); - try { - ResponseEntity response = callApiGet(callURL.toString(), buildRequestHeaderForAAI()); - return (LinkedHashMap) response.getBody(); - } catch (BackendFunctionalException e) { - LOGGER.error("error on calling {} , {}", callURL.toString(), e); - return null; + + public void callCheckConnectivity() { + String customersUrl = new StringBuilder().append(aaiHealthCheckUrl).toString(); + ResponseEntity response = callApiGetHealthCheck(customersUrl, buildRequestHeaderForAAI()); } - } - - public Map getServicesInAaiForCustomer(String customerId) { - String callUrlFormated = aaiServicesUrl.replace(CUSTOMER_ID, customerId); - try { - ResponseEntity response = callApiGet(callUrlFormated, buildRequestHeaderForAAI()); - return (LinkedHashMap) response.getBody(); - } catch (BackendFunctionalException e) { - LOGGER.error("error on calling {} , {}", callUrlFormated, e); - return null; + + public Map getVNF(String relatedLink) { + + StringBuilder callURL = new StringBuilder().append(aaiHost).append(relatedLink); + try { + ResponseEntity response = callApiGet(callURL.toString(), buildRequestHeaderForAAI()); + return (LinkedHashMap) response.getBody(); + } catch (BackendFunctionalException e) { + LOGGER.error("error on calling {} , {}", callURL.toString(), e); + return null; + } + } + + public Map getServicesInAaiForCustomer(String customerId) { + String callUrlFormated = aaiServicesUrl.replace(CUSTOMER_ID, customerId); + try { + ResponseEntity response = callApiGet(callUrlFormated, buildRequestHeaderForAAI()); + return (LinkedHashMap) response.getBody(); + } catch (BackendFunctionalException e) { + LOGGER.error("error on calling {} , {}", callUrlFormated, e); + return null; + } } - } - - public Map getServiceInstancesInAaiForCustomer(String customerId, String serviceType) { - String callUrlFormated = aaiServicesInstancesUrl.replace(CUSTOMER_ID, customerId); - callUrlFormated = callUrlFormated.replace("$serviceSpecName", serviceType); - - try { - ResponseEntity response = callApiGet(callUrlFormated, buildRequestHeaderForAAI()); - return (LinkedHashMap) response.getBody(); - } catch (BackendFunctionalException e) { - LOGGER.error("error on calling {} , {}", callUrlFormated, e); - return null; + + public Map getServiceInstancesInAaiForCustomer(String customerId, String serviceType) { + String callUrlFormated = aaiServicesInstancesUrl.replace(CUSTOMER_ID, customerId); + callUrlFormated = callUrlFormated.replace("$serviceSpecName", serviceType); + + try { + ResponseEntity response = callApiGet(callUrlFormated, buildRequestHeaderForAAI()); + return (LinkedHashMap) response.getBody(); + } catch (BackendFunctionalException e) { + LOGGER.error("error on calling {} , {}", callUrlFormated, e); + return null; + } } - } } diff --git a/src/main/java/org/onap/nbi/apis/serviceinventory/BaseClient.java b/src/main/java/org/onap/nbi/apis/serviceinventory/BaseClient.java index 72ee99e..adae4ec 100644 --- a/src/main/java/org/onap/nbi/apis/serviceinventory/BaseClient.java +++ b/src/main/java/org/onap/nbi/apis/serviceinventory/BaseClient.java @@ -23,6 +23,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; +import org.springframework.http.converter.StringHttpMessageConverter; import org.springframework.web.client.RestTemplate; public abstract class BaseClient { @@ -56,4 +57,26 @@ public abstract class BaseClient { return response; } + + protected ResponseEntity callApiGetHealthCheck(String callURL, HttpHeaders httpHeaders) { + + + if(LOGGER.isDebugEnabled()){ + LOGGER.debug("log request : "+callURL+ " "+httpHeaders); + } + + ResponseEntity response = null; + response = restTemplate.exchange(callURL, HttpMethod.GET, + new HttpEntity<>("parameters", httpHeaders), String.class); + + if(LOGGER.isDebugEnabled()){ + LOGGER.debug("response body : {}",response.getBody().toString()); + } + LOGGER.info("response status : {}", response.getStatusCodeValue()); + if (LOGGER.isWarnEnabled() && !response.getStatusCode().equals(HttpStatus.OK)) { + LOGGER.warn("HTTP call on {} returns {}, {}", callURL , response.getStatusCodeValue() ,response.getBody().toString()); + } + return response; + } + } diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java b/src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java index 0d863d1..deb1443 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java @@ -66,6 +66,7 @@ public class SoClient { private String getE2ESoStatus; private String deleteE2ESoUrl; private String deleteSoUrl; + private String SoHealthCheck; @PostConstruct @@ -82,6 +83,8 @@ public class SoClient { .toString(); getE2ESoStatus = new StringBuilder().append(soHostname) .append(OnapComponentsUrlPaths.MSO_GET_E2EREQUEST_STATUS_PATH).toString(); + SoHealthCheck = new StringBuilder().append(soHostname) + .append(OnapComponentsUrlPaths.MSO_HEALTH_CHECK).toString(); LOGGER.info("SO create service url : " + createSoUrl); LOGGER.info("SO create e2e service url : " + createE2ESoUrl); @@ -89,6 +92,7 @@ public class SoClient { LOGGER.info("SO delete e2e service url : " + deleteE2ESoUrl); LOGGER.info("SO get so status url : " + getSoStatus); LOGGER.info("SO get e2e so status url : " + getE2ESoStatus); + LOGGER.info("SO healthCheck : " + SoHealthCheck); } @@ -250,6 +254,14 @@ public class SoClient { } } + + public void callCheckConnectivity() { + String url = SoHealthCheck; + restTemplate.exchange(url, HttpMethod.GET, + new HttpEntity<>(buildRequestHeader()), String.class); + + } + public GetE2ERequestStatusResponse callE2EGetRequestStatus(String operationId, String serviceId) { String callUrlFormated = getE2ESoStatus.replace("$serviceId", serviceId); diff --git a/src/main/java/org/onap/nbi/apis/status/OnapClient.java b/src/main/java/org/onap/nbi/apis/status/OnapClient.java new file mode 100644 index 0000000..d9bedc0 --- /dev/null +++ b/src/main/java/org/onap/nbi/apis/status/OnapClient.java @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2018 Orange + * + * 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. + */ +package org.onap.nbi.apis.status; + +import java.text.MessageFormat; +import org.onap.nbi.apis.hub.service.CheckDMaaPEventsManager; +import org.onap.nbi.apis.servicecatalog.SdcClient; +import org.onap.nbi.apis.serviceinventory.AaiClient; +import org.onap.nbi.apis.serviceorder.SoClient; +import org.onap.nbi.apis.status.model.ApplicationStatus; +import org.onap.nbi.apis.status.model.OnapModuleType; +import org.onap.nbi.apis.status.model.StatusType; +import org.onap.nbi.exceptions.BackendFunctionalException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.client.ResourceAccessException; + +@Service +public class OnapClient { + + @Autowired + private SdcClient sdcClient; + + @Autowired + private AaiClient aaiClient; + + @Autowired + private SoClient soClient; + + @Autowired + private CheckDMaaPEventsManager checkDMaaPEventsManager; + + private static final Logger LOGGER = LoggerFactory.getLogger(OnapClient.class); + + + public ApplicationStatus checkConnectivity(OnapModuleType onapModuleType) { + try { + + switch (onapModuleType) { + case SDC: + sdcClient.callCheckConnectivity(); + break; + case AAI: + aaiClient.callCheckConnectivity(); + break; + case SO: + soClient.callCheckConnectivity(); + break; + case DMAAP: + checkDMaaPEventsManager.callDMaaPGetEvents(); + break; + } + } catch (BackendFunctionalException e) { + String message = MessageFormat + .format("backend exception for {0}, status code {1}, body response {2}", onapModuleType, + e.getHttpStatus(), e.getBodyResponse()); + LOGGER.error(message); + return new ApplicationStatus(onapModuleType.getValue() + " connectivity", StatusType.KO, null); + } catch (ResourceAccessException e) { + String message = MessageFormat + .format("resource access exception for {0}, response {1}", onapModuleType, e.getMessage()); + LOGGER.error(message); + return new ApplicationStatus(onapModuleType.getValue() + " connectivity", StatusType.KO, null); + } + return new ApplicationStatus(onapModuleType.getValue() + " connectivity", StatusType.OK, null); + } + + +} \ No newline at end of file diff --git a/src/main/java/org/onap/nbi/apis/status/StatusResource.java b/src/main/java/org/onap/nbi/apis/status/StatusResource.java index 4fead09..e1510cc 100644 --- a/src/main/java/org/onap/nbi/apis/status/StatusResource.java +++ b/src/main/java/org/onap/nbi/apis/status/StatusResource.java @@ -1,21 +1,19 @@ /** - * Copyright (c) 2018 Orange + * Copyright (c) 2018 Orange * - * 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 + * 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 + * 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. + * 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. */ package org.onap.nbi.apis.status; import org.onap.nbi.apis.status.model.ApplicationStatus; +import org.onap.nbi.apis.status.model.OnapModuleType; import org.onap.nbi.apis.status.model.StatusType; import org.onap.nbi.commons.JsonRepresentation; import org.onap.nbi.commons.ResourceManagement; @@ -24,8 +22,10 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; +import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; @@ -44,30 +44,36 @@ public class StatusResource extends ResourceManagement { .add("components.name").add("components.status"); @GetMapping(value = "", produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity status(HttpServletRequest request) { + public ResponseEntity status(HttpServletRequest request, @RequestParam MultiValueMap params) { ResponseEntity responseEntity = null; - final String[] splitPath = request.getRequestURI().split("/"); final String applicationName = splitPath[1]; - - final ApplicationStatus applicationStatus = this.statusService.get(applicationName, version); - - final boolean isServiceFullyFunctional = - StatusType.OK.equals(applicationStatus.getStatus()) ? applicationStatus.getComponents().stream() - .allMatch(componentStatus -> StatusType.OK.equals(componentStatus.getStatus())) : false; + boolean fullStatus = Boolean.valueOf(params.getFirst("fullStatus")); + final ApplicationStatus applicationStatus = buildNbiStatus(applicationName,fullStatus); // filter object Object response = this.getEntity(applicationStatus, fullRepresentation); - if (isServiceFullyFunctional) { - responseEntity = ResponseEntity.ok(response); - } else { - responseEntity = ResponseEntity.status(HttpStatus.SERVICE_UNAVAILABLE).body(response); - } + responseEntity = ResponseEntity.ok(response); return responseEntity; } + private ApplicationStatus buildNbiStatus(String applicationName, boolean fullStatus) { + final ApplicationStatus applicationStatus = this.statusService.get(applicationName, version); + + if(fullStatus) { + final ApplicationStatus sdcConnectivityStatus = this.statusService.getOnapConnectivity(OnapModuleType.SDC); + final ApplicationStatus aaiConnectivityStatus = this.statusService.getOnapConnectivity(OnapModuleType.AAI); + final ApplicationStatus soConnectivityStatus = this.statusService.getOnapConnectivity(OnapModuleType.SO); + final ApplicationStatus dmaapConnectivityStatus = this.statusService.getOnapConnectivity(OnapModuleType.DMAAP); + applicationStatus.addComponent(sdcConnectivityStatus).addComponent(aaiConnectivityStatus) + .addComponent(soConnectivityStatus).addComponent(dmaapConnectivityStatus); + } + + return applicationStatus; + } + } diff --git a/src/main/java/org/onap/nbi/apis/status/StatusService.java b/src/main/java/org/onap/nbi/apis/status/StatusService.java index 8f285bf..35eba3a 100644 --- a/src/main/java/org/onap/nbi/apis/status/StatusService.java +++ b/src/main/java/org/onap/nbi/apis/status/StatusService.java @@ -16,9 +16,14 @@ package org.onap.nbi.apis.status; import org.onap.nbi.apis.status.model.ApplicationStatus; +import org.onap.nbi.apis.status.model.OnapModuleType; public interface StatusService { ApplicationStatus get(String serviceName, String serviceVersion); + + ApplicationStatus getOnapConnectivity(OnapModuleType onapModuleType); + + } diff --git a/src/main/java/org/onap/nbi/apis/status/StatusServiceImpl.java b/src/main/java/org/onap/nbi/apis/status/StatusServiceImpl.java index a55e113..1ee9fc6 100644 --- a/src/main/java/org/onap/nbi/apis/status/StatusServiceImpl.java +++ b/src/main/java/org/onap/nbi/apis/status/StatusServiceImpl.java @@ -16,12 +16,18 @@ package org.onap.nbi.apis.status; import org.onap.nbi.apis.status.model.ApplicationStatus; +import org.onap.nbi.apis.status.model.OnapModuleType; import org.onap.nbi.apis.status.model.StatusType; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service("statusService") public class StatusServiceImpl implements StatusService { + @Autowired + private OnapClient onapClient; + + @Override public ApplicationStatus get(final String serviceName, final String serviceVersion) { @@ -29,9 +35,11 @@ public class StatusServiceImpl implements StatusService { } + @Override + public ApplicationStatus getOnapConnectivity(OnapModuleType onapModuleType) { - public boolean serviceIsUp() { - return true; + return onapClient.checkConnectivity(onapModuleType); } + } diff --git a/src/main/java/org/onap/nbi/apis/status/model/ApplicationStatus.java b/src/main/java/org/onap/nbi/apis/status/model/ApplicationStatus.java index 3e1a60f..6d8e0c1 100644 --- a/src/main/java/org/onap/nbi/apis/status/model/ApplicationStatus.java +++ b/src/main/java/org/onap/nbi/apis/status/model/ApplicationStatus.java @@ -33,7 +33,7 @@ public class ApplicationStatus implements Resource { * Builds a new {@code ApplicationStatus} with the following attributes : * * @param name name of the service - * @param state state of the service ({@code OK} | {@code KO}) + * @param status status of the service ({@code OK} | {@code KO}) * @param version version of the service ({@code x.y.z}) */ public ApplicationStatus(final String name, final StatusType status, final String version) { @@ -58,7 +58,7 @@ public class ApplicationStatus implements Resource { return this.components; } - public ApplicationStatus component(final ApplicationStatus componentStatus) { + public ApplicationStatus addComponent(final ApplicationStatus componentStatus) { this.components.add(componentStatus); return this; } diff --git a/src/main/java/org/onap/nbi/apis/status/model/OnapModuleType.java b/src/main/java/org/onap/nbi/apis/status/model/OnapModuleType.java new file mode 100644 index 0000000..2013147 --- /dev/null +++ b/src/main/java/org/onap/nbi/apis/status/model/OnapModuleType.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2018 Orange + * + * 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. + */ +package org.onap.nbi.apis.status.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public enum OnapModuleType { + + SDC("sdc"), AAI("aai"),SO("so"), DMAAP("dmaap"); + + private final String value; + + OnapModuleType(String v) { + this.value = v; + } + + @JsonValue + public String getValue() { + return this.value; + } + + @JsonCreator + public static OnapModuleType fromValue(String v) { + for (OnapModuleType c : OnapModuleType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/src/test/resources/karatetest/features/04--StatusRessourceTest.feature b/src/test/resources/karatetest/features/04--StatusRessourceTest.feature index f616e90..5db5c78 100644 --- a/src/test/resources/karatetest/features/04--StatusRessourceTest.feature +++ b/src/test/resources/karatetest/features/04--StatusRessourceTest.feature @@ -9,9 +9,43 @@ Background: * call Context.startServers(); Scenario: testHealthCheck +Given path 'status' +When method get +Then status 200 +And match response.status == 'ok' +And match response.name == 'nbi' +Scenario: testFullHealthCheck Given path 'status' +And params {fullStatus :true} When method get Then status 200 And match response.status == 'ok' -And match response.name == 'nbi' \ No newline at end of file +And match response.name == 'nbi' +And assert response.components.length == 4 +And match each $.components contains {status :'ok'} + + +Scenario: testFullHealthChecWithoutWiremock +* call Context.stopWiremock(); +Given path 'status' +And params {fullStatus :true} +When method get +Then status 200 +And match response.status == 'ok' +And match response.name == 'nbi' +And assert response.components.length == 4 +And match each response.components contains { status: 'ko'} +* call Context.startServers(); + +Scenario: testFullHealthCheckWithSDCNotResponding +* call Context.removeWireMockMapping("/sdc/v1/artifactTypes"); +Given path 'status' +And params {fullStatus :true} +When method get +Then status 200 +And match response.status == 'ok' +And match response.name == 'nbi' +And assert response.components.length == 4 +And match response.components contains [{name:'sdc connectivity', status: 'ko'},{name:'so connectivity', status: 'ok'},{name:'aai connectivity', status: 'ok'},{name:'dmaap connectivity', status: 'ok'},] +* call Context.startServers(); diff --git a/src/test/resources/mappings/aai/aai_get_6490_service-subscriptions.json b/src/test/resources/mappings/aai/aai_get_6490_service-subscriptions.json new file mode 100644 index 0000000..7606483 --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_6490_service-subscriptions.json @@ -0,0 +1,36 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/business/customers/customer/6490/service-subscriptions" + }, + "response": { + "status": 200, + "jsonBody": { + "service-subscription": [ + { + "service-type": "vFW-service-2VF-based", + "resource-version": "1519809287769" + }, + { + "service-type": "vFW", + "resource-version": "1519660513613", + "service-instances": { + "service-instance": [ + { + "service-instance-id": "39ff3f9d-f210-4566-9d19-fa37edf1697d", + "service-instance-name": "vPCRF", + "model-invariant-id": "a09e799f-58eb-4c00-bfcc-4fa371a557e3", + "model-version-id": "4c393977-09ea-42c2-bcd9-f50302ebba48", + "resource-version": "1524672125232" + } + ] + } + + } + ] + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_customer_6490.json b/src/test/resources/mappings/aai/aai_get_customer_6490.json new file mode 100644 index 0000000..8361f94 --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_customer_6490.json @@ -0,0 +1,18 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/business/customers/customer/6490" + }, + "response": { + "status": 200, + "jsonBody": { + "global-customer-id": "6490", + "subscriber-name": "Jean Pontus", + "subscriber-type": "BSS", + "resource-version": "1518595364087" + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_customer_generic.json b/src/test/resources/mappings/aai/aai_get_customer_generic.json new file mode 100644 index 0000000..9194687 --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_customer_generic.json @@ -0,0 +1,18 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/business/customers/customer/generic" + }, + "response": { + "status": 200, + "jsonBody": { + "global-customer-id": "generic", + "subscriber-name": "generic", + "subscriber-type": "BSS", + "resource-version": "1518595364087" + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_customers.json b/src/test/resources/mappings/aai/aai_get_customers.json new file mode 100644 index 0000000..4146b6a --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_customers.json @@ -0,0 +1,34 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/business/customers" + }, + "response": { + "status": 200, + "jsonBody": { + "customer": [ + { + "global-customer-id": "generic", + "subscriber-name": "generic", + "subscriber-type": "INFRA", + "resource-version": "1550238542827" + }, + { + "global-customer-id": "Generic-Vendor", + "subscriber-name": "Generic-Vendor", + "subscriber-type": "INFRA", + "resource-version": "1550569650318" + }, + { + "global-customer-id": "customerRG", + "subscriber-name": "customerRG", + "subscriber-type": "INFRA", + "resource-version": "1551445667218" + } + ] + }, + "headers": { + "Content-Type": "application/xml" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_generic_service-subscriptions.json b/src/test/resources/mappings/aai/aai_get_generic_service-subscriptions.json new file mode 100644 index 0000000..73bd5e1 --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_generic_service-subscriptions.json @@ -0,0 +1,20 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/business/customers/customer/generic/service-subscriptions" + }, + "response": { + "status": 200, + "jsonBody": { + "service-subscription": [ + { + "service-type": "vFW", + "resource-version": "1519660513613" + } + ] + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_service-subscription-Ansible-service.json b/src/test/resources/mappings/aai/aai_get_service-subscription-Ansible-service.json new file mode 100644 index 0000000..121f7d1 --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_service-subscription-Ansible-service.json @@ -0,0 +1,52 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/business/customers/customer/6490/service-subscriptions/service-subscription/AnsibleService/service-instances/service-instance/405c8c00-44b9-4303-9f27-6797d22ca096" + }, + "response": { + "status": 200, + "jsonBody": { + "service-instance-id": "405c8c00-44b9-4303-9f27-6797d22ca096", + "service-instance-name": "ansibleService-service-instance-065FYE", + "environment-context": "General_Revenue-Bearing", + "workload-context": "Production", + "model-invariant-id": "f3ec9092-5c98-41f1-9fea-96be80abd064", + "model-version-id": "0bf5f56a-4506-4e98-ab50-336d73ca4b07", + "resource-version": "1530200875713", + "orchestration-status": "Active", + "relationship-list": { + "relationship": [ + { + "related-to": "generic-vnf", + "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/3f73377f-d9be-4a33-b068-e3f35b5b770b", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "3f73377f-d9be-4a33-b068-e3f35b5b770b" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "ansibleService-vnf-instance-DebianVNF_0_065FYE" + } + ] + }, + { + "related-to": "owning-entity", + "related-link": "/aai/v11/business/owning-entities/owning-entity/OE-generic", + "relationship-data": [ + { + "relationship-key": "owning-entity.owning-entity-id", + "relationship-value": "OE-generic" + } + ] + } + ] + } + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_service-subscription_vnf.json b/src/test/resources/mappings/aai/aai_get_service-subscription_vnf.json new file mode 100644 index 0000000..7c33979 --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_service-subscription_vnf.json @@ -0,0 +1,58 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e" + }, + "response": { + "status": 200, + "jsonBody": { + "vnf-id": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e", + "vnf-name": "NewFreeRadius-VNF-instance-01", + "vnf-type": "NewFreeRadius-service/New-FreeRadius 0", + "service-id": "709d157b-52fb-4250-976e-7133dff5c347", + "prov-status": "PREPROV", + "orchestration-status": "Created", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1516871905399", + "model-invariant-id": "f5993703-977f-4346-a1c9-c1884f8cfd8d", + "model-version-id": "902438f7-1e4c-492d-b7cc-8650e13b8aeb", + "model-customization-id": "a2def5c8-ab15-482b-a2cd-2af0b987300f", + "nf-type": "", + "nf-function": "", + "nf-role": "", + "nf-naming-code": "", + "relationship-list": { + "relationship": [ + { + "related-to": "service-instance", + "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/NewFreeRadius-service/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Sina" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "NewFreeRadius-service" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb" + } + ], + "related-to-property": [ + { + "property-key": "service-instance.service-instance-name", + "property-value": "NewFreeRadius-service-instance-01" + } + ] + } + ] + } + }, + "headers": { + "Content-Type": "application/json" + } + } +} \ No newline at end of file diff --git a/src/test/resources/mappings/aai/aai_get_service-subscriptionsVFW.json b/src/test/resources/mappings/aai/aai_get_service-subscriptionsVFW.json new file mode 100644 index 0000000..6fb1b4c --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_service-subscriptionsVFW.json @@ -0,0 +1,43 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/business/customers/customer/6490/service-subscriptions/service-subscription/vFW/service-instances/" + }, + "response": { + "status": 200, + "jsonBody": { + "service-instance": [ + { + "service-instance-id": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb", + "service-instance-name": "NewFreeRadius-service-instance-01", + "model-invariant-id": "709d157b-52fb-4250-976e-7133dff5c347", + "model-version-id": "98d95267-5e0f-4531-abf8-f14b90031dc5", + "resource-version": "1518508381261", + "relationship-list": { + "relationship": [ + { + "related-to": "generic-vnf", + "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "NewFreeRadius-VNF-instance-01" + } + ] + } + ] + } + } + ] + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_service-subscriptionsvFW-service-2VF-based.json b/src/test/resources/mappings/aai/aai_get_service-subscriptionsvFW-service-2VF-based.json new file mode 100644 index 0000000..10c172d --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_service-subscriptionsvFW-service-2VF-based.json @@ -0,0 +1,43 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/business/customers/customer/6490/service-subscriptions/service-subscription/vFW-service-2VF-based/service-instances/" + }, + "response": { + "status": 200, + "jsonBody": { + "service-instance": [ + { + "service-instance-id": "vfw-service-id", + "service-instance-name": "vfw-service-name", + "model-invariant-id": "vfw-service-invariant-id", + "model-version-id": "9vfw-service-modek-version-id", + "resource-version": "1518508381261", + "relationship-list": { + "relationship": [ + { + "related-to": "generic-vnf", + "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "NewFreeRadius-VNF-instance-01" + } + ] + } + ] + } + } + ] + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_service_3.json b/src/test/resources/mappings/aai/aai_get_service_3.json new file mode 100644 index 0000000..fc2e416 --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_service_3.json @@ -0,0 +1,19 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/nodes/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcbWithoutList" + }, + "response": { + "status": 200, + "jsonBody": { + "service-instance-id": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb", + "service-instance-name": "NewFreeRadius-service-instance-01", + "model-invariant-id": "709d157b-52fb-4250-976e-7133dff5c347", + "model-version-id": "98d95267-5e0f-4531-abf8-f14b90031dc5", + "resource-version": "1518508381261" + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_service_3_format_resource_url.json b/src/test/resources/mappings/aai/aai_get_service_3_format_resource_url.json new file mode 100644 index 0000000..f78847d --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_service_3_format_resource_url.json @@ -0,0 +1,26 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/nodes/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcbWithoutList?format=resource_and_url" + }, + "response": { + "status": 200, + "jsonBody": { + "results": [ + { + "url": "/aai/v14/business/customers/customer/DemoTest3/service-subscriptions/service-subscription/servicename3/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcbWithoutList", + "service-instance": { + "service-instance-id": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcbWithoutList", + "service-instance-name": "NewFreeRadius-service-instance-01", + "model-invariant-id": "709d157b-52fb-4250-976e-7133dff5c347", + "model-version-id": "98d95267-5e0f-4531-abf8-f14b90031dc5", + "resource-version": "1518508381261" + } + } + ] + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_service_instance.json b/src/test/resources/mappings/aai/aai_get_service_instance.json new file mode 100644 index 0000000..d9f2ab2 --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_service_instance.json @@ -0,0 +1,52 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/nodes/service-instances/service-instance/405c8c00-44b9-4303-9f27-6797d22ca096" + }, + "response": { + "status": 200, + "jsonBody": { + "service-instance-id": "405c8c00-44b9-4303-9f27-6797d22ca096", + "service-instance-name": "ansibleService-service-instance-065FYE", + "environment-context": "General_Revenue-Bearing", + "workload-context": "Production", + "model-invariant-id": "f3ec9092-5c98-41f1-9fea-96be80abd064", + "model-version-id": "0bf5f56a-4506-4e98-ab50-336d73ca4b07", + "resource-version": "1530200875713", + "orchestration-status": "Active", + "relationship-list": { + "relationship": [ + { + "related-to": "generic-vnf", + "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/3f73377f-d9be-4a33-b068-e3f35b5b770b", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "3f73377f-d9be-4a33-b068-e3f35b5b770b" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "ansibleService-vnf-instance-DebianVNF_0_065FYE" + } + ] + }, + { + "related-to": "owning-entity", + "related-link": "/aai/v11/business/owning-entities/owning-entity/OE-generic", + "relationship-data": [ + { + "relationship-key": "owning-entity.owning-entity-id", + "relationship-value": "OE-generic" + } + ] + } + ] + } + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_service_instance_2.json b/src/test/resources/mappings/aai/aai_get_service_instance_2.json new file mode 100644 index 0000000..7d90bc2 --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_service_instance_2.json @@ -0,0 +1,55 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/nodes/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb" + }, + "response": { + "status": 200, + "jsonBody": { + "service-instance-id": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb", + "service-instance-name": "NewFreeRadius-service-instance-01", + "model-invariant-id": "709d157b-52fb-4250-976e-7133dff5c347", + "model-version-id": "98d95267-5e0f-4531-abf8-f14b90031dc5", + "resource-version": "1518508381261", + "relationship-list": { + "relationship": [ + { + "related-to": "generic-vnf", + "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "NewFreeRadius-VNF-instance-01" + } + ] + }, + { + "related-to": "generic-vnf", + "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "NewFreeRadius-VNF-instance-01" + } + ] + } + ] + } + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_service_instance_2_format_resource_url.json b/src/test/resources/mappings/aai/aai_get_service_instance_2_format_resource_url.json new file mode 100644 index 0000000..086441e --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_service_instance_2_format_resource_url.json @@ -0,0 +1,62 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/nodes/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb?format=resource_and_url" + }, + "response": { + "status": 200, + "jsonBody": { + "results": [ + { + "url": "/aai/v14/business/customers/customer/DemoTest2/service-subscriptions/service-subscription/servicename2/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb", + "service-instance": { + "service-instance-id": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb", + "service-instance-name": "NewFreeRadius-service-instance-01", + "model-invariant-id": "709d157b-52fb-4250-976e-7133dff5c347", + "model-version-id": "98d95267-5e0f-4531-abf8-f14b90031dc5", + "resource-version": "1518508381261", + "relationship-list": { + "relationship": [ + { + "related-to": "generic-vnf", + "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "NewFreeRadius-VNF-instance-01" + } + ] + }, + { + "related-to": "generic-vnf", + "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "NewFreeRadius-VNF-instance-01" + } + ] + } + ] + } +} + } + ] + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_service_instance_format_resource_url.json b/src/test/resources/mappings/aai/aai_get_service_instance_format_resource_url.json new file mode 100644 index 0000000..7f0db27 --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_service_instance_format_resource_url.json @@ -0,0 +1,59 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/nodes/service-instances/service-instance/405c8c00-44b9-4303-9f27-6797d22ca096?format=resource_and_url" + }, + "response": { + "status": 200, + "jsonBody": { + "results": [ + { + "url": "/aai/v14/business/customers/customer/DemoTest1/service-subscriptions/service-subscription/servicename1/service-instances/service-instance/405c8c00-44b9-4303-9f27-6797d22ca096", + "service-instance": { + "service-instance-id": "405c8c00-44b9-4303-9f27-6797d22ca096", + "service-instance-name": "ansibleService-service-instance-065FYE", + "environment-context": "General_Revenue-Bearing", + "workload-context": "Production", + "model-invariant-id": "f3ec9092-5c98-41f1-9fea-96be80abd064", + "model-version-id": "0bf5f56a-4506-4e98-ab50-336d73ca4b07", + "resource-version": "1530200875713", + "orchestration-status": "Active", + "relationship-list": { + "relationship": [ + { + "related-to": "generic-vnf", + "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/3f73377f-d9be-4a33-b068-e3f35b5b770b", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "3f73377f-d9be-4a33-b068-e3f35b5b770b" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "ansibleService-vnf-instance-DebianVNF_0_065FYE" + } + ] + }, + { + "related-to": "owning-entity", + "related-link": "/aai/v11/business/owning-entities/owning-entity/OE-generic", + "relationship-data": [ + { + "relationship-key": "owning-entity.owning-entity-id", + "relationship-value": "OE-generic" + } + ] + } + ] + } + } + } + ] +}, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_get_tenants.json b/src/test/resources/mappings/aai/aai_get_tenants.json new file mode 100644 index 0000000..2dda86e --- /dev/null +++ b/src/test/resources/mappings/aai/aai_get_tenants.json @@ -0,0 +1,167 @@ +{ + "request": { + "method": "GET", + "url": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants" + }, + "response": { + "status": 200, + "jsonBody": { + + "tenant": [ + { + "tenant-id": "31047205ce114b60833b23e400d6a535", + "tenant-name": "onap-vnfs", + "resource-version": "1516022902124", + "relationship-list": { + "relationship": [ + { + "related-to": "service-subscription", + "related-link": "/aai/v11/business/customers/customer/OPL-User/service-subscriptions/service-subscription/OPL_FWtest1_service_type", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "OPL-User" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "OPL_FWtest1_service_type" + } + ] + }, + { + "related-to": "service-subscription", + "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/NewFreeRadius-service", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Sina" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "NewFreeRadius-service" + } + ] + }, + { + "related-to": "service-subscription", + "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/vMRFaaS3", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Sina" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "vMRFaaS3" + } + ] + }, + { + "related-to": "service-subscription", + "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/FreeRadius-service", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Sina" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "FreeRadius-service" + } + ] + }, + { + "related-to": "service-subscription", + "related-link": "/aai/v11/business/customers/customer/6401/service-subscriptions/service-subscription/vFW-service-model", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "6401" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "vFW-service-model" + } + ] + }, + { + "related-to": "service-subscription", + "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/vFW-service-model", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Sina" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "vFW-service-model" + } + ] + }, + { + "related-to": "service-subscription", + "related-link": "/aai/v11/business/customers/customer/6404/service-subscriptions/service-subscription/vFW-service-model", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "6404" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "vFW-service-model" + } + ] + }, + { + "related-to": "service-subscription", + "related-link": "/aai/v11/business/customers/customer/6405/service-subscriptions/service-subscription/vFW-service-model", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "6405" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "vFW-service-model" + } + ] + }, + { + "related-to": "service-subscription", + "related-link": "/aai/v11/business/customers/customer/6406/service-subscriptions/service-subscription/vFW-service-model", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "6406" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "vFW-service-model" + } + ] + }, + { + "related-to": "service-subscription", + "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/serviceFRDBS", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Sina" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "serviceFRDBS" + } + ] + } + ] + } + } + ] + + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_put_customer.json b/src/test/resources/mappings/aai/aai_put_customer.json new file mode 100644 index 0000000..f9f2418 --- /dev/null +++ b/src/test/resources/mappings/aai/aai_put_customer.json @@ -0,0 +1,12 @@ +{ + "request": { + "method": "PUT", + "url": "/aai/v14/business/customers/customer/new" + }, + "response": { + "status": 201, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai/aai_put_customer_service.json b/src/test/resources/mappings/aai/aai_put_customer_service.json new file mode 100644 index 0000000..98ed133 --- /dev/null +++ b/src/test/resources/mappings/aai/aai_put_customer_service.json @@ -0,0 +1,12 @@ +{ + "request": { + "method": "PUT", + "url": "/aai/v14/business/customers/customer/new/service-subscriptions/service-subscription/vFW" + }, + "response": { + "status": 201, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/aai_get_6490_service-subscriptions.json b/src/test/resources/mappings/aai_get_6490_service-subscriptions.json deleted file mode 100644 index 7606483..0000000 --- a/src/test/resources/mappings/aai_get_6490_service-subscriptions.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/business/customers/customer/6490/service-subscriptions" - }, - "response": { - "status": 200, - "jsonBody": { - "service-subscription": [ - { - "service-type": "vFW-service-2VF-based", - "resource-version": "1519809287769" - }, - { - "service-type": "vFW", - "resource-version": "1519660513613", - "service-instances": { - "service-instance": [ - { - "service-instance-id": "39ff3f9d-f210-4566-9d19-fa37edf1697d", - "service-instance-name": "vPCRF", - "model-invariant-id": "a09e799f-58eb-4c00-bfcc-4fa371a557e3", - "model-version-id": "4c393977-09ea-42c2-bcd9-f50302ebba48", - "resource-version": "1524672125232" - } - ] - } - - } - ] - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_customer_6490.json b/src/test/resources/mappings/aai_get_customer_6490.json deleted file mode 100644 index 8361f94..0000000 --- a/src/test/resources/mappings/aai_get_customer_6490.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/business/customers/customer/6490" - }, - "response": { - "status": 200, - "jsonBody": { - "global-customer-id": "6490", - "subscriber-name": "Jean Pontus", - "subscriber-type": "BSS", - "resource-version": "1518595364087" - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_customer_generic.json b/src/test/resources/mappings/aai_get_customer_generic.json deleted file mode 100644 index 9194687..0000000 --- a/src/test/resources/mappings/aai_get_customer_generic.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/business/customers/customer/generic" - }, - "response": { - "status": 200, - "jsonBody": { - "global-customer-id": "generic", - "subscriber-name": "generic", - "subscriber-type": "BSS", - "resource-version": "1518595364087" - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_generic_service-subscriptions.json b/src/test/resources/mappings/aai_get_generic_service-subscriptions.json deleted file mode 100644 index 73bd5e1..0000000 --- a/src/test/resources/mappings/aai_get_generic_service-subscriptions.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/business/customers/customer/generic/service-subscriptions" - }, - "response": { - "status": 200, - "jsonBody": { - "service-subscription": [ - { - "service-type": "vFW", - "resource-version": "1519660513613" - } - ] - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_service-subscription-Ansible-service.json b/src/test/resources/mappings/aai_get_service-subscription-Ansible-service.json deleted file mode 100644 index 121f7d1..0000000 --- a/src/test/resources/mappings/aai_get_service-subscription-Ansible-service.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/business/customers/customer/6490/service-subscriptions/service-subscription/AnsibleService/service-instances/service-instance/405c8c00-44b9-4303-9f27-6797d22ca096" - }, - "response": { - "status": 200, - "jsonBody": { - "service-instance-id": "405c8c00-44b9-4303-9f27-6797d22ca096", - "service-instance-name": "ansibleService-service-instance-065FYE", - "environment-context": "General_Revenue-Bearing", - "workload-context": "Production", - "model-invariant-id": "f3ec9092-5c98-41f1-9fea-96be80abd064", - "model-version-id": "0bf5f56a-4506-4e98-ab50-336d73ca4b07", - "resource-version": "1530200875713", - "orchestration-status": "Active", - "relationship-list": { - "relationship": [ - { - "related-to": "generic-vnf", - "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/3f73377f-d9be-4a33-b068-e3f35b5b770b", - "relationship-data": [ - { - "relationship-key": "generic-vnf.vnf-id", - "relationship-value": "3f73377f-d9be-4a33-b068-e3f35b5b770b" - } - ], - "related-to-property": [ - { - "property-key": "generic-vnf.vnf-name", - "property-value": "ansibleService-vnf-instance-DebianVNF_0_065FYE" - } - ] - }, - { - "related-to": "owning-entity", - "related-link": "/aai/v11/business/owning-entities/owning-entity/OE-generic", - "relationship-data": [ - { - "relationship-key": "owning-entity.owning-entity-id", - "relationship-value": "OE-generic" - } - ] - } - ] - } - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_service-subscription_vnf.json b/src/test/resources/mappings/aai_get_service-subscription_vnf.json deleted file mode 100644 index 7c33979..0000000 --- a/src/test/resources/mappings/aai_get_service-subscription_vnf.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e" - }, - "response": { - "status": 200, - "jsonBody": { - "vnf-id": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e", - "vnf-name": "NewFreeRadius-VNF-instance-01", - "vnf-type": "NewFreeRadius-service/New-FreeRadius 0", - "service-id": "709d157b-52fb-4250-976e-7133dff5c347", - "prov-status": "PREPROV", - "orchestration-status": "Created", - "in-maint": false, - "is-closed-loop-disabled": false, - "resource-version": "1516871905399", - "model-invariant-id": "f5993703-977f-4346-a1c9-c1884f8cfd8d", - "model-version-id": "902438f7-1e4c-492d-b7cc-8650e13b8aeb", - "model-customization-id": "a2def5c8-ab15-482b-a2cd-2af0b987300f", - "nf-type": "", - "nf-function": "", - "nf-role": "", - "nf-naming-code": "", - "relationship-list": { - "relationship": [ - { - "related-to": "service-instance", - "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/NewFreeRadius-service/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb", - "relationship-data": [ - { - "relationship-key": "customer.global-customer-id", - "relationship-value": "Sina" - }, - { - "relationship-key": "service-subscription.service-type", - "relationship-value": "NewFreeRadius-service" - }, - { - "relationship-key": "service-instance.service-instance-id", - "relationship-value": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb" - } - ], - "related-to-property": [ - { - "property-key": "service-instance.service-instance-name", - "property-value": "NewFreeRadius-service-instance-01" - } - ] - } - ] - } - }, - "headers": { - "Content-Type": "application/json" - } - } -} \ No newline at end of file diff --git a/src/test/resources/mappings/aai_get_service-subscriptionsVFW.json b/src/test/resources/mappings/aai_get_service-subscriptionsVFW.json deleted file mode 100644 index 6fb1b4c..0000000 --- a/src/test/resources/mappings/aai_get_service-subscriptionsVFW.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/business/customers/customer/6490/service-subscriptions/service-subscription/vFW/service-instances/" - }, - "response": { - "status": 200, - "jsonBody": { - "service-instance": [ - { - "service-instance-id": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb", - "service-instance-name": "NewFreeRadius-service-instance-01", - "model-invariant-id": "709d157b-52fb-4250-976e-7133dff5c347", - "model-version-id": "98d95267-5e0f-4531-abf8-f14b90031dc5", - "resource-version": "1518508381261", - "relationship-list": { - "relationship": [ - { - "related-to": "generic-vnf", - "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e", - "relationship-data": [ - { - "relationship-key": "generic-vnf.vnf-id", - "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e" - } - ], - "related-to-property": [ - { - "property-key": "generic-vnf.vnf-name", - "property-value": "NewFreeRadius-VNF-instance-01" - } - ] - } - ] - } - } - ] - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_service-subscriptionsvFW-service-2VF-based.json b/src/test/resources/mappings/aai_get_service-subscriptionsvFW-service-2VF-based.json deleted file mode 100644 index 10c172d..0000000 --- a/src/test/resources/mappings/aai_get_service-subscriptionsvFW-service-2VF-based.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/business/customers/customer/6490/service-subscriptions/service-subscription/vFW-service-2VF-based/service-instances/" - }, - "response": { - "status": 200, - "jsonBody": { - "service-instance": [ - { - "service-instance-id": "vfw-service-id", - "service-instance-name": "vfw-service-name", - "model-invariant-id": "vfw-service-invariant-id", - "model-version-id": "9vfw-service-modek-version-id", - "resource-version": "1518508381261", - "relationship-list": { - "relationship": [ - { - "related-to": "generic-vnf", - "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e", - "relationship-data": [ - { - "relationship-key": "generic-vnf.vnf-id", - "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e" - } - ], - "related-to-property": [ - { - "property-key": "generic-vnf.vnf-name", - "property-value": "NewFreeRadius-VNF-instance-01" - } - ] - } - ] - } - } - ] - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_service_3.json b/src/test/resources/mappings/aai_get_service_3.json deleted file mode 100644 index fc2e416..0000000 --- a/src/test/resources/mappings/aai_get_service_3.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/nodes/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcbWithoutList" - }, - "response": { - "status": 200, - "jsonBody": { - "service-instance-id": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb", - "service-instance-name": "NewFreeRadius-service-instance-01", - "model-invariant-id": "709d157b-52fb-4250-976e-7133dff5c347", - "model-version-id": "98d95267-5e0f-4531-abf8-f14b90031dc5", - "resource-version": "1518508381261" - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_service_3_format_resource_url.json b/src/test/resources/mappings/aai_get_service_3_format_resource_url.json deleted file mode 100644 index f78847d..0000000 --- a/src/test/resources/mappings/aai_get_service_3_format_resource_url.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/nodes/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcbWithoutList?format=resource_and_url" - }, - "response": { - "status": 200, - "jsonBody": { - "results": [ - { - "url": "/aai/v14/business/customers/customer/DemoTest3/service-subscriptions/service-subscription/servicename3/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcbWithoutList", - "service-instance": { - "service-instance-id": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcbWithoutList", - "service-instance-name": "NewFreeRadius-service-instance-01", - "model-invariant-id": "709d157b-52fb-4250-976e-7133dff5c347", - "model-version-id": "98d95267-5e0f-4531-abf8-f14b90031dc5", - "resource-version": "1518508381261" - } - } - ] - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_service_instance.json b/src/test/resources/mappings/aai_get_service_instance.json deleted file mode 100644 index d9f2ab2..0000000 --- a/src/test/resources/mappings/aai_get_service_instance.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/nodes/service-instances/service-instance/405c8c00-44b9-4303-9f27-6797d22ca096" - }, - "response": { - "status": 200, - "jsonBody": { - "service-instance-id": "405c8c00-44b9-4303-9f27-6797d22ca096", - "service-instance-name": "ansibleService-service-instance-065FYE", - "environment-context": "General_Revenue-Bearing", - "workload-context": "Production", - "model-invariant-id": "f3ec9092-5c98-41f1-9fea-96be80abd064", - "model-version-id": "0bf5f56a-4506-4e98-ab50-336d73ca4b07", - "resource-version": "1530200875713", - "orchestration-status": "Active", - "relationship-list": { - "relationship": [ - { - "related-to": "generic-vnf", - "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/3f73377f-d9be-4a33-b068-e3f35b5b770b", - "relationship-data": [ - { - "relationship-key": "generic-vnf.vnf-id", - "relationship-value": "3f73377f-d9be-4a33-b068-e3f35b5b770b" - } - ], - "related-to-property": [ - { - "property-key": "generic-vnf.vnf-name", - "property-value": "ansibleService-vnf-instance-DebianVNF_0_065FYE" - } - ] - }, - { - "related-to": "owning-entity", - "related-link": "/aai/v11/business/owning-entities/owning-entity/OE-generic", - "relationship-data": [ - { - "relationship-key": "owning-entity.owning-entity-id", - "relationship-value": "OE-generic" - } - ] - } - ] - } - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_service_instance_2.json b/src/test/resources/mappings/aai_get_service_instance_2.json deleted file mode 100644 index 7d90bc2..0000000 --- a/src/test/resources/mappings/aai_get_service_instance_2.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/nodes/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb" - }, - "response": { - "status": 200, - "jsonBody": { - "service-instance-id": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb", - "service-instance-name": "NewFreeRadius-service-instance-01", - "model-invariant-id": "709d157b-52fb-4250-976e-7133dff5c347", - "model-version-id": "98d95267-5e0f-4531-abf8-f14b90031dc5", - "resource-version": "1518508381261", - "relationship-list": { - "relationship": [ - { - "related-to": "generic-vnf", - "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e", - "relationship-data": [ - { - "relationship-key": "generic-vnf.vnf-id", - "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e" - } - ], - "related-to-property": [ - { - "property-key": "generic-vnf.vnf-name", - "property-value": "NewFreeRadius-VNF-instance-01" - } - ] - }, - { - "related-to": "generic-vnf", - "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e", - "relationship-data": [ - { - "relationship-key": "generic-vnf.vnf-id", - "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e" - } - ], - "related-to-property": [ - { - "property-key": "generic-vnf.vnf-name", - "property-value": "NewFreeRadius-VNF-instance-01" - } - ] - } - ] - } - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_service_instance_2_format_resource_url.json b/src/test/resources/mappings/aai_get_service_instance_2_format_resource_url.json deleted file mode 100644 index 086441e..0000000 --- a/src/test/resources/mappings/aai_get_service_instance_2_format_resource_url.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/nodes/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb?format=resource_and_url" - }, - "response": { - "status": 200, - "jsonBody": { - "results": [ - { - "url": "/aai/v14/business/customers/customer/DemoTest2/service-subscriptions/service-subscription/servicename2/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb", - "service-instance": { - "service-instance-id": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb", - "service-instance-name": "NewFreeRadius-service-instance-01", - "model-invariant-id": "709d157b-52fb-4250-976e-7133dff5c347", - "model-version-id": "98d95267-5e0f-4531-abf8-f14b90031dc5", - "resource-version": "1518508381261", - "relationship-list": { - "relationship": [ - { - "related-to": "generic-vnf", - "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e", - "relationship-data": [ - { - "relationship-key": "generic-vnf.vnf-id", - "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e" - } - ], - "related-to-property": [ - { - "property-key": "generic-vnf.vnf-name", - "property-value": "NewFreeRadius-VNF-instance-01" - } - ] - }, - { - "related-to": "generic-vnf", - "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e", - "relationship-data": [ - { - "relationship-key": "generic-vnf.vnf-id", - "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e" - } - ], - "related-to-property": [ - { - "property-key": "generic-vnf.vnf-name", - "property-value": "NewFreeRadius-VNF-instance-01" - } - ] - } - ] - } -} - } - ] - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_service_instance_format_resource_url.json b/src/test/resources/mappings/aai_get_service_instance_format_resource_url.json deleted file mode 100644 index 7f0db27..0000000 --- a/src/test/resources/mappings/aai_get_service_instance_format_resource_url.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/nodes/service-instances/service-instance/405c8c00-44b9-4303-9f27-6797d22ca096?format=resource_and_url" - }, - "response": { - "status": 200, - "jsonBody": { - "results": [ - { - "url": "/aai/v14/business/customers/customer/DemoTest1/service-subscriptions/service-subscription/servicename1/service-instances/service-instance/405c8c00-44b9-4303-9f27-6797d22ca096", - "service-instance": { - "service-instance-id": "405c8c00-44b9-4303-9f27-6797d22ca096", - "service-instance-name": "ansibleService-service-instance-065FYE", - "environment-context": "General_Revenue-Bearing", - "workload-context": "Production", - "model-invariant-id": "f3ec9092-5c98-41f1-9fea-96be80abd064", - "model-version-id": "0bf5f56a-4506-4e98-ab50-336d73ca4b07", - "resource-version": "1530200875713", - "orchestration-status": "Active", - "relationship-list": { - "relationship": [ - { - "related-to": "generic-vnf", - "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/3f73377f-d9be-4a33-b068-e3f35b5b770b", - "relationship-data": [ - { - "relationship-key": "generic-vnf.vnf-id", - "relationship-value": "3f73377f-d9be-4a33-b068-e3f35b5b770b" - } - ], - "related-to-property": [ - { - "property-key": "generic-vnf.vnf-name", - "property-value": "ansibleService-vnf-instance-DebianVNF_0_065FYE" - } - ] - }, - { - "related-to": "owning-entity", - "related-link": "/aai/v11/business/owning-entities/owning-entity/OE-generic", - "relationship-data": [ - { - "relationship-key": "owning-entity.owning-entity-id", - "relationship-value": "OE-generic" - } - ] - } - ] - } - } - } - ] -}, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_get_tenants.json b/src/test/resources/mappings/aai_get_tenants.json deleted file mode 100644 index 2dda86e..0000000 --- a/src/test/resources/mappings/aai_get_tenants.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants" - }, - "response": { - "status": 200, - "jsonBody": { - - "tenant": [ - { - "tenant-id": "31047205ce114b60833b23e400d6a535", - "tenant-name": "onap-vnfs", - "resource-version": "1516022902124", - "relationship-list": { - "relationship": [ - { - "related-to": "service-subscription", - "related-link": "/aai/v11/business/customers/customer/OPL-User/service-subscriptions/service-subscription/OPL_FWtest1_service_type", - "relationship-data": [ - { - "relationship-key": "customer.global-customer-id", - "relationship-value": "OPL-User" - }, - { - "relationship-key": "service-subscription.service-type", - "relationship-value": "OPL_FWtest1_service_type" - } - ] - }, - { - "related-to": "service-subscription", - "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/NewFreeRadius-service", - "relationship-data": [ - { - "relationship-key": "customer.global-customer-id", - "relationship-value": "Sina" - }, - { - "relationship-key": "service-subscription.service-type", - "relationship-value": "NewFreeRadius-service" - } - ] - }, - { - "related-to": "service-subscription", - "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/vMRFaaS3", - "relationship-data": [ - { - "relationship-key": "customer.global-customer-id", - "relationship-value": "Sina" - }, - { - "relationship-key": "service-subscription.service-type", - "relationship-value": "vMRFaaS3" - } - ] - }, - { - "related-to": "service-subscription", - "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/FreeRadius-service", - "relationship-data": [ - { - "relationship-key": "customer.global-customer-id", - "relationship-value": "Sina" - }, - { - "relationship-key": "service-subscription.service-type", - "relationship-value": "FreeRadius-service" - } - ] - }, - { - "related-to": "service-subscription", - "related-link": "/aai/v11/business/customers/customer/6401/service-subscriptions/service-subscription/vFW-service-model", - "relationship-data": [ - { - "relationship-key": "customer.global-customer-id", - "relationship-value": "6401" - }, - { - "relationship-key": "service-subscription.service-type", - "relationship-value": "vFW-service-model" - } - ] - }, - { - "related-to": "service-subscription", - "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/vFW-service-model", - "relationship-data": [ - { - "relationship-key": "customer.global-customer-id", - "relationship-value": "Sina" - }, - { - "relationship-key": "service-subscription.service-type", - "relationship-value": "vFW-service-model" - } - ] - }, - { - "related-to": "service-subscription", - "related-link": "/aai/v11/business/customers/customer/6404/service-subscriptions/service-subscription/vFW-service-model", - "relationship-data": [ - { - "relationship-key": "customer.global-customer-id", - "relationship-value": "6404" - }, - { - "relationship-key": "service-subscription.service-type", - "relationship-value": "vFW-service-model" - } - ] - }, - { - "related-to": "service-subscription", - "related-link": "/aai/v11/business/customers/customer/6405/service-subscriptions/service-subscription/vFW-service-model", - "relationship-data": [ - { - "relationship-key": "customer.global-customer-id", - "relationship-value": "6405" - }, - { - "relationship-key": "service-subscription.service-type", - "relationship-value": "vFW-service-model" - } - ] - }, - { - "related-to": "service-subscription", - "related-link": "/aai/v11/business/customers/customer/6406/service-subscriptions/service-subscription/vFW-service-model", - "relationship-data": [ - { - "relationship-key": "customer.global-customer-id", - "relationship-value": "6406" - }, - { - "relationship-key": "service-subscription.service-type", - "relationship-value": "vFW-service-model" - } - ] - }, - { - "related-to": "service-subscription", - "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/serviceFRDBS", - "relationship-data": [ - { - "relationship-key": "customer.global-customer-id", - "relationship-value": "Sina" - }, - { - "relationship-key": "service-subscription.service-type", - "relationship-value": "serviceFRDBS" - } - ] - } - ] - } - } - ] - - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_put_customer.json b/src/test/resources/mappings/aai_put_customer.json deleted file mode 100644 index f9f2418..0000000 --- a/src/test/resources/mappings/aai_put_customer.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "request": { - "method": "PUT", - "url": "/aai/v14/business/customers/customer/new" - }, - "response": { - "status": 201, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/aai_put_customer_service.json b/src/test/resources/mappings/aai_put_customer_service.json deleted file mode 100644 index 98ed133..0000000 --- a/src/test/resources/mappings/aai_put_customer_service.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "request": { - "method": "PUT", - "url": "/aai/v14/business/customers/customer/new/service-subscriptions/service-subscription/vFW" - }, - "response": { - "status": 201, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/dmaap/dmaap_get_aaievents.json b/src/test/resources/mappings/dmaap/dmaap_get_aaievents.json new file mode 100644 index 0000000..6b5c630 --- /dev/null +++ b/src/test/resources/mappings/dmaap/dmaap_get_aaievents.json @@ -0,0 +1,16 @@ +{ + "request": { + "method": "GET", + "url": "/events/AAI-EVENT/NBICG1/NBIC1?timeout=2000" + }, + "response": { + "status": 200, + "jsonBody": [ + "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"service-instance\",\"top-entity-type\":\"customer\",\"entity-link\":\"/aai/v14/business/customers/customer/testcustomer2/service-subscriptions/service-subscription/HSIA_Service/service-instances/service-instance/new-test5\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"CREATE\",\"sequence-number\":\"0\",\"id\":\"c3654954-9802-4b46-a397-6e12c74d2254\",\"source-name\":\"AAI\",\"version\":\"v14\",\"timestamp\":\"20190301-10:20:47:154\"},\"entity\":{\"global-customer-id\":\"testcustomer2\",\"subscriber-name\":\"testcustomer2\",\"service-subscriptions\":{\"service-subscription\":[{\"service-type\":\"HSIA_Service\",\"service-instances\":{\"service-instance\":[{\"service-instance-id\":\"new-test5\",\"resource-version\":\"1551435647134\",\"service-instance-name\":\"testname\",\"orchestration-status\":\"assigned\"}]}}]}}}", + "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"service-instance\",\"top-entity-type\":\"customer\",\"entity-link\":\"/aai/v14/business/customers/customer/testcustomer2/service-subscriptions/service-subscription/HSIA_Service/service-instances/service-instance/new-test5\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"UPDATE\",\"sequence-number\":\"0\",\"id\":\"a746584a-72b7-4994-97b2-bc43ec24fd35\",\"source-name\":\"AAI\",\"version\":\"v14\",\"timestamp\":\"20190301-13:50:34:121\"},\"entity\":{\"global-customer-id\":\"testcustomer2\",\"subscriber-name\":\"testcustomer2\",\"service-subscriptions\":{\"service-subscription\":[{\"service-type\":\"HSIA_Service\",\"service-instances\":{\"service-instance\":[{\"service-instance-id\":\"new-test5\",\"resource-version\":\"1551448234103\",\"service-instance-name\":\"testname\",\"orchestration-status\":\"active\"}]}}]}}}","{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"service-instance\",\"top-entity-type\":\"customer\",\"entity-link\":\"/aai/v14/business/customers/customer/testcustomer2/service-subscriptions/service-subscription/HSIA_Service/service-instances/service-instance/new-test5\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"DELETE\",\"sequence-number\":\"0\",\"id\":\"011c139e-d00f-4a55-b1fc-b319f16e0f70\",\"source-name\":\"AAI\",\"version\":\"v14\",\"timestamp\":\"20190301-13:53:09:590\"},\"entity\":{\"global-customer-id\":\"testcustomer2\",\"subscriber-name\":\"testcustomer2\",\"service-subscriptions\":{\"service-subscription\":[{\"service-type\":\"HSIA_Service\",\"service-instances\":{\"service-instance\":[{\"service-instance-id\":\"new-test5\",\"resource-version\":\"1551448234103\",\"service-instance-name\":\"testname\",\"orchestration-status\":\"active\"}]}}]}}}" + ], + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/dmaap_get_aaievents.json b/src/test/resources/mappings/dmaap_get_aaievents.json deleted file mode 100644 index 6b5c630..0000000 --- a/src/test/resources/mappings/dmaap_get_aaievents.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/events/AAI-EVENT/NBICG1/NBIC1?timeout=2000" - }, - "response": { - "status": 200, - "jsonBody": [ - "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"service-instance\",\"top-entity-type\":\"customer\",\"entity-link\":\"/aai/v14/business/customers/customer/testcustomer2/service-subscriptions/service-subscription/HSIA_Service/service-instances/service-instance/new-test5\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"CREATE\",\"sequence-number\":\"0\",\"id\":\"c3654954-9802-4b46-a397-6e12c74d2254\",\"source-name\":\"AAI\",\"version\":\"v14\",\"timestamp\":\"20190301-10:20:47:154\"},\"entity\":{\"global-customer-id\":\"testcustomer2\",\"subscriber-name\":\"testcustomer2\",\"service-subscriptions\":{\"service-subscription\":[{\"service-type\":\"HSIA_Service\",\"service-instances\":{\"service-instance\":[{\"service-instance-id\":\"new-test5\",\"resource-version\":\"1551435647134\",\"service-instance-name\":\"testname\",\"orchestration-status\":\"assigned\"}]}}]}}}", - "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"service-instance\",\"top-entity-type\":\"customer\",\"entity-link\":\"/aai/v14/business/customers/customer/testcustomer2/service-subscriptions/service-subscription/HSIA_Service/service-instances/service-instance/new-test5\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"UPDATE\",\"sequence-number\":\"0\",\"id\":\"a746584a-72b7-4994-97b2-bc43ec24fd35\",\"source-name\":\"AAI\",\"version\":\"v14\",\"timestamp\":\"20190301-13:50:34:121\"},\"entity\":{\"global-customer-id\":\"testcustomer2\",\"subscriber-name\":\"testcustomer2\",\"service-subscriptions\":{\"service-subscription\":[{\"service-type\":\"HSIA_Service\",\"service-instances\":{\"service-instance\":[{\"service-instance-id\":\"new-test5\",\"resource-version\":\"1551448234103\",\"service-instance-name\":\"testname\",\"orchestration-status\":\"active\"}]}}]}}}","{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"service-instance\",\"top-entity-type\":\"customer\",\"entity-link\":\"/aai/v14/business/customers/customer/testcustomer2/service-subscriptions/service-subscription/HSIA_Service/service-instances/service-instance/new-test5\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"DELETE\",\"sequence-number\":\"0\",\"id\":\"011c139e-d00f-4a55-b1fc-b319f16e0f70\",\"source-name\":\"AAI\",\"version\":\"v14\",\"timestamp\":\"20190301-13:53:09:590\"},\"entity\":{\"global-customer-id\":\"testcustomer2\",\"subscriber-name\":\"testcustomer2\",\"service-subscriptions\":{\"service-subscription\":[{\"service-type\":\"HSIA_Service\",\"service-instances\":{\"service-instance\":[{\"service-instance-id\":\"new-test5\",\"resource-version\":\"1551448234103\",\"service-instance-name\":\"testname\",\"orchestration-status\":\"active\"}]}}]}}}" - ], - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/sdc/sdc_find.json b/src/test/resources/mappings/sdc/sdc_find.json new file mode 100644 index 0000000..c04ecae --- /dev/null +++ b/src/test/resources/mappings/sdc/sdc_find.json @@ -0,0 +1,244 @@ +{ + "request": { + "method": "GET", + "url": "/sdc/v1/catalog/services" + }, + "response": { + "status": 200, + "jsonBody": [{ + "uuid": "446afaf6-79b5-420e-aff8-7551b00bb510", + "invariantUUID": "7e4781e8-6c6e-41c5-b889-6a321d5f2490", + "name": "FreeRadius-service", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/446afaf6-79b5-420e-aff8-7551b00bb510/toscaModel", + "category": "Network L4+", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "35911438-4621-439b-a23d-3e07680c724b", + "invariantUUID": "ca2f0af5-95e4-4058-b037-5c0de0f80bfa", + "name": "vIMS", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/35911438-4621-439b-a23d-3e07680c724b/toscaModel", + "category": "E2E Service", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "8cdc744a-9327-47cc-a9de-67d8d46b816f", + "invariantUUID": "d2b9c343-c41a-4f85-ae36-c53cd4b7abcc", + "name": "vIMSservice3", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/8cdc744a-9327-47cc-a9de-67d8d46b816f/toscaModel", + "category": "VoIP Call Control", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "fcea1d5b-c8de-4355-8fda-64e0d84494e6", + "invariantUUID": "b58a118e-eeb9-4f6e-bdca-e292f84d17df", + "name": "vFW-service-2VF-based", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/fcea1d5b-c8de-4355-8fda-64e0d84494e6/toscaModel", + "category": "Network Service", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "9d356a71-ac7a-40f0-b2b2-b302c8b4ef63", + "invariantUUID": "4526a034-e4fc-4ea3-87d0-8b8fca4a93b1", + "name": "serviceFRDBS", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/9d356a71-ac7a-40f0-b2b2-b302c8b4ef63/toscaModel", + "category": "Network L4+", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "b821e80a-40a5-4fab-ac5d-3d49a54c4db3", + "invariantUUID": "9765d74e-c8f2-4982-bc90-548c854cbde6", + "name": "EricDebeau", + "version": "0.1", + "toscaModelURL": "/sdc/v1/catalog/services/b821e80a-40a5-4fab-ac5d-3d49a54c4db3/toscaModel", + "category": "Network L4+", + "lifecycleState": "NOT_CERTIFIED_CHECKIN", + "lastUpdaterUserId": "cs0008", + "distributionStatus": "DISTRIBUTION_NOT_APPROVED" + }, + { + "uuid": "cc3ec088-227c-49e2-b4c3-237214b88c84", + "invariantUUID": "e1685613-136b-4990-a590-d0651a640a68", + "name": "vMRFaaS4", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/cc3ec088-227c-49e2-b4c3-237214b88c84/toscaModel", + "category": "Network Service", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "10be4044-8217-4397-8b62-85c58688d4ba", + "invariantUUID": "a62a335f-a6e3-40dd-8b60-de8410301240", + "name": "OPL_FWtest1_service", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/10be4044-8217-4397-8b62-85c58688d4ba/toscaModel", + "category": "Network L4+", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "3dd3923d-1681-4f5b-99bb-f695ab147004", + "invariantUUID": "026e8046-4d3a-41d9-b4c2-6793186fd83d", + "name": "vFW", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/3dd3923d-1681-4f5b-99bb-f695ab147004/toscaModel", + "category": "Network Service", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "d15de0e3-d8fe-4cc3-a0b1-809ea95cbac8", + "invariantUUID": "6046d5f5-b39e-4306-a47e-0762c88d8b93", + "name": "1f298e99-082b-4a7f-a579", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/d15de0e3-d8fe-4cc3-a0b1-809ea95cbac8/toscaModel", + "category": "Network L1-3", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "f5ab9333-692f-42bc-b5dc-3ed753aa0d14", + "invariantUUID": "83a9f465-24d2-4dd3-98b8-328481cf9340", + "name": "c55011b0-f26c-43dd-9a62", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/f5ab9333-692f-42bc-b5dc-3ed753aa0d14/toscaModel", + "category": "Network L1-3", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "33826edf-fddd-4891-b726-8f16ea0e020c", + "invariantUUID": "0475334e-e141-42b3-b3ee-4df049c3cd53", + "name": "ccfc0cb4-bdff-4ae2-aa0e", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/33826edf-fddd-4891-b726-8f16ea0e020c/toscaModel", + "category": "Network L1-3", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "340bf137-8c6c-4d5b-b185-19364dfc74ed", + "invariantUUID": "7e4781e8-6c6e-41c5-b889-6a321d5f2490", + "name": "FreeRadius-service", + "version": "2.0", + "toscaModelURL": "/sdc/v1/catalog/services/340bf137-8c6c-4d5b-b185-19364dfc74ed/toscaModel", + "category": "Network L4+", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "d0cac11e-332f-47e8-86d8-cb0b82655bb9", + "invariantUUID": "ca2f0af5-95e4-4058-b037-5c0de0f80bfa", + "name": "vIMS", + "version": "2.0", + "toscaModelURL": "/sdc/v1/catalog/services/d0cac11e-332f-47e8-86d8-cb0b82655bb9/toscaModel", + "category": "E2E Service", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "e245a0a2-34fc-46c7-912c-bd39305275c1", + "invariantUUID": "29db0b2c-a877-45e8-8175-4ac526d87eee", + "name": "vMRFaaS", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/e245a0a2-34fc-46c7-912c-bd39305275c1/toscaModel", + "category": "Network L4+", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "b9e06990-99e2-480f-96ac-c6e50c83f2bb", + "invariantUUID": "008943ad-73be-4d57-9105-962c4cb16a71", + "name": "vMRFaas2", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/b9e06990-99e2-480f-96ac-c6e50c83f2bb/toscaModel", + "category": "Network L4+", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "98d95267-5e0f-4531-abf8-f14b90031dc5", + "invariantUUID": "709d157b-52fb-4250-976e-7133dff5c347", + "name": "NewFreeRadius-service", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/98d95267-5e0f-4531-abf8-f14b90031dc5/toscaModel", + "category": "Network L4+", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "d8d2429b-0863-462c-adc7-cd38d77331ed", + "invariantUUID": "e1685613-136b-4990-a590-d0651a640a68", + "name": "vMRFaaS4", + "version": "1.1", + "toscaModelURL": "/sdc/v1/catalog/services/d8d2429b-0863-462c-adc7-cd38d77331ed/toscaModel", + "category": "Network Service", + "lifecycleState": "NOT_CERTIFIED_CHECKOUT", + "lastUpdaterUserId": "cs0008", + "distributionStatus": "DISTRIBUTION_NOT_APPROVED" + }, + { + "uuid": "9cfc73ad-795d-42ad-8a4f-54e6b3f33ef9", + "invariantUUID": "79f0574e-caf8-4bac-8189-909b2127e9e9", + "name": "vMRFaaS3", + "version": "1.0", + "toscaModelURL": "/sdc/v1/catalog/services/9cfc73ad-795d-42ad-8a4f-54e6b3f33ef9/toscaModel", + "category": "Network Service", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "af1ac9db-9d8b-4ca0-964c-58755826b59a", + "invariantUUID": "d2b9c343-c41a-4f85-ae36-c53cd4b7abcc", + "name": "vIMSservice3", + "version": "2.0", + "toscaModelURL": "/sdc/v1/catalog/services/af1ac9db-9d8b-4ca0-964c-58755826b59a/toscaModel", + "category": "VoIP Call Control", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + }, + { + "uuid": "1e3feeb0-8e36-46c6-862c-236d9c626439", + "invariantUUID": "b58a118e-eeb9-4f6e-bdca-e292f84d17df", + "name": "vFW-service-2VF-based", + "version": "2.0", + "toscaModelURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/toscaModel", + "category": "Network Service", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED" + } + ], + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/sdc/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439.json b/src/test/resources/mappings/sdc/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439.json new file mode 100644 index 0000000..4956be7 --- /dev/null +++ b/src/test/resources/mappings/sdc/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439.json @@ -0,0 +1,213 @@ +{ + "request": { + "method": "GET", + "url": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/metadata" + }, + "response": { + "status": 200, + "jsonBody": { + "uuid": "1e3feeb0-8e36-46c6-862c-236d9c626439", + "invariantUUID": "b58a118e-eeb9-4f6e-bdca-e292f84d17df", + "name": "vFW", + "version": "2.0", + "toscaModelURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/toscaModel", + "category": "Network Service", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED", + "lastUpdaterFullName": "Joni Mitchell", + "resources": [{ + "resourceInstanceName": "vFW-vSINK 0", + "resourceName": "vFW-vSINK", + "resourceInvariantUUID": "18b90934-aa82-456f-938e-e74a07a426f3", + "resourceVersion": "2.0", + "resoucreType": "VF", + "resourceUUID": "89a6b4c5-3973-4c19-b651-fae3713ca8d5", + "artifacts": [{ + "artifactName": "vf-license-model.xml", + "artifactType": "VF_LICENSE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/f6fa3f94-f5cd-4233-a7b2-b5e8dc2e1ec6", + "artifactDescription": "VF license file", + "artifactChecksum": "NDQ2NzIxNzgyMjZhNTc1NDNlMWU0ODI1ZmIyNjc3Zjg=", + "artifactUUID": "f6fa3f94-f5cd-4233-a7b2-b5e8dc2e1ec6", + "artifactVersion": "1", + "artifactLabel": "vflicense", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "vfwvsink0_modules.json", + "artifactType": "VF_MODULES_METADATA", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/d0aaecf9-6ffb-4b4b-81fd-c59c1e8e6fb6", + "artifactDescription": "Auto-generated VF Modules information artifact", + "artifactChecksum": "ZGIyOWY3YzE0MTM2MjlhMjY1ZjkzNDg3YjE2ZmQxY2Y=", + "artifactUUID": "d0aaecf9-6ffb-4b4b-81fd-c59c1e8e6fb6", + "artifactVersion": "1", + "artifactLabel": "vfModulesMetadata", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "base_vfw.yaml", + "artifactType": "HEAT", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/c94e8eec-b1a7-431c-ab6f-2fda5f0ee920", + "artifactDescription": "created from csar", + "artifactTimeout": 60, + "artifactChecksum": "YTY0MDg5ODUwZDE4YzQyYWI0NjE5Y2NjYmM3ZDg5ZGE=", + "artifactUUID": "c94e8eec-b1a7-431c-ab6f-2fda5f0ee920", + "artifactVersion": "4", + "artifactLabel": "heat1", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "vendor-license-model.xml", + "artifactType": "VENDOR_LICENSE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/423d2c66-6c3a-4257-9342-7b57ebf9dd54", + "artifactDescription": " Vendor license file", + "artifactChecksum": "YTNhYTc3ZGE4ZWViMmYzOThkOGQ3ZTVjZGNmNmU0ZmQ=", + "artifactUUID": "423d2c66-6c3a-4257-9342-7b57ebf9dd54", + "artifactVersion": "1", + "artifactLabel": "vendorlicense", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "base_vfw.env", + "artifactType": "HEAT_ENV", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/a1a58cc9-8225-4b6f-b81a-02fa3c7fb6ec", + "artifactDescription": "Auto-generated HEAT Environment deployment artifact", + "artifactChecksum": "ZmVkM2MwODhlZjcwNWY5MDk5ZGEyMjI5ZTAyYWRjNjY=", + "artifactUUID": "a1a58cc9-8225-4b6f-b81a-02fa3c7fb6ec", + "artifactVersion": "2", + "generatedFromUUID": "32591489-33c9-4461-a47c-7c463250788d.heat1", + "artifactLabel": "heat1env", + "artifactGroupType": "DEPLOYMENT" + } + ] + }, + { + "resourceInstanceName": "vPkG 0", + "resourceName": "vPkG", + "resourceInvariantUUID": "8d8a20c0-746c-4d5e-a1a2-fa49fa5786ad", + "resourceVersion": "2.0", + "resoucreType": "VF", + "resourceUUID": "31961e27-2a2c-4beb-87c9-bfe0067088f5", + "artifacts": [{ + "artifactName": "vf-license-model.xml", + "artifactType": "VF_LICENSE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/7af6cc3b-2ba3-4164-9d7d-65b3b46a71f4", + "artifactDescription": "VF license file", + "artifactChecksum": "MWM5NDlmNjdhZTdmZTA5MzIzY2RhYjcxZmFkYzQyZDM=", + "artifactUUID": "7af6cc3b-2ba3-4164-9d7d-65b3b46a71f4", + "artifactVersion": "1", + "artifactLabel": "vflicense", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "vpkg0_modules.json", + "artifactType": "VF_MODULES_METADATA", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/37b16173-bd54-447f-a5a2-1a5e24db8afb", + "artifactDescription": "Auto-generated VF Modules information artifact", + "artifactChecksum": "ZDA3MWQ3MTE3MTA1MzNkY2M1ODQ4YTUxN2YwMDk0MmM=", + "artifactUUID": "37b16173-bd54-447f-a5a2-1a5e24db8afb", + "artifactVersion": "1", + "artifactLabel": "vfModulesMetadata", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "base_vpkg.yaml", + "artifactType": "HEAT", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/43184998-c107-40a7-92f6-00ba74de8539", + "artifactDescription": "created from csar", + "artifactTimeout": 60, + "artifactChecksum": "NDZhY2U0YTExZjllNTFmZjc4ZTE4YzU2Zjk1ZDc2MWI=", + "artifactUUID": "43184998-c107-40a7-92f6-00ba74de8539", + "artifactVersion": "4", + "artifactLabel": "heat1", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "vendor-license-model.xml", + "artifactType": "VENDOR_LICENSE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/6cd5f968-20aa-4b86-9a50-97db5e4ca806", + "artifactDescription": " Vendor license file", + "artifactChecksum": "YTNhYTc3ZGE4ZWViMmYzOThkOGQ3ZTVjZGNmNmU0ZmQ=", + "artifactUUID": "6cd5f968-20aa-4b86-9a50-97db5e4ca806", + "artifactVersion": "1", + "artifactLabel": "vendorlicense", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "base_vpkg.env", + "artifactType": "HEAT_ENV", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/60944038-d382-4aa6-b387-7b87c9c9df19", + "artifactDescription": "Auto-generated HEAT Environment deployment artifact", + "artifactChecksum": "OGU0OGFlZTFiZDdhYmQ0MmM0MjAyY2U5YjljYWViYTA=", + "artifactUUID": "60944038-d382-4aa6-b387-7b87c9c9df19", + "artifactVersion": "2", + "generatedFromUUID": "0d3918df-ea14-4fc3-a5c9-34032eaae573.heat1", + "artifactLabel": "heat1env", + "artifactGroupType": "DEPLOYMENT" + } + ] + } + ], + "artifacts": [{ + "artifactName": "AAI-vFW-service-2VF-based-service-2.0.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/2e6cd967-93c2-4f53-82bd-c56ab98e8df7", + "artifactDescription": "AAI Service Model", + "artifactChecksum": "ZTY5ZTJmYTY4YzE2NGUxMTQxNWNkN2QzMmI4MWIzNDU=", + "artifactUUID": "2e6cd967-93c2-4f53-82bd-c56ab98e8df7", + "artifactVersion": "1", + "artifactLabel": "aaiservice1603481860", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "AAI-Vpkg..base_vpkg..module-0-resource-2.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/ad600a09-edde-4356-bb0a-9e638a671d06", + "artifactDescription": "AAI Resource Model", + "artifactChecksum": "MzQyMjczOGVmYzM1OWQ1NmFhZjBhOWUxM2JjMmYxZTQ=", + "artifactUUID": "ad600a09-edde-4356-bb0a-9e638a671d06", + "artifactVersion": "1", + "artifactLabel": "aairesource529289386", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "AAI-vFW-vSINK-resource-2.0.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/413a631e-69c4-453b-ab68-fac09b390259", + "artifactDescription": "AAI Resource Model", + "artifactChecksum": "ZWRmMzQzYzc0MThlYjQ1YjY2ZTFkYzJmMjAyNzQ1YWU=", + "artifactUUID": "413a631e-69c4-453b-ab68-fac09b390259", + "artifactVersion": "1", + "artifactLabel": "aairesource1461475898", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "AAI-vPkG-resource-2.0.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/aee30754-eec4-4820-ae3a-790b80b76e81", + "artifactDescription": "AAI Resource Model", + "artifactChecksum": "OGQ4ZTdhYjkyZDRkYmFiZTBhNWU4MDc4YTM2YjY1NmI=", + "artifactUUID": "aee30754-eec4-4820-ae3a-790b80b76e81", + "artifactVersion": "1", + "artifactLabel": "aairesource936479495", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "AAI-VfwVsink..base_vfw..module-0-resource-2.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/ac9a3bbf-a052-4176-abff-fe2d2741194a", + "artifactDescription": "AAI Resource Model", + "artifactChecksum": "OWIzNjVhNmI2ZWYyZThlMjk1NjA2MDFhZTU3MGQ0ZDU=", + "artifactUUID": "ac9a3bbf-a052-4176-abff-fe2d2741194a", + "artifactVersion": "1", + "artifactLabel": "aairesource1106409880", + "artifactGroupType": "DEPLOYMENT" + } + ] + }, + "headers": { + "Content-Type": "application/json" + } + } +} \ No newline at end of file diff --git a/src/test/resources/mappings/sdc/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_tosca.json b/src/test/resources/mappings/sdc/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_tosca.json new file mode 100644 index 0000000..ebf72bb --- /dev/null +++ b/src/test/resources/mappings/sdc/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_tosca.json @@ -0,0 +1,10 @@ +{ + "request": { + "method": "GET", + "url": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/toscaModel" + }, + "response": { + "status": 200, + "bodyFileName": "response" + } +} \ No newline at end of file diff --git a/src/test/resources/mappings/sdc/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_withoutTosca.json b/src/test/resources/mappings/sdc/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_withoutTosca.json new file mode 100644 index 0000000..35554f0 --- /dev/null +++ b/src/test/resources/mappings/sdc/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_withoutTosca.json @@ -0,0 +1,213 @@ +{ + "request": { + "method": "GET", + "url": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439_withoutTosca/metadata" + }, + "response": { + "status": 200, + "jsonBody": { + "uuid": "1e3feeb0-8e36-46c6-862c-236d9c626439", + "invariantUUID": "b58a118e-eeb9-4f6e-bdca-e292f84d17df", + "name": "vFW", + "version": "2.0", + "toscaModelURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439toto/toscaModel", + "category": "Network Service", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED", + "lastUpdaterFullName": "Joni Mitchell", + "resources": [{ + "resourceInstanceName": "vFW-vSINK 0", + "resourceName": "vFW-vSINK", + "resourceInvariantUUID": "18b90934-aa82-456f-938e-e74a07a426f3", + "resourceVersion": "2.0", + "resoucreType": "VF", + "resourceUUID": "89a6b4c5-3973-4c19-b651-fae3713ca8d5", + "artifacts": [{ + "artifactName": "vf-license-model.xml", + "artifactType": "VF_LICENSE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/f6fa3f94-f5cd-4233-a7b2-b5e8dc2e1ec6", + "artifactDescription": "VF license file", + "artifactChecksum": "NDQ2NzIxNzgyMjZhNTc1NDNlMWU0ODI1ZmIyNjc3Zjg=", + "artifactUUID": "f6fa3f94-f5cd-4233-a7b2-b5e8dc2e1ec6", + "artifactVersion": "1", + "artifactLabel": "vflicense", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "vfwvsink0_modules.json", + "artifactType": "VF_MODULES_METADATA", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/d0aaecf9-6ffb-4b4b-81fd-c59c1e8e6fb6", + "artifactDescription": "Auto-generated VF Modules information artifact", + "artifactChecksum": "ZGIyOWY3YzE0MTM2MjlhMjY1ZjkzNDg3YjE2ZmQxY2Y=", + "artifactUUID": "d0aaecf9-6ffb-4b4b-81fd-c59c1e8e6fb6", + "artifactVersion": "1", + "artifactLabel": "vfModulesMetadata", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "base_vfw.yaml", + "artifactType": "HEAT", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/c94e8eec-b1a7-431c-ab6f-2fda5f0ee920", + "artifactDescription": "created from csar", + "artifactTimeout": 60, + "artifactChecksum": "YTY0MDg5ODUwZDE4YzQyYWI0NjE5Y2NjYmM3ZDg5ZGE=", + "artifactUUID": "c94e8eec-b1a7-431c-ab6f-2fda5f0ee920", + "artifactVersion": "4", + "artifactLabel": "heat1", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "vendor-license-model.xml", + "artifactType": "VENDOR_LICENSE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/423d2c66-6c3a-4257-9342-7b57ebf9dd54", + "artifactDescription": " Vendor license file", + "artifactChecksum": "YTNhYTc3ZGE4ZWViMmYzOThkOGQ3ZTVjZGNmNmU0ZmQ=", + "artifactUUID": "423d2c66-6c3a-4257-9342-7b57ebf9dd54", + "artifactVersion": "1", + "artifactLabel": "vendorlicense", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "base_vfw.env", + "artifactType": "HEAT_ENV", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/a1a58cc9-8225-4b6f-b81a-02fa3c7fb6ec", + "artifactDescription": "Auto-generated HEAT Environment deployment artifact", + "artifactChecksum": "ZmVkM2MwODhlZjcwNWY5MDk5ZGEyMjI5ZTAyYWRjNjY=", + "artifactUUID": "a1a58cc9-8225-4b6f-b81a-02fa3c7fb6ec", + "artifactVersion": "2", + "generatedFromUUID": "32591489-33c9-4461-a47c-7c463250788d.heat1", + "artifactLabel": "heat1env", + "artifactGroupType": "DEPLOYMENT" + } + ] + }, + { + "resourceInstanceName": "vPkG 0", + "resourceName": "vPkG", + "resourceInvariantUUID": "8d8a20c0-746c-4d5e-a1a2-fa49fa5786ad", + "resourceVersion": "2.0", + "resoucreType": "VF", + "resourceUUID": "31961e27-2a2c-4beb-87c9-bfe0067088f5", + "artifacts": [{ + "artifactName": "vf-license-model.xml", + "artifactType": "VF_LICENSE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/7af6cc3b-2ba3-4164-9d7d-65b3b46a71f4", + "artifactDescription": "VF license file", + "artifactChecksum": "MWM5NDlmNjdhZTdmZTA5MzIzY2RhYjcxZmFkYzQyZDM=", + "artifactUUID": "7af6cc3b-2ba3-4164-9d7d-65b3b46a71f4", + "artifactVersion": "1", + "artifactLabel": "vflicense", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "vpkg0_modules.json", + "artifactType": "VF_MODULES_METADATA", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/37b16173-bd54-447f-a5a2-1a5e24db8afb", + "artifactDescription": "Auto-generated VF Modules information artifact", + "artifactChecksum": "ZDA3MWQ3MTE3MTA1MzNkY2M1ODQ4YTUxN2YwMDk0MmM=", + "artifactUUID": "37b16173-bd54-447f-a5a2-1a5e24db8afb", + "artifactVersion": "1", + "artifactLabel": "vfModulesMetadata", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "base_vpkg.yaml", + "artifactType": "HEAT", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/43184998-c107-40a7-92f6-00ba74de8539", + "artifactDescription": "created from csar", + "artifactTimeout": 60, + "artifactChecksum": "NDZhY2U0YTExZjllNTFmZjc4ZTE4YzU2Zjk1ZDc2MWI=", + "artifactUUID": "43184998-c107-40a7-92f6-00ba74de8539", + "artifactVersion": "4", + "artifactLabel": "heat1", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "vendor-license-model.xml", + "artifactType": "VENDOR_LICENSE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/6cd5f968-20aa-4b86-9a50-97db5e4ca806", + "artifactDescription": " Vendor license file", + "artifactChecksum": "YTNhYTc3ZGE4ZWViMmYzOThkOGQ3ZTVjZGNmNmU0ZmQ=", + "artifactUUID": "6cd5f968-20aa-4b86-9a50-97db5e4ca806", + "artifactVersion": "1", + "artifactLabel": "vendorlicense", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "base_vpkg.env", + "artifactType": "HEAT_ENV", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/60944038-d382-4aa6-b387-7b87c9c9df19", + "artifactDescription": "Auto-generated HEAT Environment deployment artifact", + "artifactChecksum": "OGU0OGFlZTFiZDdhYmQ0MmM0MjAyY2U5YjljYWViYTA=", + "artifactUUID": "60944038-d382-4aa6-b387-7b87c9c9df19", + "artifactVersion": "2", + "generatedFromUUID": "0d3918df-ea14-4fc3-a5c9-34032eaae573.heat1", + "artifactLabel": "heat1env", + "artifactGroupType": "DEPLOYMENT" + } + ] + } + ], + "artifacts": [{ + "artifactName": "AAI-vFW-service-2VF-based-service-2.0.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/2e6cd967-93c2-4f53-82bd-c56ab98e8df7", + "artifactDescription": "AAI Service Model", + "artifactChecksum": "ZTY5ZTJmYTY4YzE2NGUxMTQxNWNkN2QzMmI4MWIzNDU=", + "artifactUUID": "2e6cd967-93c2-4f53-82bd-c56ab98e8df7", + "artifactVersion": "1", + "artifactLabel": "aaiservice1603481860", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "AAI-Vpkg..base_vpkg..module-0-resource-2.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/ad600a09-edde-4356-bb0a-9e638a671d06", + "artifactDescription": "AAI Resource Model", + "artifactChecksum": "MzQyMjczOGVmYzM1OWQ1NmFhZjBhOWUxM2JjMmYxZTQ=", + "artifactUUID": "ad600a09-edde-4356-bb0a-9e638a671d06", + "artifactVersion": "1", + "artifactLabel": "aairesource529289386", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "AAI-vFW-vSINK-resource-2.0.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/413a631e-69c4-453b-ab68-fac09b390259", + "artifactDescription": "AAI Resource Model", + "artifactChecksum": "ZWRmMzQzYzc0MThlYjQ1YjY2ZTFkYzJmMjAyNzQ1YWU=", + "artifactUUID": "413a631e-69c4-453b-ab68-fac09b390259", + "artifactVersion": "1", + "artifactLabel": "aairesource1461475898", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "AAI-vPkG-resource-2.0.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/aee30754-eec4-4820-ae3a-790b80b76e81", + "artifactDescription": "AAI Resource Model", + "artifactChecksum": "OGQ4ZTdhYjkyZDRkYmFiZTBhNWU4MDc4YTM2YjY1NmI=", + "artifactUUID": "aee30754-eec4-4820-ae3a-790b80b76e81", + "artifactVersion": "1", + "artifactLabel": "aairesource936479495", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "AAI-VfwVsink..base_vfw..module-0-resource-2.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/ac9a3bbf-a052-4176-abff-fe2d2741194a", + "artifactDescription": "AAI Resource Model", + "artifactChecksum": "OWIzNjVhNmI2ZWYyZThlMjk1NjA2MDFhZTU3MGQ0ZDU=", + "artifactUUID": "ac9a3bbf-a052-4176-abff-fe2d2741194a", + "artifactVersion": "1", + "artifactLabel": "aairesource1106409880", + "artifactGroupType": "DEPLOYMENT" + } + ] + }, + "headers": { + "Content-Type": "application/json" + } + } +} \ No newline at end of file diff --git a/src/test/resources/mappings/sdc/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_toscafile.json b/src/test/resources/mappings/sdc/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_toscafile.json new file mode 100644 index 0000000..9886df7 --- /dev/null +++ b/src/test/resources/mappings/sdc/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_toscafile.json @@ -0,0 +1,10 @@ +{ + "request": { + "method": "GET", + "url": "/sdc/v1/catalog/services/462f84e5-f0e5-44c5-ab95-38fb4bf77064/toscaModel" + }, + "response": { + "status": 200, + "bodyFileName": "toscafile/service-Sdwanvpninfraservice-csar.csar" + } +} diff --git a/src/test/resources/mappings/sdc/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_withTosca.json b/src/test/resources/mappings/sdc/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_withTosca.json new file mode 100644 index 0000000..848b725 --- /dev/null +++ b/src/test/resources/mappings/sdc/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_withTosca.json @@ -0,0 +1,213 @@ +{ + "request": { + "method": "GET", + "url": "/sdc/v1/catalog/services/462f84e5-f0e5-44c5-ab95-38fb4bf77064/metadata" + }, + "response": { + "status": 200, + "jsonBody": { + "uuid": "462f84e5-f0e5-44c5-ab95-38fb4bf77064", + "invariantUUID": "b58a118e-eeb9-4f6e-bdca-e292f84d17df", + "name": "vFW", + "version": "2.0", + "toscaModelURL": "/sdc/v1/catalog/services/462f84e5-f0e5-44c5-ab95-38fb4bf77064/toscaModel", + "category": "Network Service", + "lifecycleState": "CERTIFIED", + "lastUpdaterUserId": "jm0007", + "distributionStatus": "DISTRIBUTED", + "lastUpdaterFullName": "Joni Mitchell", + "resources": [{ + "resourceInstanceName": "vFW-vSINK 0", + "resourceName": "vFW-vSINK", + "resourceInvariantUUID": "18b90934-aa82-456f-938e-e74a07a426f3", + "resourceVersion": "2.0", + "resoucreType": "VF", + "resourceUUID": "89a6b4c5-3973-4c19-b651-fae3713ca8d5", + "artifacts": [{ + "artifactName": "vf-license-model.xml", + "artifactType": "VF_LICENSE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/f6fa3f94-f5cd-4233-a7b2-b5e8dc2e1ec6", + "artifactDescription": "VF license file", + "artifactChecksum": "NDQ2NzIxNzgyMjZhNTc1NDNlMWU0ODI1ZmIyNjc3Zjg=", + "artifactUUID": "f6fa3f94-f5cd-4233-a7b2-b5e8dc2e1ec6", + "artifactVersion": "1", + "artifactLabel": "vflicense", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "vfwvsink0_modules.json", + "artifactType": "VF_MODULES_METADATA", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/d0aaecf9-6ffb-4b4b-81fd-c59c1e8e6fb6", + "artifactDescription": "Auto-generated VF Modules information artifact", + "artifactChecksum": "ZGIyOWY3YzE0MTM2MjlhMjY1ZjkzNDg3YjE2ZmQxY2Y=", + "artifactUUID": "d0aaecf9-6ffb-4b4b-81fd-c59c1e8e6fb6", + "artifactVersion": "1", + "artifactLabel": "vfModulesMetadata", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "base_vfw.yaml", + "artifactType": "HEAT", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/c94e8eec-b1a7-431c-ab6f-2fda5f0ee920", + "artifactDescription": "created from csar", + "artifactTimeout": 60, + "artifactChecksum": "YTY0MDg5ODUwZDE4YzQyYWI0NjE5Y2NjYmM3ZDg5ZGE=", + "artifactUUID": "c94e8eec-b1a7-431c-ab6f-2fda5f0ee920", + "artifactVersion": "4", + "artifactLabel": "heat1", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "vendor-license-model.xml", + "artifactType": "VENDOR_LICENSE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/423d2c66-6c3a-4257-9342-7b57ebf9dd54", + "artifactDescription": " Vendor license file", + "artifactChecksum": "YTNhYTc3ZGE4ZWViMmYzOThkOGQ3ZTVjZGNmNmU0ZmQ=", + "artifactUUID": "423d2c66-6c3a-4257-9342-7b57ebf9dd54", + "artifactVersion": "1", + "artifactLabel": "vendorlicense", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "base_vfw.env", + "artifactType": "HEAT_ENV", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/a1a58cc9-8225-4b6f-b81a-02fa3c7fb6ec", + "artifactDescription": "Auto-generated HEAT Environment deployment artifact", + "artifactChecksum": "ZmVkM2MwODhlZjcwNWY5MDk5ZGEyMjI5ZTAyYWRjNjY=", + "artifactUUID": "a1a58cc9-8225-4b6f-b81a-02fa3c7fb6ec", + "artifactVersion": "2", + "generatedFromUUID": "32591489-33c9-4461-a47c-7c463250788d.heat1", + "artifactLabel": "heat1env", + "artifactGroupType": "DEPLOYMENT" + } + ] + }, + { + "resourceInstanceName": "vPkG 0", + "resourceName": "vPkG", + "resourceInvariantUUID": "8d8a20c0-746c-4d5e-a1a2-fa49fa5786ad", + "resourceVersion": "2.0", + "resoucreType": "VF", + "resourceUUID": "31961e27-2a2c-4beb-87c9-bfe0067088f5", + "artifacts": [{ + "artifactName": "vf-license-model.xml", + "artifactType": "VF_LICENSE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/7af6cc3b-2ba3-4164-9d7d-65b3b46a71f4", + "artifactDescription": "VF license file", + "artifactChecksum": "MWM5NDlmNjdhZTdmZTA5MzIzY2RhYjcxZmFkYzQyZDM=", + "artifactUUID": "7af6cc3b-2ba3-4164-9d7d-65b3b46a71f4", + "artifactVersion": "1", + "artifactLabel": "vflicense", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "vpkg0_modules.json", + "artifactType": "VF_MODULES_METADATA", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/37b16173-bd54-447f-a5a2-1a5e24db8afb", + "artifactDescription": "Auto-generated VF Modules information artifact", + "artifactChecksum": "ZDA3MWQ3MTE3MTA1MzNkY2M1ODQ4YTUxN2YwMDk0MmM=", + "artifactUUID": "37b16173-bd54-447f-a5a2-1a5e24db8afb", + "artifactVersion": "1", + "artifactLabel": "vfModulesMetadata", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "base_vpkg.yaml", + "artifactType": "HEAT", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/43184998-c107-40a7-92f6-00ba74de8539", + "artifactDescription": "created from csar", + "artifactTimeout": 60, + "artifactChecksum": "NDZhY2U0YTExZjllNTFmZjc4ZTE4YzU2Zjk1ZDc2MWI=", + "artifactUUID": "43184998-c107-40a7-92f6-00ba74de8539", + "artifactVersion": "4", + "artifactLabel": "heat1", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "vendor-license-model.xml", + "artifactType": "VENDOR_LICENSE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/6cd5f968-20aa-4b86-9a50-97db5e4ca806", + "artifactDescription": " Vendor license file", + "artifactChecksum": "YTNhYTc3ZGE4ZWViMmYzOThkOGQ3ZTVjZGNmNmU0ZmQ=", + "artifactUUID": "6cd5f968-20aa-4b86-9a50-97db5e4ca806", + "artifactVersion": "1", + "artifactLabel": "vendorlicense", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "base_vpkg.env", + "artifactType": "HEAT_ENV", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/60944038-d382-4aa6-b387-7b87c9c9df19", + "artifactDescription": "Auto-generated HEAT Environment deployment artifact", + "artifactChecksum": "OGU0OGFlZTFiZDdhYmQ0MmM0MjAyY2U5YjljYWViYTA=", + "artifactUUID": "60944038-d382-4aa6-b387-7b87c9c9df19", + "artifactVersion": "2", + "generatedFromUUID": "0d3918df-ea14-4fc3-a5c9-34032eaae573.heat1", + "artifactLabel": "heat1env", + "artifactGroupType": "DEPLOYMENT" + } + ] + } + ], + "artifacts": [{ + "artifactName": "AAI-vFW-service-2VF-based-service-2.0.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/2e6cd967-93c2-4f53-82bd-c56ab98e8df7", + "artifactDescription": "AAI Service Model", + "artifactChecksum": "ZTY5ZTJmYTY4YzE2NGUxMTQxNWNkN2QzMmI4MWIzNDU=", + "artifactUUID": "2e6cd967-93c2-4f53-82bd-c56ab98e8df7", + "artifactVersion": "1", + "artifactLabel": "aaiservice1603481860", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "AAI-Vpkg..base_vpkg..module-0-resource-2.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/ad600a09-edde-4356-bb0a-9e638a671d06", + "artifactDescription": "AAI Resource Model", + "artifactChecksum": "MzQyMjczOGVmYzM1OWQ1NmFhZjBhOWUxM2JjMmYxZTQ=", + "artifactUUID": "ad600a09-edde-4356-bb0a-9e638a671d06", + "artifactVersion": "1", + "artifactLabel": "aairesource529289386", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "AAI-vFW-vSINK-resource-2.0.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/413a631e-69c4-453b-ab68-fac09b390259", + "artifactDescription": "AAI Resource Model", + "artifactChecksum": "ZWRmMzQzYzc0MThlYjQ1YjY2ZTFkYzJmMjAyNzQ1YWU=", + "artifactUUID": "413a631e-69c4-453b-ab68-fac09b390259", + "artifactVersion": "1", + "artifactLabel": "aairesource1461475898", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "AAI-vPkG-resource-2.0.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/aee30754-eec4-4820-ae3a-790b80b76e81", + "artifactDescription": "AAI Resource Model", + "artifactChecksum": "OGQ4ZTdhYjkyZDRkYmFiZTBhNWU4MDc4YTM2YjY1NmI=", + "artifactUUID": "aee30754-eec4-4820-ae3a-790b80b76e81", + "artifactVersion": "1", + "artifactLabel": "aairesource936479495", + "artifactGroupType": "DEPLOYMENT" + }, + { + "artifactName": "AAI-VfwVsink..base_vfw..module-0-resource-2.xml", + "artifactType": "MODEL_INVENTORY_PROFILE", + "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/ac9a3bbf-a052-4176-abff-fe2d2741194a", + "artifactDescription": "AAI Resource Model", + "artifactChecksum": "OWIzNjVhNmI2ZWYyZThlMjk1NjA2MDFhZTU3MGQ0ZDU=", + "artifactUUID": "ac9a3bbf-a052-4176-abff-fe2d2741194a", + "artifactVersion": "1", + "artifactLabel": "aairesource1106409880", + "artifactGroupType": "DEPLOYMENT" + } + ] + }, + "headers": { + "Content-Type": "application/json" + } + } +} diff --git a/src/test/resources/mappings/sdc/sdc_get_artifactTypes.json b/src/test/resources/mappings/sdc/sdc_get_artifactTypes.json new file mode 100644 index 0000000..2c7f635 --- /dev/null +++ b/src/test/resources/mappings/sdc/sdc_get_artifactTypes.json @@ -0,0 +1,68 @@ +{ + "request": { + "method": "GET", + "url": "/sdc/v1/artifactTypes" + }, + "response": { + "status": 200, + "jsonBody": +[ + "CHEF", + "PUPPET", + "YANG", + "SHELL_SCRIPT", + "SHELL", + "ICON", + "UNKNOWN", + "HEAT", + "DG_XML", + "MURANO_PKG", + "HEAT_ENV", + "YANG_XML", + "HEAT_VOL", + "HEAT_NET", + "OTHER", + "WORKFLOW", + "NETWORK_CALL_FLOW", + "TOSCA_TEMPLATE", + "TOSCA_CSAR", + "VNF_CATALOG", + "VF_LICENSE", + "BPEL", + "VENDOR_LICENSE", + "MODEL_INVENTORY_PROFILE", + "MODEL_QUERY_SPEC", + "APPC_CONFIG", + "HEAT_NESTED", + "HEAT_ARTIFACT", + "VF_MODULES_METADATA", + "LIFECYCLE_OPERATIONS", + "VES_EVENTS", + "PERFORMANCE_COUNTER", + "UCPE_LAYER_2_CONFIGURATION", + "DCAE_TOSCA", + "DCAE_JSON", + "DCAE_POLICY", + "DCAE_DOC", + "DCAE_EVENT", + "DCAE_INVENTORY_TOSCA", + "DCAE_INVENTORY_JSON", + "DCAE_INVENTORY_POLICY", + "DCAE_INVENTORY_DOC", + "DCAE_INVENTORY_BLUEPRINT", + "DCAE_INVENTORY_EVENT", + "AAI_SERVICE_MODEL", + "AAI_VF_MODEL", + "AAI_VF_MODULE_MODEL", + "AAI_VF_INSTANCE_MODEL", + "SNMP_POLL", + "SNMP_TRAP", + "GUIDE", + "PLAN" +] + , + "headers": { + "Content-Type": "application/json" + } + } +} \ No newline at end of file diff --git a/src/test/resources/mappings/sdc_find.json b/src/test/resources/mappings/sdc_find.json deleted file mode 100644 index c04ecae..0000000 --- a/src/test/resources/mappings/sdc_find.json +++ /dev/null @@ -1,244 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/sdc/v1/catalog/services" - }, - "response": { - "status": 200, - "jsonBody": [{ - "uuid": "446afaf6-79b5-420e-aff8-7551b00bb510", - "invariantUUID": "7e4781e8-6c6e-41c5-b889-6a321d5f2490", - "name": "FreeRadius-service", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/446afaf6-79b5-420e-aff8-7551b00bb510/toscaModel", - "category": "Network L4+", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "35911438-4621-439b-a23d-3e07680c724b", - "invariantUUID": "ca2f0af5-95e4-4058-b037-5c0de0f80bfa", - "name": "vIMS", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/35911438-4621-439b-a23d-3e07680c724b/toscaModel", - "category": "E2E Service", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "8cdc744a-9327-47cc-a9de-67d8d46b816f", - "invariantUUID": "d2b9c343-c41a-4f85-ae36-c53cd4b7abcc", - "name": "vIMSservice3", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/8cdc744a-9327-47cc-a9de-67d8d46b816f/toscaModel", - "category": "VoIP Call Control", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "fcea1d5b-c8de-4355-8fda-64e0d84494e6", - "invariantUUID": "b58a118e-eeb9-4f6e-bdca-e292f84d17df", - "name": "vFW-service-2VF-based", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/fcea1d5b-c8de-4355-8fda-64e0d84494e6/toscaModel", - "category": "Network Service", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "9d356a71-ac7a-40f0-b2b2-b302c8b4ef63", - "invariantUUID": "4526a034-e4fc-4ea3-87d0-8b8fca4a93b1", - "name": "serviceFRDBS", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/9d356a71-ac7a-40f0-b2b2-b302c8b4ef63/toscaModel", - "category": "Network L4+", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "b821e80a-40a5-4fab-ac5d-3d49a54c4db3", - "invariantUUID": "9765d74e-c8f2-4982-bc90-548c854cbde6", - "name": "EricDebeau", - "version": "0.1", - "toscaModelURL": "/sdc/v1/catalog/services/b821e80a-40a5-4fab-ac5d-3d49a54c4db3/toscaModel", - "category": "Network L4+", - "lifecycleState": "NOT_CERTIFIED_CHECKIN", - "lastUpdaterUserId": "cs0008", - "distributionStatus": "DISTRIBUTION_NOT_APPROVED" - }, - { - "uuid": "cc3ec088-227c-49e2-b4c3-237214b88c84", - "invariantUUID": "e1685613-136b-4990-a590-d0651a640a68", - "name": "vMRFaaS4", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/cc3ec088-227c-49e2-b4c3-237214b88c84/toscaModel", - "category": "Network Service", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "10be4044-8217-4397-8b62-85c58688d4ba", - "invariantUUID": "a62a335f-a6e3-40dd-8b60-de8410301240", - "name": "OPL_FWtest1_service", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/10be4044-8217-4397-8b62-85c58688d4ba/toscaModel", - "category": "Network L4+", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "3dd3923d-1681-4f5b-99bb-f695ab147004", - "invariantUUID": "026e8046-4d3a-41d9-b4c2-6793186fd83d", - "name": "vFW", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/3dd3923d-1681-4f5b-99bb-f695ab147004/toscaModel", - "category": "Network Service", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "d15de0e3-d8fe-4cc3-a0b1-809ea95cbac8", - "invariantUUID": "6046d5f5-b39e-4306-a47e-0762c88d8b93", - "name": "1f298e99-082b-4a7f-a579", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/d15de0e3-d8fe-4cc3-a0b1-809ea95cbac8/toscaModel", - "category": "Network L1-3", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "f5ab9333-692f-42bc-b5dc-3ed753aa0d14", - "invariantUUID": "83a9f465-24d2-4dd3-98b8-328481cf9340", - "name": "c55011b0-f26c-43dd-9a62", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/f5ab9333-692f-42bc-b5dc-3ed753aa0d14/toscaModel", - "category": "Network L1-3", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "33826edf-fddd-4891-b726-8f16ea0e020c", - "invariantUUID": "0475334e-e141-42b3-b3ee-4df049c3cd53", - "name": "ccfc0cb4-bdff-4ae2-aa0e", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/33826edf-fddd-4891-b726-8f16ea0e020c/toscaModel", - "category": "Network L1-3", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "340bf137-8c6c-4d5b-b185-19364dfc74ed", - "invariantUUID": "7e4781e8-6c6e-41c5-b889-6a321d5f2490", - "name": "FreeRadius-service", - "version": "2.0", - "toscaModelURL": "/sdc/v1/catalog/services/340bf137-8c6c-4d5b-b185-19364dfc74ed/toscaModel", - "category": "Network L4+", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "d0cac11e-332f-47e8-86d8-cb0b82655bb9", - "invariantUUID": "ca2f0af5-95e4-4058-b037-5c0de0f80bfa", - "name": "vIMS", - "version": "2.0", - "toscaModelURL": "/sdc/v1/catalog/services/d0cac11e-332f-47e8-86d8-cb0b82655bb9/toscaModel", - "category": "E2E Service", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "e245a0a2-34fc-46c7-912c-bd39305275c1", - "invariantUUID": "29db0b2c-a877-45e8-8175-4ac526d87eee", - "name": "vMRFaaS", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/e245a0a2-34fc-46c7-912c-bd39305275c1/toscaModel", - "category": "Network L4+", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "b9e06990-99e2-480f-96ac-c6e50c83f2bb", - "invariantUUID": "008943ad-73be-4d57-9105-962c4cb16a71", - "name": "vMRFaas2", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/b9e06990-99e2-480f-96ac-c6e50c83f2bb/toscaModel", - "category": "Network L4+", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "98d95267-5e0f-4531-abf8-f14b90031dc5", - "invariantUUID": "709d157b-52fb-4250-976e-7133dff5c347", - "name": "NewFreeRadius-service", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/98d95267-5e0f-4531-abf8-f14b90031dc5/toscaModel", - "category": "Network L4+", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "d8d2429b-0863-462c-adc7-cd38d77331ed", - "invariantUUID": "e1685613-136b-4990-a590-d0651a640a68", - "name": "vMRFaaS4", - "version": "1.1", - "toscaModelURL": "/sdc/v1/catalog/services/d8d2429b-0863-462c-adc7-cd38d77331ed/toscaModel", - "category": "Network Service", - "lifecycleState": "NOT_CERTIFIED_CHECKOUT", - "lastUpdaterUserId": "cs0008", - "distributionStatus": "DISTRIBUTION_NOT_APPROVED" - }, - { - "uuid": "9cfc73ad-795d-42ad-8a4f-54e6b3f33ef9", - "invariantUUID": "79f0574e-caf8-4bac-8189-909b2127e9e9", - "name": "vMRFaaS3", - "version": "1.0", - "toscaModelURL": "/sdc/v1/catalog/services/9cfc73ad-795d-42ad-8a4f-54e6b3f33ef9/toscaModel", - "category": "Network Service", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "af1ac9db-9d8b-4ca0-964c-58755826b59a", - "invariantUUID": "d2b9c343-c41a-4f85-ae36-c53cd4b7abcc", - "name": "vIMSservice3", - "version": "2.0", - "toscaModelURL": "/sdc/v1/catalog/services/af1ac9db-9d8b-4ca0-964c-58755826b59a/toscaModel", - "category": "VoIP Call Control", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - }, - { - "uuid": "1e3feeb0-8e36-46c6-862c-236d9c626439", - "invariantUUID": "b58a118e-eeb9-4f6e-bdca-e292f84d17df", - "name": "vFW-service-2VF-based", - "version": "2.0", - "toscaModelURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/toscaModel", - "category": "Network Service", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED" - } - ], - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439.json b/src/test/resources/mappings/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439.json deleted file mode 100644 index 4956be7..0000000 --- a/src/test/resources/mappings/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/metadata" - }, - "response": { - "status": 200, - "jsonBody": { - "uuid": "1e3feeb0-8e36-46c6-862c-236d9c626439", - "invariantUUID": "b58a118e-eeb9-4f6e-bdca-e292f84d17df", - "name": "vFW", - "version": "2.0", - "toscaModelURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/toscaModel", - "category": "Network Service", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED", - "lastUpdaterFullName": "Joni Mitchell", - "resources": [{ - "resourceInstanceName": "vFW-vSINK 0", - "resourceName": "vFW-vSINK", - "resourceInvariantUUID": "18b90934-aa82-456f-938e-e74a07a426f3", - "resourceVersion": "2.0", - "resoucreType": "VF", - "resourceUUID": "89a6b4c5-3973-4c19-b651-fae3713ca8d5", - "artifacts": [{ - "artifactName": "vf-license-model.xml", - "artifactType": "VF_LICENSE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/f6fa3f94-f5cd-4233-a7b2-b5e8dc2e1ec6", - "artifactDescription": "VF license file", - "artifactChecksum": "NDQ2NzIxNzgyMjZhNTc1NDNlMWU0ODI1ZmIyNjc3Zjg=", - "artifactUUID": "f6fa3f94-f5cd-4233-a7b2-b5e8dc2e1ec6", - "artifactVersion": "1", - "artifactLabel": "vflicense", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "vfwvsink0_modules.json", - "artifactType": "VF_MODULES_METADATA", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/d0aaecf9-6ffb-4b4b-81fd-c59c1e8e6fb6", - "artifactDescription": "Auto-generated VF Modules information artifact", - "artifactChecksum": "ZGIyOWY3YzE0MTM2MjlhMjY1ZjkzNDg3YjE2ZmQxY2Y=", - "artifactUUID": "d0aaecf9-6ffb-4b4b-81fd-c59c1e8e6fb6", - "artifactVersion": "1", - "artifactLabel": "vfModulesMetadata", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "base_vfw.yaml", - "artifactType": "HEAT", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/c94e8eec-b1a7-431c-ab6f-2fda5f0ee920", - "artifactDescription": "created from csar", - "artifactTimeout": 60, - "artifactChecksum": "YTY0MDg5ODUwZDE4YzQyYWI0NjE5Y2NjYmM3ZDg5ZGE=", - "artifactUUID": "c94e8eec-b1a7-431c-ab6f-2fda5f0ee920", - "artifactVersion": "4", - "artifactLabel": "heat1", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "vendor-license-model.xml", - "artifactType": "VENDOR_LICENSE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/423d2c66-6c3a-4257-9342-7b57ebf9dd54", - "artifactDescription": " Vendor license file", - "artifactChecksum": "YTNhYTc3ZGE4ZWViMmYzOThkOGQ3ZTVjZGNmNmU0ZmQ=", - "artifactUUID": "423d2c66-6c3a-4257-9342-7b57ebf9dd54", - "artifactVersion": "1", - "artifactLabel": "vendorlicense", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "base_vfw.env", - "artifactType": "HEAT_ENV", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/a1a58cc9-8225-4b6f-b81a-02fa3c7fb6ec", - "artifactDescription": "Auto-generated HEAT Environment deployment artifact", - "artifactChecksum": "ZmVkM2MwODhlZjcwNWY5MDk5ZGEyMjI5ZTAyYWRjNjY=", - "artifactUUID": "a1a58cc9-8225-4b6f-b81a-02fa3c7fb6ec", - "artifactVersion": "2", - "generatedFromUUID": "32591489-33c9-4461-a47c-7c463250788d.heat1", - "artifactLabel": "heat1env", - "artifactGroupType": "DEPLOYMENT" - } - ] - }, - { - "resourceInstanceName": "vPkG 0", - "resourceName": "vPkG", - "resourceInvariantUUID": "8d8a20c0-746c-4d5e-a1a2-fa49fa5786ad", - "resourceVersion": "2.0", - "resoucreType": "VF", - "resourceUUID": "31961e27-2a2c-4beb-87c9-bfe0067088f5", - "artifacts": [{ - "artifactName": "vf-license-model.xml", - "artifactType": "VF_LICENSE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/7af6cc3b-2ba3-4164-9d7d-65b3b46a71f4", - "artifactDescription": "VF license file", - "artifactChecksum": "MWM5NDlmNjdhZTdmZTA5MzIzY2RhYjcxZmFkYzQyZDM=", - "artifactUUID": "7af6cc3b-2ba3-4164-9d7d-65b3b46a71f4", - "artifactVersion": "1", - "artifactLabel": "vflicense", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "vpkg0_modules.json", - "artifactType": "VF_MODULES_METADATA", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/37b16173-bd54-447f-a5a2-1a5e24db8afb", - "artifactDescription": "Auto-generated VF Modules information artifact", - "artifactChecksum": "ZDA3MWQ3MTE3MTA1MzNkY2M1ODQ4YTUxN2YwMDk0MmM=", - "artifactUUID": "37b16173-bd54-447f-a5a2-1a5e24db8afb", - "artifactVersion": "1", - "artifactLabel": "vfModulesMetadata", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "base_vpkg.yaml", - "artifactType": "HEAT", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/43184998-c107-40a7-92f6-00ba74de8539", - "artifactDescription": "created from csar", - "artifactTimeout": 60, - "artifactChecksum": "NDZhY2U0YTExZjllNTFmZjc4ZTE4YzU2Zjk1ZDc2MWI=", - "artifactUUID": "43184998-c107-40a7-92f6-00ba74de8539", - "artifactVersion": "4", - "artifactLabel": "heat1", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "vendor-license-model.xml", - "artifactType": "VENDOR_LICENSE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/6cd5f968-20aa-4b86-9a50-97db5e4ca806", - "artifactDescription": " Vendor license file", - "artifactChecksum": "YTNhYTc3ZGE4ZWViMmYzOThkOGQ3ZTVjZGNmNmU0ZmQ=", - "artifactUUID": "6cd5f968-20aa-4b86-9a50-97db5e4ca806", - "artifactVersion": "1", - "artifactLabel": "vendorlicense", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "base_vpkg.env", - "artifactType": "HEAT_ENV", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/60944038-d382-4aa6-b387-7b87c9c9df19", - "artifactDescription": "Auto-generated HEAT Environment deployment artifact", - "artifactChecksum": "OGU0OGFlZTFiZDdhYmQ0MmM0MjAyY2U5YjljYWViYTA=", - "artifactUUID": "60944038-d382-4aa6-b387-7b87c9c9df19", - "artifactVersion": "2", - "generatedFromUUID": "0d3918df-ea14-4fc3-a5c9-34032eaae573.heat1", - "artifactLabel": "heat1env", - "artifactGroupType": "DEPLOYMENT" - } - ] - } - ], - "artifacts": [{ - "artifactName": "AAI-vFW-service-2VF-based-service-2.0.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/2e6cd967-93c2-4f53-82bd-c56ab98e8df7", - "artifactDescription": "AAI Service Model", - "artifactChecksum": "ZTY5ZTJmYTY4YzE2NGUxMTQxNWNkN2QzMmI4MWIzNDU=", - "artifactUUID": "2e6cd967-93c2-4f53-82bd-c56ab98e8df7", - "artifactVersion": "1", - "artifactLabel": "aaiservice1603481860", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "AAI-Vpkg..base_vpkg..module-0-resource-2.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/ad600a09-edde-4356-bb0a-9e638a671d06", - "artifactDescription": "AAI Resource Model", - "artifactChecksum": "MzQyMjczOGVmYzM1OWQ1NmFhZjBhOWUxM2JjMmYxZTQ=", - "artifactUUID": "ad600a09-edde-4356-bb0a-9e638a671d06", - "artifactVersion": "1", - "artifactLabel": "aairesource529289386", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "AAI-vFW-vSINK-resource-2.0.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/413a631e-69c4-453b-ab68-fac09b390259", - "artifactDescription": "AAI Resource Model", - "artifactChecksum": "ZWRmMzQzYzc0MThlYjQ1YjY2ZTFkYzJmMjAyNzQ1YWU=", - "artifactUUID": "413a631e-69c4-453b-ab68-fac09b390259", - "artifactVersion": "1", - "artifactLabel": "aairesource1461475898", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "AAI-vPkG-resource-2.0.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/aee30754-eec4-4820-ae3a-790b80b76e81", - "artifactDescription": "AAI Resource Model", - "artifactChecksum": "OGQ4ZTdhYjkyZDRkYmFiZTBhNWU4MDc4YTM2YjY1NmI=", - "artifactUUID": "aee30754-eec4-4820-ae3a-790b80b76e81", - "artifactVersion": "1", - "artifactLabel": "aairesource936479495", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "AAI-VfwVsink..base_vfw..module-0-resource-2.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/ac9a3bbf-a052-4176-abff-fe2d2741194a", - "artifactDescription": "AAI Resource Model", - "artifactChecksum": "OWIzNjVhNmI2ZWYyZThlMjk1NjA2MDFhZTU3MGQ0ZDU=", - "artifactUUID": "ac9a3bbf-a052-4176-abff-fe2d2741194a", - "artifactVersion": "1", - "artifactLabel": "aairesource1106409880", - "artifactGroupType": "DEPLOYMENT" - } - ] - }, - "headers": { - "Content-Type": "application/json" - } - } -} \ No newline at end of file diff --git a/src/test/resources/mappings/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_tosca.json b/src/test/resources/mappings/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_tosca.json deleted file mode 100644 index ebf72bb..0000000 --- a/src/test/resources/mappings/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_tosca.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/toscaModel" - }, - "response": { - "status": 200, - "bodyFileName": "response" - } -} \ No newline at end of file diff --git a/src/test/resources/mappings/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_withoutTosca.json b/src/test/resources/mappings/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_withoutTosca.json deleted file mode 100644 index 35554f0..0000000 --- a/src/test/resources/mappings/sdc_get_1e3feeb0-8e36-46c6-862c-236d9c626439_withoutTosca.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439_withoutTosca/metadata" - }, - "response": { - "status": 200, - "jsonBody": { - "uuid": "1e3feeb0-8e36-46c6-862c-236d9c626439", - "invariantUUID": "b58a118e-eeb9-4f6e-bdca-e292f84d17df", - "name": "vFW", - "version": "2.0", - "toscaModelURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439toto/toscaModel", - "category": "Network Service", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED", - "lastUpdaterFullName": "Joni Mitchell", - "resources": [{ - "resourceInstanceName": "vFW-vSINK 0", - "resourceName": "vFW-vSINK", - "resourceInvariantUUID": "18b90934-aa82-456f-938e-e74a07a426f3", - "resourceVersion": "2.0", - "resoucreType": "VF", - "resourceUUID": "89a6b4c5-3973-4c19-b651-fae3713ca8d5", - "artifacts": [{ - "artifactName": "vf-license-model.xml", - "artifactType": "VF_LICENSE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/f6fa3f94-f5cd-4233-a7b2-b5e8dc2e1ec6", - "artifactDescription": "VF license file", - "artifactChecksum": "NDQ2NzIxNzgyMjZhNTc1NDNlMWU0ODI1ZmIyNjc3Zjg=", - "artifactUUID": "f6fa3f94-f5cd-4233-a7b2-b5e8dc2e1ec6", - "artifactVersion": "1", - "artifactLabel": "vflicense", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "vfwvsink0_modules.json", - "artifactType": "VF_MODULES_METADATA", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/d0aaecf9-6ffb-4b4b-81fd-c59c1e8e6fb6", - "artifactDescription": "Auto-generated VF Modules information artifact", - "artifactChecksum": "ZGIyOWY3YzE0MTM2MjlhMjY1ZjkzNDg3YjE2ZmQxY2Y=", - "artifactUUID": "d0aaecf9-6ffb-4b4b-81fd-c59c1e8e6fb6", - "artifactVersion": "1", - "artifactLabel": "vfModulesMetadata", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "base_vfw.yaml", - "artifactType": "HEAT", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/c94e8eec-b1a7-431c-ab6f-2fda5f0ee920", - "artifactDescription": "created from csar", - "artifactTimeout": 60, - "artifactChecksum": "YTY0MDg5ODUwZDE4YzQyYWI0NjE5Y2NjYmM3ZDg5ZGE=", - "artifactUUID": "c94e8eec-b1a7-431c-ab6f-2fda5f0ee920", - "artifactVersion": "4", - "artifactLabel": "heat1", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "vendor-license-model.xml", - "artifactType": "VENDOR_LICENSE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/423d2c66-6c3a-4257-9342-7b57ebf9dd54", - "artifactDescription": " Vendor license file", - "artifactChecksum": "YTNhYTc3ZGE4ZWViMmYzOThkOGQ3ZTVjZGNmNmU0ZmQ=", - "artifactUUID": "423d2c66-6c3a-4257-9342-7b57ebf9dd54", - "artifactVersion": "1", - "artifactLabel": "vendorlicense", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "base_vfw.env", - "artifactType": "HEAT_ENV", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/a1a58cc9-8225-4b6f-b81a-02fa3c7fb6ec", - "artifactDescription": "Auto-generated HEAT Environment deployment artifact", - "artifactChecksum": "ZmVkM2MwODhlZjcwNWY5MDk5ZGEyMjI5ZTAyYWRjNjY=", - "artifactUUID": "a1a58cc9-8225-4b6f-b81a-02fa3c7fb6ec", - "artifactVersion": "2", - "generatedFromUUID": "32591489-33c9-4461-a47c-7c463250788d.heat1", - "artifactLabel": "heat1env", - "artifactGroupType": "DEPLOYMENT" - } - ] - }, - { - "resourceInstanceName": "vPkG 0", - "resourceName": "vPkG", - "resourceInvariantUUID": "8d8a20c0-746c-4d5e-a1a2-fa49fa5786ad", - "resourceVersion": "2.0", - "resoucreType": "VF", - "resourceUUID": "31961e27-2a2c-4beb-87c9-bfe0067088f5", - "artifacts": [{ - "artifactName": "vf-license-model.xml", - "artifactType": "VF_LICENSE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/7af6cc3b-2ba3-4164-9d7d-65b3b46a71f4", - "artifactDescription": "VF license file", - "artifactChecksum": "MWM5NDlmNjdhZTdmZTA5MzIzY2RhYjcxZmFkYzQyZDM=", - "artifactUUID": "7af6cc3b-2ba3-4164-9d7d-65b3b46a71f4", - "artifactVersion": "1", - "artifactLabel": "vflicense", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "vpkg0_modules.json", - "artifactType": "VF_MODULES_METADATA", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/37b16173-bd54-447f-a5a2-1a5e24db8afb", - "artifactDescription": "Auto-generated VF Modules information artifact", - "artifactChecksum": "ZDA3MWQ3MTE3MTA1MzNkY2M1ODQ4YTUxN2YwMDk0MmM=", - "artifactUUID": "37b16173-bd54-447f-a5a2-1a5e24db8afb", - "artifactVersion": "1", - "artifactLabel": "vfModulesMetadata", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "base_vpkg.yaml", - "artifactType": "HEAT", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/43184998-c107-40a7-92f6-00ba74de8539", - "artifactDescription": "created from csar", - "artifactTimeout": 60, - "artifactChecksum": "NDZhY2U0YTExZjllNTFmZjc4ZTE4YzU2Zjk1ZDc2MWI=", - "artifactUUID": "43184998-c107-40a7-92f6-00ba74de8539", - "artifactVersion": "4", - "artifactLabel": "heat1", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "vendor-license-model.xml", - "artifactType": "VENDOR_LICENSE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/6cd5f968-20aa-4b86-9a50-97db5e4ca806", - "artifactDescription": " Vendor license file", - "artifactChecksum": "YTNhYTc3ZGE4ZWViMmYzOThkOGQ3ZTVjZGNmNmU0ZmQ=", - "artifactUUID": "6cd5f968-20aa-4b86-9a50-97db5e4ca806", - "artifactVersion": "1", - "artifactLabel": "vendorlicense", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "base_vpkg.env", - "artifactType": "HEAT_ENV", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/60944038-d382-4aa6-b387-7b87c9c9df19", - "artifactDescription": "Auto-generated HEAT Environment deployment artifact", - "artifactChecksum": "OGU0OGFlZTFiZDdhYmQ0MmM0MjAyY2U5YjljYWViYTA=", - "artifactUUID": "60944038-d382-4aa6-b387-7b87c9c9df19", - "artifactVersion": "2", - "generatedFromUUID": "0d3918df-ea14-4fc3-a5c9-34032eaae573.heat1", - "artifactLabel": "heat1env", - "artifactGroupType": "DEPLOYMENT" - } - ] - } - ], - "artifacts": [{ - "artifactName": "AAI-vFW-service-2VF-based-service-2.0.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/2e6cd967-93c2-4f53-82bd-c56ab98e8df7", - "artifactDescription": "AAI Service Model", - "artifactChecksum": "ZTY5ZTJmYTY4YzE2NGUxMTQxNWNkN2QzMmI4MWIzNDU=", - "artifactUUID": "2e6cd967-93c2-4f53-82bd-c56ab98e8df7", - "artifactVersion": "1", - "artifactLabel": "aaiservice1603481860", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "AAI-Vpkg..base_vpkg..module-0-resource-2.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/ad600a09-edde-4356-bb0a-9e638a671d06", - "artifactDescription": "AAI Resource Model", - "artifactChecksum": "MzQyMjczOGVmYzM1OWQ1NmFhZjBhOWUxM2JjMmYxZTQ=", - "artifactUUID": "ad600a09-edde-4356-bb0a-9e638a671d06", - "artifactVersion": "1", - "artifactLabel": "aairesource529289386", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "AAI-vFW-vSINK-resource-2.0.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/413a631e-69c4-453b-ab68-fac09b390259", - "artifactDescription": "AAI Resource Model", - "artifactChecksum": "ZWRmMzQzYzc0MThlYjQ1YjY2ZTFkYzJmMjAyNzQ1YWU=", - "artifactUUID": "413a631e-69c4-453b-ab68-fac09b390259", - "artifactVersion": "1", - "artifactLabel": "aairesource1461475898", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "AAI-vPkG-resource-2.0.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/aee30754-eec4-4820-ae3a-790b80b76e81", - "artifactDescription": "AAI Resource Model", - "artifactChecksum": "OGQ4ZTdhYjkyZDRkYmFiZTBhNWU4MDc4YTM2YjY1NmI=", - "artifactUUID": "aee30754-eec4-4820-ae3a-790b80b76e81", - "artifactVersion": "1", - "artifactLabel": "aairesource936479495", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "AAI-VfwVsink..base_vfw..module-0-resource-2.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/ac9a3bbf-a052-4176-abff-fe2d2741194a", - "artifactDescription": "AAI Resource Model", - "artifactChecksum": "OWIzNjVhNmI2ZWYyZThlMjk1NjA2MDFhZTU3MGQ0ZDU=", - "artifactUUID": "ac9a3bbf-a052-4176-abff-fe2d2741194a", - "artifactVersion": "1", - "artifactLabel": "aairesource1106409880", - "artifactGroupType": "DEPLOYMENT" - } - ] - }, - "headers": { - "Content-Type": "application/json" - } - } -} \ No newline at end of file diff --git a/src/test/resources/mappings/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_toscafile.json b/src/test/resources/mappings/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_toscafile.json deleted file mode 100644 index 9886df7..0000000 --- a/src/test/resources/mappings/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_toscafile.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/sdc/v1/catalog/services/462f84e5-f0e5-44c5-ab95-38fb4bf77064/toscaModel" - }, - "response": { - "status": 200, - "bodyFileName": "toscafile/service-Sdwanvpninfraservice-csar.csar" - } -} diff --git a/src/test/resources/mappings/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_withTosca.json b/src/test/resources/mappings/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_withTosca.json deleted file mode 100644 index 848b725..0000000 --- a/src/test/resources/mappings/sdc_get_462f84e5-f0e5-44c5-ab95-38fb4bf77064_withTosca.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/sdc/v1/catalog/services/462f84e5-f0e5-44c5-ab95-38fb4bf77064/metadata" - }, - "response": { - "status": 200, - "jsonBody": { - "uuid": "462f84e5-f0e5-44c5-ab95-38fb4bf77064", - "invariantUUID": "b58a118e-eeb9-4f6e-bdca-e292f84d17df", - "name": "vFW", - "version": "2.0", - "toscaModelURL": "/sdc/v1/catalog/services/462f84e5-f0e5-44c5-ab95-38fb4bf77064/toscaModel", - "category": "Network Service", - "lifecycleState": "CERTIFIED", - "lastUpdaterUserId": "jm0007", - "distributionStatus": "DISTRIBUTED", - "lastUpdaterFullName": "Joni Mitchell", - "resources": [{ - "resourceInstanceName": "vFW-vSINK 0", - "resourceName": "vFW-vSINK", - "resourceInvariantUUID": "18b90934-aa82-456f-938e-e74a07a426f3", - "resourceVersion": "2.0", - "resoucreType": "VF", - "resourceUUID": "89a6b4c5-3973-4c19-b651-fae3713ca8d5", - "artifacts": [{ - "artifactName": "vf-license-model.xml", - "artifactType": "VF_LICENSE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/f6fa3f94-f5cd-4233-a7b2-b5e8dc2e1ec6", - "artifactDescription": "VF license file", - "artifactChecksum": "NDQ2NzIxNzgyMjZhNTc1NDNlMWU0ODI1ZmIyNjc3Zjg=", - "artifactUUID": "f6fa3f94-f5cd-4233-a7b2-b5e8dc2e1ec6", - "artifactVersion": "1", - "artifactLabel": "vflicense", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "vfwvsink0_modules.json", - "artifactType": "VF_MODULES_METADATA", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/d0aaecf9-6ffb-4b4b-81fd-c59c1e8e6fb6", - "artifactDescription": "Auto-generated VF Modules information artifact", - "artifactChecksum": "ZGIyOWY3YzE0MTM2MjlhMjY1ZjkzNDg3YjE2ZmQxY2Y=", - "artifactUUID": "d0aaecf9-6ffb-4b4b-81fd-c59c1e8e6fb6", - "artifactVersion": "1", - "artifactLabel": "vfModulesMetadata", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "base_vfw.yaml", - "artifactType": "HEAT", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/c94e8eec-b1a7-431c-ab6f-2fda5f0ee920", - "artifactDescription": "created from csar", - "artifactTimeout": 60, - "artifactChecksum": "YTY0MDg5ODUwZDE4YzQyYWI0NjE5Y2NjYmM3ZDg5ZGE=", - "artifactUUID": "c94e8eec-b1a7-431c-ab6f-2fda5f0ee920", - "artifactVersion": "4", - "artifactLabel": "heat1", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "vendor-license-model.xml", - "artifactType": "VENDOR_LICENSE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/423d2c66-6c3a-4257-9342-7b57ebf9dd54", - "artifactDescription": " Vendor license file", - "artifactChecksum": "YTNhYTc3ZGE4ZWViMmYzOThkOGQ3ZTVjZGNmNmU0ZmQ=", - "artifactUUID": "423d2c66-6c3a-4257-9342-7b57ebf9dd54", - "artifactVersion": "1", - "artifactLabel": "vendorlicense", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "base_vfw.env", - "artifactType": "HEAT_ENV", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vfwvsink0/artifacts/a1a58cc9-8225-4b6f-b81a-02fa3c7fb6ec", - "artifactDescription": "Auto-generated HEAT Environment deployment artifact", - "artifactChecksum": "ZmVkM2MwODhlZjcwNWY5MDk5ZGEyMjI5ZTAyYWRjNjY=", - "artifactUUID": "a1a58cc9-8225-4b6f-b81a-02fa3c7fb6ec", - "artifactVersion": "2", - "generatedFromUUID": "32591489-33c9-4461-a47c-7c463250788d.heat1", - "artifactLabel": "heat1env", - "artifactGroupType": "DEPLOYMENT" - } - ] - }, - { - "resourceInstanceName": "vPkG 0", - "resourceName": "vPkG", - "resourceInvariantUUID": "8d8a20c0-746c-4d5e-a1a2-fa49fa5786ad", - "resourceVersion": "2.0", - "resoucreType": "VF", - "resourceUUID": "31961e27-2a2c-4beb-87c9-bfe0067088f5", - "artifacts": [{ - "artifactName": "vf-license-model.xml", - "artifactType": "VF_LICENSE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/7af6cc3b-2ba3-4164-9d7d-65b3b46a71f4", - "artifactDescription": "VF license file", - "artifactChecksum": "MWM5NDlmNjdhZTdmZTA5MzIzY2RhYjcxZmFkYzQyZDM=", - "artifactUUID": "7af6cc3b-2ba3-4164-9d7d-65b3b46a71f4", - "artifactVersion": "1", - "artifactLabel": "vflicense", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "vpkg0_modules.json", - "artifactType": "VF_MODULES_METADATA", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/37b16173-bd54-447f-a5a2-1a5e24db8afb", - "artifactDescription": "Auto-generated VF Modules information artifact", - "artifactChecksum": "ZDA3MWQ3MTE3MTA1MzNkY2M1ODQ4YTUxN2YwMDk0MmM=", - "artifactUUID": "37b16173-bd54-447f-a5a2-1a5e24db8afb", - "artifactVersion": "1", - "artifactLabel": "vfModulesMetadata", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "base_vpkg.yaml", - "artifactType": "HEAT", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/43184998-c107-40a7-92f6-00ba74de8539", - "artifactDescription": "created from csar", - "artifactTimeout": 60, - "artifactChecksum": "NDZhY2U0YTExZjllNTFmZjc4ZTE4YzU2Zjk1ZDc2MWI=", - "artifactUUID": "43184998-c107-40a7-92f6-00ba74de8539", - "artifactVersion": "4", - "artifactLabel": "heat1", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "vendor-license-model.xml", - "artifactType": "VENDOR_LICENSE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/6cd5f968-20aa-4b86-9a50-97db5e4ca806", - "artifactDescription": " Vendor license file", - "artifactChecksum": "YTNhYTc3ZGE4ZWViMmYzOThkOGQ3ZTVjZGNmNmU0ZmQ=", - "artifactUUID": "6cd5f968-20aa-4b86-9a50-97db5e4ca806", - "artifactVersion": "1", - "artifactLabel": "vendorlicense", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "base_vpkg.env", - "artifactType": "HEAT_ENV", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/resourceInstances/vpkg0/artifacts/60944038-d382-4aa6-b387-7b87c9c9df19", - "artifactDescription": "Auto-generated HEAT Environment deployment artifact", - "artifactChecksum": "OGU0OGFlZTFiZDdhYmQ0MmM0MjAyY2U5YjljYWViYTA=", - "artifactUUID": "60944038-d382-4aa6-b387-7b87c9c9df19", - "artifactVersion": "2", - "generatedFromUUID": "0d3918df-ea14-4fc3-a5c9-34032eaae573.heat1", - "artifactLabel": "heat1env", - "artifactGroupType": "DEPLOYMENT" - } - ] - } - ], - "artifacts": [{ - "artifactName": "AAI-vFW-service-2VF-based-service-2.0.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/2e6cd967-93c2-4f53-82bd-c56ab98e8df7", - "artifactDescription": "AAI Service Model", - "artifactChecksum": "ZTY5ZTJmYTY4YzE2NGUxMTQxNWNkN2QzMmI4MWIzNDU=", - "artifactUUID": "2e6cd967-93c2-4f53-82bd-c56ab98e8df7", - "artifactVersion": "1", - "artifactLabel": "aaiservice1603481860", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "AAI-Vpkg..base_vpkg..module-0-resource-2.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/ad600a09-edde-4356-bb0a-9e638a671d06", - "artifactDescription": "AAI Resource Model", - "artifactChecksum": "MzQyMjczOGVmYzM1OWQ1NmFhZjBhOWUxM2JjMmYxZTQ=", - "artifactUUID": "ad600a09-edde-4356-bb0a-9e638a671d06", - "artifactVersion": "1", - "artifactLabel": "aairesource529289386", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "AAI-vFW-vSINK-resource-2.0.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/413a631e-69c4-453b-ab68-fac09b390259", - "artifactDescription": "AAI Resource Model", - "artifactChecksum": "ZWRmMzQzYzc0MThlYjQ1YjY2ZTFkYzJmMjAyNzQ1YWU=", - "artifactUUID": "413a631e-69c4-453b-ab68-fac09b390259", - "artifactVersion": "1", - "artifactLabel": "aairesource1461475898", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "AAI-vPkG-resource-2.0.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/aee30754-eec4-4820-ae3a-790b80b76e81", - "artifactDescription": "AAI Resource Model", - "artifactChecksum": "OGQ4ZTdhYjkyZDRkYmFiZTBhNWU4MDc4YTM2YjY1NmI=", - "artifactUUID": "aee30754-eec4-4820-ae3a-790b80b76e81", - "artifactVersion": "1", - "artifactLabel": "aairesource936479495", - "artifactGroupType": "DEPLOYMENT" - }, - { - "artifactName": "AAI-VfwVsink..base_vfw..module-0-resource-2.xml", - "artifactType": "MODEL_INVENTORY_PROFILE", - "artifactURL": "/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/artifacts/ac9a3bbf-a052-4176-abff-fe2d2741194a", - "artifactDescription": "AAI Resource Model", - "artifactChecksum": "OWIzNjVhNmI2ZWYyZThlMjk1NjA2MDFhZTU3MGQ0ZDU=", - "artifactUUID": "ac9a3bbf-a052-4176-abff-fe2d2741194a", - "artifactVersion": "1", - "artifactLabel": "aairesource1106409880", - "artifactGroupType": "DEPLOYMENT" - } - ] - }, - "headers": { - "Content-Type": "application/json" - } - } -} diff --git a/src/test/resources/mappings/so/so_delete_service_instance.json b/src/test/resources/mappings/so/so_delete_service_instance.json new file mode 100644 index 0000000..92a713d --- /dev/null +++ b/src/test/resources/mappings/so/so_delete_service_instance.json @@ -0,0 +1,18 @@ +{ + "request": { + "method": "DELETE", + "url": "/onap/so/infra/serviceInstantiation/v7/serviceInstances/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb" + }, + "response": { + "status": 202, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "requestReferences": { + "instanceId": "instanceId", + "requestId": "requestId" + } + } + } +} diff --git a/src/test/resources/mappings/so/so_e2e_delete_service_instance.json b/src/test/resources/mappings/so/so_e2e_delete_service_instance.json new file mode 100644 index 0000000..ea7b446 --- /dev/null +++ b/src/test/resources/mappings/so/so_e2e_delete_service_instance.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "DELETE", + "url": "/onap/so/infra/e2eServiceInstances/v3/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb" + }, + "response": { + "status": 202, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "operationId": "operationId" + } + } +} diff --git a/src/test/resources/mappings/so/so_get_.json b/src/test/resources/mappings/so/so_get_.json new file mode 100644 index 0000000..a251e69 --- /dev/null +++ b/src/test/resources/mappings/so/so_get_.json @@ -0,0 +1,20 @@ +{ + "request": { + "method": "GET", + "url": "/onap/so/infra/orchestrationRequests/v7/requestId" + }, + "response": { + "status": 200, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "request": { + "requestStatus": { + "requestState": "COMPLETE", + "percentProgress": 100 + } + } + } + } +} diff --git a/src/test/resources/mappings/so/so_get_e2e.json b/src/test/resources/mappings/so/so_get_e2e.json new file mode 100644 index 0000000..530cd84 --- /dev/null +++ b/src/test/resources/mappings/so/so_get_e2e.json @@ -0,0 +1,25 @@ +{ +"request": { + "method": "GET", + "url": "/onap/so/infra/e2eServiceInstances/v3/serviceId/operations/operationId" + }, + "response": { + "status": 200, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "operation": { + "operationId": "operationid", + "operation": "create", + "result": "finished", + "reason": "", + "userid": "", + "operationContent": "Creating E2E SOTN Service", + "progress": "100", + "operateAt": "", + "finishedAt": "" + } + } + } +} diff --git a/src/test/resources/mappings/so/so_get_e2e_delete.json b/src/test/resources/mappings/so/so_get_e2e_delete.json new file mode 100644 index 0000000..34247e0 --- /dev/null +++ b/src/test/resources/mappings/so/so_get_e2e_delete.json @@ -0,0 +1,25 @@ +{ + "request": { + "method": "GET", + "url": "/onap/so/infra/e2eServiceInstances/v3/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb/operations/operationId" + }, + "response": { + "status": 200, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "operation": { + "operationId": "operationid", + "operation": "create", + "result": "finished", + "reason": "", + "userid": "", + "operationContent": "Creating E2E SOTN Service", + "progress": 100, + "operateAt": "", + "finishedAt": "" + } + } + } +} diff --git a/src/test/resources/mappings/so/so_get_healthcheck.json b/src/test/resources/mappings/so/so_get_healthcheck.json new file mode 100644 index 0000000..8f2171d --- /dev/null +++ b/src/test/resources/mappings/so/so_get_healthcheck.json @@ -0,0 +1,12 @@ +{ + "request": { + "method": "GET", + "url": "/globalhealthcheck" + }, + "response": { + "status": 200, + "jsonBody": { + "bodyFileName": "so_healthcheck.xml" + } + } +} diff --git a/src/test/resources/mappings/so/so_healthcheck.xml b/src/test/resources/mappings/so/so_healthcheck.xml new file mode 100644 index 0000000..d023c9f --- /dev/null +++ b/src/test/resources/mappings/so/so_healthcheck.xml @@ -0,0 +1,23 @@ + + + + + + Health Check + + Application ready + \ No newline at end of file diff --git a/src/test/resources/mappings/so/so_post_create_service_instance.json b/src/test/resources/mappings/so/so_post_create_service_instance.json new file mode 100644 index 0000000..8d319f6 --- /dev/null +++ b/src/test/resources/mappings/so/so_post_create_service_instance.json @@ -0,0 +1,18 @@ +{ + "request": { + "method": "POST", + "url": "/onap/so/infra/serviceInstantiation/v7/serviceInstances/" + }, + "response": { + "status": 201, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "requestReferences": { + "instanceId": "instanceId", + "requestId": "requestId" + } + } + } +} diff --git a/src/test/resources/mappings/so/so_post_e2e_create_service_instance.json b/src/test/resources/mappings/so/so_post_e2e_create_service_instance.json new file mode 100644 index 0000000..a357bef --- /dev/null +++ b/src/test/resources/mappings/so/so_post_e2e_create_service_instance.json @@ -0,0 +1,18 @@ +{ + "request": { + "method": "POST", + "url": "/onap/so/infra/e2eServiceInstances/v3" + }, + "response": { + "status": 201, + "headers": { + "Content-Type": "application/json" + }, + "jsonBody": { + "service": { + "serviceId": "serviceId", + "operationId": "operationId" + } + } + } +} diff --git a/src/test/resources/mappings/so_delete_service_instance.json b/src/test/resources/mappings/so_delete_service_instance.json deleted file mode 100644 index 92a713d..0000000 --- a/src/test/resources/mappings/so_delete_service_instance.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "request": { - "method": "DELETE", - "url": "/onap/so/infra/serviceInstantiation/v7/serviceInstances/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb" - }, - "response": { - "status": 202, - "headers": { - "Content-Type": "application/json" - }, - "jsonBody": { - "requestReferences": { - "instanceId": "instanceId", - "requestId": "requestId" - } - } - } -} diff --git a/src/test/resources/mappings/so_e2e_delete_service_instance.json b/src/test/resources/mappings/so_e2e_delete_service_instance.json deleted file mode 100644 index ea7b446..0000000 --- a/src/test/resources/mappings/so_e2e_delete_service_instance.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "request": { - "method": "DELETE", - "url": "/onap/so/infra/e2eServiceInstances/v3/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb" - }, - "response": { - "status": 202, - "headers": { - "Content-Type": "application/json" - }, - "jsonBody": { - "operationId": "operationId" - } - } -} diff --git a/src/test/resources/mappings/so_get_.json b/src/test/resources/mappings/so_get_.json deleted file mode 100644 index a251e69..0000000 --- a/src/test/resources/mappings/so_get_.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/onap/so/infra/orchestrationRequests/v7/requestId" - }, - "response": { - "status": 200, - "headers": { - "Content-Type": "application/json" - }, - "jsonBody": { - "request": { - "requestStatus": { - "requestState": "COMPLETE", - "percentProgress": 100 - } - } - } - } -} diff --git a/src/test/resources/mappings/so_get_e2e.json b/src/test/resources/mappings/so_get_e2e.json deleted file mode 100644 index 530cd84..0000000 --- a/src/test/resources/mappings/so_get_e2e.json +++ /dev/null @@ -1,25 +0,0 @@ -{ -"request": { - "method": "GET", - "url": "/onap/so/infra/e2eServiceInstances/v3/serviceId/operations/operationId" - }, - "response": { - "status": 200, - "headers": { - "Content-Type": "application/json" - }, - "jsonBody": { - "operation": { - "operationId": "operationid", - "operation": "create", - "result": "finished", - "reason": "", - "userid": "", - "operationContent": "Creating E2E SOTN Service", - "progress": "100", - "operateAt": "", - "finishedAt": "" - } - } - } -} diff --git a/src/test/resources/mappings/so_get_e2e_delete.json b/src/test/resources/mappings/so_get_e2e_delete.json deleted file mode 100644 index 34247e0..0000000 --- a/src/test/resources/mappings/so_get_e2e_delete.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "request": { - "method": "GET", - "url": "/onap/so/infra/e2eServiceInstances/v3/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb/operations/operationId" - }, - "response": { - "status": 200, - "headers": { - "Content-Type": "application/json" - }, - "jsonBody": { - "operation": { - "operationId": "operationid", - "operation": "create", - "result": "finished", - "reason": "", - "userid": "", - "operationContent": "Creating E2E SOTN Service", - "progress": 100, - "operateAt": "", - "finishedAt": "" - } - } - } -} diff --git a/src/test/resources/mappings/so_post_create_service_instance.json b/src/test/resources/mappings/so_post_create_service_instance.json deleted file mode 100644 index 8d319f6..0000000 --- a/src/test/resources/mappings/so_post_create_service_instance.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "request": { - "method": "POST", - "url": "/onap/so/infra/serviceInstantiation/v7/serviceInstances/" - }, - "response": { - "status": 201, - "headers": { - "Content-Type": "application/json" - }, - "jsonBody": { - "requestReferences": { - "instanceId": "instanceId", - "requestId": "requestId" - } - } - } -} diff --git a/src/test/resources/mappings/so_post_e2e_create_service_instance.json b/src/test/resources/mappings/so_post_e2e_create_service_instance.json deleted file mode 100644 index a357bef..0000000 --- a/src/test/resources/mappings/so_post_e2e_create_service_instance.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "request": { - "method": "POST", - "url": "/onap/so/infra/e2eServiceInstances/v3" - }, - "response": { - "status": 201, - "headers": { - "Content-Type": "application/json" - }, - "jsonBody": { - "service": { - "serviceId": "serviceId", - "operationId": "operationId" - } - } - } -} -- cgit 1.2.3-korg