From c9d710b192fde8e20d9a5cb6ab421384bca7a80d Mon Sep 17 00:00:00 2001 From: Peter Gubka Date: Thu, 12 Jan 2017 12:29:51 +0100 Subject: [PATCH] Update tcpmd5 suite with installation of netconf connector if needed Change-Id: Ie8629d51d55dd381d99d9be3f663bd6e7386778c Signed-off-by: Peter Gubka --- .../suites/bgpcep/tcpmd5user/tcpmd5user.robot | 33 ++++++++++++++----- csit/testplans/bgpcep-userfeatures-boron.txt | 22 +++++++++++++ csit/testplans/bgpcep-userfeatures.txt | 1 - 3 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 csit/testplans/bgpcep-userfeatures-boron.txt diff --git a/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot b/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot index 2961cc3fc8..920b4457a6 100644 --- a/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot +++ b/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot @@ -20,6 +20,7 @@ Library SSHLibrary prompt=]> Library String Library ${CURDIR}/../../../libraries/norm_json.py Resource ${CURDIR}/../../../libraries/FailFast.robot +Resource ${CURDIR}/../../../libraries/KarafKeywords.robot Resource ${CURDIR}/../../../libraries/NexusKeywords.robot Resource ${CURDIR}/../../../libraries/PcepOperations.robot Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot @@ -31,6 +32,7 @@ Variables ${CURDIR}/../../../variables/pcepuser/variables.py ${TOOLS_ ${directory_for_actual_responses} ${TEMPDIR}${/}actual ${directory_for_expected_responses} ${TEMPDIR}${/}expected ${directory_with_template_folders} ${CURDIR}/../../../variables/tcpmd5user/ +${CONNECTOR_FEATURE} odl-netconf-connector-all *** Test Cases *** Topology_Precondition @@ -51,11 +53,6 @@ Topology_Unauthorized_1 [Tags] critical WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout 10s 1s Compare_Topology ${off_json} 020_Unauthorized_1.json -Topology_Unauthorized_2 - [Documentation] The same logic as Topology_Unauthorized_1 as no password was provided to ODL. - [Tags] critical - WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout 10s 1s Compare_Topology ${off_json} 030_Unauthorized_2.json - Set_Wrong_Password [Documentation] Configure password in pcep dispatcher for client with Mininet IP address. ... This password does not match what pcc-mock uses. @@ -63,7 +60,7 @@ Set_Wrong_Password BuiltIn.Log ${password_line} Replace_Password_Xml_Element_In_Pcep_Client_Module ${password_line} -Topology_Unauthorized_3 +Topology_Unauthorized_2 [Documentation] The same logic as Topology_Unauthorized_1 as incorrect password was provided to ODL. [Tags] critical WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout 10s 1s Compare_Topology ${off_json} 040_Unauthorized_3.json @@ -97,7 +94,7 @@ Unset_Password # NOTE: It is still possible to remain failing, if both previous and this test failed. [Teardown] FailFast.Do_Not_Start_Failing_If_This_Failed -Topology_Unauthorized_4 +Topology_Unauthorized_3 [Documentation] Wait for pcep-topology to become empty again. [Tags] critical BuiltIn.Wait_Until_Keyword_Succeeds 10s 1s Compare_Topology ${offjson} 070_Unauthorized_4.json @@ -126,6 +123,9 @@ Set_It_Up [Documentation] Create SSH session to Mininet machine, prepare HTTP client session to Controller. ... Figure out latest pcc-mock version and download it from Nexus to Mininet. ... Also, delete and create directories for json diff handling. + KarafKeywords.Setup_Karaf_Keywords + TemplatedRequests.Create_Default_Session + BuiltIn.Run_Keyword_If """${USE_NETCONF_CONNECTOR}""" == """False""" Install_Netconf_Connector NexusKeywords.Initialize_Artifact_Deployment_And_Usage ${current_connection}= SSHLibrary.Get_Connection ${current_prompt}= BuiltIn.Set_Variable ${current_connection.prompt} @@ -139,7 +139,6 @@ Set_It_Up # The previous suite may have been using the same directories. OperatingSystem.Create_Directory ${directory_for_expected_responses} OperatingSystem.Create_Directory ${directory_for_actual_responses} - TemplatedRequests.Create_Default_Session PcepOperations.Setup_Pcep_Operations FailFast.Do_Not_Fail_Fast_From_Now_On @@ -153,9 +152,27 @@ Tear_It_Down ${diff}= OperatingSystem.Run diff -dur ${directory_for_expected_responses} ${directory_for_actual_responses} BuiltIn.Log ${diff} PcepOperations.Teardown_Pcep_Operations + BuiltIn.Run_Keyword_If """${USE_NETCONF_CONNECTOR}""" == """False""" Uninstall_Netconf_Connector RequestsLibrary.Delete_All_Sessions SSHLibrary.Close_All_Connections +Install_Netconf_Connector + [Documentation] Installs ${CONNECTOR_FEATURE} feature. + # During the netconf connector installation the karaf's ssh is restarted and connection to karaf console is droped. This is causing an error + # which is ignored, because the feature should be installed anyway. + ${status} ${results} = BuiltIn.Run_Keyword_And_Ignore_Error KarafKeywords.Install_A_Feature ${CONNECTOR_FEATURE} + BuiltIn.Log ${results} + BuiltIn.Wait_Until_Keyword_Succeeds 240 3 Check_Netconf_Up_And_Running + +Check_Netconf_Up_And_Running + [Documentation] Make a request to netconf connector's mounted pcep module and expect it is mounted. + TemplatedRequests.Get_From_Uri restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-pcep-topology-provider-cfg:pcep-topology-provider/pcep-topology + +Uninstall_Netconf_Connector + [Documentation] Uninstalls ${CONNECTOR_FEATURE} feature. + ${status} ${results} = BuiltIn.Run_Keyword_And_Ignore_Error KarafKeywords.Uninstall_A_Feature ${CONNECTOR_FEATURE} + BuiltIn.Log ${results} + Read_And_Fail_If_Prompt_Is_Seen [Documentation] Try to read SSH to see prompt, but expect to see no prompt within SSHLibrary's timeout. BuiltIn.Run_Keyword_And_Expect_Error No match found for '${prompt}' in *. Read_Text_Before_Prompt diff --git a/csit/testplans/bgpcep-userfeatures-boron.txt b/csit/testplans/bgpcep-userfeatures-boron.txt new file mode 100644 index 0000000000..175497e94e --- /dev/null +++ b/csit/testplans/bgpcep-userfeatures-boron.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v1.0 which accompanies this distribution, +# and is available at http://www.eclipse.org/legal/epl-v10.html + +# Place the suites in run order: +integration/test/csit/suites/netconf/ready/netconfready.robot +integration/test/csit/suites/bgpcep/bgpfunct/050_bmp_basic.robot +integration/test/csit/suites/bgpcep/pcepuser/pcepuser.robot +integration/test/csit/suites/bgpcep/bgpfunct/bgp_functional_md5.robot +integration/test/csit/suites/bgpcep/bgpuser/cases.robot +integration/test/csit/suites/bgpcep/bgpuser/bgp_app_peer_basic.robot +integration/test/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot +integration/test/csit/suites/bgpcep/bgpuser/ebgp_peers_basic.robot +integration/test/csit/suites/bgpcep/bgpflowspec/010_bgp_flowspec.robot +integration/test/csit/suites/bgpcep/bgpuser/ibgp_peer_lsp.robot +integration/test/csit/suites/bgpcep/bgpfunct/010_bgp_functional_l3vpn.robot +integration/test/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot +integration/test/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot +integration/test/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot +integration/test/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot diff --git a/csit/testplans/bgpcep-userfeatures.txt b/csit/testplans/bgpcep-userfeatures.txt index 175497e94e..e374826976 100644 --- a/csit/testplans/bgpcep-userfeatures.txt +++ b/csit/testplans/bgpcep-userfeatures.txt @@ -5,7 +5,6 @@ # and is available at http://www.eclipse.org/legal/epl-v10.html # Place the suites in run order: -integration/test/csit/suites/netconf/ready/netconfready.robot integration/test/csit/suites/bgpcep/bgpfunct/050_bmp_basic.robot integration/test/csit/suites/bgpcep/pcepuser/pcepuser.robot integration/test/csit/suites/bgpcep/bgpfunct/bgp_functional_md5.robot -- 2.36.6