Merge pull request #8195 from qlyoung/fix-community-type-command

tests: fix community-list invalid command
This commit is contained in:
Donatas Abraitis 2021-03-07 17:04:57 +02:00 committed by GitHub
commit 7b94dd35dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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