Update for merge and make additional interface improvements

This commit is contained in:
Joseph Schorr 2017-07-19 11:05:50 -04:00
parent 543cba352b
commit e7d6e60d97
10 changed files with 85 additions and 170 deletions

View file

@ -19,12 +19,12 @@ class RepositoryNotification(
"""
RepositoryNotification represents a notification for a repository.
:type uuid: string
:type event: string
:type method: string
:type config: string
:type title: string
:type event: string
:type method: string
:type config: string
:type title: string
:type event_config: string
:type number_of_failures: int
:type number_of_failures: int
"""
def to_dict(self):
try:
@ -53,11 +53,11 @@ class RepoNotificationInterface(object):
"""
Interface that represents all data store interactions required by the RepositoryNotification API
"""
@abstractmethod
def create_repo_notification(self, namespace_name, repository_name, event_name, method_name, method_config, event_config, title=None):
"""
Args:
namespace_name: namespace of repository
repository_name: name of repository
@ -72,11 +72,11 @@ class RepoNotificationInterface(object):
"""
pass
@abstractmethod
def list_repo_notifications(self, namespace_name, repository_name, event_name=None):
"""
Args:
namespace_name: namespace of repository
repository_name: name of repository
@ -86,11 +86,11 @@ class RepoNotificationInterface(object):
list(RepositoryNotification)
"""
pass
@abstractmethod
def get_repo_notification(self, uuid):
"""
Args:
uuid: uuid of notification
@ -98,47 +98,47 @@ class RepoNotificationInterface(object):
RepositoryNotification or None
"""
pass
pass
@abstractmethod
def delete_repo_notification(self, namespace_name, repository_name, uuid):
"""
Args:
namespace_name: namespace of repository
repository_name: name of repository
uuid: uuid of notification
Returns:
RepositoryNotification or None
"""
pass
@abstractmethod
def reset_notification_number_of_failures(self, namespace_name, repository_name, uuid):
"""
Args:
namespace_name: namespace of repository
repository_name: name of repository
uuid: uuid of notification
Returns:
RepositoryNotification
"""
pass
@abstractmethod
def queue_test_notification(self, uuid):
"""
Args:
uuid: uuid of notification
Returns:
RepositoryNotification or None
"""
pass