diff options
author | matthew.hodgins <matthew.hodgins@calxeda.com> | 2013-12-11 09:54:42 -0600 |
---|---|---|
committer | matthew.hodgins <matthew.hodgins@calxeda.com> | 2013-12-11 10:38:12 -0600 |
commit | 7436b9599d3ecc8530bb071dc612fa3879568cfb (patch) | |
tree | 0a06794cb9be7ec59cce2680fab59bef32414d30 | |
parent | 549603401cba369a52ce1b628f35a48452b9cfba (diff) | |
download | cxmanage-7436b9599d3ecc8530bb071dc612fa3879568cfb.tar.gz |
CXMAN-258 exposing removing/unassigning networks
Signed-off-by: matthew.hodgins <matthew.hodgins@calxeda.com>
-rw-r--r-- | cxmanage_api/fabric.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/cxmanage_api/fabric.py b/cxmanage_api/fabric.py index c4e8b47..fcdf61b 100644 --- a/cxmanage_api/fabric.py +++ b/cxmanage_api/fabric.py @@ -308,6 +308,9 @@ class Fabric(object): >>> fabric.set_uplink_mode(uplink_mode=0) + :param uplink_mode: The uplink_mode + :type uplink_mode: int + """ self.primary_node.bmc.fabric_config_set_uplink_mode(uplink_mode) @@ -341,6 +344,9 @@ class Fabric(object): >>> fabric.add_network('foo') + :param name: The network name + :type name: str + """ self.primary_node.bmc.fabric_config_add_network(name=name) @@ -349,12 +355,44 @@ class Fabric(object): >>> fabric.assign_network_to_uplink('foo', 0) + :param name: The network name + :type name: str + :param uplink: The uplink number + :type uplink: int + """ self.primary_node.bmc.fabric_config_add_network( name=name, uplink=uplink ) + def remove_network(self, name): + """Adds a network to the fabric + + >>> fabric.remobe_network('foo') + + :param name: The network name + :type name: str + + """ + self.primary_node.bmc.fabric_config_rm_network(name=name) + + def unassign_network_to_uplink(self, name, uplink): + """Unassigns the network to the uplink + + >>> fabric.unassign_network_to_uplink('foo', 0) + + :param name: The network name + :type name: str + :param uplink: The uplink number + :type uplink: int + + """ + self.primary_node.bmc.fabric_config_rm_network( + name=name, + uplink=uplink + ) + def get_uplinks(self): """Gets the fabric uplinks |