mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Refactor common network shared and platform utils code into package (#33452)
* Refactor common network shared and platform specific code into package (part-1) As per proposal #76 refactor common network shared and platform specific code into sub-package. https://github.com/ansible/proposals/issues/76 * ansible.module_utils.network.common - command shared functions * ansible.module_utils.network.{{ platform }} - where platform is platform specific shared functions * Fix review comments * Fix review comments
This commit is contained in:
@@ -103,7 +103,7 @@ except ImportError as e:
|
||||
PYTHON_SDK_IMPORTED = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.netscaler import (
|
||||
from ansible.module_utils.network.netscaler.netscaler import (
|
||||
ConfigProxy,
|
||||
get_nitro_client,
|
||||
netscaler_common_arguments,
|
||||
|
||||
@@ -112,7 +112,7 @@ diff:
|
||||
'''
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.netscaler import ConfigProxy, get_nitro_client, netscaler_common_arguments, log, loglines, ensure_feature_is_enabled
|
||||
from ansible.module_utils.network.netscaler.netscaler import ConfigProxy, get_nitro_client, netscaler_common_arguments, log, loglines, ensure_feature_is_enabled
|
||||
try:
|
||||
from nssrc.com.citrix.netscaler.nitro.resource.config.cs.cspolicy import cspolicy
|
||||
from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro_exception
|
||||
|
||||
@@ -559,7 +559,7 @@ diff:
|
||||
'''
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.netscaler import (
|
||||
from ansible.module_utils.network.netscaler.netscaler import (
|
||||
ConfigProxy,
|
||||
get_nitro_client,
|
||||
netscaler_common_arguments,
|
||||
|
||||
@@ -268,7 +268,7 @@ import copy
|
||||
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.netscaler import (
|
||||
from ansible.module_utils.network.netscaler.netscaler import (
|
||||
ConfigProxy,
|
||||
get_nitro_client,
|
||||
netscaler_common_arguments,
|
||||
|
||||
@@ -187,7 +187,7 @@ except ImportError as e:
|
||||
PYTHON_SDK_IMPORTED = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.netscaler import (
|
||||
from ansible.module_utils.network.netscaler.netscaler import (
|
||||
ConfigProxy,
|
||||
get_nitro_client,
|
||||
netscaler_common_arguments,
|
||||
|
||||
@@ -358,7 +358,7 @@ except ImportError as e:
|
||||
PYTHON_SDK_IMPORTED = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.netscaler import (
|
||||
from ansible.module_utils.network.netscaler.netscaler import (
|
||||
ConfigProxy,
|
||||
get_nitro_client,
|
||||
netscaler_common_arguments,
|
||||
|
||||
@@ -827,7 +827,7 @@ diff:
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
from ansible.module_utils.netscaler import (
|
||||
from ansible.module_utils.network.netscaler.netscaler import (
|
||||
ConfigProxy,
|
||||
get_nitro_client,
|
||||
netscaler_common_arguments,
|
||||
|
||||
@@ -973,7 +973,7 @@ diff:
|
||||
'''
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.netscaler import (
|
||||
from ansible.module_utils.network.netscaler.netscaler import (
|
||||
ConfigProxy,
|
||||
get_nitro_client,
|
||||
netscaler_common_arguments,
|
||||
|
||||
@@ -120,7 +120,7 @@ except ImportError as e:
|
||||
PYTHON_SDK_IMPORTED = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.netscaler import get_nitro_client, log, loglines, netscaler_common_arguments
|
||||
from ansible.module_utils.network.netscaler.netscaler import get_nitro_client, log, loglines, netscaler_common_arguments
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -144,7 +144,8 @@ except ImportError as e:
|
||||
PYTHON_SDK_IMPORTED = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.netscaler import ConfigProxy, get_nitro_client, netscaler_common_arguments, log, loglines, get_immutables_intersection
|
||||
from ansible.module_utils.network.netscaler.netscaler import ConfigProxy, get_nitro_client, netscaler_common_arguments, log, loglines, \
|
||||
get_immutables_intersection
|
||||
|
||||
|
||||
def server_exists(client, module):
|
||||
|
||||
@@ -416,8 +416,8 @@ except ImportError as e:
|
||||
PYTHON_SDK_IMPORTED = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.netscaler import (ConfigProxy, get_nitro_client, netscaler_common_arguments,
|
||||
log, loglines, get_immutables_intersection)
|
||||
from ansible.module_utils.network.netscaler.netscaler import (ConfigProxy, get_nitro_client, netscaler_common_arguments, log, loglines,
|
||||
get_immutables_intersection)
|
||||
|
||||
|
||||
def service_exists(client, module):
|
||||
|
||||
@@ -388,7 +388,8 @@ diff:
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
import copy
|
||||
|
||||
from ansible.module_utils.netscaler import ConfigProxy, get_nitro_client, netscaler_common_arguments, log, loglines, get_immutables_intersection
|
||||
from ansible.module_utils.network.netscaler.netscaler import ConfigProxy, get_nitro_client, netscaler_common_arguments, log, \
|
||||
loglines, get_immutables_intersection
|
||||
try:
|
||||
from nssrc.com.citrix.netscaler.nitro.resource.config.basic.servicegroup import servicegroup
|
||||
from nssrc.com.citrix.netscaler.nitro.resource.config.basic.servicegroup_servicegroupmember_binding import servicegroup_servicegroupmember_binding
|
||||
|
||||
@@ -151,7 +151,8 @@ except ImportError as e:
|
||||
PYTHON_SDK_IMPORTED = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.netscaler import ConfigProxy, get_nitro_client, netscaler_common_arguments, log, loglines, get_immutables_intersection
|
||||
from ansible.module_utils.network.netscaler.netscaler import ConfigProxy, get_nitro_client, netscaler_common_arguments, log, loglines, \
|
||||
get_immutables_intersection
|
||||
|
||||
|
||||
def key_exists(client, module):
|
||||
|
||||
Reference in New Issue
Block a user