Fix python3 issues in Netvirt 17/90617/7
authorSrinivas Rachakonda <srinivas.rachakonda@gmail.com>
Wed, 24 Jun 2020 07:35:45 +0000 (13:05 +0530)
committerJamo Luhrsen <jluhrsen@gmail.com>
Thu, 2 Jul 2020 04:43:25 +0000 (04:43 +0000)
Also removed VTN library files

Signed-off-by: Srinivas Rachakonda <srinivas.rachakonda@gmail.com>
Change-Id: Ifcfbc76cc5c308f0e7126ac5b494c7e80ca64a18

18 files changed:
csit/libraries/AAAKeywords.robot
csit/libraries/BgpOperations.robot
csit/libraries/CrudLibrary.py
csit/libraries/DIDMKeywords.robot
csit/libraries/DataModels.robot
csit/libraries/Genius.robot
csit/libraries/L2GatewayOperations.robot
csit/libraries/OVSDB.robot
csit/libraries/OpenStackOperations.robot
csit/libraries/SxpLib.robot
csit/libraries/TopoprocessingKeywords.robot
csit/libraries/TsdrUtils.robot
csit/libraries/Utils.robot
csit/libraries/VpnOperations.robot
csit/libraries/VtnCoKeywords.robot [deleted file]
csit/libraries/VtnMaKeywords.robot
csit/suites/netvirt/upgrade/upgrade.robot
csit/suites/netvirt/vpnservice/arp_learning.robot

index eb2313315fadb36a28dfb0131c64399c3873ff96..d04b87de5b3aaeab54afc0e69922189c02c44b45 100644 (file)
@@ -51,7 +51,7 @@ Get Auth Token
     ${auth_data}=    Create Auth Data    ${USER}    ${PWD}    ${scope}    ${client_id}    ${client_secret}
     ${resp}=    AAA Login    ${ODL_SYSTEM_IP}    ${auth_data}
     Should Be Equal As Strings    ${resp.status_code}    201
-    ${auth_token}=    Extract Value From Content    ${resp.content}    /access_token    strip
+    ${auth_token}=    Extract Value From Content    ${resp.text}    /access_token    strip
     [Return]    ${auth_token}
 
 Revoke Auth Token
@@ -73,7 +73,7 @@ Get User From IDM DB
     ${headers}=    Create Dictionary    Content-Type=application/x-www-form-urlencoded
     ${resp}=    RequestsLibrary.GET Request    httpbin    ${idmurl}/users/${user_id}    headers=${headers}
     Should Be Equal As Strings    ${resp.status_code}    200
-    Log    ${resp.content}
+    Log    ${resp.text}
     [Return]    ${resp}
 
 Create User
@@ -83,5 +83,5 @@ Create User
     ${headers}=    Create Dictionary    Content-Type=application/json
     ${resp}=    RequestsLibrary.POST Request    httpbin    ${idmurl}/users    headers=${headers}    data=${user_data}
     Should Be Equal As Strings    ${resp.status_code}    201
-    Log    ${resp.content}
+    Log    ${resp.text}
     [Return]    ${resp}
index 09c754cd4bbec3abb24a48f8d3cc53d4e0307d28..e44c3367383bc4247067a630734582a86319c00f 100644 (file)
@@ -258,16 +258,16 @@ Get BGP Configuration On ODL
     [Arguments]    ${odl_session}
     [Documentation]    Get bgp configuration
     ${resp} =    RequestsLibrary.Get Request    ${odl_session}    ${CONFIG_API}/ebgp:bgp/
-    Log    ${resp.content}
-    [Return]    ${resp.content}
+    Log    ${resp.text}
+    [Return]    ${resp.text}
 
 Delete BGP Configuration On ODL
     [Arguments]    ${odl_session}
     [Documentation]    Delete BGP
     ${resp} =    RequestsLibrary.Delete Request    ${odl_session}    ${CONFIG_API}/ebgp:bgp/
-    Log    ${resp.content}
+    Log    ${resp.text}
     Should Be Equal As Strings    ${resp.status_code}    200
-    [Return]    ${resp.content}
+    [Return]    ${resp.text}
 
 Create External Tunnel Endpoint Configuration
     [Arguments]    &{Kwargs}
@@ -283,8 +283,8 @@ Get External Tunnel Endpoint Configuration
     [Arguments]    ${ip}
     [Documentation]    Get bgp configuration
     ${resp} =    RequestsLibrary.Get Request    session    ${CONFIG_API}/itm:dc-gateway-ip-list/dc-gateway-ip/${ip}/
-    Log    ${resp.content}
-    [Return]    ${resp.content}
+    Log    ${resp.text}
+    [Return]    ${resp.text}
 
 Teardown_Everything
     [Documentation]    Create and Log the diff between expected and actual responses, make sure Python tool was killed.
index d5979ea5853dce6731bbecfd7856dcf243015a4f..baaf5f4547f30e12bdc45e503e3993a226607636 100644 (file)
@@ -242,7 +242,7 @@ def testlongevity(inputtime, port, *ips):
             resp = getCars(ip, port, 0)
             if resp.status_code == 200:
                 print("Pass: car data available after addition")
-                if resp.content.find("manufacturer100") == -1:
+                if resp.text.find("manufacturer100") == -1:
                     print("Fail: last car is not there")
                 else:
                     print("Pass: car data matches")
@@ -254,7 +254,7 @@ def testlongevity(inputtime, port, *ips):
             resp = getPersons(ip, port, 0)
             if resp.status_code == 200:
                 print("Pass: people data available after addition")
-                if resp.content.find("user100") == -1:
+                if resp.text.find("user100") == -1:
                     print("Fail: last person is not there")
                 else:
                     print("Pass: person data matches")
@@ -267,7 +267,7 @@ def testlongevity(inputtime, port, *ips):
             resp = getCarPersonMappings(ip, port, 0)
             if resp.status_code == 200:
                 print("Pass: car person data available after addition")
-                if resp.content.find("user100") == -1:
+                if resp.text.find("user100") == -1:
                     print("Fail: last car person is not there")
                 else:
                     print("Pass: car person data matches")
index 2d6f0c920ff858c612c716fcf2dca5fca71041e6..881d9d0b42d24787a242cd4a3747edbf4d4d7c91 100644 (file)
@@ -11,14 +11,14 @@ Check DIDM Registered With Device
     [Documentation]    Check for DIDM registered with the device
     ${resp}=    RequestsLibrary.Get Request    session    ${OPERATIONAL_NODES_API}
     Should Be Equal As Strings    ${resp.status_code}    200
-    Log    ${resp.content}
-    Should Contain    ${resp.content}    didm
-    [Return]    ${resp.content}
+    Log    ${resp.text}
+    Should Contain    ${resp.text}    didm
+    [Return]    ${resp.text}
 
 Find Device Data
     [Documentation]    Extract device information
-    ${resp.content}=    Check DIDM Registered With Device
-    ${json_resp}=    RequestsLibrary.To_Json    ${resp.content}
+    ${resp.text}=    Check DIDM Registered With Device
+    ${json_resp}=    RequestsLibrary.To_Json    ${resp.text}
     ${nodes_resp}=    Get From Dictionary    ${json_resp}    nodes
     ${node_resp}=    Get From Dictionary    ${nodes_resp}    node
     ${node_data}=    Get From List    ${node_resp}    0
index d97a069e1abe3a996509f5a7fae238a6f2b49c33..871b8137ed23a81e5f1c61ab21c7849c4de24074 100644 (file)
@@ -19,7 +19,7 @@ Get Model Dump
     Create Session    model_dump_session    http://${controller_ip}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}    timeout=1    max_retries=0
     FOR    ${model}    IN    @{data_models}
         ${resp}=    RequestsLibrary.Get Request    model_dump_session    restconf/${model}
