Problem
The Volume class in the SDK only exposes a limited subset of fields from the Verda API's volume response. Critical NFS mount-related fields are missing, which are essential for properly mounting shared NVMe volumes.
Missing Fields
When calling GET /v1/volumes/{volume_id}, the API returns these fields that are not exposed by the SDK's Volume class:
pseudo_path - Volume pseudo path for NFS export
mount_command - Ready-to-use NFS mount command
filesystem_to_fstab_command - fstab entry command
create_directory_command - mkdir command for mount point
instances - Array of attached instance details (not just instance_id)
- Pricing fields:
base_hourly_cost, monthly_price, currency
- Contract details:
contract, long_term
API Response Example
{
"id": "ac9f666d-849f-4cdb-9a7b-b4e43317ef36",
"name": "OS-NVMe-84Ca37Jf",
"pseudo_path": "volume-84Ca37Jf",
"mount_command": "mount -t nfs -o nconnect=16 nfs.fin-01.datacrunch.io:volume-88eb67d0 /mnt/volume",
"create_directory_command": "mkdir -p /mnt/volume",
"filesystem_to_fstab_command": "grep -qxF 'nfs.fin-01.datacrunch.io:volume-88eb67d0 /mnt/volume nfs defaults 0 0' /etc/fstab || echo '...' | sudo tee -a /etc/fstab",
"instances": [...],
...
}
Current SDK Behavior
The Volume class (verda/volumes/_volumes.py) only includes:
id, status, name, size, type
is_os_volume, created_at, target, location
instance_id, ssh_key_ids, deleted_at
The VolumesService.create() method does call get_by_id() after creation, but the returned Volume object doesn't expose the NFS fields.
Impact
Users working with NVMe shared volumes need these fields to:
- Construct proper NFS mount points (
pseudo_path)
- Automate volume mounting (
mount_command, create_directory_command)
- Configure persistent mounts (
filesystem_to_fstab_command)
Current Workaround
We're currently bypassing the SDK and making direct HTTP calls:
# Instead of:
volume = client.volumes.get_by_id(volume_id) # Returns limited Volume object
# We use:
response = client._http_client.get(f"/volumes/{volume_id}")
volume_data = response.json() # Full API response with all fields
Proposed Solution
Option 1: Add missing fields to the Volume class
class Volume:
def __init__(self, ..., pseudo_path: str | None = None,
mount_command: str | None = None, ...):
self._pseudo_path = pseudo_path
self._mount_command = mount_command
...
@property
def pseudo_path(self) -> str | None:
return self._pseudo_path
Option 2: Add a method to access raw response data
class Volume:
def __init__(self, raw_data: dict | None = None, ...):
self._raw_data = raw_data
...
def get_raw_data(self) -> dict:
return self._raw_data
Option 3: Return both Volume object and raw dict
def get_by_id(self, id: str) -> tuple[Volume, dict]:
volume_dict = self._http_client.get(f'/volumes/{id}').json()
return (Volume.create_from_dict(volume_dict), volume_dict)
References
- Verda API docs:
GET /v1/volumes/{volume_id}
- Related: Volume creation also needs the second GET request to populate these fields
Preference: Option 1 (add fields to Volume class) is cleanest and most type-safe.
Problem
The
Volumeclass in the SDK only exposes a limited subset of fields from the Verda API's volume response. Critical NFS mount-related fields are missing, which are essential for properly mounting shared NVMe volumes.Missing Fields
When calling
GET /v1/volumes/{volume_id}, the API returns these fields that are not exposed by the SDK'sVolumeclass:pseudo_path- Volume pseudo path for NFS exportmount_command- Ready-to-use NFS mount commandfilesystem_to_fstab_command- fstab entry commandcreate_directory_command- mkdir command for mount pointinstances- Array of attached instance details (not justinstance_id)base_hourly_cost,monthly_price,currencycontract,long_termAPI Response Example
{ "id": "ac9f666d-849f-4cdb-9a7b-b4e43317ef36", "name": "OS-NVMe-84Ca37Jf", "pseudo_path": "volume-84Ca37Jf", "mount_command": "mount -t nfs -o nconnect=16 nfs.fin-01.datacrunch.io:volume-88eb67d0 /mnt/volume", "create_directory_command": "mkdir -p /mnt/volume", "filesystem_to_fstab_command": "grep -qxF 'nfs.fin-01.datacrunch.io:volume-88eb67d0 /mnt/volume nfs defaults 0 0' /etc/fstab || echo '...' | sudo tee -a /etc/fstab", "instances": [...], ... }Current SDK Behavior
The
Volumeclass (verda/volumes/_volumes.py) only includes:id,status,name,size,typeis_os_volume,created_at,target,locationinstance_id,ssh_key_ids,deleted_atThe
VolumesService.create()method does callget_by_id()after creation, but the returnedVolumeobject doesn't expose the NFS fields.Impact
Users working with NVMe shared volumes need these fields to:
pseudo_path)mount_command,create_directory_command)filesystem_to_fstab_command)Current Workaround
We're currently bypassing the SDK and making direct HTTP calls:
Proposed Solution
Option 1: Add missing fields to the
VolumeclassOption 2: Add a method to access raw response data
Option 3: Return both Volume object and raw dict
References
GET /v1/volumes/{volume_id}Preference: Option 1 (add fields to Volume class) is cleanest and most type-safe.