-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the APC PSU support for SNMP PSU controller (#1461)
Add APC SNMP MIB for PDU control PORT_NAME_BASE_OID = ".1.3.6.1.4.1.318.1.1.4.4.2.1.4" PORT_STATUS_BASE_OID = ".1.3.6.1.4.1.318.1.1.12.3.5.1.1.4" PORT_CONTROL_BASE_OID = ".1.3.6.1.4.1.318.1.1.12.3.3.1.1.4" How did you verify/test it? {username}@{sonic-mgmt-docker}:/var/sonic-mgmt-int/tests/common/plugins/psu_controller$ python Python 2.7.12 (default, Oct 8 2019, 14:14:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. from snmp_psu_controllers import * psucntl = get_psu_controller('<controller_ip>',"<device_name>") psucntl.get_psu_status() [{'psu_id': 0, 'psu_on': True}] psucntl.turn_off_psu('0') True psucntl.get_psu_status() [{'psu_id': 0, 'psu_on': False}] psucntl.turn_on_psu('0') True psucntl.get_psu_status() [{'psu_id': 0, 'psu_on': True}] print psucntl.psuType APC
- Loading branch information
1 parent
00914a7
commit f8fde6d
Showing
1 changed file
with
130 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters