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>
3811 3812 3813 |
# File 'lib/ovirtsdk4/services.rb', line 3811 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
3843 3844 3845 |
# File 'lib/ovirtsdk4/services.rb', line 3843 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
3900 3901 3902 3903 3904 3905 |
# File 'lib/ovirtsdk4/services.rb', line 3900 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>
3889 3890 3891 |
# File 'lib/ovirtsdk4/services.rb', line 3889 def update(bookmark, opts = {}) internal_update(bookmark, Bookmark, UPDATE, opts) end |