-        ${pretty_output}=    To Json    ${resp.content}    pretty_print=True
+        ${pretty_output}=    To Json    ${resp.text}    pretty_print=True
         Log    ${pretty_output}
     END
 
index 713d260472800d41987b913f1fa6fc1a31011d0e..6cc208d06ae65a51273ac36cfc80fbf095570d2d 100644 (file)
@@ -230,9 +230,9 @@ Get Tunnel
     ${resp} =    BuiltIn.Run Keyword If    '${config_api_type}' == '${EMPTY}'    RequestsLibrary.Get Request    session    ${CONFIG_API}/itm-state:tunnel-list/internal-tunnel/${src}/${dst}/${type}/
     ...    ELSE    RequestsLibrary.Get Request    session    ${CONFIG_API}/itm-state:dpn-teps-state/dpns-teps/${src}/remote-dpns/${dst}/
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    ${RESP_CODE}
-    BuiltIn.Log    ${resp.content}
-    ${respjson} =    RequestsLibrary.To Json    ${resp.content}    pretty_print=True
-    ${json} =    Utils.Json Parse From String    ${resp.content}
+    BuiltIn.Log    ${resp.text}
+    ${respjson} =    RequestsLibrary.To Json    ${resp.text}    pretty_print=True
+    ${json} =    Utils.Json Parse From String    ${resp.text}
     BuiltIn.Should Contain    ${resp.text}    ${dst}
     BuiltIn.Run Keyword If    '${config_api_type}' == '${EMPTY}'    BuiltIn.Should Contain    ${resp.text}    ${src}
     ${tunnel_interface_name} =    BuiltIn.Run Keyword If    "tunnel-interface-names" in "${json}"    Genius.Get Tunnel Interface Name    ${json["internal-tunnel"][0]}    tunnel-interface-names
index 63a4786fabb78df8fe95d2ea14ed9566d9d71147..4e7e085be50a663c800205dd071a7545a36fb418 100644 (file)
@@ -207,11 +207,11 @@ Get L2gw Debug Info
     Exec Command    ${hwvtep_conn_id}    ${OVSDB_CLIENT_DUMP}
     OpenStackOperations.Get Test Teardown Debugs
     ${resp} =    RequestsLibrary.Get Request    session    ${CONFIG_API}/itm-state:external-tunnel-list/
-    Log    ${resp.content}
+    Log    ${resp.text}
     ${resp} =    RequestsLibrary.Get Request    session    ${CONFIG_API}/network-topology:network-topology/topology/hwvtep:1
-    Log    ${resp.content}
+    Log    ${resp.text}
     ${resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_API}/network-topology:network-topology/topology/hwvtep:1
-    Log    ${resp.content}
+    Log    ${resp.text}
     Exec Command    ${OS_CNTL_CONN_ID}    cat /etc/neutron/neutron.conf
     Exec Command    ${OS_CNTL_CONN_ID}    cat /etc/neutron/l2gw_plugin.ini
     Exec Command    ${OS_CNTL_CONN_ID}    ps -ef | grep neutron-server
index f9140a895a0f33622b89c2c475e34e00a6db9271..39290747e3a9a0586d795e16e3b4aec8710787f7 100644 (file)
@@ -34,7 +34,7 @@ Create OVSDB Node
     BuiltIn.Log    URI is ${uri}
     BuiltIn.Log    data: ${body}
     ${resp} =    RequestsLibrary.Post Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.content}
+    OVSDB.Log Request    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Connect To Ovsdb Node
@@ -47,7 +47,7 @@ Connect To Ovsdb Node
     BuiltIn.Log    URI is ${uri}
     BuiltIn.Log    data: ${body}
     ${resp} =    RequestsLibrary.Put Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.content}
+    OVSDB.Log Request    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Disconnect From Ovsdb Node
@@ -71,7 +71,7 @@ Add Bridge To Ovsdb Node
     BuiltIn.Log    URI is ${uri}
     BuiltIn.Log    data: ${body}
     ${resp} =    RequestsLibrary.Put Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.content}
+    OVSDB.Log Request    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Delete Bridge From Ovsdb Node
@@ -122,9 +122,9 @@ Get OVSDB UUID
     ...    node-id stripped of "ovsdb://uuid/". If not found, ${EMPTY} will be returned.
     ${uuid} =    Set Variable    ${EMPTY}
     ${resp} =    RequestsLibrary.Get Request    ${controller_http_session}    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1
-    OVSDB.Log Request    ${resp.content}
+    OVSDB.Log Request    ${resp.text}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
-    ${resp_json} =    RequestsLibrary.To Json    ${resp.content}
+    ${resp_json} =    RequestsLibrary.To Json    ${resp.text}
     ${topologies} =    Collections.Get From Dictionary    ${resp_json}    topology
     ${topology} =    Collections.Get From List    ${topologies}    0
     ${node_list} =    Collections.Get From Dictionary    ${topology}    node
@@ -248,17 +248,17 @@ Get Port Metadata
 Log Config And Operational Topology
     [Documentation]    For debugging purposes, this will log both config and operational topo data stores
     ${resp}    RequestsLibrary.Get Request    session    ${CONFIG_TOPO_API}
-    OVSDB.Log Request    ${resp.content}
+    OVSDB.Log Request    ${resp.text}
     ${resp} =    RequestsLibrary.Get Request    session    ${OPERATIONAL_TOPO_API}
-    OVSDB.Log Request    ${resp.content}
+    OVSDB.Log Request    ${resp.text}
 
 Config and Operational Topology Should Be Empty
     [Documentation]    This will check that only the expected output is there for both operational and config
     ...    topology data stores. Empty probably means that only ovsdb:1 is there.
     ${config_resp}    RequestsLibrary.Get Request    session    ${CONFIG_TOPO_API}
     ${operational_resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_TOPO_API}
-    BuiltIn.Should Contain    ${config_resp.content}    {"topology-id":"ovsdb:1"}
-    BuiltIn.Should Contain    ${operational_resp.content}    {"topology-id":"ovsdb:1"}
+    BuiltIn.Should Contain    ${config_resp.text}    {"topology-id":"ovsdb:1"}
+    BuiltIn.Should Contain    ${operational_resp.text}    {"topology-id":"ovsdb:1"}
 
 Modify Multi Port Body
     [Arguments]    ${ovs_1_port_name}    ${ovs_2_port_name}    ${bridge}
@@ -278,7 +278,7 @@ Modify Multi Port Body
     BuiltIn.Log    URI is ${uri}
     BuiltIn.Log    data: ${body}
     ${resp} =    RequestsLibrary.Put Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.content}
+    OVSDB.Log Request    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     [Return]    ${body}
 
@@ -290,7 +290,7 @@ Create Qos
     BuiltIn.Log    URI is ${uri}
     BuiltIn.Log    data: ${body}
     ${resp} =    RequestsLibrary.Put Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.content}
+    OVSDB.Log Request    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Create Queue
@@ -301,7 +301,7 @@ Create Queue
     BuiltIn.Log    URI is ${uri}
     BuiltIn.Log    data: ${body}
     ${resp} =    RequestsLibrary.Put Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.content}
+    OVSDB.Log Request    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Update Qos
@@ -311,13 +311,13 @@ Update Qos
     BuiltIn.Log    URL is ${uri}
     BuiltIn.Log    data: ${body}
     ${resp} =    RequestsLibrary.Put Request    session    ${uri}    data=${body}
-    OVSDB.Log Request    ${resp.content}
+    OVSDB.Log Request    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Create Qos Linked Queue
     ${body}    OperatingSystem.Get File    ${OVSDB_CONFIG_DIR}/bug_7160/create_qoslinkedqueue.json
     ${resp}    RequestsLibrary.Put Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1    data=${body}
-    OVSDB.Log Request    ${resp.content}
+    OVSDB.Log Request    ${resp.text}
     BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Add OVS Logging
