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:
53c6334
)
fix TypeError
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Wed, 10 Apr 2013 12:12:58 +0000
(08:12 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Wed, 10 Apr 2013 12:12:58 +0000
(08:12 -0400)
plstackapi/openstack/driver.py
patch
|
blob
|
history
diff --git
a/plstackapi/openstack/driver.py
b/plstackapi/openstack/driver.py
index
aac72ab
..
41a6208
100644
(file)
--- a/
plstackapi/openstack/driver.py
+++ b/
plstackapi/openstack/driver.py
@@
-120,10
+120,10
@@
class OpenStackDriver:
def create_network(self, name):
nets = self.shell.quantum.list_networks(name=name)
- if not nets:
- net = self.shell.quantum.create_network(name, admin_state_up=True)
- else:
+ if len(nets) > 0:
net = nets[0]
+ else:
+ net = self.shell.quantum.create_network(name, admin_state_up=True)
return net
def delete_network(self, name):