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
90585904
Commit
90585904
authored
Sep 23, 2022
by
Cédric Le Ninivin
Committed by
Cédric Le Ninivin
Mar 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio_api_style: Add update connection parameter to update instance
parent
59e7e654
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
master/bt5/slapos_jio_api_style/PathTemplateItem/portal_callables/SoftwareInstance_updateFromJSON.xml
...Item/portal_callables/SoftwareInstance_updateFromJSON.xml
+5
-0
master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/SoftwareInstance_updateFromDict.py
...l_skins/slapos_jio_api/SoftwareInstance_updateFromDict.py
+8
-0
No files found.
master/bt5/slapos_jio_api_style/PathTemplateItem/portal_callables/SoftwareInstance_updateFromJSON.xml
View file @
90585904
...
...
@@ -74,6 +74,11 @@
"type": "string",\n
"description": "The unique reference of the Software Instance, example: SOFTINST-1234"\n
},\n
"connection_parameters": {\n
"title": "Connections Parameters",\n
"type": "object",\n
"description": "List of parameters provided by the instance to access it."\n
},\n
"reported_state": {\n
"title": "Reported State",\n
"type": "string",\n
...
...
master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/SoftwareInstance_updateFromDict.py
View file @
90585904
...
...
@@ -4,6 +4,14 @@ software_instance = context
logError
=
context
.
ERP5Site_logApiErrorAndReturn
castToStr
=
context
.
Base_castDictToXMLString
if
"connection_parameters"
in
data_dict
:
connection_xml
=
castToStr
(
data_dict
[
"connection_parameters"
])
if
not
software_instance
.
isLastData
(
value
=
connection_xml
):
software_instance
.
updateConnection
(
connection_xml
=
connection_xml
,
)
if
"reported_state"
in
data_dict
:
# Change desired state
reported_state
=
data_dict
[
"reported_state"
]
...
...
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