From 27fb783ccc2ecf6e7d2418eabc1d23c040b57d95 Mon Sep 17 00:00:00 2001 From: "stark, steven" Date: Mon, 11 Jan 2021 09:46:00 -0800 Subject: [VVP] Consolidate api calls in OC Issue-ID: VVP-504 Signed-off-by: stark, steven Change-Id: Idf1f656a836b65447b11a342ed5639589daf83e3 --- onap-client/onap_client/lib.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'onap-client/onap_client/lib.py') diff --git a/onap-client/onap_client/lib.py b/onap-client/onap_client/lib.py index 02641ce..32f5ef5 100644 --- a/onap-client/onap_client/lib.py +++ b/onap-client/onap_client/lib.py @@ -52,15 +52,19 @@ def make_request(catalog_item, attempts, verify_request, **kwargs): :return: ResponseHandler object with response data from request """ - request_input = validate_request(catalog_item, kwargs) - - catalog_request = APICatalogRequestObject(catalog_item, **request_input,) + catalog_request = get_request_object(catalog_item, **kwargs) request_handler = RequestHandler(catalog_request) return request_handler.make_request(attempts, verify_request) +def get_request_object(catalog_item, **kwargs): + request_input = validate_request(catalog_item, kwargs) + + return APICatalogRequestObject(catalog_item, **request_input) + + def validate_request(catalog_item, kwargs): request_input = {} -- cgit 1.2.3-korg