public ArrayList<Volume> list(Cluster cluster, String options) { IResponse response = _list(cluster, options).unexpect("error"); Collection<String> volumesProperties = StringUtils.getPropertyKeyValueSets(response.toString()); ArrayList<Volume> result = new ArrayList<Volume>(); for (String volumeProperties : volumesProperties) { result.add(Volume.fromResponse(volumeProperties)); } return result; }
public static Volume fromResponse(IResponse response) { return fromResponse(response.toString()); }