Commit a255838
[minigraph] new workflow for golden path (#2396)
#### What I did
Change the behavior that load_minigraph will consume golden config by default.
New behavior:
`config load_minigraph`: No longer consume golden config.
`config load_minigraph --golden_config`: Consume default golden config. /etc/sonic/golden_config_db.json
`config load_minigraph --golden_config FilePath`: Consume golden config with FilePath
#### How I did it
Make golden_config click.Option() and add an argument for golden config path.
#### How to verify it
UT test.
#### Previous command output (if the output of a command-line utility has changed)
sudo config load_minigraph -h
Usage: config load_minigraph [OPTIONS]
Reconfigure based on minigraph.
Options:
-y, --yes
-n, --no_service_restart Do not restart docker services
-t, --traffic_shift_away Keep device in maintenance with TSA
-p, --golden_config_path TEXT specify Golden Config path
-?, -h, --help Show this message and exit.
#### New command output (if the output of a command-line utility has changed)
admin@vlab-01:~$ sudo config load_minigraph --golden_config_path -h
Usage: config load_minigraph [OPTIONS]
Reconfigure based on minigraph.
Options:
-y, --yes
-n, --no_service_restart Do not restart docker services
-t, --traffic_shift_away Keep device in maintenance with TSA
-o, --override_config Enable config override. Proceed with default path.
-p, --golden_config_path TEXT Provide golden config path to override. Use with --override_config
-h, -?, --help Show this message and exit.1 parent 99425a8 commit a255838
2 files changed
Lines changed: 22 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1645 | 1645 | | |
1646 | 1646 | | |
1647 | 1647 | | |
1648 | | - | |
| 1648 | + | |
| 1649 | + | |
1649 | 1650 | | |
1650 | | - | |
| 1651 | + | |
1651 | 1652 | | |
1652 | 1653 | | |
1653 | 1654 | | |
| |||
1720 | 1721 | | |
1721 | 1722 | | |
1722 | 1723 | | |
1723 | | - | |
| 1724 | + | |
1724 | 1725 | | |
1725 | 1726 | | |
1726 | 1727 | | |
1727 | 1728 | | |
1728 | | - | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
1729 | 1732 | | |
1730 | 1733 | | |
1731 | 1734 | | |
1732 | 1735 | | |
1733 | 1736 | | |
1734 | | - | |
1735 | | - | |
1736 | | - | |
1737 | 1737 | | |
1738 | 1738 | | |
1739 | 1739 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | 379 | | |
401 | 380 | | |
402 | 381 | | |
403 | 382 | | |
404 | 383 | | |
405 | 384 | | |
406 | 385 | | |
407 | | - | |
| 386 | + | |
408 | 387 | | |
409 | 388 | | |
410 | 389 | | |
411 | | - | |
| 390 | + | |
412 | 391 | | |
413 | 392 | | |
414 | 393 | | |
415 | 394 | | |
416 | 395 | | |
417 | 396 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
| 397 | + | |
422 | 398 | | |
423 | 399 | | |
424 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
425 | 412 | | |
426 | 413 | | |
427 | 414 | | |
| |||
442 | 429 | | |
443 | 430 | | |
444 | 431 | | |
445 | | - | |
| 432 | + | |
446 | 433 | | |
447 | 434 | | |
448 | 435 | | |
| |||
0 commit comments