use of org.batfish.common.Container in project batfish by batfish.
the class ContainerResource method getContainer.
/**
* Returns information about the given {@link Container}, provided this user can access it.
*/
@GET
public Response getContainer() {
_logger.infof("WMS2: getContainer '%s'\n", _name);
checkAccessToContainer();
Container container = Main.getWorkMgr().getContainer(_name);
return Response.ok(container).build();
}
use of org.batfish.common.Container in project batfish by batfish.
the class Client method getContainer.
/**
* Get information of the container (first element in {@code parameters}).
*
* <p>Returns {@code true} if successfully get container information, {@code false} otherwise
*/
private boolean getContainer(List<String> options, List<String> parameters) {
if (!isValidArgument(options, parameters, 0, 1, 1, Command.GET_CONTAINER)) {
return false;
}
String containerName = parameters.get(0);
Container container = _workHelper.getContainer(containerName);
if (container != null) {
_logger.output(container.getTestrigs() + "\n");
return true;
}
return false;
}
Aggregations