Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
33c2148e
Commit
33c2148e
authored
Jan 25, 2010
by
Srikanth Chikkulapelly
Browse files
handling admin credentials issued by CM, to start/shutdown/restart any given slice by slice urn.
parent
9e3244f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniCMV2.pm.in
View file @
33c2148e
...
...
@@ -558,6 +558,7 @@ sub SliverAction($$$$)
(
defined
($
slice_urn
)
||
defined
($
sliver_urns
))))
{
return
GeniResponse
->
MalformedArgsResponse
(
"Missing arguments"
);
}
my
$
credential
=
CheckCredentials
($
credentials
);
return
$
credential
if
(
GeniResponse
::
IsResponse
($
credential
));
...
...
@@ -571,6 +572,21 @@ sub SliverAction($$$$)
#
For
now
,
only
allow
top
level
aggregate
or
the
slice
#
my
($
slice
,
$
aggregate
)
=
Credential2SliceAggregate
($
credential
);
#
find
out
the
component
manager
URN
.
my
$
cm_urn
=
GeniHRN
::
Generate
($
OURDOMAIN
,
"authority"
,
"cm"
);
if
((
!defined($slice)) && ($credential->target_urn() =~ "authority")) {
#
administrative
credentials
are
presented
.
if
($
cm_urn
!= $credential->target_urn() {
return
GeniResponse
->
Create
(
GENIRESPONSE_FORBIDDEN
(),
undef
,
"Credential target do not match CM URN"
);
}
if
(
!defined($slice_urn)){
return
GeniResponse
->
MalformedArgsResponse
(
"Missing arguments"
);
}
$
slice
=
GeniSlice
->
Lookup
($
slice_urn
)
}
if
(
! (defined($slice) && defined($aggregate))) {
return
GeniResponse
->
Create
(
GENIRESPONSE_BADARGS
,
undef
,
"No slice or aggregate here"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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