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
Nicolas Wavrant
slapos.core
Commits
13a1d8ea
Commit
13a1d8ea
authored
May 14, 2013
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix encoding usage in setConnectionXml
parent
f437c484
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
16 deletions
+14
-16
master/bt5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
...5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
+13
-13
master/bt5/slapos_slap_tool/bt/revision
master/bt5/slapos_slap_tool/bt/revision
+1
-1
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+0
-2
No files found.
master/bt5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
View file @
13a1d8ea
...
...
@@ -1152,16 +1152,16 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
slave_reference
=
self
.
start_requested_slave_instance
.
getReference
()
connection_xml
=
"""<marshal>
<dictionary id="i2">
<
string>p1</string
>
<
string>v1</string
>
<
string>p2</string
>
<
string>v2</string
>
<
unicode>p1é</unicode
>
<
unicode>v1é</unicode
>
<
unicode>p2é</unicode
>
<
unicode>v2é</unicode
>
</dictionary>
</marshal>"""
stored_xml
=
"""<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id="p
2">v2
</parameter>
<parameter id="p
1">v1
</parameter>
<parameter id="p
1é">v1é
</parameter>
<parameter id="p
2é">v2é
</parameter>
</instance>
"""
self
.
login
(
self
.
start_requested_software_instance
.
getReference
())
...
...
@@ -1185,16 +1185,16 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
portal_type
=
'Computer Partition'
).
getReference
()
connection_xml
=
"""<marshal>
<dictionary id="i2">
<
string>p1</string
>
<
string>v1</string
>
<
string>p2</string
>
<
string>v2</string
>
<
unicode>p1é</unicode
>
<
unicode>v1é</unicode
>
<
unicode>p2é</unicode
>
<
unicode>v2é</unicode
>
</dictionary>
</marshal>"""
stored_xml
=
"""<?xml version='1.0' encoding='utf-8'?>
<instance>
<parameter id="p
2">v2
</parameter>
<parameter id="p
1">v1
</parameter>
<parameter id="p
1é">v1é
</parameter>
<parameter id="p
2é">v2é
</parameter>
</instance>
"""
self
.
login
(
self
.
start_requested_software_instance
.
getReference
())
...
...
@@ -2390,4 +2390,4 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
self
.
assertRevokeComputerCertificateSimulator
((),
{})
finally
:
if
os
.
path
.
exists
(
self
.
revoke_computer_certificate_simulator
):
os
.
unlink
(
self
.
revoke_computer_certificate_simulator
)
os
.
unlink
(
self
.
revoke_computer_certificate_simulator
)
\ No newline at end of file
master/bt5/slapos_slap_tool/bt/revision
View file @
13a1d8ea
26
\ No newline at end of file
27
\ No newline at end of file
master/product/Vifib/Tool/SlapTool.py
View file @
13a1d8ea
...
...
@@ -1047,8 +1047,6 @@ class SlapTool(BaseTool):
connection_xml
)
instance
=
etree
.
Element
(
'instance'
)
for
parameter_id
,
parameter_value
in
partition_parameter_kw
.
iteritems
():
# cast everything to string
parameter_value
=
str
(
parameter_value
)
etree
.
SubElement
(
instance
,
"parameter"
,
attrib
=
{
'id'
:
parameter_id
}).
text
=
parameter_value
connection_xml
=
etree
.
tostring
(
instance
,
pretty_print
=
True
,
...
...
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