summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java27
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java75
2 files changed, 99 insertions, 3 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
index 9bbe94a077..7478479a86 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
@@ -39,6 +39,9 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
+/**
+ * This class is used for quering the SDNC
+ */
@Component
public class SDNCQueryTasks {
private static final Logger logger = LoggerFactory.getLogger(SDNCQueryTasks.class);
@@ -53,6 +56,14 @@ public class SDNCQueryTasks {
@Autowired
private ExtractPojosForBB extractPojosForBB;
+ /**
+ * BPMN access method to query the SDNC for fetching the vnf details.
+ *
+ * It will get the vnf details according to service instance id.
+ *
+ * @param execution
+ * @throws Exception
+ */
public void queryVnf(BuildingBlockExecution execution) throws Exception {
ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
@@ -77,7 +88,14 @@ public class SDNCQueryTasks {
}
}
-
+ /**
+ * BPMN access method to query the SDNC for fetching the VfModule details.
+ *
+ * It will get the vnf details according to service instance id, vnf id & Vf module id.
+ *
+ * @param execution
+ * @throws Exception
+ */
public void queryVfModule(BuildingBlockExecution execution) throws Exception {
ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
@@ -108,6 +126,13 @@ public class SDNCQueryTasks {
}
}
+ /**
+ * BPMN access method to query the SDNC for fetching the VfModuleForVolumeGroup details.
+ *
+ * It will get the vnf details according to Vf module id.
+ *
+ * @param execution @throws
+ */
public void queryVfModuleForVolumeGroup(BuildingBlockExecution execution) {
try {
VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java
index 12aae1e6a6..6434bfb176 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java
@@ -50,6 +50,17 @@ public class SDNCVnfResources {
@Autowired
private SDNCClient sdncClient;
+ /**
+ * This method is used for setting the SDNCSvcAction for assignVnf .
+ *
+ * @param vnf
+ * @param serviceInstance
+ * @param customer
+ * @param cloudRegion
+ * @param requestContext
+ * @param homing
+ * @return
+ */
public GenericResourceApiVnfOperationInformation assignVnf(GenericVnf vnf, ServiceInstance serviceInstance,
Customer customer, CloudRegion cloudRegion, RequestContext requestContext, boolean homing,
URI callbackURI) {
@@ -58,6 +69,17 @@ public class SDNCVnfResources {
cloudRegion, requestContext, homing, callbackURI);
}
+ /**
+ * This method is used for setting the SDNCSvcAction for activate vnf.
+ *
+ * @param vnf
+ * @param serviceInstance
+ * @param customer
+ * @param cloudRegion
+ * @param requestContext
+ * @param homing
+ * @return
+ */
public GenericResourceApiVnfOperationInformation activateVnf(GenericVnf vnf, ServiceInstance serviceInstance,
Customer customer, CloudRegion cloudRegion, RequestContext requestContext, URI callbackURI) {
return sdncRM.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.ACTIVATE,
@@ -65,7 +87,17 @@ public class SDNCVnfResources {
cloudRegion, requestContext, false, callbackURI);
}
-
+ /**
+ * This method is used for setting the SDNCSvcAction for deactivate vnf.
+ *
+ * @param vnf
+ * @param serviceInstance
+ * @param customer
+ * @param cloudRegion
+ * @param requestContext
+ * @param homing
+ * @return
+ */
public GenericResourceApiVnfOperationInformation deactivateVnf(GenericVnf vnf, ServiceInstance serviceInstance,
Customer customer, CloudRegion cloudRegion, RequestContext requestContext, URI callbackURI) {
return sdncRM.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.DEACTIVATE,
@@ -73,7 +105,17 @@ public class SDNCVnfResources {
cloudRegion, requestContext, false, callbackURI);
}
-
+ /**
+ * This method is used for setting the SDNCSvcAction for unassign vnf.
+ *
+ * @param vnf
+ * @param serviceInstance
+ * @param customer
+ * @param cloudRegion
+ * @param requestContext
+ * @param homing
+ * @return
+ */
public GenericResourceApiVnfOperationInformation unassignVnf(GenericVnf vnf, ServiceInstance serviceInstance,
Customer customer, CloudRegion cloudRegion, RequestContext requestContext, URI callbackURI) {
return sdncRM.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.UNASSIGN,
@@ -81,6 +123,17 @@ public class SDNCVnfResources {
cloudRegion, requestContext, false, callbackURI);
}
+ /**
+ * This method is used for setting the SDNCSvcAction for delete vnf.
+ *
+ * @param vnf
+ * @param serviceInstance
+ * @param customer
+ * @param cloudRegion
+ * @param requestContext
+ * @param homing
+ * @return
+ */
public GenericResourceApiVnfOperationInformation deleteVnf(GenericVnf vnf, ServiceInstance serviceInstance,
Customer customer, CloudRegion cloudRegion, RequestContext requestContext, URI callbackURI) {
return sdncRM.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.DEACTIVATE,
@@ -88,6 +141,17 @@ public class SDNCVnfResources {
cloudRegion, requestContext, false, callbackURI);
}
+ /**
+ * This method is used for setting the SDNCSvcAction for changeModelVnf.
+ *
+ * @param vnf
+ * @param serviceInstance
+ * @param customer
+ * @param cloudRegion
+ * @param requestContext
+ * @param homing
+ * @return
+ */
public GenericResourceApiVnfOperationInformation changeModelVnf(GenericVnf vnf, ServiceInstance serviceInstance,
Customer customer, CloudRegion cloudRegion, RequestContext requestContext, URI callbackURI) {
return sdncRM.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.CHANGE_ASSIGN,
@@ -95,6 +159,13 @@ public class SDNCVnfResources {
cloudRegion, requestContext, false, callbackURI);
}
+ /**
+ * This method is used for querying SDNC client for getting the vnf details.
+ *
+ * @param vnf
+ * @exception MapperException & BadResponseException
+ * @return
+ */
public String queryVnf(GenericVnf vnf) throws MapperException, BadResponseException {
String queryPath = vnf.getSelflink();
return sdncClient.get(queryPath);