NAME
Net::OpenStack::Client::Request is an request class for Net::OpenStack.
Boolean logic is overloaded using _boolean method (as inverse of is_error).
Public functions
- mkrequest
-
A
Net::OpenStack::Client::Requestfactory - parse_endpoint
-
Parse
endpointand look for templates and parameters.Return (possibly modified) endpoint, arrayref of template names and arrayref of parameter names.
If
loggeris passed, report an error and return; else die on failure.
Public methods
- new
-
Create new request instance from options for command
endpointand REST HTTPmethod.The
endpointis the URL to use (can be templated withtpls)Options
- endpoint
-
Parses the endpoint attribute, look for any templates, and replace them with values from
tplsattribute hashref. Any parameters defined in the endpoint are removed, and only those that are present in theparamsattribute are readded with the values from the attribute.The data can contain more keys than what is required for templating, those keys and their values will be ignored.
This does not modify the endpoint attribute.
Return templated endpoint on success or undef on failure.
If host is defined, try to make a full URL
- opts_data
-
Generate hashref from options, to be used for JSON encoding. If
rawattribute is defined, ignore all options and return it.Returns empty hasref, even if no options existed.
- headers
-
Return headers for the request.
Supported options:
- is_error
-
Test if this is an error or not (based on error attribute).