summaryrefslogtreecommitdiffstats
path: root/ms/gra/gra-app/src/main/java
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/gra-app/src/main/java
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/gra-app/src/main/java')
-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
45 files changed, 8823 insertions, 237 deletions
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 ");
+ }
+}
+