git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
review 'print' statements - make sure to use PLC.Debug.log that gets redirected to...
[plcapi.git]
/
PLC
/
Methods
/
AddSlice.py
diff --git
a/PLC/Methods/AddSlice.py
b/PLC/Methods/AddSlice.py
index
bcae122
..
0d6c1c6
100644
(file)
--- a/
PLC/Methods/AddSlice.py
+++ b/
PLC/Methods/AddSlice.py
@@
-13,6
+13,8
@@
from PLC.SliceTags import SliceTags
from PLC.Methods.AddSliceTag import AddSliceTag
from PLC.Methods.UpdateSliceTag import UpdateSliceTag
from PLC.Methods.AddSliceTag import AddSliceTag
from PLC.Methods.UpdateSliceTag import UpdateSliceTag
+from PLC.Debug import log
+
can_update = ['name', 'instantiation', 'url', 'description', 'max_nodes']
class AddSlice(Method):
can_update = ['name', 'instantiation', 'url', 'description', 'max_nodes']
class AddSlice(Method):
@@
-110,9
+112,9
@@
class AddSlice(Method):
for value in values:
AddSliceTag(self.api).__call__(auth,slice['slice_id'],'vsys',value)
except:
for value in values:
AddSliceTag(self.api).__call__(auth,slice['slice_id'],'vsys',value)
except:
- print "Could not set vsys tags as configured in PLC_VSYS_DEFAULTS"
+ print
>> log,
"Could not set vsys tags as configured in PLC_VSYS_DEFAULTS"
import traceback
import traceback
- traceback.print_exc()
+ traceback.print_exc(
file=log
)
self.event_objects = {'Slice': [slice['slice_id']]}
self.message = "Slice %d created" % slice['slice_id']
self.event_objects = {'Slice': [slice['slice_id']]}
self.message = "Slice %d created" % slice['slice_id']