index 6c44afca88d0ac9351975041da3a611539a2f981..aad16bbcc59abf71bdd5eac85695c3bf2cf78ddf 100644 (file)
@@ -951,34 +951,34 @@ Get L2gw Connection Id
 Neutron Port List Rest
     [Documentation]    Keyword to get all ports details in Neutron (Using REST).
     ${resp} =    RequestsLibrary.Get Request    session    ${PORT_URL}
-    BuiltIn.Log    ${resp.content}
+    BuiltIn.Log    ${resp.text}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
-    [Return]    ${resp.content}
+    [Return]    ${resp.text}
 
 Get Neutron Port Rest
     [Arguments]    ${port_id}
     [Documentation]    Keyword to get the specific port details in Neutron (Using REST).
     ${resp} =    RequestsLibrary.Get Request    session    ${CONFIG_API}/${GET_PORT_URL}/${port_id}
-    BuiltIn.Log    ${resp.content}
+    BuiltIn.Log    ${resp.text}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
-    [Return]    ${resp.content}
+    [Return]    ${resp.text}
 
 Update Port Rest
     [Arguments]    ${port_id}    ${json_data}
     [Documentation]    Keyword to update ${port_id} with json data received in ${json_data} (Using REST).
     BuiltIn.Log    ${json_data}
     ${resp} =    RequestsLibrary.Put Request    session    ${CONFIG_API}/${GET_PORT_URL}/${port_id}    ${json_data}
-    BuiltIn.Log    ${resp.content}
+    BuiltIn.Log    ${resp.text}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
-    [Return]    ${resp.content}
+    [Return]    ${resp.text}
 
 Get Neutron Network Rest
     [Arguments]    ${net_id}
     [Documentation]    Keyword to get the specific network details in Neutron (Using REST).
     ${resp} =    RequestsLibrary.Get Request    session    ${NETWORK_URL}/network/${net_id}
-    BuiltIn.Log    ${resp.content}
+    BuiltIn.Log    ${resp.text}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
-    [Return]    ${resp.content}
+    [Return]    ${resp.text}
 
 Create And Configure Security Group
     [Arguments]    ${sg-name}
@@ -1344,7 +1344,7 @@ Verify Expected Default Tables On Nodes
     [Arguments]    ${node_ips}=@{OS_ALL_IPS}
     [Documentation]    Verify if Default Table Entries are programmed on all Nodes
     ${resp} =    RequestsLibrary.Get Request    session    ${CONFIG_NODES_API}
-    Utils.Log Content    ${resp.content}
+    Utils.Log Content    ${resp.text}
     ${failed_node_list} =    BuiltIn.Create List
     FOR    ${node_ip}    IN    @{node_ips}
         ${failed_table_list} =    Verify Expected Default Tables    ${node_ip}
index 2c5d9436bc3ab9cf8e4dcd7d4018cddf4198c0d9..55d7166529f9db2bea2550fd7f41f5e46a24024f 100644 (file)
@@ -17,12 +17,12 @@ Post To Controller
     [Arguments]    ${session}    ${path}    ${data}    ${rest_context}=${REST_CONTEXT}
     [Documentation]    Post request to Controller and checks response
     ${resp} =    RequestsLibrary.Post Request    ${session}    ${rest_context}:${path}    data=${data}    headers=${HEADERS_XML}
-    Log    ${resp.content}
+    Log    ${resp.text}
     Log    ${session}
     Log    ${path}
     Log    ${data}
     BuiltIn.Should be Equal As Strings    ${resp.status_code}    200
-    ${content} =    BuiltIn.Evaluate    json.loads('''${resp.content}''')    json
+    ${content} =    BuiltIn.Evaluate    json.loads('''${resp.text}''')    json
     ${output} =    collections.Get From Dictionary    ${content}    output
     ${result} =    collections.Get From Dictionary    ${output}    result
     BuiltIn.Should Be True    ${result}    RPC result is False
@@ -55,7 +55,7 @@ Get Connections
     ${data} =    Sxp.Get Connections From Node Xml    ${node}    ${domain}
     ${resp} =    RequestsLibrary.Post Request    ${session}    ${REST_CONTEXT}:get-connections    data=${data}    headers=${HEADERS_XML}
     BuiltIn.Should be Equal As Strings    ${resp.status_code}    200
-    [Return]    ${resp.content}
+    [Return]    ${resp.text}
 
 Delete Connections
     [Arguments]    ${ip}    ${port}    ${node}=127.0.0.1    ${session}=session    ${domain}=global
@@ -140,7 +140,7 @@ Get Peer Groups
     ${data} =    Sxp.Get Peer Groups From Node Xml    ${node}
     ${resp} =    RequestsLibrary.Post Request    ${session}    ${REST_CONTEXT}:get-peer-groups    data=${data}    headers=${HEADERS_XML}
     BuiltIn.Should be Equal As Strings    ${resp.status_code}    200
-    [Return]    ${resp.content}
+    [Return]    ${resp.text}
 
 Clean Peer Groups
     [Arguments]    ${node}=127.0.0.1    ${session}=session
@@ -365,7 +365,7 @@ Get Routing Configuration From Controller
     [Arguments]    ${session}
     [Documentation]    Get Routing configuration from config DS
     ${resp} =    RequestsLibrary.Get Request    ${session}    /restconf/config/sxp-cluster-route:sxp-cluster-route/    headers=${ACCEPT_XML}
-    ${data} =    BuiltIn.Set Variable If    "${resp.status_code}" == "200"    ${resp.content}    ${EMPTY}
+    ${data} =    BuiltIn.Set Variable If    "${resp.status_code}" == "200"    ${resp.text}    ${EMPTY}
     [Return]    ${data}
 
 Put Routing Configuration To Controller
index 7f3e903efc47ea5eeebe445485a3eb9e83caecbe..d4a47cf320dd91114cf1a8521835617da2bb224b 100644 (file)
@@ -119,7 +119,7 @@ Print Output Topo
     Log    ---- Output Topo Dump After Cooldown----
     Sleep    2s
     ${resp}    Wait Until Keyword Succeeds    5x    250ms    Basic Request Get    ${OVERLAY_TOPO_URL}
-    Log    ${resp.content}
+    Log    ${resp.text}
 
 Refresh Underlay Topologies And Delete Overlay Topology
     [Documentation]    Deletes given overlay topology from datastore and overwrites the underlaying ones with initial topologies
@@ -138,21 +138,21 @@ Insert Underlay Topologies
     # Network underlay topologies
     FOR    ${index}    IN RANGE    1    7
         ${resp}    Put Request    session    ${CONFIG_API}/${TOPOLOGY_URL}/network-topo:${index}    data=${NETWORK_UNDERLAY_TOPOLOGY_${index}}
-        Log    ${resp.content}
+        Log    ${resp.text}
         Should Match    "${resp.status_code}"    "20?"
         # Openflow underlay nodes
     END
     ${resp}    Put Request    session    ${CONFIG_API}/opendaylight-inventory:nodes    data=${OPENFLOW_UNDERLAY_NODES}
-    Log    ${resp.content}
+    Log    ${resp.text}
     Should Match    "${resp.status_code}"    "20?"
     # Openflow underlay topologies
     FOR    ${index}    IN RANGE    1    7
         ${resp}    Put Request    session    ${CONFIG_API}/${TOPOLOGY_URL}/openflow-topo:${index}    data=${OPENFLOW_UNDERLAY_TOPOLOGY_${index}}
-        Log    ${resp.content}
+        Log    ${resp.text}
         Should Match    "${resp.status_code}"    "20?"
     END
     Issue Command On Karaf Console    log:clear
-    Log    ${resp.content}
+    Log    ${resp.text}
 
 Prepare Unification Inside Topology Request
     [Arguments]    ${request_template}    ${model}    ${correlation_item}    ${underlay_topo1}
