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>
3796 3797 3798 |
# File 'lib/ovirtsdk4/services.rb', line 3796 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
3828 3829 3830 |
# File 'lib/ovirtsdk4/services.rb', line 3828 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
3885 3886 3887 3888 3889 3890 |
# File 'lib/ovirtsdk4/services.rb', line 3885 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>
3874 3875 3876 |
# File 'lib/ovirtsdk4/services.rb', line 3874 def update(bookmark, opts = {}) internal_update(bookmark, Bookmark, UPDATE, opts) end |