fence-agents/0003-fence_apc_snmp-Add-support-for-firmware-6.x.patch
Kristoffer Gronlund 86a3dd56d6 - Backport fixes from upstream (bnc#896833):
- fence_brocade: Add support for 'list' action
  - fencing: Monitor is not working correctly without 'list' or 'status'
  - fence_apc_snmp: Add support for firmware 6.x
  - fence_zvm: Add support for "on" and "status"
  - fence_zvm: Add current XML metadata to test suite
  - [build] Fix automake files, so 'make distcheck' works
  - fencing: Add new options --ssl-secure and --ssl-insecure
  - [tests] Update XML metadata of fence agents
  - fence_cisco_ucs & fence_vmware_soap: Logout has to be performed even when fencing fails
  - fence_zvm: Fixes for better upstream inclusion
  - fence_zvm: Add support for 'on', improve documentation
- Added patches:
  - 0001-fence_brocade-Add-support-for-list-action.patch
  - 0002-fencing-Monitor-is-not-working-correctly-without-lis.patch
  - 0003-fence_apc_snmp-Add-support-for-firmware-6.x.patch
  - 0004-fence_zvm-Add-support-for-on-and-status.patch
  - 0005-fence_zvm-Add-current-XML-metadata-to-test-suite.patch
  - 0006-build-Fix-automake-files-so-make-distcheck-works.patch
  - 0007-fencing-Add-new-options-ssl-secure-and-ssl-insecure.patch
  - 0008-tests-Update-XML-metadata-of-fence-agents.patch
  - 0009-fence_cisco_ucs-fence_vmware_soap-Logout-has-to-be-p.patch
  - 0010-fence_zvm-Fixes-for-better-upstream-inclusion.patch
  - 0011-fence_zvm-Add-support-for-on-improve-documentation.patch
- Add dependency on python-requests

OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/fence-agents?expand=0&rev=16
2014-09-16 07:48:32 +00:00

45 lines
1.3 KiB
Diff

From acd138f4da16067f073d40b09a16a64867ef7e8f Mon Sep 17 00:00:00 2001
From: Marek 'marx' Grac <mgrac@redhat.com>
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