python3 changes in openstack scripts 14/91314/1
authorSrinivas Rachakonda <srinivas.rachakonda@gmail.com>
Tue, 14 Jul 2020 08:12:54 +0000 (13:42 +0530)
committerSrinivas Rachakonda <srinivas.rachakonda@gmail.com>
Tue, 14 Jul 2020 08:12:54 +0000 (13:42 +0530)
Signed-off-by: Srinivas Rachakonda <srinivas.rachakonda@gmail.com>
Change-Id: I2bd8d821f3967f40f031d379bc2642d9d694a7fb

csit/suites/openstack/neutron/010__networks.robot
csit/suites/openstack/neutron/020__subnets.robot
csit/suites/openstack/neutron/030__ports.robot
csit/suites/openstack/neutron/040__delete_ports.robot
csit/suites/openstack/neutron/050__delete_subnets.robot
csit/suites/openstack/neutron/060__delete_networks.robot
csit/suites/openstack/securitygroup/neutron_security_group.robot

index 90a378b556fa2afae0f0488948c559901b29457d..5525ed18b36ec4159a40724b2473402f3c36bdc6 100644 (file)
@@ -17,7 +17,7 @@ Check OpenStack Networks
     Log    ${X-AUTH}
     ${resp}    get request    OSSession    ${OSREST}
     Should be Equal As Strings    ${resp.status_code}    200
-    ${OSResult}    To Json    ${resp.content}
+    ${OSResult}    To Json    ${resp.text}
     Log    ${OSResult}
 
 Check OpenDaylight Networks
@@ -26,7 +26,7 @@ Check OpenDaylight Networks
     Create Session    ODLSession    http://${ODL_SYSTEM_IP}:${PORT}    headers=${HEADERS}    auth=${AUTH}
     ${resp}    get request    ODLSession    ${NEUTRON_NETWORKS_API}
     Should be Equal As Strings    ${resp.status_code}    200
-    ${ODLResult}    To Json    ${resp.content}
+    ${ODLResult}    To Json    ${resp.text}
     Log    ${ODLResult}
 
 Create Network
@@ -35,7 +35,7 @@ Create Network
     Log    ${postNet}
     ${resp}    post request    OSSession    ${OSREST}    data=${postNet}
     Should be Equal As Strings    ${resp.status_code}    201
-    ${result}    To JSON    ${resp.content}
+    ${result}    To JSON    ${resp.text}
     ${result}    Get From Dictionary    ${result}    network
     ${NETID}    Get From Dictionary    ${result}    id
     Log    ${result}
index 584ece1c0d4e211b06bba1ec1ae829e9f0948c5a..f82653d635907d746636f37e76e9b01b1870cd1c 100644 (file)
@@ -17,7 +17,7 @@ Check OpenStack Subnets
     Log    ${X-AUTH}
     ${resp}    get request    OSSession    ${OSREST}
     Should be Equal As Strings    ${resp.status_code}    200
-    ${OSResult}    To Json    ${resp.content}
+    ${OSResult}    To Json    ${resp.text}
     Log    ${OSResult}
 
 Check OpenDaylight subnets
@@ -26,7 +26,7 @@ Check OpenDaylight subnets
     Create Session    ODLSession    http://${ODL_SYSTEM_IP}:${PORT}    headers=${HEADERS}    auth=${AUTH}
     ${resp}    get request    ODLSession    ${NEUTRON_SUBNETS_API}
     Should be Equal As Strings    ${resp.status_code}    200
-    ${ODLResult}    To Json    ${resp.content}
+    ${ODLResult}    To Json    ${resp.text}
     Log    ${ODLResult}
 
 Create New subnet
@@ -35,7 +35,7 @@ Create New subnet
     Log    ${data}
     ${resp}    post request    OSSession    ${OSREST}    data=${data}
     Should be Equal As Strings    ${resp.status_code}    201
-    ${result}    To JSON    ${resp.content}
+    ${result}    To JSON    ${resp.text}
     ${result}    Get From Dictionary    ${result}    subnet
     ${SUBNETID}    Get From Dictionary    ${result}    id
     Log    ${result}
index 1311061bd97284098f7923efc662a8c14d392a24..83db6eb9b21ab170004e190571fc5e3284aa4122 100644 (file)
@@ -17,7 +17,7 @@ Check OpenStack ports
     Log    ${X-AUTH}
     ${resp}    get request    OSSession    ${OSREST}
     Should be Equal As Strings    ${resp.status_code}    200
-    ${OSResult}    To Json    ${resp.content}
+    ${OSResult}    To Json    ${resp.text}
     Log    ${OSResult}
 
 Check OpenDaylight ports
@@ -26,7 +26,7 @@ Check OpenDaylight ports
     Create Session    ODLSession    http://${ODL_SYSTEM_IP}:${PORT}    headers=${HEADERS}    auth=${AUTH}
     ${resp}    get request    ODLSession    ${NEUTRON_PORTS_API}
     Should be Equal As Strings    ${resp.status_code}    200
