Remove unused server_status
dataService.server_status is unused.
server_status was set to a HOST_STATE constants which are now
unused. Removed the HOST_STATE constants also.
Tested: Searched the repo for 'server_status' and 'HOST_STATE'
Built an image, loaded on a Witherspoon, power
on/off, and verified correct host state.
Change-Id: I10a915852634277bb5261e113b9706857acf66d6
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/app/common/services/api-utils.js b/app/common/services/api-utils.js
index 6d82504..a32190f 100644
--- a/app/common/services/api-utils.js
+++ b/app/common/services/api-utils.js
@@ -28,7 +28,6 @@
API_RESPONSE: Constants.API_RESPONSE,
CHASSIS_POWER_STATE: Constants.CHASSIS_POWER_STATE,
HOST_STATE_TEXT: Constants.HOST_STATE,
- HOST_STATE: Constants.HOST_STATE,
LED_STATE: Constants.LED_STATE,
LED_STATE_TEXT: Constants.LED_STATE_TEXT,
HOST_SESSION_STORAGE_KEY: Constants.API_CREDENTIALS.host_storage_key,
diff --git a/app/common/services/constants.js b/app/common/services/constants.js
index 9931f01..52e9f97 100644
--- a/app/common/services/constants.js
+++ b/app/common/services/constants.js
@@ -35,7 +35,6 @@
error_code: 'xyz.openbmc_project.State.Host.HostState.Quiesced',
unreachable: 'Unreachable'
},
- HOST_STATE: {on: 1, off: -1, error: 0, unreachable: -2},
LED_STATE: {on: true, off: false},
LED_STATE_TEXT: {on: 'on', off: 'off'},
SEVERITY_TO_PRIORITY_MAP: {
diff --git a/app/common/services/dataService.js b/app/common/services/dataService.js
index 9017227..1cb63ee 100644
--- a/app/common/services/dataService.js
+++ b/app/common/services/dataService.js
@@ -15,7 +15,6 @@
function(Constants) {
this.server_health = Constants.SERVER_HEALTH.unknown;
this.server_state = 'Unreachable';
- this.server_status = -2;
this.chassis_state = 'On';
this.LED_state = Constants.LED_STATE_TEXT.off;
this.last_updated = new Date();
@@ -83,22 +82,18 @@
this.setPowerOnState = function() {
this.server_state = Constants.HOST_STATE_TEXT.on;
- this.server_status = Constants.HOST_STATE.on;
};
this.setPowerOffState = function() {
this.server_state = Constants.HOST_STATE_TEXT.off;
- this.server_status = Constants.HOST_STATE.off;
};
this.setErrorState = function() {
this.server_state = Constants.HOST_STATE_TEXT.error;
- this.server_status = Constants.HOST_STATE.error;
};
this.setUnreachableState = function() {
this.server_state = Constants.HOST_STATE_TEXT.unreachable;
- this.server_status = Constants.HOST_STATE.unreachable;
};
this.updateServerHealth = function(logs) {