From 7e1e1d8c8fe934c0130129f756317ae48ec55b74 Mon Sep 17 00:00:00 2001 From: mprabhu-nokia <66807480+mprabhu-nokia@users.noreply.github.com> Date: Tue, 1 Sep 2020 22:31:03 -0700 Subject: [PATCH] Updated with chassisd config-db changes --- doc/pmon/pmon-chassis-design.md | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/doc/pmon/pmon-chassis-design.md b/doc/pmon/pmon-chassis-design.md index 9521866f14..d4257946ab 100644 --- a/doc/pmon/pmon-chassis-design.md +++ b/doc/pmon/pmon-chassis-design.md @@ -157,16 +157,16 @@ Modular Chassis has control-cards, line-cards and fabric-cards along with other * The UP/DOWN events will be added to syslog. * Vendor-specific API will be provided to take action on any change event. -#### Schema +#### State-DB Schema -The schema for CHASSIS_CARD_INFO table in State DB is: +The schema for CHASSIS_MODULE_TABLE in State DB is: ``` -key = CHASSIS_CARD_INFO | ; +key = CHASSIS_MODULE_INFO | ; ; field = value name = STRING ; name of the card -slot = 1*2DIGIT ; slot number in the chassis +instance = 1*2DIGIT ; slot number in the chassis for cards status = "Empty" | "Online" | "Offline" ; status of the card -type = "control"| "line" | "fabric" ; card-type +device-type = "CONTROL-CARD"| "LINE-CARD" | "FABRIC-CARD" ; card-type ``` #### Prototype Code @@ -242,6 +242,26 @@ class LineCard(LineCardBase): Additionally, *get_change_event()* can be implemented to handle asynchronous notification of the line-card UP/DOWN events. +#### Configuration +Configuration will be provided to administratively bring down a line-card or fabric-card. This can be further extended to other components of the chassis like PSUs and FANs. + +``` +Configuration to administratively bring down the module +#config chassis_modules admin_down + +Configuration to remove the adminstrative down state of module +#config chassis_modules del +``` + +#### Config-DB Schema +The schema for CHASSIS_MODULE table in Config DB is: +``` +key = CHASSIS_MODULE | ; +; field = value +instance = 1*2DIGIT ; instance number of the device-type +device-type = "LINE-CARD" | "FABRIC-CARD" |"PSU" | "FAN" ; device-type +admin-status = "up" | "down" ; admin-status +``` #### Show command The *show platform* command is enhanced to show chassis information