Fix linters
Change-Id: I1f7f3d920f1017d1d5e0c4c11c3544677d992a7c
This commit is contained in:
parent
0c40af3d4a
commit
3d92c7da03
|
@ -566,8 +566,8 @@ class ManageKeystone(object):
|
||||||
endpoint = variables_dict.pop('endpoint')
|
endpoint = variables_dict.pop('endpoint')
|
||||||
login_user = variables_dict.pop('login_user')
|
login_user = variables_dict.pop('login_user')
|
||||||
login_password = variables_dict.pop('login_password')
|
login_password = variables_dict.pop('login_password')
|
||||||
login_project_name = (variables_dict.pop('login_project_name', None) or
|
login_project_name = (variables_dict.pop('login_project_name', None)
|
||||||
variables_dict.pop('login_tenant_name'))
|
or variables_dict.pop('login_tenant_name'))
|
||||||
user_domain_name = variables_dict.pop('login_user_domain_name',
|
user_domain_name = variables_dict.pop('login_user_domain_name',
|
||||||
'Default')
|
'Default')
|
||||||
project_domain_name = variables_dict.pop('login_project_domain_name',
|
project_domain_name = variables_dict.pop('login_project_domain_name',
|
||||||
|
@ -667,8 +667,8 @@ class ManageKeystone(object):
|
||||||
"""
|
"""
|
||||||
self._authenticate()
|
self._authenticate()
|
||||||
variables_dict = self._get_vars(variables)
|
variables_dict = self._get_vars(variables)
|
||||||
project_name = (variables_dict.pop('project_name', None) or
|
project_name = (variables_dict.pop('project_name', None)
|
||||||
variables_dict.pop('tenant_name'))
|
or variables_dict.pop('tenant_name'))
|
||||||
project = self._get_project(name=project_name)
|
project = self._get_project(name=project_name)
|
||||||
if project is None:
|
if project is None:
|
||||||
self.failure(
|
self.failure(
|
||||||
|
@ -692,8 +692,8 @@ class ManageKeystone(object):
|
||||||
"""
|
"""
|
||||||
self._authenticate()
|
self._authenticate()
|
||||||
variables_dict = self._get_vars(variables)
|
variables_dict = self._get_vars(variables)
|
||||||
project_name = (variables_dict.pop('project_name', None) or
|
project_name = (variables_dict.pop('project_name', None)
|
||||||
variables_dict.pop('tenant_name'))
|
or variables_dict.pop('tenant_name'))
|
||||||
project_description = variables_dict.pop('description')
|
project_description = variables_dict.pop('description')
|
||||||
if project_description is None:
|
if project_description is None:
|
||||||
project_description = 'Project %s' % project_name
|
project_description = 'Project %s' % project_name
|
||||||
|
@ -757,8 +757,8 @@ class ManageKeystone(object):
|
||||||
self._authenticate()
|
self._authenticate()
|
||||||
required_vars = ['user_name', 'password']
|
required_vars = ['user_name', 'password']
|
||||||
variables_dict = self._get_vars(variables, required=required_vars)
|
variables_dict = self._get_vars(variables, required=required_vars)
|
||||||
project_name = (variables_dict.pop('project_name', None) or
|
project_name = (variables_dict.pop('project_name', None)
|
||||||
variables_dict.pop('tenant_name'))
|
or variables_dict.pop('tenant_name'))
|
||||||
password = variables_dict.pop('password')
|
password = variables_dict.pop('password')
|
||||||
user_name = variables_dict.pop('user_name')
|
user_name = variables_dict.pop('user_name')
|
||||||
email = variables_dict.pop('email')
|
email = variables_dict.pop('email')
|
||||||
|
@ -933,8 +933,8 @@ class ManageKeystone(object):
|
||||||
# NOTE(sigmavirus24): Try to get the project_name, but
|
# NOTE(sigmavirus24): Try to get the project_name, but
|
||||||
# don't error out on it. This will change when the playbooks are
|
# don't error out on it. This will change when the playbooks are
|
||||||
# updated to use project_name instead of tenant_name
|
# updated to use project_name instead of tenant_name
|
||||||
project_name = (variables_dict.pop('project_name', None) or
|
project_name = (variables_dict.pop('project_name', None)
|
||||||
variables_dict.pop('tenant_name'))
|
or variables_dict.pop('tenant_name'))
|
||||||
role_name = variables_dict.pop('role_name')
|
role_name = variables_dict.pop('role_name')
|
||||||
|
|
||||||
if project_name is not None:
|
if project_name is not None:
|
||||||
|
|
|
@ -594,5 +594,6 @@ def main():
|
||||||
ms = Memcached(module=module)
|
ms = Memcached(module=module)
|
||||||
ms.router()
|
ms.router()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -216,8 +216,8 @@ class ProviderNetworksParsing(object):
|
||||||
if (
|
if (
|
||||||
set(
|
set(
|
||||||
net["network"]["group_binds"]
|
net["network"]["group_binds"]
|
||||||
).intersection(group_names) or
|
).intersection(group_names)
|
||||||
"neutron_server" in group_names
|
or "neutron_server" in group_names
|
||||||
):
|
):
|
||||||
if "vlan" not in self.network_types:
|
if "vlan" not in self.network_types:
|
||||||
self.network_types.append('vlan')
|
self.network_types.append('vlan')
|
||||||
|
@ -239,8 +239,8 @@ class ProviderNetworksParsing(object):
|
||||||
if (
|
if (
|
||||||
set(
|
set(
|
||||||
net["network"]["group_binds"]
|
net["network"]["group_binds"]
|
||||||
).intersection(group_names) or
|
).intersection(group_names)
|
||||||
"neutron_server" in group_names
|
or "neutron_server" in group_names
|
||||||
):
|
):
|
||||||
if "flat" not in self.network_types:
|
if "flat" not in self.network_types:
|
||||||
self.network_types.append('flat')
|
self.network_types.append('flat')
|
||||||
|
@ -363,5 +363,6 @@ def main():
|
||||||
resp = {'stderr': exp}
|
resp = {'stderr': exp}
|
||||||
module.fail_json(msg='Failed Process', **resp)
|
module.fail_json(msg='Failed Process', **resp)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -60,7 +60,7 @@ commands =
|
||||||
# Ignores the following rules due to how ansible modules work in general
|
# Ignores the following rules due to how ansible modules work in general
|
||||||
# F403 'from ansible.module_utils.basic import *' used;
|
# F403 'from ansible.module_utils.basic import *' used;
|
||||||
# unable to detect undefined names
|
# unable to detect undefined names
|
||||||
ignore=F403
|
ignore=F403,F405,W503
|
||||||
|
|
||||||
[testenv:bashate]
|
[testenv:bashate]
|
||||||
commands =
|
commands =
|
||||||
|
|
Loading…
Reference in New Issue