<?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 Re: Delete VLANs through NETCONF in Tools</title>
    <link>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4728319#M838</link>
    <description>&lt;P&gt;You got delete flag on wrong attribute. It should be:&lt;/P&gt;&lt;PRE&gt;&amp;lt;nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:7fe08623-bed3-4130-8ad6-a416c19b037d"&amp;gt;
  &amp;lt;nc:edit-config&amp;gt;
    &amp;lt;nc:target&amp;gt;
      &amp;lt;nc:running/&amp;gt;
    &amp;lt;/nc:target&amp;gt;
    &amp;lt;nc:config&amp;gt;
      &amp;lt;native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native"&amp;gt;
        &amp;lt;vlan&amp;gt;
          &amp;lt;vlan-list xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-vlan"&amp;gt;
            &amp;lt;id nc:operation="delete"&amp;gt;511&amp;lt;/id&amp;gt;
          &amp;lt;/vlan-list&amp;gt;
        &amp;lt;/vlan&amp;gt;
      &amp;lt;/native&amp;gt;
    &amp;lt;/nc:config&amp;gt;
  &amp;lt;/nc:edit-config&amp;gt;
&amp;lt;/nc:rpc&amp;gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 26 Nov 2022 04:03:06 GMT</pubDate>
    <dc:creator>yangorelik</dc:creator>
    <dc:date>2022-11-26T04:03:06Z</dc:date>
    <item>
      <title>Delete VLANs through NETCONF</title>
      <link>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4727382#M834</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am working on a script that can create and delete VLANs on Catalyst 9000 series switches through NETCONF. Using the cisco-ios-xe-native YANG module, I am able to deploy the VLAN through the VLAN -&amp;gt; VLAN-list -&amp;gt; ID element.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, once I try to revert the configuration I get the following error (output is from YANG-Suite, but I've also tried through a script and get the same result):&lt;/P&gt;
&lt;PRE&gt;&amp;lt;rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:7fe08623-bed3-4130-8ad6-a416c19b037d"&amp;gt;&amp;lt;rpc-error&amp;gt;
&amp;lt;error-type&amp;gt;application&amp;lt;/error-type&amp;gt;
&amp;lt;error-tag&amp;gt;data-missing&amp;lt;/error-tag&amp;gt;
&amp;lt;error-severity&amp;gt;error&amp;lt;/error-severity&amp;gt;
&amp;lt;error-path xmlns:ios-vlan="http://cisco.com/ns/yang/Cisco-IOS-XE-vlan" xmlns:ios="http://cisco.com/ns/yang/Cisco-IOS-XE-native" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"&amp;gt;
    /nc:rpc/nc:edit-config/nc:config/ios:native/ios:vlan/ios-vlan:vlan-list[ios-vlan:id='511']
  &amp;lt;/error-path&amp;gt;&amp;lt;error-info&amp;gt;&amp;lt;bad-element&amp;gt;vlan-list&amp;lt;/bad-element&amp;gt;
&amp;lt;/error-info&amp;gt;
&amp;lt;/rpc-error&amp;gt;
&amp;lt;/rpc-reply&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The RPC request is structured like this:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:7fe08623-bed3-4130-8ad6-a416c19b037d"&amp;gt;
  &amp;lt;nc:edit-config&amp;gt;
    &amp;lt;nc:target&amp;gt;
      &amp;lt;nc:running/&amp;gt;
    &amp;lt;/nc:target&amp;gt;
    &amp;lt;nc:config&amp;gt;
      &amp;lt;native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native"&amp;gt;
        &amp;lt;vlan&amp;gt;
          &amp;lt;vlan-list xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-vlan" nc:operation="delete"&amp;gt;
            &amp;lt;id&amp;gt;511&amp;lt;/id&amp;gt;
          &amp;lt;/vlan-list&amp;gt;
        &amp;lt;/vlan&amp;gt;
      &amp;lt;/native&amp;gt;
    &amp;lt;/nc:config&amp;gt;
  &amp;lt;/nc:edit-config&amp;gt;
&amp;lt;/nc:rpc&amp;gt;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any clues?&lt;/P&gt;
&lt;P&gt;- Johnny&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 10:40:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4727382#M834</guid>
      <dc:creator>Johnny Karms Pedersen</dc:creator>
      <dc:date>2022-11-24T10:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Delete VLANs through NETCONF</title>
      <link>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4728212#M835</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/318489"&gt;@Johnny Karms Pedersen&lt;/a&gt;&amp;nbsp;this is a guess, what mode of VTP is your switch in (&lt;SPAN&gt;show vtp status)&lt;/SPAN&gt;?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2022 17:17:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4728212#M835</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2022-11-25T17:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Delete VLANs through NETCONF</title>
      <link>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4728254#M836</link>
      <description>&lt;P&gt;It’s in mode server. I’m guessing that it fails as VTP server doesn’t contain the VLANs in the running config?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2022 20:04:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4728254#M836</guid>
      <dc:creator>Johnny Karms Pedersen</dc:creator>
      <dc:date>2022-11-25T20:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Delete VLANs through NETCONF</title>
      <link>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4728260#M837</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/318489"&gt;@Johnny Karms Pedersen&lt;/a&gt;&amp;nbsp;this is my guess yes, try this with the switch in transparent mode.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2022 20:49:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4728260#M837</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2022-11-25T20:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Delete VLANs through NETCONF</title>
      <link>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4728319#M838</link>
      <description>&lt;P&gt;You got delete flag on wrong attribute. It should be:&lt;/P&gt;&lt;PRE&gt;&amp;lt;nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:7fe08623-bed3-4130-8ad6-a416c19b037d"&amp;gt;
  &amp;lt;nc:edit-config&amp;gt;
    &amp;lt;nc:target&amp;gt;
      &amp;lt;nc:running/&amp;gt;
    &amp;lt;/nc:target&amp;gt;
    &amp;lt;nc:config&amp;gt;
      &amp;lt;native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native"&amp;gt;
        &amp;lt;vlan&amp;gt;
          &amp;lt;vlan-list xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-vlan"&amp;gt;
            &amp;lt;id nc:operation="delete"&amp;gt;511&amp;lt;/id&amp;gt;
          &amp;lt;/vlan-list&amp;gt;
        &amp;lt;/vlan&amp;gt;
      &amp;lt;/native&amp;gt;
    &amp;lt;/nc:config&amp;gt;
  &amp;lt;/nc:edit-config&amp;gt;
&amp;lt;/nc:rpc&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 26 Nov 2022 04:03:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4728319#M838</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2022-11-26T04:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Delete VLANs through NETCONF</title>
      <link>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4732692#M839</link>
      <description>&lt;P&gt;"vlan-list" is a list node and "id" is the key to the list. &amp;nbsp;The proper way to delete a list entry is to apply the delete to the list and provide the key. &amp;nbsp;The rpc looks correct. &amp;nbsp;Is the "candidate" datastore configured? &amp;nbsp;Does the 511 vlan exist in the show command after applying to edit-config? &amp;nbsp;Can you manually delete it from the CLI without errors? &amp;nbsp;Does a "remove" work?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 16:22:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/delete-vlans-through-netconf/m-p/4732692#M839</guid>
      <dc:creator>miott</dc:creator>
      <dc:date>2022-12-05T16:22:13Z</dc:date>
    </item>
  </channel>
</rss>

