Migrate Get Requests invocations(libraries)
[integration/test.git] / csit / libraries / SxpLib.robot
index 9be72f4c57449bdaaf64a80b981cb9f6d4a646a4..7a3a431029f541fdff86c61a58f5b6e3b7d18dc7 100644 (file)
@@ -4,7 +4,6 @@ Documentation       Library containing Keywords used for SXP testing
 Library             Collections
 Library             RequestsLibrary
 Library             ./Sxp.py
-Resource            CompareStream.robot
 Resource            KarafKeywords.robot
 Resource            TemplatedRequests.robot
 Resource            Utils.robot
@@ -98,21 +97,13 @@ Verify Connection
 Add Bindings
     [Documentation]    Based on ODL version decide if bindings will be added with or without origin type (introduced in Fluorine)
     [Arguments]    ${sgt}    ${prefixes}    ${node}=127.0.0.1    ${session}=session    ${domain}=global    ${origin}=LOCAL
-    CompareStream.Run_Keyword_If_At_Least_Fluorine
-    ...    Add Bindings Fluorine
+    Add Bindings Fluorine
     ...    ${sgt}
     ...    ${prefixes}
     ...    ${node}
     ...    ${session}
     ...    ${domain}
     ...    ${origin}
-    CompareStream.Run_Keyword_If_At_Most_Oxygen
-    ...    Add Bindings Oxygen
-    ...    ${sgt}
-    ...    ${prefixes}
-    ...    ${node}
-    ...    ${session}
-    ...    ${domain}
 
 Add Bindings Fluorine
     [Documentation]    Add/Update one or more bindings with origin type via RPC to Master DB of the node
@@ -120,12 +111,6 @@ Add Bindings Fluorine
     ${data} =    Sxp.Add Bindings Xml Fluorine    ${node}    ${domain}    ${sgt}    ${prefixes}    ${origin}
     Post To Controller    ${session}    add-bindings    ${data}
 
-Add Bindings Oxygen
-    [Documentation]    Add/Update one or more bindings without origin type via RPC to Master DB of the node
-    [Arguments]    ${sgt}    ${prefixes}    ${node}    ${session}    ${domain}
-    ${data} =    Sxp.Add Bindings Xml Oxygen    ${node}    ${domain}    ${sgt}    ${prefixes}
-    Post To Controller    ${session}    add-bindings    ${data}
-
 Get Bindings
     [Documentation]    Gets all binding via RPC from Master DB of node
     [Arguments]    ${node}=127.0.0.1    ${session}=session    ${domain}=global    ${scope}=all
@@ -309,21 +294,13 @@ Verify Snapshot Was Pushed
 Add Domain
     [Documentation]    Based on ODL version decide if domain's bindings will be added with or without origin type (introduced in Fluorine)
     [Arguments]    ${domain_name}    ${sgt}=None    ${prefixes}=None    ${origin}=LOCAL    ${node}=127.0.0.1    ${session}=session
-    CompareStream.Run_Keyword_If_At_Least_Fluorine
-    ...    Add Domain Fluorine
+    Add Domain Fluorine
     ...    ${domain_name}
     ...    ${sgt}
     ...    ${prefixes}
     ...    ${origin}
     ...    ${node}
     ...    ${session}
-    CompareStream.Run_Keyword_If_At_Most_Oxygen
-    ...    Add Domain Oxygen
-    ...    ${domain_name}
-    ...    ${sgt}
-    ...    ${prefixes}
-    ...    ${node}
-    ...    ${session}
 
 Add Domain Fluorine
     [Documentation]    Add Domain with bindings (with origin) via RPC
@@ -331,12 +308,6 @@ Add Domain Fluorine
     ${data} =    Sxp.Add Domain Xml Fluorine    ${node}    ${domain_name}    ${sgt}    ${prefixes}    ${origin}
     Post To Controller    ${session}    add-domain    ${data}
 
-Add Domain Oxygen
-    [Documentation]    Add Domain with bindings (without origin) via RPC
-    [Arguments]    ${domain_name}    ${sgt}    ${prefixes}    ${node}    ${session}
-    ${data} =    Sxp.Add Domain Xml Oxygen    ${node}    ${domain_name}    ${sgt}    ${prefixes}
-    Post To Controller    ${session}    add-domain    ${data}
-
 Delete Domain
     [Documentation]    Delete Domain via RPC
     [Arguments]    ${domain_name}    ${node}=127.0.0.1    ${session}=session
@@ -391,20 +362,20 @@ Setup SXP Environment
 Check Node Started
     [Documentation]    Verify that SxpNode has data writen to Operational datastore and is running
     [Arguments]    ${node}    ${port}=64999    ${system}=${node}    ${session}=session    ${ip}=${node}
-    ${resp} =    RequestsLibrary.Get Request
+    ${resp} =    RequestsLibrary.GET On Session
     ...    ${session}
     ...    /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
+    ...    expected_status=200
     ${rc} =    Get Node Running Status    ${node}    ${port}    ${system}    ${session}    ${ip}
     BuiltIn.Should Be Equal As Strings    ${rc}    0
 
 Check Node Stopped
     [Documentation]    Verify that SxpNode has data removed from Operational datastore and is not running
     [Arguments]    ${node}    ${port}=64999    ${system}=${node}    ${session}=session    ${ip}=${node}
-    ${resp} =    RequestsLibrary.Get Request
+    ${resp} =    RequestsLibrary.GET On Session
     ...    ${session}
     ...    /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
-    BuiltIn.Should Be Equal As Strings    ${resp.status_code}    404
+    ...    expected_status=404
     ${rc} =    Get Node Running Status    ${node}    ${port}    ${system}    ${session}    ${ip}
     BuiltIn.Should Be Equal As Strings    ${rc}    1
 
@@ -432,7 +403,7 @@ Clean SXP Environment
 Get Routing Configuration From Controller
     [Documentation]    Get Routing configuration from config DS
     [Arguments]    ${session}
-    ${resp} =    RequestsLibrary.Get Request
+    ${resp} =    RequestsLibrary.GET On Session
     ...    ${session}
     ...    /restconf/config/sxp-cluster-route:sxp-cluster-route/
     ...    headers=${ACCEPT_XML}
@@ -453,7 +424,7 @@ Put Routing Configuration To Controller
 Clean Routing Configuration To Controller
     [Documentation]    Delete Routing configuration from Config DS
     [Arguments]    ${session}
-    ${resp} =    RequestsLibrary.Get Request
+    ${resp} =    RequestsLibrary.GET On Session
     ...    ${session}
     ...    /restconf/config/sxp-cluster-route:sxp-cluster-route/
     ...    headers=${ACCEPT_XML}