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
Léo-Paul Géneau
slapos.core
Commits
77968c0b
Commit
77968c0b
authored
Jun 26, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: Only raise tickets for started instances
Stop or Destroyed instances don't required checks.
parent
8e4169d6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/HostingSubscription_checkSoftwareInstanceState.py
...itoring/HostingSubscription_checkSoftwareInstanceState.py
+1
-0
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
...slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
+3
-2
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/HostingSubscription_checkSoftwareInstanceState.py
View file @
77968c0b
...
...
@@ -37,6 +37,7 @@ for instance in software_instance_list:
has_newest_allocated_instance
=
True
if
instance
.
getPortalType
()
==
"Software Instance"
and
\
computer_partition
.
getParentValue
().
getAllocationScope
()
in
[
"open/friend"
,
"open/public"
]
and
\
instance
.
getSlapState
()
==
"start_requested"
and
\
instance
.
SoftwareInstance_hasReportedError
():
return
context
.
HostingSubscription_createSupportRequestEvent
(
instance
,
'slapos-crm-hosting-subscription-instance-state.notification'
)
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_recheckMonitoring.py
View file @
77968c0b
...
...
@@ -55,17 +55,18 @@ if aggregate_portal_type == "Hosting Subscription":
if
instance
.
getSlapState
()
not
in
[
"start_requested"
,
"stop_requested"
]:
continue
if
instance
.
getAggregate
Value
()
is
not
None
:
if
instance
.
getAggregate
()
is
not
None
:
has_newest_allocated_instance
=
True
computer
=
instance
.
getAggregateValue
().
getParentValue
()
if
instance
.
getPortalType
()
==
"Software Instance"
and
\
computer
.
getAllocationScope
()
in
[
"open/public"
,
"open/friend"
]
and
\
instance
.
getSlapState
()
==
"start_requested"
and
\
instance
.
SoftwareInstance_hasReportedError
():
message_list
.
append
(
"%s has error (%s, %s at %s scope %s)"
%
(
instance
.
getReference
(),
instance
.
getTitle
(),
instance
.
getUrlString
(),
computer
.
getReference
(),
computer
.
getAllocationScope
()))
if
instance
.
getPortalType
()
==
"Software Instance"
and
\
instance
.
getAggregateValue
().
getParentValue
()
.
getAllocationScope
()
in
[
"closed/outdated"
,
"open/personal"
]:
computer
.
getAllocationScope
()
in
[
"closed/outdated"
,
"open/personal"
]:
message_list
.
append
(
"%s on a %s computer"
%
(
instance
,
computer
.
getAllocationScope
())
)
else
:
message_list
.
append
(
"%s is not allocated"
%
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