From d2448926e5249bad8ded624bb6bda61f22087f2d Mon Sep 17 00:00:00 2001 From: Marcin Migdal Date: Mon, 17 Jun 2019 15:22:44 +0200 Subject: BBE re-registration added aai entry service instance armed aai-entry armed expected-logical-link armed AAI simulator armed RF test keywod Change-Id: If894fce80d40b05fc9f75e22ee96cddb7621423a Issue-ID: INT-1100 Signed-off-by: Marcin Migdal --- tests/dcaegen2/prh-testcases/resources/simulator/AAI.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/dcaegen2/prh-testcases/resources/simulator/AAI.py') diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py index 9b76adf8..f6d3b1f6 100644 --- a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py +++ b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py @@ -22,6 +22,7 @@ AAI_RESOURCE_NOT_FOUND = b'{}' pnf_entries = {} patched_pnf = AAI_RESOURCE_NOT_FOUND created_logical_link = AAI_RESOURCE_NOT_FOUND +service_instance = AAI_RESOURCE_NOT_FOUND class AAISetup(BaseHTTPRequestHandler): @@ -53,6 +54,13 @@ class AAISetup(BaseHTTPRequestHandler): httpServerLib.set_response_200_ok(self) logger.debug('AAISetup PUT /setup/add_pnf_entry [' + pnf_name + '] -> 200 OK') + elif re.search('/setup/add_service_instace', self.path): + service_instance_payload = httpServerLib.get_payload(self) + global service_instance + service_instance = json.loads(service_instance_payload) + httpServerLib.set_response_200_ok(self) + logger.debug('AAISetup PUT /setup/add_service_instace -> 200 OK') + elif re.search('/set_pnf', self.path): pnf_name = httpServerLib.get_payload(self).decode() pnf_entries[pnf_name] = AAI_RESOURCE_NOT_FOUND @@ -70,9 +78,11 @@ class AAISetup(BaseHTTPRequestHandler): global pnf_entries global patched_pnf global created_logical_link + global service_instance pnf_entries = {} patched_pnf = AAI_RESOURCE_NOT_FOUND created_logical_link = AAI_RESOURCE_NOT_FOUND + service_instance = AAI_RESOURCE_NOT_FOUND httpServerLib.set_response_200_ok(self) logger.debug('AAISetup POST /reset -> 200 OK') @@ -95,6 +105,9 @@ class AAIHandler(BaseHTTPRequestHandler): 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/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/bbs_service', self.path): + httpServerLib.set_response_200_ok(self, payload = service_instance) + logger.debug('AAIHandler GET aai/v12/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') -- cgit 1.2.3-korg