Hi NCM Users
I'm brand new at NCM scripting and need some tips with the following requirements
I'm need to configure a Cisco Router ACL which contains the IP address of one of the router's ip Address. This means that this ACL will have a specific set of entries where part of the ACL text is a variable.
So for example, if router A has interface G0/0 at 10.1.1.1/24, I need to write a script where
@ipnetwork = @ContextNode ->I/F-G0/0->IP Address
so that I can apply it to a script something like this...
script ChangeLoginBannerCiscoIOS ( NCM.Nodes @ContextNode, string @ipnetwork)
{
CLI
{
configure terminal
access-list 1 permit @ipnetwork 0.0.0.255
...
...
etc.
exit
}
I've read that a variable cannot be set from a script command (sh ip int -> @ipnetwork ) is not possible. So node can configuration objects in the configuration database be assigned to variables for passing to command scripts?
Many thanks for your help
Phil