canonical / pylxd

Python module for LXD
https://pylxd.readthedocs.io/en/latest/
Apache License 2.0
251 stars 133 forks source link

Type of storage volume is always custom #496

Closed atrautsch closed 2 years ago

atrautsch commented 2 years ago

When I print the names and types of storage volumes I always get the custom type.

pool = client.storage_pools.get(name)
volumes = pool.volumes.all()
for v in volumes:
   print(v.name, v.type)

Maybe the API changed at some point to singular instead of plural for the volume type. For me the URLs that are used here look like this: /1.0/storage-pools/$POOL/volumes/container/$NAME instead of /1.0/storage-pools/$POOL/volumes/containers/$NAME

The current swagger documentation also shows a singular type in the examples here. My LXD version is: 4.0.8