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-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
435cb834
Commit
435cb834
authored
May 09, 2016
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More error checking for stuff we do not support (cannot convert to
genilib).
parent
5bff9dfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
apt/nsgenilib.py.in
apt/nsgenilib.py.in
+22
-1
No files found.
apt/nsgenilib.py.in
View file @
435cb834
...
...
@@ -469,12 +469,20 @@ for child in tree.getroot():
vnode
=
row
.
find
(
"vnode"
).
text
vname
=
row
.
find
(
"vname"
).
text
cmd
=
row
.
find
(
"arguments"
).
text
if
otype
==
"4"
and
etype
==
"1"
and
time
==
"0"
:
if
otype
==
"4"
:
if
etype
!=
"1"
and
etype
!=
"20"
:
Fatal
(
"Unsupported program object event for "
+
vname
)
pass
if
time
!=
"0"
:
Fatal
(
"Unsupported program object event time!=0 for "
+
vname
)
pass
foo
=
re
.
match
(
r
"^COMMAND=\((.*) ; /usr/local/etc/emulab.*\)"
,
cmd
);
if
foo
:
parser
=
HTMLParser
.
HTMLParser
()
cmd
=
parser
.
unescape
(
foo
.
group
(
1
));
nodes
[
vnode
].
addService
(
RSpec
.
Execute
(
"sh"
,
cmd
))
else
:
Fatal
(
"Unsupported event type for "
+
vname
)
pass
pass
#
...
...
@@ -505,6 +513,19 @@ for child in tree.getroot():
raw
.
attrib
[
"attrvalue"
]
=
val
nodes
[
vname
].
addRawElement
(
raw
)
pass
if
child
.
tag
==
"virt_trafgens"
:
Fatal
(
"Trafgens are not supported anymore"
)
pass
if
child
.
tag
in
[
"virt_lan_settings"
,
"virt_lan_member_settings"
,
"virt_routes"
,
"virt_node_disks"
,
"virt_user_environment"
,
"virt_firewalls"
,
"firewall_rules"
,
"virt_tiptunnels"
,
"elabinelab_attributes"
,
"virt_paths"
,
"experiment_blobs"
,
"virt_blobs"
,
"virt_client_service_ctl"
,
"virt_client_service_hooks"
,
"virt_client_service_opts"
,
"virt_address_allocation"
]:
Fatal
(
"Unsupported use of "
+
child
.
tag
)
pass
pass
pc
.
printRequestRSpec
(
rspec
)
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