use of org.apache.cloudstack.api.ApiConstants.HostDetails in project cloudstack by apache.
the class ListHostsCmd method getDetails.
public EnumSet<HostDetails> getDetails() throws InvalidParameterValueException {
EnumSet<HostDetails> dv;
if (viewDetails == null || viewDetails.size() <= 0) {
dv = EnumSet.of(HostDetails.all);
} else {
try {
ArrayList<HostDetails> dc = new ArrayList<HostDetails>();
for (String detail : viewDetails) {
dc.add(HostDetails.valueOf(detail));
}
dv = EnumSet.copyOf(dc);
} catch (IllegalArgumentException e) {
throw new InvalidParameterValueException("The details parameter contains a non permitted value. The allowed values are " + EnumSet.allOf(HostDetails.class));
}
}
return dv;
}
Aggregations