git://git.onelab.eu
/
plstackapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a2e232f
)
fix mistakes, enable object creation
author
Scott Baker
<smbaker@gmail.com>
Thu, 8 Aug 2013 01:48:41 +0000
(18:48 -0700)
committer
Scott Baker
<smbaker@gmail.com>
Thu, 8 Aug 2013 01:48:41 +0000
(18:48 -0700)
planetstack/openstack/manager.py
patch
|
blob
|
history
diff --git
a/planetstack/openstack/manager.py
b/planetstack/openstack/manager.py
index
7fb20f7
..
57ab790
100644
(file)
--- a/
planetstack/openstack/manager.py
+++ b/
planetstack/openstack/manager.py
@@
-412,6
+412,8
@@
class OpenStackManager:
@require_enabled
def save_network(self, network):
if not network.network_id:
@require_enabled
def save_network(self, network):
if not network.network_id:
+ network_name = network.name
+
# create network
os_network = self.driver.create_network(network_name)
network.network_id = os_network['id']
# create network
os_network = self.driver.create_network(network_name)
network.network_id = os_network['id']
@@
-513,13
+515,13
@@
class OpenStackManager:
if owner_slice:
print "creating model object for OS network", os_network['name']
if owner_slice:
print "creating model object for OS network", os_network['name']
-
#
new_network = Network(name = os_network['name'],
-
#
template = template,
-
#
owner = owner_slice,
-
#
#guaranteedBandwidth = 0,
-
#
network_id = uuid,
-
#
subnet_id = subnet_id)
-
#
new_network.save()
+ new_network = Network(name = os_network['name'],
+ template = template,
+ owner = owner_slice,
+ #guaranteedBandwidth = 0,
+ network_id = uuid,
+ subnet_id = subnet_id)
+ new_network.save()
for (network_id, network) in networks_by_id.items():
# If the network disappeared from OS, then reset its network_id to None
for (network_id, network) in networks_by_id.items():
# If the network disappeared from OS, then reset its network_id to None
@@
-529,8
+531,8
@@
class OpenStackManager:
# If no OS object exists, then saving the network will create one
if (network.network_id is None):
print "creating OS network for", network.name
# If no OS object exists, then saving the network will create one
if (network.network_id is None):
print "creating OS network for", network.name
-
#
self.save_network(network)
+ self.save_network(network)
else:
else:
- print "network", network
_
name, "has its OS object"
+ print "network", network
.
name, "has its OS object"