replacing ConfigViaRestconf for TempletedRequests in tcpmd5 suite for Be 27/48527/1
authorPeter Gubka <pgubka@cisco.com>
Mon, 21 Nov 2016 11:04:32 +0000 (12:04 +0100)
committerPeter Gubka <pgubka@cisco.com>
Mon, 21 Nov 2016 11:04:32 +0000 (12:04 +0100)
Change-Id: Ib062389578c10ed1f255db484d8839282258c0ba
Signed-off-by: Peter Gubka <pgubka@cisco.com>
22 files changed:
csit/suites/bgpcep/tcpmd5user/tcpmd5user-LiBe.robot
csit/variables/tcpmd5user/key_access_module/config.uri [deleted file]
csit/variables/tcpmd5user/key_access_module/location.uri [new file with mode: 0644]
csit/variables/tcpmd5user/key_access_service/config.uri [deleted file]
csit/variables/tcpmd5user/key_access_service/location.uri [new file with mode: 0644]
csit/variables/tcpmd5user/lithium_pcep_dispatcher_module/config.uri [deleted file]
csit/variables/tcpmd5user/lithium_pcep_dispatcher_module/location.uri [new file with mode: 0644]
csit/variables/tcpmd5user/md5_client_channel_module/config.uri [deleted file]
csit/variables/tcpmd5user/md5_client_channel_module/location.uri [new file with mode: 0644]
csit/variables/tcpmd5user/md5_client_channel_service/config.uri [deleted file]
csit/variables/tcpmd5user/md5_client_channel_service/location.uri [new file with mode: 0644]
csit/variables/tcpmd5user/md5_server_channel_module/config.uri [deleted file]
csit/variables/tcpmd5user/md5_server_channel_module/location.uri [new file with mode: 0644]
csit/variables/tcpmd5user/md5_server_channel_service/config.uri [deleted file]
csit/variables/tcpmd5user/md5_server_channel_service/location.uri [new file with mode: 0644]
csit/variables/tcpmd5user/pcep_client_channel_module/config.uri [deleted file]
csit/variables/tcpmd5user/pcep_client_channel_module/location.uri [new file with mode: 0644]
csit/variables/tcpmd5user/pcep_dispatcher_module/config.uri [deleted file]
csit/variables/tcpmd5user/pcep_dispatcher_module/location.uri [new file with mode: 0644]
csit/variables/tcpmd5user/pcep_server_channel_module/config.uri [deleted file]
csit/variables/tcpmd5user/pcep_server_channel_module/location.uri [new file with mode: 0644]
csit/variables/tcpmd5user/pcep_topology_client_module/config.uri [deleted file]

index 8a5a689f5624969a21946e0ec92180d890ada4f9..ed262310a5a0bff214eb6eb6e822d0d665539990 100644 (file)
@@ -19,10 +19,10 @@ Library           RequestsLibrary
 Library           SSHLibrary    prompt=]>
 Library           String
 Library           ${CURDIR}/../../../libraries/norm_json.py
-Resource          ${CURDIR}/../../../libraries/ConfigViaRestconf.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/NexusKeywords.robot
 Resource          ${CURDIR}/../../../libraries/PcepOperations.robot
+Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
 Resource          ${CURDIR}/../../../libraries/WaitForFailure.robot
 Variables         ${CURDIR}/../../../variables/Variables.py
 Variables         ${CURDIR}/../../../variables/pcepuser/variables.py    ${TOOLS_SYSTEM_IP}
