Commit 465c1761 authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

BUG FIX: Removed bitrot from redeemticket and updatesliver scripts.

parent 3536b5d6
......@@ -101,12 +101,25 @@ if rval:
ticket = response["value"]
print "Got the ticket"
redeemcred = slicecred;
#
# Get the sliver credential.
#
print "Asking for sliver credential"
params = {}
params["slice_urn"] = SLICEURN
params["credentials"] = (slicecred,)
rval,response = do_method("cm", "GetSliver", params, version="2.0")
if not rval:
redeemcred = response["value"]
print "Got the sliver credential"
#
# And redeem the ticket.
#
print "Redeeming the ticket"
params = {}
params["credentials"] = (slicecred,)
params["credentials"] = (redeemcred,)
params["ticket"] = ticket
params["slice_urn"] = SLICEURN
params["keys"] = mykeys
......@@ -114,6 +127,6 @@ rval,response = do_method("cm", "RedeemTicket", params, version="2.0")
if rval:
Fatal("Could not redeem the ticket")
pass
sliver,manifest = response["value"]
(sliver, manifest) = response["value"]
print "Created the sliver"
print str(manifest)
......@@ -107,6 +107,7 @@ print str(myslice)
#
print "Asking for sliver credential"
params = {}
params["slice_urn"] = SLICEURN
params["credentials"] = (slicecred,)
rval,response = do_method("cm", "GetSliver", params, version="2.0")
if rval:
......@@ -122,10 +123,10 @@ valid_until = time.strftime("%Y%m%dT%H:%M:%S",time.gmtime(time.time() + 6000));
print "Renewing the Sliver until " + valid_until
params = {}
params["credentials"] = (slivercred,)
params["credentials"] = (slicecred,)
params["slice_urn"] = SLICEURN
params["valid_until"] = valid_until
rval,response = do_method("cm", "RenewSliver", params, version="2.0")
params["expiration"] = valid_until
rval,response = do_method("cm", "RenewSlice", params, version="2.0")
if rval:
Fatal("Could not renew sliver")
pass
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment