12-09-2019 10:50 AM
Guys,
I've searched this forum for config differences between Cisco NX-OS device and what NED thinks about it, especially regarding default commands, and most of the replies were around "you have to live with it". But any chances to get the problem below solved?
Before applying port configuration in a service, to ensure the port in in a switchport mode (not in a routed mode), I apply the following configuration:
result-xml {
local-node {
data <devices xmlns="http://tail-f.com/ns/ncs">
<device>
<name>NX_LEAF111</name>
<config>
<interface xmlns="http://tail-f.com/ned/cisco-nx">
<Ethernet>
<name>1/39</name>
<enable>
<switchport>true</switchport>
</enable>So the whole thing equivalent to '(config-if)# switchport' is inside the following tags:
<enable> <switchport>true</switchport> </enable>
And as such, that part has also been put into a resulting service config, so it is there after the commit:
rslaski@ncs# show running-config devices device NX_LEAF111 config nx:interface Ethernet 1/39 | display xml
<config xmlns="http://tail-f.com/ns/config/1.0">
<devices xmlns="http://tail-f.com/ns/ncs">
<device>
<name>NX_LEAF111</name>
<config>
<interface xmlns="http://tail-f.com/ned/cisco-nx">
<Ethernet refcounter="2" backpointer="[ /TMPL:TMPL/TMPL:AC[TMPL:name='rsl1'] ]" >
<name>1/39</name>
<enable>
<switchport refcounter="1" >true</switchport>
</enable>
<switchport>
<mode refcounter="1" >access</mode>
<access>
<vlan refcounter="1" >71</vlan>
</access>
</switchport>
</Ethernet>
</interface>
</config>
</device>
</devices>
</config>The problem is that 'switchport' is a default setting on the platform, so after applying sync-from, it now missing from the config:
rslaski@ncs# show running-config devices device NX_LEAF111 config nx:interface Ethernet 1/39 | display xml
<config xmlns="http://tail-f.com/ns/config/1.0">
<devices xmlns="http://tail-f.com/ns/ncs">
<device>
<name>NX_LEAF111</name>
<config>
<interface xmlns="http://tail-f.com/ned/cisco-nx">
<Ethernet refcounter="2" backpointer="[ /TMPL:TMPL/TMPL:AC[TMPL:name='rsl1'] ]" >
<name>1/39</name>
<switchport>
<access>
<vlan refcounter="1" >71</vlan>
</access>
</switchport>
</Ethernet>
</interface>
</config>
</device>
</devices>
</config>And now also the service complains about missing part on the device:
rslaski@ncs# TMPL AC rsl1 check-sync
in-sync false
rslaski@ncs# TMPL AC rsl1 check-sync outformat xml
result-xml {
local-node {
data <devices xmlns="http://tail-f.com/ns/ncs">
<device>
<name>NX_LEAF111</name>
<config>
<interface xmlns="http://tail-f.com/ned/cisco-nx">
<Ethernet>
<name>1/39</name>
<enable>
<switchport>true</switchport>
</enable>
</Ethernet>
<Ethernet>
<name>1/71</name>
<enable>
<switchport>true</switchport>
</enable>
</Ethernet>
<Ethernet>
<name>1/73</name>
<enable>
<switchport>true</switchport>
</enable>
</Ethernet>
</interface>
</config>
</device>
</devices>
}
}The impact is that my notrhbound system will constantly complain about service non-compliance, and will keep on re-deploying the service periodically.
Solved! Go to Solution.
12-09-2019 01:41 PM
I am a little bit on thin ice here, but I would look into the ned settings. I think doing something like
devices device nx0 ned-settings cisco-nx-meta:cisco-nx system-interface-defaults handling auto
might be a good start, but we have a number of options available here.
12-09-2019 01:41 PM
I am a little bit on thin ice here, but I would look into the ned settings. I think doing something like
devices device nx0 ned-settings cisco-nx-meta:cisco-nx system-interface-defaults handling auto
might be a good start, but we have a number of options available here.
12-10-2019 09:39 AM
Can you try a
devices device NX_LEAF111 compare-config
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide