cowbird.services.service

Module Contents

Classes

Service

Helper class that provides a standard way to create an ABC using

Attributes

SERVICE_PRIORITY_PARAM

SERVICE_URL_PARAM

SERVICE_WORKSPACE_DIR_PARAM

SERVICE_PARAMETERS

LOGGER

cowbird.services.service.SERVICE_PRIORITY_PARAM = priority[source]
cowbird.services.service.SERVICE_URL_PARAM = url[source]
cowbird.services.service.SERVICE_WORKSPACE_DIR_PARAM = workspace_dir[source]
cowbird.services.service.SERVICE_PARAMETERS[source]
cowbird.services.service.LOGGER[source]
exception cowbird.services.service.ServiceConfigurationException[source]

Bases: Exception

Exception thrown when a service cannot be instantiated because of a bad configuration.

Initialize self. See help(type(self)) for accurate signature.

class cowbird.services.service.Service(name, **kwargs)[source]

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

@param name: Service name @param kwargs: The base class handle, but doesn’t require the following variables:

param priority: Relative priority between services while handling events

(lower value has higher priority, default value is last)

param url: Location of the web service represented by the cowbird service param workspace_dir:

__slots__[source]

Service interface used to notify implemented services of users/permissions changes.

Todo

At some point we will need a consistency function that goes through all Magpie users and make sure that services are up to date.

json(self)[source]
_user_workspace_dir(self, user_name)[source]
abstract get_resource_id(self, resource_full_name)[source]

Each service must provide this implementation required by the permission synchronizer.

The function needs to find the resource id in Magpie from the resource full name using its knowledge of the service. If the resource doesn’t already exist, the function needs to create it, again using its knowledge of resource type and parent resource type if required.

abstract user_created(self, user_name)[source]
abstract user_deleted(self, user_name)[source]
abstract permission_created(self, permission)[source]
abstract permission_deleted(self, permission)[source]