aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dcaegen2-services-pmsh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dcaegen2-services-pmsh')
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json16
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json14
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json14
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json15
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json39
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/pmsh.robot21
6 files changed, 48 insertions, 71 deletions
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json b/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
index 569e9383..b67c0cb1 100644
--- a/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
@@ -20,13 +20,15 @@
"fileBasedGP": 15,
"fileLocation": "/pm/pm.xml",
"nfFilter": {
- "swVersions": [
- "1.0.0",
- "1.0.1"
- ],
"nfNames": [
"^pnf.*",
"^vnf.*"
+ ],
+ "modelInvariantUUIDs": [
+ "7129e420-d396-4efb-af02-6b83499b12f8"
+ ],
+ "modelVersionIDs": [
+
]
},
"measurementGroups": [
@@ -77,12 +79,14 @@
"control_loop_name": "pmsh-control-loop",
"operational_policy_name": "pmsh-operational-policy",
"cert_path": "/opt/app/pmsh/etc/certs/cert.pem",
+ "enable_tls": true,
+ "ca_cert_path": "/opt/app/pmsh/etc/certs/cacert.pem",
"streams_publishes": {
"policy_pm_publisher": {
"dmaap_info": {
"client_id": "1475976809466",
"client_role": "org.onap.dcae.pmPublisher",
- "topic_url": "https://mr-sim:3095/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS",
+ "topic_url": "https://mr-sim:3095/events/unauthenticated.DCAE_CL_OUTPUT",
"location": "san-francisco"
},
"type": "message_router"
@@ -101,7 +105,7 @@
"policy_pm_subscriber": {
"dmaap_info": {
"location": "san-francisco",
- "topic_url": "https://mr-sim:3095/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS",
+ "topic_url": "https://mr-sim:3095/events/unauthenticated.PMSH_CL_INPUT",
"client_role": "org.onap.dcae.pmSubscriber",
"client_id": "1575876809456"
},
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
index 9c9dc6e5..b433892a 100644
--- a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
@@ -1,7 +1,10 @@
[
{
"httpRequest": {
- "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+ "path": "/events/AAI_EVENT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -11,7 +14,7 @@
]
},
"body": [
- "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"UPDATE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"orchestration-status\":\"Active\"}}"
+ "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"UPDATE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"model-invariant-id\":\"7129e420-d396-4efb-af02-6b83499b12f8\",\"model-version-id\":\"e80a6ae3-cafd-4d24-850d-e14c084a5ca9\",\"orchestration-status\":\"Active\"}}"
]
},
"times": {
@@ -21,7 +24,10 @@
},
{
"httpRequest": {
- "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+ "path": "/events/AAI_EVENT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -30,7 +36,7 @@
"application/json"
]
},
- "body": "{}"
+ "body": []
}
}
]
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
index c0accc8c..3df66a61 100644
--- a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
@@ -1,7 +1,10 @@
[
{
"httpRequest": {
- "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+ "path": "/events/AAI_EVENT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -11,7 +14,7 @@
]
},
"body": [
- "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"DELETE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"orchestration-status\":\"Active\"}}"
+ "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"DELETE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"model-invariant-id\":\"7129e420-d396-4efb-af02-6b83499b12f8\",\"model-version-id\":\"e80a6ae3-cafd-4d24-850d-e14c084a5ca9\",\"orchestration-status\":\"Active\"}}"
]
},
"times": {
@@ -21,7 +24,10 @@
},
{
"httpRequest": {
- "path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"
+ "path": "/events/AAI_EVENT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -30,7 +36,7 @@
"application/json"
]
},
- "body": "{}"
+ "body": []
}
}
]
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
index cc14f3c9..cd75deb3 100644
--- a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
+++ b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
@@ -1,7 +1,10 @@
[
{
"httpRequest": {
- "path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
+ "path": "/events/unauthenticated.PMSH_CL_INPUT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -21,7 +24,10 @@
},
{
"httpRequest": {
- "path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
+ "path": "/events/unauthenticated.PMSH_CL_INPUT/.*",
+ "queryStringParameters" : {
+ "timeout" : [ "1000" ]
+ }
},
"httpResponse": {
"statusCode": 200,
@@ -30,10 +36,7 @@
"application/json"
]
},
- "body": {
- "type": "JSON",
- "json": {}
- }
+ "body": []
}
}
]
diff --git a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json b/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json
deleted file mode 100644
index 79bfb44f..00000000
--- a/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json
+++ /dev/null
@@ -1,39 +0,0 @@
-[
- {
- "httpRequest": {
- "path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
- },
- "httpResponse": {
- "statusCode": 200,
- "headers": {
- "content-type": [
- "application/json"
- ]
- },
- "body": [
- "{\"name\": \"ResponseEvent\", \"nameSpace\": \"org.onap.policy.apex.onap.pmcontrol\", \"source\": \"APEX\", \"target\": \"DCAE\", \"version\": \"0.0.1\", \"status\": {\"subscriptionName\": \"ExtraPM-All-gNB-R2B\", \"nfName\": \"pnf_new\", \"changeType\": \"CREATE\", \"message\": \"success\"}}"
- ]
- },
- "times": {
- "remainingTimes": 1,
- "unlimited": false
- }
- },
- {
- "httpRequest": {
- "path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"
- },
- "httpResponse": {
- "statusCode": 200,
- "headers": {
- "content-type": [
- "application/json"
- ]
- },
- "body": {
- "type": "JSON",
- "json": {}
- }
- }
- }
-]
diff --git a/tests/dcaegen2-services-pmsh/testcases/pmsh.robot b/tests/dcaegen2-services-pmsh/testcases/pmsh.robot
index 08ab197c..2f0e5bf6 100644
--- a/tests/dcaegen2-services-pmsh/testcases/pmsh.robot
+++ b/tests/dcaegen2-services-pmsh/testcases/pmsh.robot
@@ -21,7 +21,6 @@ ${SUBSCRIPTIONS_ENDPOINT} /subscriptions
${MR_EXPECTATION_AAI_PNF_CREATED} %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-created.json
${MR_EXPECTATION_AAI_PNF_REMOVED} %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-aai-pnf-deleted.json
-${MR_EXPECTATION_POLICY_RESPONSE_PNF_NEW} %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-new.json
${MR_EXPECTATION_POLICY_RESPONSE_PNF_EXISTING} %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/mr-expectation-policy-subscription-created-pnf-existing.json
${CBS_EXPECTATION_ADMIN_STATE_UNLOCKED} %{WORKSPACE}/tests/dcaegen2-services-pmsh/testcases/assets/cbs-expectation-unlocked-config.json
@@ -56,35 +55,33 @@ Verify PNF detected in AAI when administrative state unlocked
${resp}= Get Request pmsh_session ${SUBSCRIPTIONS_ENDPOINT}
Should Be Equal As Strings ${resp.json()[0]['subscription_status']} UNLOCKED
Should Be Equal As Strings ${resp.json()[0]['network_functions'][0]['nf_name']} pnf-existing
- Should Be Equal As Strings ${resp.json()[0]['network_functions'][0]['orchestration_status']} Active
Should Be Equal As Strings ${resp.json()[0]['network_functions'][0]['nf_sub_status']} PENDING_CREATE
Verify Policy response on MR is handled
[Tags] PMSH_04
[Documentation] Verify policy response on MR is handled
- [Timeout] 40 seconds
+ [Timeout] 60 seconds
SimulatePolicyResponse ${MR_EXPECTATION_POLICY_RESPONSE_PNF_EXISTING}
- Sleep 7 seconds Ensure Policy response on MR is picked up
+ Sleep 31 seconds Ensure Policy response on MR is picked up
${resp}= Get Request pmsh_session ${SUBSCRIPTIONS_ENDPOINT}
Should Be Equal As Strings ${resp.json()[0]['network_functions'][0]['nf_sub_status']} CREATED
Verify AAI event on MR detailing new PNF being detected is handled
[Tags] PMSH_05
[Documentation] Verify PNF created AAI event on MR is handled
- [Timeout] 30 seconds
+ [Timeout] 60 seconds
SimulateNewPNF
- Sleep 12 seconds Ensure AAI event on MR is picked up
+ Sleep 31 seconds Ensure AAI event on MR is picked up
${resp}= Get Request pmsh_session ${SUBSCRIPTIONS_ENDPOINT}
Should Be Equal As Strings ${resp.json()[0]['network_functions'][1]['nf_name']} pnf_newly_discovered
- Should Be Equal As Strings ${resp.json()[0]['network_functions'][1]['orchestration_status']} Active
Should Be Equal As Strings ${resp.json()[0]['network_functions'][1]['nf_sub_status']} PENDING_CREATE
Verify AAI event on MR detailing PNF being deleted is handled
[Tags] PMSH_06
[Documentation] Verify PNF deleted AAI event on MR is handled
- [Timeout] 30 seconds
+ [Timeout] 60 seconds
SimulateDeletedPNF
- Sleep 12 seconds Ensure AAI event on MR is picked up
+ Sleep 31 seconds Ensure AAI event on MR is picked up
${resp}= Get Request pmsh_session ${SUBSCRIPTIONS_ENDPOINT}
Should Not Contain ${resp.text} pnf_newly_discovered
@@ -105,7 +102,7 @@ SetAdministrativeStateToUnlocked
SimulateNewPNF
${data}= Get Data From File ${MR_EXPECTATION_AAI_PNF_CREATED}
- ${resp} = Put Request mr_sim_session /clear data={"path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"}
+ ${resp} = Put Request mr_sim_session /clear data={"path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event"}
Should Be True ${resp.status_code} == 200
${resp} = Put Request mr_sim_session /expectation data=${data}
Should Be True ${resp.status_code} == 201
@@ -113,14 +110,14 @@ SimulateNewPNF
SimulatePolicyResponse
[Arguments] ${expected_contents}
${data}= Get Data From File ${expected_contents}
- ${resp} = Put Request mr_sim_session /clear data={"path": "/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS/dcae_pmsh_cg/policy_response_consumer"}
+ ${resp} = Put Request mr_sim_session /clear data={"path": "/events/unauthenticated.PMSH_CL_INPUT/dcae_pmsh_cg/dcae_pmsh_policy_cl_input"}
Should Be True ${resp.status_code} == 200
${resp} = Put Request mr_sim_session /expectation data=${data}
Should Be True ${resp.status_code} == 201
SimulateDeletedPNF
${data}= Get Data From File ${MR_EXPECTATION_AAI_PNF_REMOVED}
- ${resp} = Put Request mr_sim_session /clear data={"path": "/events/AAI_EVENT/dcae_pmsh_cg/AAI-EVENT"}
+ ${resp} = Put Request mr_sim_session /clear data={"path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event"}
Should Be True ${resp.status_code} == 200
${resp} = Put Request mr_sim_session /expectation data=${data}
Should Be True ${resp.status_code} == 201