services.EventsService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of model Show documentation
Show all versions of model Show documentation
Model management tools for the oVirt Engine API.
/*
Copyright (c) 2015 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package services;
import annotations.Area;
import org.ovirt.api.metamodel.annotations.In;
import org.ovirt.api.metamodel.annotations.Out;
import org.ovirt.api.metamodel.annotations.Service;
import types.Event;
@Service
@Area("Infrastructure")
public interface EventsService {
/**
* Adds an external event to the internal audit log.
*
* This is intended for integration with external systems that detect or produce events relevant for the
* administrator of the system. For example, an external monitoring tool may be able to detect that a file system
* is full inside the guest operating system of a virtual machine. This event can be added to the internal audit
* log sending a request like this:
*
* [source]
* ----
* POST /ovirt-engine/api/events
*
* File system /home is full
* alert
* mymonitor
* 1467879754
*
* ----
*
* Events can also be linked to specific objects. For example, the above event could be linked to the specific
* virtual machine where it happened, using the `vm` link:
*
* [source]
* ----
* POST /ovirt-engine/api/events
*
* File system /home is full
* alert
* mymonitor
* 1467879754
*
*
* ----
*
* NOTE: When using links, like the `vm` in the previous example, only the `id` attribute is accepted. The `name`
* attribute, if provided, is simply ignored.
*
* @author Juan Hernandez
* @date 7 Jul 2016
* @status added
*/
interface Add {
@In @Out Event event();
}
/**
* Get list of events.
*
* [source]
* ----
* GET /ovirt-engine/api/events
* ----
*
* To the above request we get following reponse:
*
* [source,xml]
* ----
*
*
* User admin@internal-authz logged out.
* 31
* 1e892ea9
* -1
* 30
* oVirt
* normal
*
*
*
*
* User admin logged in.
* 30
* 1fbd81f4
* -1
* 30
* oVirt
* normal
*
*
*
*
* ----
*
* The following events occur:
*
* * id="1" - The API logs in the admin user account.
* * id="2" - The API logs out of the admin user account.
*
* @author Piotr Kliczewski
* @date 14 Sep 2016
* @status added
*
*/
interface List {
@Out Event[] events();
/**
* Indicates the identifier of the the first event that should be returned. The identifiers of events are
* strictly increasing, so when this parameter is used only the events with that identifiers equal or greater
* than the given value will be returned. For example, the following request will return only the events
* with identifiers greater or equal than `123`:
*
* [source]
* ----
* GET /ovirt-engine/api/events?from=123
* ----
*
* This parameter is optional, and if not specified then the first event returned will be most recently
* generated.
*
* @author Juan Hernandez
* @date 6 Jul 2016
* @status added
*/
@In Integer from();
/**
* Sets the maximum number of events to return. If not specified all the events are returned.
*/
@In Integer max();
/**
* The events service provides search queries similar to other resource services.
*
* We can search by providing specific severity.
*
* [source]
* ----
* GET /ovirt-engine/api/events?search=severity%3Dnormal
* ----
*
* To the above request we get a list of events which severity is equal to `normal`:
*
* [source,xml]
* ----
*
*
* User admin@internal-authz logged out.
* 31
* 1fbd81f4
* -1
* 30
* oVirt
* normal
*
*
*
*
* Affinity Rules Enforcement Manager started.
* 10780
* -1
* 30
* oVirt
* normal
*
*
*
* ----
*
* A virtualization environment generates a large amount of events after
* a period of time. However, the API only displays a default number of
* events for one search query. To display more than the default, the API
* separates results into pages with the page command in a search query.
* The following search query tells the API to paginate results using a
* page value in combination with the sortby clause:
*
* [source]
* ----
* sortby time asc page 1
* ----
*
* Below example paginates event resources. The URL-encoded request is:
*
* [source]
* ----
* GET /ovirt-engine/api/events?search=sortby%20time%20asc%20page%201
* ----
*
* Increase the page value to view the next page of results.
*
* [source]
* ----
* GET /ovirt-engine/api/events?search=sortby%20time%20asc%20page%202
* ----
*
* @author Piotr Kliczewski
* @date 14 Sep 2016
* @status added
*/
@In String search();
/**
* Indicates if the search performed using the `search` parameter should be performed taking case into
* account. The default value is `true`, which means that case is taken into account. If you want to search
* ignoring case set it to `false`.
*/
@In Boolean caseSensitive();
}
interface Undelete {
/**
* Indicates if the un-delete should be performed asynchronously.
*/
@In Boolean async();
}
@Service EventService event(String id);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy