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
Eric Zheng
slapos.core
Commits
f9006416
Commit
f9006416
authored
Nov 16, 2012
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Master is now stateless.
No purchase packing list are created with the software installation.
parent
d0b5731a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
40 deletions
+4
-40
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+4
-40
No files found.
master/product/Vifib/Tool/SlapTool.py
View file @
f9006416
...
...
@@ -835,39 +835,16 @@ class SlapTool(BaseTool):
@
convertToREST
def
_buildingSoftwareRelease
(
self
,
url
,
computer_id
):
"""
Reports that Software Release is being build
Kept for compatibility
"""
computer_document
=
self
.
_getComputerDocument
(
computer_id
)
software_installation
=
self
.
_getSoftwareInstallationForComputer
(
url
,
computer_document
)
delivery
=
software_installation
.
getCausalityValue
(
portal_type
=
[
"Purchase Packing List"
])
if
delivery
is
not
None
:
portal
=
self
.
getPortalObject
()
line
=
delivery
.
contentValues
(
portal_type
=
"Purchase Packing List Line"
)[
0
]
if
line
.
getResource
()
==
portal
.
portal_preferences
.
\
getPreferredSoftwareSetupResource
():
if
portal
.
portal_workflow
.
isTransitionPossible
(
delivery
,
'start'
):
delivery
.
start
(
comment
=
'Software Release building report.'
)
pass
@
convertToREST
def
_availableSoftwareRelease
(
self
,
url
,
computer_id
):
"""
Reports that Software Release is available
Kept for compatibility
"""
computer_document
=
self
.
_getComputerDocument
(
computer_id
)
software_installation
=
self
.
_getSoftwareInstallationForComputer
(
url
,
computer_document
)
delivery
=
software_installation
.
getCausalityValue
(
portal_type
=
[
"Purchase Packing List"
])
if
delivery
is
not
None
:
portal
=
self
.
getPortalObject
()
line
=
delivery
.
contentValues
(
portal_type
=
"Purchase Packing List Line"
)[
0
]
if
line
.
getResource
()
==
portal
.
portal_preferences
.
\
getPreferredSoftwareSetupResource
():
comment
=
'Software Release available report.'
if
portal
.
portal_workflow
.
isTransitionPossible
(
delivery
,
'start'
):
delivery
.
start
(
comment
=
comment
)
if
portal
.
portal_workflow
.
isTransitionPossible
(
delivery
,
'stop'
):
delivery
.
stop
(
comment
=
comment
)
pass
@
convertToREST
def
_destroyedSoftwareRelease
(
self
,
url
,
computer_id
):
...
...
@@ -879,19 +856,6 @@ class SlapTool(BaseTool):
computer_document
)
if
software_installation
.
getSlapState
()
!=
'destroy_requested'
:
raise
NotFound
delivery
=
software_installation
.
getCausalityValue
(
portal_type
=
[
"Purchase Packing List"
])
comment
=
'Software Release destroyed report.'
portal
=
self
.
getPortalObject
()
if
delivery
is
not
None
:
line
=
delivery
.
contentValues
(
portal_type
=
"Purchase Packing List Line"
)[
0
]
if
line
.
getResource
()
==
portal
.
portal_preferences
.
\
getPreferredSoftwareCleanupResource
():
if
portal
.
portal_workflow
.
isTransitionPossible
(
delivery
,
'start'
):
delivery
.
start
(
comment
=
comment
)
if
portal
.
portal_workflow
.
isTransitionPossible
(
delivery
,
'stop'
):
delivery
.
stop
(
comment
=
comment
)
if
portal
.
portal_workflow
.
isTransitionPossible
(
delivery
,
'deliver'
):
delivery
.
deliver
(
comment
=
comment
)
if
portal
.
portal_workflow
.
isTransitionPossible
(
software_installation
,
'invalidate'
):
software_installation
.
invalidate
(
comment
=
comment
)
...
...
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