Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-stable
Commits
96faef13
Commit
96faef13
authored
Aug 03, 2018
by
David Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --port arg to script_wrapper.py.
parent
499aacc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
xmlrpc/script_wrapper.py.in
xmlrpc/script_wrapper.py.in
+9
-4
No files found.
xmlrpc/script_wrapper.py.in
View file @
96faef13
#! /usr/bin/env python
#
# Copyright (c) 2004-201
6
University of Utah and the Flux Group.
# Copyright (c) 2004-201
8
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -47,8 +47,9 @@ PACKAGE_VERSION = 0.1
XMLRPC_SERVER
=
"@BOSSNODE@"
XMLRPC_PORT
=
3069
# User supplied server name
.
# User supplied server name
/port
xmlrpc_server
=
XMLRPC_SERVER
xmlrpc_port
=
XMLRPC_PORT
# User supplied login ID to use (overrides env variable USER if exists).
login_id
=
os
.
environ
[
"USER"
]
...
...
@@ -195,6 +196,7 @@ def wrapperoptions():
print
"Wrapper Options:"
print
" --help Display this help message"
print
" --server Set the server hostname"
print
" --port Set the server port"
print
" --login Set the login id (defaults to $USER)"
print
" --cert Specify the path to your testbed SSL certificate"
print
" --debug Turn on semi-useful debugging"
...
...
@@ -219,7 +221,7 @@ def do_method(module, method, params):
from
M2Crypto.m2xmlrpclib
import
SSL_Transport
from
M2Crypto
import
SSL
URI
=
"https://"
+
xmlrpc_server
+
":"
+
str
(
XMLRPC_PORT
)
+
SERVER_PATH
URI
=
"https://"
+
xmlrpc_server
+
":"
+
str
(
xmlrpc_port
)
+
SERVER_PATH
ctx
=
SSL
.
Context
(
"sslv23"
)
ctx
.
load_cert
(
certificate
,
certificate
)
...
...
@@ -3049,7 +3051,7 @@ for arg in sys.argv[1:]:
try
:
# Parse the options,
opts
,
req_args
=
getopt
.
getopt
(
wrapper_argv
[
0
:],
""
,
[
"help"
,
"server="
,
"login="
,
"cert="
,
"admin"
,
"devel"
,
[
"help"
,
"server="
,
"port="
,
"login="
,
"cert="
,
"admin"
,
"devel"
,
"develuser="
,
"impotent"
,
"debug"
])
# ... act on them appropriately, and
for
opt
,
val
in
opts
:
...
...
@@ -3060,6 +3062,9 @@ try:
elif
opt
==
"--server"
:
xmlrpc_server
=
val
pass
elif
opt
==
"--port"
:
xmlrpc_port
=
int
(
val
)
pass
elif
opt
==
"--login"
:
login_id
=
val
pass
...
...
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