diff options
author | Marcin Migdal <marcin.migdal@nokia.com> | 2019-06-17 15:22:44 +0200 |
---|---|---|
committer | Marcin Migdal <marcin.migdal@nokia.com> | 2019-06-17 16:28:58 +0200 |
commit | d2448926e5249bad8ded624bb6bda61f22087f2d (patch) | |
tree | f7b607998d64f4cb3ff5776820c506ed55e07917 /tests/dcaegen2/prh-testcases/resources/simulator | |
parent | ec1d73a19c4fb2e8620b84ea533c6af584a817ce (diff) |
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 <marcin.migdal@nokia.com>
Diffstat (limited to 'tests/dcaegen2/prh-testcases/resources/simulator')
-rw-r--r-- | tests/dcaegen2/prh-testcases/resources/simulator/AAI.py | 13 |
1 files changed, 13 insertions, 0 deletions
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') |