public function getStorages($type = null)
    {
        if ($type === null) {
            return $this->get('/storage');
        }

        $supportedTypes = array(
            'lvm',
            'nfs',
            'dir',
            'zfs',
            'rbd',
            'iscsi',
            'sheepdog',
            'glusterfs',
            'iscsidirect',
        );

        if (in_array($type, $supportedTypes)) {
            return $this->get('/storage', array(
                'type' => $type,
            ));
        }

        /* If type not found returns null */
        return null;
    }
public function getStorages($type = null)
    {
        if ($type === null) {
            return $this->get('/storage');
        }

        $supportedTypes = array(
            'lvm',
            'nfs',
            'dir',
            'zfs',
            'rbd',
            'iscsi',
            'sheepdog',
            'glusterfs',
            'iscsidirect',
        );

        if (in_array($type, $supportedTypes)) {
            return $this->get('/storage', array(
                'type' => $type,
            ));
        }

        /* If type not found returns null */
        return null;
    }
public function getStorages ( $ type = null ) { if ( $ type === null ) { return $ this -> get ( '/storage' ) ; } $ supportedTypes = array ( 'lvm' , 'nfs' , 'dir' , 'zfs' , 'rbd' , 'iscsi' , 'sheepdog' , 'glusterfs' , 'iscsidirect' , ) ; if ( in_array ( $ type , $ supportedTypes ) ) { return $ this -> get ( '/storage' , array ( 'type' => $ type , ) ) ; } /* If type not found returns null */ return null ; }
Retrieves all the storage found in the Proxmox server, or only the ones
matching the storage type provided if any.

@param string $type the storage type.

@return mixed The processed response, can be an array, string or object.
Retrieves all the storage found in the Proxmox server or only the ones matching the storage type provided if any .