aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Wrobel <tomasz.wrobel@nokia.com>2021-08-12 10:47:36 +0200
committerPiotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>2021-08-17 06:50:39 +0000
commit48d53d26e157d195e4c31cdd1af933ed78212104 (patch)
treed2b8d19cd1fc9752f1be05465dd0e3d8c74cf626
parent5e2d4ba7b1cffa7fcf29c952f3434cac8bf98952 (diff)
[DCAEGEN2] Align PRH CSITs to use AAI v23
Issue-ID: DCAEGEN2-1531 Signed-off-by: Tomasz Wrobel <tomasz.wrobel@nokia.com> Change-Id: I01c58ad1a7f5bfa9f05939843d0ffc8beb677c39
-rw-r--r--tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry-service-instance.json4
-rw-r--r--tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry.json6
-rw-r--r--tests/dcaegen2/prh-testcases/assets/service-instance-non-active/aai-entry-service-instance.json4
-rw-r--r--tests/dcaegen2/prh-testcases/assets/service-instance-non-active/aai-entry.json4
-rw-r--r--tests/dcaegen2/prh-testcases/resources/prh_configs/prh-config.json8
-rw-r--r--tests/dcaegen2/prh-testcases/resources/prh_configs/prh-no-auth-config.json8
-rw-r--r--tests/dcaegen2/prh-testcases/resources/prh_library.robot2
-rw-r--r--tests/dcaegen2/prh-testcases/resources/simulator/AAI.py32
8 files changed, 34 insertions, 34 deletions
diff --git a/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry-service-instance.json b/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry-service-instance.json
index 6119ea8b..7ded8550 100644
--- a/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry-service-instance.json
+++ b/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry-service-instance.json
@@ -12,7 +12,7 @@
{
"related-to": "pnf",
"relationship-label": "org.onap.relationships.inventory.ComposedOf",
- "related-link": "/aai/v12/network/pnfs/pnf/NOK6061ZW9",
+ "related-link": "/aai/v23/network/pnfs/pnf/NOK6061ZW9",
"relationship-data": [
{
"relationship-key": "pnf.pnf-name",
@@ -22,4 +22,4 @@
}
]
}
-} \ No newline at end of file
+}
diff --git a/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry.json b/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry.json
index e01e26e6..d4ba547a 100644
--- a/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry.json
+++ b/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry.json
@@ -25,7 +25,7 @@
{
"related-to": "service-instance",
"relationship-label": "org.onap.relationships.inventory.ComposedOf",
- "related-link": "/aai/v12/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/bbs_service",
+ "related-link": "/aai/v23/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/bbs_service",
"relationship-data": [
{
"relationship-key": "customer.global-customer-id",
@@ -50,7 +50,7 @@
{
"related-to": "logical-link",
"relationship-label": "org.onap.relationships.inventory.BridgedTo",
- "related-link": "/aai/v12/network/logical-links/logical-link/bbs-link",
+ "related-link": "/aai/v23/network/logical-links/logical-link/bbs-link",
"relationship-data": [
{
"relationship-key": "logical-link.link-name",
@@ -63,4 +63,4 @@
-} \ No newline at end of file
+}
diff --git a/tests/dcaegen2/prh-testcases/assets/service-instance-non-active/aai-entry-service-instance.json b/tests/dcaegen2/prh-testcases/assets/service-instance-non-active/aai-entry-service-instance.json
index e925e000..1d211fd1 100644
--- a/tests/dcaegen2/prh-testcases/assets/service-instance-non-active/aai-entry-service-instance.json
+++ b/tests/dcaegen2/prh-testcases/assets/service-instance-non-active/aai-entry-service-instance.json
@@ -12,7 +12,7 @@
{
"related-to": "pnf",
"relationship-label": "org.onap.relationships.inventory.ComposedOf",
- "related-link": "/aai/v12/network/pnfs/pnf/NOK6061ZW8",
+ "related-link": "/aai/v23/network/pnfs/pnf/NOK6061ZW8",
"relationship-data": [
{
"relationship-key": "pnf.pnf-name",
@@ -22,4 +22,4 @@
}
]
}
-} \ No newline at end of file
+}
diff --git a/tests/dcaegen2/prh-testcases/assets/service-instance-non-active/aai-entry.json b/tests/dcaegen2/prh-testcases/assets/service-instance-non-active/aai-entry.json
index 802ffd8a..e7c57bda 100644
--- a/tests/dcaegen2/prh-testcases/assets/service-instance-non-active/aai-entry.json
+++ b/tests/dcaegen2/prh-testcases/assets/service-instance-non-active/aai-entry.json
@@ -25,7 +25,7 @@
{
"related-to": "service-instance",
"relationship-label": "org.onap.relationships.inventory.ComposedOf",
- "related-link": "/aai/v12/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/bbs_service",
+ "related-link": "/aai/v23/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/bbs_service",
"relationship-data": [
{
"relationship-key": "customer.global-customer-id",
@@ -49,4 +49,4 @@
}
]
}
-} \ No newline at end of file
+}
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_configs/prh-config.json b/tests/dcaegen2/prh-testcases/resources/prh_configs/prh-config.json
index e8d6bb72..6a48e943 100644
--- a/tests/dcaegen2/prh-testcases/resources/prh_configs/prh-config.json
+++ b/tests/dcaegen2/prh-testcases/resources/prh_configs/prh-config.json
@@ -15,12 +15,12 @@
"dmaap.dmaapUpdateProducerConfiguration.dmaapUserName": "admin",
"dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword": "admin",
"dmaap.dmaapUpdateProducerConfiguration.dmaapContentType": "application/json",
- "aai.aaiClientConfiguration.pnfUrl": "https://aai:3334/aai/v12/network/pnfs/pnf",
- "aai.aaiClientConfiguration.baseUrl": "https://aai:3334/aai/v12",
+ "aai.aaiClientConfiguration.pnfUrl": "https://aai:3334/aai/v23/network/pnfs/pnf",
+ "aai.aaiClientConfiguration.baseUrl": "https://aai:3334/aai/v23",
"aai.aaiClientConfiguration.aaiUserName": "DCAE",
"aai.aaiClientConfiguration.aaiUserPassword": "DCAE",
"aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors": true,
- "aai.aaiClientConfiguration.aaiServiceInstancePath": "/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}",
+ "aai.aaiClientConfiguration.aaiServiceInstancePath": "/business/customers/customer/{{customer}}/service-subscriptions/service-subscription/{{serviceType}}/service-instances/service-instance/{{serviceInstanceId}}",
"aai.aaiClientConfiguration.aaiHeaders": {
"X-FromAppId": "prh",
"X-TransactionId": "9999",
@@ -56,4 +56,4 @@
}
}
}
-} \ No newline at end of file
+}
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_configs/prh-no-auth-config.json b/tests/dcaegen2/prh-testcases/resources/prh_configs/prh-no-auth-config.json
index 734a6f70..e4b88796 100644
--- a/tests/dcaegen2/prh-testcases/resources/prh_configs/prh-no-auth-config.json
+++ b/tests/dcaegen2/prh-testcases/resources/prh_configs/prh-no-auth-config.json
@@ -15,12 +15,12 @@
"dmaap.dmaapUpdateProducerConfiguration.dmaapUserName": "admin",
"dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword": "admin",
"dmaap.dmaapUpdateProducerConfiguration.dmaapContentType": "application/json",
- "aai.aaiClientConfiguration.pnfUrl": "http://aai:3333/aai/v12/network/pnfs/pnf",
- "aai.aaiClientConfiguration.baseUrl": "https://aai:3334/aai/v12",
+ "aai.aaiClientConfiguration.pnfUrl": "http://aai:3333/aai/v23/network/pnfs/pnf",
+ "aai.aaiClientConfiguration.baseUrl": "https://aai:3334/aai/v23",
"aai.aaiClientConfiguration.aaiUserName": "DCAE",
"aai.aaiClientConfiguration.aaiUserPassword": "DCAE",
"aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors": true,
- "aai.aaiClientConfiguration.aaiServiceInstancePath": "/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}",
+ "aai.aaiClientConfiguration.aaiServiceInstancePath": "/business/customers/customer/{{customer}}/service-subscriptions/service-subscription/{{serviceType}}/service-instances/service-instance/{{serviceInstanceId}}",
"aai.aaiClientConfiguration.aaiHeaders": {
"X-FromAppId": "prh",
"X-TransactionId": "9999",
@@ -56,4 +56,4 @@
}
}
}
-} \ 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 c53d5d1e..e3a5c2e4 100644
--- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot
+++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot
@@ -50,7 +50,7 @@ Verify missing AAI record is logged
${ves_event}= Get Data From File ${test_case_directory}/ves-event.json
Add PNF entry in AAI ${incorrect_aai_entry}
Set VES event in DMaaP ${ves_event}
- Wait for PRH log entry 20s Request failed for URL 'https://aai:3334/aai/v12/network/pnfs/pnf/NOK6061ZW8'. Response code: 404 Not Found
+ Wait for PRH log entry 20s Request failed for URL 'https://aai:3334/aai/v23/network/pnfs/pnf/NOK6061ZW8'. Response code: 404 Not Found
Verify AAI not responding is logged
[Arguments] ${test_case_directory}
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
index 05a4e19d..c6a320a3 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
@@ -108,25 +108,25 @@ class AAIHandler(BaseHTTPRequestHandler):
def do_GET(self):
try:
- if re.search('/aai/v12/network/pnfs/pnf/[^/]*$', self.path):
+ if re.search('/aai/v23/network/pnfs/pnf/[^/]*$', self.path):
pnf_name = basename(self.path)
if pnf_name in pnf_entries:
httpServerLib.set_response_200_ok(self, payload = pnf_entries[pnf_name])
- logger.debug('AAIHandler GET /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 200 OK')
+ logger.debug('AAIHandler GET /aai/v23/network/pnfs/pnf/' + pnf_name + ' -> 200 OK')
else:
httpServerLib.set_response_404_not_found(self)
- logger.info('AAIHandler GET /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 404 Not found, actual entries: ' + str(pnf_entries.keys()))
- elif re.search('/aai/v12/network/logical-links/logical-link/[^/]*$', self.path):
+ logger.info('AAIHandler GET /aai/v23/network/pnfs/pnf/' + pnf_name + ' -> 404 Not found, actual entries: ' + str(pnf_entries.keys()))
+ elif re.search('/aai/v23/network/logical-links/logical-link/[^/]*$', self.path):
logical_link_name = basename(self.path)
if json.loads(created_logical_link).get("link-name") == logical_link_name:
httpServerLib.set_response_200_ok(self, payload = created_logical_link)
- logger.debug('AAIHandler GET /aai/v12/network/logical-links/logical-link/' + logical_link_name + ' -> 200 OK')
+ logger.debug('AAIHandler GET /aai/v23/network/logical-links/logical-link/' + logical_link_name + ' -> 200 OK')
else:
httpServerLib.set_response_404_not_found(self)
- logger.info('AAIHandler GET /aai/v12/network/logical-links/logical-link/' + logical_link_name + ' -> 404 Not found, actual link: ' + created_logical_link)
- elif re.search('aai/v12/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/bbs_service', self.path):
+ logger.info('AAIHandler GET /aai/v23/network/logical-links/logical-link/' + logical_link_name + ' -> 404 Not found, actual link: ' + created_logical_link)
+ elif re.search('aai/v23/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/bbs_service', self.path):
httpServerLib.set_response_200_ok(self, payload = json.dumps(service_instance).encode('utf-8'))
- logger.debug('AAIHandler GET aai/v12/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/bbs_service -> 200 OK')
+ logger.debug('AAIHandler GET aai/v23/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/bbs_service -> 200 OK')
else:
httpServerLib.set_response_404_not_found(self)
logger.info('AAIHandler GET ' + self.path + ' -> 404 Not found')
@@ -136,17 +136,17 @@ class AAIHandler(BaseHTTPRequestHandler):
def do_PATCH(self):
try:
- if re.search('/aai/v12/network/pnfs/pnf/[^/]*$', self.path):
+ if re.search('/aai/v23/network/pnfs/pnf/[^/]*$', self.path):
pnf_name = basename(self.path)
if pnf_name in pnf_entries:
global patched_pnf
patched_pnf = httpServerLib.get_payload(self)
httpServerLib.set_response_200_ok(self)
- logger.debug('AAIHandler PATCH /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 200 OK')
+ logger.debug('AAIHandler PATCH /aai/v23/network/pnfs/pnf/' + pnf_name + ' -> 200 OK')
else:
httpServerLib.set_response_404_not_found(self)
- logger.info('AAIHandler PATCH /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 404 Not found, actual entries: ' + str(pnf_entries.keys()))
+ logger.info('AAIHandler PATCH /aai/v23/network/pnfs/pnf/' + pnf_name + ' -> 404 Not found, actual entries: ' + str(pnf_entries.keys()))
else:
httpServerLib.set_response_404_not_found(self)
logger.info('AAIHandler PATCH ' + self.path + ' -> 404 Not found')
@@ -156,14 +156,14 @@ class AAIHandler(BaseHTTPRequestHandler):
def do_PUT(self):
try:
- if re.search('/aai/v12/network/logical-links/logical-link/[^/]*$', self.path):
+ if re.search('/aai/v23/network/logical-links/logical-link/[^/]*$', self.path):
global created_logical_link
created_logical_link = httpServerLib.get_payload(self)
httpServerLib.set_response_200_ok(self)
logical_link_name = basename(self.path)
- logger.debug('AAIHandler PUT /aai/v12/network/logical-links/logical-link/' + logical_link_name + ' -> 200 OK')
+ logger.debug('AAIHandler PUT /aai/v23/network/logical-links/logical-link/' + logical_link_name + ' -> 200 OK')
else:
httpServerLib.set_response_404_not_found(self)
logger.info('AAIHandler PUT ' + self.path + ' -> 404 Not found')
@@ -173,7 +173,7 @@ class AAIHandler(BaseHTTPRequestHandler):
def do_DELETE(self):
try:
- if re.search('/aai/v12/network/logical-links/logical-link/[^/]*\?resource-version=\d+$', self.path):
+ if re.search('/aai/v23/network/logical-links/logical-link/[^/]*\?resource-version=\d+$', self.path):
httpServerLib.set_response_200_ok(self)
logical_link_name = re.search('.+?(?=\?)', basename(self.path)).group(0)
@@ -181,7 +181,7 @@ class AAIHandler(BaseHTTPRequestHandler):
if json.loads(created_logical_link).get("link-name") == logical_link_name:
created_logical_link = AAI_RESOURCE_NOT_FOUND
- logger.debug('AAIHandler DELETE /aai/v12/network/logical-links/logical-link/' + logical_link_name + ' -> 200 OK')
+ logger.debug('AAIHandler DELETE /aai/v23/network/logical-links/logical-link/' + logical_link_name + ' -> 200 OK')
else:
httpServerLib.set_response_404_not_found(self)
logger.info('AAIHandler DELETE ' + self.path + ' -> 404 Not found')
@@ -199,4 +199,4 @@ def _main_(handler_class=AAIHandler, protocol="HTTP/1.0"):
if __name__ == '__main__':
- _main_() \ No newline at end of file
+ _main_()