fixing bgp peer source directory used when configuring peer via openconfig 54/48354/3
authorPeter Gubka <pgubka@cisco.com>
Tue, 15 Nov 2016 10:25:56 +0000 (11:25 +0100)
committerPeter Gubka <pgubka@cisco.com>
Tue, 15 Nov 2016 14:17:05 +0000 (14:17 +0000)
Change-Id: I7be09b558aa2935485254656b791696d3390ff4d
Signed-off-by: Peter Gubka <pgubka@cisco.com>
csit/suites/bgpcep/bgpclustering/010_singlepeer_prefixcount_1route_nonreplicated_rib.robot
csit/suites/bgpcep/bgpclustering/020_singlepeer_prefixcount_100kroutes_nonreplicated_rib.robot
csit/suites/bgpcep/bgpclustering/030_singlepeer_prefixcount_1Mroutes_nonreplicated_rib.robot
csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot
csit/variables/bgpclustering/bgp_peer_openconf/data.xml [new file with mode: 0644]
csit/variables/bgpclustering/bgp_peer_openconf/location.uri [new file with mode: 0644]

index 10d7335bd7e80c016f5ac4ca5e7f96d2e6d6cc2b..4e7b3ffd943ec3e6d6e94598d1d05e950579c399 100644 (file)
@@ -55,8 +55,8 @@ Check_For_Empty_Ipv4_Topology_Before_Talking
 Reconfigure_ODL_To_Accept_Connection
     [Documentation]    Configure BGP peer module in passive mode (not initiating connection)
     [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-    &{mapping}    Create Dictionary    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}    PASSIVE_MODE=true    BGP_RIB=${RIB_INSTANCE}
-    TemplatedRequests.Post_As_Xml_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${CONFIG_SESSION}
+    &{mapping}    Create Dictionary    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}    PASSIVE_MODE=true
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${CONFIG_SESSION}
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
 
 Start_Talking_BGP_Speaker
@@ -93,5 +93,5 @@ Check_For_Empty_Ipv4_Topology_After_Listening
 
 Delete_Bgp_Peer_Configuration
     [Documentation]    Revert the BGP configuration to the original state: without any configured peers
-    &{mapping}    Create Dictionary    BGP_RIB=${RIB_INSTANCE}
+    &{mapping}    Create Dictionary    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    IP=${TOOLS_SYSTEM_IP}
     TemplatedRequests.Delete_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${CONFIG_SESSION}
index dba1c63ea418e423684f658cfb3aef99aae9a14d..626be72bab24210fca46f2e46307bf1d7e89efa5 100644 (file)
@@ -55,8 +55,8 @@ Check_For_Empty_Ipv4_Topology_Before_Talking
 Reconfigure_ODL_To_Accept_Connection
     [Documentation]    Configure BGP peer module in passive mode (not initiating connection)
     [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-    &{mapping}    Create Dictionary    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}    PASSIVE_MODE=true    BGP_RIB=${RIB_INSTANCE}
-    TemplatedRequests.Post_As_Xml_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${CONFIG_SESSION}
+    &{mapping}    Create Dictionary    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}    PASSIVE_MODE=true
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${CONFIG_SESSION}
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
 
 Start_Talking_BGP_Speaker
@@ -93,5 +93,5 @@ Check_For_Empty_Ipv4_Topology_After_Listening
 
 Delete_Bgp_Peer_Configuration
     [Documentation]    Revert the BGP configuration to the original state: without any configured peers
-    &{mapping}    Create Dictionary    BGP_RIB=${RIB_INSTANCE}
+    &{mapping}    Create Dictionary    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    IP=${TOOLS_SYSTEM_IP}
     TemplatedRequests.Delete_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${CONFIG_SESSION}
index 2a3077109dafd6cb920d06986b6c17534da2bf4d..6cec7109b5926f5f7ee14e88211d7dc591213382 100644 (file)
@@ -55,8 +55,8 @@ Check_For_Empty_Ipv4_Topology_Before_Talking
 Reconfigure_ODL_To_Accept_Connection
     [Documentation]    Configure BGP peer module in passive mode (not initiating connection)
     [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-    &{mapping}    Create Dictionary    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}    PASSIVE_MODE=true    BGP_RIB=${RIB_INSTANCE}
-    TemplatedRequests.Post_As_Xml_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${CONFIG_SESSION}
+    &{mapping}    Create Dictionary    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}    PASSIVE_MODE=true
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${CONFIG_SESSION}
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
 
 Start_Talking_BGP_Speaker
@@ -93,5 +93,5 @@ Check_For_Empty_Ipv4_Topology_After_Listening
 
 Delete_Bgp_Peer_Configuration
     [Documentation]    Revert the BGP configuration to the original state: without any configured peers
-    &{mapping}    Create Dictionary    BGP_RIB=${RIB_INSTANCE}
+    &{mapping}    Create Dictionary    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    IP=${TOOLS_SYSTEM_IP}
     TemplatedRequests.Delete_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${CONFIG_SESSION}
index 7ea987729d74f1c7c48a08b7e9b98a0f620ef8dc..361ce474c569011c5355ae3a65bffda2a1714e80 100644 (file)
@@ -21,7 +21,7 @@ Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
 
 *** Variables ***
 ${BGP_TOOL_LOG_LEVEL}    info
-${BGP_PEER_FOLDER}    ${CURDIR}/../../../variables/bgpfunctional/openconfig_bgp_peer    # used for configuration of bgp peer via openconfig
+${BGP_PEER_FOLDER}    ${CURDIR}/../../../variables/bgpclustering/bgp_peer_openconf    # used for configuration of bgp peer via openconfig
 ${BGP_VARIABLES_FOLDER}    ${CURDIR}/../../../variables/bgpclustering/bgp_peer    # used for configuration of bgp peer vie netconf connector
 ${BGP_VARIABLES_FOLDER_OP}    ${CURDIR}/../../../variables/bgpclustering/bgp_peer_operational
 ${NETCONF_DEV_FOLDER}    ${CURDIR}/../../../variables/netconf/device/full-uri-device
diff --git a/csit/variables/bgpclustering/bgp_peer_openconf/data.xml b/csit/variables/bgpclustering/bgp_peer_openconf/data.xml
new file mode 100644 (file)
index 0000000..71d47d5
--- /dev/null
@@ -0,0 +1,30 @@
+<neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+    <neighbor-address>$IP</neighbor-address>
+    <route-reflector>
+        <config>
+            <route-reflector-client>false</route-reflector-client>
+        </config>
+    </route-reflector>
+    <timers>
+        <config>
+            <hold-time>$HOLDTIME</hold-time>
+        </config>
+    </timers>
+    <transport>
+        <config>
+            <remote-port>$PEER_PORT</remote-port>
+            <passive-mode>$PASSIVE_MODE</passive-mode>
+        </config>
+    </transport>
+    <config>
+        <peer-type>INTERNAL</peer-type>
+    </config>
+    <afi-safis>
+        <afi-safi>
+            <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
+        </afi-safi>
+        <afi-safi>
+            <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
+        </afi-safi>
+    </afi-safis>
+</neighbor>
diff --git a/csit/variables/bgpclustering/bgp_peer_openconf/location.uri b/csit/variables/bgpclustering/bgp_peer_openconf/location.uri
new file mode 100644 (file)
index 0000000..d713ddf
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/$BGP_RIB_OPENCONFIG/bgp/neighbors/neighbor/$IP