removing sorting bits for carbon stream 72/46172/3
authorPeter Gubka <pgubka@cisco.com>
Mon, 26 Sep 2016 09:38:55 +0000 (11:38 +0200)
committerVratko Polák <vrpolak@cisco.com>
Fri, 30 Sep 2016 10:21:15 +0000 (10:21 +0000)
this change is based on https://trello.com/c/OVemHGUi/336-int-test-do-not-sort-bits-in-carbon

Change-Id: I1c47fa34f5bb9e23754b6f23bafeb4204609e739
Signed-off-by: Peter Gubka <pgubka@cisco.com>
csit/suites/bgpcep/bgpflowspec/010_bgp_flowspec.robot
csit/suites/bgpcep/bgpfunct/010_bgp_functional_l3vpn.robot
csit/suites/bgpcep/bgpfunct/030_bgp_functionalt_evpn.robot
csit/variables/bgpflowspec/bgp-flowspec.json

index 6d0c6f4937d3a01a8d78bb2ed4bc4d807703f7ee..41b68dd633005847322a37fc5fdba053fab6d243 100644 (file)
@@ -15,6 +15,7 @@ Variables         ${CURDIR}/../../../variables/bgpuser/variables.py    ${TOOLS_S
 Resource          ${CURDIR}/../../../libraries/Utils.robot
 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
 Resource          ${CURDIR}/../../../libraries/ConfigViaRestconf.robot
+Resource          ${CURDIR}/../../../libraries/CompareStream.robot
 Library           ${CURDIR}/../../../libraries/norm_json.py
 
 *** Variables ***
@@ -120,7 +121,8 @@ Verify Empty Flowspec Data
 Verify Flowspec Data
     [Arguments]    ${exprspfile}
     [Documentation]    Verify expected response
-    ${keys_with_bits}=    BuiltIn.Create_List    op
+    ${keys_with_bits}=    BuiltIn.Create_List
+    CompareStream.Run_Keyword_If_At_Most    boron    Collections.Append_To_List    ${keys_with_bits}    op
     ${expected_rsp}=    Get Expected Response From File    ${exprspfile}
     ${expected_json}=    norm_json.Normalize Json Text    ${expected_rsp}    keys_with_bits=${keys_with_bits}
     ${rsp}=    RequestsLibrary.Get Request    session    ${FLOWSPEC_URL}
index 50580ef0ac5020a9eff9151375ff7a82f9568680..d9edaf4cf5dd66d2d501fbfeb61e4fdcb90604b4 100644 (file)
@@ -174,9 +174,8 @@ Verify_Tool_Received_Update
     ${exp_update}=    Get_Expected_Response_From_File    ${exp_update_fn}
     ${rcv_update_dict}=    BgpRpcClient.exa_get_update_message    msg_only=${True}
     ${rcv_update}=    BuiltIn.Evaluate    json.dumps(${rcv_update_dict})    modules=json
-    ${keys_with_bits}=    BuiltIn.Create_List    op
-    ${received_json}=    norm_json.Normalize_Json_Text    ${rcv_update}    keys_with_bits=${keys_with_bits}
-    ${expected_json}=    norm_json.Normalize_Json_Text    ${exp_update}    keys_with_bits=${keys_with_bits}
+    ${received_json}=    norm_json.Normalize_Json_Text    ${rcv_update}
+    ${expected_json}=    norm_json.Normalize_Json_Text    ${exp_update}
     BuiltIn.Log    ${received_json}
     BuiltIn.Log    ${expected_json}
     BuiltIn.Should_Be_Equal    ${received_json}    ${expected_json}
@@ -184,12 +183,11 @@ Verify_Tool_Received_Update
 Verify_Reported_Data
     [Arguments]    ${url}    ${exprspfile}
     [Documentation]    Verifies expected response
-    ${keys_with_bits}=    BuiltIn.Create_List    op
     ${expected_rsp}=    Get_Expected_Response_From_File    ${exprspfile}
-    ${expected_json}=    norm_json.Normalize_Json_Text    ${expected_rsp}    keys_with_bits=${keys_with_bits}
+    ${expected_json}=    norm_json.Normalize_Json_Text    ${expected_rsp}
     ${rsp}=    RequestsLibrary.Get_Request    ${CONFIG_SESSION}    ${url}
     BuiltIn.Log    ${rsp.content}
-    ${received_json}=    norm_json.Normalize_Json_Text    ${rsp.content}    keys_with_bits=${keys_with_bits}
+    ${received_json}=    norm_json.Normalize_Json_Text    ${rsp.content}
     BuiltIn.Log    ${received_json}
     BuiltIn.Log    ${expected_json}
     BuiltIn.Should_Be_Equal    ${received_json}    ${expected_json}
index 21b811a2de4267250aadd13f4392c8ba38fef152..86e97c5ca5c5c2dad79d816aa4113324d8eb11cf 100644 (file)
@@ -417,9 +417,8 @@ Loc_Rib_Presnece
     [Documentation]    Verifies if loc-rib contains expected data
     ${rsp}=    RequestsLibrary.Get_Request    ${CONFIG_SESSION}    ${LOC_RIB_URL}    headers=${HEADERS}
     Log    ${rsp.content}
-    ${keys_with_bits}=    BuiltIn.Create_List    op
-    ${received_json}=    norm_json.Normalize_Json_Text    ${rsp.content}    keys_with_bits=${keys_with_bits}
+    ${received_json}=    norm_json.Normalize_Json_Text    ${rsp.content}
     BuiltIn.Log    ${received_json}
-    ${expected_json}=    norm_json.Normalize_Json_Text    ${exp_content}    keys_with_bits=${keys_with_bits}
+    ${expected_json}=    norm_json.Normalize_Json_Text    ${exp_content}
     BuiltIn.Log    ${expected_json}
     BuiltIn.Should_Be_Equal    ${received_json}    ${expected_json}
index 617ba21e30c15179effd52402ef959668f343c3e..cc1bd8d323814a88e879ae0ad7a8a1f35ac65605 100644 (file)
@@ -32,7 +32,7 @@
                     {
                         "protocol-ips": [
                             {
-                                "op": "equals end-of-list",
+                                "op": "end-of-list equals",
                                 "value": 6
                             }
                         ]
@@ -40,7 +40,7 @@
                     {
                         "ports": [
                             {
-                                "op": "equals end-of-list",
+                                "op": "end-of-list equals",
                                 "value": 80
                             }
                         ]
@@ -52,7 +52,7 @@
                                 "value": 8080
                             },
                             {
-                                "op": "end-of-list less-than and-bit",
+                                "op": "end-of-list and-bit less-than",
                                 "value": 8088
                             }
                         ]
@@ -68,7 +68,7 @@
                     {
                         "types": [
                             {
-                                "op": "equals end-of-list",
+                                "op": "end-of-list equals",
                                 "value": 0
                             }
                         ]
@@ -76,7 +76,7 @@
                     {
                         "codes": [
                             {
-                                "op": "equals end-of-list",
+                                "op": "end-of-list equals",
                                 "value": 0
                             }
                         ]
@@ -84,7 +84,7 @@
                     {
                         "tcp-flags": [
                             {
-                                "op": "match end-of-list",
+                                "op": "end-of-list match",
                                 "value": 32
                             }
                         ]
@@ -96,7 +96,7 @@
                                 "value": 400
                             },
                             {
-                                "op": "end-of-list less-than and-bit",
+                                "op": "end-of-list and-bit less-than",
                                 "value": 500
                             }
                         ]
                     {
                         "dscps": [
                             {
-                                "op": "equals end-of-list",
+                                "op": "end-of-list equals",
                                 "value": 20
                             }
                         ]
                     {
                         "fragments": [
                             {
-                                "op": "match end-of-list",
+                                "op": "end-of-list match",
                                 "value": "first"
                             }
                         ]