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
5f984a6d
Commit
5f984a6d
authored
Jul 11, 2016
by
Leigh B Stoller
Browse files
Minor bug fix to DeleteSliver(); unlock slice on errors.
parent
1ba99a77
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniCMV2.pm.in
View file @
5f984a6d
...
...
@@ -645,6 +645,7 @@ sub DeleteSliver($)
my
$
authority
=
GeniCertificate
->
LoadFromFile
($
EMULAB_PEMFILE
);
if
(
!defined($authority)) {
print
STDERR
" Could not load $EMULAB_PEMFILE
\n
"
;
$
slice
->
UnLock
();
return
GeniResponse
->
Create
(
GENIRESPONSE_ERROR
);
}
...
...
@@ -652,12 +653,16 @@ sub DeleteSliver($)
#
We
need
the
user
to
sign
the
new
ticket
to
.
#
my
$
user
=
GeniCM
::
CreateUserFromCertificate
($
credential
);
return
$
user
if
(
GeniResponse
::
IsResponse
($
user
));
if
(
GeniResponse
::
IsResponse
($
user
))
{
$
slice
->
UnLock
();
return
$
user
;
}
my
$
response
=
GeniCM
::
DeleteSliverAux
($
credential
,
$
impotent
,
1
);
return
$
response
if
(
GeniResponse
::
IsResponse
($
response
));
if
(
GeniResponse
::
IsResponse
($
response
))
{
$
slice
->
UnLock
();
return
$
response
;
}
#
#
In
the
v2
API
,
return
a
new
ticket
for
the
resources
...
...
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