X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmanagers%2Faggregate_manager_pl.py;h=4b8f34db7fbeece259d1978897163ac196a6e747;hb=5307e4e09dd0a7982f0c6dfdd13065425c802005;hp=9e0aa27f5595b81ae4a105eef4d32c6931a98866;hpb=4ff67c801ceeb1d0c7ca2863c2b7bf8152182b8f;p=sfa.git diff --git a/sfa/managers/aggregate_manager_pl.py b/sfa/managers/aggregate_manager_pl.py index 9e0aa27f..4b8f34db 100644 --- a/sfa/managers/aggregate_manager_pl.py +++ b/sfa/managers/aggregate_manager_pl.py @@ -159,11 +159,11 @@ def CreateSliver(api, slice_xrn, creds, rspec, users, call_id): Create the sliver[s] (slice) at this aggregate. Verify HRN and initialize the slice record in PLC if necessary. """ - if Callids().already_handled(call_id): return False + if Callids().already_handled(call_id): return "" reg_objects = __get_registry_objects(slice_xrn, creds, users) - hrn, type = urn_to_hrn(slice_xrn) + (hrn, type) = urn_to_hrn(slice_xrn) peer = None slices = Slices(api) peer = slices.get_peer(hrn) @@ -205,9 +205,8 @@ def CreateSliver(api, slice_xrn, creds, rspec, users, call_id): api.plshell.BindObjectToPeer(api.plauth, 'slice', slice.id, peer, slice.peer_id) - # print network.toxml() - - return True + # xxx - check this holds enough data for the client to understand what's happened + return network.toxml() def renew_slice(api, xrn, creds, expiration_time): @@ -255,8 +254,9 @@ def reset_slice(api, xrn): # XX not implemented at this interface return 1 -def delete_slice(api, xrn, creds): - hrn, type = urn_to_hrn(xrn) +def DeleteSliver(api, xrn, creds, call_id): + if Callids().already_handled(call_id): return "" + (hrn, type) = urn_to_hrn(xrn) slicename = hrn_to_pl_slicename(hrn) slices = api.plshell.GetSlices(api.plauth, {'name': slicename}) if not slices: