Change data change counter suites 77/59677/11
authorPeter Gubka <pgubka@cisco.com>
Thu, 29 Jun 2017 13:27:19 +0000 (15:27 +0200)
committerVratko Polák <vrpolak@cisco.com>
Mon, 10 Jul 2017 12:28:59 +0000 (12:28 +0000)
The changes are caused by the removal of default
data change counter from configuration for C and N
streams.

Change-Id: I08a9b068044acc4caf9e421836a6727bb551030a
Signed-off-by: Peter Gubka <pgubka@cisco.com>
csit/suites/bgpcep/bgpingest/manypeers_changecount.robot
csit/suites/bgpcep/bgpingest/singlepeer_changecount.robot
csit/variables/bgpuser/change_counter/data.xml
csit/variables/bgpuser/change_counter/location.uri

index 7cc679de26f5068273717602c5cece5e30ef77b9..4b679ae72dbb984c63c35280847bddba04095e61 100644 (file)
@@ -57,6 +57,7 @@ Library           SSHLibrary    timeout=10s
 Variables         ${CURDIR}/../../../variables/Variables.py
 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
 Resource          ${CURDIR}/../../../libraries/ChangeCounter.robot
+Resource          ${CURDIR}/../../../libraries/CompareStream.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
 Resource          ${CURDIR}/../../../libraries/PrefixCounting.robot
@@ -107,6 +108,7 @@ Check_For_Empty_Ipv4_Topology_Before_Talking
 Configure_Netconf_Device
     [Documentation]    Configures netconf device if ${USE_NETCONF_CONNECTOR} is False.
     BuiltIn.Run_Keyword_If    """${USE_NETCONF_CONNECTOR}""" == """True"""    BuiltIn.Pass_Execution    No need to configure netconf device because netconf connector is present.
+    CompareStream.Run_Keyword_If_At_Least_Carbon    BuiltIn.Pass_Execution    No need to configure netconf device because data change counter is not configured via it.
     &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    DEVICE_PORT=1830    DEVICE_IP=${ODL_SYSTEM_IP}    DEVICE_USER=admin    DEVICE_PASSWORD=admin
     TemplatedRequests.Put_As_Xml_Templated    ${NETCONF_DEV_FOLDER}    mapping=${mapping}
     BuiltIn.Wait_Until_Keyword_Succeeds    10x    3s    TemplatedRequests.Get_As_Xml_Templated    ${NETCONF_MOUNT_FOLDER}    mapping=${mapping}
@@ -124,12 +126,17 @@ Reconfigure_ODL_To_Accept_Connections
 
 Wait_For_Data_Change_Counter_Ready
     [Documentation]    Data change counter might have been slower to start than ipv4 topology, wait for it.
+    CompareStream.Run_Keyword_If_At_Least_Carbon    BuiltIn.Pass_Execution    No data change counter is present yet.
     BuiltIn.Wait_Until_Keyword_Succeeds    180s    1s    ChangeCounter.Get_Change_Count
 
 Reconfigure_Data_Change_Counter
     [Documentation]    Configure data change counter to count transactions in example-ipv4-topology instead of example-linkstate-topology.
     ChangeCounter.Reconfigure_Topology_Name    example-ipv4-topology
 
+Verify_For_Data_Change_Counter_Ready
+    [Documentation]    Data change counter might have been slower to start than ipv4 topology, wait for it.
+    BuiltIn.Wait_Until_Keyword_Succeeds    5s    1s    ChangeCounter.Get_Change_Count
+
 Change_Karaf_Logging_Levels
     [Documentation]    We may want to set more verbose logging here after configuration is done.
     KarafKeywords.Set_Bgpcep_Log_Levels    bgpcep_level=${KARAF_BGPCEP_LOG_LEVEL}    protocol_level=${KARAF_PROTOCOL_LOG_LEVEL}
