From acd138f4da16067f073d40b09a16a64867ef7e8f Mon Sep 17 00:00:00 2001 From: Marek 'marx' Grac Date: Mon, 4 Aug 2014 16:29:09 +0200 Subject: [PATCH 03/11] fence_apc_snmp: Add support for firmware 6.x Resolves: rhbz#1123897 --- fence/agents/apc_snmp/fence_apc_snmp.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fence/agents/apc_snmp/fence_apc_snmp.py b/fence/agents/apc_snmp/fence_apc_snmp.py index cbb6856..a2b0d18 100644 --- a/fence/agents/apc_snmp/fence_apc_snmp.py +++ b/fence/agents/apc_snmp/fence_apc_snmp.py @@ -87,6 +87,18 @@ class ApcMS(object): turn_off = 2 has_switches = False +class ApcMS6(object): + # Master Switch with 6.x firmware + status_oid = '.1.3.6.1.4.1.318.1.1.4.4.2.1.3.%d' + control_oid = '.1.3.6.1.4.1.318.1.1.12.3.3.1.1.4.%d' + outlet_table_oid = '1.3.6.1.4.1.318.1.1.4.4.2.1.4' + ident_str = "APC Master Switch with firmware v6.x" + state_on = 1 + state_off = 2 + turn_on = 1 + turn_off = 2 + has_switches = False + ### FUNCTIONS ### def apc_set_device(conn): global device @@ -94,6 +106,7 @@ def apc_set_device(conn): agents_dir = {'.1.3.6.1.4.1.318.1.3.4.5':ApcRPDU, '.1.3.6.1.4.1.318.1.3.4.4':ApcMSP, '.1.3.6.1.4.1.850.1':TripplitePDU, + '.1.3.6.1.4.1.318.1.3.4.6':ApcMS6, None:ApcMS} # First resolve type of APC -- 1.8.4.5