HC2VPP-411: migrate interfaces-state to interfaces 38/19838/4
authorMichal Cmarada <mcmarada@cisco.com>
Mon, 27 May 2019 11:58:23 +0000 (13:58 +0200)
committerMichal Cmarada <mcmarada@cisco.com>
Mon, 27 May 2019 15:27:34 +0000 (15:27 +0000)
 - new ietf-interfaces makes interfaces-state obsolete
 - updates honeycomb tests to latest ietf-interfaces model

Change-Id: I5502a5ab23661429caca9498407d7121d423a1a3
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
resources/libraries/python/honeycomb/HcAPIKwInterfaces.py
resources/libraries/robot/honeycomb/notifications.robot
resources/libraries/robot/honeycomb/port_mirroring.robot
resources/templates/honeycomb/oper_vpp_interfaces.url
resources/test_data/honeycomb/netconf/triggers.py

index e9ef133..662fedc 100644 (file)
@@ -160,7 +160,7 @@ class InterfaceKeywords(object):
                 "Not possible to get operational information about the "
                 "interfaces. Status code: {0}.".format(status_code))
         try:
                 "Not possible to get operational information about the "
                 "interfaces. Status code: {0}.".format(status_code))
         try:
-            return resp["interfaces-state"]["interface"]
+            return resp["interfaces"]["interface"]
 
         except (KeyError, TypeError):
             return []
 
         except (KeyError, TypeError):
             return []
index f46f7ee..c5a4817 100644 (file)
@@ -45,7 +45,7 @@
 | | ... | \| GigabitEthernet0/8/0 \| up \|
 | | [Arguments] | ${interface} | ${state}
 | | ${reply}= | Get notification
 | | ... | \| GigabitEthernet0/8/0 \| up \|
 | | [Arguments] | ${interface} | ${state}
 | | ${reply}= | Get notification
-| | Should contain | ${reply} | <interface-state-change
+| | Should contain | ${reply} | <interface-change
 | | Should contain | ${reply} | <name>${interface}</name>
 | | Should contain | ${reply} | <admin-status>${state}</admin-status>
 
 | | Should contain | ${reply} | <name>${interface}</name>
 | | Should contain | ${reply} | <admin-status>${state}</admin-status>
 
index 64faa5e..1ce233f 100644 (file)
 | | ${data}= | Get sub interface oper data
 | | ... | ${node} | ${dst_interface} | ${index}
 | | ${data}= | Set Variable
 | | ${data}= | Get sub interface oper data
 | | ... | ${node} | ${dst_interface} | ${index}
 | | ${data}= | Set Variable
-| | ... | ${data['subinterface-span:span-state']['mirrored-interfaces']['mirrored-interface']}
+| | ... | ${data['subinterface-span:span']['mirrored-interfaces']['mirrored-interface']}
 | | Sort list | ${data}
 | | Sort list | ${src_interfaces}
 | | Lists should be equal | ${data} | ${src_interfaces}
 | | Sort list | ${data}
 | | Sort list | ${src_interfaces}
 | | Lists should be equal | ${data} | ${src_interfaces}
 | | ${data}= | Get sub interface oper data
 | | ... | ${node} | ${dst_interface} | ${index}
 | | Variable should not exist
 | | ${data}= | Get sub interface oper data
 | | ... | ${node} | ${dst_interface} | ${index}
 | | Variable should not exist
-| | ... | ${data['subinterface-span:span-state']['mirrored-interfaces']['mirrored-interface']}
+| | ... | ${data['subinterface-span:span']['mirrored-interfaces']['mirrored-interface']}
 
 | Honeycomb removes sub-interface SPAN configuration
 | | [Documentation] | Uses Honeycomb API to remove SPAN Operational Data\
 
 | Honeycomb removes sub-interface SPAN configuration
 | | [Documentation] | Uses Honeycomb API to remove SPAN Operational Data\
 | | ${data}= | Get sub interface oper data
 | | ... | ${node} | ${dst_interface} | ${index}
 | | Run keyword and expect error | *KeyError* | Set Variable
 | | ${data}= | Get sub interface oper data
 | | ... | ${node} | ${dst_interface} | ${index}
 | | Run keyword and expect error | *KeyError* | Set Variable
-| | ... | ${data['subinterface-span:span-state']['mirrored-interfaces']['mirrored-interface']}
\ No newline at end of file
+| | ... | ${data['subinterface-span:span']['mirrored-interfaces']['mirrored-interface']}
\ No newline at end of file
index cae9e41..7f1a3d6 100644 (file)
@@ -1 +1 @@
-/restconf/operational{odl_url_part}/ietf-interfaces:interfaces-state
\ No newline at end of file
+/restconf/operational{odl_url_part}/ietf-interfaces:interfaces
\ No newline at end of file
index 0db68dd..7c5fade 100644 (file)
@@ -327,7 +327,7 @@ xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace">
 <rpc message-id="m-27" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <get>
 <filter xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:type="subtree">
 <rpc message-id="m-27" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <get>
 <filter xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:type="subtree">
-<interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"/>
+<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"/>
 </filter>
 </get>
 </rpc>
 </filter>
 </get>
 </rpc>