@@ -468,16 +468,16 @@ Output Topo Should Be Complete
     ...    ${link-ref_count}=-1
     [Documentation]    Verifies that the output topology contains the expected amount of essential elements
     ${resp}    Wait Until Keyword Succeeds    5x    250ms    Basic Request Get    ${OVERLAY_TOPO_URL}
-    Should Contain    ${resp.content}    <topology-id>${OUTPUT_TOPO_NAME}</topology-id>
-    Run Keyword If    ${node_count}>-1    Should Contain X Times    ${resp.content}    <node>    ${node_count}
-    Run Keyword If    ${supporting-node_count}>-1    Should Contain X Times    ${resp.content}    <supporting-node>    ${supporting-node_count}
-    Run Keyword If    ${node-ref_count}>-1    Should Contain X Times    ${resp.content}    <node-ref>    ${node-ref_count}
-    Run Keyword If    ${link_count}>-1    Should Contain X Times    ${resp.content}    <link>    ${link_count}
-    Run Keyword If    ${link-ref_count}>-1    Should Contain X Times    ${resp.content}    <link-ref>    ${link-ref_count}
-    Run Keyword If    ${tp_count}>-1    Should Contain X Times    ${resp.content}    <termination-point>    ${tp_count}
-    Run Keyword If    ${tp-ref_count}>-1    Should Contain X Times    ${resp.content}    <tp-ref>    ${tp-ref_count}
+    Should Contain    ${resp.text}    <topology-id>${OUTPUT_TOPO_NAME}</topology-id>
+    Run Keyword If    ${node_count}>-1    Should Contain X Times    ${resp.text}    <node>    ${node_count}
+    Run Keyword If    ${supporting-node_count}>-1    Should Contain X Times    ${resp.text}    <supporting-node>    ${supporting-node_count}
+    Run Keyword If    ${node-ref_count}>-1    Should Contain X Times    ${resp.text}    <node-ref>    ${node-ref_count}
+    Run Keyword If    ${link_count}>-1    Should Contain X Times    ${resp.text}    <link>    ${link_count}
+    Run Keyword If    ${link-ref_count}>-1    Should Contain X Times    ${resp.text}    <link-ref>    ${link-ref_count}
+    Run Keyword If    ${tp_count}>-1    Should Contain X Times    ${resp.text}    <termination-point>    ${tp_count}
+    Run Keyword If    ${tp-ref_count}>-1    Should Contain X Times    ${resp.text}    <tp-ref>    ${tp-ref_count}
     Log    ---- Output Topo ----
-    Log    ${resp.content}
+    Log    ${resp.text}
     [Return]    ${resp}
 
 Set Global Variable If It Does Not Exist
index 9a9e69403c58effa2047a33a5d174264d337d818..9c3604e85372ff6bd3c92d95028db61a74740c84 100644 (file)
@@ -374,7 +374,7 @@ Get Stats XML
     [Documentation]    Parse the xml output and returns it.
     ${sid}=    RequestsLibrary.Create_Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    headers=${SEND_ACCEPT_XML_HEADERS}    auth=${AUTH}
     ${resp}=    RequestsLibrary.Get Request    session    ${query}    headers=${SEND_ACCEPT_XML_HEADERS}
-    ${resp_xml}=    Parse XML    ${resp.content}
+    ${resp_xml}=    Parse XML    ${resp.text}
     ${id1}=    Get Element Text    ${resp_xml}    ${xpath}
     Delete All Sessions
     [Return]    ${id1}
@@ -384,7 +384,7 @@ Return all XML matches
     [Documentation]    Returns all the values from xpath
     ${sid}=    RequestsLibrary.Create_Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    headers=${SEND_ACCEPT_XML_HEADERS}    auth=${AUTH}
     ${resp}=    RequestsLibrary.Get Request    session    ${query}    headers=${SEND_ACCEPT_XML_HEADERS}
-    ${resp_xml}=    Parse XML    ${resp.content}
+    ${resp_xml}=    Parse XML    ${resp.text}
     @{id1}=    Get Elements Texts    ${resp_xml}    ${xpath}
     Delete All Sessions
     [Return]    @{id1}
@@ -466,7 +466,7 @@ Generate TSDR Query
     [Documentation]    Issues TSDR Query and returns the list
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_QUERY}
     ${resp}=    RequestsLibrary.Get Request    session    /tsdr/metrics/query?tsdrkey="[NID=${NID}][DC=${DC}][MN=${MN}][RK=${RK}]"&from=${from}&until=${until}    headers=${HEADERS_QUERY}
-    @{convert}=    Parse Json    ${resp.content}
+    @{convert}=    Parse Json    ${resp.text}
     Delete All Sessions
     [Return]    @{convert}
 
@@ -476,7 +476,7 @@ Generate TSDR NBI
     [Documentation]    Issues TSDR Query and returns the list
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_QUERY}
     ${resp}=    RequestsLibrary.Get Request    session    /tsdr/nbi/render?target="[NID=${NID}][DC=${DC}][MN=${MN}][RK=${RK}]"&from=${from}&until=${until}&maxDataPoints=${datapts}    headers=${HEADERS_QUERY}
-    @{convert}=    Parse Json    ${resp.content}
+    @{convert}=    Parse Json    ${resp.text}
     ${dict_convert}=    Convert To Dictionary    @{convert}
     @{dict}=    Get Dictionary Values    ${dict_convert}
     ${datapoints_list}=    Convert to List    ${dict}[0]
@@ -600,7 +600,7 @@ Collect Data from SNMP Agent
     ${snmpagentcreate_json}=    json.dumps    ${snmpagentcreate}
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_QUERY}
     ${resp}=    RequestsLibrary.Post Request    session    /restconf/operations/snmp:get-interfaces    data=${snmpagentcreate_json}
-    ${convert}=    To Json    ${resp.content}
+    ${convert}=    To Json    ${resp.text}
     @{dict1}=    Get Dictionary Keys    ${convert}
     ${dict1_0}=    Get From List    ${dict1}    0
     ${dict1_val}=    Get From Dictionary    ${convert}    ${dict1_0}
@@ -668,8 +668,8 @@ Retrieve Value From Elasticsearch
     ${els_JSON_request}=    build_elastic_search_JSON_request    ${els_query}
     ${resp}=    RequestsLibrary.Post_Request    session    _search?pretty    data=${els_JSON_request}
     Should Be Equal As Strings    ${resp.status_code}    200
-    @{convert}=    Parse Json    ${resp.content}
-    ${json}=    RequestsLibrary.To Json    ${resp.content}
+    @{convert}=    Parse Json    ${resp.text}
+    ${json}=    RequestsLibrary.To Json    ${resp.text}
     ${result}=    extract_metric_value_search    ${json}
     [Teardown]    Delete All Sessions
     [Return]    ${result}
@@ -682,8 +682,8 @@ Check Available values from Elasticsearch
     ${els_JSON_request}=    build_elastic_search_JSON_request    ${els_query}
     ${resp}=    RequestsLibrary.Post_Request    session    _search?pretty    data=${els_JSON_request}
     Should Be Equal As Strings    ${resp.status_code}    200
-    @{convert}=    Parse Json    ${resp.content}
-    ${json}=    RequestsLibrary.To Json    ${resp.content}
+    @{convert}=    Parse Json    ${resp.text}
+    ${json}=    RequestsLibrary.To Json    ${resp.text}
     ${result}=    extract_metric_value_count    ${json}
     Log To Console    Elasticsearch: Check number of elements
     Should Be True    ${result} > ${number_items}
index f195cfdc2fdf06f99b1486f1ff2e55ed7c280a13..c7beb64d6a9d17e953621eeddb6f50bcd6eec24a 100644 (file)
@@ -95,7 +95,7 @@ Check For Specific Number Of Elements At URI
     [Documentation]    A GET is made to the specified ${URI} and the specific count of a
     ...    given element is done (as supplied by ${element} and ${expected_count})
     ${resp}    RequestsLibrary.Get Request    ${session}    ${uri}
