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
Hardik Juneja
slapos.core
Commits
e452be63
Commit
e452be63
authored
Mar 26, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support state of software while requesting.
Note: Backward compatible change -- state defaults to 'available'.
parent
b6aab359
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+11
-5
No files found.
master/product/Vifib/Tool/SlapTool.py
View file @
e452be63
...
...
@@ -220,11 +220,11 @@ class SlapTool(BaseTool):
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'supplySupply'
)
def
supplySupply
(
self
,
url
,
computer_id
):
def
supplySupply
(
self
,
url
,
computer_id
,
state
=
'available'
):
"""
Request Software Release installation
"""
return
self
.
_supplySupply
(
url
,
computer_id
)
return
self
.
_supplySupply
(
url
,
computer_id
,
state
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'buildingSoftwareRelease'
)
...
...
@@ -610,13 +610,19 @@ class SlapTool(BaseTool):
return
len
(
catalog_result
)
@
convertToREST
def
_supplySupply
(
self
,
url
,
computer_id
):
def
_supplySupply
(
self
,
url
,
computer_id
,
state
):
"""
Request Software Release installation
"""
computer_document
=
self
.
_getComputerDocument
(
computer_id
)
computer_document
.
requestSoftwareReleaseInstallation
(
software_release_url
=
url
)
if
state
==
'available'
:
computer_document
.
requestSoftwareReleaseInstallation
(
software_release_url
=
url
)
elif
state
==
'destroyed'
:
computer_document
.
requestSoftwareReleaseCleanup
(
software_release_url
=
url
)
else
:
raise
ValueError
(
'State %s is not supported'
%
state
)
@
convertToREST
def
_buildingSoftwareRelease
(
self
,
url
,
computer_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