The glanceclient.common.base Module

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

class glanceclient.common.base.Manager(api)

Bases: object

Managers interact with a particular type of API (servers, flavors, images, etc.) and provide CRUD operations for them.

resource_class = None
class glanceclient.common.base.Resource(manager, info, loaded=False)

Bases: object

A resource represents a particular instance of an object (tenant, user, etc). This is pretty much just a bag for attributes.

Parameters:
  • manager – Manager object
  • info – dictionary representing resource attributes
  • loaded – prevent lazy-loading if set to True
get()
is_loaded()
set_loaded(val)
to_dict()
glanceclient.common.base.getid(obj)

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

This Page