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
Boxiang Sun
slapos.core
Commits
37f83369
Commit
37f83369
authored
Sep 22, 2014
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slaptool: Send filter_dict when returning a Partition.
parent
22e464b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+8
-0
No files found.
master/product/Vifib/Tool/SlapTool.py
View file @
37f83369
...
...
@@ -750,6 +750,8 @@ class SlapTool(BaseTool):
parameter_dict
.
pop
(
'xml'
))
slap_partition
.
_connection_dict
=
self
.
_instanceXmlToDict
(
parameter_dict
.
pop
(
'connection_xml'
))
slap_partition
.
_filter_dict
=
self
.
_instanceXmlToDict
(
parameter_dict
.
pop
(
'filter_xml'
))
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"
):
...
...
@@ -883,6 +885,8 @@ class SlapTool(BaseTool):
parameter_dict
.
pop
(
'xml'
))
slap_partition
.
_connection_dict
=
self
.
_instanceXmlToDict
(
parameter_dict
.
pop
(
'connection_xml'
))
slap_partition
.
_filter_dict
=
self
.
_instanceXmlToDict
(
parameter_dict
.
pop
(
'filter_xml'
))
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"
):
...
...
@@ -1270,11 +1274,14 @@ class SlapTool(BaseTool):
parameter_dict
.
pop
(
'xml'
))
connection_xml
=
self
.
_instanceXmlToDict
(
parameter_dict
.
pop
(
'connection_xml'
))
filter_xml
=
self
.
_instanceXmlToDict
(
parameter_dict
.
pop
(
'filter_xml'
))
instance_guid
=
parameter_dict
.
pop
(
'instance_guid'
)
software_instance
=
SoftwareInstance
(
**
parameter_dict
)
software_instance
.
_parameter_dict
=
xml
software_instance
.
_connection_dict
=
connection_xml
software_instance
.
_filter_dict
=
filter_xml
software_instance
.
_requested_state
=
state
software_instance
.
_instance_guid
=
instance_guid
return
xml_marshaller
.
xml_marshaller
.
dumps
(
software_instance
)
...
...
@@ -1431,6 +1438,7 @@ class SlapTool(BaseTool):
'instance_guid'
:
software_instance
.
getReference
().
decode
(
"UTF-8"
),
'xml'
:
software_instance
.
getTextContent
(),
'connection_xml'
:
software_instance
.
getConnectionXml
(),
'filter_xml'
:
software_instance
.
getSlaXml
(),
'slap_computer_id'
:
\
computer_partition
.
getParentValue
().
getReference
().
decode
(
"UTF-8"
),
'slap_computer_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