-    ${ODLResult}    To Json    ${resp.content}
+    ${ODLResult}    To Json    ${resp.text}
     Log    ${ODLResult}
 
 Create New Port
@@ -35,7 +35,7 @@ Create New Port
     Log    ${data}
     ${resp}    post request    OSSession    ${OSREST}    data=${data}
     Should be Equal As Strings    ${resp.status_code}    201
-    ${result}    To JSON    ${resp.content}
+    ${result}    To JSON    ${resp.text}
     ${result}    Get From Dictionary    ${result}    port
     ${PORTID}    Get From Dictionary    ${result}    id
     Log    ${result}
index 2a71496afe2ca619350bea001159c4e1cc9eff42..a6b67668ff63e62cc5d4171f05f33fb6dc4aa485 100644 (file)
@@ -16,7 +16,7 @@ Delete New Port
     Log    ${data}
     ${resp}    delete request    OSSession    ${OSREST}
     Should be Equal As Strings    ${resp.status_code}    204
-    Log    ${resp.content}
+    Log    ${resp.text}
     sleep    2
 
 Check Port Deleted
@@ -24,7 +24,7 @@ Check Port Deleted
     [Tags]    Check port deleted OpenDaylight
     ${resp}    get request    ODLSession    ${NEUTRON_PORTS_API}
     Should be Equal As Strings    ${resp.status_code}    200
-    ${ODLResult}    To Json    ${resp.content}
+    ${ODLResult}    To Json    ${resp.text}
     Log    ${ODLResult}
     ${resp}    get request    ODLSession    ${NEUTRON_PORTS_API}/${PORTID}
     Should be Equal As Strings    ${resp.status_code}    404
index 3607a7bf45d5e5845ddc1a573b3367bb3f184af1..cbeacdf2c135d438ee0a98c7c0ea4c270eec8e11 100644 (file)
@@ -16,7 +16,7 @@ Delete New subnet
     Log    ${data}
     ${resp}    delete request    OSSession    ${OSREST}
     Should be Equal As Strings    ${resp.status_code}    204
-    Log    ${resp.content}
+    Log    ${resp.text}
     sleep    2
 
 Check New subnet deleted
@@ -24,7 +24,7 @@ Check New subnet deleted
     [Tags]    Check subnet deleted OpenDaylight
     ${resp}    get request    ODLSession    ${NEUTRON_SUBNETS_API}
     Should be Equal As Strings    ${resp.status_code}    200
-    ${ODLResult}    To Json    ${resp.content}
+    ${ODLResult}    To Json    ${resp.text}
     Log    ${ODLResult}
     ${resp}    get request    ODLSession    ${NEUTRON_SUBNETS_API}/${SUBNETID}
     Should be Equal As Strings    ${resp.status_code}    404
index 7cf6e8cb61096582262866179ac43b09f97f80d1..179d89df8a493b870a57bb06e3dc87b83fd22b98 100644 (file)
@@ -16,7 +16,7 @@ Delete Network
     Log    ${postNet}
     ${resp}    delete request    OSSession    ${OSREST}
     Should be Equal As Strings    ${resp.status_code}    204
-    Log    ${resp.content}
+    Log    ${resp.text}
     sleep    2
 
 Check Network deleted
@@ -24,7 +24,7 @@ Check Network deleted
     [Tags]    Check Network OpenDaylight
     ${resp}    get request    ODLSession    ${NEUTRON_NETWORKS_API}
     Should be Equal As Strings    ${resp.status_code}    200
-    ${ODLResult}    To Json    ${resp.content}
+    ${ODLResult}    To Json    ${resp.text}
     Log    ${ODLResult}
     ${resp}    get request    ODLSession    ${NEUTRON_NETWORKS_API}/${NETID}
     Should be Equal As Strings    ${resp.status_code}    404
index 1d84e2a198b4658d89733aebeb84e16f785387a9..c6fa94f4a85c4d3a0602c348a58ee99ff21ca280 100644 (file)
@@ -107,9 +107,9 @@ Update Security Group Name and Verification
     ${output} =    OpenStackOperations.Neutron Security Group Show    ${sg_id}
     Should Contain    ${output}    ${verify_name}
     ${resp}    RequestsLibrary.Get Request    session    ${SEC_GROUP_API}
-    BuiltIn.Log    ${resp.content}
+    BuiltIn.Log    ${resp.text}
     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    ${RESP_CODE_200}
-    BuiltIn.Should Contain    ${resp.content}    ${verify_name}
+    BuiltIn.Should Contain    ${resp.text}    ${verify_name}
 
 Neutron Rule Creation With Invalid Parameters
     [Arguments]    ${sg_name}    ${additional_args}    ${expected_error}