use of org.graylog2.rest.models.system.plugins.responses.PluginList in project graylog2-server by Graylog2.
the class ClusterSystemPluginResource method list.
@GET
@Timed
@ApiOperation(value = "List all installed plugins on the given node")
public PluginList list(@ApiParam(name = "nodeId", value = "The id of the node where processing will be paused.", required = true) @PathParam("nodeId") String nodeId) throws IOException, NodeNotFoundException {
final Node targetNode = nodeService.byNodeId(nodeId);
final RemoteSystemPluginResource remoteSystemPluginResource = remoteInterfaceProvider.get(targetNode, this.authenticationToken, RemoteSystemPluginResource.class);
final Response<PluginList> response = remoteSystemPluginResource.list().execute();
if (response.isSuccessful()) {
return response.body();
} else {
LOG.warn("Unable to get plugin list on node {}: {}", nodeId, response.message());
throw new WebApplicationException(response.message(), BAD_GATEWAY);
}
}
Aggregations