@@ -193,6 +200,7 @@ Remove_Netconf_Device
     [Documentation]    Removes netconf device if ${USE_NETCONF_CONNECTOR} is False.
     [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     BuiltIn.Run_Keyword_If    """${USE_NETCONF_CONNECTOR}""" == """True"""    BuiltIn.Pass_Execution    No need to remove netconf device because netconf connector is present.
+    CompareStream.Run_Keyword_If_At_Least_Carbon    BuiltIn.Pass_Execution    No need to remove netconf device because none was used.
     &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    DEVICE_PORT=1830    DEVICE_IP=${ODL_SYSTEM_IP}    DEVICE_USER=admin    DEVICE_PASSWORD=admin
     TemplatedRequests.Delete_Templated    ${NETCONF_DEV_FOLDER}    mapping=${mapping}
 
index f7c3105e0563cf786c604eb42a7e6ec69f7f1c78..24210abfcb3b6a01bb0f45333297a04ba6f1d024 100644 (file)
@@ -44,6 +44,7 @@ Library           RequestsLibrary
 Variables         ${CURDIR}/../../../variables/Variables.py
 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
 Resource          ${CURDIR}/../../../libraries/ChangeCounter.robot
+Resource          ${CURDIR}/../../../libraries/CompareStream.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
 Resource          ${CURDIR}/../../../libraries/PrefixCounting.robot
@@ -96,6 +97,7 @@ Check_For_Empty_Ipv4_Topology_Before_Talking
 Configure_Netconf_Device
     [Documentation]    Configures netconf device if ${USE_NETCONF_CONNECTOR} is False.
     BuiltIn.Run_Keyword_If    """${USE_NETCONF_CONNECTOR}""" == """True"""    BuiltIn.Pass_Execution    No need to configure netconf device because netconf connector is present.
+    CompareStream.Run_Keyword_If_At_Least_Carbon    BuiltIn.Pass_Execution    No need to configure netconf device because data change counter is not configured via it.
     &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    DEVICE_PORT=1830    DEVICE_IP=${ODL_SYSTEM_IP}    DEVICE_USER=admin    DEVICE_PASSWORD=admin
     TemplatedRequests.Put_As_Xml_Templated    ${NETCONF_DEV_FOLDER}    mapping=${mapping}
     BuiltIn.Wait_Until_Keyword_Succeeds    10x    3s    TemplatedRequests.Get_As_Xml_Templated    ${NETCONF_MOUNT_FOLDER}    mapping=${mapping}
@@ -108,12 +110,17 @@ Reconfigure_ODL_To_Accept_Connection
 
 Wait_For_Data_Change_Counter_Ready
     [Documentation]    Data change counter might have been slower to start than ipv4 topology, wait for it.
+    CompareStream.Run_Keyword_If_At_Least_Carbon    BuiltIn.Pass_Execution    No data change counter is present yet.
     BuiltIn.Wait_Until_Keyword_Succeeds    180s    1s    ChangeCounter.Get_Change_Count
 
 Reconfigure_Data_Change_Counter
     [Documentation]    Configure data change counter to count transactions in example-ipv4-topology instead of example-linkstate-topology.
     ChangeCounter.Reconfigure_Topology_Name    example-ipv4-topology
 
+Verify_Data_Change_Counter_Ready
+    [Documentation]    Data change counter might have been slower to start than ipv4 topology, wait for it.
+    BuiltIn.Wait_Until_Keyword_Succeeds    5s    1s    ChangeCounter.Get_Change_Count
+
 Change_Karaf_Logging_Levels
     [Documentation]    We may want to set more verbose logging here after configuration is done.
     KarafKeywords.Set_Bgpcep_Log_Levels    bgpcep_level=${KARAF_BGPCEP_LOG_LEVEL}    protocol_level=${KARAF_PROTOCOL_LOG_LEVEL}
@@ -232,6 +239,7 @@ Remove_Netconf_Device
     [Documentation]    Removes netconf device if ${USE_NETCONF_CONNECTOR} is False.
     [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     BuiltIn.Run_Keyword_If    """${USE_NETCONF_CONNECTOR}""" == """True"""    BuiltIn.Pass_Execution    No need to remove netconf device because netconf connector is present.
+    CompareStream.Run_Keyword_If_At_Least_Carbon    BuiltIn.Pass_Execution    No need to remove netconf device because none was used.
     &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    DEVICE_PORT=1830    DEVICE_IP=${ODL_SYSTEM_IP}    DEVICE_USER=admin    DEVICE_PASSWORD=admin
     TemplatedRequests.Delete_Templated    ${NETCONF_DEV_FOLDER}    mapping=${mapping}
 
index 3bfead421690cc762958ccfcc6e83ba460c28019..10cf16d650f932ec3964d02b675ace1cc6a2114d 100644 (file)
@@ -1,10 +1,4 @@
-<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgpcep:data:change:counter">prefix:data-change-counter-impl</type>
-    <name>data-change-counter</name>
-    <counter-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgpcep:data:change:counter">data-change-counter</counter-id>
-    <data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgpcep:data:change:counter">
-        <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
-        <name>pingpong-binding-data-broker</name>
-    </data-provider>
-    <topology-name xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgpcep:data:change:counter">$TOPOLOGY_NAME</topology-name>
-</module>
+<data-change-counter-config xmlns="urn:opendaylight:params:xml:ns:yang:bgpcep:data-change-counter-config">
+    <counter-id>data-change-counter</counter-id>
+    <topology-name>$TOPOLOGY_NAME</topology-name>
+</data-change-counter-config>
index fa7f634edf8244053aef1f429bfd508001d9d9c0..b6db7b739974b1e8f290151520364363dd73eb3b 100644 (file)
@@ -1 +1 @@
-restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-data-change-counter-cfg:data-change-counter-impl/data-change-counter
+restconf/config/odl-data-change-counter-config:data-change-counter-config/data-change-counter