Class: OvirtSDK4::TagService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#get(opts = {}) ⇒ Tag
Gets the information about the tag.
-
#remove(opts = {}) ⇒ Object
Removes the tag from the system.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#update(tag, opts = {}) ⇒ Tag
Updates the tag entity.
Methods inherited from Service
Instance Method Details
#get(opts = {}) ⇒ Tag
Gets the information about the tag.
For example to retrieve the information about the tag with the id 123
send a request like this:
GET /ovirt-engine/api/tags/123
<tag href="/ovirt-engine/api/tags/123" id="123">
<name>root</name>
<description>root</description>
</tag>
26805 26806 26807 |
# File 'lib/ovirtsdk4/services.rb', line 26805 def get(opts = {}) internal_get(GET, opts) end |
#remove(opts = {}) ⇒ Object
Removes the tag from the system.
For example to remove the tag with id 123
send a request like this:
DELETE /ovirt-engine/api/tags/123
26836 26837 26838 |
# File 'lib/ovirtsdk4/services.rb', line 26836 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
26903 26904 26905 26906 26907 26908 |
# File 'lib/ovirtsdk4/services.rb', line 26903 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#update(tag, opts = {}) ⇒ Tag
Updates the tag entity.
For example to update parent tag to tag with id 456
of the tag with id 123
send a request like this:
PUT /ovirt-engine/api/tags/123
With request body like:
<tag>
<parent id="456"/>
</tag>
You may also specify a tag name instead of id. For example to update parent tag to tag with name mytag
of the tag with id 123
send a request like this:
<tag>
<parent>
<name>mytag</name>
</parent>
</tag>
26892 26893 26894 |
# File 'lib/ovirtsdk4/services.rb', line 26892 def update(tag, opts = {}) internal_update(tag, Tag, UPDATE, opts) end |