From: Loic Baron Date: Thu, 4 Sep 2014 12:13:27 +0000 (+0200) Subject: MyPLC fix: slice expires set with UpdateSlice, not possbile with AddSlice X-Git-Tag: sfa-3.1-11~7 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=2877025e4a7ebba7745e27409a863f587d662ccc MyPLC fix: slice expires set with UpdateSlice, not possbile with AddSlice --- diff --git a/sfa/planetlab/plslices.py b/sfa/planetlab/plslices.py index 73f2bc17..197ffcab 100644 --- a/sfa/planetlab/plslices.py +++ b/sfa/planetlab/plslices.py @@ -398,12 +398,15 @@ class PlSlices: 'description': description, 'hrn': slice_hrn, 'sfa_created': 'True', - 'expires': expires, + #'expires': expires, } # add the slice slice_id = self.driver.shell.AddSlice(slice) # plcapi tends to mess with the incoming hrn so let's make sure self.driver.shell.SetSliceHrn (slice_id, slice_hrn) + # cannot be set with AddSlice + # set the expiration + self.driver.shell.UpdateSlice(slice_id, {'expires': expires}) return self.driver.shell.GetSlices(slice_id)[0]