Search in sources :

Example 1 with OneVmReturn

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

the class JsonRpcVdsServer method getExternalVmFromOva.

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

Example 2 with OneVmReturn

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

the class JsonRpcVdsServer method changeDisk.

@Override
public OneVmReturn changeDisk(String vmId, Map<String, Object> driveSpec) {
    JsonRpcRequest request = new RequestBuilder("VM.changeCD").withParameter("vmID", vmId).withParameter("driveSpec", driveSpec).build();
    Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("vmList");
    return new OneVmReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) OneVmReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturn)

Example 3 with OneVmReturn

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

the class JsonRpcVdsServer method changeDisk.

@Override
public OneVmReturn changeDisk(String vmId, String imageLocation) {
    JsonRpcRequest request = new RequestBuilder("VM.changeCD").withParameter("vmID", vmId).withParameter("driveSpec", imageLocation).build();
    Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("vmList");
    return new OneVmReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) OneVmReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturn)

Example 4 with OneVmReturn

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

the class JsonRpcVdsServer method create.

@SuppressWarnings("rawtypes")
@Override
public OneVmReturn create(Map createInfo) {
    JsonRpcRequest request = new RequestBuilder("VM.create").withParameter("vmID", getVmId(createInfo)).withParameter("vmParams", createInfo).build();
    Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("vmList");
    return new OneVmReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) OneVmReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturn)

Example 5 with OneVmReturn

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

the class JsonRpcVdsServer method resume.

@Override
public OneVmReturn resume(String vmId) {
    JsonRpcRequest request = new RequestBuilder("VM.cont").withParameter("vmID", vmId).build();
    Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("vmList");
    return new OneVmReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) OneVmReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturn)

Aggregations

OneVmReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturn)5 JsonRpcRequest (org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest)5 RequestBuilder (org.ovirt.vdsm.jsonrpc.client.RequestBuilder)5