Skip to content
GitLab
Menu
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
a773a3c0
Commit
a773a3c0
authored
Sep 08, 2008
by
Leigh B. Stoller
Browse files
Checkpoint.
parent
f506bd90
Changes
3
Hide whitespace changes
Inline
Side-by-side
protogeni/xmlrpc/GNUmakefile.in
View file @
a773a3c0
...
...
@@ -25,13 +25,14 @@ all: protogeni-cm.pl protogeni-ch.pl protogeni-sa.pl Genixmlrpc.pm \
include $(TESTBED_SRCDIR)/GNUmakerules
install: $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-sa.pl \
$(INSTALL_DIR)/protogeni/xmlrpc/protogeni-cm.pl \
$(INSTALL_DIR)/protogeni/xmlrpc/protogeni-ch.pl \
$(INSTALL_LIBDIR)/Genixmlrpc.pm \
install-libs: $(INSTALL_LIBDIR)/Genixmlrpc.pm \
$(INSTALL_LIBDIR)/GeniResponse.pm \
$(INSTALL_DIR)/opsdir/lib/Genixmlrpc.pm \
$(INSTALL_DIR)/opsdir/lib/GeniResponse.pm
install-scripts: $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-sa.pl \
$(INSTALL_DIR)/protogeni/xmlrpc/protogeni-cm.pl \
$(INSTALL_DIR)/protogeni/xmlrpc/protogeni-ch.pl
$(SUDO) chown root $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-sa.pl
$(SUDO) chmod u+s $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-sa.pl
$(SUDO) chown root $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-ch.pl
...
...
@@ -39,6 +40,8 @@ install: $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-sa.pl \
$(SUDO) chown root $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-cm.pl
$(SUDO) chmod u+s $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-cm.pl
install: install-libs install-scripts
control-install:
clean:
...
...
protogeni/xmlrpc/Genixmlrpc.pm.in
View file @
a773a3c0
...
...
@@ -70,11 +70,6 @@ sub Context($$;$$)
bless($self, $class);
return $self;
}
# accessors
sub field($$) { return ($_[0]->{$_[1]}); }
sub certificate($) { return field($_[0], "certificate"); }
sub keyfile($) { return field($_[0], "keyfile"); }
sub password($) { return field($_[0], "password"); }
#
# This is a context for a user. Used only on Emulab bossnode. Use the
...
...
@@ -88,8 +83,19 @@ sub UserContext($$)
my $pkcs12 = $user->HomeDir() . "/.ssl/encrypted.p12";
$user->SSLPassPhrase(1, \$password);
return Genixmlrpc->Context($pkcs12, $pkcs12, $password);
my $self = {"certificate" => $pkcs12,
"keyfile" => $pkcs12,
"password" => $password,
"user" => $user};
bless($self, $class);
return $self;
}
# accessors
sub field($$) { return ($_[0]->{$_[1]}); }
sub certificate($) { return field($_[0], "certificate"); }
sub keyfile($) { return field($_[0], "keyfile"); }
sub password($) { return field($_[0], "password"); }
sub user($) { return field($_[0], "user"); }
#
# Context for making calls.
...
...
protogeni/xmlrpc/protogeni-cm.pl.in
View file @
a773a3c0
...
...
@@ -119,11 +119,11 @@ my $responder = Frontier::Responder->new( "methods" => {
"
Resolve
"
=>
\
&
GeniCM::
Resolve
,
"
DiscoverResources
"
=>
\
&
GeniCM::
DiscoverResources
,
"
GetTicket
"
=>
\
&
GeniCM::
GetTicket
,
"
ReleaseTicket
"
=>
\
&
GeniCM::
ReleaseTicket
,
"
RedeemTicket
"
=>
\
&
GeniCM::
RedeemTicket
,
"
StartSliver
"
=>
\
&
GeniCM::
StartSliver
,
"
DeleteSliver
"
=>
\
&
GeniCM::
DeleteSliver
,
"
BindUser
"
=>
\
&
GeniCM::
BindUser
,
"
UnBindUser
"
=>
\
&
GeniCM::
UnBindUser
,
"
DeleteSlice
"
=>
\
&
GeniCM::
DeleteSlice
,
},
);
...
...
@@ -134,7 +134,7 @@ my $response = $responder->{'_decode'}->serve($request,
# Terminate the log capture so that we can print the response to STDOUT
# for the web server.
#
#
print STDERR "\n\n" . $response;
print
STDERR
"
\n\n
"
.
$response
;
LogEnd
();
...
...
Write
Preview
Supports
Markdown
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