|
|
@ -59,6 +59,7 @@ eos_argument_spec = {
|
|
|
|
|
|
|
|
|
|
|
|
# Add argument's default value here
|
|
|
|
# Add argument's default value here
|
|
|
|
ARGS_DEFAULT_VALUE = {
|
|
|
|
ARGS_DEFAULT_VALUE = {
|
|
|
|
|
|
|
|
'transport': 'cli',
|
|
|
|
'port': 443,
|
|
|
|
'port': 443,
|
|
|
|
'use_ssl': True,
|
|
|
|
'use_ssl': True,
|
|
|
|
'validate_certs': True
|
|
|
|
'validate_certs': True
|
|
|
@ -94,9 +95,7 @@ def get_connection(module):
|
|
|
|
global _DEVICE_CONNECTION
|
|
|
|
global _DEVICE_CONNECTION
|
|
|
|
if not _DEVICE_CONNECTION:
|
|
|
|
if not _DEVICE_CONNECTION:
|
|
|
|
load_params(module)
|
|
|
|
load_params(module)
|
|
|
|
transport = module.params['transport']
|
|
|
|
if is_eapi(module):
|
|
|
|
provider_transport = (module.params['provider'] or {}).get('transport')
|
|
|
|
|
|
|
|
if 'eapi' in (transport, provider_transport):
|
|
|
|
|
|
|
|
conn = Eapi(module)
|
|
|
|
conn = Eapi(module)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
conn = Cli(module)
|
|
|
|
conn = Cli(module)
|
|
|
|