Class: OvirtSDK4::EventService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#get(opts = {}) ⇒ Event
Get an event.
-
#remove(opts = {}) ⇒ Object
Removes an event from internal audit log.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#get(opts = {}) ⇒ Event
Get an event.
An example of getting an event:
GET /ovirt-engine/api/events/123 HTTP/1.1
<event href="/ovirt-engine/api/events/123" id="123">
<description>Host example.com was added by admin@internal-authz.</description>
<code>42</code>
<correlation_id>135</correlation_id>
<custom_id>-1</custom_id>
<flood_rate>30</flood_rate>
<origin>oVirt</origin>
<severity>normal</severity>
<time>2016-12-11T11:13:44.654+02:00</time>
<cluster href="/ovirt-engine/api/clusters/456" id="456"/>
<host href="/ovirt-engine/api/hosts/789" id="789"/>
<user href="/ovirt-engine/api/users/987" id="987"/>
</event>
Note that the number of fields changes according to the information that resides on the event. For example, for storage domain related events you will get the storage domain reference, as well as the reference for the data center this storage domain resides in.
8552 8553 8554 |
# File 'lib/ovirtsdk4/services.rb', line 8552 def get(opts = {}) internal_get(GET, opts) end |
#remove(opts = {}) ⇒ Object
Removes an event from internal audit log.
An event can be removed by sending following request
DELETE /ovirt-engine/api/events/123 HTTP/1.1
8583 8584 8585 |
# File 'lib/ovirtsdk4/services.rb', line 8583 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
8594 8595 8596 8597 8598 8599 |
# File 'lib/ovirtsdk4/services.rb', line 8594 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |