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
eee63a74
Commit
eee63a74
authored
Jul 28, 2014
by
Alain Takoudjou
Committed by
Rafael Monnerat
Nov 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename HostingSubscription_checkSofwareInstanceState, set alarm period to 30 minutes
parent
a4b00c88
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
master/bt5/slapos_crm/PathTemplateItem/portal_alarms/slapos_crm_check_partially_allocated_instance.xml
..._alarms/slapos_crm_check_partially_allocated_instance.xml
+5
-5
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Alarm_findAndNofitiyUnallocatedSoftwareInstance.xml
...s_crm/Alarm_findAndNofitiyUnallocatedSoftwareInstance.xml
+5
-4
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/HostingSubscription_checkSofwareInstanceAllocationState.xml
...stingSubscription_checkSofwareInstanceAllocationState.xml
+4
-5
master/bt5/slapos_crm/bt/revision
master/bt5/slapos_crm/bt/revision
+1
-1
No files found.
master/bt5/slapos_crm/PathTemplateItem/portal_alarms/slapos_crm_check_partially_allocated_instance.xml
View file @
eee63a74
...
@@ -26,13 +26,15 @@
...
@@ -26,13 +26,15 @@
<key>
<string>
periodicity_hour
</string>
</key>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<value>
<tuple>
<tuple>
<int>
1
</int>
<int>
0
</int>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
periodicity_hour_frequency
</string>
</key>
<key>
<string>
periodicity_hour_frequency
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<none/>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<key>
<string>
periodicity_minute
</string>
</key>
...
@@ -44,9 +46,7 @@
...
@@ -44,9 +46,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<value>
<value>
<int>
30
</int>
</value>
<none/>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
periodicity_month
</string>
</key>
<key>
<string>
periodicity_month
</string>
</key>
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Alarm_findAndNofitiyUnallocatedSoftwareInstance.xml
View file @
eee63a74
...
@@ -63,20 +63,21 @@ software_instance_list = context.portal_catalog(\n
...
@@ -63,20 +63,21 @@ software_instance_list = context.portal_catalog(\n
# XXX slap_state=["start_requested", "stop_requested"],\n
# XXX slap_state=["start_requested", "stop_requested"],\n
default_aggregate_uid=None,\n
default_aggregate_uid=None,\n
select_dict=select_dict,\n
select_dict=select_dict,\n
left_join_list=select_dict.keys()\n
left_join_list=select_dict.keys(),\n
group_by="specialise_uid"\n
)\n
)\n
\n
\n
#Get the list of concerned Hosting Subscription reference\n
#Get the list of concerned Hosting Subscription reference\n
hs_reference_list =
set(
[si.getSpecialiseReference() for si in software_instance_list \n
hs_reference_list = [si.getSpecialiseReference() for si in software_instance_list \n
if si.getSlapState() in [\'start_requested\', \'stop_requested\']\n
if si.getSlapState() in [\'start_requested\', \'stop_requested\']\n
]
)
\n
]\n
\n
\n
if len(hs_reference_list) >
0:\n
if len(hs_reference_list) >
0:\n
portal.portal_catalog.searchAndActivate(\n
portal.portal_catalog.searchAndActivate(\n
portal_type=\'Hosting Subscription\',\n
portal_type=\'Hosting Subscription\',\n
validation_state=\'validated\',\n
validation_state=\'validated\',\n
reference=hs_reference_list,\n
reference=hs_reference_list,\n
method_id=\'HostingSubscription_checkSofwareInstanceState\',\n
method_id=\'HostingSubscription_checkSofwareInstance
Allocation
State\',\n
activate_kw = {\'tag\':tag}\n
activate_kw = {\'tag\':tag}\n
)\n
)\n
\n
\n
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/HostingSubscription_checkSofwareInstanceState.xml
→
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/HostingSubscription_checkSofwareInstance
Allocation
State.xml
View file @
eee63a74
...
@@ -88,11 +88,10 @@ for instance in software_instance_list:\n
...
@@ -88,11 +88,10 @@ for instance in software_instance_list:\n
\n
\n
if
has_unallocated_instance
and
has_newest_allocated_instance:\n
if
has_unallocated_instance
and
has_newest_allocated_instance:\n
return
context.Base_generateSupportRequestForSlapOS(\n
return
context.Base_generateSupportRequestForSlapOS(\n
"Hosting
Subscription
%s
(%s)
is
partially
allocated"
%
(hs_title,\n
"Hosting
Subscription
%s
is
partially
allocated"
%
hs_title,\n
hosting_subscription.getReference()),\n
"%s
has
allocated
instance(s)
but,
the
instance
%s
(%s)
has
been
unallocated
for
more
than
4
hours."
%
(\n
"%s
has
allocated
instance(s)
but,
instance
%s
(%s)
has
been
unallocated
for
more
than
4
hours."
%
(\n
hs_title,
failing_instance.getTitle(),
failing_instance.getAbsoluteUrl()),\n
hs_title,
failing_instance.getTitle(),
failing_instance.getAbsoluteUrl()),\n
source_instance
.getRelativeUrl())\n
hosting_subscription
.getRelativeUrl())\n
else:\n
else:\n
return\n
return\n
...
@@ -105,7 +104,7 @@ else:\n
...
@@ -105,7 +104,7 @@ else:\n
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
HostingSubscription_checkSofwareInstanceState
</string>
</value>
<value>
<string>
HostingSubscription_checkSofwareInstance
Allocation
State
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/slapos_crm/bt/revision
View file @
eee63a74
38
39
\ No newline at end of file
\ No newline at end of file
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