Fix traceback error in IOS and IOSXR when ran without config (#62400)
* fixes issue 61321 * complete iosxr * fix ios_vlans Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
This commit is contained in:
parent
c1126afbfb
commit
7a5a5e7c87
12 changed files with 59 additions and 0 deletions
|
@ -389,7 +389,12 @@ def main():
|
||||||
|
|
||||||
:returns: the result form module invocation
|
:returns: the result form module invocation
|
||||||
"""
|
"""
|
||||||
|
required_if = [('state', 'merged', ('config',)),
|
||||||
|
('state', 'replaced', ('config',)),
|
||||||
|
('state', 'overridden', ('config',))]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=InterfacesArgs.argument_spec,
|
module = AnsibleModule(argument_spec=InterfacesArgs.argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
result = Interfaces(module).execute_module()
|
result = Interfaces(module).execute_module()
|
||||||
|
|
|
@ -348,7 +348,12 @@ def main():
|
||||||
|
|
||||||
:returns: the result form module invocation
|
:returns: the result form module invocation
|
||||||
"""
|
"""
|
||||||
|
required_if = [('state', 'merged', ('config',)),
|
||||||
|
('state', 'replaced', ('config',)),
|
||||||
|
('state', 'overridden', ('config',))]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=L2_InterfacesArgs.argument_spec,
|
module = AnsibleModule(argument_spec=L2_InterfacesArgs.argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
result = L2_Interfaces(module).execute_module()
|
result = L2_Interfaces(module).execute_module()
|
||||||
|
|
|
@ -426,7 +426,12 @@ def main():
|
||||||
Main entry point for module execution
|
Main entry point for module execution
|
||||||
:returns: the result form module invocation
|
:returns: the result form module invocation
|
||||||
"""
|
"""
|
||||||
|
required_if = [('state', 'merged', ('config',)),
|
||||||
|
('state', 'replaced', ('config',)),
|
||||||
|
('state', 'overridden', ('config',))]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=L3_InterfacesArgs.argument_spec,
|
module = AnsibleModule(argument_spec=L3_InterfacesArgs.argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
result = L3_Interfaces(module).execute_module()
|
result = L3_Interfaces(module).execute_module()
|
||||||
|
|
|
@ -170,7 +170,11 @@ def main():
|
||||||
|
|
||||||
:returns: the result form module invocation
|
:returns: the result form module invocation
|
||||||
"""
|
"""
|
||||||
|
required_if = [('state', 'merged', ('config',)),
|
||||||
|
('state', 'replaced', ('config',))]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=LacpArgs.argument_spec,
|
module = AnsibleModule(argument_spec=LacpArgs.argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
result = Lacp(module).execute_module()
|
result = Lacp(module).execute_module()
|
||||||
|
|
|
@ -347,7 +347,12 @@ def main():
|
||||||
|
|
||||||
:returns: the result form module invocation
|
:returns: the result form module invocation
|
||||||
"""
|
"""
|
||||||
|
required_if = [('state', 'merged', ('config',)),
|
||||||
|
('state', 'replaced', ('config',)),
|
||||||
|
('state', 'overridden', ('config',))]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=Lacp_InterfacesArgs.argument_spec,
|
module = AnsibleModule(argument_spec=Lacp_InterfacesArgs.argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
result = Lacp_Interfaces(module).execute_module()
|
result = Lacp_Interfaces(module).execute_module()
|
||||||
|
|
|
@ -374,8 +374,14 @@ def main():
|
||||||
Main entry point for module execution
|
Main entry point for module execution
|
||||||
:returns: the result form module invocation
|
:returns: the result form module invocation
|
||||||
"""
|
"""
|
||||||
|
required_if = [('state', 'merged', ('config',)),
|
||||||
|
('state', 'replaced', ('config',)),
|
||||||
|
('state', 'overridden', ('config',))]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=Lag_interfacesArgs.argument_spec,
|
module = AnsibleModule(argument_spec=Lag_interfacesArgs.argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
result = Lag_interfaces(module).execute_module()
|
result = Lag_interfaces(module).execute_module()
|
||||||
module.exit_json(**result)
|
module.exit_json(**result)
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,11 @@ def main():
|
||||||
|
|
||||||
:returns: the result form module invocation
|
:returns: the result form module invocation
|
||||||
"""
|
"""
|
||||||
|
required_if = [('state', 'merged', ('config',)),
|
||||||
|
('state', 'replaced', ('config',))]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=Lldp_globalArgs.argument_spec,
|
module = AnsibleModule(argument_spec=Lldp_globalArgs.argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
result = Lldp_global(module).execute_module()
|
result = Lldp_global(module).execute_module()
|
||||||
|
|
|
@ -485,7 +485,12 @@ def main():
|
||||||
|
|
||||||
:returns: the result form module invocation
|
:returns: the result form module invocation
|
||||||
"""
|
"""
|
||||||
|
required_if = [('state', 'merged', ('config',)),
|
||||||
|
('state', 'replaced', ('config',)),
|
||||||
|
('state', 'overridden', ('config',))]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=Lldp_InterfacesArgs.argument_spec,
|
module = AnsibleModule(argument_spec=Lldp_InterfacesArgs.argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
result = Lldp_Interfaces(module).execute_module()
|
result = Lldp_Interfaces(module).execute_module()
|
||||||
|
|
|
@ -448,7 +448,12 @@ def main():
|
||||||
|
|
||||||
:returns: the result form module invocation
|
:returns: the result form module invocation
|
||||||
"""
|
"""
|
||||||
|
required_if = [('state', 'merged', ('config',)),
|
||||||
|
('state', 'replaced', ('config',)),
|
||||||
|
('state', 'overridden', ('config',))]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=VlansArgs.argument_spec,
|
module = AnsibleModule(argument_spec=VlansArgs.argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
result = Vlans(module).execute_module()
|
result = Vlans(module).execute_module()
|
||||||
|
|
|
@ -349,7 +349,12 @@ def main():
|
||||||
Main entry point for module execution
|
Main entry point for module execution
|
||||||
:returns: the result form module invocation
|
:returns: the result form module invocation
|
||||||
"""
|
"""
|
||||||
|
required_if = [('state', 'merged', ('config',)),
|
||||||
|
('state', 'replaced', ('config',)),
|
||||||
|
('state', 'overridden', ('config',))]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=InterfacesArgs.argument_spec,
|
module = AnsibleModule(argument_spec=InterfacesArgs.argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
result = Interfaces(module).execute_module()
|
result = Interfaces(module).execute_module()
|
||||||
|
|
|
@ -413,7 +413,12 @@ def main():
|
||||||
Main entry point for module execution
|
Main entry point for module execution
|
||||||
:returns: the result form module invocation
|
:returns: the result form module invocation
|
||||||
"""
|
"""
|
||||||
|
required_if = [('state', 'merged', ('config',)),
|
||||||
|
('state', 'replaced', ('config',)),
|
||||||
|
('state', 'overridden', ('config',))]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=L2_InterfacesArgs.argument_spec,
|
module = AnsibleModule(argument_spec=L2_InterfacesArgs.argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
result = L2_Interfaces(module).execute_module()
|
result = L2_Interfaces(module).execute_module()
|
||||||
|
|
|
@ -408,7 +408,12 @@ def main():
|
||||||
Main entry point for module execution
|
Main entry point for module execution
|
||||||
:returns: the result form module invocation
|
:returns: the result form module invocation
|
||||||
"""
|
"""
|
||||||
|
required_if = [('state', 'merged', ('config',)),
|
||||||
|
('state', 'replaced', ('config',)),
|
||||||
|
('state', 'overridden', ('config',))]
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=L3_InterfacesArgs.argument_spec,
|
module = AnsibleModule(argument_spec=L3_InterfacesArgs.argument_spec,
|
||||||
|
required_if=required_if,
|
||||||
supports_check_mode=True)
|
supports_check_mode=True)
|
||||||
|
|
||||||
result = L3_Interfaces(module).execute_module()
|
result = L3_Interfaces(module).execute_module()
|
||||||
|
|
Loading…
Reference in a new issue