Allow to pass cinderv3 internal params
This patch allows to pass number of retries to cinderv3 module
via connection_params.
cinder:
controller:
client:
connection_params:
connect_retries: 2
connect_retry_delay: 10
client:
connection_params:
connect_retries: 2
connect_retry_delay: 10
* Remove dead code from cinder.client
* Increase default retries to 60sec
Change-Id: I27aa89d95ac82b12fcb919f74e09877fb01e96de
Related-Prod: PROD-25982
diff --git a/_modules/cinderv3/common.py b/_modules/cinderv3/common.py
index bc77cd9..df419e9 100644
--- a/_modules/cinderv3/common.py
+++ b/_modules/cinderv3/common.py
@@ -65,9 +65,11 @@
def send(method):
def wrap(func):
def wrapped_f(*args, **kwargs):
- connect_retries = 30
- connect_retry_delay = 1
cloud_name = kwargs.pop('cloud_name')
+ connection_params = kwargs.pop('connection_params', {}) or {}
+ connect_retries = connection_params.get('connect_retries', 60)
+ connect_retry_delay = connection_params.get('connect_retry_delay',
+ 1)
if not cloud_name:
e = NoCredentials()
log.error('%s' % e)