diff options
author | George Kraft <george.kraft@calxeda.com> | 2012-06-01 12:18:24 -0500 |
---|---|---|
committer | George Kraft <george.kraft@calxeda.com> | 2012-06-01 12:18:24 -0500 |
commit | 708bc2de23581caa39b61828ee93e79d9028cc23 (patch) | |
tree | 8f2a51baa52367f4707b06b9718b6799437657c1 | |
parent | d810a896a50d8f31e443772c0f4604fe7733f677 (diff) | |
download | pyipmi-708bc2de23581caa39b61828ee93e79d9028cc23.tar.gz |
Add mc reset command
-rw-r--r-- | pyipmi/bmc.py | 3 | ||||
-rw-r--r-- | pyipmi/commands/__init__.py | 2 | ||||
-rw-r--r-- | pyipmi/commands/mc.py | 24 | ||||
-rw-r--r-- | pyipmi/mc.py | 7 |
4 files changed, 36 insertions, 0 deletions
diff --git a/pyipmi/bmc.py b/pyipmi/bmc.py index 5de301b..ac2e8b1 100644 --- a/pyipmi/bmc.py +++ b/pyipmi/bmc.py @@ -327,6 +327,9 @@ class BMC(object): def get_bootparam(self, param): return self.handle.bootparam_get(param=param) + def mc_reset(self, mode): + return self.handle.mc_reset(mode=mode) + class LanBMC(BMC): """A BMC that's accessed over the LAN""" diff --git a/pyipmi/commands/__init__.py b/pyipmi/commands/__init__.py index a63c3e4..b87ebc6 100644 --- a/pyipmi/commands/__init__.py +++ b/pyipmi/commands/__init__.py @@ -26,6 +26,7 @@ from user import user_commands from fabric import fabric_commands from bootdev import bootdev_commands from bootparam import bootparam_commands +from mc import mc_commands ipmi_commands = {} @@ -49,3 +50,4 @@ ipmi_commands.update(user_commands) ipmi_commands.update(fabric_commands) ipmi_commands.update(bootdev_commands) ipmi_commands.update(bootparam_commands) +ipmi_commands.update(mc_commands) diff --git a/pyipmi/commands/mc.py b/pyipmi/commands/mc.py new file mode 100644 index 0000000..2143228 --- /dev/null +++ b/pyipmi/commands/mc.py @@ -0,0 +1,24 @@ +#Copyright 2012 Calxeda, Inc. All Rights Reserved. + +from .. import Command +from pyipmi.tools.responseparser import ResponseParserMixIn +from pyipmi.mc import * + +class MCResetCommand(Command, ResponseParserMixIn): + """ Describes the cxoem fabric list_ip_addrs IPMI command + """ + + name = "Retrieve fabric IP info" + result_type = MCResetResult + + response_fields = { + 'File Name' : {} + } + + @property + def ipmitool_args(self): + return ["mc", "reset", self._params['mode']] + +mc_commands = { + "mc_reset" : MCResetCommand, +} diff --git a/pyipmi/mc.py b/pyipmi/mc.py new file mode 100644 index 0000000..ca6473e --- /dev/null +++ b/pyipmi/mc.py @@ -0,0 +1,7 @@ +"""MC results + +""" + +class MCResetResult(object): + """Object to hold fabric ip list results""" + pass |