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
Paul Graydon
slapos.core
Commits
4933cbfa
Commit
4933cbfa
authored
Jun 02, 2022
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_slap_tool: Move to use getSoftwareInstallationFromUrl method
parent
62ccbe98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
master/bt5/slapos_slap_tool/ToolComponentTemplateItem/portal_components/tool.erp5.SlapTool.py
...onentTemplateItem/portal_components/tool.erp5.SlapTool.py
+5
-5
No files found.
master/bt5/slapos_slap_tool/ToolComponentTemplateItem/portal_components/tool.erp5.SlapTool.py
View file @
4933cbfa
...
@@ -345,7 +345,7 @@ class SlapTool(BaseTool):
...
@@ -345,7 +345,7 @@ class SlapTool(BaseTool):
# Be sure to prevent accessing information to disallowed users
# Be sure to prevent accessing information to disallowed users
compute_node
=
_assertACI
(
compute_node
)
compute_node
=
_assertACI
(
compute_node
)
try
:
try
:
software_installation
=
compute_node
.
_
getSoftwareInstallationFromUrl
(
url
)
software_installation
=
compute_node
.
getSoftwareInstallationFromUrl
(
url
)
except
NotFound
:
except
NotFound
:
data_dict
=
self
.
_getAccessStatus
(
None
)
data_dict
=
self
.
_getAccessStatus
(
None
)
else
:
else
:
...
@@ -798,7 +798,7 @@ class SlapTool(BaseTool):
...
@@ -798,7 +798,7 @@ class SlapTool(BaseTool):
Log the software release status
Log the software release status
"""
"""
compute_node
=
self
.
getPortalObject
().
portal_catalog
.
getComputeNodeObject
(
compute_node_id
)
compute_node
=
self
.
getPortalObject
().
portal_catalog
.
getComputeNodeObject
(
compute_node_id
)
software_installation
=
compute_node
.
_
getSoftwareInstallationFromUrl
(
url
)
software_installation
=
compute_node
.
getSoftwareInstallationFromUrl
(
url
)
software_installation
.
setBuildingStatus
(
software_installation
.
setBuildingStatus
(
'software release %s'
%
url
,
"building"
)
'software release %s'
%
url
,
"building"
)
...
@@ -808,7 +808,7 @@ class SlapTool(BaseTool):
...
@@ -808,7 +808,7 @@ class SlapTool(BaseTool):
Log the software release status
Log the software release status
"""
"""
compute_node
=
self
.
getPortalObject
().
portal_catalog
.
getComputeNodeObject
(
compute_node_id
)
compute_node
=
self
.
getPortalObject
().
portal_catalog
.
getComputeNodeObject
(
compute_node_id
)
software_installation
=
compute_node
.
_
getSoftwareInstallationFromUrl
(
url
)
software_installation
=
compute_node
.
getSoftwareInstallationFromUrl
(
url
)
software_installation
.
setAccessStatus
(
software_installation
.
setAccessStatus
(
'software release %s available'
%
url
,
"available"
)
'software release %s available'
%
url
,
"available"
)
...
@@ -818,7 +818,7 @@ class SlapTool(BaseTool):
...
@@ -818,7 +818,7 @@ class SlapTool(BaseTool):
Reports that Software Release is destroyed
Reports that Software Release is destroyed
"""
"""
compute_node
=
self
.
getPortalObject
().
portal_catalog
.
getComputeNodeObject
(
compute_node_id
)
compute_node
=
self
.
getPortalObject
().
portal_catalog
.
getComputeNodeObject
(
compute_node_id
)
software_installation
=
compute_node
.
_
getSoftwareInstallationFromUrl
(
url
)
software_installation
=
compute_node
.
getSoftwareInstallationFromUrl
(
url
)
if
software_installation
.
getSlapState
()
!=
'destroy_requested'
:
if
software_installation
.
getSlapState
()
!=
'destroy_requested'
:
raise
NotFound
raise
NotFound
if
self
.
getPortalObject
().
portal_workflow
.
isTransitionPossible
(
software_installation
,
if
self
.
getPortalObject
().
portal_workflow
.
isTransitionPossible
(
software_installation
,
...
@@ -1051,7 +1051,7 @@ class SlapTool(BaseTool):
...
@@ -1051,7 +1051,7 @@ class SlapTool(BaseTool):
Log the compute_node status
Log the compute_node status
"""
"""
compute_node
=
self
.
getPortalObject
().
portal_catalog
.
getComputeNodeObject
(
compute_node_id
)
compute_node
=
self
.
getPortalObject
().
portal_catalog
.
getComputeNodeObject
(
compute_node_id
)
software_installation
=
compute_node
.
_
getSoftwareInstallationFromUrl
(
url
)
software_installation
=
compute_node
.
getSoftwareInstallationFromUrl
(
url
)
software_installation
.
setErrorStatus
(
'while installing %s'
%
url
)
software_installation
.
setErrorStatus
(
'while installing %s'
%
url
)
InitializeClass
(
SlapTool
)
InitializeClass
(
SlapTool
)
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