Skip to content

Commit 2cbeccb

Browse files
authored
[PFCWD] Fix 'start' pfcwd command (sonic-net#1345)
- 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
1 parent d1e260a commit 2cbeccb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1685,10 +1685,10 @@ def start(action, restoration_time, ports, detection_time, verbose):
16851685

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

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

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

0 commit comments

Comments
 (0)