aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/dcaegen2/prh-testcases/assets/bbs_registration/aai-entry.json23
-rw-r--r--tests/dcaegen2/prh-testcases/assets/bbs_registration/expected-logical-link.json11
-rw-r--r--tests/dcaegen2/prh-testcases/assets/bbs_registration/expected-pnf-ready-event.json6
-rw-r--r--tests/dcaegen2/prh-testcases/assets/bbs_registration/ves-event.json40
-rw-r--r--tests/dcaegen2/prh-testcases/bbs_tests.robot27
-rw-r--r--tests/dcaegen2/prh-testcases/resources/prh_library.robot6
-rw-r--r--tests/dcaegen2/prh-testcases/resources/prh_library2.robot74
-rw-r--r--tests/dcaegen2/prh-testcases/resources/simulator/AAI.py8
-rw-r--r--tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py8
-rw-r--r--tests/modeling-toscaparsers-genericparser/test.robot31
-rw-r--r--tests/policy/drools-applications/drools-applications-test.robot17
-rw-r--r--tests/policy/engine/Policy-CSIT.robot (renamed from tests/policy/suite1/Policy-CSIT.robot)0
-rw-r--r--tests/policy/engine/__init__.robot (renamed from tests/policy/suite1/__init__.robot)0
-rw-r--r--tests/policy/engine/configpolicy_vCPE.template (renamed from tests/policy/suite1/configpolicy_vCPE.template)0
-rw-r--r--tests/policy/engine/configpolicy_vCPE_R1.template (renamed from tests/policy/suite1/configpolicy_vCPE_R1.template)0
-rw-r--r--tests/policy/engine/configpolicy_vDNS.template (renamed from tests/policy/suite1/configpolicy_vDNS.template)0
-rw-r--r--tests/policy/engine/configpolicy_vDNS_R1.template (renamed from tests/policy/suite1/configpolicy_vDNS_R1.template)0
-rw-r--r--tests/policy/engine/configpolicy_vFW.template (renamed from tests/policy/suite1/configpolicy_vFW.template)0
-rw-r--r--tests/policy/engine/configpolicy_vFW_R1.template (renamed from tests/policy/suite1/configpolicy_vFW_R1.template)0
-rw-r--r--tests/policy/engine/createpolicy.template (renamed from tests/policy/suite1/createpolicy.template)0
-rw-r--r--tests/policy/engine/deletepolicy.template (renamed from tests/policy/suite1/deletepolicy.template)0
-rw-r--r--tests/policy/engine/getconfigpolicy.template (renamed from tests/policy/suite1/getconfigpolicy.template)0
-rw-r--r--tests/policy/engine/getoofpolicy.template (renamed from tests/policy/suite1/getoofpolicy.template)0
-rw-r--r--tests/policy/engine/global_properties.robot (renamed from tests/policy/suite1/global_properties.robot)0
-rw-r--r--tests/policy/engine/json_templater.robot (renamed from tests/policy/suite1/json_templater.robot)0
-rw-r--r--tests/policy/engine/listpolicy.template (renamed from tests/policy/suite1/listpolicy.template)0
-rw-r--r--tests/policy/engine/multiple_pushpolicy.template (renamed from tests/policy/suite1/multiple_pushpolicy.template)0
-rw-r--r--tests/policy/engine/multiple_unpushpolicy.template (renamed from tests/policy/suite1/multiple_unpushpolicy.template)0
-rw-r--r--tests/policy/engine/oofpolicy_HPA_R1.template (renamed from tests/policy/suite1/oofpolicy_HPA_R1.template)0
-rw-r--r--tests/policy/engine/opspolicy_VDNS.template (renamed from tests/policy/suite1/opspolicy_VDNS.template)0
-rw-r--r--tests/policy/engine/opspolicy_VDNS_R1.template (renamed from tests/policy/suite1/opspolicy_VDNS_R1.template)0
-rw-r--r--tests/policy/engine/opspolicy_VFW.template (renamed from tests/policy/suite1/opspolicy_VFW.template)0
-rw-r--r--tests/policy/engine/opspolicy_VFW_R1.template (renamed from tests/policy/suite1/opspolicy_VFW_R1.template)0
-rw-r--r--tests/policy/engine/opspolicy_vCPE.template (renamed from tests/policy/suite1/opspolicy_vCPE.template)0
-rw-r--r--tests/policy/engine/opspolicy_vCPE_R1.template (renamed from tests/policy/suite1/opspolicy_vCPE_R1.template)0
-rw-r--r--tests/policy/engine/opspolicy_vOLTE.template (renamed from tests/policy/suite1/opspolicy_vOLTE.template)0
-rw-r--r--tests/policy/engine/opspolicy_vOLTE_R1.template (renamed from tests/policy/suite1/opspolicy_vOLTE_R1.template)0
-rw-r--r--tests/policy/engine/policy_interface.robot (renamed from tests/policy/suite1/policy_interface.robot)0
-rw-r--r--tests/policy/engine/pushpolicy.template (renamed from tests/policy/suite1/pushpolicy.template)0
-rw-r--r--tests/policy/engine/sdncnamingpolicy_vFW.template (renamed from tests/policy/suite1/sdncnamingpolicy_vFW.template)0
-rw-r--r--tests/policy/engine/sdncnamingpolicy_vPG.template (renamed from tests/policy/suite1/sdncnamingpolicy_vPG.template)0
-rw-r--r--tests/policy/pap/data/create.group.request.json42
-rw-r--r--tests/policy/pap/pap-test.robot89
-rw-r--r--tests/vfc/nfvo-lcm/test.robot18
44 files changed, 388 insertions, 12 deletions
diff --git a/tests/dcaegen2/prh-testcases/assets/bbs_registration/aai-entry.json b/tests/dcaegen2/prh-testcases/assets/bbs_registration/aai-entry.json
new file mode 100644
index 00000000..8787dc1b
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/assets/bbs_registration/aai-entry.json
@@ -0,0 +1,23 @@
+{
+ "pnf-name": "NOK6061ZW9",
+ "pnf-name2": "example-pnf-name2-val-58071",
+ "pnf-name2-source": "example-pnf-name2-source-val-22408",
+ "pnf-id": "example-pnf-id-val-55834",
+ "equip-type": "example-equip-type-val-5497",
+ "equip-vendor": "example-equip-vendor-val-85730",
+ "equip-model": "example-equip-model-val-38526",
+ "management-option": "example-management-option-val-15776",
+ "ipaddress-v4-oam": "example-ipaddress-v4-oam-val-33556",
+ "sw-version": "example-sw-version-val-64239",
+ "in-maint": true,
+ "frame-id": "example-frame-id-val-76733",
+ "serial-number": "example-serial-number-val-79366",
+ "ipaddress-v4-loopback-0": "example-ipaddress-v4-loopback0-val-34781",
+ "ipaddress-v6-loopback-0": "example-ipaddress-v6-loopback0-val-29979",
+ "ipaddress-v4-aim": "example-ipaddress-v4-aim-val-53703",
+ "ipaddress-v6-aim": "example-ipaddress-v6-aim-val-93386",
+ "ipaddress-v6-oam": "example-ipaddress-v6-oam-val-92665",
+ "inv-status": "example-inv-status-val-8477",
+ "prov-status": "example-prov-status-val-68268",
+ "nf-role": "example-nf-role-val-68489"
+} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/bbs_registration/expected-logical-link.json b/tests/dcaegen2/prh-testcases/assets/bbs_registration/expected-logical-link.json
new file mode 100644
index 00000000..c48c841c
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/assets/bbs_registration/expected-logical-link.json
@@ -0,0 +1,11 @@
+{
+ "link-name": "bbs-link",
+ "link-type": "attachmentPoint",
+ "relationship-list": [
+ {
+ "relationship": {
+ "related-link": "/network/pnfs/pnf/NOK6061ZW9"
+ }
+ }
+ ]
+}
diff --git a/tests/dcaegen2/prh-testcases/assets/bbs_registration/expected-pnf-ready-event.json b/tests/dcaegen2/prh-testcases/assets/bbs_registration/expected-pnf-ready-event.json
new file mode 100644
index 00000000..9da0201c
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/assets/bbs_registration/expected-pnf-ready-event.json
@@ -0,0 +1,6 @@
+{
+ "additionalFields": {
+ "attachmentPoint": "bbs-link"
+ },
+ "correlationId": "NOK6061ZW9"
+}
diff --git a/tests/dcaegen2/prh-testcases/assets/bbs_registration/ves-event.json b/tests/dcaegen2/prh-testcases/assets/bbs_registration/ves-event.json
new file mode 100644
index 00000000..c67d863e
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/assets/bbs_registration/ves-event.json
@@ -0,0 +1,40 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "startEpochMicrosec": 1540212137393,
+ "sourceId": "val13",
+ "eventId": "registration_40212137",
+ "nfcNamingCode": "oam",
+ "internalHeaderFields": {
+ "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+ },
+ "eventType": "pnfRegistration",
+ "priority": "Normal",
+ "version": "4.0.1",
+ "reportingEntityName": "NOK6061ZW9",
+ "sequence": 0,
+ "domain": "pnfRegistration",
+ "lastEpochMicrosec": 1540212137393,
+ "eventName": "pnfRegistration_Nokia_5gDu",
+ "vesEventListenerVersion": "7.0.1",
+ "sourceName": "NOK6061ZW9",
+ "nfNamingCode": "gNB"
+ },
+ "pnfRegistrationFields": {
+ "unitType": "val8",
+ "serialNumber": "6061ZW9",
+ "pnfRegistrationFieldsVersion": "2.0",
+ "manufactureDate": "1540212137393",
+ "modelNumber": "val6",
+ "lastServiceDate": "1540212137393",
+ "unitFamily": "BBU",
+ "vendorName": "Nokia",
+ "oamV4IpAddress": "val3",
+ "oamV6IpAddress": "val4",
+ "softwareVersion": "val7",
+ "additionalFields": {
+ "attachmentPoint": "bbs-link"
+ }
+ }
+ }
+}
diff --git a/tests/dcaegen2/prh-testcases/bbs_tests.robot b/tests/dcaegen2/prh-testcases/bbs_tests.robot
new file mode 100644
index 00000000..e9bc999a
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/bbs_tests.robot
@@ -0,0 +1,27 @@
+*** Settings ***
+Documentation Integration tests for PRH.
+... PRH receive events from DMaaP and produce or not PNF_READY notification depends on required fields in received event.
+Suite Setup Run keywords Create Headers AND Create sessions AND Ensure Container Is Running prh AND Ensure Container Is Exited ssl_prh
+Suite Teardown Ensure Container Is Running ssl_prh
+Test Teardown Reset Simulators
+
+#Suite Setup Run keywords Create headers AND Create sessions AND Ensure Container Is Running prh AND Ensure Container Is Exited ssl_prh
+#Suite Teardown Run keywords Ensure Container Is Running ssl_prh AND Ensure Container Is Exited prh AND Reset Simulators
+#Test Teardown Reset Simulators
+Library resources/PrhLibrary.py
+Resource resources/prh_library2.robot
+Resource ../../common.robot
+
+*** Variables ***
+${TEST_CASE_DIR} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets
+
+${DMAAP_SIMULATOR_SETUP_URL} http://${DMAAP_SIMULATOR_SETUP}
+${AAI_SIMULATOR_SETUP_URL} http://${AAI_SIMULATOR_SETUP}
+${CONSUL_SETUP_URL} http://${CONSUL_SETUP}
+
+*** Test Cases ***
+
+Correct VES event with additional fields
+ [Tags] PRH
+ [Template] VES event with additional fields
+ ${TEST_CASE_DIR}/bbs_registration \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot
index 29203ecd..cfe1d993 100644
--- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot
+++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot
@@ -43,8 +43,6 @@ Invalid event processing
${invalid_notification}= Create invalid notification ${data}
${notification}= Catenate SEPARATOR= \\n |Incorrect json, consumerDmaapModel can not be created: ${invalid_notification}
Wait Until Keyword Succeeds 100x 100ms Check PRH log ${notification}
- #Wait Until Keyword Succeeds 100x 100ms Check PRH log ${notification}
-
Check PRH log
[Arguments] ${searched_log}
@@ -53,7 +51,7 @@ Check PRH log
Check PNF_READY notification
[Arguments] ${expected_event_pnf_ready_in_dpaap}
- ${resp}= Get Request ${dmaap_setup_session} /events/pnfReady headers=${suite_headers}
+ ${resp}= Get Request ${dmaap_setup_session} /setup/get_pnf_ready headers=${suite_headers}
Should Be Equal ${resp.text} ${expected_event_pnf_ready_in_dpaap}
Set PNF name in AAI
@@ -76,7 +74,7 @@ Set PNF content in AAI
Set event in DMaaP
[Arguments] ${event_in_dmaap}
- ${resp}= Put Request ${dmaap_setup_session} /set_get_event headers=${suite_headers} data=${event_in_dmaap}
+ ${resp}= Put Request ${dmaap_setup_session} /setup/set_ves_event headers=${suite_headers} data=${event_in_dmaap}
Should Be Equal As Strings ${resp.status_code} 200
Reset AAI simulator
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library2.robot b/tests/dcaegen2/prh-testcases/resources/prh_library2.robot
new file mode 100644
index 00000000..99939a06
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/resources/prh_library2.robot
@@ -0,0 +1,74 @@
+*** Settings ***
+Library RequestsLibrary
+Library Collections
+Resource ../../../common.robot
+
+*** Keywords ***
+VES event with additional fields
+ [Arguments] ${test_case_directory}
+ ${pnf_entry}= Get Data From File ${test_case_directory}/aai-entry.json
+ ${ves_event}= Get Data From File ${test_case_directory}/ves-event.json
+ ${expected_pnf_ready_event}= Get Data From File ${test_case_directory}/expected-pnf-ready-event.json
+ ${expected_logical_link}= Get Data From File ${test_case_directory}/expected-logical-link.json
+ Add PNF entry in AAI ${pnf_entry}
+ Set VES event in DMaaP ${ves_event}
+ Wait Until Keyword Succeeds 10x 3000ms Check CBS ready
+ Wait Until Keyword Succeeds 10x 3000ms Check recorded PNF_READY notification ${expected_pnf_ready_event}
+ Check recorded Logical Link ${expected_logical_link}
+
+Check CBS ready
+ ${resp}= Get Request ${consul_setup_session} /v1/catalog/service/cbs
+ Should Be Equal As Strings ${resp.status_code} 200
+ Log CBS ${resp.content}
+
+Check recorded PNF_READY notification
+ [Arguments] ${expected_event_pnf_ready_in_dpaap}
+ ${resp}= Get Request ${dmaap_setup_session} /setup/get_pnf_ready headers=${suite_headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As JSON ${resp.content} ${expected_event_pnf_ready_in_dpaap}
+
+Check recorded Logical Link
+ [Arguments] ${expected_logical_link_in_aai}
+ ${resp}= Get Request ${aai_setup_session} /setup/get_created_logical_link headers=${suite_headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As JSON ${resp.content} ${expected_logical_link_in_aai}
+
+Add PNF entry in AAI
+ [Arguments] ${pnf_entry}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ Log AAI url ${AAI_SIMULATOR_SETUP_URL}
+ ${resp}= Put Request ${aai_setup_session} /setup/add_pnf_entry headers=${suite_headers} data=${pnf_entry}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Set VES event in DMaaP
+ [Arguments] ${ves_event}
+ ${resp}= Put Request ${dmaap_setup_session} /setup/set_ves_event headers=${suite_headers} data=${ves_event}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Should Be Equal As JSON
+ [Arguments] ${given} ${expected}
+ Should Be True ${given}==${expected}
+
+Create sessions
+ Create Session dmaap_setup_session ${DMAAP_SIMULATOR_SETUP_URL}
+ Set Suite Variable ${dmaap_setup_session} dmaap_setup_session
+ Create Session aai_setup_session ${AAI_SIMULATOR_SETUP_URL}
+ Set Suite Variable ${aai_setup_session} aai_setup_session
+ Create Session consul_setup_session ${CONSUL_SETUP_URL}
+ Set Suite Variable ${consul_setup_session} consul_setup_session
+
+Reset Simulators
+ Reset AAI simulator
+ Reset DMaaP simulator
+
+Reset AAI simulator
+ ${resp}= Post Request ${aai_setup_session} /reset
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Reset DMaaP simulator
+ ${resp}= Post Request ${dmaap_setup_session} /reset
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Create headers
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ Set Suite Variable ${suite_headers} ${headers} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
index 010c5231..55b2d1f6 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
@@ -27,12 +27,12 @@ class AAISetup(BaseHTTPRequestHandler):
def do_GET(self):
try:
- if re.search('/setup/patched_pnf', self.path):
+ if re.search('/setup/get_patched_pnf', self.path):
httpServerLib.set_response_200_ok(self, payload = patched_pnf)
- logger.debug('AAISetup GET /setup/patched_pnf -> 200 OK')
- elif re.search('/setup/created_logical_link', self.path):
+ logger.debug('AAISetup GET /setup/get_patched_pnf -> 200 OK')
+ elif re.search('/setup/get_created_logical_link', self.path):
httpServerLib.set_response_200_ok(self, payload = created_logical_link)
- logger.debug('AAISetup GET /setup/created_logical_link -> 200 OK')
+ logger.debug('AAISetup GET /setup/get_created_logical_link -> 200 OK')
else:
httpServerLib.set_response_404_not_found(self)
logger.info('AAISetup GET ' + self.path + ' -> 404 Not found')
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
index 2d4fbd65..b2716968 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
@@ -24,10 +24,10 @@ class DmaapSetup(BaseHTTPRequestHandler):
def do_GET(self):
try:
- if re.search('/setup/pnf_ready', self.path) or re.search('events/pnfReady', self.path):
+ if re.search('/setup/get_pnf_ready', self.path):
global captured_prh_event
httpServerLib.set_response_200_ok(self, payload = captured_prh_event)
- logger.debug('DmaapSetup GET /setup/pnf_ready -> 200 OK')
+ logger.debug('DmaapSetup GET /setup/get_pnf_ready -> 200 OK')
else:
httpServerLib.set_response_404_not_found(self)
logger.info('DmaapSetup GET ' + self.path + ' -> 404 Not found')
@@ -37,11 +37,11 @@ class DmaapSetup(BaseHTTPRequestHandler):
def do_PUT(self):
try:
- if re.search('/setup/ves_event', self.path) or re.search('/set_get_event', self.path):
+ if re.search('/setup/set_ves_event', self.path):
global ves_event
ves_event = httpServerLib.get_payload(self)
httpServerLib.set_response_200_ok(self)
- logger.debug('DmaapSetup PUT /setup/ves_event -> 200 OK')
+ logger.debug('DmaapSetup PUT /setup/set_ves_event -> 200 OK')
else:
httpServerLib.set_response_404_not_found(self)
logger.info('DmaapSetup PUT ' + self.path + ' -> 404 Not found')
diff --git a/tests/modeling-toscaparsers-genericparser/test.robot b/tests/modeling-toscaparsers-genericparser/test.robot
new file mode 100644
index 00000000..b83bee47
--- /dev/null
+++ b/tests/modeling-toscaparsers-genericparser/test.robot
@@ -0,0 +1,31 @@
+*** settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+
+*** Variables ***
+@{return_ok_list}= 200 201 202
+${queryswagger_url} /api/catalog/v1/swagger.json
+${queryVNFPackage_url} /api/catalog/v1/vnfpackages
+${queryNSPackages_url} /api/catalog/v1/nspackages
+${healthcheck_url} /api/catalog/v1/health_check
+
+*** Test Cases ***
+GetVNFPackages
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${CATALOG_IP}:8806 headers=${headers}
+ ${resp}= Get Request web_session ${queryVNFPackage_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
+
+CatalogHealthCheckTest
+ [Documentation] check health for catalog by MSB
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${CATALOG_IP}:8806 headers=${headers}
+ ${resp}= Get Request web_session ${healthcheck_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
+ ${response_json} json.loads ${resp.content}
+ ${health_status}= Convert To String ${response_json['status']}
+ Should Be Equal ${health_status} active
diff --git a/tests/policy/drools-applications/drools-applications-test.robot b/tests/policy/drools-applications/drools-applications-test.robot
new file mode 100644
index 00000000..cf4d3cea
--- /dev/null
+++ b/tests/policy/drools-applications/drools-applications-test.robot
@@ -0,0 +1,17 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+
+*** Test Cases ***
+Alive
+ [Documentation] Runs Policy PDP Alive Check
+ ${auth}= Create List demo@people.osaaf.org demo123456!
+ Log Creating session https://${POLICY_DROOLS_IP}:9696
+ ${session}= Create Session policy https://${POLICY_DROOLS_IP}:9696 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pdp/engine headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['alive']} True
diff --git a/tests/policy/suite1/Policy-CSIT.robot b/tests/policy/engine/Policy-CSIT.robot
index 514cc840..514cc840 100644
--- a/tests/policy/suite1/Policy-CSIT.robot
+++ b/tests/policy/engine/Policy-CSIT.robot
diff --git a/tests/policy/suite1/__init__.robot b/tests/policy/engine/__init__.robot
index c7970e6a..c7970e6a 100644
--- a/tests/policy/suite1/__init__.robot
+++ b/tests/policy/engine/__init__.robot
diff --git a/tests/policy/suite1/configpolicy_vCPE.template b/tests/policy/engine/configpolicy_vCPE.template
index e3e3a2d0..e3e3a2d0 100644
--- a/tests/policy/suite1/configpolicy_vCPE.template
+++ b/tests/policy/engine/configpolicy_vCPE.template
diff --git a/tests/policy/suite1/configpolicy_vCPE_R1.template b/tests/policy/engine/configpolicy_vCPE_R1.template
index 77653c3f..77653c3f 100644
--- a/tests/policy/suite1/configpolicy_vCPE_R1.template
+++ b/tests/policy/engine/configpolicy_vCPE_R1.template
diff --git a/tests/policy/suite1/configpolicy_vDNS.template b/tests/policy/engine/configpolicy_vDNS.template
index ab1d2e0d..ab1d2e0d 100644
--- a/tests/policy/suite1/configpolicy_vDNS.template
+++ b/tests/policy/engine/configpolicy_vDNS.template
diff --git a/tests/policy/suite1/configpolicy_vDNS_R1.template b/tests/policy/engine/configpolicy_vDNS_R1.template
index 185a7c72..185a7c72 100644
--- a/tests/policy/suite1/configpolicy_vDNS_R1.template
+++ b/tests/policy/engine/configpolicy_vDNS_R1.template
diff --git a/tests/policy/suite1/configpolicy_vFW.template b/tests/policy/engine/configpolicy_vFW.template
index 39e99e7b..39e99e7b 100644
--- a/tests/policy/suite1/configpolicy_vFW.template
+++ b/tests/policy/engine/configpolicy_vFW.template
diff --git a/tests/policy/suite1/configpolicy_vFW_R1.template b/tests/policy/engine/configpolicy_vFW_R1.template
index 067ed07f..067ed07f 100644
--- a/tests/policy/suite1/configpolicy_vFW_R1.template
+++ b/tests/policy/engine/configpolicy_vFW_R1.template
diff --git a/tests/policy/suite1/createpolicy.template b/tests/policy/engine/createpolicy.template
index 7c693e84..7c693e84 100644
--- a/tests/policy/suite1/createpolicy.template
+++ b/tests/policy/engine/createpolicy.template
diff --git a/tests/policy/suite1/deletepolicy.template b/tests/policy/engine/deletepolicy.template
index 55510102..55510102 100644
--- a/tests/policy/suite1/deletepolicy.template
+++ b/tests/policy/engine/deletepolicy.template
diff --git a/tests/policy/suite1/getconfigpolicy.template b/tests/policy/engine/getconfigpolicy.template
index 611e65d0..611e65d0 100644
--- a/tests/policy/suite1/getconfigpolicy.template
+++ b/tests/policy/engine/getconfigpolicy.template
diff --git a/tests/policy/suite1/getoofpolicy.template b/tests/policy/engine/getoofpolicy.template
index 37fe0471..37fe0471 100644
--- a/tests/policy/suite1/getoofpolicy.template
+++ b/tests/policy/engine/getoofpolicy.template
diff --git a/tests/policy/suite1/global_properties.robot b/tests/policy/engine/global_properties.robot
index e0c816ea..e0c816ea 100644
--- a/tests/policy/suite1/global_properties.robot
+++ b/tests/policy/engine/global_properties.robot
diff --git a/tests/policy/suite1/json_templater.robot b/tests/policy/engine/json_templater.robot
index a1cc7e35..a1cc7e35 100644
--- a/tests/policy/suite1/json_templater.robot
+++ b/tests/policy/engine/json_templater.robot
diff --git a/tests/policy/suite1/listpolicy.template b/tests/policy/engine/listpolicy.template
index aef17a23..aef17a23 100644
--- a/tests/policy/suite1/listpolicy.template
+++ b/tests/policy/engine/listpolicy.template
diff --git a/tests/policy/suite1/multiple_pushpolicy.template b/tests/policy/engine/multiple_pushpolicy.template
index 5f20b647..5f20b647 100644
--- a/tests/policy/suite1/multiple_pushpolicy.template
+++ b/tests/policy/engine/multiple_pushpolicy.template
diff --git a/tests/policy/suite1/multiple_unpushpolicy.template b/tests/policy/engine/multiple_unpushpolicy.template
index afee7aeb..afee7aeb 100644
--- a/tests/policy/suite1/multiple_unpushpolicy.template
+++ b/tests/policy/engine/multiple_unpushpolicy.template
diff --git a/tests/policy/suite1/oofpolicy_HPA_R1.template b/tests/policy/engine/oofpolicy_HPA_R1.template
index 3a170b20..3a170b20 100644
--- a/tests/policy/suite1/oofpolicy_HPA_R1.template
+++ b/tests/policy/engine/oofpolicy_HPA_R1.template
diff --git a/tests/policy/suite1/opspolicy_VDNS.template b/tests/policy/engine/opspolicy_VDNS.template
index 801773d5..801773d5 100644
--- a/tests/policy/suite1/opspolicy_VDNS.template
+++ b/tests/policy/engine/opspolicy_VDNS.template
diff --git a/tests/policy/suite1/opspolicy_VDNS_R1.template b/tests/policy/engine/opspolicy_VDNS_R1.template
index 92627cc2..92627cc2 100644
--- a/tests/policy/suite1/opspolicy_VDNS_R1.template
+++ b/tests/policy/engine/opspolicy_VDNS_R1.template
diff --git a/tests/policy/suite1/opspolicy_VFW.template b/tests/policy/engine/opspolicy_VFW.template
index 224f5cf4..224f5cf4 100644
--- a/tests/policy/suite1/opspolicy_VFW.template
+++ b/tests/policy/engine/opspolicy_VFW.template
diff --git a/tests/policy/suite1/opspolicy_VFW_R1.template b/tests/policy/engine/opspolicy_VFW_R1.template
index a93063f7..a93063f7 100644
--- a/tests/policy/suite1/opspolicy_VFW_R1.template
+++ b/tests/policy/engine/opspolicy_VFW_R1.template
diff --git a/tests/policy/suite1/opspolicy_vCPE.template b/tests/policy/engine/opspolicy_vCPE.template
index c17a1bc6..c17a1bc6 100644
--- a/tests/policy/suite1/opspolicy_vCPE.template
+++ b/tests/policy/engine/opspolicy_vCPE.template
diff --git a/tests/policy/suite1/opspolicy_vCPE_R1.template b/tests/policy/engine/opspolicy_vCPE_R1.template
index 36695daa..36695daa 100644
--- a/tests/policy/suite1/opspolicy_vCPE_R1.template
+++ b/tests/policy/engine/opspolicy_vCPE_R1.template
diff --git a/tests/policy/suite1/opspolicy_vOLTE.template b/tests/policy/engine/opspolicy_vOLTE.template
index e43a3e6f..e43a3e6f 100644
--- a/tests/policy/suite1/opspolicy_vOLTE.template
+++ b/tests/policy/engine/opspolicy_vOLTE.template
diff --git a/tests/policy/suite1/opspolicy_vOLTE_R1.template b/tests/policy/engine/opspolicy_vOLTE_R1.template
index ff5fc42c..ff5fc42c 100644
--- a/tests/policy/suite1/opspolicy_vOLTE_R1.template
+++ b/tests/policy/engine/opspolicy_vOLTE_R1.template
diff --git a/tests/policy/suite1/policy_interface.robot b/tests/policy/engine/policy_interface.robot
index 745f7817..745f7817 100644
--- a/tests/policy/suite1/policy_interface.robot
+++ b/tests/policy/engine/policy_interface.robot
diff --git a/tests/policy/suite1/pushpolicy.template b/tests/policy/engine/pushpolicy.template
index 7e236e3d..7e236e3d 100644
--- a/tests/policy/suite1/pushpolicy.template
+++ b/tests/policy/engine/pushpolicy.template
diff --git a/tests/policy/suite1/sdncnamingpolicy_vFW.template b/tests/policy/engine/sdncnamingpolicy_vFW.template
index d9c773d1..d9c773d1 100644
--- a/tests/policy/suite1/sdncnamingpolicy_vFW.template
+++ b/tests/policy/engine/sdncnamingpolicy_vFW.template
diff --git a/tests/policy/suite1/sdncnamingpolicy_vPG.template b/tests/policy/engine/sdncnamingpolicy_vPG.template
index 9bae20a1..9bae20a1 100644
--- a/tests/policy/suite1/sdncnamingpolicy_vPG.template
+++ b/tests/policy/engine/sdncnamingpolicy_vPG.template
diff --git a/tests/policy/pap/data/create.group.request.json b/tests/policy/pap/data/create.group.request.json
new file mode 100644
index 00000000..b0937f7f
--- /dev/null
+++ b/tests/policy/pap/data/create.group.request.json
@@ -0,0 +1,42 @@
+{
+ "groups": [
+ {
+ "name": "create.group.request",
+ "pdpGroupState": "PASSIVE",
+ "properties": {
+ "hello": "world"
+ },
+ "pdpSubgroups": [
+ {
+ "pdpType": "pdpTypeA",
+ "desiredInstanceCount": 2,
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": [
+ {
+ "name": "onap.restart.tca",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "pdpType": "pdpTypeB",
+ "desiredInstanceCount": 1,
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": []
+ }
+ ]
+ }
+ ]
+}
diff --git a/tests/policy/pap/pap-test.robot b/tests/policy/pap/pap-test.robot
index d187d8fc..0a6251de 100644
--- a/tests/policy/pap/pap-test.robot
+++ b/tests/policy/pap/pap-test.robot
@@ -26,3 +26,92 @@ Statistics
Log Received response from policy ${resp.text}
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As Strings ${resp.json()['code']} 200
+
+CreatePdpGroups
+ [Documentation] Runs Policy PAP Create PDP Groups
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${postjson}= Get file ${CURDIR}/data/create.group.request.json
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Post Request policy /policy/pap/v1/pdps data=${postjson} headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+ActivatePdpGroup
+ [Documentation] Runs Policy PAP Change PDP Group State to ACTIVE
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Put Request policy /policy/pap/v1/pdps/groups/create.group.request?state=ACTIVE headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+QueryPdpGroups
+ [Documentation] Runs Policy PAP Query PDP Groups
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pap/v1/pdps headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['groups'][0]['name']} controlloop
+ Should Be Equal As Strings ${resp.json()['groups'][1]['name']} create.group.request
+ Should Be Equal As Strings ${resp.json()['groups'][1]['pdpGroupState']} ACTIVE
+ Should Be Equal As Strings ${resp.json()['groups'][2]['name']} monitoring
+
+UndeployPolicy
+ [Documentation] Runs Policy PAP Undeploy a Policy from PDP Groups
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Delete Request policy /policy/pap/v1/pdps/policies/onap.restart.tca headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+QueryPdpGroupsAfterUndeploy
+ [Documentation] Runs Policy PAP Query PDP Groups after Undeploy
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pap/v1/pdps headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['groups'][1]['name']} create.group.request
+ Should Be Equal As Strings ${resp.json()['groups'][1]['pdpSubgroups'][0]['policies']} []
+
+DeactivatePdpGroup
+ [Documentation] Runs Policy PAP Change PDP Group State to PASSIVE
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Put Request policy /policy/pap/v1/pdps/groups/create.group.request?state=PASSIVE headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+DeletePdpGroups
+ [Documentation] Runs Policy PAP Delete PDP Groups
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Delete Request policy /policy/pap/v1/pdps/groups/create.group.request headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+QueryPdpGroupsAfterDelete
+ [Documentation] Runs Policy PAP Query PDP Groups after Delete
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pap/v1/pdps headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['groups'][0]['name']} controlloop
+ Should Be Equal As Strings ${resp.json()['groups'][1]['name']} monitoring
diff --git a/tests/vfc/nfvo-lcm/test.robot b/tests/vfc/nfvo-lcm/test.robot
index 6711cf69..83040ade 100644
--- a/tests/vfc/nfvo-lcm/test.robot
+++ b/tests/vfc/nfvo-lcm/test.robot
@@ -11,6 +11,8 @@ Library HttpLibrary.HTTP
${queryswagger_url} /api/nslcm/v1/swagger.json
${create_ns_url} /api/nslcm/v1/ns
${delete_ns_url} /api/nslcm/v1/ns
+${get_ns_url} /api/nslcm/v1/ns
+${get_subscriptions_url} /api/nslcm/v1/subscriptions
${healthcheck_url} /api/nslcm/v1/health_check
#json files
@@ -74,3 +76,19 @@ LcmHealthCheckTest
${response_json} json.loads ${resp.content}
${health_status}= Convert To String ${response_json['status']}
Should Be Equal ${health_status} active
+
+LcmGetNsTest
+ [Documentation] get ns instances for nslcm by MSB
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ ${resp}= Get Request web_session ${get_ns_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
+
+LcmGetSubscriptionsTest
+ [Documentation] get subscriptions for nslcm by MSB
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ ${resp}= Get Request web_session ${get_subscriptions_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}