Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

Commit

Permalink
Add rules for Autocloud
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanchowdhury committed Sep 8, 2016
1 parent 1799f87 commit 6191e49
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
1 change: 1 addition & 0 deletions fmn/rules/__init__.py
@@ -1,6 +1,7 @@
from fmn.rules.anitya import *
from fmn.rules.ansible import *
from fmn.rules.askbot import *
from fmn.rules.autocloud import *
from fmn.rules.bodhi import *
from fmn.rules.bugzilla import *
from fmn.rules.buildsys import *
Expand Down
78 changes: 78 additions & 0 deletions fmn/rules/autocloud.py
@@ -0,0 +1,78 @@
from fmn.lib.hinting import hint, prefixed as _


@hint(topics=[_('autocloud.compose.queued')])
def autocloud_compose_test_queued(config, message):
""" Autocloud: A compose has been queued for testing
Adding this rule will let through notifications from the
`Autocloud <https://apps.fedoraproject.org/autocloud/>`
indicating the *compose test* has been queued.
"""
return message['topic'].endswith('autocloud.compose.queued')


@hint(topics=[_('autocloud.compose.running')])
def autocloud_compose_test_running(config, message):
""" Autocloud: The tests for the compose are running
Adding this rule will let through notifications from the
`Autocloud <https://apps.fedoraproject.org/autocloud/>`
indicating the *compose test* has started running.
"""
return message['topic'].endswith('autocloud.compose.running')


@hint(topics=[_('autocloud.compose.complete')])
def autocloud_compose_test_completed(config, message):
""" Autocloud: The tests for the compose has completed
Adding this rule will let through notifications from the
`Autocloud <https://apps.fedoraproject.org/autocloud/>`
indicating the *compose test* has completed.
"""
return message['topic'].endswith('autocloud.compose.complete')


@hint(topics=[_('autocloud.image.failed')])
def autocloud_image_test_failed(config, message):
""" Autocloud: The tests for an image failed
Adding this rule will let through notifications from the
`Autocloud <https://apps.fedoraproject.org/autocloud/>`
indicating the tests for an *image* failed.
"""
return message['topic'].endswith('autocloud.image.failed')


@hint(topics=[_('autocloud.image.queued')])
def autocloud_image_test_queued(config, message):
""" Autocloud: The image is queued for testing
Adding this rule will let through notifications from the
`Autocloud <https://apps.fedoraproject.org/autocloud/>`
indicating the *image* is queued for testing.
"""
return message['topic'].endswith('autocloud.image.queued')


@hint(topics=[_('autocloud.image.running')])
def autocloud_image_test_running(config, message):
""" Autocloud: The tests for the image is running
Adding this rule will let through notifications from the
`Autocloud <https://apps.fedoraproject.org/autocloud/>`
indicating the tests for the *image* is running.
"""
return message['topic'].endswith('autocloud.image.running')


@hint(topics=[_('autocloud.image.success')])
def autocloud_image_test_success(config, message):
""" Autocloud: The test for the image completed successfully
Adding this rule will let through notifications from the
`Autocloud <https://apps.fedoraproject.org/autocloud/>`
indicating the tests for the *image* completed successfully.
"""
return message['topic'].endswith('autocloud.image.success')

0 comments on commit 6191e49

Please sign in to comment.