← Back to team overview

canonical-hw-cert team mailing list archive

[Merge] ~nancy-chen/cc-tool-box:add-poe-script into cc-tool-box:master

 

Nancy Chen has proposed merging ~nancy-chen/cc-tool-box:add-poe-script into cc-tool-box:master.

Commit message:
Add control_host_reboot_script_maptable to support power cycling control host from PoE switch

Requested reviews:
  Canonical Hardware Certification (canonical-hw-cert)

For more details, see:
https://code.launchpad.net/~nancy-chen/cc-tool-box/+git/cc-tool-box/+merge/463194
-- 
Your team Canonical Hardware Certification is requested to review the proposed merge of ~nancy-chen/cc-tool-box:add-poe-script into cc-tool-box:master.
diff --git a/config/cc_lab_manager/cc_lab_manager_maptable.py b/config/cc_lab_manager/cc_lab_manager_maptable.py
index 50ace00..de06786 100644
--- a/config/cc_lab_manager/cc_lab_manager_maptable.py
+++ b/config/cc_lab_manager/cc_lab_manager_maptable.py
@@ -57,6 +57,20 @@ reboot_script_maptable = {
                 'snmpset -c private -v2c {PDU_IP} .1.3.6.1.4.1.13742.6.4.1.2.1.2.1.{PDU_Outlet} i 1']
 }
 
+# For FS PoE switches
+control_host_reboot_script_maptable = {
+    "24 port poe switch": [
+        "snmpset -c private -v 2c {POE_Switch} 1.3.6.1.2.1.105.1.1.1.3.1.{POE_Port} i 2",
+        "sleep 5",
+        "snmpset -c private -v 2c {POE_Switch} 1.3.6.1.2.1.105.1.1.1.3.1.{POE_Port} i 1"
+    ],
+    "48 port poe switch": [
+        "snmpset -c private -v 2c {POE_Switch} 1.3.6.1.2.1.105.1.1.1.3.100.{POE_Port} i 2",
+        "sleep 5",
+        "snmpset -c private -v 2c {POE_Switch} 1.3.6.1.2.1.105.1.1.1.3.100.{POE_Port} i 1"
+    ]
+}
+
 # following parts are for job-generator
 release_image_mapping = {
     "bionic":"desktop-18-04-1-{}","bionic-hwe":"desktop-18-04-5-{}",