Adjust BGPCEP test to BGPCEP-877 bug fix 70/84270/2
authorLuis Gomez <ecelgp@gmail.com>
Sun, 8 Sep 2019 23:20:45 +0000 (16:20 -0700)
committerLuis Gomez <ecelgp@gmail.com>
Sun, 8 Sep 2019 23:30:24 +0000 (16:30 -0700)
Also repair Sum_Hex_Message Keyword.

Change-Id: I7b5d494acd049266a30dbb4ba2f08819e28133d8
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
16 files changed:
csit/libraries/BgpOperations.robot
csit/libraries/BgpRpcClient.py
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_bidir_pim_tree/announce_pmsi_bidir_pim_tree.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_bidir_pim_tree/withdraw_pmsi_bidir_pim_tree.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_ingress_replication/announce_pmsi_ingress_replication.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_ingress_replication/withdraw_pmsi_ingress_replication.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_mldp_mp2mp_lsp/announce_pmsi_mldp_mp2mp_lsp.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_mldp_mp2mp_lsp/withdraw_pmsi_mldp_mp2mp_lsp.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_mldp_p2mp_lsp/announce_pmsi_mldp_p2mp_lsp.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_mldp_p2mp_lsp/withdraw_pmsi_mldp_p2mp_lsp.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_pim_sm_tree/announce_pmsi_pim_sm_tree.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_pim_sm_tree/withdraw_pmsi_pim_sm_tree.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_pim_ssm_tree/announce_pmsi_pim_ssm_tree.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_pim_ssm_tree/withdraw_pmsi_pim_ssm_tree.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_rsvp_te_p2mp_lsp/announce_pmsi_rsvp_te_p2mp_lsp.hex
csit/variables/bgpfunctional/l2vpn_evpn/pmsi_rsvp_te_p2mp_lsp/withdraw_pmsi_rsvp_te_p2mp_lsp.hex

index 18310ba16055774390b354ea6491565c938e030f..840ff99e270a9faddc721cb9d9dd03f34c1ee7fb 100644 (file)
@@ -403,16 +403,10 @@ Verify_Two_Hex_Messages_Are_Equal
     ${len_1} =    BuiltIn.Get_Length    ${hex_1}
     ${len_2} =    BuiltIn.Get_Length    ${hex_2}
     BuiltIn.Should_Be_Equal    ${len_1}    ${len_2}
-    ${sum_1} =    Sum_Hex_Message_Arguments_To_Integer    ${hex_1}
-    ${sum_2} =    Sum_Hex_Message_Arguments_To_Integer    ${hex_2}
+    ${sum_1} =    BgpRpcClient.Sum_Hex_Message    ${hex_1}
+    ${sum_2} =    BgpRpcClient.Sum_Hex_Message    ${hex_2}
     BuiltIn.Should_Be_Equal    ${sum_1}    ${sum_2}
 
-Sum_Hex_Message_Arguments_To_Integer
-    [Arguments]    ${hex_string}
-    [Documentation]    Converts hex message arguments to integers and sums them up and returns the sum.
-    ${final_sum} =    BuiltIn.Evaluate    sum(map(lambda x: int(x, 16), re.compile('[a-f\d]{2}').findall('${hex_string}'[32:])))    modules=re
-    [Return]    ${final_sum}
-
 Check BGP VPNv4 Nbr On ODL
     [Arguments]    ${dcgw_count}    ${flag}=True    ${start}=${START_VALUE}
     [Documentation]    Check all BGP VPNv4 neighbor on ODL
