Resolve pep8 violations caught by pep8 v1.7.0
This patch resolves new pep8 violations caught by pep8 v1.7.0. Change-Id: Ib1f1681d2872830f9c240e43d472f42b79a432a0
This commit is contained in:
parent
d071e0f4ff
commit
bd69198185
@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
@ -162,7 +164,5 @@ def main():
|
||||
resp.update(module.params)
|
||||
module.fail_json(msg='Failed Process', **resp)
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -13,6 +13,14 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
import glanceclient.client as glclient
|
||||
import keystoneclient.v3.client as ksclient
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: glance
|
||||
@ -86,10 +94,6 @@ EXAMPLES = """
|
||||
"""
|
||||
|
||||
|
||||
import glanceclient.client as glclient
|
||||
import keystoneclient.v3.client as ksclient
|
||||
|
||||
|
||||
COMMAND_MAP = {'image-list': 'list_images',
|
||||
'image-create': 'create_image'}
|
||||
|
||||
@ -228,6 +232,5 @@ def main():
|
||||
mg = ManageGlance(module)
|
||||
mg.route()
|
||||
|
||||
from ansible.module_utils.basic import *
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -881,8 +881,8 @@ class ManageKeystone(object):
|
||||
# NOTE(sigmavirus24): Try to get the project_name, but
|
||||
# don't error out on it. This will change when the playbooks are
|
||||
# updated to use project_name instead of tenant_name
|
||||
project_name = (variables_dict.pop('project_name', None)
|
||||
or variables_dict.pop('tenant_name'))
|
||||
project_name = (variables_dict.pop('project_name', None) or
|
||||
variables_dict.pop('tenant_name'))
|
||||
role_name = variables_dict.pop('role_name')
|
||||
|
||||
user, project, role, group = self._get_role_data(
|
||||
|
@ -29,6 +29,8 @@ try:
|
||||
except ImportError:
|
||||
ENCRYPT_IMPORT = False
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
@ -592,7 +594,5 @@ def main():
|
||||
ms = Memcached(module=module)
|
||||
ms.router()
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -15,6 +15,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
import hashlib
|
||||
import platform
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: name2int
|
||||
@ -37,9 +44,6 @@ EXAMPLES = """
|
||||
name: "Some-hostname.com"
|
||||
"""
|
||||
|
||||
import hashlib
|
||||
import platform
|
||||
|
||||
|
||||
class HashHostname(object):
|
||||
def __init__(self, module):
|
||||
@ -71,7 +75,5 @@ def main():
|
||||
resp = {'stderr': exp}
|
||||
module.fail_json(msg='Failed Process', **resp)
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -13,6 +13,14 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
import keystoneclient.v3.client as ksclient
|
||||
from neutronclient.neutron import client as nclient
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: neutron
|
||||
@ -114,10 +122,6 @@ EXAMPLES = """
|
||||
"""
|
||||
|
||||
|
||||
import keystoneclient.v3.client as ksclient
|
||||
from neutronclient.neutron import client as nclient
|
||||
|
||||
|
||||
COMMAND_MAP = {
|
||||
'create_network': {
|
||||
'variables': [
|
||||
@ -414,6 +418,5 @@ def main():
|
||||
mn = ManageNeutron(module)
|
||||
mn.command_router()
|
||||
|
||||
from ansible.module_utils.basic import *
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -15,6 +15,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: provider_networks
|
||||
@ -274,7 +279,5 @@ def main():
|
||||
resp = {'stderr': exp}
|
||||
module.fail_json(msg='Failed Process', **resp)
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -15,6 +15,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: keystone_sp
|
||||
@ -111,7 +116,5 @@ def main():
|
||||
resp = {'stderr': exp}
|
||||
module.fail_json(msg='Failed Process', **resp)
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -180,8 +180,8 @@ def get_groups_for_container(inventory, container_name):
|
||||
# Beware, this dictionary comprehension requires Python 2.7, but we should
|
||||
# have this on openstack-ansible hosts already.
|
||||
groups = {k for (k, v) in inventory.items() if
|
||||
('hosts' in v
|
||||
and container_name in v['hosts'])}
|
||||
('hosts' in v and
|
||||
container_name in v['hosts'])}
|
||||
return groups
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user