From fbe4ede69833188df95d107d86b59f9a134249d9 Mon Sep 17 00:00:00 2001 From: Nazarii Hnydyn Date: Wed, 24 Apr 2019 11:39:55 +0300 Subject: [PATCH] Align PSU DB count field with the schema Spec. (#509) Signed-off-by: Nazarii Hnydyn --- scripts/psushow | 2 +- sonic-utilities-tests/mock_tables/state_db.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/psushow b/scripts/psushow index 531e2fe060ec..242f10d37476 100755 --- a/scripts/psushow +++ b/scripts/psushow @@ -24,7 +24,7 @@ def psu_status_show(index): # Currently set chassis_num to 1, need to improve it once new platform API is implemented chassis_num = 1 chassis_name = "chassis {}".format(chassis_num) - num_psus = db.get(db.STATE_DB, 'CHASSIS_INFO|{}'.format(chassis_name), 'num_psus') + num_psus = db.get(db.STATE_DB, 'CHASSIS_INFO|{}'.format(chassis_name), 'psu_num') if not num_psus: print "Error! Failed to get the number of PSUs!" return -1 diff --git a/sonic-utilities-tests/mock_tables/state_db.json b/sonic-utilities-tests/mock_tables/state_db.json index 87ebaaf19f84..8d3b255a4925 100644 --- a/sonic-utilities-tests/mock_tables/state_db.json +++ b/sonic-utilities-tests/mock_tables/state_db.json @@ -33,7 +33,7 @@ "tx4power": "N/A" }, "CHASSIS_INFO|chassis 1": { - "num_psus": "2" + "psu_num": "2" }, "PSU_INFO|PSU 1": { "presence": "true",