diff options
30 files changed, 1946 insertions, 1528 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java index e821d806dd..2a17656f1d 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java @@ -478,12 +478,14 @@ public class MsoCloudifyUtils extends MsoCommonUtils implements VduPlugin { boolean timedOut = false; int cancelTimeout = timeout; // TODO: For now, just use same timeout - String status = cancelExecution.getStatus(); - + String status = null; + if (cancelExecution != null) { + status = cancelExecution.getStatus(); + } // Poll for completion. Create a reusable cloudify query request GetExecution queryExecution = cloudify.executions().byId(executionId); - while (!timedOut && !status.equals(CANCELLED)) { + while (!timedOut && !CANCELLED.equals(status)) { // workflow is still running; check for timeout if (cancelTimeout <= 0) { logger.debug("Cancel timeout for workflow {} on deployment {}", workflowId, deploymentId); @@ -497,11 +499,13 @@ public class MsoCloudifyUtils extends MsoCommonUtils implements VduPlugin { logger.debug("pollTimeout remaining: {}", cancelTimeout); execution = queryExecution.execute(); - status = execution.getStatus(); + if (execution != null) { + status = execution.getStatus(); + } } // Broke the loop. Check again for a terminal state - if (status.equals(CANCELLED)) { + if (CANCELLED.equals(status)) { // Finished cancelling. Return the original exception logger.debug("Cancel workflow {} completed on deployment {}", workflowId, deploymentId); throw new MsoCloudifyException(-1, "", "", savedException); 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 6565db7ebc..b5a97f7559 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 @@ -327,20 +327,24 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin { Integer.parseInt(this.environment.getProperty(pollingMultiplierProp, POLLING_MULTIPLIER_DEFAULT)); int numberOfPollingAttempts = Math.floorDiv((timeoutMinutes * pollingMultiplier), pollingFrequency); Heat heatClient = getHeatClient(cloudSiteId, tenantId); - Stack latestStack = null; while (true) { - latestStack = queryHeatStack(heatClient, stack.getStackName() + "/" + stack.getId()); - statusHandler.updateStackStatus(latestStack); - logger.debug("Polling: {} ({})", latestStack.getStackStatus(), latestStack.getStackName()); - if (stackStatus.equals(latestStack.getStackStatus())) { - if (numberOfPollingAttempts <= 0) { - logger.error("Polling of stack timed out with Status: {}", latestStack.getStackStatus()); + Stack latestStack = queryHeatStack(heatClient, stack.getStackName() + "/" + stack.getId()); + if (latestStack != null) { + statusHandler.updateStackStatus(latestStack); + logger.debug("Polling: {} ({})", latestStack.getStackStatus(), latestStack.getStackName()); + if (stackStatus.equals(latestStack.getStackStatus())) { + if (numberOfPollingAttempts <= 0) { + logger.error("Polling of stack timed out with Status: {}", latestStack.getStackStatus()); + return latestStack; + } + sleep(pollingFrequency * 1000L); + numberOfPollingAttempts -= 1; + } else { return latestStack; } - sleep(pollingFrequency * 1000L); - numberOfPollingAttempts -= 1; } else { - return latestStack; + logger.error("latestStack is null"); + return null; } } } 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 153de2fb12..afc227faf0 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 @@ -462,13 +462,13 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { } } } + 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.setNeutronNetworkId((String) heatStack.getOutputs().get(NETWORK_ID)); networkRollback.setNetworkCreated(true); networkRollback.setNetworkType(networkType); @@ -915,7 +915,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { // Use MsoNeutronUtils for all NEUTRON commands String mode; - String neutronId; + String neutronId = null; // Try Heat first, since networks may be named the same as the Heat stack StackInfo heatStack = null; long queryStackStarttime = System.currentTimeMillis(); @@ -931,12 +931,12 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { // 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(); - neutronId = (String) outputs.get(NETWORK_ID); mode = "HEAT"; - - Map<String, String> sMap = new HashMap<>(); 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 { @@ -1521,23 +1521,28 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter { logger.debug("Subnet_Ipam Output JSON String:{} {}", obj.getClass(), jStr); JsonNode rootNode = mapper.readTree(jStr); - for (JsonNode sNode : rootNode.path("ipam_subnets")) { - logger.debug("Output Subnet Node {}", sNode.toString()); - String name = sNode.path("subnet_name").textValue(); - String uuid = sNode.path("subnet_uuid").textValue(); - String aaiId = name; // default - // try to find aaiId for name in input subnetList - if (subnets != null) { - for (Subnet subnet : subnets) { - if (subnet != null && !commonUtils.isNullOrEmpty(subnet.getSubnetName())) { - if (subnet.getSubnetName().equals(name)) { - aaiId = subnet.getSubnetId(); - break; + if (rootNode != null) { + for (JsonNode sNode : rootNode.path("ipam_subnets")) { + logger.debug("Output Subnet Node {}", sNode.toString()); + String name = sNode.path("subnet_name").textValue(); + String uuid = sNode.path("subnet_uuid").textValue(); + String aaiId = name; // default + // try to find aaiId for name in input subnetList + if (subnets != null) { + for (Subnet subnet : subnets) { + if (subnet != null && !commonUtils.isNullOrEmpty(subnet.getSubnetName())) { + if (subnet.getSubnetName().equals(name)) { + aaiId = subnet.getSubnetId(); + break; + } } } } + sMap.put(aaiId, uuid); // bpmn needs aaid to uuid map } - sMap.put(aaiId, uuid); // bpmn needs aaid to uuid map + } else { + logger.error("{} {} null rootNode - cannot get subnet-uuids", MessageEnum.RA_MARSHING_ERROR, + ErrorCode.DataError.getValue()); } } catch (Exception e) { logger.error("{} {} Exception getting subnet-uuids ", MessageEnum.RA_MARSHING_ERROR, diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java index 8d02fa3e4f..2c1d36273d 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java @@ -118,7 +118,7 @@ public class ResourceRequestBuilder { logger.info("resource resolved using model uuid"); String uuid = (String) JsonUtils.getJsonValue(eachResource, "resourceUuid"); if ((null != uuid) && uuid.equals(resource.getModelInfo().getModelUuid())) { - logger.info("found resource uuid" + uuid); + logger.info("found resource uuid {}", uuid); String resourceParameters = JsonUtils.getJsonValue(eachResource, "parameters"); locationConstraints = JsonUtils.getJsonValue(resourceParameters, "locationConstraints"); } @@ -133,7 +133,7 @@ public class ResourceRequestBuilder { Map<String, Object> uuiRequestInputs = null; if (JsonUtils.getJsonValue(uuiServiceParameters, "requestInputs") != null) { String uuiRequestInputStr = JsonUtils.getJsonValue(uuiServiceParameters, "requestInputs"); - logger.info("resource input from UUI: " + uuiRequestInputStr); + logger.info("resource input from UUI:{} ", uuiRequestInputStr); if (uuiRequestInputStr == null || uuiRequestInputStr.isEmpty()) { uuiRequestInputStr = "{}"; } @@ -371,7 +371,7 @@ public class ResourceRequestBuilder { int val = Integer.parseInt(inputObj.toString()); return val; } catch (NumberFormatException e) { - logger.warn("Unable to parse to int", e.getMessage()); + logger.warn("Unable to parse to int", e); } } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java index 100887dbbc..729f5c95c4 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java @@ -244,9 +244,9 @@ public class ExceptionBuilder { public void processAuditException(DelegateExecutionImpl execution, boolean flowShouldContinue) { logger.debug("Processing Audit Results"); String auditListString = (String) execution.getVariable("auditInventoryResult"); + String processKey = getProcessKey(execution.getDelegateExecution()); if (auditListString != null) { StringBuilder errorMessage = new StringBuilder(); - String processKey = getProcessKey(execution.getDelegateExecution()); try { ExtractPojosForBB extractPojosForBB = getExtractPojosForBB(); VfModule module = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID); @@ -302,7 +302,13 @@ public class ExceptionBuilder { } } else { - logger.debug("Unable to process audit results due to auditInventoryResult being null"); + String errorMessage = "Unable to process audit results due to auditInventoryResult being null"; + WorkflowException exception = new WorkflowException(processKey, 400, errorMessage, TargetEntity.SO); + execution.setVariable("WorkflowException", exception); + execution.setVariable("WorkflowExceptionErrorMessage", errorMessage); + logger.info("Outgoing WorkflowException is {}", exception); + logger.info("Throwing MSOWorkflowException"); + throw new BpmnError("AAIInventoryFailure"); } } diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy index de44caa120..525307a5df 100644 --- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy +++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/MsoGroovyTest.groovy @@ -1,22 +1,22 @@ -/*- - * ============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========================================================= - */ +/*- + * ============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.bpmn.common.scripts @@ -32,6 +32,7 @@ import org.junit.runner.RunWith import org.mockito.junit.MockitoJUnitRunner import org.onap.aai.domain.yang.GenericVnf import org.onap.so.bpmn.mock.FileUtil +import org.onap.so.client.HttpClient import org.onap.so.client.aai.AAIObjectPlurals import org.onap.so.client.aai.AAIObjectType import org.onap.so.client.aai.AAIResourcesClient @@ -47,54 +48,56 @@ abstract class MsoGroovyTest { @Rule public ExpectedException thrown = ExpectedException.none() - protected ExecutionEntity mockExecution - protected AAIResourcesClient client + protected ExecutionEntity mockExecution + protected AAIResourcesClient client protected AllottedResourceUtils allottedResourceUtils_MOCK - protected final String SEARCH_RESULT_AAI_WITH_RESULTDATA = - FileUtil.readResourceFile("__files/aai/searchResults.json") - protected static final String CLOUD_OWNER = Defaults.CLOUD_OWNER.toString(); - - protected void init(String procName){ - mockExecution = setupMock(procName) - when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true") - client = mock(AAIResourcesClient.class) - } - - protected ExecutionEntity setupMock(String procName) { - ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class) - when(mockProcessDefinition.getKey()).thenReturn(procName) - - RepositoryService mockRepositoryService = mock(RepositoryService.class) - when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition) - when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn(procName) - when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100") - - ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class) - when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService) - - ExecutionEntity mockExecution = mock(ExecutionEntity.class) - when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices) - - return mockExecution - } - - protected ExecutionEntity setupMockWithPrefix(String procName, String prefix) { - ExecutionEntity mockExecution = mock(ExecutionEntity.class) - - when(mockExecution.getVariable("prefix")).thenReturn(prefix) - - ProcessEngineServices processEngineServices = mock(ProcessEngineServices.class) - RepositoryService repositoryService = mock(RepositoryService.class) - ProcessDefinition processDefinition = mock(ProcessDefinition.class) - - when(mockExecution.getProcessEngineServices()).thenReturn(processEngineServices) - when(processEngineServices.getRepositoryService()).thenReturn(repositoryService) - when(repositoryService.getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(processDefinition) - when(processDefinition.getKey()).thenReturn(procName) - when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true") - return mockExecution - } - + protected final String SEARCH_RESULT_AAI_WITH_RESULTDATA = + FileUtil.readResourceFile("__files/aai/searchResults.json") + protected static final String CLOUD_OWNER = Defaults.CLOUD_OWNER.toString(); + + protected void init(String procName){ + mockExecution = setupMock(procName) + when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true") + client = mock(AAIResourcesClient.class) + } + + protected ExecutionEntity setupMock(String procName) { + ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class) + when(mockProcessDefinition.getKey()).thenReturn(procName) + + RepositoryService mockRepositoryService = mock(RepositoryService.class) + when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition) + when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn(procName) + when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100") + + ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class) + when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService) + + ExecutionEntity mockExecution = mock(ExecutionEntity.class) + when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices) + + HttpClient httpClient = mock(HttpClient.class) + + return mockExecution + } + + protected ExecutionEntity setupMockWithPrefix(String procName, String prefix) { + ExecutionEntity mockExecution = mock(ExecutionEntity.class) + + when(mockExecution.getVariable("prefix")).thenReturn(prefix) + + ProcessEngineServices processEngineServices = mock(ProcessEngineServices.class) + RepositoryService repositoryService = mock(RepositoryService.class) + ProcessDefinition processDefinition = mock(ProcessDefinition.class) + + when(mockExecution.getProcessEngineServices()).thenReturn(processEngineServices) + when(processEngineServices.getRepositoryService()).thenReturn(repositoryService) + when(repositoryService.getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(processDefinition) + when(processDefinition.getKey()).thenReturn(procName) + when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true") + return mockExecution + } + protected <T> Optional<T> getAAIObjectFromJson(Class<T> clazz , String file){ String json = FileUtil.readResourceFile(file) AAIResultWrapper resultWrapper = new AAIResultWrapper(json) diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java index 7523c378e9..d036ce5f2f 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java @@ -22,7 +22,6 @@ package org.onap.so.bpmn.core.domain; import java.util.UUID; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonRootName; diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java index 050a2af06a..a4fc6e54b0 100644 --- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java +++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java @@ -99,7 +99,7 @@ public class MSOInfrastructureApplication { DeploymentBuilder deploymentBuilder = processEngine.getRepositoryService().createDeployment(); deployCustomWorkflows(deploymentBuilder); } catch (Exception e) { - logger.warn("Unable to invoke deploymentBuilder: " + e.getMessage()); + logger.warn("Unable to invoke deploymentBuilder ", e); } } @@ -140,7 +140,7 @@ public class MSOInfrastructureApplication { deploymentBuilder.deploy(); } } catch (Exception e) { - logger.warn("Unable to deploy custom workflows, " + e.getMessage()); + logger.warn("Unable to deploy custom workflows ", e); } } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java index 18ba91263b..15f8c5e4ef 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java @@ -80,6 +80,16 @@ public class AAIDeleteTasks { @Autowired private AAIInstanceGroupResources aaiInstanceGroupResources; + /** + * BPMN access method to delete the VfModule from A&AI. + * + * It will extract the genericVnf & VfModule from the BBObject. + * + * Before deleting it set the aaiVfModuleRollback as false & then it will delete the VfModule. + * + * @param execution + * @throws Exception + */ public void deleteVfModule(BuildingBlockExecution execution) throws Exception { GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID); @@ -89,10 +99,21 @@ public class AAIDeleteTasks { aaiVfModuleResources.deleteVfModule(vfModule, genericVnf); execution.setVariable("aaiVfModuleRollback", true); } catch (Exception ex) { + logger.error("Exception occurred in AAIDeleteTasks deleteVfModule process", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + /** + * BPMN access method to delete the Vnf from A&AI. + * + * It will extract the genericVnf from the BBObject. + * + * Before deleting it set the aaiVnfRollback as false & then it will delete the Vnf. + * + * @param execution + * @throws Exception + */ public void deleteVnf(BuildingBlockExecution execution) throws Exception { GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); @@ -101,79 +122,154 @@ public class AAIDeleteTasks { aaiVnfResources.deleteVnf(genericVnf); execution.setVariable("aaiVnfRollback", true); } catch (Exception ex) { + logger.error("Exception occurred in AAIDeleteTasks deleteVnf process", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + /** + * BPMN access method to delete the ServiceInstance from A&AI. + * + * It will extract the serviceInstance from the BBObject. + * + * @param execution + * @throws Exception + */ public void deleteServiceInstance(BuildingBlockExecution execution) throws Exception { try { ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); aaiSIResources.deleteServiceInstance(serviceInstance); } catch (Exception ex) { + logger.error("Exception occurred in AAIDeleteTasks deleteServiceInstance process", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + /** + * BPMN access method to delete the l3network from A&AI. + * + * It will extract the l3network from the BBObject. + * + * After deleting the l3network it set the isRollbackNeeded as true. + * + * @param execution + * @throws Exception + */ public void deleteNetwork(BuildingBlockExecution execution) throws Exception { try { L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID); aaiNetworkResources.deleteNetwork(l3network); execution.setVariable("isRollbackNeeded", true); } catch (Exception ex) { + logger.error("Exception occurred in AAIDeleteTasks deleteNetwork process", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + /** + * BPMN access method to delete the Collection from A&AI. + * + * It will extract the serviceInstance from the BBObject. + * + * Then it will get the collection from serviceinstance. + * + * @param execution + * @throws Exception + */ public void deleteCollection(BuildingBlockExecution execution) throws Exception { try { ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); aaiNetworkResources.deleteCollection(serviceInstance.getCollection()); } catch (Exception ex) { + logger.error("Exception occurred in AAIDeleteTasks deleteCollection process", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + /** + * BPMN access method to delete the InstanceGroup from A&AI. + * + * It will extract the serviceInstance from the BBObject. + * + * Then it will get the Instance group from serviceInstance. + * + * @param execution + * @throws Exception + */ public void deleteInstanceGroup(BuildingBlockExecution execution) throws Exception { try { ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); aaiNetworkResources.deleteNetworkInstanceGroup(serviceInstance.getCollection().getInstanceGroup()); } catch (Exception ex) { + logger.error("Exception occurred in AAIDeleteTasks deleteInstanceGroup process", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + /** + * BPMN access method to delete the VolumeGroup from A&AI. + * + * It will extract the volumeGroup from the BBObject and cloudRegion from execution object . + * + * Then it will delete from A&AI. + * + * @param execution + * @throws Exception + */ public void deleteVolumeGroup(BuildingBlockExecution execution) { try { VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID); CloudRegion cloudRegion = execution.getGeneralBuildingBlock().getCloudRegion(); aaiVolumeGroupResources.deleteVolumeGroup(volumeGroup, cloudRegion); } catch (Exception ex) { + logger.error("Exception occurred in AAIDeleteTasks deleteVolumeGroup process", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + /** + * BPMN access method to delete the Configuration from A&AI. + * + * It will extract the configuration from the BBObject. + * + * Then it will delete from A&AI. + * + * @param execution + */ public void deleteConfiguration(BuildingBlockExecution execution) { try { Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID); aaiConfigurationResources.deleteConfiguration(configuration); } catch (Exception ex) { + logger.error("Exception occurred in AAIDeleteTasks deleteConfiguration process", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + /** + * BPMN access method to delete the InstanceGroupVnf from A&AI. + * + * It will extract the instanceGroup from the BBObject. + * + * Then it will delete from A&AI. + * + * @param execution + */ public void deleteInstanceGroupVnf(BuildingBlockExecution execution) { try { InstanceGroup instanceGroup = extractPojosForBB.extractByKey(execution, ResourceKey.INSTANCE_GROUP_ID); aaiInstanceGroupResources.deleteInstanceGroup(instanceGroup); } catch (Exception ex) { + logger.error("Exception occurred in AAIDeleteTasks deleteInstanceGroupVnf process", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + public void deleteNetworkPolicies(BuildingBlockExecution execution) { try { String fqdns = execution.getVariable(contrailNetworkPolicyFqdnList); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java index 20f4443291..86645391b4 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java @@ -92,6 +92,7 @@ public class AAIUpdateTasks { OrchestrationStatus.ASSIGNED); execution.setVariable("aaiServiceInstanceRollback", true); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusAssignedService", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -108,6 +109,7 @@ public class AAIUpdateTasks { aaiServiceInstanceResources.updateOrchestrationStatusServiceInstance(serviceInstance, OrchestrationStatus.ACTIVE); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusActiveService", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -122,6 +124,7 @@ public class AAIUpdateTasks { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); aaiVnfResources.updateOrchestrationStatusVnf(vnf, OrchestrationStatus.ASSIGNED); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusAssignedVnf", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -136,6 +139,7 @@ public class AAIUpdateTasks { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); aaiVnfResources.updateOrchestrationStatusVnf(vnf, OrchestrationStatus.ACTIVE); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusActiveVnf", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -155,6 +159,7 @@ public class AAIUpdateTasks { aaiVolumeGroupResources.updateOrchestrationStatusVolumeGroup(volumeGroup, cloudRegion, OrchestrationStatus.ASSIGNED); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusAssignedVolumeGroup", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -174,6 +179,7 @@ public class AAIUpdateTasks { aaiVolumeGroupResources.updateOrchestrationStatusVolumeGroup(volumeGroup, cloudRegion, OrchestrationStatus.ACTIVE); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusActiveVolumeGroup", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -193,6 +199,7 @@ public class AAIUpdateTasks { aaiVolumeGroupResources.updateOrchestrationStatusVolumeGroup(volumeGroup, cloudRegion, OrchestrationStatus.CREATED); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusCreatedVolumeGroup", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -215,6 +222,7 @@ public class AAIUpdateTasks { aaiVolumeGroupResources.updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateHeatStackIdVolumeGroup", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -231,6 +239,7 @@ public class AAIUpdateTasks { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); aaiVfModuleResources.updateOrchestrationStatusVfModule(vfModule, vnf, OrchestrationStatus.ASSIGNED); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusAssignedVfModule", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -247,6 +256,7 @@ public class AAIUpdateTasks { aaiVfModuleResources.updateOrchestrationStatusVfModule(vfModule, vnf, OrchestrationStatus.PENDING_ACTIVATION); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusPendingActivationVfModule", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -273,6 +283,9 @@ public class AAIUpdateTasks { aaiVfModuleResources.updateOrchestrationStatusVfModule(vfModule, vnf, OrchestrationStatus.ASSIGNED); } } catch (Exception ex) { + logger.error( + "Exception occurred in AAIUpdateTasks updateOrchestrationStatusAssignedOrPendingActivationVfModule", + ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -281,7 +294,7 @@ public class AAIUpdateTasks { * BPMN access method to update status of VfModule to Created in AAI * * @param execution - * + * */ public void updateOrchestrationStatusCreatedVfModule(BuildingBlockExecution execution) { try { @@ -289,6 +302,7 @@ public class AAIUpdateTasks { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); aaiVfModuleResources.updateOrchestrationStatusVfModule(vfModule, vnf, OrchestrationStatus.CREATED); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusCreatedVfModule", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -307,6 +321,7 @@ public class AAIUpdateTasks { aaiVfModuleResources.updateOrchestrationStatusVfModule(vfModule, vnf, OrchestrationStatus.CREATED); execution.setVariable("aaiDeactivateVfModuleRollback", true); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusDeactivateVfModule", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -346,6 +361,7 @@ public class AAIUpdateTasks { L3Network l3Network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID); updateNetworkAAI(l3Network, status); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateNetwork", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -386,6 +402,7 @@ public class AAIUpdateTasks { aaiCollectionResources.updateCollection(copiedNetworkCollection); execution.setVariable("aaiNetworkCollectionActivateRollback", true); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusActiveNetworkCollection", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -403,6 +420,7 @@ public class AAIUpdateTasks { aaiVfModuleResources.updateOrchestrationStatusVfModule(vfModule, vnf, OrchestrationStatus.ACTIVE); execution.setVariable("aaiActivateVfModuleRollback", true); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusActivateVfModule", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -423,6 +441,7 @@ public class AAIUpdateTasks { vfModule.setHeatStackId(heatStackId); aaiVfModuleResources.updateHeatStackIdVfModule(vfModule, vnf); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateHeatStackIdVfModule", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -466,6 +485,7 @@ public class AAIUpdateTasks { execution.setVariable("aaiNetworkActivateRollback", true); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateNetworkCreated", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -495,6 +515,7 @@ public class AAIUpdateTasks { } } } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateNetworkUpdated", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -509,6 +530,7 @@ public class AAIUpdateTasks { L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID); aaiNetworkResources.updateNetwork(l3network); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateObjectNetwork", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -524,6 +546,7 @@ public class AAIUpdateTasks { extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); aaiServiceInstanceResources.updateServiceInstance(serviceInstance); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateServiceInstance", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -538,6 +561,7 @@ public class AAIUpdateTasks { GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); aaiVnfResources.updateObjectVnf(genericVnf); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateObjectVnf", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -559,6 +583,7 @@ public class AAIUpdateTasks { aaiVfModuleResources.updateOrchestrationStatusVfModule(vfModule, vnf, OrchestrationStatus.ASSIGNED); execution.setVariable("aaiDeleteVfModuleRollback", true); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusDeleteVfModule", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -574,6 +599,7 @@ public class AAIUpdateTasks { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); aaiVfModuleResources.changeAssignVfModule(vfModule, vnf); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateModelVfModule", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -589,6 +615,7 @@ public class AAIUpdateTasks { aaiConfigurationResources.updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ASSIGNED); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusAssignFabricConfiguration", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -603,6 +630,8 @@ public class AAIUpdateTasks { Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID); aaiConfigurationResources.updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ACTIVE); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusActivateFabricConfiguration", + ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -618,6 +647,8 @@ public class AAIUpdateTasks { aaiConfigurationResources.updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ASSIGNED); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusDeactivateFabricConfiguration", + ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -640,6 +671,7 @@ public class AAIUpdateTasks { aaiVnfResources.updateObjectVnf(copiedGenericVnf); } } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateIpv4OamAddressVnf", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -662,6 +694,7 @@ public class AAIUpdateTasks { aaiVnfResources.updateObjectVnf(copiedGenericVnf); } } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateManagementV6AddressVnf", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -681,6 +714,7 @@ public class AAIUpdateTasks { aaiVfModuleResources.updateContrailServiceInstanceFqdnVfModule(vfModule, vnf); } } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateContrailServiceInstanceFqdnVfModule", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -695,6 +729,7 @@ public class AAIUpdateTasks { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); aaiVnfResources.updateOrchestrationStatusVnf(vnf, OrchestrationStatus.CONFIGASSIGNED); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusConfigAssignedVnf", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -704,12 +739,13 @@ public class AAIUpdateTasks { * * @param execution */ - public void updateOrchestrationStausConfigDeployConfigureVnf(BuildingBlockExecution execution) { + public void updateOrchestrationStatusConfigDeployConfigureVnf(BuildingBlockExecution execution) { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); aaiVnfResources.updateOrchestrationStatusVnf(vnf, OrchestrationStatus.CONFIGURE); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusConfigDeployConfigureVnf", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } @@ -720,12 +756,13 @@ public class AAIUpdateTasks { * * @param execution */ - public void updateOrchestrationStausConfigDeployConfiguredVnf(BuildingBlockExecution execution) { + public void updateOrchestrationStatusConfigDeployConfiguredVnf(BuildingBlockExecution execution) { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); aaiVnfResources.updateOrchestrationStatusVnf(vnf, OrchestrationStatus.CONFIGURED); } catch (Exception ex) { + logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusConfigDeployConfiguredVnf", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java index 9396f9dbfc..4285e9aa84 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java @@ -47,6 +47,7 @@ import static org.apache.commons.lang3.StringUtils.*; @Component public class VnfAdapterCreateTasks { + private static final Logger logger = LoggerFactory.getLogger(VnfAdapterCreateTasks.class); public static final String SDNCQUERY_RESPONSE = "SDNCQueryResponse_"; private static final String VNFREST_REQUEST = "VNFREST_Request"; @@ -85,7 +86,9 @@ public class VnfAdapterCreateTasks { + " exists in gBuildingBlock but does not have a selflink value"); } } catch (BBObjectNotFoundException bbException) { - // If there is not a vf module in the general building block (in aLaCarte case), we will not retrieve + logger.error("Exception occurred", bbException); + // If there is not a vf module in the general building block (in aLaCarte case), + // we will not retrieve // the SDNCQueryResponse and proceed as normal without throwing an error } @@ -94,6 +97,7 @@ public class VnfAdapterCreateTasks { genericVnf, volumeGroup, sdncVfModuleQueryResponse); execution.setVariable(VNFREST_REQUEST, createVolumeGroupRequest.toXmlString()); } catch (Exception ex) { + logger.error("Exception occurred", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -117,6 +121,8 @@ public class VnfAdapterCreateTasks { try { volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID); } catch (BBObjectNotFoundException bbException) { + logger.error("Exception occurred if bb objrct not found in VnfAdapterCreateTasks createVfModule ", + bbException); } CloudRegion cloudRegion = gBBInput.getCloudRegion(); RequestContext requestContext = gBBInput.getRequestContext(); @@ -129,9 +135,9 @@ public class VnfAdapterCreateTasks { volumeGroup, sdncVnfQueryResponse, sdncVfModuleQueryResponse); execution.setVariable(VNFREST_REQUEST, createVfModuleRequest.toXmlString()); } catch (Exception ex) { + logger.error("Exception occurred", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } - } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java index cdbe0db57c..6a8058938f 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java @@ -62,7 +62,7 @@ public class ConfigDeployVnf { * @param execution */ public void updateAAIConfigure(BuildingBlockExecution execution) { - aaiUpdateTask.updateOrchestrationStausConfigDeployConfigureVnf(execution); + aaiUpdateTask.updateOrchestrationStatusConfigDeployConfigureVnf(execution); } @@ -129,7 +129,7 @@ public class ConfigDeployVnf { * @param execution */ public void updateAAIConfigured(BuildingBlockExecution execution) { - aaiUpdateTask.updateOrchestrationStausConfigDeployConfiguredVnf(execution); + aaiUpdateTask.updateOrchestrationStatusConfigDeployConfiguredVnf(execution); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignVnf.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignVnf.java index e51774c12c..0afca71b99 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignVnf.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignVnf.java @@ -30,12 +30,15 @@ import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoInstanceGroup; import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; import org.onap.so.client.exception.ExceptionBuilder; import org.onap.so.client.orchestration.AAIInstanceGroupResources; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component() public class UnassignVnf { + private static final Logger logger = LoggerFactory.getLogger(UnassignVnf.class); @Autowired private ExceptionBuilder exceptionUtil; @Autowired @@ -45,6 +48,17 @@ public class UnassignVnf { @Autowired private AAIObjectInstanceNameGenerator aaiObjectInstanceNameGenerator; + /** + * BPMN access method to deleting instanceGroup in AAI. + * + * It will extract the vnf from BBobject ,It will get the instance group from the vnf and add it into a list. + * + * Then iterate that list and check the ModelInfoInstanceGroup type. + * + * Then it will delete that. + * + * @param execution + */ public void deleteInstanceGroups(BuildingBlockExecution execution) { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); @@ -56,6 +70,7 @@ public class UnassignVnf { } } } catch (Exception ex) { + logger.error("Exception occurred in UnassignVnf deleteInstanceGroups", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java index b85e33144f..f61b40ad23 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java @@ -52,6 +52,7 @@ import org.springframework.stereotype.Component; @Component public class SDNCActivateTasks extends AbstractSDNCTask { + private static final Logger logger = LoggerFactory.getLogger(SDNCActivateTasks.class); public static final String SDNC_REQUEST = "SDNCRequest"; @Autowired private SDNCVnfResources sdncVnfResources; @@ -66,6 +67,13 @@ public class SDNCActivateTasks extends AbstractSDNCTask { @Autowired private Environment env; + /** + * This method is used to prepare a SDNC request and set it to the execution Object. + * + * Which is used for activate the vnf. + * + * @param execution + */ public void activateVnf(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -82,13 +90,14 @@ public class SDNCActivateTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.VNF); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred in SDNCActivateTasks activateVnf process", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } /** * BPMN access method to perform Assign action on SDNC for L3Network - * + * * @param execution * @throws BBObjectNotFoundException */ @@ -112,6 +121,13 @@ public class SDNCActivateTasks extends AbstractSDNCTask { } } + /** + * This method is used to prepare a SDNC request and set it to the execution Object. + * + * Which is used for activate the activateVfModule. + * + * @param execution + */ public void activateVfModule(BuildingBlockExecution execution) { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); RequestContext requestContext = gBBInput.getRequestContext(); @@ -131,6 +147,7 @@ public class SDNCActivateTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.VFMODULE); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred in SDNCActivateTasks activateVfModule process", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java index 1dcdfa912c..b8f5c8629d 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java @@ -96,6 +96,7 @@ public class SDNCAssignTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.SERVICE); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -117,7 +118,6 @@ public class SDNCAssignTasks extends AbstractSDNCTask { Customer customer = gBBInput.getCustomer(); CloudRegion cloudRegion = gBBInput.getCloudRegion(); SDNCRequest sdncRequest = new SDNCRequest(); - GenericResourceApiVnfOperationInformation req = sdncVnfResources.assignVnf(vnf, serviceInstance, customer, cloudRegion, requestContext, Boolean.TRUE.equals(vnf.isCallHoming()), buildCallbackURI(sdncRequest)); @@ -125,10 +125,12 @@ public class SDNCAssignTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.VNF); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + /** * BPMN access method to assigning the vfModule in SDNC. * @@ -160,6 +162,7 @@ public class SDNCAssignTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.VFMODULE); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java index 3c42f76d73..96b656ff95 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java @@ -53,6 +53,7 @@ import org.springframework.stereotype.Component; @Component public class SDNCDeactivateTasks extends AbstractSDNCTask { + private static final Logger logger = LoggerFactory.getLogger(SDNCDeactivateTasks.class); public static final String SDNC_REQUEST = "SDNCRequest"; @Autowired private SDNCNetworkResources sdncNetworkResources; @@ -69,6 +70,12 @@ public class SDNCDeactivateTasks extends AbstractSDNCTask { @Autowired private Environment env; + /** + * This method is used to prepare a SDNC request and set it to the execution Object. Which is used for deactivate + * VfModule. + * + * @param execution + */ public void deactivateVfModule(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -86,13 +93,14 @@ public class SDNCDeactivateTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.VFMODULE); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred in SDNCDeactivateTasks deactivateVfModule", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } /** * BPMN access method to perform Service Topology Deactivate action on SDNC for Vnf - * + * * @param execution * @throws Exception */ @@ -113,15 +121,16 @@ public class SDNCDeactivateTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.VNF); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred in SDNCDeactivateTasks deactivateVnf", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } /* * BPMN access method to perform Service Topology Deactivate action on SDNC for Service Instance - * + * * @param execution - * + * * @throws Exception */ public void deactivateServiceInstance(BuildingBlockExecution execution) throws Exception { @@ -138,13 +147,14 @@ public class SDNCDeactivateTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.SERVICE); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred in SDNCDeactivateTasks deactivateServiceInstance", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } /** * BPMN access method to invoke deactivate on a L3Network object - * + * * @param execution */ public void deactivateNetwork(BuildingBlockExecution execution) { @@ -163,6 +173,7 @@ public class SDNCDeactivateTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.NETWORK); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred in SDNCDeactivateTasks deactivateNetwork", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java index 7478479a86..080d6d34b1 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java @@ -40,7 +40,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * This class is used for quering the SDNC + * This class is used for querying the SDNC. */ @Component public class SDNCQueryTasks { @@ -78,16 +78,19 @@ public class SDNCQueryTasks { String response = sdncVnfResources.queryVnf(genericVnf); execution.setVariable(SDNCQUERY_RESPONSE + genericVnf.getVnfId(), response); } catch (BadResponseException ex) { + logger.error("Exception occurred", ex); if (!ex.getMessage().equals(NO_RESPONSE_FROM_SDNC)) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SDNC); } else { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SO); } } catch (Exception ex) { + logger.error("Exception occurred", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SO); } } + /** * BPMN access method to query the SDNC for fetching the VfModule details. * @@ -116,12 +119,14 @@ public class SDNCQueryTasks { + " exists in gBuildingBlock but does not have a selflink value"); } } catch (BadResponseException ex) { + logger.error("Exception occurred for BadResponse ", ex); if (!ex.getMessage().equals(NO_RESPONSE_FROM_SDNC)) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SDNC); } else { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SO); } } catch (Exception ex) { + logger.error("Exception occurred", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } @@ -144,20 +149,26 @@ public class SDNCQueryTasks { + " exists in gBuildingBlock but does not have a selflink value"); } } catch (BBObjectNotFoundException bbException) { - // If there is not a vf module in the general building block, we will not call SDNC and proceed as normal + logger.error("Error occurred if bb object not found in SDNCQueryTasks queryVfModuleForVolumeGroup ", + bbException); + // If there is not a vf module in the general building block, we will not call + // SDNC and proceed as normal // without throwing an error - // If we see a bb object not found exception for something that is not a vf module id, then we should throw + // If we see a bb object not found exception for something that is not a vf + // module id, then we should throw // the error as normal if (!ResourceKey.VF_MODULE_ID.equals(bbException.getResourceKey())) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, bbException, TargetEntity.SO); } } catch (BadResponseException ex) { + logger.error("Error occurred for BadResponseException in SDNCQueryTasks queryVfModuleForVolumeGroup ", ex); if (!ex.getMessage().equals(NO_RESPONSE_FROM_SDNC)) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SDNC); } else { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SO); } } catch (Exception ex) { + logger.error("Exception occurred", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex, TargetEntity.SO); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java index e3c9785ab2..4817ba8b61 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java @@ -53,6 +53,7 @@ import org.springframework.stereotype.Component; @Component public class SDNCUnassignTasks extends AbstractSDNCTask { + private static final Logger logger = LoggerFactory.getLogger(SDNCUnassignTasks.class); public static final String SDNC_REQUEST = "SDNCRequest"; @Autowired private SDNCServiceInstanceResources sdncSIResources; @@ -69,6 +70,13 @@ public class SDNCUnassignTasks extends AbstractSDNCTask { @Autowired private Environment env; + /** + * This method is used to prepare a SDNC request and set it to the execution Object. + * + * Which is used for unassign the ServiceInstance. + * + * @param execution + */ public void unassignServiceInstance(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -83,10 +91,18 @@ public class SDNCUnassignTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.SERVICE); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred in SDNCUnassignTasks unassignServiceInstance", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + /** + * This method is used to prepare a SDNC request and set it to the execution Object. + * + * Which is used for unassign the VfModule. + * + * @param execution + */ public void unassignVfModule(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -102,10 +118,18 @@ public class SDNCUnassignTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.VFMODULE); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred in SDNCUnassignTasks unassignVfModule", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + /** + * This method is used to prepare a SDNC request and set it to the execution Object. + * + * Which is used for unassign the Vnf. + * + * @param execution + */ public void unassignVnf(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -122,10 +146,18 @@ public class SDNCUnassignTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.VNF); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred in SDNCUnassignTasks unassignVnf", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + /** + * This method is used to prepare a SDNC request and set it to the execution Object. + * + * Which is used for unassign the Network. + * + * @param execution + */ public void unassignNetwork(BuildingBlockExecution execution) throws Exception { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); @@ -144,6 +176,7 @@ public class SDNCUnassignTasks extends AbstractSDNCTask { sdncRequest.setTopology(SDNCTopology.NETWORK); execution.setVariable(SDNC_REQUEST, sdncRequest); } catch (Exception ex) { + logger.error("Exception occurred in SDNCUnassignTasks unassignNetwork", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java index 7eaf011c75..8822bc39dd 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/OrchestrationStatusValidator.java @@ -55,7 +55,6 @@ public class OrchestrationStatusValidator { private static final String MULTI_STAGE_DESIGN_OFF = "false"; private static final String MULTI_STAGE_DESIGN_ON = "true"; - @Autowired private ExtractPojosForBB extractPojosForBB; @Autowired @@ -63,6 +62,7 @@ public class OrchestrationStatusValidator { @Autowired private CatalogDbClient catalogDbClient; + /** * This method validate's the status of the OrchestrationStatus against the buildingBlockDetail ResourceType * @@ -137,7 +137,8 @@ public class OrchestrationStatusValidator { OrchestrationStatusValidationDirective.VALIDATION_SKIPPED); return; default: - // can't currently get here, so not tested. Added in case enum is expanded without a change to this + // can't currently get here, so not tested. Added in case enum is expanded + // without a change to this // code throw new OrchestrationStatusValidationException( String.format(UNKNOWN_RESOURCE_TYPE, buildingBlockFlowName, @@ -172,6 +173,9 @@ public class OrchestrationStatusValidator { execution.setVariable(ORCHESTRATION_STATUS_VALIDATION_RESULT, orchestrationStatusStateTransitionDirective.getFlowDirective()); } catch (BBObjectNotFoundException ex) { + logger.error( + "Error occurred for bb object notfound in OrchestrationStatusValidator validateOrchestrationStatus ", + ex); if (execution.getFlowToBeCalled().contains("Unassign")) { execution.setVariable(ORCHESTRATION_STATUS_VALIDATION_RESULT, OrchestrationStatusValidationDirective.SILENT_SUCCESS); @@ -179,6 +183,7 @@ public class OrchestrationStatusValidator { exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, ex); } } catch (Exception e) { + logger.error("Exception occurred", e); exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, e); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java index e6dd38ee1e..1f07166b60 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java @@ -93,6 +93,7 @@ public class WorkflowAction { private static final String WORKFLOW_ACTION_ERROR_MESSAGE = "WorkflowActionErrorMessage"; private static final String SERVICE_INSTANCES = "serviceInstances"; + private static final String SERVICE_INSTANCE = "serviceInstance"; private static final String VF_MODULES = "vfModules"; private static final String WORKFLOW_ACTION_WAS_UNABLE_TO_VERIFY_IF_THE_INSTANCE_NAME_ALREADY_EXIST_IN_AAI = "WorkflowAction was unable to verify if the instance name already exist in AAI."; @@ -107,7 +108,7 @@ public class WorkflowAction { private static final String ASSIGNINSTANCE = "assignInstance"; private static final String CREATEINSTANCE = "createInstance"; private static final String USERPARAMSERVICE = "service"; - private static final String supportedTypes = + private static final String SUPPORTEDTYPES = "vnfs|vfModules|networks|networkCollections|volumeGroups|serviceInstances|instanceGroups"; private static final String HOMINGSOLUTION = "Homing_Solution"; private static final String FABRIC_CONFIGURATION = "FabricConfiguration"; @@ -123,6 +124,8 @@ public class WorkflowAction { private static final String NAME_EXISTS_WITH_DIFF_CUSTOMIZATION_ID = "(%s), same parent and different customization id (%s)"; private static final String NAME_EXISTS_WITH_DIFF_PARENT = "(%s) id (%s) and different parent relationship"; + private static final String CREATENETWORKBB = "CreateNetworkBB"; + private static final String ACTIVATENETWORKBB = "ActivateNetworkBB"; @Autowired protected BBInputSetup bbInputSetup; @@ -183,12 +186,14 @@ public class WorkflowAction { try { cloudOwner = requestDetails.getCloudConfiguration().getCloudOwner(); } catch (Exception ex) { + logger.error("Exception in getCloundOwner", ex); cloudOwner = environment.getProperty(defaultCloudOwner); } boolean suppressRollback = false; try { suppressRollback = requestDetails.getRequestInfo().getSuppressRollback(); } catch (Exception ex) { + logger.error("Exception in getSuppressRollback", ex); suppressRollback = false; } execution.setVariable("suppressRollback", suppressRollback); @@ -209,7 +214,7 @@ public class WorkflowAction { } else { resourceId = resource.getResourceId(); } - if ((serviceInstanceId == null || serviceInstanceId.equals("")) && resourceType == WorkflowType.SERVICE) { + if ((serviceInstanceId == null || serviceInstanceId.isEmpty()) && resourceType == WorkflowType.SERVICE) { serviceInstanceId = resourceId; } execution.setVariable("resourceId", resourceId); @@ -300,9 +305,9 @@ public class WorkflowAction { traverseCatalogDbService(execution, sIRequest, resourceCounter, aaiResourceIds); } } else if (resourceType == WorkflowType.SERVICE - && (requestAction.equalsIgnoreCase("activateInstance") - || requestAction.equalsIgnoreCase("unassignInstance") - || requestAction.equalsIgnoreCase("deleteInstance") + && ("activateInstance".equalsIgnoreCase(requestAction) + || "unassignInstance".equalsIgnoreCase(requestAction) + || "deleteInstance".equalsIgnoreCase(requestAction) || requestAction.equalsIgnoreCase("activate" + FABRIC_CONFIGURATION))) { // SERVICE-MACRO-ACTIVATE, SERVICE-MACRO-UNASSIGN, and // SERVICE-MACRO-DELETE @@ -310,10 +315,10 @@ public class WorkflowAction { // to query the SI in AAI to find related instances. traverseAAIService(execution, resourceCounter, resourceId, aaiResourceIds); } else if (resourceType == WorkflowType.SERVICE - && requestAction.equalsIgnoreCase("deactivateInstance")) { + && "deactivateInstance".equalsIgnoreCase(requestAction)) { resourceCounter.add(new Resource(WorkflowType.SERVICE, "", false)); - } else if (resourceType == WorkflowType.VNF && (requestAction.equalsIgnoreCase("replaceInstance") - || (requestAction.equalsIgnoreCase("recreateInstance")))) { + } else if (resourceType == WorkflowType.VNF && ("replaceInstance".equalsIgnoreCase(requestAction) + || ("recreateInstance".equalsIgnoreCase(requestAction)))) { traverseAAIVnf(execution, resourceCounter, workflowResourceIds.getServiceInstanceId(), workflowResourceIds.getVnfId(), aaiResourceIds); } else { @@ -363,7 +368,7 @@ public class WorkflowAction { sIRequest.getRequestDetails().getRequestParameters().getUserParams(); for (Map<String, Object> params : userParams) { if (params.containsKey(HOMINGSOLUTION)) { - if (params.get(HOMINGSOLUTION).equals("none")) { + if ("none".equals(params.get(HOMINGSOLUTION))) { execution.setVariable("homing", false); } else { execution.setVariable("homing", true); @@ -447,7 +452,7 @@ public class WorkflowAction { protected boolean isConfiguration(List<OrchestrationFlow> orchFlows) { for (OrchestrationFlow flow : orchFlows) { - if (flow.getFlowName().contains("Configuration") && !flow.getFlowName().equals("ConfigurationScaleOutBB")) { + if (flow.getFlowName().contains(CONFIGURATION) && !"ConfigurationScaleOutBB".equals(flow.getFlowName())) { return true; } } @@ -715,7 +720,7 @@ public class WorkflowAction { protected boolean vrfConfigurationAlreadyExists(RelatedInstance relatedVpnBinding, Configuration vrfConfiguration, AAIResultWrapper configWrapper) throws VrfBondingServiceException { - if (vrfConfiguration.getConfigurationType().equalsIgnoreCase("VRF-ENTRY")) { + if ("VRF-ENTRY".equalsIgnoreCase(vrfConfiguration.getConfigurationType())) { Optional<Relationships> relationshipsConfigOp = configWrapper.getRelationships(); if (relationshipsConfigOp.isPresent()) { Optional<VpnBinding> relatedInfraVpnBindingOp = @@ -752,7 +757,7 @@ public class WorkflowAction { if (collectionResourceCustomization.getCollectionResource().getInstanceGroup() != null) { String toscaNodeType = collectionResourceCustomization.getCollectionResource() .getInstanceGroup().getToscaNodeType(); - if (toscaNodeType != null && toscaNodeType.contains("NetworkCollection")) { + if (toscaNodeType != null && toscaNodeType.contains(NETWORKCOLLECTION)) { int minNetworks = 0; org.onap.so.db.catalog.beans.InstanceGroup instanceGroup = collectionResourceCustomization.getCollectionResource().getInstanceGroup(); @@ -885,6 +890,7 @@ public class WorkflowAction { } } } catch (Exception ex) { + logger.error("Exception in traverseAAIService", ex); buildAndThrowException(execution, "Could not find existing Service Instance or related Instances to execute the request on."); } @@ -926,6 +932,7 @@ public class WorkflowAction { } } } catch (Exception ex) { + logger.error("Exception in traverseAAIVnf", ex); buildAndThrowException(execution, "Could not find existing Vnf or related Instances to execute the request on."); } @@ -953,6 +960,7 @@ public class WorkflowAction { } } } catch (Exception ex) { + logger.error("Exception in findConfigurationsInsideVfModule", ex); buildAndThrowException(execution, "Failed to find Configuration object from the vfModule."); } } @@ -1015,8 +1023,8 @@ public class WorkflowAction { vfModuleCustomizationUUID = vfModule.getModelInfo().getModelCustomizationUuid(); } - if (!vnfCustomizationUUID.equals("") - && !vfModuleCustomizationUUID.equals("")) { + if (!vnfCustomizationUUID.isEmpty() + && !vfModuleCustomizationUUID.isEmpty()) { List<CvnfcConfigurationCustomization> configs = traverseCatalogDbForConfiguration( validate.getModelInfo().getModelVersionId(), @@ -1110,7 +1118,7 @@ public class WorkflowAction { protected Resource extractResourceIdAndTypeFromUri(String uri) { Pattern patt = Pattern.compile( - "[vV]\\d+.*?(?:(?:/(?<type>" + supportedTypes + ")(?:/(?<id>[^/]+))?)(?:/(?<action>[^/]+))?)?$"); + "[vV]\\d+.*?(?:(?:/(?<type>" + SUPPORTEDTYPES + ")(?:/(?<id>[^/]+))?)(?:/(?<action>[^/]+))?)?$"); Matcher m = patt.matcher(uri); Boolean generated = false; @@ -1123,15 +1131,15 @@ public class WorkflowAction { throw new IllegalArgumentException("Uri could not be parsed. No type found. " + uri); } if (action == null) { - if (type.equals(SERVICE_INSTANCES) && (id == null || id.equals("assign"))) { + if (type.equals(SERVICE_INSTANCES) && (id == null || "assign".equals(id))) { id = UUID.randomUUID().toString(); generated = true; - } else if (type.equals(VF_MODULES) && id.equals("scaleOut")) { + } else if (type.equals(VF_MODULES) && "scaleOut".equals(id)) { id = UUID.randomUUID().toString(); generated = true; } } else { - if (action.matches(supportedTypes)) { + if (action.matches(SUPPORTEDTYPES)) { id = UUID.randomUUID().toString(); generated = true; type = action; @@ -1159,7 +1167,7 @@ public class WorkflowAction { .equalsIgnoreCase(reqDetails.getModelInfo().getModelVersionId())) { return serviceInstanceAAI.get().getServiceInstanceId(); } else { - throw new DuplicateNameException("serviceInstance", + throw new DuplicateNameException(SERVICE_INSTANCE, String.format(NAME_EXISTS_WITH_DIFF_VERSION_ID, instanceName, reqDetails.getModelInfo().getModelVersionId())); } @@ -1170,7 +1178,7 @@ public class WorkflowAction { if (aaiServiceInstances.getServiceInstance() != null && !aaiServiceInstances.getServiceInstance().isEmpty()) { if (aaiServiceInstances.getServiceInstance().size() > 1) { - throw new DuplicateNameException("serviceInstance", + throw new DuplicateNameException(SERVICE_INSTANCE, String.format(NAME_EXISTS_MULTIPLE, instanceName)); } else { ServiceInstance si = @@ -1178,7 +1186,7 @@ public class WorkflowAction { Map<String, String> keys = bbInputSetupUtils.getURIKeysFromServiceInstance(si.getServiceInstanceId()); - throw new DuplicateNameException("serviceInstance", + throw new DuplicateNameException(SERVICE_INSTANCE, String.format(NAME_EXISTS_WITH_DIFF_COMBINATION, instanceName, keys.get("global-customer-id"), keys.get("service-type"), si.getModelVersionId())); @@ -1295,7 +1303,7 @@ public class WorkflowAction { } protected String convertTypeFromPlural(String type) { - if (!type.matches(supportedTypes)) { + if (!type.matches(SUPPORTEDTYPES)) { return type; } else { if (type.equals(SERVICE_INSTANCES)) { @@ -1317,31 +1325,31 @@ public class WorkflowAction { String virtualLinkKey = ebb.getBuildingBlock().getVirtualLinkKey(); sortedOrchFlows.add(ebb); for (ExecuteBuildingBlock ebb2 : orchFlows) { - if (!isVirtualLink && ebb2.getBuildingBlock().getBpmnFlowName().equals("CreateNetworkBB") + if (!isVirtualLink && ebb2.getBuildingBlock().getBpmnFlowName().equals(CREATENETWORKBB) && ebb2.getBuildingBlock().getKey().equalsIgnoreCase(key)) { sortedOrchFlows.add(ebb2); break; } - if (isVirtualLink && ebb2.getBuildingBlock().getBpmnFlowName().equals("CreateNetworkBB") + if (isVirtualLink && ebb2.getBuildingBlock().getBpmnFlowName().equals(CREATENETWORKBB) && ebb2.getBuildingBlock().getVirtualLinkKey().equalsIgnoreCase(virtualLinkKey)) { sortedOrchFlows.add(ebb2); break; } } for (ExecuteBuildingBlock ebb2 : orchFlows) { - if (!isVirtualLink && ebb2.getBuildingBlock().getBpmnFlowName().equals("ActivateNetworkBB") + if (!isVirtualLink && ebb2.getBuildingBlock().getBpmnFlowName().equals(ACTIVATENETWORKBB) && ebb2.getBuildingBlock().getKey().equalsIgnoreCase(key)) { sortedOrchFlows.add(ebb2); break; } - if (isVirtualLink && ebb2.getBuildingBlock().getBpmnFlowName().equals("ActivateNetworkBB") + if (isVirtualLink && ebb2.getBuildingBlock().getBpmnFlowName().equals(ACTIVATENETWORKBB) && ebb2.getBuildingBlock().getVirtualLinkKey().equalsIgnoreCase(virtualLinkKey)) { sortedOrchFlows.add(ebb2); break; } } - } else if (ebb.getBuildingBlock().getBpmnFlowName().equals("CreateNetworkBB") - || ebb.getBuildingBlock().getBpmnFlowName().equals("ActivateNetworkBB")) { + } else if (ebb.getBuildingBlock().getBpmnFlowName().equals(CREATENETWORKBB) + || ebb.getBuildingBlock().getBpmnFlowName().equals(ACTIVATENETWORKBB)) { continue; } else if (!ebb.getBuildingBlock().getBpmnFlowName().equals("")) { sortedOrchFlows.add(ebb); @@ -1424,7 +1432,7 @@ public class WorkflowAction { } } else if (orchFlow.getFlowName().contains(VFMODULE)) { List<Resource> vfModuleResourcesSorted = null; - if (requestAction.equals("createInstance") || requestAction.equals("assignInstance") + if (requestAction.equals(CREATEINSTANCE) || requestAction.equals(ASSIGNINSTANCE) || requestAction.equals("activateInstance")) { vfModuleResourcesSorted = sortVfModulesByBaseFirst(resourceCounter.stream() .filter(x -> WorkflowType.VFMODULE == x.getResourceType()).collect(Collectors.toList())); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java index 073dead8b3..100f81a0c7 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java @@ -40,7 +40,6 @@ import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils; import org.onap.so.client.aai.AAIObjectType; import org.onap.so.client.exception.ExceptionBuilder; import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization; -import org.onap.so.db.catalog.beans.VnfResourceCustomization; import org.onap.so.db.catalog.client.CatalogDbClient; import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.db.request.client.RequestsDbClient; @@ -65,6 +64,9 @@ public class WorkflowActionBBTasks { private static final String FABRIC_CONFIGURATION = "FabricConfiguration"; private static final String ASSIGN_FABRIC_CONFIGURATION_BB = "AssignFabricConfigurationBB"; private static final String ACTIVATE_FABRIC_CONFIGURATION_BB = "ActivateFabricConfigurationBB"; + private static final String COMPLETED = "completed"; + private static final String HANDLINGCODE = "handlingCode"; + private static final String ROLLBACKTOCREATED = "RollbackToCreated"; protected String maxRetries = "mso.rainyDay.maxRetries"; private static final Logger logger = LoggerFactory.getLogger(WorkflowActionBBTasks.class); @@ -98,9 +100,9 @@ public class WorkflowActionBBTasks { execution.setVariable("buildingBlock", ebb); currentSequence++; if (currentSequence >= flowsToExecute.size()) { - execution.setVariable("completed", true); + execution.setVariable(COMPLETED, true); } else { - execution.setVariable("completed", false); + execution.setVariable(COMPLETED, false); } execution.setVariable(G_CURRENT_SEQUENCE, currentSequence); } @@ -114,7 +116,8 @@ public class WorkflowActionBBTasks { } } catch (Exception ex) { logger.warn( - "Bpmn Flow Statistics was unable to update Request Db with the new completion percentage. Competion percentage may be invalid."); + "Bpmn Flow Statistics was unable to update Request Db with the new completion percentage. Competion percentage may be invalid.", + ex); } } @@ -236,7 +239,7 @@ public class WorkflowActionBBTasks { } public void checkRetryStatus(DelegateExecution execution) { - String handlingCode = (String) execution.getVariable("handlingCode"); + String handlingCode = (String) execution.getVariable(HANDLINGCODE); String requestId = (String) execution.getVariable(G_REQUEST_ID); String retryDuration = (String) execution.getVariable("RetryDuration"); int retryCount = (int) execution.getVariable(RETRY_COUNT); @@ -244,11 +247,11 @@ public class WorkflowActionBBTasks { try { envMaxRetries = Integer.parseInt(this.environment.getProperty(maxRetries)); } catch (Exception ex) { - logger.error("Could not read maxRetries from config file. Setting max to 5 retries"); + logger.error("Could not read maxRetries from config file. Setting max to 5 retries", ex); envMaxRetries = 5; } int nextCount = retryCount + 1; - if (handlingCode.equals("Retry")) { + if ("Retry".equals(handlingCode)) { workflowActionBBFailure.updateRequestErrorStatusMessage(execution); try { InfraActiveRequests request = requestDbclient.getInfraActiveRequestbyRequestId(requestId); @@ -259,8 +262,8 @@ public class WorkflowActionBBTasks { logger.warn("Failed to update Request Db Infra Active Requests with Retry Status", ex); } if (retryCount < envMaxRetries) { - int currSequence = (int) execution.getVariable("gCurrentSequence"); - execution.setVariable("gCurrentSequence", currSequence - 1); + int currSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE); + execution.setVariable(G_CURRENT_SEQUENCE, currSequence - 1); execution.setVariable(RETRY_COUNT, nextCount); } else { workflowAction.buildAndThrowException(execution, @@ -301,15 +304,15 @@ public class WorkflowActionBBTasks { } } - String handlingCode = (String) execution.getVariable("handlingCode"); + String handlingCode = (String) execution.getVariable(HANDLINGCODE); List<ExecuteBuildingBlock> rollbackFlowsFiltered = new ArrayList<>(); rollbackFlowsFiltered.addAll(rollbackFlows); - if (handlingCode.equals("RollbackToAssigned") || handlingCode.equals("RollbackToCreated")) { + if ("RollbackToAssigned".equals(handlingCode) || ROLLBACKTOCREATED.equals(handlingCode)) { for (int i = 0; i < rollbackFlows.size(); i++) { if (rollbackFlows.get(i).getBuildingBlock().getBpmnFlowName().contains("Unassign")) { rollbackFlowsFiltered.remove(rollbackFlows.get(i)); } else if (rollbackFlows.get(i).getBuildingBlock().getBpmnFlowName().contains("Delete") - && handlingCode.equals("RollbackToCreated")) { + && ROLLBACKTOCREATED.equals(handlingCode)) { rollbackFlowsFiltered.remove(rollbackFlows.get(i)); } } @@ -321,9 +324,9 @@ public class WorkflowActionBBTasks { else execution.setVariable("isRollbackNeeded", true); execution.setVariable("flowsToExecute", rollbackFlowsFiltered); - execution.setVariable("handlingCode", "PreformingRollback"); + execution.setVariable(HANDLINGCODE, "PreformingRollback"); execution.setVariable("isRollback", true); - execution.setVariable("gCurrentSequence", 0); + execution.setVariable(G_CURRENT_SEQUENCE, 0); execution.setVariable(RETRY_COUNT, 0); } else { workflowAction.buildAndThrowException(execution, @@ -354,6 +357,7 @@ public class WorkflowActionBBTasks { } requestDbclient.updateInfraActiveRequests(request); } catch (Exception ex) { + logger.error("Exception in updateInstanceId", ex); workflowAction.buildAndThrowException(execution, "Failed to update Request db with instanceId"); } } @@ -361,12 +365,12 @@ public class WorkflowActionBBTasks { public void postProcessingExecuteBB(DelegateExecution execution) { List<ExecuteBuildingBlock> flowsToExecute = (List<ExecuteBuildingBlock>) execution.getVariable("flowsToExecute"); - String handlingCode = (String) execution.getVariable("handlingCode"); + String handlingCode = (String) execution.getVariable(HANDLINGCODE); final boolean aLaCarte = (boolean) execution.getVariable(G_ALACARTE); int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE); ExecuteBuildingBlock ebb = flowsToExecute.get(currentSequence - 1); String bbFlowName = ebb.getBuildingBlock().getBpmnFlowName(); - if (bbFlowName.equalsIgnoreCase("ActivateVfModuleBB") && aLaCarte && handlingCode.equalsIgnoreCase("Success")) { + if ("ActivateVfModuleBB".equalsIgnoreCase(bbFlowName) && aLaCarte && "Success".equalsIgnoreCase(handlingCode)) { postProcessingExecuteBBActivateVfModule(execution, ebb, flowsToExecute); } } @@ -410,16 +414,16 @@ public class WorkflowActionBBTasks { .forEach(executeBB -> logger.info("Flows to Execute After Post Processing: {}", executeBB.getBuildingBlock().getBpmnFlowName())); execution.setVariable("flowsToExecute", flowsToExecute); - execution.setVariable("completed", false); + execution.setVariable(COMPLETED, false); } else { - logger.debug("No cvnfcCustomization found for customizationId: " + modelCustomizationId); + logger.debug("No cvnfcCustomization found for customizationId: {}", modelCustomizationId); } } } catch (EntityNotFoundException e) { - logger.debug(e.getMessage() + " Will not be running Fabric Config Building Blocks"); + logger.debug("Will not be running Fabric Config Building Blocks", e); } catch (Exception e) { String errorMessage = "Error occurred in post processing of Vf Module create"; - execution.setVariable("handlingCode", "RollbackToCreated"); + execution.setVariable(HANDLINGCODE, ROLLBACKTOCREATED); execution.setVariable("WorkflowActionErrorMessage", errorMessage); logger.error(errorMessage, e); } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java index 905f244278..c337f7f1b5 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java @@ -733,7 +733,7 @@ public class AAIUpdateTasksTest extends BaseTaskTest { doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf, OrchestrationStatus.CONFIGURE); - aaiUpdateTasks.updateOrchestrationStausConfigDeployConfigureVnf(execution); + aaiUpdateTasks.updateOrchestrationStatusConfigDeployConfigureVnf(execution); } @Test @@ -741,6 +741,6 @@ public class AAIUpdateTasksTest extends BaseTaskTest { doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf, OrchestrationStatus.CONFIGURED); - aaiUpdateTasks.updateOrchestrationStausConfigDeployConfiguredVnf(execution); + aaiUpdateTasks.updateOrchestrationStatusConfigDeployConfiguredVnf(execution); } } diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/connector/http/HttpClientConnector.java b/cloudify-client/src/main/java/org/onap/so/cloudify/connector/http/HttpClientConnector.java index e1992d98ca..ba6a5911b7 100644 --- a/cloudify-client/src/main/java/org/onap/so/cloudify/connector/http/HttpClientConnector.java +++ b/cloudify-client/src/main/java/org/onap/so/cloudify/connector/http/HttpClientConnector.java @@ -232,8 +232,12 @@ public class HttpClientConnector implements CloudifyClientConnector { } // Get here on an error response (4XX-5XX) - throw new CloudifyResponseException(httpResponse.getStatusLine().getReasonPhrase(), - httpResponse.getStatusLine().getStatusCode(), httpClientResponse); + if (httpResponse != null) { + throw new CloudifyResponseException(httpResponse.getStatusLine().getReasonPhrase(), + httpResponse.getStatusLine().getStatusCode(), httpClientResponse); + } else { + throw new CloudifyResponseException("Null httpResponse", 0, httpClientResponse); + } } } diff --git a/common/src/main/java/org/onap/so/client/graphinventory/entities/DSLQueryBuilder.java b/common/src/main/java/org/onap/so/client/graphinventory/entities/DSLQueryBuilder.java index ffbb86f023..ad3bb6c311 100644 --- a/common/src/main/java/org/onap/so/client/graphinventory/entities/DSLQueryBuilder.java +++ b/common/src/main/java/org/onap/so/client/graphinventory/entities/DSLQueryBuilder.java @@ -20,6 +20,7 @@ package org.onap.so.client.graphinventory.entities; +import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -49,8 +50,24 @@ public class DSLQueryBuilder<S, E> implements QueryStep { } public DSLQueryBuilder<S, E> output() { - if (steps.get(steps.size() - 1) instanceof DSLNode) { + Object obj = steps.get(steps.size() - 1); + if (obj instanceof DSLNode) { ((DSLNode) steps.get(steps.size() - 1)).output(); + } else if (obj.getClass().getName().contains("$$Lambda$")) { + // process lambda expressions + for (Field f : obj.getClass().getDeclaredFields()) { + f.setAccessible(true); + Object o; + try { + o = f.get(obj); + if (o instanceof DSLQueryBuilder && ((DSLQueryBuilder) o).steps.get(0) instanceof DSLNode) { + ((DSLNode) ((DSLQueryBuilder) o).steps.get(0)).output(); + } + } catch (IllegalArgumentException | IllegalAccessException e) { + } + f.setAccessible(false); + break; + } } return this; } diff --git a/common/src/test/java/org/onap/so/client/aai/DSLQueryBuilderTest.java b/common/src/test/java/org/onap/so/client/aai/DSLQueryBuilderTest.java index 590e83827b..fb45652d53 100644 --- a/common/src/test/java/org/onap/so/client/aai/DSLQueryBuilderTest.java +++ b/common/src/test/java/org/onap/so/client/aai/DSLQueryBuilderTest.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import org.junit.Test; import org.onap.so.client.graphinventory.entities.DSLNode; +import org.onap.so.client.graphinventory.entities.DSLNodeKey; import org.onap.so.client.graphinventory.entities.DSLQueryBuilder; import org.onap.so.client.graphinventory.entities.__; @@ -118,4 +119,30 @@ public class DSLQueryBuilderTest { assertTrue(builder.equals( "cloud-region('cloud-owner', 'owner')('cloud-region-id', 'id') > vlan-tag*('vlan-id-outer', 167)('my-boolean', true)")); } + + @Test + public void outputOnNodeLambdasTest() { + DSLQueryBuilder<DSLNode, DSLNode> builder = + new DSLQueryBuilder<>(new DSLNode(AAIObjectType.L_INTERFACE, new DSLNodeKey("interface-id", "myId"))); + + builder.to(AAIObjectType.VSERVER, __.key("vserver-name", "myName")).output().to(AAIObjectType.P_INTERFACE) + .output(); + assertEquals("l-interface('interface-id', 'myId') > vserver*('vserver-name', 'myName') > p-interface*", + builder.build()); + } + + @Test + public void skipOutputOnUnionTest() { + DSLQueryBuilder<DSLNode, DSLNode> builder = + new DSLQueryBuilder<>(new DSLNode(AAIObjectType.GENERIC_VNF, __.key("vnf-id", "vnfId")).output()); + + builder.union(__.node(AAIObjectType.PSERVER).output().to(__.node(AAIObjectType.COMPLEX).output()), + __.node(AAIObjectType.VSERVER) + .to(__.node(AAIObjectType.PSERVER).output().to(__.node(AAIObjectType.COMPLEX).output()))) + .output(); + + assertEquals( + "generic-vnf*('vnf-id', 'vnfId') > " + "[ pserver* > complex*, " + "vserver > pserver* > complex* ]", + builder.build()); + } } diff --git a/docs/api/apis/SO_Interface.rst b/docs/api/apis/consumed-apis.rst index d1586eb5d0..0ef69c4da1 100644 --- a/docs/api/apis/SO_Interface.rst +++ b/docs/api/apis/consumed-apis.rst @@ -2,1154 +2,11 @@ .. http://creativecommons.org/licenses/by/4.0 .. Copyright 2018 Huawei Technologies Co., Ltd. -SO Interfaces -============= +API consumed by SO +================== .. image:: ../../images/SO_1.png -SO APIs ----------------- - -North Bound APIs ----------------- -Create service instance -+++++++++++++++++++++++ - -+--------------------+------------------------------------------------------------+ -|Interface Definition|Description | -+====================+============================================================+ -|URI |/onap/so/infra/serviceInstantiation/serviceInstances/v6 | -+--------------------+------------------------------------------------------------+ -|Operation Type |POST | -+--------------------+------------------------------------------------------------+ -|Content-Type |application/json | -+--------------------+------------------------------------------------------------+ - -Request Body: - -+----------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+================+=========+===========+==========================+===========================================+ -|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | -+----------------+---------+-----------+--------------------------+-------------------------------------------+ - -RequestDetails Object - -+-------------------+--------------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+===================+==========================+=================================================+ -|modelInfo |modelInfo Object |Content of modelInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|requestInfo |requestInfo Object |Content of requestInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|requestParameters |requestParameters Object |Content of requestParameters object. | -+-------------------+--------------------------+-------------------------------------------------+ -|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. | -+-------------------+--------------------------+-------------------------------------------------+ -|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. | -+-------------------+--------------------------+-------------------------------------------------+ -|project |project Object |Content of project object. | -+-------------------+--------------------------+-------------------------------------------------+ -|owningEntity |owningEntity Object |Content of owningEntity object. | -+-------------------+--------------------------+-------------------------------------------------+ -|platform |platform Object |Content of platform object. | -+-------------------+--------------------------+-------------------------------------------------+ -|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. | -+-------------------+--------------------------+-------------------------------------------------+ - -ModelInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|ModelType |String |Type of model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelInvariantId |String |The Model Invariant Id. | -+-------------------------+------------------+-------------------------------------------------+ -|ModelNameVersionId |String |The modelname Version Id | -+-------------------------+------------------+-------------------------------------------------+ -|ModelName |String |Name of the Model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelVersion |String |Version of the model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelCustomization Name |String |The Model Customization name | -+-------------------------+------------------+-------------------------------------------------+ -|modelCustomizationUuid |String |The Model Customization UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelVersionId |String |The Model version id | -+-------------------------+------------------+-------------------------------------------------+ -|modelUuid |String |The Model UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelInvariantUuid |String |The Model Invariant UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelInstanceName |String |The Model Instance name | -+-------------------------+------------------+-------------------------------------------------+ - - -SubscriberInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|GlobalSubscriberId |String |Global customer Id (in A&AI) | -+-------------------------+------------------+-------------------------------------------------+ -|SubscriberName |String |Name of the Subscriber | -+-------------------------+------------------+-------------------------------------------------+ - -RequestInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|Source |String |source of the request | -+-------------------------+------------------+-------------------------------------------------+ -|billingAccountNumber |String |billingAccountNumber of the request | -+-------------------------+------------------+-------------------------------------------------+ -|callbackUrl |String |callbackUrl of the request | -+-------------------------+------------------+-------------------------------------------------+ -|correlator |String |correlator of the request | -+-------------------------+------------------+-------------------------------------------------+ -|orderNumber |String |orderNumber of the request | -+-------------------------+------------------+-------------------------------------------------+ -|productFamilyId |String |productFamilyId of the request | -+-------------------------+------------------+-------------------------------------------------+ -|orderVersion |String |orderVersion of the request | -+-------------------------+------------------+-------------------------------------------------+ -|instanceName |String |instanceName of the request | -+-------------------------+------------------+-------------------------------------------------+ -|suppressRollback |String |suppressRollback of the request | -+-------------------------+------------------+-------------------------------------------------+ -|requestorId |String |requestorId of the request | -+-------------------------+------------------+-------------------------------------------------+ - -RequestParameters Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|SubscriptionServiceType |String |The service type of the Subscription | -+-------------------------+------------------+-------------------------------------------------+ -|UserParams |Array |The product family Id. | -+-------------------------+------------------+-------------------------------------------------+ -|aLaCarte |Boolean | aLaCarte | -+-------------------------+------------------+-------------------------------------------------+ -|autoBuildVfModules |Boolean |autoBuildVfModules | -+-------------------------+------------------+-------------------------------------------------+ -|cascadeDelete |Boolean |cascadeDelete | -+-------------------------+------------------+-------------------------------------------------+ -|usePreload |Boolean |usePreload | -+-------------------------+------------------+-------------------------------------------------+ -|rebuildVolumeGroups |Boolean |rebuildVolumeGroups | -+-------------------------+------------------+-------------------------------------------------+ -|payload |String |payload | -+-------------------------+------------------+-------------------------------------------------+ -|controllerType |String |controllerType | -+-------------------------+------------------+-------------------------------------------------+ - -UserParams Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|name |String |Tag name of attribute | -+-------------------------+------------------+-------------------------------------------------+ -|value |String |Value of the tag | -+-------------------------+------------------+-------------------------------------------------+ - -CloudConfiguration Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | -+-------------------------+------------------+-------------------------------------------------+ -|tenantId |String |Name of the Subscriber | -+-------------------------+------------------+-------------------------------------------------+ -|aicNodeClli |String |aicNodeClli property | -+-------------------------+------------------+-------------------------------------------------+ - -Project Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|projectName |String |Name of the project | -+-------------------------+------------------+-------------------------------------------------+ - -OwningEntity Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|owningEntityId |String |owningEntityId of the owingEntity | -+-------------------------+------------------+-------------------------------------------------+ -|owningEntityName |String |owningEntityName of the owingEntity | -+-------------------------+------------------+-------------------------------------------------+ - -Platform Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|platformName |String |Platform Name | -+-------------------------+------------------+-------------------------------------------------+ - -LineOfBusiness Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|lineOfBusinessName |String |Line Of Business Name | -+-------------------------+------------------+-------------------------------------------------+ - -Delete service instance -+++++++++++++++++++++++ - -+--------------------+--------------------------------------------------------------------------------+ -|Interface Definition|Description | -+====================+================================================================================+ -|URI |/onap/so/infra/serviceInstantiation/serviceInstances/v6/{serviceInstanceId} | -+--------------------+--------------------------------------------------------------------------------+ -|Operation Type |DELETE | -+--------------------+--------------------------------------------------------------------------------+ -|Content-Type |application/json | -+--------------------+--------------------------------------------------------------------------------+ - -Request Body: - -+----------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+================+=========+===========+==========================+===========================================+ -|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | -+----------------+---------+-----------+--------------------------+-------------------------------------------+ - -RequestDetails Object - -+-------------------+-------------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+===================+=========================+=================================================+ -|modelInfo |modelInfo Object |Content of modelInfo object. | -+-------------------+-------------------------+-------------------------------------------------+ -|requestInfo |requestInfo Object |Content of requestInfo object. | -+-------------------+-------------------------+-------------------------------------------------+ - -ModelInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|ModelType |String |Type of model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelInvariantId |String |The Model Invariant Id. | -+-------------------------+------------------+-------------------------------------------------+ -|ModelName |String |Name of the Model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelVersion |String |Version of the model | -+-------------------------+------------------+-------------------------------------------------+ - -RequestInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|Source |String |source of the request | -+-------------------------+------------------+-------------------------------------------------+ - -Create Volume Group -+++++++++++++++++++ - -+--------------------+------------------------------------------------------------------------------------------------------------------+ -|Interface Definition|Description | -+====================+==================================================================================================================+ -|URI |/onap/so/infra/serviceInstantiation/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups | -+--------------------+------------------------------------------------------------------------------------------------------------------+ -|Operation Type |POST | -+--------------------+------------------------------------------------------------------------------------------------------------------+ -|Content-Type |application/json | -+--------------------+------------------------------------------------------------------------------------------------------------------+ - -Request Body: - -+----------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+================+=========+===========+==========================+===========================================+ -|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | -+----------------+---------+-----------+--------------------------+-------------------------------------------+ - -RequestDetails Object - -+-------------------+--------------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+===================+==========================+=================================================+ -|modelInfo |modelInfo Object |Content of modelInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|requestInfo |requestInfo Object |Content of requestInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|requestParameters |requestParameters Object |Content of requestParameters object. | -+-------------------+--------------------------+-------------------------------------------------+ -|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. | -+-------------------+--------------------------+-------------------------------------------------+ -|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. | -+-------------------+--------------------------+-------------------------------------------------+ -|project |project Object |Content of project object. | -+-------------------+--------------------------+-------------------------------------------------+ -|owningEntity |owningEntity Object |Content of owningEntity object. | -+-------------------+--------------------------+-------------------------------------------------+ -|platform |platform Object |Content of platform object. | -+-------------------+--------------------------+-------------------------------------------------+ -|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. | -+-------------------+--------------------------+-------------------------------------------------+ - -ModelInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|ModelType |String |Type of model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelInvariantId |String |The Model Invariant Id. | -+-------------------------+------------------+-------------------------------------------------+ -|ModelNameVersionId |String |The modelname Version Id | -+-------------------------+------------------+-------------------------------------------------+ -|ModelName |String |Name of the Model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelVersion |String |Version of the model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelCustomization Name |String |The Model Customization name | -+-------------------------+------------------+-------------------------------------------------+ -|modelCustomizationUuid |String |The Model Customization UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelVersionId |String |The Model version id | -+-------------------------+------------------+-------------------------------------------------+ -|modelUuid |String |The Model UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelInvariantUuid |String |The Model Invariant UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelInstanceName |String |The Model Instance name | -+-------------------------+------------------+-------------------------------------------------+ - -CloudConfiguration Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | -+-------------------------+------------------+-------------------------------------------------+ -|tenantId |String |Name of the Subscriber | -+-------------------------+------------------+-------------------------------------------------+ -|aicNodeClli |String |aicNodeClli property | -+-------------------------+------------------+-------------------------------------------------+ - -RequestInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|Source |String |source of the request | -+-------------------------+------------------+-------------------------------------------------+ -|billingAccountNumber |String |billingAccountNumber of the request | -+-------------------------+------------------+-------------------------------------------------+ -|callbackUrl |String |callbackUrl of the request | -+-------------------------+------------------+-------------------------------------------------+ -|correlator |String |correlator of the request | -+-------------------------+------------------+-------------------------------------------------+ -|orderNumber |String |orderNumber of the request | -+-------------------------+------------------+-------------------------------------------------+ -|productFamilyId |String |productFamilyId of the request | -+-------------------------+------------------+-------------------------------------------------+ -|orderVersion |String |orderVersion of the request | -+-------------------------+------------------+-------------------------------------------------+ -|instanceName |String |instanceName of the request | -+-------------------------+------------------+-------------------------------------------------+ -|suppressRollback |String |suppressRollback of the request | -+-------------------------+------------------+-------------------------------------------------+ -|requestorId |String |requestorId of the request | -+-------------------------+------------------+-------------------------------------------------+ - -relatedInstance List - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|relatedInstance |Object |relatedInstance Object | -+-------------------------+------------------+-------------------------------------------------+ - -relatedInstance List - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|instanceId |String |instanceId | -+-------------------------+------------------+-------------------------------------------------+ -|modelInfo |Object |Content of modelInfo object. | -+-------------------------+------------------+-------------------------------------------------+ - -Delete Volume Group -+++++++++++++++++++ - -+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -|Interface Definition|Description | -+====================+============================================================================================================================================+ -|URI |/onap/so/infra/serviceInstantiation/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volume-groupinstance-id} | -+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -|Operation Type |DELETE | -+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -|Content-Type |application/json | -+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - -Request Body: - -+----------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+================+=========+===========+==========================+===========================================+ -|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | -+----------------+---------+-----------+--------------------------+-------------------------------------------+ - -RequestDetails Object - -+---------------------+-------------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=====================+=========================+=================================================+ -|modelInfo |modelInfo Object |Content of modelInfo object. | -+---------------------+-------------------------+-------------------------------------------------+ -|cloudConfiguration |cloudConfiguration Object|Content of cloudConfiguration object. | -+---------------------+-------------------------+-------------------------------------------------+ -|requestInfo |requestInfo Object |Content of requestInfo object. | -+---------------------+-------------------------+-------------------------------------------------+ - -ModelInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|ModelType |String |Type of model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelName |String |Name of the Model | -+-------------------------+------------------+-------------------------------------------------+ - -CloudConfiguration Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | -+-------------------------+------------------+-------------------------------------------------+ -|tenantId |String |Name of the Subscriber | -+-------------------------+------------------+-------------------------------------------------+ - -RequestInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|Source |String |source of the request | -+-------------------------+------------------+-------------------------------------------------+ - -Create VF Module -++++++++++++++++ - -+--------------------+---------------------------------------------------------------------------------------------------------------+ -|Interface Definition|Description | -+====================+===============================================================================================================+ -|URI |/onap/so/infra/serviceInstantiation/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules | -+--------------------+---------------------------------------------------------------------------------------------------------------+ -|Operation Type |POST | -+--------------------+---------------------------------------------------------------------------------------------------------------+ -|Content-Type |application/json | -+--------------------+---------------------------------------------------------------------------------------------------------------+ - -Request Body: - -+----------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+================+=========+===========+==========================+===========================================+ -|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | -+----------------+---------+-----------+--------------------------+-------------------------------------------+ - -RequestDetails Object - -+---------------------+-------------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=====================+=========================+=================================================+ -|modelInfo |modelInfo Object |Content of modelInfo object. | -+---------------------+-------------------------+-------------------------------------------------+ -|cloudConfiguration |cloudConfiguration Object|Content of cloudConfiguration object. | -+---------------------+-------------------------+-------------------------------------------------+ -|requestInfo |requestInfo Object |Content of requestInfo object. | -+---------------------+-------------------------+-------------------------------------------------+ -|relatedInstanceList |List |Content of relatedInstanceList. | -+---------------------+-------------------------+-------------------------------------------------+ - -ModelInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|ModelType |String |Type of model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelInvariantId |String |The Model Invariant Id. | -+-------------------------+------------------+-------------------------------------------------+ -|ModelNameVersionId |String |The modelname Version Id | -+-------------------------+------------------+-------------------------------------------------+ -|ModelName |String |Name of the Model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelVersion |String |Version of the model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelCustomization Name |String |The Model Customization name | -+-------------------------+------------------+-------------------------------------------------+ - -CloudConfiguration Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | -+-------------------------+------------------+-------------------------------------------------+ -|tenantId |String |Name of the Subscriber | -+-------------------------+------------------+-------------------------------------------------+ - -RequestInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|InstanceName |String |The instance Name | -+-------------------------+------------------+-------------------------------------------------+ -|Source |String |source of the request | -+-------------------------+------------------+-------------------------------------------------+ -|SuppressRollback |Boolean |SuppressRollback | -+-------------------------+------------------+-------------------------------------------------+ - -relatedInstance List - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|relatedInstance |Object |relatedInstance Object | -+-------------------------+------------------+-------------------------------------------------+ - -relatedInstance List - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|instanceId |String |instanceId | -+-------------------------+------------------+-------------------------------------------------+ -|modelInfo |Object |Content of modelInfo object. | -+-------------------------+------------------+-------------------------------------------------+ -|instanceName |String |Name of the instance | -+-------------------------+------------------+-------------------------------------------------+ - -Delete VF Module -++++++++++++++++ - -+--------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -|Interface Definition|Description | -+====================+=====================================================================================================================================+ -|URI |/onap/so/infra/serviceInstantiation/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleinstance-id} | -+--------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -|Operation Type |DELETE | -+--------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -|Content-Type |application/json | -+--------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - -Request Body: - -+----------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+================+=========+===========+==========================+===========================================+ -|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | -+----------------+---------+-----------+--------------------------+-------------------------------------------+ - -RequestDetails Object - -+---------------------+-------------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=====================+=========================+=================================================+ -|modelInfo |modelInfo Object |Content of modelInfo object. | -+---------------------+-------------------------+-------------------------------------------------+ -|cloudConfiguration |cloudConfiguration Object|Content of cloudConfiguration object. | -+---------------------+-------------------------+-------------------------------------------------+ -|requestInfo |requestInfo Object |Content of requestInfo object. | -+---------------------+-------------------------+-------------------------------------------------+ - -ModelInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|ModelType |String |Type of model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelInvariantId |String |The Model Invariant Id. | -+-------------------------+------------------+-------------------------------------------------+ -|ModelNameVersionId |String |The modelname Version Id | -+-------------------------+------------------+-------------------------------------------------+ -|ModelName |String |Name of the Model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelVersion |String |Version of the model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelCustomization Name |String |The Model Customization name | -+-------------------------+------------------+-------------------------------------------------+ - -CloudConfiguration Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | -+-------------------------+------------------+-------------------------------------------------+ -|tenantId |String |Name of the Subscriber | -+-------------------------+------------------+-------------------------------------------------+ - -RequestInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|Source |String |source of the request | -+-------------------------+------------------+-------------------------------------------------+ - -Create VNF -++++++++++ - -+--------------------+-------------------------------------------------------------------------------------+ -|Interface Definition|Description | -+====================+=====================================================================================+ -|URI |/onap/so/infra/serviceInstantiation/serviceInstances/v6/{serviceInstanceId}/vnfs | -+--------------------+-------------------------------------------------------------------------------------+ -|Operation Type |POST | -+--------------------+-------------------------------------------------------------------------------------+ -|Content-Type |application/json | -+--------------------+-------------------------------------------------------------------------------------+ - -Request Body: - -+----------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+================+=========+===========+==========================+===========================================+ -|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | -+----------------+---------+-----------+--------------------------+-------------------------------------------+ - -RequestDetails Object - -+-------------------+--------------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+===================+==========================+=================================================+ -|modelInfo |modelInfo Object |Content of modelInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|requestInfo |requestInfo Object |Content of requestInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|requestParameters |requestParameters Object |Content of requestParameters object. | -+-------------------+--------------------------+-------------------------------------------------+ -|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. | -+-------------------+--------------------------+-------------------------------------------------+ -|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. | -+-------------------+--------------------------+-------------------------------------------------+ -|project |project Object |Content of project object. | -+-------------------+--------------------------+-------------------------------------------------+ -|owningEntity |owningEntity Object |Content of owningEntity object. | -+-------------------+--------------------------+-------------------------------------------------+ -|platform |platform Object |Content of platform object. | -+-------------------+--------------------------+-------------------------------------------------+ -|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. | -+-------------------+--------------------------+-------------------------------------------------+ - -ModelInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|ModelType |String |Type of model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelInvariantId |String |The Model Invariant Id. | -+-------------------------+------------------+-------------------------------------------------+ -|ModelNameVersionId |String |The modelname Version Id | -+-------------------------+------------------+-------------------------------------------------+ -|ModelName |String |Name of the Model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelVersion |String |Version of the model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelCustomization Name |String |The Model Customization name | -+-------------------------+------------------+-------------------------------------------------+ -|modelCustomizationUuid |String |The Model Customization UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelVersionId |String |The Model version id | -+-------------------------+------------------+-------------------------------------------------+ -|modelUuid |String |The Model UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelInvariantUuid |String |The Model Invariant UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelInstanceName |String |The Model Instance name | -+-------------------------+------------------+-------------------------------------------------+ - -CloudConfiguration Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | -+-------------------------+------------------+-------------------------------------------------+ -|tenantId |String |Name of the Subscriber | -+-------------------------+------------------+-------------------------------------------------+ - -RequestInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|Source |String |source of the request | -+-------------------------+------------------+-------------------------------------------------+ -|billingAccountNumber |String |billingAccountNumber of the request | -+-------------------------+------------------+-------------------------------------------------+ -|callbackUrl |String |callbackUrl of the request | -+-------------------------+------------------+-------------------------------------------------+ -|correlator |String |correlator of the request | -+-------------------------+------------------+-------------------------------------------------+ -|orderNumber |String |orderNumber of the request | -+-------------------------+------------------+-------------------------------------------------+ -|productFamilyId |String |productFamilyId of the request | -+-------------------------+------------------+-------------------------------------------------+ -|orderVersion |String |orderVersion of the request | -+-------------------------+------------------+-------------------------------------------------+ -|instanceName |String |instanceName of the request | -+-------------------------+------------------+-------------------------------------------------+ -|suppressRollback |String |suppressRollback of the request | -+-------------------------+------------------+-------------------------------------------------+ -|requestorId |String |requestorId of the request | -+-------------------------+------------------+-------------------------------------------------+ - -relatedInstance List - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|relatedInstance |Object |relatedInstance Object | -+-------------------------+------------------+-------------------------------------------------+ - -relatedInstance List - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|instanceId |String |instanceId | -+-------------------------+------------------+-------------------------------------------------+ -|modelInfo |Object |Content of modelInfo object. | -+-------------------------+------------------+-------------------------------------------------+ - -RequestParameters Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|UserParams |Array |The product family Id. | -+-------------------------+------------------+-------------------------------------------------+ - -UserParams Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|name |String |Tag name of attribute | -+-------------------------+------------------+-------------------------------------------------+ -|value |String |Value of the tag | -+-------------------------+------------------+-------------------------------------------------+ - -Delete VNF -++++++++++ - -+--------------------+-----------------------------------------------------------------------------------------------------+ -|Interface Definition|Description | -+====================+=====================================================================================================+ -|URI |/onap/so/infra/serviceInstantiation/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId} | -+--------------------+-----------------------------------------------------------------------------------------------------+ -|Operation Type |DELETE | -+--------------------+-----------------------------------------------------------------------------------------------------+ -|Content-Type |application/json | -+--------------------+-----------------------------------------------------------------------------------------------------+ - -Request Body: - -+----------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+================+=========+===========+==========================+===========================================+ -|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | -+----------------+---------+-----------+--------------------------+-------------------------------------------+ - -RequestDetails Object - -+---------------------+-------------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=====================+=========================+=================================================+ -|modelInfo |modelInfo Object |Content of modelInfo object. | -+---------------------+-------------------------+-------------------------------------------------+ -|cloudConfiguration |cloudConfiguration Object|Content of cloudConfiguration object. | -+---------------------+-------------------------+-------------------------------------------------+ -|requestInfo |requestInfo Object |Content of requestInfo object. | -+---------------------+-------------------------+-------------------------------------------------+ -|requestParameters |requestParameters Object |Content of requestParameters object. | -+---------------------+-------------------------+-------------------------------------------------+ - -ModelInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|ModelType |String |Type of model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelName |String |Name of the Model | -+-------------------------+------------------+-------------------------------------------------+ - -CloudConfiguration Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | -+-------------------------+------------------+-------------------------------------------------+ -|tenantId |String |Name of the Subscriber | -+-------------------------+------------------+-------------------------------------------------+ - -RequestInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|Source |String |source of the request | -+-------------------------+------------------+-------------------------------------------------+ - -RequestParameters Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|UserParams |Array |The product family Id. | -+-------------------------+------------------+-------------------------------------------------+ - -UserParams Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|name |String |Tag name of attribute | -+-------------------------+------------------+-------------------------------------------------+ -|value |String |Value of the tag | -+-------------------------+------------------+-------------------------------------------------+ - -GET Orchestration Request -+++++++++++++++++++++++++ - -+--------------------+-------------------------------------------------------------------------------------+ -|Interface Definition|Description | -+====================+=====================================================================================+ -|URI |/onap/so/infra/serviceInstantiation/orchestrationRequests/v6/{request-id} | -+--------------------+-------------------------------------------------------------------------------------+ -|Operation Type |GET | -+--------------------+-------------------------------------------------------------------------------------+ -|Content-Type |application/json | -+--------------------+-------------------------------------------------------------------------------------+ - -Response Body: - -+----------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+================+=========+===========+==========================+===========================================+ -|request |M |1 |request Object |Content of request object. | -+----------------+---------+-----------+--------------------------+-------------------------------------------+ - -Request Object - -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+===================+=========+===========+==========================+===========================================+ -|requestId |M |1 |String |Request Id | -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ -|startTime |M |1 |request Object |Start time. | -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ -|requestScope |M |1 |request Object |Scope of the request. | -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ -|requestType |M |1 |request Object |Type of the request. | -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ -|requestDetails |M |1 |requestDetails Object |Type of the request. | -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ -|requestStatus |M |1 |requestStatus Object |Type of the request. | -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ - -RequestDetails Object - -+-------------------+--------------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+===================+==========================+=================================================+ -|modelInfo |modelInfo Object |Content of modelInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|requestInfo |requestInfo Object |Content of requestInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|requestParameters |requestParameters Object |Content of requestParameters object. | -+-------------------+--------------------------+-------------------------------------------------+ -|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. | -+-------------------+--------------------------+-------------------------------------------------+ -|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. | -+-------------------+--------------------------+-------------------------------------------------+ -|project |project Object |Content of project object. | -+-------------------+--------------------------+-------------------------------------------------+ -|owningEntity |owningEntity Object |Content of owningEntity object. | -+-------------------+--------------------------+-------------------------------------------------+ -|platform |platform Object |Content of platform object. | -+-------------------+--------------------------+-------------------------------------------------+ -|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. | -+-------------------+--------------------------+-------------------------------------------------+ - -ModelInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|ModelType |String |Type of model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelInvariantId |String |The Model Invariant Id. | -+-------------------------+------------------+-------------------------------------------------+ -|ModelNameVersionId |String |The modelname Version Id | -+-------------------------+------------------+-------------------------------------------------+ -|ModelName |String |Name of the Model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelVersion |String |Version of the model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelCustomization Name |String |The Model Customization name | -+-------------------------+------------------+-------------------------------------------------+ -|modelCustomizationUuid |String |The Model Customization UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelVersionId |String |The Model version id | -+-------------------------+------------------+-------------------------------------------------+ -|modelUuid |String |The Model UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelInvariantUuid |String |The Model Invariant UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelInstanceName |String |The Model Instance name | -+-------------------------+------------------+-------------------------------------------------+ - -SubscriberInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|GlobalSubscriberId |String |Global customer Id (in A&AI) | -+-------------------------+------------------+-------------------------------------------------+ -|SubscriberName |String |Name of the Subscriber | -+-------------------------+------------------+-------------------------------------------------+ - -RequestInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|Source |String |source of the request | -+-------------------------+------------------+-------------------------------------------------+ -|billingAccountNumber |String |billingAccountNumber of the request | -+-------------------------+------------------+-------------------------------------------------+ -|callbackUrl |String |callbackUrl of the request | -+-------------------------+------------------+-------------------------------------------------+ -|correlator |String |correlator of the request | -+-------------------------+------------------+-------------------------------------------------+ -|orderNumber |String |orderNumber of the request | -+-------------------------+------------------+-------------------------------------------------+ -|productFamilyId |String |productFamilyId of the request | -+-------------------------+------------------+-------------------------------------------------+ -|orderVersion |String |orderVersion of the request | -+-------------------------+------------------+-------------------------------------------------+ -|instanceName |String |instanceName of the request | -+-------------------------+------------------+-------------------------------------------------+ -|suppressRollback |String |suppressRollback of the request | -+-------------------------+------------------+-------------------------------------------------+ -|requestorId |String |requestorId of the request | -+-------------------------+------------------+-------------------------------------------------+ - -RequestParameters Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|SubscriptionServiceType |String |The service type of the Subscription | -+-------------------------+------------------+-------------------------------------------------+ - -RequestStatus Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|finishTime |String |Time | -+-------------------------+------------------+-------------------------------------------------+ -|requestState |String |state of the request | -+-------------------------+------------------+-------------------------------------------------+ -|statusMessage |String |statusMessage | -+-------------------------+------------------+-------------------------------------------------+ -|percentProgress |String |percentage of progress | -+-------------------------+------------------+-------------------------------------------------+ - -GET Orchestration Requests -++++++++++++++++++++++++++ - -+--------------------+--------------------------------------------------------------+ -|Interface Definition|Description | -+====================+==============================================================+ -|URI |/onap/so/infra/serviceInstantiation/orchestrationRequests/v6 | -+--------------------+--------------------------------------------------------------+ -|Operation Type |GET | -+--------------------+--------------------------------------------------------------+ -|Content-Type |application/json | -+--------------------+--------------------------------------------------------------+ - -Response Body: - -+----------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+================+=========+===========+==========================+===========================================+ -|requestList |M |1 |Array |Content of request List. | -+----------------+---------+-----------+--------------------------+-------------------------------------------+ - -RequestList : - -+----------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+================+=========+===========+==========================+===========================================+ -|request |M |1 |request Object |Content of request object. | -+----------------+---------+-----------+--------------------------+-------------------------------------------+ - -Request Object - -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content |Description | -+===================+=========+===========+==========================+===========================================+ -|requestId |M |1 |String |Request Id. | -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ -|startTime |M |1 |request Object |Start time. | -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ -|requestScope |M |1 |request Object |Scope of the request. | -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ -|requestType |M |1 |request Object |Type of the request. | -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ -|requestDetails |M |1 |requestDetails Object |Type of the request. | -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ -|requestStatus |M |1 |requestStatus Object |Type of the request. | -+-------------------+---------+-----------+--------------------------+-------------------------------------------+ - -RequestDetails Object - -+-------------------+--------------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+===================+==========================+=================================================+ -|modelInfo |modelInfo Object |Content of modelInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|requestInfo |requestInfo Object |Content of requestInfo object. | -+-------------------+--------------------------+-------------------------------------------------+ -|requestParameters |requestParameters Object |Content of requestParameters object. | -+-------------------+--------------------------+-------------------------------------------------+ -|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. | -+-------------------+--------------------------+-------------------------------------------------+ -|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. | -+-------------------+--------------------------+-------------------------------------------------+ -|project |project Object |Content of project object. | -+-------------------+--------------------------+-------------------------------------------------+ -|owningEntity |owningEntity Object |Content of owningEntity object. | -+-------------------+--------------------------+-------------------------------------------------+ -|platform |platform Object |Content of platform object. | -+-------------------+--------------------------+-------------------------------------------------+ -|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. | -+-------------------+--------------------------+-------------------------------------------------+ - -ModelInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|ModelType |String |Type of model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelInvariantId |String |The Model Invariant Id. | -+-------------------------+------------------+-------------------------------------------------+ -|ModelNameVersionId |String |The modelname Version Id | -+-------------------------+------------------+-------------------------------------------------+ -|ModelName |String |Name of the Model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelVersion |String |Version of the model | -+-------------------------+------------------+-------------------------------------------------+ -|ModelCustomization Name |String |The Model Customization name | -+-------------------------+------------------+-------------------------------------------------+ -|modelCustomizationUuid |String |The Model Customization UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelVersionId |String |The Model version id | -+-------------------------+------------------+-------------------------------------------------+ -|modelUuid |String |The Model UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelInvariantUuid |String |The Model Invariant UUid | -+-------------------------+------------------+-------------------------------------------------+ -|modelInstanceName |String |The Model Instance name | -+-------------------------+------------------+-------------------------------------------------+ - -SubscriberInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|GlobalSubscriberId |String |Global customer Id (in A&AI) | -+-------------------------+------------------+-------------------------------------------------+ -|SubscriberName |String |Name of the Subscriber | -+-------------------------+------------------+-------------------------------------------------+ - -RequestInfo Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|Source |String |source of the request | -+-------------------------+------------------+-------------------------------------------------+ -|billingAccountNumber |String |billingAccountNumber of the request | -+-------------------------+------------------+-------------------------------------------------+ -|callbackUrl |String |callbackUrl of the request | -+-------------------------+------------------+-------------------------------------------------+ -|correlator |String |correlator of the request | -+-------------------------+------------------+-------------------------------------------------+ -|orderNumber |String |orderNumber of the request | -+-------------------------+------------------+-------------------------------------------------+ -|productFamilyId |String |productFamilyId of the request | -+-------------------------+------------------+-------------------------------------------------+ -|orderVersion |String |orderVersion of the request | -+-------------------------+------------------+-------------------------------------------------+ -|instanceName |String |instanceName of the request | -+-------------------------+------------------+-------------------------------------------------+ -|suppressRollback |String |suppressRollback of the request | -+-------------------------+------------------+-------------------------------------------------+ -|requestorId |String |requestorId of the request | -+-------------------------+------------------+-------------------------------------------------+ - -RequestParameters Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|SubscriptionServiceType |String |The service type of the Subscription | -+-------------------------+------------------+-------------------------------------------------+ - -RequestStatus Object - -+-------------------------+------------------+-------------------------------------------------+ -|Attribute |Content |Description | -+=========================+==================+=================================================+ -|finishTime |String |Time | -+-------------------------+------------------+-------------------------------------------------+ -|requestState |String |state of the request | -+-------------------------+------------------+-------------------------------------------------+ -|statusMessage |String |statusMessage | -+-------------------------+------------------+-------------------------------------------------+ -|percentProgress |String |percentage of progress | -+-------------------------+------------------+-------------------------------------------------+ SDC Client API -------------- @@ -1371,181 +228,6 @@ Response: |Content-Disposition |M |Specifies the name of file to store the downloaded artifact’s payload ( RFC 2183) . | +--------------------+---------+--------------------------------------------------------------------------------------------------------------------------+ -E2E Service API ---------------- - -Create E2E service instance -+++++++++++++++++++++++++++ - -+--------------------+------------------------------------------------------------+ -|Interface Definition|Description | -+====================+============================================================+ -|URI |/onap/so/infra/serviceInstantiation/e2eServiceInstances/v3 | -+--------------------+------------------------------------------------------------+ -|Operation Type |POST | -+--------------------+------------------------------------------------------------+ -|Content-Type |application/json | -+--------------------+------------------------------------------------------------+ - -Request Body: - -+---------+---------+-----------+--------------------------+-----------------------------+ -|Attribute|Qualifier|Cardinality|Content |Description | -+=========+=========+===========+==========================+=============================+ -|service |M |1 |Service Object |Content of service object. | -+---------+---------+-----------+--------------------------+-----------------------------+ - -Service Object - -+------------------------------+-----------------+------------------------------------+ -|Attribute |Content |Description | -+==============================+=================+====================================+ -|name |String |Service instance name. | -+------------------------------+-----------------+------------------------------------+ -|description |String |Service instance description | -+------------------------------+-----------------+------------------------------------+ -|serviceUuid |String |Model UUID | -+------------------------------+-----------------+------------------------------------+ -|serviceInvariantUuid |String |Model Invariant UUID | -+------------------------------+-----------------+------------------------------------+ -|gloabalSubscriberId |String |Customer Id | -+------------------------------+-----------------+------------------------------------+ -|serviceType |String |service Type | -+------------------------------+-----------------+------------------------------------+ -|parameters |Object |Parameter Object | -+------------------------------+-----------------+------------------------------------+ - -Parameter Object - -+------------------------------+-----------------+------------------------------------+ -|Attribute |Content |Description | -+==============================+=================+====================================+ -|locationConstraints |List of object |location infor for each vnf | -+------------------------------+-----------------+------------------------------------+ -|resource |List of Resource |resource of service/resource | -+------------------------------+-----------------+------------------------------------+ -|requestInputs |key-value map |input of service/resource | -+------------------------------+-----------------+------------------------------------+ - -LocationConstraint Object - -+------------------------------+-----------------+------------------------------------+ -|Attribute |Content |Description | -+==============================+=================+====================================+ -|vnfProfileId |String |Customization id for VNF | -+------------------------------+-----------------+------------------------------------+ -|locationConstraints |Object |DC location info of VNF | -+------------------------------+-----------------+------------------------------------+ - -VnfLocationConstraint Object - -+------------------------------+-----------------+------------------------------------+ -|Attribute |Content |Description | -+==============================+=================+====================================+ -|vimId |String |VIM id from ESR definition | -+------------------------------+-----------------+------------------------------------+ - -Resource Object - -+------------------------------+-----------------+------------------------------------+ -|Attribute |Content |Description | -+==============================+=================+====================================+ -|resourceName |String |The resource name | -+------------------------------+-----------------+------------------------------------+ -|resourceInvariantUuid |String |The resource invariant UUID. | -+------------------------------+-----------------+------------------------------------+ -|resourceUuid |String |The resource UUID. | -+------------------------------+-----------------+------------------------------------+ -|resourceCustomizationUuid |String |The resource customization UUID. | -+------------------------------+-----------------+------------------------------------+ -|parameters |Object |Parameter of resource | -+------------------------------+-----------------+------------------------------------+ - -Response: - -+-------------+---------+-----------+-------+------------------------------------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content|Description | -+-------------+---------+-----------+-------+------------------------------------------------------------------------+ -|serviceId |M |1 |String |Service instance ID. | -+-------------+---------+-----------+-------+------------------------------------------------------------------------+ -|operationId |M |1 |String |Service Operation ID. | -+-------------+---------+-----------+-------+------------------------------------------------------------------------+ - -Delete E2E service instance -+++++++++++++++++++++++++++ - -+--------------------+----------------------------------------------------------------------+ -|Interface Definition|Description | -+====================+======================================================================+ -|URI |/onap/so/infra/serviceInstantiation/e2eServiceInstances/v3/{serviceId}| -+--------------------+----------------------------------------------------------------------+ -|Operation Type |DELETE | -+--------------------+----------------------------------------------------------------------+ - -Request Parameters: - -+-------------------+---------+-----------+-------+----------------------------------------+ -|Attribute |Qualifier|Cardinality|Content|Description | -+===================+=========+===========+=======+========================================+ -|globalSubscriberId |M |1 |String |The subscriber id. It is defined in AAI | -+-------------------+---------+-----------+-------+----------------------------------------+ -|serviceType |M |1 |String |The service type. It is defined in AAI | -+-------------------+---------+-----------+-------+----------------------------------------+ - -Response: - -+-------------+---------+-----------+-------+------------------------------------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content|Description | -+-------------+---------+-----------+-------+------------------------------------------------------------------------+ -|operationId |M |1 |String |The operation id. | -+-------------+---------+-----------+-------+------------------------------------------------------------------------+ - -Query E2E service operation result -++++++++++++++++++++++++++++++++++ - -+--------------------+-----------------------------------------------------------------------------------------------+ -|Interface Definition|Description | -+====================+===============================================================================================+ -|URI |/onap/so/infra/serviceInstantiation/e2eServiceInstances/v3/{serviceId}/operations/{operationId}| -+--------------------+-----------------------------------------------------------------------------------------------+ -|Operation Type |GET | -+--------------------+-----------------------------------------------------------------------------------------------+ - -Request Parameters: - -+--------------+---------+-----------+-------+--------------+ -|Attribute |Qualifier|Cardinality|Content|Description | -+==============+=========+===========+=======+==============+ -|serviceId |M |1 |Service instance ID. | -+--------------+---------+-----------+-------+--------------+ -|operationId |M |1 |Service Operation ID. | -+--------------+---------+-----------+-------+--------------+ - -Response: - -+------------------+---------+-----------+-------+------------------------------------------------------------------------+ -|Attribute |Qualifier|Cardinality|Content|Description | -+------------------+---------+-----------+-------+------------------------------------------------------------------------+ -|operation |M |1 |String |Operation object identify. | -+------------------+---------+-----------+-------+------------------------------------------------------------------------+ -|operationId |M |1 |String |Operation ID. | -+------------------+---------+-----------+-------+------------------------------------------------------------------------+ -|operation |M |1 |String |Operation type, create|delete. | -+------------------+---------+-----------+-------+------------------------------------------------------------------------+ -|result |M |1 |String |Operation result: finished, error, processing. | -+------------------+---------+-----------+-------+------------------------------------------------------------------------+ -|reason |M |1 |String |If failing, need to write fail reason. | -+------------------+---------+-----------+-------+------------------------------------------------------------------------+ -|userId |M |1 |String |Operation user ID. | -+------------------+---------+-----------+-------+------------------------------------------------------------------------+ -|operationContent |M |1 |String |The status detail of current operation which is being executing. | -+------------------+---------+-----------+-------+------------------------------------------------------------------------+ -|progress |M |1 |String |Current operation progress. | -+------------------+---------+-----------+-------+------------------------------------------------------------------------+ -|operateAt |M |1 |String |Time that it starts to execute operation. | -+------------------+---------+-----------+-------+------------------------------------------------------------------------+ -|finishedAt |M |1 |String |Time that it finished executing operation. | -+------------------+---------+-----------+-------+------------------------------------------------------------------------+ Inventory APIs -------------- @@ -4044,7 +2726,7 @@ Candidates Object +-------------------+---------+-----------+-------+--------------------------------------------------------------------------------+ |identifiers |Y |1..N |List |A list of identifiers. | +-------------------+---------+-----------+-------+--------------------------------------------------------------------------------+ -|cloudOwner |C |1 |String |The name of a cloud owner. Only required if identifierType is cloud_region_id. | +|cloudOwner |C |1 |String |The name of a cloud owner. Only required if identifierType is cloud_region_id. | +-------------------+---------+-----------+-------+--------------------------------------------------------------------------------+ diff --git a/docs/api/apis/e2eServiceInstances-api.rst b/docs/api/apis/e2eServiceInstances-api.rst new file mode 100644 index 0000000000..08434efdfd --- /dev/null +++ b/docs/api/apis/e2eServiceInstances-api.rst @@ -0,0 +1,185 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2018 Huawei Technologies Co., Ltd. + +e2eServiceInstances API +======================= + +This API allows to manage: + +- e2eServiceInstances (create and delete) +- operations on e2eServiceInstances (get) + + +Create E2E service instance ++++++++++++++++++++++++++++ + ++--------------------+------------------------------------------------------------+ +|Interface Definition|Description | ++====================+============================================================+ +|URI |/onap/so/infra/e2eServiceInstances/v3 | ++--------------------+------------------------------------------------------------+ +|Operation Type |POST | ++--------------------+------------------------------------------------------------+ +|Content-Type |application/json | ++--------------------+------------------------------------------------------------+ + +Request Body: + ++---------+---------+-----------+--------------------------+-----------------------------+ +|Attribute|Qualifier|Cardinality|Content |Description | ++=========+=========+===========+==========================+=============================+ +|service |M |1 |Service Object |Content of service object. | ++---------+---------+-----------+--------------------------+-----------------------------+ + +Service Object + ++------------------------------+-----------------+------------------------------------+ +|Attribute |Content |Description | ++==============================+=================+====================================+ +|name |String |Service instance name. | ++------------------------------+-----------------+------------------------------------+ +|description |String |Service instance description | ++------------------------------+-----------------+------------------------------------+ +|serviceUuid |String |Model UUID | ++------------------------------+-----------------+------------------------------------+ +|serviceInvariantUuid |String |Model Invariant UUID | ++------------------------------+-----------------+------------------------------------+ +|gloabalSubscriberId |String |Customer Id | ++------------------------------+-----------------+------------------------------------+ +|serviceType |String |service Type | ++------------------------------+-----------------+------------------------------------+ +|parameters |Object |Parameter Object | ++------------------------------+-----------------+------------------------------------+ + +Parameter Object + ++------------------------------+-----------------+------------------------------------+ +|Attribute |Content |Description | ++==============================+=================+====================================+ +|locationConstraints |List of object |location infor for each vnf | ++------------------------------+-----------------+------------------------------------+ +|resource |List of Resource |resource of service/resource | ++------------------------------+-----------------+------------------------------------+ +|requestInputs |key-value map |input of service/resource | ++------------------------------+-----------------+------------------------------------+ + +LocationConstraint Object + ++------------------------------+-----------------+------------------------------------+ +|Attribute |Content |Description | ++==============================+=================+====================================+ +|vnfProfileId |String |Customization id for VNF | ++------------------------------+-----------------+------------------------------------+ +|locationConstraints |Object |DC location info of VNF | ++------------------------------+-----------------+------------------------------------+ + +VnfLocationConstraint Object + ++------------------------------+-----------------+------------------------------------+ +|Attribute |Content |Description | ++==============================+=================+====================================+ +|vimId |String |VIM id from ESR definition | ++------------------------------+-----------------+------------------------------------+ + +Resource Object + ++------------------------------+-----------------+------------------------------------+ +|Attribute |Content |Description | ++==============================+=================+====================================+ +|resourceName |String |The resource name | ++------------------------------+-----------------+------------------------------------+ +|resourceInvariantUuid |String |The resource invariant UUID. | ++------------------------------+-----------------+------------------------------------+ +|resourceUuid |String |The resource UUID. | ++------------------------------+-----------------+------------------------------------+ +|resourceCustomizationUuid |String |The resource customization UUID. | ++------------------------------+-----------------+------------------------------------+ +|parameters |Object |Parameter of resource | ++------------------------------+-----------------+------------------------------------+ + +Response: + ++-------------+---------+-----------+-------+------------------------------------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content|Description | ++-------------+---------+-----------+-------+------------------------------------------------------------------------+ +|serviceId |M |1 |String |Service instance ID. | ++-------------+---------+-----------+-------+------------------------------------------------------------------------+ +|operationId |M |1 |String |Service Operation ID. | ++-------------+---------+-----------+-------+------------------------------------------------------------------------+ + +Delete E2E service instance ++++++++++++++++++++++++++++ + ++--------------------+----------------------------------------------------------------------+ +|Interface Definition|Description | ++====================+======================================================================+ +|URI |/onap/so/infra/e2eServiceInstances/v3/{serviceId} | ++--------------------+----------------------------------------------------------------------+ +|Operation Type |DELETE | ++--------------------+----------------------------------------------------------------------+ + +Request Parameters: + ++-------------------+---------+-----------+-------+----------------------------------------+ +|Attribute |Qualifier|Cardinality|Content|Description | ++===================+=========+===========+=======+========================================+ +|globalSubscriberId |M |1 |String |The subscriber id. It is defined in AAI | ++-------------------+---------+-----------+-------+----------------------------------------+ +|serviceType |M |1 |String |The service type. It is defined in AAI | ++-------------------+---------+-----------+-------+----------------------------------------+ + +Response: + ++-------------+---------+-----------+-------+------------------------------------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content|Description | ++-------------+---------+-----------+-------+------------------------------------------------------------------------+ +|operationId |M |1 |String |The operation id. | ++-------------+---------+-----------+-------+------------------------------------------------------------------------+ + +Query E2E service operation result +++++++++++++++++++++++++++++++++++ + ++--------------------+-----------------------------------------------------------------------------------------------+ +|Interface Definition|Description | ++====================+===============================================================================================+ +|URI |/onap/so/infra/e2eServiceInstances/v3/{serviceId}/operations/{operationId} | ++--------------------+-----------------------------------------------------------------------------------------------+ +|Operation Type |GET | ++--------------------+-----------------------------------------------------------------------------------------------+ + +Request Parameters: + ++--------------+---------+-----------+-------+--------------+ +|Attribute |Qualifier|Cardinality|Content|Description | ++==============+=========+===========+=======+==============+ +|serviceId |M |1 |Service instance ID. | ++--------------+---------+-----------+-------+--------------+ +|operationId |M |1 |Service Operation ID. | ++--------------+---------+-----------+-------+--------------+ + +Response: + ++------------------+---------+-----------+-------+------------------------------------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content|Description | ++------------------+---------+-----------+-------+------------------------------------------------------------------------+ +|operation |M |1 |String |Operation object identify. | ++------------------+---------+-----------+-------+------------------------------------------------------------------------+ +|operationId |M |1 |String |Operation ID. | ++------------------+---------+-----------+-------+------------------------------------------------------------------------+ +|operation |M |1 |String |Operation type, create|delete. | ++------------------+---------+-----------+-------+------------------------------------------------------------------------+ +|result |M |1 |String |Operation result: finished, error, processing. | ++------------------+---------+-----------+-------+------------------------------------------------------------------------+ +|reason |M |1 |String |If failing, need to write fail reason. | ++------------------+---------+-----------+-------+------------------------------------------------------------------------+ +|userId |M |1 |String |Operation user ID. | ++------------------+---------+-----------+-------+------------------------------------------------------------------------+ +|operationContent |M |1 |String |The status detail of current operation which is being executing. | ++------------------+---------+-----------+-------+------------------------------------------------------------------------+ +|progress |M |1 |String |Current operation progress. | ++------------------+---------+-----------+-------+------------------------------------------------------------------------+ +|operateAt |M |1 |String |Time that it starts to execute operation. | ++------------------+---------+-----------+-------+------------------------------------------------------------------------+ +|finishedAt |M |1 |String |Time that it finished executing operation. | ++------------------+---------+-----------+-------+------------------------------------------------------------------------+ diff --git a/docs/api/apis/serviceInstances-api.rst b/docs/api/apis/serviceInstances-api.rst new file mode 100644 index 0000000000..b3fd2cf47d --- /dev/null +++ b/docs/api/apis/serviceInstances-api.rst @@ -0,0 +1,1192 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright 2018 Huawei Technologies Co., Ltd. + +serviceInstances API +==================== + + +This API allows to generate some requests to manage: + +- serviceInstances (create, delete) +- volumeGroups attached to a vnf instance (create, delete) +- vfModules attached to a vnf instance (create, delete) +- vnfs attached to a service instance (create, delete) +- orchestrationRequests (get) + +links: + +- :ref:`create_service_instance` +- :ref:`delete_service_instance` +- :ref:`create_volume_group` +- :ref:`delete_volume_group` +- :ref:`create_vf_module` +- :ref:`delete_vf_module` +- :ref:`create_vnf` +- :ref:`delete_vnf` +- :ref:`get_orchestration_request_by_id` +- :ref:`get_orchestration_request_all` + + +.. _create_service_instance: + +Create service instance ++++++++++++++++++++++++ + ++--------------------+--------------------------------------------------------+ +|Interface Definition|Description | ++====================+========================================================+ +|URI |/onap/so/infra/serviceInstances/v6 | ++--------------------+--------------------------------------------------------+ +|Operation Type |POST | ++--------------------+--------------------------------------------------------+ +|Content-Type |application/json | ++--------------------+--------------------------------------------------------+ + +Request Body: + ++----------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++================+=========+===========+==========================+===========================================+ +|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | ++----------------+---------+-----------+--------------------------+-------------------------------------------+ + +RequestDetails Object + ++-------------------+--------------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++===================+==========================+=================================================+ +|modelInfo |modelInfo Object |Content of modelInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|requestInfo |requestInfo Object |Content of requestInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|requestParameters |requestParameters Object |Content of requestParameters object. | ++-------------------+--------------------------+-------------------------------------------------+ +|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. | ++-------------------+--------------------------+-------------------------------------------------+ +|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. | ++-------------------+--------------------------+-------------------------------------------------+ +|project |project Object |Content of project object. | ++-------------------+--------------------------+-------------------------------------------------+ +|owningEntity |owningEntity Object |Content of owningEntity object. | ++-------------------+--------------------------+-------------------------------------------------+ +|platform |platform Object |Content of platform object. | ++-------------------+--------------------------+-------------------------------------------------+ +|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. | ++-------------------+--------------------------+-------------------------------------------------+ + +ModelInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|ModelType |String |Type of model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelInvariantId |String |The Model Invariant Id. | ++-------------------------+------------------+-------------------------------------------------+ +|ModelNameVersionId |String |The modelname Version Id | ++-------------------------+------------------+-------------------------------------------------+ +|ModelName |String |Name of the Model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelVersion |String |Version of the model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelCustomization Name |String |The Model Customization name | ++-------------------------+------------------+-------------------------------------------------+ +|modelCustomizationUuid |String |The Model Customization UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelVersionId |String |The Model version id | ++-------------------------+------------------+-------------------------------------------------+ +|modelUuid |String |The Model UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelInvariantUuid |String |The Model Invariant UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelInstanceName |String |The Model Instance name | ++-------------------------+------------------+-------------------------------------------------+ + + +SubscriberInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|GlobalSubscriberId |String |Global customer Id (in A&AI) | ++-------------------------+------------------+-------------------------------------------------+ +|SubscriberName |String |Name of the Subscriber | ++-------------------------+------------------+-------------------------------------------------+ + +RequestInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|Source |String |source of the request | ++-------------------------+------------------+-------------------------------------------------+ +|billingAccountNumber |String |billingAccountNumber of the request | ++-------------------------+------------------+-------------------------------------------------+ +|callbackUrl |String |callbackUrl of the request | ++-------------------------+------------------+-------------------------------------------------+ +|correlator |String |correlator of the request | ++-------------------------+------------------+-------------------------------------------------+ +|orderNumber |String |orderNumber of the request | ++-------------------------+------------------+-------------------------------------------------+ +|productFamilyId |String |productFamilyId of the request | ++-------------------------+------------------+-------------------------------------------------+ +|orderVersion |String |orderVersion of the request | ++-------------------------+------------------+-------------------------------------------------+ +|instanceName |String |instanceName of the request | ++-------------------------+------------------+-------------------------------------------------+ +|suppressRollback |String |suppressRollback of the request | ++-------------------------+------------------+-------------------------------------------------+ +|requestorId |String |requestorId of the request | ++-------------------------+------------------+-------------------------------------------------+ + +RequestParameters Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|SubscriptionServiceType |String |The service type of the Subscription | ++-------------------------+------------------+-------------------------------------------------+ +|UserParams |Array |The product family Id. | ++-------------------------+------------------+-------------------------------------------------+ +|aLaCarte |Boolean | aLaCarte | ++-------------------------+------------------+-------------------------------------------------+ +|autoBuildVfModules |Boolean |autoBuildVfModules | ++-------------------------+------------------+-------------------------------------------------+ +|cascadeDelete |Boolean |cascadeDelete | ++-------------------------+------------------+-------------------------------------------------+ +|usePreload |Boolean |usePreload | ++-------------------------+------------------+-------------------------------------------------+ +|rebuildVolumeGroups |Boolean |rebuildVolumeGroups | ++-------------------------+------------------+-------------------------------------------------+ +|payload |String |payload | ++-------------------------+------------------+-------------------------------------------------+ +|controllerType |String |controllerType | ++-------------------------+------------------+-------------------------------------------------+ + +UserParams Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|name |String |Tag name of attribute | ++-------------------------+------------------+-------------------------------------------------+ +|value |String |Value of the tag | ++-------------------------+------------------+-------------------------------------------------+ + +CloudConfiguration Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | ++-------------------------+------------------+-------------------------------------------------+ +|tenantId |String |Name of the Subscriber | ++-------------------------+------------------+-------------------------------------------------+ +|aicNodeClli |String |aicNodeClli property | ++-------------------------+------------------+-------------------------------------------------+ + +Project Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|projectName |String |Name of the project | ++-------------------------+------------------+-------------------------------------------------+ + +OwningEntity Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|owningEntityId |String |owningEntityId of the owingEntity | ++-------------------------+------------------+-------------------------------------------------+ +|owningEntityName |String |owningEntityName of the owingEntity | ++-------------------------+------------------+-------------------------------------------------+ + +Platform Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|platformName |String |Platform Name | ++-------------------------+------------------+-------------------------------------------------+ + +LineOfBusiness Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|lineOfBusinessName |String |Line Of Business Name | ++-------------------------+------------------+-------------------------------------------------+ + + +.. _delete_service_instance: + +Delete service instance ++++++++++++++++++++++++ + ++--------------------+--------------------------------------------------------------------------------+ +|Interface Definition|Description | ++====================+================================================================================+ +|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId} | ++--------------------+--------------------------------------------------------------------------------+ +|Operation Type |DELETE | ++--------------------+--------------------------------------------------------------------------------+ +|Content-Type |application/json | ++--------------------+--------------------------------------------------------------------------------+ + +Request Body: + ++----------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++================+=========+===========+==========================+===========================================+ +|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | ++----------------+---------+-----------+--------------------------+-------------------------------------------+ + +RequestDetails Object + ++-------------------+-------------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++===================+=========================+=================================================+ +|modelInfo |modelInfo Object |Content of modelInfo object. | ++-------------------+-------------------------+-------------------------------------------------+ +|requestInfo |requestInfo Object |Content of requestInfo object. | ++-------------------+-------------------------+-------------------------------------------------+ + +ModelInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|ModelType |String |Type of model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelInvariantId |String |The Model Invariant Id. | ++-------------------------+------------------+-------------------------------------------------+ +|ModelName |String |Name of the Model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelVersion |String |Version of the model | ++-------------------------+------------------+-------------------------------------------------+ + +RequestInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|Source |String |source of the request | ++-------------------------+------------------+-------------------------------------------------+ + + +.. _create_volume_group: + +Create Volume Group ++++++++++++++++++++ + ++--------------------+------------------------------------------------------------------------------------------------------------------+ +|Interface Definition|Description | ++====================+==================================================================================================================+ +|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups | ++--------------------+------------------------------------------------------------------------------------------------------------------+ +|Operation Type |POST | ++--------------------+------------------------------------------------------------------------------------------------------------------+ +|Content-Type |application/json | ++--------------------+------------------------------------------------------------------------------------------------------------------+ + +Request Body: + ++----------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++================+=========+===========+==========================+===========================================+ +|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | ++----------------+---------+-----------+--------------------------+-------------------------------------------+ + +RequestDetails Object + ++-------------------+--------------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++===================+==========================+=================================================+ +|modelInfo |modelInfo Object |Content of modelInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|requestInfo |requestInfo Object |Content of requestInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|requestParameters |requestParameters Object |Content of requestParameters object. | ++-------------------+--------------------------+-------------------------------------------------+ +|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. | ++-------------------+--------------------------+-------------------------------------------------+ +|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. | ++-------------------+--------------------------+-------------------------------------------------+ +|project |project Object |Content of project object. | ++-------------------+--------------------------+-------------------------------------------------+ +|owningEntity |owningEntity Object |Content of owningEntity object. | ++-------------------+--------------------------+-------------------------------------------------+ +|platform |platform Object |Content of platform object. | ++-------------------+--------------------------+-------------------------------------------------+ +|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. | ++-------------------+--------------------------+-------------------------------------------------+ + +ModelInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|ModelType |String |Type of model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelInvariantId |String |The Model Invariant Id. | ++-------------------------+------------------+-------------------------------------------------+ +|ModelNameVersionId |String |The modelname Version Id | ++-------------------------+------------------+-------------------------------------------------+ +|ModelName |String |Name of the Model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelVersion |String |Version of the model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelCustomization Name |String |The Model Customization name | ++-------------------------+------------------+-------------------------------------------------+ +|modelCustomizationUuid |String |The Model Customization UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelVersionId |String |The Model version id | ++-------------------------+------------------+-------------------------------------------------+ +|modelUuid |String |The Model UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelInvariantUuid |String |The Model Invariant UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelInstanceName |String |The Model Instance name | ++-------------------------+------------------+-------------------------------------------------+ + +CloudConfiguration Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | ++-------------------------+------------------+-------------------------------------------------+ +|tenantId |String |Name of the Subscriber | ++-------------------------+------------------+-------------------------------------------------+ +|aicNodeClli |String |aicNodeClli property | ++-------------------------+------------------+-------------------------------------------------+ + +RequestInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|Source |String |source of the request | ++-------------------------+------------------+-------------------------------------------------+ +|billingAccountNumber |String |billingAccountNumber of the request | ++-------------------------+------------------+-------------------------------------------------+ +|callbackUrl |String |callbackUrl of the request | ++-------------------------+------------------+-------------------------------------------------+ +|correlator |String |correlator of the request | ++-------------------------+------------------+-------------------------------------------------+ +|orderNumber |String |orderNumber of the request | ++-------------------------+------------------+-------------------------------------------------+ +|productFamilyId |String |productFamilyId of the request | ++-------------------------+------------------+-------------------------------------------------+ +|orderVersion |String |orderVersion of the request | ++-------------------------+------------------+-------------------------------------------------+ +|instanceName |String |instanceName of the request | ++-------------------------+------------------+-------------------------------------------------+ +|suppressRollback |String |suppressRollback of the request | ++-------------------------+------------------+-------------------------------------------------+ +|requestorId |String |requestorId of the request | ++-------------------------+------------------+-------------------------------------------------+ + +relatedInstance List + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|relatedInstance |Object |relatedInstance Object | ++-------------------------+------------------+-------------------------------------------------+ + +relatedInstance List + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|instanceId |String |instanceId | ++-------------------------+------------------+-------------------------------------------------+ +|modelInfo |Object |Content of modelInfo object. | ++-------------------------+------------------+-------------------------------------------------+ + +.. _delete_volume_group: + +Delete Volume Group ++++++++++++++++++++ + ++--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +|Interface Definition|Description | ++====================+============================================================================================================================================+ +|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volume-groupinstance-id} | ++--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +|Operation Type |DELETE | ++--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +|Content-Type |application/json | ++--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Body: + ++----------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++================+=========+===========+==========================+===========================================+ +|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | ++----------------+---------+-----------+--------------------------+-------------------------------------------+ + +RequestDetails Object + ++---------------------+-------------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=====================+=========================+=================================================+ +|modelInfo |modelInfo Object |Content of modelInfo object. | ++---------------------+-------------------------+-------------------------------------------------+ +|cloudConfiguration |cloudConfiguration Object|Content of cloudConfiguration object. | ++---------------------+-------------------------+-------------------------------------------------+ +|requestInfo |requestInfo Object |Content of requestInfo object. | ++---------------------+-------------------------+-------------------------------------------------+ + +ModelInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|ModelType |String |Type of model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelName |String |Name of the Model | ++-------------------------+------------------+-------------------------------------------------+ + +CloudConfiguration Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | ++-------------------------+------------------+-------------------------------------------------+ +|tenantId |String |Name of the Subscriber | ++-------------------------+------------------+-------------------------------------------------+ + +RequestInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|Source |String |source of the request | ++-------------------------+------------------+-------------------------------------------------+ + +.. _create_vf_module: + +Create VF Module +++++++++++++++++ + ++--------------------+---------------------------------------------------------------------------------------------------------------+ +|Interface Definition|Description | ++====================+===============================================================================================================+ +|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules | ++--------------------+---------------------------------------------------------------------------------------------------------------+ +|Operation Type |POST | ++--------------------+---------------------------------------------------------------------------------------------------------------+ +|Content-Type |application/json | ++--------------------+---------------------------------------------------------------------------------------------------------------+ + +Request Body: + ++----------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++================+=========+===========+==========================+===========================================+ +|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | ++----------------+---------+-----------+--------------------------+-------------------------------------------+ + +RequestDetails Object + ++---------------------+-------------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=====================+=========================+=================================================+ +|modelInfo |modelInfo Object |Content of modelInfo object. | ++---------------------+-------------------------+-------------------------------------------------+ +|cloudConfiguration |cloudConfiguration Object|Content of cloudConfiguration object. | ++---------------------+-------------------------+-------------------------------------------------+ +|requestInfo |requestInfo Object |Content of requestInfo object. | ++---------------------+-------------------------+-------------------------------------------------+ +|relatedInstanceList |List |Content of relatedInstanceList. | ++---------------------+-------------------------+-------------------------------------------------+ + +ModelInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|ModelType |String |Type of model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelInvariantId |String |The Model Invariant Id. | ++-------------------------+------------------+-------------------------------------------------+ +|ModelNameVersionId |String |The modelname Version Id | ++-------------------------+------------------+-------------------------------------------------+ +|ModelName |String |Name of the Model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelVersion |String |Version of the model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelCustomization Name |String |The Model Customization name | ++-------------------------+------------------+-------------------------------------------------+ + +CloudConfiguration Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | ++-------------------------+------------------+-------------------------------------------------+ +|tenantId |String |Name of the Subscriber | ++-------------------------+------------------+-------------------------------------------------+ + +RequestInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|InstanceName |String |The instance Name | ++-------------------------+------------------+-------------------------------------------------+ +|Source |String |source of the request | ++-------------------------+------------------+-------------------------------------------------+ +|SuppressRollback |Boolean |SuppressRollback | ++-------------------------+------------------+-------------------------------------------------+ + +relatedInstance List + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|relatedInstance |Object |relatedInstance Object | ++-------------------------+------------------+-------------------------------------------------+ + +relatedInstance List + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|instanceId |String |instanceId | ++-------------------------+------------------+-------------------------------------------------+ +|modelInfo |Object |Content of modelInfo object. | ++-------------------------+------------------+-------------------------------------------------+ +|instanceName |String |Name of the instance | ++-------------------------+------------------+-------------------------------------------------+ + +.. _delete_vf_module: + +Delete VF Module +++++++++++++++++ + ++--------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +|Interface Definition|Description | ++====================+=====================================================================================================================================+ +|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleinstance-id} | ++--------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +|Operation Type |DELETE | ++--------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +|Content-Type |application/json | ++--------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + +Request Body: + ++----------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++================+=========+===========+==========================+===========================================+ +|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | ++----------------+---------+-----------+--------------------------+-------------------------------------------+ + +RequestDetails Object + ++---------------------+-------------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=====================+=========================+=================================================+ +|modelInfo |modelInfo Object |Content of modelInfo object. | ++---------------------+-------------------------+-------------------------------------------------+ +|cloudConfiguration |cloudConfiguration Object|Content of cloudConfiguration object. | ++---------------------+-------------------------+-------------------------------------------------+ +|requestInfo |requestInfo Object |Content of requestInfo object. | ++---------------------+-------------------------+-------------------------------------------------+ + +ModelInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|ModelType |String |Type of model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelInvariantId |String |The Model Invariant Id. | ++-------------------------+------------------+-------------------------------------------------+ +|ModelNameVersionId |String |The modelname Version Id | ++-------------------------+------------------+-------------------------------------------------+ +|ModelName |String |Name of the Model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelVersion |String |Version of the model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelCustomization Name |String |The Model Customization name | ++-------------------------+------------------+-------------------------------------------------+ + +CloudConfiguration Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | ++-------------------------+------------------+-------------------------------------------------+ +|tenantId |String |Name of the Subscriber | ++-------------------------+------------------+-------------------------------------------------+ + +RequestInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|Source |String |source of the request | ++-------------------------+------------------+-------------------------------------------------+ + + +.. _create_vnf: + +Create VNF +++++++++++ + ++--------------------+-------------------------------------------------------------------------------------+ +|Interface Definition|Description | ++====================+=====================================================================================+ +|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId}/vnfs | ++--------------------+-------------------------------------------------------------------------------------+ +|Operation Type |POST | ++--------------------+-------------------------------------------------------------------------------------+ +|Content-Type |application/json | ++--------------------+-------------------------------------------------------------------------------------+ + +Request Body: + ++----------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++================+=========+===========+==========================+===========================================+ +|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | ++----------------+---------+-----------+--------------------------+-------------------------------------------+ + +RequestDetails Object + ++-------------------+--------------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++===================+==========================+=================================================+ +|modelInfo |modelInfo Object |Content of modelInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|requestInfo |requestInfo Object |Content of requestInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|requestParameters |requestParameters Object |Content of requestParameters object. | ++-------------------+--------------------------+-------------------------------------------------+ +|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. | ++-------------------+--------------------------+-------------------------------------------------+ +|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. | ++-------------------+--------------------------+-------------------------------------------------+ +|project |project Object |Content of project object. | ++-------------------+--------------------------+-------------------------------------------------+ +|owningEntity |owningEntity Object |Content of owningEntity object. | ++-------------------+--------------------------+-------------------------------------------------+ +|platform |platform Object |Content of platform object. | ++-------------------+--------------------------+-------------------------------------------------+ +|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. | ++-------------------+--------------------------+-------------------------------------------------+ + +ModelInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|ModelType |String |Type of model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelInvariantId |String |The Model Invariant Id. | ++-------------------------+------------------+-------------------------------------------------+ +|ModelNameVersionId |String |The modelname Version Id | ++-------------------------+------------------+-------------------------------------------------+ +|ModelName |String |Name of the Model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelVersion |String |Version of the model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelCustomization Name |String |The Model Customization name | ++-------------------------+------------------+-------------------------------------------------+ +|modelCustomizationUuid |String |The Model Customization UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelVersionId |String |The Model version id | ++-------------------------+------------------+-------------------------------------------------+ +|modelUuid |String |The Model UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelInvariantUuid |String |The Model Invariant UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelInstanceName |String |The Model Instance name | ++-------------------------+------------------+-------------------------------------------------+ + +CloudConfiguration Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | ++-------------------------+------------------+-------------------------------------------------+ +|tenantId |String |Name of the Subscriber | ++-------------------------+------------------+-------------------------------------------------+ + +RequestInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|Source |String |source of the request | ++-------------------------+------------------+-------------------------------------------------+ +|billingAccountNumber |String |billingAccountNumber of the request | ++-------------------------+------------------+-------------------------------------------------+ +|callbackUrl |String |callbackUrl of the request | ++-------------------------+------------------+-------------------------------------------------+ +|correlator |String |correlator of the request | ++-------------------------+------------------+-------------------------------------------------+ +|orderNumber |String |orderNumber of the request | ++-------------------------+------------------+-------------------------------------------------+ +|productFamilyId |String |productFamilyId of the request | ++-------------------------+------------------+-------------------------------------------------+ +|orderVersion |String |orderVersion of the request | ++-------------------------+------------------+-------------------------------------------------+ +|instanceName |String |instanceName of the request | ++-------------------------+------------------+-------------------------------------------------+ +|suppressRollback |String |suppressRollback of the request | ++-------------------------+------------------+-------------------------------------------------+ +|requestorId |String |requestorId of the request | ++-------------------------+------------------+-------------------------------------------------+ + +relatedInstance List + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|relatedInstance |Object |relatedInstance Object | ++-------------------------+------------------+-------------------------------------------------+ + +relatedInstance List + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|instanceId |String |instanceId | ++-------------------------+------------------+-------------------------------------------------+ +|modelInfo |Object |Content of modelInfo object. | ++-------------------------+------------------+-------------------------------------------------+ + +RequestParameters Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|UserParams |Array |The product family Id. | ++-------------------------+------------------+-------------------------------------------------+ + +UserParams Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|name |String |Tag name of attribute | ++-------------------------+------------------+-------------------------------------------------+ +|value |String |Value of the tag | ++-------------------------+------------------+-------------------------------------------------+ + +.. _delete_vnf: + +Delete VNF +++++++++++ + ++--------------------+-----------------------------------------------------------------------------------------------------+ +|Interface Definition|Description | ++====================+=====================================================================================================+ +|URI |/onap/so/infra/serviceInstances/v6/{serviceInstanceId}/vnfs/{vnfInstanceId} | ++--------------------+-----------------------------------------------------------------------------------------------------+ +|Operation Type |DELETE | ++--------------------+-----------------------------------------------------------------------------------------------------+ +|Content-Type |application/json | ++--------------------+-----------------------------------------------------------------------------------------------------+ + +Request Body: + ++----------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++================+=========+===========+==========================+===========================================+ +|requestDetails |M |1 |requestDetails Object |Content of requestDetails object. | ++----------------+---------+-----------+--------------------------+-------------------------------------------+ + +RequestDetails Object + ++---------------------+-------------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=====================+=========================+=================================================+ +|modelInfo |modelInfo Object |Content of modelInfo object. | ++---------------------+-------------------------+-------------------------------------------------+ +|cloudConfiguration |cloudConfiguration Object|Content of cloudConfiguration object. | ++---------------------+-------------------------+-------------------------------------------------+ +|requestInfo |requestInfo Object |Content of requestInfo object. | ++---------------------+-------------------------+-------------------------------------------------+ +|requestParameters |requestParameters Object |Content of requestParameters object. | ++---------------------+-------------------------+-------------------------------------------------+ + +ModelInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|ModelType |String |Type of model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelName |String |Name of the Model | ++-------------------------+------------------+-------------------------------------------------+ + +CloudConfiguration Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|lcpCloudRegionId |String |CloudRegion Id (in A&AI) | ++-------------------------+------------------+-------------------------------------------------+ +|tenantId |String |Name of the Subscriber | ++-------------------------+------------------+-------------------------------------------------+ + +RequestInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|Source |String |source of the request | ++-------------------------+------------------+-------------------------------------------------+ + +RequestParameters Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|UserParams |Array |The product family Id. | ++-------------------------+------------------+-------------------------------------------------+ + +UserParams Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|name |String |Tag name of attribute | ++-------------------------+------------------+-------------------------------------------------+ +|value |String |Value of the tag | ++-------------------------+------------------+-------------------------------------------------+ + +.. _get_orchestration_request_by_id: + +GET Orchestration Request ++++++++++++++++++++++++++ + ++--------------------+-------------------------------------------------------------------------------------+ +|Interface Definition|Description | ++====================+=====================================================================================+ +|URI |/onap/so/infra/orchestrationRequests/v6/{request-id} | ++--------------------+-------------------------------------------------------------------------------------+ +|Operation Type |GET | ++--------------------+-------------------------------------------------------------------------------------+ +|Content-Type |application/json | ++--------------------+-------------------------------------------------------------------------------------+ + +Response Body: + ++----------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++================+=========+===========+==========================+===========================================+ +|request |M |1 |request Object |Content of request object. | ++----------------+---------+-----------+--------------------------+-------------------------------------------+ + +Request Object + ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++===================+=========+===========+==========================+===========================================+ +|requestId |M |1 |String |Request Id | ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ +|startTime |M |1 |request Object |Start time. | ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ +|requestScope |M |1 |request Object |Scope of the request. | ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ +|requestType |M |1 |request Object |Type of the request. | ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ +|requestDetails |M |1 |requestDetails Object |Type of the request. | ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ +|requestStatus |M |1 |requestStatus Object |Type of the request. | ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ + +RequestDetails Object + ++-------------------+--------------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++===================+==========================+=================================================+ +|modelInfo |modelInfo Object |Content of modelInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|requestInfo |requestInfo Object |Content of requestInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|requestParameters |requestParameters Object |Content of requestParameters object. | ++-------------------+--------------------------+-------------------------------------------------+ +|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. | ++-------------------+--------------------------+-------------------------------------------------+ +|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. | ++-------------------+--------------------------+-------------------------------------------------+ +|project |project Object |Content of project object. | ++-------------------+--------------------------+-------------------------------------------------+ +|owningEntity |owningEntity Object |Content of owningEntity object. | ++-------------------+--------------------------+-------------------------------------------------+ +|platform |platform Object |Content of platform object. | ++-------------------+--------------------------+-------------------------------------------------+ +|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. | ++-------------------+--------------------------+-------------------------------------------------+ + +ModelInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|ModelType |String |Type of model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelInvariantId |String |The Model Invariant Id. | ++-------------------------+------------------+-------------------------------------------------+ +|ModelNameVersionId |String |The modelname Version Id | ++-------------------------+------------------+-------------------------------------------------+ +|ModelName |String |Name of the Model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelVersion |String |Version of the model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelCustomization Name |String |The Model Customization name | ++-------------------------+------------------+-------------------------------------------------+ +|modelCustomizationUuid |String |The Model Customization UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelVersionId |String |The Model version id | ++-------------------------+------------------+-------------------------------------------------+ +|modelUuid |String |The Model UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelInvariantUuid |String |The Model Invariant UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelInstanceName |String |The Model Instance name | ++-------------------------+------------------+-------------------------------------------------+ + +SubscriberInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|GlobalSubscriberId |String |Global customer Id (in A&AI) | ++-------------------------+------------------+-------------------------------------------------+ +|SubscriberName |String |Name of the Subscriber | ++-------------------------+------------------+-------------------------------------------------+ + +RequestInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|Source |String |source of the request | ++-------------------------+------------------+-------------------------------------------------+ +|billingAccountNumber |String |billingAccountNumber of the request | ++-------------------------+------------------+-------------------------------------------------+ +|callbackUrl |String |callbackUrl of the request | ++-------------------------+------------------+-------------------------------------------------+ +|correlator |String |correlator of the request | ++-------------------------+------------------+-------------------------------------------------+ +|orderNumber |String |orderNumber of the request | ++-------------------------+------------------+-------------------------------------------------+ +|productFamilyId |String |productFamilyId of the request | ++-------------------------+------------------+-------------------------------------------------+ +|orderVersion |String |orderVersion of the request | ++-------------------------+------------------+-------------------------------------------------+ +|instanceName |String |instanceName of the request | ++-------------------------+------------------+-------------------------------------------------+ +|suppressRollback |String |suppressRollback of the request | ++-------------------------+------------------+-------------------------------------------------+ +|requestorId |String |requestorId of the request | ++-------------------------+------------------+-------------------------------------------------+ + +RequestParameters Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|SubscriptionServiceType |String |The service type of the Subscription | ++-------------------------+------------------+-------------------------------------------------+ + +RequestStatus Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|finishTime |String |Time | ++-------------------------+------------------+-------------------------------------------------+ +|requestState |String |state of the request | ++-------------------------+------------------+-------------------------------------------------+ +|statusMessage |String |statusMessage | ++-------------------------+------------------+-------------------------------------------------+ +|percentProgress |String |percentage of progress | ++-------------------------+------------------+-------------------------------------------------+ + + +.. _get_orchestration_request_all: + +GET Orchestration Requests +++++++++++++++++++++++++++ + ++--------------------+--------------------------------------------------------------+ +|Interface Definition|Description | ++====================+==============================================================+ +|URI |/onap/so/infra/orchestrationRequests/v6 | ++--------------------+--------------------------------------------------------------+ +|Operation Type |GET | ++--------------------+--------------------------------------------------------------+ +|Content-Type |application/json | ++--------------------+--------------------------------------------------------------+ + +Response Body: + ++----------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++================+=========+===========+==========================+===========================================+ +|requestList |M |1 |Array |Content of request List. | ++----------------+---------+-----------+--------------------------+-------------------------------------------+ + +RequestList : + ++----------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++================+=========+===========+==========================+===========================================+ +|request |M |1 |request Object |Content of request object. | ++----------------+---------+-----------+--------------------------+-------------------------------------------+ + +Request Object + ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ +|Attribute |Qualifier|Cardinality|Content |Description | ++===================+=========+===========+==========================+===========================================+ +|requestId |M |1 |String |Request Id. | ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ +|startTime |M |1 |request Object |Start time. | ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ +|requestScope |M |1 |request Object |Scope of the request. | ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ +|requestType |M |1 |request Object |Type of the request. | ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ +|requestDetails |M |1 |requestDetails Object |Type of the request. | ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ +|requestStatus |M |1 |requestStatus Object |Type of the request. | ++-------------------+---------+-----------+--------------------------+-------------------------------------------+ + +RequestDetails Object + ++-------------------+--------------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++===================+==========================+=================================================+ +|modelInfo |modelInfo Object |Content of modelInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|requestInfo |requestInfo Object |Content of requestInfo object. | ++-------------------+--------------------------+-------------------------------------------------+ +|requestParameters |requestParameters Object |Content of requestParameters object. | ++-------------------+--------------------------+-------------------------------------------------+ +|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. | ++-------------------+--------------------------+-------------------------------------------------+ +|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. | ++-------------------+--------------------------+-------------------------------------------------+ +|project |project Object |Content of project object. | ++-------------------+--------------------------+-------------------------------------------------+ +|owningEntity |owningEntity Object |Content of owningEntity object. | ++-------------------+--------------------------+-------------------------------------------------+ +|platform |platform Object |Content of platform object. | ++-------------------+--------------------------+-------------------------------------------------+ +|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. | ++-------------------+--------------------------+-------------------------------------------------+ + +ModelInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|ModelType |String |Type of model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelInvariantId |String |The Model Invariant Id. | ++-------------------------+------------------+-------------------------------------------------+ +|ModelNameVersionId |String |The modelname Version Id | ++-------------------------+------------------+-------------------------------------------------+ +|ModelName |String |Name of the Model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelVersion |String |Version of the model | ++-------------------------+------------------+-------------------------------------------------+ +|ModelCustomization Name |String |The Model Customization name | ++-------------------------+------------------+-------------------------------------------------+ +|modelCustomizationUuid |String |The Model Customization UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelVersionId |String |The Model version id | ++-------------------------+------------------+-------------------------------------------------+ +|modelUuid |String |The Model UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelInvariantUuid |String |The Model Invariant UUid | ++-------------------------+------------------+-------------------------------------------------+ +|modelInstanceName |String |The Model Instance name | ++-------------------------+------------------+-------------------------------------------------+ + +SubscriberInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|GlobalSubscriberId |String |Global customer Id (in A&AI) | ++-------------------------+------------------+-------------------------------------------------+ +|SubscriberName |String |Name of the Subscriber | ++-------------------------+------------------+-------------------------------------------------+ + +RequestInfo Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|Source |String |source of the request | ++-------------------------+------------------+-------------------------------------------------+ +|billingAccountNumber |String |billingAccountNumber of the request | ++-------------------------+------------------+-------------------------------------------------+ +|callbackUrl |String |callbackUrl of the request | ++-------------------------+------------------+-------------------------------------------------+ +|correlator |String |correlator of the request | ++-------------------------+------------------+-------------------------------------------------+ +|orderNumber |String |orderNumber of the request | ++-------------------------+------------------+-------------------------------------------------+ +|productFamilyId |String |productFamilyId of the request | ++-------------------------+------------------+-------------------------------------------------+ +|orderVersion |String |orderVersion of the request | ++-------------------------+------------------+-------------------------------------------------+ +|instanceName |String |instanceName of the request | ++-------------------------+------------------+-------------------------------------------------+ +|suppressRollback |String |suppressRollback of the request | ++-------------------------+------------------+-------------------------------------------------+ +|requestorId |String |requestorId of the request | ++-------------------------+------------------+-------------------------------------------------+ + +RequestParameters Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|SubscriptionServiceType |String |The service type of the Subscription | ++-------------------------+------------------+-------------------------------------------------+ + +RequestStatus Object + ++-------------------------+------------------+-------------------------------------------------+ +|Attribute |Content |Description | ++=========================+==================+=================================================+ +|finishTime |String |Time | ++-------------------------+------------------+-------------------------------------------------+ +|requestState |String |state of the request | ++-------------------------+------------------+-------------------------------------------------+ +|statusMessage |String |statusMessage | ++-------------------------+------------------+-------------------------------------------------+ +|percentProgress |String |percentage of progress | ++-------------------------+------------------+-------------------------------------------------+ diff --git a/docs/api/offered_consumed_apis.rst b/docs/api/offered_consumed_apis.rst index 0caef0a426..1d0a8f005b 100644 --- a/docs/api/offered_consumed_apis.rst +++ b/docs/api/offered_consumed_apis.rst @@ -3,7 +3,7 @@ .. Copyright 2018 Huawei Technologies Co., Ltd. SO Offered and Consumed APIs -===================================== +============================ The list of APIs that SO offers can be found in following table: @@ -22,8 +22,9 @@ The list of APIs that SO offers can be found in following table: "swagger json file", "html doc", "yaml doc" ":download:`link <swagger/swagger.json>`", ":download:`link <swagger/swagger.html>`", ":download:`link <swagger/swagger.yaml>`" - -The list of APIs that SO offerers for monitroing the BPMN flows could be found in the following table: + +The list of APIs that SO offerers for monitoring the BPMN flows +could be found in the following table: .. csv-table:: :header: "|Swagger-icon|", "|yml-icon|" @@ -33,11 +34,13 @@ The list of APIs that SO offerers for monitroing the BPMN flows could be found i ":download:`link <swagger/SO_MONITORING_SWAGGER.json>`", ":download:`link <swagger/SO_MONITORING_SWAGGER.yaml>`" Further Reading ----------------------------------------- +--------------- Detailed documentation can be found here: .. toctree:: :maxdepth: 1 - apis/SO_Interface.rst
\ No newline at end of file + apis/serviceInstances-api.rst + apis/e2eServiceInstances-api.rst + apis/consumed-apis.rst diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java index b1d38983ec..9b72bdc608 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java @@ -444,7 +444,6 @@ public class ServiceInstances extends AbstractRestHandler { requestHandlerUtils.getRequestUri(requestContext, uriPrefix)); } - @DELETE @Path("/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}") @Consumes(MediaType.APPLICATION_JSON) @@ -593,7 +592,6 @@ public class ServiceInstances extends AbstractRestHandler { requestHandlerUtils.getRequestUri(requestContext, uriPrefix)); } - @POST @Path("/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups") @Consumes(MediaType.APPLICATION_JSON) @@ -766,6 +764,27 @@ public class ServiceInstances extends AbstractRestHandler { requestHandlerUtils.getRequestUri(requestContext, uriPrefix)); } + /** + * This method is used for POST a request to the BPEL client (BPMN). + * + * Convert the requestJson to ServiceInstanceRequest(sir), create the msoRequest object, check whether this request + * is already being processed in requestdb for duplicate check. + * + * Based on the alacarte flag, sir and msoRequest will do the recipe lookup from the service and servicerecipe table + * of catalogdb, and get the OrchestrationURI. + * + * If the present request is not the duplicate request then this request will be saved in the requestdb. and will + * POST a request to the BPMN engine at the OrchestrationURI fetched. + * + * @param requestJSON Json fetched as body in the API call + * @param action Type of action to be performed + * @param instanceIdMap Map of instance ids of service/vnf/vf/configuration etc.. + * @param version Supported version of API + * @param requestId Unique id for the request + * @param requestUri + * @return response object + * @throws ApiException + */ public Response serviceInstances(String requestJSON, Actions action, HashMap<String, String> instanceIdMap, String version, String requestId, String requestUri) throws ApiException { return serviceInstances(requestJSON, action, instanceIdMap, version, requestId, requestUri, null); @@ -877,6 +896,7 @@ public class ServiceInstances extends AbstractRestHandler { try { infraActiveRequestsClient.save(currentActiveReq); } catch (Exception e) { + logger.error("Exception occurred", e); ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.DataError) .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); @@ -890,6 +910,7 @@ public class ServiceInstances extends AbstractRestHandler { aLaCarte = false; } + RequestClientParameter requestClientParameter = null; try { requestClientParameter = new RequestClientParameter.Builder().setRequestId(requestId) @@ -902,6 +923,7 @@ public class ServiceInstances extends AbstractRestHandler { .setApiVersion(apiVersion).setALaCarte(aLaCarte).setRequestUri(requestUri) .setInstanceGroupId(instanceGroupId).build(); } catch (IOException e) { + logger.error("Exception occurred", e); ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, ErrorCode.SchemaError) .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); @@ -927,6 +949,21 @@ public class ServiceInstances extends AbstractRestHandler { return action; } + /** + * This method deletes the Instance Groups. + * + * This method will check whether the request is not duplicate in requestdb. if its not then will save as a new + * request. And will send a POST request to BEPL client to delete the Insatnce Groups. + * + * @param action + * @param instanceIdMap + * @param version + * @param requestId + * @param requestUri + * @param requestContext + * @return + * @throws ApiException + */ public Response deleteInstanceGroups(Actions action, HashMap<String, String> instanceIdMap, String version, String requestId, String requestUri, ContainerRequestContext requestContext) throws ApiException { String instanceGroupId = instanceIdMap.get(CommonConstants.INSTANCE_GROUP_INSTANCE_ID); @@ -980,6 +1017,7 @@ public class ServiceInstances extends AbstractRestHandler { try { infraActiveRequestsClient.save(currentActiveReq); } catch (Exception e) { + logger.error("Exception occurred", e); ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.DataError) .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); @@ -992,6 +1030,7 @@ public class ServiceInstances extends AbstractRestHandler { .setRequestAction(action.toString()).setApiVersion(apiVersion).setALaCarte(aLaCarte) .setRequestUri(requestUri).setInstanceGroupId(instanceGroupId).build(); + return requestHandlerUtils.postBPELRequest(currentActiveReq, requestClientParameter, recipeLookupResult.getOrchestrationURI(), requestScope); } @@ -1005,7 +1044,8 @@ public class ServiceInstances extends AbstractRestHandler { protected RecipeLookupResult getServiceInstanceOrchestrationURI(ServiceInstancesRequest sir, Actions action, boolean alaCarteFlag, InfraActiveRequests currentActiveReq) throws ApiException { RecipeLookupResult recipeLookupResult = null; - // if the aLaCarte flag is set to TRUE, the API-H should choose the VID_DEFAULT recipe for the requested action + // if the aLaCarte flag is set to TRUE, the API-H should choose the VID_DEFAULT + // recipe for the requested action ModelInfo modelInfo = sir.getRequestDetails().getModelInfo(); // Query MSO Catalog DB @@ -1021,7 +1061,6 @@ public class ServiceInstances extends AbstractRestHandler { new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError) .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); - ValidateException validateException = new ValidateException.Builder(e.getMessage(), HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build(); @@ -1040,7 +1079,6 @@ public class ServiceInstances extends AbstractRestHandler { new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError) .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); - ValidateException validateException = new ValidateException.Builder(e.getMessage(), HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build(); @@ -1058,7 +1096,6 @@ public class ServiceInstances extends AbstractRestHandler { new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError) .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); - ValidateException validateException = new ValidateException.Builder(e.getMessage(), HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build(); @@ -1075,7 +1112,6 @@ public class ServiceInstances extends AbstractRestHandler { new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.DataError) .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); - RecipeNotFoundException recipeNotFoundExceptionException = new RecipeNotFoundException.Builder("Recipe could not be retrieved from catalog DB.", HttpStatus.SC_NOT_FOUND, ErrorNumbers.SVC_GENERAL_SERVICE_ERROR).errorInfo(errorLoggerInfo) @@ -1125,7 +1161,8 @@ public class ServiceInstances extends AbstractRestHandler { } } - // if an aLaCarte flag was sent in the request, throw an error if the recipe was not found + // if an aLaCarte flag was sent in the request, throw an error if the recipe was + // not found RequestParameters reqParam = requestDetails.getRequestParameters(); if (reqParam != null && alaCarteFlag && recipe == null) { return null; @@ -1314,23 +1351,32 @@ public class ServiceInstances extends AbstractRestHandler { if (modelInfo.getModelType().equals(ModelType.vnf)) { // a. For a vnf request (only create, no update currently): - // i. (v3-v4) If modelInfo.modelCustomizationId is provided, use it to validate catalog DB has record in + // i. (v3-v4) If modelInfo.modelCustomizationId is provided, use it to validate + // catalog DB has record in // vnf_resource_customization.model_customization_uuid. - // ii. (v2-v4) If modelInfo.modelCustomizationId is NOT provided (because it is a pre-1702 ASDC model or + // ii. (v2-v4) If modelInfo.modelCustomizationId is NOT provided (because it is + // a pre-1702 ASDC model or // pre-v3), then modelInfo.modelCustomizationName must have // been provided (else create request should be rejected). APIH should use the - // relatedInstance.modelInfo[service].modelVersionId** + modelInfo[vnf].modelCustomizationName - // to “join�? service_to_resource_customizations with vnf_resource_customization to confirm a + // relatedInstance.modelInfo[service].modelVersionId** + + // modelInfo[vnf].modelCustomizationName + // to “join�? service_to_resource_customizations with + // vnf_resource_customization to confirm a // vnf_resource_customization.model_customization_uuid record exists. // **If relatedInstance.modelInfo[service].modelVersionId was not provided, use - // relatedInstance.modelInfo[service].modelInvariantId + modelVersion instead to lookup modelVersionId + // relatedInstance.modelInfo[service].modelInvariantId + modelVersion instead to + // lookup modelVersionId // (MODEL_UUID) in SERVICE table. - // iii. Regardless of how the value was provided/obtained above, APIH must always populate - // vnfModelCustomizationId in bpmnRequest. It would be assumed it was MSO generated + // iii. Regardless of how the value was provided/obtained above, APIH must + // always populate + // vnfModelCustomizationId in bpmnRequest. It would be assumed it was MSO + // generated // during 1707 data migration if VID did not provide it originally on request. - // iv. Note: continue to construct the “vnf-type�? value and pass to BPMN (must still be populated + // iv. Note: continue to construct the “vnf-type�? value and pass to BPMN + // (must still be populated // in A&AI). - // 1. If modelCustomizationName is NOT provided on a vnf/vfModule request, use modelCustomizationId to + // 1. If modelCustomizationName is NOT provided on a vnf/vfModule request, use + // modelCustomizationId to // look it up in our catalog to construct vnf-type value to pass to BPMN. VnfResource vnfResource = null; @@ -1461,14 +1507,13 @@ public class ServiceInstances extends AbstractRestHandler { throw new ValidationException("vfModuleCustomization"); } else if (vfModule == null && vfmc != null) { vfModule = vfmc.getVfModule(); // can't be null as vfModuleModelUUID is not-null property in - // VfModuleCustomization table + // VfModuleCustomization table } if (modelInfo.getModelVersionId() == null) { modelInfo.setModelVersionId(vfModule.getModelUUID()); } - recipe = catalogDbClient.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction( vfModule.getModelUUID(), vnfComponentType, action.toString()); if (recipe == null) { @@ -1531,7 +1576,6 @@ public class ServiceInstances extends AbstractRestHandler { return new RecipeLookupResult(vnfRecipe.getOrchestrationUri(), vnfRecipe.getRecipeTimeout()); } - private RecipeLookupResult getNetworkUri(ServiceInstancesRequest sir, Actions action) throws ValidationException { String defaultNetworkType = requestHandlerUtils.getDefaultModel(sir); @@ -1571,7 +1615,6 @@ public class ServiceInstances extends AbstractRestHandler { return recipe != null ? new RecipeLookupResult(recipe.getOrchestrationUri(), recipe.getRecipeTimeout()) : null; } - private Response configurationRecipeLookup(String requestJSON, Action action, HashMap<String, String> instanceIdMap, String version, String requestId, String requestUri) throws ApiException { String serviceInstanceId; @@ -1610,7 +1653,6 @@ public class ServiceInstances extends AbstractRestHandler { referencesResponse.setRequestId(requestId); serviceResponse.setRequestReferences(referencesResponse); - String orchestrationUri = env.getProperty(CommonConstants.ALACARTE_ORCHESTRATION); String timeOut = env.getProperty(CommonConstants.ALACARTE_RECIPE_TIMEOUT); @@ -1622,7 +1664,6 @@ public class ServiceInstances extends AbstractRestHandler { new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, ErrorCode.DataError) .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build(); - ValidateException validateException = new ValidateException.Builder(error, HttpStatus.SC_NOT_FOUND, ErrorNumbers.SVC_GENERAL_SERVICE_ERROR).errorInfo(errorLoggerInfo).build(); |