Fix a10 pylint issues (#23410)
* Fix a10 pylint issues * Moving imports to standard location
This commit is contained in:
parent
78ced5318f
commit
3934513121
4 changed files with 22 additions and 28 deletions
|
@ -116,7 +116,12 @@ content:
|
||||||
type: string
|
type: string
|
||||||
sample: "mynewserver"
|
sample: "mynewserver"
|
||||||
'''
|
'''
|
||||||
|
import json
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible.module_utils.urls import url_argument_spec
|
||||||
|
from ansible.module_utils.a10 import axapi_call, a10_argument_spec, axapi_authenticate, axapi_failure
|
||||||
|
from ansible.module_utils.a10 import axapi_get_port_protocol, axapi_enabled_disabled, AXAPI_PORT_PROTOCOLS
|
||||||
|
|
||||||
VALID_PORT_FIELDS = ['port_num', 'protocol', 'status']
|
VALID_PORT_FIELDS = ['port_num', 'protocol', 'status']
|
||||||
|
|
||||||
|
@ -295,12 +300,5 @@ def main():
|
||||||
axapi_call(module, session_url + '&method=session.close')
|
axapi_call(module, session_url + '&method=session.close')
|
||||||
module.exit_json(changed=changed, content=result)
|
module.exit_json(changed=changed, content=result)
|
||||||
|
|
||||||
# ansible module imports
|
|
||||||
import json
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
|
||||||
from ansible.module_utils.urls import url_argument_spec
|
|
||||||
from ansible.module_utils.a10 import axapi_call, a10_argument_spec, axapi_authenticate, axapi_failure, axapi_get_port_protocol, axapi_enabled_disabled
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -100,6 +100,12 @@ EXAMPLES = '''
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
import json
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible.module_utils.urls import url_argument_spec
|
||||||
|
from ansible.module_utils.a10 import axapi_call_v3, a10_argument_spec, axapi_authenticate_v3, axapi_failure
|
||||||
|
from ansible.module_utils.a10 import AXAPI_PORT_PROTOCOLS
|
||||||
|
|
||||||
VALID_PORT_FIELDS = ['port-number', 'protocol', 'action']
|
VALID_PORT_FIELDS = ['port-number', 'protocol', 'action']
|
||||||
|
|
||||||
|
@ -245,12 +251,5 @@ def main():
|
||||||
axapi_call_v3(module, axapi_base_url + 'logoff/', method='POST', body='', signature=signature)
|
axapi_call_v3(module, axapi_base_url + 'logoff/', method='POST', body='', signature=signature)
|
||||||
module.exit_json(changed=changed, content=result)
|
module.exit_json(changed=changed, content=result)
|
||||||
|
|
||||||
|
|
||||||
import json
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
|
||||||
from ansible.module_utils.urls import url_argument_spec
|
|
||||||
from ansible.module_utils.a10 import axapi_call_v3, a10_argument_spec, axapi_authenticate_v3, axapi_failure
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -126,6 +126,11 @@ content:
|
||||||
type: string
|
type: string
|
||||||
sample: "mynewservicegroup"
|
sample: "mynewservicegroup"
|
||||||
'''
|
'''
|
||||||
|
import json
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible.module_utils.urls import url_argument_spec
|
||||||
|
from ansible.module_utils.a10 import axapi_call, a10_argument_spec, axapi_authenticate, axapi_failure, axapi_enabled_disabled
|
||||||
|
|
||||||
VALID_SERVICE_GROUP_FIELDS = ['name', 'protocol', 'lb_method']
|
VALID_SERVICE_GROUP_FIELDS = ['name', 'protocol', 'lb_method']
|
||||||
VALID_SERVER_FIELDS = ['server', 'port', 'status']
|
VALID_SERVER_FIELDS = ['server', 'port', 'status']
|
||||||
|
@ -340,12 +345,5 @@ def main():
|
||||||
axapi_call(module, session_url + '&method=session.close')
|
axapi_call(module, session_url + '&method=session.close')
|
||||||
module.exit_json(changed=changed, content=result)
|
module.exit_json(changed=changed, content=result)
|
||||||
|
|
||||||
# standard ansible module imports
|
|
||||||
import json
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
|
||||||
from ansible.module_utils.urls import url_argument_spec
|
|
||||||
from ansible.module_utils.a10 import axapi_call, a10_argument_spec, axapi_authenticate, axapi_failure, axapi_enabled_disabled
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -114,6 +114,12 @@ content:
|
||||||
type: string
|
type: string
|
||||||
sample: "mynewvirtualserver"
|
sample: "mynewvirtualserver"
|
||||||
'''
|
'''
|
||||||
|
import json
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible.module_utils.urls import url_argument_spec
|
||||||
|
from ansible.module_utils.a10 import axapi_call, a10_argument_spec, axapi_authenticate, axapi_failure
|
||||||
|
from ansible.module_utils.a10 import axapi_enabled_disabled, axapi_get_vport_protocol, AXAPI_VPORT_PROTOCOLS
|
||||||
|
|
||||||
VALID_PORT_FIELDS = ['port', 'protocol', 'service_group', 'status']
|
VALID_PORT_FIELDS = ['port', 'protocol', 'service_group', 'status']
|
||||||
|
|
||||||
|
@ -284,12 +290,5 @@ def main():
|
||||||
axapi_call(module, session_url + '&method=session.close')
|
axapi_call(module, session_url + '&method=session.close')
|
||||||
module.exit_json(changed=changed, content=result)
|
module.exit_json(changed=changed, content=result)
|
||||||
|
|
||||||
# standard ansible module imports
|
|
||||||
import json
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
|
||||||
from ansible.module_utils.urls import url_argument_spec
|
|
||||||
from ansible.module_utils.a10 import axapi_call, a10_argument_spec, axapi_authenticate, axapi_failure, axapi_enabled_disabled, axapi_get_vport_protocol
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in a new issue