mirror of https://github.com/ceph/ceph-ansible.git
library: remove unused module import
Move the import at the top of the file and remove unused module import.
- E402 module level import not at top of file
- F401 'xxxx' imported but unused
This also removes the '# noqa E402' statement from the code.
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 2138a00a32
)
pull/6786/head
parent
c475d84310
commit
9ee44013c5
|
@ -15,6 +15,11 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
import datetime
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.1',
|
'metadata_version': '1.1',
|
||||||
|
@ -103,13 +108,6 @@ EXAMPLES = '''
|
||||||
|
|
||||||
RETURN = '''# '''
|
RETURN = '''# '''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule # noqa: E402
|
|
||||||
import datetime # noqa: E402
|
|
||||||
import json # noqa: E402
|
|
||||||
import os # noqa: E402
|
|
||||||
import stat # noqa: E402
|
|
||||||
import time # noqa: E402
|
|
||||||
|
|
||||||
|
|
||||||
def container_exec(binary, container_image, interactive=False):
|
def container_exec(binary, container_image, interactive=False):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -15,6 +15,11 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
import datetime
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.1',
|
'metadata_version': '1.1',
|
||||||
|
@ -91,13 +96,6 @@ EXAMPLES = '''
|
||||||
|
|
||||||
RETURN = '''# '''
|
RETURN = '''# '''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule # noqa: E402
|
|
||||||
import datetime # noqa: E402
|
|
||||||
import json # noqa: E402
|
|
||||||
import os # noqa: E402
|
|
||||||
import stat # noqa: E402
|
|
||||||
import time # noqa: E402
|
|
||||||
|
|
||||||
|
|
||||||
def container_exec(binary, container_image):
|
def container_exec(binary, container_image):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -17,6 +17,15 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
import datetime
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import struct
|
||||||
|
import time
|
||||||
|
import base64
|
||||||
|
import socket
|
||||||
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.1',
|
'metadata_version': '1.1',
|
||||||
|
@ -175,17 +184,6 @@ caps:
|
||||||
|
|
||||||
RETURN = '''# '''
|
RETURN = '''# '''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule # noqa: E402
|
|
||||||
import datetime # noqa: E402
|
|
||||||
import grp # noqa: E402
|
|
||||||
import json # noqa: E402
|
|
||||||
import os # noqa: E402
|
|
||||||
import pwd # noqa: E402
|
|
||||||
import stat # noqa: E402
|
|
||||||
import struct # noqa: E402
|
|
||||||
import time # noqa: E402
|
|
||||||
import base64 # noqa: E402
|
|
||||||
import socket # noqa: E402
|
|
||||||
|
|
||||||
CEPH_INITIAL_KEYS = ['client.admin', 'client.bootstrap-mds', 'client.bootstrap-mgr', # noqa: E501
|
CEPH_INITIAL_KEYS = ['client.admin', 'client.bootstrap-mds', 'client.bootstrap-mgr', # noqa: E501
|
||||||
'client.bootstrap-osd', 'client.bootstrap-rbd', 'client.bootstrap-rbd-mirror', 'client.bootstrap-rgw'] # noqa: E501
|
'client.bootstrap-osd', 'client.bootstrap-rbd', 'client.bootstrap-rbd-mirror', 'client.bootstrap-rgw'] # noqa: E501
|
||||||
|
|
|
@ -17,6 +17,11 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
import datetime
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.1',
|
'metadata_version': '1.1',
|
||||||
|
@ -135,13 +140,6 @@ pools:
|
||||||
|
|
||||||
RETURN = '''# '''
|
RETURN = '''# '''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule # noqa: E402
|
|
||||||
import datetime # noqa: E402
|
|
||||||
import json # noqa: E402
|
|
||||||
import os # noqa: E402
|
|
||||||
import stat # noqa: E402
|
|
||||||
import time # noqa: E402
|
|
||||||
|
|
||||||
|
|
||||||
def container_exec(binary, container_image):
|
def container_exec(binary, container_image):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
import datetime
|
import datetime
|
||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
|
@ -185,9 +186,6 @@ EXAMPLES = '''
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule # noqa: E402
|
|
||||||
|
|
||||||
|
|
||||||
def fatal(message, module):
|
def fatal(message, module):
|
||||||
'''
|
'''
|
||||||
Report a fatal error and exit
|
Report a fatal error and exit
|
||||||
|
|
|
@ -15,6 +15,10 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
import datetime
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.1',
|
'metadata_version': '1.1',
|
||||||
|
@ -81,13 +85,6 @@ EXAMPLES = '''
|
||||||
|
|
||||||
RETURN = '''# '''
|
RETURN = '''# '''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule # noqa: E402
|
|
||||||
import datetime # noqa: E402
|
|
||||||
import json # noqa: E402
|
|
||||||
import os # noqa: E402
|
|
||||||
import stat # noqa: E402
|
|
||||||
import time # noqa: E402
|
|
||||||
|
|
||||||
|
|
||||||
def container_exec(binary, container_image):
|
def container_exec(binary, container_image):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -15,6 +15,11 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
import datetime
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.1',
|
'metadata_version': '1.1',
|
||||||
|
@ -129,13 +134,6 @@ EXAMPLES = '''
|
||||||
|
|
||||||
RETURN = '''# '''
|
RETURN = '''# '''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule # noqa: E402
|
|
||||||
import datetime # noqa: E402
|
|
||||||
import json # noqa: E402
|
|
||||||
import os # noqa: E402
|
|
||||||
import stat # noqa: E402
|
|
||||||
import time # noqa: E402
|
|
||||||
|
|
||||||
|
|
||||||
def container_exec(binary, container_image):
|
def container_exec(binary, container_image):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -15,6 +15,11 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
import datetime
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.1',
|
'metadata_version': '1.1',
|
||||||
|
@ -114,13 +119,6 @@ EXAMPLES = '''
|
||||||
|
|
||||||
RETURN = '''# '''
|
RETURN = '''# '''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule # noqa: E402
|
|
||||||
import datetime # noqa: E402
|
|
||||||
import json # noqa: E402
|
|
||||||
import os # noqa: E402
|
|
||||||
import stat # noqa: E402
|
|
||||||
import time # noqa: E402
|
|
||||||
|
|
||||||
|
|
||||||
def fatal(message, module):
|
def fatal(message, module):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -15,6 +15,11 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
import datetime
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.1',
|
'metadata_version': '1.1',
|
||||||
|
@ -101,13 +106,6 @@ EXAMPLES = '''
|
||||||
|
|
||||||
RETURN = '''# '''
|
RETURN = '''# '''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule # noqa: E402
|
|
||||||
import datetime # noqa: E402
|
|
||||||
import json # noqa: E402
|
|
||||||
import os # noqa: E402
|
|
||||||
import stat # noqa: E402
|
|
||||||
import time # noqa: E402
|
|
||||||
|
|
||||||
|
|
||||||
def container_exec(binary, container_image):
|
def container_exec(binary, container_image):
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in New Issue