diff options
author | matthew.hodgins <matthew.hodgins@calxeda.com> | 2013-12-11 09:45:01 -0600 |
---|---|---|
committer | matthew.hodgins <matthew.hodgins@calxeda.com> | 2013-12-11 10:38:12 -0600 |
commit | 549603401cba369a52ce1b628f35a48452b9cfba (patch) | |
tree | 6fad1e191dda183c0641ba06cf6cff950652ae96 | |
parent | 38d387ce6634a072c15467c46b0776c214aad387 (diff) | |
download | cxmanage-549603401cba369a52ce1b628f35a48452b9cfba.tar.gz |
CXMAN-258 expose adding/assigning networks
Signed-off-by: matthew.hodgins <matthew.hodgins@calxeda.com>
-rw-r--r-- | cxmanage_api/fabric.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cxmanage_api/fabric.py b/cxmanage_api/fabric.py index f06f700..c4e8b47 100644 --- a/cxmanage_api/fabric.py +++ b/cxmanage_api/fabric.py @@ -336,6 +336,25 @@ class Fabric(object): return results + def add_network(self, name): + """Adds a network to the fabric + + >>> fabric.add_network('foo') + + """ + self.primary_node.bmc.fabric_config_add_network(name=name) + + def assign_network_to_uplink(self, name, uplink): + """Assigns the network to the uplink + + >>> fabric.assign_network_to_uplink('foo', 0) + + """ + self.primary_node.bmc.fabric_config_add_network( + name=name, + uplink=uplink + ) + def get_uplinks(self): """Gets the fabric uplinks |