Skip to content

Commit

Permalink
[PFCWD] Fix 'start' pfcwd command (sonic-net#1345)
Browse files Browse the repository at this point in the history
- What I did
The 'config' method is getting arguments from the user CLI and build a proper command for the pfcwd script in a wrong way, causing this issue.

- How I did it
Fix the command structure to align with pfcwd.main script.

- How to verify it
Run "config pfcwd start --action drop ports all detection-time 400 --restoration-time 400"

- Previous command output (if the output of a command-line utility has changed)
config pfcwd start --action drop ports all detection-time 400 --restoration-time 400
Failed to run command, invalid options:
ports
detection-time
  • Loading branch information
shlomibitton authored and abdosi committed Jan 28, 2021
1 parent 235c61c commit d324eae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1220,10 +1220,10 @@ def start(action, restoration_time, ports, detection_time, verbose):

if ports:
ports = set(ports) - set(['ports', 'detection-time'])
cmd += " ports {}".format(' '.join(ports))
cmd += " {}".format(' '.join(ports))

if detection_time:
cmd += " detection-time {}".format(detection_time)
cmd += " {}".format(detection_time)

if restoration_time:
cmd += " --restoration-time {}".format(restoration_time)
Expand Down

0 comments on commit d324eae

Please sign in to comment.