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
Titouan Soulard
slapos.core
Commits
01ba9050
Commit
01ba9050
authored
Jun 21, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement state parameter in library.
parent
eb68842f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
slapos/slap/slap.py
slapos/slap/slap.py
+7
-3
No files found.
slapos/slap/slap.py
View file @
01ba9050
...
@@ -149,7 +149,8 @@ class OpenOrder(SlapDocument):
...
@@ -149,7 +149,8 @@ class OpenOrder(SlapDocument):
zope
.
interface
.
implements
(
interface
.
IOpenOrder
)
zope
.
interface
.
implements
(
interface
.
IOpenOrder
)
def
request
(
self
,
software_release
,
partition_reference
,
def
request
(
self
,
software_release
,
partition_reference
,
partition_parameter_kw
=
None
,
software_type
=
None
,
filter_kw
=
None
):
partition_parameter_kw
=
None
,
software_type
=
None
,
filter_kw
=
None
,
state
=
None
):
if
partition_parameter_kw
is
None
:
if
partition_parameter_kw
is
None
:
partition_parameter_kw
=
{}
partition_parameter_kw
=
{}
if
filter_kw
is
None
:
if
filter_kw
is
None
:
...
@@ -158,7 +159,8 @@ class OpenOrder(SlapDocument):
...
@@ -158,7 +159,8 @@ class OpenOrder(SlapDocument):
'software_release'
:
software_release
,
'software_release'
:
software_release
,
'partition_reference'
:
partition_reference
,
'partition_reference'
:
partition_reference
,
'partition_parameter_xml'
:
xml_marshaller
.
dumps
(
partition_parameter_kw
),
'partition_parameter_xml'
:
xml_marshaller
.
dumps
(
partition_parameter_kw
),
'filter_xml'
:
xml_marshaller
.
dumps
(
filter_kw
)
'filter_xml'
:
xml_marshaller
.
dumps
(
filter_kw
),
'state'
:
state
,
}
}
if
software_type
is
not
None
:
if
software_type
is
not
None
:
request_dict
[
'software_type'
]
=
software_type
request_dict
[
'software_type'
]
=
software_type
...
@@ -282,7 +284,8 @@ class ComputerPartition(SlapDocument):
...
@@ -282,7 +284,8 @@ class ComputerPartition(SlapDocument):
# Computer Partition data are fetch from server shall be delayed
# Computer Partition data are fetch from server shall be delayed
@
_syncComputerPartitionInformation
@
_syncComputerPartitionInformation
def
request
(
self
,
software_release
,
software_type
,
partition_reference
,
def
request
(
self
,
software_release
,
software_type
,
partition_reference
,
shared
=
False
,
partition_parameter_kw
=
None
,
filter_kw
=
None
):
shared
=
False
,
partition_parameter_kw
=
None
,
filter_kw
=
None
,
state
=
None
):
if
partition_parameter_kw
is
None
:
if
partition_parameter_kw
is
None
:
partition_parameter_kw
=
{}
partition_parameter_kw
=
{}
elif
not
isinstance
(
partition_parameter_kw
,
dict
):
elif
not
isinstance
(
partition_parameter_kw
,
dict
):
...
@@ -304,6 +307,7 @@ class ComputerPartition(SlapDocument):
...
@@ -304,6 +307,7 @@ class ComputerPartition(SlapDocument):
'partition_parameter_xml'
:
xml_marshaller
.
dumps
(
'partition_parameter_xml'
:
xml_marshaller
.
dumps
(
partition_parameter_kw
),
partition_parameter_kw
),
'filter_xml'
:
xml_marshaller
.
dumps
(
filter_kw
),
'filter_xml'
:
xml_marshaller
.
dumps
(
filter_kw
),
'state'
:
state
,
}
}
self
.
_connection_helper
.
POST
(
'/requestComputerPartition'
,
request_dict
)
self
.
_connection_helper
.
POST
(
'/requestComputerPartition'
,
request_dict
)
xml
=
self
.
_connection_helper
.
response
.
read
()
xml
=
self
.
_connection_helper
.
response
.
read
()
...
...
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