SFA object constructor now requires a argument
[plcapi.git] / PLC / Methods / AddSlice.py
index 73f6847..9644e6d 100644 (file)
@@ -14,8 +14,9 @@ from PLC.TagTypes import TagTypes
 from PLC.SliceTags import SliceTags
 from PLC.Methods.AddSliceTag import AddSliceTag
 from PLC.Methods.UpdateSliceTag import UpdateSliceTag
+from PLC.SFA import SFA
 
-can_update = ['name', 'instantiation', 'url', 'description', 'max_nodes', 'expires']
+can_update = ['name', 'instantiation', 'url', 'description', 'max_nodes']
 
 class AddSlice(Method):
     """
@@ -102,7 +103,9 @@ class AddSlice(Method):
             else:
                 UpdateSliceTag(self.api).__call__(auth,slice_tags[0]['slice_tag_id'],value)
 
-       self.event_objects = {'Slice': [slice['slice_id']]}
+        self.event_objects = {'Slice': [slice['slice_id']]}
         self.message = "Slice %d created" % slice['slice_id']
-
+    
+        sfa = SFA(self.api)
+        sfa.update_record(slice, 'slice', site['login_base']) 
         return slice['slice_id']