class OvirtSDK4::UserOptionsService
Constants
- ADD
- LIST
Public Instance Methods
Adds a new user profile property of type JSON.
Example request(for user with identifier `123`):
- source
POST /ovirt-engine/api/users/123/options
Payload:
- source,xml
<user_option> <name>SomeName</name> <content>["any", "JSON"]</content> </user_option>
@param option [UserOption] The `option` to add.
@param opts [Hash] Additional options.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
@return [UserOption]
# File lib/ovirtsdk4/services.rb, line 29736 def add(option, opts = {}) internal_add(option, UserOption, ADD, opts) end
Returns a list of user profile properties of type JSON.
Example request(for user with identifier `123`):
- source
GET /ovirt-engine/api/users/123/options
The result will be the following XML document:
- source,xml
<user_options>
<user_option href="/ovirt-engine/api/users/123/options/456" id="456"> <name>SomeName</name> <content>["any", "JSON"]</content> <user href="/ovirt-engine/api/users/123" id="123"/> </user_option>
</user_options>
@param opts [Hash] Additional options.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
given then the timeout set globally for the connection will be used.
@option opts [Boolean] :wait (true) If `true` wait for the response.
@return [Array<UserOption>]
# File lib/ovirtsdk4/services.rb, line 29781 def list(opts = {}) internal_get(LIST, opts) end
Locates the `option` service.
@param id [String] The identifier of the `option`.
@return [UserOptionService] A reference to the `option` service.
# File lib/ovirtsdk4/services.rb, line 29792 def option_service(id) UserOptionService.new(self, id) end
Locates the service corresponding to the given path.
@param path [String] The path of the service.
@return [Service] A reference to the service.
# File lib/ovirtsdk4/services.rb, line 29803 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return option_service(path) end return option_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end