[openstack-dev] [tempest] the project specific config option not generated together with tempest.conf.sample

joehuang joehuang at huawei.com
Thu Jun 16 05:03:25 UTC 2016


Hi, Matthew,

Ok, Got it, will follow the Zaqar example. Thank you pointing out that not to reply in an existing thread.

Best Regards
Chaoyi Huang ( Joe Huang )


-----Original Message-----
From: Matthew Treinish [mailto:mtreinish at kortar.org] 
Sent: Thursday, June 16, 2016 3:40 AM
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [tempest] the project specific config option not generated together with tempest.conf.sample

Just a note, please don't start a new thread as a reply to an existing thread.
(well unless you remove the In-Reply-To header from the message) There is more details on this here:

https://wiki.openstack.org/wiki/MailingListEtiquette#Threading

I almost missed this because it was part of a different thread.

On Wed, Jun 15, 2016 at 05:14:26AM +0000, joehuang wrote:
> Hello,
> 
> A tempest plugin was written for the Kingbird https://review.openstack.org/#/c/328683/, the plugin and test cases could be discovered by tempest, and the configuration is working if we add the configuration items into the tempest.conf manfully, but if we run tox -egenconfig in the tempest folder, these configuration items not generated in the tempest.conf.sample.
> 
> How to make the plugin customized configuration items also being generated in the tempest.conf.sample ? 

This is a documented part of the tempest plugin interface:

http://docs.openstack.org/developer/tempest/plugin.html#tempest.test_discover.plugins.TempestPlugin.get_opt_lists

> 
> And for service_available group, it should be already there in the config, isn't it?

Yes, but it depends on your plugin to pass the extra config options properly on sample config generation. If you look at your tempest plugin:

http://git.openstack.org/cgit/openstack/kingbird/tree/kingbird/tests/tempest/scenario/plugin.py#n38

You're not returning the service_available option to tempest, just the KBGroup options. You need to add a tuple with the service_available option and group name to the output list there for it to show up in the output sample config file.

That being said I don't actually see the service_available kingbird option being defined anywhere in the plugin. For example see:

http://git.openstack.org/cgit/openstack/zaqar/tree/zaqar/tests/tempest_plugin/config.py#n18

and

http://git.openstack.org/cgit/openstack/zaqar/tree/zaqar/tests/tempest_plugin/plugin.py#n38


-Matt Treinish



More information about the OpenStack-dev mailing list