Invoking RAD Interface Methods

To invoke a method supported by an interface in a URI, include the method name and an ordered list of arguments in the request. The response includes any results or errors returned by the interface method.

Example 3-3 Listing the anet Properties of a Zone in RAD

The following example shows how to get the anet properties of a zone and the sample response.

# curl -H 'Content-Type:application/json' -X PUT \
https://radserver.example.com/api/com.oracle.solaris.rad.zonemgr/1.6/Zone/testzone1/_rad_method/getResourceProperties \
--data '{"filter": {"type": "anet"}}'

Sample output:

{
        "status": "success",
        "payload": [
                {
                        "name": "linkname",
                        "value": "net0",
                        "type": "PROP_SIMPLE",
                        "listvalue": null,
                        "complexvalue": null
                },
                {
                        "name": "lower-link",
                        "value": "auto",
                        "type": "PROP_SIMPLE",
                        "listvalue": null,
                        "complexvalue": null
                },.....
....]}

In this example, the getResourceProperties method of the Zone interface is invoked. For more information about the methods supported by the Zone interface, see the zonemgr(3RAD) man page.

Note:

When using the _rad_method parameter, the request should be of type PUT.