services.JobsService 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.Job;
/**
* A service to manage jobs.
*
* @author Moti Asayag
* @date 12 Dec 2016
* @status added
*/
@Service
@Area("Infrastructure")
public interface JobsService {
/**
* Add an external job.
*
* For example, to add a job with the following request:
*
* [source]
* ----
* POST /ovirt-engine/api/jobs
* ----
*
* With the following request body:
*
* [source,xml]
* ----
*
* Doing some work
* true
*
* ----
*
* The response should look like:
*
* [source,xml]
* ----
*
*
*
*
*
* Doing some work
*
* true
* true
* 2016-12-13T02:15:42.130+02:00
* 2016-12-13T02:15:42.130+02:00
* started
*
*
* ----
*
* @author Moti Asayag
* @date 12 Dec 2016
* @status added
*/
interface Add {
/**
* Job that will be added.
*
* @author Moti Asayag
* @date 12 Dec 2016
* @status added
*/
@In @Out Job job();
}
/**
* Retrieves the representation of the jobs.
*
* [source]
* ----
* GET /ovirt-engine/api/jobs
* ----
*
* You will receive response in XML like this one:
*
* [source,xml]
* ----
*
*
*
*
*
*
* Adding Disk
*
* true
* 2016-12-12T23:07:29.758+02:00
* false
* 2016-12-12T23:07:29.758+02:00
* 2016-12-12T23:07:26.593+02:00
* failed
*
*
* ...
*
* ----
*
* @author Moti Asayag
* @date 12 Dec 2016
* @status added
*/
interface List {
/**
* A representation of jobs.
*
* @author Moti Asayag
* @date 12 Dec 2016
* @status added
*/
@Out Job[] jobs();
/**
* Sets the maximum number of jobs to return. If not specified all the jobs are returned.
*/
@In Integer max();
}
/**
* Reference to the job service.
*
* @author Moti Asayag
* @date 12 Dec 2016
* @status added
*/
@Service JobService job(String id);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy