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
c86d27a9
Commit
c86d27a9
authored
Dec 06, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: propagate Remote Node requests
parent
8d7f3879
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
273 additions
and
1 deletion
+273
-1
master/bt5/slapos_cloud/PathTemplateItem/portal_alarms/slapos_cloud_propagate_remote_node_instance.xml
...al_alarms/slapos_cloud_propagate_remote_node_instance.xml
+107
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Alarm_propagateRemoteNodeInstance.py
...l_skins/slapos_cloud/Alarm_propagateRemoteNodeInstance.py
+11
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Alarm_propagateRemoteNodeInstance.xml
..._skins/slapos_cloud/Alarm_propagateRemoteNodeInstance.xml
+62
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/ComputePartition_propagateRemoteNode.py
...kins/slapos_cloud/ComputePartition_propagateRemoteNode.py
+29
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/ComputePartition_propagateRemoteNode.xml
...ins/slapos_cloud/ComputePartition_propagateRemoteNode.xml
+62
-0
master/bt5/slapos_cloud/bt/template_path_list
master/bt5/slapos_cloud/bt/template_path_list
+2
-1
No files found.
master/bt5/slapos_cloud/PathTemplateItem/portal_alarms/slapos_cloud_propagate_remote_node_instance.xml
0 → 100644
View file @
c86d27a9
<?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_propagateRemoteNodeInstance
</string>
</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>
slapos_cloud_propagate_remote_node_instance
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_day_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_hour_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<value>
<int>
5
</int>
</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>
3660.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>
title
</string>
</key>
<value>
<string>
Propagate Remote Node Instance
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Alarm_propagateRemoteNodeInstance.py
0 → 100644
View file @
c86d27a9
portal
=
context
.
getPortalObject
()
portal
.
portal_catalog
.
searchAndActivate
(
portal_type
=
'Compute Partition'
,
free_for_request
=
0
,
parent_portal_type
=
'Remote Node'
,
method_id
=
'ComputePartition_propagateRemoteNode'
,
activate_kw
=
{
'tag'
:
tag
}
)
context
.
activate
(
after_tag
=
tag
).
getId
()
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Alarm_propagateRemoteNodeInstance.xml
0 → 100644
View file @
c86d27a9
<?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, params
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_propagateRemoteNodeInstance
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/ComputePartition_propagateRemoteNode.py
0 → 100644
View file @
c86d27a9
portal
=
context
.
getPortalObject
()
compute_partition
=
context
remote_node
=
compute_partition
.
getParentValue
()
assert
remote_node
.
getPortalType
()
==
'Remote Node'
remote_project
=
remote_node
.
getDestinationProjectValue
(
portal_type
=
'Project'
)
remote_person
=
remote_node
.
getDestinationSectionValue
(
portal_type
=
'Person'
)
local_instance
=
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Software Instance'
,
aggregate__uid
=
compute_partition
.
getUid
()
)
# XXX TODO this will increase the workflow history
# Use the 'cached' API instead
remote_person
.
requestSoftwareInstance
(
project_reference
=
remote_project
.
getReference
(),
software_release
=
local_instance
.
getUrlString
(),
software_title
=
'_remote_%s_%s'
%
(
remote_node
.
getFollowUpReference
(),
local_instance
.
getReference
()),
software_type
=
local_instance
.
getSourceReference
(),
instance_xml
=
local_instance
.
getTextContent
(),
sla_xml
=
None
,
shared
=
False
,
state
=
{
'start_requested'
:
'started'
,
'stop_requested'
:
'stopped'
}[
local_instance
.
getSlapState
()]
)
requested_software_instance
=
context
.
REQUEST
.
get
(
'request_instance'
)
if
requested_software_instance
is
not
None
:
local_instance
.
setConnectionXml
(
requested_software_instance
.
getConnectionXml
())
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/ComputePartition_propagateRemoteNode.xml
0 → 100644
View file @
c86d27a9
<?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>
ComputePartition_propagateRemoteNode
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/bt/template_path_list
View file @
c86d27a9
...
@@ -12,6 +12,7 @@ person_module/template_member/**
...
@@ -12,6 +12,7 @@ person_module/template_member/**
portal_alarms/slapos_allocate_instance
portal_alarms/slapos_allocate_instance
portal_alarms/slapos_assert_instance_tree_successor
portal_alarms/slapos_assert_instance_tree_successor
portal_alarms/slapos_cloud_invalidate_destroyed_instance
portal_alarms/slapos_cloud_invalidate_destroyed_instance
portal_alarms/slapos_cloud_propagate_remote_node_instance
portal_alarms/slapos_free_compute_partition
portal_alarms/slapos_free_compute_partition
portal_alarms/slapos_garbage_collect_destroy_unlinked_instance
portal_alarms/slapos_garbage_collect_destroy_unlinked_instance
portal_alarms/slapos_garbage_collect_destroyed_root_tree
portal_alarms/slapos_garbage_collect_destroyed_root_tree
...
...
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