Ask Your Question
0

How to update metadata for flavor through openstack api?

asked 2016-12-27 22:44:34 -0600

xuananh gravatar image

Anybody know how to update metadata for flavor through openstack api?

Thanks!

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2016-12-28 08:40:40 -0600

Bernd Bausch gravatar image

I think you want flavors extra-specs.

edit flag offensive delete link more

Comments

Thank you very much, now I can create metadata flavor

xuananh gravatar imagexuananh ( 2017-01-02 20:26:32 -0600 )edit
0

answered 2016-12-28 20:59:13 -0600

xuananh gravatar image

Right, but I want to use python sdk I can list and create new flavor by these code:

    flavors_list = nova_client.flavors.list() 
    print_flavors(flavors_list)
    print(nova_client.servers.list()) nova_client.flavors.create(name = 'test2', ram = 512, vcpus = 1,
                                                                                               disk = 1000,   flavorid='auto', 
                                                                                               ephemeral=0, swap=0, rxtx_factor=1.0, is_public=True)

But I cannot find method update metadata flavor, do you know this method Thanks!

edit flag offensive delete link more

Comments

I am not a programmer, but there is a Flavor class with get_keys and set_keys methods: http://git.openstack.org/cgit/opensta....

Bernd Bausch gravatar imageBernd Bausch ( 2016-12-29 03:22:55 -0600 )edit
0

answered 2016-12-28 23:39:30 -0600

silently gravatar image

create new flavor is : openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano

openstack flavor update ? ......

you can get openstack flavor --help .

edit flag offensive delete link more

Comments

no, I want to programming using openstack api not using command line

xuananh gravatar imagexuananh ( 2016-12-29 00:01:30 -0600 )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: 2016-12-27 22:44:34 -0600

Seen: 248 times

Last updated: Dec 28 '16