Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import cinderclient.client
- import os
- USERNAME = os.environ['OS_USERNAME']
- PASSWORD = os.environ['OS_PASSWORD']
- AUTH_URL = os.environ['OS_AUTH_URL']
- TENANT = os.environ['OS_TENANT_NAME']
- VOLUME_ID = "4e992342-ffc7-4087-a5f2-af5c8c247b56"
- client = cinderclient.client.Client(2, USERNAME, PASSWORD, TENANT, AUTH_URL)
- client.volumes.get(VOLUME_ID).terminate_connection(None, None)
- client.volumes.get(VOLUME_ID).detach()
- client.volumes.get(VOLUME_ID).unreserve(None)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement