summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthew.hodgins <matthew.hodgins@calxeda.com>2013-12-11 11:51:47 -0600
committermatthew.hodgins <matthew.hodgins@calxeda.com>2013-12-11 11:51:47 -0600
commit065b3f2f0d8aa70d5498429ecc98f4daea77aa89 (patch)
treedec992a46d25faa3ba8fd9386a9aecde49c30890
parent76e66ee2907e15ece39a9ff89e8264eceabd2edf (diff)
downloadcxmanage-065b3f2f0d8aa70d5498429ecc98f4daea77aa89.tar.gz
CXMAN-273 add support for creating private networks
Signed-off-by: matthew.hodgins <matthew.hodgins@calxeda.com>
-rw-r--r--cxmanage_api/fabric.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/cxmanage_api/fabric.py b/cxmanage_api/fabric.py
index 75774cf..29156b0 100644
--- a/cxmanage_api/fabric.py
+++ b/cxmanage_api/fabric.py
@@ -339,16 +339,21 @@ class Fabric(object):
return results
- def add_network(self, name):
+ def add_network(self, name, private=False):
"""Adds a network to the fabric
>>> fabric.add_network('foo')
:param name: The network name
:type name: str
+ :param private: Whether or not the network is private
+ :type private: bool
"""
- self.primary_node.bmc.fabric_config_add_network(name=name)
+ self.primary_node.bmc.fabric_config_add_network(
+ name=name,
+ private=private
+ )
def assign_network_to_uplink(self, name, uplink):
"""Assigns the network to the uplink