From 481a31828e261502f2f266d9d94dee9faa50a885 Mon Sep 17 00:00:00 2001 From: Jamo Luhrsen Date: Thu, 13 Aug 2020 21:23:49 -0700 Subject: [PATCH] Convert SFC checks from python2 to python3 resp.content breaks with "should contain" style KWs. resp.text is the way forward with that. Signed-off-by: Jamo Luhrsen Change-Id: Ia0212b48b0c531e38c18dafcde8d7eeea7065049 --- .../Full_Deploy/011__sfc_service_paths.robot | 6 ++--- .../013__sfc_service_functions_logical.robot | 2 +- .../010__sfc_service_functions.robot | 6 ++--- .../020__sfc_service_forwarders.robot | 24 +++++++++---------- .../SFC_Basic/030__sfc_service_nodes.robot | 2 +- .../SFC_Basic/040__sfc_service_chains.robot | 2 +- .../SFC_Basic/060__sfc_service_paths.robot | 6 ++--- .../120__sfc_service_function_acl.robot | 2 +- ...140__sfc_service_function_classifier.robot | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/csit/suites/sfc/Full_Deploy/011__sfc_service_paths.robot b/csit/suites/sfc/Full_Deploy/011__sfc_service_paths.robot index b26f7b0f6b..b7dd9595b3 100644 --- a/csit/suites/sfc/Full_Deploy/011__sfc_service_paths.robot +++ b/csit/suites/sfc/Full_Deploy/011__sfc_service_paths.robot @@ -56,7 +56,7 @@ Delete A Service Function Path Should Be Equal As Strings ${resp.status_code} 404 ${resp} RequestsLibrary.Get Request session ${SERVICE_FUNCTION_PATHS_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Not Contain ${resp.content} SFC1-100 + Should Not Contain ${resp.text} SFC1-100 Delete A Non-existing Empty Service Function Path [Documentation] Delete A Non existing Service Function Path @@ -77,10 +77,10 @@ Put one Service Function Add Elements To URI From File ${SERVICE_FUNCTION_PATH400_URI} ${SERVICE_FUNCTION_PATH400_FILE} ${resp} RequestsLibrary.Get Request session ${SERVICE_FUNCTION_PATH400_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Contain ${resp.content} SFC1-400 + Should Contain ${resp.text} SFC1-400 ${resp} RequestsLibrary.Get Request session ${SERVICE_FUNCTION_PATHS_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Contain ${resp.content} SFC1-400 + Should Contain ${resp.text} SFC1-400 *** Keywords *** Init Suite diff --git a/csit/suites/sfc/Full_Deploy/013__sfc_service_functions_logical.robot b/csit/suites/sfc/Full_Deploy/013__sfc_service_functions_logical.robot index 3b83eb260b..8df1e374ca 100644 --- a/csit/suites/sfc/Full_Deploy/013__sfc_service_functions_logical.robot +++ b/csit/suites/sfc/Full_Deploy/013__sfc_service_functions_logical.robot @@ -59,7 +59,7 @@ Delete A Service Function Remove All Elements At URI ${SERVICE_FUNCTION_URI}/dpi-1 ${resp} RequestsLibrary.Get Request session ${SERVICE_FUNCTIONS_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Not Contain ${resp.content} dpi-1 + Should Not Contain ${resp.text} dpi-1 Delete A Non-existing Empty Service Function [Documentation] Delete A Non existing Service Function. Logical SFF diff --git a/csit/suites/sfc/SFC_Basic/010__sfc_service_functions.robot b/csit/suites/sfc/SFC_Basic/010__sfc_service_functions.robot index 2f3b7e5ead..e88c9bdfda 100644 --- a/csit/suites/sfc/SFC_Basic/010__sfc_service_functions.robot +++ b/csit/suites/sfc/SFC_Basic/010__sfc_service_functions.robot @@ -52,7 +52,7 @@ Delete A Service Function Remove All Elements At URI ${SERVICE_FUNCTION_URI}/dpi-102-1 ${resp} RequestsLibrary.Get Request session ${SERVICE_FUNCTIONS_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Not Contain ${resp.content} dpi-102-1 + Should Not Contain ${resp.text} dpi-102-1 Delete A Non-existing Empty Service Function [Documentation] Delete A Non existing Service Function @@ -95,7 +95,7 @@ Put Service Function DPL to a Non-existing Service Function Add Elements To URI From File ${SF_DPI102100_URI}/sf-data-plane-locator/dpl-101 ${SF_DPL101_FILE} ${resp} RequestsLibrary.Get Request session ${SERVICE_FUNCTIONS_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Contain ${resp.content} dpi-102-100 + Should Contain ${resp.text} dpi-102-100 ${elements}= Create List dpl-101 10101 Check For Elements At URI ${SF_DPI102100_URI}/sf-data-plane-locator/dpl-101 ${elements} Check For Elements At URI ${SF_DPI102100_URI} ${elements} @@ -106,7 +106,7 @@ Delete Service Function DPL Remove All Elements At URI ${SF_DPI102100_URI}/sf-data-plane-locator/dpl-100 ${resp} RequestsLibrary.Get Request session ${SF_DPI102100_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Not Contain ${resp.content} dpl-100 + Should Not Contain ${resp.text} dpl-100 *** Keywords *** Init Suite diff --git a/csit/suites/sfc/SFC_Basic/020__sfc_service_forwarders.robot b/csit/suites/sfc/SFC_Basic/020__sfc_service_forwarders.robot index 745fa4f6c3..e66db81864 100644 --- a/csit/suites/sfc/SFC_Basic/020__sfc_service_forwarders.robot +++ b/csit/suites/sfc/SFC_Basic/020__sfc_service_forwarders.robot @@ -55,7 +55,7 @@ Delete A Service Function Forwarder Should Be Equal As Strings ${resp.status_code} 404 ${resp} RequestsLibrary.Get Request session ${SERVICE_FORWARDERS_URI} Should Be Equal As Strings ${resp.status_code} 200 - Should Not Contain ${resp.content} SF1 + Should Not Contain ${resp.text} SF1 Delete A Non-existing Service Function Forwarder [Documentation] Delete A Non existing Service Function @@ -99,7 +99,7 @@ Put DPL to a Non-existing Service Function Forwarder Add Elements To URI From File ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101 ${SFF_DPL101_FILE} ${resp} RequestsLibrary.Get Request session ${SERVICE_FORWARDERS_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Contain ${resp.content} ovs-100 + Should Contain ${resp.text} ovs-100 ${elements}= Create List dpl-101 6101 Check For Elements At URI ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101 ${elements} Check For Elements At URI ${SFF_OVS100_URI} ${elements} @@ -110,7 +110,7 @@ Delete Service Function Forwarder DPL Remove All Elements At URI ${SFF_OVS100_URI}/sff-data-plane-locator/eth0 ${resp} RequestsLibrary.Get Request session ${SFF_OVS100_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Not Contain ${resp.content} "name":"eth0" + Should Not Contain ${resp.text} "name":"eth0" Get Service Function Forwarder DPL's Locator [Documentation] Get Service Function Data Plane Locator @@ -138,13 +138,13 @@ Delete Service Function Forwarder DPL's Locator Remove All Elements At URI ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101/data-plane-locator ${resp} RequestsLibrary.Get Request session ${SFF_OVS100_URI}/sff-data-plane-locator/dpl-101 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Contain ${resp.content} dpl-101 - Should Not Contain ${resp.content} 6101 - Should Not Contain ${resp.content} service-locator:vxlan-gpe + Should Contain ${resp.text} dpl-101 + Should Not Contain ${resp.text} 6101 + Should Not Contain ${resp.text} service-locator:vxlan-gpe ${resp} RequestsLibrary.Get Request session ${SFF_OVS100_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Contain ${resp.content} dpl-101 - Should Not Contain ${resp.content} 6101 + Should Contain ${resp.text} dpl-101 + Should Not Contain ${resp.text} 6101 Get Service Function Dictionary From SFF [Documentation] Get Service Function Dictionary From SFF @@ -162,8 +162,8 @@ Delete Service Function Dictionary From SFF Should Be Equal As Strings ${resp.status_code} 404 ${resp} RequestsLibrary.Get Request session ${SFF_BOOTSTRAP_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Contain ${resp.content} service-function-dictionary - Should Not Contain ${resp.content} SF1 + Should Contain ${resp.text} service-function-dictionary + Should Not Contain ${resp.text} SF1 Put Service Function Dictionary to SFF [Documentation] Put Service Function Dictionary to SFF @@ -204,7 +204,7 @@ Get Connected SFF Dictionary From SFF Check For Elements At URI ${SFF_BOOTSTRAP_URI}/connected-sff-dictionary/br-int-ovs-2 ${elements} ${resp} RequestsLibrary.Get Request session ${SERVICE_FORWARDER_URI}/br-int-ovs-2/connected-sff-dictionary/SFF-bootstrap Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Contain ${resp.content} SFF-bootstrap + Should Contain ${resp.text} SFF-bootstrap Delete Connected SFF Dictionary From SFF [Documentation] Delete Connected SFF Dictionary From SFF @@ -216,7 +216,7 @@ Delete Connected SFF Dictionary From SFF Should Be Equal As Strings ${resp.status_code} 404 ${resp} RequestsLibrary.Get Request session ${SFF_BOOTSTRAP_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Not Contain ${resp.content} br-int-ovs-2 + Should Not Contain ${resp.text} br-int-ovs-2 Put Connected SFF Dictionary to SFF [Documentation] Put Connected SFF Dictionary to SFF diff --git a/csit/suites/sfc/SFC_Basic/030__sfc_service_nodes.robot b/csit/suites/sfc/SFC_Basic/030__sfc_service_nodes.robot index fa06ba19d6..cfefb34274 100644 --- a/csit/suites/sfc/SFC_Basic/030__sfc_service_nodes.robot +++ b/csit/suites/sfc/SFC_Basic/030__sfc_service_nodes.robot @@ -51,7 +51,7 @@ Delete A Service Node Remove All Elements At URI ${SERVICE_NODE_URI}/node-101 ${resp} RequestsLibrary.Get Request session ${SERVICE_NODES_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Not Contain ${resp.content} node-101 + Should Not Contain ${resp.text} node-101 Delete A Non-existing Service Node [Documentation] Delete A Non existing Service Node diff --git a/csit/suites/sfc/SFC_Basic/040__sfc_service_chains.robot b/csit/suites/sfc/SFC_Basic/040__sfc_service_chains.robot index 2e70f62626..c510d92399 100644 --- a/csit/suites/sfc/SFC_Basic/040__sfc_service_chains.robot +++ b/csit/suites/sfc/SFC_Basic/040__sfc_service_chains.robot @@ -93,7 +93,7 @@ Delete A Service Function From Chain Remove All Elements At URI ${SERVICE_CHAIN_URI}/SFC1/sfc-service-function/dpi-abstract1 ${resp} RequestsLibrary.Get Request session ${SERVICE_CHAINS_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Contain ${resp.content} SFC1 + Should Contain ${resp.text} SFC1 ${elements}= Create List dpi-abstract1 service-function-type:dpi Check For Elements Not At URI ${SERVICE_CHAIN_URI}/SFC1 ${elements} diff --git a/csit/suites/sfc/SFC_Basic/060__sfc_service_paths.robot b/csit/suites/sfc/SFC_Basic/060__sfc_service_paths.robot index b24edc999e..ebb8639f95 100644 --- a/csit/suites/sfc/SFC_Basic/060__sfc_service_paths.robot +++ b/csit/suites/sfc/SFC_Basic/060__sfc_service_paths.robot @@ -55,7 +55,7 @@ Delete A Service Function Path Should Be Equal As Strings ${resp.status_code} 404 ${resp} RequestsLibrary.Get Request session ${SERVICE_FUNCTION_PATHS_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Not Contain ${resp.content} SFC1-100 + Should Not Contain ${resp.text} SFC1-100 Delete A Non-existing Empty Service Function Path [Documentation] Delete A Non existing Service Function Path @@ -76,10 +76,10 @@ Put One Service Function Path Add Elements To URI From File ${SERVICE_FUNCTION_PATH400_URI} ${SERVICE_FUNCTION_PATH400_FILE} ${resp} RequestsLibrary.Get Request session ${SERVICE_FUNCTION_PATH400_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Contain ${resp.content} SFC1-400 + Should Contain ${resp.text} SFC1-400 ${resp} RequestsLibrary.Get Request session ${SERVICE_FUNCTION_PATHS_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Contain ${resp.content} SFC1-400 + Should Contain ${resp.text} SFC1-400 *** Keywords *** Init Suite diff --git a/csit/suites/sfc/SFC_Basic/120__sfc_service_function_acl.robot b/csit/suites/sfc/SFC_Basic/120__sfc_service_function_acl.robot index 137a1d9d09..f6e126942a 100644 --- a/csit/suites/sfc/SFC_Basic/120__sfc_service_function_acl.robot +++ b/csit/suites/sfc/SFC_Basic/120__sfc_service_function_acl.robot @@ -56,4 +56,4 @@ Delete An ACL Remove All Elements At URI ${SERVICE_FUNCTION_ACLS_URI}/acl/ietf-access-control-list:ipv4-acl/ACL1 ${resp} RequestsLibrary.Get Request session ${SERVICE_FUNCTION_ACLS_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Not Contain ${resp.content} ACL1 + Should Not Contain ${resp.text} ACL1 diff --git a/csit/suites/sfc/SFC_Basic/140__sfc_service_function_classifier.robot b/csit/suites/sfc/SFC_Basic/140__sfc_service_function_classifier.robot index d2a2beb5d6..5f2a98c8ff 100644 --- a/csit/suites/sfc/SFC_Basic/140__sfc_service_function_classifier.robot +++ b/csit/suites/sfc/SFC_Basic/140__sfc_service_function_classifier.robot @@ -56,4 +56,4 @@ Delete a Classifier Remove All Elements At URI ${SERVICE_CLASSIFIERS_URI}/service-function-classifier/Classifier1 ${resp} RequestsLibrary.Get Request session ${SERVICE_CLASSIFIERS_URI} Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code} - Should Not Contain ${resp.content} Classifier1 + Should Not Contain ${resp.text} Classifier1 -- 2.36.6