Ask Your Question

How attach a volume via openstack sdk?

asked 2017-01-05 04:59:43 -0500

Vitec gravatar image

I use common openstack python sdk: special cinder module python sdk) I can't find any functions to attach a volume to an existed instance. Are there any ideas how I can do this using the sdk?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2018-03-20 04:06:05 -0500

kinde gravatar image

Refer the guidelines in ( for python-openstacksdk client.

To do so follow this steps:

from openstack import connection

conn = connection.Connection(cloud='yourCloud')

volumes = conn.volume.volumes(details=True, **query)

To obtain the volumes associated to all the tenants, define query as {'all_tenants' : 1}. The returning value will be object of type openstack.block_storage.v2.volume.VolumeDetail

edit flag offensive delete link more

answered 2017-01-10 15:45:09 -0500

sumant-murke gravatar image

updated 2017-01-10 15:46:31 -0500

You can refer ( for using python cinderclient

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-01-05 04:59:43 -0500

Seen: 169 times

Last updated: Jan 10 '17