|
43 | 43 | from . import vxlan
|
44 | 44 | from . import plugins
|
45 | 45 | from .config_mgmt import ConfigMgmtDPB
|
46 |
| -from . import mclag |
| 46 | +from . import mclag |
47 | 47 |
|
48 | 48 | # mock masic APIs for unit test
|
49 | 49 | try:
|
@@ -727,9 +727,9 @@ def _swss_ready():
|
727 | 727 | else:
|
728 | 728 | return False
|
729 | 729 |
|
730 |
| -def _system_running(): |
| 730 | +def _is_system_starting(): |
731 | 731 | out = clicommon.run_command("sudo systemctl is-system-running", return_cmd=True)
|
732 |
| - return out.strip() == "running" |
| 732 | + return out.strip() == "starting" |
733 | 733 |
|
734 | 734 | def interface_is_in_vlan(vlan_member_table, interface_name):
|
735 | 735 | """ Check if an interface is in a vlan """
|
@@ -1233,7 +1233,7 @@ def reload(db, filename, yes, load_sysinfo, no_service_restart, disable_arp_cach
|
1233 | 1233 | <filename> : Names of configuration file(s) to load, separated by comma with no spaces in between
|
1234 | 1234 | """
|
1235 | 1235 | if not force and not no_service_restart:
|
1236 |
| - if not _system_running(): |
| 1236 | + if _is_system_starting(): |
1237 | 1237 | click.echo("System is not up. Retry later or use -f to avoid system checks")
|
1238 | 1238 | return
|
1239 | 1239 |
|
@@ -1491,10 +1491,10 @@ def load_port_config(config_db, port_config_path):
|
1491 | 1491 | # Validate if the input is an array
|
1492 | 1492 | if not isinstance(port_config_input, list):
|
1493 | 1493 | raise Exception("Bad format: port_config is not an array")
|
1494 |
| - |
| 1494 | + |
1495 | 1495 | if len(port_config_input) == 0 or 'PORT' not in port_config_input[0]:
|
1496 | 1496 | raise Exception("Bad format: PORT table not exists")
|
1497 |
| - |
| 1497 | + |
1498 | 1498 | port_config = port_config_input[0]['PORT']
|
1499 | 1499 |
|
1500 | 1500 | # Ensure all ports are exist
|
|
0 commit comments