mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Assorted pylint fixes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# (c) 2016, Gregory Shulov (gregory.shulov@gmail.com)
|
||||
# Copyright: (c) 2016, Gregory Shulov (gregory.shulov@gmail.com)
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
@@ -182,7 +182,7 @@ def main():
|
||||
export = get_export(module, filesystem, system)
|
||||
|
||||
if filesystem is None:
|
||||
module.fail_json(msg='Filesystem {} not found'.format(module.params['filesystem']))
|
||||
module.fail_json(msg='Filesystem {0} not found'.format(module.params['filesystem']))
|
||||
|
||||
if state == 'present':
|
||||
update_export(module, export, filesystem, system)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# (c) 2016, Gregory Shulov (gregory.shulov@gmail.com)
|
||||
# Copyright: (c) 2016, Gregory Shulov (gregory.shulov@gmail.com)
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
@@ -108,7 +108,7 @@ def get_export(module, system):
|
||||
try:
|
||||
export = system.exports.get(export_path=module.params['export'])
|
||||
except Exception:
|
||||
module.fail_json(msg="Export with export path {} not found".format(module.params['export']))
|
||||
module.fail_json(msg="Export with export path {0} not found".format(module.params['export']))
|
||||
|
||||
return export
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# (c) 2016, Gregory Shulov (gregory.shulov@gmail.com)
|
||||
# Copyright: (c) 2016, Gregory Shulov (gregory.shulov@gmail.com)
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
@@ -155,7 +155,7 @@ def main():
|
||||
filesystem = get_filesystem(module, system)
|
||||
|
||||
if pool is None:
|
||||
module.fail_json(msg='Pool {} not found'.format(module.params['pool']))
|
||||
module.fail_json(msg='Pool {0} not found'.format(module.params['pool']))
|
||||
|
||||
if state == 'present' and not filesystem:
|
||||
create_filesystem(module, system)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# (c) 2016, Gregory Shulov (gregory.shulov@gmail.com)
|
||||
# Copyright: (c) 2016, Gregory Shulov (gregory.shulov@gmail.com)
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
@@ -144,7 +144,7 @@ def main():
|
||||
try:
|
||||
system.volumes.get(name=module.params['volume'])
|
||||
except Exception:
|
||||
module.fail_json(msg='Volume {} not found'.format(module.params['volume']))
|
||||
module.fail_json(msg='Volume {0} not found'.format(module.params['volume']))
|
||||
|
||||
if host and state == 'present':
|
||||
update_host(module, host)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# (c) 2016, Gregory Shulov (gregory.shulov@gmail.com)
|
||||
# Copyright: (c) 2016, Gregory Shulov (gregory.shulov@gmail.com)
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
@@ -150,7 +150,7 @@ def main():
|
||||
volume = get_volume(module, system)
|
||||
|
||||
if pool is None:
|
||||
module.fail_json(msg='Pool {} not found'.format(module.params['pool']))
|
||||
module.fail_json(msg='Pool {0} not found'.format(module.params['pool']))
|
||||
|
||||
if state == 'present' and not volume:
|
||||
create_volume(module, system)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# (c) 2017, Simon Dodsley (simon@purestorage.com)
|
||||
# Copyright: (c) 2017, Simon Dodsley (simon@purestorage.com)
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
@@ -341,7 +341,7 @@ def main():
|
||||
try:
|
||||
array.get_volume(module.params['volume'])
|
||||
except Exception:
|
||||
module.fail_json(msg='Volume {} not found'.format(module.params['volume']))
|
||||
module.fail_json(msg='Volume {0} not found'.format(module.params['volume']))
|
||||
|
||||
if host is None and state == 'present':
|
||||
make_host(module, array)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# (c) 2017, Simon Dodsley (simon@purestorage.com)
|
||||
# Copyright: (c) 2017, Simon Dodsley (simon@purestorage.com)
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
@@ -320,14 +320,14 @@ def main():
|
||||
for hst in module.params['host']:
|
||||
array.get_host(hst)
|
||||
except Exception:
|
||||
module.fail_json(msg='Host {} not found'.format(hst))
|
||||
module.fail_json(msg='Host {0} not found'.format(hst))
|
||||
|
||||
if module.params['hostgroup']:
|
||||
try:
|
||||
for hstg in module.params['hostgroup']:
|
||||
array.get_hgroup(hstg)
|
||||
except Exception:
|
||||
module.fail_json(msg='Hostgroup {} not found'.format(hstg))
|
||||
module.fail_json(msg='Hostgroup {0} not found'.format(hstg))
|
||||
|
||||
if pgroup and state == 'present':
|
||||
update_pgroup(module, array)
|
||||
|
||||
Reference in New Issue
Block a user