Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos.core
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):
...
@@ -51,13 +51,12 @@ class SoftwareInstance(Item):
xml
=
self
.
getSlaXml
()
xml
=
self
.
getSlaXml
()
if
xml
is
not
None
and
xml
!=
''
:
if
xml
is
not
None
and
xml
!=
''
:
tree
=
etree
.
fromstring
(
xml
.
encode
(
'utf-8'
))
tree
=
etree
.
fromstring
(
xml
.
encode
(
'utf-8'
))
for
element
in
tree
.
iter
(
tag
=
etree
.
Element
):
for
element
in
tree
.
findall
(
'parameter'
):
if
element
.
tag
==
'parameter'
:
key
=
element
.
get
(
'id'
)
key
=
element
.
get
(
'id'
)
value
=
result_dict
.
get
(
key
,
None
)
value
=
result_dict
.
get
(
key
,
None
)
if
value
is
not
None
:
if
value
is
not
None
:
value
=
value
+
' '
+
element
.
text
value
=
value
+
' '
+
element
.
text
else
:
else
:
value
=
element
.
text
value
=
element
.
text
result_dict
[
key
]
=
value
result_dict
[
key
]
=
value
return
result_dict
return
result_dict
master/bt5/vifib_base/bt/revision
View file @
86e8d3d0
241
242
\ No newline at end of file
\ No newline at end of file
master/product/Vifib/Tool/SlapTool.py
View file @
86e8d3d0
...
@@ -346,15 +346,14 @@ class SlapTool(BaseTool):
...
@@ -346,15 +346,14 @@ class SlapTool(BaseTool):
result_dict
=
{}
result_dict
=
{}
if
xml
is
not
None
and
xml
!=
''
:
if
xml
is
not
None
and
xml
!=
''
:
tree
=
etree
.
fromstring
(
xml
.
encode
(
'utf-8'
))
tree
=
etree
.
fromstring
(
xml
.
encode
(
'utf-8'
))
for
element
in
tree
.
iter
(
tag
=
etree
.
Element
):
for
element
in
tree
.
findall
(
'parameter'
):
if
element
.
tag
==
'parameter'
:
key
=
element
.
get
(
'id'
)
key
=
element
.
get
(
'id'
)
value
=
result_dict
.
get
(
key
,
None
)
value
=
result_dict
.
get
(
key
,
None
)
if
value
is
not
None
:
if
value
is
not
None
:
value
=
value
+
' '
+
element
.
text
value
=
value
+
' '
+
element
.
text
else
:
else
:
value
=
element
.
text
value
=
element
.
text
result_dict
[
key
]
=
value
result_dict
[
key
]
=
value
return
result_dict
return
result_dict
def
_getModificationStatusForSlave
(
self
,
computer_partition_document
):
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