Hey Guys I am having trouble getting my Config Template to evaluate correctly I am not sure why. When I select the two nodes to run the script against the output it gives me is
configure terminal
hostname1
exit
The system is not matching the below IF statements. I threw the variable @ContextNode.SysName in the middle to verify the variable was being populated as expected.
script ShiftReport (
NCM.Nodes @ContextNode,
string @PipeSymbol
)
{
// Enter configuration mode
CLI
{ configure terminal }
// Set variables for various nodes
foreach ( @Node in @ContextNode )
{
if (@ContextNode.SysName == 'hostname1')
{
CLI
{sh int TenGigabitEthernet0/3/0 @PipeSymbol i tx @PipeSymbol bit}
CLI
{sho ip bgp @PipeSymbol i 1.1.1.1}
CLI
{ exit }
}
CLI
{ @ContextNode.SysName }
if (@ContextNode.SysName == 'hostname2')
{
CLI
{sh int TenGigabitEthernet0/3/0 @PipeSymbol i tx @PipeSymbol bit}
CLI
{sho ip bgp @PipeSymbol i 2.2.2.2}
CLI
{ exit }
}
// Exit configuration mode
CLI
{ exit }
}
}
}