Advertisement
Guest User

glance get size of image

a guest
Dec 3rd, 2015
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. from glanceclient import Client
  2.  
  3. OS_IMAGE_ENDPOINT = 'http://16.164.217.124:9292'
  4. OS_AUTH_TOKEN = '6aec4894efbc474d93b6ed139d023ad0'
  5.  
  6. glance = Client('1', endpoint=OS_IMAGE_ENDPOINT, token=OS_AUTH_TOKEN)
  7. images = glance.images.list()
  8. print images
  9. for image in images:
  10. image_dict = image.to_dict()
  11. print image_dict['size']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement