<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to change &amp;quot;no shutdown&amp;quot; configs into xml templates in NSO in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-to-change-quot-no-shutdown-quot-configs-into-xml-templates/m-p/4963519#M8213</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;SPAN&gt;this is my first post so apologies if this is not posted in the correct forum. Please help me move it to the correct one if it shouldnt be here.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are using NSO service package with python and template.&lt;/P&gt;
&lt;P&gt;And using NSO version, NED below&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NSO version: 5.7.1.1&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NED: cisco-nx-cli-5.22&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In NSO cli config mode, I'm trying to put "no shutdown" configuration in Ethernet 1/X, They said&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;% No modifications to commit.&lt;/P&gt;
&lt;P&gt;"shutdown" command looks like work for me , but "no shutdown" is not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;admin@ncs# config
admin@ncs(config)# devices device &lt;STRONG&gt;MY_DEVICE_NAME&lt;/STRONG&gt;
admin@ncs(config-device-&lt;STRONG&gt;MY_DEVICE_NAME&lt;/STRONG&gt;)# config
admin@ncs(config-config)# interface Ethernet 1/8
admin@ncs(config-if)# no shutdown 
admin@ncs(config-if)# commit dry-run outformat xml&lt;BR /&gt;% No modifications to commit.&lt;BR /&gt;admin@ncs(config-if)# shutdown&lt;BR /&gt;admin@ncs(config-if)# commit dry-run outformat xml&lt;BR /&gt;result-xml {&lt;BR /&gt;    local-node {&lt;BR /&gt;    data &amp;lt;devices xmlns="http://tail-f.com/ns/ncs"&amp;gt;&lt;BR /&gt;           &amp;lt;device&amp;gt;&lt;BR /&gt;             &amp;lt;name&amp;gt;&lt;STRONG&gt;MY_DEVICE_NAME&lt;/STRONG&gt;&amp;lt;/name&amp;gt;&lt;BR /&gt;             &amp;lt;config&amp;gt;&lt;BR /&gt;               &amp;lt;interface xmlns="http://tail-f.com/ned/cisco-nx"&amp;gt;&lt;BR /&gt;                 &amp;lt;Ethernet&amp;gt;&lt;BR /&gt;                   &amp;lt;name&amp;gt;1/8&amp;lt;/name&amp;gt;&lt;BR /&gt;                   &lt;EM&gt;&lt;STRONG&gt;&amp;lt;shutdown/&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;                 &amp;lt;/Ethernet&amp;gt;&lt;BR /&gt;               &amp;lt;/interface&amp;gt;&lt;BR /&gt;             &amp;lt;/config&amp;gt;&lt;BR /&gt;           &amp;lt;/device&amp;gt;&lt;BR /&gt;         &amp;lt;/devices&amp;gt;&lt;BR /&gt;    }&lt;BR /&gt;}

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this normal ? Or my command wrong...&lt;/P&gt;
&lt;P&gt;Please help me out this ..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Nov 2023 08:19:37 GMT</pubDate>
    <dc:creator>jhur</dc:creator>
    <dc:date>2023-11-21T08:19:37Z</dc:date>
    <item>
      <title>How to change "no shutdown" configs into xml templates in NSO</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-to-change-quot-no-shutdown-quot-configs-into-xml-templates/m-p/4963519#M8213</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;SPAN&gt;this is my first post so apologies if this is not posted in the correct forum. Please help me move it to the correct one if it shouldnt be here.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are using NSO service package with python and template.&lt;/P&gt;