@@ -55,28 +55,27 @@ Enable_Tcpmd5_No_Password_Yet
     [Documentation]    Send series of restconf puts derived from https://wiki.opendaylight.org/view/BGP_LS_PCEP:TCP_MD5_Guide#RESTCONF_Configuration
     ...    Every put should return empty text with allwed status code.
     # No ${mapping_as_string} is given, as there are no placeholders present in the following folders.
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}key_access_module
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}key_access_service
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}md5_client_channel_module
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}md5_client_channel_service
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}md5_server_channel_module
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}md5_server_channel_service
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}pcep_client_channel_module
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}pcep_server_channel_module
-    # TODO: Is it worth changing ConfigViaRestconf to read ${directory_with_template_folders} variable by default?
+    TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}key_access_module
+    TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}key_access_service
+    TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}md5_client_channel_module
+    TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}md5_client_channel_service
+    TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}md5_server_channel_module
+    TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}md5_server_channel_service
+    TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}pcep_client_channel_module
+    TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}pcep_server_channel_module
 
 Check_For_Bug_3753_Via_Bug_4267
     [Documentation]    Check state of disptcher configuration module, apply workaround if needed.
     ...    This test case should not be failing, failure indicates Bug 3753 was not fixed enough yet.
     ...    For more details, see https://bugs.opendaylight.org/show_bug.cgi?id=4267#c2
     ...    As dispatcher configuration differs between Lithium and Beryllium, two checks and two workarounds are needed.
-    ${success}=    BuiltIn.Run_Keyword_And_Return_Status    ConfigViaRestconf.Verify_Json_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}pcep_dispatcher_module
+    ${success}=    BuiltIn.Run_Keyword_And_Return_Status    TemplatedRequests.Get_As_Json_Templated    ${directory_with_template_folders}${/}pcep_dispatcher_module    verify=${True}
     BuiltIn.Pass_Execution_If    ${success}    Bug 4267 not present, Beryllium data.
-    ${success}=    BuiltIn.Run_Keyword_And_Return_Status    ConfigViaRestconf.Verify_Json_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}lithium_pcep_dispatcher_module
+    ${success}=    BuiltIn.Run_Keyword_And_Return_Status    TemplatedRequests.Get_As_Json_Templated    ${directory_with_template_folders}${/}lithium_pcep_dispatcher_module    verify=${True}
     BuiltIn.Pass_Execution_If    ${success}    Bug 4267 not present, Lithium data.
-    ${success}=    BuiltIn.Run_Keyword_And_Return_Status    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}pcep_dispatcher_module
+    ${success}=    BuiltIn.Run_Keyword_And_Return_Status    TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}pcep_dispatcher_module
     BuiltIn.Run_Keyword_If    ${success}    BuiltIn.Fail    Bug 4267 present, Beryllium workaround successful.
-    ${success}=    BuiltIn.Run_Keyword_And_Return_Status    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}lithium_pcep_dispatcher_module
+    ${success}=    BuiltIn.Run_Keyword_And_Return_Status    TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}lithium_pcep_dispatcher_module
     BuiltIn.Run_Keyword_If    ${success}    BuiltIn.Fail    Bug 4267 present, Lithium workaround successful.
     BuiltIn.Fail    Bug 4267 probably present. No workaround succeeded, so Bug 4491 is probably present too.
     [Teardown]    FailFast.Do_Not_Start_Failing_If_This_Failed
@@ -169,7 +168,7 @@ 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}
-    ConfigViaRestconf.Setup_Config_Via_Restconf
+    TemplatedRequests.Create_Default_Session
     PcepOperations.Setup_Pcep_Operations
     FailFast.Do_Not_Fail_Fast_From_Now_On
 
@@ -183,7 +182,6 @@ Tear_It_Down
     ${diff}=    OperatingSystem.Run    diff -dur ${directory_for_expected_responses} ${directory_for_actual_responses}
     BuiltIn.Log    ${diff}
     PcepOperations.Teardown_Pcep_Operations
-    ConfigViaRestconf.Teardown_Config_Via_Restconf
     RequestsLibrary.Delete_All_Sessions
     SSHLibrary.Close_All_Connections
 
@@ -225,6 +223,5 @@ Construct_Password_Element_Line_Using_Password
 Replace_Password_Xml_Element_In_Pcep_Client_Module
     [Arguments]    ${password_element}
     [Documentation]    Send restconf PUT to replace the config module specifying PCEP password element (may me empty=missing).
