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
Carlos Ramos Carreño
slapos.core
Commits
1726b187
Commit
1726b187
authored
Sep 28, 2022
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio_api_style: Add get instance from compute node and compute partition
This is useful for backward compatibility
parent
77dc0597
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
master/bt5/slapos_jio_api_style/PathTemplateItem/portal_callables/SoftwareInstance_getFromJSON.xml
...ateItem/portal_callables/SoftwareInstance_getFromJSON.xml
+16
-4
master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/jIOWebSection_getObjectFromData.py
...l_skins/slapos_jio_api/jIOWebSection_getObjectFromData.py
+7
-0
No files found.
master/bt5/slapos_jio_api_style/PathTemplateItem/portal_callables/SoftwareInstance_getFromJSON.xml
View file @
1726b187
...
...
@@ -66,14 +66,26 @@
},\n
{\n
"properties": {\n
"id": {\n
"title": "
ID
",\n
"
compute_node_
id": {\n
"title": "
Compute Node Id
",\n
"type": "string",\n
"description": "Unique Id of the object. This ID is defined by KD Portal. It is not editable."\n
"description": "Id Of the Requesting Compute Node, used by Slap Client when an instance is requesting an instance"\n
},\n
"compute_partition_id": {\n
"title": "Compute Partition Id",\n
"type": "string",\n
"description": "Id Of the Requesting Compute Partition, used by Slap Client when an instance is requesting an instance"\n
},\n
"portal_type": {\n
"title": "Portal Type",\n
"const": "Software Instance",\n
"type": "string"\n
}\n
},\n
"required": [\n
"id"\n
"compute_node_id",\n
"compute_partition_id",\n
"portal_type"\n
]\n
}\n
]\n
...
...
master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/jIOWebSection_getObjectFromData.py
View file @
1726b187
...
...
@@ -29,6 +29,13 @@ elif portal_type == "Software Instance":
)
if
software_instance
:
return
software_instance
elif
"compute_node_id"
and
"compute_partition_id"
in
data_dict
:
compute_partition
=
portal
.
portal_catalog
.
getComputePartitionObject
(
data_dict
[
"compute_node_id"
],
data_dict
[
"compute_partition_id"
],
)
if
compute_partition
:
return
compute_partition
.
getSoftwareInstance
()
elif
portal_type
==
"Software Instance Certificate Record"
:
if
"reference"
in
data_dict
:
...
...
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