Commit 79046927 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Make the slicename a global in test-common.py so that it can

overridden in the .protogeni-config.py file.
parent fd2ecae3
#! /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 = {}
......
#! /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")
......
#! /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 = {}
......
#! /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"]
......
#! /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")
......
#! /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 = {}
......
#! /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.
......
#! /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 = {}
......
......@@ -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
......
#! /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 = {}
......
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