congress.api.table_model module

congress.api.table_model module

class congress.api.table_model.TableModel(name, bus=None)

Bases: congress.api.base.APIModel

Model for handling API requests about Tables.

get_item(id_, params, context=None)

Retrieve item with id id_ from model.

Param:id_: The ID of the item to retrieve
Param:params: A dict-like object containing parameters from the request query string and body.
Param:context: Key-values providing frame of reference of request
Returns:The matching item or None if item with id_ does not exist.
get_items(params, context=None)

Get items in model.

Param:params: A dict-like object containing parameters from the request query string and body.
Param:context: Key-values providing frame of reference of request
Returns:A dict containing at least a ‘results’ key whose value is a list of items in the model. Additional keys set in the dict will also be rendered for the user.
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.