-    Log    ${resp.content}
+    Log    ${resp.text}
     Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain X Times    ${resp.text}    ${element}    ${expected_count}
 
@@ -111,8 +111,8 @@ Check For Elements At URI
     [Documentation]    A GET is made at the supplied ${URI} and every item in the list of
     ...    ${elements} is verified to exist in the response
     ${resp}    RequestsLibrary.Get Request    ${session}    ${uri}
-    BuiltIn.Run Keyword If    "${pretty_print_json}" == "True"    Log Content    ${resp.content}
-    ...    ELSE    BuiltIn.Log    ${resp.content}
+    BuiltIn.Run Keyword If    "${pretty_print_json}" == "True"    Log Content    ${resp.text}
+    ...    ELSE    BuiltIn.Log    ${resp.text}
     Should Be Equal As Strings    ${resp.status_code}    200
     FOR    ${i}    IN    @{elements}
         Should Contain    ${resp.text}    ${i}
@@ -125,8 +125,8 @@ Check For Elements Not At URI
     ...    return of 404 is treated as empty list. From Neon onwards, an empty list is always
     ...    returned as null, giving 404 on rest call.
     ${resp}    RequestsLibrary.Get Request    ${session}    ${uri}
-    BuiltIn.Run Keyword If    "${pretty_print_json}" == "True"    Log Content    ${resp.content}
-    ...    ELSE    BuiltIn.Log    ${resp.content}
+    BuiltIn.Run Keyword If    "${pretty_print_json}" == "True"    Log Content    ${resp.text}
+    ...    ELSE    BuiltIn.Log    ${resp.text}
     BuiltIn.Run Keyword If    "${check_for_null}" == "True"    Builtin.Return From Keyword If    ${resp.status_code} == 404 or ${resp.status_code} == 409
     Should Be Equal As Strings    ${resp.status_code}    200
     FOR    ${i}    IN    @{elements}
@@ -304,7 +304,7 @@ Post Elements To URI
     [Arguments]    ${rest_uri}    ${data}    ${headers}=${headers}    ${session}=session
     [Documentation]    Perform a POST rest operation, using the URL and data provided
     ${resp} =    RequestsLibrary.Post Request    ${session}    ${rest_uri}    data=${data}    headers=${headers}
-    Log    ${resp.content}
+    Log    ${resp.text}
     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Remove All Elements At URI
@@ -430,7 +430,7 @@ Post Log Check
     [Arguments]    ${uri}    ${body}    ${session}=session    ${status_codes}=200
     [Documentation]    Post body to ${uri}, log response content, and check status
     ${resp}=    RequestsLibrary.Post Request    ${session}    ${uri}    ${body}
-    Log    ${resp.content}
+    Log    ${resp.text}
     TemplatedRequests.Check Status Code    ${resp}    ${status_codes}
     [Return]    ${resp}
 
index f4477ebbd38cf6228764b645367a7690dc20154c..57f207adefc7cd03b997d40410c4ad02b6e7b670 100644 (file)
@@ -56,8 +56,8 @@ VPN Get L3VPN ID
     [Arguments]    ${vrf_id}
     [Documentation]    Check that sub interface ip has been learnt after ARP request
     ${resp} =    RequestsLibrary.Get Request    session    ${VPN_REST}
-    BuiltIn.Log    ${resp.content}
-    @{list_any_matches} =    String.Get_Regexp_Matches    ${resp.content}    \"vpn-instance-name\":\"${VPN_INSTANCE_ID}\",.*"vrf-id":"${vrf_id}",\"vpn-id\":(\\d+)    1
+    BuiltIn.Log    ${resp.text}
+    @{list_any_matches} =    String.Get_Regexp_Matches    ${resp.text}    \"vpn-instance-name\":\"${VPN_INSTANCE_ID}\",.*"vrf-id":"${vrf_id}",\"vpn-id\":(\\d+)    1
     ${result} =    Evaluate    ${list_any_matches[0]} * 2
     ${vpn_id_hex} =    BuiltIn.Convert To Hex    ${result}
     [Return]    ${vpn_id_hex.lower()}
@@ -117,17 +117,17 @@ ITM Create Tunnel
 ITM Get Tunnels
     [Documentation]    Get all Tunnels and return the contents
     ${resp} =    RequestsLibrary.Get Request    session    ${CONFIG_API}/itm:transport-zones/
-    Log    ${resp.content}
+    Log    ${resp.text}
     Should Be Equal As Strings    ${resp.status_code}    200
-    [Return]    ${resp.content}
+    [Return]    ${resp.text}
 
 ITM Delete Tunnel
     [Arguments]    ${zone-name}
     [Documentation]    Delete Tunnels created under the transport-zone
     ${resp} =    RequestsLibrary.Delete Request    session    ${CONFIG_API}/itm:transport-zones/transport-zone/${zone-name}/
-    Log    ${resp.content}
+    Log    ${resp.text}
     Should Be Equal As Strings    ${resp.status_code}    200
-    [Return]    ${resp.content}
+    [Return]    ${resp.text}
 
 Verify Flows Are Present For L3VPN
     [Arguments]    ${ip}    ${vm_ips}
@@ -151,10 +151,10 @@ Verify GWMAC Entry On ODL
     [Arguments]    ${GWMAC_ADDRS}
     [Documentation]    get ODL GWMAC table entry
     ${resp} =    RequestsLibrary.Get Request    session    ${VPN_PORT_DATA_URL}
-    Log    ${resp.content}
+    Log    ${resp.text}
     Should Be Equal As Strings    ${resp.status_code}    200
     FOR    ${macAdd}    IN    @{GWMAC_ADDRS}
-        Should Contain    ${resp.content}    ${macAdd}
+        Should Contain    ${resp.text}    ${macAdd}
     END
 
 Verify GWMAC Flow Entry Removed From Flow Table
@@ -221,8 +221,8 @@ Get Fib Entries
     [Arguments]    ${session}
     [Documentation]    Get Fib table entries from ODL session
     ${resp}    RequestsLibrary.Get Request    ${session}    ${FIB_ENTRIES_URL}
-    Log    ${resp.content}
-    [Return]    ${resp.content}
+    Log    ${resp.text}
+    [Return]    ${resp.text}
 
 Get Gateway MAC And IP Address
     [Arguments]    ${router_Name}    ${ip_regex}=${IP_REGEX}
