mirror of https://github.com/apache/jclouds.git
added node search chefapi
This commit is contained in:
parent
727e749296
commit
6d1b4f0bbf
|
@ -555,6 +555,19 @@ public interface ChefApi {
|
||||||
*/
|
*/
|
||||||
SearchResult<? extends Node> searchNodes();
|
SearchResult<? extends Node> searchNodes();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* search all nodes that match the query parameter.
|
||||||
|
* <p/>
|
||||||
|
* Note that without any request parameters this will return all of the data
|
||||||
|
* within the index.
|
||||||
|
*
|
||||||
|
* @return The response contains the total number of rows that matched your
|
||||||
|
* request, the position this result set returns (useful for paging)
|
||||||
|
* and the rows themselves.
|
||||||
|
*/
|
||||||
|
SearchResult<? extends Node> searchNodes(String qeury);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* search all items in a databag.
|
* search all items in a databag.
|
||||||
* <p/>
|
* <p/>
|
||||||
|
|
|
@ -29,6 +29,7 @@ import javax.ws.rs.GET;
|
||||||
import javax.ws.rs.HEAD;
|
import javax.ws.rs.HEAD;
|
||||||
import javax.ws.rs.POST;
|
import javax.ws.rs.POST;
|
||||||
import javax.ws.rs.PUT;
|
import javax.ws.rs.PUT;
|
||||||
|
import javax.ws.rs.QueryParam;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
import javax.ws.rs.PathParam;
|
import javax.ws.rs.PathParam;
|
||||||
import javax.ws.rs.Produces;
|
import javax.ws.rs.Produces;
|
||||||
|
@ -432,6 +433,14 @@ public interface ChefAsyncApi {
|
||||||
@ResponseParser(ParseSearchNodesFromJson.class)
|
@ResponseParser(ParseSearchNodesFromJson.class)
|
||||||
ListenableFuture<? extends SearchResult<? extends Node>> searchNodes();
|
ListenableFuture<? extends SearchResult<? extends Node>> searchNodes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see ChefApi#searchNodes(String)
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path("/search/node")
|
||||||
|
@ResponseParser(ParseSearchNodesFromJson.class)
|
||||||
|
ListenableFuture<? extends SearchResult<? extends Node>> searchNodes(@QueryParam("q") String query);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see ChefApi#searchDatabag(String)
|
* @see ChefApi#searchDatabag(String)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -297,6 +297,11 @@ public class TransientChefAsyncApi implements ChefAsyncApi {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ListenableFuture<? extends SearchResult<? extends Node>> searchNodes(String query) {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ListenableFuture<? extends SearchResult<? extends Role>> searchRoles() {
|
public ListenableFuture<? extends SearchResult<? extends Role>> searchRoles() {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
|
|
Loading…
Reference in New Issue