The ironic_inspector.api_tools Module

Generic Rest Api tools.

ironic_inspector.api_tools.limit_field(*args, **kwargs)[source]

Fetch the pagination limit field from flask.request.args.

Returns:the limit
ironic_inspector.api_tools.marker_field(*args, **kwargs)[source]

Fetch the pagination marker field from flask.request.args.

Returns:an uuid
ironic_inspector.api_tools.raises_coercion_exceptions(fn)[source]

Convert coercion function exceptions to utils.Error.

Raises:utils.Error when the coercion function raises an AssertionError or a ValueError
ironic_inspector.api_tools.request_field(field_name)[source]

Decorate a function that coerces the specified field.

Parameters:field_name – name of the field to fetch
Returns:a decorator