mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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
|
||||
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']
|
||||
|
||||
|
@ -295,12 +300,5 @@ def main():
|
|||
axapi_call(module, session_url + '&method=session.close')
|
||||
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__':
|
||||
main()
|
||||
|
|
|
@ -100,6 +100,12 @@ EXAMPLES = '''
|
|||
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']
|
||||
|
||||
|
@ -245,12 +251,5 @@ def main():
|
|||
axapi_call_v3(module, axapi_base_url + 'logoff/', method='POST', body='', signature=signature)
|
||||
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__':
|
||||
main()
|
||||
|
|
|
@ -126,6 +126,11 @@ content:
|
|||
type: string
|
||||
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_SERVER_FIELDS = ['server', 'port', 'status']
|
||||
|
@ -340,12 +345,5 @@ def main():
|
|||
axapi_call(module, session_url + '&method=session.close')
|
||||
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__':
|
||||
main()
|
||||
|
|
|
@ -114,6 +114,12 @@ content:
|
|||
type: string
|
||||
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']
|
||||
|
||||
|
@ -284,12 +290,5 @@ def main():
|
|||
axapi_call(module, session_url + '&method=session.close')
|
||||
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__':
|
||||
main()
|
||||
|
|
Loading…
Reference in a new issue