Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
onelab
myslicelib
Commits
0792a233
Commit
0792a233
authored
Mar 16, 2018
by
Loic Baron
Browse files
fix: omf parser get_location
parent
8539b9d9
Pipeline
#2133
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
myslicelib/util/sfaparser/omf.py
View file @
0792a233
...
...
@@ -63,11 +63,8 @@ class Omf(SfaParser):
for
element
in
list
(
node
):
if
'hardware_type'
in
element
.
tag
:
resource
[
'hardware_types'
].
append
(
element
.
attrib
[
'name'
])
if
'location'
in
element
.
tag
:
resource
[
'location'
]
=
element
.
attrib
else
:
resource
[
'location'
]
=
self
.
get_location
(
node
.
attrib
[
'component_id'
])
if
'available'
in
element
.
tag
:
resource
[
'available'
]
=
element
.
attrib
[
'now'
]
...
...
@@ -75,7 +72,10 @@ class Omf(SfaParser):
if
'services'
in
element
.
tag
:
login
=
element
.
find
(
'{http://www.geni.net/resources/rspec/3}login'
)
resource
[
'services'
].
append
({
'login'
:
login
.
attrib
})
if
'location'
not
in
resource
or
resource
[
'location'
]
is
None
:
resource
[
'location'
]
=
self
.
get_location
(
node
.
attrib
[
'component_id'
])
if
len
(
resource
[
'hardware_types'
])
==
0
:
resource
[
'hardware_types'
].
append
(
'PC-Icarus'
)
...
...
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