Skip to content

Commit

Permalink
Add CLIs support TWAMP Light feature according to sonic-net/SONiC HLD…
Browse files Browse the repository at this point in the history
… PR#1320

Signed-off-by: Xianghong Gu <[email protected]>
  • Loading branch information
guxianghong committed Sep 24, 2024
1 parent 5282f2a commit dd99daf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/twamp_light.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def validate_twamp_session_exist_cb(ctx, param, name):
config_db.connect()
if check_if_twamp_session_exist(config_db, name) is True:
raise click.UsageError('Invalid value for "<{}>": {}. '
'TWAMP-Light session already exist'.format(param.name, name))
'TWAMP-Light session already exists'.format(param.name, name))
return name


Expand All @@ -53,14 +53,14 @@ def validate_twamp_session_cb(ctx, param, name):
session_keys = config_db.get_table(CFG_TWAMP_SESSION_TABLE_NAME).keys()
if len(session_keys) == 0:
raise click.UsageError('Invalid value for "<{}>": {}. '
'TWAMP-Light session not exist'.format(param.name, name))
'TWAMP-Light session does not exist'.format(param.name, name))
return session_keys
else:
session_keys = name.split(",")
for key in session_keys:
if check_if_twamp_session_exist(config_db, key) is False:
raise click.UsageError('Invalid value for "<{}>": {}.'
' TWAMP-Light session not exist'.format(param.name, key))
' TWAMP-Light session does not exist'.format(param.name, key))
return session_keys


Expand Down

0 comments on commit dd99daf

Please sign in to comment.