Search in sources :

Example 41 with StatusOnlyReturn

use of org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn in project ovirt-engine by oVirt.

the class JsonRpcIIrsServer method setStorageDomainDescription.

@Override
public StatusOnlyReturn setStorageDomainDescription(String sdUUID, String description) {
    JsonRpcRequest request = new RequestBuilder("StorageDomain.setDescription").withParameter("storagedomainID", sdUUID).withParameter("description", description).build();
    Map<String, Object> response = new FutureMap(this.client, request);
    return new StatusOnlyReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) StatusOnlyReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)

Example 42 with StatusOnlyReturn

use of org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn in project ovirt-engine by oVirt.

the class JsonRpcIIrsServer method destroyStoragePool.

@Override
public StatusOnlyReturn destroyStoragePool(String spUUID, int hostSpmId, String SCSIKey) {
    JsonRpcRequest request = new RequestBuilder("StoragePool.destroy").withParameter("storagepoolID", spUUID).withParameter("hostID", hostSpmId).withParameter("scsiKey", SCSIKey).build();
    Map<String, Object> response = new FutureMap(this.client, request);
    return new StatusOnlyReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) StatusOnlyReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)

Example 43 with StatusOnlyReturn

use of org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn in project ovirt-engine by oVirt.

the class JsonRpcIIrsServer method setVolumeDescription.

@Override
public StatusOnlyReturn setVolumeDescription(String sdUUID, String spUUID, String imgGUID, String volUUID, String description) {
    JsonRpcRequest request = new RequestBuilder("Volume.setDescription").withParameter("volumeID", volUUID).withParameter("storagepoolID", spUUID).withParameter("storagedomainID", sdUUID).withParameter("imageID", imgGUID).withParameter("description", description).build();
    Map<String, Object> response = new FutureMap(this.client, request);
    return new StatusOnlyReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) StatusOnlyReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)

Example 44 with StatusOnlyReturn

use of org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn in project ovirt-engine by oVirt.

the class JsonRpcIIrsServer method updateVMInImportExport.

@SuppressWarnings("rawtypes")
@Override
public StatusOnlyReturn updateVMInImportExport(String spUUID, Map[] vms, String StorageDomainId) {
    JsonRpcRequest request = new RequestBuilder("StoragePool.updateVMs").withParameter("storagepoolID", spUUID).withParameter("vmList", new ArrayList<>(Arrays.asList(vms))).withOptionalParameter("storagedomainID", StorageDomainId).build();
    Map<String, Object> response = new FutureMap(this.client, request);
    return new StatusOnlyReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) StatusOnlyReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)

Example 45 with StatusOnlyReturn

use of org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn in project ovirt-engine by oVirt.

the class JsonRpcIIrsServer method upgradeStoragePool.

@Override
public StatusOnlyReturn upgradeStoragePool(String storagePoolId, String targetVersion) {
    JsonRpcRequest request = new RequestBuilder("StoragePool.upgrade").withParameter("storagepoolID", storagePoolId).withParameter("targetDomVersion", targetVersion).build();
    Map<String, Object> response = new FutureMap(this.client, request);
    return new StatusOnlyReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) StatusOnlyReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)

Aggregations

StatusOnlyReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)118 JsonRpcRequest (org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest)117 RequestBuilder (org.ovirt.vdsm.jsonrpc.client.RequestBuilder)117 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)2 FutureTask (java.util.concurrent.FutureTask)1 HttpClient (org.apache.commons.httpclient.HttpClient)1 ObjectMapper (org.codehaus.jackson.map.ObjectMapper)1 AsyncTaskCreationInfo (org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo)1 Guid (org.ovirt.engine.core.compat.Guid)1 VdsManager (org.ovirt.engine.core.vdsbroker.VdsManager)1 VDSErrorException (org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException)1