Refactor network element state management - Removed the NE state endpoint and related service logic from the network_data module. - Introduced a new NEStateController to handle network element state records. - Implemented NEState service and repository for managing state records in the database. - Updated NEInfo and NeLicense controllers to utilize the new NEState service for fetching and saving state information. - Enhanced state handling in the websocket processor to reflect the latest state of network elements. - Added caching logic for network element states using Redis. - Improved error handling and response formatting for state queries.
39 lines
900 B
SQL
39 lines
900 B
SQL
-- ----------------------------
|
|
-- Table structure for ne_state
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS "ne_state";
|
|
CREATE TABLE "ne_state" (
|
|
"id" integer NOT NULL,
|
|
"ne_type" text(16),
|
|
"ne_id" text(32),
|
|
"ne_version" text(16),
|
|
"standby" integer,
|
|
"nb_number" integer,
|
|
"ue_number" integer,
|
|
"serial_num" text(16),
|
|
"expiry_date" text(10),
|
|
"hostname" text(32),
|
|
"os" text(196),
|
|
"sys_cpu_usage" integer,
|
|
"sys_mem_usage" integer,
|
|
"sys_disk_usage" integer,
|
|
"nf_cpu_usage" integer,
|
|
"nf_mem_used" integer,
|
|
"refresh_time" integer,
|
|
PRIMARY KEY ("id")
|
|
);
|
|
|
|
-- ----------------------------
|
|
-- Indexes structure for table ne_state
|
|
-- ----------------------------
|
|
CREATE INDEX IF NOT EXISTS "idx_type_id_time"
|
|
ON "ne_state" (
|
|
"ne_type" ASC,
|
|
"ne_id" ASC,
|
|
"refresh_time" ASC
|
|
);
|
|
|
|
-- ----------------------------
|
|
-- Records of ne_state
|
|
-- ----------------------------
|