summaryrefslogtreecommitdiffstats
path: root/controlloop/templates/template.demo.v1.0.0
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/templates/template.demo.v1.0.0')
-rw-r--r--controlloop/templates/template.demo.v1.0.0/template.demo/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl84
-rw-r--r--controlloop/templates/template.demo.v1.0.0/template.demo/src/test/java/org/onap/policy/template/demo/TestFirewallDemo.java2
-rw-r--r--controlloop/templates/template.demo.v1.0.0/template.demo/src/test/java/org/onap/policy/template/demo/TestSO.java (renamed from controlloop/templates/template.demo.v1.0.0/template.demo/src/test/java/org/onap/policy/template/demo/TestMSO.java)50
3 files changed, 68 insertions, 68 deletions
diff --git a/controlloop/templates/template.demo.v1.0.0/template.demo/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl b/controlloop/templates/template.demo.v1.0.0/template.demo/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl
index 2f1155e56..493c8581c 100644
--- a/controlloop/templates/template.demo.v1.0.0/template.demo/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl
+++ b/controlloop/templates/template.demo.v1.0.0/template.demo/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl
@@ -66,17 +66,17 @@ import org.onap.policy.vnf.trafficgenerator.PGRequest;
import org.onap.policy.vnf.trafficgenerator.PGStream;
import org.onap.policy.vnf.trafficgenerator.PGStreams;
-import org.onap.policy.mso.MSOManager;
-import org.onap.policy.mso.MSORequest;
-import org.onap.policy.mso.MSORequestStatus;
-import org.onap.policy.mso.MSORequestDetails;
-import org.onap.policy.mso.MSOModelInfo;
-import org.onap.policy.mso.MSOCloudConfiguration;
-import org.onap.policy.mso.MSORequestInfo;
-import org.onap.policy.mso.MSORequestParameters;
-import org.onap.policy.mso.MSORelatedInstanceListElement;
-import org.onap.policy.mso.MSORelatedInstance;
-import org.onap.policy.mso.MSOResponse;
+import org.onap.policy.mso.SOManager;
+import org.onap.policy.mso.SORequest;
+import org.onap.policy.mso.SORequestStatus;
+import org.onap.policy.mso.SORequestDetails;
+import org.onap.policy.mso.SOModelInfo;
+import org.onap.policy.mso.SOCloudConfiguration;
+import org.onap.policy.mso.SORequestInfo;
+import org.onap.policy.mso.SORequestParameters;
+import org.onap.policy.mso.SORelatedInstanceListElement;
+import org.onap.policy.mso.SORelatedInstance;
+import org.onap.policy.mso.SOResponse;
//
@@ -638,7 +638,7 @@ end
/*
*
-* This rule happens when we got a valid AAI response. We can start sending request to APPC or MSO now.
+* This rule happens when we got a valid AAI response. We can start sending request to APPC or SO now.
*
*/
rule "${policyName}.EVENT.MANAGER.AAINQF199RESPONSE"
@@ -880,7 +880,7 @@ rule "${policyName}.EVENT.MANAGER.AAINQF199RESPONSE"
}
}
break;
- case "MSO":
+ case "SO":
{
//
// Construct an operation
@@ -894,14 +894,14 @@ rule "${policyName}.EVENT.MANAGER.AAINQF199RESPONSE"
//
ControlLoopOperationWrapper operationWrapper = new ControlLoopOperationWrapper($event.requestID, operation);
//
- // Construct an MSO request
+ // Construct an SO request
//
- MSORequest request = new MSORequest();
- request.requestDetails = new MSORequestDetails();
- request.requestDetails.modelInfo = new MSOModelInfo();
- request.requestDetails.cloudConfiguration = new MSOCloudConfiguration();
- request.requestDetails.requestInfo = new MSORequestInfo();
- request.requestDetails.requestParameters = new MSORequestParameters();
+ SORequest request = new SORequest();
+ request.requestDetails = new SORequestDetails();
+ request.requestDetails.modelInfo = new SOModelInfo();
+ request.requestDetails.cloudConfiguration = new SOCloudConfiguration();
+ request.requestDetails.requestInfo = new SORequestInfo();
+ request.requestDetails.requestParameters = new SORequestParameters();
request.requestDetails.requestParameters.userParams = null;
//
// cloudConfiguration
@@ -925,13 +925,13 @@ rule "${policyName}.EVENT.MANAGER.AAINQF199RESPONSE"
//
// relatedInstanceList
//
- MSORelatedInstanceListElement relatedInstanceListElement1 = new MSORelatedInstanceListElement();
- MSORelatedInstanceListElement relatedInstanceListElement2 = new MSORelatedInstanceListElement();
- relatedInstanceListElement1.relatedInstance = new MSORelatedInstance();
- relatedInstanceListElement2.relatedInstance = new MSORelatedInstance();
+ SORelatedInstanceListElement relatedInstanceListElement1 = new SORelatedInstanceListElement();
+ SORelatedInstanceListElement relatedInstanceListElement2 = new SORelatedInstanceListElement();
+ relatedInstanceListElement1.relatedInstance = new SORelatedInstance();
+ relatedInstanceListElement2.relatedInstance = new SORelatedInstance();
//
relatedInstanceListElement1.relatedInstance.instanceId = serviceItemServiceInstanceId;
- relatedInstanceListElement1.relatedInstance.modelInfo = new MSOModelInfo();
+ relatedInstanceListElement1.relatedInstance.modelInfo = new SOModelInfo();
relatedInstanceListElement1.relatedInstance.modelInfo.modelType = "service";
relatedInstanceListElement1.relatedInstance.modelInfo.modelInvariantId = serviceItemPersonaModelId;
relatedInstanceListElement1.relatedInstance.modelInfo.modelNameVersionId = serviceItemModelNameVersionId;
@@ -939,7 +939,7 @@ rule "${policyName}.EVENT.MANAGER.AAINQF199RESPONSE"
relatedInstanceListElement1.relatedInstance.modelInfo.modelVersion = serviceItemModelVersion;
//
relatedInstanceListElement2.relatedInstance.instanceId = vnfItemVnfId;
- relatedInstanceListElement2.relatedInstance.modelInfo = new MSOModelInfo();
+ relatedInstanceListElement2.relatedInstance.modelInfo = new SOModelInfo();
relatedInstanceListElement2.relatedInstance.modelInfo.modelType = "vnf";
relatedInstanceListElement2.relatedInstance.modelInfo.modelInvariantId = vnfItemPersonaModelId;
relatedInstanceListElement2.relatedInstance.modelInfo.modelNameVersionId = vnfItemModelNameVersionId;
@@ -950,9 +950,9 @@ rule "${policyName}.EVENT.MANAGER.AAINQF199RESPONSE"
request.requestDetails.relatedInstanceList.add(relatedInstanceListElement1);
request.requestDetails.relatedInstanceList.add(relatedInstanceListElement2);
//
- // print MSO request for debug
+ // print SO request for debug
//
- System.out.println("MSO request sent:");
+ System.out.println("SO request sent:");
System.out.println(Serialization.gsonPretty.toJson(request));
//
//
@@ -977,22 +977,22 @@ rule "${policyName}.EVENT.MANAGER.AAINQF199RESPONSE"
//
// Concatenate serviceItemServiceInstanceId and vnfItemVnfId to msoURL
//
- String MSOUrl = $params.getMsoURL() + "/serviceInstances/v2/" + serviceItemServiceInstanceId + "/vnfs/" + vnfItemVnfId + "/vfModules";
+ String SOUrl = $params.getMsoURL() + "/serviceInstances/v2/" + serviceItemServiceInstanceId + "/vnfs/" + vnfItemVnfId + "/vfModules";
//
- // Call MSO
+ // Call SO
//
- MSOResponse response = MSOManager.createModuleInstance(MSOUrl, $params.getMsoURL(), $params.getMsoUsername(), $params.getMsoPassword(), request);
+ SOResponse response = SOManager.createModuleInstance(SOUrl, $params.getMsoURL(), $params.getMsoUsername(), $params.getMsoPassword(), request);
//////////////////////////////////////////////////////////
- // Simulate a valid MSOResponse for junit test
+ // Simulate a valid SOResponse for junit test
// Remove this for real deployment
//
- response = new MSOResponse();
- response.request = new MSORequest();
- response.request.requestStatus = new MSORequestStatus();
+ response = new SOResponse();
+ response.request = new SORequest();
+ response.request.requestStatus = new SORequestStatus();
response.request.requestStatus.requestState = "COMPLETE";
//////////////////////////////////////////////////////////
@@ -1014,7 +1014,7 @@ rule "${policyName}.EVENT.MANAGER.AAINQF199RESPONSE"
insert(response);
} else {
//
- // MSO request not even accepted
+ // SO request not even accepted
//
notification.message = operationWrapper.operation.toMessage();
operationWrapper.operation.message = operationWrapper.operation.toMessage();
@@ -1047,7 +1047,7 @@ rule "${policyName}.EVENT.MANAGER.AAINQF199RESPONSE"
retract($manager);
}
} else {
- System.err.println("constructed MSO request is invalid.");
+ System.err.println("constructed SO request is invalid.");
}
}
break;
@@ -1199,19 +1199,19 @@ end
/*
*
-* This rule responds to MSO Response Events
+* This rule responds to SO Response Events
*
*/
-rule "${policyName}.MSO.RESPONSE"
+rule "${policyName}.SO.RESPONSE"
when
$params : Params( getClosedLoopControlName() == "${closedLoopControlName}" )
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
$manager : ControlLoopEventManager( closedLoopControlName == $event.closedLoopControlName )
$operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )
- $request : MSORequest( requestId == $event.requestID.toString() )
- $response : MSOResponse( request.requestId == $event.requestID.toString() )
+ $request : SORequest( requestId == $event.requestID.toString() )
+ $response : SOResponse( request.requestId == $event.requestID.toString() )
then
- System.out.println("rule MSO.RESPONSE is triggered.");
+ System.out.println("rule SO.RESPONSE is triggered.");
//
// Construct notification
//
diff --git a/controlloop/templates/template.demo.v1.0.0/template.demo/src/test/java/org/onap/policy/template/demo/TestFirewallDemo.java b/controlloop/templates/template.demo.v1.0.0/template.demo/src/test/java/org/onap/policy/template/demo/TestFirewallDemo.java
index 2cfead157..825c69b50 100644
--- a/controlloop/templates/template.demo.v1.0.0/template.demo/src/test/java/org/onap/policy/template/demo/TestFirewallDemo.java
+++ b/controlloop/templates/template.demo.v1.0.0/template.demo/src/test/java/org/onap/policy/template/demo/TestFirewallDemo.java
@@ -68,7 +68,7 @@ public class TestFirewallDemo {
"type=operational",
"myFirewallDemoPolicy",
"v1.0",
- "MSO",
+ "SO",
"http://localhost:8080/TestREST/Test",
"POLICY",
"POLICY",
diff --git a/controlloop/templates/template.demo.v1.0.0/template.demo/src/test/java/org/onap/policy/template/demo/TestMSO.java b/controlloop/templates/template.demo.v1.0.0/template.demo/src/test/java/org/onap/policy/template/demo/TestSO.java
index fab0961c5..6f79c6a74 100644
--- a/controlloop/templates/template.demo.v1.0.0/template.demo/src/test/java/org/onap/policy/template/demo/TestMSO.java
+++ b/controlloop/templates/template.demo.v1.0.0/template.demo/src/test/java/org/onap/policy/template/demo/TestSO.java
@@ -25,14 +25,14 @@ import java.io.FileReader;
import java.util.UUID;
import org.junit.Test;
-import org.onap.policy.mso.MSOCloudConfiguration;
-import org.onap.policy.mso.MSOModelInfo;
-import org.onap.policy.mso.MSORelatedInstance;
-import org.onap.policy.mso.MSORelatedInstanceListElement;
-import org.onap.policy.mso.MSORequest;
-import org.onap.policy.mso.MSORequestDetails;
-import org.onap.policy.mso.MSORequestInfo;
-import org.onap.policy.mso.MSORequestParameters;
+import org.onap.policy.mso.SOCloudConfiguration;
+import org.onap.policy.mso.SOModelInfo;
+import org.onap.policy.mso.SORelatedInstance;
+import org.onap.policy.mso.SORelatedInstanceListElement;
+import org.onap.policy.mso.SORequest;
+import org.onap.policy.mso.SORequestDetails;
+import org.onap.policy.mso.SORequestInfo;
+import org.onap.policy.mso.SORequestParameters;
import org.onap.policy.aai.AAINQF199.AAINQF199Response;
import org.onap.policy.aai.AAINQF199.AAINQF199ResponseWrapper;
import org.onap.policy.mso.util.Serialization;
@@ -42,9 +42,9 @@ import org.slf4j.LoggerFactory;
import com.google.gson.Gson;
import com.google.gson.stream.JsonReader;
-public class TestMSO {
+public class TestSO {
- private static final Logger logger = LoggerFactory.getLogger(TestMSO.class);
+ private static final Logger logger = LoggerFactory.getLogger(TestSO.class);
@Test
public void test() throws FileNotFoundException {
@@ -98,14 +98,14 @@ public class TestMSO {
String cloudRegionItemCloudRegionId = aainqf199ResponseWrapper.aainqf199response.inventoryResponseItems.get(0).items.inventoryResponseItems.get(1).items.inventoryResponseItems.get(0).cloudRegion.cloudRegionId;
//
- // Construct an MSO request
+ // Construct an SO request
//
- MSORequest request = new MSORequest();
- request.requestDetails = new MSORequestDetails();
- request.requestDetails.modelInfo = new MSOModelInfo();
- request.requestDetails.cloudConfiguration = new MSOCloudConfiguration();
- request.requestDetails.requestInfo = new MSORequestInfo();
- request.requestDetails.requestParameters = new MSORequestParameters();
+ SORequest request = new SORequest();
+ request.requestDetails = new SORequestDetails();
+ request.requestDetails.modelInfo = new SOModelInfo();
+ request.requestDetails.cloudConfiguration = new SOCloudConfiguration();
+ request.requestDetails.requestInfo = new SORequestInfo();
+ request.requestDetails.requestParameters = new SORequestParameters();
request.requestDetails.requestParameters.userParams = null;
//
// cloudConfiguration
@@ -129,13 +129,13 @@ public class TestMSO {
//
// relatedInstanceList
//
- MSORelatedInstanceListElement relatedInstanceListElement1 = new MSORelatedInstanceListElement();
- MSORelatedInstanceListElement relatedInstanceListElement2 = new MSORelatedInstanceListElement();
- relatedInstanceListElement1.relatedInstance = new MSORelatedInstance();
- relatedInstanceListElement2.relatedInstance = new MSORelatedInstance();
+ SORelatedInstanceListElement relatedInstanceListElement1 = new SORelatedInstanceListElement();
+ SORelatedInstanceListElement relatedInstanceListElement2 = new SORelatedInstanceListElement();
+ relatedInstanceListElement1.relatedInstance = new SORelatedInstance();
+ relatedInstanceListElement2.relatedInstance = new SORelatedInstance();
//
relatedInstanceListElement1.relatedInstance.instanceId = serviceItemServiceInstanceId;
- relatedInstanceListElement1.relatedInstance.modelInfo = new MSOModelInfo();
+ relatedInstanceListElement1.relatedInstance.modelInfo = new SOModelInfo();
relatedInstanceListElement1.relatedInstance.modelInfo.modelType = "service";
relatedInstanceListElement1.relatedInstance.modelInfo.modelInvariantId = serviceItemPersonaModelId;
relatedInstanceListElement1.relatedInstance.modelInfo.modelNameVersionId = serviceItemModelNameVersionId;
@@ -143,7 +143,7 @@ public class TestMSO {
relatedInstanceListElement1.relatedInstance.modelInfo.modelVersion = serviceItemModelVersion;
//
relatedInstanceListElement2.relatedInstance.instanceId = vnfItemVnfId;
- relatedInstanceListElement2.relatedInstance.modelInfo = new MSOModelInfo();
+ relatedInstanceListElement2.relatedInstance.modelInfo = new SOModelInfo();
relatedInstanceListElement2.relatedInstance.modelInfo.modelType = "vnf";
relatedInstanceListElement2.relatedInstance.modelInfo.modelInvariantId = vnfItemPersonaModelId;
relatedInstanceListElement2.relatedInstance.modelInfo.modelNameVersionId = vnfItemModelNameVersionId;
@@ -154,9 +154,9 @@ public class TestMSO {
request.requestDetails.relatedInstanceList.add(relatedInstanceListElement1);
request.requestDetails.relatedInstanceList.add(relatedInstanceListElement2);
//
- // print MSO request for debug
+ // print SO request for debug
//
- logger.debug("MSO request sent:");
+ logger.debug("SO request sent:");
logger.debug(Serialization.gsonPretty.toJson(request));
}