aboutsummaryrefslogtreecommitdiffstats
path: root/onap-client
diff options
context:
space:
mode:
authorstark, steven <steven.stark@att.com>2020-11-17 12:02:50 -0800
committerstark, steven <steven.stark@att.com>2020-11-17 12:02:50 -0800
commite618989d37d8b786b5b0a9f2fa42bafa32475eed (patch)
treeadc989060dce1405908eb22b4c79f45974d21390 /onap-client
parent8d35775b374116182a5262fa6249c989d3d7509e (diff)
[VVP] Add urllib3 retry to OC requestsguilin
Adding retry to OC for requests. - Retry limit is 3, back_off time is 2.5, 5, then 10 seconds for last retry. Fixing an issue w/ delete SI payload. Removing auto-generated X-Transaction-ID header from SDC requests. Issue-ID: VVP-487 Signed-off-by: stark, steven <steven.stark@att.com> Change-Id: I3eb2b3b65ce00307066867f65f2ef9a03f7d5524
Diffstat (limited to 'onap-client')
-rw-r--r--onap-client/onap_client/client/request.py16
-rw-r--r--onap-client/onap_client/etc/payloads/so_delete_service.jinja5
-rw-r--r--onap-client/onap_client/sdc/catalog/license_model_catalog.py11
-rw-r--r--onap-client/onap_client/sdc/catalog/service_catalog.py20
-rw-r--r--onap-client/onap_client/sdc/catalog/vnf_catalog.py21
-rw-r--r--onap-client/onap_client/sdc/catalog/vsp_catalog.py14
-rw-r--r--onap-client/onap_client/so/catalog/service_instantiation.py1
-rw-r--r--onap-client/onap_client/so/service_instance.py2
-rw-r--r--onap-client/setup.py2
9 files changed, 22 insertions, 70 deletions
diff --git a/onap-client/onap_client/client/request.py b/onap-client/onap_client/client/request.py
index 6563fb8..fa9bf15 100644
--- a/onap-client/onap_client/client/request.py
+++ b/onap-client/onap_client/client/request.py
@@ -45,6 +45,8 @@ import logging as logger
from onap_client.client.response import ResponseHandler
from onap_client.exceptions import FilesRequestFailure
from jinja2 import exceptions as jinja_exceptions
+from requests.adapters import HTTPAdapter
+from urllib3.util.retry import Retry
class RequestHandler:
@@ -112,7 +114,19 @@ class Request:
logger.info(debug_request)
def request(self, verify=True):
- return requests.request(**self.kwargs, verify=verify)
+ http = requests.Session()
+ retry_strategy = Retry(
+ total=3,
+ backoff_factor=5,
+ status_forcelist=[404, 429, 500, 501, 502, 503, 504],
+ method_whitelist=["HEAD", "GET", "PUT", "DELETE", "OPTIONS", "TRACE", "POST"],
+ raise_on_status=False
+ )
+ adapter = HTTPAdapter(max_retries=retry_strategy)
+ http.mount("https://", adapter)
+ http.mount("http://", adapter)
+
+ return http.request(**self.kwargs, verify=verify)
class APICatalogRequestObject:
diff --git a/onap-client/onap_client/etc/payloads/so_delete_service.jinja b/onap-client/onap_client/etc/payloads/so_delete_service.jinja
index 21bcc7f..af582e7 100644
--- a/onap-client/onap_client/etc/payloads/so_delete_service.jinja
+++ b/onap-client/onap_client/etc/payloads/so_delete_service.jinja
@@ -5,10 +5,11 @@
"requestorId": "cs0008"
},
"modelInfo": {
- "modelType": "vnf",
+ "modelType": "service",
"modelInvariantId": "{{service_invariant_id}}",
"modelName": "{{service_name}}",
- "modelVersion": "{{service_version}}"
+ "modelVersion": "{{service_version}}",
+ "modelVersionId": "{{service_model_version_id}}"
},
"requestParameters": {
"testApi": "{{api_type}}"
diff --git a/onap-client/onap_client/sdc/catalog/license_model_catalog.py b/onap-client/onap_client/sdc/catalog/license_model_catalog.py
index 87a9346..484598c 100644
--- a/onap-client/onap_client/sdc/catalog/license_model_catalog.py
+++ b/onap-client/onap_client/sdc/catalog/license_model_catalog.py
@@ -34,7 +34,6 @@
# limitations under the License.
#
# ============LICENSE_END============================================
-import uuid
from functools import partial
from onap_client.sdc.client import SDCClient
@@ -63,7 +62,6 @@ class LicenseModelClient(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {
@@ -92,7 +90,6 @@ class LicenseModelClient(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"key_group_id": ("value",)},
@@ -118,7 +115,6 @@ class LicenseModelClient(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"entitlement_pool_id": ("value",)},
@@ -145,7 +141,6 @@ class LicenseModelClient(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"feature_group_id": ("value",)},
@@ -167,7 +162,6 @@ class LicenseModelClient(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"license_agreement_id": ("value",)},
@@ -189,7 +183,6 @@ class LicenseModelClient(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -208,7 +201,6 @@ class LicenseModelClient(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {
@@ -232,7 +224,6 @@ class LicenseModelClient(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -251,7 +242,6 @@ class LicenseModelClient(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -269,7 +259,6 @@ class LicenseModelClient(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"results": ("results",)},
diff --git a/onap-client/onap_client/sdc/catalog/service_catalog.py b/onap-client/onap_client/sdc/catalog/service_catalog.py
index 33fb8be..8a3566c 100644
--- a/onap-client/onap_client/sdc/catalog/service_catalog.py
+++ b/onap-client/onap_client/sdc/catalog/service_catalog.py
@@ -34,7 +34,6 @@
# limitations under the License.
#
# ============LICENSE_END============================================
-import uuid
from functools import partial
from onap_client.sdc.client import SDCClient
@@ -79,7 +78,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"catalog_service_id": ("uniqueId",)},
@@ -99,7 +97,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"catalog_service_id": ("uniqueId",)},
@@ -128,7 +125,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"catalog_resource_instance_id": ("uniqueId",)},
@@ -148,7 +144,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -171,7 +166,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -192,7 +186,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -213,7 +206,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -234,7 +226,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_tester_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -255,7 +246,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_tester_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"catalog_service_id": ("uniqueId",)},
@@ -277,7 +267,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_governor_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -297,7 +286,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_ops_user_id,
- # "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -326,7 +314,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -353,7 +340,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -376,7 +362,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -395,7 +380,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -413,7 +397,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"services": ("services",)},
@@ -433,7 +416,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -452,7 +434,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -471,7 +452,6 @@ class ServiceCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
diff --git a/onap-client/onap_client/sdc/catalog/vnf_catalog.py b/onap-client/onap_client/sdc/catalog/vnf_catalog.py
index b04b0f5..fe1a251 100644
--- a/onap-client/onap_client/sdc/catalog/vnf_catalog.py
+++ b/onap-client/onap_client/sdc/catalog/vnf_catalog.py
@@ -34,7 +34,6 @@
# limitations under the License.
#
# ============LICENSE_END============================================
-import uuid
from functools import partial
from onap_client.sdc.client import SDCClient
@@ -71,7 +70,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"catalog_resource_id": ("uniqueId",)},
@@ -93,7 +91,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"catalog_resource_id": ("uniqueId",)},
@@ -121,7 +118,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -142,7 +138,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -161,7 +156,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -190,7 +184,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -219,7 +212,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -238,7 +230,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"catalog_resource_id": ("uniqueId",)},
@@ -258,7 +249,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -285,7 +275,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -304,7 +293,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"catalog_resource_id": ("uniqueId",)},
@@ -334,7 +322,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -355,7 +342,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -376,7 +362,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -405,7 +390,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -435,7 +419,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -454,7 +437,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -473,7 +455,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"catalog_resource_name": ("name",)},
@@ -493,7 +474,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -511,7 +491,6 @@ class VNFCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"resources": ("resources",)},
diff --git a/onap-client/onap_client/sdc/catalog/vsp_catalog.py b/onap-client/onap_client/sdc/catalog/vsp_catalog.py
index 19ca631..8c8df2f 100644
--- a/onap-client/onap_client/sdc/catalog/vsp_catalog.py
+++ b/onap-client/onap_client/sdc/catalog/vsp_catalog.py
@@ -34,7 +34,6 @@
# limitations under the License.
#
# ============LICENSE_END============================================
-import uuid
from functools import partial
from onap_client.sdc.client import SDCClient
@@ -73,7 +72,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {
@@ -100,7 +98,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -120,7 +117,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "multipart/form-data",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -139,7 +135,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -160,7 +155,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -181,7 +175,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -200,7 +193,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"name": ("name",)},
@@ -220,7 +212,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"name": ("name",)},
@@ -240,7 +231,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {
@@ -262,7 +252,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"return_data": {"results": ("results",)},
@@ -282,7 +271,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -303,7 +291,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
@@ -324,7 +311,6 @@ class VSPCatalog(SDCClient):
"Accept": "application/json",
"Content-Type": "application/json",
"USER_ID": self.sdc_designer_user_id,
- "X-TransactionId": str(uuid.uuid4()),
"X-FromAppId": self.config.application_id,
},
"auth": self.auth,
diff --git a/onap-client/onap_client/so/catalog/service_instantiation.py b/onap-client/onap_client/so/catalog/service_instantiation.py
index e18aca1..cab0443 100644
--- a/onap-client/onap_client/so/catalog/service_instantiation.py
+++ b/onap-client/onap_client/so/catalog/service_instantiation.py
@@ -97,6 +97,7 @@ class ServiceInstantiationClient(SOClient):
"service_invariant_id",
"service_name",
"service_version",
+ "service_model_version_id",
"api_type",
],
"header-parameters": ["X-TransactionId"],
diff --git a/onap-client/onap_client/so/service_instance.py b/onap-client/onap_client/so/service_instance.py
index 5441d84..2b1774d 100644
--- a/onap-client/onap_client/so/service_instance.py
+++ b/onap-client/onap_client/so/service_instance.py
@@ -194,12 +194,14 @@ def delete_service_instance(service_instance_name, api_type="GR_API", oc=None):
si_id = si.get("service-instance-id")
invariant_id = si.get("service-data").get("service-information").get("onap-model-information").get("model-invariant-uuid")
version = si.get("service-data").get("service-information").get("onap-model-information").get("model-version")
+ version_id = si.get("service-data").get("service-information").get("onap-model-information").get("model-uuid")
return oc.so.service_instantiation.delete_service_instance(
service_invariant_id=invariant_id,
service_name=service_instance_name,
service_version=version,
service_instance_id=si_id,
+ service_model_version_id=version_id,
api_type=api_type,
).response_data
diff --git a/onap-client/setup.py b/onap-client/setup.py
index 9635c4d..0b4dae0 100644
--- a/onap-client/setup.py
+++ b/onap-client/setup.py
@@ -43,7 +43,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="onap-client",
- version="1.3.0",
+ version="1.4.0",
author="Steven Stark",
author_email="steven.stark@att.com",
description="Python API wrapper for ONAP applications",