Fix module validation errors for avi_api_session (#21154)

This commit is contained in:
Matt Martz 2017-02-08 10:32:13 -06:00 committed by GitHub
parent 4e5c9c3d0d
commit c3fb4c837b

View file

@ -23,19 +23,6 @@
#
"""
import json
import time
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.avi import avi_common_argument_spec, ansible_return
from copy import deepcopy
HAS_AVI = True
try:
from avi.sdk.avi_api import ApiSession
from avi.sdk.utils.ansible_utils import avi_obj_cmp, cleanup_absent_fields
except ImportError:
HAS_AVI = False
ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'version': '1.0'}
DOCUMENTATION = '''
@ -63,7 +50,7 @@ options:
- Query parameters passed to the HTTP API.
path:
description:
- Path for Avi API resource. For example, C(path: virtualservice) will translate to C(api/virtualserivce).
- 'Path for Avi API resource. For example, C(path: virtualservice) will translate to C(api/virtualserivce).'
timeout:
description:
- Timeout (in seconds) for Avi API calls.
@ -126,6 +113,20 @@ obj:
type: dict
'''
import json
import time
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.avi import avi_common_argument_spec, ansible_return
from copy import deepcopy
HAS_AVI = True
try:
from avi.sdk.avi_api import ApiSession
from avi.sdk.utils.ansible_utils import avi_obj_cmp, cleanup_absent_fields
except ImportError:
HAS_AVI = False
def main():
argument_specs = dict(
http_method=dict(required=True,