Net::OpenStack::Client::API::Convert provides type conversion for Net::OpenStack

Public functions


Convert/cast value to type.

If a type is not found in the dispatch table, log a warning and return the value as-is.

Always returns value, dies when dealing with non-convertable type (using 'FATAL numeric').


Given the (single) option hashref option and value, verify the value, convert it and add it to where.

(Adding to where is required to avoid using intermediadate variables which can cause problems for the internal types).

Returns errormessage (which is undef on success).


Given the command hashref cmdhs and the arguments passed, return Request instance.

Command hashref

templates (optional)
parameters (optional)
options (optional)

(All options starting with __ are passed as options to Net::OpenStack::Client::REST::rest, with __ prefix removed).

Request instance:

error: an error message in case of failure
tpls: hashref with templates for endpoint
params: hashref with parameters for endpoint
opts: hashref with options
rest: hashref with options for the REST call

Values are converted using convert function.