aboutsummaryrefslogtreecommitdiffstats
path: root/onap-client/onap_client/sdc/catalog/service_catalog.py
diff options
context:
space:
mode:
authorstark, steven <steven.stark@att.com>2021-01-04 11:40:12 -0800
committerstark, steven <steven.stark@att.com>2021-01-04 11:40:12 -0800
commit76144a9a772f50cb3ec80757d9f1c1ec119eee6a (patch)
tree72fdaa300f09c5aeaa7fc7eac0ab80b173e522ae /onap-client/onap_client/sdc/catalog/service_catalog.py
parente618989d37d8b786b5b0a9f2fa42bafa32475eed (diff)
[VVP] ONAP client performance improvement
First of multiple performance patches. Adding ability to cache data for use by the onap-client. Changing API call for SDC to get VF and Service models. Previously to find a service model, onap-client queried for all models and then searched by name. New api call to query by name, then find latest version. Issue-ID: VVP-503 Signed-off-by: stark, steven <steven.stark@att.com> Change-Id: I071cadbe52163f0b375bc81ac4a9fd640bd5ca4a
Diffstat (limited to 'onap-client/onap_client/sdc/catalog/service_catalog.py')
-rw-r--r--onap-client/onap_client/sdc/catalog/service_catalog.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/onap-client/onap_client/sdc/catalog/service_catalog.py b/onap-client/onap_client/sdc/catalog/service_catalog.py
index 8a3566c..32749ff 100644
--- a/onap-client/onap_client/sdc/catalog/service_catalog.py
+++ b/onap-client/onap_client/sdc/catalog/service_catalog.py
@@ -366,6 +366,24 @@ class ServiceCatalog(SDCClient):
},
"auth": self.auth,
},
+ "GET_SERVICE_BY_NAME_VERSION": {
+ "verb": "GET",
+ "description": "Gets a Service in the SDC catalog",
+ "uri": partial(
+ "{endpoint}{service_path}/serviceName/{catalog_service_name}/serviceVersion/{catalog_service_version}".format,
+ endpoint=self.config.sdc.SDC_BE_ENDPOINT,
+ service_path=self.config.sdc.SDC_CATALOG_SERVICES_PATH,
+ ),
+ "uri-parameters": ["catalog_service_name", "catalog_service_version"],
+ "success_code": 200,
+ "headers": {
+ "Accept": "application/json",
+ "Content-Type": "application/json",
+ "USER_ID": self.sdc_designer_user_id,
+ "X-FromAppId": self.config.application_id,
+ },
+ "auth": self.auth,
+ },
"GET_SDC_SERVICE": {
"verb": "GET",
"description": "Gets a service from the SDC Catalog",