use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method glusterSnapshotScheduleOverride.
@Override
public StatusOnlyReturn glusterSnapshotScheduleOverride(boolean force) {
JsonRpcRequest request = new RequestBuilder("GlusterVolume.snapshotScheduleOverride").withParameter("force", force).build();
Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
return new StatusOnlyReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method glusterGeoRepKeysUpdate.
@Override
public StatusOnlyReturn glusterGeoRepKeysUpdate(List<String> geoRepPubKeys, String userName) {
JsonRpcRequest request = new RequestBuilder("GlusterVolume.geoRepKeysUpdate").withParameter("geoRepPubKeys", geoRepPubKeys).withOptionalParameter("userName", userName).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new StatusOnlyReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method setDestroyOnReboot.
@Override
public StatusOnlyReturn setDestroyOnReboot(String vmId) {
JsonRpcRequest request = new RequestBuilder("VM.setDestroyOnReboot").withParameter("vmID", vmId).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new StatusOnlyReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method delNetwork.
@Override
public StatusOnlyReturn delNetwork(String bridge, String vlan, String bond, String[] nics) {
// No options params (do we need it during this operation)
JsonRpcRequest request = new RequestBuilder("Host.delNetwork").withParameter("bridge", bridge).withOptionalParameter("vlan", vlan).withOptionalParameter("bond", bond).withOptionalParameterAsList("nics", new ArrayList<>(Arrays.asList(nics))).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new StatusOnlyReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method createStoragePool.
@Override
public StatusOnlyReturn createStoragePool(int poolType, String spUUID, String poolName, String msdUUID, String[] domList, int masterVersion, String lockPolicy, int lockRenewalIntervalSec, int leaseTimeSec, int ioOpTimeoutSec, int leaseRetries) {
// poolType and lockPolicy not used in vdsm. We can remove from the interface
JsonRpcRequest request = new RequestBuilder("StoragePool.create").withParameter("storagepoolID", spUUID).withParameter("name", poolName).withParameter("masterSdUUID", msdUUID).withParameter("masterVersion", masterVersion).withParameter("domainList", new ArrayList<>(Arrays.asList(domList))).withParameter("lockRenewalIntervalSec", lockRenewalIntervalSec).withParameter("leaseTimeSec", leaseTimeSec).withParameter("ioOpTimeoutSec", ioOpTimeoutSec).withParameter("leaseRetries", leaseRetries).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new StatusOnlyReturn(response);
}
Aggregations