X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FL2Util.py;h=eea66b82b1722d200a2607f6f70b67a61b64f0ad;hb=HEAD;hp=0f00787bd4f321e8dd63f007a8817c37a6d2a546;hpb=7829fea4a2c8936513fa95215b7d84997f814a69;p=csit.git diff --git a/resources/libraries/python/L2Util.py b/resources/libraries/python/L2Util.py index 0f00787bd4..92c93ed9dd 100644 --- a/resources/libraries/python/L2Util.py +++ b/resources/libraries/python/L2Util.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2023 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -156,7 +156,7 @@ class L2Util: :type learn: bool :type arp_term: bool """ - cmd = u"bridge_domain_add_del" + cmd = u"bridge_domain_add_del_v2" err_msg = f"Failed to create L2 bridge domain on host {node[u'host']}" args = dict( bd_id=int(bd_id), @@ -222,7 +222,7 @@ class L2Util: sw_if_index1 = Topology.get_interface_sw_index(node, port_1) sw_if_index2 = Topology.get_interface_sw_index(node, port_2) - cmd1 = u"bridge_domain_add_del" + cmd1 = u"bridge_domain_add_del_v2" args1 = dict( bd_id=int(bd_id), flood=True, @@ -254,8 +254,10 @@ class L2Util: f"on host {node[u'host']}" with PapiSocketExecutor(node) as papi_exec: - papi_exec.add(cmd1, **args1).add(cmd2, **args2).add(cmd2, **args3) - papi_exec.get_replies(err_msg) + # Cannot use get_replies due to VPP-2203. + papi_exec.add(cmd1, **args1).get_reply(err_msg) + papi_exec.add(cmd2, **args2).get_reply(err_msg) + papi_exec.add(cmd2, **args3).get_reply(err_msg) @staticmethod def vpp_setup_bidirectional_cross_connect(node, interface1, interface2): @@ -293,7 +295,9 @@ class L2Util: f"on host {node['host']}" with PapiSocketExecutor(node) as papi_exec: - papi_exec.add(cmd, **args1).add(cmd, **args2).get_replies(err_msg) + # Cannot use get_replies due to VPP-2203. + papi_exec.add(cmd, **args1).get_reply(err_msg) + papi_exec.add(cmd, **args2).get_reply(err_msg) @staticmethod def vpp_setup_bidirectional_l2_patch(node, interface1, interface2): @@ -331,7 +335,9 @@ class L2Util: f"on host {node['host']}" with PapiSocketExecutor(node) as papi_exec: - papi_exec.add(cmd, **args1).add(cmd, **args2).get_replies(err_msg) + # Cannot use get_replies due to VPP-2203. + papi_exec.add(cmd, **args1).get_reply(err_msg) + papi_exec.add(cmd, **args2).get_reply(err_msg) @staticmethod def linux_add_bridge(node, br_name, if_1, if_2, set_up=True):