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
Léo-Paul Géneau
slapos.core
Commits
821e9f13
Commit
821e9f13
authored
Jul 14, 2022
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio_api_style: Add Compute Node in get Object From Data
parent
2b24e598
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/jIOWebSection_getObjectFromData.py
...l_skins/slapos_jio_api/jIOWebSection_getObjectFromData.py
+12
-0
No files found.
master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/jIOWebSection_getObjectFromData.py
View file @
821e9f13
...
...
@@ -9,6 +9,18 @@ if portal_type == "Software Installation":
if
compute_node
:
return
compute_node
.
getSoftwareInstallationFromUrl
(
data_dict
[
"software_release_uri"
])
elif
portal_type
==
"Compute Node"
:
if
"compute_node_id"
in
data_dict
:
compute_node_id
=
data_dict
[
"compute_node_id"
]
user
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserName
()
if
str
(
user
)
==
compute_node_id
:
compute_node
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
compute_node
.
setAccessStatus
(
compute_node_id
)
else
:
compute_node
=
portal
.
portal_catalog
.
getComputeNodeObject
(
compute_node_id
)
if
compute_node
:
return
compute_node
elif
portal_type
==
"Software Instance"
:
if
"reference"
in
data_dict
:
software_instance
=
portal
.
portal_catalog
.
getSoftwareInstanceObject
(
...
...
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