Advertisement
Guest User

Untitled

a guest
Feb 15th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import cinderclient.client
  4. import os
  5.  
  6. USERNAME = os.environ['OS_USERNAME']
  7. PASSWORD = os.environ['OS_PASSWORD']
  8. AUTH_URL = os.environ['OS_AUTH_URL']
  9. TENANT = os.environ['OS_TENANT_NAME']
  10.  
  11. VOLUME_ID = "4e992342-ffc7-4087-a5f2-af5c8c247b56"
  12.  
  13. client = cinderclient.client.Client(2, USERNAME, PASSWORD, TENANT, AUTH_URL)
  14.  
  15. client.volumes.get(VOLUME_ID).terminate_connection(None, None)
  16. client.volumes.get(VOLUME_ID).detach()
  17. client.volumes.get(VOLUME_ID).unreserve(None)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement