[sdk] renaming a volume with the SDK

jdratlif at globalnoc.iu.edu jdratlif at globalnoc.iu.edu
Fri Jun 24 15:44:23 UTC 2022


I'm trying to set a property on a volume, specifically the name. But when I
try to do this, it tells me the Session object has no default_microversion.
I have all my auth in environment variables. Using TOKEN authentication.

 

What am I doing wrong here?

 

import openstack

from openstack.block_storage.v3._proxy import Proxy as BlockStorageService

from openstack.block_storage.v3.volume import Volume

 

# enable openstack debug logging

openstack.enable_logging(debug=True)

 

conn = openstack.connect()

 

cinder: BlockStorageService = conn.block_storage

volume: Volume = cinder.get_volume("b3a70014-1cf0-4fd1-bdc4-183dbfd33e79")

volume.name = "test_rename"

volume.commit(conn.session)

 

 

Thanks,

 

---

John Ratliff

Systems Automation Engineer 

GlobalNOC @ Indiana University

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20220624/ea740a64/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6687 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20220624/ea740a64/attachment.bin>


More information about the openstack-discuss mailing list