Search in sources :

Example 46 with RequestBuilder

use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method moveDomainDevice.

@Override
public StatusOnlyReturn moveDomainDevice(String jobId, Map<String, Object> moveParams) {
    JsonRpcRequest request = new RequestBuilder("SDM.move_domain_device").withParameter("job_id", jobId).withParameter("move_params", moveParams).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 47 with RequestBuilder

use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method freeze.

@Override
public StatusOnlyReturn freeze(String vmId) {
    JsonRpcRequest request = new RequestBuilder("VM.freeze").withParameter("vmID", vmId).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 48 with RequestBuilder

use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method formatStorageDomain.

@Override
public StatusOnlyReturn formatStorageDomain(String sdUUID) {
    JsonRpcRequest request = new RequestBuilder("StorageDomain.format").withParameter("storagedomainID", sdUUID).withParameter("autoDetach", false).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 49 with RequestBuilder

use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method dumpxmls.

@Override
public DomainXmlListReturn dumpxmls(List<String> vmIds) {
    JsonRpcRequest request = new RequestBuilder("Host.dumpxmls").withOptionalParameterAsList("vmList", vmIds).build();
    Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("domxmls").withResponseType(Object[].class);
    return new DomainXmlListReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) DomainXmlListReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.DomainXmlListReturn)

Example 50 with RequestBuilder

use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method desktopLogin.

@Override
public StatusOnlyReturn desktopLogin(String vmId, String domain, String user, String password) {
    JsonRpcRequest request = new RequestBuilder("VM.desktopLogin").withParameter("vmID", vmId).withParameter("domain", domain).withParameter("username", user).withParameter("password", password).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

JsonRpcRequest (org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest)223 RequestBuilder (org.ovirt.vdsm.jsonrpc.client.RequestBuilder)223 StatusOnlyReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)117 OneUuidReturn (org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn)18 ArrayList (java.util.ArrayList)8 HashMap (java.util.HashMap)7 OneVmReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturn)5 GlusterVolumeTaskReturn (org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturn)4 ServerConnectionStatusReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionStatusReturn)4 GlusterVolumeStatusReturn (org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeStatusReturn)3 StatusReturn (org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturn)3 FenceStatusReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.FenceStatusReturn)3 MigrateStatusReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.MigrateStatusReturn)3 Map (java.util.Map)2 FutureTask (java.util.concurrent.FutureTask)2 GlusterServicesReturn (org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesReturn)2 GlusterTaskInfoReturn (org.ovirt.engine.core.vdsbroker.gluster.GlusterTaskInfoReturn)2 GlusterVolumeGeoRepStatus (org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatus)2 GlusterVolumesListReturn (org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumesListReturn)2 StoragePoolInfo (org.ovirt.engine.core.vdsbroker.irsbroker.StoragePoolInfo)2