diff options
author | matthew.hodgins <matthew.hodgins@calxeda.com> | 2013-12-11 10:15:00 -0600 |
---|---|---|
committer | matthew.hodgins <matthew.hodgins@calxeda.com> | 2013-12-11 10:15:00 -0600 |
commit | 441f613c533e791c420114dc6bbf2d1b60ec6fba (patch) | |
tree | e27ed75fda758faee539c9b67af8cb99618a6fef | |
parent | d1352ca89f89a2d486d7a1f72603d5b5dc08e725 (diff) | |
download | pyipmi-441f613c533e791c420114dc6bbf2d1b60ec6fba.tar.gz |
CXMAN-258 expose get/set iface to network assignment
Signed-off-by: matthew.hodgins <matthew.hodgins@calxeda.com>
-rw-r--r-- | pyipmi/bmc.py | 6 | ||||
-rw-r--r-- | pyipmi/commands/fabric_config.py | 24 |
2 files changed, 29 insertions, 1 deletions
diff --git a/pyipmi/bmc.py b/pyipmi/bmc.py index 5211ae3..986a748 100644 --- a/pyipmi/bmc.py +++ b/pyipmi/bmc.py @@ -466,6 +466,12 @@ 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_set_mac(self, mac, network): + return self.handle.fabric_config_set_mac(mac=mac, network=network) + def fabric_config_add_network(self, name, uplink=None): return self.handle.fabric_config_add_network(name=name, uplink=uplink) diff --git a/pyipmi/commands/fabric_config.py b/pyipmi/commands/fabric_config.py index 3530b77..2e404b6 100644 --- a/pyipmi/commands/fabric_config.py +++ b/pyipmi/commands/fabric_config.py @@ -325,6 +325,26 @@ class RmNetworkCommand(Command, ResponseParserMixIn): self._params['name']] +class AssignIfaceToNetworkCommand(Command, ResponseParserMixIn): + """Describes the ipmitool fabric config set mac command""" + name = "Assign iface to network command" + + @property + def ipmitool_args(self): + return ['cxoem', 'fabric', 'config', 'set', 'mac', + self._params['mac'], 'network', self._params['network']] + + +class GetIfaceToNetworkCommand(Command, ResponseParserMixIn): + """Describes the ipmitool fabric config get mac command""" + name = "Get iface to network command" + + @property + def ipmitool_args(self): + return ['cxoem', 'fabric', 'config', 'get', 'network', 'mac', + self._params['mac']] + + class GetUplinksCommand(CommandWithErrors): """Describes the cxoem fabric config get uplinks command""" @@ -523,5 +543,7 @@ fabric_config_commands = { 'fabric_config_get_networks': GetNetworksCommand, 'fabric_config_get_uplinks': GetUplinksCommand, 'fabric_config_add_network': AddNetworkCommand, - 'fabric_config_rm_network': RmNetworkCommand + 'fabric_config_rm_network': RmNetworkCommand, + 'fabric_config_set_mac': AssignIfaceToNetworkCommand, + 'fabric_config_get_mac_network': GetIfaceToNetworkCommand } |