def _return_deque(deque=None, item=None): if not deque: deque = collections.deque() if isinstance(item, list) or isinstance(item, collections.deque): deque.extend(item) elif utils.check_basestring(item=item): deque.append(item) return deque
def check_auth_plugin(job_args): _plugins = job_args.get('auth_plugins') for name, value in turbolift.auth_plugins(auth_plugins=_plugins).items(): auth_plugin = job_args.get(name) if auth_plugin: value.pop('args', None) job_args.update(value) job_args['os_auth_url'] = value.get('os_auth_url') if baseutils.check_basestring(item=auth_plugin): job_args['os_region'] = auth_plugin % {'region': auth_plugin} LOG.debug('Auth Plugin Loaded: [ %s ]', name) return job_args else: return job_args
def check_auth_plugin(job_args): _plugins = job_args.get("auth_plugins") for name, value in turbolift.auth_plugins(auth_plugins=_plugins).items(): auth_plugin = job_args.get(name) if auth_plugin: value.pop("args", None) job_args.update(value) job_args["os_auth_url"] = value.get("os_auth_url") if baseutils.check_basestring(item=auth_plugin): job_args["os_region"] = auth_plugin % {"region": auth_plugin} LOG.debug("Auth Plugin Loaded: [ %s ]", name) return job_args else: return job_args
def check_auth_plugin(job_args): _plugins = job_args.get('auth_plugins') for name, value in turbolift.auth_plugins(auth_plugins=_plugins).items(): auth_plugin = job_args.get(name) if auth_plugin: value.pop('args', None) job_args.update(value) job_args['os_auth_url'] = value.get('os_auth_url') if baseutils.check_basestring(item=auth_plugin): job_args['os_region'] = auth_plugin % { 'region': auth_plugin } LOG.debug('Auth Plugin Loaded: [ %s ]', name) return job_args else: return job_args