&lt;P&gt;And using NSO version, NED below&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NSO version: 5.7.1.1&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NED: cisco-nx-cli-5.22&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In NSO cli config mode, I'm trying to put "no shutdown" configuration in Ethernet 1/X, They said&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;% No modifications to commit.&lt;/P&gt;
&lt;P&gt;"shutdown" command looks like work for me , but "no shutdown" is not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;admin@ncs# config
admin@ncs(config)# devices device &lt;STRONG&gt;MY_DEVICE_NAME&lt;/STRONG&gt;
admin@ncs(config-device-&lt;STRONG&gt;MY_DEVICE_NAME&lt;/STRONG&gt;)# config
admin@ncs(config-config)# interface Ethernet 1/8
admin@ncs(config-if)# no shutdown 
admin@ncs(config-if)# commit dry-run outformat xml&lt;BR /&gt;% No modifications to commit.&lt;BR /&gt;admin@ncs(config-if)# shutdown&lt;BR /&gt;admin@ncs(config-if)# commit dry-run outformat xml&lt;BR /&gt;result-xml {&lt;BR /&gt;    local-node {&lt;BR /&gt;    data &amp;lt;devices xmlns="http://tail-f.com/ns/ncs"&amp;gt;&lt;BR /&gt;           &amp;lt;device&amp;gt;&lt;BR /&gt;             &amp;lt;name&amp;gt;&lt;STRONG&gt;MY_DEVICE_NAME&lt;/STRONG&gt;&amp;lt;/name&amp;gt;&lt;BR /&gt;             &amp;lt;config&amp;gt;&lt;BR /&gt;               &amp;lt;interface xmlns="http://tail-f.com/ned/cisco-nx"&amp;gt;&lt;BR /&gt;                 &amp;lt;Ethernet&amp;gt;&lt;BR /&gt;                   &amp;lt;name&amp;gt;1/8&amp;lt;/name&amp;gt;&lt;BR /&gt;                   &lt;EM&gt;&lt;STRONG&gt;&amp;lt;shutdown/&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;                 &amp;lt;/Ethernet&amp;gt;&lt;BR /&gt;               &amp;lt;/interface&amp;gt;&lt;BR /&gt;             &amp;lt;/config&amp;gt;&lt;BR /&gt;           &amp;lt;/device&amp;gt;&lt;BR /&gt;         &amp;lt;/devices&amp;gt;&lt;BR /&gt;    }&lt;BR /&gt;}

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this normal ? Or my command wrong...&lt;/P&gt;
&lt;P&gt;Please help me out this ..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 08:19:37 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-to-change-quot-no-shutdown-quot-configs-into-xml-templates/m-p/4963519#M8213</guid>
      <dc:creator>jhur</dc:creator>
      <dc:date>2023-11-21T08:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to change "no shutdown" configs into xml templates i</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-to-change-quot-no-shutdown-quot-configs-into-xml-templates/m-p/4963642#M8215</link>
      <description>&lt;P&gt;Yes this is normal behavior if shutdown is not configured under the interface. In that case NSO computes the minimum diff and determines there is nothing to do.&lt;BR /&gt;If you apply the shutdown command, commit and then apply the no shutdown, you should see the transition. to 'no shutdown' from the shutdown state.&lt;/P&gt;
&lt;P&gt;Note that this is just the default NSO behavior - However on NX-OS that assumption turns out not to be always true because you can configure 'system default switchport shutdown', in which case the port is shutdown even if 'shutdown' is not configured, and only comes up if you explicitly configure 'no shutdown'.&lt;/P&gt;
&lt;P&gt;To deal with that possibility there is a ned-setting 'system-interface-defaults/handling' which can be set to 'auto'. By default that setting is disbled and you get the default behaviour that you are seeing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 11:15:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-to-change-quot-no-shutdown-quot-configs-into-xml-templates/m-p/4963642#M8215</guid>
      <dc:creator>snovello</dc:creator>
      <dc:date>2023-11-21T11:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to change "no shutdown" configs into xml templates i</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/how-to-change-quot-no-shutdown-quot-configs-into-xml-templates/m-p/4964857#M8219</link>
      <description>&lt;P&gt;Thanks a lot! And I have another question..&lt;/P&gt;