diff --git a/csit/libraries/VtnCoKeywords.robot b/csit/libraries/VtnCoKeywords.robot
deleted file mode 100644 (file)
index 239e676..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-*** Settings ***
-Library           SSHLibrary
-Library           String
-Library           DateTime
-Library           RequestsLibrary
-Library           json
-Library           SSHLibrary
-Library           Collections
-Library           XML
-Variables         ../variables/Variables.py
-Resource          ./CompareStream.robot
-Resource          ./Utils.robot
-Resource          ./MininetKeywords.robot
-
-*** Variable ***
-${vlan_topo}      --custom vlan_vtn_test.py --topo vlantopo
-${vtn_coordinator_nexus_path}    https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/vtn/distribution.vtn-coordinator
-${vtn_dist}       distribution.vtn-coordinator
-
-*** Keywords ***
-Get VtnCo
-    [Documentation]    Download the VTN Coordinator from Controller VM
-    Log    Download the VTN Coordinator bz2 file
-    SSHLibrary.Open_Connection    ${ODL_SYSTEM_IP}
-    SSHLibrary.Login_With_Public_Key    ${ODL_SYSTEM_USER}    ${USER_HOME}/.ssh/${SSH_KEY}    any
-    ${VTNC_FILENAME}=    Catenate    SEPARATOR=/    ${WORKSPACE}    vtn_coordinator.tar.bz2
-    SSHLibrary.Get_File    ${WORKSPACE}/${BUNDLEFOLDER}/externalapps/*vtn-coordinator*-bin.tar.bz2    ${VTNC_FILENAME}
-    SSHLibrary.Close_Connection
-    SSHLibrary.Open_Connection    ${TOOLS_SYSTEM_IP}
-    SSHLibrary.Login_With_Public_Key    ${TOOLS_SYSTEM_USER}    ${USER_HOME}/.ssh/${SSH_KEY}    any
-    SSHLibrary.Put_File    ${VTNC_FILENAME}    /tmp
-    SSHLibrary.Close_Connection
-
-Start SuiteVtnCo
-    [Documentation]    Download and startup the VTN Coordinator.
-    Log    Start the VTN Coordinator
-    #Get VtnCo
-    ${vtnc_conn_id}=    SSHLibrary.Open Connection    ${ODL_SYSTEM_IP}    prompt=${DEFAULT_LINUX_PROMPT}    timeout=30s
-    Set Suite Variable    ${vtnc_conn_id}
-    SSHLibrary.Login_With_Public_Key    ${ODL_SYSTEM_USER}    ${USER_HOME}/.ssh/${SSH_KEY}    any
-    SSHLibrary.Execute Command    sudo mkdir -p /usr/local/vtn
-    SSHLibrary.Execute Command    sudo chown jenkins /usr/local/vtn
-    SSHLibrary.Execute Command    sudo yum install -q -y https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-3.noarch.rpm
-    SSHLibrary.Execute Command    sudo yum install -q -y postgresql93-libs postgresql93 postgresql93-server postgresql93-contrib postgresql93-odbc
-    Download VtnCo Distribution
-    SSHLibrary.Execute Command    /usr/local/vtn/sbin/db_setup
-    SSHLibrary.Execute Command    /usr/local/vtn/bin/vtn_start
-    SSHLibrary.Execute Command    /usr/local/vtn/bin/unc_dmctl status
-    SSHLibrary.Execute Command    /usr/local/vtn/sbin/db_setup
-    SSHLibrary.Execute Command    sed -i 's/odcdrv_ping_interval = 30/odcdrv_ping_interval = 10/g' /usr/local/vtn/modules/odcdriver.conf
-    SSHLibrary.Execute Command    sed -i 's/physical_attributes_read_interval = 40/physical_attributes_read_interval = 15/g' /usr/local/vtn/modules/vtndrvintf.conf
-    SSHLibrary.Execute Command    /usr/local/vtn/bin/vtn_start
-    SSHLibrary.Execute Command    /usr/local/vtn/bin/unc_dmctl status
-    SSHLibrary.Execute Command    /usr/local/vtn/bin/drvodc_control loglevel trace
-    SSHLibrary.Execute Command    /usr/local/vtn/bin/lgcnw_control loglevel trace
-    SSHLibrary.Execute Command    exit
-
-Download VtnCo Distribution
-    # TODO: https://trello.com/c/fDiIUFMv/431-remove-hardcoded-versions-of-vtn-coordinator-in-libraries-vtncokeywords-robot
-    SSHLibrary.Execute Command    wget "${vtn_coordinator_nexus_path}/maven-metadata.xml"
-    SSHLibrary.Get_file    maven-metadata.xml
-    ${carbon_version}=    XML.Get Element Text    maven-metadata.xml    xpath=.//versions/version[1]
-    ${carbon_version_val}=    SSHLibrary.Execute Command    echo ${carbon_version} | awk -F"-" '{print $1}'
-    ${nitrogen_version}=    XML.Get Element Text    maven-metadata.xml    xpath=.//versions/version[2]
-    ${nitrogen_version_val}=    SSHLibrary.Execute Command    echo ${nitrogen_version} | awk -F"-" '{print $1}'
-    ${oxygen_version}=    XML.Get Element Text    maven-metadata.xml    xpath=.//versions/version[3]
-    ${oxygen_version_val}=    SSHLibrary.Execute Command    echo ${oxygen_version} | awk -F"-" '{print $1}'
-    SSHLibrary.Execute Command    sudo mv maven-metadata.xml old-maven-metadata.xml
-    CompareStream.Run_Keyword_If_Equals    carbon    SSHLibrary.Execute Command    wget "${vtn_coordinator_nexus_path}/${carbon_version}/maven-metadata.xml"
-    CompareStream.Run_Keyword_If_Equals    nitrogen    SSHLibrary.Execute Command    wget "${vtn_coordinator_nexus_path}/${nitrogen_version}/maven-metadata.xml"
-    CompareStream.Run_Keyword_If_Equals    oxygen    SSHLibrary.Execute Command    wget "${vtn_coordinator_nexus_path}/${oxygen_version}/maven-metadata.xml"
-    SSHLibrary.Get_file    maven-metadata.xml
-    ${value}=    XML.Get Element Text    maven-metadata.xml    xpath=.//snapshotVersion[1]/value
-    CompareStream.Run_Keyword_If_Equals    carbon    SSHLibrary.Execute Command    wget '${vtn_coordinator_nexus_path}/${carbon_version}/${vtn_dist}-${value}-bin.tar.bz2'
-    CompareStream.Run_Keyword_If_Equals    nitrogen    SSHLibrary.Execute Command    wget '${vtn_coordinator_nexus_path}/${nitrogen_version}/${vtn_dist}-${value}-bin.tar.bz2'
-    CompareStream.Run_Keyword_If_Equals    oxygen    SSHLibrary.Execute Command    wget '${vtn_coordinator_nexus_path}/${oxygen_version}/${vtn_dist}-${value}-bin.tar.bz2'
-    SSHLibrary.Execute Command    tar -C/ -jxvf ${vtn_dist}*-bin.tar.bz2
-
-Stop SuiteVtnCo
-    [Documentation]    Exit the Launch Test
-    Log    Stop the Launch Test
-
-Start SuiteVtnCoTest
-    [Documentation]    Start the VTNCo Test
-    Create Session    session    http://${ODL_SYSTEM_IP}:8083    headers=${VTNC_HEADERS}
-
-Stop SuiteVtnCoTest
-    [Documentation]    Exit the VtnCo Test
-    Delete All Sessions
-
-Get Coordinator Version
-    [Documentation]    Get API version for testing
-    ${resp}    RequestsLibrary.Get Request    session    ${VTNWEBAPI}/api_version
-    Should Be Equal As Strings    ${resp.status_code}    200
-
-Add a Controller
-    [Arguments]    ${ctrlname}    ${ctrlip}
-    [Documentation]    Create a controller
-    ${controllerinfo}    Create Dictionary    controller_id=${ctrlname}    type=odc    ipaddr=${ctrlip}    version=1.0
-    ${controllercreate}    Create Dictionary    controller=${controllerinfo}
-    ${controllercreate_json}=    json.dumps    ${controllercreate}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${CTRLS_CREATE}    data=${controllercreate_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
-
-Remove Controller
-    [Arguments]    ${ctrlname}
-    [Documentation]    Delete a Controller
-    ${resp}    RequestsLibrary.Delete Request    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
-    Should Be Equal As Strings    ${resp.status_code}    204
-
-Update Controller
-    [Arguments]    ${ctrlname}    ${ctrlip}    ${desc}
-    [Documentation]    Update controller
-    ${controllerinfo}    Create Dictionary    description=${desc}    ipaddr=${ctrlip}    version=1.0
-    ${controllerupdate}    Create Dictionary    controller=${controllerinfo}
-    ${controllerupdate_json}=    json.dumps    ${controllerupdate}
-    ${resp}    RequestsLibrary.Put Request    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json    data=${controllerupdate_json}
-    Should Be Equal As Strings    ${resp.status_code}    204
-
-Audit Controller
-    [Arguments]    ${ctrlname}
-    [Documentation]    Trigger Manual Audit
-    ${auditinfo}    Create Dictionary    force=false    real-network_audit=false
-    ${auditupdate}    Create Dictionary    audit=${auditinfo}
-    ${auditupdate_json}=    json.dumps    ${auditupdate}
-    ${resp}    RequestsLibrary.Put Request    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/audit.json    data=${auditupdate_json}
-    Should Be Equal As Strings    ${resp.status_code}    204
-
-Check Controller Status
-    [Arguments]    ${ctrlname}    ${stat}
-    [Documentation]    Get controller status
-    ${resp}    RequestsLibrary.Get Request    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}.json
-    ${contents}    To JSON    ${resp.content}
-    ${controllerblock}    Get From Dictionary    ${contents}    controller
-    ${status}    Get From Dictionary    ${controllerblock}    operstatus
-    Should Be Equal As Strings    ${status}    ${stat}
-
-Add a VTN
-    [Arguments]    ${vtnname}    ${vtndescription}
-    [Documentation]    Create VTN in Coordinator
-    ${vtninfo}    Create Dictionary    vtn_name=${vtnname}    description=${vtndescription}
-    ${vtncreate}    Create Dictionary    vtn=${vtninfo}
-    ${vtncreate_json}=    json.dumps    ${vtncreate}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS_CREATE}    data=${vtncreate_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
-
-Delete a VTN
-    [Arguments]    ${vtnname}
-    [Documentation]    Delete a VTN Created
-    ${resp}    RequestsLibrary.Delete Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}.json
-    Should Be Equal As Strings    ${resp.status_code}    204
-
-Create VBR in VTN
-    [Arguments]    ${vtnname}    ${vbrname}    ${ctrlname}
-    [Documentation]    Create VBR for VTN in Coordinator
-    ${vbrinfo}    Create Dictionary    vbr_name=${vbrname}    controller_id=${ctrlname}    domain_id=(DEFAULT)
-    ${vbrcreate}    Create Dictionary    vbridge=${vbrinfo}
-    ${vbrcreate_json}=    json.dumps    ${vbrcreate}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS_CREATE}    data=${vbrcreate_json}
-    Run Keyword If    '${vbrname}' == 'Vbr_audit'    Should Be Equal As Strings    ${resp.status_code}    202
-    ...    ELSE    Should Be Equal As Strings    ${resp.status_code}    201
-
-Create VBRIF in VBR
-    [Arguments]    ${vtnname}    ${vbrname}    ${vbrifname}    ${ifdescription}    ${retcode}
-    [Documentation]    Create VBR Interface in VBR
-    ${vbrifinfo}    Create Dictionary    if_name=${vbrifname}    description=${ifdescription}
-    ${vbrifcreate}    Create Dictionary    interface=${vbrifinfo}
-    ${vbrifcreate_json}=    json.dumps    ${vbrifcreate}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS_CREATE}    data=${vbrifcreate_json}
-    Should Be Equal As Strings    ${resp.status_code}    ${retcode}
-
-Define Portmap for VBRIF
-    [Arguments]    ${vtnname}    ${vbrname}    ${vbrifname}    ${logical_port_id}
-    [Documentation]    Map Interface to a logical port
-    ${logical_port_info}    Create Dictionary    logical_port_id=${logical_port_id}
-    ${portmapdefine}    Create Dictionary    portmap=${logical_port_info}
-    ${portmapdefine_json}=    json.dumps    ${portmapdefine}
-    ${resp}    RequestsLibrary.Put Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${PORTMAP_CREATE}    data=${portmapdefine_json}
-    Should Be Equal As Strings    ${resp.status_code}    204
-
-Add a FLOWLIST
-    [Arguments]    ${flowlistname}    ${ipversion}
-    [Documentation]    Create FLOWLIST in Coordinator
-    ${flowlistinfo}    Create Dictionary    fl_name=${flowlistname}    ip_version=${ipversion}
-    ${flowlistcreate}    Create Dictionary    flowlist=${flowlistinfo}
-    ${flowlistcreate_json}=    json.dumps    ${flowlistcreate}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${FLOWLISTS_CREATE}    data=${flowlistcreate_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
-
-Create FLOWLISTENTRY
-    [Arguments]    ${flowlistname}
-    [Documentation]    Create Flowlistentry for Coordinator
-    ${flowlistentryinfo}    Create Dictionary    seqnum=233    macethertype=0x800    ipdstaddr=10.0.0.1    ipdstaddrprefix=32    ipsrcaddr=10.0.0.3
-    ...    ipsrcaddrprefix=32    ipproto=1
-    ${flowlistentrycreate}    Create Dictionary    flowlistentry=${flowlistentryinfo}
-    ${flowlistentrycreate_json}=    json.dumps    ${flowlistentrycreate}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}/${FLOWLISTENTRIES_CREATE}    data=${flowlistentrycreate_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
-
-Create FLOWLISTENTRY_ANY in FLOWLIST
-    [Arguments]    ${flowlistname}
-    [Documentation]    Create Flowlistentry_any for Coordinator
-    ${flowlistentryinfo}    Create Dictionary    seqnum=1
-    ${flowlistentrycreate}    Create Dictionary    flowlistentry=${flowlistentryinfo}
-    ${flowlistentrycreate_json}=    json.dumps    ${flowlistentrycreate}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}/${FLOWLISTENTRIES_CREATE}    data=${flowlistentrycreate_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
-
-Create VBRIF in FLOWFILTER
-    [Arguments]    ${vtnname}    ${vbrname}    ${vbrifname}    ${ff_type}
-    [Documentation]    create vbridge interface flowfilter
-    ${flowfilters_info}    Create Dictionary    ff_type=${ff_type}
-    ${flowfiltersdefine}    Create Dictionary    flowfilter=${flowfilters_info}
-    ${flowfiltersdefine_json}=    json.dumps    ${flowfiltersdefine}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS_CREATE}    data=${flowfiltersdefine_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
-
-Create FLOWFILTERENTRY DROP In VBRIFFLOWFILTER
-    [Arguments]    ${vtnname}    ${vbrname}    ${vbrifname}    ${actiontype}
-    [Documentation]    create domonstration with pass actiontype
-    ${flowfilterentryinfo}    Create Dictionary    seqnum=233    fl_name=Flowlist1    action_type=${actiontype}    priority=3    dscp=55
-    ${flowfilterentrycreate}    Create Dictionary    flowfilterentry=${flowfilterentryinfo}
-    ${flowfilterentrycreate_json}=    json.dumps    ${flowfilterentrycreate}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE}    data=${flowfilterentrycreate_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
-
-Create FLOWFILTERENTRY PASS In VBRIFFLOWFILTER
-    [Arguments]    ${vtnname}    ${vbrname}    ${vbrifname}    ${actiontype}    ${seqnum}
-    [Documentation]    create domonstration with pass actiontype
-    ${flowfilterentryinfo}    Create Dictionary    fl_name=Flowlist1    action_type=${actiontype}    priority=3    dscp=55
-    ${flowfilterentrycreate}    Create Dictionary    flowfilterentry=${flowfilterentryinfo}
-    ${flowfilterentrycreate_json}=    json.dumps    ${flowfilterentrycreate}
-    ${resp}    RequestsLibrary.Put Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VBRIFS}/${vbrifname}/${FLOWFILTERS}/${FLOWFILTERS_UPDATE}/${seqnum}    data=${flowfilterentrycreate_json}
-    Should Be Equal As Strings    ${resp.status_code}    204
-
-Create FLOWFILTER in VBR
-    [Arguments]    ${vtnname}    ${vbrname}    ${ff_type}
-    [Documentation]    create vtn flowfilter
-    ${flowfilters_info}    Create Dictionary    ff_type=${ff_type}
-    ${flowfiltersdefine}    Create Dictionary    flowfilter=${flowfilters_info}
-    ${flowfiltersdefine_json}=    json.dumps    ${flowfiltersdefine}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${FLOWFILTERS_CREATE}    data=${flowfiltersdefine_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
-
-Create FLOWFILTERENTRY PASS in VBRFLOWFILTER
-    [Arguments]    ${vtnname}    ${vbrname}    ${actiontype}
-    [Documentation]    create domonstration with pass actiontype
-    ${flowfilterentryinfo}    Create Dictionary    seqnum=233    fl_name=Flowlist1    action_type=${actiontype}    priority=3    dscp=55
-    ${flowfilterentryinfo_1}    Create Dictionary    vnode_name=${vbrname}    fl_name=Flowlist1    direction=in
-    ${flowfilterentrycreate}    Create Dictionary    flowfilterentry=${flowfilterentryinfo}
-    ${flowfilterentrycreate_json}=    json.dumps    ${flowfilterentrycreate}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE}    data=${flowfilterentrycreate_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
-
-Create FLOWFILTER in VTN
-    [Arguments]    ${vtnname}    ${ff_type}
-    [Documentation]    create vtn flowfilter
-    ${flowfilters_info}    Create Dictionary    ff_type=${ff_type}
-    ${flowfiltersdefine}    Create Dictionary    flowfilter=${flowfilters_info}
-    ${flowfiltersdefine_json}=    json.dumps    ${flowfiltersdefine}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${FLOWFILTERS_CREATE}    data=${flowfiltersdefine_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
-
-Create FLOWFILTERENTRY PASS in VTNFLOWFILTER
-    [Arguments]    ${vtnname}    ${actiontype}
-    [Documentation]    create domonstration with pass actiontype
-    ${flowfilterentryinfo}    Create Dictionary    seqnum=233    fl_name=Flowlist1    action_type=${actiontype}    priority=3    dscp=55
-    ${flowfilterentrycreate}    Create Dictionary    flowfilterentry=${flowfilterentryinfo}
-    ${flowfilterentrycreate_json}=    json.dumps    ${flowfilterentrycreate}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${FLOWFILTERS}/${FLOWFILTERENTRIES_CREATE}    data=${flowfilterentrycreate_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
-
-Create VLANMAP in VBRIDGE
-    [Arguments]    ${vtnname}    ${vbrname}    ${vlanid}
-    [Documentation]    Create VLANMAP for VBRIDGE in Coordinator
-    ${vlaninfo}    Create Dictionary    vlan_id=${vlanid}
-    ${vlancreate}    Create Dictionary    vlanmap=${vlaninfo}
-    ${vlancreate_json}=    json.dumps    ${vlancreate}
-    ${resp}    RequestsLibrary.Post Request    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS}/${vbrname}/${VLANMAP_CREATE }    data=${vlancreate_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
-
-Start vlan_topo
-    [Documentation]    This will start mininet with custom topology on both the Virtual Machines
-    Install Package On Ubuntu System    vlan
-    MininetKeywords.Start Mininet Single Controller    ${TOOLS_SYSTEM_IP}    ${ODL_SYSTEM_IP}    ${vlan_topo}    ${CURDIR}/${CREATE_VLAN_TOPOLOGY_FILE_PATH}
-
-Delete a FLOWLIST
-    [Arguments]    ${flowlistname}
-    [Documentation]    Delete a Flowlist
-    ${resp}    RequestsLibrary.Delete Request    session    ${VTNWEBAPI}/${FLOWLISTS}/${flowlistname}.json
-    Should Be Equal As Strings    ${resp.status_code}    204
-
-Test Ping
-    [Arguments]    ${host1}    ${host2}
-    [Documentation]    Ping hosts to check connectivity
-    Write    ${host1} ping -c 1 ${host2}
-    ${result}    Read Until    mininet>
-    Should Contain    ${result}    64 bytes
-
-Verify Switch
-    [Arguments]    ${ctrlname}    ${switch_id}
-    [Documentation]    Get switch
-    ${resp}    RequestsLibrary.Get Request    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}.json
-    ${contents}    To JSON    ${resp.content}
-    ${switchblock}    Get From Dictionary    ${contents}    switch
-    ${status}    Get From Dictionary    ${switchblock}    switch_id
-    Should Be Equal As Strings    ${status}    ${switch_id}
-
-Verify SwitchPort
-    [Arguments]    ${ctrlname}    ${switch_id}
-    [Documentation]    Get switch
-    ${resp}    RequestsLibrary.Get Request    session    ${VTNWEBAPI}/${CTRLS}/${ctrlname}/${SW}/${switch_id}/${PORTS}
-    Should Be Equal As Strings    ${resp.status_code}    200
index c8256cb442ae5939e980f86fc3c634085285a356..7869a1ba3052fb6ff5ee7d274436329fd2d71355 100644 (file)
@@ -169,7 +169,7 @@ DataFlowsForBridge
     [Arguments]    ${resp}    @{BRIDGE_DATAFLOW}
     [Documentation]    Verify whether the required attributes exists.
     FOR    ${dataflowElement}    IN    @{BRIDGE_DATAFLOW}
-        should Contain    ${resp.content}    ${dataflowElement}
+        should Contain    ${resp.text}    ${dataflowElement}
     END
 
 Add a pathmap
@@ -182,7 +182,7 @@ Get a pathmap
     [Documentation]    Get a pathmap for a vtn.
     ${resp}=    RequestsLibrary.Get Request    session    restconf/operational/vtn-path-map:global-path-maps
     FOR    ${pathElement}    IN    @{PATHMAP_ATTR}
-        should Contain    ${resp.content}    ${pathElement}
+        should Contain    ${resp.text}    ${pathElement}
     END
 
 Add a pathpolicy
@@ -196,7 +196,7 @@ Get a pathpolicy
     [Documentation]    Get a pathpolicy for a vtn.
     ${resp}=    RequestsLibrary.Get Request    session    restconf/operational/vtn-path-policy:vtn-path-policies/vtn-path-policy/${pathpolicy_id}
     FOR    ${pathpolicyElement}    IN    @{PATHPOLICY_ATTR}
-        should Contain    ${resp.content}    ${pathpolicyElement}
+        should Contain    ${resp.text}    ${pathpolicyElement}
     END
 
 Delete a pathmap
index 1cb3f3133d1c8e3a262272569608c4015c81caf2..3013597d4832f31ee2815c7236b408954f144ddc 100644 (file)
@@ -174,7 +174,7 @@ Verify Bundle Active State
         ${body} =    OperatingSystem.Get File    ${COMMIT_ACTIVE_BUNDLE_DIR}/data.json
         ${body} =    Replace String    ${body}    DPNID    ${dpnid}
         ${resp} =    RequestsLibrary.Post Request    session    ${GET_ACTIVE_BUNDLE_URI}    data=${body}
-        BuiltIn.Log    ${resp.content}
-        BuiltIn.Should Contain    ${resp.content}    "result":
+        BuiltIn.Log    ${resp.text}
+        BuiltIn.Should Contain    ${resp.text}    "result":
         BuiltIn.Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     END
index c45b6a972ac8a63d376055df691abdfb1464fbe1..7c3e2027eda5f1880a0bbe06b214d0d492a7cd0a 100644 (file)
@@ -271,8 +271,8 @@ Verify Learnt IP
     [Arguments]    ${ip}    ${session}
     [Documentation]    Check that sub interface ip has been learnt after ARP request
     ${resp}    RequestsLibrary.Get Request    ${session}    /restconf/operational/odl-l3vpn:learnt-vpn-vip-to-port-data/
-    BuiltIn.Log    ${resp.content}
-    BuiltIn.Should Contain    ${resp.content}    ${ip}
+    BuiltIn.Log    ${resp.text}
+    BuiltIn.Should Contain    ${resp.text}    ${ip}
 
 TODO
     Fail    "Not implemented"