Class: OvirtSDK4::PermitService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#get(opts = {}) ⇒ Permit
Gets the information about the permit of the role.
-
#remove(opts = {}) ⇒ Object
Removes the permit from the role.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#get(opts = {}) ⇒ Permit
Gets the information about the permit of the role.
For example to retrieve the information about the permit with the id 456 of the role with the id 123
send a request like this:
GET /ovirt-engine/api/roles/123/permits/456 HTTP/1.1
<permit href="/ovirt-engine/api/roles/123/permits/456" id="456">
<name>change_vm_cd</name>
<administrative>false</administrative>
<role href="/ovirt-engine/api/roles/123" id="123"/>
</permit>
18742 18743 18744 |
# File 'lib/ovirtsdk4/services.rb', line 18742 def get(opts = {}) internal_get(GET, opts) end |
#remove(opts = {}) ⇒ Object
Removes the permit from the role.
For example to remove the permit with id 456 from the role with id 123 send a request like this:
DELETE /ovirt-engine/api/roles/123/permits/456 HTTP/1.1
18773 18774 18775 |
# File 'lib/ovirtsdk4/services.rb', line 18773 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
18784 18785 18786 18787 18788 18789 |
# File 'lib/ovirtsdk4/services.rb', line 18784 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |