summaryrefslogtreecommitdiffstats
path: root/ms/gra
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dt5972@att.com>2021-10-29 14:47:40 -0400
committerDan Timoney <dtimoney@att.com>2021-11-01 10:17:41 -0400
commit5b935a9086ec1080f896b9a71c52283122aa0163 (patch)
treef28aee1327e5b6c8ad423dec5950d46f66ac201b /ms/gra
parent53b2788231f5ab3aeda4f09e1445a02c3a3b6be9 (diff)
Sync local changes to support GRA microservice
Sync changes made downstream to support GRA microservice Change-Id: If3bf5d879f7d61ab91209c63b0344d78128246a8 Issue-ID: CCSDK-3504 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ms/gra')
-rw-r--r--ms/gra/gra-app/.swagger-codegen-ignore31
-rw-r--r--ms/gra/gra-app/pom.xml24
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/FilterConfiguration.java43
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/GenericResourceMsApp.java52
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/GraWebConfiguration.java62
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/ObjectMapperInterceptor.java21
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/ObjectMapperResolver.java7
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/UriMatcherObjectMapperResolver.java62
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiController.java2540
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/OperationsApiController.java122
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/ServiceDataHelper.java72
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigContrailRouteAllottedResources.java2
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigPortMirrorConfigurations.java2
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigServices.java2
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalContrailRouteAllottedResources.java2
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalPortMirrorConfigurations.java2
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiContrailRouteAllottedResources.java95
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource.java137
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiContrailroutetopologyContrailRouteTopology.java168
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiNetworkinstancegroupNetworkInstanceGroup.java369
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork.java223
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.java334
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiOnapmodelinformationOnapModelInformation.java182
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiOperStatusData.java237
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPortMirrorConfigurations.java95
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration.java137
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology.java168
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloadModelInformation.java95
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloaddataPreloadData.java141
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloadmodelinformationPreloadList.java135
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.java373
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServiceModelInfrastructure.java95
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServiceData.java465
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataNetworks.java95
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataNetworksNetwork.java109
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources.java93
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataVnfsVnf.java109
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataVnfsVnfVnfData.java384
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule.java109
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicemodelinfrastructureService.java139
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicestatusServiceStatus.java261
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicetopologyServiceTopology.java170
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVfmoduletopologyVfModuleTopology.java294
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVnfNetworkData.java286
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks.java95
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVnftopologyVnfTopology.java294
-rw-r--r--ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVpnbindingsVpnBindings.java182
-rw-r--r--ms/gra/gra-app/src/main/resources/application.properties3
-rw-r--r--ms/gra/gra-app/src/main/resources/contrail-adaptor.properties40
-rw-r--r--ms/gra/gra-app/src/main/resources/contrail-api-path.properties59
-rw-r--r--ms/gra/gra-app/src/main/resources/db/changelog/db.changelog-master.yaml121
-rw-r--r--ms/gra/gra-app/src/main/resources/eipam.properties63
-rw-r--r--ms/gra/gra-app/src/main/resources/log4j2.properties3
-rw-r--r--ms/gra/gra-app/src/main/resources/msoadaptor.properties5
-rw-r--r--ms/gra/gra-app/src/test/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiPreloadControllerTest.java21
-rw-r--r--ms/gra/gra-app/src/test/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiServicesControllerTest.java8
-rw-r--r--ms/gra/gra-app/src/test/resources/GR_API.http16
-rw-r--r--ms/gra/gra-app/src/test/resources/allotted-resource-item.json46
-rw-r--r--ms/gra/gra-app/src/test/resources/contrail-adaptor.properties37
-rw-r--r--ms/gra/gra-app/src/test/resources/contrail-api-path.properties59
-rw-r--r--ms/gra/gra-app/src/test/resources/db/changelog/db.changelog-master.yaml69
-rw-r--r--ms/gra/gra-app/src/test/resources/eipam.properties63
-rw-r--r--ms/gra/gra-app/src/test/resources/msoadaptor.properties5
-rw-r--r--ms/gra/gra-app/src/test/resources/port-mirror-configuration-item.json210
-rw-r--r--ms/gra/gra-app/src/test/resources/preload1-net-list-item.json153
-rw-r--r--ms/gra/gra-app/src/test/resources/preload1-net-model-info.json160
-rw-r--r--ms/gra/gra-app/src/test/resources/preload1-net-preload-data.json6
-rw-r--r--ms/gra/gra-app/src/test/resources/service1-service.json120
-rw-r--r--ms/gra/gra-app/src/test/resources/service1-servicedata.json395
-rw-r--r--ms/gra/gra-app/src/test/resources/service1-serviceitem.json418
-rw-r--r--ms/gra/gra-app/src/test/resources/service1-services.json237
-rw-r--r--ms/gra/gra-app/src/test/resources/service1-servicestatus.json2
-rw-r--r--ms/gra/gra-app/src/test/resources/service1-vfmodule-item.json142
-rw-r--r--ms/gra/gra-app/src/test/resources/service1.json3
-rw-r--r--ms/gra/gra-app/src/test/resources/vnf-level-oper-status.json2
-rw-r--r--ms/gra/gra-app/src/test/resources/vnf-vnf-networks-network-role.json68
-rw-r--r--ms/gra/gra-app/src/test/resources/vnf.json603
-rw-r--r--ms/gra/gra-docker/README.md69
-rw-r--r--ms/gra/gra-docker/pom.xml111
-rw-r--r--ms/gra/gra-docker/src/main/dc/docker-compose.yaml37
-rw-r--r--ms/gra/gra-docker/src/main/docker/Dockerfile32
-rw-r--r--ms/gra/gra-docker/src/main/resources/application.properties3
-rw-r--r--ms/gra/gra-docker/src/main/resources/contrail-adaptor.properties40
-rw-r--r--ms/gra/gra-docker/src/main/resources/contrail-api-path.properties59
-rw-r--r--ms/gra/gra-docker/src/main/resources/eipam.properties63
-rw-r--r--ms/gra/gra-docker/src/main/resources/generic-resource-api-dg.properties123
-rw-r--r--ms/gra/gra-docker/src/main/resources/log4j2.properties12
-rw-r--r--ms/gra/gra-docker/src/main/resources/msoadaptor.properties5
-rw-r--r--ms/gra/gra-docker/src/main/resources/startGra.sh84
-rw-r--r--ms/gra/gra-docker/src/main/resources/truststore.jksbin0 -> 3843 bytes
-rw-r--r--ms/gra/gra-docker/src/main/scripts/chmodScripts.sh3
-rwxr-xr-xms/gra/gra-docker/src/main/scripts/compareContrail.sh55
-rwxr-xr-xms/gra/gra-docker/src/main/scripts/comparePortmirror.sh55
-rwxr-xr-xms/gra/gra-docker/src/main/scripts/comparePreload.sh55
-rwxr-xr-xms/gra/gra-docker/src/main/scripts/compareSvc.sh55
-rw-r--r--ms/gra/gra-docker/src/main/scripts/exportGraDaexim.sh40
-rw-r--r--ms/gra/gra-docker/src/main/scripts/graToMdsal.sh104
-rwxr-xr-xms/gra/gra-docker/src/main/scripts/importGraDaexim.sh207
-rw-r--r--ms/gra/gra-docker/src/main/templates/contrail-route-allotted-resource.json102
-rw-r--r--ms/gra/gra-docker/src/main/templates/csm-service-instance.json15
-rw-r--r--ms/gra/gra-docker/src/main/templates/network-instance-group-network.json27
-rw-r--r--ms/gra/gra-docker/src/main/templates/network-level-oper-status.json11
-rw-r--r--ms/gra/gra-docker/src/main/templates/network.json145
-rw-r--r--ms/gra/gra-docker/src/main/templates/port-mirror-configuration.json152
-rw-r--r--ms/gra/gra-docker/src/main/templates/security-zone-allotted-resource.json78
-rw-r--r--ms/gra/gra-docker/src/main/templates/vf-module-assign.json279
-rw-r--r--ms/gra/gra-docker/src/main/templates/vnf-data-assign.json249
-rw-r--r--ms/gra/gra-docker/src/main/templates/vnf-level-oper-status.json12
-rw-r--r--ms/gra/gra-docker/src/main/templates/vnf-network.json45
-rw-r--r--ms/gra/pom.xml6
110 files changed, 13362 insertions, 1223 deletions
diff --git a/ms/gra/gra-app/.swagger-codegen-ignore b/ms/gra/gra-app/.swagger-codegen-ignore
index d8f3f67..4214416 100644
--- a/ms/gra/gra-app/.swagger-codegen-ignore
+++ b/ms/gra/gra-app/.swagger-codegen-ignore
@@ -1,4 +1,35 @@
**/OperationsApiController.java
**/OperationalApiController.java
**/ConfigApiController.java
+**/GenericResourceApiServicedataServicedataVnfsVnfVnfData.java
+**/GenericResourceApiServicemodelinfrastructureService.java
+**/GenericResourceApiServiceModelInfrastructure.java
**/Swagger2SpringBoot.java
+**/GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration.java
+**/GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology.java
+**/GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource.java
+**/GenericResourceApiContrailroutetopologyContrailRouteTopology.java
+**/GenericResourceApiPreloadModelInformation.java
+**/GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.java
+**/GenericResourceApiPreloadmodelinformationPreloadList.java
+**/GenericResourceApiPreloaddataPreloadData.java
+**/GenericResourceApiServicedataServiceData.java
+**/GenericResourceApiServicestatusServiceStatus.java
+**/GenericResourceApiServicedataServicedataVnfsVnf.java
+**/GenericResourceApiVnftopologyVnfTopology.java
+**/GenericResourceApiServicetopologyServiceTopology.java
+**/GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule.java
+**/GenericResourceApiVfmoduletopologyVfModuleTopology.java
+**/GenericResourceApiNetworkinstancegroupNetworkInstanceGroup.java
+**/GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork.java
+**/GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.java
+**/GenericResourceApiOnapmodelinformationOnapModelInformation.java
+**/GenericResourceApiOperStatusData.java
+**/GenericResourceApiServicedataServicedataNetworks.java
+**/GenericResourceApiServicedataServicedataNetworksNetwork.java
+**/GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources.java
+**/GenericResourceApiVpnbindingsVpnBindings.java
+**/GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks.java
+**/GenericResourceApiVnfNetworkData.java
+**/GenericResourceApiContrailRouteAllottedResources.java
+**/GenericResourceApiPortMirrorConfigurations.java
diff --git a/ms/gra/gra-app/pom.xml b/ms/gra/gra-app/pom.xml
index d122be5..e076644 100644
--- a/ms/gra/gra-app/pom.xml
+++ b/ms/gra/gra-app/pom.xml
@@ -26,12 +26,17 @@
<dependencies>
<dependency>
+ <groupId>org.onap.sdnc.apps</groupId>
+ <artifactId>sanity-test-app</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
@@ -47,6 +52,12 @@
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
</dependency>
+ <!-- Needed by logging-analytics payload logging filter -->
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-spring-boot-starter-jaxrs</artifactId>
+ <version>3.4.4</version>
+ </dependency>
<dependency>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-auth-client</artifactId>
@@ -81,6 +92,10 @@
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-actuator</artifactId>
+ </dependency>
+ <dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>3.0.0</version>
@@ -187,6 +202,7 @@
<version>1.6.2</version>
<scope>test</scope>
</dependency>
+
</dependencies>
<build>
@@ -291,7 +307,7 @@
</goals>
<configuration>
<sources>
- <source>${project.basedir}/target/generated-sources/src/main/java</source>
+ <source>${basedir}/target/generated-sources/src/main/java</source>
</sources>
</configuration>
</execution>
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/FilterConfiguration.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/FilterConfiguration.java
index c054a1b..fb09cf8 100644
--- a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/FilterConfiguration.java
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/FilterConfiguration.java
@@ -6,6 +6,8 @@ import java.io.IOException;
import java.util.Properties;
import org.onap.aaf.cadi.filter.CadiFilter;
+import org.onap.ccsdk.apps.filters.AuditLogFilter;
+import org.onap.ccsdk.apps.filters.PayloadLoggingFilter;
import org.onap.ccsdk.sli.core.utils.common.EnvProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -17,23 +19,50 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
@Configuration
-@ConditionalOnProperty("cadi.properties.path")
public class FilterConfiguration {
- private static final Logger log = LoggerFactory.getLogger(FilterConfiguration.class);
+ private static final Logger log = LoggerFactory.getLogger(FilterConfiguration.class);
- @Value( "${cadi.properties.path:none}" )
+ // Explicitly add CadiFilter to filter chain. Note: autowiring already
+ // adds the filters defined in org.onap.ccsdk.apps.filters package, so do
+ // not need to explicitly insert them here.
+ @Value("${cadi.properties.path:none}")
private String cadiPropFile;
@Bean
@Order(1)
+ public FilterRegistrationBean<PayloadLoggingFilter> loggingFilter() {
+ FilterRegistrationBean<PayloadLoggingFilter> registrationBean = new FilterRegistrationBean<>();
+
+ registrationBean.setFilter(new PayloadLoggingFilter());
+ registrationBean.addUrlPatterns("/config/*", "/operational/*", "/operations/*");
+
+ return registrationBean;
+ }
+
+
+ @Bean
+ @Order(2)
+ public FilterRegistrationBean<AuditLogFilter> auditFilter() {
+ FilterRegistrationBean<AuditLogFilter> registrationBean = new FilterRegistrationBean<>();
+
+ registrationBean.setFilter(new AuditLogFilter());
+ registrationBean.addUrlPatterns("/config/*", "/operational/*", "/operations/*");
+
+ return registrationBean;
+ }
+
+
+ @Bean
+ @Order(3)
public FilterRegistrationBean<CadiFilter> cadiFilter() {
- CadiFilter filter = new CadiFilter();
+ CadiFilter filter = new CadiFilter();
+
FilterRegistrationBean<CadiFilter> registrationBean = new FilterRegistrationBean<>();
registrationBean.setFilter(filter);
- if ("none".equals(cadiPropFile)) {
- log.info("cadi.properties.path undefined, AAF CADI disabled");
+ if ("none".equals(cadiPropFile)){
+ log.info(" AAF CADI disabled");
registrationBean.setEnabled(false);
registrationBean.addUrlPatterns("/xxxx/*");
} else {
@@ -64,4 +93,6 @@ public class FilterConfiguration {
return registrationBean;
}
+
+
}
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/GenericResourceMsApp.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/GenericResourceMsApp.java
index d436d21..9244ca4 100644
--- a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/GenericResourceMsApp.java
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/GenericResourceMsApp.java
@@ -23,18 +23,26 @@ package org.onap.sdnc.apps.ms.gra;
import org.onap.ccsdk.apps.ms.sliboot.controllers.RestconfApiController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
+import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
-@SpringBootApplication(scanBasePackages = { "org.onap.sdnc.apps.ms.gra", "org.onap.ccsdk.apps.services" })
-@EnableJpaRepositories(basePackages = { "org.onap.sdnc.apps.ms.gra", "org.onap.ccsdk.apps.ms.sliboot" })
-@EntityScan(basePackages = { "org.onap.sdnc.apps.ms.gra", "org.onap.ccsdk.apps.ms.sliboot" })
+@SpringBootApplication(scanBasePackages = { "org.onap.sdnc.apps.ms.gra", "org.onap.sdnc.apps.ms.sanitytest","org.onap.ccsdk.apps.services" })
+@EnableJpaRepositories(basePackages = { "org.onap.sdnc.apps.ms.gra", "org.onap.sdnc.apps.ms.sanitytest","org.onap.ccsdk.apps.ms.sliboot.data" })
+@EntityScan(basePackages = { "org.onap.sdnc.apps.ms.gra","org.onap.sdnc.apps.ms.sanitytest", "org.onap.ccsdk.apps.ms.sliboot.data", "org.onap.ccsdk.apps.ms.sliboot.controllers" })
@EnableTransactionManagement
@Import(RestconfApiController.class)
@EnableSwagger2
@@ -43,7 +51,45 @@ public class GenericResourceMsApp {
private static final Logger log = LoggerFactory.getLogger(GenericResourceMsApp.class);
+ @Value( "${swagger-ui.host:localhost}" )
+ private String swaggerUiHost;
+
+ @Value( "${swagger-ui.title:'SDNC : API Documentation'}" )
+ private String swaggerUiTitle;
+
+ @Value( "${swagger-ui.description:'SDNC : API Documentation'}" )
+ private String swaggerUiDescription;
+
+ @Bean
+ public Docket api() {
+ if (!"localhost".equalsIgnoreCase(swaggerUiHost)) {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .host(swaggerUiHost)
+ .select()
+ .apis(RequestHandlerSelectors.basePackage("org.onap")).paths(PathSelectors.any())
+ .build()
+ .apiInfo(apiInfo());
+ } else {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .select()
+ .apis(RequestHandlerSelectors.basePackage("org.onap")).paths(PathSelectors.any())
+ .build()
+ .apiInfo(apiInfo());
+ }
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfoBuilder()
+ .title(swaggerUiTitle)
+ .description(swaggerUiDescription)
+ .build();
+ }
+
+
+
public static void main(String[] args) throws Exception {
SpringApplication.run(GenericResourceMsApp.class, args);
}
+
+
}
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/GraWebConfiguration.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/GraWebConfiguration.java
new file mode 100644
index 0000000..8a3d5d0
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/GraWebConfiguration.java
@@ -0,0 +1,62 @@
+package org.onap.sdnc.apps.ms.gra;
+
+import java.util.List;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.springframework.aop.framework.ProxyFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration
+public class GraWebConfiguration implements WebMvcConfigurer {
+
+ @Autowired
+ ObjectMapper objectMapper;
+
+ @Value("${swagger-ui.host:localhost}")
+ private String swaggerUiHost;
+
+ private ObjectMapper objectMapperProxy() {
+ ObjectMapperResolver objectMapperResolver = new UriMatcherObjectMapperResolver(objectMapper);
+ ProxyFactory factory = new ProxyFactory();
+ factory.setTargetClass(ObjectMapper.class);
+ factory.addAdvice(new ObjectMapperInterceptor() {
+
+ @Override
+ protected ObjectMapper getObject() {
+ return objectMapperResolver.getObjectMapper();
+ }
+
+ });
+
+ return (ObjectMapper) factory.getProxy();
+ }
+
+ @Bean
+ public MappingJackson2HttpMessageConverter jackson2HttpMessageConverter() {
+ return new MappingJackson2HttpMessageConverter(objectMapperProxy());
+ }
+
+ @Override
+ public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
+ converters.add(jackson2HttpMessageConverter());
+
+ }
+
+ @Bean
+ public WebMvcConfigurer corsConfigurer() {
+ return new WebMvcConfigurer() {
+ @Override
+ public void addCorsMappings(CorsRegistry registry) {
+ registry.addMapping("/**").allowedOrigins("https://" + swaggerUiHost);
+ }
+ };
+ }
+}
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/ObjectMapperInterceptor.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/ObjectMapperInterceptor.java
new file mode 100644
index 0000000..0de0da6
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/ObjectMapperInterceptor.java
@@ -0,0 +1,21 @@
+package org.onap.sdnc.apps.ms.gra;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.aopalliance.intercept.MethodInterceptor;
+import org.aopalliance.intercept.MethodInvocation;
+import org.springframework.util.ReflectionUtils;
+
+public abstract class ObjectMapperInterceptor implements MethodInterceptor {
+
+ @Override
+ public Object invoke(MethodInvocation invocation) throws Throwable {
+ return ReflectionUtils.invokeMethod(invocation.getMethod(), getObject(), invocation.getArguments());
+ }
+
+ protected abstract ObjectMapper getObject();
+
+}
+
+
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/ObjectMapperResolver.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/ObjectMapperResolver.java
new file mode 100644
index 0000000..a6f897d
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/ObjectMapperResolver.java
@@ -0,0 +1,7 @@
+package org.onap.sdnc.apps.ms.gra;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public interface ObjectMapperResolver {
+ ObjectMapper getObjectMapper();
+}
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/UriMatcherObjectMapperResolver.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/UriMatcherObjectMapperResolver.java
new file mode 100644
index 0000000..dc2cf51
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/UriMatcherObjectMapperResolver.java
@@ -0,0 +1,62 @@
+package org.onap.sdnc.apps.ms.gra;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+public class UriMatcherObjectMapperResolver implements ObjectMapperResolver {
+ private static final Logger log = LoggerFactory.getLogger(UriMatcherObjectMapperResolver.class);
+
+ private final ObjectMapper defaultMapper;
+ private final ObjectMapper wrappedMapper;
+ private final ObjectMapper unwrappedMapper;
+
+ public UriMatcherObjectMapperResolver(ObjectMapper defaultMapper) {
+
+ defaultMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
+ defaultMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ this.defaultMapper = defaultMapper;
+ this.wrappedMapper = defaultMapper.copy();
+ wrappedMapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
+ wrappedMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
+ this.unwrappedMapper = defaultMapper.copy();
+ unwrappedMapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
+ unwrappedMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false);
+ }
+
+ @Override
+ public ObjectMapper getObjectMapper() {
+ ServletRequestAttributes sra = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+
+ if (sra == null) {
+ log.debug("Using default objectmapper based on null ServletRequestAttributes");
+ return(defaultMapper);
+ }
+ HttpServletRequest request = sra.getRequest();
+
+ String uri = request.getRequestURI();
+ if (uri.startsWith("/restconf/")) {
+ uri = uri.replaceFirst("/restconf/", "/");
+ }
+
+ if (uri.startsWith("/config/") || uri.startsWith("/operational/")) {
+ log.debug("Using wrapped objectmapper based on uri {}", uri);
+ return(wrappedMapper);
+ } else if (uri.startsWith("/operations/")) {
+ log.debug("Using unwrapper objectmapper based on uri {}", uri);
+ return(unwrappedMapper);
+ }
+
+ log.debug("Using default objectmapper based on uri {}", uri);
+ return defaultMapper;
+ }
+
+ }
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiController.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiController.java
index ac6a333..460bbce 100644
--- a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiController.java
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiController.java
@@ -31,7 +31,9 @@ import javax.validation.Valid;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
import org.onap.ccsdk.apps.services.RestApplicationException;
import org.onap.ccsdk.apps.services.RestException;
@@ -50,11 +52,25 @@ import org.onap.sdnc.apps.ms.gra.data.ConfigVfModules;
import org.onap.sdnc.apps.ms.gra.data.ConfigVfModulesRepository;
import org.onap.sdnc.apps.ms.gra.data.ConfigVnfsRepository;
import org.onap.sdnc.apps.ms.gra.swagger.ConfigApi;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiAggregateroutesAggregateRoutes;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiContrailRouteAllottedResources;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiContrailrouteallottedresourcesContrailrouteallottedresourceAllottedResourceData;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiContrailroutetopologyContrailRouteTopology;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkInstanceGroup;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkInstanceGroup;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkinstancegroupAggregateRoutePolicy;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetworkCustomerBondingRequests;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetworkCustomerbondingrequestsCustomerBondingRequest;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkinstancegroupSubnetAssignmentPolicy;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkinstancegroupVpnBindingPolicy;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworktopologyNetworkTopology;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapmodelinformationOnapModelInformation;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOperStatusData;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPortMirrorConfigurations;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPortmirrorconfigurationsPortmirrorconfigurationConfigurationData;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology;
@@ -62,19 +78,28 @@ import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloadModelInf
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloaddataPreloadData;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloadmodelinformationPreloadList;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiRelatedNetwork;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiRelatednetworkRelatedNetwork;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceModelInfrastructure;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServiceData;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataNetworks;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataNetworksNetwork;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataNetworksNetworkNetworkData;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataVnfsVnf;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataVnfsVnfVnfData;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicemodelinfrastructureService;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicestatusServiceStatus;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicetopologyServiceTopology;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiSubnetsSubnets;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVfmoduletopologyVfModuleTopology;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVlantagsVlanTags;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfNetworkData;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfresourceassignmentsVnfResourceAssignments;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks;
import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnftopologyVnfTopology;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVpnbindingsVpnBindings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -102,19 +127,19 @@ public class ConfigApiController implements ConfigApi {
@Autowired
private ConfigNetworksRepository configNetworksRepository;
-
+
@Autowired
private ConfigVnfsRepository configVnfsRepository;
@Autowired
private ConfigVfModulesRepository configVfModulesRepository;
-
+
@Autowired
private ConfigPortMirrorConfigurationsRepository configPortMirrorConfigurationsRepository;
@Autowired
private ConfigContrailRouteAllottedResourcesRepository configContrailRouteAllottedResourcesRepository;
-
+
@Autowired
private ServiceDataHelper serviceDataHelper;
@@ -143,22 +168,25 @@ public class ConfigApiController implements ConfigApi {
}
/**
- * Extracts port-mirror configuration data from CONFIG_GRA_PORT_MIRROR_CONFIGURATIONS for a given, configuration-id
+ * Extracts port-mirror configuration data from
+ * CONFIG_GRA_PORT_MIRROR_CONFIGURATIONS for a given, configuration-id
* <p>
- * Maps to /config/GENERIC-RESOURCE-API:port-mirror-configurations/port-mirror-configuration/{configuration-id}/
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:port-mirror-configurations/port-mirror-configuration/{configuration-id}/
+ *
* @param configurationId the configuration ID for a port-mirror
* @return HttpStatus.OK (200) if the data is found.
* @throws RestException if the data does not exist.
*/
- public ResponseEntity<GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration>
- configGENERICRESOURCEAPIportMirrorConfigurationsPortMirrorConfigurationConfigurationIdGet(
- String configurationId) throws RestApplicationException {
+ public ResponseEntity<GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration> configGENERICRESOURCEAPIportMirrorConfigurationsPortMirrorConfigurationConfigurationIdGet(
+ String configurationId) throws RestApplicationException {
GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration retval = null;
- List<ConfigPortMirrorConfigurations> pmConfigurations = configPortMirrorConfigurationsRepository.findByConfigurationId(configurationId);
+ List<ConfigPortMirrorConfigurations> pmConfigurations = configPortMirrorConfigurationsRepository
+ .findByConfigurationId(configurationId);
if (pmConfigurations.isEmpty()) {
- log.info("No configuration data found with id [{}]",configurationId);
+ log.info("No configuration data found with id [{}]", configurationId);
throw new RestApplicationException("data-missing",
"Request could not be completed because the relevant data model content does not exist",
HttpStatus.NOT_FOUND.value());
@@ -168,10 +196,13 @@ public class ConfigApiController implements ConfigApi {
retval.setConfigurationId(configurationId);
retval.setConfigurationStatus(pmConfiguration.getPortMirrorConfigurationStatus());
try {
- retval.setConfigurationData(objectMapper.readValue(pmConfiguration.getPmcData(), GenericResourceApiPortmirrorconfigurationsPortmirrorconfigurationConfigurationData.class));
+ retval.setConfigurationData(objectMapper.readValue(pmConfiguration.getPmcData(),
+ GenericResourceApiPortmirrorconfigurationsPortmirrorconfigurationConfigurationData.class));
} catch (JsonProcessingException e) {
log.error("Could not deserialize service data for service instance id {}", configurationId, e);
- throw new RestApplicationException("data-conversion", "Request could not be completed due to internal error", e, HttpStatus.INTERNAL_SERVER_ERROR.value());
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
}
}
return new ResponseEntity<>(retval, HttpStatus.OK);
@@ -179,15 +210,17 @@ public class ConfigApiController implements ConfigApi {
@Override
public ResponseEntity<Void> configGENERICRESOURCEAPIportMirrorConfigurationsPortMirrorConfigurationConfigurationIdPut(
- String configurationId, @Valid GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration newConfiguration)
- throws RestApplicationException {
+ String configurationId,
+ @Valid GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration newConfiguration)
+ throws RestApplicationException {
boolean dataExists = false;
String newConfigurationId = newConfiguration.getConfigurationId();
ConfigPortMirrorConfigurations portMirrorConfiguration = null;
- List<ConfigPortMirrorConfigurations> existingConfiguration = configPortMirrorConfigurationsRepository.findByConfigurationId(configurationId);
+ List<ConfigPortMirrorConfigurations> existingConfiguration = configPortMirrorConfigurationsRepository
+ .findByConfigurationId(configurationId);
if ((existingConfiguration != null) && !existingConfiguration.isEmpty()) {
dataExists = true;
portMirrorConfiguration = existingConfiguration.get(0);
@@ -197,10 +230,14 @@ public class ConfigApiController implements ConfigApi {
}
try {
- portMirrorConfiguration.setPmcData(objectMapper.writeValueAsString(newConfiguration.getConfigurationData()));
+ portMirrorConfiguration
+ .setPmcData(objectMapper.writeValueAsString(newConfiguration.getConfigurationData()));
} catch (JsonProcessingException e) {
- log.error("Could not serialize porr-mirror configuration data for {}", portMirrorConfiguration.getConfigurationId(), e);
- throw new RestApplicationException("data-conversion", "Request could not be completed due to internal error", e, HttpStatus.INTERNAL_SERVER_ERROR.value());
+ log.error("Could not serialize porr-mirror configuration data for {}",
+ portMirrorConfiguration.getConfigurationId(), e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
}
portMirrorConfiguration.setPortMirrorConfigurationStatus(newConfiguration.getConfigurationStatus());
@@ -214,13 +251,14 @@ public class ConfigApiController implements ConfigApi {
}
@Override
- public ResponseEntity<GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology>
- configGENERICRESOURCEAPIportMirrorConfigurationsPortMirrorConfigurationConfigurationIdConfigurationDataPortMirrorConfigurationTopologyGet(
- String configurationId) throws RestApplicationException, RestProtocolException {
- @Valid GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology portMirrorConfigurationTopology = null;
+ public ResponseEntity<GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology> configGENERICRESOURCEAPIportMirrorConfigurationsPortMirrorConfigurationConfigurationIdConfigurationDataPortMirrorConfigurationTopologyGet(
+ String configurationId) throws RestApplicationException, RestProtocolException {
+ @Valid
+ GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology portMirrorConfigurationTopology = null;
GenericResourceApiPortmirrorconfigurationsPortmirrorconfigurationConfigurationData portMirrorConfigurationData = null;
- List<ConfigPortMirrorConfigurations> configPortMirrorConfigurations = configPortMirrorConfigurationsRepository.findByConfigurationId(configurationId);
+ List<ConfigPortMirrorConfigurations> configPortMirrorConfigurations = configPortMirrorConfigurationsRepository
+ .findByConfigurationId(configurationId);
if ((configPortMirrorConfigurations == null) || (configPortMirrorConfigurations.isEmpty())) {
log.info("No configuration data found with id [{}]", configurationId);
throw new RestApplicationException("data-missing",
@@ -229,51 +267,180 @@ public class ConfigApiController implements ConfigApi {
}
try {
- if ( configPortMirrorConfigurations.get(0).getPmcData().isEmpty()) {
- throw new RestProtocolException("data-missing", "No configuration-data entry found", HttpStatus.NOT_FOUND.value());
+ if (configPortMirrorConfigurations.get(0).getPmcData().isEmpty()) {
+ throw new RestProtocolException("data-missing", "No configuration-data entry found",
+ HttpStatus.NOT_FOUND.value());
} else {
- portMirrorConfigurationData = objectMapper.readValue(configPortMirrorConfigurations.get(0).getPmcData(), GenericResourceApiPortmirrorconfigurationsPortmirrorconfigurationConfigurationData.class);
+ portMirrorConfigurationData = objectMapper.readValue(configPortMirrorConfigurations.get(0).getPmcData(),
+ GenericResourceApiPortmirrorconfigurationsPortmirrorconfigurationConfigurationData.class);
portMirrorConfigurationTopology = portMirrorConfigurationData.getPortMirrorConfigurationTopology();
}
if (portMirrorConfigurationTopology == null) {
- throw new RestProtocolException("data-missing", "No service-topology entry found", HttpStatus.NOT_FOUND.value());
+ throw new RestProtocolException("data-missing", "No service-topology entry found",
+ HttpStatus.NOT_FOUND.value());
}
return new ResponseEntity<>(portMirrorConfigurationTopology, HttpStatus.OK);
} catch (JsonProcessingException e) {
log.error("Could not parse service data", e);
- throw new RestApplicationException("data-conversion", "Request could not be completed due to internal error", e, HttpStatus.INTERNAL_SERVER_ERROR.value());
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
}
}
-
@Override
- public ResponseEntity<Void> configGENERICRESOURCEAPIportMirrorConfigurationsPortMirrorConfigurationConfigurationIdDelete(String configurationId) {
+ public ResponseEntity<Void> configGENERICRESOURCEAPIportMirrorConfigurationsPortMirrorConfigurationConfigurationIdDelete(
+ String configurationId) {
configPortMirrorConfigurationsRepository.deleteByConfigurationId(configurationId);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIportMirrorConfigurationsPost(
+ @Valid GenericResourceApiPortMirrorConfigurations genericResourceApiPortMirrorConfigurationsBodyParam)
+ throws RestException {
+ boolean dataExists = false;
+
+ for (GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration portMirrorConfigItem : genericResourceApiPortMirrorConfigurationsBodyParam
+ .getPortMirrorConfiguration()) {
+ String configurationId = portMirrorConfigItem.getConfigurationId();
+ List<ConfigPortMirrorConfigurations> existingConfiguration = configPortMirrorConfigurationsRepository
+ .findByConfigurationId(configurationId);
+ if ((existingConfiguration != null) && !existingConfiguration.isEmpty()) {
+
+ log.error("Port mirror configuration data already exists for {}", configurationId);
+ throw new RestProtocolException("data-exists",
+ "Data already exists for configuration-id " + configurationId, HttpStatus.CONFLICT.value());
+ }
+ ConfigPortMirrorConfigurations portMirrorConfiguration = null;
+
+ if ((existingConfiguration != null) && !existingConfiguration.isEmpty()) {
+ dataExists = true;
+ portMirrorConfiguration = existingConfiguration.get(0);
+ } else {
+ portMirrorConfiguration = new ConfigPortMirrorConfigurations();
+ portMirrorConfiguration.setConfigurationId(configurationId);
+ }
+
+ try {
+ portMirrorConfiguration
+ .setPmcData(objectMapper.writeValueAsString(portMirrorConfigItem.getConfigurationData()));
+ } catch (JsonProcessingException e) {
+ log.error("Could not serialize port-mirror configuration data for {}",
+ portMirrorConfiguration.getConfigurationId(), e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+
+ }
+ portMirrorConfiguration.setPortMirrorConfigurationStatus(portMirrorConfigItem.getConfigurationStatus());
+ configPortMirrorConfigurationsRepository.save(portMirrorConfiguration);
+
+ }
+
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+
+
+ @Override
+ public ResponseEntity<GenericResourceApiPortMirrorConfigurations> configGENERICRESOURCEAPIportMirrorConfigurationsGet()
+ throws RestException {
+
+ if (configPortMirrorConfigurationsRepository.count() == 0) {
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiPortMirrorConfigurations retval = new GenericResourceApiPortMirrorConfigurations();
+
+ for (ConfigPortMirrorConfigurations pmConfiguration : configPortMirrorConfigurationsRepository.findAll()) {
+ GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration pmItem = new GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration();
+ pmItem.setConfigurationId(pmConfiguration.getConfigurationId());
+ pmItem.setConfigurationStatus(pmConfiguration.getPortMirrorConfigurationStatus());
+ try {
+ pmItem.setConfigurationData(objectMapper.readValue(pmConfiguration.getPmcData(),
+ GenericResourceApiPortmirrorconfigurationsPortmirrorconfigurationConfigurationData.class));
+ retval.addPortMirrorConfigurationItem(pmItem);
+ } catch (JsonProcessingException e) {
+ log.error("Could not deserialize service data for service instance id {}", pmConfiguration.getConfigurationId(), e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ }
+
+ return new ResponseEntity<>(retval, HttpStatus.OK);
+ }
+
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIportMirrorConfigurationsPut(
+ @Valid GenericResourceApiPortMirrorConfigurations genericResourceApiPortMirrorConfigurationsBodyParam)
+ throws RestException {
+ boolean dataExists = false;
+
+ for (GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration portMirrorConfigItem : genericResourceApiPortMirrorConfigurationsBodyParam
+ .getPortMirrorConfiguration()) {
+ String configurationId = portMirrorConfigItem.getConfigurationId();
+ List<ConfigPortMirrorConfigurations> existingConfiguration = configPortMirrorConfigurationsRepository
+ .findByConfigurationId(configurationId);
+
+ ConfigPortMirrorConfigurations portMirrorConfiguration = null;
+
+ if ((existingConfiguration != null) && !existingConfiguration.isEmpty()) {
+ dataExists = true;
+ portMirrorConfiguration = existingConfiguration.get(0);
+ } else {
+ portMirrorConfiguration = new ConfigPortMirrorConfigurations();
+ portMirrorConfiguration.setConfigurationId(configurationId);
+ }
+
+ try {
+ portMirrorConfiguration
+ .setPmcData(objectMapper.writeValueAsString(portMirrorConfigItem.getConfigurationData()));
+ } catch (JsonProcessingException e) {
+ log.error("Could not serialize port-mirror configuration data for {}",
+ portMirrorConfiguration.getConfigurationId(), e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+
+ }
+ portMirrorConfiguration.setPortMirrorConfigurationStatus(portMirrorConfigItem.getConfigurationStatus());
+ configPortMirrorConfigurationsRepository.save(portMirrorConfiguration);
+
+ }
+
+ if (dataExists) {
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ } else {
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+ }
+
/**
- * Extracts contrail-route-allotted-resource data from CONFIG_GRA_CONTRAIL_ROUTE_ALLOTTED_RESOURCES for a given allottedResourceId
+ * Extracts contrail-route-allotted-resource data from
+ * CONFIG_GRA_CONTRAIL_ROUTE_ALLOTTED_RESOURCES for a given allottedResourceId
* <p>
- * Maps to /config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}
+ *
* @param allottedResourceId the allotted-resource-id for a contrail-route
* @return HttpStatus.OK (200) if the data is found.
* @throws RestException if the data does not exist.
*/
- public ResponseEntity<GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource>
- configGENERICRESOURCEAPIcontrailRouteAllottedResourcesContrailRouteAllottedResourceAllottedResourceIdGet(
- String allottedResourceId) throws RestApplicationException {
+ public ResponseEntity<GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource> configGENERICRESOURCEAPIcontrailRouteAllottedResourcesContrailRouteAllottedResourceAllottedResourceIdGet(
+ String allottedResourceId) throws RestApplicationException {
GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource retval = null;
- List<ConfigContrailRouteAllottedResources> allottedResources = configContrailRouteAllottedResourcesRepository.findByAllottedResourceId(allottedResourceId);
+ List<ConfigContrailRouteAllottedResources> allottedResources = configContrailRouteAllottedResourcesRepository
+ .findByAllottedResourceId(allottedResourceId);
if (allottedResources.isEmpty()) {
log.info("No contrail-route-allotted-resource found with id [{}]", allottedResourceId);
throw new RestApplicationException("data-missing",
"Request could not be completed because the relevant data model content does not exist",
HttpStatus.NOT_FOUND.value());
- }
- else {
+ } else {
ConfigContrailRouteAllottedResources allottedResource = allottedResources.get(0);
retval = new GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource();
retval.setAllottedResourceId(allottedResourceId);
@@ -283,23 +450,29 @@ public class ConfigApiController implements ConfigApi {
GenericResourceApiContrailrouteallottedresourcesContrailrouteallottedresourceAllottedResourceData.class));
} catch (JsonProcessingException e) {
log.error("Could not deserialize service data for service instance id {}", allottedResourceId, e);
- throw new RestApplicationException("data-conversion", "Request could not be completed due to internal error", e, HttpStatus.INTERNAL_SERVER_ERROR.value());
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
}
}
return new ResponseEntity<>(retval, HttpStatus.OK);
}
/**
- * PUT contrail-route-allotted-resource data from CONFIG_GRA_CONTRAIL_ROUTE_ALLOTTED_RESOURCES for a given allottedResourceId
+ * PUT contrail-route-allotted-resource data from
+ * CONFIG_GRA_CONTRAIL_ROUTE_ALLOTTED_RESOURCES for a given allottedResourceId
* <p>
- * Maps to /config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}
+ *
* @param allottedResourceId the allotted-resource-id for a contrail-route
* @return HttpStatus.OK (200) if the data is found.
* @throws RestException if the data does not exist.
*/
@Override
public ResponseEntity<Void> configGENERICRESOURCEAPIcontrailRouteAllottedResourcesContrailRouteAllottedResourceAllottedResourceIdPut(
- String allottedResourceId, @Valid GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource newAllottedResource)
+ String allottedResourceId,
+ @Valid GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource newAllottedResource)
throws RestApplicationException {
boolean dataExists = false;
@@ -307,8 +480,8 @@ public class ConfigApiController implements ConfigApi {
String newAllottedResourceId = newAllottedResource.getAllottedResourceId();
ConfigContrailRouteAllottedResources allottedResource = null;
- List<ConfigContrailRouteAllottedResources> existingAllottedResource =
- configContrailRouteAllottedResourcesRepository.findByAllottedResourceId(allottedResourceId);
+ List<ConfigContrailRouteAllottedResources> existingAllottedResource = configContrailRouteAllottedResourcesRepository
+ .findByAllottedResourceId(allottedResourceId);
if ((existingAllottedResource != null) && !existingAllottedResource.isEmpty()) {
dataExists = true;
@@ -321,8 +494,11 @@ public class ConfigApiController implements ConfigApi {
try {
allottedResource.setArData(objectMapper.writeValueAsString(newAllottedResource.getAllottedResourceData()));
} catch (JsonProcessingException e) {
- log.error("Could not serialize porr-mirror configuration data for {}", allottedResource.getAllottedResourceId(), e);
- throw new RestApplicationException("data-conversion", "Request could not be completed due to internal error", e, HttpStatus.INTERNAL_SERVER_ERROR.value());
+ log.error("Could not serialize port-mirror configuration data for {}",
+ allottedResource.getAllottedResourceId(), e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
}
allottedResource.setAllottedResourceStatus(newAllottedResource.getAllottedResourceStatus());
@@ -336,33 +512,37 @@ public class ConfigApiController implements ConfigApi {
}
/**
- * Extracts contrail-route-topology data from CONFIG_GRA_CONTRAIL_ROUTE_ALLOTTED_RESOURCES for a given allottedResourceId
+ * Extracts contrail-route-topology data from
+ * CONFIG_GRA_CONTRAIL_ROUTE_ALLOTTED_RESOURCES for a given allottedResourceId
* <p>
- * Maps to /config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}/allotted-resource-data/contrail-route-topology/
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}/allotted-resource-data/contrail-route-topology/
+ *
* @param allottedResourceId the allotted-resource-id for a contrail-route
* @return HttpStatus.OK (200) if the data is found.
* @throws RestException if the data does not exist.
*/
@Override
- public ResponseEntity<GenericResourceApiContrailroutetopologyContrailRouteTopology>
- configGENERICRESOURCEAPIcontrailRouteAllottedResourcesContrailRouteAllottedResourceAllottedResourceIdAllottedResourceDataContrailRouteTopologyGet(
- String allottedResourceId) throws RestApplicationException, RestProtocolException {
- @Valid GenericResourceApiContrailroutetopologyContrailRouteTopology contrailRouteTopology = null;
+ public ResponseEntity<GenericResourceApiContrailroutetopologyContrailRouteTopology> configGENERICRESOURCEAPIcontrailRouteAllottedResourcesContrailRouteAllottedResourceAllottedResourceIdAllottedResourceDataContrailRouteTopologyGet(
+ String allottedResourceId) throws RestApplicationException, RestProtocolException {
+ @Valid
+ GenericResourceApiContrailroutetopologyContrailRouteTopology contrailRouteTopology = null;
GenericResourceApiContrailrouteallottedresourcesContrailrouteallottedresourceAllottedResourceData allottedResourceData = null;
- List<ConfigContrailRouteAllottedResources> configContrailRouteAllottedResources =
- configContrailRouteAllottedResourcesRepository.findByAllottedResourceId(allottedResourceId);
+ List<ConfigContrailRouteAllottedResources> configContrailRouteAllottedResources = configContrailRouteAllottedResourcesRepository
+ .findByAllottedResourceId(allottedResourceId);
if ((configContrailRouteAllottedResources == null) || (configContrailRouteAllottedResources.isEmpty())) {
- log.info("No contrail-route-allotted-resoure data found with id [{}]", allottedResourceId);
+ log.info("No contrail-route-allotted-resource data found with id [{}]", allottedResourceId);
throw new RestApplicationException("data-missing",
"Request could not be completed because the relevant data model content does not exist",
HttpStatus.NOT_FOUND.value());
}
try {
- if ( configContrailRouteAllottedResources.get(0).getArData().isEmpty()) {
- throw new RestProtocolException("data-missing", "No allotted-resource-data entry found", HttpStatus.NOT_FOUND.value());
+ if (configContrailRouteAllottedResources.get(0).getArData().isEmpty()) {
+ throw new RestProtocolException("data-missing", "No allotted-resource-data entry found",
+ HttpStatus.NOT_FOUND.value());
} else {
allottedResourceData = objectMapper.readValue(configContrailRouteAllottedResources.get(0).getArData(),
GenericResourceApiContrailrouteallottedresourcesContrailrouteallottedresourceAllottedResourceData.class);
@@ -370,20 +550,25 @@ public class ConfigApiController implements ConfigApi {
contrailRouteTopology = allottedResourceData.getContrailRouteTopology();
}
if (contrailRouteTopology == null) {
- throw new RestProtocolException("data-missing", "No contrail-route-topology entry found", HttpStatus.NOT_FOUND.value());
+ throw new RestProtocolException("data-missing", "No contrail-route-topology entry found",
+ HttpStatus.NOT_FOUND.value());
}
return new ResponseEntity<>(contrailRouteTopology, HttpStatus.OK);
} catch (JsonProcessingException e) {
log.error("Could not parse port-mirror-configuration data", e);
- throw new RestApplicationException("data-conversion", "Request could not be completed due to internal error", e, HttpStatus.INTERNAL_SERVER_ERROR.value());
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
}
}
-
/**
- * DELETE allotted-resource data from CONFIG_GRA_CONTRAIL_ROUTE_ALLOTTED_RESOURCES for a given allottedResourceId
+ * DELETE allotted-resource data from
+ * CONFIG_GRA_CONTRAIL_ROUTE_ALLOTTED_RESOURCES for a given allottedResourceId
* <p>
- * Maps to /config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}
+ *
* @param allottedResourceId the allotted-resource-id for a contrail-route
* @return HttpStatus.NO_CONTENT (204) if the data is found.
*/
@@ -394,6 +579,124 @@ public class ConfigApiController implements ConfigApi {
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
+
+
+ @Override
+ public ResponseEntity<GenericResourceApiContrailRouteAllottedResources> configGENERICRESOURCEAPIcontrailRouteAllottedResourcesGet()
+ throws RestException {
+
+ if (configContrailRouteAllottedResourcesRepository.count() == 0) {
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ GenericResourceApiContrailRouteAllottedResources retval = new GenericResourceApiContrailRouteAllottedResources();
+
+ for (ConfigContrailRouteAllottedResources allottedResource : configContrailRouteAllottedResourcesRepository.findAll()) {
+
+ GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource curItem = new GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource();
+ curItem.setAllottedResourceId(allottedResource.getAllottedResourceId());
+ curItem.setAllottedResourceStatus(allottedResource.getAllottedResourceStatus());
+ try {
+ curItem.setAllottedResourceData(objectMapper.readValue(allottedResource.getArData(),
+ GenericResourceApiContrailrouteallottedresourcesContrailrouteallottedresourceAllottedResourceData.class));
+ retval.addContrailRouteAllottedResourceItem(curItem);
+ } catch (JsonProcessingException e) {
+ log.error("Could not deserialize service data for service instance id {}", allottedResource.getAllottedResourceId(), e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ }
+
+ return new ResponseEntity<>(retval, HttpStatus.OK);
+ }
+
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIcontrailRouteAllottedResourcesPost(
+ @Valid GenericResourceApiContrailRouteAllottedResources genericResourceApiContrailRouteAllottedResourcesBodyParam)
+ throws RestException {
+ for (GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource contrailItem : genericResourceApiContrailRouteAllottedResourcesBodyParam
+ .getContrailRouteAllottedResource()) {
+ String allottedResourceId = contrailItem.getAllottedResourceId();
+ List<ConfigContrailRouteAllottedResources> existingResources = configContrailRouteAllottedResourcesRepository
+ .findByAllottedResourceId(allottedResourceId);
+
+ ConfigContrailRouteAllottedResources allottedResource = null;
+
+ if ((existingResources != null) && !existingResources.isEmpty()) {
+ log.error("Contrail route allotted resource data already exists for {}", allottedResourceId);
+ throw new RestProtocolException("data-exists",
+ "Data already exists for allotted-resource-id " + allottedResourceId,
+ HttpStatus.CONFLICT.value());
+ } else {
+ allottedResource = new ConfigContrailRouteAllottedResources();
+ allottedResource.setAllottedResourceId(allottedResourceId);
+ }
+
+ try {
+ allottedResource.setArData(objectMapper.writeValueAsString(contrailItem.getAllottedResourceData()));
+ } catch (JsonProcessingException e) {
+ log.error("Could not serialize porr-mirror configuration data for {}",
+ allottedResource.getAllottedResourceId(), e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+
+ }
+ allottedResource.setAllottedResourceStatus(contrailItem.getAllottedResourceStatus());
+ configContrailRouteAllottedResourcesRepository.save(allottedResource);
+
+ }
+
+ return new ResponseEntity<>(HttpStatus.CREATED);
+
+ }
+
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIcontrailRouteAllottedResourcesPut(
+ @Valid GenericResourceApiContrailRouteAllottedResources genericResourceApiContrailRouteAllottedResourcesBodyParam)
+ throws RestException {
+ boolean dataExists = false;
+
+ for (GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource contrailItem : genericResourceApiContrailRouteAllottedResourcesBodyParam
+ .getContrailRouteAllottedResource()) {
+ String allottedResourceId = contrailItem.getAllottedResourceId();
+ List<ConfigContrailRouteAllottedResources> existingResources = configContrailRouteAllottedResourcesRepository
+ .findByAllottedResourceId(allottedResourceId);
+
+ ConfigContrailRouteAllottedResources allottedResource = null;
+
+ if ((existingResources != null) && !existingResources.isEmpty()) {
+ dataExists = true;
+ allottedResource = existingResources.get(0);
+ } else {
+ allottedResource = new ConfigContrailRouteAllottedResources();
+ allottedResource.setAllottedResourceId(allottedResourceId);
+ }
+
+ try {
+ allottedResource.setArData(objectMapper.writeValueAsString(contrailItem.getAllottedResourceData()));
+ } catch (JsonProcessingException e) {
+ log.error("Could not serialize porr-mirror configuration data for {}",
+ allottedResource.getAllottedResourceId(), e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+
+ }
+ allottedResource.setAllottedResourceStatus(contrailItem.getAllottedResourceStatus());
+ configContrailRouteAllottedResourcesRepository.save(allottedResource);
+
+ }
+
+ if (dataExists) {
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ } else {
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+ }
@Override
public ResponseEntity<GenericResourceApiPreloadModelInformation> configGENERICRESOURCEAPIpreloadInformationGet()
@@ -450,11 +753,10 @@ public class ConfigApiController implements ConfigApi {
HttpStatus.INTERNAL_SERVER_ERROR.value());
}
}
-
+
return new ResponseEntity<>(netTopoInfo, HttpStatus.OK);
}
-
@Override
public ResponseEntity<Void> configGENERICRESOURCEAPIpreloadInformationPost(
@Valid GenericResourceApiPreloadModelInformation graPreloadModelInfo)
@@ -705,7 +1007,6 @@ public class ConfigApiController implements ConfigApi {
String preloadId, String preloadType, @Valid GenericResourceApiPreloaddataPreloadData preloadData)
throws RestApplicationException, RestProtocolException {
-
List<ConfigPreloadData> preloadDataItems = configPreloadDataRepository.findByPreloadIdAndPreloadType(preloadId,
preloadType);
if ((preloadDataItems == null) || (preloadDataItems.isEmpty())) {
@@ -815,7 +1116,6 @@ public class ConfigApiController implements ConfigApi {
HttpStatus.INTERNAL_SERVER_ERROR.value());
}
-
if (serviceItemSvcData != null) {
serviceItem.setServiceData(serviceItemSvcData);
}
@@ -827,9 +1127,10 @@ public class ConfigApiController implements ConfigApi {
}
@Override
- public ResponseEntity<Void> configGENERICRESOURCEAPIservicesPost(@Valid GenericResourceApiServiceModelInfrastructure modelInfrastructure)
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesPost(
+ @Valid GenericResourceApiServiceModelInfrastructure modelInfrastructure)
throws RestApplicationException, RestProtocolException {
-
+
ServiceDataTransaction transaction = serviceDataHelper.createTransaction();
for (GenericResourceApiServicemodelinfrastructureService serviceItem : modelInfrastructure.getService()) {
@@ -918,7 +1219,7 @@ public class ConfigApiController implements ConfigApi {
@Override
public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdDelete(
String serviceInstanceId) {
- serviceDataHelper.deleteService(serviceInstanceId);
+ serviceDataHelper.deleteService(serviceInstanceId);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -1225,6 +1526,1890 @@ public class ConfigApiController implements ConfigApi {
}
/**
+ * Delete network instance group data from the Config table specified Service
+ * Instance.
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-group/network-instance-group/{network-instance-group-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to delete from
+ * @param networkInstanceGroupId the network instance group ID to delete
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId} does not
+ * exist.
+ */
+
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworkInstanceGroupsNetworkInstanceGroupNetworkInstanceGroupIdDelete(
+ String serviceInstanceId, String networkInstanceGroupId) throws RestException {
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ ConfigServices service = services.get(0);
+
+ if (service.getSvcData() == null) {
+ throw new RestProtocolException("data-missing", "No service-data found", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServiceData svcData = null;
+ try {
+ svcData = objectMapper.readValue(service.getSvcData(), GenericResourceApiServicedataServiceData.class);
+ } catch (JsonProcessingException e) {
+ log.error("Could not deserialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ GenericResourceApiNetworkInstanceGroup curNetInstanceGroup = svcData.getNetworkInstanceGroups();
+ GenericResourceApiNetworkInstanceGroup newNetInstanceGroup = new GenericResourceApiNetworkInstanceGroup();
+
+ List<GenericResourceApiNetworkinstancegroupNetworkInstanceGroup> curList = curNetInstanceGroup
+ .getNetworkInstanceGroup();
+ if (curList != null) {
+ for (GenericResourceApiNetworkinstancegroupNetworkInstanceGroup curItem : curList) {
+ if (!networkInstanceGroupId.equals(curItem.getNetworkInstanceGroupId())) {
+ newNetInstanceGroup.addNetworkInstanceGroupItem(curItem);
+ }
+ }
+ }
+ svcData.setNetworkInstanceGroups(newNetInstanceGroup);
+ try {
+ service.setSvcData(objectMapper.writeValueAsString(svcData));
+ } catch (JsonProcessingException e) {
+
+ log.error("Could not serialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ configServicesRepository.save(service);
+
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ /**
+ * Get network instance group data from the Config table specified Service
+ * Instance.
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-group/network-instance-group/{network-instance-group-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to get
+ * @param networkInstanceGroupId the network instance group ID to get
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId} does not
+ * exist.
+ */
+ @Override
+ public ResponseEntity<GenericResourceApiNetworkinstancegroupNetworkInstanceGroup> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworkInstanceGroupsNetworkInstanceGroupNetworkInstanceGroupIdGet(
+ String serviceInstanceId, String networkInstanceGroupId) throws RestException {
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ ConfigServices service = services.get(0);
+
+ if (service.getSvcData() == null) {
+ throw new RestProtocolException("data-missing", "No service-data found", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServiceData svcData = null;
+ try {
+ svcData = objectMapper.readValue(service.getSvcData(), GenericResourceApiServicedataServiceData.class);
+ } catch (JsonProcessingException e) {
+ log.error("Could not deserialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ GenericResourceApiNetworkInstanceGroup curNetInstanceGroup = svcData.getNetworkInstanceGroups();
+
+ if (curNetInstanceGroup == null) {
+ throw new RestProtocolException("data-missing", "No network-instance-group found",
+ HttpStatus.NOT_FOUND.value());
+ }
+ List<GenericResourceApiNetworkinstancegroupNetworkInstanceGroup> curList = curNetInstanceGroup
+ .getNetworkInstanceGroup();
+
+ if (curList == null) {
+ throw new RestProtocolException("data-missing", "Empty network-instance-group ",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ for (GenericResourceApiNetworkinstancegroupNetworkInstanceGroup curItem : curList) {
+ if (networkInstanceGroupId.equals(curItem.getNetworkInstanceGroupId())) {
+ return new ResponseEntity<>(curItem, HttpStatus.OK);
+ }
+ }
+
+ return new ResponseEntity<>(null, HttpStatus.OK);
+
+ }
+
+ /**
+ * Delete network instance group network data from the Config table specified
+ * Service Instance.
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-group/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to delete from
+ * @param networkInstanceGroupId the network instance group ID to delete
+ * @param networkId the network ID to delete
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId} does not
+ * exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworkInstanceGroupsNetworkInstanceGroupNetworkInstanceGroupIdNetworksNetworkNetworkIdDelete(
+ String serviceInstanceId, String networkInstanceGroupId, String networkId) throws RestException {
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ ConfigServices service = services.get(0);
+
+ if (service.getSvcData() == null) {
+ throw new RestProtocolException("data-missing", "No service-data found", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServiceData svcData = null;
+ try {
+ svcData = objectMapper.readValue(service.getSvcData(), GenericResourceApiServicedataServiceData.class);
+ } catch (JsonProcessingException e) {
+ log.error("Could not deserialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ GenericResourceApiNetworkInstanceGroup curNetInstanceGroup = svcData.getNetworkInstanceGroups();
+
+ List<GenericResourceApiNetworkinstancegroupNetworkInstanceGroup> curList = curNetInstanceGroup
+ .getNetworkInstanceGroup();
+ if (curList != null) {
+ for (GenericResourceApiNetworkinstancegroupNetworkInstanceGroup curItem : curList) {
+ if (networkInstanceGroupId.equals(curItem.getNetworkInstanceGroupId())) {
+ GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks curNetworks = curItem
+ .getNetworks();
+ GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks newNetworks = new GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks();
+ List<GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork> curNetList = curNetworks
+ .getNetwork();
+ for (GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork curNetListItem : curNetList) {
+ if (!networkId.equals(curNetListItem.getNetworkId())) {
+ newNetworks.addNetworkItem(curNetListItem);
+ }
+ }
+ curItem.setNetworks(newNetworks);
+ }
+ }
+
+ }
+ try {
+ service.setSvcData(objectMapper.writeValueAsString(svcData));
+ } catch (JsonProcessingException e) {
+
+ log.error("Could not serialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ configServicesRepository.save(service);
+
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ /**
+ * Get network instance group network data from the Config table specified
+ * Service Instance.
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-group/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to get
+ * @param networkInstanceGroupId the network instance group ID to get
+ * @param networkId the network ID to get
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId} does not
+ * exist.
+ */
+ @Override
+ public ResponseEntity<GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworkInstanceGroupsNetworkInstanceGroupNetworkInstanceGroupIdNetworksNetworkNetworkIdGet(
+ String serviceInstanceId, String networkInstanceGroupId, String networkId) throws RestException {
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ ConfigServices service = services.get(0);
+
+ if (service.getSvcData() == null) {
+ throw new RestProtocolException("data-missing", "No service-data found", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServiceData svcData = null;
+ try {
+ svcData = objectMapper.readValue(service.getSvcData(), GenericResourceApiServicedataServiceData.class);
+ } catch (JsonProcessingException e) {
+ log.error("Could not deserialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ GenericResourceApiNetworkInstanceGroup curNetInstanceGroup = svcData.getNetworkInstanceGroups();
+
+ List<GenericResourceApiNetworkinstancegroupNetworkInstanceGroup> curList = curNetInstanceGroup
+ .getNetworkInstanceGroup();
+ if (curList != null) {
+ for (GenericResourceApiNetworkinstancegroupNetworkInstanceGroup curItem : curList) {
+ if (networkInstanceGroupId.equals(curItem.getNetworkInstanceGroupId())) {
+ GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks curNetworks = curItem
+ .getNetworks();
+ List<GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork> curNetList = curNetworks
+ .getNetwork();
+ for (GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork curNetListItem : curNetList) {
+ if (networkId.equals(curNetListItem.getNetworkId())) {
+ return new ResponseEntity<>(curNetListItem, HttpStatus.OK);
+ }
+ }
+ }
+ }
+
+ }
+
+ return new ResponseEntity<>(null, HttpStatus.OK);
+ }
+
+ /**
+ * Post network to network instance group network data from the Config table
+ * specified Service Instance.
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-group/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to update
+ * @param networkInstanceGroupId the network instance group ID to update
+ * @param networkId the network ID to update
+ * @param network the network to add
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId} does not
+ * exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworkInstanceGroupsNetworkInstanceGroupNetworkInstanceGroupIdNetworksNetworkNetworkIdPost(
+ String serviceInstanceId, String networkInstanceGroupId, String networkId,
+ @Valid GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork network)
+ throws RestException {
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ ConfigServices service = services.get(0);
+
+ if (service.getSvcData() == null) {
+ throw new RestProtocolException("data-missing", "No service-data found", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServiceData svcData = null;
+ try {
+ svcData = objectMapper.readValue(service.getSvcData(), GenericResourceApiServicedataServiceData.class);
+ } catch (JsonProcessingException e) {
+ log.error("Could not deserialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ GenericResourceApiNetworkInstanceGroup curNetInstanceGroup = svcData.getNetworkInstanceGroups();
+
+ List<GenericResourceApiNetworkinstancegroupNetworkInstanceGroup> curList = curNetInstanceGroup
+ .getNetworkInstanceGroup();
+ if (curList != null) {
+ for (GenericResourceApiNetworkinstancegroupNetworkInstanceGroup curItem : curList) {
+ if (networkInstanceGroupId.equals(curItem.getNetworkInstanceGroupId())) {
+ GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks curNetworks = curItem
+ .getNetworks();
+ GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks newNetworks = new GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks();
+ List<GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork> curNetList = curNetworks
+ .getNetwork();
+ for (GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork curNetListItem : curNetList) {
+ if (!networkId.equals(curNetListItem.getNetworkId())) {
+ newNetworks.addNetworkItem(curNetListItem);
+ } else {
+ log.error(
+ "network already exists for svcInstanceId, networkInstanceGroupId, networkId {}, {}, {}",
+ serviceInstanceId, networkInstanceGroupId, networkId);
+ throw new RestProtocolException("data-exists", "Data already exists for "
+ + serviceInstanceId + "/" + networkInstanceGroupId + "/" + networkId,
+ HttpStatus.CONFLICT.value());
+ }
+ }
+ newNetworks.addNetworkItem(network);
+ curItem.setNetworks(newNetworks);
+ }
+ }
+ }
+
+ try {
+ service.setSvcData(objectMapper.writeValueAsString(svcData));
+ } catch (JsonProcessingException e) {
+
+ log.error("Could not serialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ configServicesRepository.save(service);
+
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+
+ /**
+ * Put network to network instance group network data from the Config table
+ * specified Service Instance.
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-group/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to update
+ * @param networkInstanceGroupId the network instance group ID to update
+ * @param networkId the network ID to update
+ * @param network the network to add
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId} does not
+ * exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworkInstanceGroupsNetworkInstanceGroupNetworkInstanceGroupIdNetworksNetworkNetworkIdPut(
+ String serviceInstanceId, String networkInstanceGroupId, String networkId,
+ @Valid GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork network)
+ throws RestException {
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ boolean networkExists = false;
+
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ ConfigServices service = services.get(0);
+
+ if (service.getSvcData() == null) {
+ throw new RestProtocolException("data-missing", "No service-data found", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServiceData svcData = null;
+ try {
+ svcData = objectMapper.readValue(service.getSvcData(), GenericResourceApiServicedataServiceData.class);
+ } catch (JsonProcessingException e) {
+ log.error("Could not deserialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ GenericResourceApiNetworkInstanceGroup curNetInstanceGroup = svcData.getNetworkInstanceGroups();
+
+ List<GenericResourceApiNetworkinstancegroupNetworkInstanceGroup> curList = curNetInstanceGroup
+ .getNetworkInstanceGroup();
+ if (curList != null) {
+ for (GenericResourceApiNetworkinstancegroupNetworkInstanceGroup curItem : curList) {
+ if (networkInstanceGroupId.equals(curItem.getNetworkInstanceGroupId())) {
+ GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks curNetworks = curItem
+ .getNetworks();
+ GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks newNetworks = new GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks();
+ List<GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork> curNetList = curNetworks
+ .getNetwork();
+ for (GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork curNetListItem : curNetList) {
+ if (!networkId.equals(curNetListItem.getNetworkId())) {
+ newNetworks.addNetworkItem(curNetListItem);
+ } else {
+ networkExists = true;
+ newNetworks.addNetworkItem(network);
+ }
+ }
+ if (!networkExists) {
+ newNetworks.addNetworkItem(network);
+ }
+ curItem.setNetworks(newNetworks);
+ }
+ }
+ }
+
+ try {
+ service.setSvcData(objectMapper.writeValueAsString(svcData));
+ } catch (JsonProcessingException e) {
+
+ log.error("Could not serialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ configServicesRepository.save(service);
+
+ if (networkExists) {
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ } else {
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+ }
+
+ /**
+ * Delete vpn binding from network instance group network data from the Config
+ * table specified Service Instance.
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-group/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/vpn-bindings/vpn-binding/{vpn-binding-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to delete from
+ * @param networkInstanceGroupId the network instance group ID to delete
+ * @param networkId the network ID to delete
+ * @param vpnBindingId the vpn binding ID to delete
+ * @return HttpStatus.OK (200) on successful DELETE
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId} does not
+ * exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworkInstanceGroupsNetworkInstanceGroupNetworkInstanceGroupIdNetworksNetworkNetworkIdVpnBindingsVpnBindingIdDelete(
+ String serviceInstanceId, String networkInstanceGroupId, String networkId, String vpnBindingId)
+ throws RestException {
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ ConfigServices service = services.get(0);
+
+ if (service.getSvcData() == null) {
+ throw new RestProtocolException("data-missing", "No service-data found", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServiceData svcData = null;
+ try {
+ svcData = objectMapper.readValue(service.getSvcData(), GenericResourceApiServicedataServiceData.class);
+ } catch (JsonProcessingException e) {
+ log.error("Could not deserialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ GenericResourceApiNetworkInstanceGroup curNetInstanceGroup = svcData.getNetworkInstanceGroups();
+
+ List<GenericResourceApiNetworkinstancegroupNetworkInstanceGroup> curList = curNetInstanceGroup
+ .getNetworkInstanceGroup();
+ if (curList != null) {
+ for (GenericResourceApiNetworkinstancegroupNetworkInstanceGroup curItem : curList) {
+ if (networkInstanceGroupId.equals(curItem.getNetworkInstanceGroupId())) {
+ GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks curNetworks = curItem
+ .getNetworks();
+ List<GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork> curNetList = curNetworks
+ .getNetwork();
+ for (GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork curNetListItem : curNetList) {
+ if (networkId.equals(curNetListItem.getNetworkId())) {
+ List<GenericResourceApiVpnbindingsVpnBindings> curVpnBindings = curNetListItem
+ .getVpnBindings();
+ ArrayList<GenericResourceApiVpnbindingsVpnBindings> newVpnBindings = new ArrayList<>(
+ curVpnBindings.size() - 1);
+ for (GenericResourceApiVpnbindingsVpnBindings curBinding : curVpnBindings) {
+ if (!vpnBindingId.equals(curBinding.getVpnBindingId())) {
+ newVpnBindings.add(curBinding);
+ }
+ }
+ curNetListItem.setVpnBindings(newVpnBindings);
+ }
+ }
+ }
+ }
+
+ }
+ try {
+ service.setSvcData(objectMapper.writeValueAsString(svcData));
+ } catch (JsonProcessingException e) {
+
+ log.error("Could not serialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ configServicesRepository.save(service);
+
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ /**
+ * Get vpn binding from network instance group network data from the Config
+ * table specified Service Instance.
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-group/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/vpn-bindings/vpn-binding/{vpn-binding-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to get
+ * @param networkInstanceGroupId the network instance group ID to get
+ * @param networkId the network ID to get
+ * @param vpnBindingId the vpn binding ID to get
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId} does not
+ * exist.
+ */
+ @Override
+ public ResponseEntity<GenericResourceApiVpnbindingsVpnBindings> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworkInstanceGroupsNetworkInstanceGroupNetworkInstanceGroupIdNetworksNetworkNetworkIdVpnBindingsVpnBindingIdGet(
+ String serviceInstanceId, String networkInstanceGroupId, String networkId, String vpnBindingId)
+ throws RestException {
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ ConfigServices service = services.get(0);
+
+ if (service.getSvcData() == null) {
+ throw new RestProtocolException("data-missing", "No service-data found", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServiceData svcData = null;
+ try {
+ svcData = objectMapper.readValue(service.getSvcData(), GenericResourceApiServicedataServiceData.class);
+ } catch (JsonProcessingException e) {
+ log.error("Could not deserialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ GenericResourceApiNetworkInstanceGroup curNetInstanceGroup = svcData.getNetworkInstanceGroups();
+
+ List<GenericResourceApiNetworkinstancegroupNetworkInstanceGroup> curList = curNetInstanceGroup
+ .getNetworkInstanceGroup();
+ if (curList != null) {
+ for (GenericResourceApiNetworkinstancegroupNetworkInstanceGroup curItem : curList) {
+ if (networkInstanceGroupId.equals(curItem.getNetworkInstanceGroupId())) {
+ GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks curNetworks = curItem
+ .getNetworks();
+ List<GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork> curNetList = curNetworks
+ .getNetwork();
+ for (GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork curNetListItem : curNetList) {
+ if (networkId.equals(curNetListItem.getNetworkId())) {
+ List<GenericResourceApiVpnbindingsVpnBindings> curVpnBindings = curNetListItem
+ .getVpnBindings();
+ for (GenericResourceApiVpnbindingsVpnBindings curBinding : curVpnBindings) {
+ if (vpnBindingId.equals(curBinding.getVpnBindingId())) {
+ return new ResponseEntity<>(curBinding, HttpStatus.OK);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return new ResponseEntity<>(null, HttpStatus.OK);
+ }
+
+ /**
+ * Post vpn binding from network instance group network data from the Config
+ * table specified Service Instance.
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-group/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/vpn-bindings/vpn-binding/{vpn-binding-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to update
+ * @param networkInstanceGroupId the network instance group ID to update
+ * @param networkId the network ID to update
+ * @param vpnBindingId the vpn binding ID to post
+ * @param vpnBinding the vpn binding body to post
+ * @return HttpStatus.CREATED (201) on successful POST
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId} does not
+ * exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworkInstanceGroupsNetworkInstanceGroupNetworkInstanceGroupIdNetworksNetworkNetworkIdVpnBindingsVpnBindingIdPost(
+ String serviceInstanceId, String networkInstanceGroupId, String networkId, String vpnBindingId,
+ @Valid GenericResourceApiVpnbindingsVpnBindings vpnBinding) throws RestException {
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ ConfigServices service = services.get(0);
+
+ if (service.getSvcData() == null) {
+ throw new RestProtocolException("data-missing", "No service-data found", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServiceData svcData = null;
+ try {
+ svcData = objectMapper.readValue(service.getSvcData(), GenericResourceApiServicedataServiceData.class);
+ } catch (JsonProcessingException e) {
+ log.error("Could not deserialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ GenericResourceApiNetworkInstanceGroup curNetInstanceGroup = svcData.getNetworkInstanceGroups();
+
+ List<GenericResourceApiNetworkinstancegroupNetworkInstanceGroup> curList = curNetInstanceGroup
+ .getNetworkInstanceGroup();
+ if (curList != null) {
+ for (GenericResourceApiNetworkinstancegroupNetworkInstanceGroup curItem : curList) {
+ if (networkInstanceGroupId.equals(curItem.getNetworkInstanceGroupId())) {
+ GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks curNetworks = curItem
+ .getNetworks();
+ List<GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork> curNetList = curNetworks
+ .getNetwork();
+ for (GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork curNetListItem : curNetList) {
+ if (networkId.equals(curNetListItem.getNetworkId())) {
+ List<GenericResourceApiVpnbindingsVpnBindings> curVpnBindings = curNetListItem
+ .getVpnBindings();
+ ArrayList<GenericResourceApiVpnbindingsVpnBindings> newVpnBindings = new ArrayList<>(
+ curVpnBindings.size() - 1);
+ for (GenericResourceApiVpnbindingsVpnBindings curBinding : curVpnBindings) {
+ if (!vpnBindingId.equals(curBinding.getVpnBindingId())) {
+ newVpnBindings.add(curBinding);
+ } else {
+ log.error(
+ "vpn-binding already exists for svcInstanceId, networkInstanceGroupId, networkId, vpnBindingId {}, {}, {}, {}",
+ serviceInstanceId, networkInstanceGroupId, networkId, vpnBindingId);
+ throw new RestProtocolException("data-exists",
+ "Data already exists for " + serviceInstanceId + "/"
+ + networkInstanceGroupId + "/" + networkId + "/" + vpnBindingId,
+ HttpStatus.CONFLICT.value());
+ }
+ }
+ newVpnBindings.add(vpnBinding);
+ curNetListItem.setVpnBindings(newVpnBindings);
+ }
+ }
+ }
+ }
+
+ }
+ try {
+ service.setSvcData(objectMapper.writeValueAsString(svcData));
+ } catch (JsonProcessingException e) {
+
+ log.error("Could not serialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ configServicesRepository.save(service);
+
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+
+ /**
+ * Put vpn binding from network instance group network data from the Config
+ * table specified Service Instance.
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-group/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/vpn-bindings/vpn-binding/{vpn-binding-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to update
+ * @param networkInstanceGroupId the network instance group ID to update
+ * @param networkId the network ID to update
+ * @param vpnBindingId the vpn binding ID to post
+ * @param vpnBinding the vpn binding body to post
+ * @return HttpStatus.CREATED (201) on successful POST
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId} does not
+ * exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworkInstanceGroupsNetworkInstanceGroupNetworkInstanceGroupIdNetworksNetworkNetworkIdVpnBindingsVpnBindingIdPut(
+ String serviceInstanceId, String networkInstanceGroupId, String networkId, String vpnBindingId,
+ @Valid GenericResourceApiVpnbindingsVpnBindings vpnBinding) throws RestException {
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ boolean vpnBindingExists = false;
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ ConfigServices service = services.get(0);
+
+ if (service.getSvcData() == null) {
+ throw new RestProtocolException("data-missing", "No service-data found", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServiceData svcData = null;
+ try {
+ svcData = objectMapper.readValue(service.getSvcData(), GenericResourceApiServicedataServiceData.class);
+ } catch (JsonProcessingException e) {
+ log.error("Could not deserialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ GenericResourceApiNetworkInstanceGroup curNetInstanceGroup = svcData.getNetworkInstanceGroups();
+
+ List<GenericResourceApiNetworkinstancegroupNetworkInstanceGroup> curList = curNetInstanceGroup
+ .getNetworkInstanceGroup();
+ if (curList != null) {
+ for (GenericResourceApiNetworkinstancegroupNetworkInstanceGroup curItem : curList) {
+ if (networkInstanceGroupId.equals(curItem.getNetworkInstanceGroupId())) {
+ GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks curNetworks = curItem
+ .getNetworks();
+ List<GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork> curNetList = curNetworks
+ .getNetwork();
+ for (GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork curNetListItem : curNetList) {
+ if (networkId.equals(curNetListItem.getNetworkId())) {
+ List<GenericResourceApiVpnbindingsVpnBindings> curVpnBindings = curNetListItem
+ .getVpnBindings();
+ ArrayList<GenericResourceApiVpnbindingsVpnBindings> newVpnBindings = new ArrayList<>(
+ curVpnBindings.size() - 1);
+ for (GenericResourceApiVpnbindingsVpnBindings curBinding : curVpnBindings) {
+ if (!vpnBindingId.equals(curBinding.getVpnBindingId())) {
+ newVpnBindings.add(curBinding);
+ } else {
+ vpnBindingExists = true;
+ newVpnBindings.add(vpnBinding);
+ }
+ }
+ if (!vpnBindingExists) {
+ newVpnBindings.add(vpnBinding);
+ }
+ curNetListItem.setVpnBindings(newVpnBindings);
+ }
+ }
+ }
+ }
+
+ }
+ try {
+ service.setSvcData(objectMapper.writeValueAsString(svcData));
+ } catch (JsonProcessingException e) {
+
+ log.error("Could not serialize service data for svc instance id {}", serviceInstanceId, e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ configServicesRepository.save(service);
+
+ if (vpnBindingExists) {
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ } else {
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+ }
+
+ /**
+ * Get network data from the Config table specified Service Instance.
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/
+ *
+ * @param serviceInstanceId the Service Instance ID to perform the get on
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId} does not
+ * exist.
+ */
+
+ @Override
+ public ResponseEntity<GenericResourceApiServicedataServicedataNetworks> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksGet(
+ String serviceInstanceId) throws RestException {
+ log.info("GET | Network Data for svcInstanceId ({})", serviceInstanceId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ GenericResourceApiServicedataServicedataNetworks networks = null;
+ try {
+ networks = serviceDataHelper.getNetworks(serviceInstanceId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ return new ResponseEntity<>(networks, HttpStatus.OK);
+ }
+
+ /**
+ * Delete network data from the Config table specified Service Instance and network
+ * id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to perform the get on
+ * @param networkId the network ID to perform the delete on
+ * @return HttpStatus.NO_CONTENT (204) on successful DELETE
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId}
+ * does not exist.
+ */
+
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdDelete(
+ String serviceInstanceId, String networkId) throws RestException {
+ log.info("DELETE | Network Data for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network != null) {
+ serviceDataHelper.deleteNetwork(serviceInstanceId, networkId);
+ }
+
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+
+ }
+
+ /**
+ * Get network data from the Config table specified Service Instance and network
+ * id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to perform the get on
+ * @param networkId the network ID to perform the get on
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId, networkId}
+ * does not exist.
+ */
+
+ @Override
+ public ResponseEntity<GenericResourceApiServicedataServicedataNetworksNetwork> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdGet(
+ String serviceInstanceId, String networkId) throws RestException {
+ log.info("GET | Network Data for serviceInstanceId, networkId ({})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ return new ResponseEntity<>(network, HttpStatus.OK);
+ }
+ /**
+ * Post network data to the Config table specified Service Instance and network
+ * id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to perform the get on
+ * @param networkId the network ID to perform the get on
+ * @return HttpStatus.CREATED (201) on successful POST if new network
+ * <p>
+ * HttpStatus.CONFLICT (409) if network already existed
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId, networkId}
+ * does not exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdPost(
+ String serviceInstanceId, String networkId,
+ @Valid GenericResourceApiServicedataServicedataNetworksNetwork network)
+ throws RestException {
+ log.info("POST | Network Data for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+ ServiceDataTransaction transaction = serviceDataHelper.createTransaction();
+
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+
+ if (serviceDataHelper.networkExists(serviceInstanceId, networkId)) {
+
+ log.error("network already exists for svcInstanceId, networkId {}, {}", serviceInstanceId, networkId);
+ throw new RestProtocolException("data-exists", "Data already exists for " + serviceInstanceId+","+networkId,
+ HttpStatus.CONFLICT.value());
+ }
+
+ try {
+ serviceDataHelper.saveNetwork(serviceInstanceId, network, null);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+
+ /**
+ * Put network data to the Config table specified Service Instance and network
+ * id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/
+ *
+ * @param serviceInstanceId the Service Instance ID to perform the get on
+ * @param networkId the network ID to perform the get on
+ * @return HttpStatus.CREATED (201) on successful PUT if new network
+ * <p>
+ * HttpStatus.NO_CONTENT(204) on successful PUT if network already existed
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId, networkId}
+ * does not exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdPut(
+ String serviceInstanceId, String networkId,
+ @Valid GenericResourceApiServicedataServicedataNetworksNetwork network) throws RestException {
+ log.info("PUT | Network Data for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+ ServiceDataTransaction transaction = serviceDataHelper.createTransaction();
+
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+
+ boolean networkAlreadyExisted = serviceDataHelper.networkExists(serviceInstanceId, networkId);
+
+ try {
+ serviceDataHelper.saveNetwork(serviceInstanceId, network, null);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (networkAlreadyExisted) {
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ } else {
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+
+ }
+
+ /**
+ * Delete network oper status data from the Config table specified Service
+ * Instance and network id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-level-oper-status/
+ *
+ * @param serviceInstanceId the Service Instance ID to update
+ * @param networkId the network ID to update
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId, networkId}
+ * does not exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdNetworkDataNetworkLevelOperStatusDelete(
+ String serviceInstanceId, String networkId) throws RestException {
+ log.info("DELETE | Network level oper status Data for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ if (network.getNetworkData() != null) {
+ network.getNetworkData().setNetworkLevelOperStatus(null);
+ try {
+ serviceDataHelper.saveNetwork(serviceInstanceId, network, null);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ }
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ /**
+ * Get network oper status data from the Config table specified Service Instance
+ * and network id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-level-oper-status/
+ *
+ * @param serviceInstanceId the Service Instance ID to perform the get on
+ * @param networkId the network ID to perform the get on
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId, networkId}
+ * does not exist.
+ */
+ @Override
+ public ResponseEntity<GenericResourceApiOperStatusData> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdNetworkDataNetworkLevelOperStatusGet(
+ String serviceInstanceId, String networkId) throws RestException {
+ log.info("GET | Network level oper status Data for serviceInstanceId, networkId ({})", serviceInstanceId,
+ networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ GenericResourceApiServicedataServicedataNetworksNetworkNetworkData networkData = network.getNetworkData();
+ if (networkData == null) {
+ log.info("No network-data found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ return new ResponseEntity<>(networkData.getNetworkLevelOperStatus(), HttpStatus.OK);
+ }
+
+ /**
+ * Post network oper status data to the Config table specified Service Instance
+ * and network id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-level-oper-status/
+ *
+ * @param serviceInstanceId the Service Instance ID to post to
+ * @param networkId the network ID to post to
+ * @param operStatus the oper status to set
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId, networkId}
+ * does not exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdNetworkDataNetworkLevelOperStatusPost(
+ String serviceInstanceId, String networkId, @Valid GenericResourceApiOperStatusData operStatusData)
+ throws RestException {
+ log.info("POST | Network level oper status Data for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ GenericResourceApiServicedataServicedataNetworksNetworkNetworkData networkData = network.getNetworkData();
+ if (networkData == null) {
+ networkData = new GenericResourceApiServicedataServicedataNetworksNetworkNetworkData();
+ }
+
+ networkData.setNetworkLevelOperStatus(operStatusData);
+ network.setNetworkData(networkData);
+ try {
+ serviceDataHelper.saveNetwork(serviceInstanceId, network, null);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+
+ /**
+ * Put network oper status data from the Config table specified Service Instance
+ * and network id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-level-oper-status/
+ *
+ * @param serviceInstanceId the Service Instance ID to put to
+ * @param networkId the network ID to put to
+ * @param operStatus the oper status to set
+ * @return HttpStatus.OK (200) on successful PUT
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId, networkId}
+ * does not exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdNetworkDataNetworkLevelOperStatusPut(
+ String serviceInstanceId, String networkId, @Valid GenericResourceApiOperStatusData operStatusData)
+ throws RestException {
+ log.info("PUT | Network level oper status Data for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ GenericResourceApiServicedataServicedataNetworksNetworkNetworkData networkData = network.getNetworkData();
+ if (networkData == null) {
+ networkData = new GenericResourceApiServicedataServicedataNetworksNetworkNetworkData();
+ }
+
+ networkData.setNetworkLevelOperStatus(operStatusData);
+ network.setNetworkData(networkData);
+ try {
+ serviceDataHelper.saveNetwork(serviceInstanceId, network, null);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+
+ /**
+ * Delete network oper status data from the Config table specified Service
+ * Instance and network id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-level-oper-status/
+ *
+ * @param serviceInstanceId the Service Instance ID to delete
+ * @param networkId the Service Instance ID to delete
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId, networkId}
+ * does not exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdNetworkDataNetworkProvidedAllottedResourcesDelete(
+ String serviceInstanceId, String networkId) throws RestException {
+ log.info("DELETE | Network provided allotted resource Data for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ if (network.getNetworkData() != null) {
+ network.getNetworkData().setNetworkProvidedAllottedResources(null);
+ try {
+ serviceDataHelper.saveNetwork(serviceInstanceId, network, null);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ }
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ @Override
+ public ResponseEntity<GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdNetworkDataNetworkProvidedAllottedResourcesGet(
+ String serviceInstanceId, String networkId) throws RestException {
+ log.info("GET | Network provided allotted resources for serviceInstanceId, networkId ({})", serviceInstanceId,
+ networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ if ((services == null) || (services.isEmpty())) {
+ throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
+ }
+
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ GenericResourceApiServicedataServicedataNetworksNetworkNetworkData networkData = network.getNetworkData();
+ if (networkData == null) {
+ log.info("No network-data found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ return new ResponseEntity<>(networkData.getNetworkProvidedAllottedResources(), HttpStatus.OK);
+ }
+
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdNetworkDataNetworkProvidedAllottedResourcesPost(
+ String serviceInstanceId, String networkId,
+ @Valid GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources netAllottedResources)
+ throws RestException {
+ log.info("POST | Network provided allotted resource Data for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ GenericResourceApiServicedataServicedataNetworksNetworkNetworkData networkData = network.getNetworkData();
+ if (networkData == null) {
+ networkData = new GenericResourceApiServicedataServicedataNetworksNetworkNetworkData();
+ }
+
+ networkData.setNetworkProvidedAllottedResources(netAllottedResources);
+ network.setNetworkData(networkData);
+ try {
+ serviceDataHelper.saveNetwork(serviceInstanceId, network, null);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdNetworkDataNetworkProvidedAllottedResourcesPut(
+ String serviceInstanceId, String networkId,
+ @Valid GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources netAllottedResources)
+ throws RestException {
+ log.info("POST | Network provided allotted resource Data for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ GenericResourceApiServicedataServicedataNetworksNetworkNetworkData networkData = network.getNetworkData();
+ if (networkData == null) {
+ networkData = new GenericResourceApiServicedataServicedataNetworksNetworkNetworkData();
+ }
+
+ networkData.setNetworkProvidedAllottedResources(netAllottedResources);
+ network.setNetworkData(networkData);
+ try {
+ serviceDataHelper.saveNetwork(serviceInstanceId, network, null);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+
+ /**
+ * Delete network topology identifier structure from service data based on
+ * service Instance and network id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-topology/network-topology-identifier-structure/
+ *
+ * @param serviceInstanceId the Service Instance ID to delete
+ * @param networkId the network ID to delete
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId, networkId}
+ * does not exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdNetworkDataNetworkTopologyNetworkTopologyIdentifierStructureDelete(
+ String serviceInstanceId, String networkId) throws RestException {
+ log.info("DELETE | Network topology identifier structure for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ if (network.getNetworkData() != null) {
+ GenericResourceApiNetworktopologyNetworkTopology netTopology = network.getNetworkData()
+ .getNetworkTopology();
+ if (netTopology == null) {
+
+ log.info("No network-topology found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+ netTopology.setNetworkTopologyIdentifierStructure(null);
+ try {
+ serviceDataHelper.saveNetwork(serviceInstanceId, network, null);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ }
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ /**
+ * Get network topology identifier structure from service data based on service
+ * Instance and network id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-topology/network-topology-identifier-structure/
+ *
+ * @param serviceInstanceId the Service Instance ID to update
+ * @param networkId the network ID to update
+ * @return HttpStatus.OK (200) on successful GET
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId, networkId}
+ * does not exist.
+ */
+ @Override
+ public ResponseEntity<GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdNetworkDataNetworkTopologyNetworkTopologyIdentifierStructureGet(
+ String serviceInstanceId, String networkId) throws RestException {
+ log.info("GET | Network topology identifier structure for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ if (network.getNetworkData() != null) {
+ GenericResourceApiNetworktopologyNetworkTopology netTopology = network.getNetworkData()
+ .getNetworkTopology();
+ if (netTopology == null) {
+
+ log.info("No network-topology found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+ return new ResponseEntity<>(netTopology.getNetworkTopologyIdentifierStructure(), HttpStatus.OK);
+ }
+ return new ResponseEntity<>(null, HttpStatus.OK);
+ }
+
+ /**
+ * Post network topology identifier structure from service data based on service
+ * Instance and network id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-topology/network-topology-identifier-structure/
+ *
+ * @param serviceInstanceId the Service Instance ID to update
+ * @param networkId the network ID to update
+ * @param netTopologyIdentifierStructure the network topology identifier
+ * structure to set
+ * @return HttpStatus.CREATED (201) on successful POST
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId, networkId}
+ * does not exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdNetworkDataNetworkTopologyNetworkTopologyIdentifierStructurePost(
+ String serviceInstanceId, String networkId,
+ @Valid GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure netTopologyIdentifierStructure)
+ throws RestException {
+ log.info("POST | Network topology identifier structure for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ if (network.getNetworkData() != null) {
+ GenericResourceApiNetworktopologyNetworkTopology netTopology = network.getNetworkData()
+ .getNetworkTopology();
+ if (netTopology == null) {
+
+ log.info("No network-topology found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+ netTopology.setNetworkTopologyIdentifierStructure(netTopologyIdentifierStructure);
+ try {
+ serviceDataHelper.saveNetwork(serviceInstanceId, network, null);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ }
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+
+ /**
+ * Put network topology identifier structure from service data based on service
+ * Instance and network id
+ * <p>
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-topology/network-topology-identifier-structure/
+ *
+ * @param serviceInstanceId the Service Instance ID to update
+ * @param networkId the network ID to update
+ * @param netTopologyIdentifierStructure the network topology identifier
+ * structure to set
+ * @return HttpStatus.CREATED (201) on successful POST
+ * <p>
+ * HttpStatus.INTERNAL_SERVER_ERROR (500) if unmarshalling Service Data
+ * from the database fails
+ * <p>
+ * HttpStatus.NOT_FOUND (404) if {@code serviceInstanceId, networkId}
+ * does not exist.
+ */
+ @Override
+ public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataNetworksNetworkNetworkIdNetworkDataNetworkTopologyNetworkTopologyIdentifierStructurePut(
+ String serviceInstanceId, String networkId,
+ @Valid GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure netTopologyIdentifierStructure)
+ throws RestException {
+ log.info("PUT | Network topology identifier structure for ({}, {})", serviceInstanceId, networkId);
+
+ List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
+ ConfigServices data;
+ if ((services == null) || (services.isEmpty())) {
+ log.info("Could not find data for ({}).", serviceInstanceId);
+ // Or throw the data not found error?
+ throw new RestProtocolException("data-missing", "Service Instance ID not found.",
+ HttpStatus.NOT_FOUND.value());
+ } else {
+ data = services.get(0);
+ }
+
+ if (!serviceDataHelper.hasServiceData(data)) {
+ log.info("Could not find Service Data for ({}).", serviceInstanceId);
+ throw new RestProtocolException("data-missing", "Service data not found.", HttpStatus.NOT_FOUND.value());
+ }
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ try {
+ network = serviceDataHelper.getNetwork(serviceInstanceId, networkId);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+
+ if (network == null) {
+ log.info("No information found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+
+ if (network.getNetworkData() != null) {
+ GenericResourceApiNetworktopologyNetworkTopology netTopology = network.getNetworkData()
+ .getNetworkTopology();
+ if (netTopology == null) {
+
+ log.info("No network-topology found for {}", networkId);
+ throw new RestApplicationException("data-missing",
+ "Request could not be completed because the relevant data model content does not exist",
+ HttpStatus.NOT_FOUND.value());
+ }
+ netTopology.setNetworkTopologyIdentifierStructure(netTopologyIdentifierStructure);
+ try {
+ serviceDataHelper.saveNetwork(serviceInstanceId, network, null);
+ } catch (JsonProcessingException e) {
+ log.error("Could not parse service data", e);
+ throw new RestApplicationException("data-conversion",
+ "Request could not be completed due to internal error", e,
+ HttpStatus.INTERNAL_SERVER_ERROR.value());
+ }
+ }
+ return new ResponseEntity<>(HttpStatus.CREATED);
+ }
+
+ /**
* Deletes VNF data from the Config table specified Service Instance.
* <p>
* Maps to
@@ -1317,22 +3502,30 @@ public class ConfigApiController implements ConfigApi {
* Instance. If it is a new Service Instance or a new VNF, creates all necessary
* parent data containers, then performs the updates.
* <p>
- * Maps to /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/
- * @param serviceInstanceId the Service Instance ID to perform the delete on
- * @param vnfId the VNF ID of the VNF to delete
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/
+ *
+ * @param serviceInstanceId the Service
+ * Instance ID
+ * to perform
+ * the delete on
+ * @param vnfId the VNF ID of
+ * the VNF to
+ * delete
* @param genericResourceApiServicedataServicedataVnfsVnfBodyParam the playload
* @return HttpStatus.CREATED (201) on successful create
- * <p>
- * HttpStatus.NO_CONTENT (204) on successful update
- * <p>
- * HttpStatus.BAD_REQUEST (400) if {@code vnfId} does not match what is specified in the
- * {@code genericResourceApiServicedataServicedataVnfsVnfBodyParam} , or if updating the database fails.
+ * <p>
+ * HttpStatus.NO_CONTENT (204) on successful update
+ * <p>
+ * HttpStatus.BAD_REQUEST (400) if {@code vnfId} does not match what is
+ * specified in the
+ * {@code genericResourceApiServicedataServicedataVnfsVnfBodyParam} , or
+ * if updating the database fails.
* @throws RestException
*/
@Override
public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataVnfsVnfVnfIdPut(
- String serviceInstanceId, String vnfId,
- GenericResourceApiServicedataServicedataVnfsVnf vnf)
+ String serviceInstanceId, String vnfId, GenericResourceApiServicedataServicedataVnfsVnf vnf)
throws RestException {
log.info("PUT | VNF Data for ({})", vnfId);
if (!vnfId.equals(vnf.getVnfId())) {
@@ -1388,7 +3581,7 @@ public class ConfigApiController implements ConfigApi {
}
GenericResourceApiServicedataServicedataVnfsVnf vnf = null;
-
+
try {
vnf = serviceDataHelper.getVnf(serviceInstanceId, vnfId);
} catch (JsonProcessingException e) {
@@ -1417,11 +3610,9 @@ public class ConfigApiController implements ConfigApi {
* Maps to
* /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-level-oper-status/
*
- * @param serviceInstanceId the Service Instance ID to
- * perform the delete on
- * @param vnfId the VNF ID of the VNF to
- * delete
- * @param genericResourceApiOperStatusDataBodyParam the payload
+ * @param serviceInstanceId the Service Instance ID to perform the delete on
+ * @param vnfId the VNF ID of the VNF to delete
+ * @param operStatus the payload
* @return HttpStatus.CREATED (201) on successful create.
* <p>
* HttpStatus.NO_CONTENT (204) on successful update.
@@ -1431,8 +3622,7 @@ public class ConfigApiController implements ConfigApi {
*/
@Override
public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataVnfsVnfVnfIdVnfDataVnfLevelOperStatusPut(
- String serviceInstanceId, String vnfId,
- GenericResourceApiOperStatusData genericResourceApiOperStatusDataBodyParam) throws RestException {
+ String serviceInstanceId, String vnfId, GenericResourceApiOperStatusData operStatus) throws RestException {
log.info("PUT | VNF Level Oper Status ({})", vnfId);
ServiceDataTransaction transaction = serviceDataHelper.createTransaction();
@@ -1455,12 +3645,12 @@ public class ConfigApiController implements ConfigApi {
responseStatus = HttpStatus.CREATED;
vnf = new GenericResourceApiServicedataServicedataVnfsVnf();
vnf.setVnfId(vnfId);
- }
+ }
GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfData = vnf.getVnfData();
if (vnfData == null) {
vnfData = new GenericResourceApiServicedataServicedataVnfsVnfVnfData();
}
- vnfData.setVnfLevelOperStatus(genericResourceApiOperStatusDataBodyParam);
+ vnfData.setVnfLevelOperStatus(operStatus);
vnf.setVnfData(vnfData);
serviceDataHelper.saveVnf(serviceInstanceId, vnf, transaction);
transaction.commit();
@@ -1479,25 +3669,9 @@ public class ConfigApiController implements ConfigApi {
* Maps to
* /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/onap-model-information/
*
- * @param serviceInstanceId the
- * Service
- * Instance
- * ID
- * to
- * perform
- * the
- * delete
- * on
- * @param vnfId the
- * VNF
- * ID
- * of
- * the
- * VNF
- * to
- * delete
- * @param genericResourceApiOnapmodelinformationOnapModelInformationBodyParam the
- * payload
+ * @param serviceInstanceId the Service Instance ID to perform the delete on
+ * @param vnfId the VNF ID of the VNF to delete
+ * @param onapModelInfo the payload
* @return HttpStatus.CREATED (201) on successful create.
* <p>
* HttpStatus.NO_CONTENT (204) on successful update.
@@ -1508,8 +3682,7 @@ public class ConfigApiController implements ConfigApi {
@Override
public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataVnfsVnfVnfIdVnfDataVnfTopologyOnapModelInformationPut(
String serviceInstanceId, String vnfId,
- GenericResourceApiOnapmodelinformationOnapModelInformation genericResourceApiOnapmodelinformationOnapModelInformationBodyParam)
- throws RestException {
+ GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInfo) throws RestException {
log.info("PUT | VNF Topology Onap Model Information ({})", vnfId);
ServiceDataTransaction transaction = serviceDataHelper.createTransaction();
@@ -1524,13 +3697,12 @@ public class ConfigApiController implements ConfigApi {
data = services.get(0);
}
-
GenericResourceApiServicedataServicedataVnfsVnf vnf = null;
HttpStatus responseStatus = HttpStatus.NO_CONTENT;
-
+
try {
vnf = serviceDataHelper.getVnf(serviceInstanceId, vnfId);
- } catch(JsonProcessingException e) {
+ } catch (JsonProcessingException e) {
log.error("Could not parse service data", e);
throw new RestApplicationException("data-conversion",
@@ -1546,8 +3718,7 @@ public class ConfigApiController implements ConfigApi {
vnf.getVnfData().setVnfTopology(new GenericResourceApiVnftopologyVnfTopology());
}
- vnf.getVnfData().getVnfTopology()
- .setOnapModelInformation(genericResourceApiOnapmodelinformationOnapModelInformationBodyParam);
+ vnf.getVnfData().getVnfTopology().setOnapModelInformation(onapModelInfo);
// Save the updated VNF (and service, if new)
try {
@@ -1566,21 +3737,23 @@ public class ConfigApiController implements ConfigApi {
* Service Instance. If it is a new Service Instance or a new VNF, creates all
* necessary parent data containers, then performs the updates.
* <p>
- * Maps to /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/vnf-resource-assignments/vnf-networks/
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/vnf-resource-assignments/vnf-networks/
+ *
* @param serviceInstanceId the Service Instance ID to perform the delete on
- * @param vnfId the VNF ID of the VNF to delete
- * @param genericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworksBodyParam the * payload
+ * @param vnfId the VNF ID of the VNF to delete
+ * @param vnfNetworks the * payload
* @return HttpStatus.CREATED (201) on successful create.
- * <p>
- * HttpStatus.NO_CONTENT (204) on successful update.
- * <p>
- * HttpStatus.BAD_REQUEST (400) if updating the database fails.
+ * <p>
+ * HttpStatus.NO_CONTENT (204) on successful update.
+ * <p>
+ * HttpStatus.BAD_REQUEST (400) if updating the database fails.
* @throws RestException
*/
@Override
public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataVnfsVnfVnfIdVnfDataVnfTopologyVnfResourceAssignmentsVnfNetworksPut(
String serviceInstanceId, String vnfId,
- GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks genericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworksBodyParam)
+ GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks vnfNetworks)
throws RestException {
log.info("PUT | VNF Topology VNF Resource Assignments VNF Networks ({})", vnfId);
@@ -1601,7 +3774,7 @@ public class ConfigApiController implements ConfigApi {
try {
vnf = serviceDataHelper.getVnf(serviceInstanceId, vnfId);
- } catch(JsonProcessingException e) {
+ } catch (JsonProcessingException e) {
log.error("Could not parse service data", e);
throw new RestApplicationException("data-conversion",
@@ -1625,11 +3798,12 @@ public class ConfigApiController implements ConfigApi {
vnfTopology = new GenericResourceApiVnftopologyVnfTopology();
}
- GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments = vnfTopology.getVnfResourceAssignments();
+ GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments = vnfTopology
+ .getVnfResourceAssignments();
if (vnfResourceAssignments == null) {
vnfResourceAssignments = new GenericResourceApiVnfresourceassignmentsVnfResourceAssignments();
}
- vnfResourceAssignments.setVnfNetworks(genericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworksBodyParam);
+ vnfResourceAssignments.setVnfNetworks(vnfNetworks);
vnfTopology.setVnfResourceAssignments(vnfResourceAssignments);
vnfData.setVnfTopology(vnfTopology);
vnf.setVnfData(vnfData);
@@ -1654,11 +3828,9 @@ public class ConfigApiController implements ConfigApi {
* Maps to
* /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/vnf-resource-assignments/vnf-networks/vnf-network/{network-role}/
*
- * @param serviceInstanceId the Service Instance ID to
- * perform the delete on
- * @param vnfId the VNF ID of the VNF to
- * delete
- * @param genericResourceApiVnfNetworkDataBodyParam the payload
+ * @param serviceInstanceId the Service Instance ID to perform the delete on
+ * @param vnfId the VNF ID of the VNF to delete
+ * @param vnfNetwork the payload
* @return HttpStatus.CREATED (201) on successful create.
* <p>
* HttpStatus.NO_CONTENT (204) on successful update.
@@ -1668,10 +3840,10 @@ public class ConfigApiController implements ConfigApi {
*/
@Override
public ResponseEntity<Void> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataVnfsVnfVnfIdVnfDataVnfTopologyVnfResourceAssignmentsVnfNetworksVnfNetworkNetworkRolePut(
- String serviceInstanceId, String vnfId, String networkRole,
- GenericResourceApiVnfNetworkData genericResourceApiVnfNetworkDataBodyParam) throws RestException {
+ String serviceInstanceId, String vnfId, String networkRole, GenericResourceApiVnfNetworkData vnfNetwork)
+ throws RestException {
log.info("PUT | VNF Network Network Role ({})", vnfId);
- if (!networkRole.equals(genericResourceApiVnfNetworkDataBodyParam.getNetworkRole())) {
+ if (!networkRole.equals(vnfNetwork.getNetworkRole())) {
throw new RestProtocolException("bad-attribute", "network-role mismatch", HttpStatus.BAD_REQUEST.value());
}
@@ -1693,7 +3865,7 @@ public class ConfigApiController implements ConfigApi {
try {
vnf = serviceDataHelper.getVnf(serviceInstanceId, vnfId);
- } catch(JsonProcessingException e) {
+ } catch (JsonProcessingException e) {
log.error("Could not parse service data", e);
throw new RestApplicationException("data-conversion",
@@ -1717,27 +3889,29 @@ public class ConfigApiController implements ConfigApi {
vnfTopology = new GenericResourceApiVnftopologyVnfTopology();
}
- GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments = vnfTopology.getVnfResourceAssignments();
+ GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments = vnfTopology
+ .getVnfResourceAssignments();
if (vnfResourceAssignments == null) {
vnfResourceAssignments = new GenericResourceApiVnfresourceassignmentsVnfResourceAssignments();
}
- GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks vnfNetworks = vnfResourceAssignments.getVnfNetworks();
+ GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks vnfNetworks = vnfResourceAssignments
+ .getVnfNetworks();
if (vnfNetworks == null) {
vnfNetworks = new GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks();
vnfNetworks.setVnfNetwork(new ArrayList<>());
}
-
if (vnfNetworks.getVnfNetwork().isEmpty()) {
- vnfNetworks.addVnfNetworkItem(genericResourceApiVnfNetworkDataBodyParam);
+ vnfNetworks.addVnfNetworkItem(vnfNetwork);
} else {
GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks vnfNetworksNew = new GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks();
vnfNetworksNew.setVnfNetwork(new ArrayList<>());
vnfNetworks.getVnfNetwork().stream()
- .filter(targetNetwork -> !targetNetwork.getNetworkRole().equals(networkRole)).forEach(vnfNetworksNew::addVnfNetworkItem);
+ .filter(targetNetwork -> !targetNetwork.getNetworkRole().equals(networkRole))
+ .forEach(vnfNetworksNew::addVnfNetworkItem);
- vnfNetworksNew.addVnfNetworkItem(genericResourceApiVnfNetworkDataBodyParam);
+ vnfNetworksNew.addVnfNetworkItem(vnfNetwork);
vnfNetworks = vnfNetworksNew;
}
@@ -1747,7 +3921,7 @@ public class ConfigApiController implements ConfigApi {
vnf.setVnfData(vnfData);
try {
serviceDataHelper.saveVnf(serviceInstanceId, vnf, transaction);
- transaction.commit();
+ transaction.commit();
return new ResponseEntity<>(responseStatus);
} catch (JsonProcessingException e) {
log.error("Error mapping object to JSON", e);
@@ -1756,7 +3930,6 @@ public class ConfigApiController implements ConfigApi {
}
}
-
@Override
public ResponseEntity<GenericResourceApiServicetopologyServiceTopology> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataServiceTopologyGet(
String serviceInstanceId) throws RestApplicationException, RestProtocolException {
@@ -1771,7 +3944,7 @@ public class ConfigApiController implements ConfigApi {
ConfigServices service = services.get(0);
try {
- if ( (service.getSvcData() == null) || service.getSvcData().isEmpty()) {
+ if ((service.getSvcData() == null) || service.getSvcData().isEmpty()) {
throw new RestProtocolException("data-missing", "No service-data entry found",
HttpStatus.NOT_FOUND.value());
} else {
@@ -1793,25 +3966,26 @@ public class ConfigApiController implements ConfigApi {
}
/**
- * Extracts VF MODULE data from CONFIG_GRA_SERVICES for a given, service-instance-id, vnf-id, and vf-module-id
+ * Extracts VF MODULE data from CONFIG_GRA_SERVICES for a given,
+ * service-instance-id, vnf-id, and vf-module-id
* <p>
- * Maps to /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/
+ *
* @param serviceInstanceId the Service Instance ID to lookup data for
- * @param vnfId the VNF ID of the VNF to return
- * @param vfModuleId the vf-moudle ID of a specific VNF to return
+ * @param vnfId the VNF ID of the VNF to return
+ * @param vfModuleId the vf-moudle ID of a specific VNF to return
* @return HttpStatus.OK (200) if the data is found.
* @throws RestException if the data does not exist.
*/
@Override
- public ResponseEntity<GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule>
- configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataVnfsVnfVnfIdVnfDataVfModulesVfModuleVfModuleIdGet(
+ public ResponseEntity<GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataVnfsVnfVnfIdVnfDataVfModulesVfModuleVfModuleIdGet(
String serviceInstanceId, String vnfId, String vfModuleId) throws RestException {
log.info("GET | Vf Module Data for ({})", vfModuleId);
-
List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
- if((services == null) || (services.isEmpty())) {
+ if ((services == null) || (services.isEmpty())) {
throw new RestProtocolException("data-missing", "No service entry found", HttpStatus.NOT_FOUND.value());
}
@@ -1825,7 +3999,7 @@ public class ConfigApiController implements ConfigApi {
HttpStatus.INTERNAL_SERVER_ERROR.value());
}
- if(vfModule != null) {
+ if (vfModule != null) {
return new ResponseEntity<>(vfModule, HttpStatus.OK);
} else {
log.info("No vf-module found for [{}]", vfModuleId);
@@ -1836,12 +4010,17 @@ public class ConfigApiController implements ConfigApi {
}
/**
- * PUT VF MODULE data into CONFIG_GRA_SERVICES of a given, service-instance-id, vnf-id
+ * PUT VF MODULE data into CONFIG_GRA_SERVICES of a given, service-instance-id,
+ * vnf-id
* <p>
- * Maps to /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/
+ *
* @param serviceInstanceId the Service Instance ID
- * @param vnfId the VNF ID as the parent of the specified vf-module-id and child of the specified service-instance
- * @param vfModuleId the vf-moudle ID as a child of the specified VNF
+ * @param vnfId the VNF ID as the parent of the specified
+ * vf-module-id and child of the specified
+ * service-instance
+ * @param vfModuleId the vf-module ID as a child of the specified VNF
* @return HttpStatus.OK (200) if the data is found.
* @throws RestException if the data does not exist.
*/
@@ -1852,19 +4031,18 @@ public class ConfigApiController implements ConfigApi {
throws RestException {
log.info("PUT | vf-module Data of ({}) for vnf ({}) in service({})", vfModuleId, vnfId, serviceInstanceId);
- if(! vfModuleId.equals(genericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModuleBodyParam.getVfModuleId())) {
+ if (!vfModuleId.equals(
+ genericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModuleBodyParam.getVfModuleId())) {
throw new RestProtocolException("bad-attribute", "vf-module-id mismatch", HttpStatus.BAD_REQUEST.value());
}
-
HttpStatus responseStatus = HttpStatus.NO_CONTENT;
List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
- if((services == null) || (services.isEmpty())) {
+ if ((services == null) || (services.isEmpty())) {
log.error("service-instance-id ({}) not found in SDN.", serviceInstanceId);
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
- }
-
+ }
GenericResourceApiServicedataServicedataVnfsVnf vnf;
try {
@@ -1876,13 +4054,14 @@ public class ConfigApiController implements ConfigApi {
HttpStatus.INTERNAL_SERVER_ERROR.value());
}
- if(vnf == null) {
+ if (vnf == null) {
log.error("vnf-id ({}) not found in SDN.", vnfId);
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
// See if this is the first vf module being added
- List<ConfigVfModules> configVfModules = configVfModulesRepository.findBySvcInstanceIdAndVnfId(serviceInstanceId, vnfId);
+ List<ConfigVfModules> configVfModules = configVfModulesRepository.findBySvcInstanceIdAndVnfId(serviceInstanceId,
+ vnfId);
if ((configVfModules == null) || configVfModules.isEmpty()) {
responseStatus = HttpStatus.CREATED;
@@ -1890,9 +4069,10 @@ public class ConfigApiController implements ConfigApi {
// Add vf module
try {
- serviceDataHelper.saveVfModule(serviceInstanceId, vnfId, genericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModuleBodyParam, null);
+ serviceDataHelper.saveVfModule(serviceInstanceId, vnfId,
+ genericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModuleBodyParam, null);
return new ResponseEntity<>(responseStatus);
- } catch(JsonProcessingException e) {
+ } catch (JsonProcessingException e) {
log.error("Error mapping object to JSON", e);
// Should probably be a 500 INTERNAL_SERVICE_ERROR
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
@@ -1903,21 +4083,23 @@ public class ConfigApiController implements ConfigApi {
* Extracts VF MODULE Topology data from the Config table specified Service
* Instance and VNF ID.
* <p>
- * Maps to /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/vf-module-data/vf-module-topology/
+ * Maps to
+ * /config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/vf-module-data/vf-module-topology/
+ *
* @param serviceInstanceId the Service Instance ID to lookup data for
- * @param vnfId the VNF ID of the VNF to extract topology data from.
- * @param vfModuleId the vf-module-idof the vf-module to extract topology data from.
+ * @param vnfId the VNF ID of the VNF to extract topology data from.
+ * @param vfModuleId the vf-module-idof the vf-module to extract topology
+ * data from.
* @return HttpStatus.OK (200) if the data is found.
* @throws RestException if the data does not exist.
*/
@Override
- public ResponseEntity<GenericResourceApiVfmoduletopologyVfModuleTopology>
- configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataVnfsVnfVnfIdVnfDataVfModulesVfModuleVfModuleIdVfModuleDataVfModuleTopologyGet(
+ public ResponseEntity<GenericResourceApiVfmoduletopologyVfModuleTopology> configGENERICRESOURCEAPIservicesServiceServiceInstanceIdServiceDataVnfsVnfVnfIdVnfDataVfModulesVfModuleVfModuleIdVfModuleDataVfModuleTopologyGet(
String serviceInstanceId, String vnfId, String vfModuleId) throws RestException {
log.info("GET | vf-module-topology for ({})", vfModuleId);
List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
- if((services == null) || (services.isEmpty())) {
+ if ((services == null) || (services.isEmpty())) {
throw new RestApplicationException("data-missing",
"Request could not be completed because the relevant data model content does not exist",
HttpStatus.NOT_FOUND.value());
@@ -1932,8 +4114,7 @@ public class ConfigApiController implements ConfigApi {
"Request could not be completed due to internal error", e,
HttpStatus.INTERNAL_SERVER_ERROR.value());
}
- if (vfModule != null
- && vfModule.getVfModuleData() != null
+ if (vfModule != null && vfModule.getVfModuleData() != null
&& vfModule.getVfModuleData().getVfModuleTopology() != null) {
return new ResponseEntity<>(vfModule.getVfModuleData().getVfModuleTopology(), HttpStatus.OK);
} else {
@@ -1950,20 +4131,15 @@ public class ConfigApiController implements ConfigApi {
log.info("DELETE | vf-module Data for ({})", vfModuleId);
-
-
List<ConfigServices> services = configServicesRepository.findBySvcInstanceId(serviceInstanceId);
- if((services == null) || (services.isEmpty())) {
+ if ((services == null) || (services.isEmpty())) {
log.error("service-instance-id ({}) not found in SDN.", serviceInstanceId);
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
- }
-
-
+ }
serviceDataHelper.deleteVfModule(serviceInstanceId, vnfId, vfModuleId);
return new ResponseEntity<>(HttpStatus.OK);
-
+
}
}
-
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/OperationsApiController.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/OperationsApiController.java
index 707c04a..9651345 100644
--- a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/OperationsApiController.java
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/OperationsApiController.java
@@ -101,13 +101,17 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
+import liquibase.pro.license.keymgr.e;
+import liquibase.pro.packaged.E;
+
@Controller
@ComponentScan(basePackages = { "org.onap.sdnc.apps.ms.gra.*", "org.onap.ccsdk.apps.services" })
@EntityScan("org.onap.sdnc.apps.ms.gra.*")
@Import(value = SvcLogicFactory.class)
public class OperationsApiController implements OperationsApi {
- private static final String CALLED_STR = "{} called.";
+ private static final String CALLED_STR = "GRA START: {} called.";
+ private static final String RETURNED_STR = "GRA END: Returned {} for {} [{}] {}.";
private static final String MODULE_NAME = "GENERIC-RESOURCE-API";
private static final String SERVICE_OBJECT_PATH_PARAM = "service-object-path";
private static final String NETWORK_OBJECT_PATH_PARAM = "network-object-path";
@@ -216,6 +220,7 @@ public class OperationsApiController implements OperationsApi {
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, "unknown-id:network", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.FORBIDDEN);
}
@@ -233,11 +238,12 @@ public class OperationsApiController implements OperationsApi {
try {
ctxIn.mergeJson(svcOperation + "-input", objectMapper.writeValueAsString(graInput.getInput()));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on input preload data", svcOperation);
+ log.error("exiting {} due to parse error on input preload data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, preloadId+":network", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -246,11 +252,12 @@ public class OperationsApiController implements OperationsApi {
preloadData = getConfigPreloadData(preloadId, preloadType);
ctxIn.mergeJson("preload-data", objectMapper.writeValueAsString(preloadData));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on saved config preload data", svcOperation);
+ log.error("exiting {} due to parse error on saved config preload data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, preloadId+":network", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -295,7 +302,7 @@ public class OperationsApiController implements OperationsApi {
resp.setResponseCode("500");
resp.setResponseMessage(e.getMessage());
}
-
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, preloadId+":network", resp.getResponseMessage());
retval.setOutput(resp);
return (new ResponseEntity<>(retval, HttpStatus.valueOf(Integer.parseInt(resp.getResponseCode()))));
}
@@ -317,6 +324,7 @@ public class OperationsApiController implements OperationsApi {
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, "unknown-id:vf-module", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.FORBIDDEN);
}
@@ -334,11 +342,12 @@ public class OperationsApiController implements OperationsApi {
try {
ctxIn.mergeJson(svcOperation + "-input", objectMapper.writeValueAsString(graInput.getInput()));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on input preload data", svcOperation);
+ log.error("exiting {} due to parse error on input preload data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, preloadId+":network", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -347,11 +356,12 @@ public class OperationsApiController implements OperationsApi {
preloadData = getConfigPreloadData(preloadId, preloadType);
ctxIn.mergeJson("preload-data", objectMapper.writeValueAsString(preloadData));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on saved config preload data", svcOperation);
+ log.error("exiting {} due to parse error on saved config preload data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, preloadId+":network", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -378,20 +388,25 @@ public class OperationsApiController implements OperationsApi {
resp.setAckFinalIndicator("true");
resp.setResponseCode("500");
resp.setResponseMessage("Check that you populated module, rpc and or mode correctly.");
+ log.error("Caught NullPointerException", npe);
} catch (SvcLogicException e) {
resp.setAckFinalIndicator("true");
resp.setResponseCode("500");
resp.setResponseMessage(e.getMessage());
+ log.error("Caught SvcLogicException", e);
} catch (JsonMappingException e) {
resp.setAckFinalIndicator("true");
resp.setResponseCode("500");
resp.setResponseMessage(e.getMessage());
+ log.error("Caught JsonMappingException", e);
} catch (JsonProcessingException e) {
resp.setAckFinalIndicator("true");
resp.setResponseCode("500");
resp.setResponseMessage(e.getMessage());
+ log.error("Caught JsonProcessingException", e);
}
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, preloadId+":vf-module", resp.getResponseMessage());
retval.setOutput(resp);
return (new ResponseEntity<>(retval, HttpStatus.valueOf(Integer.parseInt(resp.getResponseCode()))));
}
@@ -508,6 +523,7 @@ public class OperationsApiController implements OperationsApi {
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, "unknown-id", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.OK);
}
@@ -519,11 +535,12 @@ public class OperationsApiController implements OperationsApi {
try {
ctxIn.mergeJson(svcOperation + "-input", objectMapper.writeValueAsString(input.getInput()));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on input data", svcOperation);
+ log.error("exiting {} due to parse error on input data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -536,11 +553,12 @@ public class OperationsApiController implements OperationsApi {
try {
svcData = serviceDataHelper.getServiceDataAsString(svcInstanceId);
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on service data", svcOperation);
+ log.error("exiting {} due to parse error on service data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
}
@@ -555,6 +573,7 @@ public class OperationsApiController implements OperationsApi {
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.OK);
}
@@ -616,10 +635,12 @@ public class OperationsApiController implements OperationsApi {
resp.setAckFinalIndicator("true");
resp.setResponseCode("500");
resp.setResponseMessage("Check that you populated module, rpc and or mode correctly.");
+ log.error("Caught NullPointerException", npe);
} catch (SvcLogicException e) {
resp.setAckFinalIndicator("true");
resp.setResponseCode("500");
resp.setResponseMessage(e.getMessage());
+ log.error("Caught SvcLogicException", e);
}
// Update status in config services entry
@@ -634,11 +655,12 @@ public class OperationsApiController implements OperationsApi {
try {
serviceDataHelper.saveService(configService, ctxSvcDataJson);
} catch (JsonProcessingException e) {
- log.error("exiting {} due to error saving service data", svcOperation);
+ log.error("exiting {} due to error saving service data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -649,6 +671,7 @@ public class OperationsApiController implements OperationsApi {
}
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId, resp.getResponseMessage());
return (new ResponseEntity<>(retval, HttpStatus.OK));
}
@@ -671,6 +694,7 @@ public class OperationsApiController implements OperationsApi {
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, "unknown-id", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.OK);
}
@@ -682,11 +706,12 @@ public class OperationsApiController implements OperationsApi {
try {
ctxIn.mergeJson(svcOperation + "-input", objectMapper.writeValueAsString(input.getInput()));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on input data", svcOperation);
+ log.error("exiting {} due to parse error on input data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -707,6 +732,7 @@ public class OperationsApiController implements OperationsApi {
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
} else {
@@ -764,10 +790,12 @@ public class OperationsApiController implements OperationsApi {
resp.setAckFinalIndicator("true");
resp.setResponseCode("500");
resp.setResponseMessage("Check that you populated module, rpc and or mode correctly.");
+ log.error("Caught NullPointerException", npe);
} catch (SvcLogicException e) {
resp.setAckFinalIndicator("true");
resp.setResponseCode("500");
resp.setResponseMessage(e.getMessage());
+ log.error("Caught SvcLogicException", e);
}
// Update status in config services entry
@@ -786,6 +814,7 @@ public class OperationsApiController implements OperationsApi {
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -795,6 +824,7 @@ public class OperationsApiController implements OperationsApi {
operationalServicesRepository.save(operService);
}
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId, resp.getResponseMessage());
return (new ResponseEntity<>(retval, HttpStatus.OK));
}
@@ -818,6 +848,7 @@ public class OperationsApiController implements OperationsApi {
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, "unknown-id", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.OK);
}
@@ -835,11 +866,12 @@ public class OperationsApiController implements OperationsApi {
ctxIn.mergeJson(svcOperation + "-input", objectMapper.writeValueAsString(input.getInput()));
}
catch(JsonProcessingException e) {
- log.error("exiting {} due to parse error on input data", svcOperation);
+ log.error("exiting {} due to parse error on input data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -852,11 +884,12 @@ public class OperationsApiController implements OperationsApi {
try {
svcData = serviceDataHelper.getServiceDataAsString(svcInstanceId);
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on service data", svcOperation);
+ log.error("exiting {} due to parse error on service data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
}
@@ -871,6 +904,7 @@ public class OperationsApiController implements OperationsApi {
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.OK);
}
@@ -935,11 +969,13 @@ public class OperationsApiController implements OperationsApi {
resp.setAckFinalIndicator("Y");
resp.setResponseCode("500");
resp.setResponseMessage("Check that you populated module, rpc and or mode correctly.");
+ log.info("Caught NullPointerException", npe);
}
catch(SvcLogicException e) {
resp.setAckFinalIndicator("Y");
resp.setResponseCode("500");
resp.setResponseMessage(e.getMessage());
+ log.info("Caught SvcLogicException", e);
}
// Update status in config services entry
@@ -953,11 +989,12 @@ public class OperationsApiController implements OperationsApi {
try {
serviceDataHelper.saveService(configService, ctxSvcDataJson);
} catch (JsonProcessingException e) {
- log.error("exiting {} due to error saving service data", svcOperation);
+ log.error("exiting {} due to error saving service data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId+":"+vnfId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -977,8 +1014,8 @@ public class OperationsApiController implements OperationsApi {
new Thread(backgroundThread).start();
}
- log.info("Returned {} for {} [{}] {}.", resp.getResponseCode(), svcOperation, vnfId, resp.getResponseMessage());
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId+":"+vnfId, resp.getResponseMessage());
return (new ResponseEntity<>(retval, HttpStatus.OK));
}
@@ -997,7 +1034,7 @@ public class OperationsApiController implements OperationsApi {
try {
ctxIn.mergeJson(parentOperation + "-input", objectMapper.writeValueAsString(input.getInput()));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on input data", svcOperation);
+ log.error("exiting {} due to parse error on input data", svcOperation, e);
return;
}
@@ -1085,7 +1122,7 @@ public class OperationsApiController implements OperationsApi {
try {
serviceDataHelper.saveService(configService, ctxSvcDataJson);
} catch (JsonProcessingException e) {
- log.error("exiting {} due to error saving service data", svcOperation);
+ log.error("exiting {} due to error saving service data", svcOperation, e);
return;
}
@@ -1096,7 +1133,7 @@ public class OperationsApiController implements OperationsApi {
}
}
catch(Exception e) {
- log.error("Caught Exception updating configuration status in SDN for {} [{}] \n", svcOperation, vnfId);
+ log.error("Caught Exception updating configuration status in SDN for {} [{}] \n", svcOperation, vnfId, e);
}
}
@@ -1119,6 +1156,7 @@ public class OperationsApiController implements OperationsApi {
resp.setResponseMessage("null or empty service-instance-id");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, "unknown-id", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.OK);
}
@@ -1130,6 +1168,7 @@ public class OperationsApiController implements OperationsApi {
resp.setResponseMessage("null or empty vnf-id");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, "unknown-id", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.OK);
}
@@ -1143,11 +1182,12 @@ public class OperationsApiController implements OperationsApi {
try {
ctxIn.mergeJson(svcOperation + "-input", objectMapper.writeValueAsString(input.getInput()));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on input data", svcOperation);
+ log.error("exiting {} due to parse error on input data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId+":"+vnfId+":"+vfModuleId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -1160,11 +1200,12 @@ public class OperationsApiController implements OperationsApi {
try {
svcData = serviceDataHelper.getServiceDataAsString(svcInstanceId);
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on service data", svcOperation);
+ log.error("exiting {} due to parse error on service data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId+":"+vnfId+":"+vfModuleId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
}
@@ -1179,6 +1220,7 @@ public class OperationsApiController implements OperationsApi {
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId+":"+vnfId+":"+vfModuleId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.OK);
}
@@ -1189,10 +1231,10 @@ public class OperationsApiController implements OperationsApi {
if (operServices != null && !operServices.isEmpty()) {
operService = operServices.get(0);
log.info("Read ({}) data for [{}] operational-data: {}",
- "OPERATIONAL_GRA_PORT_MIRROR_CONFIGURATIONS", svcInstanceId, operService.getSvcData().toString());
+ "OPERATIONAL_GRA_SERVICES", svcInstanceId, operService.getSvcData().toString());
//ctxIn.mergeJson("operational-data", operService.getSvcData());
} else {
- log.info("No operational-data found in OPERATIONAL_GRA_PORT_MIRROR_CONFIGURATIONS for [{}]", svcInstanceId);
+ log.info("No operational-data found in OPERATIONAL_GRA_SERVICES for [{}]", svcInstanceId);
operService = new OperationalServices(svcInstanceId, null, null);
}
@@ -1264,12 +1306,15 @@ public class OperationsApiController implements OperationsApi {
resp.setAckFinalIndicator("Y");
resp.setResponseCode("500");
resp.setResponseMessage("Check that you populated module, rpc and or mode correctly.");
+ log.error("exiting {} due to error updating service data", svcOperation, npe);
} catch (SvcLogicException e) {
resp.setAckFinalIndicator("Y");
+ log.error("exiting {} due to error updating service data", svcOperation, e);
} catch (JsonProcessingException e) {
resp.setAckFinalIndicator("Y");
resp.setResponseCode("500");
resp.setResponseMessage("Internal error");
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId+":"+vnfId+":"+vfModuleId, resp.getResponseMessage());
log.error("exiting {} due to error updating service data", svcOperation, e);
}
@@ -1284,6 +1329,7 @@ public class OperationsApiController implements OperationsApi {
new Thread(backgroundThread).start();
}
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId+":"+vnfId+":"+vfModuleId, resp.getResponseMessage());
return (new ResponseEntity<>(retval, HttpStatus.OK));
}
@@ -1300,7 +1346,7 @@ public class OperationsApiController implements OperationsApi {
try {
ctxIn.mergeJson(parentOperation + "-input", objectMapper.writeValueAsString(input.getInput()));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on input data", svcOperation);
+ log.error("exiting {} due to parse error on input data", svcOperation, e);
return;
}
@@ -1313,7 +1359,7 @@ public class OperationsApiController implements OperationsApi {
try {
svcData = serviceDataHelper.getServiceDataAsString(svcInstanceId);
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on service data", svcOperation);
+ log.error("exiting {} due to parse error on service data", svcOperation, e);
return;
}
}
@@ -1332,10 +1378,10 @@ public class OperationsApiController implements OperationsApi {
if (operServices != null && !operServices.isEmpty()) {
operService = operServices.get(0);
log.info("Read ({}) data for [{}] operational-data: {}",
- "OPERATIONAL_GRA_PORT_MIRROR_CONFIGURATIONS", svcInstanceId, operService.getSvcData().toString());
+ "OPERATIONAL_GRA_SERVICES", svcInstanceId, operService.getSvcData().toString());
//ctxIn.mergeJson("operational-data", operService.getSvcData());
} else {
- log.info("No operational-data found in OPERATIONAL_GRA_PORT_MIRROR_CONFIGURATIONS for [{}]", svcInstanceId);
+ log.info("No operational-data found in OPERATIONAL_GRA_SERVICES for [{}]", svcInstanceId);
operService = new OperationalServices(svcInstanceId, null, null);
}
@@ -1381,7 +1427,7 @@ public class OperationsApiController implements OperationsApi {
try {
serviceDataHelper.saveService(configService, ctxSvcDataJson);
} catch (JsonProcessingException e) {
- log.error("exiting {} due to error saving service data", svcOperation);
+ log.error("exiting {} due to error saving service data", svcOperation, e);
return;
}
@@ -1390,7 +1436,7 @@ public class OperationsApiController implements OperationsApi {
operationalServicesRepository.save(operService);
} catch (Exception ex) {
- log.error("Caught Exception updating service status in SDN for {} [{}] \n", svcOperation, svcInstanceId);
+ log.error("Caught Exception updating service status in SDN for {} [{}] \n", svcOperation, svcInstanceId, ex);
}
log.info("Returned {} for {} [{}] {}.", respStatus, svcOperation, svcInstanceId, errorMessage);
}
@@ -1413,6 +1459,7 @@ public class OperationsApiController implements OperationsApi {
resp.setResponseMessage("null or empty configuration-id");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, "unknown-id", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.OK);
}
@@ -1424,6 +1471,7 @@ public class OperationsApiController implements OperationsApi {
resp.setResponseMessage("null or empty service-instance-id");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, "unknown-id", resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.OK);
}
@@ -1436,11 +1484,12 @@ public class OperationsApiController implements OperationsApi {
try {
ctxIn.mergeJson(svcOperation + "-input", objectMapper.writeValueAsString(input.getInput()));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on input data", svcOperation);
+ log.error("exiting {} due to parse error on input data", svcOperation, e);
resp.setResponseCode("500");
resp.setResponseMessage("internal error");
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId+":"+configurationId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -1459,6 +1508,7 @@ public class OperationsApiController implements OperationsApi {
resp.setAckFinalIndicator("Y");
retval.setOutput(resp);
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId+":"+configurationId, resp.getResponseMessage());
return new ResponseEntity<>(retval, HttpStatus.OK);
}
@@ -1563,8 +1613,10 @@ public class OperationsApiController implements OperationsApi {
resp.setAckFinalIndicator("Y");
resp.setResponseCode("500");
resp.setResponseMessage("Check that you populated module, rpc and or mode correctly.");
+ log.error("Caught NullPointerException", npe);
} catch (SvcLogicException e) {
resp.setAckFinalIndicator("Y");
+ log.error("Caught SvcLogicException", e);
}
if (ackFinal.equals("N")) {
@@ -1577,7 +1629,8 @@ public class OperationsApiController implements OperationsApi {
};
new Thread(backgroundThread).start();
}
- log.info("Returned {} for {} [{}] {}.", respStatus, svcOperation, configurationId, errorMessage);
+
+ log.info(RETURNED_STR, resp.getResponseCode(), svcOperation, svcInstanceId+":"+configurationId, resp.getResponseMessage());
return (new ResponseEntity<>(retval, HttpStatus.OK));
}
@@ -1597,7 +1650,7 @@ public class OperationsApiController implements OperationsApi {
try {
ctxIn.mergeJson(parentOperation + "-input", objectMapper.writeValueAsString(input.getInput()));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on input data", svcOperation);
+ log.error("exiting {} due to parse error on input data", svcOperation, e);
return;
}
@@ -1675,7 +1728,7 @@ public class OperationsApiController implements OperationsApi {
//operationalPortMirrorConfigurationsRepository.save(operPortMirrorConfiguration);
} catch (Exception e) {
- log.error("Caught Exception updating configuration status in SDN for {} [{}] \n", svcOperation, configurationId);
+ log.error("Caught Exception updating configuration status in SDN for {} [{}] \n", svcOperation, configurationId, e);
}
log.info("Returned SUCCESS for {} [{}]", svcOperation, configurationId);
}
@@ -1701,7 +1754,7 @@ public class OperationsApiController implements OperationsApi {
try {
ctxIn.mergeJson(svcOperation + "-input", objectMapper.writeValueAsString(input.getInput()));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on input data", svcOperation);
+ log.error("exiting {} due to parse error on input data", svcOperation, e);
return new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR);
}
@@ -1735,6 +1788,7 @@ public class OperationsApiController implements OperationsApi {
retval.setOutput(vnfgetresourcerequestOutput);
} catch (Exception e) {
+ log.error("Caught exception", e);
return (new ResponseEntity<>(retval, HttpStatus.INTERNAL_SERVER_ERROR));
}
return (new ResponseEntity<>(retval, HttpStatus.OK));
@@ -1764,7 +1818,7 @@ public class OperationsApiController implements OperationsApi {
try {
ctxIn.mergeJson(svcOperation + "-input", objectMapper.writeValueAsString(input.getInput()));
} catch (JsonProcessingException e) {
- log.error("exiting {} due to parse error on input data", svcOperation);
+ log.error("exiting {} due to parse error on input data", svcOperation, e);
resp.setErrorCode("500");
resp.setErrorMsg("internal error");
retval.setOutput(resp);
@@ -1789,9 +1843,11 @@ public class OperationsApiController implements OperationsApi {
} catch (NullPointerException npe) {
resp.setErrorCode("500");
resp.setErrorMsg("Check that you populated module, rpc and or mode correctly.");
+ log.error("Caught NullPointerException", npe);
} catch (SvcLogicException e) {
resp.setErrorCode("500");
resp.setErrorMsg(e.getMessage());
+ log.error("Caught SvcLogicException", e);
}
retval.setOutput(resp);
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/ServiceDataHelper.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/ServiceDataHelper.java
index f04a3ac..adcd504 100644
--- a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/ServiceDataHelper.java
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/controllers/ServiceDataHelper.java
@@ -6,8 +6,10 @@ import java.util.LinkedList;
import java.util.List;
import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
import org.onap.sdnc.apps.ms.gra.data.ConfigNetworks;
import org.onap.sdnc.apps.ms.gra.data.ConfigNetworksRepository;
@@ -40,6 +42,8 @@ public class ServiceDataHelper {
@Autowired
private ObjectMapper objectMapper;
+ private ObjectMapper unwrappedObjectMapper = null;
+
@Autowired
private ConfigServicesRepository configServicesRepository;
@@ -56,6 +60,15 @@ public class ServiceDataHelper {
}
+ private ObjectMapper getUnwrappedObjectMapper() {
+ if (unwrappedObjectMapper == null) {
+ unwrappedObjectMapper = objectMapper.copy();
+ unwrappedObjectMapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
+ unwrappedObjectMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false);
+ }
+ return unwrappedObjectMapper;
+ }
+
public class ServiceDataTransaction {
private List<ConfigServices> servicesToSave = new LinkedList<ConfigServices>();
private List<ConfigNetworks> networksToSave = new LinkedList<ConfigNetworks>();
@@ -168,7 +181,7 @@ public class ServiceDataHelper {
vfModule.setVfModuleId(configVfModule.getVfModuleId());
String vfModuleDataAsString = configVfModule.getVfModuleData();
if (vfModuleDataAsString != null) {
- vfModule.setVfModuleData(objectMapper.readValue(vfModuleDataAsString,
+ vfModule.setVfModuleData(getUnwrappedObjectMapper().readValue(vfModuleDataAsString,
GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData.class));
}
@@ -186,7 +199,7 @@ public class ServiceDataHelper {
vfModule.setVfModuleId(configVfModule.getVfModuleId());
String vfModuleDataAsString = configVfModule.getVfModuleData();
if (vfModuleDataAsString != null) {
- vfModule.setVfModuleData(objectMapper.readValue(vfModuleDataAsString, GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData.class));
+ vfModule.setVfModuleData(getUnwrappedObjectMapper().readValue(vfModuleDataAsString, GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData.class));
}
vfModules.addVfModuleItem(vfModule);
}
@@ -204,7 +217,7 @@ public class ServiceDataHelper {
GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfDataAsObject = null;
String vnfDataAsString = configVnf.getVnfData();
if (vnfDataAsString != null) {
- vnfDataAsObject = objectMapper.readValue(vnfDataAsString, GenericResourceApiServicedataServicedataVnfsVnfVnfData.class);
+ vnfDataAsObject = getUnwrappedObjectMapper().readValue(vnfDataAsString, GenericResourceApiServicedataServicedataVnfsVnfVnfData.class);
}
GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfModules vfModules = getVfModules(svcInstanceId, vnfId);
@@ -232,7 +245,7 @@ public class ServiceDataHelper {
GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfDataAsObject = null;
String vnfDataAsString = configVnf.getVnfData();
if (vnfDataAsString != null) {
- vnfDataAsObject = objectMapper.readValue(vnfDataAsString,
+ vnfDataAsObject = getUnwrappedObjectMapper().readValue(vnfDataAsString,
GenericResourceApiServicedataServicedataVnfsVnfVnfData.class);
}
@@ -250,6 +263,32 @@ public class ServiceDataHelper {
return (vnfs);
}
+ public GenericResourceApiServicedataServicedataNetworksNetwork getNetwork(String svcInstanceId, String networkId) throws JsonProcessingException {
+ GenericResourceApiServicedataServicedataNetworksNetwork network = null;
+ List<ConfigNetworks> configNetworks = configNetworksRepository.findBySvcInstanceId(svcInstanceId);
+ if ((configNetworks != null) && !configNetworks.isEmpty()) {
+ network = new GenericResourceApiServicedataServicedataNetworksNetwork();
+ ConfigNetworks configNetwork = configNetworks.get(0);
+ network.setNetworkId(configNetwork.getNetworkId());
+ String networkDataAsString = configNetwork.getNetworkData();
+ if (networkDataAsString != null) {
+ network.setNetworkData(getUnwrappedObjectMapper().readValue(networkDataAsString, GenericResourceApiServicedataServicedataNetworksNetworkNetworkData.class));
+ }
+ }
+
+ return(network);
+ }
+
+ public boolean networkExists(String svcInstanceId, String networkId) {
+ List<ConfigNetworks> configNetworks = configNetworksRepository.findBySvcInstanceId(svcInstanceId);
+ if ((configNetworks != null) && !configNetworks.isEmpty()) {
+ return(true);
+ } else {
+ return(false);
+ }
+
+ }
+
public GenericResourceApiServicedataServicedataNetworks getNetworks(String svcInstanceId) throws JsonProcessingException {
GenericResourceApiServicedataServicedataNetworks networks = null;
List<ConfigNetworks> configNetworks = configNetworksRepository.findBySvcInstanceId(svcInstanceId);
@@ -261,7 +300,7 @@ public class ServiceDataHelper {
network.setNetworkId(configNetwork.getNetworkId());
String networkDataAsString = configNetwork.getNetworkData();
if (networkDataAsString != null) {
- network.setNetworkData(objectMapper.readValue(networkDataAsString, GenericResourceApiServicedataServicedataNetworksNetworkNetworkData.class));
+ network.setNetworkData(getUnwrappedObjectMapper().readValue(networkDataAsString, GenericResourceApiServicedataServicedataNetworksNetworkNetworkData.class));
}
networks.addNetworkItem(network);
}
@@ -275,7 +314,7 @@ public class ServiceDataHelper {
if (svcData == null) {
return(null);
} else {
- return(objectMapper.writeValueAsString(getServiceData(svcInstanceId)));
+ return(getUnwrappedObjectMapper().writeValueAsString(getServiceData(svcInstanceId)));
}
}
@@ -299,7 +338,7 @@ public class ServiceDataHelper {
String svcDataAsString = configService.getSvcData();
if ((svcDataAsString != null) && !svcDataAsString.isEmpty()) {
- svcData = objectMapper.readValue(svcDataAsString, GenericResourceApiServicedataServiceData.class);
+ svcData = getUnwrappedObjectMapper().readValue(svcDataAsString, GenericResourceApiServicedataServiceData.class);
} else {
svcData = new GenericResourceApiServicedataServiceData();
}
@@ -332,7 +371,7 @@ public class ServiceDataHelper {
configVfModule = new ConfigVfModules(svcInstanceId, vnfId, vfModule.getVfModuleId());
}
if (vfModule.getVfModuleData() != null) {
- configVfModule.setVfModuleData(objectMapper.writeValueAsString(vfModule.getVfModuleData()));
+ configVfModule.setVfModuleData(getUnwrappedObjectMapper().writeValueAsString(vfModule.getVfModuleData()));
}
if (transaction != null) {
transaction.save(configVfModule);
@@ -359,7 +398,10 @@ public class ServiceDataHelper {
// Save vf modules
- GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfModules vfModules = vnfData.getVfModules();
+ GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfModules vfModules = null;
+ if (vnfData!= null) {
+ vfModules = vnfData.getVfModules();
+ }
if (vfModules != null) {
List<GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule> vfModuleList = vfModules.getVfModule();
if ((vfModuleList != null) && !vfModuleList.isEmpty()) {
@@ -391,7 +433,11 @@ public class ServiceDataHelper {
} else {
configVnf = new ConfigVnfs(svcInstanceId, vnf.getVnfId());
}
- configVnf.setVnfData(objectMapper.writeValueAsString(vnfData));
+ if (vnfData == null) {
+ configVnf.setVnfData(null);
+ } else {
+ configVnf.setVnfData(getUnwrappedObjectMapper().writeValueAsString(vnfData));
+ }
if (transaction != null) {
transaction.save(configVnf);
@@ -410,7 +456,7 @@ public class ServiceDataHelper {
} else {
configNetwork = new ConfigNetworks(svcInstanceId, network.getNetworkId());
}
- configNetwork.setNetworkData(objectMapper.writeValueAsString(network.getNetworkData()));
+ configNetwork.setNetworkData(getUnwrappedObjectMapper().writeValueAsString(network.getNetworkData()));
if (transaction != null) {
transaction.save(configNetwork);
} else {
@@ -428,7 +474,7 @@ public class ServiceDataHelper {
configService.setSvcData(null);
configServicesRepository.save(configService);
} else {
- saveService(configService, objectMapper.readValue(svcDataAsString, GenericResourceApiServicedataServiceData.class), transaction);
+ saveService(configService, getUnwrappedObjectMapper().readValue(svcDataAsString, GenericResourceApiServicedataServiceData.class), transaction);
}
}
@@ -509,7 +555,7 @@ public class ServiceDataHelper {
}
svcData.setVnfs(null);
- configService.setSvcData(objectMapper.writeValueAsString(svcData));
+ configService.setSvcData(getUnwrappedObjectMapper().writeValueAsString(svcData));
}
if (transaction != null) {
transaction.save(configService);
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigContrailRouteAllottedResources.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigContrailRouteAllottedResources.java
index 8fcf6d2..cc0fa32 100644
--- a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigContrailRouteAllottedResources.java
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigContrailRouteAllottedResources.java
@@ -20,6 +20,8 @@ public class ConfigContrailRouteAllottedResources {
// allottedResource status fields
String allottedResourceStatusResponseCode;
+ @Length(max = 2000)
+ @Column(length = 2000)
String allottedResourceStatusResponseMessage;
String allottedResourceStatusFinalIndicator;
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigPortMirrorConfigurations.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigPortMirrorConfigurations.java
index 347fe59..a036c53 100644
--- a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigPortMirrorConfigurations.java
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigPortMirrorConfigurations.java
@@ -20,6 +20,8 @@ public class ConfigPortMirrorConfigurations {
// portMirrorConfiguration status fields
String portMirrorConfigurationStatusResponseCode;
+ @Length(max = 2000)
+ @Column(length = 2000)
String portMirrorConfigurationStatusResponseMessage;
String portMirrorConfigurationStatusFinalIndicator;
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigServices.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigServices.java
index bf5d862..3ac5f83 100644
--- a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigServices.java
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigServices.java
@@ -21,6 +21,8 @@ public class ConfigServices {
// Service status fields
String serviceStatusResponseCode;
+ @Length(max = 2000)
+ @Column(length = 2000)
String serviceStatusResponseMessage;
String serviceStatusFinalIndicator;
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalContrailRouteAllottedResources.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalContrailRouteAllottedResources.java
index 51ab88f..a32c666 100644
--- a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalContrailRouteAllottedResources.java
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalContrailRouteAllottedResources.java
@@ -20,6 +20,8 @@ public class OperationalContrailRouteAllottedResources {
// allottedResource status fields
String allottedResourceStatusResponseCode;
+ @Length(max = 2000)
+ @Column(length = 2000)
String allottedResourceStatusResponseMessage;
String allottedResourceStatusFinalIndicator;
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalPortMirrorConfigurations.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalPortMirrorConfigurations.java
index da9c0ce..821050a 100644
--- a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalPortMirrorConfigurations.java
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalPortMirrorConfigurations.java
@@ -20,6 +20,8 @@ public class OperationalPortMirrorConfigurations {
// portMirrorConfiguration status fields
String portMirrorConfigurationStatusResponseCode;
+ @Length(max = 2000)
+ @Column(length = 2000)
String portMirrorConfigurationStatusResponseMessage;
String portMirrorConfigurationStatusFinalIndicator;
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiContrailRouteAllottedResources.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiContrailRouteAllottedResources.java
new file mode 100644
index 0000000..86e1f0b
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiContrailRouteAllottedResources.java
@@ -0,0 +1,95 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiContrailRouteAllottedResources
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-26T13:29:23.962-04:00")
+@JsonRootName("contrail-route-allotted-resources")
+public class GenericResourceApiContrailRouteAllottedResources {
+ @JsonProperty("contrail-route-allotted-resource")
+ @Valid
+ private List<GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource> contrailRouteAllottedResource = null;
+
+ public GenericResourceApiContrailRouteAllottedResources contrailRouteAllottedResource(List<GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource> contrailRouteAllottedResource) {
+ this.contrailRouteAllottedResource = contrailRouteAllottedResource;
+ return this;
+ }
+
+ public GenericResourceApiContrailRouteAllottedResources addContrailRouteAllottedResourceItem(GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource contrailRouteAllottedResourceItem) {
+ if (this.contrailRouteAllottedResource == null) {
+ this.contrailRouteAllottedResource = new ArrayList<>();
+ }
+ this.contrailRouteAllottedResource.add(contrailRouteAllottedResourceItem);
+ return this;
+ }
+
+ /**
+ * Get contrailRouteAllottedResource
+ * @return contrailRouteAllottedResource
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource> getContrailRouteAllottedResource() {
+ return contrailRouteAllottedResource;
+ }
+
+ public void setContrailRouteAllottedResource(List<GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource> contrailRouteAllottedResource) {
+ this.contrailRouteAllottedResource = contrailRouteAllottedResource;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiContrailRouteAllottedResources genericResourceApiContrailRouteAllottedResources = (GenericResourceApiContrailRouteAllottedResources) o;
+ return Objects.equals(this.contrailRouteAllottedResource, genericResourceApiContrailRouteAllottedResources.contrailRouteAllottedResource);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(contrailRouteAllottedResource);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiContrailRouteAllottedResources {\n");
+
+ sb.append(" contrailRouteAllottedResource: ").append(toIndentedString(contrailRouteAllottedResource)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource.java
new file mode 100644
index 0000000..83975d6
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource.java
@@ -0,0 +1,137 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiAllottedResourceStatus;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiAllottedresourcestatusAllottedResourceStatus;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiContrailrouteallottedresourcesContrailrouteallottedresourceAllottedResourceData;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("contrail-route-allotted-resource")
+public class GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource {
+ @JsonProperty("allotted-resource-status")
+ private GenericResourceApiAllottedresourcestatusAllottedResourceStatus allottedResourceStatus = null;
+
+ @JsonProperty("allotted-resource-id")
+ private String allottedResourceId = null;
+
+ @JsonProperty("allotted-resource-data")
+ private GenericResourceApiContrailrouteallottedresourcesContrailrouteallottedresourceAllottedResourceData allottedResourceData = null;
+
+ public GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource allottedResourceStatus(GenericResourceApiAllottedresourcestatusAllottedResourceStatus allottedResourceStatus) {
+ this.allottedResourceStatus = allottedResourceStatus;
+ return this;
+ }
+
+ /**
+ * Get allottedResourceStatus
+ * @return allottedResourceStatus
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiAllottedresourcestatusAllottedResourceStatus getAllottedResourceStatus() {
+ return allottedResourceStatus;
+ }
+
+ public void setAllottedResourceStatus(GenericResourceApiAllottedresourcestatusAllottedResourceStatus allottedResourceStatus) {
+ this.allottedResourceStatus = allottedResourceStatus;
+ }
+
+ public GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource allottedResourceId(String allottedResourceId) {
+ this.allottedResourceId = allottedResourceId;
+ return this;
+ }
+
+ /**
+ * Get allottedResourceId
+ * @return allottedResourceId
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getAllottedResourceId() {
+ return allottedResourceId;
+ }
+
+ public void setAllottedResourceId(String allottedResourceId) {
+ this.allottedResourceId = allottedResourceId;
+ }
+
+ public GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource allottedResourceData(GenericResourceApiContrailrouteallottedresourcesContrailrouteallottedresourceAllottedResourceData allottedResourceData) {
+ this.allottedResourceData = allottedResourceData;
+ return this;
+ }
+
+ /**
+ * Get allottedResourceData
+ * @return allottedResourceData
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiContrailrouteallottedresourcesContrailrouteallottedresourceAllottedResourceData getAllottedResourceData() {
+ return allottedResourceData;
+ }
+
+ public void setAllottedResourceData(GenericResourceApiContrailrouteallottedresourcesContrailrouteallottedresourceAllottedResourceData allottedResourceData) {
+ this.allottedResourceData = allottedResourceData;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource genericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource = (GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource) o;
+ return Objects.equals(this.allottedResourceStatus, genericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource.allottedResourceStatus) &&
+ Objects.equals(this.allottedResourceId, genericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource.allottedResourceId) &&
+ Objects.equals(this.allottedResourceData, genericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource.allottedResourceData);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(allottedResourceStatus, allottedResourceId, allottedResourceData);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiContrailrouteallottedresourcesContrailRouteAllottedResource {\n");
+
+ sb.append(" allottedResourceStatus: ").append(toIndentedString(allottedResourceStatus)).append("\n");
+ sb.append(" allottedResourceId: ").append(toIndentedString(allottedResourceId)).append("\n");
+ sb.append(" allottedResourceData: ").append(toIndentedString(allottedResourceData)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiContrailroutetopologyContrailRouteTopology.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiContrailroutetopologyContrailRouteTopology.java
new file mode 100644
index 0000000..cefc4a5
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiContrailroutetopologyContrailRouteTopology.java
@@ -0,0 +1,168 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiAllottedResourceIdentifiers;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiAllottedresourceidentifiersAllottedResourceIdentifiers;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiContrailRouteAssignments;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiContrailrouteassignmentsContrailRouteAssignments;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapModelInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapmodelinformationOnapModelInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiParam;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiContrailroutetopologyContrailRouteTopology
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("contrail-route-topology")
+public class GenericResourceApiContrailroutetopologyContrailRouteTopology {
+ @JsonProperty("allotted-resource-identifiers")
+ private GenericResourceApiAllottedresourceidentifiersAllottedResourceIdentifiers allottedResourceIdentifiers = null;
+
+ @JsonProperty("contrail-route-assignments")
+ private GenericResourceApiContrailrouteassignmentsContrailRouteAssignments contrailRouteAssignments = null;
+
+ @JsonProperty("onap-model-information")
+ private GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation = null;
+
+ @JsonProperty("contrail-route-parameters")
+ private GenericResourceApiParam contrailRouteParameters = null;
+
+ public GenericResourceApiContrailroutetopologyContrailRouteTopology allottedResourceIdentifiers(GenericResourceApiAllottedresourceidentifiersAllottedResourceIdentifiers allottedResourceIdentifiers) {
+ this.allottedResourceIdentifiers = allottedResourceIdentifiers;
+ return this;
+ }
+
+ /**
+ * Get allottedResourceIdentifiers
+ * @return allottedResourceIdentifiers
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiAllottedresourceidentifiersAllottedResourceIdentifiers getAllottedResourceIdentifiers() {
+ return allottedResourceIdentifiers;
+ }
+
+ public void setAllottedResourceIdentifiers(GenericResourceApiAllottedresourceidentifiersAllottedResourceIdentifiers allottedResourceIdentifiers) {
+ this.allottedResourceIdentifiers = allottedResourceIdentifiers;
+ }
+
+ public GenericResourceApiContrailroutetopologyContrailRouteTopology contrailRouteAssignments(GenericResourceApiContrailrouteassignmentsContrailRouteAssignments contrailRouteAssignments) {
+ this.contrailRouteAssignments = contrailRouteAssignments;
+ return this;
+ }
+
+ /**
+ * Get contrailRouteAssignments
+ * @return contrailRouteAssignments
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiContrailrouteassignmentsContrailRouteAssignments getContrailRouteAssignments() {
+ return contrailRouteAssignments;
+ }
+
+ public void setContrailRouteAssignments(GenericResourceApiContrailrouteassignmentsContrailRouteAssignments contrailRouteAssignments) {
+ this.contrailRouteAssignments = contrailRouteAssignments;
+ }
+
+ public GenericResourceApiContrailroutetopologyContrailRouteTopology onapModelInformation(GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
+ return this;
+ }
+
+ /**
+ * Get onapModelInformation
+ * @return onapModelInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiOnapmodelinformationOnapModelInformation getOnapModelInformation() {
+ return onapModelInformation;
+ }
+
+ public void setOnapModelInformation(GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
+ }
+
+ public GenericResourceApiContrailroutetopologyContrailRouteTopology contrailRouteParameters(GenericResourceApiParam contrailRouteParameters) {
+ this.contrailRouteParameters = contrailRouteParameters;
+ return this;
+ }
+
+ /**
+ * Get contrailRouteParameters
+ * @return contrailRouteParameters
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiParam getContrailRouteParameters() {
+ return contrailRouteParameters;
+ }
+
+ public void setContrailRouteParameters(GenericResourceApiParam contrailRouteParameters) {
+ this.contrailRouteParameters = contrailRouteParameters;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiContrailroutetopologyContrailRouteTopology genericResourceApiContrailroutetopologyContrailRouteTopology = (GenericResourceApiContrailroutetopologyContrailRouteTopology) o;
+ return Objects.equals(this.allottedResourceIdentifiers, genericResourceApiContrailroutetopologyContrailRouteTopology.allottedResourceIdentifiers) &&
+ Objects.equals(this.contrailRouteAssignments, genericResourceApiContrailroutetopologyContrailRouteTopology.contrailRouteAssignments) &&
+ Objects.equals(this.onapModelInformation, genericResourceApiContrailroutetopologyContrailRouteTopology.onapModelInformation) &&
+ Objects.equals(this.contrailRouteParameters, genericResourceApiContrailroutetopologyContrailRouteTopology.contrailRouteParameters);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(allottedResourceIdentifiers, contrailRouteAssignments, onapModelInformation, contrailRouteParameters);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiContrailroutetopologyContrailRouteTopology {\n");
+
+ sb.append(" allottedResourceIdentifiers: ").append(toIndentedString(allottedResourceIdentifiers)).append("\n");
+ sb.append(" contrailRouteAssignments: ").append(toIndentedString(contrailRouteAssignments)).append("\n");
+ sb.append(" onapModelInformation: ").append(toIndentedString(onapModelInformation)).append("\n");
+ sb.append(" contrailRouteParameters: ").append(toIndentedString(contrailRouteParameters)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiNetworkinstancegroupNetworkInstanceGroup.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiNetworkinstancegroupNetworkInstanceGroup.java
new file mode 100644
index 0000000..d042bba
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiNetworkinstancegroupNetworkInstanceGroup.java
@@ -0,0 +1,369 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiAggregateRoutes;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiAggregateroutesAggregateRoutes;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkinstancegroupAggregateRoutePolicy;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkinstancegroupSubnetAssignmentPolicy;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkinstancegroupVpnBindingPolicy;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapModelInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapmodelinformationOnapModelInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiSubnets;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiSubnetsSubnets;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiNetworkinstancegroupNetworkInstanceGroup
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-23T12:02:01.518-04:00")
+@JsonRootName("network-instance-group")
+public class GenericResourceApiNetworkinstancegroupNetworkInstanceGroup {
+ @JsonProperty("aggregate-routes")
+ @Valid
+ private List<GenericResourceApiAggregateroutesAggregateRoutes> aggregateRoutes = null;
+
+ @JsonProperty("onap-model-information")
+ private GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation = null;
+
+ @JsonProperty("subnets")
+ @Valid
+ private List<GenericResourceApiSubnetsSubnets> subnets = null;
+
+ @JsonProperty("subnet-assignment-policy")
+ private GenericResourceApiNetworkinstancegroupNetworkinstancegroupSubnetAssignmentPolicy subnetAssignmentPolicy = null;
+
+ @JsonProperty("service-instance-id")
+ private String serviceInstanceId = null;
+
+ @JsonProperty("vpn-binding-policy")
+ private GenericResourceApiNetworkinstancegroupNetworkinstancegroupVpnBindingPolicy vpnBindingPolicy = null;
+
+ @JsonProperty("network-instance-group-id")
+ private String networkInstanceGroupId = null;
+
+ @JsonProperty("network-instance-group-function")
+ private String networkInstanceGroupFunction = null;
+
+ @JsonProperty("networks")
+ private GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks networks = null;
+
+ @JsonProperty("aggregate-route-policy")
+ private GenericResourceApiNetworkinstancegroupNetworkinstancegroupAggregateRoutePolicy aggregateRoutePolicy = null;
+
+ @JsonProperty("subnet-key-value")
+ private String subnetKeyValue = null;
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup aggregateRoutes(List<GenericResourceApiAggregateroutesAggregateRoutes> aggregateRoutes) {
+ this.aggregateRoutes = aggregateRoutes;
+ return this;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup addAggregateRoutesItem(GenericResourceApiAggregateroutesAggregateRoutes aggregateRoutesItem) {
+ if (this.aggregateRoutes == null) {
+ this.aggregateRoutes = new ArrayList<>();
+ }
+ this.aggregateRoutes.add(aggregateRoutesItem);
+ return this;
+ }
+
+ /**
+ * Get aggregateRoutes
+ * @return aggregateRoutes
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiAggregateroutesAggregateRoutes> getAggregateRoutes() {
+ return aggregateRoutes;
+ }
+
+ public void setAggregateRoutes(List<GenericResourceApiAggregateroutesAggregateRoutes> aggregateRoutes) {
+ this.aggregateRoutes = aggregateRoutes;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup onapModelInformation(GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
+ return this;
+ }
+
+ /**
+ * Get onapModelInformation
+ * @return onapModelInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiOnapmodelinformationOnapModelInformation getOnapModelInformation() {
+ return onapModelInformation;
+ }
+
+ public void setOnapModelInformation(GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup subnets(List<GenericResourceApiSubnetsSubnets> subnets) {
+ this.subnets = subnets;
+ return this;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup addSubnetsItem(GenericResourceApiSubnetsSubnets subnetsItem) {
+ if (this.subnets == null) {
+ this.subnets = new ArrayList<>();
+ }
+ this.subnets.add(subnetsItem);
+ return this;
+ }
+
+ /**
+ * Get subnets
+ * @return subnets
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiSubnetsSubnets> getSubnets() {
+ return subnets;
+ }
+
+ public void setSubnets(List<GenericResourceApiSubnetsSubnets> subnets) {
+ this.subnets = subnets;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup subnetAssignmentPolicy(GenericResourceApiNetworkinstancegroupNetworkinstancegroupSubnetAssignmentPolicy subnetAssignmentPolicy) {
+ this.subnetAssignmentPolicy = subnetAssignmentPolicy;
+ return this;
+ }
+
+ /**
+ * Get subnetAssignmentPolicy
+ * @return subnetAssignmentPolicy
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiNetworkinstancegroupNetworkinstancegroupSubnetAssignmentPolicy getSubnetAssignmentPolicy() {
+ return subnetAssignmentPolicy;
+ }
+
+ public void setSubnetAssignmentPolicy(GenericResourceApiNetworkinstancegroupNetworkinstancegroupSubnetAssignmentPolicy subnetAssignmentPolicy) {
+ this.subnetAssignmentPolicy = subnetAssignmentPolicy;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup serviceInstanceId(String serviceInstanceId) {
+ this.serviceInstanceId = serviceInstanceId;
+ return this;
+ }
+
+ /**
+ * Get serviceInstanceId
+ * @return serviceInstanceId
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getServiceInstanceId() {
+ return serviceInstanceId;
+ }
+
+ public void setServiceInstanceId(String serviceInstanceId) {
+ this.serviceInstanceId = serviceInstanceId;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup vpnBindingPolicy(GenericResourceApiNetworkinstancegroupNetworkinstancegroupVpnBindingPolicy vpnBindingPolicy) {
+ this.vpnBindingPolicy = vpnBindingPolicy;
+ return this;
+ }
+
+ /**
+ * Get vpnBindingPolicy
+ * @return vpnBindingPolicy
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiNetworkinstancegroupNetworkinstancegroupVpnBindingPolicy getVpnBindingPolicy() {
+ return vpnBindingPolicy;
+ }
+
+ public void setVpnBindingPolicy(GenericResourceApiNetworkinstancegroupNetworkinstancegroupVpnBindingPolicy vpnBindingPolicy) {
+ this.vpnBindingPolicy = vpnBindingPolicy;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup networkInstanceGroupId(String networkInstanceGroupId) {
+ this.networkInstanceGroupId = networkInstanceGroupId;
+ return this;
+ }
+
+ /**
+ * Also a Key in Network Instance Group in A&AI
+ * @return networkInstanceGroupId
+ **/
+ @ApiModelProperty(value = "Also a Key in Network Instance Group in A&AI")
+
+
+ public String getNetworkInstanceGroupId() {
+ return networkInstanceGroupId;
+ }
+
+ public void setNetworkInstanceGroupId(String networkInstanceGroupId) {
+ this.networkInstanceGroupId = networkInstanceGroupId;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup networkInstanceGroupFunction(String networkInstanceGroupFunction) {
+ this.networkInstanceGroupFunction = networkInstanceGroupFunction;
+ return this;
+ }
+
+ /**
+ * Get networkInstanceGroupFunction
+ * @return networkInstanceGroupFunction
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getNetworkInstanceGroupFunction() {
+ return networkInstanceGroupFunction;
+ }
+
+ public void setNetworkInstanceGroupFunction(String networkInstanceGroupFunction) {
+ this.networkInstanceGroupFunction = networkInstanceGroupFunction;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup networks(GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks networks) {
+ this.networks = networks;
+ return this;
+ }
+
+ /**
+ * Get networks
+ * @return networks
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks getNetworks() {
+ return networks;
+ }
+
+ public void setNetworks(GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworks networks) {
+ this.networks = networks;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup aggregateRoutePolicy(GenericResourceApiNetworkinstancegroupNetworkinstancegroupAggregateRoutePolicy aggregateRoutePolicy) {
+ this.aggregateRoutePolicy = aggregateRoutePolicy;
+ return this;
+ }
+
+ /**
+ * Get aggregateRoutePolicy
+ * @return aggregateRoutePolicy
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiNetworkinstancegroupNetworkinstancegroupAggregateRoutePolicy getAggregateRoutePolicy() {
+ return aggregateRoutePolicy;
+ }
+
+ public void setAggregateRoutePolicy(GenericResourceApiNetworkinstancegroupNetworkinstancegroupAggregateRoutePolicy aggregateRoutePolicy) {
+ this.aggregateRoutePolicy = aggregateRoutePolicy;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkInstanceGroup subnetKeyValue(String subnetKeyValue) {
+ this.subnetKeyValue = subnetKeyValue;
+ return this;
+ }
+
+ /**
+ * key-value provided to IPAM when creating shared subnet
+ * @return subnetKeyValue
+ **/
+ @ApiModelProperty(value = "key-value provided to IPAM when creating shared subnet")
+
+
+ public String getSubnetKeyValue() {
+ return subnetKeyValue;
+ }
+
+ public void setSubnetKeyValue(String subnetKeyValue) {
+ this.subnetKeyValue = subnetKeyValue;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiNetworkinstancegroupNetworkInstanceGroup genericResourceApiNetworkinstancegroupNetworkInstanceGroup = (GenericResourceApiNetworkinstancegroupNetworkInstanceGroup) o;
+ return Objects.equals(this.aggregateRoutes, genericResourceApiNetworkinstancegroupNetworkInstanceGroup.aggregateRoutes) &&
+ Objects.equals(this.onapModelInformation, genericResourceApiNetworkinstancegroupNetworkInstanceGroup.onapModelInformation) &&
+ Objects.equals(this.subnets, genericResourceApiNetworkinstancegroupNetworkInstanceGroup.subnets) &&
+ Objects.equals(this.subnetAssignmentPolicy, genericResourceApiNetworkinstancegroupNetworkInstanceGroup.subnetAssignmentPolicy) &&
+ Objects.equals(this.serviceInstanceId, genericResourceApiNetworkinstancegroupNetworkInstanceGroup.serviceInstanceId) &&
+ Objects.equals(this.vpnBindingPolicy, genericResourceApiNetworkinstancegroupNetworkInstanceGroup.vpnBindingPolicy) &&
+ Objects.equals(this.networkInstanceGroupId, genericResourceApiNetworkinstancegroupNetworkInstanceGroup.networkInstanceGroupId) &&
+ Objects.equals(this.networkInstanceGroupFunction, genericResourceApiNetworkinstancegroupNetworkInstanceGroup.networkInstanceGroupFunction) &&
+ Objects.equals(this.networks, genericResourceApiNetworkinstancegroupNetworkInstanceGroup.networks) &&
+ Objects.equals(this.aggregateRoutePolicy, genericResourceApiNetworkinstancegroupNetworkInstanceGroup.aggregateRoutePolicy) &&
+ Objects.equals(this.subnetKeyValue, genericResourceApiNetworkinstancegroupNetworkInstanceGroup.subnetKeyValue);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(aggregateRoutes, onapModelInformation, subnets, subnetAssignmentPolicy, serviceInstanceId, vpnBindingPolicy, networkInstanceGroupId, networkInstanceGroupFunction, networks, aggregateRoutePolicy, subnetKeyValue);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiNetworkinstancegroupNetworkInstanceGroup {\n");
+
+ sb.append(" aggregateRoutes: ").append(toIndentedString(aggregateRoutes)).append("\n");
+ sb.append(" onapModelInformation: ").append(toIndentedString(onapModelInformation)).append("\n");
+ sb.append(" subnets: ").append(toIndentedString(subnets)).append("\n");
+ sb.append(" subnetAssignmentPolicy: ").append(toIndentedString(subnetAssignmentPolicy)).append("\n");
+ sb.append(" serviceInstanceId: ").append(toIndentedString(serviceInstanceId)).append("\n");
+ sb.append(" vpnBindingPolicy: ").append(toIndentedString(vpnBindingPolicy)).append("\n");
+ sb.append(" networkInstanceGroupId: ").append(toIndentedString(networkInstanceGroupId)).append("\n");
+ sb.append(" networkInstanceGroupFunction: ").append(toIndentedString(networkInstanceGroupFunction)).append("\n");
+ sb.append(" networks: ").append(toIndentedString(networks)).append("\n");
+ sb.append(" aggregateRoutePolicy: ").append(toIndentedString(aggregateRoutePolicy)).append("\n");
+ sb.append(" subnetKeyValue: ").append(toIndentedString(subnetKeyValue)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork.java
new file mode 100644
index 0000000..06ac646
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork.java
@@ -0,0 +1,223 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetworkCustomerBondingRequests;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVpnBindings;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVpnbindingsVpnBindings;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-23T12:02:01.518-04:00")
+@JsonRootName("network")
+public class GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork {
+ @JsonProperty("vpn-bindings")
+ @Valid
+ private List<GenericResourceApiVpnbindingsVpnBindings> vpnBindings = null;
+
+ @JsonProperty("network-status")
+ private String networkStatus = null;
+
+ @JsonProperty("neutron-network-id")
+ private String neutronNetworkId = null;
+
+ @JsonProperty("network-id")
+ private String networkId = null;
+
+ @JsonProperty("customer-bonding-requests")
+ private GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetworkCustomerBondingRequests customerBondingRequests = null;
+
+ @JsonProperty("vlan-tag-id")
+ private Long vlanTagId = null;
+
+ public GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork vpnBindings(List<GenericResourceApiVpnbindingsVpnBindings> vpnBindings) {
+ this.vpnBindings = vpnBindings;
+ return this;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork addVpnBindingsItem(GenericResourceApiVpnbindingsVpnBindings vpnBindingsItem) {
+ if (this.vpnBindings == null) {
+ this.vpnBindings = new ArrayList<>();
+ }
+ this.vpnBindings.add(vpnBindingsItem);
+ return this;
+ }
+
+ /**
+ * Get vpnBindings
+ * @return vpnBindings
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiVpnbindingsVpnBindings> getVpnBindings() {
+ return vpnBindings;
+ }
+
+ public void setVpnBindings(List<GenericResourceApiVpnbindingsVpnBindings> vpnBindings) {
+ this.vpnBindings = vpnBindings;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork networkStatus(String networkStatus) {
+ this.networkStatus = networkStatus;
+ return this;
+ }
+
+ /**
+ * assigned, unassigned
+ * @return networkStatus
+ **/
+ @ApiModelProperty(value = "assigned, unassigned")
+
+
+ public String getNetworkStatus() {
+ return networkStatus;
+ }
+
+ public void setNetworkStatus(String networkStatus) {
+ this.networkStatus = networkStatus;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork neutronNetworkId(String neutronNetworkId) {
+ this.neutronNetworkId = neutronNetworkId;
+ return this;
+ }
+
+ /**
+ * Neutron-network-id assigned by PO/RO
+ * @return neutronNetworkId
+ **/
+ @ApiModelProperty(value = "Neutron-network-id assigned by PO/RO")
+
+
+ public String getNeutronNetworkId() {
+ return neutronNetworkId;
+ }
+
+ public void setNeutronNetworkId(String neutronNetworkId) {
+ this.neutronNetworkId = neutronNetworkId;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork networkId(String networkId) {
+ this.networkId = networkId;
+ return this;
+ }
+
+ /**
+ * Index into network-topology-identifier structure
+ * @return networkId
+ **/
+ @ApiModelProperty(value = "Index into network-topology-identifier structure")
+
+
+ public String getNetworkId() {
+ return networkId;
+ }
+
+ public void setNetworkId(String networkId) {
+ this.networkId = networkId;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork customerBondingRequests(GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetworkCustomerBondingRequests customerBondingRequests) {
+ this.customerBondingRequests = customerBondingRequests;
+ return this;
+ }
+
+ /**
+ * Get customerBondingRequests
+ * @return customerBondingRequests
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetworkCustomerBondingRequests getCustomerBondingRequests() {
+ return customerBondingRequests;
+ }
+
+ public void setCustomerBondingRequests(GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetworkCustomerBondingRequests customerBondingRequests) {
+ this.customerBondingRequests = customerBondingRequests;
+ }
+
+ public GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork vlanTagId(Long vlanTagId) {
+ this.vlanTagId = vlanTagId;
+ return this;
+ }
+
+ /**
+ * Get vlanTagId
+ * @return vlanTagId
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public Long getVlanTagId() {
+ return vlanTagId;
+ }
+
+ public void setVlanTagId(Long vlanTagId) {
+ this.vlanTagId = vlanTagId;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork genericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork = (GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork) o;
+ return Objects.equals(this.vpnBindings, genericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork.vpnBindings) &&
+ Objects.equals(this.networkStatus, genericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork.networkStatus) &&
+ Objects.equals(this.neutronNetworkId, genericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork.neutronNetworkId) &&
+ Objects.equals(this.networkId, genericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork.networkId) &&
+ Objects.equals(this.customerBondingRequests, genericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork.customerBondingRequests) &&
+ Objects.equals(this.vlanTagId, genericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork.vlanTagId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(vpnBindings, networkStatus, neutronNetworkId, networkId, customerBondingRequests, vlanTagId);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiNetworkinstancegroupNetworkinstancegroupNetworksNetwork {\n");
+
+ sb.append(" vpnBindings: ").append(toIndentedString(vpnBindings)).append("\n");
+ sb.append(" networkStatus: ").append(toIndentedString(networkStatus)).append("\n");
+ sb.append(" neutronNetworkId: ").append(toIndentedString(neutronNetworkId)).append("\n");
+ sb.append(" networkId: ").append(toIndentedString(networkId)).append("\n");
+ sb.append(" customerBondingRequests: ").append(toIndentedString(customerBondingRequests)).append("\n");
+ sb.append(" vlanTagId: ").append(toIndentedString(vlanTagId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.java
new file mode 100644
index 0000000..1a80485
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.java
@@ -0,0 +1,334 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiRelatedNetwork;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-23T12:02:01.518-04:00")
+@JsonRootName("network-topology-identifier-structure")
+public class GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure {
+ @JsonProperty("related-networks")
+ private GenericResourceApiRelatedNetwork relatedNetworks = null;
+
+ @JsonProperty("network-role")
+ private String networkRole = null;
+
+ @JsonProperty("is-trunked")
+ private Boolean isTrunked = null;
+
+ @JsonProperty("network-technology")
+ private String networkTechnology = null;
+
+ @JsonProperty("network-id")
+ private String networkId = null;
+
+ @JsonProperty("eipam-v4-address-plan")
+ private String eipamV4AddressPlan = null;
+
+ @JsonProperty("network-instance-group-id")
+ private String networkInstanceGroupId = null;
+
+ @JsonProperty("network-name")
+ private String networkName = null;
+
+ @JsonProperty("segmentation-id")
+ private String segmentationId = null;
+
+ @JsonProperty("eipam-v6-address-plan")
+ private String eipamV6AddressPlan = null;
+
+ @JsonProperty("network-type")
+ private String networkType = null;
+
+ public GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure relatedNetworks(GenericResourceApiRelatedNetwork relatedNetworks) {
+ this.relatedNetworks = relatedNetworks;
+ return this;
+ }
+
+ /**
+ * Get relatedNetworks
+ * @return relatedNetworks
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiRelatedNetwork getRelatedNetworks() {
+ return relatedNetworks;
+ }
+
+ public void setRelatedNetworks(GenericResourceApiRelatedNetwork relatedNetworks) {
+ this.relatedNetworks = relatedNetworks;
+ }
+
+ public GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure networkRole(String networkRole) {
+ this.networkRole = networkRole;
+ return this;
+ }
+
+ /**
+ * Get networkRole
+ * @return networkRole
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getNetworkRole() {
+ return networkRole;
+ }
+
+ public void setNetworkRole(String networkRole) {
+ this.networkRole = networkRole;
+ }
+
+ public GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure isTrunked(Boolean isTrunked) {
+ this.isTrunked = isTrunked;
+ return this;
+ }
+
+ /**
+ * Get isTrunked
+ * @return isTrunked
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public Boolean isIsTrunked() {
+ return isTrunked;
+ }
+
+ public void setIsTrunked(Boolean isTrunked) {
+ this.isTrunked = isTrunked;
+ }
+
+ public GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure networkTechnology(String networkTechnology) {
+ this.networkTechnology = networkTechnology;
+ return this;
+ }
+
+ /**
+ * Get networkTechnology
+ * @return networkTechnology
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getNetworkTechnology() {
+ return networkTechnology;
+ }
+
+ public void setNetworkTechnology(String networkTechnology) {
+ this.networkTechnology = networkTechnology;
+ }
+
+ public GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure networkId(String networkId) {
+ this.networkId = networkId;
+ return this;
+ }
+
+ /**
+ * Get networkId
+ * @return networkId
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getNetworkId() {
+ return networkId;
+ }
+
+ public void setNetworkId(String networkId) {
+ this.networkId = networkId;
+ }
+
+ public GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure eipamV4AddressPlan(String eipamV4AddressPlan) {
+ this.eipamV4AddressPlan = eipamV4AddressPlan;
+ return this;
+ }
+
+ /**
+ * Get eipamV4AddressPlan
+ * @return eipamV4AddressPlan
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getEipamV4AddressPlan() {
+ return eipamV4AddressPlan;
+ }
+
+ public void setEipamV4AddressPlan(String eipamV4AddressPlan) {
+ this.eipamV4AddressPlan = eipamV4AddressPlan;
+ }
+
+ public GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure networkInstanceGroupId(String networkInstanceGroupId) {
+ this.networkInstanceGroupId = networkInstanceGroupId;
+ return this;
+ }
+
+ /**
+ * When network is part of network instance-Group-data & instance Group in A&AI
+ * @return networkInstanceGroupId
+ **/
+ @ApiModelProperty(value = "When network is part of network instance-Group-data & instance Group in A&AI")
+
+
+ public String getNetworkInstanceGroupId() {
+ return networkInstanceGroupId;
+ }
+
+ public void setNetworkInstanceGroupId(String networkInstanceGroupId) {
+ this.networkInstanceGroupId = networkInstanceGroupId;
+ }
+
+ public GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure networkName(String networkName) {
+ this.networkName = networkName;
+ return this;
+ }
+
+ /**
+ * Get networkName
+ * @return networkName
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getNetworkName() {
+ return networkName;
+ }
+
+ public void setNetworkName(String networkName) {
+ this.networkName = networkName;
+ }
+
+ public GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure segmentationId(String segmentationId) {
+ this.segmentationId = segmentationId;
+ return this;
+ }
+
+ /**
+ * Get segmentationId
+ * @return segmentationId
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getSegmentationId() {
+ return segmentationId;
+ }
+
+ public void setSegmentationId(String segmentationId) {
+ this.segmentationId = segmentationId;
+ }
+
+ public GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure eipamV6AddressPlan(String eipamV6AddressPlan) {
+ this.eipamV6AddressPlan = eipamV6AddressPlan;
+ return this;
+ }
+
+ /**
+ * Get eipamV6AddressPlan
+ * @return eipamV6AddressPlan
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getEipamV6AddressPlan() {
+ return eipamV6AddressPlan;
+ }
+
+ public void setEipamV6AddressPlan(String eipamV6AddressPlan) {
+ this.eipamV6AddressPlan = eipamV6AddressPlan;
+ }
+
+ public GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure networkType(String networkType) {
+ this.networkType = networkType;
+ return this;
+ }
+
+ /**
+ * Get networkType
+ * @return networkType
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getNetworkType() {
+ return networkType;
+ }
+
+ public void setNetworkType(String networkType) {
+ this.networkType = networkType;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure genericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure = (GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure) o;
+ return Objects.equals(this.relatedNetworks, genericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.relatedNetworks) &&
+ Objects.equals(this.networkRole, genericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.networkRole) &&
+ Objects.equals(this.isTrunked, genericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.isTrunked) &&
+ Objects.equals(this.networkTechnology, genericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.networkTechnology) &&
+ Objects.equals(this.networkId, genericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.networkId) &&
+ Objects.equals(this.eipamV4AddressPlan, genericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.eipamV4AddressPlan) &&
+ Objects.equals(this.networkInstanceGroupId, genericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.networkInstanceGroupId) &&
+ Objects.equals(this.networkName, genericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.networkName) &&
+ Objects.equals(this.segmentationId, genericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.segmentationId) &&
+ Objects.equals(this.eipamV6AddressPlan, genericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.eipamV6AddressPlan) &&
+ Objects.equals(this.networkType, genericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure.networkType);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(relatedNetworks, networkRole, isTrunked, networkTechnology, networkId, eipamV4AddressPlan, networkInstanceGroupId, networkName, segmentationId, eipamV6AddressPlan, networkType);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure {\n");
+
+ sb.append(" relatedNetworks: ").append(toIndentedString(relatedNetworks)).append("\n");
+ sb.append(" networkRole: ").append(toIndentedString(networkRole)).append("\n");
+ sb.append(" isTrunked: ").append(toIndentedString(isTrunked)).append("\n");
+ sb.append(" networkTechnology: ").append(toIndentedString(networkTechnology)).append("\n");
+ sb.append(" networkId: ").append(toIndentedString(networkId)).append("\n");
+ sb.append(" eipamV4AddressPlan: ").append(toIndentedString(eipamV4AddressPlan)).append("\n");
+ sb.append(" networkInstanceGroupId: ").append(toIndentedString(networkInstanceGroupId)).append("\n");
+ sb.append(" networkName: ").append(toIndentedString(networkName)).append("\n");
+ sb.append(" segmentationId: ").append(toIndentedString(segmentationId)).append("\n");
+ sb.append(" eipamV6AddressPlan: ").append(toIndentedString(eipamV6AddressPlan)).append("\n");
+ sb.append(" networkType: ").append(toIndentedString(networkType)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiOnapmodelinformationOnapModelInformation.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiOnapmodelinformationOnapModelInformation.java
new file mode 100644
index 0000000..d6efbc6
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiOnapmodelinformationOnapModelInformation.java
@@ -0,0 +1,182 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiOnapmodelinformationOnapModelInformation
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-26T09:20:20.871-04:00")
+@JsonRootName("onap-model-information")
+public class GenericResourceApiOnapmodelinformationOnapModelInformation {
+ @JsonProperty("model-name")
+ private String modelName = null;
+
+ @JsonProperty("model-version")
+ private String modelVersion = null;
+
+ @JsonProperty("model-customization-uuid")
+ private String modelCustomizationUuid = null;
+
+ @JsonProperty("model-uuid")
+ private String modelUuid = null;
+
+ @JsonProperty("model-invariant-uuid")
+ private String modelInvariantUuid = null;
+
+ public GenericResourceApiOnapmodelinformationOnapModelInformation modelName(String modelName) {
+ this.modelName = modelName;
+ return this;
+ }
+
+ /**
+ * Get modelName
+ * @return modelName
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getModelName() {
+ return modelName;
+ }
+
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ public GenericResourceApiOnapmodelinformationOnapModelInformation modelVersion(String modelVersion) {
+ this.modelVersion = modelVersion;
+ return this;
+ }
+
+ /**
+ * Get modelVersion
+ * @return modelVersion
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getModelVersion() {
+ return modelVersion;
+ }
+
+ public void setModelVersion(String modelVersion) {
+ this.modelVersion = modelVersion;
+ }
+
+ public GenericResourceApiOnapmodelinformationOnapModelInformation modelCustomizationUuid(String modelCustomizationUuid) {
+ this.modelCustomizationUuid = modelCustomizationUuid;
+ return this;
+ }
+
+ /**
+ * customized resource for use within a given service.Would not be present at the service level but would be present for the resource level
+ * @return modelCustomizationUuid
+ **/
+ @ApiModelProperty(value = "customized resource for use within a given service.Would not be present at the service level but would be present for the resource level")
+
+
+ public String getModelCustomizationUuid() {
+ return modelCustomizationUuid;
+ }
+
+ public void setModelCustomizationUuid(String modelCustomizationUuid) {
+ this.modelCustomizationUuid = modelCustomizationUuid;
+ }
+
+ public GenericResourceApiOnapmodelinformationOnapModelInformation modelUuid(String modelUuid) {
+ this.modelUuid = modelUuid;
+ return this;
+ }
+
+ /**
+ * identifies the uuid for this service or resource, which is version specific
+ * @return modelUuid
+ **/
+ @ApiModelProperty(value = "identifies the uuid for this service or resource, which is version specific")
+
+
+ public String getModelUuid() {
+ return modelUuid;
+ }
+
+ public void setModelUuid(String modelUuid) {
+ this.modelUuid = modelUuid;
+ }
+
+ public GenericResourceApiOnapmodelinformationOnapModelInformation modelInvariantUuid(String modelInvariantUuid) {
+ this.modelInvariantUuid = modelInvariantUuid;
+ return this;
+ }
+
+ /**
+ * identifies the invariant uuid for this service or resource
+ * @return modelInvariantUuid
+ **/
+ @ApiModelProperty(value = "identifies the invariant uuid for this service or resource")
+
+
+ public String getModelInvariantUuid() {
+ return modelInvariantUuid;
+ }
+
+ public void setModelInvariantUuid(String modelInvariantUuid) {
+ this.modelInvariantUuid = modelInvariantUuid;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiOnapmodelinformationOnapModelInformation genericResourceApiOnapmodelinformationOnapModelInformation = (GenericResourceApiOnapmodelinformationOnapModelInformation) o;
+ return Objects.equals(this.modelName, genericResourceApiOnapmodelinformationOnapModelInformation.modelName) &&
+ Objects.equals(this.modelVersion, genericResourceApiOnapmodelinformationOnapModelInformation.modelVersion) &&
+ Objects.equals(this.modelCustomizationUuid, genericResourceApiOnapmodelinformationOnapModelInformation.modelCustomizationUuid) &&
+ Objects.equals(this.modelUuid, genericResourceApiOnapmodelinformationOnapModelInformation.modelUuid) &&
+ Objects.equals(this.modelInvariantUuid, genericResourceApiOnapmodelinformationOnapModelInformation.modelInvariantUuid);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(modelName, modelVersion, modelCustomizationUuid, modelUuid, modelInvariantUuid);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiOnapmodelinformationOnapModelInformation {\n");
+
+ sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n");
+ sb.append(" modelVersion: ").append(toIndentedString(modelVersion)).append("\n");
+ sb.append(" modelCustomizationUuid: ").append(toIndentedString(modelCustomizationUuid)).append("\n");
+ sb.append(" modelUuid: ").append(toIndentedString(modelUuid)).append("\n");
+ sb.append(" modelInvariantUuid: ").append(toIndentedString(modelInvariantUuid)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiOperStatusData.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiOperStatusData.java
new file mode 100644
index 0000000..e07c4db
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiOperStatusData.java
@@ -0,0 +1,237 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+
+import javax.validation.Valid;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+import org.springframework.validation.annotation.Validated;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * GenericResourceApiOperStatusData
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-23T12:02:01.518-04:00")
+@JsonRootName("oper-status")
+public class GenericResourceApiOperStatusData {
+ @JsonProperty("last-action")
+ private GenericResourceApiLastActionEnumeration lastAction = null;
+
+ @JsonProperty("modify-timestamp")
+ private String modifyTimestamp = null;
+
+ @JsonProperty("last-order-status")
+ private GenericResourceApiLastOrderStatusEnumeration lastOrderStatus = null;
+
+ @JsonProperty("create-timestamp")
+ private String createTimestamp = null;
+
+ @JsonProperty("order-status")
+ private GenericResourceApiOrderStatusEnumeration orderStatus = null;
+
+ @JsonProperty("last-rpc-action")
+ private GenericResourceApiLastRpcActionEnumeration lastRpcAction = null;
+
+ @JsonProperty("last-svc-request-id")
+ private String lastSvcRequestId = null;
+
+ public GenericResourceApiOperStatusData lastAction(GenericResourceApiLastActionEnumeration lastAction) {
+ this.lastAction = lastAction;
+ return this;
+ }
+
+ /**
+ * should be list of possible request-actions
+ * @return lastAction
+ **/
+ @ApiModelProperty(value = "should be list of possible request-actions")
+
+ @Valid
+
+ public GenericResourceApiLastActionEnumeration getLastAction() {
+ return lastAction;
+ }
+
+ public void setLastAction(GenericResourceApiLastActionEnumeration lastAction) {
+ this.lastAction = lastAction;
+ }
+
+ public GenericResourceApiOperStatusData modifyTimestamp(String modifyTimestamp) {
+ this.modifyTimestamp = modifyTimestamp;
+ return this;
+ }
+
+ /**
+ * Get modifyTimestamp
+ * @return modifyTimestamp
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getModifyTimestamp() {
+ return modifyTimestamp;
+ }
+
+ public void setModifyTimestamp(String modifyTimestamp) {
+ this.modifyTimestamp = modifyTimestamp;
+ }
+
+ public GenericResourceApiOperStatusData lastOrderStatus(GenericResourceApiLastOrderStatusEnumeration lastOrderStatus) {
+ this.lastOrderStatus = lastOrderStatus;
+ return this;
+ }
+
+ /**
+ * Get lastOrderStatus
+ * @return lastOrderStatus
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiLastOrderStatusEnumeration getLastOrderStatus() {
+ return lastOrderStatus;
+ }
+
+ public void setLastOrderStatus(GenericResourceApiLastOrderStatusEnumeration lastOrderStatus) {
+ this.lastOrderStatus = lastOrderStatus;
+ }
+
+ public GenericResourceApiOperStatusData createTimestamp(String createTimestamp) {
+ this.createTimestamp = createTimestamp;
+ return this;
+ }
+
+ /**
+ * Not currently populated in service data.
+ * @return createTimestamp
+ **/
+ @ApiModelProperty(value = "Not currently populated in service data.")
+
+
+ public String getCreateTimestamp() {
+ return createTimestamp;
+ }
+
+ public void setCreateTimestamp(String createTimestamp) {
+ this.createTimestamp = createTimestamp;
+ }
+
+ public GenericResourceApiOperStatusData orderStatus(GenericResourceApiOrderStatusEnumeration orderStatus) {
+ this.orderStatus = orderStatus;
+ return this;
+ }
+
+ /**
+ * TBD - do we need Request failed statuses? RequestFailed | InProgressTimeout
+ * @return orderStatus
+ **/
+ @ApiModelProperty(value = "TBD - do we need Request failed statuses? RequestFailed | InProgressTimeout")
+
+ @Valid
+
+ public GenericResourceApiOrderStatusEnumeration getOrderStatus() {
+ return orderStatus;
+ }
+
+ public void setOrderStatus(GenericResourceApiOrderStatusEnumeration orderStatus) {
+ this.orderStatus = orderStatus;
+ }
+
+ public GenericResourceApiOperStatusData lastRpcAction(GenericResourceApiLastRpcActionEnumeration lastRpcAction) {
+ this.lastRpcAction = lastRpcAction;
+ return this;
+ }
+
+ /**
+ * Get lastRpcAction
+ * @return lastRpcAction
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiLastRpcActionEnumeration getLastRpcAction() {
+ return lastRpcAction;
+ }
+
+ public void setLastRpcAction(GenericResourceApiLastRpcActionEnumeration lastRpcAction) {
+ this.lastRpcAction = lastRpcAction;
+ }
+
+ public GenericResourceApiOperStatusData lastSvcRequestId(String lastSvcRequestId) {
+ this.lastSvcRequestId = lastSvcRequestId;
+ return this;
+ }
+
+ /**
+ * Not currently populated in service data.
+ * @return lastSvcRequestId
+ **/
+ @ApiModelProperty(value = "Not currently populated in service data.")
+
+
+ public String getLastSvcRequestId() {
+ return lastSvcRequestId;
+ }
+
+ public void setLastSvcRequestId(String lastSvcRequestId) {
+ this.lastSvcRequestId = lastSvcRequestId;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiOperStatusData genericResourceApiOperStatusData = (GenericResourceApiOperStatusData) o;
+ return Objects.equals(this.lastAction, genericResourceApiOperStatusData.lastAction) &&
+ Objects.equals(this.modifyTimestamp, genericResourceApiOperStatusData.modifyTimestamp) &&
+ Objects.equals(this.lastOrderStatus, genericResourceApiOperStatusData.lastOrderStatus) &&
+ Objects.equals(this.createTimestamp, genericResourceApiOperStatusData.createTimestamp) &&
+ Objects.equals(this.orderStatus, genericResourceApiOperStatusData.orderStatus) &&
+ Objects.equals(this.lastRpcAction, genericResourceApiOperStatusData.lastRpcAction) &&
+ Objects.equals(this.lastSvcRequestId, genericResourceApiOperStatusData.lastSvcRequestId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(lastAction, modifyTimestamp, lastOrderStatus, createTimestamp, orderStatus, lastRpcAction, lastSvcRequestId);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiOperStatusData {\n");
+
+ sb.append(" lastAction: ").append(toIndentedString(lastAction)).append("\n");
+ sb.append(" modifyTimestamp: ").append(toIndentedString(modifyTimestamp)).append("\n");
+ sb.append(" lastOrderStatus: ").append(toIndentedString(lastOrderStatus)).append("\n");
+ sb.append(" createTimestamp: ").append(toIndentedString(createTimestamp)).append("\n");
+ sb.append(" orderStatus: ").append(toIndentedString(orderStatus)).append("\n");
+ sb.append(" lastRpcAction: ").append(toIndentedString(lastRpcAction)).append("\n");
+ sb.append(" lastSvcRequestId: ").append(toIndentedString(lastSvcRequestId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPortMirrorConfigurations.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPortMirrorConfigurations.java
new file mode 100644
index 0000000..86b6dc1
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPortMirrorConfigurations.java
@@ -0,0 +1,95 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiPortMirrorConfigurations
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-26T14:28:03.605-04:00")
+@JsonRootName("port-mirror-configurations")
+public class GenericResourceApiPortMirrorConfigurations {
+ @JsonProperty("port-mirror-configuration")
+ @Valid
+ private List<GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration> portMirrorConfiguration = null;
+
+ public GenericResourceApiPortMirrorConfigurations portMirrorConfiguration(List<GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration> portMirrorConfiguration) {
+ this.portMirrorConfiguration = portMirrorConfiguration;
+ return this;
+ }
+
+ public GenericResourceApiPortMirrorConfigurations addPortMirrorConfigurationItem(GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration portMirrorConfigurationItem) {
+ if (this.portMirrorConfiguration == null) {
+ this.portMirrorConfiguration = new ArrayList<>();
+ }
+ this.portMirrorConfiguration.add(portMirrorConfigurationItem);
+ return this;
+ }
+
+ /**
+ * Get portMirrorConfiguration
+ * @return portMirrorConfiguration
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration> getPortMirrorConfiguration() {
+ return portMirrorConfiguration;
+ }
+
+ public void setPortMirrorConfiguration(List<GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration> portMirrorConfiguration) {
+ this.portMirrorConfiguration = portMirrorConfiguration;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiPortMirrorConfigurations genericResourceApiPortMirrorConfigurations = (GenericResourceApiPortMirrorConfigurations) o;
+ return Objects.equals(this.portMirrorConfiguration, genericResourceApiPortMirrorConfigurations.portMirrorConfiguration);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(portMirrorConfiguration);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiPortMirrorConfigurations {\n");
+
+ sb.append(" portMirrorConfiguration: ").append(toIndentedString(portMirrorConfiguration)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration.java
new file mode 100644
index 0000000..ee7ab77
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration.java
@@ -0,0 +1,137 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiConfigurationStatus;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiConfigurationstatusConfigurationStatus;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPortmirrorconfigurationsPortmirrorconfigurationConfigurationData;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("port-mirror-configuration")
+public class GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration {
+ @JsonProperty("configuration-status")
+ private GenericResourceApiConfigurationstatusConfigurationStatus configurationStatus = null;
+
+ @JsonProperty("configuration-id")
+ private String configurationId = null;
+
+ @JsonProperty("configuration-data")
+ private GenericResourceApiPortmirrorconfigurationsPortmirrorconfigurationConfigurationData configurationData = null;
+
+ public GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration configurationStatus(GenericResourceApiConfigurationstatusConfigurationStatus configurationStatus) {
+ this.configurationStatus = configurationStatus;
+ return this;
+ }
+
+ /**
+ * Get configurationStatus
+ * @return configurationStatus
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiConfigurationstatusConfigurationStatus getConfigurationStatus() {
+ return configurationStatus;
+ }
+
+ public void setConfigurationStatus(GenericResourceApiConfigurationstatusConfigurationStatus configurationStatus) {
+ this.configurationStatus = configurationStatus;
+ }
+
+ public GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration configurationId(String configurationId) {
+ this.configurationId = configurationId;
+ return this;
+ }
+
+ /**
+ * Get configurationId
+ * @return configurationId
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getConfigurationId() {
+ return configurationId;
+ }
+
+ public void setConfigurationId(String configurationId) {
+ this.configurationId = configurationId;
+ }
+
+ public GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration configurationData(GenericResourceApiPortmirrorconfigurationsPortmirrorconfigurationConfigurationData configurationData) {
+ this.configurationData = configurationData;
+ return this;
+ }
+
+ /**
+ * Get configurationData
+ * @return configurationData
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiPortmirrorconfigurationsPortmirrorconfigurationConfigurationData getConfigurationData() {
+ return configurationData;
+ }
+
+ public void setConfigurationData(GenericResourceApiPortmirrorconfigurationsPortmirrorconfigurationConfigurationData configurationData) {
+ this.configurationData = configurationData;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration genericResourceApiPortmirrorconfigurationsPortMirrorConfiguration = (GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration) o;
+ return Objects.equals(this.configurationStatus, genericResourceApiPortmirrorconfigurationsPortMirrorConfiguration.configurationStatus) &&
+ Objects.equals(this.configurationId, genericResourceApiPortmirrorconfigurationsPortMirrorConfiguration.configurationId) &&
+ Objects.equals(this.configurationData, genericResourceApiPortmirrorconfigurationsPortMirrorConfiguration.configurationData);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(configurationStatus, configurationId, configurationData);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiPortmirrorconfigurationsPortMirrorConfiguration {\n");
+
+ sb.append(" configurationStatus: ").append(toIndentedString(configurationStatus)).append("\n");
+ sb.append(" configurationId: ").append(toIndentedString(configurationId)).append("\n");
+ sb.append(" configurationData: ").append(toIndentedString(configurationData)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology.java
new file mode 100644
index 0000000..a855906
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology.java
@@ -0,0 +1,168 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiConfigurationIdentifiers;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiConfigurationidentifiersConfigurationIdentifiers;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapModelInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapmodelinformationOnapModelInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiParam;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPortMirrorConfigurationAssignments;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPortmirrorconfigurationassignmentsPortMirrorConfigurationAssignments;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("port-mirror-configuration-topology")
+public class GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology {
+ @JsonProperty("configuration-identifiers")
+ private GenericResourceApiConfigurationidentifiersConfigurationIdentifiers configurationIdentifiers = null;
+
+ @JsonProperty("onap-model-information")
+ private GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation = null;
+
+ @JsonProperty("port-mirror-configuration-assignments")
+ private GenericResourceApiPortmirrorconfigurationassignmentsPortMirrorConfigurationAssignments portMirrorConfigurationAssignments = null;
+
+ @JsonProperty("port-mirror-configuration-parameters")
+ private GenericResourceApiParam portMirrorConfigurationParameters = null;
+
+ public GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology configurationIdentifiers(GenericResourceApiConfigurationidentifiersConfigurationIdentifiers configurationIdentifiers) {
+ this.configurationIdentifiers = configurationIdentifiers;
+ return this;
+ }
+
+ /**
+ * Get configurationIdentifiers
+ * @return configurationIdentifiers
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiConfigurationidentifiersConfigurationIdentifiers getConfigurationIdentifiers() {
+ return configurationIdentifiers;
+ }
+
+ public void setConfigurationIdentifiers(GenericResourceApiConfigurationidentifiersConfigurationIdentifiers configurationIdentifiers) {
+ this.configurationIdentifiers = configurationIdentifiers;
+ }
+
+ public GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology onapModelInformation(GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
+ return this;
+ }
+
+ /**
+ * Get onapModelInformation
+ * @return onapModelInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiOnapmodelinformationOnapModelInformation getOnapModelInformation() {
+ return onapModelInformation;
+ }
+
+ public void setOnapModelInformation(GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
+ }
+
+ public GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology portMirrorConfigurationAssignments(GenericResourceApiPortmirrorconfigurationassignmentsPortMirrorConfigurationAssignments portMirrorConfigurationAssignments) {
+ this.portMirrorConfigurationAssignments = portMirrorConfigurationAssignments;
+ return this;
+ }
+
+ /**
+ * Get portMirrorConfigurationAssignments
+ * @return portMirrorConfigurationAssignments
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiPortmirrorconfigurationassignmentsPortMirrorConfigurationAssignments getPortMirrorConfigurationAssignments() {
+ return portMirrorConfigurationAssignments;
+ }
+
+ public void setPortMirrorConfigurationAssignments(GenericResourceApiPortmirrorconfigurationassignmentsPortMirrorConfigurationAssignments portMirrorConfigurationAssignments) {
+ this.portMirrorConfigurationAssignments = portMirrorConfigurationAssignments;
+ }
+
+ public GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology portMirrorConfigurationParameters(GenericResourceApiParam portMirrorConfigurationParameters) {
+ this.portMirrorConfigurationParameters = portMirrorConfigurationParameters;
+ return this;
+ }
+
+ /**
+ * Get portMirrorConfigurationParameters
+ * @return portMirrorConfigurationParameters
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiParam getPortMirrorConfigurationParameters() {
+ return portMirrorConfigurationParameters;
+ }
+
+ public void setPortMirrorConfigurationParameters(GenericResourceApiParam portMirrorConfigurationParameters) {
+ this.portMirrorConfigurationParameters = portMirrorConfigurationParameters;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology genericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology = (GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology) o;
+ return Objects.equals(this.configurationIdentifiers, genericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology.configurationIdentifiers) &&
+ Objects.equals(this.onapModelInformation, genericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology.onapModelInformation) &&
+ Objects.equals(this.portMirrorConfigurationAssignments, genericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology.portMirrorConfigurationAssignments) &&
+ Objects.equals(this.portMirrorConfigurationParameters, genericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology.portMirrorConfigurationParameters);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(configurationIdentifiers, onapModelInformation, portMirrorConfigurationAssignments, portMirrorConfigurationParameters);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiPortmirrorconfigurationtopologyPortMirrorConfigurationTopology {\n");
+
+ sb.append(" configurationIdentifiers: ").append(toIndentedString(configurationIdentifiers)).append("\n");
+ sb.append(" onapModelInformation: ").append(toIndentedString(onapModelInformation)).append("\n");
+ sb.append(" portMirrorConfigurationAssignments: ").append(toIndentedString(portMirrorConfigurationAssignments)).append("\n");
+ sb.append(" portMirrorConfigurationParameters: ").append(toIndentedString(portMirrorConfigurationParameters)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloadModelInformation.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloadModelInformation.java
new file mode 100644
index 0000000..c9b443b
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloadModelInformation.java
@@ -0,0 +1,95 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloadmodelinformationPreloadList;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiPreloadModelInformation
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("preload-information")
+public class GenericResourceApiPreloadModelInformation {
+ @JsonProperty("preload-list")
+ @Valid
+ private List<GenericResourceApiPreloadmodelinformationPreloadList> preloadList = null;
+
+ public GenericResourceApiPreloadModelInformation preloadList(List<GenericResourceApiPreloadmodelinformationPreloadList> preloadList) {
+ this.preloadList = preloadList;
+ return this;
+ }
+
+ public GenericResourceApiPreloadModelInformation addPreloadListItem(GenericResourceApiPreloadmodelinformationPreloadList preloadListItem) {
+ if (this.preloadList == null) {
+ this.preloadList = new ArrayList<>();
+ }
+ this.preloadList.add(preloadListItem);
+ return this;
+ }
+
+ /**
+ * Get preloadList
+ * @return preloadList
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiPreloadmodelinformationPreloadList> getPreloadList() {
+ return preloadList;
+ }
+
+ public void setPreloadList(List<GenericResourceApiPreloadmodelinformationPreloadList> preloadList) {
+ this.preloadList = preloadList;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiPreloadModelInformation genericResourceApiPreloadModelInformation = (GenericResourceApiPreloadModelInformation) o;
+ return Objects.equals(this.preloadList, genericResourceApiPreloadModelInformation.preloadList);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(preloadList);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiPreloadModelInformation {\n");
+
+ sb.append(" preloadList: ").append(toIndentedString(preloadList)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloaddataPreloadData.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloaddataPreloadData.java
new file mode 100644
index 0000000..a6a4c9d
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloaddataPreloadData.java
@@ -0,0 +1,141 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloadNetworkTopologyInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloadOperStatus;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloadVfModuleTopologyInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloadoperstatusPreloadOperStatus;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloadvfmoduletopologyinformationPreloadVfModuleTopologyInformation;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiPreloaddataPreloadData
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("preload-data")
+public class GenericResourceApiPreloaddataPreloadData {
+ @JsonProperty("preload-network-topology-information")
+ private GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation preloadNetworkTopologyInformation = null;
+
+ @JsonProperty("preload-oper-status")
+ private GenericResourceApiPreloadoperstatusPreloadOperStatus preloadOperStatus = null;
+
+ @JsonProperty("preload-vf-module-topology-information")
+ private GenericResourceApiPreloadvfmoduletopologyinformationPreloadVfModuleTopologyInformation preloadVfModuleTopologyInformation = null;
+
+ public GenericResourceApiPreloaddataPreloadData preloadNetworkTopologyInformation(GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation preloadNetworkTopologyInformation) {
+ this.preloadNetworkTopologyInformation = preloadNetworkTopologyInformation;
+ return this;
+ }
+
+ /**
+ * Get preloadNetworkTopologyInformation
+ * @return preloadNetworkTopologyInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation getPreloadNetworkTopologyInformation() {
+ return preloadNetworkTopologyInformation;
+ }
+
+ public void setPreloadNetworkTopologyInformation(GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation preloadNetworkTopologyInformation) {
+ this.preloadNetworkTopologyInformation = preloadNetworkTopologyInformation;
+ }
+
+ public GenericResourceApiPreloaddataPreloadData preloadOperStatus(GenericResourceApiPreloadoperstatusPreloadOperStatus preloadOperStatus) {
+ this.preloadOperStatus = preloadOperStatus;
+ return this;
+ }
+
+ /**
+ * Get preloadOperStatus
+ * @return preloadOperStatus
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiPreloadoperstatusPreloadOperStatus getPreloadOperStatus() {
+ return preloadOperStatus;
+ }
+
+ public void setPreloadOperStatus(GenericResourceApiPreloadoperstatusPreloadOperStatus preloadOperStatus) {
+ this.preloadOperStatus = preloadOperStatus;
+ }
+
+ public GenericResourceApiPreloaddataPreloadData preloadVfModuleTopologyInformation(GenericResourceApiPreloadvfmoduletopologyinformationPreloadVfModuleTopologyInformation preloadVfModuleTopologyInformation) {
+ this.preloadVfModuleTopologyInformation = preloadVfModuleTopologyInformation;
+ return this;
+ }
+
+ /**
+ * Get preloadVfModuleTopologyInformation
+ * @return preloadVfModuleTopologyInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiPreloadvfmoduletopologyinformationPreloadVfModuleTopologyInformation getPreloadVfModuleTopologyInformation() {
+ return preloadVfModuleTopologyInformation;
+ }
+
+ public void setPreloadVfModuleTopologyInformation(GenericResourceApiPreloadvfmoduletopologyinformationPreloadVfModuleTopologyInformation preloadVfModuleTopologyInformation) {
+ this.preloadVfModuleTopologyInformation = preloadVfModuleTopologyInformation;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiPreloaddataPreloadData genericResourceApiPreloaddataPreloadData = (GenericResourceApiPreloaddataPreloadData) o;
+ return Objects.equals(this.preloadNetworkTopologyInformation, genericResourceApiPreloaddataPreloadData.preloadNetworkTopologyInformation) &&
+ Objects.equals(this.preloadOperStatus, genericResourceApiPreloaddataPreloadData.preloadOperStatus) &&
+ Objects.equals(this.preloadVfModuleTopologyInformation, genericResourceApiPreloaddataPreloadData.preloadVfModuleTopologyInformation);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(preloadNetworkTopologyInformation, preloadOperStatus, preloadVfModuleTopologyInformation);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiPreloaddataPreloadData {\n");
+
+ sb.append(" preloadNetworkTopologyInformation: ").append(toIndentedString(preloadNetworkTopologyInformation)).append("\n");
+ sb.append(" preloadOperStatus: ").append(toIndentedString(preloadOperStatus)).append("\n");
+ sb.append(" preloadVfModuleTopologyInformation: ").append(toIndentedString(preloadVfModuleTopologyInformation)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloadmodelinformationPreloadList.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloadmodelinformationPreloadList.java
new file mode 100644
index 0000000..7774395
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloadmodelinformationPreloadList.java
@@ -0,0 +1,135 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloadData;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiPreloaddataPreloadData;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiPreloadmodelinformationPreloadList
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("preload-list")
+public class GenericResourceApiPreloadmodelinformationPreloadList {
+ @JsonProperty("preload-data")
+ private GenericResourceApiPreloaddataPreloadData preloadData = null;
+
+ @JsonProperty("preload-type")
+ private String preloadType = null;
+
+ @JsonProperty("preload-id")
+ private String preloadId = null;
+
+ public GenericResourceApiPreloadmodelinformationPreloadList preloadData(GenericResourceApiPreloaddataPreloadData preloadData) {
+ this.preloadData = preloadData;
+ return this;
+ }
+
+ /**
+ * Get preloadData
+ * @return preloadData
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiPreloaddataPreloadData getPreloadData() {
+ return preloadData;
+ }
+
+ public void setPreloadData(GenericResourceApiPreloaddataPreloadData preloadData) {
+ this.preloadData = preloadData;
+ }
+
+ public GenericResourceApiPreloadmodelinformationPreloadList preloadType(String preloadType) {
+ this.preloadType = preloadType;
+ return this;
+ }
+
+ /**
+ * network or vf-module
+ * @return preloadType
+ **/
+ @ApiModelProperty(value = "network or vf-module")
+
+
+ public String getPreloadType() {
+ return preloadType;
+ }
+
+ public void setPreloadType(String preloadType) {
+ this.preloadType = preloadType;
+ }
+
+ public GenericResourceApiPreloadmodelinformationPreloadList preloadId(String preloadId) {
+ this.preloadId = preloadId;
+ return this;
+ }
+
+ /**
+ * vf-module-name or network name
+ * @return preloadId
+ **/
+ @ApiModelProperty(value = "vf-module-name or network name")
+
+
+ public String getPreloadId() {
+ return preloadId;
+ }
+
+ public void setPreloadId(String preloadId) {
+ this.preloadId = preloadId;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiPreloadmodelinformationPreloadList genericResourceApiPreloadmodelinformationPreloadList = (GenericResourceApiPreloadmodelinformationPreloadList) o;
+ return Objects.equals(this.preloadData, genericResourceApiPreloadmodelinformationPreloadList.preloadData) &&
+ Objects.equals(this.preloadType, genericResourceApiPreloadmodelinformationPreloadList.preloadType) &&
+ Objects.equals(this.preloadId, genericResourceApiPreloadmodelinformationPreloadList.preloadId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(preloadData, preloadType, preloadId);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiPreloadmodelinformationPreloadList {\n");
+
+ sb.append(" preloadData: ").append(toIndentedString(preloadData)).append("\n");
+ sb.append(" preloadType: ").append(toIndentedString(preloadType)).append("\n");
+ sb.append(" preloadId: ").append(toIndentedString(preloadId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.java
new file mode 100644
index 0000000..de07732
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.java
@@ -0,0 +1,373 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiHostRoutes;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiHostroutesHostRoutes;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkPolicy;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkTopologyIdentifierStructure;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkpolicyNetworkPolicy;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiProviderNetworkInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiRouteTableReference;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiRoutetablereferenceRouteTableReference;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiSubnets;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiSubnetsSubnets;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVpnBindings;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVpnbindingsVpnBindings;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("preload-network-topology-information")
+public class GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation {
+ @JsonProperty("host-routes")
+ @Valid
+ private List<GenericResourceApiHostroutesHostRoutes> hostRoutes = null;
+
+ @JsonProperty("network-policy")
+ @Valid
+ private List<GenericResourceApiNetworkpolicyNetworkPolicy> networkPolicy = null;
+
+ @JsonProperty("network-topology-identifier-structure")
+ private GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure networkTopologyIdentifierStructure = null;
+
+ @JsonProperty("physical-network-name")
+ private String physicalNetworkName = null;
+
+ @JsonProperty("is-external-network")
+ private Boolean isExternalNetwork = null;
+
+ @JsonProperty("is-shared-network")
+ private Boolean isSharedNetwork = null;
+
+ @JsonProperty("is-provider-network")
+ private Boolean isProviderNetwork = null;
+
+ @JsonProperty("route-table-reference")
+ @Valid
+ private List<GenericResourceApiRoutetablereferenceRouteTableReference> routeTableReference = null;
+
+ @JsonProperty("subnets")
+ @Valid
+ private List<GenericResourceApiSubnetsSubnets> subnets = null;
+
+ @JsonProperty("vpn-bindings")
+ @Valid
+ private List<GenericResourceApiVpnbindingsVpnBindings> vpnBindings = null;
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation hostRoutes(List<GenericResourceApiHostroutesHostRoutes> hostRoutes) {
+ this.hostRoutes = hostRoutes;
+ return this;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation addHostRoutesItem(GenericResourceApiHostroutesHostRoutes hostRoutesItem) {
+ if (this.hostRoutes == null) {
+ this.hostRoutes = new ArrayList<>();
+ }
+ this.hostRoutes.add(hostRoutesItem);
+ return this;
+ }
+
+ /**
+ * Get hostRoutes
+ * @return hostRoutes
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiHostroutesHostRoutes> getHostRoutes() {
+ return hostRoutes;
+ }
+
+ public void setHostRoutes(List<GenericResourceApiHostroutesHostRoutes> hostRoutes) {
+ this.hostRoutes = hostRoutes;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation networkPolicy(List<GenericResourceApiNetworkpolicyNetworkPolicy> networkPolicy) {
+ this.networkPolicy = networkPolicy;
+ return this;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation addNetworkPolicyItem(GenericResourceApiNetworkpolicyNetworkPolicy networkPolicyItem) {
+ if (this.networkPolicy == null) {
+ this.networkPolicy = new ArrayList<>();
+ }
+ this.networkPolicy.add(networkPolicyItem);
+ return this;
+ }
+
+ /**
+ * Get networkPolicy
+ * @return networkPolicy
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiNetworkpolicyNetworkPolicy> getNetworkPolicy() {
+ return networkPolicy;
+ }
+
+ public void setNetworkPolicy(List<GenericResourceApiNetworkpolicyNetworkPolicy> networkPolicy) {
+ this.networkPolicy = networkPolicy;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation networkTopologyIdentifierStructure(GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure networkTopologyIdentifierStructure) {
+ this.networkTopologyIdentifierStructure = networkTopologyIdentifierStructure;
+ return this;
+ }
+
+ /**
+ * Get networkTopologyIdentifierStructure
+ * @return networkTopologyIdentifierStructure
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure getNetworkTopologyIdentifierStructure() {
+ return networkTopologyIdentifierStructure;
+ }
+
+ public void setNetworkTopologyIdentifierStructure(GenericResourceApiNetworktopologyidentifierstructureNetworkTopologyIdentifierStructure networkTopologyIdentifierStructure) {
+ this.networkTopologyIdentifierStructure = networkTopologyIdentifierStructure;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation physicalNetworkName(String physicalNetworkName) {
+ this.physicalNetworkName = physicalNetworkName;
+ return this;
+ }
+
+ /**
+ * Get physicalNetworkName
+ * @return physicalNetworkName
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getPhysicalNetworkName() {
+ return physicalNetworkName;
+ }
+
+ public void setPhysicalNetworkName(String physicalNetworkName) {
+ this.physicalNetworkName = physicalNetworkName;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation isExternalNetwork(Boolean isExternalNetwork) {
+ this.isExternalNetwork = isExternalNetwork;
+ return this;
+ }
+
+ /**
+ * Get isExternalNetwork
+ * @return isExternalNetwork
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public Boolean isIsExternalNetwork() {
+ return isExternalNetwork;
+ }
+
+ public void setIsExternalNetwork(Boolean isExternalNetwork) {
+ this.isExternalNetwork = isExternalNetwork;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation isSharedNetwork(Boolean isSharedNetwork) {
+ this.isSharedNetwork = isSharedNetwork;
+ return this;
+ }
+
+ /**
+ * Get isSharedNetwork
+ * @return isSharedNetwork
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public Boolean isIsSharedNetwork() {
+ return isSharedNetwork;
+ }
+
+ public void setIsSharedNetwork(Boolean isSharedNetwork) {
+ this.isSharedNetwork = isSharedNetwork;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation isProviderNetwork(Boolean isProviderNetwork) {
+ this.isProviderNetwork = isProviderNetwork;
+ return this;
+ }
+
+ /**
+ * Get isProviderNetwork
+ * @return isProviderNetwork
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public Boolean isIsProviderNetwork() {
+ return isProviderNetwork;
+ }
+
+ public void setIsProviderNetwork(Boolean isProviderNetwork) {
+ this.isProviderNetwork = isProviderNetwork;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation routeTableReference(List<GenericResourceApiRoutetablereferenceRouteTableReference> routeTableReference) {
+ this.routeTableReference = routeTableReference;
+ return this;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation addRouteTableReferenceItem(GenericResourceApiRoutetablereferenceRouteTableReference routeTableReferenceItem) {
+ if (this.routeTableReference == null) {
+ this.routeTableReference = new ArrayList<>();
+ }
+ this.routeTableReference.add(routeTableReferenceItem);
+ return this;
+ }
+
+ /**
+ * Get routeTableReference
+ * @return routeTableReference
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiRoutetablereferenceRouteTableReference> getRouteTableReference() {
+ return routeTableReference;
+ }
+
+ public void setRouteTableReference(List<GenericResourceApiRoutetablereferenceRouteTableReference> routeTableReference) {
+ this.routeTableReference = routeTableReference;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation subnets(List<GenericResourceApiSubnetsSubnets> subnets) {
+ this.subnets = subnets;
+ return this;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation addSubnetsItem(GenericResourceApiSubnetsSubnets subnetsItem) {
+ if (this.subnets == null) {
+ this.subnets = new ArrayList<>();
+ }
+ this.subnets.add(subnetsItem);
+ return this;
+ }
+
+ /**
+ * Get subnets
+ * @return subnets
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiSubnetsSubnets> getSubnets() {
+ return subnets;
+ }
+
+ public void setSubnets(List<GenericResourceApiSubnetsSubnets> subnets) {
+ this.subnets = subnets;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation vpnBindings(List<GenericResourceApiVpnbindingsVpnBindings> vpnBindings) {
+ this.vpnBindings = vpnBindings;
+ return this;
+ }
+
+ public GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation addVpnBindingsItem(GenericResourceApiVpnbindingsVpnBindings vpnBindingsItem) {
+ if (this.vpnBindings == null) {
+ this.vpnBindings = new ArrayList<>();
+ }
+ this.vpnBindings.add(vpnBindingsItem);
+ return this;
+ }
+
+ /**
+ * Get vpnBindings
+ * @return vpnBindings
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiVpnbindingsVpnBindings> getVpnBindings() {
+ return vpnBindings;
+ }
+
+ public void setVpnBindings(List<GenericResourceApiVpnbindingsVpnBindings> vpnBindings) {
+ this.vpnBindings = vpnBindings;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation genericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation = (GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation) o;
+ return Objects.equals(this.hostRoutes, genericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.hostRoutes) &&
+ Objects.equals(this.networkPolicy, genericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.networkPolicy) &&
+ Objects.equals(this.networkTopologyIdentifierStructure, genericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.networkTopologyIdentifierStructure) &&
+ Objects.equals(this.physicalNetworkName, genericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.physicalNetworkName) &&
+ Objects.equals(this.isExternalNetwork, genericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.isExternalNetwork) &&
+ Objects.equals(this.isSharedNetwork, genericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.isSharedNetwork) &&
+ Objects.equals(this.isProviderNetwork, genericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.isProviderNetwork) &&
+ Objects.equals(this.routeTableReference, genericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.routeTableReference) &&
+ Objects.equals(this.subnets, genericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.subnets) &&
+ Objects.equals(this.vpnBindings, genericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation.vpnBindings);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(hostRoutes, networkPolicy, networkTopologyIdentifierStructure, physicalNetworkName, isExternalNetwork, isSharedNetwork, isProviderNetwork, routeTableReference, subnets, vpnBindings);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiPreloadnetworktopologyinformationPreloadNetworkTopologyInformation {\n");
+
+ sb.append(" hostRoutes: ").append(toIndentedString(hostRoutes)).append("\n");
+ sb.append(" networkPolicy: ").append(toIndentedString(networkPolicy)).append("\n");
+ sb.append(" networkTopologyIdentifierStructure: ").append(toIndentedString(networkTopologyIdentifierStructure)).append("\n");
+ sb.append(" physicalNetworkName: ").append(toIndentedString(physicalNetworkName)).append("\n");
+ sb.append(" isExternalNetwork: ").append(toIndentedString(isExternalNetwork)).append("\n");
+ sb.append(" isSharedNetwork: ").append(toIndentedString(isSharedNetwork)).append("\n");
+ sb.append(" isProviderNetwork: ").append(toIndentedString(isProviderNetwork)).append("\n");
+ sb.append(" routeTableReference: ").append(toIndentedString(routeTableReference)).append("\n");
+ sb.append(" subnets: ").append(toIndentedString(subnets)).append("\n");
+ sb.append(" vpnBindings: ").append(toIndentedString(vpnBindings)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServiceModelInfrastructure.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServiceModelInfrastructure.java
new file mode 100644
index 0000000..2f3250e
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServiceModelInfrastructure.java
@@ -0,0 +1,95 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicemodelinfrastructureService;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiServiceModelInfrastructure
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-12T18:08:46.019-04:00")
+@JsonRootName("services")
+public class GenericResourceApiServiceModelInfrastructure {
+ @JsonProperty("service")
+ @Valid
+ private List<GenericResourceApiServicemodelinfrastructureService> service = null;
+
+ public GenericResourceApiServiceModelInfrastructure service(List<GenericResourceApiServicemodelinfrastructureService> service) {
+ this.service = service;
+ return this;
+ }
+
+ public GenericResourceApiServiceModelInfrastructure addServiceItem(GenericResourceApiServicemodelinfrastructureService serviceItem) {
+ if (this.service == null) {
+ this.service = new ArrayList<>();
+ }
+ this.service.add(serviceItem);
+ return this;
+ }
+
+ /**
+ * Get service
+ * @return service
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiServicemodelinfrastructureService> getService() {
+ return service;
+ }
+
+ public void setService(List<GenericResourceApiServicemodelinfrastructureService> service) {
+ this.service = service;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiServiceModelInfrastructure genericResourceApiServiceModelInfrastructure = (GenericResourceApiServiceModelInfrastructure) o;
+ return Objects.equals(this.service, genericResourceApiServiceModelInfrastructure.service);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(service);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiServiceModelInfrastructure {\n");
+
+ sb.append(" service: ").append(toIndentedString(service)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServiceData.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServiceData.java
new file mode 100644
index 0000000..b70d6df
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServiceData.java
@@ -0,0 +1,465 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiNetworkInstanceGroup;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOperStatusData;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiRequestinformationRequestInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiSdncrequestheaderSdncRequestHeader;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceLevelOperStatus;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceOperationInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceTopology;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataConsumedAllottedResources;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataForwardingPaths;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataNetworks;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataPnfs;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataProvidedAllottedResources;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataProvidedConfigurations;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataVnfs;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceinformationServiceInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicerequestinputServiceRequestInput;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicetopologyServiceTopology;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfcInstanceGroup;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiServicedataServiceData
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("service-data")
+public class GenericResourceApiServicedataServiceData {
+ @JsonProperty("service-level-oper-status")
+ private GenericResourceApiOperStatusData serviceLevelOperStatus = null;
+
+ @JsonProperty("request-information")
+ private GenericResourceApiRequestinformationRequestInformation requestInformation = null;
+
+ @JsonProperty("sdnc-request-header")
+ private GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = null;
+
+ @JsonProperty("service-information")
+ private GenericResourceApiServiceinformationServiceInformation serviceInformation = null;
+
+ @JsonProperty("service-request-input")
+ private GenericResourceApiServicerequestinputServiceRequestInput serviceRequestInput = null;
+
+ @JsonProperty("service-topology")
+ private GenericResourceApiServicetopologyServiceTopology serviceTopology = null;
+
+ @JsonProperty("vnfc-instance-groups")
+ private GenericResourceApiVnfcInstanceGroup vnfcInstanceGroups = null;
+
+ @JsonProperty("provided-configurations")
+ private GenericResourceApiServicedataServicedataProvidedConfigurations providedConfigurations = null;
+
+ @JsonProperty("provided-allotted-resources")
+ private GenericResourceApiServicedataServicedataProvidedAllottedResources providedAllottedResources = null;
+
+ @JsonProperty("vnfs")
+ private GenericResourceApiServicedataServicedataVnfs vnfs = null;
+
+ @JsonProperty("forwarding-paths")
+ private GenericResourceApiServicedataServicedataForwardingPaths forwardingPaths = null;
+
+ @JsonProperty("network-instance-groups")
+ private GenericResourceApiNetworkInstanceGroup networkInstanceGroups = null;
+
+ @JsonProperty("networks")
+ private GenericResourceApiServicedataServicedataNetworks networks = null;
+
+ @JsonProperty("consumed-allotted-resources")
+ private GenericResourceApiServicedataServicedataConsumedAllottedResources consumedAllottedResources = null;
+
+ @JsonProperty("pnfs")
+ private GenericResourceApiServicedataServicedataPnfs pnfs = null;
+
+ public GenericResourceApiServicedataServiceData serviceLevelOperStatus(GenericResourceApiOperStatusData serviceLevelOperStatus) {
+ this.serviceLevelOperStatus = serviceLevelOperStatus;
+ return this;
+ }
+
+ /**
+ * Get serviceLevelOperStatus
+ * @return serviceLevelOperStatus
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiOperStatusData getServiceLevelOperStatus() {
+ return serviceLevelOperStatus;
+ }
+
+ public void setServiceLevelOperStatus(GenericResourceApiOperStatusData serviceLevelOperStatus) {
+ this.serviceLevelOperStatus = serviceLevelOperStatus;
+ }
+
+ public GenericResourceApiServicedataServiceData requestInformation(GenericResourceApiRequestinformationRequestInformation requestInformation) {
+ this.requestInformation = requestInformation;
+ return this;
+ }
+
+ /**
+ * Get requestInformation
+ * @return requestInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiRequestinformationRequestInformation getRequestInformation() {
+ return requestInformation;
+ }
+
+ public void setRequestInformation(GenericResourceApiRequestinformationRequestInformation requestInformation) {
+ this.requestInformation = requestInformation;
+ }
+
+ public GenericResourceApiServicedataServiceData sdncRequestHeader(GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader) {
+ this.sdncRequestHeader = sdncRequestHeader;
+ return this;
+ }
+
+ /**
+ * Get sdncRequestHeader
+ * @return sdncRequestHeader
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiSdncrequestheaderSdncRequestHeader getSdncRequestHeader() {
+ return sdncRequestHeader;
+ }
+
+ public void setSdncRequestHeader(GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader) {
+ this.sdncRequestHeader = sdncRequestHeader;
+ }
+
+ public GenericResourceApiServicedataServiceData serviceInformation(GenericResourceApiServiceinformationServiceInformation serviceInformation) {
+ this.serviceInformation = serviceInformation;
+ return this;
+ }
+
+ /**
+ * Get serviceInformation
+ * @return serviceInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServiceinformationServiceInformation getServiceInformation() {
+ return serviceInformation;
+ }
+
+ public void setServiceInformation(GenericResourceApiServiceinformationServiceInformation serviceInformation) {
+ this.serviceInformation = serviceInformation;
+ }
+
+ public GenericResourceApiServicedataServiceData serviceRequestInput(GenericResourceApiServicerequestinputServiceRequestInput serviceRequestInput) {
+ this.serviceRequestInput = serviceRequestInput;
+ return this;
+ }
+
+ /**
+ * Get serviceRequestInput
+ * @return serviceRequestInput
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicerequestinputServiceRequestInput getServiceRequestInput() {
+ return serviceRequestInput;
+ }
+
+ public void setServiceRequestInput(GenericResourceApiServicerequestinputServiceRequestInput serviceRequestInput) {
+ this.serviceRequestInput = serviceRequestInput;
+ }
+
+ public GenericResourceApiServicedataServiceData serviceTopology(GenericResourceApiServicetopologyServiceTopology serviceTopology) {
+ this.serviceTopology = serviceTopology;
+ return this;
+ }
+
+ /**
+ * Get serviceTopology
+ * @return serviceTopology
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicetopologyServiceTopology getServiceTopology() {
+ return serviceTopology;
+ }
+
+ public void setServiceTopology(GenericResourceApiServicetopologyServiceTopology serviceTopology) {
+ this.serviceTopology = serviceTopology;
+ }
+
+ public GenericResourceApiServicedataServiceData vnfcInstanceGroups(GenericResourceApiVnfcInstanceGroup vnfcInstanceGroups) {
+ this.vnfcInstanceGroups = vnfcInstanceGroups;
+ return this;
+ }
+
+ /**
+ * Get vnfcInstanceGroups
+ * @return vnfcInstanceGroups
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiVnfcInstanceGroup getVnfcInstanceGroups() {
+ return vnfcInstanceGroups;
+ }
+
+ public void setVnfcInstanceGroups(GenericResourceApiVnfcInstanceGroup vnfcInstanceGroups) {
+ this.vnfcInstanceGroups = vnfcInstanceGroups;
+ }
+
+ public GenericResourceApiServicedataServiceData providedConfigurations(GenericResourceApiServicedataServicedataProvidedConfigurations providedConfigurations) {
+ this.providedConfigurations = providedConfigurations;
+ return this;
+ }
+
+ /**
+ * Get providedConfigurations
+ * @return providedConfigurations
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServicedataProvidedConfigurations getProvidedConfigurations() {
+ return providedConfigurations;
+ }
+
+ public void setProvidedConfigurations(GenericResourceApiServicedataServicedataProvidedConfigurations providedConfigurations) {
+ this.providedConfigurations = providedConfigurations;
+ }
+
+ public GenericResourceApiServicedataServiceData providedAllottedResources(GenericResourceApiServicedataServicedataProvidedAllottedResources providedAllottedResources) {
+ this.providedAllottedResources = providedAllottedResources;
+ return this;
+ }
+
+ /**
+ * Get providedAllottedResources
+ * @return providedAllottedResources
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServicedataProvidedAllottedResources getProvidedAllottedResources() {
+ return providedAllottedResources;
+ }
+
+ public void setProvidedAllottedResources(GenericResourceApiServicedataServicedataProvidedAllottedResources providedAllottedResources) {
+ this.providedAllottedResources = providedAllottedResources;
+ }
+
+ public GenericResourceApiServicedataServiceData vnfs(GenericResourceApiServicedataServicedataVnfs vnfs) {
+ this.vnfs = vnfs;
+ return this;
+ }
+
+ /**
+ * Get vnfs
+ * @return vnfs
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServicedataVnfs getVnfs() {
+ return vnfs;
+ }
+
+ public void setVnfs(GenericResourceApiServicedataServicedataVnfs vnfs) {
+ this.vnfs = vnfs;
+ }
+
+ public GenericResourceApiServicedataServiceData forwardingPaths(GenericResourceApiServicedataServicedataForwardingPaths forwardingPaths) {
+ this.forwardingPaths = forwardingPaths;
+ return this;
+ }
+
+ /**
+ * Get forwardingPaths
+ * @return forwardingPaths
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServicedataForwardingPaths getForwardingPaths() {
+ return forwardingPaths;
+ }
+
+ public void setForwardingPaths(GenericResourceApiServicedataServicedataForwardingPaths forwardingPaths) {
+ this.forwardingPaths = forwardingPaths;
+ }
+
+ public GenericResourceApiServicedataServiceData networkInstanceGroups(GenericResourceApiNetworkInstanceGroup networkInstanceGroups) {
+ this.networkInstanceGroups = networkInstanceGroups;
+ return this;
+ }
+
+ /**
+ * Get networkInstanceGroups
+ * @return networkInstanceGroups
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiNetworkInstanceGroup getNetworkInstanceGroups() {
+ return networkInstanceGroups;
+ }
+
+ public void setNetworkInstanceGroups(GenericResourceApiNetworkInstanceGroup networkInstanceGroups) {
+ this.networkInstanceGroups = networkInstanceGroups;
+ }
+
+ public GenericResourceApiServicedataServiceData networks(GenericResourceApiServicedataServicedataNetworks networks) {
+ this.networks = networks;
+ return this;
+ }
+
+ /**
+ * Get networks
+ * @return networks
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServicedataNetworks getNetworks() {
+ return networks;
+ }
+
+ public void setNetworks(GenericResourceApiServicedataServicedataNetworks networks) {
+ this.networks = networks;
+ }
+
+ public GenericResourceApiServicedataServiceData consumedAllottedResources(GenericResourceApiServicedataServicedataConsumedAllottedResources consumedAllottedResources) {
+ this.consumedAllottedResources = consumedAllottedResources;
+ return this;
+ }
+
+ /**
+ * Get consumedAllottedResources
+ * @return consumedAllottedResources
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServicedataConsumedAllottedResources getConsumedAllottedResources() {
+ return consumedAllottedResources;
+ }
+
+ public void setConsumedAllottedResources(GenericResourceApiServicedataServicedataConsumedAllottedResources consumedAllottedResources) {
+ this.consumedAllottedResources = consumedAllottedResources;
+ }
+
+ public GenericResourceApiServicedataServiceData pnfs(GenericResourceApiServicedataServicedataPnfs pnfs) {
+ this.pnfs = pnfs;
+ return this;
+ }
+
+ /**
+ * Get pnfs
+ * @return pnfs
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServicedataPnfs getPnfs() {
+ return pnfs;
+ }
+
+ public void setPnfs(GenericResourceApiServicedataServicedataPnfs pnfs) {
+ this.pnfs = pnfs;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiServicedataServiceData genericResourceApiServicedataServiceData = (GenericResourceApiServicedataServiceData) o;
+ return Objects.equals(this.serviceLevelOperStatus, genericResourceApiServicedataServiceData.serviceLevelOperStatus) &&
+ Objects.equals(this.requestInformation, genericResourceApiServicedataServiceData.requestInformation) &&
+ Objects.equals(this.sdncRequestHeader, genericResourceApiServicedataServiceData.sdncRequestHeader) &&
+ Objects.equals(this.serviceInformation, genericResourceApiServicedataServiceData.serviceInformation) &&
+ Objects.equals(this.serviceRequestInput, genericResourceApiServicedataServiceData.serviceRequestInput) &&
+ Objects.equals(this.serviceTopology, genericResourceApiServicedataServiceData.serviceTopology) &&
+ Objects.equals(this.vnfcInstanceGroups, genericResourceApiServicedataServiceData.vnfcInstanceGroups) &&
+ Objects.equals(this.providedConfigurations, genericResourceApiServicedataServiceData.providedConfigurations) &&
+ Objects.equals(this.providedAllottedResources, genericResourceApiServicedataServiceData.providedAllottedResources) &&
+ Objects.equals(this.vnfs, genericResourceApiServicedataServiceData.vnfs) &&
+ Objects.equals(this.forwardingPaths, genericResourceApiServicedataServiceData.forwardingPaths) &&
+ Objects.equals(this.networkInstanceGroups, genericResourceApiServicedataServiceData.networkInstanceGroups) &&
+ Objects.equals(this.networks, genericResourceApiServicedataServiceData.networks) &&
+ Objects.equals(this.consumedAllottedResources, genericResourceApiServicedataServiceData.consumedAllottedResources) &&
+ Objects.equals(this.pnfs, genericResourceApiServicedataServiceData.pnfs);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(serviceLevelOperStatus, requestInformation, sdncRequestHeader, serviceInformation, serviceRequestInput, serviceTopology, vnfcInstanceGroups, providedConfigurations, providedAllottedResources, vnfs, forwardingPaths, networkInstanceGroups, networks, consumedAllottedResources, pnfs);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiServicedataServiceData {\n");
+
+ sb.append(" serviceLevelOperStatus: ").append(toIndentedString(serviceLevelOperStatus)).append("\n");
+ sb.append(" requestInformation: ").append(toIndentedString(requestInformation)).append("\n");
+ sb.append(" sdncRequestHeader: ").append(toIndentedString(sdncRequestHeader)).append("\n");
+ sb.append(" serviceInformation: ").append(toIndentedString(serviceInformation)).append("\n");
+ sb.append(" serviceRequestInput: ").append(toIndentedString(serviceRequestInput)).append("\n");
+ sb.append(" serviceTopology: ").append(toIndentedString(serviceTopology)).append("\n");
+ sb.append(" vnfcInstanceGroups: ").append(toIndentedString(vnfcInstanceGroups)).append("\n");
+ sb.append(" providedConfigurations: ").append(toIndentedString(providedConfigurations)).append("\n");
+ sb.append(" providedAllottedResources: ").append(toIndentedString(providedAllottedResources)).append("\n");
+ sb.append(" vnfs: ").append(toIndentedString(vnfs)).append("\n");
+ sb.append(" forwardingPaths: ").append(toIndentedString(forwardingPaths)).append("\n");
+ sb.append(" networkInstanceGroups: ").append(toIndentedString(networkInstanceGroups)).append("\n");
+ sb.append(" networks: ").append(toIndentedString(networks)).append("\n");
+ sb.append(" consumedAllottedResources: ").append(toIndentedString(consumedAllottedResources)).append("\n");
+ sb.append(" pnfs: ").append(toIndentedString(pnfs)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataNetworks.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataNetworks.java
new file mode 100644
index 0000000..1c85947
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataNetworks.java
@@ -0,0 +1,95 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataNetworksNetwork;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiServicedataServicedataNetworks
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-23T12:02:01.518-04:00")
+@JsonRootName("networks")
+public class GenericResourceApiServicedataServicedataNetworks {
+ @JsonProperty("network")
+ @Valid
+ private List<GenericResourceApiServicedataServicedataNetworksNetwork> network = null;
+
+ public GenericResourceApiServicedataServicedataNetworks network(List<GenericResourceApiServicedataServicedataNetworksNetwork> network) {
+ this.network = network;
+ return this;
+ }
+
+ public GenericResourceApiServicedataServicedataNetworks addNetworkItem(GenericResourceApiServicedataServicedataNetworksNetwork networkItem) {
+ if (this.network == null) {
+ this.network = new ArrayList<>();
+ }
+ this.network.add(networkItem);
+ return this;
+ }
+
+ /**
+ * Get network
+ * @return network
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiServicedataServicedataNetworksNetwork> getNetwork() {
+ return network;
+ }
+
+ public void setNetwork(List<GenericResourceApiServicedataServicedataNetworksNetwork> network) {
+ this.network = network;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiServicedataServicedataNetworks genericResourceApiServicedataServicedataNetworks = (GenericResourceApiServicedataServicedataNetworks) o;
+ return Objects.equals(this.network, genericResourceApiServicedataServicedataNetworks.network);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(network);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiServicedataServicedataNetworks {\n");
+
+ sb.append(" network: ").append(toIndentedString(network)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataNetworksNetwork.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataNetworksNetwork.java
new file mode 100644
index 0000000..2d8edfe
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataNetworksNetwork.java
@@ -0,0 +1,109 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataNetworksNetworkNetworkData;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiServicedataServicedataNetworksNetwork
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-23T12:02:01.518-04:00")
+@JsonRootName("network")
+public class GenericResourceApiServicedataServicedataNetworksNetwork {
+ @JsonProperty("network-id")
+ private String networkId = null;
+
+ @JsonProperty("network-data")
+ private GenericResourceApiServicedataServicedataNetworksNetworkNetworkData networkData = null;
+
+ public GenericResourceApiServicedataServicedataNetworksNetwork networkId(String networkId) {
+ this.networkId = networkId;
+ return this;
+ }
+
+ /**
+ * Get networkId
+ * @return networkId
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getNetworkId() {
+ return networkId;
+ }
+
+ public void setNetworkId(String networkId) {
+ this.networkId = networkId;
+ }
+
+ public GenericResourceApiServicedataServicedataNetworksNetwork networkData(GenericResourceApiServicedataServicedataNetworksNetworkNetworkData networkData) {
+ this.networkData = networkData;
+ return this;
+ }
+
+ /**
+ * Get networkData
+ * @return networkData
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServicedataNetworksNetworkNetworkData getNetworkData() {
+ return networkData;
+ }
+
+ public void setNetworkData(GenericResourceApiServicedataServicedataNetworksNetworkNetworkData networkData) {
+ this.networkData = networkData;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiServicedataServicedataNetworksNetwork genericResourceApiServicedataServicedataNetworksNetwork = (GenericResourceApiServicedataServicedataNetworksNetwork) o;
+ return Objects.equals(this.networkId, genericResourceApiServicedataServicedataNetworksNetwork.networkId) &&
+ Objects.equals(this.networkData, genericResourceApiServicedataServicedataNetworksNetwork.networkData);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(networkId, networkData);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiServicedataServicedataNetworksNetwork {\n");
+
+ sb.append(" networkId: ").append(toIndentedString(networkId)).append("\n");
+ sb.append(" networkData: ").append(toIndentedString(networkData)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources.java
new file mode 100644
index 0000000..da767f1
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources.java
@@ -0,0 +1,93 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-23T12:02:01.518-04:00")
+@JsonRootName("network-provided-allotted-resources")
+public class GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources {
+ @JsonProperty("network-provided-ar-id")
+ @Valid
+ private List<String> networkProvidedArId = null;
+
+ public GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources networkProvidedArId(List<String> networkProvidedArId) {
+ this.networkProvidedArId = networkProvidedArId;
+ return this;
+ }
+
+ public GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources addNetworkProvidedArIdItem(String networkProvidedArIdItem) {
+ if (this.networkProvidedArId == null) {
+ this.networkProvidedArId = new ArrayList<>();
+ }
+ this.networkProvidedArId.add(networkProvidedArIdItem);
+ return this;
+ }
+
+ /**
+ * List of allotted resources using capacity from this network
+ * @return networkProvidedArId
+ **/
+ @ApiModelProperty(value = "List of allotted resources using capacity from this network")
+
+
+ public List<String> getNetworkProvidedArId() {
+ return networkProvidedArId;
+ }
+
+ public void setNetworkProvidedArId(List<String> networkProvidedArId) {
+ this.networkProvidedArId = networkProvidedArId;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources genericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources = (GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources) o;
+ return Objects.equals(this.networkProvidedArId, genericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources.networkProvidedArId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(networkProvidedArId);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiServicedataServicedataNetworksNetworkNetworkdataNetworkProvidedAllottedResources {\n");
+
+ sb.append(" networkProvidedArId: ").append(toIndentedString(networkProvidedArId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataVnfsVnf.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataVnfsVnf.java
new file mode 100644
index 0000000..c4823d9
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataVnfsVnf.java
@@ -0,0 +1,109 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataVnfsVnfVnfData;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiServicedataServicedataVnfsVnf
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("vnf")
+public class GenericResourceApiServicedataServicedataVnfsVnf {
+ @JsonProperty("vnf-data")
+ private GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfData = null;
+
+ @JsonProperty("vnf-id")
+ private String vnfId = null;
+
+ public GenericResourceApiServicedataServicedataVnfsVnf vnfData(GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfData) {
+ this.vnfData = vnfData;
+ return this;
+ }
+
+ /**
+ * Get vnfData
+ * @return vnfData
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData getVnfData() {
+ return vnfData;
+ }
+
+ public void setVnfData(GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfData) {
+ this.vnfData = vnfData;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnf vnfId(String vnfId) {
+ this.vnfId = vnfId;
+ return this;
+ }
+
+ /**
+ * Get vnfId
+ * @return vnfId
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getVnfId() {
+ return vnfId;
+ }
+
+ public void setVnfId(String vnfId) {
+ this.vnfId = vnfId;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiServicedataServicedataVnfsVnf genericResourceApiServicedataServicedataVnfsVnf = (GenericResourceApiServicedataServicedataVnfsVnf) o;
+ return Objects.equals(this.vnfData, genericResourceApiServicedataServicedataVnfsVnf.vnfData) &&
+ Objects.equals(this.vnfId, genericResourceApiServicedataServicedataVnfsVnf.vnfId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(vnfData, vnfId);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiServicedataServicedataVnfsVnf {\n");
+
+ sb.append(" vnfData: ").append(toIndentedString(vnfData)).append("\n");
+ sb.append(" vnfId: ").append(toIndentedString(vnfId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataVnfsVnfVnfData.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataVnfsVnfVnfData.java
new file mode 100644
index 0000000..ebc5ad6
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataVnfsVnfVnfData.java
@@ -0,0 +1,384 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiLicenseinformationLicenseInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOperStatusData;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiRequestinformationRequestInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiSdncrequestheaderSdncRequestHeader;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfModules;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataVnfsVnfVnfdataVnfProvidedAllottedResources;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceinformationServiceInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfLevelOperStatus;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfNetworkCollection;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfOperationInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfSubInterfaceGroup;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfTopology;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfinformationVnfInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfrequestinputVnfRequestInput;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnftopologyVnfTopology;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiServicedataServicedataVnfsVnfVnfData
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-12T18:08:46.019-04:00")
+@JsonRootName("vnf-data")
+public class GenericResourceApiServicedataServicedataVnfsVnfVnfData {
+ @JsonProperty("vnf-level-oper-status")
+ private GenericResourceApiOperStatusData vnfLevelOperStatus = null;
+
+ @JsonProperty("license-information")
+ private GenericResourceApiLicenseinformationLicenseInformation licenseInformation = null;
+
+ @JsonProperty("request-information")
+ private GenericResourceApiRequestinformationRequestInformation requestInformation = null;
+
+ @JsonProperty("sdnc-request-header")
+ private GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader = null;
+
+ @JsonProperty("service-information")
+ private GenericResourceApiServiceinformationServiceInformation serviceInformation = null;
+
+ @JsonProperty("vnf-information")
+ private GenericResourceApiVnfinformationVnfInformation vnfInformation = null;
+
+ @JsonProperty("vnf-request-input")
+ private GenericResourceApiVnfrequestinputVnfRequestInput vnfRequestInput = null;
+
+ @JsonProperty("vnf-topology")
+ private GenericResourceApiVnftopologyVnfTopology vnfTopology = null;
+
+ @JsonProperty("vnf-network-collections")
+ private GenericResourceApiVnfNetworkCollection vnfNetworkCollections = null;
+
+ @JsonProperty("vnf-sub-interface-groups")
+ private GenericResourceApiVnfSubInterfaceGroup vnfSubInterfaceGroups = null;
+
+ @JsonProperty("vf-modules")
+ private GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfModules vfModules = null;
+
+ @JsonProperty("vnf-provided-allotted-resources")
+ private GenericResourceApiServicedataServicedataVnfsVnfVnfdataVnfProvidedAllottedResources vnfProvidedAllottedResources = null;
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfLevelOperStatus(GenericResourceApiOperStatusData vnfLevelOperStatus) {
+ this.vnfLevelOperStatus = vnfLevelOperStatus;
+ return this;
+ }
+
+ /**
+ * Get vnfLevelOperStatus
+ * @return vnfLevelOperStatus
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiOperStatusData getVnfLevelOperStatus() {
+ return vnfLevelOperStatus;
+ }
+
+ public void setVnfLevelOperStatus(GenericResourceApiOperStatusData vnfLevelOperStatus) {
+ this.vnfLevelOperStatus = vnfLevelOperStatus;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData licenseInformation(GenericResourceApiLicenseinformationLicenseInformation licenseInformation) {
+ this.licenseInformation = licenseInformation;
+ return this;
+ }
+
+ /**
+ * Get licenseInformation
+ * @return licenseInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiLicenseinformationLicenseInformation getLicenseInformation() {
+ return licenseInformation;
+ }
+
+ public void setLicenseInformation(GenericResourceApiLicenseinformationLicenseInformation licenseInformation) {
+ this.licenseInformation = licenseInformation;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData requestInformation(GenericResourceApiRequestinformationRequestInformation requestInformation) {
+ this.requestInformation = requestInformation;
+ return this;
+ }
+
+ /**
+ * Get requestInformation
+ * @return requestInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiRequestinformationRequestInformation getRequestInformation() {
+ return requestInformation;
+ }
+
+ public void setRequestInformation(GenericResourceApiRequestinformationRequestInformation requestInformation) {
+ this.requestInformation = requestInformation;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData sdncRequestHeader(GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader) {
+ this.sdncRequestHeader = sdncRequestHeader;
+ return this;
+ }
+
+ /**
+ * Get sdncRequestHeader
+ * @return sdncRequestHeader
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiSdncrequestheaderSdncRequestHeader getSdncRequestHeader() {
+ return sdncRequestHeader;
+ }
+
+ public void setSdncRequestHeader(GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader) {
+ this.sdncRequestHeader = sdncRequestHeader;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData serviceInformation(GenericResourceApiServiceinformationServiceInformation serviceInformation) {
+ this.serviceInformation = serviceInformation;
+ return this;
+ }
+
+ /**
+ * Get serviceInformation
+ * @return serviceInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServiceinformationServiceInformation getServiceInformation() {
+ return serviceInformation;
+ }
+
+ public void setServiceInformation(GenericResourceApiServiceinformationServiceInformation serviceInformation) {
+ this.serviceInformation = serviceInformation;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfInformation(GenericResourceApiVnfinformationVnfInformation vnfInformation) {
+ this.vnfInformation = vnfInformation;
+ return this;
+ }
+
+ /**
+ * Get vnfInformation
+ * @return vnfInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiVnfinformationVnfInformation getVnfInformation() {
+ return vnfInformation;
+ }
+
+ public void setVnfInformation(GenericResourceApiVnfinformationVnfInformation vnfInformation) {
+ this.vnfInformation = vnfInformation;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfRequestInput(GenericResourceApiVnfrequestinputVnfRequestInput vnfRequestInput) {
+ this.vnfRequestInput = vnfRequestInput;
+ return this;
+ }
+
+ /**
+ * Get vnfRequestInput
+ * @return vnfRequestInput
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiVnfrequestinputVnfRequestInput getVnfRequestInput() {
+ return vnfRequestInput;
+ }
+
+ public void setVnfRequestInput(GenericResourceApiVnfrequestinputVnfRequestInput vnfRequestInput) {
+ this.vnfRequestInput = vnfRequestInput;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfTopology(GenericResourceApiVnftopologyVnfTopology vnfTopology) {
+ this.vnfTopology = vnfTopology;
+ return this;
+ }
+
+ /**
+ * Get vnfTopology
+ * @return vnfTopology
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiVnftopologyVnfTopology getVnfTopology() {
+ return vnfTopology;
+ }
+
+ public void setVnfTopology(GenericResourceApiVnftopologyVnfTopology vnfTopology) {
+ this.vnfTopology = vnfTopology;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfNetworkCollections(GenericResourceApiVnfNetworkCollection vnfNetworkCollections) {
+ this.vnfNetworkCollections = vnfNetworkCollections;
+ return this;
+ }
+
+ /**
+ * Get vnfNetworkCollections
+ * @return vnfNetworkCollections
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiVnfNetworkCollection getVnfNetworkCollections() {
+ return vnfNetworkCollections;
+ }
+
+ public void setVnfNetworkCollections(GenericResourceApiVnfNetworkCollection vnfNetworkCollections) {
+ this.vnfNetworkCollections = vnfNetworkCollections;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfSubInterfaceGroups(GenericResourceApiVnfSubInterfaceGroup vnfSubInterfaceGroups) {
+ this.vnfSubInterfaceGroups = vnfSubInterfaceGroups;
+ return this;
+ }
+
+ /**
+ * Get vnfSubInterfaceGroups
+ * @return vnfSubInterfaceGroups
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiVnfSubInterfaceGroup getVnfSubInterfaceGroups() {
+ return vnfSubInterfaceGroups;
+ }
+
+ public void setVnfSubInterfaceGroups(GenericResourceApiVnfSubInterfaceGroup vnfSubInterfaceGroups) {
+ this.vnfSubInterfaceGroups = vnfSubInterfaceGroups;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData vfModules(GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfModules vfModules) {
+ this.vfModules = vfModules;
+ return this;
+ }
+
+ /**
+ * Get vfModules
+ * @return vfModules
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfModules getVfModules() {
+ return vfModules;
+ }
+
+ public void setVfModules(GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfModules vfModules) {
+ this.vfModules = vfModules;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfData vnfProvidedAllottedResources(GenericResourceApiServicedataServicedataVnfsVnfVnfdataVnfProvidedAllottedResources vnfProvidedAllottedResources) {
+ this.vnfProvidedAllottedResources = vnfProvidedAllottedResources;
+ return this;
+ }
+
+ /**
+ * Get vnfProvidedAllottedResources
+ * @return vnfProvidedAllottedResources
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfdataVnfProvidedAllottedResources getVnfProvidedAllottedResources() {
+ return vnfProvidedAllottedResources;
+ }
+
+ public void setVnfProvidedAllottedResources(GenericResourceApiServicedataServicedataVnfsVnfVnfdataVnfProvidedAllottedResources vnfProvidedAllottedResources) {
+ this.vnfProvidedAllottedResources = vnfProvidedAllottedResources;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiServicedataServicedataVnfsVnfVnfData genericResourceApiServicedataServicedataVnfsVnfVnfData = (GenericResourceApiServicedataServicedataVnfsVnfVnfData) o;
+ return Objects.equals(this.vnfLevelOperStatus, genericResourceApiServicedataServicedataVnfsVnfVnfData.vnfLevelOperStatus) &&
+ Objects.equals(this.licenseInformation, genericResourceApiServicedataServicedataVnfsVnfVnfData.licenseInformation) &&
+ Objects.equals(this.requestInformation, genericResourceApiServicedataServicedataVnfsVnfVnfData.requestInformation) &&
+ Objects.equals(this.sdncRequestHeader, genericResourceApiServicedataServicedataVnfsVnfVnfData.sdncRequestHeader) &&
+ Objects.equals(this.serviceInformation, genericResourceApiServicedataServicedataVnfsVnfVnfData.serviceInformation) &&
+ Objects.equals(this.vnfInformation, genericResourceApiServicedataServicedataVnfsVnfVnfData.vnfInformation) &&
+ Objects.equals(this.vnfRequestInput, genericResourceApiServicedataServicedataVnfsVnfVnfData.vnfRequestInput) &&
+ Objects.equals(this.vnfTopology, genericResourceApiServicedataServicedataVnfsVnfVnfData.vnfTopology) &&
+ Objects.equals(this.vnfNetworkCollections, genericResourceApiServicedataServicedataVnfsVnfVnfData.vnfNetworkCollections) &&
+ Objects.equals(this.vnfSubInterfaceGroups, genericResourceApiServicedataServicedataVnfsVnfVnfData.vnfSubInterfaceGroups) &&
+ Objects.equals(this.vfModules, genericResourceApiServicedataServicedataVnfsVnfVnfData.vfModules) &&
+ Objects.equals(this.vnfProvidedAllottedResources, genericResourceApiServicedataServicedataVnfsVnfVnfData.vnfProvidedAllottedResources);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(vnfLevelOperStatus, licenseInformation, requestInformation, sdncRequestHeader, serviceInformation, vnfInformation, vnfRequestInput, vnfTopology, vnfNetworkCollections, vnfSubInterfaceGroups, vfModules, vnfProvidedAllottedResources);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiServicedataServicedataVnfsVnfVnfData {\n");
+
+ sb.append(" vnfLevelOperStatus: ").append(toIndentedString(vnfLevelOperStatus)).append("\n");
+ sb.append(" licenseInformation: ").append(toIndentedString(licenseInformation)).append("\n");
+ sb.append(" requestInformation: ").append(toIndentedString(requestInformation)).append("\n");
+ sb.append(" sdncRequestHeader: ").append(toIndentedString(sdncRequestHeader)).append("\n");
+ sb.append(" serviceInformation: ").append(toIndentedString(serviceInformation)).append("\n");
+ sb.append(" vnfInformation: ").append(toIndentedString(vnfInformation)).append("\n");
+ sb.append(" vnfRequestInput: ").append(toIndentedString(vnfRequestInput)).append("\n");
+ sb.append(" vnfTopology: ").append(toIndentedString(vnfTopology)).append("\n");
+ sb.append(" vnfNetworkCollections: ").append(toIndentedString(vnfNetworkCollections)).append("\n");
+ sb.append(" vnfSubInterfaceGroups: ").append(toIndentedString(vnfSubInterfaceGroups)).append("\n");
+ sb.append(" vfModules: ").append(toIndentedString(vfModules)).append("\n");
+ sb.append(" vnfProvidedAllottedResources: ").append(toIndentedString(vnfProvidedAllottedResources)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule.java
new file mode 100644
index 0000000..3620148
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule.java
@@ -0,0 +1,109 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("vf-module")
+public class GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule {
+ @JsonProperty("vf-module-data")
+ private GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData vfModuleData = null;
+
+ @JsonProperty("vf-module-id")
+ private String vfModuleId = null;
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule vfModuleData(GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData vfModuleData) {
+ this.vfModuleData = vfModuleData;
+ return this;
+ }
+
+ /**
+ * Get vfModuleData
+ * @return vfModuleData
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData getVfModuleData() {
+ return vfModuleData;
+ }
+
+ public void setVfModuleData(GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfmoduleVfModuleData vfModuleData) {
+ this.vfModuleData = vfModuleData;
+ }
+
+ public GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule vfModuleId(String vfModuleId) {
+ this.vfModuleId = vfModuleId;
+ return this;
+ }
+
+ /**
+ * Get vfModuleId
+ * @return vfModuleId
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getVfModuleId() {
+ return vfModuleId;
+ }
+
+ public void setVfModuleId(String vfModuleId) {
+ this.vfModuleId = vfModuleId;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule genericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule = (GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule) o;
+ return Objects.equals(this.vfModuleData, genericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule.vfModuleData) &&
+ Objects.equals(this.vfModuleId, genericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule.vfModuleId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(vfModuleData, vfModuleId);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiServicedataServicedataVnfsVnfVnfdataVfmodulesVfModule {\n");
+
+ sb.append(" vfModuleData: ").append(toIndentedString(vfModuleData)).append("\n");
+ sb.append(" vfModuleId: ").append(toIndentedString(vfModuleId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicemodelinfrastructureService.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicemodelinfrastructureService.java
new file mode 100644
index 0000000..3d41494
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicemodelinfrastructureService.java
@@ -0,0 +1,139 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceData;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceStatus;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicedataServiceData;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicestatusServiceStatus;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiServicemodelinfrastructureService
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-12T18:08:46.019-04:00")
+
+@JsonRootName("service")
+public class GenericResourceApiServicemodelinfrastructureService {
+ @JsonProperty("service-data")
+ private GenericResourceApiServicedataServiceData serviceData = null;
+
+ @JsonProperty("service-status")
+ private GenericResourceApiServicestatusServiceStatus serviceStatus = null;
+
+ @JsonProperty("service-instance-id")
+ private String serviceInstanceId = null;
+
+ public GenericResourceApiServicemodelinfrastructureService serviceData(GenericResourceApiServicedataServiceData serviceData) {
+ this.serviceData = serviceData;
+ return this;
+ }
+
+ /**
+ * Get serviceData
+ * @return serviceData
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicedataServiceData getServiceData() {
+ return serviceData;
+ }
+
+ public void setServiceData(GenericResourceApiServicedataServiceData serviceData) {
+ this.serviceData = serviceData;
+ }
+
+ public GenericResourceApiServicemodelinfrastructureService serviceStatus(GenericResourceApiServicestatusServiceStatus serviceStatus) {
+ this.serviceStatus = serviceStatus;
+ return this;
+ }
+
+ /**
+ * Get serviceStatus
+ * @return serviceStatus
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicestatusServiceStatus getServiceStatus() {
+ return serviceStatus;
+ }
+
+ public void setServiceStatus(GenericResourceApiServicestatusServiceStatus serviceStatus) {
+ this.serviceStatus = serviceStatus;
+ }
+
+ public GenericResourceApiServicemodelinfrastructureService serviceInstanceId(String serviceInstanceId) {
+ this.serviceInstanceId = serviceInstanceId;
+ return this;
+ }
+
+ /**
+ * Keep as M
+ * @return serviceInstanceId
+ **/
+ @ApiModelProperty(value = "Keep as M")
+
+
+ public String getServiceInstanceId() {
+ return serviceInstanceId;
+ }
+
+ public void setServiceInstanceId(String serviceInstanceId) {
+ this.serviceInstanceId = serviceInstanceId;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiServicemodelinfrastructureService genericResourceApiServicemodelinfrastructureService = (GenericResourceApiServicemodelinfrastructureService) o;
+ return Objects.equals(this.serviceData, genericResourceApiServicemodelinfrastructureService.serviceData) &&
+ Objects.equals(this.serviceStatus, genericResourceApiServicemodelinfrastructureService.serviceStatus) &&
+ Objects.equals(this.serviceInstanceId, genericResourceApiServicemodelinfrastructureService.serviceInstanceId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(serviceData, serviceStatus, serviceInstanceId);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiServicemodelinfrastructureService {\n");
+
+ sb.append(" serviceData: ").append(toIndentedString(serviceData)).append("\n");
+ sb.append(" serviceStatus: ").append(toIndentedString(serviceStatus)).append("\n");
+ sb.append(" serviceInstanceId: ").append(toIndentedString(serviceInstanceId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicestatusServiceStatus.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicestatusServiceStatus.java
new file mode 100644
index 0000000..2904d34
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicestatusServiceStatus.java
@@ -0,0 +1,261 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiRequestStatusEnumeration;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiRpcActionEnumeration;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiServicestatusServiceStatus
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("service-status")
+public class GenericResourceApiServicestatusServiceStatus {
+ @JsonProperty("response-code")
+ private String responseCode = null;
+
+ @JsonProperty("response-message")
+ private String responseMessage = null;
+
+ @JsonProperty("action")
+ private String action = null;
+
+ @JsonProperty("response-timestamp")
+ private String responseTimestamp = null;
+
+ @JsonProperty("request-status")
+ private GenericResourceApiRequestStatusEnumeration requestStatus = null;
+
+ @JsonProperty("final-indicator")
+ private String finalIndicator = null;
+
+ @JsonProperty("rpc-name")
+ private String rpcName = null;
+
+ @JsonProperty("rpc-action")
+ private GenericResourceApiRpcActionEnumeration rpcAction = null;
+
+ public GenericResourceApiServicestatusServiceStatus responseCode(String responseCode) {
+ this.responseCode = responseCode;
+ return this;
+ }
+
+ /**
+ * Get responseCode
+ * @return responseCode
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getResponseCode() {
+ return responseCode;
+ }
+
+ public void setResponseCode(String responseCode) {
+ this.responseCode = responseCode;
+ }
+
+ public GenericResourceApiServicestatusServiceStatus responseMessage(String responseMessage) {
+ this.responseMessage = responseMessage;
+ return this;
+ }
+
+ /**
+ * Get responseMessage
+ * @return responseMessage
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getResponseMessage() {
+ return responseMessage;
+ }
+
+ public void setResponseMessage(String responseMessage) {
+ this.responseMessage = responseMessage;
+ }
+
+ public GenericResourceApiServicestatusServiceStatus action(String action) {
+ this.action = action;
+ return this;
+ }
+
+ /**
+ * value would one of possible request-actions; match the list in service-data oper-status
+ * @return action
+ **/
+ @ApiModelProperty(value = "value would one of possible request-actions; match the list in service-data oper-status")
+
+
+ public String getAction() {
+ return action;
+ }
+
+ public void setAction(String action) {
+ this.action = action;
+ }
+
+ public GenericResourceApiServicestatusServiceStatus responseTimestamp(String responseTimestamp) {
+ this.responseTimestamp = responseTimestamp;
+ return this;
+ }
+
+ /**
+ * Get responseTimestamp
+ * @return responseTimestamp
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getResponseTimestamp() {
+ return responseTimestamp;
+ }
+
+ public void setResponseTimestamp(String responseTimestamp) {
+ this.responseTimestamp = responseTimestamp;
+ }
+
+ public GenericResourceApiServicestatusServiceStatus requestStatus(GenericResourceApiRequestStatusEnumeration requestStatus) {
+ this.requestStatus = requestStatus;
+ return this;
+ }
+
+ /**
+ * Get requestStatus
+ * @return requestStatus
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiRequestStatusEnumeration getRequestStatus() {
+ return requestStatus;
+ }
+
+ public void setRequestStatus(GenericResourceApiRequestStatusEnumeration requestStatus) {
+ this.requestStatus = requestStatus;
+ }
+
+ public GenericResourceApiServicestatusServiceStatus finalIndicator(String finalIndicator) {
+ this.finalIndicator = finalIndicator;
+ return this;
+ }
+
+ /**
+ * Get finalIndicator
+ * @return finalIndicator
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getFinalIndicator() {
+ return finalIndicator;
+ }
+
+ public void setFinalIndicator(String finalIndicator) {
+ this.finalIndicator = finalIndicator;
+ }
+
+ public GenericResourceApiServicestatusServiceStatus rpcName(String rpcName) {
+ this.rpcName = rpcName;
+ return this;
+ }
+
+ /**
+ * Get rpcName
+ * @return rpcName
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getRpcName() {
+ return rpcName;
+ }
+
+ public void setRpcName(String rpcName) {
+ this.rpcName = rpcName;
+ }
+
+ public GenericResourceApiServicestatusServiceStatus rpcAction(GenericResourceApiRpcActionEnumeration rpcAction) {
+ this.rpcAction = rpcAction;
+ return this;
+ }
+
+ /**
+ * this is the svc-action from the incoming request
+ * @return rpcAction
+ **/
+ @ApiModelProperty(value = "this is the svc-action from the incoming request")
+
+ @Valid
+
+ public GenericResourceApiRpcActionEnumeration getRpcAction() {
+ return rpcAction;
+ }
+
+ public void setRpcAction(GenericResourceApiRpcActionEnumeration rpcAction) {
+ this.rpcAction = rpcAction;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiServicestatusServiceStatus genericResourceApiServicestatusServiceStatus = (GenericResourceApiServicestatusServiceStatus) o;
+ return Objects.equals(this.responseCode, genericResourceApiServicestatusServiceStatus.responseCode) &&
+ Objects.equals(this.responseMessage, genericResourceApiServicestatusServiceStatus.responseMessage) &&
+ Objects.equals(this.action, genericResourceApiServicestatusServiceStatus.action) &&
+ Objects.equals(this.responseTimestamp, genericResourceApiServicestatusServiceStatus.responseTimestamp) &&
+ Objects.equals(this.requestStatus, genericResourceApiServicestatusServiceStatus.requestStatus) &&
+ Objects.equals(this.finalIndicator, genericResourceApiServicestatusServiceStatus.finalIndicator) &&
+ Objects.equals(this.rpcName, genericResourceApiServicestatusServiceStatus.rpcName) &&
+ Objects.equals(this.rpcAction, genericResourceApiServicestatusServiceStatus.rpcAction);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(responseCode, responseMessage, action, responseTimestamp, requestStatus, finalIndicator, rpcName, rpcAction);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiServicestatusServiceStatus {\n");
+
+ sb.append(" responseCode: ").append(toIndentedString(responseCode)).append("\n");
+ sb.append(" responseMessage: ").append(toIndentedString(responseMessage)).append("\n");
+ sb.append(" action: ").append(toIndentedString(action)).append("\n");
+ sb.append(" responseTimestamp: ").append(toIndentedString(responseTimestamp)).append("\n");
+ sb.append(" requestStatus: ").append(toIndentedString(requestStatus)).append("\n");
+ sb.append(" finalIndicator: ").append(toIndentedString(finalIndicator)).append("\n");
+ sb.append(" rpcName: ").append(toIndentedString(rpcName)).append("\n");
+ sb.append(" rpcAction: ").append(toIndentedString(rpcAction)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicetopologyServiceTopology.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicetopologyServiceTopology.java
new file mode 100644
index 0000000..1a4a64f
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiServicetopologyServiceTopology.java
@@ -0,0 +1,170 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.google.gson.annotations.JsonAdapter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapModelInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapmodelinformationOnapModelInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceAssignments;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceParameters;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceTopologyIdentifier;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceassignmentsServiceAssignments;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServiceparametersServiceParameters;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiServicetopologyidentifierServiceTopologyIdentifier;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiServicetopologyServiceTopology
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("service-topology")
+public class GenericResourceApiServicetopologyServiceTopology {
+ @JsonProperty("onap-model-information")
+ private GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation = null;
+
+ @JsonProperty("service-assignments")
+ private GenericResourceApiServiceassignmentsServiceAssignments serviceAssignments = null;
+
+ @JsonProperty("service-parameters")
+ private GenericResourceApiServiceparametersServiceParameters serviceParameters = null;
+
+ @JsonProperty("service-topology-identifier")
+ private GenericResourceApiServicetopologyidentifierServiceTopologyIdentifier serviceTopologyIdentifier = null;
+
+ public GenericResourceApiServicetopologyServiceTopology onapModelInformation(GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
+ return this;
+ }
+
+ /**
+ * Get onapModelInformation
+ * @return onapModelInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiOnapmodelinformationOnapModelInformation getOnapModelInformation() {
+ return onapModelInformation;
+ }
+
+ public void setOnapModelInformation(GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
+ }
+
+ public GenericResourceApiServicetopologyServiceTopology serviceAssignments(GenericResourceApiServiceassignmentsServiceAssignments serviceAssignments) {
+ this.serviceAssignments = serviceAssignments;
+ return this;
+ }
+
+ /**
+ * Get serviceAssignments
+ * @return serviceAssignments
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServiceassignmentsServiceAssignments getServiceAssignments() {
+ return serviceAssignments;
+ }
+
+ public void setServiceAssignments(GenericResourceApiServiceassignmentsServiceAssignments serviceAssignments) {
+ this.serviceAssignments = serviceAssignments;
+ }
+
+ public GenericResourceApiServicetopologyServiceTopology serviceParameters(GenericResourceApiServiceparametersServiceParameters serviceParameters) {
+ this.serviceParameters = serviceParameters;
+ return this;
+ }
+
+ /**
+ * Get serviceParameters
+ * @return serviceParameters
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServiceparametersServiceParameters getServiceParameters() {
+ return serviceParameters;
+ }
+
+ public void setServiceParameters(GenericResourceApiServiceparametersServiceParameters serviceParameters) {
+ this.serviceParameters = serviceParameters;
+ }
+
+ public GenericResourceApiServicetopologyServiceTopology serviceTopologyIdentifier(GenericResourceApiServicetopologyidentifierServiceTopologyIdentifier serviceTopologyIdentifier) {
+ this.serviceTopologyIdentifier = serviceTopologyIdentifier;
+ return this;
+ }
+
+ /**
+ * Get serviceTopologyIdentifier
+ * @return serviceTopologyIdentifier
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiServicetopologyidentifierServiceTopologyIdentifier getServiceTopologyIdentifier() {
+ return serviceTopologyIdentifier;
+ }
+
+ public void setServiceTopologyIdentifier(GenericResourceApiServicetopologyidentifierServiceTopologyIdentifier serviceTopologyIdentifier) {
+ this.serviceTopologyIdentifier = serviceTopologyIdentifier;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiServicetopologyServiceTopology genericResourceApiServicetopologyServiceTopology = (GenericResourceApiServicetopologyServiceTopology) o;
+ return Objects.equals(this.onapModelInformation, genericResourceApiServicetopologyServiceTopology.onapModelInformation) &&
+ Objects.equals(this.serviceAssignments, genericResourceApiServicetopologyServiceTopology.serviceAssignments) &&
+ Objects.equals(this.serviceParameters, genericResourceApiServicetopologyServiceTopology.serviceParameters) &&
+ Objects.equals(this.serviceTopologyIdentifier, genericResourceApiServicetopologyServiceTopology.serviceTopologyIdentifier);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(onapModelInformation, serviceAssignments, serviceParameters, serviceTopologyIdentifier);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiServicetopologyServiceTopology {\n");
+
+ sb.append(" onapModelInformation: ").append(toIndentedString(onapModelInformation)).append("\n");
+ sb.append(" serviceAssignments: ").append(toIndentedString(serviceAssignments)).append("\n");
+ sb.append(" serviceParameters: ").append(toIndentedString(serviceParameters)).append("\n");
+ sb.append(" serviceTopologyIdentifier: ").append(toIndentedString(serviceTopologyIdentifier)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVfmoduletopologyVfModuleTopology.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVfmoduletopologyVfModuleTopology.java
new file mode 100644
index 0000000..989a179
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVfmoduletopologyVfModuleTopology.java
@@ -0,0 +1,294 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapModelInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapmodelinformationOnapModelInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiParam;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiRegionIdentifier;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVfModuleAssignments;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVfModuleTopologyIdentifier;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVfmoduleassignmentsVfModuleAssignments;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVfmoduletopologyidentifierVfModuleTopologyIdentifier;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiVfmoduletopologyVfModuleTopology
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("vf-module-topology")
+public class GenericResourceApiVfmoduletopologyVfModuleTopology {
+ @JsonProperty("onap-model-information")
+ private GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation = null;
+
+ @JsonProperty("aic-clli")
+ private String aicClli = null;
+
+ @JsonProperty("aic-cloud-region")
+ private String aicCloudRegion = null;
+
+ @JsonProperty("cloud-owner")
+ private String cloudOwner = null;
+
+ @JsonProperty("tenant")
+ private String tenant = null;
+
+ @JsonProperty("vf-module-assignments")
+ private GenericResourceApiVfmoduleassignmentsVfModuleAssignments vfModuleAssignments = null;
+
+ @JsonProperty("vf-module-topology-identifier")
+ private GenericResourceApiVfmoduletopologyidentifierVfModuleTopologyIdentifier vfModuleTopologyIdentifier = null;
+
+ @JsonProperty("vf-module-parameters")
+ private GenericResourceApiParam vfModuleParameters = null;
+
+ @JsonProperty("sdnc-generated-cloud-resources")
+ private Boolean sdncGeneratedCloudResources = null;
+
+ public GenericResourceApiVfmoduletopologyVfModuleTopology onapModelInformation(GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
+ return this;
+ }
+
+ /**
+ * Get onapModelInformation
+ * @return onapModelInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiOnapmodelinformationOnapModelInformation getOnapModelInformation() {
+ return onapModelInformation;
+ }
+
+ public void setOnapModelInformation(GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
+ }
+
+ public GenericResourceApiVfmoduletopologyVfModuleTopology aicClli(String aicClli) {
+ this.aicClli = aicClli;
+ return this;
+ }
+
+ /**
+ * Not expected to be used
+ * @return aicClli
+ **/
+ @ApiModelProperty(value = "Not expected to be used")
+
+
+ public String getAicClli() {
+ return aicClli;
+ }
+
+ public void setAicClli(String aicClli) {
+ this.aicClli = aicClli;
+ }
+
+ public GenericResourceApiVfmoduletopologyVfModuleTopology aicCloudRegion(String aicCloudRegion) {
+ this.aicCloudRegion = aicCloudRegion;
+ return this;
+ }
+
+ /**
+ * The AIC cloud region which maps to contrail versions
+ * @return aicCloudRegion
+ **/
+ @ApiModelProperty(value = "The AIC cloud region which maps to contrail versions")
+
+
+ public String getAicCloudRegion() {
+ return aicCloudRegion;
+ }
+
+ public void setAicCloudRegion(String aicCloudRegion) {
+ this.aicCloudRegion = aicCloudRegion;
+ }
+
+ public GenericResourceApiVfmoduletopologyVfModuleTopology cloudOwner(String cloudOwner) {
+ this.cloudOwner = cloudOwner;
+ return this;
+ }
+
+ /**
+ * Get cloudOwner
+ * @return cloudOwner
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getCloudOwner() {
+ return cloudOwner;
+ }
+
+ public void setCloudOwner(String cloudOwner) {
+ this.cloudOwner = cloudOwner;
+ }
+
+ public GenericResourceApiVfmoduletopologyVfModuleTopology tenant(String tenant) {
+ this.tenant = tenant;
+ return this;
+ }
+
+ /**
+ * Get tenant
+ * @return tenant
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getTenant() {
+ return tenant;
+ }
+
+ public void setTenant(String tenant) {
+ this.tenant = tenant;
+ }
+
+ public GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleAssignments(GenericResourceApiVfmoduleassignmentsVfModuleAssignments vfModuleAssignments) {
+ this.vfModuleAssignments = vfModuleAssignments;
+ return this;
+ }
+
+ /**
+ * Get vfModuleAssignments
+ * @return vfModuleAssignments
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiVfmoduleassignmentsVfModuleAssignments getVfModuleAssignments() {
+ return vfModuleAssignments;
+ }
+
+ public void setVfModuleAssignments(GenericResourceApiVfmoduleassignmentsVfModuleAssignments vfModuleAssignments) {
+ this.vfModuleAssignments = vfModuleAssignments;
+ }
+
+ public GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopologyIdentifier(GenericResourceApiVfmoduletopologyidentifierVfModuleTopologyIdentifier vfModuleTopologyIdentifier) {
+ this.vfModuleTopologyIdentifier = vfModuleTopologyIdentifier;
+ return this;
+ }
+
+ /**
+ * Get vfModuleTopologyIdentifier
+ * @return vfModuleTopologyIdentifier
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiVfmoduletopologyidentifierVfModuleTopologyIdentifier getVfModuleTopologyIdentifier() {
+ return vfModuleTopologyIdentifier;
+ }
+
+ public void setVfModuleTopologyIdentifier(GenericResourceApiVfmoduletopologyidentifierVfModuleTopologyIdentifier vfModuleTopologyIdentifier) {
+ this.vfModuleTopologyIdentifier = vfModuleTopologyIdentifier;
+ }
+
+ public GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleParameters(GenericResourceApiParam vfModuleParameters) {
+ this.vfModuleParameters = vfModuleParameters;
+ return this;
+ }
+
+ /**
+ * Get vfModuleParameters
+ * @return vfModuleParameters
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiParam getVfModuleParameters() {
+ return vfModuleParameters;
+ }
+
+ public void setVfModuleParameters(GenericResourceApiParam vfModuleParameters) {
+ this.vfModuleParameters = vfModuleParameters;
+ }
+
+ public GenericResourceApiVfmoduletopologyVfModuleTopology sdncGeneratedCloudResources(Boolean sdncGeneratedCloudResources) {
+ this.sdncGeneratedCloudResources = sdncGeneratedCloudResources;
+ return this;
+ }
+
+ /**
+ * Indicate if source is sdnc-generated-cloud-resources.When true, the parameters are literal HEAT template parameter names;When false, the parameters need to be converted to HEAT format
+ * @return sdncGeneratedCloudResources
+ **/
+ @ApiModelProperty(value = "Indicate if source is sdnc-generated-cloud-resources.When true, the parameters are literal HEAT template parameter names;When false, the parameters need to be converted to HEAT format")
+
+
+ public Boolean isSdncGeneratedCloudResources() {
+ return sdncGeneratedCloudResources;
+ }
+
+ public void setSdncGeneratedCloudResources(Boolean sdncGeneratedCloudResources) {
+ this.sdncGeneratedCloudResources = sdncGeneratedCloudResources;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiVfmoduletopologyVfModuleTopology genericResourceApiVfmoduletopologyVfModuleTopology = (GenericResourceApiVfmoduletopologyVfModuleTopology) o;
+ return Objects.equals(this.onapModelInformation, genericResourceApiVfmoduletopologyVfModuleTopology.onapModelInformation) &&
+ Objects.equals(this.aicClli, genericResourceApiVfmoduletopologyVfModuleTopology.aicClli) &&
+ Objects.equals(this.aicCloudRegion, genericResourceApiVfmoduletopologyVfModuleTopology.aicCloudRegion) &&
+ Objects.equals(this.cloudOwner, genericResourceApiVfmoduletopologyVfModuleTopology.cloudOwner) &&
+ Objects.equals(this.tenant, genericResourceApiVfmoduletopologyVfModuleTopology.tenant) &&
+ Objects.equals(this.vfModuleAssignments, genericResourceApiVfmoduletopologyVfModuleTopology.vfModuleAssignments) &&
+ Objects.equals(this.vfModuleTopologyIdentifier, genericResourceApiVfmoduletopologyVfModuleTopology.vfModuleTopologyIdentifier) &&
+ Objects.equals(this.vfModuleParameters, genericResourceApiVfmoduletopologyVfModuleTopology.vfModuleParameters) &&
+ Objects.equals(this.sdncGeneratedCloudResources, genericResourceApiVfmoduletopologyVfModuleTopology.sdncGeneratedCloudResources);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(onapModelInformation, aicClli, aicCloudRegion, cloudOwner, tenant, vfModuleAssignments, vfModuleTopologyIdentifier, vfModuleParameters, sdncGeneratedCloudResources);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiVfmoduletopologyVfModuleTopology {\n");
+
+ sb.append(" onapModelInformation: ").append(toIndentedString(onapModelInformation)).append("\n");
+ sb.append(" aicClli: ").append(toIndentedString(aicClli)).append("\n");
+ sb.append(" aicCloudRegion: ").append(toIndentedString(aicCloudRegion)).append("\n");
+ sb.append(" cloudOwner: ").append(toIndentedString(cloudOwner)).append("\n");
+ sb.append(" tenant: ").append(toIndentedString(tenant)).append("\n");
+ sb.append(" vfModuleAssignments: ").append(toIndentedString(vfModuleAssignments)).append("\n");
+ sb.append(" vfModuleTopologyIdentifier: ").append(toIndentedString(vfModuleTopologyIdentifier)).append("\n");
+ sb.append(" vfModuleParameters: ").append(toIndentedString(vfModuleParameters)).append("\n");
+ sb.append(" sdncGeneratedCloudResources: ").append(toIndentedString(sdncGeneratedCloudResources)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVnfNetworkData.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVnfNetworkData.java
new file mode 100644
index 0000000..c32772d
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVnfNetworkData.java
@@ -0,0 +1,286 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiRelatedNetwork;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfnetworkdataSubnetsData;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiVnfNetworkData
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-26T10:54:31.626-04:00")
+@JsonRootName("vnf-network")
+public class GenericResourceApiVnfNetworkData {
+ @JsonProperty("related-networks")
+ private GenericResourceApiRelatedNetwork relatedNetworks = null;
+
+ @JsonProperty("network-role")
+ private String networkRole = null;
+
+ @JsonProperty("is-trunked")
+ private Boolean isTrunked = null;
+
+ @JsonProperty("network-id")
+ private String networkId = null;
+
+ @JsonProperty("subnets-data")
+ private GenericResourceApiVnfnetworkdataSubnetsData subnetsData = null;
+
+ @JsonProperty("contrail-network-fqdn")
+ private String contrailNetworkFqdn = null;
+
+ @JsonProperty("network-name")
+ private String networkName = null;
+
+ @JsonProperty("segmentation-id")
+ private String segmentationId = null;
+
+ @JsonProperty("neutron-id")
+ private String neutronId = null;
+
+ public GenericResourceApiVnfNetworkData relatedNetworks(GenericResourceApiRelatedNetwork relatedNetworks) {
+ this.relatedNetworks = relatedNetworks;
+ return this;
+ }
+
+ /**
+ * Get relatedNetworks
+ * @return relatedNetworks
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiRelatedNetwork getRelatedNetworks() {
+ return relatedNetworks;
+ }
+
+ public void setRelatedNetworks(GenericResourceApiRelatedNetwork relatedNetworks) {
+ this.relatedNetworks = relatedNetworks;
+ }
+
+ public GenericResourceApiVnfNetworkData networkRole(String networkRole) {
+ this.networkRole = networkRole;
+ return this;
+ }
+
+ /**
+ * A Network Role to which a VNF must connect
+ * @return networkRole
+ **/
+ @ApiModelProperty(value = "A Network Role to which a VNF must connect")
+
+
+ public String getNetworkRole() {
+ return networkRole;
+ }
+
+ public void setNetworkRole(String networkRole) {
+ this.networkRole = networkRole;
+ }
+
+ public GenericResourceApiVnfNetworkData isTrunked(Boolean isTrunked) {
+ this.isTrunked = isTrunked;
+ return this;
+ }
+
+ /**
+ * Get isTrunked
+ * @return isTrunked
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public Boolean isIsTrunked() {
+ return isTrunked;
+ }
+
+ public void setIsTrunked(Boolean isTrunked) {
+ this.isTrunked = isTrunked;
+ }
+
+ public GenericResourceApiVnfNetworkData networkId(String networkId) {
+ this.networkId = networkId;
+ return this;
+ }
+
+ /**
+ * Unique Neutron UUID of an instance of the network role
+ * @return networkId
+ **/
+ @ApiModelProperty(value = "Unique Neutron UUID of an instance of the network role ")
+
+
+ public String getNetworkId() {
+ return networkId;
+ }
+
+ public void setNetworkId(String networkId) {
+ this.networkId = networkId;
+ }
+
+ public GenericResourceApiVnfNetworkData subnetsData(GenericResourceApiVnfnetworkdataSubnetsData subnetsData) {
+ this.subnetsData = subnetsData;
+ return this;
+ }
+
+ /**
+ * Get subnetsData
+ * @return subnetsData
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiVnfnetworkdataSubnetsData getSubnetsData() {
+ return subnetsData;
+ }
+
+ public void setSubnetsData(GenericResourceApiVnfnetworkdataSubnetsData subnetsData) {
+ this.subnetsData = subnetsData;
+ }
+
+ public GenericResourceApiVnfNetworkData contrailNetworkFqdn(String contrailNetworkFqdn) {
+ this.contrailNetworkFqdn = contrailNetworkFqdn;
+ return this;
+ }
+
+ /**
+ * contrail network policy object
+ * @return contrailNetworkFqdn
+ **/
+ @ApiModelProperty(value = "contrail network policy object")
+
+
+ public String getContrailNetworkFqdn() {
+ return contrailNetworkFqdn;
+ }
+
+ public void setContrailNetworkFqdn(String contrailNetworkFqdn) {
+ this.contrailNetworkFqdn = contrailNetworkFqdn;
+ }
+
+ public GenericResourceApiVnfNetworkData networkName(String networkName) {
+ this.networkName = networkName;
+ return this;
+ }
+
+ /**
+ * Unique Neutron UUID of an instance of the network role
+ * @return networkName
+ **/
+ @ApiModelProperty(value = "Unique Neutron UUID of an instance of the network role ")
+
+
+ public String getNetworkName() {
+ return networkName;
+ }
+
+ public void setNetworkName(String networkName) {
+ this.networkName = networkName;
+ }
+
+ public GenericResourceApiVnfNetworkData segmentationId(String segmentationId) {
+ this.segmentationId = segmentationId;
+ return this;
+ }
+
+ /**
+ * Get segmentationId
+ * @return segmentationId
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getSegmentationId() {
+ return segmentationId;
+ }
+
+ public void setSegmentationId(String segmentationId) {
+ this.segmentationId = segmentationId;
+ }
+
+ public GenericResourceApiVnfNetworkData neutronId(String neutronId) {
+ this.neutronId = neutronId;
+ return this;
+ }
+
+ /**
+ * Unique Neutron UUID of an instance of the network role
+ * @return neutronId
+ **/
+ @ApiModelProperty(value = "Unique Neutron UUID of an instance of the network role ")
+
+
+ public String getNeutronId() {
+ return neutronId;
+ }
+
+ public void setNeutronId(String neutronId) {
+ this.neutronId = neutronId;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiVnfNetworkData genericResourceApiVnfNetworkData = (GenericResourceApiVnfNetworkData) o;
+ return Objects.equals(this.relatedNetworks, genericResourceApiVnfNetworkData.relatedNetworks) &&
+ Objects.equals(this.networkRole, genericResourceApiVnfNetworkData.networkRole) &&
+ Objects.equals(this.isTrunked, genericResourceApiVnfNetworkData.isTrunked) &&
+ Objects.equals(this.networkId, genericResourceApiVnfNetworkData.networkId) &&
+ Objects.equals(this.subnetsData, genericResourceApiVnfNetworkData.subnetsData) &&
+ Objects.equals(this.contrailNetworkFqdn, genericResourceApiVnfNetworkData.contrailNetworkFqdn) &&
+ Objects.equals(this.networkName, genericResourceApiVnfNetworkData.networkName) &&
+ Objects.equals(this.segmentationId, genericResourceApiVnfNetworkData.segmentationId) &&
+ Objects.equals(this.neutronId, genericResourceApiVnfNetworkData.neutronId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(relatedNetworks, networkRole, isTrunked, networkId, subnetsData, contrailNetworkFqdn, networkName, segmentationId, neutronId);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiVnfNetworkData {\n");
+
+ sb.append(" relatedNetworks: ").append(toIndentedString(relatedNetworks)).append("\n");
+ sb.append(" networkRole: ").append(toIndentedString(networkRole)).append("\n");
+ sb.append(" isTrunked: ").append(toIndentedString(isTrunked)).append("\n");
+ sb.append(" networkId: ").append(toIndentedString(networkId)).append("\n");
+ sb.append(" subnetsData: ").append(toIndentedString(subnetsData)).append("\n");
+ sb.append(" contrailNetworkFqdn: ").append(toIndentedString(contrailNetworkFqdn)).append("\n");
+ sb.append(" networkName: ").append(toIndentedString(networkName)).append("\n");
+ sb.append(" segmentationId: ").append(toIndentedString(segmentationId)).append("\n");
+ sb.append(" neutronId: ").append(toIndentedString(neutronId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks.java
new file mode 100644
index 0000000..70fd01a
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks.java
@@ -0,0 +1,95 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfNetworkData;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-26T09:20:20.871-04:00")
+@JsonRootName("vnf-networks")
+public class GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks {
+ @JsonProperty("vnf-network")
+ @Valid
+ private List<GenericResourceApiVnfNetworkData> vnfNetwork = null;
+
+ public GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks vnfNetwork(List<GenericResourceApiVnfNetworkData> vnfNetwork) {
+ this.vnfNetwork = vnfNetwork;
+ return this;
+ }
+
+ public GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks addVnfNetworkItem(GenericResourceApiVnfNetworkData vnfNetworkItem) {
+ if (this.vnfNetwork == null) {
+ this.vnfNetwork = new ArrayList<>();
+ }
+ this.vnfNetwork.add(vnfNetworkItem);
+ return this;
+ }
+
+ /**
+ * Get vnfNetwork
+ * @return vnfNetwork
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<GenericResourceApiVnfNetworkData> getVnfNetwork() {
+ return vnfNetwork;
+ }
+
+ public void setVnfNetwork(List<GenericResourceApiVnfNetworkData> vnfNetwork) {
+ this.vnfNetwork = vnfNetwork;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks genericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks = (GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks) o;
+ return Objects.equals(this.vnfNetwork, genericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks.vnfNetwork);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(vnfNetwork);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiVnfresourceassignmentsVnfresourceassignmentsVnfNetworks {\n");
+
+ sb.append(" vnfNetwork: ").append(toIndentedString(vnfNetwork)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVnftopologyVnfTopology.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVnftopologyVnfTopology.java
new file mode 100644
index 0000000..8b6d221
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVnftopologyVnfTopology.java
@@ -0,0 +1,294 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapModelInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiOnapmodelinformationOnapModelInformation;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiParam;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiRegionIdentifier;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfResourceAssignments;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfTopologyIdentifierStructure;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnfresourceassignmentsVnfResourceAssignments;
+import org.onap.sdnc.apps.ms.gra.swagger.model.GenericResourceApiVnftopologyidentifierstructureVnfTopologyIdentifierStructure;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiVnftopologyVnfTopology
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-13T13:26:44.236-04:00")
+@JsonRootName("vnf-topology")
+public class GenericResourceApiVnftopologyVnfTopology {
+ @JsonProperty("onap-model-information")
+ private GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation = null;
+
+ @JsonProperty("aic-clli")
+ private String aicClli = null;
+
+ @JsonProperty("aic-cloud-region")
+ private String aicCloudRegion = null;
+
+ @JsonProperty("cloud-owner")
+ private String cloudOwner = null;
+
+ @JsonProperty("tenant")
+ private String tenant = null;
+
+ @JsonProperty("vnf-resource-assignments")
+ private GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments = null;
+
+ @JsonProperty("vnf-topology-identifier-structure")
+ private GenericResourceApiVnftopologyidentifierstructureVnfTopologyIdentifierStructure vnfTopologyIdentifierStructure = null;
+
+ @JsonProperty("vnf-parameters-data")
+ private GenericResourceApiParam vnfParametersData = null;
+
+ @JsonProperty("sdnc-generated-cloud-resources")
+ private Boolean sdncGeneratedCloudResources = null;
+
+ public GenericResourceApiVnftopologyVnfTopology onapModelInformation(GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
+ return this;
+ }
+
+ /**
+ * Get onapModelInformation
+ * @return onapModelInformation
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiOnapmodelinformationOnapModelInformation getOnapModelInformation() {
+ return onapModelInformation;
+ }
+
+ public void setOnapModelInformation(GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation) {
+ this.onapModelInformation = onapModelInformation;
+ }
+
+ public GenericResourceApiVnftopologyVnfTopology aicClli(String aicClli) {
+ this.aicClli = aicClli;
+ return this;
+ }
+
+ /**
+ * Not expected to be used
+ * @return aicClli
+ **/
+ @ApiModelProperty(value = "Not expected to be used")
+
+
+ public String getAicClli() {
+ return aicClli;
+ }
+
+ public void setAicClli(String aicClli) {
+ this.aicClli = aicClli;
+ }
+
+ public GenericResourceApiVnftopologyVnfTopology aicCloudRegion(String aicCloudRegion) {
+ this.aicCloudRegion = aicCloudRegion;
+ return this;
+ }
+
+ /**
+ * The AIC cloud region which maps to contrail versions
+ * @return aicCloudRegion
+ **/
+ @ApiModelProperty(value = "The AIC cloud region which maps to contrail versions")
+
+
+ public String getAicCloudRegion() {
+ return aicCloudRegion;
+ }
+
+ public void setAicCloudRegion(String aicCloudRegion) {
+ this.aicCloudRegion = aicCloudRegion;
+ }
+
+ public GenericResourceApiVnftopologyVnfTopology cloudOwner(String cloudOwner) {
+ this.cloudOwner = cloudOwner;
+ return this;
+ }
+
+ /**
+ * Get cloudOwner
+ * @return cloudOwner
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getCloudOwner() {
+ return cloudOwner;
+ }
+
+ public void setCloudOwner(String cloudOwner) {
+ this.cloudOwner = cloudOwner;
+ }
+
+ public GenericResourceApiVnftopologyVnfTopology tenant(String tenant) {
+ this.tenant = tenant;
+ return this;
+ }
+
+ /**
+ * Get tenant
+ * @return tenant
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getTenant() {
+ return tenant;
+ }
+
+ public void setTenant(String tenant) {
+ this.tenant = tenant;
+ }
+
+ public GenericResourceApiVnftopologyVnfTopology vnfResourceAssignments(GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments) {
+ this.vnfResourceAssignments = vnfResourceAssignments;
+ return this;
+ }
+
+ /**
+ * Get vnfResourceAssignments
+ * @return vnfResourceAssignments
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiVnfresourceassignmentsVnfResourceAssignments getVnfResourceAssignments() {
+ return vnfResourceAssignments;
+ }
+
+ public void setVnfResourceAssignments(GenericResourceApiVnfresourceassignmentsVnfResourceAssignments vnfResourceAssignments) {
+ this.vnfResourceAssignments = vnfResourceAssignments;
+ }
+
+ public GenericResourceApiVnftopologyVnfTopology vnfTopologyIdentifierStructure(GenericResourceApiVnftopologyidentifierstructureVnfTopologyIdentifierStructure vnfTopologyIdentifierStructure) {
+ this.vnfTopologyIdentifierStructure = vnfTopologyIdentifierStructure;
+ return this;
+ }
+
+ /**
+ * Get vnfTopologyIdentifierStructure
+ * @return vnfTopologyIdentifierStructure
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiVnftopologyidentifierstructureVnfTopologyIdentifierStructure getVnfTopologyIdentifierStructure() {
+ return vnfTopologyIdentifierStructure;
+ }
+
+ public void setVnfTopologyIdentifierStructure(GenericResourceApiVnftopologyidentifierstructureVnfTopologyIdentifierStructure vnfTopologyIdentifierStructure) {
+ this.vnfTopologyIdentifierStructure = vnfTopologyIdentifierStructure;
+ }
+
+ public GenericResourceApiVnftopologyVnfTopology vnfParametersData(GenericResourceApiParam vnfParametersData) {
+ this.vnfParametersData = vnfParametersData;
+ return this;
+ }
+
+ /**
+ * Get vnfParametersData
+ * @return vnfParametersData
+ **/
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public GenericResourceApiParam getVnfParametersData() {
+ return vnfParametersData;
+ }
+
+ public void setVnfParametersData(GenericResourceApiParam vnfParametersData) {
+ this.vnfParametersData = vnfParametersData;
+ }
+
+ public GenericResourceApiVnftopologyVnfTopology sdncGeneratedCloudResources(Boolean sdncGeneratedCloudResources) {
+ this.sdncGeneratedCloudResources = sdncGeneratedCloudResources;
+ return this;
+ }
+
+ /**
+ * Indicate if source is sdnc generated cloud param. When true, the parameters are literal HEAT template parameter names;When false, the parameters need to be converted to HEAT format
+ * @return sdncGeneratedCloudResources
+ **/
+ @ApiModelProperty(value = "Indicate if source is sdnc generated cloud param. When true, the parameters are literal HEAT template parameter names;When false, the parameters need to be converted to HEAT format")
+
+
+ public Boolean isSdncGeneratedCloudResources() {
+ return sdncGeneratedCloudResources;
+ }
+
+ public void setSdncGeneratedCloudResources(Boolean sdncGeneratedCloudResources) {
+ this.sdncGeneratedCloudResources = sdncGeneratedCloudResources;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiVnftopologyVnfTopology genericResourceApiVnftopologyVnfTopology = (GenericResourceApiVnftopologyVnfTopology) o;
+ return Objects.equals(this.onapModelInformation, genericResourceApiVnftopologyVnfTopology.onapModelInformation) &&
+ Objects.equals(this.aicClli, genericResourceApiVnftopologyVnfTopology.aicClli) &&
+ Objects.equals(this.aicCloudRegion, genericResourceApiVnftopologyVnfTopology.aicCloudRegion) &&
+ Objects.equals(this.cloudOwner, genericResourceApiVnftopologyVnfTopology.cloudOwner) &&
+ Objects.equals(this.tenant, genericResourceApiVnftopologyVnfTopology.tenant) &&
+ Objects.equals(this.vnfResourceAssignments, genericResourceApiVnftopologyVnfTopology.vnfResourceAssignments) &&
+ Objects.equals(this.vnfTopologyIdentifierStructure, genericResourceApiVnftopologyVnfTopology.vnfTopologyIdentifierStructure) &&
+ Objects.equals(this.vnfParametersData, genericResourceApiVnftopologyVnfTopology.vnfParametersData) &&
+ Objects.equals(this.sdncGeneratedCloudResources, genericResourceApiVnftopologyVnfTopology.sdncGeneratedCloudResources);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(onapModelInformation, aicClli, aicCloudRegion, cloudOwner, tenant, vnfResourceAssignments, vnfTopologyIdentifierStructure, vnfParametersData, sdncGeneratedCloudResources);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiVnftopologyVnfTopology {\n");
+
+ sb.append(" onapModelInformation: ").append(toIndentedString(onapModelInformation)).append("\n");
+ sb.append(" aicClli: ").append(toIndentedString(aicClli)).append("\n");
+ sb.append(" aicCloudRegion: ").append(toIndentedString(aicCloudRegion)).append("\n");
+ sb.append(" cloudOwner: ").append(toIndentedString(cloudOwner)).append("\n");
+ sb.append(" tenant: ").append(toIndentedString(tenant)).append("\n");
+ sb.append(" vnfResourceAssignments: ").append(toIndentedString(vnfResourceAssignments)).append("\n");
+ sb.append(" vnfTopologyIdentifierStructure: ").append(toIndentedString(vnfTopologyIdentifierStructure)).append("\n");
+ sb.append(" vnfParametersData: ").append(toIndentedString(vnfParametersData)).append("\n");
+ sb.append(" sdncGeneratedCloudResources: ").append(toIndentedString(sdncGeneratedCloudResources)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVpnbindingsVpnBindings.java b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVpnbindingsVpnBindings.java
new file mode 100644
index 0000000..72463f9
--- /dev/null
+++ b/ms/gra/gra-app/src/main/java/org/onap/sdnc/apps/ms/gra/swagger/model/GenericResourceApiVpnbindingsVpnBindings.java
@@ -0,0 +1,182 @@
+package org.onap.sdnc.apps.ms.gra.swagger.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * GenericResourceApiVpnbindingsVpnBindings
+ */
+@Validated
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-07-23T12:02:01.518-04:00")
+@JsonRootName("vpn-bindings")
+public class GenericResourceApiVpnbindingsVpnBindings {
+ @JsonProperty("vpn-name")
+ private String vpnName = null;
+
+ @JsonProperty("vpn-binding-id")
+ private String vpnBindingId = null;
+
+ @JsonProperty("route-target-role")
+ private String routeTargetRole = null;
+
+ @JsonProperty("aic-zone")
+ private String aicZone = null;
+
+ @JsonProperty("global-route-target")
+ private String globalRouteTarget = null;
+
+ public GenericResourceApiVpnbindingsVpnBindings vpnName(String vpnName) {
+ this.vpnName = vpnName;
+ return this;
+ }
+
+ /**
+ * Get vpnName
+ * @return vpnName
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getVpnName() {
+ return vpnName;
+ }
+
+ public void setVpnName(String vpnName) {
+ this.vpnName = vpnName;
+ }
+
+ public GenericResourceApiVpnbindingsVpnBindings vpnBindingId(String vpnBindingId) {
+ this.vpnBindingId = vpnBindingId;
+ return this;
+ }
+
+ /**
+ * Get vpnBindingId
+ * @return vpnBindingId
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getVpnBindingId() {
+ return vpnBindingId;
+ }
+
+ public void setVpnBindingId(String vpnBindingId) {
+ this.vpnBindingId = vpnBindingId;
+ }
+
+ public GenericResourceApiVpnbindingsVpnBindings routeTargetRole(String routeTargetRole) {
+ this.routeTargetRole = routeTargetRole;
+ return this;
+ }
+
+ /**
+ * Get routeTargetRole
+ * @return routeTargetRole
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getRouteTargetRole() {
+ return routeTargetRole;
+ }
+
+ public void setRouteTargetRole(String routeTargetRole) {
+ this.routeTargetRole = routeTargetRole;
+ }
+
+ public GenericResourceApiVpnbindingsVpnBindings aicZone(String aicZone) {
+ this.aicZone = aicZone;
+ return this;
+ }
+
+ /**
+ * AIC Zone the route target associated with
+ * @return aicZone
+ **/
+ @ApiModelProperty(value = "AIC Zone the route target associated with")
+
+
+ public String getAicZone() {
+ return aicZone;
+ }
+
+ public void setAicZone(String aicZone) {
+ this.aicZone = aicZone;
+ }
+
+ public GenericResourceApiVpnbindingsVpnBindings globalRouteTarget(String globalRouteTarget) {
+ this.globalRouteTarget = globalRouteTarget;
+ return this;
+ }
+
+ /**
+ * Get globalRouteTarget
+ * @return globalRouteTarget
+ **/
+ @ApiModelProperty(value = "")
+
+
+ public String getGlobalRouteTarget() {
+ return globalRouteTarget;
+ }
+
+ public void setGlobalRouteTarget(String globalRouteTarget) {
+ this.globalRouteTarget = globalRouteTarget;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericResourceApiVpnbindingsVpnBindings genericResourceApiVpnbindingsVpnBindings = (GenericResourceApiVpnbindingsVpnBindings) o;
+ return Objects.equals(this.vpnName, genericResourceApiVpnbindingsVpnBindings.vpnName) &&
+ Objects.equals(this.vpnBindingId, genericResourceApiVpnbindingsVpnBindings.vpnBindingId) &&
+ Objects.equals(this.routeTargetRole, genericResourceApiVpnbindingsVpnBindings.routeTargetRole) &&
+ Objects.equals(this.aicZone, genericResourceApiVpnbindingsVpnBindings.aicZone) &&
+ Objects.equals(this.globalRouteTarget, genericResourceApiVpnbindingsVpnBindings.globalRouteTarget);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(vpnName, vpnBindingId, routeTargetRole, aicZone, globalRouteTarget);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GenericResourceApiVpnbindingsVpnBindings {\n");
+
+ sb.append(" vpnName: ").append(toIndentedString(vpnName)).append("\n");
+ sb.append(" vpnBindingId: ").append(toIndentedString(vpnBindingId)).append("\n");
+ sb.append(" routeTargetRole: ").append(toIndentedString(routeTargetRole)).append("\n");
+ sb.append(" aicZone: ").append(toIndentedString(aicZone)).append("\n");
+ sb.append(" globalRouteTarget: ").append(toIndentedString(globalRouteTarget)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/ms/gra/gra-app/src/main/resources/application.properties b/ms/gra/gra-app/src/main/resources/application.properties
index 2be250b..b78d486 100644
--- a/ms/gra/gra-app/src/main/resources/application.properties
+++ b/ms/gra/gra-app/src/main/resources/application.properties
@@ -22,3 +22,6 @@ spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.Im
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.database=mysql
+swagger-ui.host=${SDNNFT_HOST:localhost}
+swagger-ui.title=SDN-NFT: GRA microservice
+swagger-ui.description=SDN-NFT GRA microservice API documentation
diff --git a/ms/gra/gra-app/src/main/resources/contrail-adaptor.properties b/ms/gra/gra-app/src/main/resources/contrail-adaptor.properties
new file mode 100644
index 0000000..c6d98f4
--- /dev/null
+++ b/ms/gra/gra-app/src/main/resources/contrail-adaptor.properties
@@ -0,0 +1,40 @@
+keystone.username=admin
+keystone.password=admin
+tenant.password=admin
+contrail.template.dir=/opt/lsc/restapi/templates
+max.retry.count=3
+retry.wait=5000
+request.timeout=10000
+
+simulateResponse=false
+keystone.dummy.cache=true
+orm.dummy.cache=true
+use.orm=true
+
+cloud.config.use=false
+cloud.config.filename=cloud_config.json
+cloud.config.refresh.timer=1000
+
+#orm.default_keystone_url_version=/v3
+orm.default_keystone_url_version=/v2.0
+orm.default_keystone_version_regex=/[vV][0-9]
+orm.default_orm_url_replace_this=8080
+orm.default_orm_url_replace_with_this=7080
+orm.aic.client=ECOMP-SDNCP
+contrail.url.regex=sdn-l-config
+
+#properties need to create json for policymanager configBody
+configBody.service:NetworkPolicy
+configBody.version:1.3.0.1
+configBody.configName:Search
+configBody.policyScope:SDNC
+configBody.templateVersion:1607
+configBody.location:Search
+configBody.uuid:Search
+configBody.priority:2
+configBody.riskType:low
+configBody.riskLevel:2
+configBody.guard:True
+
+aic.contrail.proxy=none
+aic.keystone.proxy=none
diff --git a/ms/gra/gra-app/src/main/resources/contrail-api-path.properties b/ms/gra/gra-app/src/main/resources/contrail-api-path.properties
new file mode 100644
index 0000000..4c04d0e
--- /dev/null
+++ b/ms/gra/gra-app/src/main/resources/contrail-api-path.properties
@@ -0,0 +1,59 @@
+network-policy.create.path=/network-policys
+network-policy.create.method=NetworkPolicy.createNetworkPolicy
+network-policy.create.hasTemplateFile=Y
+
+network-policy.get.path=/network-policy/{contrail-network-policy-id}
+network-policy.get.method=NetworkPolicy.getNetworkPolicy
+network-policy.get.hasTemplateFile=N
+
+network-policy.delete.path=/network-policy/{contrail-network-policy-id}
+network-policy.delete.method=NetworkPolicy.deleteNetworkPolicy
+network-policy.delete.hasTemplateFile=N
+
+network-policy.update.path=/network-policy/{contrail-network-policy-id}
+network-policy.update.method=NetworkPolicy.updateNetworkPolicy
+network-policy.update.hasTemplateFile=Y
+
+network-policy.apply.path=/virtual-network/{contrail-virtual-network-id}
+network-policy.apply.method=NetworkPolicy.applyNetworkPolicy
+network-policy.apply.hasTemplateFile=N
+
+network-policy.remove.path=/virtual-network/{contrail-virtual-network-id}
+network-policy.remove.method=NetworkPolicy.removeNetworkPolicy
+network-policy.remove.hasTemplateFile=N
+
+virtual-networks.get.path=/virtual-networks
+virtual-networks.get.method=NetworkPolicy.getVirtualNetworks
+virtual-networks.get.hasTemplateFile=N
+
+virtual-network.get.path=/virtual-network/{contrail-virtual-network-id}
+virtual-network.get.method=NetworkPolicy.getVirtualNetwork
+virtual-network.get.hasTemplateFile=N
+
+fqname-to-uuid.get.path=/fqname-to-id
+fqname-to-uuid.get.method=NetworkPolicy.getFqNameToUuid
+fqname-to-uuid.get.hasTemplateFile=Y
+
+id-to-fqname.get.path=/id-to-fqname
+id-to-fqname.get.method=NetworkPolicy.getIdToFqName
+id-to-fqname.get.hasTemplateFile=N
+
+virtual-machine-interface.get.path=/virtual-machine-interface/{contrail-virtual-machine-interface-id}
+virtual-machine-interface.get.method=PortMirroring.getVirtualMachineInterface
+virtual-machine-interface.get.hasTemplateFile=N
+
+port-mirroring.enable.path=/virtual-machine-interface/{contrail-virtual-machine-interface-id}
+port-mirroring.enable.method=PortMirroring.enablePortMirroring
+port-mirroring.enable.hasTemplateFile=Y
+
+port-mirroring.disable.path=/virtual-machine-interface/{contrail-virtual-machine-interface-id}
+port-mirroring.disable.method=PortMirroring.disablePortMirroring
+port-mirroring.disable.hasTemplateFile=Y
+
+subnet.add.path=/virtual-network/{contrail-virtual-network-id}
+subnet.add.method=NetworkPolicy.addSubnet
+subnet.add.hasTemplateFile=N
+
+subnet.delete.path=/virtual-network/{contrail-virtual-network-id}
+subnet.delete.method=NetworkPolicy.deleteSubnet
+subnet.delete.hasTemplateFile=N
diff --git a/ms/gra/gra-app/src/main/resources/db/changelog/db.changelog-master.yaml b/ms/gra/gra-app/src/main/resources/db/changelog/db.changelog-master.yaml
index 2b75ac8..c8fc398 100644
--- a/ms/gra/gra-app/src/main/resources/db/changelog/db.changelog-master.yaml
+++ b/ms/gra/gra-app/src/main/resources/db/changelog/db.changelog-master.yaml
@@ -517,3 +517,124 @@ databaseChangeLog:
- column:
name: vfModuleData
type: clob
+- changeSet:
+ id: 20210620-1
+ author: dtimoney@att.com
+ changes:
+ - modifyDataType:
+ - tableName: CONFIG_GRA_CONTRAIL_ROUTE_ALLOTTED_RESOURCES
+ - columnName: allottedResourceStatusResponseMessage
+ - newDataType: varchar(2000)
+ - modifyDataType:
+ - tableName: CONFIG_GRA_PORT_MIRROR_CONFIGURATIONS
+ - columnName: portMirrorConfigurationStatusResponseMessage
+ - newDataType: varchar(2000)
+ - modifyDataType:
+ - tableName: OPERATIONAL_GRA_CONTRAIL_ROUTE_ALLOTTED_RESOURCES
+ - columnName: allottedResourceStatusResponseMessage
+ - newDataType: varchar(2000)
+ - modifyDataType:
+ - tableName: OPERATIONAL_GRA_PORT_MIRROR_CONFIGURATIONS
+ - columnName: portMirrorConfigurationStatusResponseMessage
+ - newDataType: varchar(2000)
+ - modifyDataType:
+ - tableName: CONFIG_GRA_SERVICES
+ - columnName: serviceStatusResponseMessage
+ - newDataType: varchar(2000)
+ - modifyDataType:
+ - tableName: OPERATIONAL_GRA_SERVICES
+ - columnName: serviceStatusResponseMessage
+ - newDataType: varchar(2000)
+
+- changeSet:
+ id: 210806-1
+ author: dtimoney@att.com
+ preConditions:
+ - onFail: MARK_RAN
+ - tableExists:
+ tableName: PRE_LOAD_VNF_DATA
+ changes:
+ - modifyDataType:
+ - tableName: PRE_LOAD_VNF_DATA
+ - columnName: preload_data
+ - newDataType: clob
+ - modifyDataType:
+ - tableName: PRE_LOAD_VNF_DATA
+ - columnName: eipam_payload
+ - newDataType: clob
+ - modifyDataType:
+ - tableName: PRE_LOAD_VNF_DATA
+ - columnName: gr_api_data
+ - newDataType: clob
+- changeSet:
+ id: 210806-2
+ author: dtimoney@att.com
+ preConditions:
+ - onFail: MARK_RAN
+ - tableExists:
+ tableName: PRE_LOAD_VNF_NETWORK_DATA
+ changes:
+ - modifyDataType:
+ - tableName: PRE_LOAD_VNF_NETWORK_DATA
+ - columnName: preload_data
+ - newDataType: clob
+ - modifyDataType:
+ - tableName: PRE_LOAD_VNF_NETWORK_DATA
+ - columnName: eipam_payload
+ - newDataType: clob
+ - modifyDataType:
+ - tableName: PRE_LOAD_VNF_NETWORK_DATA
+ - columnName: gr_api_data
+ - newDataType: clob
+- changeSet:
+ id: 20210816-1
+ author: kc1472@att.com
+ preConditions:
+ - onFail: MARK_RAN
+ - not:
+ - tableExists:
+ tableName: KEYSTONE_IDENTITY_SERVICE
+ changes:
+ - createTable:
+ tableName: KEYSTONE_IDENTITY_SERVICE
+ columns:
+ - column:
+ name: cloudRegion
+ type: varchar(255)
+ constraints:
+ nullable: false
+ primaryKey: true
+ - column:
+ name: keystoneUrl
+ type: varchar(255)
+ constraints:
+ nullable: false
+ - column:
+ name: mechId
+ type: varchar(255)
+ constraints:
+ nullable: false
+ - column:
+ name: encryptedPassword
+ type: varchar(255)
+ constraints:
+ nullable: false
+ - column:
+ name: modifiedTimeStamp
+ type: timestamp
+ constraints:
+ nullable: false
+ defaultValueComputed: CURRENT_TIMESTAMP
+
+- changeSet:
+ id: 20211026-1
+ author: la505a@att.com
+ preConditions:
+ - onFail: MARK_RAN
+ - tableExists:
+ tableName: SERVICE_MODEL
+ changes:
+ - modifyDataType:
+ - tableName: SERVICE_MODEL
+ - columnName: filename
+ - newDataType: varchar(255)
diff --git a/ms/gra/gra-app/src/main/resources/eipam.properties b/ms/gra/gra-app/src/main/resources/eipam.properties
new file mode 100644
index 0000000..09f2b63
--- /dev/null
+++ b/ms/gra/gra-app/src/main/resources/eipam.properties
@@ -0,0 +1,63 @@
+eipam.templateDir=/opt/lsc/restapi/templates/
+
+#mS is new in 1810, URL is driven by DME2
+eipam.service=microservice-router.lpp.att.com/services/microservice_router/v1/routes
+
+#DME proxy does not work in containers(1908), workaround is to call alternate.url
+# 1906/1908 Can be Direct call or LGW to replace DME2
+#1906 Direct call
+#eipam.alternate.url=https://st3-lppajsc.oss.att.com:8666/services/microservice_router/v1/routes
+#1908 LGW to replace DME2
+#eipam.alternate.url=https://eipam1-ipaddress.dev.att.com
+#eipam.rest.urlEndPoint=/eipam/rest/ipassignment/
+eipam.alternate.url=https://eipam-ipaddress1.stage.att.com
+
+# subContext for Direct Call, if used the LGW subContext below need to be commented out
+#eipam.subContext.assign=/eipamIP/assign
+#eipam.subContext.unassign=/eipamIP/unassign
+#eipam.subContext.createPool=/eipamIP/createPool
+#eipam.subContext.deletePool=/eipamIP/deletePool
+#eipam.subContext.getPlanTopology=/eipamIP/topology
+#eipam.subContext.getIPAddress=/eipamIP/getIP
+#eipam.subContext.allocateSubnet=/eipamIP/allocate
+#eipam.subContext.deallocateSubnet=/eipamIP/deallocate
+#eipam.subContext.activateSubnet=/eipamIP/activateSubnet
+#eipam.subContext.ping=/eipamIP/ping
+#eipam.subContext.getPool=/eipamIP/getPool
+#eipam.subContext.examineIP=/eipamIP/examineIP
+
+eipam.httpMethod.assign=PUT
+eipam.httpMethod.unassign=POST
+eipam.httpMethod.createPool=PUT
+eipam.httpMethod.deletePool=POST
+eipam.httpMethod.getPlanTopology=GET
+eipam.httpMethod.getIPAddress=GET
+eipam.httpMethod.allocateSubnet=PUT
+eipam.httpMethod.deallocateSubnet=PUT
+eipam.httpMethod.activateSubnet=PUT
+eipam.httpMethod.ping=GET
+eipam.httpMethod.getPool=POST
+eipam.httpMethod.examineIP=POST
+
+# subContext for LGW, if used the above Direct Call subContext need to be commented out
+eipam.subContext.assign=/eipam/restservices/v1/ipaddress/assign
+eipam.subContext.unassign=/eipam/restservices/v1/ipaddress/unassign
+eipam.subContext.createPool=/eipam/restservices/v1/ipaddress/pool
+eipam.subContext.deletePool=/eipam/restservices/v1/ipaddress/pool/remove
+eipam.subContext.getPlanTopology=/eipam/restservices/v1/ipaddress/plantopology
+eipam.subContext.getIPAddress=/eipam/restservices/v1/ipaddress
+eipam.subContext.allocateSubnet=/eipam/restservices/v1/ipaddress/subnet/allocate
+eipam.subContext.deallocateSubnet=/eipam/restservices/v1/ipaddress/subnet/deallocate
+eipam.subContext.activateSubnet=/eipam/restservices/v1/ipaddress/subnet/activate
+eipam.subContext.ping=/eipam/restservices/v1/ipaddress/ping
+eipam.subContext.getPool=/eipam/restservices/v1/ipaddress/pool
+eipam.subContext.examineIP=/eipam/restservices/v1/ipaddress/examineIPAddressInfo
+
+eipam.connectionTimeout=30000
+eipam.receiveTimeout=60000
+#eipam.version=0.1
+#eipam.envContext=TEST
+#eipam.routeOffer=ST3
+eipam.client=sdn_cp_ws
+eipam.msgid=sdn
+eipam.wss.user=sdn_cp_ws
diff --git a/ms/gra/gra-app/src/main/resources/log4j2.properties b/ms/gra/gra-app/src/main/resources/log4j2.properties
index 9bc78a3..ca0199d 100644
--- a/ms/gra/gra-app/src/main/resources/log4j2.properties
+++ b/ms/gra/gra-app/src/main/resources/log4j2.properties
@@ -151,11 +151,12 @@ logger.audit.level = INFO
logger.audit.additivity = false
logger.audit.appenderRef.AuditFile.ref = AuditFile
-logger.rr.name = org.onap.logging.filter.base.PayloadLoggingServletFilter
+logger.rr.name = org.onap.ccsdk.apps.filters.PayloadLoggingFilter
logger.rr.level = INFO
logger.rr.additivity = false
logger.rr.appenderRef.RequestResponseFile.ref = RequestResponseFile
+
logger.ccsdk.name = org.onap.ccsdk
logger.ccsdk.level = DEBUG
diff --git a/ms/gra/gra-app/src/main/resources/msoadaptor.properties b/ms/gra/gra-app/src/main/resources/msoadaptor.properties
new file mode 100644
index 0000000..fb7fac9
--- /dev/null
+++ b/ms/gra/gra-app/src/main/resources/msoadaptor.properties
@@ -0,0 +1,5 @@
+adaptorName=com.att.sdnctl.sli.adaptor.mso.MSOAdaptor
+mso.user=dummy
+mso.passwd=dummy
+mso.restriction.uri=https://msoapih-s3.ecomp.cci.att.com:30275/restriction
+mso.sleep.timer=2000
diff --git a/ms/gra/gra-app/src/test/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiPreloadControllerTest.java b/ms/gra/gra-app/src/test/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiPreloadControllerTest.java
index 95226f7..8c311fb 100644
--- a/ms/gra/gra-app/src/test/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiPreloadControllerTest.java
+++ b/ms/gra/gra-app/src/test/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiPreloadControllerTest.java
@@ -131,7 +131,7 @@ public class ConfigApiPreloadControllerTest {
// Clean up data
configPreloadDataRepository.deleteAll();
- String content = readFileContent("src/test/resources/preload1-net-model-info.json");
+ String content = readFileContent("src/test/resources/preload1-net-list-item.json");
MvcResult mvcResult = mvc.perform(MockMvcRequestBuilders.post(CONFIG_PRELOAD_LIST_URL).contentType(MediaType.APPLICATION_JSON).content(content))
.andReturn();
@@ -220,17 +220,11 @@ public class ConfigApiPreloadControllerTest {
// Clean up data
configPreloadDataRepository.deleteAll();
- String badContent = readFileContent("src/test/resources/preload1-net-model-info.json");
String goodContent = readFileContent("src/test/resources/preload1-net-list-item.json");
- // Test with bad file content
- MvcResult mvcResult = mvc.perform(MockMvcRequestBuilders.put(CONFIG_PRELOAD_LIST_URL+"preload1/network/").contentType(MediaType.APPLICATION_JSON).content(badContent))
- .andReturn();
- assertEquals(400, mvcResult.getResponse().getStatus());
- assertEquals(0, configPreloadDataRepository.count());
// Test with no data
- mvcResult = mvc.perform(MockMvcRequestBuilders.put(CONFIG_PRELOAD_LIST_URL+"preload1/network/").contentType(MediaType.APPLICATION_JSON).content(goodContent))
+ MvcResult mvcResult = mvc.perform(MockMvcRequestBuilders.put(CONFIG_PRELOAD_LIST_URL+"preload1/network/").contentType(MediaType.APPLICATION_JSON).content(goodContent))
.andReturn();
assertEquals(201, mvcResult.getResponse().getStatus());
assertEquals(1, configPreloadDataRepository.count());
@@ -318,11 +312,6 @@ public class ConfigApiPreloadControllerTest {
preloadData.setPreloadData(null);
configPreloadDataRepository.save(preloadData);
- // Test with bad file content
- MvcResult mvcResult = mvc.perform(MockMvcRequestBuilders.post(CONFIG_PRELOAD_LIST_URL+"preload1/network/preload-data/").contentType(MediaType.APPLICATION_JSON).content(badContent))
- .andReturn();
- assertEquals(400, mvcResult.getResponse().getStatus());
- assertEquals(1, configPreloadDataRepository.count());
}
@@ -399,12 +388,6 @@ public class ConfigApiPreloadControllerTest {
preloadData.setPreloadData(null);
configPreloadDataRepository.save(preloadData);
- // Test with bad file content
- MvcResult mvcResult = mvc.perform(MockMvcRequestBuilders.put(CONFIG_PRELOAD_LIST_URL+"preload1/network/preload-data/").contentType(MediaType.APPLICATION_JSON).content(badContent))
- .andReturn();
- assertEquals(400, mvcResult.getResponse().getStatus());
- assertEquals(1, configPreloadDataRepository.count());
-
}
@Test
diff --git a/ms/gra/gra-app/src/test/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiServicesControllerTest.java b/ms/gra/gra-app/src/test/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiServicesControllerTest.java
index 603ff20..dd5a6a4 100644
--- a/ms/gra/gra-app/src/test/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiServicesControllerTest.java
+++ b/ms/gra/gra-app/src/test/java/org/onap/sdnc/apps/ms/gra/controllers/ConfigApiServicesControllerTest.java
@@ -182,7 +182,7 @@ public class ConfigApiServicesControllerTest {
// Clean up data
clearServicesData();
- String content = readFileContent("src/test/resources/service1.json");
+ String content = readFileContent("src/test/resources/service1-services.json");
// Test with no data
MvcResult mvcResult = mvc.perform(MockMvcRequestBuilders.post(CONFIG_SERVICES_URL).contentType(MediaType.APPLICATION_JSON).content(content))
@@ -206,7 +206,7 @@ public class ConfigApiServicesControllerTest {
// Clean up data
clearServicesData();
- String content = readFileContent("src/test/resources/service1.json");
+ String content = readFileContent("src/test/resources/service1-services.json");
// Test with no data
MvcResult mvcResult = mvc.perform(MockMvcRequestBuilders.put(CONFIG_SERVICES_URL).contentType(MediaType.APPLICATION_JSON).content(content))
@@ -643,12 +643,12 @@ public class ConfigApiServicesControllerTest {
clearServicesData();
assertEquals(0, configServicesRepository.count());
assertEquals(0, configVnfsRepository.count());
- MvcResult mvcResult = mvc.perform(MockMvcRequestBuilders.put("/config/GENERIC-RESOURCE-API:services/service/"+TEST_SVC_INSTANCE_ID+"/service-data/vnfs/vnf/"+TEST_VNF_ID+"/").contentType(MediaType.APPLICATION_JSON).content(readFileContent("src/test/resources/vnf-data.json")))
+ MvcResult mvcResult = mvc.perform(MockMvcRequestBuilders.put("/config/GENERIC-RESOURCE-API:services/service/"+TEST_SVC_INSTANCE_ID+"/service-data/vnfs/vnf/"+TEST_VNF_ID+"/").contentType(MediaType.APPLICATION_JSON).content(readFileContent("src/test/resources/vnf.json")))
.andReturn();
assertEquals(201, mvcResult.getResponse().getStatus());
assertEquals(1, configVnfsRepository.count());
- mvcResult = mvc.perform(MockMvcRequestBuilders.put("/config/GENERIC-RESOURCE-API:services/service/"+TEST_SVC_INSTANCE_ID+"/service-data/vnfs/vnf/"+TEST_VNF_ID+"/").contentType(MediaType.APPLICATION_JSON).content(readFileContent("src/test/resources/vnf-data.json")))
+ mvcResult = mvc.perform(MockMvcRequestBuilders.put("/config/GENERIC-RESOURCE-API:services/service/"+TEST_SVC_INSTANCE_ID+"/service-data/vnfs/vnf/"+TEST_VNF_ID+"/").contentType(MediaType.APPLICATION_JSON).content(readFileContent("src/test/resources/vnf.json")))
.andReturn();
assertEquals(204, mvcResult.getResponse().getStatus());
assertEquals(1, configVnfsRepository.count());
diff --git a/ms/gra/gra-app/src/test/resources/GR_API.http b/ms/gra/gra-app/src/test/resources/GR_API.http
index 5c5d827..1079d64 100644
--- a/ms/gra/gra-app/src/test/resources/GR_API.http
+++ b/ms/gra/gra-app/src/test/resources/GR_API.http
@@ -503,9 +503,9 @@ Accept: application/json
"global-customer-id": "{{$guid}}",
"onap-model-information": {
"model-customization-uuid": "12341234",
- "model-invariant-uuid": "12341234",
+ "model-invariant-uuid": "b468c6c0-b3c2-462b-8712-1a7b487bc564",
"model-name": "vBNG_0202",
- "model-uuid": "00e50cbd-ef0f-4b28-821e-f2b583752dd3",
+ "model-uuid": "fd3d2a5e-0837-4776-abc1-d2bd923000e0",
"model-version": "1920"
},
"service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
@@ -858,7 +858,8 @@ Accept: application/json
},
"sdnc-request-header" : {
"svc-request-id" : "svc-{{$guid}}",
- "svc-action" : "assign"
+ "svc-action" : "assign",
+ "svc-notification-url" : "http://dev.null"
},
"service-information" : {
"onap-model-information": {
@@ -1310,6 +1311,15 @@ Accept: application/json
{ input: {}}
+### vlbcheck
+POST {{hostname}}/restconf/operations/SLI-API:vlbcheck/
+Authorization: Basic {{token}}
+Content-Type: application/json
+Accept: application/json
+
+{ input: {}}
+
+
### get preload information (top)
GET {{hostname}}/restconf/config/GENERIC-RESOURCE-API:preload-information/
Authorization: Basic {{token}}
diff --git a/ms/gra/gra-app/src/test/resources/allotted-resource-item.json b/ms/gra/gra-app/src/test/resources/allotted-resource-item.json
index 5aa3371..57b3661 100644
--- a/ms/gra/gra-app/src/test/resources/allotted-resource-item.json
+++ b/ms/gra/gra-app/src/test/resources/allotted-resource-item.json
@@ -1,28 +1,30 @@
{
- "allotted-resource-id": "ar2",
- "allotted-resource-data": {
- "allotted-resource-oper-status": {
- "create-timestamp": "2020-11-24T12:41:01.796Z",
- "order-status": "Active"
- },
- "contrail-route-topology": {
- "contrail-route-assignments": {
- "contrail-id": "cr2",
- "dest-network": {
- "network-id": "19cdfce4-9124-4bbf-83bd-5140931bb519",
- "network-role": "pktmirror"
+ "contrail-route-allotted-resource": {
+ "allotted-resource-id": "ar2",
+ "allotted-resource-data": {
+ "allotted-resource-oper-status": {
+ "create-timestamp": "2020-11-24T12:41:01.796Z",
+ "order-status": "Active"
+ },
+ "contrail-route-topology": {
+ "contrail-route-assignments": {
+ "contrail-id": "cr2",
+ "dest-network": {
+ "network-id": "19cdfce4-9124-4bbf-83bd-5140931bb519",
+ "network-role": "pktmirror"
+ },
+ "fq-name": "default-domain.GRP-27529-T-IST-13C.GRP-27529-T-SIL-13C_gn_SCTPA_IP_net_12_dyh2b_GRP-27529-T-SIL-13C_gn_SCTPA_IP_pktmirror_policy_32",
+ "source-network": {
+ "network-id": "1610d17a-fb91-48ac-9d4c-43f739fdbe54",
+ "network-role": "GRP-27529-T-SIL-13C_gn_SCTPA_IP"
+ }
},
- "fq-name": "default-domain.GRP-27529-T-IST-13C.GRP-27529-T-SIL-13C_gn_SCTPA_IP_net_12_dyh2b_GRP-27529-T-SIL-13C_gn_SCTPA_IP_pktmirror_policy_32",
- "source-network": {
- "network-id": "1610d17a-fb91-48ac-9d4c-43f739fdbe54",
- "network-role": "GRP-27529-T-SIL-13C_gn_SCTPA_IP"
+ "allotted-resource-identifiers": {
+ "allotted-resource-id": "ar2",
+ "allotted-resource-type": "contrail-route",
+ "allotted-resource-name": "GRP-27529-T-SIL-13C_gn_SCTPA_IP_net_12_dyh2b_GRP-27529-T-SIL-13C_gn_SCTPA_IP_pktmirror_policy_32",
+ "parent-service-instance-id": "service1"
}
- },
- "allotted-resource-identifiers": {
- "allotted-resource-id": "ar2",
- "allotted-resource-type": "contrail-route",
- "allotted-resource-name": "GRP-27529-T-SIL-13C_gn_SCTPA_IP_net_12_dyh2b_GRP-27529-T-SIL-13C_gn_SCTPA_IP_pktmirror_policy_32",
- "parent-service-instance-id": "service1"
}
}
}
diff --git a/ms/gra/gra-app/src/test/resources/contrail-adaptor.properties b/ms/gra/gra-app/src/test/resources/contrail-adaptor.properties
new file mode 100644
index 0000000..b1b02e6
--- /dev/null
+++ b/ms/gra/gra-app/src/test/resources/contrail-adaptor.properties
@@ -0,0 +1,37 @@
+keystone.username=admin
+keystone.password=admin
+tenant.password=admin
+contrail.template.dir=/opt/lsc/restapi/templates
+max.retry.count=3
+retry.wait=5000
+request.timeout=10000
+
+simulateResponse=false
+keystone.dummy.cache=true
+orm.dummy.cache=true
+use.orm=true
+
+cloud.config.use=false
+cloud.config.filename=cloud_config.json
+cloud.config.refresh.timer=1000
+
+#orm.default_keystone_url_version=/v3
+orm.default_keystone_url_version=/v2.0
+orm.default_keystone_version_regex=/[vV][0-9]
+orm.default_orm_url_replace_this=8080
+orm.default_orm_url_replace_with_this=7080
+orm.aic.client=ECOMP-SDNCP
+contrail.url.regex=sdn-l-config
+
+#properties need to create json for policymanager configBody
+configBody.service:NetworkPolicy
+configBody.version:1.3.0.1
+configBody.configName:Search
+configBody.policyScope:SDNC
+configBody.templateVersion:1607
+configBody.location:Search
+configBody.uuid:Search
+configBody.priority:2
+configBody.riskType:low
+configBody.riskLevel:2
+configBody.guard:True
diff --git a/ms/gra/gra-app/src/test/resources/contrail-api-path.properties b/ms/gra/gra-app/src/test/resources/contrail-api-path.properties
new file mode 100644
index 0000000..4c04d0e
--- /dev/null
+++ b/ms/gra/gra-app/src/test/resources/contrail-api-path.properties
@@ -0,0 +1,59 @@
+network-policy.create.path=/network-policys
+network-policy.create.method=NetworkPolicy.createNetworkPolicy
+network-policy.create.hasTemplateFile=Y
+
+network-policy.get.path=/network-policy/{contrail-network-policy-id}
+network-policy.get.method=NetworkPolicy.getNetworkPolicy
+network-policy.get.hasTemplateFile=N
+
+network-policy.delete.path=/network-policy/{contrail-network-policy-id}
+network-policy.delete.method=NetworkPolicy.deleteNetworkPolicy
+network-policy.delete.hasTemplateFile=N
+
+network-policy.update.path=/network-policy/{contrail-network-policy-id}
+network-policy.update.method=NetworkPolicy.updateNetworkPolicy
+network-policy.update.hasTemplateFile=Y
+
+network-policy.apply.path=/virtual-network/{contrail-virtual-network-id}
+network-policy.apply.method=NetworkPolicy.applyNetworkPolicy
+network-policy.apply.hasTemplateFile=N
+
+network-policy.remove.path=/virtual-network/{contrail-virtual-network-id}
+network-policy.remove.method=NetworkPolicy.removeNetworkPolicy
+network-policy.remove.hasTemplateFile=N
+
+virtual-networks.get.path=/virtual-networks
+virtual-networks.get.method=NetworkPolicy.getVirtualNetworks
+virtual-networks.get.hasTemplateFile=N
+
+virtual-network.get.path=/virtual-network/{contrail-virtual-network-id}
+virtual-network.get.method=NetworkPolicy.getVirtualNetwork
+virtual-network.get.hasTemplateFile=N
+
+fqname-to-uuid.get.path=/fqname-to-id
+fqname-to-uuid.get.method=NetworkPolicy.getFqNameToUuid
+fqname-to-uuid.get.hasTemplateFile=Y
+
+id-to-fqname.get.path=/id-to-fqname
+id-to-fqname.get.method=NetworkPolicy.getIdToFqName
+id-to-fqname.get.hasTemplateFile=N
+
+virtual-machine-interface.get.path=/virtual-machine-interface/{contrail-virtual-machine-interface-id}
+virtual-machine-interface.get.method=PortMirroring.getVirtualMachineInterface
+virtual-machine-interface.get.hasTemplateFile=N
+
+port-mirroring.enable.path=/virtual-machine-interface/{contrail-virtual-machine-interface-id}
+port-mirroring.enable.method=PortMirroring.enablePortMirroring
+port-mirroring.enable.hasTemplateFile=Y
+
+port-mirroring.disable.path=/virtual-machine-interface/{contrail-virtual-machine-interface-id}
+port-mirroring.disable.method=PortMirroring.disablePortMirroring
+port-mirroring.disable.hasTemplateFile=Y
+
+subnet.add.path=/virtual-network/{contrail-virtual-network-id}
+subnet.add.method=NetworkPolicy.addSubnet
+subnet.add.hasTemplateFile=N
+
+subnet.delete.path=/virtual-network/{contrail-virtual-network-id}
+subnet.delete.method=NetworkPolicy.deleteSubnet
+subnet.delete.hasTemplateFile=N
diff --git a/ms/gra/gra-app/src/test/resources/db/changelog/db.changelog-master.yaml b/ms/gra/gra-app/src/test/resources/db/changelog/db.changelog-master.yaml
index ffb2eb3..8d2d0e6 100644
--- a/ms/gra/gra-app/src/test/resources/db/changelog/db.changelog-master.yaml
+++ b/ms/gra/gra-app/src/test/resources/db/changelog/db.changelog-master.yaml
@@ -55328,4 +55328,73 @@ databaseChangeLog:
name: vm_count
valueNumeric: 1
tableName: VF_MODULE_TO_VFC_MAPPING
+- changeSet:
+ id: 20210620-1
+ author: dtimoney@att.com
+ changes:
+ - modifyDataType:
+ - tableName: CONFIG_GRA_CONTRAIL_ROUTE_ALLOTTED_RESOURCES
+ - columnName: allottedResourceStatusResponseMessage
+ - newDataType: varchar(2000)
+ - modifyDataType:
+ - tableName: CONFIG_GRA_PORT_MIRROR_CONFIGURATIONS
+ - columnName: portMirrorConfigurationStatusResponseMessage
+ - newDataType: varchar(2000)
+ - modifyDataType:
+ - tableName: OPERATIONAL_GRA_CONTRAIL_ROUTE_ALLOTTED_RESOURCES
+ - columnName: allottedResourceStatusResponseMessage
+ - newDataType: varchar(2000)
+ - modifyDataType:
+ - tableName: OPERATIONAL_GRA_PORT_MIRROR_CONFIGURATIONS
+ - columnName: portMirrorConfigurationStatusResponseMessage
+ - newDataType: varchar(2000)
+ - modifyDataType:
+ - tableName: CONFIG_GRA_SERVICES
+ - columnName: serviceStatusResponseMessage
+ - newDataType: varchar(2000)
+ - modifyDataType:
+ - tableName: OPERATIONAL_GRA_SERVICES
+ - columnName: serviceStatusResponseMessage
+ - newDataType: varchar(2000)
+- changeSet:
+ id: 210806-1
+ author: dtimoney@att.com
+ preConditions:
+ - onFail: MARK_RAN
+ - tableExists:
+ tableName: PRE_LOAD_VNF_DATA
+ changes:
+ - modifyDataType:
+ - tableName: PRE_LOAD_VNF_DATA
+ - columnName: preload_data
+ - newDataType: clob
+ - modifyDataType:
+ - tableName: PRE_LOAD_VNF_DATA
+ - columnName: eipam_payload
+ - newDataType: clob
+ - modifyDataType:
+ - tableName: PRE_LOAD_VNF_DATA
+ - columnName: gr_api_data
+ - newDataType: clob
+- changeSet:
+ id: 210806-2
+ author: dtimoney@att.com
+ preConditions:
+ - onFail: MARK_RAN
+ - tableExists:
+ tableName: PRE_LOAD_VNF_NETWORK_DATA
+ changes:
+ - modifyDataType:
+ - tableName: PRE_LOAD_VNF_NETWORK_DATA
+ - columnName: preload_data
+ - newDataType: clob
+ - modifyDataType:
+ - tableName: PRE_LOAD_VNF_NETWORK_DATA
+ - columnName: eipam_payload
+ - newDataType: clob
+ - modifyDataType:
+ - tableName: PRE_LOAD_VNF_NETWORK_DATA
+ - columnName: gr_api_data
+ - newDataType: clob
+ \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/eipam.properties b/ms/gra/gra-app/src/test/resources/eipam.properties
new file mode 100644
index 0000000..09f2b63
--- /dev/null
+++ b/ms/gra/gra-app/src/test/resources/eipam.properties
@@ -0,0 +1,63 @@
+eipam.templateDir=/opt/lsc/restapi/templates/
+
+#mS is new in 1810, URL is driven by DME2
+eipam.service=microservice-router.lpp.att.com/services/microservice_router/v1/routes
+
+#DME proxy does not work in containers(1908), workaround is to call alternate.url
+# 1906/1908 Can be Direct call or LGW to replace DME2
+#1906 Direct call
+#eipam.alternate.url=https://st3-lppajsc.oss.att.com:8666/services/microservice_router/v1/routes
+#1908 LGW to replace DME2
+#eipam.alternate.url=https://eipam1-ipaddress.dev.att.com
+#eipam.rest.urlEndPoint=/eipam/rest/ipassignment/
+eipam.alternate.url=https://eipam-ipaddress1.stage.att.com
+
+# subContext for Direct Call, if used the LGW subContext below need to be commented out
+#eipam.subContext.assign=/eipamIP/assign
+#eipam.subContext.unassign=/eipamIP/unassign
+#eipam.subContext.createPool=/eipamIP/createPool
+#eipam.subContext.deletePool=/eipamIP/deletePool
+#eipam.subContext.getPlanTopology=/eipamIP/topology
+#eipam.subContext.getIPAddress=/eipamIP/getIP
+#eipam.subContext.allocateSubnet=/eipamIP/allocate
+#eipam.subContext.deallocateSubnet=/eipamIP/deallocate
+#eipam.subContext.activateSubnet=/eipamIP/activateSubnet
+#eipam.subContext.ping=/eipamIP/ping
+#eipam.subContext.getPool=/eipamIP/getPool
+#eipam.subContext.examineIP=/eipamIP/examineIP
+
+eipam.httpMethod.assign=PUT
+eipam.httpMethod.unassign=POST
+eipam.httpMethod.createPool=PUT
+eipam.httpMethod.deletePool=POST
+eipam.httpMethod.getPlanTopology=GET
+eipam.httpMethod.getIPAddress=GET
+eipam.httpMethod.allocateSubnet=PUT
+eipam.httpMethod.deallocateSubnet=PUT
+eipam.httpMethod.activateSubnet=PUT
+eipam.httpMethod.ping=GET
+eipam.httpMethod.getPool=POST
+eipam.httpMethod.examineIP=POST
+
+# subContext for LGW, if used the above Direct Call subContext need to be commented out
+eipam.subContext.assign=/eipam/restservices/v1/ipaddress/assign
+eipam.subContext.unassign=/eipam/restservices/v1/ipaddress/unassign
+eipam.subContext.createPool=/eipam/restservices/v1/ipaddress/pool
+eipam.subContext.deletePool=/eipam/restservices/v1/ipaddress/pool/remove
+eipam.subContext.getPlanTopology=/eipam/restservices/v1/ipaddress/plantopology
+eipam.subContext.getIPAddress=/eipam/restservices/v1/ipaddress
+eipam.subContext.allocateSubnet=/eipam/restservices/v1/ipaddress/subnet/allocate
+eipam.subContext.deallocateSubnet=/eipam/restservices/v1/ipaddress/subnet/deallocate
+eipam.subContext.activateSubnet=/eipam/restservices/v1/ipaddress/subnet/activate
+eipam.subContext.ping=/eipam/restservices/v1/ipaddress/ping
+eipam.subContext.getPool=/eipam/restservices/v1/ipaddress/pool
+eipam.subContext.examineIP=/eipam/restservices/v1/ipaddress/examineIPAddressInfo
+
+eipam.connectionTimeout=30000
+eipam.receiveTimeout=60000
+#eipam.version=0.1
+#eipam.envContext=TEST
+#eipam.routeOffer=ST3
+eipam.client=sdn_cp_ws
+eipam.msgid=sdn
+eipam.wss.user=sdn_cp_ws
diff --git a/ms/gra/gra-app/src/test/resources/msoadaptor.properties b/ms/gra/gra-app/src/test/resources/msoadaptor.properties
new file mode 100644
index 0000000..fb7fac9
--- /dev/null
+++ b/ms/gra/gra-app/src/test/resources/msoadaptor.properties
@@ -0,0 +1,5 @@
+adaptorName=com.att.sdnctl.sli.adaptor.mso.MSOAdaptor
+mso.user=dummy
+mso.passwd=dummy
+mso.restriction.uri=https://msoapih-s3.ecomp.cci.att.com:30275/restriction
+mso.sleep.timer=2000
diff --git a/ms/gra/gra-app/src/test/resources/port-mirror-configuration-item.json b/ms/gra/gra-app/src/test/resources/port-mirror-configuration-item.json
index 780d079..8dcc69c 100644
--- a/ms/gra/gra-app/src/test/resources/port-mirror-configuration-item.json
+++ b/ms/gra/gra-app/src/test/resources/port-mirror-configuration-item.json
@@ -1,116 +1,118 @@
{
- "configuration-data": {
- "configuration-oper-status": {
- "last-action": "CreatePortMirrorConfigurationInstance",
- "last-rpc-action": "activate",
- "order-status": "Active"
- },
- "configuration-operation-information": {
- "configuration-information": {
- "configuration-id": "pm-config-2",
- "configuration-sub-type": "vprobe",
- "configuration-type": "PORT-MIRROR",
- "onap-model-information": {
- "model-customization-uuid": "770c991a-47fb-4225-8d72-4790847f8307",
- "model-invariant-uuid": "a81abec0-222e-4fb2-b1c6-c4162359b2b3",
- "model-name": "Port Mirroring Configuration",
- "model-uuid": "18af239e-5397-4224-816f-d2850f3fab38",
- "model-version": "23.0"
- }
+ "port-mirror-configuration": {
+ "configuration-data": {
+ "configuration-oper-status": {
+ "last-action": "CreatePortMirrorConfigurationInstance",
+ "last-rpc-action": "activate",
+ "order-status": "Active"
},
- "port-mirror-configuration-request-input": {
- "dest-port": {
- "vnf-information": {
- "vnf-id": "039c2d5d-4efb-4145-9890-a6b5373cdfa5"
+ "configuration-operation-information": {
+ "configuration-information": {
+ "configuration-id": "pm-config-2",
+ "configuration-sub-type": "vprobe",
+ "configuration-type": "PORT-MIRROR",
+ "onap-model-information": {
+ "model-customization-uuid": "770c991a-47fb-4225-8d72-4790847f8307",
+ "model-invariant-uuid": "a81abec0-222e-4fb2-b1c6-c4162359b2b3",
+ "model-name": "Port Mirroring Configuration",
+ "model-uuid": "18af239e-5397-4224-816f-d2850f3fab38",
+ "model-version": "23.0"
}
},
- "source-port": {
- "vnf-information": {
- "vnf-id": "c5c92f5d-ed4d-4fb5-9ee1-b3eb562b1c6d"
+ "port-mirror-configuration-request-input": {
+ "dest-port": {
+ "vnf-information": {
+ "vnf-id": "039c2d5d-4efb-4145-9890-a6b5373cdfa5"
+ }
+ },
+ "source-port": {
+ "vnf-information": {
+ "vnf-id": "c5c92f5d-ed4d-4fb5-9ee1-b3eb562b1c6d"
+ }
}
+ },
+ "request-information": {
+ "request-action": "CreatePortMirrorConfigurationInstance",
+ "request-id": "61fe8925-fb53-4968-b9de-74be4acd06cc",
+ "source": "MSO"
+ },
+ "sdnc-request-header": {
+ "svc-action": "activate",
+ "svc-notification-url": "https://mso-sdnc-s3.ecomp.idns.aic.cip.att.com:30254/adapters/rest/SDNCNotify",
+ "svc-request-id": "ba937e51-6baf-486c-9851-3c6a646c9256"
+ },
+ "service-information": {
+ "global-customer-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "service-instance-id": "156abc88-35d1-475a-85a1-e0e0a226cbd5",
+ "subscription-service-type": "Mobility"
}
},
- "request-information": {
- "request-action": "CreatePortMirrorConfigurationInstance",
- "request-id": "61fe8925-fb53-4968-b9de-74be4acd06cc",
- "source": "MSO"
- },
- "sdnc-request-header": {
- "svc-action": "activate",
- "svc-notification-url": "https://mso-sdnc-s3.ecomp.idns.aic.cip.att.com:30254/adapters/rest/SDNCNotify",
- "svc-request-id": "ba937e51-6baf-486c-9851-3c6a646c9256"
- },
- "service-information": {
- "global-customer-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "service-instance-id": "156abc88-35d1-475a-85a1-e0e0a226cbd5",
- "subscription-service-type": "Mobility"
- }
- },
- "port-mirror-configuration-topology": {
- "configuration-identifiers": {
- "configuration-id": "pm-config-2",
- "configuration-name": "vMME02_VLC_Port_Mirroring_DYH2B_SCTPA",
- "configuration-sub-type": "vprobe",
- "configuration-type": "PORT-MIRROR",
- "parent-service-instance-id": "156abc88-35d1-475a-85a1-e0e0a226cbd5"
- },
- "port-mirror-configuration-assignments": {
- "cloud-owner": "att-aic",
- "cloud-region-id": "dyh2b",
- "dest-network-fqdn": "default-domain:GRP-27529-T-SIL-13B:GRP-27529-T-SIL-13B_vprobe_int_pkmirror1",
- "dest-vnf-id": "039c2d5d-4efb-4145-9890-a6b5373cdfa5",
- "dest-vnfc-instance-group-id": {
+ "port-mirror-configuration-topology": {
+ "configuration-identifiers": {
"configuration-id": "pm-config-2",
- "instance-group-role": "pktmirror",
- "service-instance-id": "156abc88-35d1-475a-85a1-e0e0a226cbd5"
+ "configuration-name": "vMME02_VLC_Port_Mirroring_DYH2B_SCTPA",
+ "configuration-sub-type": "vprobe",
+ "configuration-type": "PORT-MIRROR",
+ "parent-service-instance-id": "156abc88-35d1-475a-85a1-e0e0a226cbd5"
},
- "owning-entity": "10c645f5-9924-4b89-bec0-b17cf49d3cad",
- "probe-type": "vprobe",
- "route-allotted-resource-id": "286d41ea-d644-46b2-98fc-643ea1b591d1",
- "source-capacity": 100000,
- "source-network-fqdn": "default-domain:GRP-27529-T-IST-13C:GRP-27529-T-SIL-13C_gn_SCTPA_IP_net_12",
- "source-to-dest-maps": {
- "source-to-dest-map": [
- {
- "dest-ip-addresses": {
- "ip-addresses": {
- "ipv4-address": "107.114.102.4"
- }
+ "port-mirror-configuration-assignments": {
+ "cloud-owner": "att-aic",
+ "cloud-region-id": "dyh2b",
+ "dest-network-fqdn": "default-domain:GRP-27529-T-SIL-13B:GRP-27529-T-SIL-13B_vprobe_int_pkmirror1",
+ "dest-vnf-id": "039c2d5d-4efb-4145-9890-a6b5373cdfa5",
+ "dest-vnfc-instance-group-id": {
+ "configuration-id": "pm-config-2",
+ "instance-group-role": "pktmirror",
+ "service-instance-id": "156abc88-35d1-475a-85a1-e0e0a226cbd5"
+ },
+ "owning-entity": "10c645f5-9924-4b89-bec0-b17cf49d3cad",
+ "probe-type": "vprobe",
+ "route-allotted-resource-id": "286d41ea-d644-46b2-98fc-643ea1b591d1",
+ "source-capacity": 100000,
+ "source-network-fqdn": "default-domain:GRP-27529-T-IST-13C:GRP-27529-T-SIL-13C_gn_SCTPA_IP_net_12",
+ "source-to-dest-maps": {
+ "source-to-dest-map": [
+ {
+ "dest-ip-addresses": {
+ "ip-addresses": {
+ "ipv4-address": "107.114.102.4"
+ }
+ },
+ "dest-port-id": "b91beeda-fae3-4a99-9354-06c965db83f7",
+ "dest-port-name": "zdyh2bprbvlba_module04-vlbagent_eph_aff_0_int_pktmirror_port_0-m5ylyrybbmmb",
+ "dest-vserver-id": "9e2fc5ea-a88f-4955-bda8-10e75c173a8e",
+ "source-port-id": "7b6ee74c-cc2c-4290-95f2-2d89a3c4da74",
+ "source-port-name": "default-virtual-machine-interface-7b6ee74c-cc2c-4290-95f2-2d89a3c4da74",
+ "source-vserver-id": "2e3a8bb2-75ff-4e97-a888-961bfc624caa"
},
- "dest-port-id": "b91beeda-fae3-4a99-9354-06c965db83f7",
- "dest-port-name": "zdyh2bprbvlba_module04-vlbagent_eph_aff_0_int_pktmirror_port_0-m5ylyrybbmmb",
- "dest-vserver-id": "9e2fc5ea-a88f-4955-bda8-10e75c173a8e",
- "source-port-id": "7b6ee74c-cc2c-4290-95f2-2d89a3c4da74",
- "source-port-name": "default-virtual-machine-interface-7b6ee74c-cc2c-4290-95f2-2d89a3c4da74",
- "source-vserver-id": "2e3a8bb2-75ff-4e97-a888-961bfc624caa"
- },
- {
- "dest-ip-addresses": {
- "ip-addresses": {
- "ipv4-address": "107.114.102.3"
- }
- },
- "dest-port-id": "7cf3fda3-3153-4655-ae47-36fcf4439073",
- "dest-port-name": "zdyh2bprbvlba_base_5-vlbagentbase_eph_aff_0_int_pktmirror_port_0-vkvey3eyoqk2",
- "dest-vserver-id": "165db140-c09f-411a-bfdc-b8e6c7dbbda4",
- "source-port-id": "0fd4c63c-6fda-4564-af10-d3be157279ef",
- "source-port-name": "default-virtual-machine-interface-0fd4c63c-6fda-4564-af10-d3be157279ef",
- "source-vserver-id": "b5bf2e1f-9f90-445c-be00-2c882e82d1d7"
- }
- ]
- },
- "source-vnf-id": "c5c92f5d-ed4d-4fb5-9ee1-b3eb562b1c6d",
- "source-vnfc-instance-group-id": {
- "configuration-id": "pm-config-2",
- "instance-group-role": "GRP-27529-T-SIL-13C_gn_SCTPA_IP",
- "service-instance-id": "156abc88-35d1-475a-85a1-e0e0a226cbd5"
- },
- "tenant": "GRP-27529-T-IST-13C",
- "tenant-context": "Test",
- "tenant-id": "077445458306425499337c98bafc8c47",
- "vnics-group-id": "97"
+ {
+ "dest-ip-addresses": {
+ "ip-addresses": {
+ "ipv4-address": "107.114.102.3"
+ }
+ },
+ "dest-port-id": "7cf3fda3-3153-4655-ae47-36fcf4439073",
+ "dest-port-name": "zdyh2bprbvlba_base_5-vlbagentbase_eph_aff_0_int_pktmirror_port_0-vkvey3eyoqk2",
+ "dest-vserver-id": "165db140-c09f-411a-bfdc-b8e6c7dbbda4",
+ "source-port-id": "0fd4c63c-6fda-4564-af10-d3be157279ef",
+ "source-port-name": "default-virtual-machine-interface-0fd4c63c-6fda-4564-af10-d3be157279ef",
+ "source-vserver-id": "b5bf2e1f-9f90-445c-be00-2c882e82d1d7"
+ }
+ ]
+ },
+ "source-vnf-id": "c5c92f5d-ed4d-4fb5-9ee1-b3eb562b1c6d",
+ "source-vnfc-instance-group-id": {
+ "configuration-id": "pm-config-2",
+ "instance-group-role": "GRP-27529-T-SIL-13C_gn_SCTPA_IP",
+ "service-instance-id": "156abc88-35d1-475a-85a1-e0e0a226cbd5"
+ },
+ "tenant": "GRP-27529-T-IST-13C",
+ "tenant-context": "Test",
+ "tenant-id": "077445458306425499337c98bafc8c47",
+ "vnics-group-id": "97"
+ }
}
- }
- },
- "configuration-id": "pm-config-2"
+ },
+ "configuration-id": "pm-config-2"
+ }
} \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/preload1-net-list-item.json b/ms/gra/gra-app/src/test/resources/preload1-net-list-item.json
index 4a91388..29c6da0 100644
--- a/ms/gra/gra-app/src/test/resources/preload1-net-list-item.json
+++ b/ms/gra/gra-app/src/test/resources/preload1-net-list-item.json
@@ -1,81 +1,82 @@
{
- "preload-id": "preload1",
- "preload-type": "network",
- "preload-data": {
- "preload-network-topology-information": {
- "host-routes": [
- {
- "next-hop": "10.1.12.1",
- "route-prefix": "12"
- }
- ],
- "is-external-network": false,
- "is-provider-network": false,
- "is-shared-network": false,
- "network-policy": [
- {
- "network-policy-fqdn": "policy-sdnc.onap.org",
- "network-policy-id": "123"
- }
- ],
- "network-topology-identifier-structure": {
- "eipam-v4-address-plan": "plan9",
- "eipam-v6-address-plan": "plan9v6",
- "is-trunked": true,
- "network-id": "preload1",
- "network-instance-group-id": "abc123",
- "network-name": "syfy",
- "network-role": "secret",
- "network-technology": "soupcan",
- "network-type": "fake",
- "related-networks": {
- "related-network": [
- {
- "network-id": "skynet",
- "network-role": "master",
- "vlan-tags": {
- "is-private": true,
- "lower-tag-id": 0,
- "upper-tag-id": 0,
- "vlan-interface": "le0"
+ "preload-list": {
+ "preload-id": "preload1",
+ "preload-type": "network",
+ "preload-data": {
+ "preload-network-topology-information": {
+ "host-routes": [
+ {
+ "next-hop": "10.1.12.1",
+ "route-prefix": "12"
+ }
+ ],
+ "is-external-network": false,
+ "is-provider-network": false,
+ "is-shared-network": false,
+ "network-policy": [
+ {
+ "network-policy-fqdn": "policy-sdnc.onap.org",
+ "network-policy-id": "123"
+ }
+ ],
+ "network-topology-identifier-structure": {
+ "eipam-v4-address-plan": "plan9",
+ "eipam-v6-address-plan": "plan9v6",
+ "is-trunked": true,
+ "network-id": "preload1",
+ "network-instance-group-id": "abc123",
+ "network-name": "syfy",
+ "network-role": "secret",
+ "network-technology": "soupcan",
+ "network-type": "fake",
+ "related-networks": {
+ "related-network": [
+ {
+ "network-id": "skynet",
+ "network-role": "master",
+ "vlan-tags": {
+ "is-private": true,
+ "lower-tag-id": 0,
+ "upper-tag-id": 0,
+ "vlan-interface": "le0"
+ }
}
- }
- ]
+ ]
+ },
+ "segmentation-id": "seg1"
},
- "segmentation-id": "seg1"
- },
- "physical-network-name": "skynet",
- "route-table-reference": [
- {
- "route-table-reference-fqdn": "sky.net",
- "route-table-reference-id": "ref1"
- }
- ],
- "subnets": [
- {
- "addr-from-start": "Y",
- "cidr-mask": "255.255.0.0",
- "dhcp-enabled": "Y",
- "dhcp-end-address": "10.1.2.254",
- "dhcp-start-address": "10.1.2.1",
- "gateway-address": "10.1.2.255",
- "ip-version": "ipv4",
- "start-address": "10.1.2.1",
- "subnet-name": "subnet1",
- "subnet-role": "puppies",
- "subnet-sequence": 0
- }
- ],
- "vpn-bindings": [
- {
- "aic-zone": "zone1",
- "global-route-target": "string",
- "route-target-role": "string",
- "vpn-binding-id": "string",
- "vpn-name": "string"
- }
- ]
+ "physical-network-name": "skynet",
+ "route-table-reference": [
+ {
+ "route-table-reference-fqdn": "sky.net",
+ "route-table-reference-id": "ref1"
+ }
+ ],
+ "subnets": [
+ {
+ "addr-from-start": "Y",
+ "cidr-mask": "255.255.0.0",
+ "dhcp-enabled": "Y",
+ "dhcp-end-address": "10.1.2.254",
+ "dhcp-start-address": "10.1.2.1",
+ "gateway-address": "10.1.2.255",
+ "ip-version": "ipv4",
+ "start-address": "10.1.2.1",
+ "subnet-name": "subnet1",
+ "subnet-role": "puppies",
+ "subnet-sequence": 0
+ }
+ ],
+ "vpn-bindings": [
+ {
+ "aic-zone": "zone1",
+ "global-route-target": "string",
+ "route-target-role": "string",
+ "vpn-binding-id": "string",
+ "vpn-name": "string"
+ }
+ ]
+ }
}
}
-}
-
+} \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/preload1-net-model-info.json b/ms/gra/gra-app/src/test/resources/preload1-net-model-info.json
index 586915a..80dbc1c 100644
--- a/ms/gra/gra-app/src/test/resources/preload1-net-model-info.json
+++ b/ms/gra/gra-app/src/test/resources/preload1-net-model-info.json
@@ -1,84 +1,86 @@
{
- "preload-list": [
- {
- "preload-id": "preload1",
- "preload-type": "network",
- "preload-data": {
- "preload-network-topology-information": {
- "host-routes": [
- {
- "next-hop": "10.1.12.1",
- "route-prefix": "12"
- }
- ],
- "is-external-network": true,
- "is-provider-network": true,
- "is-shared-network": true,
- "network-policy": [
- {
- "network-policy-fqdn": "policy-sdnc.onap.org",
- "network-policy-id": "123"
- }
- ],
- "network-topology-identifier-structure": {
- "eipam-v4-address-plan": "plan9",
- "eipam-v6-address-plan": "plan9v6",
- "is-trunked": true,
- "network-id": "preload1",
- "network-instance-group-id": "abc123",
- "network-name": "syfy",
- "network-role": "secret",
- "network-technology": "soupcan",
- "network-type": "fake",
- "related-networks": {
- "related-network": [
- {
- "network-id": "skynet",
- "network-role": "master",
- "vlan-tags": {
- "is-private": true,
- "lower-tag-id": 0,
- "upper-tag-id": 0,
- "vlan-interface": "le0"
+ "preload-information": {
+ "preload-list": [
+ {
+ "preload-id": "preload1",
+ "preload-type": "network",
+ "preload-data": {
+ "preload-network-topology-information": {
+ "host-routes": [
+ {
+ "next-hop": "10.1.12.1",
+ "route-prefix": "12"
+ }
+ ],
+ "is-external-network": true,
+ "is-provider-network": true,
+ "is-shared-network": true,
+ "network-policy": [
+ {
+ "network-policy-fqdn": "policy-sdnc.onap.org",
+ "network-policy-id": "123"
+ }
+ ],
+ "network-topology-identifier-structure": {
+ "eipam-v4-address-plan": "plan9",
+ "eipam-v6-address-plan": "plan9v6",
+ "is-trunked": true,
+ "network-id": "preload1",
+ "network-instance-group-id": "abc123",
+ "network-name": "syfy",
+ "network-role": "secret",
+ "network-technology": "soupcan",
+ "network-type": "fake",
+ "related-networks": {
+ "related-network": [
+ {
+ "network-id": "skynet",
+ "network-role": "master",
+ "vlan-tags": {
+ "is-private": true,
+ "lower-tag-id": 0,
+ "upper-tag-id": 0,
+ "vlan-interface": "le0"
+ }
}
- }
- ]
+ ]
+ },
+ "segmentation-id": "seg1"
},
- "segmentation-id": "seg1"
- },
- "physical-network-name": "skynet",
- "route-table-reference": [
- {
- "route-table-reference-fqdn": "sky.net",
- "route-table-reference-id": "ref1"
- }
- ],
- "subnets": [
- {
- "addr-from-start": "Y",
- "cidr-mask": "255.255.0.0",
- "dhcp-enabled": "Y",
- "dhcp-end-address": "10.1.2.254",
- "dhcp-start-address": "10.1.2.1",
- "gateway-address": "10.1.2.255",
- "ip-version": "ipv4",
- "start-address": "10.1.2.1",
- "subnet-name": "subnet1",
- "subnet-role": "puppies",
- "subnet-sequence": 0
- }
- ],
- "vpn-bindings": [
- {
- "aic-zone": "zone1",
- "global-route-target": "string",
- "route-target-role": "string",
- "vpn-binding-id": "string",
- "vpn-name": "string"
- }
- ]
+ "physical-network-name": "skynet",
+ "route-table-reference": [
+ {
+ "route-table-reference-fqdn": "sky.net",
+ "route-table-reference-id": "ref1"
+ }
+ ],
+ "subnets": [
+ {
+ "addr-from-start": "Y",
+ "cidr-mask": "255.255.0.0",
+ "dhcp-enabled": "Y",
+ "dhcp-end-address": "10.1.2.254",
+ "dhcp-start-address": "10.1.2.1",
+ "gateway-address": "10.1.2.255",
+ "ip-version": "ipv4",
+ "start-address": "10.1.2.1",
+ "subnet-name": "subnet1",
+ "subnet-role": "puppies",
+ "subnet-sequence": 0
+ }
+ ],
+ "vpn-bindings": [
+ {
+ "aic-zone": "zone1",
+ "global-route-target": "string",
+ "route-target-role": "string",
+ "vpn-binding-id": "string",
+ "vpn-name": "string"
+ }
+ ]
+ }
}
}
- }
- ]
-}
+ ]
+ }
+} \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/preload1-net-preload-data.json b/ms/gra/gra-app/src/test/resources/preload1-net-preload-data.json
index 74da3de..ed9f326 100644
--- a/ms/gra/gra-app/src/test/resources/preload1-net-preload-data.json
+++ b/ms/gra/gra-app/src/test/resources/preload1-net-preload-data.json
@@ -1,5 +1,5 @@
{
-
+ "preload-data": {
"preload-network-topology-information": {
"host-routes": [
{
@@ -74,5 +74,5 @@
}
]
}
-}
-
+ }
+} \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/service1-service.json b/ms/gra/gra-app/src/test/resources/service1-service.json
index abf7da2..3f289cf 100644
--- a/ms/gra/gra-app/src/test/resources/service1-service.json
+++ b/ms/gra/gra-app/src/test/resources/service1-service.json
@@ -1,69 +1,67 @@
{
- "service": [
- {
- "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "service-data": {
- "request-information": {
- "notification-url": "http://dev.null",
- "request-id": "req123",
- "order-number": "123",
- "request-action": "CreateServiceInstance",
- "order-version": "version1",
- "source": "curl"
- },
- "service-request-input": {
- "service-instance-name": "zrdm61asmsf01_svc"
+ "service": [{
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "service-data": {
+ "request-information": {
+ "notification-url": "http://dev.null",
+ "request-id": "req123",
+ "order-number": "123",
+ "request-action": "CreateServiceInstance",
+ "order-version": "version1",
+ "source": "curl"
+ },
+ "service-request-input": {
+ "service-instance-name": "zrdm61asmsf01_svc"
+ },
+ "service-information": {
+ "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "onap-model-information": {
+ "model-invariant-uuid": "12341234",
+ "model-name": "vBNG_0202",
+ "model-version": "1920",
+ "model-customization-uuid": "12341234",
+ "model-uuid": "00e50cbd-ef0f-4b28-821e-f2b583752dd3"
},
- "service-information": {
- "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "onap-model-information": {
- "model-invariant-uuid": "12341234",
- "model-name": "vBNG_0202",
- "model-version": "1920",
- "model-customization-uuid": "12341234",
- "model-uuid": "00e50cbd-ef0f-4b28-821e-f2b583752dd3"
- },
- "global-customer-id": "cust123",
- "subscription-service-type": "test",
+ "global-customer-id": "cust123",
+ "subscription-service-type": "test",
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "subscriber-name": "test"
+ },
+ "service-topology": {
+ "service-topology-identifier": {
"service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "subscriber-name": "test"
+ "service-instance-name": "zrdm61asmsf01_svc",
+ "service-type": "test",
+ "global-customer-id": "cust123"
},
- "service-topology": {
- "service-topology-identifier": {
- "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "service-instance-name": "zrdm61asmsf01_svc",
- "service-type": "test",
- "global-customer-id": "cust123"
- },
- "onap-model-information": {
- "model-invariant-uuid": "12341234",
- "model-name": "vBNG_0202",
- "model-version": "1920",
- "model-customization-uuid": "12341234",
- "model-uuid": "00e50cbd-ef0f-4b28-821e-f2b583752dd3"
- }
- },
- "service-level-oper-status": {
- "order-status": "Created",
- "last-rpc-action": "assign",
- "last-action": "CreateServiceInstance"
- },
- "sdnc-request-header": {
- "svc-action": "assign",
- "svc-notification-url": "http://dev.null",
- "svc-request-id": "svcreq123"
+ "onap-model-information": {
+ "model-invariant-uuid": "12341234",
+ "model-name": "vBNG_0202",
+ "model-version": "1920",
+ "model-customization-uuid": "12341234",
+ "model-uuid": "00e50cbd-ef0f-4b28-821e-f2b583752dd3"
}
},
- "service-status": {
- "final-indicator": "Y",
- "rpc-action": "assign",
- "rpc-name": "service-topology-operation",
- "response-code": "200",
- "response-timestamp": "2020-08-17T12:29:24.031Z",
- "response-message": "",
- "action": "CreateServiceInstance",
- "request-status": "synccomplete"
+ "service-level-oper-status": {
+ "order-status": "Created",
+ "last-rpc-action": "assign",
+ "last-action": "CreateServiceInstance"
+ },
+ "sdnc-request-header": {
+ "svc-action": "assign",
+ "svc-notification-url": "http://dev.null",
+ "svc-request-id": "svcreq123"
}
+ },
+ "service-status": {
+ "final-indicator": "Y",
+ "rpc-action": "assign",
+ "rpc-name": "service-topology-operation",
+ "response-code": "200",
+ "response-timestamp": "2020-08-17T12:29:24.031Z",
+ "response-message": "",
+ "action": "CreateServiceInstance",
+ "request-status": "synccomplete"
}
- ]
-}
+ }]
+} \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/service1-servicedata.json b/ms/gra/gra-app/src/test/resources/service1-servicedata.json
index 8521b76..cd97888 100644
--- a/ms/gra/gra-app/src/test/resources/service1-servicedata.json
+++ b/ms/gra/gra-app/src/test/resources/service1-servicedata.json
@@ -1,221 +1,220 @@
{
- "request-information": {
- "request-id": "f5554477-51c7-4f8e-9183-f8968f3f86bf",
- "request-action": "CreateServiceInstance",
- "source": "MSO"
- },
- "service-request-input": {
- "service-instance-name": "zrdm61asmsf01_svc"
- },
- "service-information": {
- "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "onap-model-information": {
- "model-name": "service-nginx-ingress-1",
- "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
- "model-version": "1.0",
- "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ "service-data": {
+ "request-information": {
+ "request-id": "f5554477-51c7-4f8e-9183-f8968f3f86bf",
+ "request-action": "CreateServiceInstance",
+ "source": "MSO"
},
- "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "global-customer-id": "cust123",
- "subscription-service-type": "test"
- },
- "service-topology": {
- "service-topology-identifier": {
+ "service-request-input": {
+ "service-instance-name": "zrdm61asmsf01_svc"
+ },
+ "service-information": {
+ "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "onap-model-information": {
+ "model-name": "service-nginx-ingress-1",
+ "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
+ "model-version": "1.0",
+ "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ },
"service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "service-instance-name": "zrdm61asmsf01_svc",
- "service-type": "service-nginx-ingress-1",
- "global-customer-id": "Demonstration"
+ "global-customer-id": "cust123",
+ "subscription-service-type": "test"
},
- "onap-model-information": {
- "model-name": "service-nginx-ingress-1",
- "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
- "model-version": "1.0",
- "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
- }
- },
- "service-level-oper-status": {
- "order-status": "Created",
- "last-rpc-action": "assign",
- "last-action": "CreateServiceInstance"
- },
- "sdnc-request-header": {
- "svc-action": "assign",
- "svc-request-id": "6d06a832-69da-4369-9d99-049767a39400"
- },
- "vnfs": {
- "vnf": [
- {
- "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
- "vnf-data": {
- "vnf-level-oper-status": {
- "order-status": "Created",
- "last-rpc-action": "activate",
- "last-action": "CreateVnfInstance"
- },
- "service-information": {
- "service-id": "service1",
- "onap-model-information": {
- "model-name": "service-nginx-ingress-1",
- "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
- "model-version": "1.0",
- "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ "service-topology": {
+ "service-topology-identifier": {
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "service-instance-name": "zrdm61asmsf01_svc",
+ "service-type": "service-nginx-ingress-1",
+ "global-customer-id": "Demonstration"
+ },
+ "onap-model-information": {
+ "model-name": "service-nginx-ingress-1",
+ "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
+ "model-version": "1.0",
+ "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ }
+ },
+ "service-level-oper-status": {
+ "order-status": "Created",
+ "last-rpc-action": "assign",
+ "last-action": "CreateServiceInstance"
+ },
+ "sdnc-request-header": {
+ "svc-action": "assign",
+ "svc-request-id": "6d06a832-69da-4369-9d99-049767a39400"
+ },
+ "vnfs": {
+ "vnf": [
+ {
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "vnf-data": {
+ "vnf-level-oper-status": {
+ "order-status": "Created",
+ "last-rpc-action": "activate",
+ "last-action": "CreateVnfInstance"
},
- "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "global-customer-id": "cust123",
- "subscription-service-type": "service-nginx-ingress-1"
- },
- "sdnc-request-header": {
- "svc-action": "activate",
- "svc-request-id": "acf0c0db-106f-42e4-b77b-191e9d229eb9",
- "svc-notification-url": "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/SDNCCallback/b8f92243-85cb-4954-970d-7e0159b9a48b"
- },
- "vnf-information": {
- "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
- "onap-model-information": {
- "model-name": "nginx-ingress-1",
- "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
- "model-version": "1.0",
- "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
- "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ "service-information": {
+ "service-id": "service1",
+ "onap-model-information": {
+ "model-name": "service-nginx-ingress-1",
+ "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
+ "model-version": "1.0",
+ "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ },
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "global-customer-id": "cust123",
+ "subscription-service-type": "service-nginx-ingress-1"
},
- "vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
- "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
- },
- "request-information": {
- "request-id": "c382d6d1-2108-4c39-ab7a-c3e67cdbc749",
- "request-action": "CreateVnfInstance",
- "source": "MSO"
- },
- "vnf-request-input": {
- "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2",
- "tenant": "k8s_tenant_1",
- "cloud-owner": "k8sCloudOwner",
- "aic-cloud-region": "k8s_region_1"
- },
- "vnf-topology": {
- "onap-model-information": {
- "model-name": "nginx-ingress-1",
- "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
- "model-version": "1.0",
- "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
- "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ "sdnc-request-header": {
+ "svc-action": "activate",
+ "svc-request-id": "acf0c0db-106f-42e4-b77b-191e9d229eb9",
+ "svc-notification-url": "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/SDNCCallback/b8f92243-85cb-4954-970d-7e0159b9a48b"
},
- "tenant": "k8s_tenant_1",
- "aic-clli": "complexMC",
- "aic-cloud-region": "k8s_region_1",
- "vnf-topology-identifier-structure": {
+ "vnf-information": {
"vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "onap-model-information": {
+ "model-name": "nginx-ingress-1",
+ "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
+ "model-version": "1.0",
+ "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
+ "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ },
"vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
"vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
},
- "vnf-resource-assignments": {
- "availability-zones": {
- "availability-zone": [
- "k8s_availability_zone_1"
- ]
+ "request-information": {
+ "request-id": "c382d6d1-2108-4c39-ab7a-c3e67cdbc749",
+ "request-action": "CreateVnfInstance",
+ "source": "MSO"
+ },
+ "vnf-request-input": {
+ "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2",
+ "tenant": "k8s_tenant_1",
+ "cloud-owner": "k8sCloudOwner",
+ "aic-cloud-region": "k8s_region_1"
+ },
+ "vnf-topology": {
+ "onap-model-information": {
+ "model-name": "nginx-ingress-1",
+ "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
+ "model-version": "1.0",
+ "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
+ "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ },
+ "tenant": "k8s_tenant_1",
+ "aic-clli": "complexMC",
+ "aic-cloud-region": "k8s_region_1",
+ "vnf-topology-identifier-structure": {
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
+ "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
+ },
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": [
+ "k8s_availability_zone_1"
+ ]
+ }
}
- }
- },
- "vf-modules": {
- "vf-module": [
- {
- "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
- "vf-module-data": {
- "service-information": {
- "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "onap-model-information": {
- "model-name": "service-nginx-ingress-1",
- "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
- "model-version": "1.0",
- "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ },
+ "vf-modules": {
+ "vf-module": [
+ {
+ "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
+ "vf-module-data": {
+ "service-information": {
+ "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "onap-model-information": {
+ "model-name": "service-nginx-ingress-1",
+ "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
+ "model-version": "1.0",
+ "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ },
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "global-customer-id": "cust123",
+ "subscription-service-type": "test"
},
- "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "global-customer-id": "cust123",
- "subscription-service-type": "test"
- },
- "vf-module-topology": {
- "onap-model-information": {
- "model-name": "NginxIngress1..nginx-ingress..module-0",
- "model-invariant-uuid": "caa22b8e-e0de-4d2c-9048-9a71d39afd91",
- "model-version": "1",
- "model-customization-uuid": "d6403fe2-ebe4-4fce-bec2-0218f61b2564",
- "model-uuid": "e5d2fe74-9534-4a7c-9a1b-f49ecf1105e3"
+ "vf-module-topology": {
+ "onap-model-information": {
+ "model-name": "NginxIngress1..nginx-ingress..module-0",
+ "model-invariant-uuid": "caa22b8e-e0de-4d2c-9048-9a71d39afd91",
+ "model-version": "1",
+ "model-customization-uuid": "d6403fe2-ebe4-4fce-bec2-0218f61b2564",
+ "model-uuid": "e5d2fe74-9534-4a7c-9a1b-f49ecf1105e3"
+ },
+ "vf-module-parameters": {
+ "param": [
+ {
+ "name": "availability_zone_0",
+ "value": "k8s_availability_zone_1"
+ },
+ {
+ "name": "k8s-rb-profile-name",
+ "value": "default"
+ }
+ ]
+ },
+ "tenant": "k8s_tenant_1",
+ "sdnc-generated-cloud-resources": true,
+ "aic-clli": "complexMC",
+ "vf-module-topology-identifier": {
+ "vf-module-type": "NginxIngress1..nginx-ingress..module-0",
+ "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
+ "vf-module-name": "Python_ONAP_SDK_vf_module_instance_678cc889-0c89-40f3-9f5b-1f475d5c4ebb"
+ },
+ "aic-cloud-region": "k8s_region_1"
},
- "vf-module-parameters": {
- "param": [
- {
- "name": "availability_zone_0",
- "value": "k8s_availability_zone_1"
- },
- {
- "name": "k8s-rb-profile-name",
- "value": "default"
- }
- ]
+ "vf-module-request-input": {
+ "vf-module-name": "Python_ONAP_SDK_vf_module_instance_678cc889-0c89-40f3-9f5b-1f475d5c4ebb",
+ "tenant": "k8s_tenant_1",
+ "cloud-owner": "k8sCloudOwner",
+ "aic-cloud-region": "k8s_region_1"
},
- "tenant": "k8s_tenant_1",
- "sdnc-generated-cloud-resources": true,
- "aic-clli": "complexMC",
- "vf-module-topology-identifier": {
- "vf-module-type": "NginxIngress1..nginx-ingress..module-0",
- "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
- "vf-module-name": "Python_ONAP_SDK_vf_module_instance_678cc889-0c89-40f3-9f5b-1f475d5c4ebb"
+ "sdnc-request-header": {
+ "svc-action": "activate",
+ "svc-request-id": "bf81d48a-d5f9-42f2-bc49-9277f0e2a836",
+ "svc-notification-url": "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/SDNCCallback/64780567-ecf5-41c9-af36-bb06f8ae0e5d"
},
- "aic-cloud-region": "k8s_region_1"
- },
- "vf-module-request-input": {
- "vf-module-name": "Python_ONAP_SDK_vf_module_instance_678cc889-0c89-40f3-9f5b-1f475d5c4ebb",
- "tenant": "k8s_tenant_1",
- "cloud-owner": "k8sCloudOwner",
- "aic-cloud-region": "k8s_region_1"
- },
- "sdnc-request-header": {
- "svc-action": "activate",
- "svc-request-id": "bf81d48a-d5f9-42f2-bc49-9277f0e2a836",
- "svc-notification-url": "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/SDNCCallback/64780567-ecf5-41c9-af36-bb06f8ae0e5d"
- },
- "vnf-information": {
- "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
- "onap-model-information": {
- "model-name": "nginx-ingress-1",
- "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
- "model-version": "1.0",
- "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
- "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ "vnf-information": {
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "onap-model-information": {
+ "model-name": "nginx-ingress-1",
+ "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
+ "model-version": "1.0",
+ "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
+ "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ },
+ "vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
+ "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
+ },
+ "vf-module-information": {
+ "onap-model-information": {
+ "model-name": "NginxIngress1..nginx-ingress..module-0",
+ "model-invariant-uuid": "caa22b8e-e0de-4d2c-9048-9a71d39afd91",
+ "model-version": "1",
+ "model-customization-uuid": "d6403fe2-ebe4-4fce-bec2-0218f61b2564",
+ "model-uuid": "e5d2fe74-9534-4a7c-9a1b-f49ecf1105e3"
+ },
+ "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
+ "vf-module-type": "NginxIngress1..nginx-ingress..module-0",
+ "from-preload": true
},
- "vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
- "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
- },
- "vf-module-information": {
- "onap-model-information": {
- "model-name": "NginxIngress1..nginx-ingress..module-0",
- "model-invariant-uuid": "caa22b8e-e0de-4d2c-9048-9a71d39afd91",
- "model-version": "1",
- "model-customization-uuid": "d6403fe2-ebe4-4fce-bec2-0218f61b2564",
- "model-uuid": "e5d2fe74-9534-4a7c-9a1b-f49ecf1105e3"
+ "request-information": {
+ "request-id": "051f3665-002c-4e3c-b62e-f8c0b48ef12e",
+ "request-action": "CreateVfModuleInstance",
+ "source": "MSO"
},
- "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
- "vf-module-type": "NginxIngress1..nginx-ingress..module-0",
- "from-preload": true
- },
- "request-information": {
- "request-id": "051f3665-002c-4e3c-b62e-f8c0b48ef12e",
- "request-action": "CreateVfModuleInstance",
- "source": "MSO"
- },
- "vf-module-level-oper-status": {
- "order-status": "Created",
- "last-rpc-action": "activate"
+ "vf-module-level-oper-status": {
+ "order-status": "Created",
+ "last-rpc-action": "activate"
+ }
}
}
- }
- ]
+ ]
+ }
}
}
- }
- ]
+ ]
+ }
}
-}
-
-
-
+} \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/service1-serviceitem.json b/ms/gra/gra-app/src/test/resources/service1-serviceitem.json
index aad2096..417f62f 100644
--- a/ms/gra/gra-app/src/test/resources/service1-serviceitem.json
+++ b/ms/gra/gra-app/src/test/resources/service1-serviceitem.json
@@ -1,233 +1,233 @@
{
- "service-instance-id": "service1",
- "service-data": {
- "request-information": {
- "request-id": "f5554477-51c7-4f8e-9183-f8968f3f86bf",
- "request-action": "CreateServiceInstance",
- "source": "MSO"
- },
- "service-request-input": {
- "service-instance-name": "zrdm61asmsf01_svc"
- },
- "service-information": {
- "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "onap-model-information": {
- "model-name": "service-nginx-ingress-1",
- "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
- "model-version": "1.0",
- "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ "service": {
+ "service-instance-id": "service1",
+ "service-data": {
+ "request-information": {
+ "request-id": "f5554477-51c7-4f8e-9183-f8968f3f86bf",
+ "request-action": "CreateServiceInstance",
+ "source": "MSO"
},
- "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "global-customer-id": "cust123",
- "subscription-service-type": "test"
- },
- "service-topology": {
- "service-topology-identifier": {
+ "service-request-input": {
+ "service-instance-name": "zrdm61asmsf01_svc"
+ },
+ "service-information": {
+ "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "onap-model-information": {
+ "model-name": "service-nginx-ingress-1",
+ "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
+ "model-version": "1.0",
+ "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ },
"service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "service-instance-name": "zrdm61asmsf01_svc",
- "service-type": "test",
- "global-customer-id": "cust123"
+ "global-customer-id": "cust123",
+ "subscription-service-type": "test"
},
- "onap-model-information": {
- "model-name": "service-nginx-ingress-1",
- "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
- "model-version": "1.0",
- "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
- }
- },
- "service-level-oper-status": {
- "order-status": "Created",
- "last-rpc-action": "assign",
- "last-action": "CreateServiceInstance"
- },
- "sdnc-request-header": {
- "svc-action": "assign",
- "svc-request-id": "6d06a832-69da-4369-9d99-049767a39400"
- },
- "vnfs": {
- "vnf": [
- {
- "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
- "vnf-data": {
- "vnf-level-oper-status": {
- "order-status": "Created",
- "last-rpc-action": "activate",
- "last-action": "CreateVnfInstance"
- },
- "service-information": {
- "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "onap-model-information": {
- "model-name": "service-nginx-ingress-1",
- "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
- "model-version": "1.0",
- "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ "service-topology": {
+ "service-topology-identifier": {
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "service-instance-name": "zrdm61asmsf01_svc",
+ "service-type": "test",
+ "global-customer-id": "cust123"
+ },
+ "onap-model-information": {
+ "model-name": "service-nginx-ingress-1",
+ "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
+ "model-version": "1.0",
+ "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ }
+ },
+ "service-level-oper-status": {
+ "order-status": "Created",
+ "last-rpc-action": "assign",
+ "last-action": "CreateServiceInstance"
+ },
+ "sdnc-request-header": {
+ "svc-action": "assign",
+ "svc-request-id": "6d06a832-69da-4369-9d99-049767a39400"
+ },
+ "vnfs": {
+ "vnf": [
+ {
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "vnf-data": {
+ "vnf-level-oper-status": {
+ "order-status": "Created",
+ "last-rpc-action": "activate",
+ "last-action": "CreateVnfInstance"
},
- "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "global-customer-id": "cust123",
- "subscription-service-type": "test"
- },
- "sdnc-request-header": {
- "svc-action": "activate",
- "svc-request-id": "acf0c0db-106f-42e4-b77b-191e9d229eb9",
- "svc-notification-url": "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/SDNCCallback/b8f92243-85cb-4954-970d-7e0159b9a48b"
- },
- "vnf-information": {
- "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
- "onap-model-information": {
- "model-name": "nginx-ingress-1",
- "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
- "model-version": "1.0",
- "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
- "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ "service-information": {
+ "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "onap-model-information": {
+ "model-name": "service-nginx-ingress-1",
+ "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
+ "model-version": "1.0",
+ "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ },
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "global-customer-id": "cust123",
+ "subscription-service-type": "test"
},
- "vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
- "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
- },
- "request-information": {
- "request-id": "c382d6d1-2108-4c39-ab7a-c3e67cdbc749",
- "request-action": "CreateVnfInstance",
- "source": "MSO"
- },
- "vnf-request-input": {
- "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2",
- "tenant": "k8s_tenant_1",
- "cloud-owner": "k8sCloudOwner",
- "aic-cloud-region": "k8s_region_1"
- },
- "vnf-topology": {
- "onap-model-information": {
- "model-name": "nginx-ingress-1",
- "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
- "model-version": "1.0",
- "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
- "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ "sdnc-request-header": {
+ "svc-action": "activate",
+ "svc-request-id": "acf0c0db-106f-42e4-b77b-191e9d229eb9",
+ "svc-notification-url": "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/SDNCCallback/b8f92243-85cb-4954-970d-7e0159b9a48b"
},
- "tenant": "k8s_tenant_1",
- "aic-clli": "complexMC",
- "aic-cloud-region": "k8s_region_1",
- "vnf-topology-identifier-structure": {
+ "vnf-information": {
"vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "onap-model-information": {
+ "model-name": "nginx-ingress-1",
+ "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
+ "model-version": "1.0",
+ "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
+ "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ },
"vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
"vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
},
- "vnf-resource-assignments": {
- "availability-zones": {
- "availability-zone": [
- "k8s_availability_zone_1"
- ]
+ "request-information": {
+ "request-id": "c382d6d1-2108-4c39-ab7a-c3e67cdbc749",
+ "request-action": "CreateVnfInstance",
+ "source": "MSO"
+ },
+ "vnf-request-input": {
+ "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2",
+ "tenant": "k8s_tenant_1",
+ "cloud-owner": "k8sCloudOwner",
+ "aic-cloud-region": "k8s_region_1"
+ },
+ "vnf-topology": {
+ "onap-model-information": {
+ "model-name": "nginx-ingress-1",
+ "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
+ "model-version": "1.0",
+ "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
+ "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ },
+ "tenant": "k8s_tenant_1",
+ "aic-clli": "complexMC",
+ "aic-cloud-region": "k8s_region_1",
+ "vnf-topology-identifier-structure": {
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
+ "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
+ },
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": [
+ "k8s_availability_zone_1"
+ ]
+ }
}
- }
- },
- "vf-modules": {
- "vf-module": [
- {
- "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
- "vf-module-data": {
- "service-information": {
- "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "onap-model-information": {
- "model-name": "service-nginx-ingress-1",
- "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
- "model-version": "1.0",
- "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ },
+ "vf-modules": {
+ "vf-module": [
+ {
+ "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
+ "vf-module-data": {
+ "service-information": {
+ "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "onap-model-information": {
+ "model-name": "service-nginx-ingress-1",
+ "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
+ "model-version": "1.0",
+ "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ },
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "global-customer-id": "cust123",
+ "subscription-service-type": "test"
},
- "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "global-customer-id": "cust123",
- "subscription-service-type": "test"
- },
- "vf-module-topology": {
- "onap-model-information": {
- "model-name": "NginxIngress1..nginx-ingress..module-0",
- "model-invariant-uuid": "caa22b8e-e0de-4d2c-9048-9a71d39afd91",
- "model-version": "1",
- "model-customization-uuid": "d6403fe2-ebe4-4fce-bec2-0218f61b2564",
- "model-uuid": "e5d2fe74-9534-4a7c-9a1b-f49ecf1105e3"
+ "vf-module-topology": {
+ "onap-model-information": {
+ "model-name": "NginxIngress1..nginx-ingress..module-0",
+ "model-invariant-uuid": "caa22b8e-e0de-4d2c-9048-9a71d39afd91",
+ "model-version": "1",
+ "model-customization-uuid": "d6403fe2-ebe4-4fce-bec2-0218f61b2564",
+ "model-uuid": "e5d2fe74-9534-4a7c-9a1b-f49ecf1105e3"
+ },
+ "vf-module-parameters": {
+ "param": [
+ {
+ "name": "availability_zone_0",
+ "value": "k8s_availability_zone_1"
+ },
+ {
+ "name": "k8s-rb-profile-name",
+ "value": "default"
+ }
+ ]
+ },
+ "tenant": "k8s_tenant_1",
+ "sdnc-generated-cloud-resources": true,
+ "aic-clli": "complexMC",
+ "vf-module-topology-identifier": {
+ "vf-module-type": "NginxIngress1..nginx-ingress..module-0",
+ "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
+ "vf-module-name": "Python_ONAP_SDK_vf_module_instance_678cc889-0c89-40f3-9f5b-1f475d5c4ebb"
+ },
+ "aic-cloud-region": "k8s_region_1"
},
- "vf-module-parameters": {
- "param": [
- {
- "name": "availability_zone_0",
- "value": "k8s_availability_zone_1"
- },
- {
- "name": "k8s-rb-profile-name",
- "value": "default"
- }
- ]
+ "vf-module-request-input": {
+ "vf-module-name": "Python_ONAP_SDK_vf_module_instance_678cc889-0c89-40f3-9f5b-1f475d5c4ebb",
+ "tenant": "k8s_tenant_1",
+ "cloud-owner": "k8sCloudOwner",
+ "aic-cloud-region": "k8s_region_1"
},
- "tenant": "k8s_tenant_1",
- "sdnc-generated-cloud-resources": true,
- "aic-clli": "complexMC",
- "vf-module-topology-identifier": {
- "vf-module-type": "NginxIngress1..nginx-ingress..module-0",
- "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
- "vf-module-name": "Python_ONAP_SDK_vf_module_instance_678cc889-0c89-40f3-9f5b-1f475d5c4ebb"
+ "sdnc-request-header": {
+ "svc-action": "activate",
+ "svc-request-id": "bf81d48a-d5f9-42f2-bc49-9277f0e2a836",
+ "svc-notification-url": "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/SDNCCallback/64780567-ecf5-41c9-af36-bb06f8ae0e5d"
},
- "aic-cloud-region": "k8s_region_1"
- },
- "vf-module-request-input": {
- "vf-module-name": "Python_ONAP_SDK_vf_module_instance_678cc889-0c89-40f3-9f5b-1f475d5c4ebb",
- "tenant": "k8s_tenant_1",
- "cloud-owner": "k8sCloudOwner",
- "aic-cloud-region": "k8s_region_1"
- },
- "sdnc-request-header": {
- "svc-action": "activate",
- "svc-request-id": "bf81d48a-d5f9-42f2-bc49-9277f0e2a836",
- "svc-notification-url": "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/SDNCCallback/64780567-ecf5-41c9-af36-bb06f8ae0e5d"
- },
- "vnf-information": {
- "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
- "onap-model-information": {
- "model-name": "nginx-ingress-1",
- "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
- "model-version": "1.0",
- "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
- "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ "vnf-information": {
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "onap-model-information": {
+ "model-name": "nginx-ingress-1",
+ "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
+ "model-version": "1.0",
+ "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
+ "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ },
+ "vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
+ "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
},
- "vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
- "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
- },
- "vf-module-information": {
- "onap-model-information": {
- "model-name": "NginxIngress1..nginx-ingress..module-0",
- "model-invariant-uuid": "caa22b8e-e0de-4d2c-9048-9a71d39afd91",
- "model-version": "1",
- "model-customization-uuid": "d6403fe2-ebe4-4fce-bec2-0218f61b2564",
- "model-uuid": "e5d2fe74-9534-4a7c-9a1b-f49ecf1105e3"
+ "vf-module-information": {
+ "onap-model-information": {
+ "model-name": "NginxIngress1..nginx-ingress..module-0",
+ "model-invariant-uuid": "caa22b8e-e0de-4d2c-9048-9a71d39afd91",
+ "model-version": "1",
+ "model-customization-uuid": "d6403fe2-ebe4-4fce-bec2-0218f61b2564",
+ "model-uuid": "e5d2fe74-9534-4a7c-9a1b-f49ecf1105e3"
+ },
+ "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
+ "vf-module-type": "NginxIngress1..nginx-ingress..module-0",
+ "from-preload": true
},
- "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
- "vf-module-type": "NginxIngress1..nginx-ingress..module-0",
- "from-preload": true
- },
- "request-information": {
- "request-id": "051f3665-002c-4e3c-b62e-f8c0b48ef12e",
- "request-action": "CreateVfModuleInstance",
- "source": "MSO"
- },
- "vf-module-level-oper-status": {
- "order-status": "Created",
- "last-rpc-action": "activate"
+ "request-information": {
+ "request-id": "051f3665-002c-4e3c-b62e-f8c0b48ef12e",
+ "request-action": "CreateVfModuleInstance",
+ "source": "MSO"
+ },
+ "vf-module-level-oper-status": {
+ "order-status": "Created",
+ "last-rpc-action": "activate"
+ }
}
}
- }
- ]
+ ]
+ }
}
}
- }
- ]
+ ]
+ }
+ },
+ "service-status": {
+ "final-indicator": "Y",
+ "rpc-action": "activate",
+ "rpc-name": "vf-module-topology-operation",
+ "response-code": "200",
+ "response-timestamp": "2020-06-24T13:06:24.525Z",
+ "response-message": "",
+ "action": "CreateVfModuleInstance",
+ "request-status": "synccomplete"
}
- },
- "service-status": {
- "final-indicator": "Y",
- "rpc-action": "activate",
- "rpc-name": "vf-module-topology-operation",
- "response-code": "200",
- "response-timestamp": "2020-06-24T13:06:24.525Z",
- "response-message": "",
- "action": "CreateVfModuleInstance",
- "request-status": "synccomplete"
}
-}
-
-
+} \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/service1-services.json b/ms/gra/gra-app/src/test/resources/service1-services.json
new file mode 100644
index 0000000..28117b9
--- /dev/null
+++ b/ms/gra/gra-app/src/test/resources/service1-services.json
@@ -0,0 +1,237 @@
+{
+ "services": {
+ "service": [
+ {
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "service-data": {
+ "request-information": {
+ "request-id": "f5554477-51c7-4f8e-9183-f8968f3f86bf",
+ "request-action": "CreateServiceInstance",
+ "source": "MSO"
+ },
+ "service-request-input": {
+ "service-instance-name": "zrdm61asmsf01_svc"
+ },
+ "service-information": {
+ "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "onap-model-information": {
+ "model-name": "service-nginx-ingress-1",
+ "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
+ "model-version": "1.0",
+ "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ },
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "global-customer-id": "Demonstration",
+ "subscription-service-type": "service-nginx-ingress-1"
+ },
+ "service-topology": {
+ "service-topology-identifier": {
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "service-instance-name": "zrdm61asmsf01_svc",
+ "service-type": "service-nginx-ingress-1",
+ "global-customer-id": "Demonstration"
+ },
+ "onap-model-information": {
+ "model-name": "service-nginx-ingress-1",
+ "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
+ "model-version": "1.0",
+ "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ }
+ },
+ "service-level-oper-status": {
+ "order-status": "Created",
+ "last-rpc-action": "assign",
+ "last-action": "CreateServiceInstance"
+ },
+ "sdnc-request-header": {
+ "svc-action": "assign",
+ "svc-request-id": "6d06a832-69da-4369-9d99-049767a39400"
+ },
+ "vnfs": {
+ "vnf": [
+ {
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "vnf-data": {
+ "vnf-level-oper-status": {
+ "order-status": "Created",
+ "last-rpc-action": "activate",
+ "last-action": "CreateVnfInstance"
+ },
+ "service-information": {
+ "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "onap-model-information": {
+ "model-name": "service-nginx-ingress-1",
+ "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
+ "model-version": "1.0",
+ "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ },
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "global-customer-id": "Demonstration",
+ "subscription-service-type": "service-nginx-ingress-1"
+ },
+ "sdnc-request-header": {
+ "svc-action": "activate",
+ "svc-request-id": "acf0c0db-106f-42e4-b77b-191e9d229eb9",
+ "svc-notification-url": "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/SDNCCallback/b8f92243-85cb-4954-970d-7e0159b9a48b"
+ },
+ "vnf-information": {
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "onap-model-information": {
+ "model-name": "nginx-ingress-1",
+ "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
+ "model-version": "1.0",
+ "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
+ "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ },
+ "vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
+ "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
+ },
+ "request-information": {
+ "request-id": "c382d6d1-2108-4c39-ab7a-c3e67cdbc749",
+ "request-action": "CreateVnfInstance",
+ "source": "MSO"
+ },
+ "vnf-request-input": {
+ "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2",
+ "tenant": "k8s_tenant_1",
+ "cloud-owner": "k8sCloudOwner",
+ "aic-cloud-region": "k8s_region_1"
+ },
+ "vnf-topology": {
+ "onap-model-information": {
+ "model-name": "nginx-ingress-1",
+ "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
+ "model-version": "1.0",
+ "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
+ "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ },
+ "tenant": "k8s_tenant_1",
+ "aic-clli": "complexMC",
+ "aic-cloud-region": "k8s_region_1",
+ "vnf-topology-identifier-structure": {
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
+ "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
+ },
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": [
+ "k8s_availability_zone_1"
+ ]
+ }
+ }
+ },
+ "vf-modules": {
+ "vf-module": [
+ {
+ "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
+ "vf-module-data": {
+ "service-information": {
+ "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "onap-model-information": {
+ "model-name": "service-nginx-ingress-1",
+ "model-invariant-uuid": "0fe6193d-2d65-4b8e-a4ee-a07821566b5e",
+ "model-version": "1.0",
+ "model-uuid": "48223a6a-f5e1-4354-95eb-f5ea014fc9df"
+ },
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "global-customer-id": "Demonstration",
+ "subscription-service-type": "service-nginx-ingress-1"
+ },
+ "vf-module-topology": {
+ "onap-model-information": {
+ "model-name": "NginxIngress1..nginx-ingress..module-0",
+ "model-invariant-uuid": "caa22b8e-e0de-4d2c-9048-9a71d39afd91",
+ "model-version": "1",
+ "model-customization-uuid": "d6403fe2-ebe4-4fce-bec2-0218f61b2564",
+ "model-uuid": "e5d2fe74-9534-4a7c-9a1b-f49ecf1105e3"
+ },
+ "vf-module-parameters": {
+ "param": [
+ {
+ "name": "availability_zone_0",
+ "value": "k8s_availability_zone_1"
+ },
+ {
+ "name": "k8s-rb-profile-name",
+ "value": "default"
+ }
+ ]
+ },
+ "tenant": "k8s_tenant_1",
+ "sdnc-generated-cloud-resources": true,
+ "aic-clli": "complexMC",
+ "vf-module-topology-identifier": {
+ "vf-module-type": "NginxIngress1..nginx-ingress..module-0",
+ "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
+ "vf-module-name": "Python_ONAP_SDK_vf_module_instance_678cc889-0c89-40f3-9f5b-1f475d5c4ebb"
+ },
+ "aic-cloud-region": "k8s_region_1"
+ },
+ "vf-module-request-input": {
+ "vf-module-name": "Python_ONAP_SDK_vf_module_instance_678cc889-0c89-40f3-9f5b-1f475d5c4ebb",
+ "tenant": "k8s_tenant_1",
+ "cloud-owner": "k8sCloudOwner",
+ "aic-cloud-region": "k8s_region_1"
+ },
+ "sdnc-request-header": {
+ "svc-action": "activate",
+ "svc-request-id": "bf81d48a-d5f9-42f2-bc49-9277f0e2a836",
+ "svc-notification-url": "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/SDNCCallback/64780567-ecf5-41c9-af36-bb06f8ae0e5d"
+ },
+ "vnf-information": {
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "onap-model-information": {
+ "model-name": "nginx-ingress-1",
+ "model-invariant-uuid": "ebd1565b-a98f-4d77-9b91-6aefd51d040c",
+ "model-version": "1.0",
+ "model-customization-uuid": "69cff101-d1f2-4bf3-9697-57f52ba3c5dd",
+ "model-uuid": "dfeccc32-2459-43bf-bfdd-36567e696090"
+ },
+ "vnf-type": "service-nginx-ingress-1/nginx-ingress-1 0",
+ "vnf-name": "Python_ONAP_SDK_vnf_instance_2aff902a-4714-4d08-942d-d97b3a3b87c2"
+ },
+ "vf-module-information": {
+ "onap-model-information": {
+ "model-name": "NginxIngress1..nginx-ingress..module-0",
+ "model-invariant-uuid": "caa22b8e-e0de-4d2c-9048-9a71d39afd91",
+ "model-version": "1",
+ "model-customization-uuid": "d6403fe2-ebe4-4fce-bec2-0218f61b2564",
+ "model-uuid": "e5d2fe74-9534-4a7c-9a1b-f49ecf1105e3"
+ },
+ "vf-module-id": "269bda16-f40c-41a9-baef-e8905ab2b70e",
+ "vf-module-type": "NginxIngress1..nginx-ingress..module-0",
+ "from-preload": true
+ },
+ "request-information": {
+ "request-id": "051f3665-002c-4e3c-b62e-f8c0b48ef12e",
+ "request-action": "CreateVfModuleInstance",
+ "source": "MSO"
+ },
+ "vf-module-level-oper-status": {
+ "order-status": "Created",
+ "last-rpc-action": "activate"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "service-status": {
+ "final-indicator": "Y",
+ "rpc-action": "activate",
+ "rpc-name": "vf-module-topology-operation",
+ "response-code": "200",
+ "response-timestamp": "2020-06-24T13:06:24.525Z",
+ "response-message": "",
+ "action": "CreateVfModuleInstance",
+ "request-status": "synccomplete"
+ }
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/service1-servicestatus.json b/ms/gra/gra-app/src/test/resources/service1-servicestatus.json
index ca763d3..9dae1fd 100644
--- a/ms/gra/gra-app/src/test/resources/service1-servicestatus.json
+++ b/ms/gra/gra-app/src/test/resources/service1-servicestatus.json
@@ -1,4 +1,5 @@
{
+ "service-status": {
"final-indicator": "Y",
"rpc-action": "activate",
"rpc-name": "vf-module-topology-operation",
@@ -7,4 +8,5 @@
"response-message": "",
"action": "CreateVfModuleInstance",
"request-status": "synccomplete"
+ }
} \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/service1-vfmodule-item.json b/ms/gra/gra-app/src/test/resources/service1-vfmodule-item.json
index 67e5b3c..095cc80 100644
--- a/ms/gra/gra-app/src/test/resources/service1-vfmodule-item.json
+++ b/ms/gra/gra-app/src/test/resources/service1-vfmodule-item.json
@@ -1,79 +1,81 @@
{
- "vf-module-data": {
- "vf-module-level-oper-status": {
- "order-status": "PendingCreate",
- "last-rpc-action": "assign"
- },
- "request-information": {
- "request-action": "CreateVfModuleInstance",
- "source": "simulator",
- "request-id": "c594915b-cd49-4276-8e6b-536caa5f5285"
- },
- "sdnc-request-header": {
- "svc-request-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
- "svc-action": "assign"
- },
- "service-information": {
- "onap-model-information": {
- "model-name": "vcpesvc_vbng_0412a",
- "model-version": "3.0",
- "model-uuid": "12eb33fa-b221-4d87-939c-d808b5799a7c",
- "model-invariant-uuid": "ead151e2-e18a-44fc-b6ac-3ae3d819dcd6"
+ "vf-module": {
+ "vf-module-data": {
+ "vf-module-level-oper-status": {
+ "order-status": "PendingCreate",
+ "last-rpc-action": "assign"
},
- "subscription-service-type": "VIRTUAL USP",
- "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3cac",
- "global-customer-id": "cust123",
- "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca"
- },
- "vf-module-information": {
- "onap-model-information": {
- "model-name": "SmsfNc2578..smsf_base..module-0",
- "model-version": "3",
- "model-customization-uuid": "59ffe5ba-cfaf-4e83-a2f3-159522dcebac",
- "model-uuid": "513cc9fc-fff5-4c46-9728-393437536c4d",
- "model-invariant-uuid": "7ca7567c-f42c-4ed8-bcde-f8971b92d90a"
+ "request-information": {
+ "request-action": "CreateVfModuleInstance",
+ "source": "simulator",
+ "request-id": "c594915b-cd49-4276-8e6b-536caa5f5285"
},
- "vf-module-id": "45841173-3729-4a1d-a811-a3bde399e22d",
- "from-preload": true,
- "vf-module-type": "SmsfNc2578..smsf_base..module-0"
- },
- "vf-module-request-input": {
- "aic-cloud-region": "rdm61a",
- "cloud-owner": "att-nc",
- "tenant": "4714fe06cc24414c914c51ca0aa1bf84",
- "vf-module-name": "vfmodule1",
- "vf-module-input-parameters": {}
- },
- "vnf-information": {
- "onap-model-information": {
- "model-name": "vcpevsp_vgmux_0412 ",
- "model-version": "1.0",
- "model-customization-uuid": "5724fcc8-2ae2-45ce-8d44-795092b85dee",
- "model-uuid": "ba3b8981-9a9c-4945-92aa-486234ec321f",
- "model-invariant-uuid": "b3dc6465-942c-42af-8464-2bf85b6e504b"
+ "sdnc-request-header": {
+ "svc-request-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "svc-action": "assign"
},
- "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
- "vnf-name": "zrdm61asmsf01",
- "vnf-type": "SMSF-NC2-578-SVC/SMSF-NC2-578"
- },
- "vf-module-topology": {
- "onap-model-information": {
- "model-name": "SmsfNc2578..smsf_base..module-0",
- "model-version": "3",
- "model-customization-uuid": "59ffe5ba-cfaf-4e83-a2f3-159522dcebac",
- "model-uuid": "513cc9fc-fff5-4c46-9728-393437536c4d",
- "model-invariant-uuid": "7ca7567c-f42c-4ed8-bcde-f8971b92d90a"
+ "service-information": {
+ "onap-model-information": {
+ "model-name": "vcpesvc_vbng_0412a",
+ "model-version": "3.0",
+ "model-uuid": "12eb33fa-b221-4d87-939c-d808b5799a7c",
+ "model-invariant-uuid": "ead151e2-e18a-44fc-b6ac-3ae3d819dcd6"
+ },
+ "subscription-service-type": "VIRTUAL USP",
+ "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3cac",
+ "global-customer-id": "cust123",
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca"
},
- "aic-cloud-region": "rdm61a",
- "tenant": "4714fe06cc24414c914c51ca0aa1bf84",
- "vf-module-topology-identifier": {
- "vf-module-name": "vfmodule1",
+ "vf-module-information": {
+ "onap-model-information": {
+ "model-name": "SmsfNc2578..smsf_base..module-0",
+ "model-version": "3",
+ "model-customization-uuid": "59ffe5ba-cfaf-4e83-a2f3-159522dcebac",
+ "model-uuid": "513cc9fc-fff5-4c46-9728-393437536c4d",
+ "model-invariant-uuid": "7ca7567c-f42c-4ed8-bcde-f8971b92d90a"
+ },
"vf-module-id": "45841173-3729-4a1d-a811-a3bde399e22d",
+ "from-preload": true,
"vf-module-type": "SmsfNc2578..smsf_base..module-0"
},
- "vf-module-parameters": {},
- "sdnc-generated-cloud-resources": true
- }
- },
- "vf-module-id": "45841173-3729-4a1d-a811-a3bde399e22d"
+ "vf-module-request-input": {
+ "aic-cloud-region": "rdm61a",
+ "cloud-owner": "att-nc",
+ "tenant": "4714fe06cc24414c914c51ca0aa1bf84",
+ "vf-module-name": "vfmodule1",
+ "vf-module-input-parameters": {}
+ },
+ "vnf-information": {
+ "onap-model-information": {
+ "model-name": "vcpevsp_vgmux_0412 ",
+ "model-version": "1.0",
+ "model-customization-uuid": "5724fcc8-2ae2-45ce-8d44-795092b85dee",
+ "model-uuid": "ba3b8981-9a9c-4945-92aa-486234ec321f",
+ "model-invariant-uuid": "b3dc6465-942c-42af-8464-2bf85b6e504b"
+ },
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "vnf-name": "zrdm61asmsf01",
+ "vnf-type": "SMSF-NC2-578-SVC/SMSF-NC2-578"
+ },
+ "vf-module-topology": {
+ "onap-model-information": {
+ "model-name": "SmsfNc2578..smsf_base..module-0",
+ "model-version": "3",
+ "model-customization-uuid": "59ffe5ba-cfaf-4e83-a2f3-159522dcebac",
+ "model-uuid": "513cc9fc-fff5-4c46-9728-393437536c4d",
+ "model-invariant-uuid": "7ca7567c-f42c-4ed8-bcde-f8971b92d90a"
+ },
+ "aic-cloud-region": "rdm61a",
+ "tenant": "4714fe06cc24414c914c51ca0aa1bf84",
+ "vf-module-topology-identifier": {
+ "vf-module-name": "vfmodule1",
+ "vf-module-id": "45841173-3729-4a1d-a811-a3bde399e22d",
+ "vf-module-type": "SmsfNc2578..smsf_base..module-0"
+ },
+ "vf-module-parameters": {},
+ "sdnc-generated-cloud-resources": true
+ }
+ },
+ "vf-module-id": "45841173-3729-4a1d-a811-a3bde399e22d"
+ }
} \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/service1.json b/ms/gra/gra-app/src/test/resources/service1.json
index 00b9b4b..806af9c 100644
--- a/ms/gra/gra-app/src/test/resources/service1.json
+++ b/ms/gra/gra-app/src/test/resources/service1.json
@@ -232,5 +232,4 @@
}
}
]
-}
-
+} \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/vnf-level-oper-status.json b/ms/gra/gra-app/src/test/resources/vnf-level-oper-status.json
index 1778cab..42e2583 100644
--- a/ms/gra/gra-app/src/test/resources/vnf-level-oper-status.json
+++ b/ms/gra/gra-app/src/test/resources/vnf-level-oper-status.json
@@ -1,5 +1,5 @@
{
- "vnf-level-oper-status": {
+ "oper-status": {
"create-timestamp": "string",
"last-action": "CreateNetworkInstance",
"last-order-status": "Active",
diff --git a/ms/gra/gra-app/src/test/resources/vnf-vnf-networks-network-role.json b/ms/gra/gra-app/src/test/resources/vnf-vnf-networks-network-role.json
index d435c4a..564adc9 100644
--- a/ms/gra/gra-app/src/test/resources/vnf-vnf-networks-network-role.json
+++ b/ms/gra/gra-app/src/test/resources/vnf-vnf-networks-network-role.json
@@ -1,34 +1,40 @@
{
- "contrail-network-fqdn": "string",
- "is-trunked": true,
- "network-id": "69f09279-8af1-4475-83cf-7e357c579dbf",
- "network-name": "test-network-name",
- "network-role": "test-network-role",
- "neutron-id": "812562dd-9d91-4ba6-9c3e-e52bf1cd4cc6",
- "related-networks": {
- "related-network": [{
- "network-id": "69f09279-8af1-4475-83cf-7e357c579dbf",
- "network-role": "test-network-role",
- "vlan-tags": {
- "is-private": true,
- "lower-tag-id": 0,
- "upper-tag-id": 0,
- "vlan-interface": "string"
- }
- }]
- },
- "segmentation-id": "string",
- "subnets-data": {
- "subnet-data": [{
- "cidr-mask": "string",
- "dhcp-enabled": "Y",
- "gateway-address": "string",
- "ip-version": "string",
- "network-start-address": "string",
- "sdnc-subnet-id": "string",
- "subnet-id": "string",
- "subnet-name": "string",
- "subnet-role": "string"
- }]
+ "vnf-network": {
+ "contrail-network-fqdn": "string",
+ "is-trunked": true,
+ "network-id": "69f09279-8af1-4475-83cf-7e357c579dbf",
+ "network-name": "test-network-name",
+ "network-role": "test-network-role",
+ "neutron-id": "812562dd-9d91-4ba6-9c3e-e52bf1cd4cc6",
+ "related-networks": {
+ "related-network": [
+ {
+ "network-id": "69f09279-8af1-4475-83cf-7e357c579dbf",
+ "network-role": "test-network-role",
+ "vlan-tags": {
+ "is-private": true,
+ "lower-tag-id": 0,
+ "upper-tag-id": 0,
+ "vlan-interface": "string"
+ }
+ }
+ ]
+ },
+ "segmentation-id": "string",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "cidr-mask": "string",
+ "dhcp-enabled": "Y",
+ "gateway-address": "string",
+ "ip-version": "string",
+ "network-start-address": "string",
+ "sdnc-subnet-id": "string",
+ "subnet-id": "string",
+ "subnet-name": "string",
+ "subnet-role": "string"
+ }
+ ]
+ }
}
} \ No newline at end of file
diff --git a/ms/gra/gra-app/src/test/resources/vnf.json b/ms/gra/gra-app/src/test/resources/vnf.json
new file mode 100644
index 0000000..84d1a45
--- /dev/null
+++ b/ms/gra/gra-app/src/test/resources/vnf.json
@@ -0,0 +1,603 @@
+{
+ "vnf": {
+ "vnf-data": {
+ "request-information": {
+ "notification-url": "https://dev.null",
+ "order-number": "Order-123",
+ "order-version": "Order-v22",
+ "request-action": "CreateNetworkInstance",
+ "request-id": "a44e8401-2c62-47df-98be-9a09f6cbd996",
+ "source": "unit-test"
+ },
+ "sdnc-request-header": {
+ "svc-action": "assign",
+ "svc-notification-url": "https://dev.null",
+ "svc-request-id": "9c06a7c6-be3a-4530-bdd8-c65b58f123a5"
+ },
+ "service-information": {
+ "global-customer-id": "cust123",
+ "onap-model-information": {
+ "model-customization-uuid": "602c6bcc-6cfa-41cb-a8a7-968b38d5935f",
+ "model-invariant-uuid": "bdb4f943-c9be-4742-b976-a34607f3687e",
+ "model-name": "SMSF-NC2-578",
+ "model-uuid": "86c76b5d-fa8d-4034-b79a-1cc4326021a9",
+ "model-version": "3.0"
+ },
+ "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "subscriber-name": "unit-test",
+ "subscription-service-type": "unit-test"
+ },
+ "vf-modules": {
+ "vf-module": [
+ {
+ "vf-module-data": {
+ "request-information": {
+ "order-number": "Order-123",
+ "order-version": "Order-v22",
+ "request-action": "CreateNetworkInstance",
+ "request-id": "a44e8401-2c62-47df-98be-9a09f6cbd996",
+ "source": "unit-test"
+ },
+ "sdnc-request-header": {
+ "svc-action": "assign",
+ "svc-request-id": "9c06a7c6-be3a-4530-bdd8-c65b58f123a5"
+ },
+ "service-information": {
+ "global-customer-id": "cust123",
+ "onap-model-information": {
+ "model-customization-uuid": "602c6bcc-6cfa-41cb-a8a7-968b38d5935f",
+ "model-invariant-uuid": "bdb4f943-c9be-4742-b976-a34607f3687e",
+ "model-name": "SMSF-NC2-578",
+ "model-uuid": "86c76b5d-fa8d-4034-b79a-1cc4326021a9",
+ "model-version": "3.0"
+ },
+ "service-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "service-instance-id": "5c4f2d89-57a3-47e9-b49b-d3c63eb0b3ca",
+ "subscriber-name": "unit-test",
+ "subscription-service-type": "unit-test"
+ },
+ "vf-module-information": {
+ "from-preload": true,
+ "onap-model-information": {
+ "model-customization-uuid": "602c6bcc-6cfa-41cb-a8a7-968b38d5935f",
+ "model-invariant-uuid": "bdb4f943-c9be-4742-b976-a34607f3687e",
+ "model-name": "SMSF-NC2-578",
+ "model-uuid": "86c76b5d-fa8d-4034-b79a-1cc4326021a9",
+ "model-version": "3.0"
+ },
+ "vf-module-id": "45841173-3729-4a1d-a811-a3bde399e22d",
+ "vf-module-type": "some-vf-module-type"
+ },
+ "vf-module-level-oper-status": {
+ "create-timestamp": "string",
+ "last-action": "CreateNetworkInstance",
+ "last-order-status": "Active",
+ "last-rpc-action": "assign",
+ "last-svc-request-id": "9c06a7c6-be3a-4530-bdd8-c65b58f123a5",
+ "modify-timestamp": "string",
+ "order-status": "Active"
+ },
+ "vf-module-request-input": {
+ "aic-clli": "string",
+ "aic-cloud-region": "test-region",
+ "cloud-owner": "unit-test",
+ "request-version": "string",
+ "tenant": "string",
+ "vf-module-input-parameters": {
+ "param": [
+ {
+ "name": "string",
+ "resource-resolution-data": {
+ "capability-name": "string",
+ "payload": "string",
+ "resource-key": [
+ {
+ "name": "string",
+ "value": "string"
+ }
+ ],
+ "status": "string"
+ },
+ "value": "string"
+ }
+ ]
+ },
+ "vf-module-name": "string"
+ },
+ "vf-module-topology": {
+ "aic-clli": "string",
+ "aic-cloud-region": "test-region",
+ "cloud-owner": "unit-test",
+ "onap-model-information": {
+ "model-customization-uuid": "602c6bcc-6cfa-41cb-a8a7-968b38d5935f",
+ "model-invariant-uuid": "bdb4f943-c9be-4742-b976-a34607f3687e",
+ "model-name": "SMSF-NC2-578",
+ "model-uuid": "86c76b5d-fa8d-4034-b79a-1cc4326021a9",
+ "model-version": "3.0"
+ },
+ "sdnc-generated-cloud-resources": true,
+ "tenant": "string",
+ "vf-module-assignments": {
+ "dhcp-subnet-assignments": {
+ "dhcp-subnet-assignment": [
+ {
+ "ip-version": "string",
+ "network-role": "test-network-role",
+ "neutron-subnet-id": "string"
+ }
+ ]
+ },
+ "vf-module-status": "string",
+ "vlan-vnfc-instance-groups": {
+ "vlan-vnfc-instance-group": [
+ {
+ "instance-group-function": "string",
+ "instance-group-id": "string",
+ "vnf-id": "2a3bfc93-cd4c-4845-8919-434b2d999ada",
+ "vnfcs": {
+ "vnfc": [
+ {
+ "vnfc-name": "string",
+ "vnic-groups": {
+ "vnic-group": [
+ {
+ "network-instance-group-function": "string",
+ "vlan-assignment-policy-name": "string",
+ "vlan-common-ip-addresses": {
+ "ip-addresses": {
+ "ipv4-address": "string",
+ "ipv6-address": "string",
+ "vipv4-address": "string",
+ "vipv6-address": "string"
+ }
+ },
+ "vlan-tag-index-next": 0,
+ "vlan-vnics": {
+ "vlan-vnic": [
+ {
+ "vnic-port-id": "string",
+ "vnic-sub-interfaces": {
+ "sub-interface-network-data": [
+ {
+ "floating-ips": {
+ "floating-ip-v4": [
+ "string"
+ ],
+ "floating-ip-v6": [
+ "string"
+ ]
+ },
+ "network-id": "69f09279-8af1-4475-83cf-7e357c579dbf",
+ "network-information-items": {
+ "network-information-item": [
+ {
+ "ip-count": 0,
+ "ip-version": "string",
+ "network-ips": {
+ "network-ip": [
+ "string"
+ ]
+ },
+ "use-dhcp": "Y"
+ }
+ ]
+ },
+ "network-name": 0,
+ "network-role": "test-network-role",
+ "network-role-tag": "string",
+ "neutron-network-id": "string",
+ "vlan-tag-id": 0
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "vnic-interface-role": "string"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "vms": {
+ "vm": [
+ {
+ "nfc-naming-code": "string",
+ "onap-model-information": {
+ "model-customization-uuid": "string",
+ "model-invariant-uuid": "string",
+ "model-name": "string",
+ "model-uuid": "string",
+ "model-version": "string"
+ },
+ "vm-count": 0,
+ "vm-names": {
+ "vm-name": [
+ "string"
+ ],
+ "vnfc-names": [
+ {
+ "vnfc-name": "string",
+ "vnfc-networks": {
+ "vnfc-network-data": [
+ {
+ "connection-point": {
+ "connection-point-id": "string",
+ "port-id": "string",
+ "vlan-data": [
+ {
+ "vlan-role": "string",
+ "vlan-tag-description": "string",
+ "vlan-tag-id": "string",
+ "vlan-uuid": "string"
+ }
+ ]
+ },
+ "vnfc-network-role": "string",
+ "vnfc-ports": {
+ "vnfc-port": [
+ {
+ "common-sub-interface-role": "string",
+ "vnfc-port-id": "string",
+ "vnic-sub-interfaces": {
+ "sub-interface-network-data": [
+ {
+ "floating-ips": {
+ "floating-ip-v4": [
+ "string"
+ ],
+ "floating-ip-v6": [
+ "string"
+ ]
+ },
+ "network-id": "69f09279-8af1-4475-83cf-7e357c579dbf",
+ "network-information-items": {
+ "network-information-item": [
+ {
+ "ip-count": 0,
+ "ip-version": "string",
+ "network-ips": {
+ "network-ip": [
+ "string"
+ ]
+ },
+ "use-dhcp": "Y"
+ }
+ ]
+ },
+ "network-name": 0,
+ "network-role": "test-network-role",
+ "network-role-tag": "string",
+ "neutron-network-id": "string",
+ "vlan-tag-id": 0
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "vnfc-subnet": [
+ {
+ "vnfc-ip-assignments": [
+ {
+ "vnfc-address-family": "ipv4",
+ "vnfc-subnet-dhcp": "Y",
+ "vnfc-subnet-ip": [
+ {
+ "ip-type": "FIXED",
+ "vnfc-client-key": "string",
+ "vnfc-ip-address": "string"
+ }
+ ],
+ "vnfc-subnet-ip-count": 0
+ }
+ ],
+ "vnfc-subnet-role": "string"
+ }
+ ],
+ "vnfc-type": "string"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "vm-networks": {
+ "vm-network": [
+ {
+ "floating-ips": {
+ "floating-ip-v4": [
+ "string"
+ ],
+ "floating-ip-v6": [
+ "string"
+ ]
+ },
+ "interface-route-prefixes": {
+ "interface-route-prefix": [
+ "string"
+ ]
+ },
+ "is-trunked": true,
+ "mac-addresses": {
+ "mac-address": [
+ "string"
+ ]
+ },
+ "network-information-items": {
+ "network-information-item": [
+ {
+ "ip-count": 0,
+ "ip-version": "string",
+ "network-ips": {
+ "network-ip": [
+ "string"
+ ]
+ },
+ "use-dhcp": "Y"
+ }
+ ]
+ },
+ "network-role": "test-network-role",
+ "network-role-tag": "string",
+ "related-networks": {
+ "related-network": [
+ {
+ "network-id": "69f09279-8af1-4475-83cf-7e357c579dbf",
+ "network-role": "test-network-role",
+ "vlan-tags": {
+ "is-private": true,
+ "lower-tag-id": 0,
+ "upper-tag-id": 0,
+ "vlan-interface": "string"
+ }
+ }
+ ]
+ },
+ "segmentation-id": "string",
+ "sriov-parameters": {
+ "application-tags": {
+ "c-tags": {
+ "c-tag": [
+ "string"
+ ],
+ "ctag": [
+ "string"
+ ]
+ },
+ "ctags": {
+ "c-tag": [
+ "string"
+ ],
+ "ctag": [
+ "string"
+ ]
+ },
+ "s-tags": {
+ "s-tag": [
+ "string"
+ ],
+ "stag": [
+ "string"
+ ]
+ },
+ "stags": {
+ "s-tag": [
+ "string"
+ ],
+ "stag": [
+ "string"
+ ]
+ }
+ },
+ "heat-vlan-filters": {
+ "heat-vlan-filter": [
+ "string"
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "vm-type": "string",
+ "vm-type-tag": "string"
+ }
+ ]
+ }
+ },
+ "vf-module-parameters": {
+ "param": [
+ {
+ "name": "string",
+ "resource-resolution-data": {
+ "capability-name": "string",
+ "payload": "string",
+ "resource-key": [
+ {
+ "name": "string",
+ "value": "string"
+ }
+ ],
+ "status": "string"
+ },
+ "value": "string"
+ }
+ ]
+ },
+ "vf-module-topology-identifier": {
+ "vf-module-id": "45841173-3729-4a1d-a811-a3bde399e22d",
+ "vf-module-name": "some-vf-module-name",
+ "vf-module-type": "some-vf-module-type"
+ }
+ },
+ "vnf-information": {
+ "onap-model-information": {
+ "model-customization-uuid": "602c6bcc-6cfa-41cb-a8a7-968b38d5935f",
+ "model-invariant-uuid": "bdb4f943-c9be-4742-b976-a34607f3687e",
+ "model-name": "SMSF-NC2-578",
+ "model-uuid": "86c76b5d-fa8d-4034-b79a-1cc4326021a9",
+ "model-version": "3.0"
+ },
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "vnf-name": "mytestvnf",
+ "vnf-type": "SMSF-NC2-578-SVC/SMSF-NC2-578"
+ }
+ },
+ "vf-module-id": "45841173-3729-4a1d-a811-a3bde399e22d"
+ }
+ ]
+ },
+ "vnf-information": {
+ "onap-model-information": {
+ "model-customization-uuid": "602c6bcc-6cfa-41cb-a8a7-968b38d5935f",
+ "model-invariant-uuid": "bdb4f943-c9be-4742-b976-a34607f3687e",
+ "model-name": "SMSF-NC2-578",
+ "model-uuid": "86c76b5d-fa8d-4034-b79a-1cc4326021a9",
+ "model-version": "3.0"
+ },
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "vnf-name": "mytestvnf",
+ "vnf-type": "SMSF-NC2-578-SVC/SMSF-NC2-578"
+ },
+ "vnf-level-oper-status": {
+ "create-timestamp": "string",
+ "last-action": "CreateNetworkInstance",
+ "last-order-status": "Active",
+ "last-rpc-action": "assign",
+ "last-svc-request-id": "9c06a7c6-be3a-4530-bdd8-c65b58f123a5",
+ "modify-timestamp": "string",
+ "order-status": "Active"
+ },
+ "vnf-request-input": {
+ "aic-clli": "string",
+ "aic-cloud-region": "test-region",
+ "cloud-owner": "unit-test",
+ "request-version": "string",
+ "tenant": "string",
+ "vnf-name": "mytestvnf",
+ "vnf-networks": {
+ "vnf-network": [
+ {
+ "contrail-network-fqdn": "string",
+ "is-trunked": true,
+ "network-id": "69f09279-8af1-4475-83cf-7e357c579dbf",
+ "network-name": "test-network-name",
+ "network-role": "test-network-role",
+ "neutron-id": "812562dd-9d91-4ba6-9c3e-e52bf1cd4cc6",
+ "related-networks": {
+ "related-network": [
+ {
+ "network-id": "69f09279-8af1-4475-83cf-7e357c579dbf",
+ "network-role": "test-network-role",
+ "vlan-tags": {
+ "is-private": true,
+ "lower-tag-id": 0,
+ "upper-tag-id": 0,
+ "vlan-interface": "string"
+ }
+ }
+ ]
+ },
+ "segmentation-id": "string",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "cidr-mask": "string",
+ "dhcp-enabled": "Y",
+ "gateway-address": "string",
+ "ip-version": "string",
+ "network-start-address": "string",
+ "sdnc-subnet-id": "string",
+ "subnet-id": "string",
+ "subnet-name": "string",
+ "subnet-role": "string"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "vnf-topology": {
+ "aic-clli": "string",
+ "aic-cloud-region": "test-region",
+ "cloud-owner": "unit-test",
+ "onap-model-information": {
+ "model-customization-uuid": "602c6bcc-6cfa-41cb-a8a7-968b38d5935f",
+ "model-invariant-uuid": "bdb4f943-c9be-4742-b976-a34607f3687e",
+ "model-name": "SMSF-NC2-578",
+ "model-uuid": "86c76b5d-fa8d-4034-b79a-1cc4326021a9",
+ "model-version": "3.0"
+ },
+ "sdnc-generated-cloud-resources": true,
+ "tenant": "string",
+ "vnf-resource-assignments": {
+ "availability-zones": {
+ "availability-zone": [
+ "string"
+ ],
+ "max-count": 0
+ },
+ "vnf-networks": {
+ "vnf-network": [
+ {
+ "contrail-network-fqdn": "string",
+ "is-trunked": true,
+ "network-id": "69f09279-8af1-4475-83cf-7e357c579dbf",
+ "network-name": "test-network-name",
+ "network-role": "test-network-role",
+ "neutron-id": "812562dd-9d91-4ba6-9c3e-e52bf1cd4cc6",
+ "related-networks": {
+ "related-network": [
+ {
+ "network-id": "69f09279-8af1-4475-83cf-7e357c579dbf",
+ "network-role": "test-network-role",
+ "vlan-tags": {
+ "is-private": true,
+ "lower-tag-id": 0,
+ "upper-tag-id": 0,
+ "vlan-interface": "string"
+ }
+ }
+ ]
+ },
+ "segmentation-id": "string",
+ "subnets-data": {
+ "subnet-data": [
+ {
+ "cidr-mask": "string",
+ "dhcp-enabled": "Y",
+ "gateway-address": "string",
+ "ip-version": "string",
+ "network-start-address": "string",
+ "sdnc-subnet-id": "string",
+ "subnet-id": "string",
+ "subnet-name": "string",
+ "subnet-role": "string"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "vnf-status": "string"
+ },
+ "vnf-topology-identifier-structure": {
+ "nf-code": "string",
+ "nf-function": "string",
+ "nf-role": "string",
+ "nf-type": "string",
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4",
+ "vnf-name": "mytestvnf",
+ "vnf-type": "SMSF-NC2-578-SVC/SMSF-NC2-578"
+ }
+ }
+ },
+ "vnf-id": "fae319cc-68d6-496f-be1e-a09e133c71d4"
+ }
+} \ No newline at end of file
diff --git a/ms/gra/gra-docker/README.md b/ms/gra/gra-docker/README.md
new file mode 100644
index 0000000..bfc1140
--- /dev/null
+++ b/ms/gra/gra-docker/README.md
@@ -0,0 +1,69 @@
+# generic-resource-api docker
+This creates the internal AT&T docker for the generic resource api microservice.
+
+## Prerequisites for doing local build
+Before doing local builds, you'll need to do the following one-time setup steps:
+
+1. Install docker and docker-compose
+1. Make sure your id is in the 'docker' user group so that you can run docker commands.
+1. Start a local docker registry by running `sudo docker run -d -p 5000:5000 --restart=always --name registry registry:2`
+1. Login to dockercentral with your attuid/itservices password by running `docker login dockecentral.it.att.com:5100`
+
+## Creating a local build
+To do a local build, run this command:
+ mvn clean package -Ddocker.push.registry=localhost:5000 -Ddocker.buildArg.http_proxy=$http_proxy -Ddocker.buildArg.https_proxy=$https_proxy -Ddocker.buildArg.no_proxy=$no_proxy
+
+## Environment variables
+The generic-resource-api ms expects the following environment variables to be set:
+### MySQL Credentuals
+* MYSQL_ROOT_PASSWORD
+* MYSQL_USER
+* MYSQL_PASSWORD
+* MYSQL_DATABASE
+### OpenDaylight controller credentials
+* ODL_USER
+* ODL_PASSWORD
+### DMAAP message router credentials
+* DMAAP_USER
+* DMAAP_PASSWORD
+* DMAAP_AUTHKEY
+### AAI credentials
+* AAI_TRUSTSTORE_PASSWORD
+* AAI_CLIENT_NAME
+* AAI_CLIENT_PASSWORD
+### Ansible credentials
+* ANSIBLE_TRUSTSTORE_PASSWORD
+* ANSIBLE_USER
+* ANSIBLE_PASSWORD
+### Honeycomb credentials
+* HONEYCOMB_USER
+* HONEYCOMB_PASSWORD
+### SSL/TLS truststore/keystore credentials
+* TRUSTSTORE_PASSWORD
+* KEYSTORE_PASSWORD
+* CACERT_PASSWORD
+* SDNC_KEYSTORE_PASSWORD
+### Naming microservice credentials
+* NENG_USER
+* NENG_PASSWORD
+### SO credentials
+* SO_USER
+* SO_PASSWORD
+### CDS credentials
+* CDS_USER
+* CDS_PASSWORD
+### Sql encryption key
+export SQL_CRYPTKEY=QtfJMKggVk
+### ASDC credentials
+* ASDC_USER
+* ASDC_PASSWORD
+### AAF IP address (only needed by docker-compose.yml - does not need to be set in helm chart)
+* AAF_IP_ADDRESS
+
+## Running local copy
+To start a local copy of the generic-resource-api:
+1. cd to src/main/dc
+1. run `docker-compose up -d`
+1. To view logs, run `docker-compose logs -f`
+
+
diff --git a/ms/gra/gra-docker/pom.xml b/ms/gra/gra-docker/pom.xml
index 4bb725c..6af3413 100644
--- a/ms/gra/gra-docker/pom.xml
+++ b/ms/gra/gra-docker/pom.xml
@@ -18,15 +18,26 @@
<url>http://wiki.onap.org</url>
<properties>
+ <image.build.properties.file>/image.build.properties</image.build.properties.file>
+ <chart.update.properties.file>/chart.update.properties</chart.update.properties.file>
<base.image.name>onap/ccsdk-alpine-j11-image</base.image.name>
- <image.name>onap/sdnc-gra-image</image.name>
+ <base.image.version>${ccsdk.docker.version}</base.image.version>
+ <platform.logic.group>org.onap.ccsdk.distribution</platform.logic.group>
+ <platform.logic.version>${ccsdk.distribution.version}</platform.logic.version>
+ <image.name>onap/sdnc-gra</image.name>
<ccsdk.project.version>${project.version}</ccsdk.project.version>
<ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
<sdnc.gra.jar>gra-app-${project.version}.jar</sdnc.gra.jar>
- <onap.truststore>truststoreONAPall.jks</onap.truststore>
+ <sdnc.uid>1001</sdnc.uid>
+ <truststore.file>truststore.jks</truststore.file>
<docker.push.phase>deploy</docker.push.phase>
+ <docker.push.retries>5</docker.push.retries>
<docker.autoCreateCustomNetworks>true</docker.autoCreateCustomNetworks>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <db.image.name>mariadb</db.image.name>
+ <db.image.version>10.5</db.image.version>
</properties>
<dependencies>
@@ -35,6 +46,17 @@
<artifactId>gra-app</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>com.microsoft.azure</groupId>
+ <artifactId>applicationinsights-agent</artifactId>
+ <version>3.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>${platform.logic.group}</groupId>
+ <artifactId>platform-logic-installer</artifactId>
+ <version>${platform.logic.version}</version>
+ <type>zip</type>
+ </dependency>
</dependencies>
@@ -48,11 +70,28 @@
<artifactId>gmaven-plugin</artifactId>
<executions>
<execution>
- <phase>validate</phase>
+ <phase>prepare-package</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
+ <source>
+ println 'repository: ' + project.properties['image.name'];
+ println 'tag: ' + project.version + '-' + project.properties['build.number'];
+ String dir = project.parent.build.directory;
+ println dir;
+ File mkDir = new File(dir);
+ File chartUpdateFile = new File(dir.concat(project.properties['chart.update.properties.file']));
+ mkDir.mkdirs();
+ dir = dir.concat(project.properties['image.build.properties.file']);
+ println dir;
+ File propFile = new File(dir);
+ propFile.createNewFile();
+ chartUpdateFile.createNewFile();
+ propFile.append('repository: ' + project.properties['image.name'] + '\n');
+ propFile.append('tag: ' + project.version + '-' + project.properties['build.number'] + '\n');
+ chartUpdateFile.append(' --set global.gra.image.tag=' + project.version + '-' + project.properties['build.number']);
+ </source>
<source>${basedir}/../../../TagVersion.groovy</source>
</configuration>
</execution>
@@ -62,7 +101,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
-
<executions>
<execution>
<id>copy-dependencies</id>
@@ -72,7 +110,7 @@
<phase>process-resources</phase>
<configuration>
<excludeTransitive>true</excludeTransitive>
- <outputDirectory>${project.build.directory}/docker-stage/opt/onap/sdnc/lib</outputDirectory>
+ <outputDirectory>${project.build.directory}/docker-stage/opt/sdnc/gra/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
@@ -85,18 +123,11 @@
<id>unpack dgs</id>
<phase>generate-sources</phase>
<goals>
- <goal>unpack</goal>
+ <goal>unpack-dependencies</goal>
</goals>
<configuration>
- <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc</outputDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>org.onap.sdnc.oam</groupId>
- <artifactId>platform-logic-installer</artifactId>
- <version>${sdnc.oam.version}</version>
- <type>zip</type>
- </artifactItem>
- </artifactItems>
+ <outputDirectory>${basedir}/target/docker-stage/opt/sdnc/gra</outputDirectory>
+ <includeArtifactIds>platform-logic-installer</includeArtifactIds>
</configuration>
</execution>
</executions>
@@ -132,7 +163,7 @@
</goals> <!-- here the phase you need -->
<phase>generate-resources</phase>
<configuration>
- <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/config</outputDirectory>
+ <outputDirectory>${basedir}/target/docker-stage/opt/sdnc/gra/config</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
@@ -153,7 +184,7 @@
</goals> <!-- here the phase you need -->
<phase>generate-resources</phase>
<configuration>
- <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/config</outputDirectory>
+ <outputDirectory>${basedir}/target/docker-stage/opt/sdnc/gra/config</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
@@ -172,7 +203,7 @@
</goals> <!-- here the phase you need -->
<phase>generate-resources</phase>
<configuration>
- <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/bin</outputDirectory>
+ <outputDirectory>${basedir}/target/docker-stage/opt/sdnc/gra/bin</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
@@ -181,6 +212,32 @@
</includes>
<filtering>true</filtering>
</resource>
+ <resource>
+ <directory>src/main/scripts</directory>
+ <includes>
+ <include>exportGraDaexim.sh</include>
+ <include>importGraDaexim.sh</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-restapi-templates</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals> <!-- here the phase you need -->
+ <phase>generate-resources</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage/opt/sdnc/gra/restapi/templates</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/templates</directory>
+ <includes>
+ <include>*.json</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
</resources>
</configuration>
</execution>
@@ -207,7 +264,7 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
- <version>0.28.0</version>
+ <version>0.34.0</version>
<inherited>false</inherited>
<configuration>
<images>
@@ -215,16 +272,22 @@
<name>${image.name}</name>
<build>
<cleanup>try</cleanup>
- <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <noCache>true</noCache>
+ <contextDir>${basedir}/target/docker-stage</contextDir>
<dockerFile>Dockerfile</dockerFile>
<tags>
<tag>${project.docker.latestminortag.version}</tag>
<tag>${project.docker.latestfulltag.version}</tag>
- <tag>${project.docker.latesttagtimestamp.version}</tag>
</tags>
</build>
+ <external>
+ <type>properties</type>
+ <prefix>docker</prefix>
+ <mode>override</mode>
+ </external>
</image>
</images>
+ <verbose>true</verbose>
</configuration>
<executions>
<execution>
@@ -243,7 +306,7 @@
<configuration>
<images>
<image>
- <name>mariadb:10.5</name>
+ <name>${db.image.name}:${db.image.version}</name>
<alias>gradb</alias>
<run>
<env>
@@ -266,7 +329,7 @@
</run>
</image>
<image>
- <name>${image.name}:${project.docker.latesttagtimestamp.version}</name>
+ <name>${image.name}:${project.docker.latestfulltag.version}</name>
<alias>gra-container</alias>
<run>
<env>
@@ -276,7 +339,7 @@
<MYSQL_PASSWORD>${gratest.mysql.password}</MYSQL_PASSWORD>
<MYSQL_DATABASE>${gratest.mysql.database}</MYSQL_DATABASE>
<LOG_LEVEL>INFO</LOG_LEVEL>
- <SDNC_CONFIG_DIR>/opt/onap/sdnc/config</SDNC_CONFIG_DIR>
+ <SDNC_CONFIG_DIR>/opt/sdnc/gra/config</SDNC_CONFIG_DIR>
</env>
<dependsOn>
<container>gradb</container>
diff --git a/ms/gra/gra-docker/src/main/dc/docker-compose.yaml b/ms/gra/gra-docker/src/main/dc/docker-compose.yaml
index 4b0bd46..682655e 100644
--- a/ms/gra/gra-docker/src/main/dc/docker-compose.yaml
+++ b/ms/gra/gra-docker/src/main/dc/docker-compose.yaml
@@ -12,15 +12,15 @@ services:
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- logging:
+ logging:
driver: "json-file"
- options:
+ options:
max-size: "30m"
max-file: "5"
-
-
+
+
gra:
- image: onap/sdnc-gra-image:latest
+ image: onap/sdnc-gra:latest
depends_on:
- db
container_name: gra_controller
@@ -28,10 +28,10 @@ services:
- "8181:8080"
- "8443:8443"
volumes:
- - ../resources/application.properties:/opt/onap/sdnc/config/application.properties
- - ../resources/cadi-example.properties:/opt/onap/sdnc/config/cadi.properties
- - ../resources/cadi-log.properties:/opt/onap/sdnc/config/cadi-log.properties
- - ../resources/cadi.keyfile:/opt/onap/sdnc/config/cadi.keyfile
+ - ../resources/application.properties:/opt/sdnc/gra/config/application.properties
+ # Uncomment line below to authenticate with AAF
+ # - ../resources/cadi-example.properties:/opt/sdnc/gra/config/cadi.properties
+ - ../resources/cadi-log.properties:/opt/sdnc/gra/config/cadi-log.properties
links:
- db:dbhost
environment:
@@ -40,16 +40,21 @@ services:
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- - SDNC_CONFIG_DIR=/opt/onap/sdnc/config
+ - ODL_USER=${ODL_USER}
+ - AAF_MECHID_CRED=${ODL_PASSWORD}
+ - ODL_URI=http://localhost:8080
+ - SDNC_CONFIG_DIR=/opt/sdnc/gra/config
- LOG_LEVEL=DEBUG
- TRUSTSTORE_PASSWORD=changeit
- CACERT_PASSWORD=changeit
- - SDNC_CERT_DIR=/opt/onap/sdnc/config
+ - SDNC_CERT_DIR=/opt/sdnc/gra/config
- JAVA_SECURITY_DIR=/usr/lib/jvm/default-jvm/jre/lib/security
- TRUSTSTORE=truststoreONAPall.jks
- logging:
+ - SDNNFT_HOST=${SDNNFT_HOST:-localhost}
+ - LOG_PATH=/opt/sdnc/gra/logs
+ logging:
driver: "json-file"
- options:
+ options:
max-size: "30m"
max-file: "5"
extra_hosts:
@@ -67,7 +72,7 @@ services:
ports:
- "3200:3100"
volumes:
- - ${HOME}/gerrit/sdnc/oam/platform-logic:/opt/onap/ccsdk/platform-logic
+ - ${HOME}/st_sdncp/platform-logic:/opt/onap/ccsdk/platform-logic
links:
- db:dbhost
- db:sdnctldb01
@@ -78,8 +83,8 @@ services:
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- logging:
+ logging:
driver: "json-file"
- options:
+ options:
max-size: "30m"
max-file: "5"
diff --git a/ms/gra/gra-docker/src/main/docker/Dockerfile b/ms/gra/gra-docker/src/main/docker/Dockerfile
index 37c2ee6..54e8c1a 100644
--- a/ms/gra/gra-docker/src/main/docker/Dockerfile
+++ b/ms/gra/gra-docker/src/main/docker/Dockerfile
@@ -1,44 +1,49 @@
# Prepare stage for multistage image build
## START OF STAGE0 ##
-FROM @base.image.name@:@ccsdk.docker.version@ AS stage0
+FROM @base.image.name@:@base.image.version@ AS stage0
ENV LOG_PATH /var/log/onap/sdnc
-ENV SDNC_CONFIG_DIR /opt/onap/sdnc/config
-ENV TRUSTSTORE @onap.truststore@
+ENV SDNC_CONFIG_DIR /opt/sdnc/gra/config
+ENV TRUSTSTORE @truststore.file@
ENV JAVA_SECURITY_DIR /opt/java/openjdk/lib/security
USER root
# copy deliverables to opt
COPY opt /opt
-# Install ONAP certificates
+# Install certificates
RUN keytool -importkeystore -srckeystore ${SDNC_CONFIG_DIR}/${TRUSTSTORE} -srcstorepass changeit -destkeystore ${JAVA_SECURITY_DIR}/cacerts -deststorepass changeit -noprompt
## END OF STAGE0 ##
-FROM @base.image.name@:@ccsdk.docker.version@
+FROM @base.image.name@:@base.image.version@
MAINTAINER SDNC Team (onap-sdnc@lists.onap.org)
ENV PROJECT_VERSION @project.version@
-ENV SDNC_HOME /opt/onap/sdnc
-ENV SDNC_CONFIG_DIR /opt/onap/sdnc/config
+ENV SDNC_HOME /opt/sdnc/gra
+ENV SDNC_CONFIG_DIR /opt/sdnc/gra/config
ENV GRA_JAR @sdnc.gra.jar@
-ENV SVCLOGIC_PROPERTIES /opt/onap/sdnc/config/svclogic.properties
-ENV SVCLOGIC_DIR /opt/onap/sdnc/svclogic/graphs
+ENV SDNC_UID @sdnc.uid@
+ENV SVCLOGIC_PROPERTIES /opt/sdnc/gra/config/svclogic.properties
+ENV SVCLOGIC_DIR /opt/sdnc/gra/service-logic/graphs
ENV LOG_PATH /var/log/onap/sdnc
USER root
-# Install sudo and IP utilities
-RUN apk update && apk --no-cache add sudo iputils openssl
+# Install sudo, IP utilities and openjdk 11
+RUN export http_proxy=http://sub.proxy.att.com:8080 \
+ && export https_proxy=http://sub.proxy.att.com:8080 \
+ && apk update && apk --no-cache add bash curl mysql-client sudo iputils openssl \
+ && unset http_proxy \
+ && unset https_proxy
# Enable wheel group
RUN sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' -i /etc/sudoers
# Create sdnc user
-RUN addgroup -S sdnc && adduser -S sdnc -G sdnc
+RUN addgroup -g ${SDNC_UID} -S sdnc && adduser -u ${SDNC_UID} -G sdnc -S sdnc
RUN addgroup sdnc wheel
COPY --from=stage0 --chown=sdnc:sdnc /opt /opt
@@ -48,5 +53,6 @@ RUN chmod +x ${SDNC_HOME}/bin/*.sh
USER sdnc
WORKDIR ${SDNC_HOME}
-ENTRYPOINT /opt/onap/sdnc/bin/startGra.sh
+ENTRYPOINT /opt/sdnc/gra/bin/startGra.sh
EXPOSE 8443 8080
+
diff --git a/ms/gra/gra-docker/src/main/resources/application.properties b/ms/gra/gra-docker/src/main/resources/application.properties
index 3feb604..30f5077 100644
--- a/ms/gra/gra-docker/src/main/resources/application.properties
+++ b/ms/gra/gra-docker/src/main/resources/application.properties
@@ -23,3 +23,6 @@ spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.Ph
spring.jpa.database=mysql
cadi.properties.path=${SDNC_CONFIG_DIR}/cadi.properties
+swagger-ui.host=${SDNNFT_HOST:localhost}
+swagger-ui.title=SDN-NFT: GRA microservice
+swagger-ui.description=SDN-NFT GRA microservice API documentation
diff --git a/ms/gra/gra-docker/src/main/resources/contrail-adaptor.properties b/ms/gra/gra-docker/src/main/resources/contrail-adaptor.properties
new file mode 100644
index 0000000..c6d98f4
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/resources/contrail-adaptor.properties
@@ -0,0 +1,40 @@
+keystone.username=admin
+keystone.password=admin
+tenant.password=admin
+contrail.template.dir=/opt/lsc/restapi/templates
+max.retry.count=3
+retry.wait=5000
+request.timeout=10000
+
+simulateResponse=false
+keystone.dummy.cache=true
+orm.dummy.cache=true
+use.orm=true
+
+cloud.config.use=false
+cloud.config.filename=cloud_config.json
+cloud.config.refresh.timer=1000
+
+#orm.default_keystone_url_version=/v3
+orm.default_keystone_url_version=/v2.0
+orm.default_keystone_version_regex=/[vV][0-9]
+orm.default_orm_url_replace_this=8080
+orm.default_orm_url_replace_with_this=7080
+orm.aic.client=ECOMP-SDNCP
+contrail.url.regex=sdn-l-config
+
+#properties need to create json for policymanager configBody
+configBody.service:NetworkPolicy
+configBody.version:1.3.0.1
+configBody.configName:Search
+configBody.policyScope:SDNC
+configBody.templateVersion:1607
+configBody.location:Search
+configBody.uuid:Search
+configBody.priority:2
+configBody.riskType:low
+configBody.riskLevel:2
+configBody.guard:True
+
+aic.contrail.proxy=none
+aic.keystone.proxy=none
diff --git a/ms/gra/gra-docker/src/main/resources/contrail-api-path.properties b/ms/gra/gra-docker/src/main/resources/contrail-api-path.properties
new file mode 100644
index 0000000..4c04d0e
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/resources/contrail-api-path.properties
@@ -0,0 +1,59 @@
+network-policy.create.path=/network-policys
+network-policy.create.method=NetworkPolicy.createNetworkPolicy
+network-policy.create.hasTemplateFile=Y
+
+network-policy.get.path=/network-policy/{contrail-network-policy-id}
+network-policy.get.method=NetworkPolicy.getNetworkPolicy
+network-policy.get.hasTemplateFile=N
+
+network-policy.delete.path=/network-policy/{contrail-network-policy-id}
+network-policy.delete.method=NetworkPolicy.deleteNetworkPolicy
+network-policy.delete.hasTemplateFile=N
+
+network-policy.update.path=/network-policy/{contrail-network-policy-id}
+network-policy.update.method=NetworkPolicy.updateNetworkPolicy
+network-policy.update.hasTemplateFile=Y
+
+network-policy.apply.path=/virtual-network/{contrail-virtual-network-id}
+network-policy.apply.method=NetworkPolicy.applyNetworkPolicy
+network-policy.apply.hasTemplateFile=N
+
+network-policy.remove.path=/virtual-network/{contrail-virtual-network-id}
+network-policy.remove.method=NetworkPolicy.removeNetworkPolicy
+network-policy.remove.hasTemplateFile=N
+
+virtual-networks.get.path=/virtual-networks
+virtual-networks.get.method=NetworkPolicy.getVirtualNetworks
+virtual-networks.get.hasTemplateFile=N
+
+virtual-network.get.path=/virtual-network/{contrail-virtual-network-id}
+virtual-network.get.method=NetworkPolicy.getVirtualNetwork
+virtual-network.get.hasTemplateFile=N
+
+fqname-to-uuid.get.path=/fqname-to-id
+fqname-to-uuid.get.method=NetworkPolicy.getFqNameToUuid
+fqname-to-uuid.get.hasTemplateFile=Y
+
+id-to-fqname.get.path=/id-to-fqname
+id-to-fqname.get.method=NetworkPolicy.getIdToFqName
+id-to-fqname.get.hasTemplateFile=N
+
+virtual-machine-interface.get.path=/virtual-machine-interface/{contrail-virtual-machine-interface-id}
+virtual-machine-interface.get.method=PortMirroring.getVirtualMachineInterface
+virtual-machine-interface.get.hasTemplateFile=N
+
+port-mirroring.enable.path=/virtual-machine-interface/{contrail-virtual-machine-interface-id}
+port-mirroring.enable.method=PortMirroring.enablePortMirroring
+port-mirroring.enable.hasTemplateFile=Y
+
+port-mirroring.disable.path=/virtual-machine-interface/{contrail-virtual-machine-interface-id}
+port-mirroring.disable.method=PortMirroring.disablePortMirroring
+port-mirroring.disable.hasTemplateFile=Y
+
+subnet.add.path=/virtual-network/{contrail-virtual-network-id}
+subnet.add.method=NetworkPolicy.addSubnet
+subnet.add.hasTemplateFile=N
+
+subnet.delete.path=/virtual-network/{contrail-virtual-network-id}
+subnet.delete.method=NetworkPolicy.deleteSubnet
+subnet.delete.hasTemplateFile=N
diff --git a/ms/gra/gra-docker/src/main/resources/eipam.properties b/ms/gra/gra-docker/src/main/resources/eipam.properties
new file mode 100644
index 0000000..22052fe
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/resources/eipam.properties
@@ -0,0 +1,63 @@
+eipam.templateDir=/opt/sdnc/gra/restapi/templates/
+
+#mS is new in 1810, URL is driven by DME2
+eipam.service=microservice-router.lpp.att.com/services/microservice_router/v1/routes
+
+#DME proxy does not work in containers(1908), workaround is to call alternate.url
+# 1906/1908 Can be Direct call or LGW to replace DME2
+#1906 Direct call
+#eipam.alternate.url=https://st3-lppajsc.oss.att.com:8666/services/microservice_router/v1/routes
+#1908 LGW to replace DME2
+#eipam.alternate.url=https://eipam1-ipaddress.dev.att.com
+#eipam.rest.urlEndPoint=/eipam/rest/ipassignment/
+eipam.alternate.url=https://eipam-ipaddress1.stage.att.com
+
+# subContext for Direct Call, if used the LGW subContext below need to be commented out
+#eipam.subContext.assign=/eipamIP/assign
+#eipam.subContext.unassign=/eipamIP/unassign
+#eipam.subContext.createPool=/eipamIP/createPool
+#eipam.subContext.deletePool=/eipamIP/deletePool
+#eipam.subContext.getPlanTopology=/eipamIP/topology
+#eipam.subContext.getIPAddress=/eipamIP/getIP
+#eipam.subContext.allocateSubnet=/eipamIP/allocate
+#eipam.subContext.deallocateSubnet=/eipamIP/deallocate
+#eipam.subContext.activateSubnet=/eipamIP/activateSubnet
+#eipam.subContext.ping=/eipamIP/ping
+#eipam.subContext.getPool=/eipamIP/getPool
+#eipam.subContext.examineIP=/eipamIP/examineIP
+
+eipam.httpMethod.assign=PUT
+eipam.httpMethod.unassign=POST
+eipam.httpMethod.createPool=PUT
+eipam.httpMethod.deletePool=POST
+eipam.httpMethod.getPlanTopology=GET
+eipam.httpMethod.getIPAddress=GET
+eipam.httpMethod.allocateSubnet=PUT
+eipam.httpMethod.deallocateSubnet=PUT
+eipam.httpMethod.activateSubnet=PUT
+eipam.httpMethod.ping=GET
+eipam.httpMethod.getPool=POST
+eipam.httpMethod.examineIP=POST
+
+# subContext for LGW, if used the above Direct Call subContext need to be commented out
+eipam.subContext.assign=/eipam/restservices/v1/ipaddress/assign
+eipam.subContext.unassign=/eipam/restservices/v1/ipaddress/unassign
+eipam.subContext.createPool=/eipam/restservices/v1/ipaddress/pool
+eipam.subContext.deletePool=/eipam/restservices/v1/ipaddress/pool/remove
+eipam.subContext.getPlanTopology=/eipam/restservices/v1/ipaddress/plantopology
+eipam.subContext.getIPAddress=/eipam/restservices/v1/ipaddress
+eipam.subContext.allocateSubnet=/eipam/restservices/v1/ipaddress/subnet/allocate
+eipam.subContext.deallocateSubnet=/eipam/restservices/v1/ipaddress/subnet/deallocate
+eipam.subContext.activateSubnet=/eipam/restservices/v1/ipaddress/subnet/activate
+eipam.subContext.ping=/eipam/restservices/v1/ipaddress/ping
+eipam.subContext.getPool=/eipam/restservices/v1/ipaddress/pool
+eipam.subContext.examineIP=/eipam/restservices/v1/ipaddress/examineIPAddressInfo
+
+eipam.connectionTimeout=30000
+eipam.receiveTimeout=60000
+#eipam.version=0.1
+#eipam.envContext=TEST
+#eipam.routeOffer=ST3
+eipam.client=sdn_cp_ws
+eipam.msgid=sdn
+eipam.wss.user=sdn_cp_ws
diff --git a/ms/gra/gra-docker/src/main/resources/generic-resource-api-dg.properties b/ms/gra/gra-docker/src/main/resources/generic-resource-api-dg.properties
index 3751142..908c32b 100644
--- a/ms/gra/gra-docker/src/main/resources/generic-resource-api-dg.properties
+++ b/ms/gra/gra-docker/src/main/resources/generic-resource-api-dg.properties
@@ -1,7 +1,44 @@
-restapi.templateDir=/opt/onap/sdnc/restapi/templates
+restapi.templateDir=/opt/sdnc/gra/restapi/templates
controller.url=http://localhost:8080
controller.user=${ODL_USER}
controller.pwd=${ODL_PASSWORD}
+bondingservice.server=${ADMIN_PORTAL_URL}
+bondingservice.user=${ODL_USER}
+bondingservice.password=${ODL_PASSWORD}
+bondingservice.authorization=${BONDING_SERVICE_CRED}
+bondingservice.uri=/provisioningms/v1/bondingservice/{action}
+cloud-region.cloud-owner=att-aic
+policy-manager.url=${POLICY_MANAGER_URL}
+policy-manager.authorization=${POLICY_AUTHORIZATION_CRED}
+policy-manager.clientauth=${POLICY_CLIENTAUTH_CRED}
+policy-manager.environment=TEST
+# MICROSERVICE
+rt.mS.user=${ODL_USER}
+rt.mS.pwd=${ODL_PASSWORD}
+rt.mS.routeTarget.type=dme2proxy
+rt.mS.routeTarget.service=microservice-router.lpp.att.com/services/microservice_router/v1/routes
+rt.ms.allocateRouteTarget.subContext=/nwrouting/allocateroutetarget/
+rt.ms.releaseRouteTarget.subContext=/nwrouting/releaseroutetarget/
+rt.ms.routeTarget.version=0.1
+rt.ms.routeTarget.envContext=TEST
+rt.ms.routeTarget.routeOffer=ST3
+rt.ms.routeTarget.appId=SDNCP
+# VLAN-TAG MICROSERVICE
+vt.mS.url=${ADMIN_PORTAL_URL}
+vt.mS.user=${ODL_USER}
+vt.mS.pwd=${ODL_PASSWORD}
+# MAC Address MICROSERVICE
+ma.mS.url=${ADMIN_PORTAL_URL}
+ma.mS.user=${ODL_USER}
+ma.mS.pwd=${ODL_PASSWORD}
+# CDS ipassign mS
+ipassign.ms.url=${IPASSIGN_URL}
+ipassign.ms.user=${ODL_USER}
+ipassign.ms.pwd=${ODL_PASSWORD}
+# CDS Naming mS
+naming.ms.url=${NAMING_MS_URL}
+naming.ms.user=${ODL_USER}
+naming.ms.pwd=${ODL_PASSWORD}
honeycomb.url=http://{honeycomb-instance-ip}:8183
honeycomb.user=${HONEYCOMB_USER}
honeycomb.pwd=${HONEYCOMB_PASSWORD}
@@ -29,6 +66,35 @@ restapi.vpp.xconnect.templatefile=vcpe-l2-interface.json
restapi.tx.templatefile=tunnelxconn-allotted-resource.json
restapi.parentsvc.templatefile=parent-provided-allotted-resource.json
restapi.network-ar.templatefile=network-provided-allotted-resources.json
+restapi.pm.getpolicy.templatefile=pm-get-policy.json
+restapi.pm.createpolicy.templatefile=pm-create-policy.json
+restapi.pm.pushpolicy.templatefile=pm-push-policy.json
+restapi.pm.deletepolicypdp.templatefile=pm-delete-policy-pdp.json
+restapi.pm.deletepolicypap.templatefile=pm-delete-policy-pap.json
+restapi.portmirrorconfig.templatefile=port-mirror-configuration.json
+restapi.genconfig.templatefile=gc-configuration.json
+restapi.vnfsubinterfacegroup.templatefile=vnf-sub-interface-group.json
+restapi.bondingservice.templatefile=bonding-service.json
+restapi.bondingservicerebuild.templatefile=bonding-service-rebuild.json
+restapi.forwardingpath.templatefile=forwarding-path.json
+restapi.network.templatefile=network.json
+restapi.network-instance-group.templatefile=network-instance-group.json
+restapi.network-instance-group-network.templatefile=network-instance-group-network.json
+restapi.network-instance-group-vpn-binding.templatefile=network-instance-group-vpn-binding.json
+restapi.csm.serviceinstance.templatefile=csm-service-instance.json
+restapi.mS.allocateRT.templatefile=allocate-route-target.json
+restapi.mS.releaseRT.templatefile=release-route-target.json
+restapi.ss.vnf.templatefile=self-serve-vnf-assignments.json
+restapi.ss.vfmodule.templatefile=self-serve-vfmodule-assignments.json
+restapi.ss.caprelease.templatefile=self-serve-capacity-release.json
+restapi.ss.capreserve.templatefile=self-serve-capacity-reserve.json
+restapi.ss.capreserve.targettype=Site
+restapi.ss.mS.vlan.tag.assign.templatefile=self-serve-mS-vlan-tag-assignments.json
+restapi.ss.mS.vlan.tag.unassign.templatefile=self-serve-mS-vlan-tag-unassignments.json
+restapi.ss.mS.mac.address.assign.templatefile=self-serve-mS-mac-address-assign.json
+restapi.ss.mS.mac.address.unassign.templatefile=self-serve-mS-mac-address-unassign.json
+restapi.ss.cds.ipassign.templatefile=self-serve-ipassign-unassign.json
+restapi.ss.cds.naming.templatefile=self-serve-naming-unassign.json
restapi.vnf-ar.templatefile=vnf-provided-allotted-resources.json
restapi.services.templatefile=vcpe-services-service.json
restapi.services.vnf.vfmodule.templatefile=vfmodule-vim-parameters.vgw.json
@@ -48,30 +114,49 @@ restapi.ss.mS.mac.address.unassign.templatefile=self-serve-mS-mac-address-unassi
cloud-region.cloud-owner=CloudOwner
# URLs
-restapi.cr-allottedresource=/restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}/
-restapi.sz-allottedresource=/restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/{allotted-resource-id}/
restapi.brg-allottedresource=/restconf/config/GENERIC-RESOURCE-API:brg-allotted-resources/brg-allotted-resource/{allotted-resource-id}/
-restapi.vpp-honeycomb=/restconf/config/ietf-interfaces:interfaces/interface/{tunnel-name}/
-restapi.tx-allottedresource=/restconf/config/GENERIC-RESOURCE-API:tunnelxconn-allotted-resources/tunnelxconn-allotted-resource/{allotted-resource-id}/
-restapi.vnf-provided-allottedresource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-provided-allotted-resources/
+restapi.cds.ipassign.service=/ippm/restservices/v2/ipaddresses/unassign/
+restapi.cds.naming.service=/web/service/v1/genNetworkElementName/cds/
+restapi.connection-attachment-allottedresource=/restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/{allotted-resource-id}/
+restapi.cr-allottedresource=/restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}/
+restapi.forwarding-path=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/forwarding-paths/forwarding-path/
+restapi.gc-configuration=/restconf/config/GENERIC-RESOURCE-API:generic-configurations/gc-configuration/{configuration-id}/
+restapi.mS.allocateRT=/vpnmicroservice/v1/vpn/allocateroutetarget/
+restapi.mS.releaseRT=/vpnmicroservice/v1/vpn/releaseroutetarget/
+restapi.naming.gen-name.service=/web/service/v1/genNetworkElementName/
+restapi.network-by-id=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/
+restapi.network-instance-group-network=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-groups/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/
+restapi.network-instance-group-network=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-groups/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/
+restapi.network-instance-group-vpn-binding=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-groups/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/vpn-bindings/{vpn-binding-id}/
+restapi.network-instance-group=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-groups/network-instance-group/{network-instance-group-id}/
+restapi.network-level-oper-status=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-level-oper-status/
restapi.network-provided-allottedresource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-provided-allotted-resources/
-restapi.pm-configuration=/restconf/config/GENERIC-RESOURCE-API:port-mirror-configurations/port-mirror-configuration/{configuration-id}/
+restapi.network-provided-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-provided-allotted-resources/
+restapi.network-topology-identifier-structure=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-topology/network-topology-identifier-structure/
restapi.network=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/
-restapi.vnf=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/
-restapi.vnf-api.service-information=/restconf/config/VNF-API:vnfs/vnf-list/{vnf-id}/service-data/
restapi.parent-provided-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/provided-allotted-resources/provided-allotted-resource/{allotted-resource-id}/
-restapi.network-provided-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-provided-allotted-resources/
-restapi.services=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/
+restapi.pm-configuration=/restconf/config/GENERIC-RESOURCE-API:port-mirror-configurations/port-mirror-configuration/{configuration-id}/
+restapi.preload-network=/restconf/config/GENERIC-RESOURCE-API:preload-information/preload-list/{network-name}/network/preload-data/preload-network-topology-information/
+restapi.preloadinformation=/restconf/config/GENERIC-RESOURCE-API:preload-information/preload-list/
restapi.service.vnf.vfmodule-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/
-restapi.connection-attachment-allottedresource=/restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/{allotted-resource-id}/
-restapi.naming.gen-name.service=/web/service/v1/genNetworkElementName
-restapi.ss-pnf-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/pnfs/pnf/{pnf-id}/
-restapi.ss-vnf-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/
-restapi.ss-vfmodule-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/
-restapi.ss-mS-vlan-tag-assign=/vlantagapi/v1/{action}
+restapi.services=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/
restapi.ss-mS-mac-address-assign=/api/macaddress/v1/service/assign/
restapi.ss-mS-mac-address-unassign=/api/macaddress/v1/service/unassign/
-restapi.preload-network=/restconf/config/GENERIC-RESOURCE-API:preload-information/preload-list/{network-name}/network/preload-data/preload-network-topology-information/
-restapi.preloadinformation=/restconf/config/GENERIC-RESOURCE-API:preload-information/preload-list/
+restapi.ss-mS-vlan-tag-assign=/vlantagapi/v1/{action}
+restapi.ss-pnf-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/pnfs/pnf/{pnf-id}/
+restapi.ss-vfmodule-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/
+restapi.ss-vnf-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/
+restapi.sz-allottedresource=/restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/{allotted-resource-id}/
+restapi.tx-allottedresource=/restconf/config/GENERIC-RESOURCE-API:tunnelxconn-allotted-resources/tunnelxconn-allotted-resource/{allotted-resource-id}/
restapi.vf-module=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/
+restapi.vnf-api.service-information=/restconf/config/VNF-API:vnfs/vnf-list/{vnf-id}/service-data/
restapi.vnf-assign=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/
+restapi.vnf-level-oper-status=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-level-oper-status/
+restapi.vnf-network=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/vnf-resource-assignments/vnf-networks/vnf-network/{network-role}/
+restapi.vnf-networks=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/vnf-resource-assignments/vnf-networks/
+restapi.vnf-onap-model-information=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/onap-model-information/
+restapi.vnf-provided-allottedresource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-provided-allotted-resources/
+restapi.vnf-sub-interface-group=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-sub-interface-groups/vnf-sub-interface-group/{vnfc-instance-group-function}/{network-instance-group-function}/{parent-port-role}/
+restapi.vnf-topology.onap-model-information=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/onap-model-information/
+restapi.vnf=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/
+restapi.vpp-honeycomb=/restconf/config/ietf-interfaces:interfaces/interface/{tunnel-name}/
diff --git a/ms/gra/gra-docker/src/main/resources/log4j2.properties b/ms/gra/gra-docker/src/main/resources/log4j2.properties
index 9bc78a3..c4f4b88 100644
--- a/ms/gra/gra-docker/src/main/resources/log4j2.properties
+++ b/ms/gra/gra-docker/src/main/resources/log4j2.properties
@@ -21,7 +21,7 @@
property.logDir = ${env:LOG_PATH:-./target}
property.logLevel = ${env:LOG_LEVEL:-INFO}
-property.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{currentGraph} - %X{nodeId} | %m%n
+property.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|%-5.5p|%-32.32c{1}|%X{currentGraph} - %X{nodeId}|%replace{%m}{\\R}{ }%n
#default mdc values
property.ServiceName = INTERNAL
@@ -63,7 +63,7 @@ appender.debug.filePattern = ${logDir}/debug.log.%i
appender.debug.immediateFlush = true
appender.debug.append = true
appender.debug.layout.type = PatternLayout
-appender.debug.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|%-5.5p|%-32.32c{1}|%X{currentGraph} - %X{nodeId}|%m%n
+appender.debug.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|%-5.5p|%-32.32c{1}|%X{currentGraph} - %X{nodeId}|%replace{%m}{\\R}{ }%n
appender.debug.policies.type = Policies
appender.debug.policies.size.type = SizeBasedTriggeringPolicy
appender.debug.policies.size.size = 10MB
@@ -80,7 +80,7 @@ appender.error.filePattern = ${logDir}/error.log.%i
appender.error.immediateFlush = true
appender.error.append = true
appender.error.layout.type = PatternLayout
-appender.error.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|$${ctx:ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%p|$${ctx:ErrorCode}|$${ctx:ErrorDesc}|%m%n
+appender.error.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|$${ctx:ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%p|$${ctx:ErrorCode}|$${ctx:ErrorDesc}|%replace{%m}{\\R}{ }%ex{full}{separator(\\n)}%n
appender.error.policies.type = Policies
appender.error.policies.size.type = SizeBasedTriggeringPolicy
@@ -98,7 +98,7 @@ appender.metric.filePattern = ${logDir}/metric.log.%i
appender.metric.immediateFlush = true
appender.metric.append = true
appender.metric.layout.type = PatternLayout
-appender.metric.layout.pattern=%X{InvokeTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%-16.16t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceID}|%p|%X{Severity}|192.168.23.111|%X{ElapsedTime}|${hostName}|%X{ClientIPAddress}|%C{1}|||%X{TargetElement}|%markerSimpleName|%X|%X{currentGraph} - %X{nodeId}||%m%n
+appender.metric.layout.pattern=%X{InvokeTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%-16.16t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceID}|%p|%X{Severity}|192.168.23.111|%X{ElapsedTime}|${hostName}|%X{ClientIPAddress}|%C{1}|||%X{TargetElement}|%markerSimpleName|%replace{%X}{\\u007B|\\u007D}{}|%X{currentGraph} - %X{nodeId}||%m%n
appender.metric.policies.type = Policies
appender.metric.policies.size.type = SizeBasedTriggeringPolicy
appender.metric.policies.size.size = 10MB
@@ -113,7 +113,7 @@ appender.audit.filePattern = ${logDir}/audit.log.%i
appender.audit.immediateFlush = true
appender.audit.append = true
appender.audit.layout.type = PatternLayout
-appender.audit.layout.pattern=%X{EntryTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%-16.16t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceID}|INFO|%X{Severity}|192.168.23.111|%X{ElapsedTime}|${hostName}|%X{ClientIPAddress}|%C{1}|%X{AUDIT-Unused}|%X{AUDIT-ProcessKey}|%markerSimpleName|%X|||%m%n
+appender.audit.layout.pattern=%X{EntryTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%-16.16t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceID}|INFO|%X{Severity}|192.168.23.111|%X{ElapsedTime}|${hostName}|%X{ClientIPAddress}|%C{1}|%X{AUDIT-Unused}|%X{AUDIT-ProcessKey}|%markerSimpleName|%replace{%X}{\\u007B|\\u007D}{}|||%m%n
appender.audit.policies.type = Policies
appender.audit.policies.size.type = SizeBasedTriggeringPolicy
appender.audit.policies.size.size = 10MB
@@ -160,4 +160,4 @@ logger.ccsdk.name = org.onap.ccsdk
logger.ccsdk.level = DEBUG
logger.onaplogging.name = org.onap.logging
-logger.onaplogging.level = DEBUG \ No newline at end of file
+logger.onaplogging.level = DEBUG
diff --git a/ms/gra/gra-docker/src/main/resources/msoadaptor.properties b/ms/gra/gra-docker/src/main/resources/msoadaptor.properties
new file mode 100644
index 0000000..fb7fac9
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/resources/msoadaptor.properties
@@ -0,0 +1,5 @@
+adaptorName=com.att.sdnctl.sli.adaptor.mso.MSOAdaptor
+mso.user=dummy
+mso.passwd=dummy
+mso.restriction.uri=https://msoapih-s3.ecomp.cci.att.com:30275/restriction
+mso.sleep.timer=2000
diff --git a/ms/gra/gra-docker/src/main/resources/startGra.sh b/ms/gra/gra-docker/src/main/resources/startGra.sh
index 6bca0e0..66dd721 100644
--- a/ms/gra/gra-docker/src/main/resources/startGra.sh
+++ b/ms/gra/gra-docker/src/main/resources/startGra.sh
@@ -21,22 +21,74 @@
# ============LICENSE_END=========================================================
###
-export SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
-export GRA_JAR=${GRA_JAR:-@sdnc.gra.jar@}
-export SVCLOGIC_DIR=${SVCLOGIC_DIR:-opt/onap/sdnc/svclogic/graphs}
-export LOG_PATH=${LOG_PATH:-/var/log/onap/sdnc}
-export SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/onap/sdnc/config}
-export MYSQL_DB_HOST=${MYSQL_DB_HOST:-dbhost}
+export SDNC_HOME=${SDNC_HOME:-/opt/sdnc/gra}
+export SVCLOGIC_DIR=${SVCLOGIC_DIR:-/opt/sdnc/gra/service-logic/graphs}
+export LOG_PATH=${LOG_PATH:-/var/log/sdnc}
+export SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/sdnc/gra/config}
export SVCLOGIC_PROPERTIES=${SVCLOGIC_PROPERTIES:-${SDNC_CONFIG_DIR}/svclogic.properties}
+export SSL_DIR=${SSL_DIR:-/opt/sdnc/data/ssl}
+export SECRETS_DIR=${SECRETS_DIR:-/opt/app/secrets}
+export K8_NAMESPACE=${K8_NAMESPACE:-default}
-cd $SDNC_HOME
+if [ -f ${SECRETS_DIR}/${K8_NAMESPACE}-keystore-cred ]
+then
+ export AAF_KEYSTORE_CRED=$(cat ${SECRETS_DIR}/${K8_NAMESPACE}-keystore-cred)
+else
+ ls -l ${SECRETS_DIR}
+ echo "Not found: ${SECRETS_DIR}/${K8_NAMESPACE}-keystore-cred"
+fi
+
+if [ -f ${SECRETS_DIR}/${K8_NAMESPACE}-trustore-cred ]
+then
+ export AAF_TRUSTORE_CRED=$(cat ${SECRETS_DIR}/${K8_NAMESPACE}-trustore-cred | grep cadi_truststore_password | cut -d '=' -f 2 )
+else
+ ls -l ${SECRETS_DIR}
+ echo "Not found: ${SECRETS_DIR}/${K8_NAMESPACE}-trusture-cred"
+fi
+
+if [ -f ${SECRETS_DIR}/${K8_NAMESPACE}-keystore-jks ]
+then
+ cat ${SECRETS_DIR}/${K8_NAMESPACE}-keystore-jks | base64 -d > ${SSL_DIR}/keystore.jks
+ echo "base64 dec ${SSL_DIR}/keystore.jks"
+else
+ ls -l ${SECRETS_DIR}
+ echo "Not found: ${SECRETS_DIR}/${K8_NAMESPACE}-keystore-jks"
+fi
+
+env | sort
+
+#
+# Wait for database
+#
+echo "Waiting for database"
+until mysqladmin ping -h ${MYSQL_DB_HOST} --silent; do
+ printf "."
+ sleep 1
+done
+echo -e "\nDatabase ready"
+
+# Create tablespace and user account
+
+#mysql -h ${MYSQL_DB_HOST} -u root -p${MYSQL_ROOT_PASSWORD} mysql <<-END
+#CREATE DATABASE ${MYSQL_DB_DATABASE};
+#CREATE USER '${MYSQL_DB_USER}'@'localhost' IDENTIFIED BY '${MYSQL_DB_PASSWD}';
+#CREATE USER '${MYSQL_DB_USER}'@'%' IDENTIFIED BY '${MYSQL_DB_PASSWD}';
+#GRANT ALL PRIVILEGES ON ${MYSQL_DB_DATABASE}.* TO '${MYSQL_DB_USER}'@'localhost' WITH GRANT OPTION;
+#GRANT ALL PRIVILEGES ON ${MYSQL_DB_DATABASE}.* TO '${MYSQL_DB_USER}'@'%' WITH GRANT OPTION;
+#commit;
+#END
- echo "Waiting for mysql"
- until mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} &> /dev/null
- do
- printf "."
- sleep 1
- done
- echo -e "\nmysql ready"
-
-java -DserviceLogicDirectory=${SVCLOGIC_DIR} -DLOG_PATH=${LOG_PATH} -jar ${SDNC_HOME}/lib/${GRA_JAR}
+# Initialize schema
+if [ -f ${SDNC_CONFIG_DIR}/schema-mysql.sql ]
+then
+ mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} < ${SDNC_CONFIG_DIR}/schema-mysql.sql
+fi
+
+# Load data
+if [ -f ${SDNC_CONFIG_DIR}/data-mysql.sql ]
+then
+ mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} < ${SDNC_CONFIG_DIR}/data-mysql.sql
+fi
+
+cd $SDNC_HOME
+java ${JAVA_OPTS} -DserviceLogicDirectory=${SVCLOGIC_DIR} -DLOG_PATH=${LOG_PATH} -Dlog4j2.configurationFile=file:${SDNC_CONFIG_DIR}/log4j2.properties -jar ${SDNC_HOME}/lib/gra-app-*.jar
diff --git a/ms/gra/gra-docker/src/main/resources/truststore.jks b/ms/gra/gra-docker/src/main/resources/truststore.jks
new file mode 100644
index 0000000..6798c60
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/resources/truststore.jks
Binary files differ
diff --git a/ms/gra/gra-docker/src/main/scripts/chmodScripts.sh b/ms/gra/gra-docker/src/main/scripts/chmodScripts.sh
new file mode 100644
index 0000000..50d959f
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/scripts/chmodScripts.sh
@@ -0,0 +1,3 @@
+#/bin/bash
+echo $(pwd)
+chmod 755 target/docker-stage/opt/sdnc/gra/bin/startGra.sh
diff --git a/ms/gra/gra-docker/src/main/scripts/compareContrail.sh b/ms/gra/gra-docker/src/main/scripts/compareContrail.sh
new file mode 100755
index 0000000..5c613e7
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/scripts/compareContrail.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+if [ $# -eq 2 ]
+then
+ verbose=false
+ file1=$1
+ file2=$2
+elif [ $# -eq 3 -a $1 = "-v" ]
+then
+ verbose=true
+ file1=$2
+ file2=$3
+else
+ echo "Usage: $0 [-v] file1 file2"
+ exit 1
+fi
+
+tmppfx=contrail$$
+
+formattedfile1=/tmp/$tmppfx-formatted1
+formattedfile2=/tmp/$tmppfx-formatted2
+idlist1=/tmp/$tmppfx-contrail-ids-1
+idlist2=/tmp/$tmppfx-contrail-ids-2
+
+
+echo "Comparing $file1 to $file2 ...."
+
+cat $file1 | python3 -mjson.tool > $formattedfile1
+cat $file2 | python3 -mjson.tool > $formattedfile2
+
+cat $formattedfile1 | grep '"allotted-resource-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $idlist1
+cat $formattedfile2 | grep '"allotted-resource-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $idlist2
+
+echo
+echo "Diff of allotted resource ids:"
+echo "------------------------------"
+diff $idlist1 $idlist2
+
+if [ "$verbose" = "true" ]
+then
+ echo
+ echo "Full diff:"
+ echo "----------"
+ diff $formattedfile1 $formattedfile2
+fi
+
+echo
+echo "Allotted resource counts:"
+echo "-------------------------"
+echo " $file1 : $(cat $idlist1 | wc -l)"
+echo " $file2 : $(cat $idlist2 | wc -l)"
+
+
+
+
diff --git a/ms/gra/gra-docker/src/main/scripts/comparePortmirror.sh b/ms/gra/gra-docker/src/main/scripts/comparePortmirror.sh
new file mode 100755
index 0000000..5a39660
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/scripts/comparePortmirror.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+if [ $# -eq 2 ]
+then
+ verbose=false
+ file1=$1
+ file2=$2
+elif [ $# -eq 3 -a $1 = "-v" ]
+then
+ verbose=true
+ file1=$2
+ file2=$3
+else
+ echo "Usage: $0 [-v] file1 file2"
+ exit 1
+fi
+
+tmppfx=portmirror$$
+
+formattedfile1=/tmp/$tmppfx-formatted1
+formattedfile2=/tmp/$tmppfx-formatted2
+idlist1=/tmp/$tmppfx-configuration-ids-1
+idlist2=/tmp/$tmppfx-configuration-ids-2
+
+
+echo "Comparing $file1 to $file2 ...."
+
+cat $file1 | python3 -mjson.tool > $formattedfile1
+cat $file2 | python3 -mjson.tool > $formattedfile2
+
+cat $formattedfile1 | grep '"configuration-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $idlist1
+cat $formattedfile2 | grep '"configuration-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $idlist2
+
+echo
+echo "Diff of configuration ids:"
+echo "--------------------------"
+diff $idlist1 $idlist2
+
+if [ "$verbose" = "true" ]
+then
+ echo
+ echo "Full diff:"
+ echo "----------"
+ diff $formattedfile1 $formattedfile2
+fi
+
+echo
+echo "Configuration counts:"
+echo "---------------------"
+echo " $file1 : $(cat $idlist1 | wc -l)"
+echo " $file2 : $(cat $idlist2 | wc -l)"
+
+
+
+
diff --git a/ms/gra/gra-docker/src/main/scripts/comparePreload.sh b/ms/gra/gra-docker/src/main/scripts/comparePreload.sh
new file mode 100755
index 0000000..4e8ab79
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/scripts/comparePreload.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+if [ $# -eq 2 ]
+then
+ verbose=false
+ file1=$1
+ file2=$2
+elif [ $# -eq 3 -a $1 = "-v" ]
+then
+ verbose=true
+ file1=$2
+ file2=$3
+else
+ echo "Usage: $0 [-v] file1 file2"
+ exit 1
+fi
+
+tmppfx=preload$$
+
+formattedfile1=/tmp/$tmppfx-formatted1
+formattedfile2=/tmp/$tmppfx-formatted2
+idlist1=/tmp/$tmppfx-preload-ids-1
+idlist2=/tmp/$tmppfx-preload-ids-2
+
+
+echo "Comparing $file1 to $file2 ...."
+
+cat $file1 | python3 -mjson.tool > $formattedfile1
+cat $file2 | python3 -mjson.tool > $formattedfile2
+
+cat $formattedfile1 | grep '"preload-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $idlist1
+cat $formattedfile2 | grep '"preload-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $idlist2
+
+echo
+echo "Diff of preload ids:"
+echo "--------------------"
+diff $idlist1 $idlist2
+
+if [ "$verbose" = "true" ]
+then
+ echo
+ echo "Full diff:"
+ echo "----------"
+ diff $formattedfile1 $formattedfile2
+fi
+
+echo
+echo "Preload id counts:"
+echo "------------------"
+echo " $file1 : $(cat $idlist1 | wc -l)"
+echo " $file2 : $(cat $idlist2 | wc -l)"
+
+
+
+
diff --git a/ms/gra/gra-docker/src/main/scripts/compareSvc.sh b/ms/gra/gra-docker/src/main/scripts/compareSvc.sh
new file mode 100755
index 0000000..0c977b5
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/scripts/compareSvc.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+if [ $# -eq 2 ]
+then
+ verbose=false
+ file1=$1
+ file2=$2
+elif [ $# -eq 3 -a $1 = "-v" ]
+then
+ verbose=true
+ file1=$2
+ file2=$3
+else
+ echo "Usage: $0 [-v] file1 file2"
+ exit 1
+fi
+
+tmppfx=svc$$
+
+formattedfile1=/tmp/$tmppfx-formatted1
+formattedfile2=/tmp/$tmppfx-formatted2
+svcinstancelist1=/tmp/$tmppfx-svc-instance-ids-1
+svcinstancelist2=/tmp/$tmppfx-svc-instance-ids-2
+
+
+echo "Comparing $file1 to $file2 ...."
+
+cat $file1 | python3 -mjson.tool > $formattedfile1
+cat $file2 | python3 -mjson.tool > $formattedfile2
+
+cat $formattedfile1 | grep '"service-instance-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $svcinstancelist1
+cat $formattedfile2 | grep '"service-instance-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $svcinstancelist2
+
+echo
+echo "Diff of service instance ids:"
+echo "-----------------------------"
+diff $svcinstancelist1 $svcinstancelist2
+
+if [ "$verbose" = "true" ]
+then
+ echo
+ echo "Full diff:"
+ echo "----------"
+ diff $formattedfile1 $formattedfile2
+fi
+
+echo
+echo "Service instance counts:"
+echo "------------------------"
+echo " $file1 : $(cat $svcinstancelist1 | wc -l)"
+echo " $file2 : $(cat $svcinstancelist2 | wc -l)"
+
+
+
+
diff --git a/ms/gra/gra-docker/src/main/scripts/exportGraDaexim.sh b/ms/gra/gra-docker/src/main/scripts/exportGraDaexim.sh
new file mode 100644
index 0000000..08da8b0
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/scripts/exportGraDaexim.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+ODL_USER=${ODL_USER:-m27434@dev.sdncp.att.com}
+ODL_PASSWORD=${AAF_MECHID_CRED:-admin}
+ODL_URI=${ODL_URI:-https://localhost:8443}
+
+export TMPDIR=/tmp/daexim-$$
+
+if [ $# -ne 1 ]
+then
+ echo "Usage: $0 filename"
+ exit 1
+fi
+
+
+set -e
+
+mkdir $TMPDIR
+
+if [[ $1 == /* ]]
+then
+ tarfile=$1
+else
+ tarfile=$TMPDIR/$1
+fi
+
+echo "Exporting services ..."
+curl -k -u${ODL_USER}:${ODL_PASSWORD} ${ODL_URI}/restconf/config/GENERIC-RESOURCE-API:services/ > ${TMPDIR}/services_config.json
+echo "Exporting contrail data ..."
+curl -k -u${ODL_USER}:${ODL_PASSWORD} ${ODL_URI}/restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/ > ${TMPDIR}/contrail_config.json
+echo "Exporting port mirror data ..."
+curl -k -u${ODL_USER}:${ODL_PASSWORD} ${ODL_URI}/restconf/config/GENERIC-RESOURCE-API:port-mirror-configurations/ > ${TMPDIR}/portmirror_config.json
+echo "Exporting preload data ..."
+curl -k -u${ODL_USER}:${ODL_PASSWORD} ${ODL_URI}/restconf/config/GENERIC-RESOURCE-API:preload-information/ > ${TMPDIR}/preload_config.json
+
+cd $TMPDIR
+tar czf $tarfile ./*.json
+
+echo Exported data is in $tarfile
+
diff --git a/ms/gra/gra-docker/src/main/scripts/graToMdsal.sh b/ms/gra/gra-docker/src/main/scripts/graToMdsal.sh
new file mode 100644
index 0000000..9fb62f8
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/scripts/graToMdsal.sh
@@ -0,0 +1,104 @@
+#!/bin/bash
+
+# Copies data from NFT Azure GRA node and stores in MDSAL in NFT EOM
+
+TMPNAME=gra-mdsal-$$
+
+if [ $# -eq 2 ]
+then
+ fetchFile=false
+ NFT_AZURE_EXPORT_FILE=$1
+ NFT_EOM_URL=$2
+elif [ $# -eq 3 ]
+then
+ fetchFile=true
+ NFT_AZURE_EXPORT_FILE=$TMPNAME.tar.gz
+ NFT_AZURE_NAMESPACE=$1
+ NFT_AZURE_GRA_POD=$2
+ NFT_EOM_URL=$3
+else
+ echo "Usage: $0 {export-file-name | nft-namespace gra-pod-name} eom-url"
+ exit 1
+fi
+
+
+# Credentials configuration
+NFT_AZURE_USER=${NFT_AZURE_USER:-m27434@dev.sdncp.att.com}
+NFT_AZURE_PASSWORD=${NFT_AZURE_PASSWORD:-sdncp20190501}
+NFT_EOM_USER=${NFT_EOM_USER:-admin}
+NFT_EOM_PASSWORD=${NFT_EOM_PASSWORD:-admin}
+
+set -e
+
+TMPNAME=gra-mdsal-$$
+mkdir /tmp/$TMPNAME
+
+if [ "$fetchFile" = "true" ]
+then
+ # Export data on Azure
+ kubectl -n $NFT_AZURE_NAMESPACE exec -ti $NFT_AZURE_GRA_POD -c gra -- env ODL_USER=$NFT_AZURE_USER AAF_MECHID_CRED=$NFT_AZURE_PASSWORD /opt/sdnc/gra/bin/exportGraDaexim.sh /tmp/$NFT_AZURE_EXPORT_FILE
+
+
+ # Put exported data to NFT EOM
+ kubectl -n $NFT_AZURE_NAMESPACE cp $NFT_AZURE_GRA_POD:/tmp/$NFT_AZURE_EXPORT_FILE /tmp/$TMPNAME/$NFT_AZURE_EXPORT_FILE
+else
+ cp $NFT_AZURE_EXPORT_FILE /tmp/$TMPNAME
+fi
+
+cd /tmp/$TMPNAME
+tar xzf $NFT_AZURE_EXPORT_FILE
+
+# Massage files and create daexim input
+echo "{" > lsc_backup_config_$TMPNAME.json
+addComma=false
+if [ -f services_config.json ]
+then
+ echo "Converting service data ..."
+ cat services_config.json | python3 -mjson.tool | sed -e "s/services/GENERIC-RESOURCE-API:services/" -e "/\"gateway-address\": \"\"/d" > services_config_upd.json
+ cat services_config_upd.json | sed -e "1s/{//" -e "$ s/}//" >> lsc_backup_config_$TMPNAME.json
+ addComma=true
+fi
+
+if [ -f contrail_config.json ]
+then
+ if [ "$addComma" = "true" ]
+ then
+ echo "," >> lsc_backup_config_$TMPNAME.json
+ fi
+ cat contrail_config.json | sed -e "s/{//" -e "s/contrail-route-allotted-resources/GENERIC-RESOURCE-API:contrail-route-allotted-resources/" -e "s/}$//" >> lsc_backup_config_$TMPNAME.json
+ addComma=true
+fi
+
+if [ -f portmirror_config.json ]
+then
+ if [ "$addComma" = "true" ]
+ then
+ echo "," >> lsc_backup_config_$TMPNAME.json
+ fi
+ cat portmirror_config.json | sed -e "s/{//" -e "s/port-mirror-configurations/GENERIC-RESOURCE-API:port-mirror-configurations/" -e "s/}$//" >> lsc_backup_config_$TMPNAME.json
+ addComma=true
+fi
+
+echo "}" >> lsc_backup_config_$TMPNAME.json
+
+echo "Exported data files are in /tmp/$TMPNAME"
+
+if [ -f services_config_upd.json ]
+then
+ echo "Importing service data ..."
+ curl -k -v -u${NFT_EOM_USER}:${NFT_EOM_PASSWORD} -H "Content-Type: application/json" -X PUT -d@services_config_upd.json ${NFT_EOM_URL}/restconf/config/GENERIC-RESOURCE-API:services/
+fi
+
+if [ -f contrail_config.json ]
+then
+ echo "Importing contrail data ..."
+ curl -k -v -u${NFT_EOM_USER}:${NFT_EOM_PASSWORD} -H "Content-Type: application/json" -X PUT -d@contrail_config.json ${NFT_EOM_URL}/restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/
+fi
+
+if [ -f portmirror_config.json ]
+then
+ echo "Importing port mirror data ..."
+ curl -k -v -u${NFT_EOM_USER}:${NFT_EOM_PASSWORD} -H "Content-Type: application/json" -X PUT -d@portmirror_config.json ${NFT_EOM_URL}/restconf/config/GENERIC-RESOURCE-API:port-mirror-configurations/
+fi
+
+
diff --git a/ms/gra/gra-docker/src/main/scripts/importGraDaexim.sh b/ms/gra/gra-docker/src/main/scripts/importGraDaexim.sh
new file mode 100755
index 0000000..2c90421
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/scripts/importGraDaexim.sh
@@ -0,0 +1,207 @@
+#!/bin/bash
+
+export CHUNK_SIZE=${CHUNK_SIZE:-75}
+set -e
+CURLFLAGS="--silent --show-error"
+if [ $# -eq 3 ]
+then
+ if [ "$1" != "-v" ]
+ then
+ echo "Usage: $0 [-v] filename controller-url"
+ exit 1
+ fi
+ CURLFLAGS="-v"
+ filename=$2
+ url=$3
+elif [ $# -eq 2 ]
+then
+ filename=$1
+ url=$2
+else
+ echo "Usage: $0 [-v] filename controller-url"
+ exit 1
+fi
+
+ODL_USER=${ODL_USER:-admin}
+ODL_PASSWORD=${ODL_PASSWORD:-admin}
+
+
+export TMPDIR=/tmp/daexim-$$
+# Unzip file
+if [[ "$filename" == *.zip ]]
+then
+ unzip -qd $TMPDIR $filename
+ DAEXIM_CONFIG=$(find $TMPDIR -name *config.json)
+elif [[ "$filename" == *config.json ]]
+then
+ mkdir $TMPDIR
+ DAEXIM_CONFIG=$filename
+else
+ echo "$filename is not a recognized format"
+ exit 1
+fi
+
+
+
+cat ${DAEXIM_CONFIG} | python3 -c '
+import sys,json,os
+
+data = json.load(sys.stdin)
+
+chunk_size = int(os.environ["CHUNK_SIZE"])
+if chunk_size == "":
+ chunk_size = 75
+
+if "GENERIC-RESOURCE-API:services" in data:
+ chunk = 0
+ lineno = chunk_size
+ f = None
+ for service in data["GENERIC-RESOURCE-API:services"]["service"]:
+ if lineno >= chunk_size:
+ chunk = chunk+1
+ lineno = 1
+ if f != None:
+ print ("]}}", file=f)
+ f.flush()
+ f.close()
+ outfile = os.environ["TMPDIR"] + "/config_gra_services_"+str(chunk).zfill(3)+".json"
+ f = open(outfile, "w")
+ print("{\"services\":", file=f, end="")
+ print("{\"service\":[", file=f, end="")
+ json.dump(service, f)
+ else:
+ lineno = lineno+1
+ print(",",file=f, end="")
+ json.dump(service, f)
+ if f != None:
+ print("]}}", file=f)
+ f.flush()
+ f.close()
+ print("Split "+str(len(data["GENERIC-RESOURCE-API:services"]["service"]))+ " services into "+str(chunk)+" chunks")
+
+if "GENERIC-RESOURCE-API:contrail-route-allotted-resources" in data:
+ chunk = 0
+ lineno = chunk_size
+ f = None
+ for contrail_route in data["GENERIC-RESOURCE-API:contrail-route-allotted-resources"]["contrail-route-allotted-resource"]:
+ if lineno >= chunk_size:
+ chunk = chunk+1
+ lineno = 1
+ if f != None:
+ print ("]}}", file=f)
+ f.flush()
+ f.close()
+ outfile = os.environ["TMPDIR"] + "/config_gra_contrail_"+str(chunk).zfill(3)+".json"
+ f = open(outfile, "w")
+ print("{\"contrail-route-allotted-resources\":", file=f, end="")
+ print("{\"contrail-route-allotted-resource\":[", file=f, end="")
+ json.dump(contrail_route, f)
+ else:
+ lineno = lineno+1
+ print(",",file=f, end="")
+ json.dump(contrail_route, f)
+ if f != None:
+ print("]}}", file=f)
+ f.flush()
+ f.close()
+ print("Split "+ str(len(data["GENERIC-RESOURCE-API:contrail-route-allotted-resources"]["contrail-route-allotted-resource"]))+ " contrail-route-allotted-services into "+str(chunk)+" chunks")
+
+if "GENERIC-RESOURCE-API:port-mirror-configurations" in data:
+ chunk = 0
+ lineno = chunk_size
+ f = None
+ for port_mirror in data["GENERIC-RESOURCE-API:port-mirror-configurations"]["port-mirror-configuration"]:
+ if lineno >= chunk_size:
+ chunk = chunk+1
+ lineno = 1
+ if f != None:
+ print ("]}}", file=f)
+ f.flush()
+ f.close()
+ outfile = os.environ["TMPDIR"] + "/config_gra_port_mirror_"+str(chunk).zfill(3)+".json"
+ f = open(outfile, "w")
+ print("{\"port-mirror-configurations\":", file=f, end="")
+ print("{\"port-mirror-configuration\":[", file=f, end="")
+ json.dump(port_mirror, f)
+ else:
+ lineno = lineno+1
+ print(",",file=f, end="")
+ json.dump(port_mirror, f)
+ if f != None:
+ print("]}}", file=f)
+ f.flush()
+ f.close()
+ print("Split "+str(len(data["GENERIC-RESOURCE-API:port-mirror-configurations"]["port-mirror-configuration"]))+" port-mirror-configuration into "+str(chunk)+" chunks")
+
+if "GENERIC-RESOURCE-API:preload-information" in data:
+ chunk = 0
+ lineno = chunk_size
+ f = None
+ for preload in data["GENERIC-RESOURCE-API:preload-information"]["preload-list"]:
+ if lineno >= chunk_size:
+ chunk = chunk+1
+ lineno = 0
+ if f != None:
+ print ("]}}", file=f)
+ f.flush()
+ f.close()
+ outfile = os.environ["TMPDIR"] + "/config_gra_preloads_"+str(chunk).zfill(3)+".json"
+ f = open(outfile, "w")
+ print("{\"preload-information\":", file=f, end="")
+ print("{\"preload-list\":[", file=f, end="")
+ json.dump(preload, f)
+ else:
+ lineno = lineno+1
+ print(",",file=f, end="")
+ json.dump(preload, f)
+ if f != None:
+ print("]}}", file=f)
+ f.flush()
+ f.close()
+ print ("Split "+str(len(data["GENERIC-RESOURCE-API:preload-information"]["preload-list"]))+" preloads into "+str(chunk)+" chunks")'
+
+first=true
+
+if [ $(ls -1 $TMPDIR/config_gra_services_*.json 2>/dev/null | wc -l) -gt 0 ]
+then
+ echo "Transferring services data ..."
+ for file in $(ls $TMPDIR/config_gra_services_*.json)
+ do
+ echo "Transferring file $file ..."
+ curl ${CURLFLAGS} --fail -k -u${ODL_USER}:${ODL_PASSWORD} -H "Content-Type: application/json" -X PUT -d@$file ${url}/restconf/config/GENERIC-RESOURCE-API:services/
+ done
+fi
+
+if [ $(ls -1 $TMPDIR/config_gra_contrail_*.json 2>/dev/null | wc -l) -gt 0 ]
+then
+ echo "Transferring contrail data ..."
+ for file in $(ls $TMPDIR/config_gra_contrail_*.json)
+ do
+ echo "Transferring file $file ..."
+ curl ${CURLFLAGS} --fail -k -u${ODL_USER}:${ODL_PASSWORD} -H "Content-Type: application/json" -X PUT -d@$file ${url}/restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/
+ done
+fi
+
+if [ $(ls -1 $TMPDIR/config_gra_port_mirror_*.json 2>/dev/null | wc -l) -gt 0 ]
+then
+ echo "Transferring port mirror data ..."
+ for file in $(ls $TMPDIR/config_gra_port_mirror_*.json)
+ do
+ echo "Transferring file $file ..."
+ curl ${CURLFLAGS} --fail -k -u${ODL_USER}:${ODL_PASSWORD} -H "Content-Type: application/json" -X PUT -d@$file ${url}/restconf/config/GENERIC-RESOURCE-API:port-mirror-configurations/
+ done
+fi
+
+if [ $(ls -1 $TMPDIR/config_gra_preloads_*.json 2>/dev/null | wc -l) -gt 0 ]
+then
+ echo "Transferring preload data ..."
+ first=true
+ for file in $(ls $TMPDIR/config_gra_preloads_*.json)
+ do
+ echo "Transferring file $file ..."
+ curl ${CURLFLAGS} --fail -k -u${ODL_USER}:${ODL_PASSWORD} -H "Content-Type: application/json" -X PUT -d@$file ${url}/restconf/config/GENERIC-RESOURCE-API:preload-information/
+ done
+fi
+
+rm -rf $TMPDIR
+echo "Done!" \ No newline at end of file
diff --git a/ms/gra/gra-docker/src/main/templates/contrail-route-allotted-resource.json b/ms/gra/gra-docker/src/main/templates/contrail-route-allotted-resource.json
new file mode 100644
index 0000000..f5d862d
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/templates/contrail-route-allotted-resource.json
@@ -0,0 +1,102 @@
+{
+ "contrail-route-allotted-resource": {
+ "allotted-resource-id": ${ar.allotted-resource-id},
+ "allotted-resource-data": {
+ "contrail-route-topology": {
+ "allotted-resource-identifiers": {
+ "consuming-service-instance-id": ${ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.consuming-service-instance-id},
+ "allotted-resource-name": ${ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.allotted-resource-name},
+ "allotted-resource-id": ${ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.allotted-resource-id},
+ "parent-service-instance-id": ${ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.parent-service-instance-id},
+ "allotted-resource-type": ${ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.allotted-resource-type}
+ },
+ "onap-model-information": {
+ "model-invariant-uuid": ${ar.allotted-resource-data.contrail-route-topology.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${ar.allotted-resource-data.contrail-route-topology.onap-model-information.model-customization-uuid},
+ "model-uuid": ${ar.allotted-resource-data.contrail-route-topology.onap-model-information.model-uuid},
+ "model-version": ${ar.allotted-resource-data.contrail-route-topology.onap-model-information.model-version}
+ },
+ "contrail-route-assignments": {
+ "fq-name": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name},
+ "contrail-id": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-id},
+ "vlan-tag": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.vlan-tag},
+ "source-network": {
+ "network-id": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id},
+ "network-role": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-role}
+ },
+ "dest-network": {
+ "network-id": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id},
+ "network-role": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-role}
+ },
+ "contrail-applied-service": {
+ "service-instance-id": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.service-instance-id},
+ "vnf-id": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.vnf-id},
+ "contrail-fqdn": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.contrail-fqdn}
+ }
+ },
+ "contrail-route-parameters": {
+ "param" : [
+ ${repeat:ar.allotted-resource-data.contrail-route-topology.contrail-route-parameters_length:
+ {
+ "name": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-parameters[${1}].name},
+ "value": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-parameters[${1}].value}
+ }
+ }
+ ]
+ }
+ },
+ "allotted-resource-operation-information": {
+ "allotted-resource-information": {
+ "allotted-resource-id": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.allotted-resource-id},
+ "allotted-resource-type": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.allotted-resource-type},
+ "parent-service-instance-id": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.parent-service-instance-id},
+ "onap-model-information": {
+ "model-invariant-uuid": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-customization-uuid},
+ "model-uuid": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-uuid},
+ "model-version": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-version}
+ }
+ },
+ "sdnc-request-header": {
+ "svc-request-id": ${ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id},
+ "svc-action": ${ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-action}
+ },
+ "request-information": {
+ "request-id": ${ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-id},
+ "source": ${ar.allotted-resource-data.allotted-resource-operation-information.request-information.source},
+ "order-version": ${ar.allotted-resource-data.allotted-resource-operation-information.request-information.order-version},
+ "order-number": ${ar.allotted-resource-data.allotted-resource-operation-information.request-information.order-number},
+ "notification-url": ${ar.allotted-resource-data.allotted-resource-operation-information.request-information.notification-url},
+ "request-action": ${ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action}
+ },
+ "contrail-route-request-input": {
+ "source-network": {
+ "network-id": ${ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.source-network.network-id},
+ "network-role": ${ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.source-network.network-role}
+ },
+ "dest-network": {
+ "network-id": ${ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.dest-network.network-id},
+ "network-role": ${ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.dest-network.network-role}
+ },
+ "contrail-applied-service-info": {
+ "service-instance-id" : ${ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.contrail-applied-service-info.service-instance-id}
+ }
+ }
+ },
+ "allotted-resource-oper-status": {
+ "last-action": ${ar.allotted-resource-data.allotted-resource-oper-status.last-action},
+ "modify-timestamp": ${ar.allotted-resource-data.allotted-resource-oper-status.modify-timestamp},
+ "last-order-status": ${ar.allotted-resource-data.allotted-resource-oper-status.last-order-status},
+ "create-timestamp": ${ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp},
+ "order-status": ${ar.allotted-resource-data.allotted-resource-oper-status.order-status},
+ "last-rpc-action": ${ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action},
+ "last-svc-request-id": ${ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id}
+ }
+ },
+ "allotted-resource-status" : {
+ "action": ${ar.allotted-resource-status.action},
+ "rpc-name": ${ar.allotted-resource-status.rpc-name},
+ "rpc-action": ${ar.allotted-resource-status.rpc-action}
+ }
+ }
+}
diff --git a/ms/gra/gra-docker/src/main/templates/csm-service-instance.json b/ms/gra/gra-docker/src/main/templates/csm-service-instance.json
new file mode 100644
index 0000000..0df0df4
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/templates/csm-service-instance.json
@@ -0,0 +1,15 @@
+{
+ "service": {
+ "service-instance-id": ${tmp.service-instance-id},
+ "service-data": {
+ "service-information": {
+ "global-customer-id": ${output-global-customer-id}
+ },
+ "service-topology": {
+ "service-topology-identifier": {
+ "service-type": ${output-service-type}
+ }
+ }
+ }
+ }
+}
diff --git a/ms/gra/gra-docker/src/main/templates/network-instance-group-network.json b/ms/gra/gra-docker/src/main/templates/network-instance-group-network.json
new file mode 100644
index 0000000..ed44a04
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/templates/network-instance-group-network.json
@@ -0,0 +1,27 @@
+{
+ "network": {
+ "network-id": ${mdsal-nign.network[0].network-id},
+ "vpn-bindings": [
+ ${repeat:mdsal-nign.network[0].vpn-bindings_length:
+ {
+ "vpn-binding-id": ${mdsal-nign.network[0].vpn-bindings[${1}].vpn-binding-id},
+ "vpn-name": ${mdsal-nign.network[0].vpn-bindings[${1}].vpn-name},
+ "global-route-target": ${mdsal-nign.network[0].vpn-bindings[${1}].global-route-target},
+ "route-target-role": ${mdsal-nign.network[0].vpn-bindings[${1}].route-target-role},
+ "aic-zone": ${mdsal-nign.network[0].vpn-bindings[${1}].aic-zone}
+ }
+ }
+ ],
+ "vlan-tag-id": ${mdsal-nign.network[0].vlan-tag-id},
+ "network-status": ${mdsal-nign.network[0].network-status},
+ "customer-bonding-requests": {
+ "customer-bonding-request": [
+ ${repeat:mdsal-nign.network[0].customer-bonding-requests.customer-bonding-request_length:
+ {
+ "configuration-id": ${mdsal-nign.network[0].customer-bonding-requests.customer-bonding-request[${1}].configuration-id}
+ },
+ }
+ ]
+ }
+ }
+}
diff --git a/ms/gra/gra-docker/src/main/templates/network-level-oper-status.json b/ms/gra/gra-docker/src/main/templates/network-level-oper-status.json
new file mode 100644
index 0000000..b38a17b
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/templates/network-level-oper-status.json
@@ -0,0 +1,11 @@
+{
+ "oper-status": {
+ "order-status": ${network-level-oper-status.order-status},
+ "last-rpc-action": ${network-level-oper-status.last-rpc-action},
+ "last-action": ${network-level-oper-status.last-action},
+ "last-svc-request-id": ${network-level-oper-status.last-svc-request-id},
+ "last-order-status": ${network-level-oper-status.last-order-status},
+ "create-timestamp": ${network-level-oper-status.create-timestamp},
+ "modify-timestamp": ${network-level-oper-status.modify-timestamp}
+ }
+}
diff --git a/ms/gra/gra-docker/src/main/templates/network.json b/ms/gra/gra-docker/src/main/templates/network.json
new file mode 100644
index 0000000..88d79e5
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/templates/network.json
@@ -0,0 +1,145 @@
+{
+ "network": {
+ "network-id": ${network-data.network-information.network-id},
+ "network-data": {
+ "network-provided-allotted-resources": {
+ "network-provided-ar-id": [
+${repeat:network-data.network-provided-allotted-resources.network-provided-ar-id_length:
+ ${network-data.network-provided-allotted-resources.network-provided-ar-id[${1}]},
+}
+ ]
+ },
+ "network-level-oper-status": {
+ "order-status": ${network-data.network-level-oper-status.order-status},
+ "last-rpc-action": ${network-data.network-level-oper-status.last-rpc-action},
+ "last-action": ${network-data.network-level-oper-status.last-action},
+ "last-svc-request-id": ${network-data.network-level-oper-status.last-svc-request-id},
+ "last-order-status": ${network-data.network-level-oper-status.last-order-status},
+ "create-timestamp": ${network-data.network-level-oper-status.create-timestamp},
+ "modify-timestamp": ${network-data.network-level-oper-status.modify-timestamp}
+ },
+ "sdnc-request-header": {
+ "svc-request-id": ${network-data.sdnc-request-header.svc-request-id},
+ "svc-action": ${network-data.sdnc-request-header.svc-action},
+ "svc-notification-url": ${network-data.sdnc-request-header.svc-notification-url}
+ },
+ "request-information": {
+ "request-id": ${network-data.request-information.request-id},
+ "request-action": ${network-data.request-information.request-action},
+ "source": ${network-data.request-information.source},
+ "notification-url": ${network-data.request-information.notification-url},
+ "order-number": ${network-data.request-information.order-number},
+ "order-version": ${network-data.request-information.order-version}
+ },
+ "network-request-input": {
+ "network-name": ${network-data.network-request-input.network-name},
+ "network-input-parameters": {
+ "param": [
+${repeat:network-data.network-request.network-input-parameters.param_length:
+ {
+ "name": ${network-data.network-request-inputnetwork-input-parameters.param[${1}].name},
+ "value": ${network-data.network-request-inputnetwork-input-parameters.param[${1}].value},
+ "resource-resolution-data": {
+ "resource-key": [
+${repeat:network-data.network-request.network-input-parameters.param[${1}].resource-resolution-data.resource_key_length:
+ {
+ "name": ${network-data.network-request.network-input-parameters.param[${1}].resource-resolution-data.resource_key[${2}].name},
+ "value": ${network-data.network-request.network-input-parameters.param[${1}].resource-resolution-data.resource_key[${2}].value}
+ }
+}
+ ],
+ "status": ${network-data.network-request-inputnetwork-input-parameters.param[${1}].status},
+ "capability-name": ${network-data.network-request-inputnetwork-input-parameters.param[${1}].capability-name}
+ }
+ },
+}
+ ]
+ },
+ "network-instance-group-id": ${network-data.network-request-input.network-instance-group-id},
+ "tenant": ${network-data.network-request-input.tenant},
+ "aic-cloud-region": ${network-data.network-request-input.aic-cloud-region},
+ "cloud-owner": ${network-data.network-request-input.cloud-owner},
+ "aic-clli": ${network-data.network-request-input.aic-clli}
+ },
+ "network-information": {
+ "network-id": ${network-data.network-information.network-id},
+ "network-type": ${network-data.network-information.network-type},
+ "network-technology": ${network-data.network-information.network-technology},
+ "from-preload": ${network-data.network-information.from-preload},
+ "onap-model-information": {
+ "model-invariant-uuid": ${network-data.network-topology.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${network-data.network-topology.onap-model-information.model-customization-uuid},
+ "model-uuid": ${network-data.network-topology.onap-model-information.model-uuid},
+ "model-version": ${network-data.network-topology.onap-model-information.model-version},
+ "model-name": ${network-data.network-topology.onap-model-information.model-name}
+ }
+ },
+ "service-information": {
+ "service-id": ${network-data.service-information.service-id},
+ "subscription-service-type": ${network-data.service-information.subscription-service-type},
+ "service-instance-id": ${network-data.service-information.service-instance-id},
+ "global-customer-id": ${network-data.service-information.global-customer-id},
+ "subscriber-name": ${network-data.service-information.subscriber-name},
+ "onap-model-information": {
+ "model-invariant-uuid": ${network-data.service-information.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${network-data.onap-model-information.model-customization-uuid},
+ "model-uuid": ${network-data.onap-model-information.model-uuid},
+ "model-version": ${network-data.onap-model-information.model-version},
+ "model-name": ${network-data.onap-model-information.model-name}
+ }
+ },
+ "network-topology": {
+ "tenant": ${network-data.network-topology.tenant},
+ "aic-cloud-region": ${network-data.network-topology.aic-cloud-region},
+ "cloud-owner": ${network-data.network-topology.cloud-owner},
+ "aic-clli": ${network-data.network-topology.aic-clli},
+ "network-parameters": {
+ "network-parameter": [
+${repeat:network-data.network-topology.network-parameters.network-parameter_length:
+ {
+ "network-parameter-name": ${network-data.network-topology.network-parameters.network-parameter[${1}].network-parameter-name},
+ "network-parameter-value": ${network-data.network-topology.network-parameters.network-parameter[${1}].network-parameter-value}
+ },
+}
+ ]
+ },
+ "onap-model-information": {
+ "model-invariant-uuid": ${network-data.network-topology.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${network-data.network-topology.onap-model-information.model-customization-uuid},
+ "model-uuid": ${network-data.network-topology.onap-model-information.model-uuid},
+ "model-version": ${network-data.network-topology.onap-model-information.model-version},
+ "model-name": ${network-data.network-topology.onap-model-information.model-name}
+ },
+ "network-assignments": {},
+ "network-topology-identifier-structure": {
+ "network-id": ${network-data.network-topology.network-topology-identifier-structure.network-id},
+ "network-name": ${network-data.network-topology.network-topology-identifier-structure.network-name},
+ "network-role": ${network-data.network-topology.network-topology-identifier-structure.network-role},
+ "network-type": ${network-data.network-topology.network-topology-identifier-structure.network-type},
+ "network-instance-group-id": ${network-data.network-topology.network-topology-identifier-structure.network-instance-group-id},
+ "network-technology": ${network-data.network-topology.network-topology-identifier-structure.network-technology},
+ "eipam-v4-address-plan": ${network-data.network-topology.network-topology-identifier-structure.eipam-v4-address-plan},
+ "eipam-v6-address-plan": ${network-data.network-topology.network-topology-identifier-structure.eipam-v6-address-plan},
+ "is-trunked": ${network-data.network-topology.network-topology-identifier-structure.is-trunked},
+ "segmentation-id": ${network-data.network-topology.network-topology-identifier-structure.segmentation-id},
+ "related-networks": {
+ "related-network": [
+${repeat:network-data.network-topology.network-topology-identifier-structure.related-networks.related-network_length:
+ {
+ "network-id": ${network-data.network-topology.network-topology-identifier-structure.related-networks.related-network[${1}].network-id},
+ "network-role": ${network-data.network-topology.network-topology-identifier-structure.related-networks.related-network[${1}].network-role},
+ "vlan-tags": {
+ "vlan-interface": ${network-data.network-topology.network-topology-identifier-structure.related-networks.related-network[${1}].vlan-tags.vlan-interface},
+ "upper-tag-id": ${network-data.network-topology.network-topology-identifier-structure.related-networks.related-network[${1}].vlan-tags.upper-tag-id},
+ "lower-tag-id": ${network-data.network-topology.network-topology-identifier-structure.related-networks.related-network[${1}].vlan-tags.lower-tag-id},
+ "is-private": ${network-data.network-topology.network-topology-identifier-structure.related-networks.related-network[${1}].vlan-tags.is-private}
+ }
+ },
+}
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/ms/gra/gra-docker/src/main/templates/port-mirror-configuration.json b/ms/gra/gra-docker/src/main/templates/port-mirror-configuration.json
new file mode 100644
index 0000000..f18d191
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/templates/port-mirror-configuration.json
@@ -0,0 +1,152 @@
+{
+ "port-mirror-configuration": {
+ "configuration-id": ${pm.configuration-id},
+ "configuration-data": {
+ "configuration-operation-information": {
+ "sdnc-request-header": {
+ "svc-request-id": ${pm.configuration-data.configuration-operation-information.sdnc-request-header.svc-request-id},
+ "svc-action": ${pm.configuration-data.configuration-operation-information.sdnc-request-header.svc-action},
+ "svc-notification-url": ${pm.configuration-data.configuration-operation-information.sdnc-request-header.svc-notification-url}
+ },
+ "request-information": {
+ "request-id": ${pm.configuration-data.configuration-operation-information.request-information.request-id},
+ "request-action": ${pm.configuration-data.configuration-operation-information.request-information.request-action},
+ "source": ${pm.configuration-data.configuration-operation-information.request-information.source},
+ "notification-url": ${pm.configuration-data.configuration-operation-information.request-information.notification-url},
+ "order-number": ${pm.configuration-data.configuration-operation-information.request-information.order-number},
+ "order-version": ${pm.configuration-data.configuration-operation-information.request-information.order-version}
+ },
+ "service-information": {
+ "service-id": ${pm.configuration-data.configuration-operation-information.service-information.service-id},
+ "subscription-service-type": ${pm.configuration-data.configuration-operation-information.service-information.subscription-service-type},
+ "onap-model-information": {
+ "model-invariant-uuid": ${pm.configuration-data.configuration-operation-information.service-information.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${pm.configuration-data.configuration-operation-information.service-information.onap-model-information.model-customization-uuid},
+ "model-uuid": ${pm.configuration-data.configuration-operation-information.service-information.onap-model-information.model-uuid},
+ "model-version": ${pm.configuration-data.configuration-operation-information.service-information.onap-model-information.model-version},
+ "model-name": ${pm.configuration-data.configuration-operation-information.service-information.onap-model-information.model-name}
+ },
+ "service-instance-id": ${pm.configuration-data.configuration-operation-information.service-information.service-instance-id},
+ "global-customer-id": ${pm.configuration-data.configuration-operation-information.service-information.global-customer-id},
+ "subscriber-name": ${pm.configuration-data.configuration-operation-information.service-information.subscriber-name}
+ },
+ "configuration-information": {
+ "configuration-id": ${pm.configuration-data.configuration-operation-information.configuration-information.configuration-id},
+ "configuration-type": ${pm.configuration-data.configuration-operation-information.configuration-information.configuration-type},
+ "configuration-sub-type": ${pm.configuration-data.configuration-operation-information.configuration-information.configuration-sub-type},
+ "onap-model-information": {
+ "model-invariant-uuid": ${pm.configuration-data.configuration-operation-information.configuration-information.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${pm.configuration-data.configuration-operation-information.configuration-information.onap-model-information.model-customization-uuid},
+ "model-uuid": ${pm.configuration-data.configuration-operation-information.configuration-information.onap-model-information.model-uuid},
+ "model-version": ${pm.configuration-data.configuration-operation-information.configuration-information.onap-model-information.model-version},
+ "model-name": ${pm.configuration-data.configuration-operation-information.configuration-information.onap-model-information.model-name}
+ }
+ },
+ "port-mirror-configuration-request-input": {
+ "source-port": {
+ "sevice-instance-id": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.source-port.service-instance-id},
+ "vnf-information": {
+ "vnf-id": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.source-port.vnf-information.vnf-id},
+ "vnf-type": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.source-port.vnf-information.vnf-type}
+ }
+ },
+ "dest-port": {
+ "sevice-instance-id": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.dest-port.service-instance-id},
+ "vnf-information": {
+ "vnf-id": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.dest-port.vnf-information.vnf-id},
+ "vnf-type": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.dest-port.vnf-information.vnf-type}
+ },
+ "pnf-information": {
+ "pnf-name": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.dest-port.pnf-information.pnf-name},
+ "pnf-type": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.dest-port.pnf-information.pnf-type}
+ }
+ },
+ "tenant": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.tenant},
+ "aic-cloud-region": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.aic-cloud-region},
+ "aic-clli": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.aic-clli}
+ }
+ },
+ "port-mirror-configuration-topology": {
+ "configuration-identifiers": {
+ "configuration-id": ${pm.configuration-data.port-mirror-configuration-topology.configuration-identifiers.configuration-id},
+ "configuration-name": ${pm.configuration-data.port-mirror-configuration-topology.configuration-identifiers.configuration-name},
+ "configuration-type": ${pm.configuration-data.port-mirror-configuration-topology.configuration-identifiers.configuration-type},
+ "configuration-sub-type": ${pm.configuration-data.port-mirror-configuration-topology.configuration-identifiers.configuration-sub-type},
+ "parent-service-instance-id": ${pm.configuration-data.port-mirror-configuration-topology.configuration-identifiers.parent-service-instance-id}
+ },
+ "onap-model-information": {
+ "model-invariant-uuid": ${pm.configuration-data.port-mirror-configuration-topology.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${pm.configuration-data.port-mirror-configuration-topology.onap-model-information.model-customization-uuid},
+ "model-uuid": ${pm.configuration-data.port-mirror-configuration-topology.onap-model-information.model-uuid},
+ "model-version" ${pm.configuration-data.port-mirror-configuration-topology.onap-model-information.model-version},
+ "model-name": ${pm.configuration-data.port-mirror-configuration-topology.onap-model-information.model-name}
+ },
+ "port-mirror-configuration-assignments": {
+ "vnics-group-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.vnics-group-id},
+ "owning-entity": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.owning-entity},
+ "tenant-context": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.tenant-context},
+ "tenant": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.tenant},
+ "tenant-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.tenant-id},
+ "cloud-region-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.cloud-region-id},
+ "cloud-owner": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.cloud-owner},
+ "dest-network-fqdn": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-network-fqdn},
+ "source-network-fqdn": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-network-fqdn},
+ "source-capacity": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-capacity},
+ "source-vnf-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-vnf-id},
+ "dest-vnf-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-vnf-id},
+ "dest-pnf-name": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-pnf-name},
+ "dest-p-interface": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-p-interface},
+ "dest-pnf-port-policy-name": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-pnf-port-policy-name},
+ "probe-type": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.probe-type},
+ "route-allotted-resource-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.route-allotted-resource-id},
+ "source-vnfc-instance-group-id": {
+ "service-instance-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-vnfc-instance-group-id.service-instance-id},
+ "nfc-function": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-vnfc-instance-group-id.nfc-function},
+ "instance-group-role": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-vnfc-instance-group-id.instance-group-role},
+ "configuration-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-vnfc-instance-group-id.configuration-id}
+ },
+ "dest-vnfc-instance-group-id": {
+ "service-instance-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-vnfc-instance-group-id.service-instance-id},
+ "nfc-function": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-vnfc-instance-group-id.nfc-function},
+ "instance-group-role": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-vnfc-instance-group-id.instance-group-role},
+ "configuration-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-vnfc-instance-group-id.configuration-id}
+ },
+ "source-to-dest-maps": {
+ "source-to-dest-map": [
+ ${repeat:pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map_length:
+ {
+ "source-port-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].source-port-id},
+ "source-port-name": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].source-port-name},
+ "dest-port-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-port-id},
+ "dest-port-name": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-port-name},
+ "link-name": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].link-name},
+ "source-vserver-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].source-vserver-id},
+ "dest-vserver-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-vserver-id},
+ "dest-ip-addresses": {
+ "ip-addresses": {
+ "ipv4-address": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-ip-addresses.ip-addresses.ipv4-address},
+ "ipv6-address": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-ip-addresses.ip-addresses.ipv6-address},
+ "vipv4-address": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-ip-addresses.ip-addresses.vipv4-address},
+ "vipv6-address": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-ip-addresses.ip-addresses.vipv6-address}
+ }
+ }
+ },
+ }
+ ]
+ },
+ "port-mirror-configuration-instance-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.port-mirror-configuration-instance-id}
+ }
+ },
+ "configuration-oper-status": {
+ "order-status": ${pm.configuration-data.configuration-oper-status.order-status},
+ "last-rpc-action": ${pm.configuration-data.configuration-oper-status.last-rpc-action},
+ "last-action": ${pm.configuration-data.configuration-oper-status.last-action},
+ "last-svc-request-id": ${pm.configuration-data.configuration-oper-status.last-svc-request-id},
+ "last-order-status": ${pm.configuration-data.configuration-oper-status.last-order-status},
+ "create-timestamp": ${pm.configuration-data.configuration-oper-status.create-timestamp},
+ "modify-timestamp": ${pm.configuration-data.configuration-oper-status.modify-timestamp}
+ }
+ }
+ }
+}
+
diff --git a/ms/gra/gra-docker/src/main/templates/security-zone-allotted-resource.json b/ms/gra/gra-docker/src/main/templates/security-zone-allotted-resource.json
new file mode 100644
index 0000000..afbd0bb
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/templates/security-zone-allotted-resource.json
@@ -0,0 +1,78 @@
+{
+ "security-zone-allotted-resource": {
+ "allotted-resource-id": ${sz-ar.allotted-resource-id},
+ "allotted-resource-data": {
+ "security-zone-topology": {
+ "allotted-resource-identifiers": {
+ "consuming-service-instance-id": ${sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.consuming-service-instance-id},
+ "allotted-resource-name": ${sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.allotted-resource-name},
+ "allotted-resource-id": ${sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.allotted-resource-id},
+ "parent-service-instance-id": ${sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.parent-service-instance-id},
+ "allotted-resource-type": ${sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.allotted-resource-type}
+ },
+ "onap-model-information": {
+ "model-invariant-uuid": ${sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-customization-uuid},
+ "model-uuid": ${sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-uuid},
+ "model-version": ${sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-version}
+ },
+ "security-zone-assignments": {
+ "trusted-network-role": ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.trusted-network-role},
+ "security-zone-name-trusted": ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-name-trusted},
+ "security-zone-name-untrusted": ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-name-untrusted},
+ "untrusted-network-role": ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.untrusted-network-role},
+ "security-zone-service-instance-id" : ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-service-instance-id},
+ "security-zone-vnf-id" : ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-vnf-id},
+ "vlan-tag": ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.vlan-tag}
+ },
+ "security-zone-parameters": {
+ }
+
+ },
+ "allotted-resource-operation-information": {
+ "allotted-resource-information": {
+ "allotted-resource-id": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.allotted-resource-id},
+ "allotted-resource-type": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.allotted-resource-type},
+ "parent-service-instance-id": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.parent-service-instance-id},
+ "onap-model-information": {
+ "model-invariant-uuid": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-customization-uuid},
+ "model-uuid": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-uuid},
+ "model-version": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-version}
+ }
+ },
+ "sdnc-request-header": {
+ "svc-request-id": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id},
+ "svc-action": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-action}
+ },
+ "request-information": {
+ "request-id": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-id},
+ "source": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.source},
+ "order-version": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.order-version},
+ "order-number": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.order-number},
+ "notification-url": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.notification-url},
+ "request-action": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action}
+ },
+ "security-zone-request-input": {
+ "vlan-tag": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.security-zone-request-input.vlan-tag},
+ "trusted-network-role" : ${sz-ar.allotted-resource-data.allotted-resource-operation-information.security-zone-request-input.trusted-network-role},
+ "untrusted-network-role" : ${sz-ar.allotted-resource-data.allotted-resource-operation-information.security-zone-request-input.untrusted-network-role}
+ }
+ },
+ "allotted-resource-oper-status": {
+ "last-action": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action},
+ "modify-timestamp": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.modify-timestamp},
+ "last-order-status": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.last-order-status},
+ "create-timestamp": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp},
+ "order-status": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status},
+ "last-rpc-action": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action},
+ "last-svc-request-id": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id}
+ }
+ },
+ "allotted-resource-status" : {
+ "action": ${sz-ar.allotted-resource-status.action},
+ "rpc-name": ${sz-ar.allotted-resource-status.rpc-name},
+ "rpc-action": ${sz-ar.allotted-resource-status.rpc-action}
+ }
+ }
+}
diff --git a/ms/gra/gra-docker/src/main/templates/vf-module-assign.json b/ms/gra/gra-docker/src/main/templates/vf-module-assign.json
new file mode 100644
index 0000000..ed2e4f0
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/templates/vf-module-assign.json
@@ -0,0 +1,279 @@
+{
+ "vf-module": {
+ "vf-module-id": ${vf-module-topology-operation-input.vf-module-information.vf-module-id},
+ "vf-module-data": {
+ "sdnc-request-header": {
+ "svc-request-id": ${vf-module-data.sdnc-request-header.svc-request-id},
+ "svc-action": ${vf-module-data.sdnc-request-header.svc-action},
+ "svc-notification-url": ${vf-module-data.sdnc-request-header.svc-notification-url}
+ },
+ "request-information": {
+ "request-id": ${vf-module-data.request-information.request-id},
+ "request-action": ${vf-module-data.request-information.request-action},
+ "source": ${vf-module-data.request-information.source},
+ "notification-url": ${vf-module-data.request-information.notification-url},
+ "order-number": ${vf-module-data.request-information.order-number},
+ "order-version": ${vf-module-data.request-information.order-version}
+ },
+ "service-information": {
+ "service-id": ${vf-module-data.service-information.service-id},
+ "subscription-service-type": ${vf-module-data.service-information.subscription-service-type},
+ "onap-model-information": {
+ "model-invariant-uuid": ${vf-module-data.service-information.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${vf-module-data.service-information.onap-model-information.model-customization-uuid},
+ "model-uuid": ${vf-module-data.service-information.onap-model-information.model-uuid},
+ "model-version": ${vf-module-data.service-information.onap-model-information.model-version},
+ "model-name": ${vf-module-data.service-information.onap-model-information.model-name}
+ },
+ "service-instance-id": ${vf-module-data.service-information.service-instance-id},
+ "global-customer-id": ${vf-module-data.service-information.global-customer-id},
+ "subscriber-name": ${vf-module-data.service-information.subscriber-name}
+ },
+ "vnf-information": {
+ "vnf-id": ${vf-module-data.vnf-information.vnf-id},
+ "vnf-type": ${vf-module-data.vnf-information.vnf-type},
+ "vnf-name": ${vf-module-data.vnf-information.vnf-name},
+ "onap-model-information": {
+ "model-invariant-uuid": ${vf-module-data.vnf-information.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${vf-module-data.vnf-information.onap-model-information.model-customization-uuid},
+ "model-uuid": ${vf-module-data.vnf-information.onap-model-information.model-uuid},
+ "model-version": ${vf-module-data.vnf-information.onap-model-information.model-version},
+ "model-name": ${vf-module-data.vnf-information.onap-model-information.model-name}
+ }
+ },
+ "vf-module-information": {
+ "vf-module-id": ${vf-module-data.vf-module-information.vf-module-id},
+ "vf-module-type": ${vf-module-data.vf-module-information.vf-module-type},
+ "from-preload": ${vf-module-data.vf-module-information.from-preload},
+ "onap-model-information": {
+ "model-invariant-uuid": ${vf-module-data.vf-module-information.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${vf-module-data.vf-module-information.onap-model-information.model-customization-uuid},
+ "model-uuid": ${vf-module-data.vf-module-information.onap-model-information.model-uuid},
+ "model-version": ${vf-module-data.vf-module-information.onap-model-information.model-version},
+ "model-name": ${vf-module-data.vf-module-information.onap-model-information.model-name}
+ }
+ },
+ "vf-module-request-input": {
+ "request-version": ${vf-module-data.vf-module-request-input.request-version},
+ "vf-module-name": ${vf-module-data.vf-module-request-input.vf-module-name},
+ "tenant": ${vf-module-data.vf-module-request-input.tenant},
+ "aic-cloud-region": ${vf-module-data.vf-module-request-input.aic-cloud-region},
+ "aic-clli": ${vf-module-data.vf-module-request-input.aic-clli},
+ "vf-module-input-parameters": {
+ "param": [
+${repeat:vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length:
+ {
+ "name": ${vf-module-data.vf-module-request-input.vf-module-input-parameters.param[${1}].name},
+ "value": ${vf-module-data.vf-module-request-input.vf-module-input-parameters.param[${1}].value}
+ },
+}
+ ]
+ }
+ },
+ "vf-module-topology": {
+ "vf-module-topology-identifier": {
+ "vf-module-id": ${vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id},
+ "vf-module-name": ${vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-name},
+ "vf-module-type": ${vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-type}
+ },
+ "tenant": ${vf-module-data.vf-module-topology.tenant},
+ "aic-cloud-region": ${vf-module-data.vf-module-topology.aic-cloud-region},
+ "cloud-owner": ${vf-module-data.vf-module-topology.cloud-owner},
+ "aic-clli": ${vf-module-data.vf-module-topology.aic-clli},
+ "onap-model-information": {
+ "model-invariant-uuid": ${vf-module-data.vf-module-topology.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${vf-module-data.vf-module-topology.onap-model-information.model-customization-uuid},
+ "model-uuid": ${vf-module-data.vf-module-topology.onap-model-information.model-uuid},
+ "model-version": ${vf-module-data.vf-module-topology.onap-model-information.model-version},
+ "model-name": ${vf-module-data.vf-module-topology.onap-model-information.model-name}
+ },
+ "vf-module-assignments": {
+ "vf-module-status": ${vf-module-data.vf-module-topology.vf-module-assignments.vf-module-status},
+ "vms": {
+ "vm": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length:
+ {
+ "vm-type": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-type},
+ "onap-model-information": {
+ "model-invariant-uuid": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].onap-model-information.model-customization-uuid},
+ "model-uuid": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].onap-model-information.model-uuid},
+ "model-version": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].onap-model-information.model-version},
+ "model-name": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].onap-model-information.model-name}
+ },
+ "nfc-naming-code": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].nfc-naming-code},
+ "vm-type-tag": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-type-tag},
+ "vm-count": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-count},
+ "vm-names": {
+ "vm-name": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vm-name_length:
+ ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vm-name[${2}]},
+}
+ ],
+ "vnfc-names": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names_length:
+ {
+ "vnfc-name": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-name},
+ "vnfc-networks": {
+ "vnfc-network-data": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data_length:
+ {
+ "vnfc-network-role": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-network-role},
+ "vnfc-type": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-type},
+ "connection-point": {
+ "connection-point-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.connection-point-id},
+ "port-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.port-id},
+ "vlan-data": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.vlan-data_length:
+ {
+ "vlan-uuid": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.vlan-data[${4}].vlan-uuid},
+ "vlan-tag-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.vlan-data[${4}].vlan-tag-id},
+ "vlan-tag-description": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.vlan-data[${4}].vlan-tag-description},
+ "vlan-role": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.vlan-data[${4}].vlan-role}
+ },
+}
+ ]
+ },
+ "vnfc-subnet": {
+ "vnfc-subnet-role": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-subnet-role},
+ "vnfc-ip-assignments": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments_length:
+ {
+ "vnfc-address-family": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-ip-assignments},
+ "vnfc-subnet-dhcp": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-subnet-dhcp},
+ "vnfc-subnet-ip-count": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-subnet-ip-count},
+ "vnfc-subnet-ip": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-subnet-ip_length:
+ {
+ "vnfc-ip-address": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-subnet-ip[${5}].vnfc-ip-address},
+ "vnfc-client-key": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-subnet-ip[${5}].vnfc-client-key},
+ "ip-type": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-subnet-ip[${5}].ip-type}
+ }
+}
+ ]
+ }
+}
+ ]
+ }
+ },
+}
+ ]
+ }
+ },
+}
+ ]
+ },
+ "vm-networks": {
+ "vm-network": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network_length:
+ {
+ "network-role": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-role},
+ "network-role-tag": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-role-tag},
+ "network-information-items": {
+ "network-information-item": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-information-items.network-information-item_length:
+ {
+ "ip-version": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-information-items.network-information-item[${3}].ip-version},
+ "use-dhcp": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-information-items.network-information-item[${3}].use-dhcp},
+ "ip-count": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-information-items.network-information-item[${3}].ip-count},
+ "network-ips": {
+ "network-ip": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-information-items.network-information-item[${3}].network-ips.network-ip_length:
+ ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-information-items.network-information-item[${3}].network-ips.network-ip[${4}]},
+}
+ ]
+ }
+ },
+}
+ ]
+ },
+ "mac-addresses": {
+ "mac-address": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].mac-addresses.mac-address_length:
+ ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].mac-addresses.mac-address[${3}]},
+}
+ ]
+ },
+ "floating-ips": {
+ "floating-ip-v4": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].floating-ips.floating-ip-v4_length:
+ ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].floating-ips.floating-ip-v4[${3}]},
+}
+ ],
+ "floating-ip-v6": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].floating-ips.floating-ip-v6_length:
+ ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].floating-ips.floating-ip-v6[${3}]},
+}
+ ]
+ },
+ "interface-route-prefixes": {
+ "interface-route-prefix": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].interface-route-prefixes.interface-route-prefix:
+ ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].interface-route-prefixes.interface-route-prefix[${3}]},
+}
+ ]
+ },
+ "is-trunked": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].is-trunked},
+ "segmentation-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].segmentation-id},
+ "related-networks": {
+ "related-network": [
+${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network_length:
+ {
+ "network-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network[${3}].network-id},
+ "network-role": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network[${3}].network-role},
+ "vlan-tags": {
+ "vlan-interface": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network[${3}].vlan-tags.vlan-interface},
+ "upper-tag-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network[${3}].vlan-tags.upper-tag-id},
+ "lower-tag-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network[${3}].vlan-tags.lower-tag-id},
+ "is-private": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network[${3}].vlan-tags.is-private}
+ }
+ },
+}
+ ]
+ }
+ },
+}
+ ]
+ }
+ },
+}
+ ]
+ }
+ },
+ "vf-module-parameters": {
+ "param": [
+${repeat:vf-module-data.vf-module-topology.vf-module-parameters.param_length:
+ {
+ "name": ${vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].name},
+ "value": ${vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].value},
+ "resource-resolution-data": {
+ "resource-key": [
+${repeat:vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].resource-resolution-data.resource-key_length:
+ {
+ "name": ${vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].resource-resolution-data.resource-key[${2}].name},
+ "value": ${vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].resource-resolution-data.resource-key[${2}].value}
+ },
+}
+ ],
+ "status": ${vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].resource-resolution-data.status},
+ "capability-name": ${vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].resource-resolution-data.capability-name}
+ },
+ },
+}
+ ]
+ },
+ "sdnc-generated-cloud-resources": ${vf-module-data.vf-module-topology.sdnc-generated-cloud-resources}
+ },
+ "vf-module-level-oper-status": {
+ "order-status": ${vf-module-data.vf-module-level-oper-status.order-status},
+ "last-rpc-action": ${vf-module-data.vf-module-level-oper-status.last-rpc-action},
+ "last-action": ${vf-module-data.vf-module-level-oper-status.last-action},
+ "last-svc-request-id": ${vf-module-data.vf-module-level-oper-status.last-svc-request-id},
+ "last-order-status": ${vf-module-data.vf-module-level-oper-status.last-order-status},
+ "create-timestamp": ${vf-module-data.vf-module-level-oper-status.create-timestamp},
+ "modify-timestamp": ${vf-module-data.vf-module-level-oper-status.modify-timestamp}
+ }
+ }
+ }
+}
+
diff --git a/ms/gra/gra-docker/src/main/templates/vnf-data-assign.json b/ms/gra/gra-docker/src/main/templates/vnf-data-assign.json
new file mode 100644
index 0000000..a58c811
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/templates/vnf-data-assign.json
@@ -0,0 +1,249 @@
+{
+ "vnf": {
+ "vnf-id": ${vnf-topology-operation-input.vnf-information.vnf-id},
+ "vnf-data": {
+ "sdnc-request-header": {
+ "svc-request-id": ${vnf-data.sdnc-request-header.svc-request-id},
+ "svc-action": ${vnf-data.sdnc-request-header.svc-action},
+ "svc-notification-url": ${vnf-data.sdnc-request-header.svc-notification-url}
+ },
+ "request-information": {
+ "request-id": ${vnf-data.request-information.request-id},
+ "request-action": ${vnf-data.request-information.request-action},
+ "source": ${vnf-data.request-information.source},
+ "notification-url": ${vnf-data.request-information.notification-url},
+ "order-number": ${vnf-data.request-information.order-number},
+ "order-version": ${vnf-data.request-information.order-version}
+ },
+ "service-information": {
+ "service-id": ${vnf-data.service-information.service-id},
+ "subscription-service-type": ${vnf-data.service-information.subscription-service-type},
+ "onap-model-information": {
+ "model-invariant-uuid": ${vnf-data.service-information.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${vnf-data.service-information.onap-model-information.model-customization-uuid},
+ "model-uuid": ${vnf-data.service-information.onap-model-information.model-uuid},
+ "model-version": ${vnf-data.service-information.onap-model-information.model-version},
+ "model-name": ${vnf-data.service-information.onap-model-information.model-name}
+ },
+ "service-instance-id": ${vnf-data.service-information.service-instance-id},
+ "global-customer-id": ${vnf-data.service-information.global-customer-id},
+ "subscriber-name": ${vnf-data.service-information.subscriber-name}
+ },
+ "vnf-information": {
+ "vnf-id": ${vnf-data.vnf-information.vnf-id},
+ "vnf-type": ${vnf-data.vnf-information.vnf-type},
+ "vnf-name": ${vnf-data.vnf-information.vnf-name},
+ "onap-model-information": {
+ "model-invariant-uuid": ${vnf-data.vnf-information.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${vnf-data.vnf-information.onap-model-information.model-customization-uuid},
+ "model-uuid": ${vnf-data.vnf-information.onap-model-information.model-uuid},
+ "model-version": ${vnf-data.vnf-information.onap-model-information.model-version},
+ "model-name": ${vnf-data.vnf-information.onap-model-information.model-name}
+ }
+ },
+ "vnf-request-input": {
+ "request-version": ${vnf-data.vnf-request-input.request-version},
+ "vnf-name": ${vnf-data.vnf-request-input.vnf-name},
+ "tenant": ${vnf-data.vnf-request-input.tenant},
+ "aic-cloud-region": ${vnf-data.vnf-request-input.aic-cloud-region},
+ "cloud-owner": ${vnf-data.vnf-request-input.cloud-owner},
+ "aic-clli": ${vnf-data.vnf-request-input.aic-clli},
+ "vnf-networks": {
+ "vnf-network": [
+${repeat:vnf-data.vnf-request-input.vnf-networks.vnf-network_length:
+ {
+ "network-role": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].network-role},
+ "network-name": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].network-name},
+ "neutron-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].neutron-id},
+ "network-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].network-id},
+ "contrail-network-fqdn": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].contrail-network-fqdn},
+ "subnets-data": {
+ "subnet-data": [
+${repeat:vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data_length:
+ {
+ "sdnc-subnet-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].sdnc-subnet-id},
+ "subnet-role": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].subnet-role},
+ "subnet-name": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].subnet-name},
+ "ip-version": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].ip-version},
+ "subnet-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].subnet-id},
+ "dhcp-enabled": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].dhcp-enabled},
+ "network-start-address": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].network-start-address},
+ "gateway-address": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].gateway-address},
+ "cidr-mask": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].cidr-mask}
+ },
+}
+ ]
+ },
+ "is-trunked": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].is-trunked},
+ "segmentation-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].segmentation-id},
+ "related-networks": {
+ "related-network": [
+${repeat:vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network_length:
+ {
+ "network-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].network-id},
+ "network-role": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].network-role},
+ "vlan-tags": {
+ "vlan-interface": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.vlan-interface},
+ "upper-tag-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.upper-tag-id},
+ "lower-tag-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.lower-tag-id},
+ "is-private": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.is-private}
+ }
+ },
+}
+ ]
+ },
+ },
+}
+ ]
+ },
+ "vnf-network-instance-group-ids": [
+${repeat:vnf-data.vnf-request-input.vnf-network-instance-group-ids_length:
+ {
+ "vnf-network-instance-group-id": ${vnf-data.vnf-request-input.vnf-network-instance-group-ids[${1}].vnf-network-instance-group-id}
+ },
+}
+ ],
+ "vnf-input-parameters": {
+ "param": [
+${repeat:vnf-data.vnf-request-input.vnf-input-parameters.param_length:
+ {
+ "name": ${vnf-data.vnf-request-input.vnf-input-parameters.param[${1}].name},
+ "value": ${vnf-data.vnf-request-input.vnf-input-parameters.param[${1}].value}
+ },
+}
+ ]
+ }
+ },
+ "vnf-topology": {
+ "vnf-topology-identifier-structure": {
+ "vnf-id": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id},
+ "vnf-type": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-type},
+ "nf-type": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-type},
+ "nf-role": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role},
+ "nf-function": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-function},
+ "nf-code": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-code},
+ "vnf-name": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name},
+ },
+ "tenant": ${vnf-data.vnf-topology.tenant},
+ "aic-cloud-region": ${vnf-data.vnf-topology.aic-cloud-region},
+ "cloud-owner": ${vnf-data.vnf-topology.cloud-owner},
+ "aic-clli": ${vnf-data.vnf-topology.aic-clli},
+ "onap-model-information": {
+ "model-invariant-uuid": ${vnf-data.vnf-topology.onap-model-information.model-invariant-uuid},
+ "model-customization-uuid": ${vnf-data.vnf-topology.onap-model-information.model-customization-uuid},
+ "model-uuid": ${vnf-data.vnf-topology.onap-model-information.model-uuid},
+ "model-version": ${vnf-data.vnf-topology.onap-model-information.model-version},
+ "model-name": ${vnf-data.vnf-topology.onap-model-information.model-name},
+ },
+ "vnf-resource-assignments": {
+ "vnf-status": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-status},
+ "availability-zones": {
+ "availability-zone": [
+${repeat:vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone_length:
+ ${vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[${1}]},
+}
+ ]
+ },
+ "vnf-networks": {
+ "vnf-network": [
+${repeat:vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length:
+ {
+ "network-role": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].network-role},
+ "network-name": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].network-name},
+ "neutron-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].neutron-id},
+ "network-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].network-id},
+ "contrail-network-fqdn": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].contrail-network-fqdn},
+ "subnets-data": {
+ "subnet-data": [
+${repeat:vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data_length:
+ {
+ "sdnc-subnet-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].sdnc-subnet-id},
+ "subnet-role": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].subnet-role},
+ "subnet-name": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].subnet-name},
+ "ip-version": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].ip-version},
+ "subnet-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].subnet-id},
+ "dhcp-enabled": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].dhcp-enabled},
+ "network-start-address": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].network-start-address},
+ "gateway-address": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].gateway-address},
+ "cidr-mask": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].cidr-mask}
+ },
+}
+ ]
+ },
+ "is-trunked": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].is-trunked},
+ "segmentation-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].segmentation-id},
+ "related-networks": {
+ "related-network": [
+${repeat:vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network_length:
+ {
+ "network-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].network-id},
+ "network-role": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].network-role},
+ "vlan-tags": {
+ "vlan-interface": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.vlan-interface},
+ "upper-tag-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.upper-tag-id},
+ "lower-tag-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.lower-tag-id},
+ "is-private": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.is-private}
+ }
+ },
+}
+ ]
+ }
+ },
+}
+ ]
+ }
+ },
+ "vnf-parameters-data": {
+ "param": [
+${repeat:vnf-data.vnf-topology.vnf-parameters-data.param_length:
+ {
+ "name": ${vnf-data.vnf-topology.vnf-parameters-data.param[${1}].name},
+ "value": ${vnf-data.vnf-topology.vnf-parameters-data.param[${1}].value}
+ },
+}
+ ]
+ },
+ "sdnc-generated-cloud-resources": ${vnf-data.vnf-topology.sdnc-generated-cloud-resources},
+ },
+ "vnf-network-collections": {
+ "vnf-network-collection": [
+${repeat:vnf-data.vnf-network-collections.vnf-network-collection_length:
+ {
+ "network-instance-group-function": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].network-instance-group-function},
+ "network-instance-group-id": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].network-instance-group-id},
+ "network-collection-service-instance-id": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].network-collection-service-instance-id},
+ "network-collection-customization-uuid": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].network-collection-customization-uuid},
+ "networks": {
+ "network": [
+${repeat:vnf-data.vnf-network-collections.vnf-network-collection[${1}].networks.network_length:
+ {
+ "network-id": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].networks.network[${2}].network-id},
+ "neutron-network-id": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].networks.network[${2}].neutron-network-id}
+ },
+}
+ ]
+ },
+ "vnf-floating-ip": {
+ "ip-addresses": {
+ "ipv4-address": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].vnf-floating-ip.ip-addresses.ipv4-address},
+ "ipv6-address": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].vnf-floating-ip.ip-addresses.ipv6-address},
+ "vipv4-address": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].vnf-floating-ip.ip-addresses.vipv4-address},
+ "vipv6-address": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].vnf-floating-ip.ip-addresses.vipv6-address}
+ }
+ }
+ },
+}
+ ]
+ },
+ "vnf-level-oper-status": {
+ "order-status": ${vnf-data.vnf-level-oper-status.order-status},
+ "last-rpc-action": ${vnf-data.vnf-level-oper-status.last-rpc-action},
+ "last-action": ${vnf-data.vnf-level-oper-status.last-action},
+ "last-svc-request-id": ${vnf-data.vnf-level-oper-status.last-svc-request-id},
+ "last-order-status": ${vnf-data.vnf-level-oper-status.last-order-status},
+ "create-timestamp": ${vnf-data.vnf-level-oper-status.create-timestamp},
+ "modify-timestamp": ${vnf-data.vnf-level-oper-status.modify-timestamp}
+ }
+ }
+ }
+}
diff --git a/ms/gra/gra-docker/src/main/templates/vnf-level-oper-status.json b/ms/gra/gra-docker/src/main/templates/vnf-level-oper-status.json
new file mode 100644
index 0000000..6f80b46
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/templates/vnf-level-oper-status.json
@@ -0,0 +1,12 @@
+{
+ "oper-status": {
+ "order-status": ${vnf-level-oper-status.order-status},
+ "last-rpc-action": ${vnf-level-oper-status.last-rpc-action},
+ "last-action": ${vnf-level-oper-status.last-action},
+ "last-svc-request-id": ${vnf-level-oper-status.last-svc-request-id},
+ "last-order-status": ${vnf-level-oper-status.last-order-status},
+ "create-timestamp": ${vnf-level-oper-status.create-timestamp},
+ "modify-timestamp": ${vnf-level-oper-status.modify-timestamp}
+ }
+}
+
diff --git a/ms/gra/gra-docker/src/main/templates/vnf-network.json b/ms/gra/gra-docker/src/main/templates/vnf-network.json
new file mode 100644
index 0000000..8fbf755
--- /dev/null
+++ b/ms/gra/gra-docker/src/main/templates/vnf-network.json
@@ -0,0 +1,45 @@
+{
+ "vnf-network": {
+ "network-role": ${vnf-network-data.network-role},
+ "network-name": ${vnf-network-data.network-name},
+ "neutron-id": ${vnf-network-data.neutron-id},
+ "network-id": ${vnf-network-data.network-id},
+ "contrail-network-fqdn": ${vnf-network-data.contrail-network-fqdn},
+ "subnets-data": {
+ "subnet-data": [
+${repeat:vnf-network-data.subnets-data.subnet-data_length:
+ {
+ "sdnc-subnet-id": ${vnf-network-data.subnets-data.subnet-data[${1}].sdnc-subnet-id},
+ "subnet-role": ${vnf-network-data.subnets-data.subnet-data[${1}].subnet-role},
+ "subnet-name": ${vnf-network-data.subnets-data.subnet-data[${1}].subnet-name},
+ "ip-version": ${vnf-network-data.subnets-data.subnet-data[${1}].ip-version},
+ "subnet-id": ${vnf-network-data.subnets-data.subnet-data[${1}].subnet-id},
+ "dhcp-enabled": ${vnf-network-data.subnets-data.subnet-data[${1}].dhcp-enabled},
+ "network-start-address": ${vnf-network-data.subnets-data.subnet-data[${1}].network-start-address},
+ "gateway-address": ${vnf-network-data.subnets-data.subnet-data[${1}].gateway-address},
+ "cidr-mask": ${vnf-network-data.subnets-data.subnet-data[${1}].cidr-mask}
+ },
+}
+ ]
+ },
+ "is-trunked": ${vnf-network-data.is-trunked},
+ "segmentation-id": ${vnf-network-data.segmentation-id},
+ "related-networks": {
+ "related-network": [
+${repeat:vnf-network-data.related-networks.related-network_length:
+ {
+ "network-id": ${vnf-network-data.related-networks.related-network[${1}].network-id},
+ "network-role": ${vnf-network-data.related-networks.related-network[${1}].network-role},
+ "vlan-tags": {
+ "vlan-interface": ${vnf-network-data.related-networks.related-network[${1}].vlan-tags.vlan-interface},
+ "upper-tag-id": ${vnf-network-data.related-networks.related-network[${1}].vlan-tags.upper-tag-id},
+ "lower-tag-id": ${vnf-network-data.related-networks.related-network[${1}].vlan-tags.lower-tag-id},
+ "is-private": ${vnf-network-data.related-networks.related-network[${1}].vlan-tags.is-private}
+ }
+ },
+}
+ ]
+ }
+ }
+}
+
diff --git a/ms/gra/pom.xml b/ms/gra/pom.xml
index e36f8b9..56b8e39 100644
--- a/ms/gra/pom.xml
+++ b/ms/gra/pom.xml
@@ -18,6 +18,7 @@
* limitations under the License.
* ============LICENSE_END=========================================================
-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -35,11 +36,6 @@
<description>Generic Resource API microservice</description>
<properties>
- <aaf.cadi.version>2.1.21</aaf.cadi.version>
- <ccsdk.apps.version>1.3.0-SNAPSHOT</ccsdk.apps.version>
- <ccsdk.docker.version>1.2-STAGING-latest</ccsdk.docker.version>
- <sdnc.northbound.version>2.3.0-SNAPSHOT</sdnc.northbound.version>
- <sdnc.oam.version>2.3.0-SNAPSHOT</sdnc.oam.version>
<gratest.mysql.database>testdb</gratest.mysql.database>
<gratest.mysql.root.password>itsASecret</gratest.mysql.root.password>
<gratest.mysql.user>testdb</gratest.mysql.user>