diff options
10 files changed, 405 insertions, 239 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java index 7174bc0e31..28d4f3f9b4 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java @@ -31,8 +31,8 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; +import java.util.regex.Matcher; import java.util.regex.Pattern; -import java.util.stream.Collectors; import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.onap.so.adapters.vdu.CloudInfo; import org.onap.so.adapters.vdu.PluginAction; @@ -79,7 +79,6 @@ import com.woorea.openstack.base.client.OpenStackResponseException; import com.woorea.openstack.heat.Heat; import com.woorea.openstack.heat.model.CreateStackParam; import com.woorea.openstack.heat.model.Events; -import com.woorea.openstack.heat.model.Resource; import com.woorea.openstack.heat.model.Resources; import com.woorea.openstack.heat.model.Stack; import com.woorea.openstack.heat.model.Stack.Output; @@ -405,17 +404,15 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin { protected Stack handleKeyPairConflict(String cloudSiteId, String tenantId, CreateStackParam stackCreate, int timeoutMinutes, boolean backout, Stack stack) throws MsoException { logger.info("Keypair conflict found on stack, attempting to clean up"); - - Resources resources = queryStackResources(cloudSiteId, tenantId, stackCreate.getStackName(), 2); - List<Resource> keyPairs = resources.getList().stream() - .filter(p -> "OS::Nova::KeyPair".equalsIgnoreCase(p.getType())).collect(Collectors.toList()); - keyPairs.stream().forEach(keyPair -> { - try { - novaClient.deleteKeyPair(cloudSiteId, tenantId, keyPair.getLogicalResourceId()); - } catch (MsoCloudSiteNotFound | NovaClientException e) { - logger.warn("Could not delete keypair", e); + try { + Matcher m = Pattern.compile("'([^']+?)'").matcher(stack.getStackStatusReason()); + if (m.find()) { + novaClient.deleteKeyPair(cloudSiteId, tenantId, m.group(1)); } - }); + } catch (NovaClientException e) { + logger.warn("Could not delete keypair", e); + } + handleUnknownCreateStackFailure(stack, timeoutMinutes, cloudSiteId, tenantId); Stack newStack = createStack(stackCreate, cloudSiteId, tenantId); newStack.setStackName(stackCreate.getStackName()); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java index de55e85ad6..687b7d8d2f 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java @@ -33,9 +33,7 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.times; import java.io.IOException; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import org.junit.Before; import org.junit.Rule; @@ -60,7 +58,6 @@ import com.woorea.openstack.heat.StackResource; import com.woorea.openstack.heat.StackResource.CreateStack; import com.woorea.openstack.heat.StackResource.DeleteStack; import com.woorea.openstack.heat.model.CreateStackParam; -import com.woorea.openstack.heat.model.Resource; import com.woorea.openstack.heat.model.Resources; import com.woorea.openstack.heat.model.Stack; @@ -320,19 +317,9 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { createdStack.setStackStatus("CREATE_COMPLETE"); createdStack.setStackStatusReason("Stack Created"); - - - List<Resource> resources = new ArrayList<>(); - Resource resource = new Resource(); - resource.setName("KeypairName"); - resource.setLogicalResourceId("KeypairName"); - resource.setType("OS::Nova::KeyPair"); - resources.add(resource); - CreateStackParam createStackParam = new CreateStackParam(); createStackParam.setStackName("stackName"); - doReturn(resources).when(mockResources).getList(); doReturn(mockResources).when(heatUtils).queryStackResources(cloudSiteId, tenantId, "stackName", 2); doNothing().when(novaClient).deleteKeyPair(cloudSiteId, tenantId, "KeypairName"); doReturn(null).when(heatUtils).handleUnknownCreateStackFailure(stack, 120, cloudSiteId, tenantId); @@ -341,8 +328,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { createStackParam, false); heatUtils.handleKeyPairConflict(cloudSiteId, tenantId, createStackParam, 120, true, stack); - Mockito.verify(heatUtils, times(1)).queryStackResources(cloudSiteId, tenantId, "stackName", 2); - Mockito.verify(novaClient, times(1)).deleteKeyPair(cloudSiteId, tenantId, "KeypairName"); + Mockito.verify(novaClient, times(1)).deleteKeyPair(cloudSiteId, tenantId, "hst3bbfnm0011vm001"); Mockito.verify(heatUtils, times(1)).handleUnknownCreateStackFailure(stack, 120, cloudSiteId, tenantId); Mockito.verify(heatUtils, times(1)).createStack(createStackParam, cloudSiteId, tenantId); Mockito.verify(heatUtils, times(1)).processCreateStack(cloudSiteId, tenantId, 120, true, createdStack, diff --git a/common/pom.xml b/common/pom.xml index 316cad1da7..4490b63c3b 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -20,10 +20,6 @@ <dependencies> <dependency> - <groupId>hikari-cp</groupId> - <artifactId>hikari-cp</artifactId> - </dependency> - <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> @@ -144,7 +140,10 @@ <artifactId>reflections</artifactId> <version>0.9.11</version> </dependency> - + <dependency> + <groupId>com.zaxxer</groupId> + <artifactId>HikariCP</artifactId> + </dependency> <!-- CDS dependencies --> <dependency> <groupId>org.onap.ccsdk.cds.components</groupId> @@ -189,6 +188,17 @@ </dependency> </dependencies> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-dependencies</artifactId> + <version>${springboot.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> <build> <resources> <resource> diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestStatus.java b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestStatus.java index f659ae241a..e9d9d87b10 100644 --- a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestStatus.java +++ b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestStatus.java @@ -36,6 +36,16 @@ public class RequestStatus { protected Integer percentProgress; @JsonProperty("timestamp") protected String timeStamp; + @JsonProperty("extSystemErrorSource") + protected String extSystemErrorSource; + + public String getExtSystemErrorSource() { + return extSystemErrorSource; + } + + public void setExtSystemErrorSource(String extSystemErrorSource) { + this.extSystemErrorSource = extSystemErrorSource; + } public String getRequestState() { return requestState; @@ -72,6 +82,7 @@ public class RequestStatus { @Override public String toString() { return new ToStringBuilder(this).append("requestState", requestState).append("statusMessage", statusMessage) - .append("percentProgress", percentProgress).append("timestamp", timeStamp).toString(); + .append("percentProgress", percentProgress).append("timestamp", timeStamp) + .append("extSystemErrorSource", extSystemErrorSource).toString(); } } diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 8d5f5727b6..cdb20c246b 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -8,28 +8,27 @@ Service Orchestrator Release Notes The SO provides the highest level of service orchestration in the ONAP architecture. -Version: 1.4.3 -============== +Version: 1.4.4 +----------------------- -:Release Date: 2019-06-06 +:Release Date: 2019-06-13 -Docker Images -------------- +**Docker Images** **Dockers released for SO:** - - onap/so/api-handler-infra,1.4.3 - - onap/so/bpmn-infra,1.4.3 - - onap/so/catalog-db-adapter,1.4.3 - - onap/so/openstack-adapter,1.4.3 - - onap/so/request-db-adapter,1.4.3 - - onap/so/sdc-controller,1.4.3 - - onap/so/sdnc-adapter,1.4.3 - - onap/so/so-monitoring,1.4.3 - - onap/so/vfc-adapter,1.4.3 + - onap/so/api-handler-infra,1.4.4 + - onap/so/bpmn-infra,1.4.4 + - onap/so/catalog-db-adapter,1.4.4 + - onap/so/openstack-adapter,1.4.4 + - onap/so/request-db-adapter,1.4.4 + - onap/so/sdc-controller,1.4.4 + - onap/so/sdnc-adapter,1.4.4 + - onap/so/so-monitoring,1.4.4 + - onap/so/vfc-adapter,1.4.4 + +**Release Purpose** -Release Purpose ----------------- **New Features** @@ -55,163 +54,162 @@ The main goal of the Dublin release was to: **Stories** -- [`SO-1974 <https://jira.onap.org/browse/SO-1974`__ ] - Turn off OpenStack heat stack audit -- [`SO-1924 <https://jira.onap.org/browse/SO-1924`__ ] - Add VnfConfigUpdate to the list of native CM workflows returned to VID -- [`SO-1820 <https://jira.onap.org/browse/SO-1820`__ ] - Add Model Version Query -- [`SO-1806 <https://jira.onap.org/browse/SO-1806`__ ] - Fix issue where null variable causes task to not -- [`SO-1793 <https://jira.onap.org/browse/SO-1793`__ ] - add status for delete -- [`SO-1792 <https://jira.onap.org/browse/SO-1792`__ ] - add status message requirement for create vf module event audit -- [`SO-1791 <https://jira.onap.org/browse/SO-1791`__ ] - Moved base client to new location -- [`SO-1790 <https://jira.onap.org/browse/SO-1790`__ ] - Enhanced sniro BB to account for sole service proxies to support 1908. -- [`SO-1765 <https://jira.onap.org/browse/SO-1765`__ ] - Convert Tabs to Spaces -- [`SO-1760 <https://jira.onap.org/browse/SO-1760`__ ] - Add Query param to pull back nested stack information -- [`SO-1758 <https://jira.onap.org/browse/SO-1758`__ ] - Fix POM to allow HTTP long polling to work on camunda -- [`SO-1749 <https://jira.onap.org/browse/SO-1749`__ ] - re add openstack audit of delete functions after refactor -- [`SO-1748 <https://jira.onap.org/browse/SO-1748`__ ] - Add support to parse cdl inside LOB and platform -- [`SO-1737 <https://jira.onap.org/browse/SO-1737`__ ] - if audit fails write sub interface data to a ai -- [`SO-1729 <https://jira.onap.org/browse/SO-1729`__ ] - Monitor Job Status-Delete -- [`SO-1687 <https://jira.onap.org/browse/SO-1687`__ ] - removed unused test classes and methods -- [`SO-1678 <https://jira.onap.org/browse/SO-1678`__ ] - removed extra argument from extractByKey method -- [`SO-1676 <https://jira.onap.org/browse/SO-1676`__ ] - replace all fixed wiremock ports -- [`SO-1671 <https://jira.onap.org/browse/SO-1671`__ ] - skip_post_instantiation_configuration schema and tosca ingestion -- [`SO-1657 <https://jira.onap.org/browse/SO-1657`__ ] - Automated testing for the SO Monitoring component -- [`SO-1648 <https://jira.onap.org/browse/SO-1648`__ ] - Increasing the test coverage of SO-Monitoring UI -- [`SO-1634 <https://jira.onap.org/browse/SO-1634`__ ] - Notification Handling - Terminate -- [`SO-1633 <https://jira.onap.org/browse/SO-1633`__ ] - Terminate VNF (with SVNFM interaction) -- [`SO-1632 <https://jira.onap.org/browse/SO-1632`__ ] - Handle VNF delete and termination (without SVNFM integration) -- [`SO-1630 <https://jira.onap.org/browse/SO-1630`__ ] - Monitor Job Status-Create -- [`SO-1629 <https://jira.onap.org/browse/SO-1629`__ ] - Notification Handling - Instantiate -- [`SO-1628 <https://jira.onap.org/browse/SO-1628`__ ] - Handle Notification Subscription -- [`SO-1627 <https://jira.onap.org/browse/SO-1627`__ ] - Create relationship between esr-vnfm and generic-vnf in AAI -- [`SO-1626 <https://jira.onap.org/browse/SO-1626`__ ] - Monitor Node Status -- [`SO-1625 <https://jira.onap.org/browse/SO-1625`__ ] - Handle Grant Request (Without Homing/OOF) -- [`SO-1624 <https://jira.onap.org/browse/SO-1624`__ ] - Instantiate VNF (with SVNFM Interaction) -- [`SO-1623 <https://jira.onap.org/browse/SO-1623`__ ] - Handle Create VNF request in VNFM adapter -- [`SO-1622 <https://jira.onap.org/browse/SO-1622`__ ] - Check for existing VNF (with SVNFM Interaction) -- [`SO-1621 <https://jira.onap.org/browse/SO-1621`__ ] - Create placeholder implementation for create VNF (without SVNFM interaction) -- [`SO-1620 <https://jira.onap.org/browse/SO-1620`__ ] - Create Shell Adapter -- [`SO-1619 <https://jira.onap.org/browse/SO-1619`__ ] - Create SO VNFM Adapter Northbound Interface using Swagger -- [`SO-1618 <https://jira.onap.org/browse/SO-1618`__ ] - SVNFM Simulator -- [`SO-1616 <https://jira.onap.org/browse/SO-1616`__ ] - Add instance group support to SO -- [`SO-1604 <https://jira.onap.org/browse/SO-1604`__ ] - SO Catalog Enhancement to support CDS Meta Data for VNF/PNF and PNF Tosca Ingestion -- [`SO-1598 <https://jira.onap.org/browse/SO-1598`__ ] - add equals and hashcode support to dslquerybuilder -- [`SO-1597 <https://jira.onap.org/browse/SO-1597`__ ] - improvements to audit inventory feature -- [`SO-1596 <https://jira.onap.org/browse/SO-1596`__ ] - query clients now have more useable result methods -- [`SO-1590 <https://jira.onap.org/browse/SO-1590`__ ] - skip cloud region validation for 1906 -- [`SO-1589 <https://jira.onap.org/browse/SO-1589`__ ] - flow validators can now be skipped via an annotation -- [`SO-1582 <https://jira.onap.org/browse/SO-1582`__ ] - vnf spin up gr api vnf s base module fails -- [`SO-1573 <https://jira.onap.org/browse/SO-1573`__ ] - Abstract for CDS Implementation -- [`SO-1569 <https://jira.onap.org/browse/SO-1569`__ ] - do not attempt to commit empty transactions -- [`SO-1538 <https://jira.onap.org/browse/SO-1538`__ ] - Integration Test for SO VNFM Adapter - Perform the functional test to validate VNFM Adapter NBI and SOL003-based SBI -- [`SO-1534 <https://jira.onap.org/browse/SO-1534`__ ] - Create Pre Building Block validator to check if cloud-region orchestration-disabled is true -- [`SO-1533 <https://jira.onap.org/browse/SO-1533`__ ] - flowvaldiator will allow more flexible filtering -- [`SO-1512 <https://jira.onap.org/browse/SO-1512`__ ] - Added Camunda migration scripts and updated camunda springboot version -- [`SO-1506 <https://jira.onap.org/browse/SO-1506`__ ] - E2E Automation - Extend PNF workflow with post-instantiation configuration -- [`SO-1501 <https://jira.onap.org/browse/SO-1501`__ ] - add new functionality to aai client -- [`SO-1495 <https://jira.onap.org/browse/SO-1495`__ ] - made max retries configurable via mso config repo -- [`SO-1493 <https://jira.onap.org/browse/SO-1493`__ ] - restructure a&ai client -- [`SO-1487 <https://jira.onap.org/browse/SO-1487`__ ] - added license headers to various java files -- [`SO-1485 <https://jira.onap.org/browse/SO-1485`__ ] - add DSL endpoint support to A&AI Client -- [`SO-1483 <https://jira.onap.org/browse/SO-1483`__ ] - SO to support a new GRPC client for container to container communication -- [`SO-1482 <https://jira.onap.org/browse/SO-1482`__ ] - SO Generic Building Block to support config deploy action for CONFIGURE Step -- [`SO-1481 <https://jira.onap.org/browse/SO-1481`__ ] - Generic Bulding block for assign shall trigger controller for config assign action -- [`SO-1477 <https://jira.onap.org/browse/SO-1477`__ ] - AAF support for SO -- [`SO-1476 <https://jira.onap.org/browse/SO-1476`__ ] - Do not process vf module being created when building an index -- [`SO-1475 <https://jira.onap.org/browse/SO-1475`__ ] - store raw distribution notification in db -- [`SO-1474 <https://jira.onap.org/browse/SO-1474`__ ] - Test Issue -- [`SO-1469 <https://jira.onap.org/browse/SO-1469`__ ] - Refactor OOF Homing to Java -- [`SO-1462 <https://jira.onap.org/browse/SO-1462`__ ] - Clean up AT&T Acronyms from Unit tests for audit -- [`SO-1459 <https://jira.onap.org/browse/SO-1459`__ ] - add maven build properties to spring actuator -- [`SO-1456 <https://jira.onap.org/browse/SO-1456`__ ] - prototype fetching resources from openstack and compare to a ai -- [`SO-1452 <https://jira.onap.org/browse/SO-1452`__ ] - added list of flows to execution for cockpit -- [`SO-1451 <https://jira.onap.org/browse/SO-1451`__ ] - Updated the SDC API call with the ECOMP OE from AAI -- [`SO-1450 <https://jira.onap.org/browse/SO-1450`__ ] - support for secure communications between SO and Multicloud -- [`SO-1447 <https://jira.onap.org/browse/SO-1447`__ ] - Refine multicloud use of SO cloudsites and identify DB -- [`SO-1446 <https://jira.onap.org/browse/SO-1446`__ ] - Multicloud API updates for generic clouds -- [`SO-1445 <https://jira.onap.org/browse/SO-1445`__ ] - Multicloud support for volume groups and networks -- [`SO-1444 <https://jira.onap.org/browse/SO-1444`__ ] - AAI update after vfmodule creation -- [`SO-1443 <https://jira.onap.org/browse/SO-1443`__ ] - Prepare user_directives for multicloud API -- [`SO-1442 <https://jira.onap.org/browse/SO-1442`__ ] - Prepare sdnc_directives for multicloud API -- [`SO-1441 <https://jira.onap.org/browse/SO-1441`__ ] - Handle distribution of service with generic cloud artifacts -- [`SO-1436 <https://jira.onap.org/browse/SO-1436`__ ] - removed unnecessary repository from pom.xml -- [`SO-1432 <https://jira.onap.org/browse/SO-1432`__ ] - duplicate add custom object support to a ai client -- [`SO-1431 <https://jira.onap.org/browse/SO-1431`__ ] - Test issue 1 -- [`SO-1429 <https://jira.onap.org/browse/SO-1429`__ ] - add custom object support to a ai client -- [`SO-1427 <https://jira.onap.org/browse/SO-1427`__ ] - Fix to include alloc pool from dhcpStart/end on reqs -- [`SO-1426 <https://jira.onap.org/browse/SO-1426`__ ] - Upgraded tosca parser to version 1.4.8 and updated imports -- [`SO-1425 <https://jira.onap.org/browse/SO-1425`__ ] - Re-Factor DMAAP Credentials to use encrypted auth -- [`SO-1421 <https://jira.onap.org/browse/SO-1421`__ ] - Support for SO->ExtAPI interface/API -- [`SO-1414 <https://jira.onap.org/browse/SO-1414`__ ] - update all inprogress checks in apih handler -- [`SO-1413 <https://jira.onap.org/browse/SO-1413`__ ] - replaced org.mockito.Matchers with ArgumentMatchers -- [`SO-1411 <https://jira.onap.org/browse/SO-1411`__ ] - Test Issue -- [`SO-1409 <https://jira.onap.org/browse/SO-1409`__ ] - added in validation for number of keys provided -- [`SO-1405 <https://jira.onap.org/browse/SO-1405`__ ] - apih infra shall ensure data for si matches on macro requests -- [`SO-1404 <https://jira.onap.org/browse/SO-1404`__ ] - covert sync calls for create and delete network to async -- [`SO-1395 <https://jira.onap.org/browse/SO-1395`__ ] - E2E Automation - PreInstatition and PostInstatition use cases -- [`SO-1389 <https://jira.onap.org/browse/SO-1389`__ ] - added mso-request-id when calling SDNCHandler subflow -- [`SO-1388 <https://jira.onap.org/browse/SO-1388`__ ] - descriptive messages now returned by validator -- [`SO-1387 <https://jira.onap.org/browse/SO-1387`__ ] - naming ms client fixes -- [`SO-1385 <https://jira.onap.org/browse/SO-1385`__ ] - removed retired A&AI versions from codebase -- [`SO-1384 <https://jira.onap.org/browse/SO-1384`__ ] - sdnc handler was not sending workflow exception upwards -- [`SO-1383 <https://jira.onap.org/browse/SO-1383`__ ] - refactored validator to be more generic -- [`SO-1381 <https://jira.onap.org/browse/SO-1381`__ ] - Quality of Life logging improvements -- [`SO-1380 <https://jira.onap.org/browse/SO-1380`__ ] - Service Proxy Consolidation -- [`SO-1379 <https://jira.onap.org/browse/SO-1379`__ ] - Add validation for vnfs before WorkflowAction starts -- [`SO-1378 <https://jira.onap.org/browse/SO-1378`__ ] - get subnet sequence number from A&AI -- [`SO-1377 <https://jira.onap.org/browse/SO-1377`__ ] - Re-enable Actuator for Springboot 2.0 -- [`SO-1376 <https://jira.onap.org/browse/SO-1376`__ ] - Created sniro request pojos for homingV2 flow -- [`SO-1370 <https://jira.onap.org/browse/SO-1370`__ ] - Preparation for next scale-out after successful instantiation of the current scale-out operation -- [`SO-1369 <https://jira.onap.org/browse/SO-1369`__ ] - Processing of configuration parameters during instantiation and scale-out -- [`SO-1368 <https://jira.onap.org/browse/SO-1368`__ ] - VNF Health check during scale-out to be made as a separate workflow -- [`SO-1367 <https://jira.onap.org/browse/SO-1367`__ ] - Invoke the APP-C service configuration API after E2E Service instantiation -- [`SO-1366 <https://jira.onap.org/browse/SO-1366`__ ] - SO Workflow need to call configure API during instantiation -- [`SO-1362 <https://jira.onap.org/browse/SO-1362`__ ] - Changed the MDC sourcing from LoggingInterceptor to JaxRsFilterLogging. -- [`SO-1346 <https://jira.onap.org/browse/SO-1346`__ ] - Use SLF4J/Logback, instead of Log4J -- [`SO-1307 <https://jira.onap.org/browse/SO-1307`__ ] - Add Headers -- [`SO-1295 <https://jira.onap.org/browse/SO-1295`__ ] - Update SDNC client Version in POM -- [`SO-1293 <https://jira.onap.org/browse/SO-1293`__ ] - Vnf Recreate -- [`SO-1290 <https://jira.onap.org/browse/SO-1290`__ ] - Update orchestrationrequest response -- [`SO-1288 <https://jira.onap.org/browse/SO-1288`__ ] - Enhance GRM Clients to use encrypted auth loading -- [`SO-1287 <https://jira.onap.org/browse/SO-1287`__ ] - Change all SDNC Calls in GR_API -- [`SO-1284 <https://jira.onap.org/browse/SO-1284`__ ] - Create Relationship between Vnf and Tenant -- [`SO-1283 <https://jira.onap.org/browse/SO-1283`__ ] - Fix GR_API cloud info retrieval -- [`SO-1282 <https://jira.onap.org/browse/SO-1282`__ ] - Update Alacarte Logic for Recreate Flow -- [`SO-1279 <https://jira.onap.org/browse/SO-1279`__ ] - Replaced the VNFC hardcoded Function -- [`SO-1278 <https://jira.onap.org/browse/SO-1278`__ ] - Move all ecomp.mso properties to org.onap.so -- [`SO-1276 <https://jira.onap.org/browse/SO-1276`__ ] - Add Cloud_Owner to northbound request table -- [`SO-1275 <https://jira.onap.org/browse/SO-1275`__ ] - Resolve path issues -- [`SO-1274 <https://jira.onap.org/browse/SO-1274`__ ] - CreateAndUpdatePNFResource workflow:: Associate PNF instance -- [`SO-1272 <https://jira.onap.org/browse/SO-1272`__ ] - Use UUID to fill pnf-id in PNF PnP sub-flow -- [`SO-1270 <https://jira.onap.org/browse/SO-1270`__ ] - Add New A&AI objects -- [`SO-1269 <https://jira.onap.org/browse/SO-1269`__ ] - Add serviceRole to MSO SNIRO Interface -- [`SO-1260 <https://jira.onap.org/browse/SO-1260`__ ] - Add support for naming service -- [`SO-1233 <https://jira.onap.org/browse/SO-1233`__ ] - Added service role to sniro request when not null -- [`SO-1232 <https://jira.onap.org/browse/SO-1232`__ ] - Switch to SpringAutoDeployment rather than processes.xml -- [`SO-1229 <https://jira.onap.org/browse/SO-1229`__ ] - Remove all usage of AlarmLogger -- [`SO-1228 <https://jira.onap.org/browse/SO-1228`__ ] - Limit Number of Occurs for security reasons -- [`SO-1227 <https://jira.onap.org/browse/SO-1227`__ ] - Remove Swagger UI due to security scan concerns -- [`SO-1226 <https://jira.onap.org/browse/SO-1226`__ ] - changed assign vnf sdnc to use the async subflow -- [`SO-1225 <https://jira.onap.org/browse/SO-1225`__ ] - Add Keystone V3 Support -- [`SO-1207 <https://jira.onap.org/browse/SO-1207`__ ] - accept a la carte create instance group request from vid -- [`SO-1206 <https://jira.onap.org/browse/SO-1206`__ ] - Added groupInstanceId and groupInstanceName columns -- [`SO-1205 <https://jira.onap.org/browse/SO-1205`__ ] - separate error status from progression status in req db -- [`SO-806 <https://jira.onap.org/browse/SO-806`__ ] - SO PNF PnP workflow shall not set "in-maint" AAI flag -- [`SO-798 <https://jira.onap.org/browse/SO-798`__ ] - Externalize the PNF PnP workflow 鈥?as a Service Instance Deployment workflow 鈥?adding the Controller -- [`SO-747 <https://jira.onap.org/browse/SO-747`__ ] - POC - Enable SO use of Multicloud Generic VNF Instantiation API -- [`SO-700 <https://jira.onap.org/browse/SO-700`__ ] - SO should be able to support CCVPN service assurance -- [`SO-588 <https://jira.onap.org/browse/SO-588`__ ] - Automate robot heatbridge manual step to add VF Module stack resources in AAI -- [`SO-18 <https://jira.onap.org/browse/SO-18`__ ] - Keystone v3 Support in MSO -- [`SO-12 <https://jira.onap.org/browse/SO-12`__ ] - Support Ocata apis -- [`SO-10 <https://jira.onap.org/browse/SO-10`__ ] - Deploy a MSO high availability environment -- [`SO-7 <https://jira.onap.org/browse/SO-7`__ ] - Move modified openstack library to common functions repos -- [`SO-6 <https://jira.onap.org/browse/SO-6`__ ] - Document how to change username/password for UIs - - -Security Notes --------------- - SO code has been formally scanned during build time using NexusIQ and all Critical vulnerabilities have been addressed, items that remain open have been assessed for risk and determined to be false positive. The SO open Critical security vulnerabilities and their risk assessment have been documented as part of the `project <https://wiki.onap.org/pages/viewpage.action?pageId=43385708>`_. +- [`SO-1974 <https://jira.onap.org/browse/SO-1974>`__\ ] - Turn off OpenStack heat stack audit +- [`SO-1924 <https://jira.onap.org/browse/SO-1924>`__\ ] - Add VnfConfigUpdate to the list of native CM workflows returned to VID +- [`SO-1820 <https://jira.onap.org/browse/SO-1820>`__\ ] - Add Model Version Query +- [`SO-1806 <https://jira.onap.org/browse/SO-1806>`__\ ] - Fix issue where null variable causes task to not +- [`SO-1793 <https://jira.onap.org/browse/SO-1793>`__\ ] - add status for delete +- [`SO-1792 <https://jira.onap.org/browse/SO-1792>`__\ ] - add status message requirement for create vf module event audit +- [`SO-1791 <https://jira.onap.org/browse/SO-1791>`__\ ] - Moved base client to new location +- [`SO-1790 <https://jira.onap.org/browse/SO-1790>`__\ ] - Enhanced sniro BB to account for sole service proxies to support 1908. +- [`SO-1765 <https://jira.onap.org/browse/SO-1765>`__\ ] - Convert Tabs to Spaces +- [`SO-1760 <https://jira.onap.org/browse/SO-1760>`__\ ] - Add Query param to pull back nested stack information +- [`SO-1758 <https://jira.onap.org/browse/SO-1758>`__\ ] - Fix POM to allow HTTP long polling to work on camunda +- [`SO-1749 <https://jira.onap.org/browse/SO-1749>`__\ ] - re add openstack audit of delete functions after refactor +- [`SO-1748 <https://jira.onap.org/browse/SO-1748>`__\ ] - Add support to parse cdl inside LOB and platform +- [`SO-1737 <https://jira.onap.org/browse/SO-1737>`__\ ] - if audit fails write sub interface data to a ai +- [`SO-1729 <https://jira.onap.org/browse/SO-1729>`__\ ] - Monitor Job Status-Delete +- [`SO-1687 <https://jira.onap.org/browse/SO-1687>`__\ ] - removed unused test classes and methods +- [`SO-1678 <https://jira.onap.org/browse/SO-1678>`__\ ] - removed extra argument from extractByKey method +- [`SO-1676 <https://jira.onap.org/browse/SO-1676>`__\ ] - replace all fixed wiremock ports +- [`SO-1671 <https://jira.onap.org/browse/SO-1671>`__\ ] - skip_post_instantiation_configuration schema and tosca ingestion +- [`SO-1657 <https://jira.onap.org/browse/SO-1657>`__\ ] - Automated testing for the SO Monitoring component +- [`SO-1648 <https://jira.onap.org/browse/SO-1648>`__\ ] - Increasing the test coverage of SO-Monitoring UI +- [`SO-1634 <https://jira.onap.org/browse/SO-1634>`__\ ] - Notification Handling - Terminate +- [`SO-1633 <https://jira.onap.org/browse/SO-1633>`__\ ] - Terminate VNF (with SVNFM interaction) +- [`SO-1632 <https://jira.onap.org/browse/SO-1632>`__\ ] - Handle VNF delete and termination (without SVNFM integration) +- [`SO-1630 <https://jira.onap.org/browse/SO-1630>`__\ ] - Monitor Job Status-Create +- [`SO-1629 <https://jira.onap.org/browse/SO-1629>`__\ ] - Notification Handling - Instantiate +- [`SO-1628 <https://jira.onap.org/browse/SO-1628>`__\ ] - Handle Notification Subscription +- [`SO-1627 <https://jira.onap.org/browse/SO-1627>`__\ ] - Create relationship between esr-vnfm and generic-vnf in AAI +- [`SO-1626 <https://jira.onap.org/browse/SO-1626>`__\ ] - Monitor Node Status +- [`SO-1625 <https://jira.onap.org/browse/SO-1625>`__\ ] - Handle Grant Request (Without Homing/OOF) +- [`SO-1624 <https://jira.onap.org/browse/SO-1624>`__\ ] - Instantiate VNF (with SVNFM Interaction) +- [`SO-1623 <https://jira.onap.org/browse/SO-1623>`__\ ] - Handle Create VNF request in VNFM adapter +- [`SO-1622 <https://jira.onap.org/browse/SO-1622>`__\ ] - Check for existing VNF (with SVNFM Interaction) +- [`SO-1621 <https://jira.onap.org/browse/SO-1621>`__\ ] - Create placeholder implementation for create VNF (without SVNFM interaction) +- [`SO-1620 <https://jira.onap.org/browse/SO-1620>`__\ ] - Create Shell Adapter +- [`SO-1619 <https://jira.onap.org/browse/SO-1619>`__\ ] - Create SO VNFM Adapter Northbound Interface using Swagger +- [`SO-1618 <https://jira.onap.org/browse/SO-1618>`__\ ] - SVNFM Simulator +- [`SO-1616 <https://jira.onap.org/browse/SO-1616>`__\ ] - Add instance group support to SO +- [`SO-1604 <https://jira.onap.org/browse/SO-1604>`__\ ] - SO Catalog Enhancement to support CDS Meta Data for VNF/PNF and PNF Tosca Ingestion +- [`SO-1598 <https://jira.onap.org/browse/SO-1598>`__\ ] - add equals and hashcode support to dslquerybuilder +- [`SO-1597 <https://jira.onap.org/browse/SO-1597>`__\ ] - improvements to audit inventory feature +- [`SO-1596 <https://jira.onap.org/browse/SO-1596>`__\ ] - query clients now have more useable result methods +- [`SO-1590 <https://jira.onap.org/browse/SO-1590>`__\ ] - skip cloud region validation for 1906 +- [`SO-1589 <https://jira.onap.org/browse/SO-1589>`__\ ] - flow validators can now be skipped via an annotation +- [`SO-1582 <https://jira.onap.org/browse/SO-1582>`__\ ] - vnf spin up gr api vnf s base module fails +- [`SO-1573 <https://jira.onap.org/browse/SO-1573>`__\ ] - Abstract for CDS Implementation +- [`SO-1569 <https://jira.onap.org/browse/SO-1569>`__\ ] - do not attempt to commit empty transactions +- [`SO-1538 <https://jira.onap.org/browse/SO-1538>`__\ ] - Integration Test for SO VNFM Adapter - Perform the functional test to validate VNFM Adapter NBI and SOL003-based SBI +- [`SO-1534 <https://jira.onap.org/browse/SO-1534>`__\ ] - Create Pre Building Block validator to check if cloud-region orchestration-disabled is true +- [`SO-1533 <https://jira.onap.org/browse/SO-1533>`__\ ] - flowvaldiator will allow more flexible filtering +- [`SO-1512 <https://jira.onap.org/browse/SO-1512>`__\ ] - Added Camunda migration scripts and updated camunda springboot version +- [`SO-1506 <https://jira.onap.org/browse/SO-1506>`__\ ] - E2E Automation - Extend PNF workflow with post-instantiation configuration +- [`SO-1501 <https://jira.onap.org/browse/SO-1501>`__\ ] - add new functionality to aai client +- [`SO-1495 <https://jira.onap.org/browse/SO-1495>`__\ ] - made max retries configurable via mso config repo +- [`SO-1493 <https://jira.onap.org/browse/SO-1493>`__\ ] - restructure a&ai client +- [`SO-1487 <https://jira.onap.org/browse/SO-1487>`__\ ] - added license headers to various java files +- [`SO-1485 <https://jira.onap.org/browse/SO-1485>`__\ ] - add DSL endpoint support to A&AI Client +- [`SO-1483 <https://jira.onap.org/browse/SO-1483>`__\ ] - SO to support a new GRPC client for container to container communication +- [`SO-1482 <https://jira.onap.org/browse/SO-1482>`__\ ] - SO Generic Building Block to support config deploy action for CONFIGURE Step +- [`SO-1481 <https://jira.onap.org/browse/SO-1481>`__\ ] - Generic Bulding block for assign shall trigger controller for config assign action +- [`SO-1477 <https://jira.onap.org/browse/SO-1477>`__\ ] - AAF support for SO +- [`SO-1476 <https://jira.onap.org/browse/SO-1476>`__\ ] - Do not process vf module being created when building an index +- [`SO-1475 <https://jira.onap.org/browse/SO-1475>`__\ ] - store raw distribution notification in db +- [`SO-1474 <https://jira.onap.org/browse/SO-1474>`__\ ] - Test Issue +- [`SO-1469 <https://jira.onap.org/browse/SO-1469>`__\ ] - Refactor OOF Homing to Java +- [`SO-1462 <https://jira.onap.org/browse/SO-1462>`__\ ] - Clean up AT&T Acronyms from Unit tests for audit +- [`SO-1459 <https://jira.onap.org/browse/SO-1459>`__\ ] - add maven build properties to spring actuator +- [`SO-1456 <https://jira.onap.org/browse/SO-1456>`__\ ] - prototype fetching resources from openstack and compare to a ai +- [`SO-1452 <https://jira.onap.org/browse/SO-1452>`__\ ] - added list of flows to execution for cockpit +- [`SO-1451 <https://jira.onap.org/browse/SO-1451>`__\ ] - Updated the SDC API call with the ECOMP OE from AAI +- [`SO-1450 <https://jira.onap.org/browse/SO-1450>`__\ ] - support for secure communications between SO and Multicloud +- [`SO-1447 <https://jira.onap.org/browse/SO-1447>`__\ ] - Refine multicloud use of SO cloudsites and identify DB +- [`SO-1446 <https://jira.onap.org/browse/SO-1446>`__\ ] - Multicloud API updates for generic clouds +- [`SO-1445 <https://jira.onap.org/browse/SO-1445>`__\ ] - Multicloud support for volume groups and networks +- [`SO-1444 <https://jira.onap.org/browse/SO-1444>`__\ ] - AAI update after vfmodule creation +- [`SO-1443 <https://jira.onap.org/browse/SO-1443>`__\ ] - Prepare user_directives for multicloud API +- [`SO-1442 <https://jira.onap.org/browse/SO-1442>`__\ ] - Prepare sdnc_directives for multicloud API +- [`SO-1441 <https://jira.onap.org/browse/SO-1441>`__\ ] - Handle distribution of service with generic cloud artifacts +- [`SO-1436 <https://jira.onap.org/browse/SO-1436>`__\ ] - removed unnecessary repository from pom.xml +- [`SO-1432 <https://jira.onap.org/browse/SO-1432>`__\ ] - duplicate add custom object support to a ai client +- [`SO-1431 <https://jira.onap.org/browse/SO-1431>`__\ ] - Test issue 1 +- [`SO-1429 <https://jira.onap.org/browse/SO-1429>`__\ ] - add custom object support to a ai client +- [`SO-1427 <https://jira.onap.org/browse/SO-1427>`__\ ] - Fix to include alloc pool from dhcpStart/end on reqs +- [`SO-1426 <https://jira.onap.org/browse/SO-1426>`__\ ] - Upgraded tosca parser to version 1.4.8 and updated imports +- [`SO-1425 <https://jira.onap.org/browse/SO-1425>`__\ ] - Re-Factor DMAAP Credentials to use encrypted auth +- [`SO-1421 <https://jira.onap.org/browse/SO-1421>`__\ ] - Support for SO->ExtAPI interface/API +- [`SO-1414 <https://jira.onap.org/browse/SO-1414>`__\ ] - update all inprogress checks in apih handler +- [`SO-1413 <https://jira.onap.org/browse/SO-1413>`__\ ] - replaced org.mockito.Matchers with ArgumentMatchers +- [`SO-1411 <https://jira.onap.org/browse/SO-1411>`__\ ] - Test Issue +- [`SO-1409 <https://jira.onap.org/browse/SO-1409>`__\ ] - added in validation for number of keys provided +- [`SO-1405 <https://jira.onap.org/browse/SO-1405>`__\ ] - apih infra shall ensure data for si matches on macro requests +- [`SO-1404 <https://jira.onap.org/browse/SO-1404>`__\ ] - covert sync calls for create and delete network to async +- [`SO-1395 <https://jira.onap.org/browse/SO-1395>`__\ ] - E2E Automation - PreInstatition and PostInstatition use cases +- [`SO-1389 <https://jira.onap.org/browse/SO-1389>`__\ ] - added mso-request-id when calling SDNCHandler subflow +- [`SO-1388 <https://jira.onap.org/browse/SO-1388>`__\ ] - descriptive messages now returned by validator +- [`SO-1387 <https://jira.onap.org/browse/SO-1387>`__\ ] - naming ms client fixes +- [`SO-1385 <https://jira.onap.org/browse/SO-1385>`__\ ] - removed retired A&AI versions from codebase +- [`SO-1384 <https://jira.onap.org/browse/SO-1384>`__\ ] - sdnc handler was not sending workflow exception upwards +- [`SO-1383 <https://jira.onap.org/browse/SO-1383>`__\ ] - refactored validator to be more generic +- [`SO-1381 <https://jira.onap.org/browse/SO-1381>`__\ ] - Quality of Life logging improvements +- [`SO-1380 <https://jira.onap.org/browse/SO-1380>`__\ ] - Service Proxy Consolidation +- [`SO-1379 <https://jira.onap.org/browse/SO-1379>`__\ ] - Add validation for vnfs before WorkflowAction starts +- [`SO-1378 <https://jira.onap.org/browse/SO-1378>`__\ ] - get subnet sequence number from A&AI +- [`SO-1377 <https://jira.onap.org/browse/SO-1377>`__\ ] - Re-enable Actuator for Springboot 2.0 +- [`SO-1376 <https://jira.onap.org/browse/SO-1376>`__\ ] - Created sniro request pojos for homingV2 flow +- [`SO-1370 <https://jira.onap.org/browse/SO-1370>`__\ ] - Preparation for next scale-out after successful instantiation of the current scale-out operation +- [`SO-1369 <https://jira.onap.org/browse/SO-1369>`__\ ] - Processing of configuration parameters during instantiation and scale-out +- [`SO-1368 <https://jira.onap.org/browse/SO-1368>`__\ ] - VNF Health check during scale-out to be made as a separate workflow +- [`SO-1367 <https://jira.onap.org/browse/SO-1367>`__\ ] - Invoke the APP-C service configuration API after E2E Service instantiation +- [`SO-1366 <https://jira.onap.org/browse/SO-1366>`__\ ] - SO Workflow need to call configure API during instantiation +- [`SO-1362 <https://jira.onap.org/browse/SO-1362>`__\ ] - Changed the MDC sourcing from LoggingInterceptor to JaxRsFilterLogging. +- [`SO-1346 <https://jira.onap.org/browse/SO-1346>`__\ ] - Use SLF4J/Logback, instead of Log4J +- [`SO-1307 <https://jira.onap.org/browse/SO-1307>`__\ ] - Add Headers +- [`SO-1295 <https://jira.onap.org/browse/SO-1295>`__\ ] - Update SDNC client Version in POM +- [`SO-1293 <https://jira.onap.org/browse/SO-1293>`__\ ] - Vnf Recreate +- [`SO-1290 <https://jira.onap.org/browse/SO-1290>`__\ ] - Update orchestrationrequest response +- [`SO-1288 <https://jira.onap.org/browse/SO-1288>`__\ ] - Enhance GRM Clients to use encrypted auth loading +- [`SO-1287 <https://jira.onap.org/browse/SO-1287>`__\ ] - Change all SDNC Calls in GR_API +- [`SO-1284 <https://jira.onap.org/browse/SO-1284>`__\ ] - Create Relationship between Vnf and Tenant +- [`SO-1283 <https://jira.onap.org/browse/SO-1283>`__\ ] - Fix GR_API cloud info retrieval +- [`SO-1282 <https://jira.onap.org/browse/SO-1282>`__\ ] - Update Alacarte Logic for Recreate Flow +- [`SO-1279 <https://jira.onap.org/browse/SO-1279>`__\ ] - Replaced the VNFC hardcoded Function +- [`SO-1278 <https://jira.onap.org/browse/SO-1278>`__\ ] - Move all ecomp.mso properties to org.onap.so +- [`SO-1276 <https://jira.onap.org/browse/SO-1276>`__\ ] - Add Cloud_Owner to northbound request table +- [`SO-1275 <https://jira.onap.org/browse/SO-1275>`__\ ] - Resolve path issues +- [`SO-1274 <https://jira.onap.org/browse/SO-1274>`__\ ] - CreateAndUpdatePNFResource workflow:: Associate PNF instance +- [`SO-1272 <https://jira.onap.org/browse/SO-1272>`__\ ] - Use UUID to fill pnf-id in PNF PnP sub-flow +- [`SO-1270 <https://jira.onap.org/browse/SO-1270>`__\ ] - Add New A&AI objects +- [`SO-1269 <https://jira.onap.org/browse/SO-1269>`__\ ] - Add serviceRole to MSO SNIRO Interface +- [`SO-1260 <https://jira.onap.org/browse/SO-1260>`__\ ] - Add support for naming service +- [`SO-1233 <https://jira.onap.org/browse/SO-1233>`__\ ] - Added service role to sniro request when not null +- [`SO-1232 <https://jira.onap.org/browse/SO-1232>`__\ ] - Switch to SpringAutoDeployment rather than processes.xml +- [`SO-1229 <https://jira.onap.org/browse/SO-1229>`__\ ] - Remove all usage of AlarmLogger +- [`SO-1228 <https://jira.onap.org/browse/SO-1228>`__\ ] - Limit Number of Occurs for security reasons +- [`SO-1227 <https://jira.onap.org/browse/SO-1227>`__\ ] - Remove Swagger UI due to security scan concerns +- [`SO-1226 <https://jira.onap.org/browse/SO-1226>`__\ ] - changed assign vnf sdnc to use the async subflow +- [`SO-1225 <https://jira.onap.org/browse/SO-1225>`__\ ] - Add Keystone V3 Support +- [`SO-1207 <https://jira.onap.org/browse/SO-1207>`__\ ] - accept a la carte create instance group request from vid +- [`SO-1206 <https://jira.onap.org/browse/SO-1206>`__\ ] - Added groupInstanceId and groupInstanceName columns +- [`SO-1205 <https://jira.onap.org/browse/SO-1205>`__\ ] - separate error status from progression status in req db +- [`SO-806 <https://jira.onap.org/browse/SO-806>`__\ ] - SO PNF PnP workflow shall not set "in-maint" AAI flag +- [`SO-798 <https://jira.onap.org/browse/SO-798>`__\ ] - Externalize the PNF PnP workflow 鈥?as a Service Instance Deployment workflow 鈥?adding the Controller +- [`SO-747 <https://jira.onap.org/browse/SO-747>`__\ ] - POC - Enable SO use of Multicloud Generic VNF Instantiation API +- [`SO-700 <https://jira.onap.org/browse/SO-700>`__\ ] - SO should be able to support CCVPN service assurance +- [`SO-588 <https://jira.onap.org/browse/SO-588>`__\ ] - Automate robot heatbridge manual step to add VF Module stack resources in AAI +- [`SO-18 <https://jira.onap.org/browse/SO-18>`__\ ] - Keystone v3 Support in MSO +- [`SO-12 <https://jira.onap.org/browse/SO-12>`__\ ] - Support Ocata apis +- [`SO-10 <https://jira.onap.org/browse/SO-10>`__\ ] - Deploy a MSO high availability environment +- [`SO-7 <https://jira.onap.org/browse/SO-7>`__\ ] - Move modified openstack library to common functions repos +- [`SO-6 <https://jira.onap.org/browse/SO-6>`__\ ] - Document how to change username/password for UIs -Quick Links: + +**Security Notes** + SO code has been formally scanned during build time using NexusIQ and all Critical vulnerabilities have been addressed, items that remain open have been assessed for risk and determined to be false positive. The SO open Critical security vulnerabilities and their risk assessment have been documented as part of the `project <https://wiki.onap.org/pages/viewpage.action?pageId=43385708>`_. + + Quick Links: - `SO project page <https://wiki.onap.org/display/DW/Service+Orchestrator+Project>`_ - `Passing Badge information for SO <https://bestpractices.coreinfrastructure.org/en/projects/1702>`_ @@ -220,7 +218,9 @@ Quick Links: **Known Issues** - TBD +Testing Terminate and Delete of ETSI VNFM Adapter is done and has some of the minor issues pending, it will be done in El Alto. + +- [`SO-1742 <https://jira.onap.org/browse/SO-1742>`__\ ] - Test Terminate/Delete VNF with VNFM Adapter **Upgrade Notes** @@ -235,7 +235,7 @@ Quick Links: N/A Version: 1.4.1 -============== +-------------- :Release Date: 2019-04-19 diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java index e14b01792a..b4a3128de8 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java @@ -94,8 +94,8 @@ public class OrchestrationRequests { @Produces(MediaType.APPLICATION_JSON) @Transactional public Response getOrchestrationRequest(@PathParam("requestId") String requestId, - @PathParam("version") String version, @QueryParam("includeCloudRequest") boolean includeCloudRequest) - throws ApiException { + @PathParam("version") String version, @QueryParam("includeCloudRequest") boolean includeCloudRequest, + @QueryParam("extSystemErrorSource") boolean extSystemErrorSource) throws ApiException { String apiVersion = version.substring(1); GetOrchestrationResponse orchestrationResponse = new GetOrchestrationResponse(); @@ -142,7 +142,8 @@ public class OrchestrationRequests { throw validateException; } - Request request = mapInfraActiveRequestToRequest(infraActiveRequest, includeCloudRequest); + Request request = mapInfraActiveRequestToRequest(infraActiveRequest, includeCloudRequest, extSystemErrorSource); + if (!requestProcessingData.isEmpty()) { request.setRequestProcessingData(mapRequestProcessingData(requestProcessingData)); } @@ -158,7 +159,8 @@ public class OrchestrationRequests { @Produces(MediaType.APPLICATION_JSON) @Transactional public Response getOrchestrationRequest(@Context UriInfo ui, @PathParam("version") String version, - @QueryParam("includeCloudRequest") boolean includeCloudRequest) throws ApiException { + @QueryParam("includeCloudRequest") boolean includeCloudRequest, + @QueryParam("extSystemErrorSource") boolean extSystemErrorSource) throws ApiException { long startTime = System.currentTimeMillis(); @@ -195,7 +197,8 @@ public class OrchestrationRequests { List<RequestProcessingData> requestProcessingData = requestsDbClient.getRequestProcessingDataBySoRequestId(infraActive.getRequestId()); RequestList requestList = new RequestList(); - Request request = mapInfraActiveRequestToRequest(infraActive, includeCloudRequest); + Request request = mapInfraActiveRequestToRequest(infraActive, includeCloudRequest, extSystemErrorSource); + if (!requestProcessingData.isEmpty()) { request.setRequestProcessingData(mapRequestProcessingData(requestProcessingData)); } @@ -290,8 +293,8 @@ public class OrchestrationRequests { return Response.status(HttpStatus.SC_NO_CONTENT).entity("").build(); } - protected Request mapInfraActiveRequestToRequest(InfraActiveRequests iar, boolean includeCloudRequest) - throws ApiException { + protected Request mapInfraActiveRequestToRequest(InfraActiveRequests iar, boolean includeCloudRequest, + boolean extSystemErrorSource) throws ApiException { String requestBody = iar.getRequestBody(); Request request = new Request(); @@ -427,10 +430,19 @@ public class OrchestrationRequests { }); } + mapExtSystemErrorSourceToRequest(iar, status, extSystemErrorSource); + request.setRequestStatus(status); return request; } + protected void mapExtSystemErrorSourceToRequest(InfraActiveRequests iar, RequestStatus status, + boolean extSystemErrorSource) { + if (extSystemErrorSource) { + status.setExtSystemErrorSource(iar.getExtSystemErrorSource()); + } + } + public List<org.onap.so.serviceinstancebeans.RequestProcessingData> mapRequestProcessingData( List<org.onap.so.db.request.beans.RequestProcessingData> processingData) { List<org.onap.so.serviceinstancebeans.RequestProcessingData> addedRequestProcessingData = new ArrayList<>(); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java index f88d244a88..24034e91af 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java @@ -626,7 +626,7 @@ public class RequestHandlerUtils { protected InfraActiveRequests createNewRecordCopyFromInfraActiveRequest(InfraActiveRequests infraActiveRequest, String requestId, Timestamp startTimeStamp, String source, String requestUri, String requestorId, - String originalRequestId) { + String originalRequestId) throws ApiException { InfraActiveRequests request = new InfraActiveRequests(); request.setRequestId(requestId); request.setStartTime(startTimeStamp); @@ -649,11 +649,24 @@ public class RequestHandlerUtils { } protected void setInstanceIdAndName(InfraActiveRequests infraActiveRequest, - InfraActiveRequests currentActiveRequest) { + InfraActiveRequests currentActiveRequest) throws ApiException { String requestScope = infraActiveRequest.getRequestScope(); try { ModelType type = ModelType.valueOf(requestScope); - type.setName(currentActiveRequest, type.getName(infraActiveRequest)); + String instanceName = type.getName(infraActiveRequest); + if (instanceName == null && type.equals(ModelType.vfModule)) { + logger.error("vfModule for requestId: {} being resumed does not have an instanceName.", + infraActiveRequest.getRequestId()); + ValidateException validateException = new ValidateException.Builder( + "vfModule for requestId: " + infraActiveRequest.getRequestId() + + " being resumed does not have an instanceName.", + HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).build(); + updateStatus(currentActiveRequest, Status.FAILED, validateException.getMessage()); + throw validateException; + } + if (instanceName != null) { + type.setName(currentActiveRequest, instanceName); + } type.setId(currentActiveRequest, type.getId(infraActiveRequest)); } catch (IllegalArgumentException e) { logger.error( diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java index 19b9d7ea1e..a400caeae2 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java @@ -21,21 +21,51 @@ package org.onap.so.apihandlerinfra; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import javax.ws.rs.core.Response; +import org.apache.http.HttpStatus; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; import org.mockito.Spy; import org.mockito.junit.MockitoJUnitRunner; +import org.onap.so.apihandler.common.ResponseBuilder; import org.onap.so.apihandlerinfra.exceptions.ApiException; import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.serviceinstancebeans.InstanceReferences; import org.onap.so.serviceinstancebeans.Request; import org.onap.so.serviceinstancebeans.RequestStatus; @RunWith(MockitoJUnitRunner.class) public class OrchestrationRequestsUnitTest { - + @Mock + private RequestsDbClient requestDbClient; + @Mock + private MsoRequest msoRequest; + @Mock + private ResponseBuilder builder; + @Mock + private Response response; + @Rule + public ExpectedException thrown = ExpectedException.none(); + @InjectMocks @Spy private OrchestrationRequests orchestrationRequests; @@ -43,8 +73,21 @@ public class OrchestrationRequestsUnitTest { private static final String SERVICE_INSTANCE_ID = "7cb9aa56-dd31-41e5-828e-d93027d4ebbb"; private static final String ORIGINAL_REQUEST_ID = "8f2d38a6-7c20-465a-bd7e-075645f1394b"; private static final String SERVICE = "service"; + private static final String EXT_SYSTEM_ERROR_SOURCE = "external system error source"; private InfraActiveRequests iar; boolean includeCloudRequest = false; + boolean extSystemErrorSource = false; + private static final String SERVICE_INSTANCE_NAME = "serviceInstanceName"; + private static final String VNF_ID = "00032ab7-na18-42e5-965d-8ea592502017"; + private static final String VFMODULE_ID = "00032ab7-na18-42e5-965d-8ea592502016"; + private static final String NETWORK_ID = "00032ab7-na18-42e5-965d-8ea592502015"; + private static final String VOLUME_GROUP_ID = "00032ab7-na18-42e5-965d-8ea592502014"; + private static final String VNF_NAME = "vnfName"; + private static final String VFMODULE_NAME = "vfModuleName"; + private static final String NETWORK_NAME = "networkName"; + private static final String VOLUME_GROUP_NAME = "volumeGroupName"; + private static final String VERSION = "v7"; + List<org.onap.so.db.request.beans.RequestProcessingData> requestProcessingData = new ArrayList<>(); @Before public void setup() { @@ -52,6 +95,12 @@ public class OrchestrationRequestsUnitTest { iar.setRequestScope(SERVICE); iar.setRequestId(REQUEST_ID); iar.setServiceInstanceId(SERVICE_INSTANCE_ID); + when(requestDbClient.getInfraActiveRequestbyRequestId(Mockito.eq(REQUEST_ID))).thenReturn(iar); + when(requestDbClient.getRequestProcessingDataBySoRequestId(Mockito.eq(REQUEST_ID))) + .thenReturn(requestProcessingData); + + when(builder.buildResponse(Mockito.eq(HttpStatus.SC_OK), Mockito.eq(REQUEST_ID), any(Object.class), + any(String.class))).thenReturn(response); } @Test @@ -68,7 +117,8 @@ public class OrchestrationRequestsUnitTest { iar.setOriginalRequestId(ORIGINAL_REQUEST_ID); - Request result = orchestrationRequests.mapInfraActiveRequestToRequest(iar, includeCloudRequest); + Request result = + orchestrationRequests.mapInfraActiveRequestToRequest(iar, includeCloudRequest, extSystemErrorSource); assertThat(result, sameBeanAs(expected)); } @@ -83,8 +133,67 @@ public class OrchestrationRequestsUnitTest { expected.setRequestStatus(requestStatus); expected.setRequestScope(SERVICE); - Request result = orchestrationRequests.mapInfraActiveRequestToRequest(iar, includeCloudRequest); + Request result = + orchestrationRequests.mapInfraActiveRequestToRequest(iar, includeCloudRequest, extSystemErrorSource); assertThat(result, sameBeanAs(expected)); } + @Test + public void mapExtSystemErrorSourceToRequestFalseTest() throws ApiException { + InstanceReferences instanceReferences = new InstanceReferences(); + instanceReferences.setServiceInstanceId(SERVICE_INSTANCE_ID); + RequestStatus requestStatus = new RequestStatus(); + + Request expected = new Request(); + expected.setRequestId(REQUEST_ID); + expected.setInstanceReferences(instanceReferences); + expected.setRequestStatus(requestStatus); + expected.setRequestScope(SERVICE); + + extSystemErrorSource = false; + includeCloudRequest = false; + + Request actual = + orchestrationRequests.mapInfraActiveRequestToRequest(iar, includeCloudRequest, extSystemErrorSource); + assertThat(actual, sameBeanAs(expected)); + } + + @Test + public void mapExtSystemErrorSourceToRequestTrueTest() throws ApiException { + InstanceReferences instanceReferences = new InstanceReferences(); + instanceReferences.setServiceInstanceId(SERVICE_INSTANCE_ID); + RequestStatus requestStatus = new RequestStatus(); + requestStatus.setExtSystemErrorSource(EXT_SYSTEM_ERROR_SOURCE); + + Request expected = new Request(); + expected.setRequestId(REQUEST_ID); + expected.setInstanceReferences(instanceReferences); + expected.setRequestStatus(requestStatus); + expected.setRequestScope(SERVICE); + + extSystemErrorSource = true; + includeCloudRequest = false; + iar.setExtSystemErrorSource(EXT_SYSTEM_ERROR_SOURCE); + + Request actual = + orchestrationRequests.mapInfraActiveRequestToRequest(iar, includeCloudRequest, extSystemErrorSource); + assertThat(actual, sameBeanAs(expected)); + } + + @Test + public void mapExtSystemErrorSourceToRequestMethodInvokedTest() throws ApiException, IOException { + extSystemErrorSource = true; + includeCloudRequest = false; + orchestrationRequests.getOrchestrationRequest(REQUEST_ID, VERSION, includeCloudRequest, extSystemErrorSource); + + verify(orchestrationRequests, times(1)).mapExtSystemErrorSourceToRequest(Mockito.eq(iar), Mockito.any(), + Mockito.eq(extSystemErrorSource)); + } + + @Test + public void requestStatusExtSystemErrorSourceTest() { + RequestStatus requestStatus = new RequestStatus(); + requestStatus.setExtSystemErrorSource(EXT_SYSTEM_ERROR_SOURCE); + assertThat(requestStatus.getExtSystemErrorSource(), is(equalTo(EXT_SYSTEM_ERROR_SOURCE))); + } } diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java index 3cb4e0c9c2..91ca756a51 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsUnitTest.java @@ -39,6 +39,7 @@ import org.mockito.Mock; import org.mockito.Spy; import org.mockito.junit.MockitoJUnitRunner; import org.onap.so.apihandlerinfra.exceptions.ApiException; +import org.onap.so.apihandlerinfra.exceptions.ValidateException; import org.onap.so.apihandlerinfra.exceptions.VfModuleNotFoundException; import org.onap.so.db.catalog.beans.VfModule; import org.onap.so.db.catalog.client.CatalogDbClient; @@ -140,7 +141,7 @@ public class RequestHandlerUtilsUnitTest { @Test - public void createNewRecordCopyFromInfraActiveRequestTest() throws IOException { + public void createNewRecordCopyFromInfraActiveRequestTest() throws IOException, ApiException { doNothing().when(requestHandler).setInstanceIdAndName(infraActiveRequest, currentActiveRequest); doReturn(getRequestBody("/RequestBodyNewRequestorId.json")).when(requestHandler) .updateRequestorIdInRequestBody(infraActiveRequest, "yyyyyy"); @@ -150,14 +151,14 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void createNewRecordCopyFromInfraActiveRequestNullIARTest() { + public void createNewRecordCopyFromInfraActiveRequestNullIARTest() throws ApiException { InfraActiveRequests result = requestHandler.createNewRecordCopyFromInfraActiveRequest(null, CURRENT_REQUEST_ID, startTimeStamp, "VID", requestUri, "xxxxxx", RESUMED_REQUEST_ID); assertThat(currentActiveRequestIARNull, sameBeanAs(result)); } @Test - public void setInstanceIdAndNameServiceTest() { + public void setInstanceIdAndNameServiceTest() throws ApiException { InfraActiveRequests serviceRequest = new InfraActiveRequests(); InfraActiveRequests expected = new InfraActiveRequests(); @@ -169,7 +170,40 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void setInstanceIdAndNameRequestScopeNotValidTest() { + public void setInstanceIdAndNameServiceNullInstanceNameTest() throws ApiException { + InfraActiveRequests serviceRequest = new InfraActiveRequests(); + + InfraActiveRequests request = new InfraActiveRequests(); + request.setServiceInstanceId(SERVICE_INSTANCE_ID); + request.setRequestScope(ModelType.service.toString()); + + InfraActiveRequests expected = new InfraActiveRequests(); + expected.setServiceInstanceId(SERVICE_INSTANCE_ID); + + requestHandler.setInstanceIdAndName(request, serviceRequest); + assertThat(serviceRequest, sameBeanAs(expected)); + } + + @Test + public void setInstanceIdAndNameServiceNullInstanceNameVfModuleTest() throws ApiException { + InfraActiveRequests vfModuleRequest = new InfraActiveRequests(); + String errorMessage = + "vfModule for requestId: 59c7247f-839f-4923-90c3-05faa3ab354d being resumed does not have an instanceName."; + doNothing().when(requestHandler).updateStatus(vfModuleRequest, Status.FAILED, errorMessage); + + InfraActiveRequests request = new InfraActiveRequests(); + request.setServiceInstanceId(VFMODULE_ID); + request.setRequestScope(ModelType.vfModule.toString()); + request.setRequestId(RESUMED_REQUEST_ID); + + thrown.expect(ValidateException.class); + thrown.expectMessage(errorMessage); + + requestHandler.setInstanceIdAndName(request, vfModuleRequest); + } + + @Test + public void setInstanceIdAndNameRequestScopeNotValidTest() throws ApiException { InfraActiveRequests originalServiceRequest = new InfraActiveRequests(); originalServiceRequest.setRequestScope("test"); InfraActiveRequests serviceRequest = new InfraActiveRequests(); @@ -181,7 +215,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void setInstanceIdAndNameVnfTest() { + public void setInstanceIdAndNameVnfTest() throws ApiException { InfraActiveRequests vnfRequestOriginal = new InfraActiveRequests(); vnfRequestOriginal.setRequestScope("vnf"); vnfRequestOriginal.setVnfId(VNF_ID); @@ -197,7 +231,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void setInstanceIdAndNameVfModuleTest() { + public void setInstanceIdAndNameVfModuleTest() throws ApiException { InfraActiveRequests vfModuleRequestOriginal = new InfraActiveRequests(); vfModuleRequestOriginal.setRequestScope("vfModule"); vfModuleRequestOriginal.setVfModuleId(VFMODULE_ID); @@ -213,7 +247,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void setInstanceIdAndNameNetworkTest() { + public void setInstanceIdAndNameNetworkTest() throws ApiException { InfraActiveRequests networkRequestOriginal = new InfraActiveRequests(); networkRequestOriginal.setRequestScope("network"); networkRequestOriginal.setNetworkId(NETWORK_ID); @@ -229,7 +263,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void setInstanceIdAndNameVolumeGroupTest() { + public void setInstanceIdAndNameVolumeGroupTest() throws ApiException { InfraActiveRequests volumeGroupRequestOriginal = new InfraActiveRequests(); volumeGroupRequestOriginal.setRequestScope("volumeGroup"); volumeGroupRequestOriginal.setVolumeGroupId(VOLUME_GROUP_ID); @@ -357,7 +391,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void getModelTypeApplyUpdatedConfigTest() { + public void getModelTypeApplyUpdatedConfigTest() throws ApiException { ModelType modelTypeExpected = ModelType.vnf; ModelType modelTypeResult = requestHandler.getModelType(Action.applyUpdatedConfig, null); @@ -365,7 +399,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void getModelTypeInPlaceSoftwareUpdateTest() { + public void getModelTypeInPlaceSoftwareUpdateTest() throws ApiException { ModelType modelTypeExpected = ModelType.vnf; ModelType modelTypeResult = requestHandler.getModelType(Action.inPlaceSoftwareUpdate, null); @@ -373,7 +407,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void getModelTypeAddMembersTest() { + public void getModelTypeAddMembersTest() throws ApiException { ModelType modelTypeExpected = ModelType.instanceGroup; ModelType modelTypeResult = requestHandler.getModelType(Action.addMembers, null); @@ -381,7 +415,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void getModelTypeRemoveMembersTest() { + public void getModelTypeRemoveMembersTest() throws ApiException { ModelType modelTypeExpected = ModelType.instanceGroup; ModelType modelTypeResult = requestHandler.getModelType(Action.removeMembers, null); @@ -389,7 +423,7 @@ public class RequestHandlerUtilsUnitTest { } @Test - public void getModelTypeTest() { + public void getModelTypeTest() throws ApiException { ModelType modelTypeExpected = ModelType.service; ModelInfo modelInfo = new ModelInfo(); modelInfo.setModelType(ModelType.service); @@ -70,7 +70,6 @@ <camunda.springboot.version>3.2.0</camunda.springboot.version> <format.skipValidate>false</format.skipValidate> <format.skipExecute>true</format.skipExecute> - <hikari.cp.version>2.7.1</hikari.cp.version> <io.fabric8.version>4.1.0</io.fabric8.version> </properties> <distributionManagement> @@ -860,11 +859,6 @@ <artifactId>snakeyaml</artifactId> <version>1.19</version> </dependency> - <dependency> - <groupId>hikari-cp</groupId> - <artifactId>hikari-cp</artifactId> - <version>${hikari.cp.version}</version> - </dependency> </dependencies> </dependencyManagement> <profiles> |