use of com.zimbra.soap.admin.message.GetAllVolumesRequest in project zm-mailbox by Zimbra.
the class VolumeCLI method getVolume.
private void getVolume() throws IOException, ServiceException {
if (id == null) {
GetAllVolumesRequest req = new GetAllVolumesRequest();
auth(auth);
GetAllVolumesResponse resp = JaxbUtil.elementToJaxb(getTransport().invokeWithoutSession(JaxbUtil.jaxbToElement(req)));
for (VolumeInfo vol : resp.getVolumes()) {
print(vol);
}
} else {
GetVolumeRequest req = new GetVolumeRequest(Short.parseShort(id));
auth(auth);
GetVolumeResponse resp = JaxbUtil.elementToJaxb(getTransport().invokeWithoutSession(JaxbUtil.jaxbToElement(req)));
print(resp.getVolume());
}
}
use of com.zimbra.soap.admin.message.GetAllVolumesRequest in project zm-mailbox by Zimbra.
the class VolumeCLI method getCurrentVolumes.
private void getCurrentVolumes() throws SoapFaultException, IOException, ServiceException {
GetAllVolumesRequest req = new GetAllVolumesRequest();
auth(auth);
GetAllVolumesResponse all = JaxbUtil.elementToJaxb(getTransport().invokeWithoutSession(JaxbUtil.jaxbToElement(req)));
for (VolumeInfo vol : all.getVolumes()) {
if (vol.isCurrent()) {
print(vol);
}
}
}
Aggregations