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
Guillaume Hervier
slapos.core
Commits
77e7f6fb
Commit
77e7f6fb
authored
Jul 07, 2017
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: promise to check and configure caucase
parent
8c1eb769
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
275 additions
and
0 deletions
+275
-0
master/bt5/slapos_cloud/PathTemplateItem/portal_alarms/promise_caucase_web_service.xml
...emplateItem/portal_alarms/promise_caucase_web_service.xml
+109
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud_promise/Alarm_checkPromiseCaucaseService.py
.../slapos_cloud_promise/Alarm_checkPromiseCaucaseService.py
+32
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud_promise/Alarm_checkPromiseCaucaseService.xml
...slapos_cloud_promise/Alarm_checkPromiseCaucaseService.xml
+62
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud_promise/Alarm_installPromiseCaucaseService.py
...lapos_cloud_promise/Alarm_installPromiseCaucaseService.py
+9
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud_promise/Alarm_installPromiseCaucaseService.xml
...apos_cloud_promise/Alarm_installPromiseCaucaseService.xml
+62
-0
master/bt5/slapos_cloud/bt/template_path_list
master/bt5/slapos_cloud/bt/template_path_list
+1
-0
No files found.
master/bt5/slapos_cloud/PathTemplateItem/portal_alarms/promise_caucase_web_service.xml
0 → 100644
View file @
77e7f6fb
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Alarm"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_checkPromiseCaucaseService
</string>
</value>
</item>
<item>
<key>
<string>
alarm_notification_mode
</string>
</key>
<value>
<tuple>
<string>
never
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
automatic_solve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
promise_caucase_web_service
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_day_frequency
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple>
<int>
0
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month_day
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
0.0
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
periodicity_week
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Alarm
</string>
</value>
</item>
<item>
<key>
<string>
solve_method_id
</string>
</key>
<value>
<string>
Alarm_installPromiseCaucaseService
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Caucase Certificate Authority Web Service
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud_promise/Alarm_checkPromiseCaucaseService.py
0 → 100644
View file @
77e7f6fb
from
Products.CMFActivity.ActiveResult
import
ActiveResult
portal
=
context
.
getPortalObject
()
severity
=
0
summary
=
"Nothing to do."
detail
=
""
if
getattr
(
portal
,
'portal_web_services'
,
None
)
is
not
None
and
\
getattr
(
portal
.
portal_web_services
,
'caucase_adapter'
,
None
)
is
not
None
:
promise_caucase_url
=
portal
.
getPromiseParameter
(
'external_service'
,
'caucase_url'
)
if
promise_caucase_url
is
not
None
:
caucase_service
=
portal
.
portal_web_services
.
caucase_adapter
url_string
=
caucase_service
.
getUrlString
()
_
,
caucase_url
=
context
.
CaucaseRESTClient_getSecureServiceUrl
(
promise_caucase_url
)
if
not
url_string
or
not
caucase_service
.
getPassword
()
\
or
not
caucase_service
.
getUserId
():
severity
=
1
summary
=
"Caucase web service is not configured!"
detail
=
""
elif
caucase_url
.
rstrip
(
'/'
)
!=
url_string
.
rstrip
(
'/'
):
# caucase URL was modified
severity
=
1
summary
=
"Caucase web service is not configured as Expected"
detail
=
"Expect as url_string: %s
\
n
Got %s"
%
(
caucase_url
,
url_string
)
active_result
=
ActiveResult
()
active_result
.
edit
(
summary
=
summary
,
severity
=
severity
,
detail
=
detail
)
context
.
newActiveProcess
().
postResult
(
active_result
)
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud_promise/Alarm_checkPromiseCaucaseService.xml
0 → 100644
View file @
77e7f6fb
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
tag, fixit=False, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_checkPromiseCaucaseService
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud_promise/Alarm_installPromiseCaucaseService.py
0 → 100644
View file @
77e7f6fb
portal
=
context
.
getPortalObject
()
if
getattr
(
portal
,
'portal_web_services'
,
None
)
is
not
None
and
\
getattr
(
portal
.
portal_web_services
,
'caucase_adapter'
,
None
)
is
not
None
:
caucase_service
=
portal
.
portal_web_services
.
caucase_adapter
promise_caucase_url
=
portal
.
getPromiseParameter
(
'external_service'
,
'caucase_url'
)
if
promise_caucase_url
is
not
None
:
caucase_service
.
CaucaseRESTClient_configureCaucase
(
promise_caucase_url
)
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud_promise/Alarm_installPromiseCaucaseService.xml
0 → 100644
View file @
77e7f6fb
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_installPromiseCaucaseService
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/bt/template_path_list
View file @
77e7f6fb
...
...
@@ -8,6 +8,7 @@ computer_module/template_computer/**
hosting_subscription_module/template_hosting_subscription
person_module/template_member
person_module/template_member/**
portal_alarms/promise_caucase_web_service
portal_alarms/promise_slapos_module_id_generator
portal_alarms/promise_slapos_pas
portal_alarms/slapos_allocate_instance
...
...
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