Search in sources :

Example 1 with GetAllVolumesRequest

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());
    }
}
Also used : GetVolumeRequest(com.zimbra.soap.admin.message.GetVolumeRequest) GetVolumeResponse(com.zimbra.soap.admin.message.GetVolumeResponse) GetAllVolumesResponse(com.zimbra.soap.admin.message.GetAllVolumesResponse) VolumeInfo(com.zimbra.soap.admin.type.VolumeInfo) GetAllVolumesRequest(com.zimbra.soap.admin.message.GetAllVolumesRequest)

Example 2 with GetAllVolumesRequest

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);
        }
    }
}
Also used : GetAllVolumesResponse(com.zimbra.soap.admin.message.GetAllVolumesResponse) VolumeInfo(com.zimbra.soap.admin.type.VolumeInfo) GetAllVolumesRequest(com.zimbra.soap.admin.message.GetAllVolumesRequest)

Aggregations

GetAllVolumesRequest (com.zimbra.soap.admin.message.GetAllVolumesRequest)2 GetAllVolumesResponse (com.zimbra.soap.admin.message.GetAllVolumesResponse)2 VolumeInfo (com.zimbra.soap.admin.type.VolumeInfo)2 GetVolumeRequest (com.zimbra.soap.admin.message.GetVolumeRequest)1 GetVolumeResponse (com.zimbra.soap.admin.message.GetVolumeResponse)1