index fe60e2c3be422f06be598b13a40a94600a4b5d45..55dba2b35f52f6b50cf69f3f9ddf660085fd3999 100644 (file)
@@ -6,6 +6,7 @@ exa_ methods apply to test/tools/exabgp_files/exarpc.py
 play_ methods apply to test/tool/fastbgp/play.py  (only with --evpn used)
 """
 
+import re
 import xmlrpclib
 
 
@@ -95,3 +96,8 @@ class BgpRpcClient(object):
     def play_clean(self, what='update'):
         """Cleans the message (update) on the server."""
         return self.proxy.clean(what)
+
+    def sum_hex_message(self, hex_string):
+        """Verifies two hex messages are equal even in case, their arguments are misplaced.
+        Converts hex message arguments to integers and sums them up and returns the sum."""
+        return sum(map(lambda x: int(x, 16), re.compile('[a-f\d]{2}').findall(hex_string[32:])))
index c7a88866144902febb30592797b4b3740c567d1f..81c4b7ca85cdc886e7798c9b60525c8f36eac41a 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff005a020000004380160d010504e3802b2b2b2b0a0a0a0a4001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff005a0200000043c0160d010504e3802b2b2b2b0a0a0a0a4001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
index 43aae7b2715c6792061bc9928503730a15d94881..6ee237dedad05372ef0d7b34774ea3464f7430cf 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff0054020000003d80160d010504e3802b2b2b2b0a0a0a0a4001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff0054020000003dc0160d010504e3802b2b2b2b0a0a0a0a4001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
index 596afb3ad0cf34cd46017b220c5d47c305233c96..6b18005994e3dbdb469e9104b24f508c09875542 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff0056020000003f801609000604e380ac0c7b034001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff0056020000003fc01609000604e380ac0c7b034001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
index 984ac7302cc780da51088dec6cd2a1fb74a862fd..349538cc1e39d9a1d35721a33fc5476b640f5a5e 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff00500200000039801609000604e380ac0c7b034001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff00500200000039c01609000604e380ac0c7b034001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
index 3131e7598ebb42b2719d048c7c7bc549c16be525..0e1c1f496bc59bcc77fab70eb73b0489e77659cc 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff005c020000004580160f000704e380010007010101010101014001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff005c0200000045c0160f000704e380010007010101010101014001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
index 3dfd8e56d6ba6d8087317aabf7e010768302c09c..84a2dd56525d430b64667b52bd9966ff3f6310fe 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff0056020000003f80160f000704e380010007010101010101014001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff0056020000003fc0160f000704e380010007010101010101014001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
index 5898746889e5e176949e4e048ffc72af335bd59b..00f3ff41a068f8963541f1847a443f07856a0283 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff0066020000004f801619010204e380060001040a0a0a0a000a010007010101010101014001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff0066020000004fc01619010204e380060001040a0a0a0a000a010007010101010101014001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
index 52334c38640c39ba991fae6b31f0024ed2ceaa19..f352a6c122472946f4d34d41c7609c2eee23fa53 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff00600200000049801619010204e380060001040a0a0a0a000a010007010101010101014001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff00600200000049c01619010204e380060001040a0a0a0a000a010007010101010101014001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
index f25b09471f122cd9364ee38332a29872e371d1fe..b63aafb0fa0ce0e9d94c67845559b68628ae4c93 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff005a020000004380160d010404e3802b2b2b2b0a0a0a0a4001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff005a0200000043c0160d010404e3802b2b2b2b0a0a0a0a4001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
index 8a7c2083b402d1d1c0dcf3d68c088a4120a0e578..98dfac8b6769643d04faa586abbcd026c0a779f5 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff0054020000003d80160d010404e3802b2b2b2b0a0a0a0a4001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff0054020000003dc0160d010404e3802b2b2b2b0a0a0a0a4001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
index 7df8120b28ee0b25e32e6bb8e70bdbd636ca17b7..018398f882d5c449045e1f574f62f50266084cd1 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff005a020000004380160d010304e3800b0c0d0e0a0a0a0a4001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff005a0200000043c0160d010304e3800b0c0d0e0a0a0a0a4001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
index f4782fb27b00699a1f1bbca2459836f77914f92d..8adbd08219d29da8814970bbe75a3deedb1621bd 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff0054020000003d80160d010304e3800b0c0d0e0a0a0a0a4001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff0054020000003dc0160d010304e3800b0c0d0e0a0a0a0a4001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
index c2838e073e7675e20e93f112d6e38c2a621f29a7..54bbcbecf82e5cd0d5d72bbade3d989e015ef8f1 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff005e0200000047801611010104e380423a35c700002b670a0a0a0a4001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff005e0200000047c01611010104e380423a35c700002b670a0a0a0a4001010040020040050400000064800e2200194604c714a629000417000219999999000100000000000000000000202b2b2b2b
index a8054857f2f31f065cc0bff3a24753963f2047a6..85a0330a3a088c636b925ffc5e09b846c5b01b45 100644 (file)
@@ -1 +1 @@
-ffffffffffffffffffffffffffffffff00580200000041801611010104e380423a35c700002b670a0a0a0a4001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b
+ffffffffffffffffffffffffffffffff00580200000041c01611010104e380423a35c700002b670a0a0a0a4001010040020040050400000064800f1c0019460417000219999999000100000000000000000000202b2b2b2b