Search in sources :

Example 1 with GlusterServicesReturn

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

the class JsonRpcVdsServer method glusterServicesList.

@Override
public GlusterServicesReturn glusterServicesList(Guid serverId, String[] serviceNames) {
    JsonRpcRequest request = new RequestBuilder("GlusterService.get").withParameter("serviceNames", new ArrayList<>(Arrays.asList(serviceNames))).build();
    Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
    return new GlusterServicesReturn(serverId, response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) ArrayList(java.util.ArrayList) GlusterServicesReturn(org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesReturn)

Example 2 with GlusterServicesReturn

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

the class JsonRpcVdsServer method glusterServicesAction.

@Override
public GlusterServicesReturn glusterServicesAction(Guid serverId, String[] serviceList, String actionType) {
    JsonRpcRequest request = new RequestBuilder("GlusterService.action").withParameter("serviceNames", new ArrayList<>(Arrays.asList(serviceList))).withParameter("action", actionType).build();
    Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
    return new GlusterServicesReturn(serverId, response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) GlusterServicesReturn(org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesReturn)

Aggregations

GlusterServicesReturn (org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesReturn)2 JsonRpcRequest (org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest)2 RequestBuilder (org.ovirt.vdsm.jsonrpc.client.RequestBuilder)2 ArrayList (java.util.ArrayList)1