&lt;P&gt;I changed the config on the Nexus device.&lt;/P&gt;
&lt;P&gt;eth 1/8 : no shutdown -&amp;gt; shutdown&lt;/P&gt;
&lt;P&gt;Device Configuration:&lt;/P&gt;
&lt;PRE&gt;N92160-001# conf t&lt;BR /&gt;Enter configuration commands, one per line. End with CNTL/Z.
N92160-001(config)# interface ethernet 1/8&lt;BR /&gt;N92160-001(config-if)# shutdown &lt;BR /&gt;N92160-001(config-if)# end&lt;BR /&gt;N92160-001# &lt;BR /&gt;N92160-001# show run interface ethernet 1/8&lt;BR /&gt;!Command: show running-config interface Ethernet1/8&lt;BR /&gt;!Running configuration last done at: Thu Nov 23 07:47:30 2023&lt;BR /&gt;!Time: Thu Nov 23 07:47:40 2023&lt;BR /&gt;version 9.3(10) Bios:version 07.65&lt;BR /&gt;&lt;BR /&gt;interface Ethernet1/8&lt;BR /&gt;&lt;BR /&gt;N92160-001#&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;And on sync-from Device in NSO. And I configured below.&lt;/P&gt;
&lt;P&gt;NSO cli:&lt;/P&gt;
&lt;PRE&gt;admin@ncs# config
admin@ncs(config)# devices device &lt;STRONG&gt;MY_DEVICE_NAME&lt;/STRONG&gt;
admin@ncs(config-device-&lt;STRONG&gt;MY_DEVICE_NAME&lt;/STRONG&gt;)# config
admin@ncs(config-config)# interface Ethernet 1/8
admin@ncs(config-if)# no shutdown &lt;BR /&gt;admin@ncs(config-if)# commit dry-run outformat xml&lt;/PRE&gt;
&lt;PRE&gt;result-xml {&lt;BR /&gt;    local-node {&lt;BR /&gt;    data &amp;lt;devices xmlns="http://tail-f.com/ns/ncs"&amp;gt;&lt;BR /&gt;           &amp;lt;device&amp;gt;&lt;BR /&gt;             &amp;lt;name&amp;gt;&lt;STRONG&gt;MY_DEVICE_NAME&lt;/STRONG&gt;&amp;lt;/name&amp;gt;&lt;BR /&gt;             &amp;lt;config&amp;gt;&lt;BR /&gt;               &amp;lt;interface xmlns="http://tail-f.com/ned/cisco-nx"&amp;gt;&lt;BR /&gt;                 &amp;lt;Ethernet&amp;gt;&lt;BR /&gt;                   &amp;lt;name&amp;gt;1/8&amp;lt;/name&amp;gt;&lt;BR /&gt;                   &lt;STRONG&gt;&amp;lt;shutdown xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="delete"/&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;                 &amp;lt;/Ethernet&amp;gt;&lt;BR /&gt;               &amp;lt;/interface&amp;gt;&lt;BR /&gt;             &amp;lt;/config&amp;gt;&lt;BR /&gt;           &amp;lt;/device&amp;gt;&lt;BR /&gt;         &amp;lt;/devices&amp;gt;&lt;BR /&gt;    }&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;Next-step, I put outformat &lt;STRONG&gt;xml&lt;/STRONG&gt; to packages, make compile , and in NSO cli typing &lt;STRONG&gt;packages reload&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;reload-result {&lt;BR /&gt;package NSO_Onprem_VPN_Internet&lt;BR /&gt;result false&lt;BR /&gt;info [TabError: inconsistent use of tabs and spaces in indentation],&amp;nbsp; [NSO_test-template.xml:9 unknown attribute: operation in shutdown],&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It said TabError, I fixed indentation. And Also same error appeared..&lt;/P&gt;
&lt;P&gt;How can I make this template - no shutdown -..?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;I can't upload .xml directly, So I upload xml file by zip.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 08:23:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/how-to-change-quot-no-shutdown-quot-configs-into-xml-templates/m-p/4964857#M8219</guid>
      <dc:creator>jhur</dc:creator>
      <dc:date>2023-11-23T08:23:18Z</dc:date>
    </item>
  </channel>
</rss>

