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
a520d033
Commit
a520d033
authored
Jul 22, 2022
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio_api_style: Add requested instance list to update instance
parent
4c984339
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
master/bt5/slapos_jio_api_style/PathTemplateItem/portal_callables/SoftwareInstance_updateFromJSON.xml
...Item/portal_callables/SoftwareInstance_updateFromJSON.xml
+8
-0
master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/SoftwareInstance_updateFromDict.py
...l_skins/slapos_jio_api/SoftwareInstance_updateFromDict.py
+4
-1
No files found.
master/bt5/slapos_jio_api_style/PathTemplateItem/portal_callables/SoftwareInstance_updateFromJSON.xml
View file @
a520d033
...
...
@@ -90,6 +90,14 @@
"const": "Software Instance",\n
"type": "string"\n
},\n
"requested_instance_list": {\n
"title": "Requested Instance List",\n
"type": "array",\n
"description": "List of the instances references requested by this instance. This is used to garbage collect instances that are no longer requested by this instance.",\n
"items": {\n
"type": "string"\n
}\n
},\n
"title": {\n
"title": "New Title",\n
"type": "string",\n
...
...
master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/SoftwareInstance_updateFromDict.py
View file @
a520d033
...
...
@@ -35,6 +35,9 @@ if "reported_state" in data_dict:
error_message
=
"Unexcepected Reported State: %s"
%
reported_state
,
)
if
"requested_instance_list"
:
software_instance
.
updateRequestedInstanceList
(
data_dict
[
"requested_instance_list"
])
if
"title"
in
data_dict
and
data_dict
[
"title"
]
!=
software_instance
.
getTitle
():
software_instance
.
rename
(
new_name
=
data_dict
[
"title"
],
...
...
@@ -45,6 +48,6 @@ return json.dumps({
"$schema"
:
json_form
.
absolute_url
().
strip
()
+
"/getOutputJSONSchema"
,
"reference"
:
software_instance
.
getReference
(),
"portal_type"
:
"Software Instance"
,
"date"
:
str
(
DateTime
()
),
"date"
:
DateTime
().
HTML4
(
),
"success"
:
"Done"
},
indent
=
2
)
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