diff options
author | stark, steven <steven.stark@att.com> | 2020-11-17 12:02:50 -0800 |
---|---|---|
committer | stark, steven <steven.stark@att.com> | 2020-11-17 12:02:50 -0800 |
commit | e618989d37d8b786b5b0a9f2fa42bafa32475eed (patch) | |
tree | adc989060dce1405908eb22b4c79f45974d21390 /onap-client/onap_client/sdc | |
parent | 8d35775b374116182a5262fa6249c989d3d7509e (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/onap_client/sdc')
4 files changed, 0 insertions, 66 deletions
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, |