Skip to content

Commit 886f612

Browse files
authored
Revert "show commands for SYSTEM READY (#1851) (#2261)" (#2274)
This reverts commit a6404b7.
1 parent a6404b7 commit 886f612

File tree

8 files changed

+1
-224
lines changed

8 files changed

+1
-224
lines changed

scripts/sysreadyshow

-120
This file was deleted.

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@
147147
'scripts/null_route_helper',
148148
'scripts/coredump_gen_handler.py',
149149
'scripts/techsupport_cleanup.py',
150-
'scripts/check_db_integrity.py',
151-
'scripts/sysreadyshow'
150+
'scripts/check_db_integrity.py'
152151
],
153152
entry_points={
154153
'console_scripts': [

show/system_health.py

-31
Original file line numberDiff line numberDiff line change
@@ -198,34 +198,3 @@ def monitor_list():
198198
entry.append(element[1]['type'])
199199
table.append(entry)
200200
click.echo(tabulate(table, header))
201-
202-
203-
@system_health.group('sysready-status',invoke_without_command=True)
204-
@click.pass_context
205-
def sysready_status(ctx):
206-
"""Show system-health system ready status"""
207-
208-
if ctx.invoked_subcommand is None:
209-
try:
210-
cmd = "sysreadyshow"
211-
clicommon.run_command(cmd, display_cmd=False)
212-
except Exception as e:
213-
click.echo("Exception: {}".format(str(e)))
214-
215-
216-
@sysready_status.command('brief')
217-
def sysready_status_brief():
218-
try:
219-
cmd = "sysreadyshow --brief"
220-
clicommon.run_command(cmd, display_cmd=False)
221-
except Exception as e:
222-
click.echo("Exception: {}".format(str(e)))
223-
224-
225-
@sysready_status.command('detail')
226-
def sysready_status_detail():
227-
try:
228-
cmd = "sysreadyshow --detail"
229-
clicommon.run_command(cmd, display_cmd=False)
230-
except Exception as e:
231-
click.echo("Exception: {}".format(str(e)))

sonic_package_manager/manifest.py

-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ def unmarshal(self, value):
177177
ManifestField('asic-service', DefaultMarshaller(bool), False),
178178
ManifestField('host-service', DefaultMarshaller(bool), True),
179179
ManifestField('delayed', DefaultMarshaller(bool), False),
180-
ManifestField('check_up_status', DefaultMarshaller(bool), False),
181180
ManifestRoot('warm-shutdown', [
182181
ManifestArray('after', DefaultMarshaller(str)),
183182
ManifestArray('before', DefaultMarshaller(str)),

sonic_package_manager/service_creator/feature.py

-1
Original file line numberDiff line numberDiff line change
@@ -202,5 +202,4 @@ def get_non_configurable_feature_entries(manifest) -> Dict[str, str]:
202202
'has_per_asic_scope': str(manifest['service']['asic-service']),
203203
'has_global_scope': str(manifest['service']['host-service']),
204204
'has_timer': str(manifest['service']['delayed']),
205-
'check_up_status': str(manifest['service']['check_up_status']),
206205
}

tests/mock_tables/state_db.json

-27
Original file line numberDiff line numberDiff line change
@@ -823,32 +823,5 @@
823823
"admin_status": "up",
824824
"mtu": "9100",
825825
"speed": "1000"
826-
},
827-
"ALL_SERVICE_STATUS|mgmt-framework": {
828-
"app_ready_status": "OK",
829-
"fail_reason": "-",
830-
"service_status": "OK",
831-
"update_time": "-"
832-
},
833-
"ALL_SERVICE_STATUS|swss": {
834-
"app_ready_status": "OK",
835-
"fail_reason": "-",
836-
"service_status": "OK",
837-
"update_time": "-"
838-
},
839-
"ALL_SERVICE_STATUS|bgp": {
840-
"app_ready_status": "Down",
841-
"fail_reason": "Inactive",
842-
"service_status": "Down",
843-
"update_time": "-"
844-
},
845-
"ALL_SERVICE_STATUS|pmon": {
846-
"app_ready_status": "OK",
847-
"fail_reason": "-",
848-
"service_status": "OK",
849-
"update_time": "-"
850-
},
851-
"SYSTEM_READY|SYSTEM_STATE": {
852-
"Status":"DOWN"
853826
}
854827
}

tests/sonic_package_manager/test_service_creator.py

-5
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ def test_feature_registration(mock_sonic_db, manifest):
216216
'has_per_asic_scope': 'False',
217217
'has_global_scope': 'True',
218218
'has_timer': 'False',
219-
'check_up_status': 'False',
220219
})
221220

