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
Titouan Soulard
slapos.core
Commits
0bebfac1
Commit
0bebfac1
authored
Jul 22, 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 asJSON include SSL key and certificate
parent
26dfda41
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
master/bt5/slapos_cloud/DocumentTemplateItem/portal_components/document.erp5.SoftwareInstance.py
...eItem/portal_components/document.erp5.SoftwareInstance.py
+9
-0
master/bt5/slapos_cloud/PortalTypeTemplateItem/portal_types/Software%20Instance.xml
...rtalTypeTemplateItem/portal_types/Software%20Instance.xml
+10
-0
No files found.
master/bt5/slapos_cloud/DocumentTemplateItem/portal_components/document.erp5.SoftwareInstance.py
View file @
0bebfac1
...
...
@@ -26,6 +26,7 @@
#
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
App.Common
import
rfc1123_date
from
Products.ERP5Type
import
Permissions
from
erp5.component.document.Item
import
Item
from
erp5.component.document.JSONType
import
JSONType
...
...
@@ -344,8 +345,16 @@ class SoftwareInstance(Item, JSONType):
"sla_parameters"
:
self
.
getSlaXmlAsDict
(),
"access_status_message"
:
self
.
getTextAccessStatus
(),
"processing_timestamp"
:
parameter_dict
.
get
(
"timestamp"
),
"key"
:
self
.
getSslKey
(),
"certificate"
:
self
.
getSslCertificate
(),
}
result
.
update
(
parameter_dict
)
self
.
REQUEST
.
response
.
setHeader
(
'Cache-Control'
,
'private, max-age=0, must-revalidate'
)
self
.
REQUEST
.
response
.
setHeader
(
'Vary'
,
'REMOTE_USER'
)
self
.
REQUEST
.
response
.
setHeader
(
'Last-Modified'
,
rfc1123_date
(
self
.
getModificationDate
()))
return
json
.
dumps
(
result
,
indent
=
2
)
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'fromJSONText'
)
...
...
master/bt5/slapos_cloud/PortalTypeTemplateItem/portal_types/Software%20Instance.xml
View file @
0bebfac1
...
...
@@ -132,6 +132,16 @@
}\n
}\n
},\n
"key": {\n
"title": "X509 Key",\n
"type": "string",\n
"descritpion": "X509 Key used by the instance to authentify itself on master"\n
},\n
"certificate": {\n
"title": "X509 Certificate",\n
"type": "string",\n
"descritpion": "X509 Certificate used by the instance to authentify itself on master"\n
},\n
"sla_parameters": {\n
"title": "Target Node Selection Parameters",\n
"type": "object",\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