Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-stable
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
emulab
emulab-stable
Commits
7b0a8bcb
Commit
7b0a8bcb
authored
Aug 30, 2005
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tipacl routine to the script_wrapper to return and format the
tipacl data. Sends it to stdout.
parent
c48938c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
3 deletions
+55
-3
xmlrpc/emulabserver.py.in
xmlrpc/emulabserver.py.in
+1
-2
xmlrpc/script_wrapper.py.in
xmlrpc/script_wrapper.py.in
+54
-1
No files found.
xmlrpc/emulabserver.py.in
View file @
7b0a8bcb
...
...
@@ -2994,8 +2994,7 @@ class node:
}
return
EmulabResponse
(
RESPONSE_SUCCESS
,
value
=
result
,
output
=
str
(
result
))
value
=
result
)
def
sshdescription
(
self
,
version
,
argdict
):
if
version
!=
self
.
VERSION
:
...
...
xmlrpc/script_wrapper.py.in
View file @
7b0a8bcb
...
...
@@ -125,6 +125,8 @@ API = {
"help"
:
"Upload code to a mote"
},
"expwait"
:
{
"func"
:
"expwait"
,
"help"
:
"Wait for experiment to reach a state"
},
"tipacl"
:
{
"func"
:
"tipacl"
,
"help"
:
"Get console acl"
},
};
#
...
...
@@ -1695,6 +1697,57 @@ class expwait:
return
pass
#
# tipacl (get console acl goo)
#
class
tipacl
:
def
__init__
(
self
,
argv
=
None
):
self
.
argv
=
argv
;
return
def
apply
(
self
):
try
:
opts
,
req_args
=
getopt
.
getopt
(
self
.
argv
,
""
,
[
"help"
]);
pass
except
getopt
.
error
,
e
:
print
e
.
args
[
0
]
self
.
usage
();
return
-
1
;
params
=
{};
for
opt
,
val
in
opts
:
if
opt
in
(
"-h"
,
"--help"
):
self
.
usage
()
return
0
pass
pass
# Do this after so --help is seen.
if
len
(
req_args
)
!=
1
:
self
.
usage
();
return
-
1
;
params
[
"node"
]
=
req_args
[
0
];
rval
,
response
=
do_method
(
"node"
,
"console"
,
params
);
if
rval
==
0
:
for
key
in
response
[
"value"
]:
val
=
response
[
"value"
][
key
];
print
"%s: %s"
%
(
key
,
val
)
pass
pass
return
rval
;
def
usage
(
self
):
print
"tipacl node"
;
print
"where:"
;
print
" node - Node to get tipacl data for (pcXXX)"
;
wrapperoptions
();
return
pass
#
# Process program arguments. There are two ways we could be invoked.
# 1) as the wrapper, with the first required argument the name of the script.
...
...
@@ -1791,7 +1844,7 @@ else:
token
=
sys
.
argv
[
len
(
wrapper_argv
)
+
1
];
if
not
API
.
has_key
(
token
):
print
"Unknown script command
!"
print
"Unknown script command
, "
,
token
usage
();
sys
.
exit
(
-
1
);
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