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>
4360 4361 4362 |
# File 'lib/ovirtsdk4/services.rb', line 4360 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
4392 4393 4394 |
# File 'lib/ovirtsdk4/services.rb', line 4392 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
4449 4450 4451 4452 4453 4454 |
# File 'lib/ovirtsdk4/services.rb', line 4449 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>
4438 4439 4440 |
# File 'lib/ovirtsdk4/services.rb', line 4438 def update(bookmark, opts = {}) internal_update(bookmark, Bookmark, UPDATE, opts) end |