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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
79b14739
Commit
79b14739
authored
May 24, 2022
by
Cédric Le Ninivin
Committed by
Romain Courteaud
Dec 16, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio_api_style: Instance parameter is expected in JSON
parent
b8713ed2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
master/bt5/slapos_jio_api_style/PathTemplateItem/portal_callables/jIOWebSection_requestComputerPartitionFromJSON.xml
...lables/jIOWebSection_requestComputerPartitionFromJSON.xml
+2
-2
master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/jIOWebSection_requestComputerPartition.py
.../slapos_jio_api/jIOWebSection_requestComputerPartition.py
+9
-7
No files found.
master/bt5/slapos_jio_api_style/PathTemplateItem/portal_callables/jIOWebSection_requestComputerPartitionFromJSON.xml
View file @
79b14739
...
...
@@ -60,8 +60,8 @@
},\n
"parameters": {\n
"title": "Instance Parameters",\n
"type": "
object
",\n
"
additionalProperties": { "type": "string" }
\n
"type": "
string
",\n
"
description": "Instance parameters in JSON Format."
\n
},\n
"shared": {\n
"title": "Shared Instance",\n
...
...
master/bt5/slapos_jio_api_style/SkinTemplateItem/portal_skins/slapos_jio_api/jIOWebSection_requestComputerPartition.py
View file @
79b14739
...
...
@@ -88,8 +88,8 @@ def getSoftwareInstanceForComputePartition(compute_node_id,
# Loads partition parameter
partition_parameter
=
data_dict
.
get
(
"parameters"
,
{}
)
if
isinstance
(
partition_parameter
,
str
)
:
partition_parameter
=
data_dict
.
get
(
"parameters"
,
None
)
if
partition_parameter
:
import
json
try
:
partition_parameter
=
json
.
loads
(
partition_parameter
)
...
...
@@ -99,11 +99,13 @@ if isinstance(partition_parameter, str):
error_name
=
"CANNOT-DECODE-COMPUTER-PARTITION-JSON-PARAMETER"
,
)
if
not
isinstance
(
partition_parameter
,
dict
):
return
logError
(
"Parameters should be a key value object."
,
error_name
=
"INCORRECT-COMPUTER-PARTITION-JSON-PARAMETER"
,
)
if
not
isinstance
(
partition_parameter
,
dict
):
return
logError
(
"Parameters should be a key value object."
,
error_name
=
"INCORRECT-COMPUTER-PARTITION-JSON-PARAMETER"
,
)
else
:
partition_parameter
=
{}
try
:
# filter 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