diff options
author | matthew.hodgins <matthew.hodgins@calxeda.com> | 2013-12-11 11:45:02 -0600 |
---|---|---|
committer | matthew.hodgins <matthew.hodgins@calxeda.com> | 2013-12-11 11:45:02 -0600 |
commit | 94f2c8b5ee3fe7c5be39ddca7fa7979175455b9f (patch) | |
tree | 48888fec2ab73480ee5ae4bd70342f4829c9b7f5 | |
parent | 441f613c533e791c420114dc6bbf2d1b60ec6fba (diff) | |
download | pyipmi-94f2c8b5ee3fe7c5be39ddca7fa7979175455b9f.tar.gz |
CXMAN-258 setting proper command order
Signed-off-by: matthew.hodgins <matthew.hodgins@calxeda.com>
-rw-r--r-- | pyipmi/bmc.py | 4 | ||||
-rw-r--r-- | pyipmi/commands/fabric_config.py | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/pyipmi/bmc.py b/pyipmi/bmc.py index 986a748..9a1b1c4 100644 --- a/pyipmi/bmc.py +++ b/pyipmi/bmc.py @@ -466,8 +466,8 @@ class BMC(object): string arguments that are run by pyipmi/ipmitool.py """ - def fabric_config_get_mac_network(self, mac): - return self.handle.fabric_config_get_mac_network(mac=mac) + def fabric_config_get_network_mac(self, mac): + return self.handle.fabric_config_get_network_mac(mac=mac) def fabric_config_set_mac(self, mac, network): return self.handle.fabric_config_set_mac(mac=mac, network=network) diff --git a/pyipmi/commands/fabric_config.py b/pyipmi/commands/fabric_config.py index 2e404b6..f4d21f5 100644 --- a/pyipmi/commands/fabric_config.py +++ b/pyipmi/commands/fabric_config.py @@ -338,6 +338,12 @@ class AssignIfaceToNetworkCommand(Command, ResponseParserMixIn): class GetIfaceToNetworkCommand(Command, ResponseParserMixIn): """Describes the ipmitool fabric config get mac command""" name = "Get iface to network command" + result_type = str + + def parse_response(self, out, err): + if err: + raise IpmiError(err) + return out.strip() @property def ipmitool_args(self): @@ -345,9 +351,8 @@ class GetIfaceToNetworkCommand(Command, ResponseParserMixIn): self._params['mac']] -class GetUplinksCommand(CommandWithErrors): +class GetUplinksCommand(CommandWithErrors, ResponseParserMixIn): """Describes the cxoem fabric config get uplinks command""" - name = "Retrieve fabric uplinks" response_fields = { @@ -545,5 +550,5 @@ fabric_config_commands = { 'fabric_config_add_network': AddNetworkCommand, 'fabric_config_rm_network': RmNetworkCommand, 'fabric_config_set_mac': AssignIfaceToNetworkCommand, - 'fabric_config_get_mac_network': GetIfaceToNetworkCommand + 'fabric_config_get_network_mac': GetIfaceToNetworkCommand } |