Update bgp ingest manypeer changecount suite not to use netconf connector in carbon 12/50012/3
authorPeter Gubka <pgubka@cisco.com>
Wed, 4 Jan 2017 11:07:37 +0000 (12:07 +0100)
committerVratko Polák <vrpolak@cisco.com>
Thu, 5 Jan 2017 08:21:38 +0000 (08:21 +0000)
Change-Id: I27aa3f749e4208bb531864b846f18f00ed732b0a
Signed-off-by: Peter Gubka <pgubka@cisco.com>
csit/suites/bgpcep/bgpingest/manypeers_changecount.robot

index b2e556325f4f0d61ad33e2e5414396dd0c37c774..dae6beed3734a893e7c5e0bcc1c96dfbb12b325d 100644 (file)
@@ -83,6 +83,8 @@ ${KARAF_PROTOCOL_LOG_LEVEL}    ${KARAF_BGPCEP_LOG_LEVEL}
 ${MULTIPLICITY}    2    # May be increased after Bug 4488 is fixed.
 ${MULTIPLICITY_CHANGE_COUNT}    ${MULTIPLICITY}
 ${MULTIPLICITY_CHANGE_COUNT_MANY}    ${MULTIPLICITY_CHANGE_COUNT}
+${NETCONF_DEV_FOLDER}    ${CURDIR}/../../../variables/netconf/device/full-uri-device
+${NETCONF_MOUNT_FOLDER}    ${CURDIR}/../../../variables/netconf/device/full-uri-mount
 ${REPETITIONS}    1    # Should be increased depending on multiplicity.
 ${REPETITIONS_CHANGE_COUNT}    ${REPETITIONS}
 ${REPETITIONS_CHANGE_COUNT_MANY}    ${REPETITIONS_CHANGE_COUNT}
@@ -102,6 +104,13 @@ Check_For_Empty_Ipv4_Topology_Before_Talking
     # TODO: Choose which tags to assign and make sure they are assigned correctly.
     BuiltIn.Wait_Until_Keyword_Succeeds    120s    1s    PrefixCounting.Check_Ipv4_Topology_Is_Empty
 
+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.
+    &{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}
+
 Reconfigure_ODL_To_Accept_Connections
     [Documentation]    Configure BGP peer modules with initiate-connection set to false.
     : FOR    ${index}    IN RANGE    1    ${MULTIPLICITY_CHANGE_COUNT_MANY}+1
@@ -180,6 +189,13 @@ Delete_Bgp_Peer_Configuration
     \    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    BGP_NAME=${peer_name}    IP=${peer_ip}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
     \    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}bgp_peer    mapping=${mapping}
 
+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.
+    &{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}
+
 *** Keywords ***
 Setup_Everything
     [Documentation]    Setup imported resources, SSH-login to ODL system,