]> git.proxmox.com Git - mirror_frr.git/commitdiff
tests: fix community-list invalid command
authorQuentin Young <qlyoung@nvidia.com>
Wed, 3 Mar 2021 18:56:39 +0000 (13:56 -0500)
committerQuentin Young <qlyoung@nvidia.com>
Wed, 3 Mar 2021 18:56:39 +0000 (13:56 -0500)
Didn't test this but it's already randomly broken so cant be worse

Hopefully fixes:

raise InvalidCLIError("%s" % output)
InvalidCLIError: line 2: % Command incomplete[4]: bgp
large-community-list standard Test1 permit

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
tests/topotests/lib/common_config.py

index ce35bdc0fe0cbfbb0a08df524ef6abbb71a33d80..d3131158f5769aa076b1ebe0d41df32b75bf689c 100644 (file)
@@ -2390,14 +2390,7 @@ def create_bgp_community_lists(tgen, input_dict, build=False):
                     logger.error(errormsg)
                     return False
 
-                try:
-                    community_type = int(community_type)
-                    cmd = "{} {} {} {}".format(cmd, community_type, action, value)
-                except ValueError:
-
-                    cmd = "{} {} {} {} {}".format(
-                        cmd, community_type, name, action, value
-                    )
+                cmd = "{} {} {} {} {}".format(cmd, community_type, name, action, value)
 
                 if del_action:
                     cmd = "no {}".format(cmd)