ironic.api.expose module

ironic.api.expose module

class ironic.api.expose.JSonRenderer(extra_vars)[source]

Bases: object

static render(template_path, namespace)[source]
ironic.api.expose.encode_error(context, errordetail)[source]
ironic.api.expose.encode_result(value, datatype, **options)[source]
ironic.api.expose.expose(*args, **kwargs)[source]
ironic.api.expose.format_exception(excinfo, debug=False)[source]

Extract informations that can be sent to the client.

ironic.api.expose.tojson(datatype, value)[source]

A generic converter from python to jsonify-able datatypes.

class ironic.api.expose.validate(*param_types)[source]

Bases: object

Decorator that define the arguments types of a function.

Example:

class MyController(object):
    @expose(str)
    @validate(datetime.date, datetime.time)
    def format(self, d, t):
        return d.isoformat() + ' ' + t.isoformat()
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.