Ask Your Question

get image size

asked 2015-12-02 15:35:03 -0500

John Zhao gravatar image

I want to use Python API to create a volume from an image. To do so, I need to know the size of image. I noticed that image class has OS-EXT-IMG-SIZE:size property, but I don't know how to get the size from there.



edit retag flag offensive close merge delete


Could you please try using switch --human-readable

glance image-show --human-readable  <image-id>

glance image-list --human-readable
sunnyarora gravatar imagesunnyarora ( 2015-12-03 00:01:02 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-12-03 01:30:35 -0500

teju gravatar image

updated 2015-12-03 01:32:23 -0500

Please check the below code snippet to get size of image in OpenStack liberty.

edit flag offensive delete link more


thanks, that works. John

John Zhao gravatar imageJohn Zhao ( 2015-12-03 12:24:03 -0500 )edit

Can you please mark the answer as correct and close this question.

teju gravatar imageteju ( 2015-12-03 23:42:24 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-12-02 15:35:03 -0500

Seen: 329 times

Last updated: Dec 03 '15