bgpcep suites: fixing nice-to-have comments 55/48255/4
authorPeter Gubka <pgubka@cisco.com>
Fri, 11 Nov 2016 12:23:28 +0000 (13:23 +0100)
committerPeter Gubka <pgubka@cisco.com>
Wed, 16 Nov 2016 10:59:13 +0000 (11:59 +0100)
comments are comming from:
https://git.opendaylight.org/gerrit/#/c/47882/
https://git.opendaylight.org/gerrit/#/c/48159/

Change-Id: I3715093db35d75f701c0230ac0b8e4bb29d64b5d
Signed-off-by: Peter Gubka <pgubka@cisco.com>
csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot
csit/suites/bgpcep/bgpuser/ebgp_peers_basic.robot

index e28e952de04349ab6ac05056a0d0e18e77cb195b..0f839725c710419b0139503ff3fcfd82ced8101d 100644 (file)
@@ -170,8 +170,7 @@ Configure_Odl_With_Multipaths
 
 Store_Rib_Configuration
     [Documentation]    Stores rib configuration
-    ${mapping}=    BuiltIn.Set Variable    ${DEFAULT_MAPPING}
-    ${rib_old}=    TemplatedRequests.Get_As_Xml_Templated    ${MULT_VAR_FOLDER}/rib    mapping=${mapping}    session=${CONFIG_SESSION}
+    ${rib_old}=    TemplatedRequests.Get_As_Xml_Templated    ${MULT_VAR_FOLDER}/rib    mapping=${DEFAULT_MAPPING}    session=${CONFIG_SESSION}
     BuiltIn.Set_Suite_Variable    ${rib_old}
 
 Log_Loc_Rib_Operational
index 8f5e2b97636140351f6f0a292d04963ec86fa1df..2411e7e5e10ff0e36fec3c97f614b0afa7a9edfd 100644 (file)
@@ -20,6 +20,7 @@ Suite Setup       Setup_Everything
 Suite Teardown    Teardown_Everything
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
 Test Teardown     FailFast.Start_Failing_Fast_If_This_Failed
+Library           Collections
 Library           OperatingSystem
 Library           RequestsLibrary
 Variables         ${CURDIR}/../../../variables/Variables.py
@@ -73,7 +74,6 @@ ${DEFAULT_LOG_CHECK_TIMEOUT}    20s
 ${DEFAULT_LOG_CHECK_PERIOD}    1s
 ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    10s
 ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    1s
-${CONFIG_SESSION}    session
 ${RIB_INSTANCE}    example-bgp-rib
 ${PROTOCOL_OPENCONFIG}    ${RIB_INSTANCE}
 ${DEVICE_NAME}    controller-config
@@ -85,15 +85,15 @@ Configure_BGP_Peers
     &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    NAME=example-ibgp-peer1    IP=${iBGP_PEER1_IP}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}
     ...    PEER_ROLE=ibgp    INITIATE=false    BGP_RIB=${RIB_INSTANCE}    PASSIVE_MODE=true    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    RIB_INSTANCE_NAME=${RIB_INSTANCE}
     ...    RR_CLIENT=false
-    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}ibgp_peers    mapping=${mapping}    session=${CONFIG_SESSION}
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}ibgp_peers    mapping=${mapping}
     &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    NAME=example-ebgp-peer1    IP=${eBGP_PEER1_IP}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}
     ...    PEER_ROLE=ebgp    INITIATE=false    BGP_RIB=${RIB_INSTANCE}    PASSIVE_MODE=true    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    RIB_INSTANCE_NAME=${RIB_INSTANCE}
     ...    RR_CLIENT=false    AS_NUMBER=${eBGP_PEER1_AS}
-    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    mapping=${mapping}    session=${CONFIG_SESSION}
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    mapping=${mapping}
     &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    NAME=example-ebgp-peer2    IP=${eBGP_PEER2_IP}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}
     ...    PEER_ROLE=ebgp    INITIATE=false    BGP_RIB=${RIB_INSTANCE}    PASSIVE_MODE=true    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    RIB_INSTANCE_NAME=${RIB_INSTANCE}
     ...    RR_CLIENT=false    AS_NUMBER=${eBGP_PEER2_AS}
-    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    mapping=${mapping}    session=${CONFIG_SESSION}
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    mapping=${mapping}
 
 Connect_iBGP_Peer1
     [Documentation]    Connect BGP peer
@@ -188,11 +188,11 @@ Delete_BGP_Peers_Configuration
     [Documentation]    Delete all previously configured BGP peers.
     [Tags]    critical
     &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    NAME=example-ibgp-peer1    IP=${iBGP_PEER1_IP}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
-    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}ibgp_peers    mapping=${mapping}    session=${CONFIG_SESSION}
-    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    NAME=example-ebgp-peer1    IP=${eBGP_PEER1_IP}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
-    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    mapping=${mapping}    session=${CONFIG_SESSION}
-    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    NAME=example-ebgp-peer2    IP=${eBGP_PEER2_IP}    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
-    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    mapping=${mapping}    session=${CONFIG_SESSION}
+    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}ibgp_peers    mapping=${mapping}
+    Collections.Set To Dictionary    ${mapping}    NAME=example-ebgp-peer1    IP=${eBGP_PEER1_IP}
+    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    mapping=${mapping}
+    Collections.Set To Dictionary    ${mapping}    NAME=example-ebgp-peer2    IP=${eBGP_PEER2_IP}
+    TemplatedRequests.Delete_Templated    ${BGP_VARIABLES_FOLDER}${/}ebgp_peers    mapping=${mapping}
 
 *** Keywords ***
 Setup_Everything
@@ -210,7 +210,7 @@ Setup_Everything
     SSHKeywords.Assure_Library_Ipaddr    target_dir=.
     SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_TOPO_API}    auth=${AUTH}
-    RequestsLibrary.Create_Session    ${CONFIG_SESSION}    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}
+    TemplatedRequests.Create_Default_Session
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${CONTROLLER_LOG_LEVEL}
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.bgpcep
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${CONTROLLER_BGP_LOG_LEVEL} org.opendaylight.protocol