diff options
author | George Kraft <george.kraft@calxeda.com> | 2013-12-17 14:17:28 -0600 |
---|---|---|
committer | George Kraft <george.kraft@calxeda.com> | 2013-12-17 14:17:28 -0600 |
commit | 2eeacb7adea68096b691b7004d31124ef36fd4f1 (patch) | |
tree | 6c6ae0aa305ed765318375255a696b417c582b87 | |
parent | faa484613bf3ad500ec6000b2fe34ab81338599b (diff) | |
download | pyipmi-2eeacb7adea68096b691b7004d31124ef36fd4f1.tar.gz |
CXMAN-223: Add bindings for fabric_info_partition_config
-rw-r--r-- | pyipmi/bmc.py | 4 | ||||
-rw-r--r-- | pyipmi/commands/fabric.py | 21 |
2 files changed, 25 insertions, 0 deletions
diff --git a/pyipmi/bmc.py b/pyipmi/bmc.py index 44b7a5a..e9ef830 100644 --- a/pyipmi/bmc.py +++ b/pyipmi/bmc.py @@ -631,6 +631,10 @@ class BMC(object): return self.handle.fabric_info_getdepthchart(filename=filename, tftp_addr=tftp_addr) + def fabric_info_partition_config(self, filename, tftp_addr=None): + return self.handle.fabric_info_partition_config(filename=filename, + tftp_addr=tftp_addr) + def pmic_get_version(self): return self.handle.pmic_get_version() diff --git a/pyipmi/commands/fabric.py b/pyipmi/commands/fabric.py index b27015a..fada44a 100644 --- a/pyipmi/commands/fabric.py +++ b/pyipmi/commands/fabric.py @@ -353,6 +353,26 @@ class GetUplinkStatusCommand(CommandWithErrors): ipmitool_args = ['cxoem', 'fabric', 'get', 'uplink_status'] +class PartitionConfigCommand(Command, ResponseParserMixIn): + """Describes the cxoem fabric info partition_config command""" + name = "Get partition config command" + + @property + def ipmitool_args(self): + if self._params['tftp_addr'] != None: + tftp_args = self._params['tftp_addr'].split(":") + if len(tftp_args) == 1: + return ["cxoem", "fabric", "info", "partition_config", "tftp", + tftp_args[0], "file", self._params['filename']] + else: + return ["cxoem", "fabric", "info", "partition_config", "tftp", + tftp_args[0], "port", tftp_args[1], "file", + self._params['filename']] + else: + return ["cxoem", "fabric", "info", "partition_config", "file", + self._params['filename']] + + fabric_commands = { "fabric_updateconfig" :UpdateConfigCommand, "fabric_getnodeid" : GetNodeIDCommand, @@ -368,6 +388,7 @@ fabric_commands = { "fabric_info_getroutingtable" : GetRoutingTableCommand, "fabric_info_getlinkmap" : GetLinkMapCommand, "fabric_info_getdepthchart" : GetDepthChartCommand, + "fabric_info_partition_config" : PartitionConfigCommand, "fabric_getuplinkspeed" : GetUplinkSpeedCommand, "fabric_getuplinkinfo" : GetUplinkInfoCommand, "fabric_getchassisserialnum" : GetChassisSerialNumCommand, |