Class: OvirtSDK4::AssignedTagService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#get(opts = {}) ⇒ Tag
Gets the information about the assigned tag.
-
#remove(opts = {}) ⇒ Object
Unassign tag from specific entity in the system.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#get(opts = {}) ⇒ Tag
Gets the information about the assigned tag.
For example to retrieve the information about the tag with the id 456 which is assigned to virtual machine
with id 123 send a request like this:
GET /ovirt-engine/api/vms/123//456
<tag href="/ovirt-engine/api/tags/456" id="456">
<name>root</name>
<description>root</description>
<vm href="/ovirt-engine/api/vms/123" id="123"/>
</tag>
3367 3368 3369 |
# File 'lib/ovirtsdk4/services.rb', line 3367 def get(opts = {}) internal_get(GET, opts) end |
#remove(opts = {}) ⇒ Object
Unassign tag from specific entity in the system.
For example to unassign the tag with id 456 from virtual machine with id 123 send a request like this:
DELETE /ovirt-engine/api/vms/123//456
3398 3399 3400 |
# File 'lib/ovirtsdk4/services.rb', line 3398 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
3409 3410 3411 3412 3413 3414 |
# File 'lib/ovirtsdk4/services.rb', line 3409 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |