Class: OvirtSDK4::BookmarkService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#get(opts = {}) ⇒ Bookmark
Get a bookmark.
-
#remove(opts = {}) ⇒ Object
Remove a bookmark.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#update(bookmark, opts = {}) ⇒ Bookmark
Update a bookmark.
Methods inherited from Service
Instance Method Details
#get(opts = {}) ⇒ Bookmark
Get a bookmark.
An example for getting a bookmark:
GET /ovirt-engine/api/bookmarks/123
<bookmark href="/ovirt-engine/api/bookmarks/123" id="123">
<name>example_vm</name>
<value>vm: name=example*</value>
</bookmark>
4378 4379 4380 |
# File 'lib/ovirtsdk4/services.rb', line 4378 def get(opts = {}) internal_get(GET, opts) end |
#remove(opts = {}) ⇒ Object
Remove a bookmark.
An example for removing a bookmark:
DELETE /ovirt-engine/api/bookmarks/123
4410 4411 4412 |
# File 'lib/ovirtsdk4/services.rb', line 4410 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
4467 4468 4469 4470 4471 4472 |
# File 'lib/ovirtsdk4/services.rb', line 4467 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#update(bookmark, opts = {}) ⇒ Bookmark
Update a bookmark.
An example for updating a bookmark:
PUT /ovirt-engine/api/bookmarks/123
With the request body:
<bookmark>
<name>new_example_vm</name>
<value>vm: name=new_example*</value>
</bookmark>
4456 4457 4458 |
# File 'lib/ovirtsdk4/services.rb', line 4456 def update(bookmark, opts = {}) internal_update(bookmark, Bookmark, UPDATE, opts) end |