git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DeleteSliver supports call_id
[sfa.git]
/
sfa
/
managers
/
aggregate_manager_pl.py
diff --git
a/sfa/managers/aggregate_manager_pl.py
b/sfa/managers/aggregate_manager_pl.py
index
9e0aa27
..
4b8f34d
100644
(file)
--- 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.
"""
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)
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)
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)
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):
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
# 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:
slicename = hrn_to_pl_slicename(hrn)
slices = api.plshell.GetSlices(api.plauth, {'name': slicename})
if not slices: