git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c379952
)
don't create network script if the slice hasn't been created yet
author
Scott Baker
<smbaker@gmail.com>
Thu, 10 Apr 2014 08:07:13 +0000
(
01:07
-0700)
committer
Scott Baker
<smbaker@gmail.com>
Thu, 10 Apr 2014 08:07:13 +0000
(
01:07
-0700)
plugins/interfaces.py
patch
|
blob
|
history
diff --git
a/plugins/interfaces.py
b/plugins/interfaces.py
index
8179c8d
..
6927b23
100644
(file)
--- a/
plugins/interfaces.py
+++ b/
plugins/interfaces.py
@@
-31,6
+31,14
@@
def GetSlivers(data, config=None, plc=None):
for sliver in data['slivers']:
slicename = sliver['name']
for sliver in data['slivers']:
slicename = sliver['name']
+
+ if not os.path.exists("/vservers/%s" % slicename):
+ # Avoid creating slice directory if slice does not exist, as it
+ # breaks slice creation when sliver_lxc eventually gets around
+ # to creating the sliver.
+ logger.log("vserver %s does not exist yet. Skipping interfaces." % slicename)
+ continue
+
for tag in sliver['attributes']:
if tag['tagname'] == 'interface':
interfaces = eval(tag['value'])
for tag in sliver['attributes']:
if tag['tagname'] == 'interface':
interfaces = eval(tag['value'])