Commit 5b7cd839 authored by Gary Wong's avatar Gary Wong

Update the test scripts to cope with URNs and without UUIDs (where

possible, maintaining backward compatibility).
parent 426457f0
......@@ -43,14 +43,11 @@ params["type"] = "Slice"
params["hrn"] = SLICENAME
rval,response = do_method("sa", "Resolve", params)
if rval == 0:
myslice = response["value"]
myuuid = myslice["uuid"]
print "Deleting previously registered slice";
params = {}
params["credential"] = mycredential
params["type"] = "Slice"
params["uuid"] = myuuid
params["hrn"] = SLICENAME
rval,response = do_method("sa", "Remove", params)
if rval:
Fatal("Could not remove slice record")
......
......@@ -35,16 +35,13 @@ mycredential = get_self_credential()
print "Got my SA credential"
#
# Lookup slice, and delete.
# Delete slice.
#
myslice = resolve_slice( SLICENAME, mycredential )
myuuid = myslice["uuid"]
print "Deleting previously registered slice";
params = {}
params["credential"] = mycredential
params["type"] = "Slice"
params["uuid"] = myuuid
params["hrn"] = SLICENAME
rval,response = do_method("sa", "Remove", params)
if rval:
Fatal("Could not remove slice record")
......
......@@ -38,7 +38,6 @@ print "Got my SA credential. Looking for slice ..."
# Lookup slice, delete before proceeding.
#
myslice = resolve_slice( SLICENAME, mycredential )
myuuid = myslice["uuid"]
print "Found the slice, asking for a credential ..."
#
......
......@@ -87,7 +87,11 @@ def ShowCredential( cred, level ):
print " Owner: " + SubjectName( owner )
print " Target: " + SubjectName( target )
print " UUID: " + Text( Lookup( cred, "uuid" ) )
try:
# look for deprecated UUID
print " UUID: " + Text( Lookup( cred, "uuid" ) )
except Exception:
pass
print " Expires: " + Text( Lookup( cred, "expires" ) )
if type == "privilege":
......
......@@ -80,8 +80,6 @@ print "Got SA credential. Looking up slice " + SLICENAME + "..."
# Look up the slice and obtain credentials.
#
slice = resolve_slice( SLICENAME, mycredential )
sliceuuid = slice[ "uuid" ]
if debug: print sliceuuid
print "Found slice " + SLICENAME + ", asking for a credential..."
slicecred = get_slice_credential( slice, mycredential )
......
......@@ -38,7 +38,6 @@ print "Got my SA credential. Looking for slice ..."
# Lookup slice, delete before proceeding.
#
myslice = resolve_slice( SLICENAME, mycredential )
myuuid = myslice["uuid"]
print "Found the slice, asking for a credential ..."
#
......
......@@ -35,10 +35,9 @@ mycredential = get_self_credential()
print "Got my SA credential. Looking for slice ..."
#
# Lookup slice, delete before proceeding.
# Lookup slice.
#
myslice = resolve_slice( SLICENAME, mycredential )
myuuid = myslice["uuid"]
print "Found the slice, asking for a credential ..."
#
......
Markdown is supported
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