|
|
@ -207,7 +207,10 @@ def get_value(arg, config, module):
|
|
|
|
def get_existing(module, args):
|
|
|
|
def get_existing(module, args):
|
|
|
|
existing = {}
|
|
|
|
existing = {}
|
|
|
|
netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
|
|
|
|
netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
|
|
|
|
parents = ['interface {0}'.format(module.params['interface'].capitalize())]
|
|
|
|
if module.params['interface'].startswith('loopback') or module.params['interface'].startswith('port-channel'):
|
|
|
|
|
|
|
|
parents = ['interface {0}'.format(module.params['interface'])]
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
parents = ['interface {0}'.format(module.params['interface'].capitalize())]
|
|
|
|
config = netcfg.get_section(parents)
|
|
|
|
config = netcfg.get_section(parents)
|
|
|
|
if 'ospf' in config:
|
|
|
|
if 'ospf' in config:
|
|
|
|
for arg in args:
|
|
|
|
for arg in args:
|
|
|
@ -390,7 +393,7 @@ def main():
|
|
|
|
'message_digest_password']],
|
|
|
|
'message_digest_password']],
|
|
|
|
supports_check_mode=True)
|
|
|
|
supports_check_mode=True)
|
|
|
|
|
|
|
|
|
|
|
|
if not module.params['interface'].startswith('loopback'):
|
|
|
|
if not module.params['interface'].startswith('loopback') and not module.params['interface'].startswith('port-channel'):
|
|
|
|
module.params['interface'] = module.params['interface'].capitalize()
|
|
|
|
module.params['interface'] = module.params['interface'].capitalize()
|
|
|
|
|
|
|
|
|
|
|
|
warnings = list()
|
|
|
|
warnings = list()
|
|
|
|