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
19
Merge Requests
19
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
91caf688
Commit
91caf688
authored
Feb 17, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Desactivate dead computer
parent
8c8a57e4
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
260 additions
and
1 deletion
+260
-1
master/bt5/vifib_slap/PathTemplateItem/portal_alarms/vifib_desactivate_dead_computer.xml
...ateItem/portal_alarms/vifib_desactivate_dead_computer.xml
+103
-0
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Alarm_desactivateDeadComputer.xml
...portal_skins/vifib_slap/Alarm_desactivateDeadComputer.xml
+75
-0
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Computer_checkAndDesactivatePartitionList.xml
.../vifib_slap/Computer_checkAndDesactivatePartitionList.xml
+80
-0
master/bt5/vifib_slap/bt/revision
master/bt5/vifib_slap/bt/revision
+1
-1
master/bt5/vifib_slap/bt/template_path_list
master/bt5/vifib_slap/bt/template_path_list
+1
-0
No files found.
master/bt5/vifib_slap/PathTemplateItem/portal_alarms/vifib_desactivate_dead_computer.xml
0 → 100644
View file @
91caf688
<?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_desactivateDeadComputer
</string>
</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>
vifib_desactivate_dead_computer
</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>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<value>
<none/>
</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>
Desactivate Dead Computer
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Alarm_desactivateDeadComputer.xml
0 → 100644
View file @
91caf688
<?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>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
\n
portal.portal_catalog.searchAndActivate(\n
portal_type=\'Computer\',\n
default_allocation_scope_uid=portal.restrictedTraverse("portal_categories/allocation_scope/open/public").getUid(),\n
validation_state="validated",\n
method_id=\'Computer_checkAndDesactivatePartitionList\',\n
activate_kw={\'tag\': tag}\n
)\n
</string>
</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_desactivateDeadComputer
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Computer_checkAndDesactivatePartitionList.xml
0 → 100644
View file @
91caf688
<?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>
_body
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
computer = context\n
portal = context.getPortalObject()\n
\n
modification_date = portal.portal_workflow.getInfoFor(computer, \'time\', wf_id=\'edit_workflow\')\n
if (DateTime() - modification_date) >
1:\n
# Computer didn\'t talk to vifib for 1 days, do not consider it as a trustable public server for now\n
for partition in computer.contentValues(portal_type="Computer Partition"):\n
if partition.getSlapState() == \'free\':\n
# Desactivate partition. A new partition will be created if the computer runs slapformat\n
partition.markInactive()\n
]]>
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Computer_checkAndDesactivatePartitionList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slap/bt/revision
View file @
91caf688
570
571
\ No newline at end of file
\ No newline at end of file
master/bt5/vifib_slap/bt/template_path_list
View file @
91caf688
...
@@ -5,6 +5,7 @@ portal_alarms/stop_confirmed_sale_invoice_transaction
...
@@ -5,6 +5,7 @@ portal_alarms/stop_confirmed_sale_invoice_transaction
portal_alarms/vifib_cancel_destroy_partition
portal_alarms/vifib_cancel_destroy_partition
portal_alarms/vifib_cancel_update_partition
portal_alarms/vifib_cancel_update_partition
portal_alarms/vifib_check_consistency
portal_alarms/vifib_check_consistency
portal_alarms/vifib_desactivate_dead_computer
portal_alarms/vifib_destroy_non_instanciated_partition
portal_alarms/vifib_destroy_non_instanciated_partition
portal_alarms/vifib_lock_person
portal_alarms/vifib_lock_person
portal_alarms/vifib_lock_software_instance
portal_alarms/vifib_lock_software_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