Ask Your Question
0

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.

Thanks,

John

edit retag flag offensive close merge delete

Comments

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
0

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.

http://pastebin.com/5Gr2DBm6

edit flag offensive delete link more

Comments

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 125 times

Last updated: Dec 03 '15