222221

@@ -229,7 +228,6 @@ def test_feature_update(mock_sonic_db, manifest):
229228
'has_per_asic_scope': 'False',
230229
'has_global_scope': 'True',
231230
'has_timer': 'False',
232-
'check_up_status': 'False',
233231
}
234232
mock_connector = Mock()
235233
mock_connector.get_entry = Mock(return_value=curr_feature_config)
@@ -252,7 +250,6 @@ def test_feature_update(mock_sonic_db, manifest):
252250
'has_per_asic_scope': 'False',
253251
'has_global_scope': 'True',
254252
'has_timer': 'True',
255-
'check_up_status': 'False',
256253
}),
257254
], any_order=True)
258255

@@ -273,7 +270,6 @@ def test_feature_registration_with_timer(mock_sonic_db, manifest):
273270
'has_per_asic_scope': 'False',
274271
'has_global_scope': 'True',
275272
'has_timer': 'True',
276-
'check_up_status': 'False',
277273
})
278274

279275

@@ -292,7 +288,6 @@ def test_feature_registration_with_non_default_owner(mock_sonic_db, manifest):
292288
'has_per_asic_scope': 'False',
293289
'has_global_scope': 'True',
294290
'has_timer': 'False',
295-
'check_up_status': 'False',
296291
})
297292

298293

tests/system_health_test.py

-37
Original file line numberDiff line numberDiff line change
@@ -306,43 +306,6 @@ def test_health_detail(self):
306306
"""
307307
assert result.output == expected
308308

309-
def test_health_systemready(self):
310-
runner = CliRunner()
311-
result = runner.invoke(show.cli.commands["system-health"].commands["sysready-status"])
312-
click.echo(result.output)
313-
print("myresult:{}".format(result.output))
314-
expected = """\
315-
System is not ready - one or more services are not up
316-
317-
Service-Name Service-Status App-Ready-Status Down-Reason
318-
-------------- ---------------- ------------------ -------------
319-
bgp Down Down Inactive
320-
mgmt-framework OK OK -
321-
pmon OK OK -
322-
swss OK OK -
323-
"""
324-
assert result.output == expected
325-
result = runner.invoke(show.cli.commands["system-health"].commands["sysready-status"],["brief"])
326-
click.echo(result.output)
327-
print("myresult:{}".format(result.output))
328-
expected = """\
329-
System is not ready - one or more services are not up
330-
"""
331-
assert result.output == expected
332-
result = runner.invoke(show.cli.commands["system-health"].commands["sysready-status"],["detail"])
333-
click.echo(result.output)
334-
print("myresult:{}".format(result.output))
335-
expected = """\
336-
System is not ready - one or more services are not up
337-
338-
Service-Name Service-Status App-Ready-Status Down-Reason AppStatus-UpdateTime
339-
-------------- ---------------- ------------------ ------------- ----------------------
340-
bgp Down Down Inactive -
341-
mgmt-framework OK OK - -
342-
pmon OK OK - -
343-
swss OK OK - -
344-
"""
345-
346309
@classmethod
347310
def teardown_class(cls):
348311
print("TEARDOWN")

0 commit comments

Comments
 (0)