sapcc / asr1k-neutron-l3

Cisco ASR 1000 Neutron L3 driver
Apache License 2.0
4 stars 1 forks source link

route-map YANG model changed in 16.12, pulls in force tag as address #25

Open sebageek opened 4 years ago

sebageek commented 4 years ago

The route-map YANG model changed in 16.12. Now a set next-hop 192.0.2.1 force has no <next-hop-addr> tag any more and both the ip and the force tag are listed as <address>.

In short this is the observed change:

# 16.9
              <next-hop>
                <next-hop-addr>
                  <address>192.0.2.1</address>
                  <force/>
                </next-hop-addr>
              </next-hop>
# 16.12
              <next-hop>
                <address>192.0.2.1</address>
                <address>force</address>
              </next-hop>

The YANG query used is for both sides

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get>
    <filter>
      <native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
        <route-map>
          <name>seba-test-01</name>
        </route-map>
      </native>
    </filter>
  </get>
</rpc>

For completeness here the device configuration and the full YANG output. On a 16.9 Device:

QA-DE-1a-asr11-cp090#show ver | inc Cisco IOS XE Software, Version
Cisco IOS XE Software, Version V169_1_SAP_7
QA-DE-1a-asr11-cp090#show run | sec seba-test-01
route-map seba-test-01 permit 10 
 set ip next-hop 192.0.2.1 force

<rpc-reply message-id="urn:uuid:68431024-c4f5-4285-975a-8bba1066f7e0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
  <data>
    <native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
      <route-map>
        <name>seba-test-01</name>
        <route-map-without-order-seq xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-route-map">
          <seq_no>10</seq_no>
          <operation>permit</operation>
          <set>
            <ip>
              <next-hop>
                <next-hop-addr>
                  <address>192.0.2.1</address>
                  <force/>
                </next-hop-addr>
              </next-hop>
            </ip>
          </set>
        </route-map-without-order-seq>
      </route-map>
    </native>
  </data>
</rpc-reply>

On a 16.12 Device:

QA-DE-1b-asr11-cp090#show ver | inc Cisco IOS XE Software, Version
Cisco IOS XE Software, Version V1612_1A_SAP
QA-DE-1b-asr11-cp090#show run | sec seba-test-01                  
route-map seba-test-01 permit 10 
 set ip next-hop 192.0.2.1 force

<rpc-reply message-id="urn:uuid:4acf21e7-d648-4737-8003-8b3657e03321" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
  <data>
    <native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
      <route-map>
        <name>seba-test-01</name>
        <route-map-without-order-seq xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-route-map">
          <seq_no>10</seq_no>
          <operation>permit</operation>
          <set>
            <ip>
              <next-hop>
                <address>192.0.2.1</address>
                <address>force</address>
              </next-hop>
            </ip>
          </set>
        </route-map-without-order-seq>
      </route-map>
    </native>
  </data>
</rpc-reply>