rhn_channel: fix py3 compatibility (use six)
and remove unused import
This commit is contained in:
parent
5f62a973da
commit
f761fc1d1f
2 changed files with 4 additions and 9 deletions
|
@ -64,9 +64,8 @@ EXAMPLES = '''
|
||||||
password: guessme
|
password: guessme
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import xmlrpclib
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from operator import itemgetter
|
from ansible.module_utils.six.moves import xmlrpc_client
|
||||||
import re
|
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------- #
|
# ------------------------------------------------------- #
|
||||||
|
@ -137,8 +136,8 @@ def main():
|
||||||
user = module.params['user']
|
user = module.params['user']
|
||||||
password = module.params['password']
|
password = module.params['password']
|
||||||
|
|
||||||
#initialize connection
|
# initialize connection
|
||||||
client = xmlrpclib.Server(saturl, verbose=0)
|
client = xmlrpc_client(saturl)
|
||||||
session = client.auth.login(user, password)
|
session = client.auth.login(user, password)
|
||||||
|
|
||||||
# get systemid
|
# get systemid
|
||||||
|
@ -165,8 +164,5 @@ def main():
|
||||||
client.auth.logout(session)
|
client.auth.logout(session)
|
||||||
|
|
||||||
|
|
||||||
# import module snippets
|
|
||||||
from ansible.module_utils.basic import *
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -97,7 +97,6 @@ lib/ansible/modules/network/lenovo/cnos_vlag.py
|
||||||
lib/ansible/modules/network/lenovo/cnos_vlan.py
|
lib/ansible/modules/network/lenovo/cnos_vlan.py
|
||||||
lib/ansible/modules/network/nxos/nxos_file_copy.py
|
lib/ansible/modules/network/nxos/nxos_file_copy.py
|
||||||
lib/ansible/modules/packaging/language/maven_artifact.py
|
lib/ansible/modules/packaging/language/maven_artifact.py
|
||||||
lib/ansible/modules/packaging/os/rhn_channel.py
|
|
||||||
lib/ansible/modules/storage/infinidat/infini_export.py
|
lib/ansible/modules/storage/infinidat/infini_export.py
|
||||||
lib/ansible/modules/storage/infinidat/infini_export_client.py
|
lib/ansible/modules/storage/infinidat/infini_export_client.py
|
||||||
lib/ansible/modules/storage/infinidat/infini_fs.py
|
lib/ansible/modules/storage/infinidat/infini_fs.py
|
||||||
|
|
Loading…
Reference in a new issue