@ -32,7 +32,7 @@ author:
- Zhou Zhijin ( @QijunPan )
notes :
- If C ( state = present , enable = disable ) , interface DLDP enable will be turned off and
related interface DLDP conf uration will be cleared .
related interface DLDP conf ig uration will be cleared .
- If C ( state = absent ) , only local_mac is supported to configure .
options :
interface :
@ -106,7 +106,7 @@ EXAMPLES = '''
reset : enable
provider : " {{ cli }} "
- name : " Unconfigure interface DLDP local mac addre e ss when C(state=absent)"
- name : " Unconfigure interface DLDP local mac addre ss when C(state=absent)"
ce_dldp_interface :
interface : 40 GE2 / 0 / 1
state : absent
@ -127,7 +127,7 @@ proposed:
" reset " : " enable "
}
existing :
description : k / v pairs of existing interface DLDP config ration
description : k / v pairs of existing interface DLDP config u ration
returned : always
type : dict
sample : {
@ -138,7 +138,7 @@ existing:
" reset " : " disable "
}
end_state :
description : k / v pairs of interface DLDP config ration after module execution
description : k / v pairs of interface DLDP config u ration after module execution
returned : always
type : dict
sample : {
@ -309,14 +309,14 @@ def get_interface_type(interface):
class DldpInterface ( object ) :
""" Manage interface dldp config ration"""
""" Manage interface dldp config u ration"""
def __init__ ( self , argument_spec ) :
self . spec = argument_spec
self . module = None
self . init_module ( )
# DLDP interface config ration info
# DLDP interface config u ration info
self . interface = self . module . params [ ' interface ' ]
self . enable = self . module . params [ ' enable ' ] or None
self . reset = self . module . params [ ' reset ' ] or None
@ -457,7 +457,7 @@ class DldpInterface(object):
topo = root . find ( " dldp/dldpInterfaces/dldpInterface " )
if topo is None :
self . module . fail_json (
msg = " Error: Get current DLDP config ration failed." )
msg = " Error: Get current DLDP config u ration failed." )
for eles in topo :
if eles . tag in [ " dldpEnable " , " dldpCompatibleEnable " , " dldpLocalMac " ] :
if not eles . text :
@ -561,7 +561,7 @@ class DldpInterface(object):
reset = self . reset , state = self . state )
def get_update_cmd ( self ) :
""" Get updated e commands"""
""" Get updated commands"""
if self . same_conf :
return
@ -624,7 +624,7 @@ class DldpInterface(object):
self . module . exit_json ( * * self . results )
def work ( self ) :
""" Ex cute task"""
""" Ex e cute task"""
self . dldp_intf_conf = self . get_dldp_intf_exist_config ( )
self . check_params ( )