-    ${mapping_as_string}=    BuiltIn.Set_Variable    {'IP': '${TOOLS_SYSTEM_IP}', 'PASSWD': '''${password_element}'''}
-    BuiltIn.Log    ${mapping_as_string}
-    ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf    ${directory_with_template_folders}${/}pcep_topology_client_module    ${mapping_as_string}
+    &{mapping}    BuiltIn.Create_Dictionary    IP=${TOOLS_SYSTEM_IP}    PASSWD=${password_element}
+    TemplatedRequests.Put_As_Xml_Templated    ${directory_with_template_folders}${/}pcep_topology_client_module    mapping=${mapping}
diff --git a/csit/variables/tcpmd5user/key_access_module/config.uri b/csit/variables/tcpmd5user/key_access_module/config.uri
deleted file mode 100644 (file)
index b7cb9a3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:modules/module/odl-tcpmd5-jni-cfg:native-key-access-factory/global-key-access-factory
diff --git a/csit/variables/tcpmd5user/key_access_module/location.uri b/csit/variables/tcpmd5user/key_access_module/location.uri
new file mode 100644 (file)
index 0000000..7bd1f45
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-tcpmd5-jni-cfg:native-key-access-factory/global-key-access-factory
diff --git a/csit/variables/tcpmd5user/key_access_service/config.uri b/csit/variables/tcpmd5user/key_access_service/config.uri
deleted file mode 100644 (file)
index 49e6853..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:services/service/odl-tcpmd5-cfg:key-access-factory/config:instance/global-key-access-factory
diff --git a/csit/variables/tcpmd5user/key_access_service/location.uri b/csit/variables/tcpmd5user/key_access_service/location.uri
new file mode 100644 (file)
index 0000000..d2893a6
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:services/service/odl-tcpmd5-cfg:key-access-factory/config:instance/global-key-access-factory
diff --git a/csit/variables/tcpmd5user/lithium_pcep_dispatcher_module/config.uri b/csit/variables/tcpmd5user/lithium_pcep_dispatcher_module/config.uri
deleted file mode 100644 (file)
index 89fc159..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:modules/module/odl-pcep-impl-cfg:pcep-dispatcher-impl/global-pcep-dispatcher?prettyPrint=true
diff --git a/csit/variables/tcpmd5user/lithium_pcep_dispatcher_module/location.uri b/csit/variables/tcpmd5user/lithium_pcep_dispatcher_module/location.uri
new file mode 100644 (file)
index 0000000..4acf534
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-pcep-impl-cfg:pcep-dispatcher-impl/global-pcep-dispatcher?prettyPrint=true
diff --git a/csit/variables/tcpmd5user/md5_client_channel_module/config.uri b/csit/variables/tcpmd5user/md5_client_channel_module/config.uri
deleted file mode 100644 (file)
index 1d40495..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:modules/module/odl-tcpmd5-netty-cfg:md5-client-channel-factory/md5-client-channel-factory
diff --git a/csit/variables/tcpmd5user/md5_client_channel_module/location.uri b/csit/variables/tcpmd5user/md5_client_channel_module/location.uri
new file mode 100644 (file)
index 0000000..efd90c9
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-tcpmd5-netty-cfg:md5-client-channel-factory/md5-client-channel-factory
diff --git a/csit/variables/tcpmd5user/md5_client_channel_service/config.uri b/csit/variables/tcpmd5user/md5_client_channel_service/config.uri
deleted file mode 100644 (file)
index 0f81372..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:services/service/odl-tcpmd5-netty-cfg:md5-channel-factory/config:instance/md5-client-channel-factory
diff --git a/csit/variables/tcpmd5user/md5_client_channel_service/location.uri b/csit/variables/tcpmd5user/md5_client_channel_service/location.uri
new file mode 100644 (file)
index 0000000..ee46829
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:services/service/odl-tcpmd5-netty-cfg:md5-channel-factory/config:instance/md5-client-channel-factory
diff --git a/csit/variables/tcpmd5user/md5_server_channel_module/config.uri b/csit/variables/tcpmd5user/md5_server_channel_module/config.uri
deleted file mode 100644 (file)
index b78f9c1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:modules/module/odl-tcpmd5-netty-cfg:md5-server-channel-factory-impl/md5-server-channel-factory
diff --git a/csit/variables/tcpmd5user/md5_server_channel_module/location.uri b/csit/variables/tcpmd5user/md5_server_channel_module/location.uri
new file mode 100644 (file)
index 0000000..0276625
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-tcpmd5-netty-cfg:md5-server-channel-factory-impl/md5-server-channel-factory
diff --git a/csit/variables/tcpmd5user/md5_server_channel_service/config.uri b/csit/variables/tcpmd5user/md5_server_channel_service/config.uri
deleted file mode 100644 (file)
index 4d1221d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:services/service/odl-tcpmd5-netty-cfg:md5-server-channel-factory/config:instance/md5-server-channel-factory
diff --git a/csit/variables/tcpmd5user/md5_server_channel_service/location.uri b/csit/variables/tcpmd5user/md5_server_channel_service/location.uri
new file mode 100644 (file)
index 0000000..36a310f
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:services/service/odl-tcpmd5-netty-cfg:md5-server-channel-factory/config:instance/md5-server-channel-factory
diff --git a/csit/variables/tcpmd5user/pcep_client_channel_module/config.uri b/csit/variables/tcpmd5user/pcep_client_channel_module/config.uri
deleted file mode 100644 (file)
index d0a1b0e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:modules/module/odl-pcep-impl-cfg:pcep-dispatcher-impl/global-pcep-dispatcher/odl-pcep-impl-cfg:md5-channel-factory
diff --git a/csit/variables/tcpmd5user/pcep_client_channel_module/location.uri b/csit/variables/tcpmd5user/pcep_client_channel_module/location.uri
new file mode 100644 (file)
index 0000000..3963fe3
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-pcep-impl-cfg:pcep-dispatcher-impl/global-pcep-dispatcher/odl-pcep-impl-cfg:md5-channel-factory
diff --git a/csit/variables/tcpmd5user/pcep_dispatcher_module/config.uri b/csit/variables/tcpmd5user/pcep_dispatcher_module/config.uri
deleted file mode 100644 (file)
index 89fc159..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:modules/module/odl-pcep-impl-cfg:pcep-dispatcher-impl/global-pcep-dispatcher?prettyPrint=true
diff --git a/csit/variables/tcpmd5user/pcep_dispatcher_module/location.uri b/csit/variables/tcpmd5user/pcep_dispatcher_module/location.uri
new file mode 100644 (file)
index 0000000..4acf534
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-pcep-impl-cfg:pcep-dispatcher-impl/global-pcep-dispatcher?prettyPrint=true
diff --git a/csit/variables/tcpmd5user/pcep_server_channel_module/config.uri b/csit/variables/tcpmd5user/pcep_server_channel_module/config.uri
deleted file mode 100644 (file)
index ec835da..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:modules/module/odl-pcep-impl-cfg:pcep-dispatcher-impl/global-pcep-dispatcher/odl-pcep-impl-cfg:md5-server-channel-factory
diff --git a/csit/variables/tcpmd5user/pcep_server_channel_module/location.uri b/csit/variables/tcpmd5user/pcep_server_channel_module/location.uri
new file mode 100644 (file)
index 0000000..b1cb6ee
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-pcep-impl-cfg:pcep-dispatcher-impl/global-pcep-dispatcher/odl-pcep-impl-cfg:md5-server-channel-factory
diff --git a/csit/variables/tcpmd5user/pcep_topology_client_module/config.uri b/csit/variables/tcpmd5user/pcep_topology_client_module/config.uri
deleted file mode 100644 (file)
index f13f04d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config:modules/module/odl-pcep-topology-provider-cfg:pcep-topology-provider/pcep-topology/client/$IP