NAME
Net::FreeIPA::RPC provides RPC handling for Net::FreeIPA
Public methods
- new_rpc
-
Create a new REST::Client instance, will be used throughout the remainder of the instance.
An authentication cookie will be retrieved (and will be used for the actual FreeIPA API calls).
Returns undef on failure, 1 on success.
- set_apiversion
-
Set the API version for this session.
If no version string is passed, the
api_version
attribute is set to undef (effecitively removing it), and this is typically interpreted by the server as using the latest version.If the string
API
is passed as version, it will use verison fromNet::FreeIPA::API
.If the version is a
version
instance, the used version is stringified and any leading 'v' is removed.Returns the version that was set version on success, undef otherwise. (If you want to get the current version, use the
api_version
attribute. This method will always set a version.) - post
-
Make a JSON API post using
request
.Return Response instance, undef on failure to get the REST client via the
rc
attribute. - rpc
-
Make a JSON API rpc call. Returns response on successful POST (and no error attribute is set, even if the answer contains an error), undef otherwise (and the error attribute is set).
Arguments
Options
- result_path: passed to the response
- noerror
-
An array ref with errorcodes or errornames that are not reported as an error. (Still return
undef
).
Response is stored in the response attribute (and is reset).
- get_api_commands
-
Retrieve the API commands metadata.
The result attribute holds the commands hashref.
Returns commands hasref on success, undef on failure.
- get_api_version
-
Retrieve the API version from the server.
The result attribute holds the version.
(To retrieve the latest version remove the
api_version
attribute first).Does not set the version.
Returns the
api_version
on success, undef on failure.