diff options
Diffstat (limited to 'tests/dcaegen2/prh-testcases/resources')
4 files changed, 25 insertions, 25 deletions
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_() |