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
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
c9df3d1d
Commit
c9df3d1d
authored
Aug 29, 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_cloud: Software Instance clean asJSON Text add full_ip_list and remove relative_url
parent
6bab24b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
17 deletions
+25
-17
master/bt5/slapos_cloud/DocumentTemplateItem/portal_components/document.erp5.SoftwareInstance.py
...eItem/portal_components/document.erp5.SoftwareInstance.py
+14
-12
master/bt5/slapos_cloud/PortalTypeTemplateItem/portal_types/Software%20Instance.xml
...rtalTypeTemplateItem/portal_types/Software%20Instance.xml
+11
-5
No files found.
master/bt5/slapos_cloud/DocumentTemplateItem/portal_components/document.erp5.SoftwareInstance.py
View file @
c9df3d1d
...
...
@@ -331,26 +331,28 @@ class SoftwareInstance(Item, JSONType):
result
=
{
"$schema"
:
self
.
getPortalObject
().
portal_types
.
restrictedTraverse
(
self
.
getPortalType
()).
absolute_url
()
+
"/getTextContent"
,
"reference"
:
self
.
getReference
().
decode
(
"UTF-8"
),
"title"
:
self
.
getTitle
().
decode
(
"UTF-8"
),
"connection_parameters"
:
self
.
getConnectionXmlAsDict
(),
"parameters"
:
self
.
getInstanceXmlAsDict
(),
"node"
:
self
.
getSlaXmlAsDict
(),
"state"
:
state
,
"id"
:
self
.
getRelativeUrl
(),
"reference"
:
self
.
getReference
().
decode
(
"UTF-8"
),
"software_release_uri"
:
self
.
getUrlString
(),
"software_type"
:
self
.
getSourceReference
().
decode
(
"UTF-8"
),
"compute_node_id"
:
parameter_dict
.
get
(
"slap_computer_id"
),
"compute_partition_id"
:
parameter_dict
.
get
(
"slap_computer_partition_id"
),
"sla_parameters"
:
self
.
getSlaXmlAsDict
(),
"access_status_message"
:
self
.
getTextAccessStatus
(),
"processing_timestamp"
:
parameter_dict
.
get
(
"timestamp"
),
"state"
:
state
,
"connection_parameters"
:
self
.
getConnectionXmlAsDict
(),
"parameters"
:
self
.
getInstanceXmlAsDict
(),
"shared"
:
False
,
"root_instance_title"
:
parameter_dict
.
get
(
"root_instance_title"
),
"ip_list"
:
parameter_dict
.
get
(
"ip_list"
),
"full_ip_list"
:
parameter_dict
.
get
(
"full_ip_list"
),
"X509"
:
{
"key"
:
self
.
getSslKey
(),
"certificate"
:
self
.
getSslCertificate
(),
},
"sla_parameters"
:
self
.
getSlaXmlAsDict
(),
"compute_node_id"
:
parameter_dict
.
get
(
"slap_computer_id"
),
"compute_partition_id"
:
parameter_dict
.
get
(
"slap_computer_partition_id"
),
"processing_timestamp"
:
parameter_dict
.
get
(
"timestamp"
),
"access_status_message"
:
self
.
getTextAccessStatus
(),
"portal_type"
:
self
.
getPortalType
(),
}
result
.
update
(
parameter_dict
)
self
.
REQUEST
.
response
.
setHeader
(
'Cache-Control'
,
'private, max-age=0, must-revalidate'
)
self
.
REQUEST
.
response
.
setHeader
(
'Vary'
,
...
...
master/bt5/slapos_cloud/PortalTypeTemplateItem/portal_types/Software%20Instance.xml
View file @
c9df3d1d
...
...
@@ -132,6 +132,17 @@
}\n
}\n
},\n
"full_ip_list": {\n
"title": "Full IP List",\n
"type": "array",\n
"descritpion": "XXXX List of IPs usable by the Software Instance on the partition",\n
"items": {\n
"type": "array",\n
"items": {\n
"type": "string"\n
}\n
}\n
},\n
"X509": {\n
"title": "X509 Certificates",\n
"description": "X509 Certificates used by the instance to authentify itself on master",\n
...
...
@@ -206,11 +217,6 @@
"title": "Portal Type",\n
"const": "Software Instance",\n
"type": "string"\n
},\n
"id": {\n
"title": "ID",\n
"type": "string",\n
"description": "Unique Id of the object. It is not editable."\n
}\n
}\n
}\n
...
...
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