watcherclient.common.base module

Base utilities to build API operation managers and objects on top of.

class watcherclient.common.base.Manager(api)[source]

Bases: object

Provides CRUD operations with a particular API.

resource_class = None
class watcherclient.common.base.Resource(manager, info, loaded=False)[source]

Bases: watcherclient.common.apiclient.base.Resource

Represents a particular instance of an object (tenant, user, etc).

This is pretty much just a bag for attributes.

to_dict()[source]
watcherclient.common.base.getid(obj)[source]

Wrapper to get object’s ID.

Abstracts the common pattern of allowing both an object or an object’s ID (UUID) as a parameter when dealing with relationships.