Allocate updates the slice's expiration to the credential's expiration
[sfa.git] / sfa / planetlab / pldriver.py
index aaaa0cc..18a2982 100644 (file)
@@ -71,7 +71,7 @@ class PlDriver (Driver):
             slice_cred_hrn = Credential(cred=cred).get_gid_object().get_hrn() 
             slice_cred_names.append(PlXrn(xrn=slice_cred_hrn).pl_slicename()) 
 
-        # look slice names of slivers listed in urns arg
+        # look up slice name of slivers listed in urns arg
         slice_ids = []
         for urn in urns:
             sliver_id_parts = Xrn(xrn=urn).get_sliver_id_parts()
@@ -619,7 +619,7 @@ class PlDriver (Driver):
                   'geni_slivers': desc['geni_slivers']}
         return status
 
-    def allocate (self, urn, rspec_string, options={}):
+    def allocate (self, urn, rspec_string, expiration, options={}):
         xrn = Xrn(urn)
         aggregate = PlAggregate(self)
         slices = PlSlices(self)
@@ -637,7 +637,7 @@ class PlDriver (Driver):
         # ensure site record exists
         site = slices.verify_site(xrn.hrn, slice_record, peer, sfa_peer, options=options)
         # ensure slice record exists
-        slice = slices.verify_slice(xrn.hrn, slice_record, peer, sfa_peer, options=options)
+        slice = slices.verify_slice(xrn.hrn, slice_record, peer, sfa_peer, expiration=expiration, options=options)
         # ensure person records exists
         persons = slices.verify_persons(xrn.hrn, slice, users, peer, sfa_peer, options=options)
         # ensure slice attributes exists
@@ -645,7 +645,7 @@ class PlDriver (Driver):
        
         # add/remove slice from nodes
         request_nodes = rspec.version.get_nodes_with_slivers()
-        nodes = slices.verify_slice_nodes(slice, request_nodes, peer)
+        nodes = slices.verify_slice_nodes(urn, slice, request_nodes, peer)
          
         # add/remove links links 
         slices.verify_slice_links(slice, rspec.version.get_link_requests(), nodes)