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
Jérome Perrin
slapos.core
Commits
22c7a6fe
Commit
22c7a6fe
authored
Apr 27, 2016
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not post same connection parameters of slaves.
parent
b992c34e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
23 deletions
+50
-23
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py
...ateItem/portal_components/test.erp5.testSlapOSSlapTool.py
+10
-6
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.xml
...teItem/portal_components/test.erp5.testSlapOSSlapTool.xml
+13
-13
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+6
-2
slapos/slap/slap.py
slapos/slap/slap.py
+21
-2
No files found.
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py
View file @
22c7a6fe
...
...
@@ -1223,6 +1223,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
<string>slave_instance_list</string>
<list id='i9'>
<dictionary id='i10'>
<string>connection-parameter-key-list</string>
<list id='i11'/>
<unicode>paramé</unicode>
<unicode>%(slave_1_param)s</unicode>
<string>slap_software_type</string>
...
...
@@ -1245,16 +1247,16 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
<string>_requested_state</string>
<string>started</string>
<string>_software_release_document</string>
<object id='i1
1
' module='slapos.slap.slap' class='SoftwareRelease'>
<object id='i1
2
' module='slapos.slap.slap' class='SoftwareRelease'>
<tuple>
<unicode>%(software_release_url)s</unicode>
<unicode>%(computer_id)s</unicode>
</tuple>
<dictionary id='i1
2
'>
<dictionary id='i1
3
'>
<string>_computer_guid</string>
<unicode>%(computer_id)s</unicode>
<string>_software_instance_list</string>
<list id='i1
3
'/>
<list id='i1
4
'/>
<string>_software_release</string>
<unicode>%(software_release_url)s</unicode>
</dictionary>
...
...
@@ -2316,6 +2318,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
<string>slave_instance_list</string>
<list id='i9'>
<dictionary id='i10'>
<string>connection-parameter-key-list</string>
<list id='i11'/>
<unicode>paramé</unicode>
<unicode>%(slave_1_param)s</unicode>
<string>slap_software_type</string>
...
...
@@ -2338,16 +2342,16 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
<string>_requested_state</string>
<string>started</string>
<string>_software_release_document</string>
<object id='i1
1
' module='slapos.slap.slap' class='SoftwareRelease'>
<object id='i1
2
' module='slapos.slap.slap' class='SoftwareRelease'>
<tuple>
<unicode>%(software_release_url)s</unicode>
<unicode>%(computer_id)s</unicode>
</tuple>
<dictionary id='i1
2
'>
<dictionary id='i1
3
'>
<string>_computer_guid</string>
<unicode>%(computer_id)s</unicode>
<string>_software_instance_list</string>
<list id='i1
3
'/>
<list id='i1
4
'/>
<string>_software_release</string>
<unicode>%(software_release_url)s</unicode>
</dictionary>
...
...
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.xml
View file @
22c7a6fe
...
...
@@ -51,19 +51,19 @@
<string>
W:517, 13: Use of eval (eval-used)
</string>
<string>
W:568, 13: Use of eval (eval-used)
</string>
<string>
W:793, 13: Use of eval (eval-used)
</string>
<string>
W:1
399
, 13: Use of eval (eval-used)
</string>
<string>
W:151
2
, 13: Use of eval (eval-used)
</string>
<string>
W:156
6
, 13: Use of eval (eval-used)
</string>
<string>
W:160
6
, 13: Use of eval (eval-used)
</string>
<string>
W:201
3
, 2: Arguments number differs from overridden \'afterSetUp\' method (arguments-differ)
</string>
<string>
W:21
09
, 13: Use of eval (eval-used)
</string>
<string>
W:249
2
, 13: Use of eval (eval-used)
</string>
<string>
W:25
46
, 13: Use of eval (eval-used)
</string>
<string>
W:257
3
, 13: Use of eval (eval-used)
</string>
<string>
W:27
28
, 13: Use of eval (eval-used)
</string>
<string>
W:27
56
, 13: Use of eval (eval-used)
</string>
<string>
W:280
5
, 13: Use of eval (eval-used)
</string>
<string>
W:285
2
, 13: Use of eval (eval-used)
</string>
<string>
W:1
401
, 13: Use of eval (eval-used)
</string>
<string>
W:151
4
, 13: Use of eval (eval-used)
</string>
<string>
W:156
8
, 13: Use of eval (eval-used)
</string>
<string>
W:160
8
, 13: Use of eval (eval-used)
</string>
<string>
W:201
5
, 2: Arguments number differs from overridden \'afterSetUp\' method (arguments-differ)
</string>
<string>
W:21
11
, 13: Use of eval (eval-used)
</string>
<string>
W:249
6
, 13: Use of eval (eval-used)
</string>
<string>
W:25
50
, 13: Use of eval (eval-used)
</string>
<string>
W:257
7
, 13: Use of eval (eval-used)
</string>
<string>
W:27
32
, 13: Use of eval (eval-used)
</string>
<string>
W:27
60
, 13: Use of eval (eval-used)
</string>
<string>
W:280
9
, 13: Use of eval (eval-used)
</string>
<string>
W:285
6
, 13: Use of eval (eval-used)
</string>
</tuple>
</value>
</item>
...
...
master/product/Vifib/Tool/SlapTool.py
View file @
22c7a6fe
...
...
@@ -826,12 +826,16 @@ class SlapTool(BaseTool):
slap_partition
.
_instance_guid
=
parameter_dict
.
pop
(
'instance_guid'
)
for
slave_instance_dict
in
parameter_dict
.
get
(
"slave_instance_list"
,
[]):
if
slave_instance_dict
.
has_key
(
"connection_xml"
):
slave_instance_dict
.
update
(
self
.
_instanceXmlToDict
(
slave_instance_dict
.
pop
(
"connection_xml"
)))
connection_dict
=
self
.
_instanceXmlToDict
(
slave_instance_dict
.
pop
(
"connection_xml"
))
slave_instance_dict
.
update
(
connection_dict
)
slave_instance_dict
[
'connection-parameter-key-list'
]
=
\
connection_dict
.
keys
()
if
slave_instance_dict
.
has_key
(
"xml"
):
slave_instance_dict
.
update
(
self
.
_instanceXmlToDict
(
slave_instance_dict
.
pop
(
"xml"
)))
slap_partition
.
_parameter_dict
.
update
(
parameter_dict
)
result
=
xml_marshaller
.
xml_marshaller
.
dumps
(
slap_partition
)
# Keep in cache server for 7 days
...
...
slapos/slap/slap.py
View file @
22c7a6fe
...
...
@@ -564,7 +564,26 @@ class ComputerPartition(SlapRequester):
return
self
.
_software_release_document
def
setConnectionDict
(
self
,
connection_dict
,
slave_reference
=
None
):
if
self
.
getConnectionParameterDict
()
!=
connection_dict
:
if
self
.
getConnectionParameterDict
()
==
connection_dict
:
return
if
slave_reference
is
not
None
:
# check the connection parameters from the slave
# Should we check existence?
slave_parameter_list
=
self
.
getInstanceParameter
(
"slave_instance_list"
)
slave_connection_dict
=
{}
for
slave_parameter_dict
in
slave_parameter_list
:
if
slave_parameter_dict
[
"reference"
]
==
slave_reference
:
for
key
in
slave_parameter_dict
.
get
(
"connection-parameter-key-list"
,
[]):
slave_connection_dict
[
key
]
=
slave_parameter_dict
[
key
]
break
# Skip as nothing changed for the slave
if
slave_connection_dict
==
connection_dict
:
return
self
.
_connection_helper
.
POST
(
'setComputerPartitionConnectionXml'
,
data
=
{
'computer_id'
:
self
.
_computer_id
,
'computer_partition_id'
:
self
.
_partition_id
,
...
...
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