diff --git a/protogeni/test/binduser.py b/protogeni/test/binduser.py index 66d200e023a7df8ae609e6699ec94e94dfc4f206..ba24fb1665f6b41695f8be756c82f42ae4bf3d1e 100755 --- a/protogeni/test/binduser.py +++ b/protogeni/test/binduser.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # # EMULAB-COPYRIGHT -# Copyright (c) 2004, 2008 University of Utah and the Flux Group. +# Copyright (c) 2008-2009 University of Utah and the Flux Group. # All rights reserved. # # Permission to use, copy, modify and distribute this software is hereby @@ -36,7 +36,7 @@ if rval: Fatal("Could not get my credential") pass mycredential = response["value"] -print "Got my SA credential, looking up mytestslice" +print "Got my SA credential, looking up " + SLICENAME #print str(mycredential); # @@ -45,7 +45,7 @@ print "Got my SA credential, looking up mytestslice" params = {} params["credential"] = mycredential params["type"] = "Slice" -params["hrn"] = "mytestslice" +params["hrn"] = SLICENAME rval,response = do_method("sa", "Resolve", params) if rval: # @@ -57,7 +57,7 @@ else: # # Get the slice credential. # - print "Asking for slice credential for mytestslice"; + print "Asking for slice credential for " + SLICENAME myslice = response["value"] myuuid = myslice["uuid"] params = {} diff --git a/protogeni/test/createslice.py b/protogeni/test/createslice.py index 6d940141b547b9f52632a05cb4d24c3e6ac35fe7..134070949403e2e141d87a0ee3a64d1f872dc3df 100755 --- a/protogeni/test/createslice.py +++ b/protogeni/test/createslice.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # # EMULAB-COPYRIGHT -# Copyright (c) 2004, 2008 University of Utah and the Flux Group. +# Copyright (c) 2008-2009 University of Utah and the Flux Group. # All rights reserved. # # Permission to use, copy, modify and distribute this software is hereby @@ -45,7 +45,7 @@ print "Got my SA credential" params = {} params["credential"] = mycredential params["type"] = "Slice" -params["hrn"] = "mytestslice" +params["hrn"] = SLICENAME rval,response = do_method("sa", "Resolve", params) if rval == 0: myslice = response["value"] @@ -65,11 +65,11 @@ if rval == 0: # # Create a slice. # -print "Creating new slice called mytestslice"; +print "Creating new slice called " + SLICENAME params = {} params["credential"] = mycredential params["type"] = "Slice" -params["hrn"] = "mytestslice" +params["hrn"] = SLICENAME rval,response = do_method("sa", "Register", params) if rval: Fatal("Could not get my slice") diff --git a/protogeni/test/createsliver.py b/protogeni/test/createsliver.py index 1c4af91109f340585b495e5b6f9eaf1eed757d4c..efa7bb8983099f65a8cb616cb753680c05b8ffe0 100755 --- a/protogeni/test/createsliver.py +++ b/protogeni/test/createsliver.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # # EMULAB-COPYRIGHT -# Copyright (c) 2004, 2008 University of Utah and the Flux Group. +# Copyright (c) 2008-2009 University of Utah and the Flux Group. # All rights reserved. # # Permission to use, copy, modify and distribute this software is hereby @@ -57,17 +57,17 @@ mykeys = response["value"] params = {} params["credential"] = mycredential params["type"] = "Slice" -params["hrn"] = "mytestslice" +params["hrn"] = SLICENAME rval,response = do_method("sa", "Resolve", params) if rval: # # Create a slice. # - print "Creating new slice called mytestslice"; + print "Creating new slice called " + SLICENAME params = {} params["credential"] = mycredential params["type"] = "Slice" - params["hrn"] = "mytestslice" + params["hrn"] = SLICENAME rval,response = do_method("sa", "Register", params) if rval: Fatal("Could not create new slice") @@ -79,7 +79,7 @@ else: # # Get the slice credential. # - print "Asking for slice credential for mytestslice"; + print "Asking for slice credential for " + SLICENAME myslice = response["value"] myuuid = myslice["uuid"] params = {} diff --git a/protogeni/test/deleteslice.py b/protogeni/test/deleteslice.py index f270e2fc2ee515804d0a726972ea0175f7610983..da76cce4311ec0d961a6f20f7f01868e57adc4b4 100755 --- a/protogeni/test/deleteslice.py +++ b/protogeni/test/deleteslice.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # # EMULAB-COPYRIGHT -# Copyright (c) 2004, 2008 University of Utah and the Flux Group. +# Copyright (c) 2008-2009 University of Utah and the Flux Group. # All rights reserved. # # Permission to use, copy, modify and distribute this software is hereby @@ -45,7 +45,7 @@ print "Got my SA credential" params = {} params["credential"] = mycredential params["type"] = "Slice" -params["hrn"] = "mytestslice" +params["hrn"] = SLICENAME rval,response = do_method("sa", "Resolve", params) if rval == 0: myslice = response["value"] diff --git a/protogeni/test/deletesliver.py b/protogeni/test/deletesliver.py index 107b452e859bc23130a819749e4b29f4105b8099..9870ede1beb30ec07c1dc0e71a1bf4281c1895e0 100755 --- a/protogeni/test/deletesliver.py +++ b/protogeni/test/deletesliver.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # # EMULAB-COPYRIGHT -# Copyright (c) 2004, 2008 University of Utah and the Flux Group. +# Copyright (c) 2008-2009 University of Utah and the Flux Group. # All rights reserved. # # Permission to use, copy, modify and distribute this software is hereby @@ -45,7 +45,7 @@ print "Got my SA credential. Looking for slice ..." params = {} params["credential"] = mycredential params["type"] = "Slice" -params["hrn"] = "mytestslice" +params["hrn"] = SLICENAME rval,response = do_method("sa", "Resolve", params) if rval: Fatal("Slice does not exist") diff --git a/protogeni/test/getticket.py b/protogeni/test/getticket.py index 4891b2060219d0a10b8f91adaa5ae2cf03343a3c..cbcd0f0e36cc8930e25280a07f87b8dcaad9b7c0 100755 --- a/protogeni/test/getticket.py +++ b/protogeni/test/getticket.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # # EMULAB-COPYRIGHT -# Copyright (c) 2004, 2008 University of Utah and the Flux Group. +# Copyright (c) 2008-2009 University of Utah and the Flux Group. # All rights reserved. # # Permission to use, copy, modify and distribute this software is hereby @@ -37,7 +37,7 @@ if rval: Fatal("Could not get my credential") pass mycredential = response["value"] -print "Got my SA credential, looking up mytestslice" +print "Got my SA credential, looking up " + SLICENAME #print str(mycredential); # @@ -46,17 +46,17 @@ print "Got my SA credential, looking up mytestslice" params = {} params["credential"] = mycredential params["type"] = "Slice" -params["hrn"] = "mytestslice" +params["hrn"] = SLICENAME rval,response = do_method("sa", "Resolve", params) if rval: # # Create a slice. # - print "Creating new slice called mytestslice"; + print "Creating new slice called " + SLICENAME params = {} params["credential"] = mycredential params["type"] = "Slice" - params["hrn"] = "mytestslice" + params["hrn"] = SLICENAME rval,response = do_method("sa", "Register", params) if rval: Fatal("Could not create new slice") @@ -68,7 +68,7 @@ else: # # Get the slice credential. # - print "Asking for slice credential for mytestslice"; + print "Asking for slice credential for " + SLICENAME myslice = response["value"] myuuid = myslice["uuid"] params = {} diff --git a/protogeni/test/linktest.py b/protogeni/test/linktest.py index ec2e5da5bd60562776e8d02441a23507cca9014d..ed98939e0270b365254ce3e372721baa9f34c2ee 100755 --- a/protogeni/test/linktest.py +++ b/protogeni/test/linktest.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # # EMULAB-COPYRIGHT -# Copyright (c) 2004, 2008 University of Utah and the Flux Group. +# Copyright (c) 2008-2009 University of Utah and the Flux Group. # All rights reserved. # # Permission to use, copy, modify and distribute this software is hereby @@ -57,17 +57,17 @@ mykeys = response["value"] params = {} params["credential"] = mycredential params["type"] = "Slice" -params["hrn"] = "mytestslice" +params["hrn"] = SLICENAME rval,response = do_method("sa", "Resolve", params) if rval: # # Create a slice. # - print "Creating new slice called mytestslice"; + print "Creating new slice called " + SLICENAME params = {} params["credential"] = mycredential params["type"] = "Slice" - params["hrn"] = "mytestslice" + params["hrn"] = SLICENAME rval,response = do_method("sa", "Register", params) if rval: Fatal("Could not create new slice") @@ -79,7 +79,7 @@ else: # # Get the slice credential. # - print "Asking for slice credential for mytestslice"; + print "Asking for slice credential for " + SLICENAME myslice = response["value"] myuuid = myslice["uuid"] params = {} @@ -130,7 +130,7 @@ if rval: pass ticket = response["value"] print "Got a ticket from the CM. Redeeming the ticket ..." -print str(response["output"]) +#print str(response["output"]) # # Create the sliver. diff --git a/protogeni/test/shutdownslice.py b/protogeni/test/shutdownslice.py index 7e9923cbb7fb1ce1c3a73822255c2e55a7a547b2..74e396fcfe13aad7818f67447b7ef2cb9b024e76 100755 --- a/protogeni/test/shutdownslice.py +++ b/protogeni/test/shutdownslice.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # # EMULAB-COPYRIGHT -# Copyright (c) 2004, 2008 University of Utah and the Flux Group. +# Copyright (c) 2008-2009 University of Utah and the Flux Group. # All rights reserved. # # Permission to use, copy, modify and distribute this software is hereby @@ -44,10 +44,10 @@ print "Got my SA credential" params = {} params["credential"] = mycredential params["type"] = "Slice" -params["hrn"] = "mytestslice" +params["hrn"] = SLICENAME rval,response = do_method("sa", "Resolve", params) if rval == 0: - print "Asking for slice credential for mytestslice"; + print "Asking for slice credential for " + SLICENAME myslice = response["value"] myuuid = myslice["uuid"] params = {} diff --git a/protogeni/test/test-common.py b/protogeni/test/test-common.py index cde89ea08b131de65b284fc2f22cfc8be0da1594..6f4f7b42b20607b977b77e0ab2b2289b799c773d 100644 --- a/protogeni/test/test-common.py +++ b/protogeni/test/test-common.py @@ -21,6 +21,8 @@ CERTIFICATE = HOME + "/.ssl/encrypted.pem" PASSPHRASEFILE = HOME + "/.ssl/password" passphrase = "" +SLICENAME = "mytestslice" + cert = X509.load_cert( CERTIFICATE ) # XMLRPC server: use www.emulab.net for the clearinghouse, and diff --git a/protogeni/test/tuntest.py b/protogeni/test/tuntest.py index e1279490ef02fe10bd20f9cfee58c083aba482f1..5b4ea0223b40d1287f1b3c306800e37934700869 100755 --- a/protogeni/test/tuntest.py +++ b/protogeni/test/tuntest.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # # EMULAB-COPYRIGHT -# Copyright (c) 2004, 2008 University of Utah and the Flux Group. +# Copyright (c) 2008-2009 University of Utah and the Flux Group. # All rights reserved. # # Permission to use, copy, modify and distribute this software is hereby @@ -84,17 +84,17 @@ print "Got my SA credential" params = {} params["credential"] = mycredential params["type"] = "Slice" -params["hrn"] = "mytestslice" +params["hrn"] = SLICENAME rval,response = do_method("sa", "Resolve", params) if rval: # # Create a slice. # - print "Creating new slice called mytestslice"; + print "Creating new slice called " + SLICENAME params = {} params["credential"] = mycredential params["type"] = "Slice" - params["hrn"] = "mytestslice" + params["hrn"] = SLICENAME rval,response = do_method("sa", "Register", params) if rval: Fatal("Could not create new slice") @@ -106,7 +106,7 @@ else: # # Get the slice credential. # - print "Asking for slice credential for mytestslice"; + print "Asking for slice credential for " + SLICENAME myslice = response["value"] myuuid = myslice["uuid"] params = {}