diff options
Diffstat (limited to 'adapters')
43 files changed, 282 insertions, 4652 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql index 0b921ecfb4..c64ec25492 100644 --- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql @@ -659,13 +659,13 @@ VALUES ('VNF', 'CONFIGURED', 'ACTIVATE', 'CONTINUE'), ('VNF', 'CONFIGURED', 'UNASSIGN', 'CONTINUE'), -('VNF', 'CONFIGURED', 'DESACTIVATE', 'SILENT_SUCCESS'), +('VNF', 'CONFIGURED', 'DEACTIVATE', 'SILENT_SUCCESS'), ('VNF', 'CONFIGURE', 'UNASSIGN', 'CONTINUE'), -('VNF', 'CONFIGURE', 'DESACTIVATE', 'SILENT_SUCCESS'), +('VNF', 'CONFIGURE', 'DEACTIVATE', 'SILENT_SUCCESS'), ('VNF', 'CONFIGASSIGNED', 'UNASSIGN', 'CONTINUE'), -('VNF', 'CONFIGASSIGNED', 'DESACTIVATE', 'SILENT_SUCCESS'); +('VNF', 'CONFIGASSIGNED', 'DEACTIVATE', 'SILENT_SUCCESS'); UPDATE orchestration_flow_reference SET FLOW_NAME = 'HomingBB' WHERE FLOW_NAME = 'SniroHoming'; diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java index c202170235..8ce4051b24 100644 --- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java +++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java @@ -197,8 +197,8 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest { assertNotNull(vnfResourceCustomization.getVnfResources()); assertNotNull(vnfResourceCustomization.getVfModuleCustomizations()); assertEquals("vSAMP10a", vnfResourceCustomization.getVnfResources().getModelName()); - assertTrue("skip post instantiation configuration", - vnfResourceCustomization.isSkipPostInstConf().booleanValue()); + assertFalse("skip post instantiation configuration", + vnfResourceCustomization.getSkipPostInstConf().booleanValue()); } @Test @@ -617,7 +617,7 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest { assertEquals("modelInstanceName", "PNF routing", pnfResourceCustomization.getModelInstanceName()); assertEquals("blueprintName", "test_configuration_restconf", pnfResourceCustomization.getBlueprintName()); assertEquals("blueprintVersion", "1.0.0", pnfResourceCustomization.getBlueprintVersion()); - assertTrue("skip post instantiation configuration", pnfResourceCustomization.isSkipPostInstConf()); + assertTrue("skip post instantiation configuration", pnfResourceCustomization.getSkipPostInstConf()); PnfResource pnfResource = pnfResourceCustomization.getPnfResources(); assertNotNull(pnfResource); assertEquals("PNFResource modelUUID", "ff2ae348-214a-11e7-93ae-92361f002680", pnfResource.getModelUUID()); diff --git a/adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql b/adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql index 53a457dadf..c975f8b755 100644 --- a/adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql +++ b/adapters/mso-catalog-db-adapter/src/test/resources/db/migration/afterMigrate.sql @@ -64,9 +64,9 @@ insert into vnf_resource(orchestration_mode, description, creation_timestamp, mo ('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002672', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '2.0', 'vSAMP10a', 'VF', 'ff874603-4222-11e7-9252-005056850d2e'); -insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design,service_model_uuid,resource_input) values -('68dc9a92-214c-11e7-93ae-92361f002671', 'vSAMP10a 1', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002671', null,'5df8b6de-2083-11e7-93ae-92361f002671', '{\\\"resource_input\\\":\\\"test\\\"}'), -('68dc9a92-214c-11e7-93ae-92361f002672', 'vSAMP10a 2', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002672', null,'5df8b6de-2083-11e7-93ae-92361f002672', null); +insert into vnf_resource_customization(model_customization_uuid, model_instance_name, min_instances, max_instances, availability_zone_max_count, nf_type, nf_role, nf_function, nf_naming_code, creation_timestamp, vnf_resource_model_uuid, multi_stage_design,service_model_uuid,resource_input,skip_post_instantiation_configuration) values +('68dc9a92-214c-11e7-93ae-92361f002671', 'vSAMP10a 1', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002671', null,'5df8b6de-2083-11e7-93ae-92361f002671', '{\\\"resource_input\\\":\\\"test\\\"}', false), +('68dc9a92-214c-11e7-93ae-92361f002672', 'vSAMP10a 2', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002672', null,'5df8b6de-2083-11e7-93ae-92361f002672', null, false); diff --git a/adapters/mso-openstack-adapters/pom.xml b/adapters/mso-openstack-adapters/pom.xml index 32448d31dc..aa6e5041e3 100644 --- a/adapters/mso-openstack-adapters/pom.xml +++ b/adapters/mso-openstack-adapters/pom.xml @@ -139,10 +139,12 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-spring-boot-starter-jaxws</artifactId> + <exclusions> + <exclusion> + <groupId>org.apache.tomcat</groupId> + <artifactId>tomcat-jdbc</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.cxf</groupId> @@ -150,7 +152,7 @@ </dependency> <dependency> <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-service-description-swagger</artifactId> + <artifactId>cxf-rt-rs-service-description-openapi-v3</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/cloudregion/CloudRegionRestV1.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/cloudregion/CloudRegionRestV1.java index 6cf42e1433..49cc0190db 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/cloudregion/CloudRegionRestV1.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/cloudregion/CloudRegionRestV1.java @@ -39,15 +39,18 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import io.swagger.annotations.ApiResponse; -import io.swagger.annotations.ApiResponses; +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; @Path("/v1/cloud-region") -@Api(value = "/v1/cloud-region", description = "root of cloud region adapter") +@OpenAPIDefinition(info = @Info(title = "/v1/cloud-region", description = "root of cloud region adapter")) @Component public class CloudRegionRestV1 { private static Logger logger = LoggerFactory.getLogger(CloudRegionRestV1.class); @@ -58,13 +61,12 @@ public class CloudRegionRestV1 { @POST @Consumes({MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_JSON}) - @ApiOperation(value = "CreateCloudRegion", response = Response.class, - notes = "Create a cloud site in MSO and Region In AAI") - @ApiResponses({@ApiResponse(code = 201, message = "Cloud Region has been created"), - @ApiResponse(code = 500, message = "Create Cloud Region has failed")}) + @Operation(description = "CreateCloudRegion", summary = "Create a cloud site in MSO and Region In AAI") + @ApiResponses({@ApiResponse(responseCode = "201", description = "Cloud Region has been created"), + @ApiResponse(responseCode = "500", description = "Create Cloud Region has failed")}) public Response createCloudRegion( - @ApiParam(value = "cloud-region-id", required = true) @PathParam("cloud-region-id") String cloudRegionId, - @ApiParam(value = "CloudSite", required = true) final CloudSite cloudSite) { + @Parameter(name = "cloud-region-id", required = true) @PathParam("cloud-region-id") String cloudRegionId, + @Parameter(name = "CloudSite", required = true) final CloudSite cloudSite) { cloudRestImpl.createCloudRegion(cloudSite); return Response.status(HttpStatus.SC_CREATED).build(); } @@ -73,12 +75,12 @@ public class CloudRegionRestV1 { @Path("{cloud-region-id}/{cloud-owner}") @Consumes({MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_JSON}) - @ApiOperation(value = "CreateCloudRegion", response = Response.class, notes = "Delete an cloud Region in SO") - @ApiResponses({@ApiResponse(code = 204, message = "cloud Region has been deleted"), - @ApiResponse(code = 500, message = "Cloud Region delete has failed")}) + @Operation(description = "CreateCloudRegion", summary = "Delete an cloud Region in SO") + @ApiResponses({@ApiResponse(responseCode = "204", description = "cloud Region has been deleted"), + @ApiResponse(responseCode = "500", description = "Cloud Region delete has failed")}) public Response deleteCloudRegion( - @ApiParam(value = "cloud-region-id", required = true) @PathParam("cloud-region-id") String cloudRegionId, - @ApiParam(value = "cloud-owner", required = true) @PathParam("cloud-owner") String cloudOwner) { + @Parameter(name = "cloud-region-id", required = true) @PathParam("cloud-region-id") String cloudRegionId, + @Parameter(name = "cloud-owner", required = true) @PathParam("cloud-owner") String cloudOwner) { cloudRestImpl.deleteCloudRegion(cloudRegionId); return Response.status(HttpStatus.SC_NO_CONTENT).build(); } @@ -87,13 +89,13 @@ public class CloudRegionRestV1 { @Path("{cloud-region-id}/{cloud-owner}") @Consumes({MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_JSON}) - @ApiOperation(value = "CreateCloudRegion", response = Response.class, notes = "Update an existing Cloud Region") - @ApiResponses({@ApiResponse(code = 200, message = "Cloud Region has been updated"), - @ApiResponse(code = 500, message = "Update Cloud Region has failed examine entity object for details")}) + @Operation(description = "CreateCloudRegion", summary = "Update an existing Cloud Region") + @ApiResponses({@ApiResponse(responseCode = "200", description = "Cloud Region has been updated"), @ApiResponse( + responseCode = "500", description = "Update Cloud Region has failed examine entity object for details")}) public Response updateCloudRegion( - @ApiParam(value = "cloud-region-id", required = true) @PathParam("cloud-region-id") String cloudRegionId, - @ApiParam(value = "cloud-owner", required = true) @PathParam("cloud-owner") String cloudOwner, - @ApiParam(value = "CloudSite", required = true) final CloudSite cloudSite) { + @Parameter(name = "cloud-region-id", required = true) @PathParam("cloud-region-id") String cloudRegionId, + @Parameter(name = "cloud-owner", required = true) @PathParam("cloud-owner") String cloudOwner, + @Parameter(name = "CloudSite", required = true) final CloudSite cloudSite) { cloudRestImpl.updateCloudRegion(cloudSite); return Response.status(HttpStatus.SC_OK).build(); } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailPolicyRef.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailPolicyRef.java deleted file mode 100644 index 214cebb338..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailPolicyRef.java +++ /dev/null @@ -1,72 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Modifications Copyright (c) 2019 Samsung - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.network; - - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.onap.logging.filter.base.ErrorCode; -import org.onap.so.logger.MessageEnum; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class ContrailPolicyRef { - - private static final Logger logger = LoggerFactory.getLogger(ContrailPolicyRef.class); - - @JsonProperty("network_policy_refs_data_sequence") - private ContrailPolicyRefSeq seq; - - public JsonNode toJsonNode() { - JsonNode node = null; - try { - ObjectMapper mapper = new ObjectMapper(); - node = mapper.convertValue(this, JsonNode.class); - } catch (Exception e) { - logger.error("{} {} Error creating JsonString for Contrail Policy Ref: ", MessageEnum.RA_MARSHING_ERROR, - ErrorCode.SchemaError.getValue(), e); - } - - return node; - } - - public String toJsonString() { - String jsonString = null; - try { - ObjectMapper mapper = new ObjectMapper(); - jsonString = mapper.writeValueAsString(this); - } catch (Exception e) { - logger.error("{} {} Error creating JsonString for Contrail Policy Ref: ", MessageEnum.RA_MARSHING_ERROR, - ErrorCode.SchemaError.getValue(), e); - } - - return jsonString; - } - - public void populate(String major, String minor) { - seq = new ContrailPolicyRefSeq(major, minor); - return; - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailPolicyRefSeq.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailPolicyRefSeq.java deleted file mode 100644 index d5ea301dd3..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailPolicyRefSeq.java +++ /dev/null @@ -1,65 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.network; - - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ContrailPolicyRefSeq { - - @JsonProperty("network_policy_refs_data_sequence_major") - private String major; - - @JsonProperty("network_policy_refs_data_sequence_minor") - private String minor; - - public ContrailPolicyRefSeq() { - /* To be done */ - } - - public ContrailPolicyRefSeq(String major, String minor) { - super(); - this.major = major; - this.minor = minor; - } - - public String getMajor() { - return major; - } - - public void setMajor(String major) { - this.major = major; - } - - public String getMinor() { - return minor; - } - - public void setMinor(String minor) { - this.minor = minor; - } - - @Override - public String toString() { - return "ContrailPolicyRefSeq [major=" + major + ", minor=" + minor + "]"; - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnet.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnet.java deleted file mode 100644 index ba4e93fa93..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnet.java +++ /dev/null @@ -1,200 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Modifications Copyright (c) 2019 Samsung - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.network; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.List; -import org.onap.logging.filter.base.ErrorCode; -import org.onap.so.logger.MessageEnum; -import org.onap.so.openstack.beans.HostRoute; -import org.onap.so.openstack.beans.Pool; -import org.onap.so.openstack.beans.Subnet; -import org.onap.so.openstack.utils.MsoCommonUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; - -public class ContrailSubnet { - - private static final Logger logger = LoggerFactory.getLogger(ContrailSubnet.class); - @Autowired - private MsoCommonUtils msoCommonUtils; - - @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet") - private ContrailSubnetIp subnet = new ContrailSubnetIp(); - - @JsonProperty("network_ipam_refs_data_ipam_subnets_default_gateway") - private String defaultGateway; - - @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_name") - private String subnetName; - - @JsonProperty("network_ipam_refs_data_ipam_subnets_enable_dhcp") - private Boolean enableDhcp; - - @JsonProperty("network_ipam_refs_data_ipam_subnets_addr_from_start") - private Boolean addrFromStart = true; - /** - * future - leave this commented private String subnet_uuid; private String dns_server_address; private List<String> - * dns_nameservers; private String dhcp_option_list; - **/ - - @JsonProperty("network_ipam_refs_data_ipam_subnets_allocation_pools") - private List<ContrailSubnetPool> allocationPools = new ArrayList<>(); - - @JsonProperty("network_ipam_refs_data_ipam_subnets_host_routes") - private final ContrailSubnetHostRoutes hostRoutes = new ContrailSubnetHostRoutes(); - - public ContrailSubnet() { - super(); - } - - public String getDefaultGateway() { - return defaultGateway; - } - - public void setDefaultGateway(String defaultGateway) { - this.defaultGateway = defaultGateway; - } - - public ContrailSubnetIp getSubnet() { - return subnet; - } - - public void setSubnet(ContrailSubnetIp subnet) { - this.subnet = subnet; - } - - public Boolean isEnableDhcp() { - return enableDhcp; - } - - public void setEnableDhcp(Boolean enableDhcp) { - this.enableDhcp = enableDhcp; - } - - public String getSubnetName() { - return subnetName; - } - - public void setSubnetName(String subnetName) { - this.subnetName = subnetName; - } - - public List<ContrailSubnetPool> getAllocationPools() { - return allocationPools; - } - - public void setPools(List<ContrailSubnetPool> allocationPools) { - this.allocationPools = allocationPools; - } - - public Boolean isAddrFromStart() { - return addrFromStart; - } - - public void setAddrFromStart(Boolean addrFromStart) { - this.addrFromStart = addrFromStart; - } - - public JsonNode toJsonNode() { - JsonNode node = null; - try { - ObjectMapper mapper = new ObjectMapper(); - node = mapper.convertValue(this, JsonNode.class); - } catch (Exception e) { - logger.error("{} {} Error creating JsonNode for Contrail Subnet: {} ", MessageEnum.RA_MARSHING_ERROR, - ErrorCode.SchemaError.getValue(), subnetName, e); - } - - return node; - } - - public String toJsonString() { - String jsonString = null; - try { - ObjectMapper mapper = new ObjectMapper(); - jsonString = mapper.writeValueAsString(this); - } catch (Exception e) { - logger.error("{} {} Error creating JsonString for Contrail Subnet: {} ", MessageEnum.RA_MARSHING_ERROR, - ErrorCode.SchemaError.getValue(), subnetName, e); - } - - return jsonString; - } - - // poulate contrail subnet with input(from bopel) subnet - public void populateWith(Subnet inputSubnet) { - if (inputSubnet != null) { - if (!msoCommonUtils.isNullOrEmpty(inputSubnet.getSubnetName())) - subnetName = inputSubnet.getSubnetName(); - else - subnetName = inputSubnet.getSubnetId(); - enableDhcp = inputSubnet.getEnableDHCP(); - defaultGateway = inputSubnet.getGatewayIp(); - if (!msoCommonUtils.isNullOrEmpty(inputSubnet.getCidr())) { - int idx = inputSubnet.getCidr().indexOf("/"); - if (idx != -1) { - subnet.setIpPrefix(inputSubnet.getCidr().substring(0, idx)); - subnet.setIpPrefixLen(inputSubnet.getCidr().substring(idx + 1)); - } - } - if (inputSubnet.getAllocationPools() != null) { - for (Pool pool : inputSubnet.getAllocationPools()) { - if (!msoCommonUtils.isNullOrEmpty(pool.getStart()) - && !msoCommonUtils.isNullOrEmpty(pool.getEnd())) { - ContrailSubnetPool csp = new ContrailSubnetPool(); - csp.populateWith(pool); - allocationPools.add(csp); - } - } - } - if (inputSubnet.getHostRoutes() != null) { - List<ContrailSubnetHostRoute> hrList = hostRoutes.getHostRoutes(); - for (HostRoute hr : inputSubnet.getHostRoutes()) { - if (!msoCommonUtils.isNullOrEmpty(hr.getPrefix()) - || !msoCommonUtils.isNullOrEmpty(hr.getNextHop())) { - ContrailSubnetHostRoute cshr = new ContrailSubnetHostRoute(); - cshr.populateWith(hr); - hrList.add(cshr); - } - } - } - } - } - - @Override - public String toString() { - StringBuilder buf = new StringBuilder(); - for (ContrailSubnetPool pool : allocationPools) { - buf.append(pool.toString()); - } - return "ContrailSubnet [subnet=" + subnet.toString() + " default_gateway=" + defaultGateway + " enable_dhcp=" - + enableDhcp + " addr_from_start=" + addrFromStart + " subnet_name=" + subnetName + " allocation_pools=" - + buf + " ]"; - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoute.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoute.java deleted file mode 100644 index 32f85ddf60..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoute.java +++ /dev/null @@ -1,65 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.network; - - -import org.onap.so.openstack.beans.HostRoute; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ContrailSubnetHostRoute { - - @JsonProperty("network_ipam_refs_data_ipam_subnets_host_routes_route_prefix") - private String prefix; - - @JsonProperty("network_ipam_refs_data_ipam_subnets_host_routes_route_next_hop") - private String nextHop; - - public ContrailSubnetHostRoute() {} - - public String getPrefix() { - return prefix; - } - - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - public String getNextHop() { - return nextHop; - } - - public void setNextHop(String nextHop) { - this.nextHop = nextHop; - } - - public void populateWith(HostRoute hostRoute) { - if (hostRoute != null) { - prefix = hostRoute.getPrefix(); - nextHop = hostRoute.getNextHop(); - } - } - - @Override - public String toString() { - return "ContrailSubnetHostRoute [prefix=" + prefix + ", nextHop=" + nextHop + "]"; - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java deleted file mode 100644 index 0802194b4a..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.network; - - - -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ContrailSubnetHostRoutes { - - @JsonProperty("network_ipam_refs_data_ipam_subnets_host_routes_route") - private List<ContrailSubnetHostRoute> hostRoutes = new ArrayList<>(); - - public ContrailSubnetHostRoutes() {} - - public List<ContrailSubnetHostRoute> getHostRoutes() { - return hostRoutes; - } - - public void setHostRoutes(List<ContrailSubnetHostRoute> hostRoutes) { - this.hostRoutes = hostRoutes; - } - - @Override - public String toString() { - StringBuilder buf = new StringBuilder(); - if (hostRoutes != null) { - for (ContrailSubnetHostRoute hr : hostRoutes) { - buf.append(hr.toString()); - } - } - return "ContrailSubnetHostRoutes [" + buf.toString() + "]"; - } -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetIp.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetIp.java deleted file mode 100644 index a00a1eb5ea..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetIp.java +++ /dev/null @@ -1,59 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.network; - - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ContrailSubnetIp { - - @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_ip_prefix") - private String ipPrefix; - - @JsonProperty("network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len") - private String ipPrefixLen; - - public ContrailSubnetIp() { - /* Empty constructor */ - } - - public String getIpPrefix() { - return ipPrefix; - } - - public void setIpPrefix(String ipPrefix) { - this.ipPrefix = ipPrefix; - } - - public String getIpPrefixLen() { - return ipPrefixLen; - } - - public void setIpPrefixLen(String ipPrefixLen) { - this.ipPrefixLen = ipPrefixLen; - } - - @Override - public String toString() { - return "ContrailSubnetIp [ip_prefix=" + ipPrefix + ", ip_prefix_len=" + ipPrefixLen + "]"; - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetPool.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetPool.java deleted file mode 100644 index edba780318..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetPool.java +++ /dev/null @@ -1,67 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.network; - - -import org.onap.so.openstack.beans.Pool; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ContrailSubnetPool { - - @JsonProperty("network_ipam_refs_data_ipam_subnets_allocation_pools_start") - private String start; - - @JsonProperty("network_ipam_refs_data_ipam_subnets_allocation_pools_end") - private String end; - - public ContrailSubnetPool() { - /* Empty constructor */ - } - - public String getStart() { - return start; - } - - public void setStart(String start) { - this.start = start; - } - - public String getEnd() { - return end; - } - - public void setEnd(String end) { - this.end = end; - } - - public void populateWith(Pool pool) { - if (pool != null) { - start = pool.getStart(); - end = pool.getEnd(); - } - } - - @Override - public String toString() { - return "ContrailSubnetPool [start=" + start + ", end=" + end + "]"; - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapter.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapter.java deleted file mode 100644 index 52340d684a..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapter.java +++ /dev/null @@ -1,209 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.network; - - -import java.util.List; -import java.util.Map; -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebParam.Mode; -import javax.jws.WebService; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.ws.Holder; -import org.onap.so.adapters.network.exceptions.NetworkException; -import org.onap.so.entity.MsoRequest; -import org.onap.so.openstack.beans.NetworkRollback; -import org.onap.so.openstack.beans.NetworkStatus; -import org.onap.so.openstack.beans.RouteTarget; -import org.onap.so.openstack.beans.Subnet; - -@Deprecated -@WebService(name = "NetworkAdapter", targetNamespace = "http://org.onap.so/network") -public interface MsoNetworkAdapter { - // TODO: Rename all of these to include Vlan in the service name? At least for the - // create and update calls, since they are specific to VLAN-based provider networks. - - /** - * This is the "Create Network" Web Service Endpoint definition. - */ - @WebMethod - public void createNetwork(@WebParam(name = "cloudSiteId") @XmlElement(required = true) String cloudSiteId, - @WebParam(name = "tenantId") @XmlElement(required = true) String tenantId, - @WebParam(name = "networkType") @XmlElement(required = true) String networkType, - @WebParam(name = "modelCustomizationUuid") String modelCustomizationUuid, - @WebParam(name = "networkName") @XmlElement(required = true) String networkName, - @WebParam(name = "physicalNetworkName") String physicalNetworkName, - @WebParam(name = "vlans") List<Integer> vlans, @WebParam(name = "shared") String shared, - @WebParam(name = "external") String external, @WebParam(name = "failIfExists") Boolean failIfExists, - @WebParam(name = "backout") Boolean backout, @WebParam(name = "subnets") List<Subnet> subnets, - @WebParam(name = "networkParams") Map<String, String> networkParams, - @WebParam(name = "request") MsoRequest msoRequest, - @WebParam(name = "networkId", mode = Mode.OUT) Holder<String> networkId, - @WebParam(name = "neutronNetworkId", mode = Mode.OUT) Holder<String> neutronNetworkId, - @WebParam(name = "subnetIdMap", mode = Mode.OUT) Holder<Map<String, String>> subnetIdMap, - @WebParam(name = "rollback", mode = Mode.OUT) Holder<NetworkRollback> rollback) throws NetworkException; - - @WebMethod - public void createNetworkContrail(@WebParam(name = "cloudSiteId") @XmlElement(required = true) String cloudSiteId, - @WebParam(name = "tenantId") @XmlElement(required = true) String tenantId, - @WebParam(name = "networkType") @XmlElement(required = true) String networkType, - @WebParam(name = "modelCustomizationUuid") String modelCustomizationUuid, - @WebParam(name = "networkName") @XmlElement(required = true) String networkName, - @WebParam(name = "routeTargets") List<RouteTarget> routeTargets, @WebParam(name = "shared") String shared, - @WebParam(name = "external") String external, @WebParam(name = "failIfExists") Boolean failIfExists, - @WebParam(name = "backout") Boolean backout, @WebParam(name = "subnets") List<Subnet> subnets, - @WebParam(name = "networkParams") Map<String, String> networkParams, - @WebParam(name = "policyFqdns") List<String> policyFqdns, - @WebParam(name = "routeTableFqdns") List<String> routeTableFqdns, - @WebParam(name = "request") MsoRequest msoRequest, - @WebParam(name = "networkId", mode = Mode.OUT) Holder<String> networkId, - @WebParam(name = "neutronNetworkId", mode = Mode.OUT) Holder<String> neutronNetworkId, - @WebParam(name = "networkFqdn", mode = Mode.OUT) Holder<String> networkFqdn, - @WebParam(name = "subnetIdMap", mode = Mode.OUT) Holder<Map<String, String>> subnetIdMap, - @WebParam(name = "rollback", mode = Mode.OUT) Holder<NetworkRollback> rollback) throws NetworkException; - - /** - * This is the "Update VLANs" Web Service Endpoint definition. This webservice replaces the set of VLANs on a - * network. - */ - @WebMethod - public void updateNetwork(@WebParam(name = "cloudSiteId") @XmlElement(required = true) String cloudSiteId, - @WebParam(name = "tenantId") @XmlElement(required = true) String tenantId, - @WebParam(name = "networkType") @XmlElement(required = true) String networkType, - @WebParam(name = "modelCustomizationUuid") String modelCustomizationUuid, - @WebParam(name = "networkId") @XmlElement(required = true) String networkId, - @WebParam(name = "networkName") @XmlElement(required = true) String networkName, - @WebParam(name = "physicalNetworkName") @XmlElement(required = true) String physicalNetworkName, - @WebParam(name = "vlans") @XmlElement(required = true) List<Integer> vlans, - @WebParam(name = "shared") String shared, @WebParam(name = "external") String external, - @WebParam(name = "subnets") List<Subnet> subnets, - @WebParam(name = "networkParams") Map<String, String> networkParams, - @WebParam(name = "request") MsoRequest msoRequest, - @WebParam(name = "subnetIdMap", mode = Mode.OUT) Holder<Map<String, String>> subnetIdMap, - @WebParam(name = "rollback", mode = Mode.OUT) Holder<NetworkRollback> rollback) throws NetworkException; - - @WebMethod - public void updateNetworkContrail(@WebParam(name = "cloudSiteId") @XmlElement(required = true) String cloudSiteId, - @WebParam(name = "tenantId") @XmlElement(required = true) String tenantId, - @WebParam(name = "networkType") @XmlElement(required = true) String networkType, - @WebParam(name = "modelCustomizationUuid") String modelCustomizationUuid, - @WebParam(name = "networkId") @XmlElement(required = true) String networkId, - @WebParam(name = "networkName") @XmlElement(required = true) String networkName, - @WebParam(name = "routeTargets") List<RouteTarget> routeTargets, @WebParam(name = "shared") String shared, - @WebParam(name = "external") String external, @WebParam(name = "subnets") List<Subnet> subnets, - @WebParam(name = "networkParams") Map<String, String> networkParams, - @WebParam(name = "policyFqdns") List<String> policyFqdns, - @WebParam(name = "routeTableFqdns") List<String> routeTableFqdns, - @WebParam(name = "request") MsoRequest msoRequest, - @WebParam(name = "subnetIdMap", mode = Mode.OUT) Holder<Map<String, String>> subnetIdMap, - @WebParam(name = "rollback", mode = Mode.OUT) Holder<NetworkRollback> rollback) throws NetworkException; - - /** - * TODO: This is the "Add VLAN" Web Service Endpoint definition. This webservice adds a VLAN to a network. This - * service assumes that PO supports querying the current vlans in real time. Otherwise, the caller must have the - * complete list and should use updateVlans instead. - * - * @WebMethod public void addVlan (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId, - * @WebParam(name="tenantId") @XmlElement(required=true) String tenantId, - * @WebParam(name="networkType") @XmlElement(required=true) String networkType, - * @WebParam(name="networkId") @XmlElement(required=true) String networkId, - * @WebParam(name="physicalNetworkName") @XmlElement(required=true) String physicalNetworkName, - * @WebParam(name="vlan") @XmlElement(required=true) Integer vlan, - * @WebParam(name="rollback", mode=Mode.OUT) Holder<NetworkRollback> rollback ) throws NetworkException; - */ - - /** - * TODO: This is the "Remove VLAN" Web Service Endpoint definition. This webservice removes a VLAN from a network. - * This service assumes that PO supports querying the current vlans in real time. Otherwise, the caller must have - * the complete list and should use updateVlans instead. - * - * This service returns an indicator (noMoreVLans) if the VLAN that was removed was the last one on the network. - * - * It is not clear that Rollback will work for delete. The network can be recreated from the NetworkRollback object, - * but the network ID (and stack ID for Heat-based orchestration) will be different. The caller will need to know to - * update these identifiers in the inventory DB (A&AI). - * - * @WebMethod public void removeVlan (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId, - * @WebParam(name="tenantId") @XmlElement(required=true) String tenantId, - * @WebParam(name="networkType") @XmlElement(required=true) String networkType, - * @WebParam(name="networkId") @XmlElement(required=true) String networkId, - * @WebParam(name="physicalNetworkName") @XmlElement(required=true) String physicalNetworkName, - * @WebParam(name="vlan") @XmlElement(required=true) Integer vlan, - * @WebParam(name="noMoreVlans", mode=Mode.OUT) Holder<Boolean> noMoreVlans, - * @WebParam(name="rollback", mode=Mode.OUT) Holder<NetworkRollback> rollback ) throws NetworkException; - */ - - /** - * This is the "Query Network" Web Service Endpoint definition. TODO: Should this just return the NetworkInfo - * complete structure? - */ - @WebMethod - public void queryNetwork(@WebParam(name = "cloudSiteId") @XmlElement(required = true) String cloudSiteId, - @WebParam(name = "tenantId") @XmlElement(required = true) String tenantId, - @WebParam(name = "networkNameOrId") @XmlElement(required = true) String networkNameOrId, - @WebParam(name = "request") MsoRequest msoRequest, - @WebParam(name = "networkExists", mode = Mode.OUT) Holder<Boolean> networkExists, - @WebParam(name = "networkId", mode = Mode.OUT) Holder<String> networkId, - @WebParam(name = "neutronNetworkId", mode = Mode.OUT) Holder<String> neutronNetworkId, - @WebParam(name = "status", mode = Mode.OUT) Holder<NetworkStatus> status, - @WebParam(name = "vlans", mode = Mode.OUT) Holder<List<Integer>> vlans, - @WebParam(name = "subnetIdMap", mode = Mode.OUT) Holder<Map<String, String>> subnetIdMap) - throws NetworkException; - - @WebMethod - public void queryNetworkContrail(@WebParam(name = "cloudSiteId") @XmlElement(required = true) String cloudSiteId, - @WebParam(name = "tenantId") @XmlElement(required = true) String tenantId, - @WebParam(name = "networkNameOrId") @XmlElement(required = true) String networkNameOrId, - @WebParam(name = "request") MsoRequest msoRequest, - @WebParam(name = "networkExists", mode = Mode.OUT) Holder<Boolean> networkExists, - @WebParam(name = "networkId", mode = Mode.OUT) Holder<String> networkId, - @WebParam(name = "neutronNetworkId", mode = Mode.OUT) Holder<String> neutronNetworkId, - @WebParam(name = "status", mode = Mode.OUT) Holder<NetworkStatus> status, - @WebParam(name = "routeTargets", mode = Mode.OUT) Holder<List<RouteTarget>> routeTargets, - @WebParam(name = "subnetIdMap", mode = Mode.OUT) Holder<Map<String, String>> subnetIdMap) - throws NetworkException; - - /** - * This is the "Delete Network" Web Service endpoint definition. - */ - @WebMethod - public void deleteNetwork(@WebParam(name = "cloudSiteId") @XmlElement(required = true) String cloudSiteId, - @WebParam(name = "tenantId") @XmlElement(required = true) String tenantId, - @WebParam(name = "networkType") @XmlElement(required = true) String networkType, - @WebParam(name = "modelCustomizationUuid") String modelCustomizationUuid, - @WebParam(name = "networkId") @XmlElement(required = true) String networkId, - @WebParam(name = "request") MsoRequest msoRequest, - @WebParam(name = "networkDeleted", mode = Mode.OUT) Holder<Boolean> networkDeleted, - @WebParam(name = "pollForCompletion") @XmlElement(required = false) Boolean pollForCompletion) - throws NetworkException; - - /** - * This is the "Rollback Network" Web Service endpoint definition. - */ - @WebMethod - public void rollbackNetwork(@WebParam(name = "rollback") @XmlElement(required = true) NetworkRollback rollback, - @WebParam(name = "pollForCompletion") @XmlElement(required = false) Boolean pollForCompletion) - throws NetworkException; - - @WebMethod - public void healthCheck(); -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java index b84d2a8600..cb6a2fac1f 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java @@ -54,7 +54,6 @@ import org.onap.so.logger.MessageEnum; import org.onap.so.openstack.beans.HeatStatus; import org.onap.so.openstack.beans.NetworkInfo; import org.onap.so.openstack.beans.NetworkRollback; -import org.onap.so.openstack.beans.NetworkStatus; import org.onap.so.openstack.beans.Pool; import org.onap.so.openstack.beans.RouteTarget; import org.onap.so.openstack.beans.StackInfo; @@ -80,15 +79,13 @@ import com.fasterxml.jackson.databind.ObjectMapper; @Transactional @WebService(serviceName = "NetworkAdapter", endpointInterface = "org.onap.so.adapters.network.MsoNetworkAdapter", targetNamespace = "http://org.onap.so/network") -public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { +public class MsoNetworkAdapterImpl { private static final String OS3_NW_PROPERTY = "org.onap.so.adapters.network.aic3nw"; private static final String OS3_NW = "OS::ContrailV2::VirtualNetwork"; private static final String VLANS = "vlans"; private static final String PHYSICAL_NETWORK = "physical_network"; private static final String UPDATE_NETWORK_CONTEXT = "UpdateNetwork"; - private static final String NETWORK_ID = "network_id"; - private static final String NETWORK_FQDN = "network_fqdn"; private static final String CREATE_NETWORK_CONTEXT = "CreateNetwork"; private static final String NEUTRON_MODE = "NEUTRON"; private static final String CLOUD_OWNER = "CloudOwner"; @@ -128,47 +125,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { public MsoNetworkAdapterImpl() {} /** - * Health Check web method. Does nothing but return to show the adapter is deployed. - */ - @Override - public void healthCheck() { - logger.debug("Health check call in Network Adapter"); - } - - /** - * Do not use this constructor or the msoPropertiesFactory will be NULL. - * - * @see MsoNetworkAdapterImpl#MsoNetworkAdapterImpl(MsoPropertiesFactory) - */ - - @Deprecated - @Override - public void createNetwork(String cloudSiteId, String tenantId, String networkType, String modelCustomizationUuid, - String networkName, String physicalNetworkName, List<Integer> vlans, String shared, String external, - Boolean failIfExists, Boolean backout, List<Subnet> subnets, Map<String, String> networkParams, - MsoRequest msoRequest, Holder<String> networkId, Holder<String> neutronNetworkId, - Holder<Map<String, String>> subnetIdMap, Holder<NetworkRollback> rollback) throws NetworkException { - Holder<String> networkFqdn = new Holder<>(); - createNetwork(cloudSiteId, tenantId, networkType, modelCustomizationUuid, networkName, physicalNetworkName, - vlans, null, shared, external, failIfExists, backout, subnets, null, null, msoRequest, networkId, - neutronNetworkId, networkFqdn, subnetIdMap, rollback, true, new MutableBoolean()); - } - - @Deprecated - @Override - public void createNetworkContrail(String cloudSiteId, String tenantId, String networkType, - String modelCustomizationUuid, String networkName, List<RouteTarget> routeTargets, String shared, - String external, Boolean failIfExists, Boolean backout, List<Subnet> subnets, - Map<String, String> networkParams, List<String> policyFqdns, List<String> routeTableFqdns, - MsoRequest msoRequest, Holder<String> networkId, Holder<String> neutronNetworkId, - Holder<String> networkFqdn, Holder<Map<String, String>> subnetIdMap, Holder<NetworkRollback> rollback) - throws NetworkException { - createNetwork(cloudSiteId, tenantId, networkType, modelCustomizationUuid, networkName, null, null, routeTargets, - shared, external, failIfExists, backout, subnets, policyFqdns, routeTableFqdns, msoRequest, networkId, - neutronNetworkId, networkFqdn, subnetIdMap, rollback, true, new MutableBoolean()); - } - - /** * This is the "Create Network" web service implementation. It will create a new Network of the requested type in * the specified cloud and tenant. The tenant must exist at the time this service is called. * @@ -194,26 +150,13 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { public void createNetwork(String cloudSiteId, String tenantId, String networkType, String modelCustomizationUuid, String networkName, String physicalNetworkName, List<Integer> vlans, List<RouteTarget> routeTargets, String shared, String external, Boolean failIfExists, Boolean backout, List<Subnet> subnets, - List<String> policyFqdns, List<String> routeTableFqdns, MsoRequest msoRequest, Holder<String> networkId, - Holder<String> neutronNetworkId, Holder<String> networkFqdn, Holder<Map<String, String>> subnetIdMap, - Holder<NetworkRollback> rollback, Boolean pollForCompletion, MutableBoolean isOs3Nw) - throws NetworkException { + List<String> policyFqdns, List<String> routeTableFqdns, MsoRequest msoRequest, Holder<String> stackId, + MutableBoolean isOs3Nw) throws NetworkException { logger.debug("*** CREATE Network: {} of type {} in {}/{}", networkName, networkType, cloudSiteId, tenantId); // Will capture execution time for metrics long startTime = System.currentTimeMillis(); - // Build a default rollback object (no actions performed) //TODO remove - NetworkRollback networkRollback = new NetworkRollback(); - networkRollback.setCloudId(cloudSiteId); - networkRollback.setTenantId(tenantId); - networkRollback.setMsoRequest(msoRequest); - networkRollback.setModelCustomizationUuid(modelCustomizationUuid); - - // tenant query is not required here. - // If the tenant doesn't exist, the Heat calls will fail anyway (when the HeatUtils try to obtain a token). - // So this is just catching that error in a bit more obvious way up front. - Optional<CloudSite> cloudSiteOpt = cloudConfig.getCloudSite(cloudSiteId); if (!cloudSiteOpt.isPresent()) { String error = String.format( @@ -271,20 +214,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { error); throw new NetworkException(error, MsoExceptionCategory.USERDATA); } else { - // Populate the outputs from the existing stack. - networkId.value = heatStack.getCanonicalName(); - Map<String, String> sMap = new HashMap<>(); - if (heatStack.getOutputs() != null) { - neutronNetworkId.value = (String) heatStack.getOutputs().get(NETWORK_ID); - rollback.value = networkRollback; // Default rollback - no updates performed - if (os3template) { - networkFqdn.value = (String) heatStack.getOutputs().get(NETWORK_FQDN); - } - Map<String, Object> outputs = heatStack.getOutputs(); - - sMap = buildSubnetMap(outputs, subnets, os3template); - } - subnetIdMap.value = sMap; logger.warn("{} {} Found Existing network stack, status={} networkName={} for {}/{}", MessageEnum.RA_NETWORK_ALREADY_EXIST, ErrorCode.DataError.getValue(), heatStack.getStatus(), networkName, cloudSiteId, tenantId); @@ -356,8 +285,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { if (backout == null) backout = true; heatStack = heat.createStack(cloudSiteId, CLOUD_OWNER, tenantId, networkName, null, template, stackParams, - pollForCompletion, heatTemplate.getTimeoutMinutes(), null, null, null, backout.booleanValue(), - failIfExists); + false, heatTemplate.getTimeoutMinutes(), null, null, null, backout.booleanValue(), failIfExists); } catch (MsoException me) { me.addContext(CREATE_NETWORK_CONTEXT); logger.error("{} {} Exception creating network type {} in {}/{} ", MessageEnum.RA_CREATE_NETWORK_EXC, @@ -366,29 +294,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { } // Reach this point if createStack is successful. - - // For Heat-based orchestration, the MSO-tracked network ID is the heat stack, - // and the neutronNetworkId is the network UUID returned in stack outputs. - networkId.value = heatStack.getCanonicalName(); - if (heatStack.getOutputs() != null) { - neutronNetworkId.value = (String) heatStack.getOutputs().get(NETWORK_ID); - if (os3template) { - networkFqdn.value = (String) heatStack.getOutputs().get(NETWORK_FQDN); - } - } - Map<String, Object> outputs = heatStack.getOutputs(); - Map<String, String> sMap = new HashMap<>(); - if (outputs != null) { - sMap = buildSubnetMap(outputs, subnets, os3template); - networkRollback.setNeutronNetworkId((String) outputs.get(NETWORK_ID)); - } - subnetIdMap.value = sMap; - - rollback.value = networkRollback; - // Populate remaining rollback info and response parameters. - networkRollback.setNetworkStackId(heatStack.getCanonicalName()); - networkRollback.setNetworkCreated(true); - networkRollback.setNetworkType(networkType); + stackId.value = heatStack.getCanonicalName(); try { heat.updateResourceStatus(msoRequest.getRequestId(), NETWORK_CREATED_STATUS_MESSAGE); @@ -398,34 +304,9 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { logger.debug("Network {} successfully created via HEAT", networkName); - return; } - @Deprecated - @Override - public void updateNetwork(String cloudSiteId, String tenantId, String networkType, String modelCustomizationUuid, - String networkId, String networkName, String physicalNetworkName, List<Integer> vlans, String shared, - String external, List<Subnet> subnets, Map<String, String> networkParams, MsoRequest msoRequest, - Holder<Map<String, String>> subnetIdMap, Holder<NetworkRollback> rollback) throws NetworkException { - updateNetwork(cloudSiteId, tenantId, networkType, modelCustomizationUuid, networkId, networkName, - physicalNetworkName, vlans, null, shared, external, subnets, null, null, msoRequest, subnetIdMap, - rollback); - - } - - @Deprecated - @Override - public void updateNetworkContrail(String cloudSiteId, String tenantId, String networkType, - String modelCustomizationUuid, String networkId, String networkName, List<RouteTarget> routeTargets, - String shared, String external, List<Subnet> subnets, Map<String, String> networkParams, - List<String> policyFqdns, List<String> routeTableFqdns, MsoRequest msoRequest, - Holder<Map<String, String>> subnetIdMap, Holder<NetworkRollback> rollback) throws NetworkException { - updateNetwork(cloudSiteId, tenantId, networkType, modelCustomizationUuid, networkId, networkName, null, null, - routeTargets, shared, external, subnets, policyFqdns, routeTableFqdns, msoRequest, subnetIdMap, - rollback); - } - /** * This is the "Update Network" web service implementation. It will update an existing Network of the requested type * in the specified cloud and tenant. The typical use will be to replace the VLANs with the supplied list (to add or @@ -449,8 +330,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { public void updateNetwork(String cloudSiteId, String tenantId, String networkType, String modelCustomizationUuid, String networkId, String networkName, String physicalNetworkName, List<Integer> vlans, List<RouteTarget> routeTargets, String shared, String external, List<Subnet> subnets, - List<String> policyFqdns, List<String> routeTableFqdns, MsoRequest msoRequest, - Holder<Map<String, String>> subnetIdMap, Holder<NetworkRollback> rollback) throws NetworkException { + List<String> policyFqdns, List<String> routeTableFqdns, MsoRequest msoRequest, Holder<String> stackId) + throws NetworkException { logger.debug("***UPDATE Network adapter with Network: {} of type {} in {}/{}", networkName, networkType, cloudSiteId, tenantId); @@ -458,12 +339,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { // Will capture execution time for metrics long startTime = System.currentTimeMillis(); - // Build a default rollback object (no actions performed) - NetworkRollback networkRollback = new NetworkRollback(); - networkRollback.setCloudId(cloudSiteId); - networkRollback.setTenantId(tenantId); - networkRollback.setMsoRequest(msoRequest); - Optional<CloudSite> cloudSiteOpt = cloudConfig.getCloudSite(cloudSiteId); if (!cloudSiteOpt.isPresent()) { String error = String.format( @@ -474,8 +349,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { throw new NetworkException(error, MsoExceptionCategory.USERDATA); } - - NetworkResource networkResource = networkCheck(startTime, networkType, modelCustomizationUuid, networkName, physicalNetworkName, vlans, routeTargets, cloudSiteId, cloudSiteOpt.get()); String mode = networkResource.getOrchestrationMode(); @@ -515,15 +388,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { throw new NetworkException(me); } - // Add the network ID and previously queried vlans to the rollback object - networkRollback.setNetworkId(netInfo.getId()); - networkRollback.setNeutronNetworkId(netInfo.getId()); - networkRollback.setNetworkType(networkType); - // Save previous parameters - networkRollback.setNetworkName(netInfo.getName()); - networkRollback.setPhysicalNetwork(netInfo.getProvider()); - networkRollback.setVlans(netInfo.getVlans()); - logger.debug("Network {} updated, id = {}", networkId, netInfo.getId()); } else if ("HEAT".equals(mode)) { @@ -551,9 +415,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { // Get the previous parameters for rollback Map<String, Object> heatParams = heatStack.getParameters(); - String previousNetworkName = (String) heatParams.get("network_name"); - String previousPhysicalNetwork = (String) heatParams.get(PHYSICAL_NETWORK); - List<Integer> previousVlans = new ArrayList<>(); String vlansParam = (String) heatParams.get(VLANS); if (vlansParam != null) { @@ -569,8 +430,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { logger.debug("Update Stack: Previous VLANS: {}", previousVlans); // Ready to deploy the updated Network via Heat - - HeatTemplate heatTemplate = networkResource.getHeatTemplate(); if (heatTemplate == null) { String error = "Network error - undefined Heat Template. Network Type=" + networkType; @@ -659,28 +518,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { throw new NetworkException(me); } - Map<String, Object> outputs = heatStack.getOutputs(); - Map<String, String> sMap = new HashMap<>(); - if (outputs != null) { - sMap = buildSubnetMap(outputs, subnets, os3template); - } - subnetIdMap.value = sMap; - - // Reach this point if createStack is successful. - // Populate remaining rollback info and response parameters. - networkRollback.setNetworkStackId(heatStack.getCanonicalName()); - if (null != outputs) { - networkRollback.setNeutronNetworkId((String) outputs.get(NETWORK_ID)); - } else { - logger.debug("outputs is NULL"); - } - networkRollback.setNetworkType(networkType); - // Save previous parameters - networkRollback.setNetworkName(previousNetworkName); - networkRollback.setPhysicalNetwork(previousPhysicalNetwork); - networkRollback.setVlans(previousVlans); - - rollback.value = networkRollback; + stackId.value = heatStack.getCanonicalName(); logger.debug("Network {} successfully updated via HEAT", networkId); } @@ -769,131 +607,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { return networkResource; } - @Override - public void queryNetwork(String cloudSiteId, String tenantId, String networkNameOrId, MsoRequest msoRequest, - Holder<Boolean> networkExists, Holder<String> networkId, Holder<String> neutronNetworkId, - Holder<NetworkStatus> status, Holder<List<Integer>> vlans, Holder<Map<String, String>> subnetIdMap) - throws NetworkException { - queryNetwork(cloudSiteId, tenantId, networkNameOrId, msoRequest, networkExists, networkId, neutronNetworkId, - status, vlans, null, subnetIdMap); - } - - @Override - public void queryNetworkContrail(String cloudSiteId, String tenantId, String networkNameOrId, MsoRequest msoRequest, - Holder<Boolean> networkExists, Holder<String> networkId, Holder<String> neutronNetworkId, - Holder<NetworkStatus> status, Holder<List<RouteTarget>> routeTargets, - Holder<Map<String, String>> subnetIdMap) throws NetworkException { - queryNetwork(cloudSiteId, tenantId, networkNameOrId, msoRequest, networkExists, networkId, neutronNetworkId, - status, null, routeTargets, subnetIdMap); - } - - /** - * This is the queryNetwork method. It returns the existence and status of the specified network, along with its - * Neutron UUID and list of VLANs. This method attempts to find the network using both Heat and Neutron. Heat stacks - * are first searched based on the provided network name/id. If none is found, the Neutron is directly queried. - */ - private void queryNetwork(String cloudSiteId, String tenantId, String networkNameOrId, MsoRequest msoRequest, - Holder<Boolean> networkExists, Holder<String> networkId, Holder<String> neutronNetworkId, - Holder<NetworkStatus> status, Holder<List<Integer>> vlans, Holder<List<RouteTarget>> routeTargets, - Holder<Map<String, String>> subnetIdMap) throws NetworkException { - - logger.debug("*** QUERY Network with Network: {} in {}/{}", networkNameOrId, cloudSiteId, tenantId); - - if (commonUtils.isNullOrEmpty(cloudSiteId) || commonUtils.isNullOrEmpty(tenantId) - || commonUtils.isNullOrEmpty(networkNameOrId)) { - - String error = "Missing mandatory parameter cloudSiteId, tenantId or networkId"; - logger.error(LoggingAnchor.THREE, MessageEnum.RA_MISSING_PARAM, ErrorCode.DataError.getValue(), error); - throw new NetworkException(error, MsoExceptionCategory.USERDATA); - } - - Optional<CloudSite> cloudSiteOpt = cloudConfig.getCloudSite(cloudSiteId); - if (!cloudSiteOpt.isPresent()) { - String error = String.format( - "Configuration Error. Stack %s in %s/%s: CloudSite does not exist in MSO Configuration", - networkNameOrId, cloudSiteId, tenantId); - logger.error(LoggingAnchor.THREE, MessageEnum.RA_CONFIG_EXC, ErrorCode.DataError.getValue(), error); - // Set the detailed error as the Exception 'message' - throw new NetworkException(error, MsoExceptionCategory.USERDATA); - } - - // Use MsoNeutronUtils for all NEUTRON commands - - String neutronId = null; - // Try Heat first, since networks may be named the same as the Heat stack - StackInfo heatStack = null; - try { - heatStack = heat.queryStack(cloudSiteId, CLOUD_OWNER, tenantId, networkNameOrId); - } catch (MsoException me) { - me.addContext("QueryNetwork"); - logger.error("{} {} Exception - Query Network (heat): {} in {}/{} ", MessageEnum.RA_QUERY_NETWORK_EXC, - ErrorCode.DataError.getValue(), networkNameOrId, cloudSiteId, tenantId, me); - throw new NetworkException(me); - } - - // Populate the outputs based on the returned Stack information - if (heatStack != null && heatStack.getStatus() != HeatStatus.NOTFOUND) { - // Found it. Get the neutronNetworkId for further query - Map<String, String> sMap = new HashMap<>(); - Map<String, Object> outputs = heatStack.getOutputs(); - if (outputs != null) { - neutronId = (String) outputs.get(NETWORK_ID); - - for (String key : outputs.keySet()) { - if (key != null && key.startsWith("subnet_id_")) // multiples subnet_%aaid% outputs - { - String subnetUUId = (String) outputs.get(key); - sMap.put(key.substring("subnet_id_".length()), subnetUUId); - } else if (key != null && key.startsWith("subnet")) // one subnet output expected - { - Map<String, String> map = getSubnetUUId(key, outputs, null); - sMap.putAll(map); - } - - } - } - subnetIdMap.value = sMap; - } - - // Query directly against the Neutron Network for the details - // no RouteTargets available for ContrailV2 in neutron net-show - // networkId is heatStackId - try { - NetworkInfo netInfo = neutron.queryNetwork(neutronId, tenantId, cloudSiteId); - if (netInfo != null) { - // Found. Populate the output elements - networkExists.value = Boolean.TRUE; - if (heatStack != null) { - networkId.value = heatStack.getCanonicalName(); - } else { - networkId.value = netInfo.getId(); - } - neutronNetworkId.value = netInfo.getId(); - status.value = netInfo.getStatus(); - if (vlans != null) - vlans.value = netInfo.getVlans(); - - logger.debug("Network {}, ID = {}{}", networkNameOrId, networkId.value, - (",NeutronId = " + neutronNetworkId.value)); - } else { - // Not found. Populate the status fields, leave the rest null - networkExists.value = Boolean.FALSE; - status.value = NetworkStatus.NOTFOUND; - neutronNetworkId.value = null; - if (vlans != null) - vlans.value = new ArrayList<>(); - - logger.debug("Network {} not found", networkNameOrId); - } - } catch (MsoException me) { - me.addContext("QueryNetwork"); - logger.error("{} {} Exception - Query Network (neutron): {} in {}/{} ", MessageEnum.RA_QUERY_NETWORK_EXC, - ErrorCode.DataError.getValue(), networkNameOrId, cloudSiteId, tenantId, me); - throw new NetworkException(me); - } - return; - } - /** * This is the "Delete Network" web service implementation. It will delete a Network in the specified cloud and * tenant. @@ -909,10 +622,8 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { * The method returns nothing on success. Rollback is not possible for delete commands, so any failure on delete * will require manual fallout in the client. */ - @Override public void deleteNetwork(String cloudSiteId, String tenantId, String networkType, String modelCustomizationUuid, - String networkId, MsoRequest msoRequest, Holder<Boolean> networkDeleted, Boolean pollForCompletion) - throws NetworkException { + String networkId, MsoRequest msoRequest) throws NetworkException { logger.debug("*** DELETE Network adapter with Network: {} in {}/{}", networkId, cloudSiteId, tenantId); if (commonUtils.isNullOrEmpty(cloudSiteId) || commonUtils.isNullOrEmpty(tenantId) || commonUtils.isNullOrEmpty(networkId)) { @@ -921,16 +632,12 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { throw new NetworkException(error, MsoExceptionCategory.USERDATA); } - if (pollForCompletion == null) { - pollForCompletion = true; - } - int timeoutMinutes = heat.getNetworkHeatTimeoutValue(modelCustomizationUuid, networkType); + boolean networkDeleted = false; try { - StackInfo stack = - heat.deleteStack(tenantId, CLOUD_OWNER, cloudSiteId, networkId, pollForCompletion, timeoutMinutes); - networkDeleted.value = stack.isOperationPerformed(); + StackInfo stack = heat.deleteStack(tenantId, CLOUD_OWNER, cloudSiteId, networkId, false, timeoutMinutes); + networkDeleted = stack.isOperationPerformed(); } catch (MsoException me) { me.addContext("DeleteNetwork"); logger.error("{} {} Delete Network (heat): {} in {}/{} ", MessageEnum.RA_DELETE_NETWORK_EXC, @@ -940,7 +647,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { try { heat.updateResourceStatus(msoRequest.getRequestId(), - networkDeleted.value ? NETWORK_DELETED_STATUS_MESSAGE : NETWORK_NOT_EXIST_STATUS_MESSAGE); + networkDeleted ? NETWORK_DELETED_STATUS_MESSAGE : NETWORK_NOT_EXIST_STATUS_MESSAGE); } catch (Exception e) { logger.warn("Exception while updating infra active request", e); } @@ -954,17 +661,12 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { * The rollback includes removing the VNF and deleting the tenant if the tenant did not exist prior to the VNF * creation. */ - @Override - public void rollbackNetwork(NetworkRollback rollback, Boolean pollForCompletion) throws NetworkException { + public void rollbackNetwork(NetworkRollback rollback) throws NetworkException { if (rollback == null) { logger.error("{} {} rollback is null", MessageEnum.RA_ROLLBACK_NULL, ErrorCode.DataError.getValue()); return; } - if (pollForCompletion == null) { - pollForCompletion = true; - } - // Get the elements of the VnfRollback object for easier access String cloudSiteId = rollback.getCloudId(); String tenantId = rollback.getTenantId(); @@ -974,7 +676,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { if (rollback.getNetworkCreated()) { try { - heat.deleteStack(tenantId, CLOUD_OWNER, cloudSiteId, networkId, pollForCompletion, 120); + heat.deleteStack(tenantId, CLOUD_OWNER, cloudSiteId, networkId, false, 120); } catch (MsoException me) { me.addContext("RollbackNetwork"); logger.error("{} {} Exception - Rollback Network (heat): {} in {}/{} ", @@ -1324,7 +1026,6 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { return heatTemplate; } - // TODO remove public Map<String, String> getSubnetUUId(String key, Map<String, Object> outputs, List<Subnet> subnets) { Map<String, String> sMap = new HashMap<>(); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java index 1446047ebd..28763f2228 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java @@ -23,21 +23,16 @@ package org.onap.so.adapters.openstack; import java.util.Arrays; -import javax.xml.ws.Endpoint; +import java.util.HashSet; import org.apache.cxf.Bus; import org.apache.cxf.bus.spring.SpringBus; import org.apache.cxf.endpoint.Server; import org.apache.cxf.feature.LoggingFeature; import org.apache.cxf.jaxrs.JAXRSServerFactoryBean; -import org.apache.cxf.jaxrs.swagger.Swagger2Feature; -import org.apache.cxf.jaxws.EndpointImpl; +import org.apache.cxf.jaxrs.openapi.OpenApiFeature; import org.apache.cxf.transport.servlet.CXFServlet; import org.onap.so.adapters.cloudregion.CloudRegionRestV1; -import org.onap.so.adapters.network.MsoNetworkAdapterImpl; -import org.onap.so.adapters.vnf.MsoVnfAdapterImpl; import org.onap.so.client.policy.JettisonStyleMapperProvider; -import org.onap.so.logging.cxf.interceptor.SOAPLoggingInInterceptor; -import org.onap.so.logging.cxf.interceptor.SOAPLoggingOutInterceptor; import org.onap.so.logging.jaxrs.filter.SOAuditLogContainerFilter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.servlet.ServletRegistrationBean; @@ -50,10 +45,6 @@ import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; @Configuration public class CXFConfiguration { @Autowired - private MsoNetworkAdapterImpl networkAdapterImpl; - @Autowired - private MsoVnfAdapterImpl vnfAdapterImpl; - @Autowired private CloudRegionRestV1 cloudRegionRestV1; @Autowired private JettisonStyleMapperProvider jettisonStyleObjectMapper; @@ -75,20 +66,6 @@ public class CXFConfiguration { return servletRegistrationBean; } - /* - * network adapter endpoint - */ - @Bean - public Endpoint networkAdapterEndpoint() { - EndpointImpl endpoint = new EndpointImpl(springBus(), networkAdapterImpl); - endpoint.publish("/NetworkAdapter"); - endpoint.setWsdlLocation("NetworkAdapter.wsdl"); - endpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); - endpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); - endpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); - return endpoint; - } - // Uses normal Jackson marshalling semantics @Bean public Server rsServerApi() { @@ -101,18 +78,17 @@ public class CXFConfiguration { return endpoint.create(); } - @Bean - public Swagger2Feature createSwaggerFeature() { - Swagger2Feature swagger2Feature = new Swagger2Feature(); - swagger2Feature.setPrettyPrint(true); - swagger2Feature.setTitle("SO Orchestration Application"); - swagger2Feature.setContact("The ONAP SO team"); - swagger2Feature.setDescription("This project is the SO Orchestration Engine"); - swagger2Feature.setVersion("1.0.0"); - swagger2Feature.setResourcePackage( - "org.onap.so.adapters.network,org.onap.so.adapters.tenant,org.onap.so.adapters.vnf"); - swagger2Feature.setScan(true); - return swagger2Feature; + public OpenApiFeature createSwaggerFeature() { + OpenApiFeature openApiFeature = new OpenApiFeature(); + openApiFeature.setPrettyPrint(true); + openApiFeature.setTitle("SO Orchestration Application"); + openApiFeature.setContactName("The ONAP SO team"); + openApiFeature.setDescription("This project is the SO Orchestration Engine"); + openApiFeature.setVersion("1.0.0"); + openApiFeature.setResourcePackages( + new HashSet<String>(Arrays.asList("org.onap.so.adapters.network,org.onap.so.adapters.vnf"))); + openApiFeature.setScan(true); + return openApiFeature; } } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/PollService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/PollService.java index f13b5bda7c..31da330c7f 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/PollService.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/PollService.java @@ -38,6 +38,7 @@ import org.onap.so.adapters.nwrest.CreateNetworkRequest; import org.onap.so.adapters.nwrest.CreateNetworkResponse; import org.onap.so.adapters.nwrest.DeleteNetworkRequest; import org.onap.so.adapters.nwrest.DeleteNetworkResponse; +import org.onap.so.adapters.nwrest.RollbackNetworkRequest; import org.onap.so.adapters.nwrest.UpdateNetworkRequest; import org.onap.so.adapters.nwrest.UpdateNetworkResponse; import org.onap.so.adapters.vnf.MsoVnfAdapterImpl; @@ -157,6 +158,13 @@ public class PollService extends ExternalTaskUtils { UpdateNetworkResponse updateResponse = new UpdateNetworkResponse(req.getNetworkId(), null, null, req.getMessageId()); response = Optional.of(updateResponse.toXmlString()); + } else if ("rollbackNetworkRequest".equals(requestType.get())) { + logger.debug("Executing External Task Poll Service for Rollback Network"); + String stackId = externalTask.getVariable("stackId"); + RollbackNetworkRequest req = + JAXB.unmarshal(new StringReader(xmlRequest), RollbackNetworkRequest.class); + pollDeleteResource(118, req.getNetworkRollback().getCloudId(), + req.getNetworkRollback().getTenantId(), stackId, success); } } } catch (Exception e) { diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/RollbackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/RollbackService.java index 52dfa6a534..4636a91d5c 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/RollbackService.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/RollbackService.java @@ -88,11 +88,9 @@ public class RollbackService extends ExternalTaskUtils { } } else if ("createNetworkRequest".equals(requestType.get())) { logger.debug("Executing External Task Rollback Service for Create Network"); - Holder<Boolean> networkDeleted = new Holder<>(); CreateNetworkRequest req = JAXB.unmarshal(new StringReader(xmlRequest), CreateNetworkRequest.class); networkAdapterImpl.deleteNetwork(req.getCloudSiteId(), req.getTenantId(), req.getNetworkType(), - req.getModelCustomizationUuid(), req.getNetworkName(), req.getMsoRequest(), networkDeleted, - false); + req.getModelCustomizationUuid(), req.getNetworkName(), req.getMsoRequest()); pollRollbackStatus = true; success = true; } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/StackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/StackService.java index 9d217380d6..9b2badd1e7 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/StackService.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/StackService.java @@ -43,7 +43,6 @@ import org.onap.so.adapters.nwrest.DeleteNetworkRequest; import org.onap.so.adapters.nwrest.ProviderVlanNetwork; import org.onap.so.adapters.nwrest.RollbackNetworkRequest; import org.onap.so.adapters.nwrest.UpdateNetworkRequest; -import org.onap.so.adapters.nwrest.UpdateNetworkResponse; import org.onap.so.adapters.vnf.MsoVnfAdapterImpl; import org.onap.so.adapters.vnf.MsoVnfPluginAdapterImpl; import org.onap.so.adapters.vnf.VnfAdapterUtils; @@ -97,8 +96,6 @@ public class StackService extends ExternalTaskUtils { try { if (xmlRequest != null) { Optional<String> requestType = findRequestType(xmlRequest); - Holder<Map<String, String>> subnetIdMap = new Holder<>(); - Holder<NetworkRollback> networkRollback = new Holder<>(); if ("createVolumeGroupRequest".equals(requestType.get())) { logger.debug("Executing External Task Stack Service For Create Volume Group"); createVolumeGroup(xmlRequest, canonicalStackId, backout, success); @@ -112,11 +109,11 @@ public class StackService extends ExternalTaskUtils { logger.debug("Executing External Task Stack Service For Delete Volume Group"); deleteVolumeGroup(xmlRequest, canonicalStackId, backout, success); } else if ("createNetworkRequest".equals(requestType.get())) { - createNetwork(xmlRequest, subnetIdMap, networkRollback, canonicalStackId, backout, success, os3Nw); + createNetwork(xmlRequest, canonicalStackId, backout, success, os3Nw); } else if ("deleteNetworkRequest".equals(requestType.get())) { deleteNetwork(xmlRequest, canonicalStackId, backout, success); } else if ("updateNetworkRequest".equals(requestType.get())) { - updateNetwork(xmlRequest, subnetIdMap, networkRollback, canonicalStackId, backout, success); + updateNetwork(xmlRequest, canonicalStackId, backout, success); } else if ("rollbackNetworkRequest".equals(requestType.get())) { rollbackNetwork(xmlRequest, canonicalStackId, backout, success); } @@ -217,14 +214,9 @@ public class StackService extends ExternalTaskUtils { canonicalStackId.value = req.getVolumeGroupStackId(); } - private void createNetwork(String xmlRequest, Holder<Map<String, String>> subnetIdMap, - Holder<NetworkRollback> networkRollback, Holder<String> canonicalStackId, MutableBoolean backout, + private void createNetwork(String xmlRequest, Holder<String> canonicalStackId, MutableBoolean backout, MutableBoolean success, MutableBoolean os3) throws NetworkException { - Holder<String> networkId = new Holder<>(); - Holder<String> neutronNetworkId = new Holder<>(); - Holder<String> networkFqdn = new Holder<>(); - CreateNetworkRequest req = JAXB.unmarshal(new StringReader(xmlRequest), CreateNetworkRequest.class); HashMap<String, String> params = (HashMap<String, String>) req.getNetworkParams(); if (params == null) { @@ -268,20 +260,18 @@ public class StackService extends ExternalTaskUtils { networkAdapterImpl.createNetwork(req.getCloudSiteId(), req.getTenantId(), req.getNetworkType(), req.getModelCustomizationUuid(), req.getNetworkName(), physicalNetworkName, vlans, routeTargets, shared, external, req.getFailIfExists(), false, req.getSubnets(), fqdns, routeTable, req.getMsoRequest(), - networkId, neutronNetworkId, networkFqdn, subnetIdMap, networkRollback, true, os3); + canonicalStackId, os3); success.setTrue(); backout.setValue(req.getBackout()); - canonicalStackId.value = networkRollback.value.getNetworkStackId(); } private void deleteNetwork(String xmlRequest, Holder<String> canonicalStackId, MutableBoolean backout, MutableBoolean success) throws NetworkException { backout.setFalse(); DeleteNetworkRequest req = JAXB.unmarshal(new StringReader(xmlRequest), DeleteNetworkRequest.class); - Holder<Boolean> networkDeleted = new Holder<>(); networkAdapterImpl.deleteNetwork(req.getCloudSiteId(), req.getTenantId(), req.getNetworkType(), - req.getModelCustomizationUuid(), req.getNetworkStackId(), req.getMsoRequest(), networkDeleted, false); + req.getModelCustomizationUuid(), req.getNetworkStackId(), req.getMsoRequest()); canonicalStackId.value = req.getNetworkStackId(); success.setTrue(); @@ -293,14 +283,13 @@ public class StackService extends ExternalTaskUtils { RollbackNetworkRequest req = JAXB.unmarshal(new StringReader(xmlRequest), RollbackNetworkRequest.class); NetworkRollback rollback = req.getNetworkRollback(); - networkAdapterImpl.rollbackNetwork(rollback, false); + networkAdapterImpl.rollbackNetwork(rollback); canonicalStackId.value = rollback.getNetworkStackId(); success.setTrue(); } - private String updateNetwork(String xmlRequest, Holder<Map<String, String>> subnetIdMap, - Holder<NetworkRollback> networkRollback, Holder<String> canonicalStackId, MutableBoolean backout, + private void updateNetwork(String xmlRequest, Holder<String> canonicalStackId, MutableBoolean backout, MutableBoolean success) throws NetworkException { backout.setFalse(); UpdateNetworkRequest req = JAXB.unmarshal(new StringReader(xmlRequest), UpdateNetworkRequest.class); @@ -347,18 +336,12 @@ public class StackService extends ExternalTaskUtils { networkAdapterImpl.updateNetwork(req.getCloudSiteId(), req.getTenantId(), req.getNetworkType(), req.getModelCustomizationUuid(), req.getNetworkStackId(), req.getNetworkName(), physicalNetworkName, vlans, routeTargets, shared, external, req.getSubnets(), fqdns, routeTable, req.getMsoRequest(), - subnetIdMap, networkRollback); + canonicalStackId); success.setTrue(); - canonicalStackId.value = req.getNetworkStackId(); - UpdateNetworkResponse response = - new UpdateNetworkResponse(req.getNetworkId(), null, subnetIdMap.value, req.getMessageId()); - return response.toXmlString(); } - - protected Optional<String> findRequestType(String xmlString) { try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/CreateVnfNotification.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/CreateVnfNotification.java deleted file mode 100644 index e3c59fd93d..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/CreateVnfNotification.java +++ /dev/null @@ -1,370 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.vnf.async.client; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p> - * Java class for createVnfNotification complex type. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="createVnfNotification"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/> - * <element name="exception" type="{http://org.onap.so/vnfNotify}msoExceptionCategory" minOccurs="0"/> - * <element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="outputs" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="entry" maxOccurs="unbounded" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * <element name="rollback" type="{http://org.onap.so/vnfNotify}vnfRollback" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "createVnfNotification", - propOrder = {"messageId", "completed", "exception", "errorMessage", "vnfId", "outputs", "rollback"}) -public class CreateVnfNotification { - - @XmlElement(required = true) - protected String messageId; - protected boolean completed; - protected MsoExceptionCategory exception; - protected String errorMessage; - protected String vnfId; - protected CreateVnfNotification.Outputs outputs; - protected VnfRollback rollback; - - /** - * Gets the value of the messageId property. - * - * @return possible object is {@link String } - * - */ - public String getMessageId() { - return messageId; - } - - /** - * Sets the value of the messageId property. - * - * @param value allowed object is {@link String } - * - */ - public void setMessageId(String value) { - this.messageId = value; - } - - /** - * Gets the value of the completed property. - * - */ - public boolean isCompleted() { - return completed; - } - - /** - * Sets the value of the completed property. - * - */ - public void setCompleted(boolean value) { - this.completed = value; - } - - /** - * Gets the value of the exception property. - * - * @return possible object is {@link MsoExceptionCategory } - * - */ - public MsoExceptionCategory getException() { - return exception; - } - - /** - * Sets the value of the exception property. - * - * @param value allowed object is {@link MsoExceptionCategory } - * - */ - public void setException(MsoExceptionCategory value) { - this.exception = value; - } - - /** - * Gets the value of the errorMessage property. - * - * @return possible object is {@link String } - * - */ - public String getErrorMessage() { - return errorMessage; - } - - /** - * Sets the value of the errorMessage property. - * - * @param value allowed object is {@link String } - * - */ - public void setErrorMessage(String value) { - this.errorMessage = value; - } - - /** - * Gets the value of the vnfId property. - * - * @return possible object is {@link String } - * - */ - public String getVnfId() { - return vnfId; - } - - /** - * Sets the value of the vnfId property. - * - * @param value allowed object is {@link String } - * - */ - public void setVnfId(String value) { - this.vnfId = value; - } - - /** - * Gets the value of the outputs property. - * - * @return possible object is {@link CreateVnfNotification.Outputs } - * - */ - public CreateVnfNotification.Outputs getOutputs() { - return outputs; - } - - /** - * Sets the value of the outputs property. - * - * @param value allowed object is {@link CreateVnfNotification.Outputs } - * - */ - public void setOutputs(CreateVnfNotification.Outputs value) { - this.outputs = value; - } - - /** - * Gets the value of the rollback property. - * - * @return possible object is {@link VnfRollback } - * - */ - public VnfRollback getRollback() { - return rollback; - } - - /** - * Sets the value of the rollback property. - * - * @param value allowed object is {@link VnfRollback } - * - */ - public void setRollback(VnfRollback value) { - this.rollback = value; - } - - - /** - * <p> - * Java class for anonymous complex type. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="entry" maxOccurs="unbounded" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = {"entry"}) - public static class Outputs { - - protected List<CreateVnfNotification.Outputs.Entry> entry; - - /** - * Gets the value of the entry property. - * - * <p> - * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you - * make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> - * method for the entry property. - * - * <p> - * For example, to add a new item, do as follows: - * - * <pre> - * getEntry().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list {@link CreateVnfNotification.Outputs.Entry } - * - * - */ - public List<CreateVnfNotification.Outputs.Entry> getEntry() { - if (entry == null) { - entry = new ArrayList<>(); - } - return this.entry; - } - - - /** - * <p> - * Java class for anonymous complex type. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = {"key", "value"}) - public static class Entry { - - protected String key; - protected String value; - - /** - * Gets the value of the key property. - * - * @return possible object is {@link String } - * - */ - public String getKey() { - return key; - } - - /** - * Sets the value of the key property. - * - * @param value allowed object is {@link String } - * - */ - public void setKey(String value) { - this.key = value; - } - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - } - - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/DeleteVnfNotification.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/DeleteVnfNotification.java deleted file mode 100644 index 434cf7f772..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/DeleteVnfNotification.java +++ /dev/null @@ -1,139 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.vnf.async.client; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p> - * Java class for deleteVnfNotification complex type. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="deleteVnfNotification"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/> - * <element name="exception" type="{http://org.onap.so/vnfNotify}msoExceptionCategory" minOccurs="0"/> - * <element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "deleteVnfNotification", propOrder = {"messageId", "completed", "exception", "errorMessage"}) -public class DeleteVnfNotification { - - @XmlElement(required = true) - protected String messageId; - protected boolean completed; - protected MsoExceptionCategory exception; - protected String errorMessage; - - /** - * Gets the value of the messageId property. - * - * @return possible object is {@link String } - * - */ - public String getMessageId() { - return messageId; - } - - /** - * Sets the value of the messageId property. - * - * @param value allowed object is {@link String } - * - */ - public void setMessageId(String value) { - this.messageId = value; - } - - /** - * Gets the value of the completed property. - * - */ - public boolean isCompleted() { - return completed; - } - - /** - * Sets the value of the completed property. - * - */ - public void setCompleted(boolean value) { - this.completed = value; - } - - /** - * Gets the value of the exception property. - * - * @return possible object is {@link MsoExceptionCategory } - * - */ - public MsoExceptionCategory getException() { - return exception; - } - - /** - * Sets the value of the exception property. - * - * @param value allowed object is {@link MsoExceptionCategory } - * - */ - public void setException(MsoExceptionCategory value) { - this.exception = value; - } - - /** - * Gets the value of the errorMessage property. - * - * @return possible object is {@link String } - * - */ - public String getErrorMessage() { - return errorMessage; - } - - /** - * Sets the value of the errorMessage property. - * - * @param value allowed object is {@link String } - * - */ - public void setErrorMessage(String value) { - this.errorMessage = value; - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/ObjectFactory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/ObjectFactory.java deleted file mode 100644 index bb2a9059b9..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/ObjectFactory.java +++ /dev/null @@ -1,207 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Modifications Copyright (C) 2018 IBM. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.vnf.async.client; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.namespace.QName; - - -/** - * This object contains factory methods for each Java content interface and Java element interface generated in the - * org.onap.so.adapters.vnf.async.client package. - * <p> - * An ObjectFactory allows you to programatically construct new instances of the Java representation for XML content. - * The Java representation of XML content can consist of schema derived interfaces and classes representing the binding - * of schema type definitions, element declarations and model groups. Factory methods for each of these are provided in - * this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private static final String URL = "http://org.onap.so/vnfNotify"; - private static final QName _QueryVnfNotification_QNAME = new QName(URL, "queryVnfNotification"); - private static final QName _RollbackVnfNotification_QNAME = new QName(URL, "rollbackVnfNotification"); - private static final QName _CreateVnfNotification_QNAME = new QName(URL, "createVnfNotification"); - private static final QName _DeleteVnfNotification_QNAME = new QName(URL, "deleteVnfNotification"); - private static final QName _UpdateVnfNotification_QNAME = new QName(URL, "updateVnfNotification"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: - * org.onap.so.adapters.vnf.async.client - * - */ - public ObjectFactory() {} - - /** - * Create an instance of {@link UpdateVnfNotification } - * - */ - public UpdateVnfNotification createUpdateVnfNotification() { - return new UpdateVnfNotification(); - } - - /** - * Create an instance of {@link UpdateVnfNotification.Outputs } - * - */ - public UpdateVnfNotification.Outputs createUpdateVnfNotificationOutputs() { - return new UpdateVnfNotification.Outputs(); - } - - /** - * Create an instance of {@link CreateVnfNotification } - * - */ - public CreateVnfNotification createCreateVnfNotification() { - return new CreateVnfNotification(); - } - - /** - * Create an instance of {@link CreateVnfNotification.Outputs } - * - */ - public CreateVnfNotification.Outputs createCreateVnfNotificationOutputs() { - return new CreateVnfNotification.Outputs(); - } - - /** - * Create an instance of {@link QueryVnfNotification } - * - */ - public QueryVnfNotification createQueryVnfNotification() { - return new QueryVnfNotification(); - } - - /** - * Create an instance of {@link QueryVnfNotification.Outputs } - * - */ - public QueryVnfNotification.Outputs createQueryVnfNotificationOutputs() { - return new QueryVnfNotification.Outputs(); - } - - /** - * Create an instance of {@link RollbackVnfNotification } - * - */ - public RollbackVnfNotification createRollbackVnfNotification() { - return new RollbackVnfNotification(); - } - - /** - * Create an instance of {@link DeleteVnfNotification } - * - */ - public DeleteVnfNotification createDeleteVnfNotification() { - return new DeleteVnfNotification(); - } - - /** - * Create an instance of {@link MsoRequest } - * - */ - public MsoRequest createMsoRequest() { - return new MsoRequest(); - } - - /** - * Create an instance of {@link VnfRollback } - * - */ - public VnfRollback createVnfRollback() { - return new VnfRollback(); - } - - /** - * Create an instance of {@link UpdateVnfNotification.Outputs.Entry } - * - */ - public UpdateVnfNotification.Outputs.Entry createUpdateVnfNotificationOutputsEntry() { - return new UpdateVnfNotification.Outputs.Entry(); - } - - /** - * Create an instance of {@link CreateVnfNotification.Outputs.Entry } - * - */ - public CreateVnfNotification.Outputs.Entry createCreateVnfNotificationOutputsEntry() { - return new CreateVnfNotification.Outputs.Entry(); - } - - /** - * Create an instance of {@link QueryVnfNotification.Outputs.Entry } - * - */ - public QueryVnfNotification.Outputs.Entry createQueryVnfNotificationOutputsEntry() { - return new QueryVnfNotification.Outputs.Entry(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link QueryVnfNotification }{@code >}} - * - */ - @XmlElementDecl(namespace = URL, name = "queryVnfNotification") - public JAXBElement<QueryVnfNotification> createQueryVnfNotification(QueryVnfNotification value) { - return new JAXBElement<>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link RollbackVnfNotification }{@code >}} - * - */ - @XmlElementDecl(namespace = URL, name = "rollbackVnfNotification") - public JAXBElement<RollbackVnfNotification> createRollbackVnfNotification(RollbackVnfNotification value) { - return new JAXBElement<>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CreateVnfNotification }{@code >}} - * - */ - @XmlElementDecl(namespace = URL, name = "createVnfNotification") - public JAXBElement<CreateVnfNotification> createCreateVnfNotification(CreateVnfNotification value) { - return new JAXBElement<>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DeleteVnfNotification }{@code >}} - * - */ - @XmlElementDecl(namespace = URL, name = "deleteVnfNotification") - public JAXBElement<DeleteVnfNotification> createDeleteVnfNotification(DeleteVnfNotification value) { - return new JAXBElement<>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link UpdateVnfNotification }{@code >}} - * - */ - @XmlElementDecl(namespace = URL, name = "updateVnfNotification") - public JAXBElement<UpdateVnfNotification> createUpdateVnfNotification(UpdateVnfNotification value) { - return new JAXBElement<>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value); - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/QueryVnfNotification.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/QueryVnfNotification.java deleted file mode 100644 index 8681070972..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/QueryVnfNotification.java +++ /dev/null @@ -1,392 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.vnf.async.client; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p> - * Java class for queryVnfNotification complex type. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="queryVnfNotification"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/> - * <element name="exception" type="{http://org.onap.so/vnfNotify}msoExceptionCategory" minOccurs="0"/> - * <element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="vnfExists" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> - * <element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="status" type="{http://org.onap.so/vnfNotify}vnfStatus" minOccurs="0"/> - * <element name="outputs" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="entry" maxOccurs="unbounded" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "queryVnfNotification", - propOrder = {"messageId", "completed", "exception", "errorMessage", "vnfExists", "vnfId", "status", "outputs"}) -public class QueryVnfNotification { - - @XmlElement(required = true) - protected String messageId; - protected boolean completed; - protected MsoExceptionCategory exception; - protected String errorMessage; - protected Boolean vnfExists; - protected String vnfId; - protected VnfStatus status; - protected QueryVnfNotification.Outputs outputs; - - /** - * Gets the value of the messageId property. - * - * @return possible object is {@link String } - * - */ - public String getMessageId() { - return messageId; - } - - /** - * Sets the value of the messageId property. - * - * @param value allowed object is {@link String } - * - */ - public void setMessageId(String value) { - this.messageId = value; - } - - /** - * Gets the value of the completed property. - * - */ - public boolean isCompleted() { - return completed; - } - - /** - * Sets the value of the completed property. - * - */ - public void setCompleted(boolean value) { - this.completed = value; - } - - /** - * Gets the value of the exception property. - * - * @return possible object is {@link MsoExceptionCategory } - * - */ - public MsoExceptionCategory getException() { - return exception; - } - - /** - * Sets the value of the exception property. - * - * @param value allowed object is {@link MsoExceptionCategory } - * - */ - public void setException(MsoExceptionCategory value) { - this.exception = value; - } - - /** - * Gets the value of the errorMessage property. - * - * @return possible object is {@link String } - * - */ - public String getErrorMessage() { - return errorMessage; - } - - /** - * Sets the value of the errorMessage property. - * - * @param value allowed object is {@link String } - * - */ - public void setErrorMessage(String value) { - this.errorMessage = value; - } - - /** - * Gets the value of the vnfExists property. - * - * @return possible object is {@link Boolean } - * - */ - public Boolean isVnfExists() { - return vnfExists; - } - - /** - * Sets the value of the vnfExists property. - * - * @param value allowed object is {@link Boolean } - * - */ - public void setVnfExists(Boolean value) { - this.vnfExists = value; - } - - /** - * Gets the value of the vnfId property. - * - * @return possible object is {@link String } - * - */ - public String getVnfId() { - return vnfId; - } - - /** - * Sets the value of the vnfId property. - * - * @param value allowed object is {@link String } - * - */ - public void setVnfId(String value) { - this.vnfId = value; - } - - /** - * Gets the value of the status property. - * - * @return possible object is {@link VnfStatus } - * - */ - public VnfStatus getStatus() { - return status; - } - - /** - * Sets the value of the status property. - * - * @param value allowed object is {@link VnfStatus } - * - */ - public void setStatus(VnfStatus value) { - this.status = value; - } - - /** - * Gets the value of the outputs property. - * - * @return possible object is {@link QueryVnfNotification.Outputs } - * - */ - public QueryVnfNotification.Outputs getOutputs() { - return outputs; - } - - /** - * Sets the value of the outputs property. - * - * @param value allowed object is {@link QueryVnfNotification.Outputs } - * - */ - public void setOutputs(QueryVnfNotification.Outputs value) { - this.outputs = value; - } - - - /** - * <p> - * Java class for anonymous complex type. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="entry" maxOccurs="unbounded" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = {"entry"}) - public static class Outputs { - - protected List<QueryVnfNotification.Outputs.Entry> entry; - - /** - * Gets the value of the entry property. - * - * <p> - * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you - * make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> - * method for the entry property. - * - * <p> - * For example, to add a new item, do as follows: - * - * <pre> - * getEntry().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list {@link QueryVnfNotification.Outputs.Entry } - * - * - */ - public List<QueryVnfNotification.Outputs.Entry> getEntry() { - if (entry == null) { - entry = new ArrayList<>(); - } - return this.entry; - } - - - /** - * <p> - * Java class for anonymous complex type. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = {"key", "value"}) - public static class Entry { - - protected String key; - protected String value; - - /** - * Gets the value of the key property. - * - * @return possible object is {@link String } - * - */ - public String getKey() { - return key; - } - - /** - * Sets the value of the key property. - * - * @param value allowed object is {@link String } - * - */ - public void setKey(String value) { - this.key = value; - } - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - } - - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/RollbackVnfNotification.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/RollbackVnfNotification.java deleted file mode 100644 index e5f8878e84..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/RollbackVnfNotification.java +++ /dev/null @@ -1,139 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.vnf.async.client; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p> - * Java class for rollbackVnfNotification complex type. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="rollbackVnfNotification"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/> - * <element name="exception" type="{http://org.onap.so/vnfNotify}msoExceptionCategory" minOccurs="0"/> - * <element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "rollbackVnfNotification", propOrder = {"messageId", "completed", "exception", "errorMessage"}) -public class RollbackVnfNotification { - - @XmlElement(required = true) - protected String messageId; - protected boolean completed; - protected MsoExceptionCategory exception; - protected String errorMessage; - - /** - * Gets the value of the messageId property. - * - * @return possible object is {@link String } - * - */ - public String getMessageId() { - return messageId; - } - - /** - * Sets the value of the messageId property. - * - * @param value allowed object is {@link String } - * - */ - public void setMessageId(String value) { - this.messageId = value; - } - - /** - * Gets the value of the completed property. - * - */ - public boolean isCompleted() { - return completed; - } - - /** - * Sets the value of the completed property. - * - */ - public void setCompleted(boolean value) { - this.completed = value; - } - - /** - * Gets the value of the exception property. - * - * @return possible object is {@link MsoExceptionCategory } - * - */ - public MsoExceptionCategory getException() { - return exception; - } - - /** - * Sets the value of the exception property. - * - * @param value allowed object is {@link MsoExceptionCategory } - * - */ - public void setException(MsoExceptionCategory value) { - this.exception = value; - } - - /** - * Gets the value of the errorMessage property. - * - * @return possible object is {@link String } - * - */ - public String getErrorMessage() { - return errorMessage; - } - - /** - * Sets the value of the errorMessage property. - * - * @param value allowed object is {@link String } - * - */ - public void setErrorMessage(String value) { - this.errorMessage = value; - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/UpdateVnfNotification.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/UpdateVnfNotification.java deleted file mode 100644 index 968b3767c3..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/UpdateVnfNotification.java +++ /dev/null @@ -1,348 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.vnf.async.client; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p> - * Java class for updateVnfNotification complex type. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="updateVnfNotification"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/> - * <element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/> - * <element name="exception" type="{http://org.onap.so/vnfNotify}msoExceptionCategory" minOccurs="0"/> - * <element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="outputs" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="entry" maxOccurs="unbounded" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * <element name="rollback" type="{http://org.onap.so/vnfNotify}vnfRollback" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "updateVnfNotification", - propOrder = {"messageId", "completed", "exception", "errorMessage", "outputs", "rollback"}) -public class UpdateVnfNotification { - - @XmlElement(required = true) - protected String messageId; - protected boolean completed; - protected MsoExceptionCategory exception; - protected String errorMessage; - protected UpdateVnfNotification.Outputs outputs; - protected VnfRollback rollback; - - /** - * Gets the value of the messageId property. - * - * @return possible object is {@link String } - * - */ - public String getMessageId() { - return messageId; - } - - /** - * Sets the value of the messageId property. - * - * @param value allowed object is {@link String } - * - */ - public void setMessageId(String value) { - this.messageId = value; - } - - /** - * Gets the value of the completed property. - * - */ - public boolean isCompleted() { - return completed; - } - - /** - * Sets the value of the completed property. - * - */ - public void setCompleted(boolean value) { - this.completed = value; - } - - /** - * Gets the value of the exception property. - * - * @return possible object is {@link MsoExceptionCategory } - * - */ - public MsoExceptionCategory getException() { - return exception; - } - - /** - * Sets the value of the exception property. - * - * @param value allowed object is {@link MsoExceptionCategory } - * - */ - public void setException(MsoExceptionCategory value) { - this.exception = value; - } - - /** - * Gets the value of the errorMessage property. - * - * @return possible object is {@link String } - * - */ - public String getErrorMessage() { - return errorMessage; - } - - /** - * Sets the value of the errorMessage property. - * - * @param value allowed object is {@link String } - * - */ - public void setErrorMessage(String value) { - this.errorMessage = value; - } - - /** - * Gets the value of the outputs property. - * - * @return possible object is {@link UpdateVnfNotification.Outputs } - * - */ - public UpdateVnfNotification.Outputs getOutputs() { - return outputs; - } - - /** - * Sets the value of the outputs property. - * - * @param value allowed object is {@link UpdateVnfNotification.Outputs } - * - */ - public void setOutputs(UpdateVnfNotification.Outputs value) { - this.outputs = value; - } - - /** - * Gets the value of the rollback property. - * - * @return possible object is {@link VnfRollback } - * - */ - public VnfRollback getRollback() { - return rollback; - } - - /** - * Sets the value of the rollback property. - * - * @param value allowed object is {@link VnfRollback } - * - */ - public void setRollback(VnfRollback value) { - this.rollback = value; - } - - - /** - * <p> - * Java class for anonymous complex type. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="entry" maxOccurs="unbounded" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = {"entry"}) - public static class Outputs { - - protected List<UpdateVnfNotification.Outputs.Entry> entry; - - /** - * Gets the value of the entry property. - * - * <p> - * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you - * make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> - * method for the entry property. - * - * <p> - * For example, to add a new item, do as follows: - * - * <pre> - * getEntry().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list {@link UpdateVnfNotification.Outputs.Entry } - * - * - */ - public List<UpdateVnfNotification.Outputs.Entry> getEntry() { - if (entry == null) { - entry = new ArrayList<>(); - } - return this.entry; - } - - - /** - * <p> - * Java class for anonymous complex type. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = {"key", "value"}) - public static class Entry { - - protected String key; - protected String value; - - /** - * Gets the value of the key property. - * - * @return possible object is {@link String } - * - */ - public String getKey() { - return key; - } - - /** - * Sets the value of the key property. - * - * @param value allowed object is {@link String } - * - */ - public void setKey(String value) { - this.key = value; - } - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - } - - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfAdapterNotify.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfAdapterNotify.java deleted file mode 100644 index d4bdaa3d34..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfAdapterNotify.java +++ /dev/null @@ -1,146 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.vnf.async.client; - -import javax.jws.Oneway; -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebService; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.ws.Action; -import javax.xml.ws.RequestWrapper; - - -/** - * This class was generated by the JAX-WS RI. JAX-WS RI 2.2.9-b14002 Generated source version: 2.2 - * - */ -@WebService(name = "vnfAdapterNotify", targetNamespace = "http://org.onap.so/vnfNotify") -@XmlSeeAlso({ObjectFactory.class}) -public interface VnfAdapterNotify { - - - /** - * - * @param exception - * @param errorMessage - * @param messageId - * @param completed - */ - @WebMethod - @Oneway - @RequestWrapper(localName = "rollbackVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", - className = "org.onap.so.adapters.vnf.async.client.RollbackVnfNotification") - @Action(input = "http://org.onap.so/notify/adapterNotify/rollbackVnfNotificationRequest") - public void rollbackVnfNotification(@WebParam(name = "messageId", targetNamespace = "") String messageId, - @WebParam(name = "completed", targetNamespace = "") boolean completed, - @WebParam(name = "exception", targetNamespace = "") MsoExceptionCategory exception, - @WebParam(name = "errorMessage", targetNamespace = "") String errorMessage); - - /** - * - * @param exception - * @param outputs - * @param errorMessage - * @param vnfExists - * @param messageId - * @param completed - * @param vnfId - * @param status - */ - @WebMethod - @Oneway - @RequestWrapper(localName = "queryVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", - className = "org.onap.so.adapters.vnf.async.client.QueryVnfNotification") - @Action(input = "http://org.onap.so/notify/adapterNotify/queryVnfNotificationRequest") - public void queryVnfNotification(@WebParam(name = "messageId", targetNamespace = "") String messageId, - @WebParam(name = "completed", targetNamespace = "") boolean completed, - @WebParam(name = "exception", targetNamespace = "") MsoExceptionCategory exception, - @WebParam(name = "errorMessage", targetNamespace = "") String errorMessage, - @WebParam(name = "vnfExists", targetNamespace = "") Boolean vnfExists, - @WebParam(name = "vnfId", targetNamespace = "") String vnfId, - @WebParam(name = "status", targetNamespace = "") VnfStatus status, @WebParam(name = "outputs", - targetNamespace = "") org.onap.so.adapters.vnf.async.client.QueryVnfNotification.Outputs outputs); - - /** - * - * @param exception - * @param outputs - * @param rollback - * @param errorMessage - * @param messageId - * @param completed - * @param vnfId - */ - @WebMethod - @Oneway - @RequestWrapper(localName = "createVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", - className = "org.onap.so.adapters.vnf.async.client.CreateVnfNotification") - @Action(input = "http://org.onap.so/notify/adapterNotify/createVnfNotificationRequest") - public void createVnfNotification(@WebParam(name = "messageId", targetNamespace = "") String messageId, - @WebParam(name = "completed", targetNamespace = "") boolean completed, - @WebParam(name = "exception", targetNamespace = "") MsoExceptionCategory exception, - @WebParam(name = "errorMessage", targetNamespace = "") String errorMessage, - @WebParam(name = "vnfId", targetNamespace = "") String vnfId, - @WebParam(name = "outputs", - targetNamespace = "") org.onap.so.adapters.vnf.async.client.CreateVnfNotification.Outputs outputs, - @WebParam(name = "rollback", targetNamespace = "") VnfRollback rollback); - - /** - * - * @param exception - * @param outputs - * @param rollback - * @param errorMessage - * @param messageId - * @param completed - */ - @WebMethod - @Oneway - @RequestWrapper(localName = "updateVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", - className = "org.onap.so.adapters.vnf.async.client.UpdateVnfNotification") - @Action(input = "http://org.onap.so/notify/adapterNotify/updateVnfNotificationRequest") - public void updateVnfNotification(@WebParam(name = "messageId", targetNamespace = "") String messageId, - @WebParam(name = "completed", targetNamespace = "") boolean completed, - @WebParam(name = "exception", targetNamespace = "") MsoExceptionCategory exception, - @WebParam(name = "errorMessage", targetNamespace = "") String errorMessage, - @WebParam(name = "outputs", - targetNamespace = "") org.onap.so.adapters.vnf.async.client.UpdateVnfNotification.Outputs outputs, - @WebParam(name = "rollback", targetNamespace = "") VnfRollback rollback); - - /** - * - * @param exception - * @param errorMessage - * @param messageId - * @param completed - */ - @WebMethod - @Oneway - @RequestWrapper(localName = "deleteVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", - className = "org.onap.so.adapters.vnf.async.client.DeleteVnfNotification") - @Action(input = "http://org.onap.so/notify/adapterNotify/deleteVnfNotificationRequest") - public void deleteVnfNotification(@WebParam(name = "messageId", targetNamespace = "") String messageId, - @WebParam(name = "completed", targetNamespace = "") boolean completed, - @WebParam(name = "exception", targetNamespace = "") MsoExceptionCategory exception, - @WebParam(name = "errorMessage", targetNamespace = "") String errorMessage); - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfAdapterNotify_Service.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfAdapterNotify_Service.java deleted file mode 100644 index 402d0af8e4..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfAdapterNotify_Service.java +++ /dev/null @@ -1,107 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.vnf.async.client; - -import java.net.URL; -import javax.xml.namespace.QName; -import javax.xml.ws.Service; -import javax.xml.ws.WebEndpoint; -import javax.xml.ws.WebServiceClient; -import javax.xml.ws.WebServiceException; -import javax.xml.ws.WebServiceFeature; - - -/** - * This class was generated by the JAX-WS RI. JAX-WS RI 2.2.9-b14002 Generated source version: 2.2 - * - */ -@WebServiceClient(name = "vnfAdapterNotify", targetNamespace = "http://org.onap.so/vnfNotify", - wsdlLocation = "/VnfAdapterNotify.wsdl") -public class VnfAdapterNotify_Service extends Service { - - private static final URL VNFADAPTERNOTIFY_WSDL_LOCATION; - private static final WebServiceException VNFADAPTERNOTIFY_EXCEPTION; - private static final String VNF_NOTIFY_URL = "http://org.onap.so/vnfNotify"; - private static final QName VNFADAPTERNOTIFY_QNAME = new QName(VNF_NOTIFY_URL, "vnfAdapterNotify"); - - static { - VNFADAPTERNOTIFY_WSDL_LOCATION = org.onap.so.adapters.vnf.async.client.VnfAdapterNotify_Service.class - .getResource("/VnfAdapterNotify.wsdl"); - WebServiceException e = null; - if (VNFADAPTERNOTIFY_WSDL_LOCATION == null) { - e = new WebServiceException( - "Cannot find '/VnfAdapterNotify.wsdl' wsdl. Place the resource correctly in the classpath."); - } - VNFADAPTERNOTIFY_EXCEPTION = e; - } - - public VnfAdapterNotify_Service() { - super(getWsdlLocation(), VNFADAPTERNOTIFY_QNAME); - } - - public VnfAdapterNotify_Service(WebServiceFeature... features) { - super(getWsdlLocation(), VNFADAPTERNOTIFY_QNAME, features); - } - - public VnfAdapterNotify_Service(URL wsdlLocation) { - super(wsdlLocation, VNFADAPTERNOTIFY_QNAME); - } - - public VnfAdapterNotify_Service(URL wsdlLocation, WebServiceFeature... features) { - super(wsdlLocation, VNFADAPTERNOTIFY_QNAME, features); - } - - public VnfAdapterNotify_Service(URL wsdlLocation, QName serviceName) { - super(wsdlLocation, serviceName); - } - - public VnfAdapterNotify_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { - super(wsdlLocation, serviceName, features); - } - - /** - * - * @return returns VnfAdapterNotify - */ - @WebEndpoint(name = "MsoVnfAdapterAsyncImplPort") - public VnfAdapterNotify getMsoVnfAdapterAsyncImplPort() { - return super.getPort(new QName(VNF_NOTIFY_URL, "MsoVnfAdapterAsyncImplPort"), VnfAdapterNotify.class); - } - - /** - * - * @param features A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features - * not in the <code>features</code> parameter will have their default values. - * @return returns VnfAdapterNotify - */ - @WebEndpoint(name = "MsoVnfAdapterAsyncImplPort") - public VnfAdapterNotify getMsoVnfAdapterAsyncImplPort(WebServiceFeature... features) { - return super.getPort(new QName(VNF_NOTIFY_URL, "MsoVnfAdapterAsyncImplPort"), VnfAdapterNotify.class, features); - } - - private static URL getWsdlLocation() { - if (VNFADAPTERNOTIFY_EXCEPTION != null) { - throw VNFADAPTERNOTIFY_EXCEPTION; - } - return VNFADAPTERNOTIFY_WSDL_LOCATION; - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfRollback.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfRollback.java deleted file mode 100644 index 7d8b4d1b41..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfRollback.java +++ /dev/null @@ -1,178 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.vnf.async.client; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p> - * Java class for vnfRollback complex type. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="vnfRollback"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="cloudSiteId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="msoRequest" type="{http://org.onap.so/vnfNotify}msoRequest" minOccurs="0"/> - * <element name="tenantCreated" type="{http://www.w3.org/2001/XMLSchema}boolean"/> - * <element name="tenantId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * <element name="vnfCreated" type="{http://www.w3.org/2001/XMLSchema}boolean"/> - * <element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "vnfRollback", - propOrder = {"cloudSiteId", "msoRequest", "tenantCreated", "tenantId", "vnfCreated", "vnfId"}) -public class VnfRollback { - - protected String cloudSiteId; - protected MsoRequest msoRequest; - protected boolean tenantCreated; - protected String tenantId; - protected boolean vnfCreated; - protected String vnfId; - - /** - * Gets the value of the cloudSiteId property. - * - * @return possible object is {@link String } - * - */ - public String getCloudSiteId() { - return cloudSiteId; - } - - /** - * Sets the value of the cloudSiteId property. - * - * @param value allowed object is {@link String } - * - */ - public void setCloudSiteId(String value) { - this.cloudSiteId = value; - } - - /** - * Gets the value of the msoRequest property. - * - * @return possible object is {@link MsoRequest } - * - */ - public MsoRequest getMsoRequest() { - return msoRequest; - } - - /** - * Sets the value of the msoRequest property. - * - * @param value allowed object is {@link MsoRequest } - * - */ - public void setMsoRequest(MsoRequest value) { - this.msoRequest = value; - } - - /** - * Gets the value of the tenantCreated property. - * - */ - public boolean isTenantCreated() { - return tenantCreated; - } - - /** - * Sets the value of the tenantCreated property. - * - */ - public void setTenantCreated(boolean value) { - this.tenantCreated = value; - } - - /** - * Gets the value of the tenantId property. - * - * @return possible object is {@link String } - * - */ - public String getTenantId() { - return tenantId; - } - - /** - * Sets the value of the tenantId property. - * - * @param value allowed object is {@link String } - * - */ - public void setTenantId(String value) { - this.tenantId = value; - } - - /** - * Gets the value of the vnfCreated property. - * - */ - public boolean isVnfCreated() { - return vnfCreated; - } - - /** - * Sets the value of the vnfCreated property. - * - */ - public void setVnfCreated(boolean value) { - this.vnfCreated = value; - } - - /** - * Gets the value of the vnfId property. - * - * @return possible object is {@link String } - * - */ - public String getVnfId() { - return vnfId; - } - - /** - * Sets the value of the vnfId property. - * - * @param value allowed object is {@link String } - * - */ - public void setVnfId(String value) { - this.vnfId = value; - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfStatus.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfStatus.java deleted file mode 100644 index 767777767c..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/VnfStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.vnf.async.client; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlType; - - -/** - * <p> - * Java class for vnfStatus. - * - * <p> - * The following schema fragment specifies the expected content contained within this class. - * <p> - * - * <pre> - * <simpleType name="vnfStatus"> - * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> - * <enumeration value="ACTIVE"/> - * <enumeration value="FAILED"/> - * <enumeration value="NOTFOUND"/> - * <enumeration value="UNKNOWN"/> - * </restriction> - * </simpleType> - * </pre> - * - */ -@XmlType(name = "vnfStatus") -@XmlEnum -public enum VnfStatus { - - ACTIVE, FAILED, NOTFOUND, UNKNOWN; - - public String value() { - return name(); - } - - public static VnfStatus fromValue(String v) { - return valueOf(v); - } - -} diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/package-info.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/package-info.java deleted file mode 100644 index cc4a2a78ec..0000000000 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/async/client/package-info.java +++ /dev/null @@ -1,21 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -@javax.xml.bind.annotation.XmlSchema(namespace = "http://org.onap.so/vnfNotify") -package org.onap.so.adapters.vnf.async.client; diff --git a/adapters/mso-openstack-adapters/src/main/resources/NetworkAdapterNotify.wsdl b/adapters/mso-openstack-adapters/src/main/resources/NetworkAdapterNotify.wsdl deleted file mode 100644 index 900389f205..0000000000 --- a/adapters/mso-openstack-adapters/src/main/resources/NetworkAdapterNotify.wsdl +++ /dev/null @@ -1,295 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.7-b01 svn-revision#13316. --> -<definitions targetNamespace="http://org.onap.so/networkNotify" name="networkAdapterNotify" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://org.onap.so/networkNotify" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> - <types> - <xs:schema version="1.0" targetNamespace="http://org.onap.so/networkNotify" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - - <xs:element name="createNetworkNotification" type="tns:createNetworkNotification"/> - - <xs:element name="createNetworkNotificationResponse" type="tns:createNetworkNotificationResponse"/> - - <xs:element name="deleteNetworkNotification" type="tns:deleteNetworkNotification"/> - - <xs:element name="deleteNetworkNotificationResponse" type="tns:deleteNetworkNotificationResponse"/> - - <xs:element name="queryNetworkNotification" type="tns:queryNetworkNotification"/> - - <xs:element name="queryNetworkNotificationResponse" type="tns:queryNetworkNotificationResponse"/> - - <xs:element name="rollbackNetworkNotification" type="tns:rollbackNetworkNotification"/> - - <xs:element name="rollbackNetworkNotificationResponse" type="tns:rollbackNetworkNotificationResponse"/> - - <xs:element name="updateNetworkNotification" type="tns:updateNetworkNotification"/> - - <xs:element name="updateNetworkNotificationResponse" type="tns:updateNetworkNotificationResponse"/> - - <xs:complexType name="queryNetworkNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="networkExists" type="xs:boolean" minOccurs="0"/> - <xs:element name="networkId" type="xs:string" minOccurs="0"/> - <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/> - <xs:element name="status" type="tns:networkStatus" minOccurs="0"/> - <xs:element name="vlans" type="xs:int" minOccurs="0" maxOccurs="255"/> - <xs:element name="subnetIdMap" minOccurs="0"> - <xs:complexType> - <xs:sequence> - <xs:element name="entry" minOccurs="0" maxOccurs="255"> - <xs:complexType> - <xs:sequence> - <xs:element name="key" minOccurs="0" type="xs:string"/> - <xs:element name="value" minOccurs="0" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="queryNetworkNotificationResponse"> - <xs:sequence/> - </xs:complexType> - - <xs:complexType name="deleteNetworkNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="networkDeleted" type="xs:boolean" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="deleteNetworkNotificationResponse"> - <xs:sequence/> - </xs:complexType> - - <xs:complexType name="rollbackNetworkNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="rollbackNetworkNotificationResponse"> - <xs:sequence/> - </xs:complexType> - - <xs:complexType name="createNetworkNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="networkId" type="xs:string" minOccurs="0"/> - <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/> - <xs:element name="subnetIdMap" minOccurs="0"> - <xs:complexType> - <xs:sequence> - <xs:element name="entry" minOccurs="0" maxOccurs="255"> - <xs:complexType> - <xs:sequence> - <xs:element name="key" minOccurs="0" type="xs:string"/> - <xs:element name="value" minOccurs="0" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="rollback" type="tns:networkRollback" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="createNetworkNotificationResponse"> - <xs:sequence/> - </xs:complexType> - - <xs:complexType name="updateNetworkNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="subnetIdMap" minOccurs="0"> - <xs:complexType> - <xs:sequence> - <xs:element name="entry" minOccurs="0" maxOccurs="255"> - <xs:complexType> - <xs:sequence> - <xs:element name="key" minOccurs="0" type="xs:string"/> - <xs:element name="value" minOccurs="0" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="rollback" type="tns:networkRollback" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="updateNetworkNotificationResponse"> - <xs:sequence/> - </xs:complexType> - - <xs:complexType name="networkRollback"> - <xs:sequence> - <xs:element name="cloudId" type="xs:string" minOccurs="0"/> - <xs:element name="msoRequest" type="tns:msoRequest" minOccurs="0"/> - <xs:element name="networkCreated" type="xs:boolean"/> - <xs:element name="networkId" type="xs:string" minOccurs="0"/> - <xs:element name="networkStackId" type="xs:string" minOccurs="0"/> - <xs:element name="networkName" type="xs:string" minOccurs="0"/> - <xs:element name="networkType" type="xs:string" minOccurs="0"/> - <xs:element name="networkUpdated" type="xs:boolean"/> - <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/> - <xs:element name="physicalNetwork" type="xs:string" minOccurs="0"/> - <xs:element name="tenantId" type="xs:string" minOccurs="0"/> - <xs:element name="vlans" type="xs:int" nillable="true" minOccurs="0" maxOccurs="255"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="msoRequest"> - <xs:sequence> - <xs:element name="requestId" type="xs:string" minOccurs="0"/> - <xs:element name="serviceInstanceId" type="xs:string" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:simpleType name="msoExceptionCategory"> - <xs:restriction base="xs:string"> - <xs:enumeration value="OPENSTACK"/> - <xs:enumeration value="IO"/> - <xs:enumeration value="INTERNAL"/> - <xs:enumeration value="USERDATA"/> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType name="networkStatus"> - <xs:restriction base="xs:string"> - <xs:enumeration value="NOTFOUND"/> - <xs:enumeration value="ACTIVE"/> - <xs:enumeration value="DOWN"/> - <xs:enumeration value="BUILD"/> - <xs:enumeration value="ERROR"/> - <xs:enumeration value="UNKNOWN"/> - </xs:restriction> - </xs:simpleType> -</xs:schema> - </types> - <message name="rollbackNetworkNotification"> - <part name="parameters" element="tns:rollbackNetworkNotification"/> - </message> - <message name="rollbackNetworkNotificationResponse"> - <part name="parameters" element="tns:rollbackNetworkNotificationResponse"/> - </message> - <message name="queryNetworkNotification"> - <part name="parameters" element="tns:queryNetworkNotification"/> - </message> - <message name="queryNetworkNotificationResponse"> - <part name="parameters" element="tns:queryNetworkNotificationResponse"/> - </message> - <message name="createNetworkNotification"> - <part name="parameters" element="tns:createNetworkNotification"/> - </message> - <message name="createNetworkNotificationResponse"> - <part name="parameters" element="tns:createNetworkNotificationResponse"/> - </message> - <message name="deleteNetworkNotification"> - <part name="parameters" element="tns:deleteNetworkNotification"/> - </message> - <message name="deleteNetworkNotificationResponse"> - <part name="parameters" element="tns:deleteNetworkNotificationResponse"/> - </message> - <message name="updateNetworkNotification"> - <part name="parameters" element="tns:updateNetworkNotification"/> - </message> - <message name="updateNetworkNotificationResponse"> - <part name="parameters" element="tns:updateNetworkNotificationResponse"/> - </message> - <portType name="networkAdapterNotify"> - <operation name="rollbackNetworkNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/rollbackNetworkNotificationRequest" message="tns:rollbackNetworkNotification"/> - <output wsam:Action="http://org.onap.so/notify/adapterNotify/rollbackNetworkNotificationResponse" message="tns:rollbackNetworkNotificationResponse"/> - </operation> - <operation name="queryNetworkNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/queryNetworkNotificationRequest" message="tns:queryNetworkNotification"/> - <output wsam:Action="http://org.onap.so/notify/adapterNotify/queryNetworkNotificationResponse" message="tns:queryNetworkNotificationResponse"/> - </operation> - <operation name="createNetworkNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/createNetworkNotificationRequest" message="tns:createNetworkNotification"/> - <output wsam:Action="http://org.onap.so/notify/adapterNotify/createNetworkNotificationResponse" message="tns:createNetworkNotificationResponse"/> - </operation> - <operation name="deleteNetworkNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/deleteNetworkNotificationRequest" message="tns:deleteNetworkNotification"/> - <output wsam:Action="http://org.onap.so/notify/adapterNotify/deleteNetworkNotificationResponse" message="tns:deleteNetworkNotificationResponse"/> - </operation> - <operation name="updateNetworkNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/updateNetworkNotificationRequest" message="tns:updateNetworkNotification"/> - <output wsam:Action="http://org.onap.so/notify/adapterNotify/updateNetworkNotificationResponse" message="tns:updateNetworkNotificationResponse"/> - </operation> - </portType> - <binding name="MsoNetworkAdapterAsyncImplPortBinding" type="tns:networkAdapterNotify"> - <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> - <operation name="rollbackNetworkNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - <output> - <soap:body use="literal"/> - </output> - </operation> - <operation name="queryNetworkNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - <output> - <soap:body use="literal"/> - </output> - </operation> - <operation name="createNetworkNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - <output> - <soap:body use="literal"/> - </output> - </operation> - <operation name="deleteNetworkNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - <output> - <soap:body use="literal"/> - </output> - </operation> - <operation name="updateNetworkNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - <output> - <soap:body use="literal"/> - </output> - </operation> - </binding> - <service name="networkAdapterNotify"> - <port name="MsoNetworkAdapterAsyncImplPort" binding="tns:MsoNetworkAdapterAsyncImplPortBinding"> - <soap:address location="REPLACE_WITH_ACTUAL_URL"/> - </port> - </service> -</definitions> - diff --git a/adapters/mso-openstack-adapters/src/main/resources/VnfAdapterNotify.wsdl b/adapters/mso-openstack-adapters/src/main/resources/VnfAdapterNotify.wsdl deleted file mode 100644 index eb3f1033cd..0000000000 --- a/adapters/mso-openstack-adapters/src/main/resources/VnfAdapterNotify.wsdl +++ /dev/null @@ -1,218 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.7-b01 svn-revision#13316. --> -<definitions targetNamespace="http://org.onap.so/vnfNotify" name="vnfAdapterNotify" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://org.onap.so/vnfNotify" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> - <types> - <xs:schema version="1.0" targetNamespace="http://org.onap.so/vnfNotify" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - - <xs:element name="createVnfNotification" type="tns:createVnfNotification"/> - - <xs:element name="updateVnfNotification" type="tns:updateVnfNotification"/> - - <xs:element name="deleteVnfNotification" type="tns:deleteVnfNotification"/> - - <xs:element name="queryVnfNotification" type="tns:queryVnfNotification"/> - - <xs:element name="rollbackVnfNotification" type="tns:rollbackVnfNotification"/> - - <xs:complexType name="queryVnfNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="vnfExists" type="xs:boolean" minOccurs="0"/> - <xs:element name="vnfId" type="xs:string" minOccurs="0"/> - <xs:element name="status" type="tns:vnfStatus" minOccurs="0"/> - <xs:element name="outputs" minOccurs="0"> - <xs:complexType> - <xs:sequence> - <xs:element name="entry" minOccurs="0" maxOccurs="255"> - <xs:complexType> - <xs:sequence> - <xs:element name="key" minOccurs="0" type="xs:string"/> - <xs:element name="value" minOccurs="0" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="deleteVnfNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="rollbackVnfNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="createVnfNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="vnfId" type="xs:string" minOccurs="0"/> - <xs:element name="outputs" minOccurs="0"> - <xs:complexType> - <xs:sequence> - <xs:element name="entry" minOccurs="0" maxOccurs="255"> - <xs:complexType> - <xs:sequence> - <xs:element name="key" minOccurs="0" type="xs:string"/> - <xs:element name="value" minOccurs="0" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="rollback" type="tns:vnfRollback" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="updateVnfNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="outputs" minOccurs="0"> - <xs:complexType> - <xs:sequence> - <xs:element name="entry" minOccurs="0" maxOccurs="255"> - <xs:complexType> - <xs:sequence> - <xs:element name="key" minOccurs="0" type="xs:string"/> - <xs:element name="value" minOccurs="0" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="rollback" type="tns:vnfRollback" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="vnfRollback"> - <xs:sequence> - <xs:element name="cloudSiteId" type="xs:string" minOccurs="0"/> - <xs:element name="msoRequest" type="tns:msoRequest" minOccurs="0"/> - <xs:element name="tenantCreated" type="xs:boolean"/> - <xs:element name="tenantId" type="xs:string" minOccurs="0"/> - <xs:element name="vnfCreated" type="xs:boolean"/> - <xs:element name="vnfId" type="xs:string" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="msoRequest"> - <xs:sequence> - <xs:element name="requestId" type="xs:string" minOccurs="0"/> - <xs:element name="serviceInstanceId" type="xs:string" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:simpleType name="msoExceptionCategory"> - <xs:restriction base="xs:string"> - <xs:enumeration value="OPENSTACK"/> - <xs:enumeration value="IO"/> - <xs:enumeration value="INTERNAL"/> - <xs:enumeration value="USERDATA"/> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType name="vnfStatus"> - <xs:restriction base="xs:string"> - <xs:enumeration value="ACTIVE"/> - <xs:enumeration value="FAILED"/> - <xs:enumeration value="NOTFOUND"/> - <xs:enumeration value="UNKNOWN"/> - </xs:restriction> - </xs:simpleType> -</xs:schema> - </types> - <message name="rollbackVnfNotification"> - <part name="parameters" element="tns:rollbackVnfNotification"/> - </message> - <message name="queryVnfNotification"> - <part name="parameters" element="tns:queryVnfNotification"/> - </message> - <message name="createVnfNotification"> - <part name="parameters" element="tns:createVnfNotification"/> - </message> - <message name="updateVnfNotification"> - <part name="parameters" element="tns:updateVnfNotification"/> - </message> - <message name="deleteVnfNotification"> - <part name="parameters" element="tns:deleteVnfNotification"/> - </message> - <portType name="vnfAdapterNotify"> - <operation name="rollbackVnfNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/rollbackVnfNotificationRequest" message="tns:rollbackVnfNotification"/> - </operation> - <operation name="queryVnfNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/queryVnfNotificationRequest" message="tns:queryVnfNotification"/> - </operation> - <operation name="createVnfNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/createVnfNotificationRequest" message="tns:createVnfNotification"/> - </operation> - <operation name="updateVnfNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/updateVnfNotificationRequest" message="tns:updateVnfNotification"/> - </operation> - <operation name="deleteVnfNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/deleteVnfNotificationRequest" message="tns:deleteVnfNotification"/> - </operation> - </portType> - <binding name="MsoVnfAdapterAsyncImplPortBinding" type="tns:vnfAdapterNotify"> - <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> - <operation name="rollbackVnfNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - </operation> - <operation name="queryVnfNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - </operation> - <operation name="createVnfNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - </operation> - <operation name="updateVnfNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - </operation> - <operation name="deleteVnfNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - </operation> - </binding> - <service name="vnfAdapterNotify"> - <port name="MsoVnfAdapterAsyncImplPort" binding="tns:MsoVnfAdapterAsyncImplPortBinding"> - <soap:address location="REPLACE_WITH_ACTUAL_URL"/> - </port> - </service> -</definitions> - diff --git a/adapters/mso-openstack-adapters/src/main/resources/wsdl/NetworkAdapterNotify.wsdl b/adapters/mso-openstack-adapters/src/main/resources/wsdl/NetworkAdapterNotify.wsdl deleted file mode 100644 index 900389f205..0000000000 --- a/adapters/mso-openstack-adapters/src/main/resources/wsdl/NetworkAdapterNotify.wsdl +++ /dev/null @@ -1,295 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.7-b01 svn-revision#13316. --> -<definitions targetNamespace="http://org.onap.so/networkNotify" name="networkAdapterNotify" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://org.onap.so/networkNotify" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> - <types> - <xs:schema version="1.0" targetNamespace="http://org.onap.so/networkNotify" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - - <xs:element name="createNetworkNotification" type="tns:createNetworkNotification"/> - - <xs:element name="createNetworkNotificationResponse" type="tns:createNetworkNotificationResponse"/> - - <xs:element name="deleteNetworkNotification" type="tns:deleteNetworkNotification"/> - - <xs:element name="deleteNetworkNotificationResponse" type="tns:deleteNetworkNotificationResponse"/> - - <xs:element name="queryNetworkNotification" type="tns:queryNetworkNotification"/> - - <xs:element name="queryNetworkNotificationResponse" type="tns:queryNetworkNotificationResponse"/> - - <xs:element name="rollbackNetworkNotification" type="tns:rollbackNetworkNotification"/> - - <xs:element name="rollbackNetworkNotificationResponse" type="tns:rollbackNetworkNotificationResponse"/> - - <xs:element name="updateNetworkNotification" type="tns:updateNetworkNotification"/> - - <xs:element name="updateNetworkNotificationResponse" type="tns:updateNetworkNotificationResponse"/> - - <xs:complexType name="queryNetworkNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="networkExists" type="xs:boolean" minOccurs="0"/> - <xs:element name="networkId" type="xs:string" minOccurs="0"/> - <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/> - <xs:element name="status" type="tns:networkStatus" minOccurs="0"/> - <xs:element name="vlans" type="xs:int" minOccurs="0" maxOccurs="255"/> - <xs:element name="subnetIdMap" minOccurs="0"> - <xs:complexType> - <xs:sequence> - <xs:element name="entry" minOccurs="0" maxOccurs="255"> - <xs:complexType> - <xs:sequence> - <xs:element name="key" minOccurs="0" type="xs:string"/> - <xs:element name="value" minOccurs="0" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="queryNetworkNotificationResponse"> - <xs:sequence/> - </xs:complexType> - - <xs:complexType name="deleteNetworkNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="networkDeleted" type="xs:boolean" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="deleteNetworkNotificationResponse"> - <xs:sequence/> - </xs:complexType> - - <xs:complexType name="rollbackNetworkNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="rollbackNetworkNotificationResponse"> - <xs:sequence/> - </xs:complexType> - - <xs:complexType name="createNetworkNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="networkId" type="xs:string" minOccurs="0"/> - <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/> - <xs:element name="subnetIdMap" minOccurs="0"> - <xs:complexType> - <xs:sequence> - <xs:element name="entry" minOccurs="0" maxOccurs="255"> - <xs:complexType> - <xs:sequence> - <xs:element name="key" minOccurs="0" type="xs:string"/> - <xs:element name="value" minOccurs="0" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="rollback" type="tns:networkRollback" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="createNetworkNotificationResponse"> - <xs:sequence/> - </xs:complexType> - - <xs:complexType name="updateNetworkNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="subnetIdMap" minOccurs="0"> - <xs:complexType> - <xs:sequence> - <xs:element name="entry" minOccurs="0" maxOccurs="255"> - <xs:complexType> - <xs:sequence> - <xs:element name="key" minOccurs="0" type="xs:string"/> - <xs:element name="value" minOccurs="0" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="rollback" type="tns:networkRollback" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="updateNetworkNotificationResponse"> - <xs:sequence/> - </xs:complexType> - - <xs:complexType name="networkRollback"> - <xs:sequence> - <xs:element name="cloudId" type="xs:string" minOccurs="0"/> - <xs:element name="msoRequest" type="tns:msoRequest" minOccurs="0"/> - <xs:element name="networkCreated" type="xs:boolean"/> - <xs:element name="networkId" type="xs:string" minOccurs="0"/> - <xs:element name="networkStackId" type="xs:string" minOccurs="0"/> - <xs:element name="networkName" type="xs:string" minOccurs="0"/> - <xs:element name="networkType" type="xs:string" minOccurs="0"/> - <xs:element name="networkUpdated" type="xs:boolean"/> - <xs:element name="neutronNetworkId" type="xs:string" minOccurs="0"/> - <xs:element name="physicalNetwork" type="xs:string" minOccurs="0"/> - <xs:element name="tenantId" type="xs:string" minOccurs="0"/> - <xs:element name="vlans" type="xs:int" nillable="true" minOccurs="0" maxOccurs="255"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="msoRequest"> - <xs:sequence> - <xs:element name="requestId" type="xs:string" minOccurs="0"/> - <xs:element name="serviceInstanceId" type="xs:string" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:simpleType name="msoExceptionCategory"> - <xs:restriction base="xs:string"> - <xs:enumeration value="OPENSTACK"/> - <xs:enumeration value="IO"/> - <xs:enumeration value="INTERNAL"/> - <xs:enumeration value="USERDATA"/> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType name="networkStatus"> - <xs:restriction base="xs:string"> - <xs:enumeration value="NOTFOUND"/> - <xs:enumeration value="ACTIVE"/> - <xs:enumeration value="DOWN"/> - <xs:enumeration value="BUILD"/> - <xs:enumeration value="ERROR"/> - <xs:enumeration value="UNKNOWN"/> - </xs:restriction> - </xs:simpleType> -</xs:schema> - </types> - <message name="rollbackNetworkNotification"> - <part name="parameters" element="tns:rollbackNetworkNotification"/> - </message> - <message name="rollbackNetworkNotificationResponse"> - <part name="parameters" element="tns:rollbackNetworkNotificationResponse"/> - </message> - <message name="queryNetworkNotification"> - <part name="parameters" element="tns:queryNetworkNotification"/> - </message> - <message name="queryNetworkNotificationResponse"> - <part name="parameters" element="tns:queryNetworkNotificationResponse"/> - </message> - <message name="createNetworkNotification"> - <part name="parameters" element="tns:createNetworkNotification"/> - </message> - <message name="createNetworkNotificationResponse"> - <part name="parameters" element="tns:createNetworkNotificationResponse"/> - </message> - <message name="deleteNetworkNotification"> - <part name="parameters" element="tns:deleteNetworkNotification"/> - </message> - <message name="deleteNetworkNotificationResponse"> - <part name="parameters" element="tns:deleteNetworkNotificationResponse"/> - </message> - <message name="updateNetworkNotification"> - <part name="parameters" element="tns:updateNetworkNotification"/> - </message> - <message name="updateNetworkNotificationResponse"> - <part name="parameters" element="tns:updateNetworkNotificationResponse"/> - </message> - <portType name="networkAdapterNotify"> - <operation name="rollbackNetworkNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/rollbackNetworkNotificationRequest" message="tns:rollbackNetworkNotification"/> - <output wsam:Action="http://org.onap.so/notify/adapterNotify/rollbackNetworkNotificationResponse" message="tns:rollbackNetworkNotificationResponse"/> - </operation> - <operation name="queryNetworkNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/queryNetworkNotificationRequest" message="tns:queryNetworkNotification"/> - <output wsam:Action="http://org.onap.so/notify/adapterNotify/queryNetworkNotificationResponse" message="tns:queryNetworkNotificationResponse"/> - </operation> - <operation name="createNetworkNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/createNetworkNotificationRequest" message="tns:createNetworkNotification"/> - <output wsam:Action="http://org.onap.so/notify/adapterNotify/createNetworkNotificationResponse" message="tns:createNetworkNotificationResponse"/> - </operation> - <operation name="deleteNetworkNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/deleteNetworkNotificationRequest" message="tns:deleteNetworkNotification"/> - <output wsam:Action="http://org.onap.so/notify/adapterNotify/deleteNetworkNotificationResponse" message="tns:deleteNetworkNotificationResponse"/> - </operation> - <operation name="updateNetworkNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/updateNetworkNotificationRequest" message="tns:updateNetworkNotification"/> - <output wsam:Action="http://org.onap.so/notify/adapterNotify/updateNetworkNotificationResponse" message="tns:updateNetworkNotificationResponse"/> - </operation> - </portType> - <binding name="MsoNetworkAdapterAsyncImplPortBinding" type="tns:networkAdapterNotify"> - <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> - <operation name="rollbackNetworkNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - <output> - <soap:body use="literal"/> - </output> - </operation> - <operation name="queryNetworkNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - <output> - <soap:body use="literal"/> - </output> - </operation> - <operation name="createNetworkNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - <output> - <soap:body use="literal"/> - </output> - </operation> - <operation name="deleteNetworkNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - <output> - <soap:body use="literal"/> - </output> - </operation> - <operation name="updateNetworkNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - <output> - <soap:body use="literal"/> - </output> - </operation> - </binding> - <service name="networkAdapterNotify"> - <port name="MsoNetworkAdapterAsyncImplPort" binding="tns:MsoNetworkAdapterAsyncImplPortBinding"> - <soap:address location="REPLACE_WITH_ACTUAL_URL"/> - </port> - </service> -</definitions> - diff --git a/adapters/mso-openstack-adapters/src/main/resources/wsdl/VnfAdapterNotify.wsdl b/adapters/mso-openstack-adapters/src/main/resources/wsdl/VnfAdapterNotify.wsdl deleted file mode 100644 index eb3f1033cd..0000000000 --- a/adapters/mso-openstack-adapters/src/main/resources/wsdl/VnfAdapterNotify.wsdl +++ /dev/null @@ -1,218 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.7-b01 svn-revision#13316. --> -<definitions targetNamespace="http://org.onap.so/vnfNotify" name="vnfAdapterNotify" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://org.onap.so/vnfNotify" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> - <types> - <xs:schema version="1.0" targetNamespace="http://org.onap.so/vnfNotify" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - - <xs:element name="createVnfNotification" type="tns:createVnfNotification"/> - - <xs:element name="updateVnfNotification" type="tns:updateVnfNotification"/> - - <xs:element name="deleteVnfNotification" type="tns:deleteVnfNotification"/> - - <xs:element name="queryVnfNotification" type="tns:queryVnfNotification"/> - - <xs:element name="rollbackVnfNotification" type="tns:rollbackVnfNotification"/> - - <xs:complexType name="queryVnfNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="vnfExists" type="xs:boolean" minOccurs="0"/> - <xs:element name="vnfId" type="xs:string" minOccurs="0"/> - <xs:element name="status" type="tns:vnfStatus" minOccurs="0"/> - <xs:element name="outputs" minOccurs="0"> - <xs:complexType> - <xs:sequence> - <xs:element name="entry" minOccurs="0" maxOccurs="255"> - <xs:complexType> - <xs:sequence> - <xs:element name="key" minOccurs="0" type="xs:string"/> - <xs:element name="value" minOccurs="0" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="deleteVnfNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="rollbackVnfNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="createVnfNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="vnfId" type="xs:string" minOccurs="0"/> - <xs:element name="outputs" minOccurs="0"> - <xs:complexType> - <xs:sequence> - <xs:element name="entry" minOccurs="0" maxOccurs="255"> - <xs:complexType> - <xs:sequence> - <xs:element name="key" minOccurs="0" type="xs:string"/> - <xs:element name="value" minOccurs="0" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="rollback" type="tns:vnfRollback" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="updateVnfNotification"> - <xs:sequence> - <xs:element name="messageId" type="xs:string"/> - <xs:element name="completed" type="xs:boolean"/> - <xs:element name="exception" type="tns:msoExceptionCategory" minOccurs="0"/> - <xs:element name="errorMessage" type="xs:string" minOccurs="0"/> - <xs:element name="outputs" minOccurs="0"> - <xs:complexType> - <xs:sequence> - <xs:element name="entry" minOccurs="0" maxOccurs="255"> - <xs:complexType> - <xs:sequence> - <xs:element name="key" minOccurs="0" type="xs:string"/> - <xs:element name="value" minOccurs="0" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="rollback" type="tns:vnfRollback" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="vnfRollback"> - <xs:sequence> - <xs:element name="cloudSiteId" type="xs:string" minOccurs="0"/> - <xs:element name="msoRequest" type="tns:msoRequest" minOccurs="0"/> - <xs:element name="tenantCreated" type="xs:boolean"/> - <xs:element name="tenantId" type="xs:string" minOccurs="0"/> - <xs:element name="vnfCreated" type="xs:boolean"/> - <xs:element name="vnfId" type="xs:string" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="msoRequest"> - <xs:sequence> - <xs:element name="requestId" type="xs:string" minOccurs="0"/> - <xs:element name="serviceInstanceId" type="xs:string" minOccurs="0"/> - </xs:sequence> - </xs:complexType> - - <xs:simpleType name="msoExceptionCategory"> - <xs:restriction base="xs:string"> - <xs:enumeration value="OPENSTACK"/> - <xs:enumeration value="IO"/> - <xs:enumeration value="INTERNAL"/> - <xs:enumeration value="USERDATA"/> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType name="vnfStatus"> - <xs:restriction base="xs:string"> - <xs:enumeration value="ACTIVE"/> - <xs:enumeration value="FAILED"/> - <xs:enumeration value="NOTFOUND"/> - <xs:enumeration value="UNKNOWN"/> - </xs:restriction> - </xs:simpleType> -</xs:schema> - </types> - <message name="rollbackVnfNotification"> - <part name="parameters" element="tns:rollbackVnfNotification"/> - </message> - <message name="queryVnfNotification"> - <part name="parameters" element="tns:queryVnfNotification"/> - </message> - <message name="createVnfNotification"> - <part name="parameters" element="tns:createVnfNotification"/> - </message> - <message name="updateVnfNotification"> - <part name="parameters" element="tns:updateVnfNotification"/> - </message> - <message name="deleteVnfNotification"> - <part name="parameters" element="tns:deleteVnfNotification"/> - </message> - <portType name="vnfAdapterNotify"> - <operation name="rollbackVnfNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/rollbackVnfNotificationRequest" message="tns:rollbackVnfNotification"/> - </operation> - <operation name="queryVnfNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/queryVnfNotificationRequest" message="tns:queryVnfNotification"/> - </operation> - <operation name="createVnfNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/createVnfNotificationRequest" message="tns:createVnfNotification"/> - </operation> - <operation name="updateVnfNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/updateVnfNotificationRequest" message="tns:updateVnfNotification"/> - </operation> - <operation name="deleteVnfNotification"> - <input wsam:Action="http://org.onap.so/notify/adapterNotify/deleteVnfNotificationRequest" message="tns:deleteVnfNotification"/> - </operation> - </portType> - <binding name="MsoVnfAdapterAsyncImplPortBinding" type="tns:vnfAdapterNotify"> - <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> - <operation name="rollbackVnfNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - </operation> - <operation name="queryVnfNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - </operation> - <operation name="createVnfNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - </operation> - <operation name="updateVnfNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - </operation> - <operation name="deleteVnfNotification"> - <soap:operation soapAction=""/> - <input> - <soap:body use="literal"/> - </input> - </operation> - </binding> - <service name="vnfAdapterNotify"> - <port name="MsoVnfAdapterAsyncImplPort" binding="tns:MsoVnfAdapterAsyncImplPortBinding"> - <soap:address location="REPLACE_WITH_ACTUAL_URL"/> - </port> - </service> -</definitions> - diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailPolicyRefSeqTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailPolicyRefSeqTest.java deleted file mode 100644 index dd59121a39..0000000000 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailPolicyRefSeqTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.network; - -import static org.junit.Assert.assertTrue; -import org.junit.Test; - -public class ContrailPolicyRefSeqTest { - @Test - public void ContrailPolicyRefSeqJson_Test() { - ContrailPolicyRefSeq cprs = new ContrailPolicyRefSeq("majorVersion 1", "minorVersion 0.02"); - assertTrue(cprs.toString().contains("majorVersion 1")); - assertTrue(cprs.toString().contains("minorVersion 0.02")); - } - -} diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailPolicyRefTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailPolicyRefTest.java deleted file mode 100644 index e8e14417c0..0000000000 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailPolicyRefTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.network; - -import static org.junit.Assert.assertTrue; -import org.junit.Test; - -public class ContrailPolicyRefTest { - - @Test - public void ContrailPolicyRef_Test() { - ContrailPolicyRef ref = new ContrailPolicyRef(); - ref.populate("majorVersion 1", "minorVersion 0.02"); - String strJson = ref.toJsonString(); - assertTrue(strJson.contains("majorVersion 1")); - assertTrue(strJson.contains("minorVersion 0.02")); - } - -} diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailSubnetHostRouteTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailSubnetHostRouteTest.java deleted file mode 100644 index eb8395cd9b..0000000000 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailSubnetHostRouteTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * ============LICENSE_START======================================================= ONAP : SO - * ================================================================================ Copyright (C) 2018 TechMahindra - * ================================================================================ Licensed under the Apache License, - * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy - * of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * ============LICENSE_END========================================================= - */ -package org.onap.so.adapters.network; - -import static org.junit.Assert.assertEquals; -import org.junit.Test; -import org.onap.so.openstack.beans.HostRoute; - -public class ContrailSubnetHostRouteTest { - - private ContrailSubnetHostRoute cshr = new ContrailSubnetHostRoute(); - HostRoute hr = new HostRoute(); - - @Test - public void testContrailSubnetHostRoute() { - - cshr.setPrefix("prefix"); - cshr.setNextHop("nextHop"); - assertEquals("prefix", cshr.getPrefix()); - assertEquals("nextHop", cshr.getNextHop()); - assert (cshr.toString() != null); - cshr.populateWith(hr); - } -} diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailSubnetHostRoutesTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailSubnetHostRoutesTest.java deleted file mode 100644 index 830d94cf85..0000000000 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/ContrailSubnetHostRoutesTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * ============LICENSE_START======================================================= ONAP : SO - * ================================================================================ Copyright (C) 2018 TechMahindra - * ================================================================================ Licensed under the Apache License, - * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy - * of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.network; - -import static org.junit.Assert.*; -import java.util.List; -import org.junit.Test; - -public class ContrailSubnetHostRoutesTest { - - ContrailSubnetHostRoutes cshr = new ContrailSubnetHostRoutes(); - List<ContrailSubnetHostRoute> host_routes; - StringBuilder buf = new StringBuilder(); - - @Test - public void testContrailSubnetHostRoutes() { - cshr.setHostRoutes(host_routes); - assertEquals(cshr.getHostRoutes(), host_routes); - assert (cshr.toString() != null); - } -} diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/MSONetworkAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/MSONetworkAdapterImplTest.java index 88c6992a0a..a7abdcab7f 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/MSONetworkAdapterImplTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/network/MSONetworkAdapterImplTest.java @@ -23,22 +23,16 @@ package org.onap.so.adapters.network; import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.patch; import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; -import static org.junit.Assert.assertEquals; -import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackDeleteNeutronNetwork; +import static org.junit.Assert.assertNotNull; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackDeleteStack_200; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackDeleteStack_500; -import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackGetAllNeutronNetworks_200; -import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackGetAllNeutronNetworks_404; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackGetNeutronNetwork; -import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackGetNeutronNetwork_404; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackGetStackCreated_200; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackGetStackDeleteOrUpdateComplete_200; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackGetStack_404; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackGetStack_500; -import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackPostNeutronNetwork_200; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackPostStack_200; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackPutNeutronNetwork; -import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackPutNeutronNetwork_200; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackPutStack; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenStackResponseAccess; import static org.onap.so.bpmn.mock.StubOpenStack.mockOpenstackGet; @@ -47,24 +41,36 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import javax.xml.ws.Holder; +import org.apache.commons.lang3.mutable.MutableBoolean; import org.apache.http.HttpStatus; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.onap.so.adapters.network.exceptions.NetworkException; import org.onap.so.adapters.vnf.BaseRestTestUtils; +import org.onap.so.entity.MsoRequest; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.web.util.UriComponentsBuilder; import com.github.tomakehurst.wiremock.WireMockServer; +import com.woorea.openstack.base.client.OpenStackResponseException; public class MSONetworkAdapterImplTest extends BaseRestTestUtils { public static final String NETWORK_ID = "43173f6a-d699-414b-888f-ab243dda6dfe"; public static final String NETWORK_NAME = "vUSP-23804-T-01-dpa2b_EVUSP-CORE-VIF-TSIG0_net_0"; + @Autowired + MsoNetworkAdapterImpl impl; + + @Rule + public final ExpectedException exception = ExpectedException.none(); @Test - public void createNetworkByModelNameHeatMode() throws IOException { + public void createNetworkByModelNameHeatMode() throws IOException, NetworkException { mockUpdateRequestDb(wireMockServer, "9733c8d1-2668-4e5f-8b51-2cacc9b662c0"); @@ -77,62 +83,63 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { mockOpenStackGetStackCreated_200(wireMockServer, "OpenstackResponse_Stack_Created.json", "DEV-VF-1802-it3-pwt3-v6-vSAMP10a-addon2-Replace-1001/stackId"); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = sendXMLRequest(inputStream("/CreateNetwork.xml"), uri, HttpMethod.POST); - assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value()); - } - - @Test - public void createNetworkByModelNameAlreadyExistHeatMode() throws IOException { - - mockUpdateRequestDb(wireMockServer, "9733c8d1-2668-4e5f-8b51-2cacc9b662c0"); - - mockOpenStackResponseAccess(wireMockServer, wireMockPort); + MsoRequest request = new MsoRequest(); + request.setRequestId("9733c8d1-2668-4e5f-8b51-2cacc9b662c0"); + request.setServiceInstanceId("MIS/1806/25009/SW_INTERNET"); - mockOpenStackPostStack_200(wireMockServer, "OpenstackResponse_Stack.json"); + Holder<String> stackId = new Holder<String>(); - mockOpenStackGetStackCreated_200(wireMockServer, "OpenstackResponse_Stack_Created.json", - "DEV-VF-1802-it3-pwt3-v6-vSAMP10a-addon2-Replace-1001/stackId"); + impl.createNetwork("mtn13", "bef254252c5d44e6bcec65c180180ab5", "CONTRAIL30_GNDIRECT", null, + "DEV-VF-1802-it3-pwt3-v6-vSAMP10a-addon2-Replace-1001", "dvs-mtjnj-01", null, null, null, null, false, + false, null, null, null, request, stackId, new MutableBoolean()); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = sendXMLRequest(inputStream("/CreateNetwork.xml"), uri, HttpMethod.POST); - assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value()); + assertNotNull(stackId.value); } @Test - public void createNetworkByModelNameAlreadyExistHeatModeFailIfExistTrue() throws IOException { + public void createNetworkByModelNameAlreadyExistHeatModeFailIfExistTrue() throws IOException, NetworkException { + exception.expect(NetworkException.class); mockOpenStackResponseAccess(wireMockServer, wireMockPort); mockOpenStackGetStackCreated_200(wireMockServer, "OpenstackResponse_Stack_Created.json", "dvspg-VCE_VPE-mtjnj40avbc"); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = - sendXMLRequest(inputStream("/CreateNetwork_Fail_If_Exist_True.xml"), uri, HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); + MsoRequest request = new MsoRequest(); + request.setRequestId("9733c8d1-2668-4e5f-8b51-2cacc9b662c0"); + request.setServiceInstanceId("MIS/1806/25009/SW_INTERNET"); + + Holder<String> stackId = new Holder<String>(); + + impl.createNetwork("mtn13", "bef254252c5d44e6bcec65c180180ab5", "CONTRAIL30_GNDIRECT", null, + "dvspg-VCE_VPE-mtjnj40avbc", "dvs-mtjnj-01", null, null, null, null, true, false, null, null, null, + request, stackId, new MutableBoolean()); } @Test - public void createNetworkByModelNameHeatModeQueryNetworkException() throws IOException { + public void createNetworkByModelNameHeatModeQueryNetworkException() throws IOException, NetworkException { + exception.expect(NetworkException.class); mockOpenStackResponseAccess(wireMockServer, wireMockPort); mockOpenstackGet(wireMockServer, "/mockPublicUrl/stacks/dvspg-VCE_VPE-mtjnj40avbc", HttpStatus.SC_INTERNAL_SERVER_ERROR); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = sendXMLRequest(inputStream("/CreateNetwork.xml"), uri, HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); + MsoRequest request = new MsoRequest(); + request.setRequestId("9733c8d1-2668-4e5f-8b51-2cacc9b662c0"); + request.setServiceInstanceId("MIS/1806/25009/SW_INTERNET"); + + Holder<String> stackId = new Holder<String>(); + + impl.createNetwork("mtn13", "bef254252c5d44e6bcec65c180180ab5", "CONTRAIL30_GNDIRECT", null, + "dvspg-VCE_VPE-mtjnj40avbc", "dvs-mtjnj-01", null, null, null, null, true, false, null, null, null, + request, stackId, new MutableBoolean()); } @Test - public void createNetworkByModelNameHeatModeCreateNetworkException() throws IOException { + public void createNetworkByModelNameHeatModeCreateNetworkException() throws IOException, NetworkException { + exception.expect(NetworkException.class); mockOpenStackResponseAccess(wireMockServer, wireMockPort); @@ -140,14 +147,20 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { mockOpenstackPost(wireMockServer, "/mockPublicUrl/stacks", HttpStatus.SC_INTERNAL_SERVER_ERROR); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = sendXMLRequest(inputStream("/CreateNetwork.xml"), uri, HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); + MsoRequest request = new MsoRequest(); + request.setRequestId("9733c8d1-2668-4e5f-8b51-2cacc9b662c0"); + request.setServiceInstanceId("MIS/1806/25009/SW_INTERNET"); + + Holder<String> stackId = new Holder<String>(); + + impl.createNetwork("mtn13", "bef254252c5d44e6bcec65c180180ab5", "CONTRAIL30_GNDIRECT", null, + "dvspg-VCE_VPE-mtjnj40avbc", "dvs-mtjnj-01", null, null, null, null, false, false, null, null, null, + request, stackId, new MutableBoolean()); } @Test - public void createNetworkByModelNameCloudSiteNotPresentError() throws IOException { + public void createNetworkByModelNameCloudSiteNotPresentError() throws IOException, NetworkException { + exception.expect(NetworkException.class); mockOpenStackResponseAccess(wireMockServer, wireMockPort); @@ -156,15 +169,20 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { mockOpenStackGetStackCreated_200(wireMockServer, "OpenstackResponse_Stack_Created.json", "dvspg-VCE_VPE-mtjnj40avbc"); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = - sendXMLRequest(inputStream("/CreateNetwork_InvalidCloudSiteId.xml"), uri, HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); + MsoRequest request = new MsoRequest(); + request.setRequestId("9733c8d1-2668-4e5f-8b51-2cacc9b662c0"); + request.setServiceInstanceId("MIS/1806/25009/SW_INTERNET"); + + Holder<String> stackId = new Holder<String>(); + + impl.createNetwork("mtn14", "bef254252c5d44e6bcec65c180180ab5", "CONTRAIL30_GNDIRECT", null, + "dvspg-VCE_VPE-mtjnj40avbc", "dvs-mtjnj-01", null, null, null, null, false, false, null, null, null, + request, stackId, new MutableBoolean()); + } @Test - public void deleteNetworkHeatModeSuccess() throws IOException { + public void deleteNetworkHeatModeSuccess() throws IOException, NetworkException { mockUpdateRequestDb(wireMockServer, "5a29d907-b8c7-47bf-85f3-3940c0cce0f7"); @@ -177,14 +195,17 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { mockOpenStackGetStackCreated_200(wireMockServer, "OpenstackResponse_Stack_Created.json", "43173f6a-d699-414b-888f-ab243dda6dfe"); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = sendXMLRequest(inputStream("/DeleteNetwork.xml"), uri, HttpMethod.POST); - assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value()); + MsoRequest request = new MsoRequest(); + request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7"); + request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0"); + + impl.deleteNetwork("mtn13", "2871503957144f72b3cf481b379828ec", "CONTRAIL30_BASIC", null, + "43173f6a-d699-414b-888f-ab243dda6dfe", request); } @Test - public void deleteNetworkDeleteStackException() throws IOException { + public void deleteNetworkDeleteStackException() throws IOException, NetworkException { + exception.expect(OpenStackResponseException.class); mockOpenStackResponseAccess(wireMockServer, wireMockPort); @@ -195,14 +216,17 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { mockOpenStackGetStackCreated_200(wireMockServer, "OpenstackResponse_Stack_Created.json", "43173f6a-d699-414b-888f-ab243dda6dfe"); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = sendXMLRequest(inputStream("/DeleteNetwork.xml"), uri, HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); + MsoRequest request = new MsoRequest(); + request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7"); + request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0"); + + impl.deleteNetwork("mtn13", "2871503957144f72b3cf481b379828ec", "CONTRAIL30_BASIC", null, + "43173f6a-d699-414b-888f-ab243dda6dfe", request); } @Test - public void deleteNetworkError() throws IOException { + public void deleteNetworkError() throws IOException, NetworkException { + exception.expect(NetworkException.class); mockOpenStackResponseAccess(wireMockServer, wireMockPort); @@ -213,31 +237,38 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { mockOpenStackGetStackCreated_200(wireMockServer, "OpenstackResponse_Stack_Created.json", "43173f6a-d699-414b-888f-ab243dda6dfe"); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = - sendXMLRequest(inputStream("/DeleteNetwork.xml").replace("mtn13", ""), uri, HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); + MsoRequest request = new MsoRequest(); + request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7"); + request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0"); + + impl.deleteNetwork("", "2871503957144f72b3cf481b379828ec", "CONTRAIL30_BASIC", null, + "43173f6a-d699-414b-888f-ab243dda6dfe", request); + } @Test - public void updateNetworkNeutronUpdateException() throws IOException { + public void updateNetworkNeutronUpdateException() throws IOException, NetworkException { + exception.expect(NetworkException.class); mockOpenStackResponseAccess(wireMockServer, wireMockPort); mockOpenStackGetNeutronNetwork(wireMockServer, "GetNeutronNetwork.json", NETWORK_ID, HttpStatus.SC_OK); mockOpenStackPutNeutronNetwork(wireMockServer, NETWORK_ID, HttpStatus.SC_INTERNAL_SERVER_ERROR); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = - sendXMLRequest(inputStream("/UpdateNetwork.xml").replace("CONTRAIL30_BASIC", "CONTRAIL31_GNDIRECT"), - uri, HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); + MsoRequest request = new MsoRequest(); + request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7"); + request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0"); + + Holder<String> stackId = new Holder<String>(); + + impl.updateNetwork("mtn13", "2871503957144f72b3cf481b379828ec", "CONTRAIL31_GNDIRECT", null, + "43173f6a-d699-414b-888f-ab243dda6dfe", "vUSP-23804-T-01-dpa2b_EVUSP-CORE-VIF-TSIG0_net_0", + "TestPhysicalNetwork", null, null, null, null, null, null, null, request, stackId); } @Test - public void updateNetworkHeatUpdateException() throws IOException { + public void updateNetworkHeatUpdateException() throws IOException, NetworkException { + exception.expect(NetworkException.class); mockOpenStackResponseAccess(wireMockServer, wireMockPort); @@ -245,113 +276,95 @@ public class MSONetworkAdapterImplTest extends BaseRestTestUtils { mockOpenStackPutStack(wireMockServer, NETWORK_ID, HttpStatus.SC_INTERNAL_SERVER_ERROR); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = sendXMLRequest(inputStream("/UpdateNetwork.xml"), uri, HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); + MsoRequest request = new MsoRequest(); + request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7"); + request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0"); + + Holder<String> stackId = new Holder<String>(); + + impl.updateNetwork("mtn13", "2871503957144f72b3cf481b379828ec", "CONTRAIL30_BASIC", null, + "43173f6a-d699-414b-888f-ab243dda6dfe", "vUSP-23804-T-01-dpa2b_EVUSP-CORE-VIF-TSIG0_net_0", + "TestPhysicalNetwork", null, null, null, null, null, null, null, request, stackId); + } @Test - public void updateNetworkHeatQueryException() throws IOException { + public void updateNetworkHeatQueryException() throws IOException, NetworkException { + exception.expect(NetworkException.class); mockOpenStackResponseAccess(wireMockServer, wireMockPort); mockOpenStackGetStack_500(wireMockServer, NETWORK_NAME); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = sendXMLRequest(inputStream("/UpdateNetwork.xml"), uri, HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); + MsoRequest request = new MsoRequest(); + request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7"); + request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0"); + + Holder<String> stackId = new Holder<String>(); + + impl.updateNetwork("mtn13", "2871503957144f72b3cf481b379828ec", "CONTRAIL30_BASIC", null, + "43173f6a-d699-414b-888f-ab243dda6dfe", "vUSP-23804-T-01-dpa2b_EVUSP-CORE-VIF-TSIG0_net_0", + "TestPhysicalNetwork", null, null, null, null, null, null, null, request, stackId); } @Test - public void updateNetworkHeatStackNotFound() throws IOException { + public void updateNetworkHeatStackNotFound() throws IOException, NetworkException { + exception.expect(NetworkException.class); mockOpenStackResponseAccess(wireMockServer, wireMockPort); mockOpenStackGetStack_404(wireMockServer, NETWORK_NAME); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = sendXMLRequest(inputStream("/UpdateNetwork.xml"), uri, HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); - } - - @Test - public void updateNetworkNeutronQueryException() throws IOException { + MsoRequest request = new MsoRequest(); + request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7"); + request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0"); - mockOpenStackResponseAccess(wireMockServer, wireMockPort); + Holder<String> stackId = new Holder<String>(); - mockOpenStackGetNeutronNetwork(wireMockServer, NETWORK_ID, HttpStatus.SC_INTERNAL_SERVER_ERROR); - - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = - sendXMLRequest(inputStream("/UpdateNetwork.xml").replace("CONTRAIL30_BASIC", "CONTRAIL31_GNDIRECT"), - uri, HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); + impl.updateNetwork("mtn13", "2871503957144f72b3cf481b379828ec", "CONTRAIL30_BASIC", null, + "43173f6a-d699-414b-888f-ab243dda6dfe", "vUSP-23804-T-01-dpa2b_EVUSP-CORE-VIF-TSIG0_net_0", + "TestPhysicalNetwork", null, null, null, null, null, null, null, request, stackId); } @Test - public void updateNetworkNeutronStackNotFound() throws IOException { + public void updateNetworkNeutronQueryException() throws IOException, NetworkException { + exception.expect(NetworkException.class); mockOpenStackResponseAccess(wireMockServer, wireMockPort); - mockOpenStackGetNeutronNetwork(wireMockServer, NETWORK_ID, HttpStatus.SC_NOT_FOUND); - - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = - sendXMLRequest(inputStream("/UpdateNetwork.xml").replace("CONTRAIL30_BASIC", "CONTRAIL31_GNDIRECT"), - uri, HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); - } - - @Test - public void queryNetworkHeatModesuccess() throws IOException { + mockOpenStackGetNeutronNetwork(wireMockServer, NETWORK_ID, HttpStatus.SC_INTERNAL_SERVER_ERROR); - mockOpenStackResponseAccess(wireMockServer, wireMockPort); + MsoRequest request = new MsoRequest(); + request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7"); + request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0"); - mockOpenStackGetStackCreated_200(wireMockServer, "OpenstackResponse_Stack_Created.json", NETWORK_ID); + Holder<String> stackId = new Holder<String>(); - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = - sendXMLRequest(inputStream("/QueryNetwork.xml").replace("CONTRAIL30_BASIC", "CONTRAIL31_GNDIRECT"), uri, - HttpMethod.POST); - assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value()); + impl.updateNetwork("mtn13", "2871503957144f72b3cf481b379828ec", "CONTRAIL31_GNDIRECT", null, + "43173f6a-d699-414b-888f-ab243dda6dfe", "vUSP-23804-T-01-dpa2b_EVUSP-CORE-VIF-TSIG0_net_0", + "TestPhysicalNetwork", null, null, null, null, null, null, null, request, stackId); } @Test - public void queryNetworkHeatModeQueryException() throws IOException { + public void updateNetworkNeutronStackNotFound() throws IOException, NetworkException { + exception.expect(NetworkException.class); mockOpenStackResponseAccess(wireMockServer, wireMockPort); - mockOpenStackGetStack_500(wireMockServer, NETWORK_ID); - - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = - sendXMLRequest(inputStream("/QueryNetwork.xml").replace("CONTRAIL30_BASIC", "CONTRAIL31_GNDIRECT"), uri, - HttpMethod.POST); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); - } + mockOpenStackGetNeutronNetwork(wireMockServer, NETWORK_ID, HttpStatus.SC_NOT_FOUND); - @Test - public void queryNetworkNeutronModeSuccess() throws IOException { + MsoRequest request = new MsoRequest(); + request.setRequestId("5a29d907-b8c7-47bf-85f3-3940c0cce0f7"); + request.setServiceInstanceId("ab652f96-1fc3-4fdd-8e1b-4af629bc22c0"); - mockOpenStackResponseAccess(wireMockServer, wireMockPort); + Holder<String> stackId = new Holder<String>(); - mockOpenStackGetNeutronNetwork(wireMockServer, "GetNeutronNetwork.json", NETWORK_ID, HttpStatus.SC_OK); - - String uri = "/services/NetworkAdapter"; - headers.set("X-ECOMP-RequestID", "123456789456127"); - ResponseEntity<String> response = - sendXMLRequest(inputStream("/QueryNetwork.xml").replace("CONTRAIL30_BASIC", "CONTRAIL31_GNDIRECT"), uri, - HttpMethod.POST); - assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value()); + impl.updateNetwork("mtn13", "2871503957144f72b3cf481b379828ec", "CONTRAIL31_GNDIRECT", null, + "43173f6a-d699-414b-888f-ab243dda6dfe", "vUSP-23804-T-01-dpa2b_EVUSP-CORE-VIF-TSIG0_net_0", + "TestPhysicalNetwork", null, null, null, null, null, null, null, request, stackId); } + public ResponseEntity<String> sendXMLRequest(String requestJson, String uriPath, HttpMethod reqMethod) { headers.set("Accept", MediaType.APPLICATION_XML); headers.set("Content-Type", MediaType.APPLICATION_XML); diff --git a/adapters/mso-requests-db-adapter/pom.xml b/adapters/mso-requests-db-adapter/pom.xml index 09e2cc26d7..45acf2484d 100644 --- a/adapters/mso-requests-db-adapter/pom.xml +++ b/adapters/mso-requests-db-adapter/pom.xml @@ -19,7 +19,7 @@ </dependency> <dependency> <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-service-description-swagger</artifactId> + <artifactId>cxf-rt-rs-service-description-openapi-v3</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/CXFConfiguration.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/CXFConfiguration.java index 06d75befd9..2325ffaa14 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/CXFConfiguration.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/application/CXFConfiguration.java @@ -20,10 +20,12 @@ package org.onap.so.adapters.requestsdb.application; +import java.util.Arrays; +import java.util.HashSet; import javax.xml.ws.Endpoint; import org.apache.cxf.Bus; import org.apache.cxf.feature.LoggingFeature; -import org.apache.cxf.jaxrs.swagger.Swagger2Feature; +import org.apache.cxf.jaxrs.openapi.OpenApiFeature; import org.apache.cxf.jaxws.EndpointImpl; import org.apache.cxf.transport.servlet.CXFServlet; import org.onap.so.adapters.requestsdb.MsoRequestsDbAdapter; @@ -65,16 +67,16 @@ public class CXFConfiguration { } @Bean - public Swagger2Feature createSwaggerFeature() { - Swagger2Feature swagger2Feature = new Swagger2Feature(); - swagger2Feature.setPrettyPrint(true); - swagger2Feature.setTitle("SO Request Adapter"); - swagger2Feature.setContact("The ONAP SO team"); - swagger2Feature.setDescription("This project is the SO Orchestration Engine"); - swagger2Feature.setVersion("1.0.0"); - swagger2Feature.setResourcePackage("org.onap.so.adapters.requestdb"); - swagger2Feature.setScan(true); - return swagger2Feature; + public OpenApiFeature createSwaggerFeature() { + OpenApiFeature openApiFeature = new OpenApiFeature(); + openApiFeature.setPrettyPrint(true); + openApiFeature.setTitle("SO Request Adapter"); + openApiFeature.setContactName("The ONAP SO team"); + openApiFeature.setDescription("This project is the SO Orchestration Engine"); + openApiFeature.setVersion("1.0.0"); + openApiFeature.setResourcePackages(new HashSet<String>(Arrays.asList("org.onap.so.adapters.requestdb"))); + openApiFeature.setScan(true); + return openApiFeature; } } diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java index 09fea0644e..33805f9faa 100644 --- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java @@ -26,6 +26,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import java.sql.Timestamp; import java.time.Instant; import java.time.temporal.ChronoUnit; @@ -331,4 +332,14 @@ public class RequestsDbClientTest extends RequestsAdapterBase { List<InfraActiveRequests> infraActiveRequests = requestsDbClient.getInProgressVolumeGroupsAndVfModules(); assertThat(request, sameBeanAs(infraActiveRequests.get(0)).ignoring("modifyTime")); } + + @Test + public void getRequestProcessingDataBySoRequestIdAndNameAndTag() { + List<RequestProcessingData> requestProcessingData = + requestsDbClient.getRequestProcessingDataBySoRequestIdAndNameAndTagOrderByCreateTimeDesc( + "00032ab7-na18-42e5-965d-8ea592502018", "requestAction", "pincFabricConfigRequest"); + assertNotNull(requestProcessingData); + assertTrue(requestProcessingData.size() == 1); + assertEquals("assign", requestProcessingData.get(0).getValue()); + } } diff --git a/adapters/mso-sdnc-adapter/pom.xml b/adapters/mso-sdnc-adapter/pom.xml index 358b14e37a..62ba731873 100644 --- a/adapters/mso-sdnc-adapter/pom.xml +++ b/adapters/mso-sdnc-adapter/pom.xml @@ -132,8 +132,8 @@ </dependencyManagement> <dependencies> <dependency> - <groupId>io.swagger</groupId> - <artifactId>swagger-jersey2-jaxrs</artifactId> + <groupId>io.swagger.core.v3</groupId> + <artifactId>swagger-jaxrs2</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -159,7 +159,7 @@ </dependency> <dependency> <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-service-description-swagger</artifactId> + <artifactId>cxf-rt-rs-service-description-openapi-v3</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java index dd1da98dd8..65eb39d019 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java @@ -21,12 +21,13 @@ package org.onap.so.adapters.sdnc; import java.util.Arrays; +import java.util.HashSet; import javax.xml.ws.Endpoint; import org.apache.cxf.Bus; import org.apache.cxf.endpoint.Server; import org.apache.cxf.feature.LoggingFeature; import org.apache.cxf.jaxrs.JAXRSServerFactoryBean; -import org.apache.cxf.jaxrs.swagger.Swagger2Feature; +import org.apache.cxf.jaxrs.openapi.OpenApiFeature; import org.apache.cxf.jaxws.EndpointImpl; import org.apache.cxf.transport.servlet.CXFServlet; import org.onap.so.adapters.sdnc.sdncrest.SNIROResponse; @@ -91,16 +92,15 @@ public class CXFConfiguration { @Bean - public Swagger2Feature createSwaggerFeature() { - Swagger2Feature swagger2Feature = new Swagger2Feature(); - swagger2Feature.setBasePath("/services/rest"); - swagger2Feature.setPrettyPrint(true); - swagger2Feature.setTitle("SO Orchestration Application"); - swagger2Feature.setContact("The ONAP SO team"); - swagger2Feature.setDescription("This project is the SO Orchestration Engine"); - swagger2Feature.setVersion("1.0.0"); - swagger2Feature.setResourcePackage("org.onap.so.adapters.sdnc"); - swagger2Feature.setScan(true); - return swagger2Feature; + public OpenApiFeature createSwaggerFeature() { + OpenApiFeature openApiFeature = new OpenApiFeature(); + openApiFeature.setPrettyPrint(true); + openApiFeature.setTitle("SO Orchestration Application"); + openApiFeature.setContactName("The ONAP SO team"); + openApiFeature.setDescription("This project is the SO Orchestration Engine"); + openApiFeature.setVersion("1.0.0"); + openApiFeature.setResourcePackages(new HashSet<String>(Arrays.asList("org.onap.so.adapters.sdnc"))); + openApiFeature.setScan(true); + return openApiFeature; } } |