Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
79046927
Commit
79046927
authored
Jan 13, 2009
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the slicename a global in test-common.py so that it can
overridden in the .protogeni-config.py file.
parent
fd2ecae3
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
39 additions
and
37 deletions
+39
-37
protogeni/test/binduser.py
protogeni/test/binduser.py
+4
-4
protogeni/test/createslice.py
protogeni/test/createslice.py
+4
-4
protogeni/test/createsliver.py
protogeni/test/createsliver.py
+5
-5
protogeni/test/deleteslice.py
protogeni/test/deleteslice.py
+2
-2
protogeni/test/deletesliver.py
protogeni/test/deletesliver.py
+2
-2
protogeni/test/getticket.py
protogeni/test/getticket.py
+6
-6
protogeni/test/linktest.py
protogeni/test/linktest.py
+6
-6
protogeni/test/shutdownslice.py
protogeni/test/shutdownslice.py
+3
-3
protogeni/test/test-common.py
protogeni/test/test-common.py
+2
-0
protogeni/test/tuntest.py
protogeni/test/tuntest.py
+5
-5
No files found.
protogeni/test/binduser.py
View file @
79046927
#! /usr/bin/env python
#! /usr/bin/env python
#
#
# EMULAB-COPYRIGHT
# EMULAB-COPYRIGHT
# Copyright (c) 200
4,
200
8
University of Utah and the Flux Group.
# Copyright (c) 200
8-
200
9
University of Utah and the Flux Group.
# All rights reserved.
# All rights reserved.
#
#
# Permission to use, copy, modify and distribute this software is hereby
# Permission to use, copy, modify and distribute this software is hereby
...
@@ -36,7 +36,7 @@ if rval:
...
@@ -36,7 +36,7 @@ if rval:
Fatal
(
"Could not get my credential"
)
Fatal
(
"Could not get my credential"
)
pass
pass
mycredential
=
response
[
"value"
]
mycredential
=
response
[
"value"
]
print
"Got my SA credential, looking up
mytestslice"
print
"Got my SA credential, looking up
"
+
SLICENAME
#print str(mycredential);
#print str(mycredential);
#
#
...
@@ -45,7 +45,7 @@ print "Got my SA credential, looking up mytestslice"
...
@@ -45,7 +45,7 @@ print "Got my SA credential, looking up mytestslice"
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
if
rval
:
if
rval
:
#
#
...
@@ -57,7 +57,7 @@ else:
...
@@ -57,7 +57,7 @@ else:
#
#
# Get the slice credential.
# Get the slice credential.
#
#
print
"Asking for slice credential for
mytestslice"
;
print
"Asking for slice credential for
"
+
SLICENAME
myslice
=
response
[
"value"
]
myslice
=
response
[
"value"
]
myuuid
=
myslice
[
"uuid"
]
myuuid
=
myslice
[
"uuid"
]
params
=
{}
params
=
{}
...
...
protogeni/test/createslice.py
View file @
79046927
#! /usr/bin/env python
#! /usr/bin/env python
#
#
# EMULAB-COPYRIGHT
# EMULAB-COPYRIGHT
# Copyright (c) 200
4,
200
8
University of Utah and the Flux Group.
# Copyright (c) 200
8-
200
9
University of Utah and the Flux Group.
# All rights reserved.
# All rights reserved.
#
#
# Permission to use, copy, modify and distribute this software is hereby
# Permission to use, copy, modify and distribute this software is hereby
...
@@ -45,7 +45,7 @@ print "Got my SA credential"
...
@@ -45,7 +45,7 @@ print "Got my SA credential"
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
if
rval
==
0
:
if
rval
==
0
:
myslice
=
response
[
"value"
]
myslice
=
response
[
"value"
]
...
@@ -65,11 +65,11 @@ if rval == 0:
...
@@ -65,11 +65,11 @@ if rval == 0:
#
#
# Create a slice.
# Create a slice.
#
#
print
"Creating new slice called
mytestslice"
;
print
"Creating new slice called
"
+
SLICENAME
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Register"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Register"
,
params
)
if
rval
:
if
rval
:
Fatal
(
"Could not get my slice"
)
Fatal
(
"Could not get my slice"
)
...
...
protogeni/test/createsliver.py
View file @
79046927
#! /usr/bin/env python
#! /usr/bin/env python
#
#
# EMULAB-COPYRIGHT
# EMULAB-COPYRIGHT
# Copyright (c) 200
4,
200
8
University of Utah and the Flux Group.
# Copyright (c) 200
8-
200
9
University of Utah and the Flux Group.
# All rights reserved.
# All rights reserved.
#
#
# Permission to use, copy, modify and distribute this software is hereby
# Permission to use, copy, modify and distribute this software is hereby
...
@@ -57,17 +57,17 @@ mykeys = response["value"]
...
@@ -57,17 +57,17 @@ mykeys = response["value"]
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
if
rval
:
if
rval
:
#
#
# Create a slice.
# Create a slice.
#
#
print
"Creating new slice called
mytestslice"
;
print
"Creating new slice called
"
+
SLICENAME
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Register"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Register"
,
params
)
if
rval
:
if
rval
:
Fatal
(
"Could not create new slice"
)
Fatal
(
"Could not create new slice"
)
...
@@ -79,7 +79,7 @@ else:
...
@@ -79,7 +79,7 @@ else:
#
#
# Get the slice credential.
# Get the slice credential.
#
#
print
"Asking for slice credential for
mytestslice"
;
print
"Asking for slice credential for
"
+
SLICENAME
myslice
=
response
[
"value"
]
myslice
=
response
[
"value"
]
myuuid
=
myslice
[
"uuid"
]
myuuid
=
myslice
[
"uuid"
]
params
=
{}
params
=
{}
...
...
protogeni/test/deleteslice.py
View file @
79046927
#! /usr/bin/env python
#! /usr/bin/env python
#
#
# EMULAB-COPYRIGHT
# EMULAB-COPYRIGHT
# Copyright (c) 200
4,
200
8
University of Utah and the Flux Group.
# Copyright (c) 200
8-
200
9
University of Utah and the Flux Group.
# All rights reserved.
# All rights reserved.
#
#
# Permission to use, copy, modify and distribute this software is hereby
# Permission to use, copy, modify and distribute this software is hereby
...
@@ -45,7 +45,7 @@ print "Got my SA credential"
...
@@ -45,7 +45,7 @@ print "Got my SA credential"
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
if
rval
==
0
:
if
rval
==
0
:
myslice
=
response
[
"value"
]
myslice
=
response
[
"value"
]
...
...
protogeni/test/deletesliver.py
View file @
79046927
#! /usr/bin/env python
#! /usr/bin/env python
#
#
# EMULAB-COPYRIGHT
# EMULAB-COPYRIGHT
# Copyright (c) 200
4,
200
8
University of Utah and the Flux Group.
# Copyright (c) 200
8-
200
9
University of Utah and the Flux Group.
# All rights reserved.
# All rights reserved.
#
#
# Permission to use, copy, modify and distribute this software is hereby
# Permission to use, copy, modify and distribute this software is hereby
...
@@ -45,7 +45,7 @@ print "Got my SA credential. Looking for slice ..."
...
@@ -45,7 +45,7 @@ print "Got my SA credential. Looking for slice ..."
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
if
rval
:
if
rval
:
Fatal
(
"Slice does not exist"
)
Fatal
(
"Slice does not exist"
)
...
...
protogeni/test/getticket.py
View file @
79046927
#! /usr/bin/env python
#! /usr/bin/env python
#
#
# EMULAB-COPYRIGHT
# EMULAB-COPYRIGHT
# Copyright (c) 200
4,
200
8
University of Utah and the Flux Group.
# Copyright (c) 200
8-
200
9
University of Utah and the Flux Group.
# All rights reserved.
# All rights reserved.
#
#
# Permission to use, copy, modify and distribute this software is hereby
# Permission to use, copy, modify and distribute this software is hereby
...
@@ -37,7 +37,7 @@ if rval:
...
@@ -37,7 +37,7 @@ if rval:
Fatal
(
"Could not get my credential"
)
Fatal
(
"Could not get my credential"
)
pass
pass
mycredential
=
response
[
"value"
]
mycredential
=
response
[
"value"
]
print
"Got my SA credential, looking up
mytestslice"
print
"Got my SA credential, looking up
"
+
SLICENAME
#print str(mycredential);
#print str(mycredential);
#
#
...
@@ -46,17 +46,17 @@ print "Got my SA credential, looking up mytestslice"
...
@@ -46,17 +46,17 @@ print "Got my SA credential, looking up mytestslice"
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
if
rval
:
if
rval
:
#
#
# Create a slice.
# Create a slice.
#
#
print
"Creating new slice called
mytestslice"
;
print
"Creating new slice called
"
+
SLICENAME
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Register"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Register"
,
params
)
if
rval
:
if
rval
:
Fatal
(
"Could not create new slice"
)
Fatal
(
"Could not create new slice"
)
...
@@ -68,7 +68,7 @@ else:
...
@@ -68,7 +68,7 @@ else:
#
#
# Get the slice credential.
# Get the slice credential.
#
#
print
"Asking for slice credential for
mytestslice"
;
print
"Asking for slice credential for
"
+
SLICENAME
myslice
=
response
[
"value"
]
myslice
=
response
[
"value"
]
myuuid
=
myslice
[
"uuid"
]
myuuid
=
myslice
[
"uuid"
]
params
=
{}
params
=
{}
...
...
protogeni/test/linktest.py
View file @
79046927
#! /usr/bin/env python
#! /usr/bin/env python
#
#
# EMULAB-COPYRIGHT
# EMULAB-COPYRIGHT
# Copyright (c) 200
4,
200
8
University of Utah and the Flux Group.
# Copyright (c) 200
8-
200
9
University of Utah and the Flux Group.
# All rights reserved.
# All rights reserved.
#
#
# Permission to use, copy, modify and distribute this software is hereby
# Permission to use, copy, modify and distribute this software is hereby
...
@@ -57,17 +57,17 @@ mykeys = response["value"]
...
@@ -57,17 +57,17 @@ mykeys = response["value"]
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
if
rval
:
if
rval
:
#
#
# Create a slice.
# Create a slice.
#
#
print
"Creating new slice called
mytestslice"
;
print
"Creating new slice called
"
+
SLICENAME
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Register"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Register"
,
params
)
if
rval
:
if
rval
:
Fatal
(
"Could not create new slice"
)
Fatal
(
"Could not create new slice"
)
...
@@ -79,7 +79,7 @@ else:
...
@@ -79,7 +79,7 @@ else:
#
#
# Get the slice credential.
# Get the slice credential.
#
#
print
"Asking for slice credential for
mytestslice"
;
print
"Asking for slice credential for
"
+
SLICENAME
myslice
=
response
[
"value"
]
myslice
=
response
[
"value"
]
myuuid
=
myslice
[
"uuid"
]
myuuid
=
myslice
[
"uuid"
]
params
=
{}
params
=
{}
...
@@ -130,7 +130,7 @@ if rval:
...
@@ -130,7 +130,7 @@ if rval:
pass
pass
ticket
=
response
[
"value"
]
ticket
=
response
[
"value"
]
print
"Got a ticket from the CM. Redeeming the ticket ..."
print
"Got a ticket from the CM. Redeeming the ticket ..."
print
str
(
response
[
"output"
])
#
print str(response["output"])
#
#
# Create the sliver.
# Create the sliver.
...
...
protogeni/test/shutdownslice.py
View file @
79046927
#! /usr/bin/env python
#! /usr/bin/env python
#
#
# EMULAB-COPYRIGHT
# EMULAB-COPYRIGHT
# Copyright (c) 200
4,
200
8
University of Utah and the Flux Group.
# Copyright (c) 200
8-
200
9
University of Utah and the Flux Group.
# All rights reserved.
# All rights reserved.
#
#
# Permission to use, copy, modify and distribute this software is hereby
# Permission to use, copy, modify and distribute this software is hereby
...
@@ -44,10 +44,10 @@ print "Got my SA credential"
...
@@ -44,10 +44,10 @@ print "Got my SA credential"
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
if
rval
==
0
:
if
rval
==
0
:
print
"Asking for slice credential for
mytestslice"
;
print
"Asking for slice credential for
"
+
SLICENAME
myslice
=
response
[
"value"
]
myslice
=
response
[
"value"
]
myuuid
=
myslice
[
"uuid"
]
myuuid
=
myslice
[
"uuid"
]
params
=
{}
params
=
{}
...
...
protogeni/test/test-common.py
View file @
79046927
...
@@ -21,6 +21,8 @@ CERTIFICATE = HOME + "/.ssl/encrypted.pem"
...
@@ -21,6 +21,8 @@ CERTIFICATE = HOME + "/.ssl/encrypted.pem"
PASSPHRASEFILE
=
HOME
+
"/.ssl/password"
PASSPHRASEFILE
=
HOME
+
"/.ssl/password"
passphrase
=
""
passphrase
=
""
SLICENAME
=
"mytestslice"
cert
=
X509
.
load_cert
(
CERTIFICATE
)
cert
=
X509
.
load_cert
(
CERTIFICATE
)
# XMLRPC server: use www.emulab.net for the clearinghouse, and
# XMLRPC server: use www.emulab.net for the clearinghouse, and
...
...
protogeni/test/tuntest.py
View file @
79046927
#! /usr/bin/env python
#! /usr/bin/env python
#
#
# EMULAB-COPYRIGHT
# EMULAB-COPYRIGHT
# Copyright (c) 200
4,
200
8
University of Utah and the Flux Group.
# Copyright (c) 200
8-
200
9
University of Utah and the Flux Group.
# All rights reserved.
# All rights reserved.
#
#
# Permission to use, copy, modify and distribute this software is hereby
# Permission to use, copy, modify and distribute this software is hereby
...
@@ -84,17 +84,17 @@ print "Got my SA credential"
...
@@ -84,17 +84,17 @@ print "Got my SA credential"
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
if
rval
:
if
rval
:
#
#
# Create a slice.
# Create a slice.
#
#
print
"Creating new slice called
mytestslice"
;
print
"Creating new slice called
"
+
SLICENAME
params
=
{}
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
"mytestslice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Register"
,
params
)
rval
,
response
=
do_method
(
"sa"
,
"Register"
,
params
)
if
rval
:
if
rval
:
Fatal
(
"Could not create new slice"
)
Fatal
(
"Could not create new slice"
)
...
@@ -106,7 +106,7 @@ else:
...
@@ -106,7 +106,7 @@ else:
#
#
# Get the slice credential.
# Get the slice credential.
#
#
print
"Asking for slice credential for
mytestslice"
;
print
"Asking for slice credential for
"
+
SLICENAME
myslice
=
response
[
"value"
]
myslice
=
response
[
"value"
]
myuuid
=
myslice
[
"uuid"
]
myuuid
=
myslice
[
"uuid"
]
params
=
{}
params
=
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment