Created
February 1, 2019 09:16
-
-
Save xtha/e0acb54846ec908c1929506fe3b06ff2 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# | |
try: | |
from pyghmi.ipmi import command, fru, sdr, bmc | |
except ImportError: | |
command = None | |
ipmi_cmd = command.Command( | |
bmc='10.144.128.215', userid='admin', password='ohthai4o', port=623 | |
) | |
ipmi = dict() | |
ipmi['asset_tag'] = ipmi_cmd.get_asset_tag() | |
ipmi['bootdev'] = ipmi_cmd.get_bootdev() | |
ipmi['power'] = ipmi_cmd.get_power() | |
ipmi['net_configuration'] = ipmi_cmd.get_net_configuration() | |
fru = fru.FRU(ipmicmd=ipmi_cmd).info | |
ipmi['fru'] = fru | |
import pprint | |
pprint.pprint(ipmi) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment