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
a6abc538
Commit
a6abc538
authored
Jun 07, 2012
by
Leigh B Stoller
Browse files
Add CreateImage() to the AM, which just calls into CMV2.
parent
750be519
Changes
2
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniAM.pm.in
View file @
a6abc538
...
...
@@ -659,5 +659,30 @@ sub Shutdown()
return GeniResponse->Create(GENIRESPONSE_SUCCESS, $coder->boolean(1));
}
sub CreateImage()
{
my ($slice_urn, $imagename, $sliver_urn, $credentials, $options) = @_;
if (! defined($slice_urn) || ! defined($credentials) ||
! defined($sliver_urn) || ! defined($imagename)
|| (! defined($options) && $API_VERSION > 1)) {
return GeniResponse->MalformedArgsResponse("Missing arguments");
}
my $args = {
'
slice_urn
' => $slice_urn,
'
sliver_urn
' => $sliver_urn,
'
imagename
' => $imagename,
'
credentials
' => $credentials
};
my $response = GeniCMV2::CreateImage($args);
if (GeniResponse::IsError($response)) {
return $response;
}
# Return an XML-RPC boolean
my $coder = Frontier::RPC2->new();
return GeniResponse->Create(GENIRESPONSE_SUCCESS, $coder->boolean(1));
}
# _Always_ make sure that this 1 is at the end of the file...
1;
protogeni/xmlrpc/geni-am.pm.in
View file @
a6abc538
#!/usr/bin/perl -w
#
# GENIPUBLIC-COPYRIGHT
# Copyright (c) 2008-201
0
University of Utah and the Flux Group.
# Copyright (c) 2008-201
2
University of Utah and the Flux Group.
# All rights reserved.
#
use
strict
;
...
...
@@ -38,6 +38,7 @@ if ($GENI_VERSION eq "1.0" || $GENI_VERSION eq "2.0") {
"
SliverStatus
"
=>
\
&
GeniAM::
SliverStatus
,
"
RenewSliver
"
=>
\
&
GeniAM::
RenewSliver
,
"
Shutdown
"
=>
\
&
GeniAM::
Shutdown
,
"
CreateImage
"
=>
\
&
GeniAM::
CreateImage
,
};
}
...
...
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