9 Feb
2022
9 Feb
'22
6:46 a.m.
Hi list
I like to connect as an amin user to an openstack cloud and create a snapshot of a volume in the same project as the volume exists.
I use the openstacksdk to achive this in python. So far I can connect as admin and create the snapshot but the snapshot is in the admins project, not in the project of the volume.
Code so far:
from openstack import connect import openstack.config
conn=connect()
conn.volume.create_snapshot(name='test', description='testing', volume='volumeIDinANYproject')
I tried to use conn.connect_as_project('ProjectID')
but was not successfull.
Please direct me in the correct direction to achive this ! Any help appreciated.
Greeting
Benedikt