Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
08cec6ef
Commit
08cec6ef
authored
Nov 09, 2010
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use routines in test-common to get self and slice credentials.
parent
519ba19b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
33 deletions
+8
-33
protogeni/test/createsliver.py
protogeni/test/createsliver.py
+8
-33
No files found.
protogeni/test/createsliver.py
View file @
08cec6ef
...
...
@@ -68,45 +68,20 @@ mykeys = response["value"]
if
debug
:
print
str
(
mykeys
)
#
# Lookup slice.
# Lookup slice
and get credential
.
#
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Resolve"
,
params
)
if
rval
:
#
# Create a slice.
#
print
"Creating new slice called "
+
SLICENAME
params
=
{}
params
[
"credential"
]
=
mycredential
params
[
"type"
]
=
"Slice"
params
[
"hrn"
]
=
SLICENAME
rval
,
response
=
do_method
(
"sa"
,
"Register"
,
params
)
if
rval
:
Fatal
(
"Could not create new slice"
)
pass
myslice
=
response
[
"value"
]
print
"New slice created"
pass
else
:
#
# Get the slice credential.
#
print
"Asking for slice credential for "
+
SLICENAME
myslice
=
response
[
"value"
]
myslice
=
get_slice_credential
(
myslice
,
mycredential
)
print
"Got the slice credential"
pass
myslice
=
resolve_slice
(
SLICEURN
,
mycredential
)
print
"Asking for slice credential for "
+
SLICENAME
slicecredential
=
get_slice_credential
(
myslice
,
mycredential
)
print
"Got the slice credential"
#
# Create the sliver.
#
print
"Creating the Sliver ..."
params
=
{}
params
[
"credentials"
]
=
(
myslice
,)
params
[
"credentials"
]
=
(
slicecredential
,)
params
[
"slice_urn"
]
=
SLICEURN
params
[
"rspec"
]
=
rspec
params
[
"keys"
]
=
mykeys
...
...
@@ -117,5 +92,5 @@ if rval:
pass
sliver
,
manifest
=
response
[
"value"
]
print
"Created the sliver"
print
str
(
manifest
)
#
print str(manifest)
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