summaryrefslogtreecommitdiffstats
path: root/controlloop/common/rules-test/src/main
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2022-11-04 11:53:50 -0500
committerjhh <jorge.hernandez-herrero@att.com>2022-11-04 12:00:26 -0500
commit4b5cbc8b1bc57316dd1cad554fad98235d361053 (patch)
tree3fcb735f5e5700858f0494c41282cf67758b0701 /controlloop/common/rules-test/src/main
parent427669c39ca10bf2d1343d7f5dc2c39ad9ca3b23 (diff)
Support A1 PMS Actor for SON use case
Issue-ID: POLICY-4444 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I1811b79513616aab813b6d97823d6c1d2bbbee47 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'controlloop/common/rules-test/src/main')
-rw-r--r--controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java24
-rw-r--r--controlloop/common/rules-test/src/main/resources/vsonh/v5G.son.A1.sdnr.success.json2
2 files changed, 17 insertions, 9 deletions
diff --git a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java
index 2b81fda7d..d2fe57f8f 100644
--- a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java
+++ b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java
@@ -72,6 +72,8 @@ public abstract class BaseTest {
protected static final String APPC_CL_TOPIC = "APPC-CL";
protected static final String SDNR_CL_TOPIC = "SDNR-CL";
protected static final String SDNR_CL_RSP_TOPIC = "SDNR-CL-RSP";
+ protected static final String A1P_CL_TOPIC = "A1-P";
+ protected static final String A1P_CL_RSP_TOPIC = "A1-P-RSP";
/*
* Constants for each test case.
@@ -129,7 +131,7 @@ public abstract class BaseTest {
private static final String V5G_SON_A1_TOSCA_POLICY = "policies/v5gSonA1.policy.operational.input.tosca.json";
private static final String V5G_SON_A1_ONSET = "vsonh/v5G.son.A1.onset.json";
private static final String V5G_SON_A1_SDNR_SUCCESS = "vsonh/v5G.son.A1.sdnr.success.json";
- private static final String MODIFY_A1_POLICY_OPERATION = "ModifyA1Policy";
+ private static final String PUT_A1_POLICY_OPERATION = "PutA1Policy";
/*
* Coders used to decode requests and responses.
*/
@@ -367,7 +369,8 @@ public abstract class BaseTest {
*/
@Test
public void testVpciSunnyDayCompliant() {
- sdnrSunnyDay(VPCI_TOSCA_COMPLIANT_POLICY, VPCI_ONSET, VPCI_SDNR_SUCCESS, SDNR_MODIFY_CONFIG_OP);
+ sdnrSunnyDay(VPCI_TOSCA_COMPLIANT_POLICY, VPCI_ONSET, VPCI_SDNR_SUCCESS,
+ SDNR_MODIFY_CONFIG_OP, SDNR_CL_TOPIC, SDNR_CL_RSP_TOPIC);
}
// VSONH
@@ -377,7 +380,8 @@ public abstract class BaseTest {
*/
@Test
public void testVsonhSunnyDayCompliant() {
- sdnrSunnyDay(VSONH_TOSCA_COMPLIANT_POLICY, VSONH_ONSET, VSONH_SDNR_SUCCESS, SNDR_MODIFY_CONFIG_ANR_OP);
+ sdnrSunnyDay(VSONH_TOSCA_COMPLIANT_POLICY, VSONH_ONSET, VSONH_SDNR_SUCCESS,
+ SNDR_MODIFY_CONFIG_ANR_OP, SDNR_CL_TOPIC, SDNR_CL_RSP_TOPIC);
}
/**
@@ -385,7 +389,8 @@ public abstract class BaseTest {
*/
@Test
public void test5gSonO1SunnyDayCompliant() {
- sdnrSunnyDay(V5G_SON_O1_TOSCA_POLICY, V5G_SON_O1_ONSET, V5G_SON_O1_SDNR_SUCCESS, MODIFY_O1_CONFIG_OPERATION);
+ sdnrSunnyDay(V5G_SON_O1_TOSCA_POLICY, V5G_SON_O1_ONSET, V5G_SON_O1_SDNR_SUCCESS,
+ MODIFY_O1_CONFIG_OPERATION, SDNR_CL_TOPIC, SDNR_CL_RSP_TOPIC);
}
/**
@@ -393,7 +398,8 @@ public abstract class BaseTest {
*/
@Test
public void test5gSonA1SunnyDayCompliant() {
- sdnrSunnyDay(V5G_SON_A1_TOSCA_POLICY, V5G_SON_A1_ONSET, V5G_SON_A1_SDNR_SUCCESS, MODIFY_A1_POLICY_OPERATION);
+ sdnrSunnyDay(V5G_SON_A1_TOSCA_POLICY, V5G_SON_A1_ONSET, V5G_SON_A1_SDNR_SUCCESS,
+ PUT_A1_POLICY_OPERATION, A1P_CL_TOPIC, A1P_CL_RSP_TOPIC);
}
/**
@@ -572,9 +578,11 @@ public abstract class BaseTest {
* @param onsetFile file containing the ONSET to be injected
* @param operation expected SDNR operation request
*/
- protected void sdnrSunnyDay(String policyFile, String onsetFile, String successFile, String operation) {
+ protected void sdnrSunnyDay(String policyFile, String onsetFile,
+ String successFile, String operation,
+ String requestTopic, String responseTopic) {
policyClMgt = createNoficationTopicListener();
- sdnrClSink = topics.createListener(SDNR_CL_TOPIC, PciMessage.class, SDNR_CODER);
+ sdnrClSink = topics.createListener(requestTopic, PciMessage.class, SDNR_CODER);
policy = checkPolicy(policyFile);
@@ -592,7 +600,7 @@ public abstract class BaseTest {
/*
* Inject response.
*/
- topics.inject(SDNR_CL_RSP_TOPIC, successFile, pcireq.getBody().getInput().getCommonHeader().getSubRequestId());
+ topics.inject(responseTopic, successFile, pcireq.getBody().getInput().getCommonHeader().getSubRequestId());
/* --- Operation Completed --- */
diff --git a/controlloop/common/rules-test/src/main/resources/vsonh/v5G.son.A1.sdnr.success.json b/controlloop/common/rules-test/src/main/resources/vsonh/v5G.son.A1.sdnr.success.json
index 12cfbc626..186241f5a 100644
--- a/controlloop/common/rules-test/src/main/resources/vsonh/v5G.son.A1.sdnr.success.json
+++ b/controlloop/common/rules-test/src/main/resources/vsonh/v5G.son.A1.sdnr.success.json
@@ -17,7 +17,7 @@
}
},
"version": "1.0",
- "rpc-name": "ModifyA1Policy",
+ "rpc-name": "puta1policy",
"correlation-id": "82feb01e-4f3e-40e2-b8df-683adabae893",
"type": "response"
}