aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteAAIInventory.java79
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java52
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryTask.java106
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventory.java114
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTask.java41
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java84
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java5
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java53
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java2
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactory.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImpl.java23
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java71
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventoryTest.java47
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTaskTest.java1
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java8
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImplTest.java7
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn174
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn120
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn206
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVfModuleBBTest.java117
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVfModuleBBTest.java91
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/vfmodule/CreateVFModule.java86
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/vfmodule/DeleteVFModule.java51
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java3
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/vfmodule/CreateVFModuleTest.java108
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAISingleTransactionClient.java18
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAITransactionalClient.java17
-rw-r--r--common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java8
-rw-r--r--common/src/main/java/org/onap/so/cloud/resource/beans/CloudInformation.java101
-rw-r--r--common/src/main/java/org/onap/so/cloud/resource/beans/NodeType.java28
-rw-r--r--deployment-configs/src/main/resources/logger/logback-spring.xml2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStack.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDelete.java5
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/NetworkCreateDeleteCloud.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryBaseStack.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameFailureId.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplace.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplaceVolume.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStack.java3
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdDoubleFailure.java5
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdFailure.java3
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro1.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro2.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModule.java4
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModuleVolume.java4
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdVolumeGroup.java3
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro1.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro2.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro3.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro1.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro2.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro3.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/nova/NovaKeyPairDelete.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCHAPort0.java3
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort0.java3
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort1.java3
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCRole1Port0.java3
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCService1Port0.java3
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCTrusted.java3
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsRole1Sub1.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub0.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub1.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub2.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByBaseStackName.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByStackName.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryRole1StackResources.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryService1StackResources.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsRole1Sub0.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub0.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub1.java2
-rw-r--r--so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub2.java2
-rw-r--r--so-simulator/src/main/resources/openstack/gr_api/GetFlavor1.json22
-rw-r--r--so-simulator/src/main/resources/openstack/gr_api/GetImage.json31
74 files changed, 1200 insertions, 781 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteAAIInventory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteAAIInventory.java
new file mode 100644
index 0000000000..77a7435295
--- /dev/null
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteAAIInventory.java
@@ -0,0 +1,79 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.inventory.delete;
+
+import org.onap.so.client.aai.AAIResourcesClient;
+import org.onap.so.cloud.CloudConfig;
+import org.onap.so.cloud.resource.beans.CloudInformation;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.heatbridge.HeatBridgeApi;
+import org.onap.so.heatbridge.HeatBridgeImpl;
+import org.onap.so.openstack.exceptions.MsoCloudSiteNotFound;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Component;
+
+@Component
+public class DeleteAAIInventory {
+
+ private static final Logger logger = LoggerFactory.getLogger(DeleteAAIInventory.class);
+
+ private AAIResourcesClient aaiClient;
+
+ @Autowired
+ protected CloudConfig cloudConfig;
+
+ @Autowired
+ protected Environment env;
+
+ public void heatbridge(CloudInformation cloudInformation, boolean dryrun) {
+ try {
+ if (!dryrun) {
+ logger.debug("Heatbridge delete executing");
+
+ CloudSite cloudSite = cloudConfig.getCloudSite(cloudInformation.getRegionId())
+ .orElseThrow(() -> new MsoCloudSiteNotFound(cloudInformation.getRegionId()));
+ CloudIdentity cloudIdentity = cloudSite.getIdentityService();
+ HeatBridgeApi heatBridgeClient = new HeatBridgeImpl(new AAIResourcesClient(), cloudIdentity,
+ cloudInformation.getOwner(), cloudInformation.getRegionId(), cloudSite.getRegionId(),
+ cloudInformation.getTenantId());
+ heatBridgeClient.authenticate();
+ heatBridgeClient.deleteVfModuleData(cloudInformation.getVnfId(), cloudInformation.getVfModuleId());
+ }
+ } catch (Exception ex) {
+ logger.debug("Heatbrige failed for stackId: " + cloudInformation.getTemplateInstanceId(), ex);
+ }
+ }
+
+ protected AAIResourcesClient getAaiClient() {
+ if (aaiClient == null)
+ return new AAIResourcesClient();
+ else
+ return aaiClient;
+ }
+
+ protected void setAaiClient(AAIResourcesClient aaiResource) {
+ aaiClient = aaiResource;
+ }
+}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java
new file mode 100644
index 0000000000..b104c3310c
--- /dev/null
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.inventory.delete;
+
+import javax.annotation.PostConstruct;
+import org.camunda.bpm.client.ExternalTaskClient;
+import org.onap.so.utils.ExternalTaskServiceUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Profile;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Component;
+
+@Component
+@Profile("!test")
+public class DeleteInventoryService {
+
+ @Autowired
+ public Environment env;
+
+ @Autowired
+ private DeleteInventoryTask deleteInventory;
+
+ @Autowired
+ private ExternalTaskServiceUtils externalTaskServiceUtils;
+
+ @PostConstruct
+ public void auditAAIInventory() throws Exception {
+ ExternalTaskClient client = externalTaskServiceUtils.createExternalTaskClient();
+ client.subscribe("InventoryDelete")
+ .lockDuration(Long.parseLong(env.getProperty("mso.audit.lock-time", "60000")))
+ .handler(deleteInventory::executeExternalTask).open();
+ }
+
+}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryTask.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryTask.java
new file mode 100644
index 0000000000..c5feee2089
--- /dev/null
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryTask.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ *
+ * Copyright (C) 2019 IBM
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.inventory.delete;
+
+import org.camunda.bpm.client.task.ExternalTask;
+import org.camunda.bpm.client.task.ExternalTaskService;
+import org.onap.logging.ref.slf4j.ONAPLogConstants;
+import org.onap.so.cloud.resource.beans.CloudInformation;
+import org.onap.so.logging.tasks.AuditMDCSetup;
+import org.onap.so.utils.ExternalTaskUtils;
+import org.onap.so.utils.RetrySequenceLevel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Component;
+
+
+@Component
+public class DeleteInventoryTask extends ExternalTaskUtils {
+
+ private static final String UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI = "Unable to write all inventory to A&AI";
+
+ private static final Logger logger = LoggerFactory.getLogger(DeleteInventoryTask.class);
+
+ private static final String AAI_INVENTORY_FAILURE = "AAIInventoryFailure";
+
+ @Autowired
+ private DeleteAAIInventory deleteInventory;
+
+ @Autowired
+ private Environment env;
+
+ @Autowired
+ private AuditMDCSetup mdcSetup;
+
+ public DeleteInventoryTask() {
+ super(RetrySequenceLevel.SHORT);
+ }
+
+ protected void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
+ mdcSetup.setupMDC(externalTask);
+ boolean inventoryException = false;
+ String externalTaskId = externalTask.getId();
+ CloudInformation cloudInformation = externalTask.getVariable("cloudInformation");
+ boolean success = true;
+ if (cloudInformation != null) {
+ Integer retryCount = externalTask.getRetries();
+ try {
+ deleteInventory.heatbridge(cloudInformation, env.getProperty("heatBridgeDryrun", Boolean.class, true));
+ } catch (Exception e) {
+ logger.error("Error during inventory of stack", e);
+ success = false;
+ }
+ mdcSetup.setElapsedTime();
+ if (success) {
+ externalTaskService.complete(externalTask);
+ mdcSetup.setResponseCode(ONAPLogConstants.ResponseStatus.COMPLETE.toString());
+ logger.debug("The External Task Id: {} Successful", externalTaskId);
+ logger.info(ONAPLogConstants.Markers.EXIT, "Exiting");
+ mdcSetup.clearClientMDCs();
+ } else {
+ if (retryCount == null) {
+ logger.error("The External Task Id: {} Failed, Setting Retries to Default Start Value: {}",
+ externalTaskId, getRetrySequence().length);
+ externalTaskService.handleFailure(externalTask, UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI,
+ UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI, getRetrySequence().length, 10000);
+ } else if (retryCount != null && retryCount - 1 == 0) {
+ externalTaskService.handleBpmnError(externalTask, AAI_INVENTORY_FAILURE);
+ mdcSetup.setResponseCode(ONAPLogConstants.ResponseStatus.ERROR.toString());
+ logger.error("The External Task Id: {} Failed, All Retries Exhausted", externalTaskId);
+ logger.info(ONAPLogConstants.Markers.EXIT, "Exiting");
+ } else {
+ logger.error("The External Task Id: {} Failed, Decrementing Retries: {} , Retry Delay: ",
+ externalTaskId, retryCount - 1, calculateRetryDelay(retryCount));
+ externalTaskService.handleFailure(externalTask, UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI,
+ UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI, retryCount - 1, calculateRetryDelay(retryCount));
+ }
+ logger.error("The External Task Id: {} Failed", externalTaskId);
+ }
+ } else {
+ logger.error("The External Task Id: {} Failed, No Cloud Information Provided", externalTaskId);
+ externalTaskService.handleBpmnError(externalTask, AAI_INVENTORY_FAILURE);
+ }
+ }
+}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventory.java
index a3cb99e3af..e7c0fe21e0 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventory.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventory.java
@@ -20,44 +20,104 @@
package org.onap.so.adapters.tasks.inventory;
-import java.util.Optional;
-import java.util.stream.Stream;
-import org.onap.so.client.aai.AAIObjectType;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.collections.CollectionUtils;
import org.onap.so.client.aai.AAIResourcesClient;
-import org.onap.so.client.aai.entities.uri.AAIUriFactory;
-import org.onap.so.objects.audit.AAIObjectAudit;
-import org.onap.so.objects.audit.AAIObjectAuditList;
+import org.onap.so.cloud.CloudConfig;
+import org.onap.so.cloud.resource.beans.CloudInformation;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.heatbridge.HeatBridgeApi;
+import org.onap.so.heatbridge.HeatBridgeImpl;
+import org.onap.so.openstack.exceptions.MsoCloudSiteNotFound;
+import org.openstack4j.model.compute.Flavor;
+import org.openstack4j.model.compute.Image;
+import org.openstack4j.model.compute.Server;
+import org.openstack4j.model.heat.Resource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
@Component
public class CreateAAIInventory {
+ private static final Logger logger = LoggerFactory.getLogger(CreateAAIInventory.class);
+
private AAIResourcesClient aaiClient;
- public void createInventory(AAIObjectAuditList auditList) throws InventoryException {
- if (didAuditFailVserverLInterfaces(auditList)) {
- throw new InventoryException("Audit failed for VServer or LInterface cannot write Sub-Interfaces");
- }
- auditList.getAuditList().parallelStream()
- .filter(auditObject -> !auditObject.isDoesObjectExist()
- && AAIObjectType.SUB_L_INTERFACE.typeName().equals(auditObject.getAaiObjectType()))
- .forEach(auditObject -> getAaiClient().createIfNotExists(AAIUriFactory.createResourceFromExistingURI(
- AAIObjectType.fromTypeName(auditObject.getAaiObjectType()), auditObject.getResourceURI()),
- Optional.of(auditObject.getAaiObject())));
- }
+ @Autowired
+ protected CloudConfig cloudConfig;
+
+ @Autowired
+ protected Environment env;
+
+ public void heatbridge(CloudInformation cloudInformation) {
+ try {
+ CloudSite cloudSite = cloudConfig.getCloudSite(cloudInformation.getRegionId())
+ .orElseThrow(() -> new MsoCloudSiteNotFound(cloudInformation.getRegionId()));
+ CloudIdentity cloudIdentity = cloudSite.getIdentityService();
+ String heatStackId = cloudInformation.getTemplateInstanceId().split("/")[1];
+
+ List<String> oobMgtNetNames = new ArrayList<>();
+
+ HeatBridgeApi heatBridgeClient =
+ new HeatBridgeImpl(new AAIResourcesClient(), cloudIdentity, cloudInformation.getOwner(),
+ cloudInformation.getRegionId(), cloudSite.getRegionId(), cloudInformation.getTenantId());
+
+ heatBridgeClient.authenticate();
+ List<Resource> stackResources =
+ heatBridgeClient.queryNestedHeatStackResources(cloudInformation.getTemplateInstanceId());
- /**
- * @param auditHeatStackFailed
- * @param auditList
- * @return
- */
- protected boolean didAuditFailVserverLInterfaces(AAIObjectAuditList auditList) {
- Stream<AAIObjectAudit> issue = auditList.getAuditList().stream()
- .filter(auditObject -> auditObject.getAaiObjectType().equals(AAIObjectType.VSERVER.typeName())
- || auditObject.getAaiObjectType().equals(AAIObjectType.L_INTERFACE.typeName()));
+ List<Server> osServers = heatBridgeClient.getAllOpenstackServers(stackResources);
- return issue.filter(auditObject -> !auditObject.isDoesObjectExist()).findFirst().map(v -> true).orElse(false);
+ heatBridgeClient.createPserversAndPinterfacesIfNotPresentInAai(stackResources);
+
+ List<Image> osImages = heatBridgeClient.extractOpenstackImagesFromServers(osServers);
+
+ List<Flavor> osFlavors = heatBridgeClient.extractOpenstackFlavorsFromServers(osServers);
+
+ logger.debug("Successfully queried heat stack{} for resources.", heatStackId);
+ // os images
+ if (osImages != null && !osImages.isEmpty()) {
+ heatBridgeClient.buildAddImagesToAaiAction(osImages);
+ logger.debug("Successfully built AAI actions to add images.");
+ } else {
+ logger.debug("No images to update to AAI.");
+ }
+ // flavors
+ if (osFlavors != null && !osFlavors.isEmpty()) {
+ heatBridgeClient.buildAddFlavorsToAaiAction(osFlavors);
+ logger.debug("Successfully built AAI actions to add flavors.");
+ } else {
+ logger.debug("No flavors to update to AAI.");
+ }
+
+ // compute resources
+ heatBridgeClient.buildAddVserversToAaiAction(cloudInformation.getVnfId(), cloudInformation.getVfModuleId(),
+ osServers);
+ logger.debug("Successfully queried compute resources and built AAI vserver actions.");
+
+ // neutron resources
+ List<String> oobMgtNetIds = new ArrayList<>();
+
+ // if no network-id list is provided, however network-name list is
+ if (!CollectionUtils.isEmpty(oobMgtNetNames)) {
+ oobMgtNetIds = heatBridgeClient.extractNetworkIds(oobMgtNetNames);
+ }
+ heatBridgeClient.buildAddVserverLInterfacesToAaiAction(stackResources, oobMgtNetIds);
+ logger.debug(
+ "Successfully queried neutron resources and built AAI actions to add l-interfaces to vservers.");
+
+ // Update AAI
+ logger.debug("Current Dry Run Value: {}", env.getProperty("heatBridgeDryrun", Boolean.class, true));
+ heatBridgeClient.submitToAai(env.getProperty("heatBridgeDryrun", Boolean.class, true));
+ } catch (Exception ex) {
+ logger.debug("Heatbrige failed for stackId: " + cloudInformation.getTemplateInstanceId(), ex);
+ }
}
protected AAIResourcesClient getAaiClient() {
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTask.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTask.java
index 04dcd9ff61..317dae61b9 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTask.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTask.java
@@ -25,9 +25,8 @@ package org.onap.so.adapters.tasks.inventory;
import org.camunda.bpm.client.task.ExternalTask;
import org.camunda.bpm.client.task.ExternalTaskService;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
-import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
+import org.onap.so.cloud.resource.beans.CloudInformation;
import org.onap.so.logging.tasks.AuditMDCSetup;
-import org.onap.so.objects.audit.AAIObjectAuditList;
import org.onap.so.utils.ExternalTaskUtils;
import org.onap.so.utils.RetrySequenceLevel;
import org.slf4j.Logger;
@@ -35,6 +34,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
+
@Component
public class CreateInventoryTask extends ExternalTaskUtils {
@@ -57,29 +57,16 @@ public class CreateInventoryTask extends ExternalTaskUtils {
public void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
mdcSetup.setupMDC(externalTask);
- boolean success = true;
boolean inventoryException = false;
- String auditInventoryString = externalTask.getVariable("auditInventoryResult");
- AAIObjectAuditList auditInventory = null;
String externalTaskId = externalTask.getId();
- try {
- GraphInventoryCommonObjectMapperProvider objectMapper = new GraphInventoryCommonObjectMapperProvider();
- auditInventory = objectMapper.getMapper().readValue(auditInventoryString, AAIObjectAuditList.class);
- } catch (Exception e) {
- mdcSetup.setResponseCode(ONAPLogConstants.ResponseStatus.ERROR.toString());
- logger.error("Error Parsing Audit Results", e);
- }
- mdcSetup.setElapsedTime();
- if (auditInventory != null) {
+ CloudInformation cloudInformation = externalTask.getVariable("cloudInformation");
+ boolean success = true;
+ if (cloudInformation != null) {
Integer retryCount = externalTask.getRetries();
try {
- logger.info("Executing External Task Create Inventory, Retry Number: {} \n {}", auditInventory,
+ logger.info("Executing External Task Create Inventory, Retry Number: {} \n {}", cloudInformation,
retryCount);
- createInventory.createInventory(auditInventory);
- } catch (InventoryException e) {
- logger.error("Error during inventory of stack", e);
- success = false;
- inventoryException = true;
+ createInventory.heatbridge(cloudInformation);
} catch (Exception e) {
logger.error("Error during inventory of stack", e);
success = false;
@@ -91,31 +78,27 @@ public class CreateInventoryTask extends ExternalTaskUtils {
logger.debug("The External Task Id: {} Successful", externalTaskId);
logger.info(ONAPLogConstants.Markers.EXIT, "Exiting");
mdcSetup.clearClientMDCs();
- } else if (inventoryException) {
- mdcSetup.setResponseCode(ONAPLogConstants.ResponseStatus.ERROR.toString());
- logger.debug("The External Task Id: {} Failed, Retry not needed", externalTaskId);
- externalTaskService.handleBpmnError(externalTask, AAI_INVENTORY_FAILURE);
} else {
if (retryCount == null) {
- logger.debug("The External Task Id: {} Failed, Setting Retries to Default Start Value: {}",
+ logger.error("The External Task Id: {} Failed, Setting Retries to Default Start Value: {}",
externalTaskId, getRetrySequence().length);
externalTaskService.handleFailure(externalTask, UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI,
UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI, getRetrySequence().length, 10000);
} else if (retryCount != null && retryCount - 1 == 0) {
externalTaskService.handleBpmnError(externalTask, AAI_INVENTORY_FAILURE);
mdcSetup.setResponseCode(ONAPLogConstants.ResponseStatus.ERROR.toString());
- logger.debug("The External Task Id: {} Failed, All Retries Exhausted", externalTaskId);
+ logger.error("The External Task Id: {} Failed, All Retries Exhausted", externalTaskId);
logger.info(ONAPLogConstants.Markers.EXIT, "Exiting");
} else {
- logger.debug("The External Task Id: {} Failed, Decrementing Retries: {} , Retry Delay: ",
+ logger.error("The External Task Id: {} Failed, Decrementing Retries: {} , Retry Delay: ",
externalTaskId, retryCount - 1, calculateRetryDelay(retryCount));
externalTaskService.handleFailure(externalTask, UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI,
UNABLE_TO_WRITE_ALL_INVENTORY_TO_A_AI, retryCount - 1, calculateRetryDelay(retryCount));
}
- logger.debug("The External Task Id: {} Failed", externalTaskId);
+ logger.error("The External Task Id: {} Failed", externalTaskId);
}
} else {
- logger.debug("The External Task Id: {} Failed, No Audit Results Written", externalTaskId);
+ logger.error("The External Task Id: {} Failed, No Cloud Information Provided", externalTaskId);
externalTaskService.handleBpmnError(externalTask, AAI_INVENTORY_FAILURE);
}
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
index a58c0c10c5..26bce5f362 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
@@ -31,13 +31,10 @@ import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.xml.ws.Holder;
-import org.apache.commons.collections.CollectionUtils;
import org.onap.logging.filter.base.ErrorCode;
import org.onap.so.adapters.vnf.exceptions.VnfException;
import org.onap.so.adapters.vnf.exceptions.VnfNotFound;
-import org.onap.so.client.aai.AAIResourcesClient;
import org.onap.so.cloud.CloudConfig;
-import org.onap.so.db.catalog.beans.CloudIdentity;
import org.onap.so.db.catalog.beans.CloudSite;
import org.onap.so.db.catalog.beans.HeatEnvironment;
import org.onap.so.db.catalog.beans.HeatFiles;
@@ -50,25 +47,17 @@ import org.onap.so.db.catalog.data.repository.VFModuleCustomizationRepository;
import org.onap.so.db.catalog.data.repository.VnfResourceRepository;
import org.onap.so.db.catalog.utils.MavenLikeVersioning;
import org.onap.so.entity.MsoRequest;
-import org.onap.so.heatbridge.HeatBridgeApi;
-import org.onap.so.heatbridge.HeatBridgeException;
-import org.onap.so.heatbridge.HeatBridgeImpl;
import org.onap.so.logger.LoggingAnchor;
import org.onap.so.logger.MessageEnum;
import org.onap.so.openstack.beans.HeatStatus;
import org.onap.so.openstack.beans.StackInfo;
import org.onap.so.openstack.beans.VnfRollback;
-import org.onap.so.openstack.exceptions.MsoCloudSiteNotFound;
import org.onap.so.openstack.exceptions.MsoException;
import org.onap.so.openstack.exceptions.MsoExceptionCategory;
import org.onap.so.openstack.exceptions.MsoHeatNotFoundException;
import org.onap.so.openstack.utils.MsoHeatEnvironmentEntry;
import org.onap.so.openstack.utils.MsoHeatUtils;
import org.onap.so.openstack.utils.MsoHeatUtilsWithUpdate;
-import org.openstack4j.model.compute.Flavor;
-import org.openstack4j.model.compute.Image;
-import org.openstack4j.model.compute.Server;
-import org.openstack4j.model.heat.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -353,69 +342,6 @@ public class MsoVnfAdapterImpl {
return new HashMap<>(stringInputs);
}
- private void heatbridge(StackInfo heatStack, String cloudOwner, String cloudSiteId, String tenantId,
- String genericVnfName, String vfModuleId) {
- try {
- CloudSite cloudSite =
- cloudConfig.getCloudSite(cloudSiteId).orElseThrow(() -> new MsoCloudSiteNotFound(cloudSiteId));
- CloudIdentity cloudIdentity = cloudSite.getIdentityService();
- String heatStackId = heatStack.getCanonicalName().split("/")[1];
-
- List<String> oobMgtNetNames = new ArrayList<>();
-
- HeatBridgeApi heatBridgeClient = new HeatBridgeImpl(new AAIResourcesClient(), cloudIdentity, cloudOwner,
- cloudSiteId, cloudSite.getRegionId(), tenantId);
-
- heatBridgeClient.authenticate();
-
- List<Resource> stackResources = heatBridgeClient.queryNestedHeatStackResources(heatStackId);
-
- List<Server> osServers = heatBridgeClient.getAllOpenstackServers(stackResources);
-
- heatBridgeClient.createPserversAndPinterfacesIfNotPresentInAai(stackResources);
-
- List<Image> osImages = heatBridgeClient.extractOpenstackImagesFromServers(osServers);
-
- List<Flavor> osFlavors = heatBridgeClient.extractOpenstackFlavorsFromServers(osServers);
-
- logger.debug("Successfully queried heat stack{} for resources.", heatStackId);
- // os images
- if (osImages != null && !osImages.isEmpty()) {
- heatBridgeClient.buildAddImagesToAaiAction(osImages);
- logger.debug("Successfully built AAI actions to add images.");
- } else {
- logger.debug("No images to update to AAI.");
- }
- // flavors
- if (osFlavors != null && !osFlavors.isEmpty()) {
- heatBridgeClient.buildAddFlavorsToAaiAction(osFlavors);
- logger.debug("Successfully built AAI actions to add flavors.");
- } else {
- logger.debug("No flavors to update to AAI.");
- }
-
- // compute resources
- heatBridgeClient.buildAddVserversToAaiAction(genericVnfName, vfModuleId, osServers);
- logger.debug("Successfully queried compute resources and built AAI vserver actions.");
-
- // neutron resources
- List<String> oobMgtNetIds = new ArrayList<>();
-
- // if no network-id list is provided, however network-name list is
- if (!CollectionUtils.isEmpty(oobMgtNetNames)) {
- oobMgtNetIds = heatBridgeClient.extractNetworkIds(oobMgtNetNames);
- }
- heatBridgeClient.buildAddVserverLInterfacesToAaiAction(stackResources, oobMgtNetIds);
- logger.debug(
- "Successfully queried neutron resources and built AAI actions to add l-interfaces to vservers.");
-
- // Update AAI
- heatBridgeClient.submitToAai();
- } catch (Exception ex) {
- logger.debug("Heatbrige failed for stackId: " + heatStack.getCanonicalName(), ex);
- }
- }
-
private String convertNode(final JsonNode node) {
try {
final Object obj = JSON_MAPPER.treeToValue(node, Object.class);
@@ -1036,10 +962,6 @@ public class MsoVnfAdapterImpl {
outputs.value = copyStringOutputs(heatStack.getOutputs());
rollback.value = vfRollback;
logger.debug("VF Module {} successfully created", vfModuleName);
- if (enableBridge != null && enableBridge) {
- // call heatbridge
- heatbridge(heatStack, cloudOwner, cloudSiteId, tenantId, genericVnfName, vfModuleId);
- }
} catch (Exception e) {
logger.debug("unhandled exception in create VF", e);
throw new VnfException("Exception during create VF " + e.getMessage());
@@ -1111,12 +1033,6 @@ public class MsoVnfAdapterImpl {
logger.error(error);
throw new VnfException(me);
}
- // call heatbridge delete
- try {
- new HeatBridgeImpl().deleteVfModuleData(vnfId, vfModuleId);
- } catch (HeatBridgeException e) {
- logger.error("Heatbridge failed to delete AAI data for vf-module: " + vfModuleId, e);
- }
}
public void updateVfModule(String cloudSiteId, String cloudOwner, String tenantId, String vnfType,
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java
index 7eff09b692..d0ca87df95 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java
@@ -146,10 +146,11 @@ public interface HeatBridgeApi {
/**
* Execute AAI restful API to update the Openstack resources
- *
+ *
+ * @param dryrun - this will simply log the aai transaction to log if enabled and not write any data
* @throws HeatBridgeException when failing to add openstack resource PoJos to AAI
*/
- void submitToAai() throws HeatBridgeException;
+ void submitToAai(boolean dryrun) throws HeatBridgeException;
/**
* Delete heatbridge data for a given vf-module
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
index 390ed38764..6b980cb590 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
@@ -55,10 +55,11 @@ import org.onap.aai.domain.yang.SriovPf;
import org.onap.aai.domain.yang.SriovPfs;
import org.onap.aai.domain.yang.SriovVf;
import org.onap.aai.domain.yang.SriovVfs;
+import org.onap.aai.domain.yang.VfModule;
import org.onap.aai.domain.yang.Vlan;
import org.onap.aai.domain.yang.Vlans;
import org.onap.aai.domain.yang.Vserver;
-import org.onap.aai.domain.yang.VfModule;
+import org.onap.logging.filter.base.ErrorCode;
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.AAIResourcesClient;
import org.onap.so.client.aai.AAISingleTransactionClient;
@@ -69,13 +70,13 @@ import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.graphinventory.entities.uri.Depth;
import org.onap.so.client.graphinventory.exceptions.BulkProcessFailed;
import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.ServerType;
import org.onap.so.heatbridge.constants.HeatBridgeConstants;
import org.onap.so.heatbridge.factory.MsoCloudClientFactoryImpl;
import org.onap.so.heatbridge.helpers.AaiHelper;
import org.onap.so.heatbridge.openstack.api.OpenstackClient;
import org.onap.so.heatbridge.openstack.factory.OpenstackClientFactoryImpl;
import org.onap.so.heatbridge.utils.HeatBridgeUtils;
-import org.onap.logging.filter.base.ErrorCode;
import org.onap.so.logger.LoggingAnchor;
import org.onap.so.logger.MessageEnum;
import org.openstack4j.model.compute.Server;
@@ -133,10 +134,19 @@ public class HeatBridgeImpl implements HeatBridgeApi {
@Override
public OpenstackClient authenticate() throws HeatBridgeException {
+ String keystoneVersion = "";
+ if (ServerType.KEYSTONE.equals(cloudIdentity.getIdentityServerType()))
+ keystoneVersion = "v2.0";
+ else if (ServerType.KEYSTONE_V3.equals(cloudIdentity.getIdentityServerType())) {
+ keystoneVersion = "v3";
+ } else {
+ keystoneVersion = "UNKNOWN";
+ }
+ logger.trace("Keystone Version: {} ", keystoneVersion);
this.osClient = new MsoCloudClientFactoryImpl(new OpenstackClientFactoryImpl()).getOpenstackClient(
cloudIdentity.getIdentityUrl(), cloudIdentity.getMsoId(), cloudIdentity.getMsoPass(), regionId,
- tenantId);
- logger.debug("Successfully authenticated with keystone for tenant: " + tenantId + " and region: " + regionId);
+ tenantId, keystoneVersion);
+ logger.trace("Successfully authenticated with keystone for tenant: {} and region: {}", tenantId, regionId);
return osClient;
}
@@ -170,7 +180,6 @@ public class HeatBridgeImpl implements HeatBridgeApi {
@Override
public List<Server> getAllOpenstackServers(final List<Resource> stackResources) {
Objects.requireNonNull(osClient, ERR_MSG_NULL_OS_CLIENT);
-
// Filter Openstack Compute resources
List<String> serverIds =
extractStackResourceIdsByResourceType(stackResources, HeatBridgeConstants.OS_SERVER_RESOURCE_TYPE);
@@ -220,12 +229,7 @@ public class HeatBridgeImpl implements HeatBridgeApi {
try {
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.FLAVOR, cloudOwner, cloudRegionId,
aaiFlavor.getFlavorId());
- if (!resourcesClient.exists(uri)) {
- transaction.create(uri, aaiFlavor);
- logger.debug("Queuing AAI command to add flavor: " + aaiFlavor.getFlavorId());
- } else {
- logger.debug("Nothing to add since flavor: " + aaiFlavor.getFlavorId() + "already exists in AAI.");
- }
+ transaction.createIfNotExists(uri, Optional.of(aaiFlavor));
} catch (WebApplicationException e) {
throw new HeatBridgeException(
"Failed to update flavor to AAI: " + aaiFlavor.getFlavorId() + ". Error" + " cause: " + e, e);
@@ -259,12 +263,15 @@ public class HeatBridgeImpl implements HeatBridgeApi {
lIf.setInterfaceId(port.getId());
lIf.setInterfaceName(port.getName());
lIf.setMacaddr(port.getMacAddress());
+ lIf.setNetworkName((String) port.getProfile().get("physical_network"));
+ lIf.setIsPortMirrored(false);
+ lIf.setIsIpUnnumbered(false);
+ lIf.setInMaint(false);
if (oobMgtNetIds != null && oobMgtNetIds.contains(port.getNetworkId())) {
lIf.setInterfaceRole(OOB_MGT_NETWORK_IDENTIFIER);
} else {
lIf.setInterfaceRole(port.getvNicType());
}
-
updateLInterfaceIps(port, lIf);
updateLInterfaceVlan(port, lIf);
@@ -323,9 +330,14 @@ public class HeatBridgeImpl implements HeatBridgeApi {
private void updateLInterfaceVlan(final Port port, final LInterface lIf) {
Vlan vlan = new Vlan();
Network network = osClient.getNetworkById(port.getNetworkId());
- lIf.setNetworkName(network.getName());
if (network.getNetworkType().equals(NetworkType.VLAN)) {
- vlan.setVlanInterface(network.getProviderSegID());
+ vlan.setVlanInterface(network.getName() + network.getProviderSegID());
+
+ vlan.setVlanIdOuter(Long.parseLong(network.getProviderSegID()));
+ vlan.setVlanIdInner(0L);
+ vlan.setInMaint(false);
+ vlan.setIsIpUnnumbered(false);
+ vlan.setIsPrivate(false);
Vlans vlans = new Vlans();
List<Vlan> vlanList = vlans.getVlan();
vlanList.add(vlan);
@@ -343,6 +355,8 @@ public class HeatBridgeImpl implements HeatBridgeApi {
if (port.getVifDetails() != null) {
sriovVf.setVfVlanFilter((String) port.getVifDetails().get(HeatBridgeConstants.OS_VLAN_NETWORK_KEY));
}
+ sriovVf.setVfVlanAntiSpoofCheck(false);
+ sriovVf.setVfMacAntiSpoofCheck(false);
sriovVfList.add(sriovVf);
lIf.setSriovVfs(sriovVfs);
@@ -424,9 +438,9 @@ public class HeatBridgeImpl implements HeatBridgeApi {
}
@Override
- public void submitToAai() throws HeatBridgeException {
+ public void submitToAai(boolean dryrun) throws HeatBridgeException {
try {
- transaction.execute();
+ transaction.execute(dryrun);
} catch (BulkProcessFailed e) {
String msg = "Failed to commit transaction";
logger.debug(msg + " with error: " + e);
@@ -442,15 +456,20 @@ public class HeatBridgeImpl implements HeatBridgeApi {
try {
Optional<VfModule> vfModule = resourcesClient.get(VfModule.class,
AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId).depth(Depth.ONE));
+ logger.debug("vfModule is present: {}", vfModule.isPresent());
if (vfModule.isPresent()) {
- AAIResultWrapper resultWrapper = new AAIResultWrapper(vfModule);
+ AAIResultWrapper resultWrapper = new AAIResultWrapper(vfModule.get());
Optional<Relationships> relationships = resultWrapper.getRelationships();
+ logger.debug("relationships is present: {}", relationships.isPresent());
if (relationships.isPresent()) {
List<AAIResourceUri> vserverUris = relationships.get().getRelatedUris(AAIObjectType.VSERVER);
+ logger.debug("vserverList isEmpty: {}", vserverUris.isEmpty());
createTransactionToDeleteSriovPfFromPserver(vserverUris);
+
if (!vserverUris.isEmpty()) {
for (AAIResourceUri vserverUri : vserverUris) {
+ logger.debug("Deleting Vservers: {}", vserverUri.toString());
resourcesClient.delete(vserverUri);
}
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java
index 0e87e1fb31..fdf7ce38f1 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/constants/HeatBridgeConstants.java
@@ -72,6 +72,8 @@ public class HeatBridgeConstants {
public static final String AAI_SRIOV_PF = "sriov-pf";
public static final String AAI_P_INTERFACE_NAME = "p-interface.interface-name";
public static final String AAI_SRIOV_PF_PCI_ID = "sriov-pf.pf-pci-id";
+ public static final String AAI_VNFC = "vnfc";
+ public static final String AAI_VNFC_ID = "vnfc.vnfc-name";
/**
* Keys for internal usage
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactory.java
index e1f363ca05..a9a63b312d 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactory.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactory.java
@@ -54,6 +54,6 @@ public interface MsoCloudClientFactory {
*/
- OpenstackClient getOpenstackClient(String url, String msoId, String msoPass, String regionId, String tenantId)
- throws HeatBridgeException;
+ OpenstackClient getOpenstackClient(String url, String msoId, String msoPass, String regionId, String tenantId,
+ String keystoneVersion) throws HeatBridgeException;
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImpl.java
index 04245899aa..88a7d3dbbc 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImpl.java
@@ -32,8 +32,6 @@
*/
package org.onap.so.heatbridge.factory;
-import java.net.MalformedURLException;
-import java.net.URL;
import java.util.Objects;
import javax.annotation.Nonnull;
import org.onap.so.heatbridge.HeatBridgeException;
@@ -44,6 +42,9 @@ import org.onap.so.heatbridge.openstack.api.OpenstackClient;
import org.onap.so.heatbridge.openstack.api.OpenstackClientException;
import org.onap.so.heatbridge.openstack.factory.OpenstackClientFactory;
import org.onap.so.utils.CryptoUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* This class implements {@link MsoCloudClientFactory} It loads the cloud configuration from SO and uses it to
@@ -52,6 +53,8 @@ import org.onap.so.utils.CryptoUtils;
*/
public class MsoCloudClientFactoryImpl implements MsoCloudClientFactory {
+ private static final Logger logger = LoggerFactory.getLogger(MsoCloudClientFactoryImpl.class);
+
private OpenstackClientFactory openstackClientFactory;
public MsoCloudClientFactoryImpl(@Nonnull OpenstackClientFactory openstackClientFactory) {
@@ -61,12 +64,14 @@ public class MsoCloudClientFactoryImpl implements MsoCloudClientFactory {
@Override
public OpenstackClient getOpenstackClient(@Nonnull String url, @Nonnull String msoId, @Nonnull String msoPass,
- @Nonnull String regionId, @Nonnull String tenantId) throws HeatBridgeException {
+ @Nonnull String regionId, @Nonnull String tenantId, @Nonnull String keystoneVersion)
+ throws HeatBridgeException {
Objects.requireNonNull(url, "Null openstack url!");
Objects.requireNonNull(msoId, "Null openstack user id!");
Objects.requireNonNull(msoPass, "Null openstack password!");
Objects.requireNonNull(regionId, "Null regionId ID!");
Objects.requireNonNull(tenantId, "Null tenant ID!");
+ Objects.requireNonNull(tenantId, "Null keystone version");
try {
final OpenstackAccess osAccess = new OpenstackAccessBuilder().setBaseUrl(url) // keystone URL
.setUser(msoId) // keystone username
@@ -77,17 +82,15 @@ public class MsoCloudClientFactoryImpl implements MsoCloudClientFactory {
.build();
// Identify the Keystone version
- String version = new URL(url).getPath().replace("/", "");
- if (version.equals(HeatBridgeConstants.OS_KEYSTONE_V2_KEY)) {
+ if (keystoneVersion.equals(HeatBridgeConstants.OS_KEYSTONE_V2_KEY)) {
return openstackClientFactory.createOpenstackV2Client(osAccess);
- } else if (version.equals(HeatBridgeConstants.OS_KEYSTONE_V3_KEY)) {
+ } else if (keystoneVersion.equals(HeatBridgeConstants.OS_KEYSTONE_V3_KEY)) {
return openstackClientFactory.createOpenstackV3Client(osAccess);
}
- throw new OpenstackClientException("Unsupported keystone version!");
- } catch (MalformedURLException e) {
- throw new HeatBridgeException("Malformed Keystone Endpoint in SO configuration.", e);
+ throw new OpenstackClientException("Unsupported keystone version! " + keystoneVersion);
} catch (OpenstackClientException osClientEx) {
- throw new HeatBridgeException("Client error when authenticating with the Openstack V3.", osClientEx);
+ logger.error("Error creating OS Client", osClientEx);
+ throw new HeatBridgeException("Client error when authenticating with the Openstack", osClientEx);
}
}
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
index 727cdccff5..5271528e91 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
@@ -32,8 +32,6 @@
*/
package org.onap.so.heatbridge.helpers;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableMap;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -50,9 +48,13 @@ import org.onap.aai.domain.yang.RelationshipData;
import org.onap.aai.domain.yang.RelationshipList;
import org.onap.aai.domain.yang.SriovVf;
import org.onap.aai.domain.yang.Vserver;
+import org.onap.so.client.aai.AAIObjectType;
+import org.onap.so.client.aai.entities.uri.AAIResourceUri;
+import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.heatbridge.constants.HeatBridgeConstants;
import org.openstack4j.model.compute.Server;
import org.openstack4j.model.network.Port;
+import com.google.common.base.Preconditions;
/**
* This class provides wrapper methods to manage creation of AAI objects and extracting objects from AAI and
@@ -75,31 +77,36 @@ public class AaiHelper {
List<Relationship> relationships = relationshipList.getRelationship();
// vserver to pserver relationship
- Relationship pserverRelationship =
- buildRelationship(HeatBridgeConstants.AAI_PSERVER, ImmutableMap.<String, String>builder()
- .put(HeatBridgeConstants.AAI_PSERVER_HOSTNAME, server.getHypervisorHostname()).build());
+ Relationship pserverRelationship = buildRelationship(
+ AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, server.getHypervisorHostname()));
relationships.add(pserverRelationship);
+ // vserver to generic-vnf relationship
+ Relationship genericVnfRelationship =
+ buildRelationship(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, genericVnfId));
+ relationships.add(genericVnfRelationship);
+
+ // vserver to vnfc relationship
+ Relationship vnfcRelationship =
+ buildRelationship(AAIUriFactory.createResourceUri(AAIObjectType.VNFC, server.getName()));
+ relationships.add(vnfcRelationship);
+
+
// vserver to vf-module relationship
- Relationship vfModuleRelationship = buildRelationship(HeatBridgeConstants.AAI_VF_MODULE,
- ImmutableMap.<String, String>builder().put(HeatBridgeConstants.AAI_GENERIC_VNF_ID, genericVnfId)
- .put(HeatBridgeConstants.AAI_VF_MODULE_ID, vfModuleId).build());
+ Relationship vfModuleRelationship =
+ buildRelationship(AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, genericVnfId, vfModuleId));
relationships.add(vfModuleRelationship);
// vserver to image relationship
if (server.getImage() != null) {
- Relationship imageRel = buildRelationship(HeatBridgeConstants.AAI_IMAGE,
- ImmutableMap.<String, String>builder().put(HeatBridgeConstants.AAI_CLOUD_OWNER, cloudOwner)
- .put(HeatBridgeConstants.AAI_CLOUD_REGION_ID, cloudRegionId)
- .put(HeatBridgeConstants.AAI_IMAGE_ID, server.getImage().getId()).build());
+ Relationship imageRel = buildRelationship(AAIUriFactory.createResourceUri(AAIObjectType.IMAGE, cloudOwner,
+ cloudRegionId, server.getImage().getId()));
relationships.add(imageRel);
}
// vserver to flavor relationship
- Relationship flavorRel = buildRelationship(HeatBridgeConstants.AAI_FLAVOR,
- ImmutableMap.<String, String>builder().put(HeatBridgeConstants.AAI_CLOUD_OWNER, cloudOwner)
- .put(HeatBridgeConstants.AAI_CLOUD_REGION_ID, cloudRegionId)
- .put(HeatBridgeConstants.AAI_FLAVOR_ID, server.getFlavor().getId()).build());
+ Relationship flavorRel = buildRelationship(AAIUriFactory.createResourceUri(AAIObjectType.FLAVOR, cloudOwner,
+ cloudRegionId, server.getFlavor().getId()));
relationships.add(flavorRel);
return relationshipList;
}
@@ -110,10 +117,8 @@ public class AaiHelper {
List<Relationship> relationships = relationshipList.getRelationship();
// sriov-vf to sriov-pf relationship
- Relationship sriovPfRelationship = buildRelationship(HeatBridgeConstants.AAI_SRIOV_PF,
- ImmutableMap.<String, String>builder().put(HeatBridgeConstants.AAI_PSERVER_HOSTNAME, pserverName)
- .put(HeatBridgeConstants.AAI_P_INTERFACE_NAME, pIfName)
- .put(HeatBridgeConstants.AAI_SRIOV_PF_PCI_ID, pfPciId).build());
+ Relationship sriovPfRelationship = buildRelationship(
+ AAIUriFactory.createResourceUri(AAIObjectType.SRIOV_PF, pserverName, pIfName, pfPciId));
relationships.add(sriovPfRelationship);
return relationshipList;
@@ -191,8 +196,13 @@ public class AaiHelper {
aaiImage.setImageName(image.getName());
aaiImage.setImageOsDistro(HeatBridgeConstants.OS_UNKNOWN_KEY);
aaiImage.setImageOsVersion(HeatBridgeConstants.OS_UNKNOWN_KEY);
- image.getLinks().stream().filter(link -> link.getRel().equals(HeatBridgeConstants.OS_RESOURCES_SELF_LINK_KEY))
- .findFirst().ifPresent(link -> aaiImage.setImageSelflink(link.getHref()));
+
+ // application name/vendor/version needs to be set
+ if (image.getLinks() != null) {
+ image.getLinks().stream()
+ .filter(link -> link.getRel().equals(HeatBridgeConstants.OS_RESOURCES_SELF_LINK_KEY)).findFirst()
+ .ifPresent(link -> aaiImage.setImageSelflink(link.getHref()));
+ }
return aaiImage;
}
@@ -206,6 +216,13 @@ public class AaiHelper {
Flavor aaiFlavor = new Flavor();
aaiFlavor.setFlavorId(flavor.getId());
aaiFlavor.setFlavorName(flavor.getName());
+ aaiFlavor.setFlavorVcpus(flavor.getVcpus());
+ aaiFlavor.setFlavorRam(flavor.getRam());
+ aaiFlavor.setFlavorDisk(flavor.getDisk());
+ aaiFlavor.setFlavorEphemeral(flavor.getEphemeral());
+ aaiFlavor.setFlavorDisabled(flavor.isDisabled());
+ aaiFlavor.setFlavorIsPublic(flavor.isPublic());
+ aaiFlavor.setFlavorSwap(Integer.toString(flavor.getSwap()));
flavor.getLinks().stream().filter(link -> link.getRel().equals(HeatBridgeConstants.OS_RESOURCES_SELF_LINK_KEY))
.findFirst().ifPresent(link -> aaiFlavor.setFlavorSelflink(link.getHref()));
return aaiFlavor;
@@ -310,15 +327,9 @@ public class AaiHelper {
* @param relationshipKeyValues Key value pairs of relationship data
* @return AAI Relationship object
*/
- private Relationship buildRelationship(final String relatedTo, final Map<String, String> relationshipKeyValues) {
+ private Relationship buildRelationship(final AAIResourceUri relatedLink) {
Relationship relationship = new Relationship();
- relationship.setRelatedTo(relatedTo);
- relationshipKeyValues.keySet().forEach(k -> {
- RelationshipData relationshipData = new RelationshipData();
- relationshipData.setRelationshipKey(k);
- relationshipData.setRelationshipValue(relationshipKeyValues.get(k));
- relationship.getRelationshipData().add(relationshipData);
- });
+ relationship.setRelatedLink(relatedLink.build().toString());
return relationship;
}
}
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventoryTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventoryTest.java
index e822f65072..583bfbadb2 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventoryTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventoryTest.java
@@ -20,30 +20,17 @@
package org.onap.so.adapters.tasks.inventory;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.times;
import java.io.File;
import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
import org.camunda.bpm.client.task.ExternalTask;
-import org.hamcrest.Matchers;
import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
import org.mockito.InjectMocks;
import org.mockito.Mock;
-import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.onap.so.adapters.tasks.inventory.CreateAAIInventory;
import org.onap.so.audit.beans.AuditInventory;
-import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.AAIResourcesClient;
-import org.onap.so.client.aai.entities.uri.AAIResourceUri;
-import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.objects.audit.AAIObjectAuditList;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
@@ -86,38 +73,4 @@ public class CreateAAIInventoryTest extends CreateAAIInventory {
doReturn(auditInventory).when(mockExternalTask).getVariable("auditInventory");
}
- @Test
- public void determineAuditResult_Test() throws Exception {
- boolean actual = createAAIInventory.didAuditFailVserverLInterfaces(auditListSuccess);
- assertEquals(false, actual);
- }
-
- @Test
- public void determineAuditResult_Failure_Test() throws Exception {
- boolean actual = createAAIInventory.didAuditFailVserverLInterfaces(auditListFailure);
- assertEquals(true, actual);
- }
-
- @Test
- public void missing_Sub_Interfaces_Test() throws Exception {
- AAIResourceUri aaiURI2 = AAIUriFactory.createResourceUri(AAIObjectType.SUB_L_INTERFACE, "cloudOwner",
- "regionOne", "0422ffb57ba042c0800a29dc85ca70f8", "92272b67-d23f-42ca-87fa-7b06a9ec81f3",
- "tsbc0005v_tsbc0005vm002_svc1_port_0", "tsbc0005v_tsbc0005vm002_subint_untrusted_svc1_81");
- AAIResourceUri aaiURI1 = AAIUriFactory.createResourceUri(AAIObjectType.SUB_L_INTERFACE, "cloudOwner",
- "regionOne", "0422ffb57ba042c0800a29dc85ca70f8", "92272b67-d23f-42ca-87fa-7b06a9ec81f3",
- "tsbc0005v_tsbc0005vm002_svc2_port_0", "tsbc0005v_tsbc0005vm002_subint_untrusted_svc2_103");
- ArgumentCaptor<Optional> captor = ArgumentCaptor.forClass(Optional.class);
- ArgumentCaptor<AAIResourceUri> uriCaptor = ArgumentCaptor.forClass(AAIResourceUri.class);
-
- createAAIInventory.setAaiClient(mockClient);
- createAAIInventory.createInventory(missingSubInterfaces);
- Mockito.verify(mockClient, times(2)).createIfNotExists(uriCaptor.capture(), captor.capture());
-
- List<AAIResourceUri> capturedURI = uriCaptor.getAllValues();
- assertTrue(capturedURI.stream().anyMatch(item -> aaiURI1.build().toString().equals(item.build().toString())));
- assertTrue(capturedURI.stream().anyMatch(item -> aaiURI2.build().toString().equals(item.build().toString())));
-
-
-
- }
}
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTaskTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTaskTest.java
index fc2baefcd5..653099a0ea 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTaskTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/inventory/CreateInventoryTaskTest.java
@@ -76,7 +76,6 @@ public class CreateInventoryTaskTest {
object.getAuditList().add(e);
GraphInventoryCommonObjectMapperProvider objectMapper = new GraphInventoryCommonObjectMapperProvider();
doReturn(objectMapper.getMapper().writeValueAsString(e)).when(externalTask).getVariable("auditInventoryResult");
- Mockito.doThrow(InventoryException.class).when(createAAIInventory).createInventory(Mockito.any());
inventoryTask.executeExternalTask(externalTask, externalTaskService);
Mockito.verify(externalTaskService, times(1)).handleBpmnError(externalTask, "AAIInventoryFailure");
}
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
index e2f5531280..6ecdcf9f28 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
@@ -308,13 +308,7 @@ public class HeatBridgeImplTest {
heatbridge.buildAddFlavorsToAaiAction(flavors);
// Assert #1
- verify(transaction, times(2)).create(any(AAIResourceUri.class), any(org.onap.aai.domain.yang.Flavor.class));
-
- // Act #2
- heatbridge.buildAddFlavorsToAaiAction(flavors);
-
- // Assert #2
- verify(transaction, times(4)).create(any(AAIResourceUri.class), any(org.onap.aai.domain.yang.Flavor.class));
+ verify(transaction, times(2)).createIfNotExists(any(AAIResourceUri.class), any(Optional.class));
}
@Ignore
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImplTest.java
index 4eeb1c03a3..86400c2190 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/factory/MsoCloudClientFactoryImplTest.java
@@ -52,19 +52,20 @@ public class MsoCloudClientFactoryImplTest {
@Test
public void getOpenstackClientWithVersion2() throws Exception {
- testedObject.getOpenstackClient(URL_V2, MSO_ID, ENCRYPTED_PASSWORD, REGION_ID, TENANT_ID);
+ testedObject.getOpenstackClient(URL_V2, MSO_ID, ENCRYPTED_PASSWORD, REGION_ID, TENANT_ID, "v2.0");
verify(openstackClientFactoryMock).createOpenstackV2Client(any(OpenstackAccess.class));
}
@Test
public void getOpenstackClientWithVersion3() throws Exception {
- testedObject.getOpenstackClient(URL_V3, MSO_ID, ENCRYPTED_PASSWORD, REGION_ID, TENANT_ID);
+ testedObject.getOpenstackClient(URL_V3, MSO_ID, ENCRYPTED_PASSWORD, REGION_ID, TENANT_ID, "v3");
verify(openstackClientFactoryMock).createOpenstackV3Client(any(OpenstackAccess.class));
}
@Test(expected = HeatBridgeException.class)
public void getOpenstackClient_unsupportedVersion() throws Exception {
- testedObject.getOpenstackClient(URL_WITH_UNSUPPORTED_VERSION, MSO_ID, ENCRYPTED_PASSWORD, REGION_ID, TENANT_ID);
+ testedObject.getOpenstackClient(URL_WITH_UNSUPPORTED_VERSION, MSO_ID, ENCRYPTED_PASSWORD, REGION_ID, TENANT_ID,
+ "UNKNOWN");
}
}
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn
index ff37874978..f2c0ba7dee 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.1.2">
<bpmn:process id="ActivateVfModuleBB" name="ActivateVfModuleBB" isExecutable="true">
<bpmn:startEvent id="ActivateVfModuleBB_Start">
<bpmn:outgoing>SequenceFlow_0ieafii</bpmn:outgoing>
@@ -36,29 +36,18 @@
</bpmn:serviceTask>
<bpmn:serviceTask id="Audit_AAI_Inventory" name="Validate A&#38;AI Inventory" camunda:type="external" camunda:topic="InventoryAddAudit">
<bpmn:incoming>SequenceFlow_0xndboi</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0ee42yq</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0l8684g</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_07ybdik" name="No" sourceRef="ExclusiveGateway_1v8bmbu" targetRef="ExclusiveGateway_0sqvzll" />
<bpmn:sequenceFlow id="SequenceFlow_0ghzwlo" name="Yes" sourceRef="ExclusiveGateway_1v8bmbu" targetRef="Setup_AAI_Inventory_Audit">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("auditInventoryNeeded") == true}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("auditInventoryNeeded") == true}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:sequenceFlow id="SequenceFlow_0ee42yq" sourceRef="Audit_AAI_Inventory" targetRef="ExclusiveGateway_1h8avxn" />
<bpmn:serviceTask id="CheckAuditVariable" name="Check Audit Variable" camunda:expression="${AuditTasks.isAuditNeeded(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn:incoming>SequenceFlow_0ieafii</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1xqyur9</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_1xqyur9" sourceRef="CheckAuditVariable" targetRef="ExclusiveGateway_1v8bmbu" />
- <bpmn:sequenceFlow id="SequenceFlow_109oxx2" name="No" sourceRef="ExclusiveGateway_1h8avxn" targetRef="ExclusiveGateway_0y0ek7t">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("auditIsSuccessful")== true }]]></bpmn:conditionExpression>
- </bpmn:sequenceFlow>
- <bpmn:sequenceFlow id="SequenceFlow_1bo83qk" name="Yes" sourceRef="ExclusiveGateway_1h8avxn" targetRef="Create_AAI_Inventory" />
- <bpmn:sequenceFlow id="SequenceFlow_0arwo1o" sourceRef="Create_AAI_Inventory" targetRef="ExclusiveGateway_0y0ek7t" />
- <bpmn:serviceTask id="Create_AAI_Inventory" name="Create A&#38;AI Inventory" camunda:type="external" camunda:topic="InventoryCreate">
- <bpmn:incoming>SequenceFlow_1bo83qk</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0arwo1o</bpmn:outgoing>
- </bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_1b63lv4" sourceRef="ExclusiveGateway_0sqvzll" targetRef="ActivateVfModule" />
- <bpmn:sequenceFlow id="SequenceFlow_18faffa" sourceRef="ExclusiveGateway_0y0ek7t" targetRef="ExclusiveGateway_0sqvzll" />
<bpmn:subProcess id="SubProcess_0bpsptg" name="Audit Exception Sub Process" triggeredByEvent="true">
<bpmn:startEvent id="catchInventoryException">
<bpmn:outgoing>SequenceFlow_19gbhlj</bpmn:outgoing>
@@ -81,19 +70,10 @@
</bpmn:inclusiveGateway>
<bpmn:inclusiveGateway id="ExclusiveGateway_0sqvzll">
<bpmn:incoming>SequenceFlow_07ybdik</bpmn:incoming>
- <bpmn:incoming>SequenceFlow_18faffa</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0l8684g</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1b63lv4</bpmn:outgoing>
</bpmn:inclusiveGateway>
- <bpmn:inclusiveGateway id="ExclusiveGateway_1h8avxn" name="Audit Failed?" default="SequenceFlow_1bo83qk">
- <bpmn:incoming>SequenceFlow_0ee42yq</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_109oxx2</bpmn:outgoing>
- <bpmn:outgoing>SequenceFlow_1bo83qk</bpmn:outgoing>
- </bpmn:inclusiveGateway>
- <bpmn:inclusiveGateway id="ExclusiveGateway_0y0ek7t">
- <bpmn:incoming>SequenceFlow_109oxx2</bpmn:incoming>
- <bpmn:incoming>SequenceFlow_0arwo1o</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_18faffa</bpmn:outgoing>
- </bpmn:inclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0l8684g" sourceRef="Audit_AAI_Inventory" targetRef="ExclusiveGateway_0sqvzll" />
</bpmn:process>
<bpmn:error id="Error_0q258vt" errorCode="7000" />
<bpmn:error id="Error_0zgccif" name="org.onap.so.adapters.inventory.create.InventoryException" errorCode="org.onap.so.adapters.inventory.create.InventoryException" />
@@ -101,200 +81,150 @@
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ActivateVfModuleBB">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="ActivateVfModuleBB_Start">
- <dc:Bounds x="85" y="234" width="36" height="36" />
+ <dc:Bounds x="156" y="180" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="58" y="270" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0ieafii_di" bpmnElement="SequenceFlow_0ieafii">
- <di:waypoint xsi:type="dc:Point" x="121" y="252" />
- <di:waypoint xsi:type="dc:Point" x="201" y="252" />
+ <di:waypoint x="192" y="198" />
+ <di:waypoint x="272" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="116" y="231" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_1v967li_di" bpmnElement="ActivateVfModuleBB_End">
- <dc:Bounds x="1404" y="235" width="36" height="36" />
+ <dc:Bounds x="1475" y="181" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1235" y="275" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0hawa84_di" bpmnElement="ActivateVfModule">
- <dc:Bounds x="958" y="212" width="100" height="80" />
+ <dc:Bounds x="1029" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_175e9ul_di" bpmnElement="UpdateVfModuleActiveStatus">
- <dc:Bounds x="1214" y="212" width="100" height="80" />
+ <dc:Bounds x="1285" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0xsp0pv_di" bpmnElement="SequenceFlow_0xsp0pv">
- <di:waypoint xsi:type="dc:Point" x="1314" y="252" />
- <di:waypoint xsi:type="dc:Point" x="1404" y="253" />
+ <di:waypoint x="1385" y="198" />
+ <di:waypoint x="1475" y="199" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1314" y="231.5" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_03jkesd_di" bpmnElement="CallActivity_sdncHandler">
- <dc:Bounds x="1086" y="212" width="100" height="80" />
+ <dc:Bounds x="1157" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1a495wm_di" bpmnElement="SequenceFlow_1a495wm">
- <di:waypoint xsi:type="dc:Point" x="1058" y="252" />
- <di:waypoint xsi:type="dc:Point" x="1086" y="252" />
+ <di:waypoint x="1129" y="198" />
+ <di:waypoint x="1157" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1027" y="231" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1j4x1ej_di" bpmnElement="SequenceFlow_1j4x1ej">
- <di:waypoint xsi:type="dc:Point" x="1186" y="252" />
- <di:waypoint xsi:type="dc:Point" x="1214" y="252" />
+ <di:waypoint x="1257" y="198" />
+ <di:waypoint x="1285" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1155" y="231" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0xndboi_di" bpmnElement="SequenceFlow_0xndboi">
- <di:waypoint xsi:type="dc:Point" x="491" y="175" />
- <di:waypoint xsi:type="dc:Point" x="513" y="175" />
+ <di:waypoint x="589" y="121" />
+ <di:waypoint x="680" y="121" />
<bpmndi:BPMNLabel>
<dc:Bounds x="457" y="153.5" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0krf1ur_di" bpmnElement="Setup_AAI_Inventory_Audit">
- <dc:Bounds x="391" y="135" width="100" height="80" />
+ <dc:Bounds x="489" y="81" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_08rxjeb_di" bpmnElement="Audit_AAI_Inventory">
- <dc:Bounds x="513" y="135" width="100" height="80" />
+ <dc:Bounds x="680" y="81" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_07ybdik_di" bpmnElement="SequenceFlow_07ybdik">
- <di:waypoint xsi:type="dc:Point" x="355" y="277" />
- <di:waypoint xsi:type="dc:Point" x="355" y="315" />
- <di:waypoint xsi:type="dc:Point" x="881" y="315" />
- <di:waypoint xsi:type="dc:Point" x="881" y="277" />
+ <di:waypoint x="426" y="223" />
+ <di:waypoint x="426" y="261" />
+ <di:waypoint x="952" y="261" />
+ <di:waypoint x="952" y="223" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="364" y="294" width="14" height="12" />
+ <dc:Bounds x="435" y="240" width="15" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0ghzwlo_di" bpmnElement="SequenceFlow_0ghzwlo">
- <di:waypoint xsi:type="dc:Point" x="355" y="227" />
- <di:waypoint xsi:type="dc:Point" x="355" y="175" />
- <di:waypoint xsi:type="dc:Point" x="391" y="175" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="362" y="185" width="19" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0ee42yq_di" bpmnElement="SequenceFlow_0ee42yq">
- <di:waypoint xsi:type="dc:Point" x="613" y="175" />
- <di:waypoint xsi:type="dc:Point" x="638" y="175" />
+ <di:waypoint x="426" y="173" />
+ <di:waypoint x="426" y="121" />
+ <di:waypoint x="489" y="121" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="580.5" y="153.5" width="90" height="13" />
+ <dc:Bounds x="434" y="131" width="18" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_1eg5ryx_di" bpmnElement="CheckAuditVariable">
- <dc:Bounds x="201" y="212" width="100" height="80" />
+ <dc:Bounds x="272" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1xqyur9_di" bpmnElement="SequenceFlow_1xqyur9">
- <di:waypoint xsi:type="dc:Point" x="301" y="252" />
- <di:waypoint xsi:type="dc:Point" x="330" y="252" />
+ <di:waypoint x="372" y="198" />
+ <di:waypoint x="401" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="270.5" y="230.5" width="90" height="13" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_109oxx2_di" bpmnElement="SequenceFlow_109oxx2">
- <di:waypoint xsi:type="dc:Point" x="663" y="200" />
- <di:waypoint xsi:type="dc:Point" x="663" y="230" />
- <di:waypoint xsi:type="dc:Point" x="834" y="230" />
- <di:waypoint xsi:type="dc:Point" x="834" y="200" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="670" y="207" width="14" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1bo83qk_di" bpmnElement="SequenceFlow_1bo83qk">
- <di:waypoint xsi:type="dc:Point" x="663" y="150" />
- <di:waypoint xsi:type="dc:Point" x="663" y="101" />
- <di:waypoint xsi:type="dc:Point" x="691" y="101" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="667" y="111" width="19" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0arwo1o_di" bpmnElement="SequenceFlow_0arwo1o">
- <di:waypoint xsi:type="dc:Point" x="791" y="101" />
- <di:waypoint xsi:type="dc:Point" x="834" y="101" />
- <di:waypoint xsi:type="dc:Point" x="834" y="150" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="767.5" y="79.5" width="90" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_1eb09gr_di" bpmnElement="Create_AAI_Inventory">
- <dc:Bounds x="691" y="61" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1b63lv4_di" bpmnElement="SequenceFlow_1b63lv4">
- <di:waypoint xsi:type="dc:Point" x="906" y="252" />
- <di:waypoint xsi:type="dc:Point" x="958" y="252" />
+ <di:waypoint x="977" y="198" />
+ <di:waypoint x="1029" y="198" />
<bpmndi:BPMNLabel>
<dc:Bounds x="887" y="231" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_18faffa_di" bpmnElement="SequenceFlow_18faffa">
- <di:waypoint xsi:type="dc:Point" x="859" y="175" />
- <di:waypoint xsi:type="dc:Point" x="881" y="175" />
- <di:waypoint xsi:type="dc:Point" x="881" y="227" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="825" y="154" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_0mbkb7v_di" bpmnElement="SubProcess_0bpsptg" isExpanded="true">
- <dc:Bounds x="293" y="449" width="350" height="200" />
+ <dc:Bounds x="364" y="395" width="350" height="200" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_12r96di_di" bpmnElement="catchInventoryException">
- <dc:Bounds x="324" y="532" width="36" height="36" />
+ <dc:Bounds x="395" y="478" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="341.15269461077844" y="571.6127744510978" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_067jv1n_di" bpmnElement="EndEvent_067jv1n">
- <dc:Bounds x="572.1526946107784" y="532" width="36" height="36" />
+ <dc:Bounds x="643" y="478" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="590.1526946107784" y="572" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_19gbhlj_di" bpmnElement="SequenceFlow_19gbhlj">
- <di:waypoint xsi:type="dc:Point" x="360" y="550" />
- <di:waypoint xsi:type="dc:Point" x="415" y="550" />
+ <di:waypoint x="431" y="496" />
+ <di:waypoint x="486" y="496" />
<bpmndi:BPMNLabel>
<dc:Bounds x="387.5" y="529" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0l4jzc5_di" bpmnElement="SequenceFlow_0l4jzc5">
- <di:waypoint xsi:type="dc:Point" x="515" y="550" />
- <di:waypoint xsi:type="dc:Point" x="572" y="550" />
+ <di:waypoint x="586" y="496" />
+ <di:waypoint x="643" y="496" />
<bpmndi:BPMNLabel>
<dc:Bounds x="543.5" y="529" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_08xffml_di" bpmnElement="processAuditException">
- <dc:Bounds x="415" y="510" width="100" height="80" />
+ <dc:Bounds x="486" y="456" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="InclusiveGateway_03pi9y4_di" bpmnElement="ExclusiveGateway_1v8bmbu">
- <dc:Bounds x="330" y="227" width="50" height="50" />
+ <dc:Bounds x="401" y="173" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="383" y="246" width="73" height="12" />
+ <dc:Bounds x="453" y="192" width="75" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="InclusiveGateway_16ap4e3_di" bpmnElement="ExclusiveGateway_0sqvzll">
- <dc:Bounds x="856" y="227" width="50" height="50" />
+ <dc:Bounds x="927" y="173" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="836" y="281" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="InclusiveGateway_00n600s_di" bpmnElement="ExclusiveGateway_1h8avxn">
- <dc:Bounds x="638" y="150" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="693" y="169" width="63" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="InclusiveGateway_0xx6c29_di" bpmnElement="ExclusiveGateway_0y0ek7t">
- <dc:Bounds x="809" y="150" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="789" y="204" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0l8684g_di" bpmnElement="SequenceFlow_0l8684g">
+ <di:waypoint x="780" y="121" />
+ <di:waypoint x="952" y="121" />
+ <di:waypoint x="952" y="173" />
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn
index d77e141364..61c870b956 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.1.2">
<bpmn:process id="CreateVfModuleBB" name="CreateVfModuleBB" isExecutable="true">
<bpmn:startEvent id="CreateVfModuleBB_Start">
<bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing>
@@ -23,7 +23,7 @@
<bpmn:outgoing>SequenceFlow_1s4rpyp</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_16g4dz0" sourceRef="CreateVfModule" targetRef="VnfAdapter" />
- <bpmn:sequenceFlow id="SequenceFlow_0ecr393" sourceRef="VnfAdapter" targetRef="CreateNetworkPolicies" />
+ <bpmn:sequenceFlow id="SequenceFlow_0ecr393" sourceRef="VnfAdapter" targetRef="ServiceTask_01zrt6x" />
<bpmn:callActivity id="VnfAdapter" name="Vnf Adapter" calledElement="VnfAdapter">
<bpmn:extensionElements>
<camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" />
@@ -60,7 +60,7 @@
<bpmn:sequenceFlow id="SequenceFlow_0rds4rj" sourceRef="UpdateVfModuleHeatStackId" targetRef="UpdateVfModuleStatus" />
<bpmn:sequenceFlow id="SequenceFlow_1vbwdaw" sourceRef="UpdateVfModuleStatus" targetRef="CreateVfModuleBB_End" />
<bpmn:serviceTask id="CreateNetworkPolicies" name="AAI Create (network policies)" camunda:expression="${AAICreateTasks.createNetworkPolicies(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
- <bpmn:incoming>SequenceFlow_0ecr393</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1yn8o6d</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0xqhep5</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_0xqhep5" sourceRef="CreateNetworkPolicies" targetRef="UpdateVnfIpv4OamAddress" />
@@ -79,156 +79,180 @@
<bpmn:outgoing>SequenceFlow_15do1tu</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_15do1tu" sourceRef="UpdateVfModuleContrailServiceInstanceFqdn" targetRef="UpdateVfModuleHeatStackId" />
+ <bpmn:serviceTask id="ServiceTask_01zrt6x" name="&#10;Create&#10;Cloud&#10;Variable&#10;" camunda:expression="${CreateVFModule.createInventoryVariable(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_0ecr393</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1io8r33</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1io8r33" sourceRef="ServiceTask_01zrt6x" targetRef="ServiceTask_00d84m7" />
+ <bpmn:serviceTask id="ServiceTask_00d84m7" name="&#10;AAI&#10;Create&#10;(inventory)&#10;" camunda:type="external" camunda:topic="InventoryCreate">
+ <bpmn:incoming>SequenceFlow_1io8r33</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1yn8o6d</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1yn8o6d" sourceRef="ServiceTask_00d84m7" targetRef="CreateNetworkPolicies" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleBB">
<bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="CreateVfModuleBB_Start">
- <dc:Bounds x="159" y="88" width="36" height="36" />
+ <dc:Bounds x="156" y="88" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="77" y="124" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="QueryVfModule">
- <dc:Bounds x="516" y="66" width="100" height="80" />
+ <dc:Bounds x="513" y="66" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl">
- <di:waypoint x="195" y="106" />
- <di:waypoint x="316" y="106" />
+ <di:waypoint x="192" y="106" />
+ <di:waypoint x="313" y="106" />
<bpmndi:BPMNLabel>
<dc:Bounds x="156" y="91" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="CreateVfModuleBB_End">
- <dc:Bounds x="1218" y="293" width="36" height="36" />
+ <dc:Bounds x="1215" y="293" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1136" y="333" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_1dgenhy_di" bpmnElement="CreateVfModule">
- <dc:Bounds x="712" y="66" width="100" height="80" />
+ <dc:Bounds x="709" y="66" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_15hn8si_di" bpmnElement="SequenceFlow_15hn8si">
- <di:waypoint x="616" y="106" />
- <di:waypoint x="712" y="106" />
+ <di:waypoint x="613" y="106" />
+ <di:waypoint x="709" y="106" />
<bpmndi:BPMNLabel>
<dc:Bounds x="519" y="91" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1s4rpyp_di" bpmnElement="SequenceFlow_1s4rpyp">
- <di:waypoint x="416" y="106" />
- <di:waypoint x="516" y="106" />
+ <di:waypoint x="413" y="106" />
+ <di:waypoint x="513" y="106" />
<bpmndi:BPMNLabel>
<dc:Bounds x="321" y="91" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_1frb5h2_di" bpmnElement="QueryVnf">
- <dc:Bounds x="316" y="66" width="100" height="80" />
+ <dc:Bounds x="313" y="66" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_16g4dz0_di" bpmnElement="SequenceFlow_16g4dz0">
- <di:waypoint x="812" y="106" />
- <di:waypoint x="890" y="106" />
+ <di:waypoint x="809" y="106" />
+ <di:waypoint x="887" y="106" />
<bpmndi:BPMNLabel>
<dc:Bounds x="751" y="91" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0ecr393_di" bpmnElement="SequenceFlow_0ecr393">
- <di:waypoint x="990" y="107" />
- <di:waypoint x="1094" y="107" />
- <di:waypoint x="1094" y="209" />
- <di:waypoint x="173" y="209" />
- <di:waypoint x="173" y="306" />
- <di:waypoint x="242" y="306" />
+ <di:waypoint x="987" y="107" />
+ <di:waypoint x="1091" y="107" />
+ <di:waypoint x="1091" y="209" />
+ <di:waypoint x="680" y="209" />
<bpmndi:BPMNLabel>
<dc:Bounds x="534" y="194" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_1i1pfzb_di" bpmnElement="VnfAdapter">
- <dc:Bounds x="890" y="66" width="100" height="80" />
+ <dc:Bounds x="887" y="66" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0fpfn71_di" bpmnElement="UpdateVfModuleStatus">
- <dc:Bounds x="1042" y="271" width="100" height="80" />
+ <dc:Bounds x="1039" y="271" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_04k1b85_di" bpmnElement="UpdateVfModuleHeatStackId">
- <dc:Bounds x="877" y="271" width="100" height="80" />
+ <dc:Bounds x="874" y="271" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="SubProcess_1getwnf_di" bpmnElement="SubProcess_1getwnf" isExpanded="true">
- <dc:Bounds x="236" y="439" width="231" height="135" />
+ <dc:Bounds x="233" y="439" width="231" height="135" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_1c8o652_di" bpmnElement="StartEvent_1c8o652">
- <dc:Bounds x="275" y="497" width="36" height="36" />
+ <dc:Bounds x="272" y="497" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="148" y="533" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_1emam1w_di" bpmnElement="EndEvent_1emam1w">
- <dc:Bounds x="412" y="497" width="36" height="36" />
+ <dc:Bounds x="409" y="497" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="285" y="533" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0gcots6_di" bpmnElement="SequenceFlow_0gcots6">
- <di:waypoint x="311" y="515" />
- <di:waypoint x="412" y="515" />
+ <di:waypoint x="308" y="515" />
+ <di:waypoint x="409" y="515" />
<bpmndi:BPMNLabel>
<dc:Bounds x="262" y="494" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0rds4rj_di" bpmnElement="SequenceFlow_0rds4rj">
- <di:waypoint x="977" y="311" />
- <di:waypoint x="1042" y="311" />
+ <di:waypoint x="974" y="311" />
+ <di:waypoint x="1039" y="311" />
<bpmndi:BPMNLabel>
<dc:Bounds x="910" y="296" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1vbwdaw_di" bpmnElement="SequenceFlow_1vbwdaw">
- <di:waypoint x="1142" y="311" />
- <di:waypoint x="1183" y="311" />
- <di:waypoint x="1183" y="311" />
- <di:waypoint x="1218" y="311" />
+ <di:waypoint x="1139" y="311" />
+ <di:waypoint x="1180" y="311" />
+ <di:waypoint x="1180" y="311" />
+ <di:waypoint x="1215" y="311" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1098" y="311" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_1v8zx4s_di" bpmnElement="CreateNetworkPolicies">
- <dc:Bounds x="242" y="271" width="100" height="80" />
+ <dc:Bounds x="239" y="271" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0xqhep5_di" bpmnElement="SequenceFlow_0xqhep5">
- <di:waypoint x="342" y="311" />
- <di:waypoint x="395" y="311" />
+ <di:waypoint x="339" y="311" />
+ <di:waypoint x="392" y="311" />
<bpmndi:BPMNLabel>
<dc:Bounds x="269" y="296" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_015ayw5_di" bpmnElement="UpdateVnfIpv4OamAddress">
- <dc:Bounds x="395" y="271" width="100" height="80" />
+ <dc:Bounds x="392" y="271" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1yo6mvv_di" bpmnElement="SequenceFlow_1yo6mvv">
- <di:waypoint x="495" y="311" />
- <di:waypoint x="564" y="311" />
+ <di:waypoint x="492" y="311" />
+ <di:waypoint x="561" y="311" />
<bpmndi:BPMNLabel>
<dc:Bounds x="430" y="296" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0mlfsc9_di" bpmnElement="UpdateVnfManagementV6Address">
- <dc:Bounds x="564" y="271" width="100" height="80" />
+ <dc:Bounds x="561" y="271" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1i03uy2_di" bpmnElement="SequenceFlow_1i03uy2">
- <di:waypoint x="664" y="311" />
- <di:waypoint x="712" y="311" />
+ <di:waypoint x="661" y="311" />
+ <di:waypoint x="709" y="311" />
<bpmndi:BPMNLabel>
<dc:Bounds x="588" y="296" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0wctnhw_di" bpmnElement="UpdateVfModuleContrailServiceInstanceFqdn">
- <dc:Bounds x="712" y="271" width="100" height="80" />
+ <dc:Bounds x="709" y="271" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_15do1tu_di" bpmnElement="SequenceFlow_15do1tu">
- <di:waypoint x="812" y="311" />
- <di:waypoint x="877" y="311" />
+ <di:waypoint x="809" y="311" />
+ <di:waypoint x="874" y="311" />
<bpmndi:BPMNLabel>
<dc:Bounds x="745" y="286" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_01zrt6x_di" bpmnElement="ServiceTask_01zrt6x">
+ <dc:Bounds x="580" y="169" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1io8r33_di" bpmnElement="SequenceFlow_1io8r33">
+ <di:waypoint x="580" y="209" />
+ <di:waypoint x="478" y="209" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_00d84m7_di" bpmnElement="ServiceTask_00d84m7">
+ <dc:Bounds x="378" y="169" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yn8o6d_di" bpmnElement="SequenceFlow_1yn8o6d">
+ <di:waypoint x="378" y="209" />
+ <di:waypoint x="170" y="209" />
+ <di:waypoint x="170" y="306" />
+ <di:waypoint x="239" y="306" />
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn
index ca0f8452cf..87e0b883a9 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.1.2">
<bpmn:process id="DeleteVfModuleBB" name="DeleteVfModuleBB" isExecutable="true">
<bpmn:startEvent id="DeleteVfModuleBB_Start">
<bpmn:outgoing>SequenceFlow_1oeootm</bpmn:outgoing>
@@ -51,7 +51,7 @@
<bpmn:sequenceFlow id="SequenceFlow_09l7pcg" sourceRef="UpdateVfModuleDeleteStatus" targetRef="DeleteVfModuleBB_End" />
<bpmn:sequenceFlow id="SequenceFlow_0xyu3pk" sourceRef="DeleteNetworkPolicies" targetRef="UpdateVnfIpv4OamAddress" />
<bpmn:serviceTask id="DeleteNetworkPolicies" name="&#10;AAI&#10;Delete&#10;(net policies)&#10;" camunda:expression="${AAIDeleteTasks.deleteNetworkPolicies(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
- <bpmn:incoming>SequenceFlow_179btn2</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0sy2nky</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0xyu3pk</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="UpdateVnfManagementV6Address" name="&#10;AAI &#10;Update&#10;(vnf)&#10;" camunda:expression="${AAIUpdateTasks.updateManagementV6AddressVnf(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
@@ -70,9 +70,9 @@
<bpmn:outgoing>SequenceFlow_0yuz21z</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_032jv5j" name="Yes&#10;" sourceRef="auditEnabledCheck" targetRef="Setup_Audit_Variable">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("auditInventoryNeeded") == true}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("auditInventoryNeeded") == true}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:sequenceFlow id="SequenceFlow_14bu4ys" sourceRef="ExclusiveGateway_1yvh16a" targetRef="aaiThrow" />
+ <bpmn:sequenceFlow id="SequenceFlow_14bu4ys" sourceRef="ExclusiveGateway_1yvh16a" targetRef="ServiceTask_08ulmzc" />
<bpmn:serviceTask id="Check_Audit" name="Check Audit Variable" camunda:expression="${AuditTasks.isDeleteAuditNeeded(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn:incoming>SequenceFlow_1oeootm</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_10af0fk</bpmn:outgoing>
@@ -100,9 +100,9 @@
<bpmn:escalationEventDefinition escalationRef="Escalation_130je8j" camunda:escalationCodeVariable="auditCode" />
</bpmn:startEvent>
</bpmn:subProcess>
- <bpmn:sequenceFlow id="SequenceFlow_179btn2" sourceRef="aaiCatch" targetRef="DeleteNetworkPolicies" />
+ <bpmn:sequenceFlow id="SequenceFlow_179btn2" sourceRef="aaiCatch" targetRef="ServiceTask_0itw3by" />
<bpmn:intermediateThrowEvent id="aaiThrow" name="Update AAI">
- <bpmn:incoming>SequenceFlow_14bu4ys</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1i9ft2r</bpmn:incoming>
<bpmn:linkEventDefinition name="AAI" />
</bpmn:intermediateThrowEvent>
<bpmn:intermediateCatchEvent id="aaiCatch" name="Update AAI">
@@ -110,10 +110,10 @@
<bpmn:linkEventDefinition name="AAI" />
</bpmn:intermediateCatchEvent>
<bpmn:sequenceFlow id="SequenceFlow_17cd9e2" name="Yes/No" sourceRef="auditSuccessfulCheck" targetRef="ExclusiveGateway_01wvywu">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("auditIsSuccessful") == false || execution.getVariable("auditIsSuccessful") == true}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("auditIsSuccessful") == false || execution.getVariable("auditIsSuccessful") == true}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1gdyk9j" name="No" sourceRef="auditSuccessfulCheck" targetRef="EndEvent_0b0ocu0">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("auditIsSuccessful") == false}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("auditIsSuccessful") == false}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:inclusiveGateway id="auditSuccessfulCheck" name="Audit&#10; Successful?">
<bpmn:incoming>SequenceFlow_0hpj2mm</bpmn:incoming>
@@ -163,7 +163,7 @@
<bpmn:outgoing>SequenceFlow_1gjwivp</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_0f5ljoh" name="Yes" sourceRef="ExclusiveGateway_13fhmpf" targetRef="Audit_Inventory">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("auditInventoryNeeded") == true}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("auditInventoryNeeded") == true}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="ExclusiveGateway_01wvywu">
<bpmn:incoming>SequenceFlow_17cd9e2</bpmn:incoming>
@@ -172,6 +172,16 @@
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_1gjwivp" name="No" sourceRef="ExclusiveGateway_13fhmpf" targetRef="ExclusiveGateway_01wvywu" />
<bpmn:sequenceFlow id="SequenceFlow_13mlz57" sourceRef="ExclusiveGateway_01wvywu" targetRef="ExclusiveGateway_1yvh16a" />
+ <bpmn:serviceTask id="ServiceTask_0itw3by" name="&#10;AAI&#10;Delete&#10;(inventory)&#10;" camunda:type="external" camunda:topic="InventoryDelete">
+ <bpmn:incoming>SequenceFlow_179btn2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0sy2nky</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0sy2nky" sourceRef="ServiceTask_0itw3by" targetRef="DeleteNetworkPolicies" />
+ <bpmn:serviceTask id="ServiceTask_08ulmzc" name="&#10;Create&#10;Cloud&#10;Variable&#10;" camunda:expression="${DeleteVFModule.createInventoryVariable(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_14bu4ys</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1i9ft2r</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1i9ft2r" sourceRef="ServiceTask_08ulmzc" targetRef="aaiThrow" />
</bpmn:process>
<bpmn:error id="Error_0jjnve8" name="Error_3k24na6" errorCode="AAIInventoryFailure" />
<bpmn:escalation id="Escalation_130je8j" name="audit" escalationCode="audit1" />
@@ -187,11 +197,11 @@
<dc:Bounds x="888" y="312" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0pbhsub_di" bpmnElement="UpdateVfModuleDeleteStatus">
- <dc:Bounds x="907" y="468" width="100" height="80" />
+ <dc:Bounds x="1136" y="468" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_08tvhtf_di" bpmnElement="SequenceFlow_08tvhtf">
- <di:waypoint xsi:type="dc:Point" x="988" y="352" />
- <di:waypoint xsi:type="dc:Point" x="1020" y="352" />
+ <di:waypoint x="988" y="352" />
+ <di:waypoint x="1020" y="352" />
<bpmndi:BPMNLabel>
<dc:Bounds x="959" y="331" width="90" height="12" />
</bpmndi:BPMNLabel>
@@ -206,9 +216,9 @@
<dc:Bounds x="1020" y="312" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_02lpx87_di" bpmnElement="SequenceFlow_02lpx87">
- <di:waypoint xsi:type="dc:Point" x="1120" y="352" />
- <di:waypoint xsi:type="dc:Point" x="1203" y="352" />
- <di:waypoint xsi:type="dc:Point" x="1203" y="309" />
+ <di:waypoint x="1120" y="352" />
+ <di:waypoint x="1203" y="352" />
+ <di:waypoint x="1203" y="309" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1116.5" y="337" width="90" height="0" />
</bpmndi:BPMNLabel>
@@ -229,80 +239,86 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0h607z0_di" bpmnElement="SequenceFlow_0h607z0">
- <di:waypoint xsi:type="dc:Point" x="369" y="958" />
- <di:waypoint xsi:type="dc:Point" x="462" y="958" />
+ <di:waypoint x="369" y="958" />
+ <di:waypoint x="462" y="958" />
<bpmndi:BPMNLabel>
<dc:Bounds x="371" y="937" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0vlgqod_di" bpmnElement="UpdateVfModuleHeatStackId">
- <dc:Bounds x="779" y="468" width="100" height="80" />
+ <dc:Bounds x="969" y="468" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_01vfwtp_di" bpmnElement="SequenceFlow_01vfwtp">
- <di:waypoint xsi:type="dc:Point" x="879" y="508" />
- <di:waypoint xsi:type="dc:Point" x="907" y="508" />
+ <di:waypoint x="1069" y="508" />
+ <di:waypoint x="1136" y="508" />
<bpmndi:BPMNLabel>
<dc:Bounds x="848" y="493" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_09l7pcg_di" bpmnElement="SequenceFlow_09l7pcg">
- <di:waypoint xsi:type="dc:Point" x="1007" y="508" />
- <di:waypoint xsi:type="dc:Point" x="1268" y="508" />
+ <di:waypoint x="1236" y="508" />
+ <di:waypoint x="1268" y="508" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1092.5" y="493" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0xyu3pk_di" bpmnElement="SequenceFlow_0xyu3pk">
- <di:waypoint xsi:type="dc:Point" x="376" y="508" />
- <di:waypoint xsi:type="dc:Point" x="404" y="508" />
+ <di:waypoint x="420" y="468" />
+ <di:waypoint x="420" y="448" />
+ <di:waypoint x="443" y="409" />
+ <di:waypoint x="497" y="468" />
<bpmndi:BPMNLabel>
<dc:Bounds x="345" y="493" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0tty0ac_di" bpmnElement="DeleteNetworkPolicies">
- <dc:Bounds x="276" y="468" width="100" height="80" />
+ <dc:Bounds x="370" y="468" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0lrrd16_di" bpmnElement="UpdateVnfManagementV6Address">
- <dc:Bounds x="531" y="468" width="100" height="80" />
+ <dc:Bounds x="642" y="468" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0jtem3b_di" bpmnElement="SequenceFlow_0jtem3b">
- <di:waypoint xsi:type="dc:Point" x="504" y="508" />
- <di:waypoint xsi:type="dc:Point" x="531" y="508" />
+ <di:waypoint x="533" y="468" />
+ <di:waypoint x="533" y="448" />
+ <di:waypoint x="619" y="387" />
+ <di:waypoint x="692" y="448" />
+ <di:waypoint x="692" y="468" />
<bpmndi:BPMNLabel>
<dc:Bounds x="473" y="493" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0w9805b_di" bpmnElement="UpdateVnfIpv4OamAddress">
- <dc:Bounds x="404" y="468" width="100" height="80" />
+ <dc:Bounds x="483" y="468" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0khqfnc_di" bpmnElement="SequenceFlow_0khqfnc">
- <di:waypoint xsi:type="dc:Point" x="631" y="508" />
- <di:waypoint xsi:type="dc:Point" x="654" y="508" />
+ <di:waypoint x="742" y="493" />
+ <di:waypoint x="891" y="448" />
+ <di:waypoint x="891" y="468" />
<bpmndi:BPMNLabel>
<dc:Bounds x="598" y="493" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0yuz21z_di" bpmnElement="SequenceFlow_0yuz21z">
- <di:waypoint xsi:type="dc:Point" x="754" y="508" />
- <di:waypoint xsi:type="dc:Point" x="779" y="508" />
+ <di:waypoint x="941" y="508" />
+ <di:waypoint x="969" y="508" />
<bpmndi:BPMNLabel>
<dc:Bounds x="722" y="493" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_0v8naz9_di" bpmnElement="UpdateVfModuleContrailServiceInstanceFqdn">
- <dc:Bounds x="654" y="468" width="100" height="80" />
+ <dc:Bounds x="841" y="468" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_032jv5j_di" bpmnElement="SequenceFlow_032jv5j">
- <di:waypoint xsi:type="dc:Point" x="397" y="259" />
- <di:waypoint xsi:type="dc:Point" x="397" y="214" />
- <di:waypoint xsi:type="dc:Point" x="444" y="214" />
+ <di:waypoint x="397" y="259" />
+ <di:waypoint x="397" y="214" />
+ <di:waypoint x="444" y="214" />
<bpmndi:BPMNLabel>
<dc:Bounds x="405.5348837209302" y="217.95121951219514" width="19" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_14bu4ys_di" bpmnElement="SequenceFlow_14bu4ys">
- <di:waypoint xsi:type="dc:Point" x="1228" y="284" />
- <di:waypoint xsi:type="dc:Point" x="1323" y="284" />
+ <di:waypoint x="1228" y="284" />
+ <di:waypoint x="1284" y="284" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1230.5" y="262.5" width="90" height="13" />
</bpmndi:BPMNLabel>
@@ -329,30 +345,30 @@
<dc:Bounds x="353" y="703" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0xuodpy_di" bpmnElement="SequenceFlow_0xuodpy">
- <di:waypoint xsi:type="dc:Point" x="298" y="743" />
- <di:waypoint xsi:type="dc:Point" x="353" y="743" />
+ <di:waypoint x="298" y="743" />
+ <di:waypoint x="353" y="743" />
<bpmndi:BPMNLabel>
<dc:Bounds x="280.5" y="722" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1fhst92_di" bpmnElement="SequenceFlow_1fhst92">
- <di:waypoint xsi:type="dc:Point" x="453" y="743" />
- <di:waypoint xsi:type="dc:Point" x="510" y="743" />
+ <di:waypoint x="453" y="743" />
+ <di:waypoint x="510" y="743" />
<bpmndi:BPMNLabel>
<dc:Bounds x="393" y="722" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_179btn2_di" bpmnElement="SequenceFlow_179btn2">
- <di:waypoint xsi:type="dc:Point" x="195" y="508" />
- <di:waypoint xsi:type="dc:Point" x="276" y="508" />
+ <di:waypoint x="195" y="508" />
+ <di:waypoint x="225" y="508" />
<bpmndi:BPMNLabel>
<dc:Bounds x="191" y="487" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1sftyjz_di" bpmnElement="aaiThrow">
- <dc:Bounds x="1323" y="266" width="36" height="36" />
+ <dc:Bounds x="1481" y="266" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1315" y="305" width="55" height="12" />
+ <dc:Bounds x="1472" y="305" width="57" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateCatchEvent_13y483m_di" bpmnElement="aaiCatch">
@@ -362,18 +378,18 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_17cd9e2_di" bpmnElement="SequenceFlow_17cd9e2">
- <di:waypoint xsi:type="dc:Point" x="1108" y="157" />
- <di:waypoint xsi:type="dc:Point" x="1156" y="157" />
- <di:waypoint xsi:type="dc:Point" x="1156" y="189" />
+ <di:waypoint x="1108" y="157" />
+ <di:waypoint x="1156" y="157" />
+ <di:waypoint x="1156" y="189" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1111.0434782608695" y="137" width="36" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1gdyk9j_di" bpmnElement="SequenceFlow_1gdyk9j">
- <di:waypoint xsi:type="dc:Point" x="1083" y="132" />
- <di:waypoint xsi:type="dc:Point" x="1083" y="109" />
- <di:waypoint xsi:type="dc:Point" x="1083" y="109" />
- <di:waypoint xsi:type="dc:Point" x="1083" y="84" />
+ <di:waypoint x="1083" y="132" />
+ <di:waypoint x="1083" y="109" />
+ <di:waypoint x="1083" y="109" />
+ <di:waypoint x="1083" y="84" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1083" y="110.74468085106383" width="14" height="12" />
</bpmndi:BPMNLabel>
@@ -409,24 +425,24 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1bt1p2u_di" bpmnElement="SequenceFlow_1bt1p2u">
- <di:waypoint xsi:type="dc:Point" x="397" y="309" />
- <di:waypoint xsi:type="dc:Point" x="397" y="352" />
- <di:waypoint xsi:type="dc:Point" x="722" y="352" />
- <di:waypoint xsi:type="dc:Point" x="722" y="309" />
+ <di:waypoint x="397" y="309" />
+ <di:waypoint x="397" y="352" />
+ <di:waypoint x="722" y="352" />
+ <di:waypoint x="722" y="309" />
<bpmndi:BPMNLabel>
<dc:Bounds x="407" y="326" width="14" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1oeootm_di" bpmnElement="SequenceFlow_1oeootm">
- <di:waypoint xsi:type="dc:Point" x="195" y="284" />
- <di:waypoint xsi:type="dc:Point" x="244" y="284" />
+ <di:waypoint x="195" y="284" />
+ <di:waypoint x="244" y="284" />
<bpmndi:BPMNLabel>
<dc:Bounds x="219.5" y="263" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_10af0fk_di" bpmnElement="SequenceFlow_10af0fk">
- <di:waypoint xsi:type="dc:Point" x="344" y="284" />
- <di:waypoint xsi:type="dc:Point" x="372" y="284" />
+ <di:waypoint x="344" y="284" />
+ <di:waypoint x="372" y="284" />
<bpmndi:BPMNLabel>
<dc:Bounds x="358" y="263" width="0" height="12" />
</bpmndi:BPMNLabel>
@@ -435,39 +451,39 @@
<dc:Bounds x="571" y="174" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1iulltd_di" bpmnElement="SequenceFlow_1iulltd">
- <di:waypoint xsi:type="dc:Point" x="544" y="214" />
- <di:waypoint xsi:type="dc:Point" x="571" y="214" />
+ <di:waypoint x="544" y="214" />
+ <di:waypoint x="571" y="214" />
<bpmndi:BPMNLabel>
<dc:Bounds x="557.5" y="193" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0dzf7hz_di" bpmnElement="SequenceFlow_0dzf7hz">
- <di:waypoint xsi:type="dc:Point" x="671" y="214" />
- <di:waypoint xsi:type="dc:Point" x="722" y="214" />
- <di:waypoint xsi:type="dc:Point" x="722" y="259" />
+ <di:waypoint x="671" y="214" />
+ <di:waypoint x="722" y="214" />
+ <di:waypoint x="722" y="259" />
<bpmndi:BPMNLabel>
<dc:Bounds x="651.5" y="193" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1bq9g02_di" bpmnElement="SequenceFlow_1bq9g02">
- <di:waypoint xsi:type="dc:Point" x="747" y="284" />
- <di:waypoint xsi:type="dc:Point" x="796" y="284" />
+ <di:waypoint x="747" y="284" />
+ <di:waypoint x="796" y="284" />
<bpmndi:BPMNLabel>
<dc:Bounds x="726.5" y="263" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0mtzl4z_di" bpmnElement="SequenceFlow_0mtzl4z">
- <di:waypoint xsi:type="dc:Point" x="821" y="259" />
- <di:waypoint xsi:type="dc:Point" x="821" y="214" />
- <di:waypoint xsi:type="dc:Point" x="846" y="214" />
+ <di:waypoint x="821" y="259" />
+ <di:waypoint x="821" y="214" />
+ <di:waypoint x="846" y="214" />
<bpmndi:BPMNLabel>
<dc:Bounds x="791" y="231" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_028rmiu_di" bpmnElement="SequenceFlow_028rmiu">
- <di:waypoint xsi:type="dc:Point" x="821" y="309" />
- <di:waypoint xsi:type="dc:Point" x="821" y="352" />
- <di:waypoint xsi:type="dc:Point" x="888" y="352" />
+ <di:waypoint x="821" y="309" />
+ <di:waypoint x="821" y="352" />
+ <di:waypoint x="888" y="352" />
<bpmndi:BPMNLabel>
<dc:Bounds x="791" y="324.5" width="90" height="12" />
</bpmndi:BPMNLabel>
@@ -485,8 +501,8 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0hpj2mm_di" bpmnElement="SequenceFlow_0hpj2mm">
- <di:waypoint xsi:type="dc:Point" x="1030" y="157" />
- <di:waypoint xsi:type="dc:Point" x="1058" y="157" />
+ <di:waypoint x="1030" y="157" />
+ <di:waypoint x="1058" y="157" />
<bpmndi:BPMNLabel>
<dc:Bounds x="999" y="136" width="90" height="12" />
</bpmndi:BPMNLabel>
@@ -498,9 +514,9 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0f5ljoh_di" bpmnElement="SequenceFlow_0f5ljoh">
- <di:waypoint xsi:type="dc:Point" x="871" y="189" />
- <di:waypoint xsi:type="dc:Point" x="871" y="157" />
- <di:waypoint xsi:type="dc:Point" x="930" y="157" />
+ <di:waypoint x="871" y="189" />
+ <di:waypoint x="871" y="157" />
+ <di:waypoint x="930" y="157" />
<bpmndi:BPMNLabel>
<dc:Bounds x="877.601615925754" y="162.89580806038546" width="19" height="12" />
</bpmndi:BPMNLabel>
@@ -512,22 +528,38 @@
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1gjwivp_di" bpmnElement="SequenceFlow_1gjwivp">
- <di:waypoint xsi:type="dc:Point" x="871" y="239" />
- <di:waypoint xsi:type="dc:Point" x="871" y="266" />
- <di:waypoint xsi:type="dc:Point" x="1156" y="266" />
- <di:waypoint xsi:type="dc:Point" x="1156" y="239" />
+ <di:waypoint x="871" y="239" />
+ <di:waypoint x="871" y="266" />
+ <di:waypoint x="1156" y="266" />
+ <di:waypoint x="1156" y="239" />
<bpmndi:BPMNLabel>
<dc:Bounds x="879" y="244" width="14" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_13mlz57_di" bpmnElement="SequenceFlow_13mlz57">
- <di:waypoint xsi:type="dc:Point" x="1181" y="214" />
- <di:waypoint xsi:type="dc:Point" x="1203" y="214" />
- <di:waypoint xsi:type="dc:Point" x="1203" y="259" />
+ <di:waypoint x="1181" y="214" />
+ <di:waypoint x="1203" y="214" />
+ <di:waypoint x="1203" y="259" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1147" y="193" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0itw3by_di" bpmnElement="ServiceTask_0itw3by">
+ <dc:Bounds x="225" y="468" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0sy2nky_di" bpmnElement="SequenceFlow_0sy2nky">
+ <di:waypoint x="325" y="508" />
+ <di:waypoint x="370" y="508" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_08ulmzc_di" bpmnElement="ServiceTask_08ulmzc">
+ <dc:Bounds x="1284" y="244" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1i9ft2r_di" bpmnElement="SequenceFlow_1i9ft2r">
+ <di:waypoint x="1384" y="276" />
+ <di:waypoint x="1433" y="276" />
+ <di:waypoint x="1433" y="284" />
+ <di:waypoint x="1481" y="284" />
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVfModuleBBTest.java
deleted file mode 100644
index 4c5edade6e..0000000000
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVfModuleBBTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.bpmn.infrastructure.bpmn.subprocess;
-
-import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.assertThat;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doThrow;
-import org.camunda.bpm.engine.delegate.BpmnError;
-import org.camunda.bpm.engine.runtime.ProcessInstance;
-import org.junit.Test;
-import org.onap.so.bpmn.BaseBPMNTest;
-import org.onap.so.bpmn.common.BuildingBlockExecution;
-
-public class CreateVfModuleBBTest extends BaseBPMNTest {
- @Test
- public void sunnyDayCreateVfModule_Test() throws InterruptedException {
- mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub");
- ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables);
- assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule",
- "CreateVfModule", "VnfAdapter", "CreateNetworkPolicies", "UpdateVnfIpv4OamAddress",
- "UpdateVnfManagementV6Address", "UpdateVfModuleContrailServiceInstanceFqdn",
- "UpdateVfModuleHeatStackId", "UpdateVfModuleStatus", "CreateVfModuleBB_End");
- assertThat(pi).isEnded();
- }
-
- @Test
- public void rainyDayCreateVfModuleSDNCQueryVnfError_Test() throws Exception {
- doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncQueryTasks)
- .queryVnf(any(BuildingBlockExecution.class));
- ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables);
- assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf").hasNotPassed("QueryVfModule",
- "CreateVfModule", "VnfAdapter", "CreateNetworkPolicies", "UpdateVnfIpv4OamAddress",
- "UpdateVnfManagementV6Address", "UpdateVfModuleContrailServiceInstanceFqdn",
- "UpdateVfModuleHeatStackId", "UpdateVfModuleStatus", "CreateVfModuleBB_End");
- assertThat(pi).isEnded();
- }
-
- @Test
- public void rainyDayCreateVfModuleSDNCQueryVnfModuleError_Test() throws Exception {
- doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncQueryTasks)
- .queryVfModule(any(BuildingBlockExecution.class));
- ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables);
- assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule").hasNotPassed(
- "CreateVfModule", "VnfAdapter", "CreateNetworkPolicies", "UpdateVnfIpv4OamAddress",
- "UpdateVnfManagementV6Address", "UpdateVfModuleContrailServiceInstanceFqdn",
- "UpdateVfModuleHeatStackId", "UpdateVfModuleStatus", "CreateVfModuleBB_End");
- assertThat(pi).isEnded();
- }
-
- @Test
- public void rainyDayCreateVfModuleVnfAdapterCreateError_Test() throws Exception {
- doThrow(new BpmnError("7000", "TESTING ERRORS")).when(vnfAdapterCreateTasks)
- .createVfModule(any(BuildingBlockExecution.class));
- ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables);
- assertThat(pi).isNotNull();
- assertThat(pi).isStarted()
- .hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule", "CreateVfModule")
- .hasNotPassed("VnfAdapter", "CreateNetworkPolicies", "UpdateVnfIpv4OamAddress",
- "UpdateVnfManagementV6Address", "UpdateVfModuleContrailServiceInstanceFqdn",
- "UpdateVfModuleHeatStackId", "UpdateVfModuleStatus", "CreateVfModuleBB_End");
- assertThat(pi).isEnded();
- }
-
- @Test
- public void rainyDayCreateVfModuleUpdateVfModuleHeatStackIdError_Test() throws Exception {
- mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub");
-
- doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks)
- .updateHeatStackIdVfModule(any(BuildingBlockExecution.class));
- ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables);
- assertThat(pi).isNotNull();
- assertThat(pi).isStarted()
- .hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule", "CreateVfModule", "VnfAdapter",
- "CreateNetworkPolicies", "UpdateVnfIpv4OamAddress", "UpdateVnfManagementV6Address",
- "UpdateVfModuleContrailServiceInstanceFqdn", "UpdateVfModuleHeatStackId")
- .hasNotPassed("UpdateVfModuleStatus", "CreateVfModuleBB_End");
- assertThat(pi).isEnded();
-
- }
-
- @Test
- public void rainyDayCreateVfModuleUpdateVfModuleStatusError_Test() throws Exception {
- mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub");
- doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks)
- .updateOrchestrationStatusCreatedVfModule(any(BuildingBlockExecution.class));
- ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateVfModuleBB", variables);
- assertThat(pi).isNotNull();
- assertThat(pi).isStarted()
- .hasPassedInOrder("CreateVfModuleBB_Start", "QueryVnf", "QueryVfModule", "CreateVfModule", "VnfAdapter",
- "CreateNetworkPolicies", "UpdateVnfIpv4OamAddress", "UpdateVnfManagementV6Address",
- "UpdateVfModuleContrailServiceInstanceFqdn", "UpdateVfModuleHeatStackId",
- "UpdateVfModuleStatus")
- .hasNotPassed("CreateVfModuleBB_End");
- assertThat(pi).isEnded();
- }
-}
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVfModuleBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVfModuleBBTest.java
deleted file mode 100644
index 47d0ad9b7f..0000000000
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVfModuleBBTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-package org.onap.so.bpmn.infrastructure.bpmn.subprocess;
-
-import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.assertThat;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doThrow;
-import java.io.IOException;
-import java.util.List;
-import org.camunda.bpm.engine.delegate.BpmnError;
-import org.camunda.bpm.engine.externaltask.LockedExternalTask;
-import org.camunda.bpm.engine.runtime.ProcessInstance;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.so.bpmn.BaseBPMNTest;
-import org.onap.so.bpmn.common.BuildingBlockExecution;
-
-public class DeleteVfModuleBBTest extends BaseBPMNTest {
-
- @Before
- public void before() {
- variables.put("auditInventoryNeeded", true);
- variables.put("auditIsSuccessful", true);
- }
-
- @Test
- public void sunnyDay() throws InterruptedException, IOException {
- mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub");
- mockSubprocess("VnfAdapter", "Mocked VnfAdapter", "GenericStub");
- ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVfModuleBB", variables);
- List<LockedExternalTask> tasks = externalTaskService.fetchAndLock(100, "externalWorkerId")
- .topic("InventoryDeleteAudit", 60L * 1000L).topic("InventoryQueryAudit", 60L * 1000L).execute();
- while (!tasks.isEmpty()) {
- for (LockedExternalTask task : tasks) {
- externalTaskService.complete(task.getId(), "externalWorkerId");
- }
- tasks = externalTaskService.fetchAndLock(100, "externalWorkerId").topic("InventoryDeleteAudit", 60L * 1000L)
- .topic("InventoryQueryAudit", 60L * 1000L).execute();
- }
- assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassed("DeleteVfModuleBB_Start", "Check_Audit", "auditEnabledCheck",
- "Setup_Audit_Variable", "Setup_Audit_Variable", "aicQueryStack", "ExclusiveGateway_1t9q2jl",
- "ExclusiveGateway_1naduhl", "ExclusiveGateway_13fhmpf", "DeleteVfModuleVnfAdapter", "VnfAdapter",
- "Audit_Inventory", "ExclusiveGateway_1yvh16a", "auditSuccessfulCheck", "ExclusiveGateway_01wvywu",
- "ExclusiveGateway_1yvh16a", "DeleteNetworkPolicies", "UpdateVnfIpv4OamAddress",
- "UpdateVnfManagementV6Address", "UpdateVfModuleContrailServiceInstanceFqdn",
- "UpdateVfModuleHeatStackId", "UpdateVfModuleDeleteStatus", "DeleteVfModuleBB_End");
- assertThat(pi).isEnded();
- }
-
- @Test
- public void rainyDay() throws Exception {
- doThrow(BpmnError.class).when(vnfAdapterDeleteTasks).deleteVfModule(any(BuildingBlockExecution.class));
- ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVfModuleBB", variables);
- List<LockedExternalTask> tasks = externalTaskService.fetchAndLock(100, "externalWorkerId")
- .topic("InventoryDeleteAudit", 60L * 1000L).topic("InventoryQueryAudit", 60L * 1000L).execute();
- while (!tasks.isEmpty()) {
- for (LockedExternalTask task : tasks) {
- externalTaskService.complete(task.getId(), "externalWorkerId");
- }
- tasks = externalTaskService.fetchAndLock(100, "externalWorkerId").topic("InventoryDeleteAudit", 60L * 1000L)
- .topic("InventoryQueryAudit", 60L * 1000L).execute();
- }
- assertThat(pi).isNotNull();
- assertThat(pi).isStarted()
- .hasPassed("DeleteVfModuleBB_Start", "Check_Audit", "auditEnabledCheck", "Setup_Audit_Variable",
- "Setup_Audit_Variable", "aicQueryStack", "ExclusiveGateway_1t9q2jl", "ExclusiveGateway_1naduhl",
- "ExclusiveGateway_13fhmpf")
- .hasNotPassed("VnfAdapter", "DeleteNetworkPolicies", "UpdateVnfIpv4OamAddress",
- "UpdateVnfManagementV6Address", "UpdateVfModuleContrailServiceInstanceFqdn",
- "UpdateVfModuleHeatStackId", "UpdateVfModuleDeleteStatus", "DeleteVfModuleBB_End");
- assertThat(pi).isEnded();
- }
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/vfmodule/CreateVFModule.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/vfmodule/CreateVFModule.java
new file mode 100644
index 0000000000..4b1e40917a
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/vfmodule/CreateVFModule.java
@@ -0,0 +1,86 @@
+package org.onap.so.bpmn.infrastructure.vfmodule;
+
+import java.util.Optional;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
+import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
+import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
+import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
+import org.onap.so.client.aai.AAIObjectPlurals;
+import org.onap.so.client.aai.AAIObjectType;
+import org.onap.so.client.aai.AAIResourcesClient;
+import org.onap.so.client.aai.entities.AAIResultWrapper;
+import org.onap.so.client.aai.entities.Relationships;
+import org.onap.so.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.so.client.aai.entities.uri.AAIResourceUri;
+import org.onap.so.client.aai.entities.uri.AAIUriFactory;
+import org.onap.so.client.exception.ExceptionBuilder;
+import org.onap.so.cloud.resource.beans.CloudInformation;
+import org.onap.so.cloud.resource.beans.NodeType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+
+@Component
+public class CreateVFModule {
+
+ private static final Logger logger = LoggerFactory.getLogger(CreateVFModule.class);
+
+ @Autowired
+ protected ExceptionBuilder exceptionUtil;
+
+ @Autowired
+ protected ExtractPojosForBB extractPojosForBB;
+
+ public void createInventoryVariable(BuildingBlockExecution execution) {
+ try {
+ GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
+ VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
+ GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
+ CloudInformation cloudInformation = new CloudInformation();
+ cloudInformation.setOwner(gBBInput.getCloudRegion().getCloudOwner());
+ cloudInformation.setRegionId(gBBInput.getCloudRegion().getLcpCloudRegionId());
+ cloudInformation.setTenantId(gBBInput.getTenant().getTenantId());
+ cloudInformation.setTenantName(gBBInput.getTenant().getTenantName());
+ cloudInformation.setTenantContext(gBBInput.getTenant().getTenantContext());
+ cloudInformation.setTemplateInstanceId(execution.getVariable("heatStackId"));
+ cloudInformation.setNodeType(getNodeType(gBBInput.getCloudRegion()));
+ cloudInformation.setVnfName(vnf.getVnfName());
+ cloudInformation.setVnfId(vnf.getVnfId());
+ cloudInformation.setVfModuleId(vfModule.getVfModuleId());
+ execution.setVariable("cloudInformation", cloudInformation);
+ } catch (Exception e) {
+ logger.error("Error building CloudInformation Object for NC Inventory", e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, e);
+ }
+ }
+
+ protected NodeType getNodeType(CloudRegion cloudRegion) {
+ AAIResourceUri cloudRegionUri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION,
+ cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId());
+ AAIResourcesClient client = getAAIClient();
+ Optional<Relationships> relationships = client.get(cloudRegionUri).getRelationships();
+ if (relationships.isPresent()) {
+ AAIPluralResourceUri networkTechsGreenfieldUri = AAIUriFactory
+ .createResourceUri(AAIObjectType.CLOUD_REGION, cloudRegion.getCloudOwner(),
+ cloudRegion.getLcpCloudRegionId())
+ .relatedTo(AAIObjectPlurals.NETWORK_TECHNOLOGY)
+ .queryParam("network-technology-name", NodeType.GREENFIELD.getNetworkTechnologyName());
+
+ AAIResultWrapper networkTechsGreenfield = client.get(networkTechsGreenfieldUri);
+ if (networkTechsGreenfield != null && !networkTechsGreenfield.isEmpty()) {
+ return NodeType.GREENFIELD;
+ }
+ }
+ return NodeType.BROWNFIELD;
+ }
+
+ protected AAIResourcesClient getAAIClient() {
+ return new AAIResourcesClient();
+ }
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/vfmodule/DeleteVFModule.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/vfmodule/DeleteVFModule.java
new file mode 100644
index 0000000000..ef9b06fe8c
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/vfmodule/DeleteVFModule.java
@@ -0,0 +1,51 @@
+package org.onap.so.bpmn.infrastructure.vfmodule;
+
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
+import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
+import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
+import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
+import org.onap.so.client.exception.ExceptionBuilder;
+import org.onap.so.cloud.resource.beans.CloudInformation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Component
+public class DeleteVFModule {
+
+ private static final Logger logger = LoggerFactory.getLogger(DeleteVFModule.class);
+
+ @Autowired
+ private ExceptionBuilder exceptionUtil;
+
+ @Autowired
+ private ExtractPojosForBB extractPojosForBB;
+
+ public void createInventoryVariable(BuildingBlockExecution execution) {
+ try {
+ VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
+ GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
+ GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
+ CloudInformation cloudInformation = new CloudInformation();
+ cloudInformation.setOwner(gBBInput.getCloudRegion().getCloudOwner());
+ cloudInformation.setRegionId(gBBInput.getCloudRegion().getLcpCloudRegionId());
+ cloudInformation.setTenantId(gBBInput.getTenant().getTenantId());
+ cloudInformation.setTenantName(gBBInput.getTenant().getTenantName());
+ cloudInformation.setTenantContext(gBBInput.getTenant().getTenantContext());
+ cloudInformation.setTemplateInstanceId(vfModule.getHeatStackId());
+ cloudInformation.setVnfName(vnf.getVnfName());
+ cloudInformation.setVnfId(vnf.getVnfId());
+ cloudInformation.setVfModuleId(vfModule.getVfModuleId());
+
+ execution.setVariable("cloudInformation", cloudInformation);
+ } catch (Exception e) {
+ logger.error("Error building CloudInformation Object for NC Inventory", e);
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, e);
+ }
+ }
+
+
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java
index 03ffd9c4c1..29177f8275 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java
@@ -24,6 +24,7 @@ package org.onap.so.bpmn;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.common.InjectionHelper;
import org.onap.so.bpmn.common.data.TestDataSetup;
import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignNetworkBBUtils;
@@ -32,6 +33,8 @@ import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup;
import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.aai.AAIResourcesClient;
+import org.onap.so.client.aai.entities.AAIResultWrapper;
+import org.onap.so.client.aai.entities.Relationships;
import org.onap.so.client.aai.mapper.AAIObjectMapper;
import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper;
import org.onap.so.client.appc.ApplicationControllerAction;
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/vfmodule/CreateVFModuleTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/vfmodule/CreateVFModuleTest.java
new file mode 100644
index 0000000000..63f7d6cbfc
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/vfmodule/CreateVFModuleTest.java
@@ -0,0 +1,108 @@
+package org.onap.so.bpmn.infrastructure.vfmodule;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.verify;
+import java.util.Optional;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.so.bpmn.BaseTaskTest;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Tenant;
+import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
+import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
+import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
+import org.onap.so.client.aai.AAIResourcesClient;
+import org.onap.so.client.aai.entities.AAIResultWrapper;
+import org.onap.so.client.aai.entities.Relationships;
+import org.onap.so.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.so.client.aai.entities.uri.AAIResourceUri;
+import org.onap.so.client.exception.BBObjectNotFoundException;
+import org.onap.so.cloud.resource.beans.CloudInformation;
+import org.onap.so.cloud.resource.beans.NodeType;
+
+
+
+public class CreateVFModuleTest extends BaseTaskTest {
+
+ @Spy
+ @InjectMocks
+ public CreateVFModule createVFModule;
+
+ @Mock
+ protected AAIResourcesClient aaiResourcesClient;
+
+ @Mock
+ protected AAIResultWrapper aaiIResultWrapper;
+
+ @Mock
+ protected Relationships relationships;
+
+ @Mock
+ protected BuildingBlockExecution execution;
+
+
+ public GeneralBuildingBlock gbb;
+ public CloudRegion cloudRegion;
+ private GenericVnf genericVnf;
+ private VfModule vfModule;
+ private ServiceInstance service;
+
+ @Before
+ public void before() {
+ cloudRegion = new CloudRegion();
+ cloudRegion.setCloudOwner("CloudOwner");
+ cloudRegion.setLcpCloudRegionId("testRegion");
+ Tenant tenant = new Tenant();
+ tenant.setTenantId("tenant-001");
+ tenant.setTenantName("test-tenant");
+ tenant.setTenantContext("testContext");
+ service = setServiceInstance();
+ genericVnf = setGenericVnf();
+ vfModule = setVfModule();
+ gbb = new GeneralBuildingBlock();
+ gbb.setCloudRegion(cloudRegion);
+ gbb.setTenant(tenant);
+ }
+
+ @Test
+ public void createInventoryVariableTest() throws BBObjectNotFoundException {
+ doReturn(gbb).when(execution).getGeneralBuildingBlock();
+ doReturn(genericVnf).when(extractPojosForBB).extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
+ doReturn(vfModule).when(extractPojosForBB).extractByKey(execution, ResourceKey.VF_MODULE_ID);
+ doReturn("heat-stack-id").when(execution).getVariable("heatStackId");
+ doReturn(NodeType.GREENFIELD).when(createVFModule).getNodeType(any(CloudRegion.class));
+ createVFModule.createInventoryVariable(execution);
+ verify(execution).setVariable(eq("cloudInformation"), any(CloudInformation.class));
+ }
+
+ @Test
+ public void getNodeTypeBrownfieldTest() {
+ doReturn(aaiResourcesClient).when(createVFModule).getAAIClient();
+ doReturn(aaiIResultWrapper).when(aaiResourcesClient).get(any(AAIResourceUri.class));
+ doReturn(Optional.empty()).when(aaiIResultWrapper).getRelationships();
+
+ assertEquals(NodeType.BROWNFIELD, createVFModule.getNodeType(cloudRegion));
+ }
+
+ @Test
+ public void getNodeTypeGreenfieldTest() {
+ doReturn(aaiResourcesClient).when(createVFModule).getAAIClient();
+ doReturn(aaiIResultWrapper).when(aaiResourcesClient).get(any(AAIResourceUri.class));
+ doReturn(aaiIResultWrapper).when(aaiResourcesClient).get(any(AAIPluralResourceUri.class));
+ doReturn(Optional.of(relationships)).when(aaiIResultWrapper).getRelationships();
+
+ assertEquals(NodeType.GREENFIELD, createVFModule.getNodeType(cloudRegion));
+ }
+}
diff --git a/common/src/main/java/org/onap/so/client/aai/AAISingleTransactionClient.java b/common/src/main/java/org/onap/so/client/aai/AAISingleTransactionClient.java
index b1d29f445b..687ff09c5a 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAISingleTransactionClient.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAISingleTransactionClient.java
@@ -38,6 +38,7 @@ import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.graphinventory.GraphInventoryPatchConverter;
import org.onap.so.client.graphinventory.GraphInventoryTransactionClient;
import org.onap.so.client.graphinventory.exceptions.BulkProcessFailed;
+import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Joiner;
@@ -85,6 +86,22 @@ public class AAISingleTransactionClient extends
}
}
+ @Override
+ public void execute(boolean dryRun) throws BulkProcessFailed {
+ final ObjectMapper mapper = new ObjectMapper();
+ if (dryRun) {
+ try {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Would execute: {}", mapper.writeValueAsString(this.request));
+ }
+ } catch (JsonProcessingException e) {
+ logger.debug("Could not format request to JSON", e);
+ }
+ } else {
+ this.execute();
+ }
+ }
+
protected Optional<String> locateErrorMessages(SingleTransactionResponse response) {
final List<String> errorMessages = new ArrayList<>();
final ObjectMapper mapper = new ObjectMapper();
@@ -111,7 +128,6 @@ public class AAISingleTransactionClient extends
}
}
-
protected SingleTransactionRequest getRequest() {
return this.request;
}
diff --git a/common/src/main/java/org/onap/so/client/aai/AAITransactionalClient.java b/common/src/main/java/org/onap/so/client/aai/AAITransactionalClient.java
index 7b7dccc999..a8cd8bae39 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAITransactionalClient.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAITransactionalClient.java
@@ -42,6 +42,7 @@ import org.onap.so.client.graphinventory.GraphInventoryPatchConverter;
import org.onap.so.client.graphinventory.GraphInventoryTransactionClient;
import org.onap.so.client.graphinventory.exceptions.BulkProcessFailed;
import org.onap.so.jsonpath.JsonPathUtil;
+import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Joiner;
@@ -109,6 +110,22 @@ public class AAITransactionalClient extends
}
}
+ @Override
+ public void execute(boolean dryRun) throws BulkProcessFailed {
+ final ObjectMapper mapper = new ObjectMapper();
+ if (dryRun) {
+ try {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Would execute: {}", mapper.writeValueAsString(this.transactions));
+ }
+ } catch (JsonProcessingException e) {
+ logger.debug("Could not format request to JSON", e);
+ }
+ } else {
+ this.execute();
+ }
+ }
+
protected Optional<String> locateErrorMessages(String response) {
final List<String> errorMessages = new ArrayList<>();
final List<String> results = JsonPathUtil.getInstance().locateResultList(response, "$..body");
diff --git a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java
index 3469d73599..8ee5ca4e80 100644
--- a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java
+++ b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java
@@ -224,6 +224,14 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
*/
public abstract void execute() throws BulkProcessFailed;
+
+ /**
+ * Executes all created transactions in A&AI, with optional dry run flag
+ *
+ * @throws BulkProcessFailed
+ */
+ public abstract void execute(boolean dryrun) throws BulkProcessFailed;
+
private Relationship buildRelationship(SingleUri uri) {
return buildRelationship(uri, Optional.empty());
}
diff --git a/common/src/main/java/org/onap/so/cloud/resource/beans/CloudInformation.java b/common/src/main/java/org/onap/so/cloud/resource/beans/CloudInformation.java
new file mode 100644
index 0000000000..c250d6637a
--- /dev/null
+++ b/common/src/main/java/org/onap/so/cloud/resource/beans/CloudInformation.java
@@ -0,0 +1,101 @@
+package org.onap.so.cloud.resource.beans;
+
+import java.io.Serializable;
+
+public class CloudInformation implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 4316532011566979075L;
+ private String owner;
+ private String regionId;
+ private String tenantId;
+ private String tenantName;
+ private String tenantContext;
+ private String templateInstanceId;
+ private String vnfName;
+ private String vnfId;
+ private String vfModuleId;
+ private NodeType nodeType;
+
+ public String getTenantContext() {
+ return tenantContext;
+ }
+
+ public void setTenantContext(String tenantContext) {
+ this.tenantContext = tenantContext;
+ }
+
+ public String getTenantId() {
+ return tenantId;
+ }
+
+ public void setTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ }
+
+ public String getTenantName() {
+ return tenantName;
+ }
+
+ public void setTenantName(String tenantName) {
+ this.tenantName = tenantName;
+ }
+
+ public String getOwner() {
+ return owner;
+ }
+
+ public void setOwner(String owner) {
+ this.owner = owner;
+ }
+
+ public String getRegionId() {
+ return regionId;
+ }
+
+ public void setRegionId(String regionId) {
+ this.regionId = regionId;
+ }
+
+ public String getTemplateInstanceId() {
+ return templateInstanceId;
+ }
+
+ public void setTemplateInstanceId(String templateInstanceId) {
+ this.templateInstanceId = templateInstanceId;
+ }
+
+ public NodeType getNodeType() {
+ return nodeType;
+ }
+
+ public void setNodeType(NodeType nodeType) {
+ this.nodeType = nodeType;
+ }
+
+ public String getVnfName() {
+ return vnfName;
+ }
+
+ public void setVnfName(String vnfName) {
+ this.vnfName = vnfName;
+ }
+
+ public String getVfModuleId() {
+ return vfModuleId;
+ }
+
+ public void setVfModuleId(String vfModuleId) {
+ this.vfModuleId = vfModuleId;
+ }
+
+ public String getVnfId() {
+ return vnfId;
+ }
+
+ public void setVnfId(String vnfId) {
+ this.vnfId = vnfId;
+ }
+}
diff --git a/common/src/main/java/org/onap/so/cloud/resource/beans/NodeType.java b/common/src/main/java/org/onap/so/cloud/resource/beans/NodeType.java
new file mode 100644
index 0000000000..2ca923c1ee
--- /dev/null
+++ b/common/src/main/java/org/onap/so/cloud/resource/beans/NodeType.java
@@ -0,0 +1,28 @@
+package org.onap.so.cloud.resource.beans;
+
+public enum NodeType {
+ BROWNFIELD("BROWNFIELD", "OVS", "bond1"), GREENFIELD("GREENFIELD", "OVS-DPDK", "bond0");
+
+ private final String nodeType;
+ private final String networkTech;
+ private final String interfaceName;
+
+ private NodeType(String s, String n, String h) {
+ this.nodeType = s;
+ this.networkTech = n;
+ this.interfaceName = h;
+ }
+
+ public String getNetworkTechnologyName() {
+ return networkTech;
+ }
+
+ public String getInterfaceName() {
+ return interfaceName;
+ }
+
+ @Override
+ public String toString() {
+ return this.nodeType;
+ }
+}
diff --git a/deployment-configs/src/main/resources/logger/logback-spring.xml b/deployment-configs/src/main/resources/logger/logback-spring.xml
index 76dbc1d1ab..0e8d0a8222 100644
--- a/deployment-configs/src/main/resources/logger/logback-spring.xml
+++ b/deployment-configs/src/main/resources/logger/logback-spring.xml
@@ -206,7 +206,7 @@
<logger name="com.woorea.openstack.connector" level="${LOG_LEVEL:-DEBUG}" />
<!-- AAF Logs go here-->
- <logger name="org.apache.catalina.core.ContainerBase" level="INFO" additivity="false">
+ <logger name="org.apache.catalina.core.ContainerBase" level="WARN" additivity="false">
<appender-ref ref="asyncCadi" />
</logger>
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java
index 76ad823f18..f586a22c45 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java
@@ -29,7 +29,7 @@ public class ProcessVnfc extends AbstractTestAction {
AAIResourcesClient aaiResourceClient = new AAIResourcesClient();
if (context.getVariable("requestAction").equals("CreateVfModuleInstance")
- && context.getVariable("serviceAction").equals("activate")) {
+ && context.getVariable("serviceAction").equals("assign")) {
AAIResourceUri vnfcURI = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, "zauk51bfrwl09oam001");
Vnfc vnfc = new Vnfc();
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStack.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStack.java
index 2c0c4aff09..cbb375ae55 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStack.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/CreateStack.java
@@ -9,7 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-CreateStack")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks", method = RequestMethod.POST)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks", method = RequestMethod.POST)
public class CreateStack extends AbstractSimulatorScenario {
@Override
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDelete.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDelete.java
index 25bb87c8bc..046829fa2f 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDelete.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/ModuleCreateDelete.java
@@ -1,17 +1,16 @@
package org.onap.so.simulator.scenarios.openstack;
+import org.onap.so.simulator.actions.aai.DeleteVServers;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.onap.so.simulator.actions.aai.DeleteVServers;
import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver;
import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario;
import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-ModuleCreateDelete")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/dummy_id/stackId")
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/dummy_id/stackId")
public class ModuleCreateDelete extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/NetworkCreateDeleteCloud.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/NetworkCreateDeleteCloud.java
index 712f377f4e..b1acd8a2ad 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/NetworkCreateDeleteCloud.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/NetworkCreateDeleteCloud.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-NetworkCreateDeleteCloud")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/network_dummy_id/stackId")
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/network_dummy_id/stackId")
public class NetworkCreateDeleteCloud extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryBaseStack.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryBaseStack.java
index 25bd563e1a..8a88dbd770 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryBaseStack.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryBaseStack.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-QueryBaseStackByName")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/base_module_id/*", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/base_module_id/*", method = RequestMethod.GET)
public class QueryBaseStack extends AbstractSimulatorScenario {
@Override
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameFailureId.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameFailureId.java
index 5659f309d1..3c95149afe 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameFailureId.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameFailureId.java
@@ -9,7 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Query-Failure-ID-Name-Resources")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/failure_id/resources", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/failure_id/resources", method = RequestMethod.GET)
public class QueryResourcesByStackNameFailureId extends AbstractSimulatorScenario {
@Override
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplace.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplace.java
index 4c3b4b628e..434eafc668 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplace.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplace.java
@@ -9,7 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Query-Replace-ID-Name-Resources")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/replace_module/resources", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/replace_module/resources", method = RequestMethod.GET)
public class QueryResourcesByStackNameModuleReplace extends AbstractSimulatorScenario {
@Override
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplaceVolume.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplaceVolume.java
index 5e4bb98926..6504cf6dc0 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplaceVolume.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryResourcesByStackNameModuleReplaceVolume.java
@@ -9,7 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Query-Replace-Volume-ID-Name-Resources")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/replace_module_volume_id/resources", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/replace_module_volume_id/resources", method = RequestMethod.GET)
public class QueryResourcesByStackNameModuleReplaceVolume extends AbstractSimulatorScenario {
@Override
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStack.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStack.java
index 8d36e567e4..ecd0c9fdba 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStack.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStack.java
@@ -1,6 +1,5 @@
package org.onap.so.simulator.scenarios.openstack;
-import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -9,7 +8,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-QueryStackByName")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/*", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/*", method = RequestMethod.GET)
public class QueryStack extends AbstractSimulatorScenario {
@Override
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdDoubleFailure.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdDoubleFailure.java
index a9f879413f..d621adb344 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdDoubleFailure.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdDoubleFailure.java
@@ -1,17 +1,16 @@
package org.onap.so.simulator.scenarios.openstack;
+import org.onap.so.simulator.actions.aai.DeleteVServers;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.onap.so.simulator.actions.aai.DeleteVServers;
import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver;
import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario;
import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Double-Failure-Stack-Endpoint")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/double_failure_id/stackId")
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/double_failure_id/stackId")
public class QueryStackByIdDoubleFailure extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdFailure.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdFailure.java
index 7f995f2930..7ecd269666 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdFailure.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdFailure.java
@@ -1,5 +1,6 @@
package org.onap.so.simulator.scenarios.openstack;
+import org.onap.so.simulator.actions.aai.DeleteVServers;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -9,7 +10,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Failure-Stack-Endpoint")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/failure_id/stackId")
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/failure_id/stackId")
public class QueryStackByIdFailure extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro1.java
index 4001d1c972..249834a8d8 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro1.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro1.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-QueryStackByID-NetworkMacro1")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_network1/*", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/macro_network1/*", method = RequestMethod.GET)
public class QueryStackByIdNetworkMacro1 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro2.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro2.java
index 55d697aa69..b3c6c7231f 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro2.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdNetworkMacro2.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-QueryStackByID-NetworkMacro2")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_network1/*", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/macro_network1/*", method = RequestMethod.GET)
public class QueryStackByIdNetworkMacro2 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModule.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModule.java
index c0302ad1eb..1291d73944 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModule.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModule.java
@@ -1,16 +1,16 @@
package org.onap.so.simulator.scenarios.openstack;
+import org.onap.so.simulator.actions.aai.DeleteVServers;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
-import org.onap.so.simulator.actions.aai.DeleteVServers;
import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver;
import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario;
import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-Replace-VF-Module-Get")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/replace_module/*")
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/replace_module/*")
public class QueryStackByIdReplaceModule extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModuleVolume.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModuleVolume.java
index 170c3105b3..926e656e30 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModuleVolume.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdReplaceModuleVolume.java
@@ -1,16 +1,16 @@
package org.onap.so.simulator.scenarios.openstack;
+import org.onap.so.simulator.actions.aai.DeleteVServers;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
-import org.onap.so.simulator.actions.aai.DeleteVServers;
import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver;
import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario;
import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-Replace-VF-Module-Volume-Get")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/replace_module_volume_id/*")
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/replace_module_volume_id/*")
public class QueryStackByIdReplaceModuleVolume extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdVolumeGroup.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdVolumeGroup.java
index 75b1ecac81..cbe842caf9 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdVolumeGroup.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/QueryStackByIdVolumeGroup.java
@@ -3,14 +3,13 @@ package org.onap.so.simulator.scenarios.openstack;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
import com.consol.citrus.endpoint.resolver.DynamicEndpointUriResolver;
import com.consol.citrus.simulator.scenario.AbstractSimulatorScenario;
import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-VolumeGroup-Interactions")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/VolumeGroup/*")
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/VolumeGroup/*")
public class QueryStackByIdVolumeGroup extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro1.java
index 9413fab7df..e13a23f397 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro1.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro1.java
@@ -9,7 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-Query-Stack-Resources-Macro1")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_module_1/resources", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/macro_module_1/resources", method = RequestMethod.GET)
public class QueryResourcesByStackNameMacro1 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro2.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro2.java
index 8708dac438..580714ded2 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro2.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro2.java
@@ -9,7 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-Query-Stack-Resources-Macro2")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_module_2/resources", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/macro_module_2/resources", method = RequestMethod.GET)
public class QueryResourcesByStackNameMacro2 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro3.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro3.java
index a30115a63a..096d2aa312 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro3.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryResourcesByStackNameMacro3.java
@@ -9,7 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-Query-Stack-Resources-Macro3")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_module_3/resources", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/macro_module_3/resources", method = RequestMethod.GET)
public class QueryResourcesByStackNameMacro3 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro1.java
index c8c81ebecf..29a9aff93c 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro1.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro1.java
@@ -14,7 +14,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
*
*/
@Scenario("Openstack-QueryStackByID-Macro1")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_module_1/*", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/macro_module_1/*", method = RequestMethod.GET)
public class QueryStackByIdMacro1 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro2.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro2.java
index aca5fe8194..15f0b611a0 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro2.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro2.java
@@ -14,7 +14,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
*
*/
@Scenario("Openstack-QueryStackByID-Macro2")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_module_2/*", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/macro_module_2/*", method = RequestMethod.GET)
public class QueryStackByIdMacro2 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro3.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro3.java
index 9fc6fafdb3..b7808dc2ff 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro3.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/macro/QueryStackByIdMacro3.java
@@ -14,7 +14,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
*
*/
@Scenario("Openstack-QueryStackByID-Macro3")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/macro_module_3/*", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/macro_module_3/*", method = RequestMethod.GET)
public class QueryStackByIdMacro3 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/nova/NovaKeyPairDelete.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/nova/NovaKeyPairDelete.java
index 32b29f2ab8..19db8aff09 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/nova/NovaKeyPairDelete.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/nova/NovaKeyPairDelete.java
@@ -8,7 +8,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Nova-Keypair-Delete")
-@RequestMapping(value = "/sim/mockPublicUrl/os-keypairs/*", method = RequestMethod.DELETE)
+@RequestMapping(value = "/sim/v1/tenantOne/os-keypairs/*", method = RequestMethod.DELETE)
public class NovaKeyPairDelete extends AbstractSimulatorScenario {
@Override
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCHAPort0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCHAPort0.java
index 682ed9f03d..3a8bc787bb 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCHAPort0.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCHAPort0.java
@@ -9,8 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("QueryNeutronNetworkSSCHAPort0")
-@RequestMapping(value = "/sim/mockPublicUrl/v2.0/ports/00bb8407-650e-48b5-b919-33b88d6f8fe3",
- method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/v2.0/ports/00bb8407-650e-48b5-b919-33b88d6f8fe3", method = RequestMethod.GET)
public class QueryNeutronNetworkSSCHAPort0 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort0.java
index 26b2e1305e..fc00452c28 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort0.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort0.java
@@ -9,8 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("QueryNeutronNetworkSSCManagementPort0")
-@RequestMapping(value = "/sim/mockPublicUrl/v2.0/ports/8d93f63e-e972-48c7-ad98-b2122da47315",
- method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/v2.0/ports/8d93f63e-e972-48c7-ad98-b2122da47315", method = RequestMethod.GET)
public class QueryNeutronNetworkSSCManagementPort0 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort1.java
index 7269e54554..96bbdc5801 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort1.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCManagementPort1.java
@@ -9,8 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("QueryNeutronNetworkSSCManagementPort1")
-@RequestMapping(value = "/sim/mockPublicUrl/v2.0/ports/07f5b14c-147a-4d14-8c94-a9e94dbc097b",
- method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/v2.0/ports/07f5b14c-147a-4d14-8c94-a9e94dbc097b", method = RequestMethod.GET)
public class QueryNeutronNetworkSSCManagementPort1 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCRole1Port0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCRole1Port0.java
index f7e677b158..69723f6284 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCRole1Port0.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCRole1Port0.java
@@ -9,8 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("QueryNeutronNetworkSSCRole1Port0")
-@RequestMapping(value = "/sim/mockPublicUrl/v2.0/ports/0594a2f2-7ea4-42eb-abc2-48ea49677fca",
- method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/v2.0/ports/0594a2f2-7ea4-42eb-abc2-48ea49677fca", method = RequestMethod.GET)
public class QueryNeutronNetworkSSCRole1Port0 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCService1Port0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCService1Port0.java
index 0e5c7fd2b6..df9c107e6f 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCService1Port0.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCService1Port0.java
@@ -9,8 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("QueryNeutronNetworkSSCservice1Port0")
-@RequestMapping(value = "/sim/mockPublicUrl/v2.0/ports/27391d94-33af-474a-927d-d409249e8fd3",
- method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/v2.0/ports/27391d94-33af-474a-927d-d409249e8fd3", method = RequestMethod.GET)
public class QueryNeutronNetworkSSCService1Port0 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCTrusted.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCTrusted.java
index 29f1df3e01..b91548cb67 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCTrusted.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryNeutronNetworkSSCTrusted.java
@@ -9,8 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("QueryNeutronNetworkSSCTrusted")
-@RequestMapping(value = "/sim/mockPublicUrl/v2.0/ports/d2f51f82-0ec2-4581-bd1a-d2a82073e52b",
- method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/v2.0/ports/d2f51f82-0ec2-4581-bd1a-d2a82073e52b", method = RequestMethod.GET)
public class QueryNeutronNetworkSSCTrusted extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsRole1Sub1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsRole1Sub1.java
index d9331e7e1a..0fb0b3a8d4 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsRole1Sub1.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsRole1Sub1.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Query-Resource-Details-Role1-Sub0")
@RequestMapping(
- value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources",
+ value = "/sim/v1/tenantOne/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources",
method = RequestMethod.GET)
public class QueryResourceDetailsRole1Sub1 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub0.java
index 9c42e489ee..b7e72ebb4b 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub0.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub0.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Query-Resource-Details-service1-Sub0")
@RequestMapping(
- value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb/resources",
+ value = "/sim/v1/tenantOne/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb/resources",
method = RequestMethod.GET)
public class QueryResourceDetailsService1Sub0 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub1.java
index 691879cfc8..cdf2f6b17b 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub1.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub1.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Query-Resource-Details-service1-Sub1")
@RequestMapping(
- value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a/resources",
+ value = "/sim/v1/tenantOne/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a/resources",
method = RequestMethod.GET)
public class QueryResourceDetailsService1Sub1 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub2.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub2.java
index 33b450a08c..d50191f0d7 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub2.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourceDetailsService1Sub2.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Query-Resource-Details-service1-Sub2")
@RequestMapping(
- value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c/resources",
+ value = "/sim/v1/tenantOne/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c/resources",
method = RequestMethod.GET)
public class QueryResourceDetailsService1Sub2 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByBaseStackName.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByBaseStackName.java
index 6dbd898154..b590966e2f 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByBaseStackName.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByBaseStackName.java
@@ -9,7 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-Query-Base-Stack-Resources")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/base_module_id/resources", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/base_module_id/resources", method = RequestMethod.GET)
public class QueryResourcesByBaseStackName extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByStackName.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByStackName.java
index aff4d924e2..82b1af484f 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByStackName.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryResourcesByStackName.java
@@ -9,7 +9,7 @@ import com.consol.citrus.simulator.scenario.Scenario;
import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Openstack-Query-Stack-Resources")
-@RequestMapping(value = "/sim/mockPublicUrl/stacks/dummy_id/resources", method = RequestMethod.GET)
+@RequestMapping(value = "/sim/v1/tenantOne/stacks/dummy_id/resources", method = RequestMethod.GET)
public class QueryResourcesByStackName extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryRole1StackResources.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryRole1StackResources.java
index 5372d2ad78..550d59d58e 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryRole1StackResources.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryRole1StackResources.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("QueryRole1StackResources-tsbc0005vm002ssc001")
@RequestMapping(
- value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst/447a9b41-714e-434b-b1d0-6cce8d9f0f0c/resources",
+ value = "/sim/v1/tenantOne/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst/447a9b41-714e-434b-b1d0-6cce8d9f0f0c/resources",
method = RequestMethod.GET)
public class QueryRole1StackResources extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryService1StackResources.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryService1StackResources.java
index 60a5ad8964..404689a3c5 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryService1StackResources.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryService1StackResources.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("QueryService1StackResources-tsbc0005vm002ssc001")
@RequestMapping(
- value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672/resources",
+ value = "/sim/v1/tenantOne/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672/resources",
method = RequestMethod.GET)
public class QueryService1StackResources extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsRole1Sub0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsRole1Sub0.java
index 068bc26072..aaa0a71afe 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsRole1Sub0.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsRole1Sub0.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Query-Stack-Details-Role1-Sub0")
@RequestMapping(
- value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ value = "/v1/tenantOne/stacks/tsbc0005vm002ssc001-ssc_1_subint_role1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
method = RequestMethod.GET)
public class QueryStackDetailsRole1Sub0 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub0.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub0.java
index 22fb263d5b..543f51c44d 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub0.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub0.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Query-Stack-Details-service1-Sub0")
@RequestMapping(
- value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a",
+ value = "/sim/v1/tenantOne/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a",
method = RequestMethod.GET)
public class QueryStackDetailsService1Sub0 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub1.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub1.java
index 16688ffae8..31e5e4251b 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub1.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub1.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Query-Stack-Details-service1-Sub1")
@RequestMapping(
- value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb",
+ value = "/sim/v1/tenantOne/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb",
method = RequestMethod.GET)
public class QueryStackDetailsService1Sub1 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub2.java b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub2.java
index 53bf966421..10c7b8693b 100644
--- a/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub2.java
+++ b/so-simulator/src/main/java/org/onap/so/simulator/scenarios/openstack/resources/QueryStackDetailsService1Sub2.java
@@ -10,7 +10,7 @@ import com.consol.citrus.simulator.scenario.ScenarioDesigner;
@Scenario("Query-Stack-Details-service1-Sub2")
@RequestMapping(
- value = "/sim/mockPublicUrl/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c",
+ value = "/sim/v1/tenantOne/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c",
method = RequestMethod.GET)
public class QueryStackDetailsService1Sub2 extends AbstractSimulatorScenario {
diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetFlavor1.json b/so-simulator/src/main/resources/openstack/gr_api/GetFlavor1.json
new file mode 100644
index 0000000000..6de27a20ac
--- /dev/null
+++ b/so-simulator/src/main/resources/openstack/gr_api/GetFlavor1.json
@@ -0,0 +1,22 @@
+{
+ "flavor" : {
+ "links" : [ {
+ "rel" : "self",
+ "href" : "http://some.test.host.com:8774/v2/f340218174564e59898c2e38c67d80b0/flavors/053ea2e2-533f-46c3-a902-1bc76e93e5c1"
+ }, {
+ "rel" : "bookmark",
+ "href" : "http://some.test.host.com:8774/f340218174564e59898c2e38c67d80b0/flavors/053ea2e2-533f-46c3-a902-1bc76e93e5c1"
+ } ],
+ "public" : true,
+ "id" : "053ea2e2-533f-46c3-a902-1bc76e93e5c1",
+ "name" : "gv.c8r16d60e200",
+ "vcpus" : 8,
+ "ram" : 16384,
+ "disk" : 60,
+ "OS-FLV-EXT-DATA:ephemeral" : 200,
+ "swap" : "",
+ "rxtx_factor" : 1.0,
+ "OS-FLV-DISABLED:disabled" : false,
+ "os-flavor-access:is_public" : true
+ }
+}
diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetImage.json b/so-simulator/src/main/resources/openstack/gr_api/GetImage.json
new file mode 100644
index 0000000000..fddc30cc5a
--- /dev/null
+++ b/so-simulator/src/main/resources/openstack/gr_api/GetImage.json
@@ -0,0 +1,31 @@
+{
+ "name" : "BVOIP_JUNIPER-SPACE_19.4R1.4.qcow2",
+ "size" : 5863833600,
+ "status" : "active",
+ "properties" : { },
+ "deleted" : false,
+ "public" : false,
+ "protected" : true,
+ "id" : "9fb132a5-599c-4de8-a8fc-16964692b381",
+ "disk_format" : "qcow2",
+ "container_format" : "bare",
+ "checksum" : "073f0a9e5780dce6ddb2b385f518d634",
+ "created_at" : "2020-02-06T13:28:26Z",
+ "updated_at" : "2020-02-06T14:35:27Z",
+ "is_public" : false,
+ "min_ram" : 0,
+ "min_disk" : 0,
+ "owner" : "ed4e552bc2e24f1e82d0359ba66c735e",
+ "visibility" : "private",
+ "file" : "/v2/images/9fb132a5-599c-4de8-a8fc-16964692b381/file",
+ "schema" : "/v2/schemas/image",
+ "self" : "/v2/images/9fb132a5-599c-4de8-a8fc-16964692b381",
+ "post_processing_networking" : "None",
+ "post_processing_tools" : "None",
+ "application_name" : "JUNIPER-SPACE",
+ "application_type" : "JUNIPER-SPACE",
+ "application_version" : "19.4R1.4",
+ "application_vendor" : "Juniper",
+ "description" : "Source = BVOIP_JUNIPER-SPACE_19.4R1.4.qcow2",
+ "tags" : [ ]
+ } \ No newline at end of file