Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
106
Merge Requests
106
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
86e8d3d0
Commit
86e8d3d0
authored
Jun 16, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimise XML tree analysis (thanks to Nicolas Delaby)
parent
0dc0361e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
19 deletions
+17
-19
master/bt5/vifib_base/DocumentTemplateItem/SoftwareInstance.py
...r/bt5/vifib_base/DocumentTemplateItem/SoftwareInstance.py
+8
-9
master/bt5/vifib_base/bt/revision
master/bt5/vifib_base/bt/revision
+1
-1
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+8
-9
No files found.
master/bt5/vifib_base/DocumentTemplateItem/SoftwareInstance.py
View file @
86e8d3d0
...
...
@@ -51,13 +51,12 @@ class SoftwareInstance(Item):
xml
=
self
.
getSlaXml
()
if
xml
is
not
None
and
xml
!=
''
:
tree
=
etree
.
fromstring
(
xml
.
encode
(
'utf-8'
))
for
element
in
tree
.
iter
(
tag
=
etree
.
Element
):
if
element
.
tag
==
'parameter'
:
key
=
element
.
get
(
'id'
)
value
=
result_dict
.
get
(
key
,
None
)
if
value
is
not
None
:
value
=
value
+
' '
+
element
.
text
else
:
value
=
element
.
text
result_dict
[
key
]
=
value
for
element
in
tree
.
findall
(
'parameter'
):
key
=
element
.
get
(
'id'
)
value
=
result_dict
.
get
(
key
,
None
)
if
value
is
not
None
:
value
=
value
+
' '
+
element
.
text
else
:
value
=
element
.
text
result_dict
[
key
]
=
value
return
result_dict
master/bt5/vifib_base/bt/revision
View file @
86e8d3d0
241
\ No newline at end of file
242
\ No newline at end of file
master/product/Vifib/Tool/SlapTool.py
View file @
86e8d3d0
...
...
@@ -346,15 +346,14 @@ class SlapTool(BaseTool):
result_dict
=
{}
if
xml
is
not
None
and
xml
!=
''
:
tree
=
etree
.
fromstring
(
xml
.
encode
(
'utf-8'
))
for
element
in
tree
.
iter
(
tag
=
etree
.
Element
):
if
element
.
tag
==
'parameter'
:
key
=
element
.
get
(
'id'
)
value
=
result_dict
.
get
(
key
,
None
)
if
value
is
not
None
:
value
=
value
+
' '
+
element
.
text
else
:
value
=
element
.
text
result_dict
[
key
]
=
value
for
element
in
tree
.
findall
(
'parameter'
):
key
=
element
.
get
(
'id'
)
value
=
result_dict
.
get
(
key
,
None
)
if
value
is
not
None
:
value
=
value
+
' '
+
element
.
text
else
:
value
=
element
.
text
result_dict
[
key
]
=
value
return
result_dict
def
_getModificationStatusForSlave
(
self
,
computer_partition_document
):
...
...
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