Class DataCentersServiceImpl
- java.lang.Object
-
- org.ovirt.engine.sdk4.internal.services.ServiceImpl
-
- org.ovirt.engine.sdk4.internal.services.DataCentersServiceImpl
-
- All Implemented Interfaces:
Service
,DataCentersService
public class DataCentersServiceImpl extends ServiceImpl implements DataCentersService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ovirt.engine.sdk4.services.DataCentersService
DataCentersService.AddRequest, DataCentersService.AddResponse, DataCentersService.ListRequest, DataCentersService.ListResponse
-
-
Constructor Summary
Constructors Constructor Description DataCentersServiceImpl(HttpConnection connection, String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataCentersService.AddRequest
add()
Creates a new data center.DataCenterService
dataCenterService(String id)
Reference to the service that manages a specific data center.DataCentersService.ListRequest
list()
Lists the data centers.Service
service(String path)
Service locator method, returns individual service on which the URI is dispatched.String
toString()
-
Methods inherited from class org.ovirt.engine.sdk4.internal.services.ServiceImpl
checkAction, checkFault, getConnection, getPath, throwError
-
-
-
-
Constructor Detail
-
DataCentersServiceImpl
public DataCentersServiceImpl(HttpConnection connection, String path)
-
-
Method Detail
-
add
public DataCentersService.AddRequest add()
Description copied from interface:DataCentersService
Creates a new data center. Creation of a new data center requires the `name` and `local` elements. For example, to create a data center named `mydc` that uses shared storage (NFS, iSCSI or fibre channel) send a request like this: [source] ---- POST /ovirt-engine/api/datacenters ---- With a request body like this: [source,xml] ----mydc false - Specified by:
add
in interfaceDataCentersService
-
list
public DataCentersService.ListRequest list()
Description copied from interface:DataCentersService
Lists the data centers. The following request retrieves a representation of the data centers: [source] ---- GET /ovirt-engine/api/datacenters ---- The above request performed with `curl`: [source,bash] ---- curl \ --request GET \ --cacert /etc/pki/ovirt-engine/ca.pem \ --header "Version: 4" \ --header "Accept: application/xml" \ --user "admin@internal:mypassword" \ https://myengine.example.com/ovirt-engine/api/datacenters ---- This is what an example response could look like: [source,xml] ----Default The default Data Center false disabled up 4 0 4 0 - Specified by:
list
in interfaceDataCentersService
-
dataCenterService
public DataCenterService dataCenterService(String id)
Description copied from interface:DataCentersService
Reference to the service that manages a specific data center.- Specified by:
dataCenterService
in interfaceDataCentersService
-
service
public Service service(String path)
Description copied from interface:DataCentersService
Service locator method, returns individual service on which the URI is dispatched.- Specified by:
service
in interfaceDataCentersService
-
-