use of com.zimbra.soap.admin.message.GetAllVolumesResponse in project zm-mailbox by Zimbra.
the class GetAllVolumes method handle.
private GetAllVolumesResponse handle(@SuppressWarnings("unused") GetAllVolumesRequest req, Map<String, Object> ctx) throws ServiceException {
ZimbraSoapContext zsc = getZimbraSoapContext(ctx);
checkRight(zsc, ctx, Provisioning.getInstance().getLocalServer(), Admin.R_manageVolume);
GetAllVolumesResponse resp = new GetAllVolumesResponse();
for (Volume vol : VolumeManager.getInstance().getAllVolumes()) {
resp.addVolume(vol.toJAXB());
}
return resp;
}
use of com.zimbra.soap.admin.message.GetAllVolumesResponse 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.GetAllVolumesResponse 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