Anyone kindly help me to build REX for the below mention scenarios
- I need to check the interface config for some configuration if present need to push other configs
- To compare the configs if some note present as per template need to add. If anything present extra need to remove.
I have created simple REX scripts to push configs to interface.
.PARAMETER_LABEL @PhysicalInterfaces
Select Interface(s)
.PARAMETER_DESCRIPTION @PhysicalInterfaces
Select Interface(s) you would like to change config.
.PARAMETER_LABEL @NewInterfaceConfig
Interface Config
.PARAMETER_DESCRIPTION @NewInterfaceConfig
Enter new Config for interface(s) using , by separating
*/
script ChangeInterfaceConfigCiscoIOS (
NCM.Nodes @ContextNode,
NCM.Interfaces[] @PhysicalInterfaces,
string @NewInterfaceConfig )
{
// Enter config terminal mode
CLI
{
configure terminal
}
foreach (@itf in @PhysicalInterfaces)
{
CLI
{
interface @itf.InterfaceDescription
@NewInterfaceConfig
exit
}
}
//Exit Config mode
CLI {exit}
}