Re: [openstack-dev] [tricircle] About registering and loading a plugin

2016-06-29 Thread Shinobu Kinjo
It may be better to attach setup.cfg you using, and paste traceback (if
there).

Cheers,
Shinobu

On Wed, Jun 29, 2016 at 4:57 PM, Yipei Niu  wrote:

> Hi all,
>
> I have succeed in registering a config option and obtaining it. So how to
> load an option from a customized file? Through
> cfg.CONF(default_config_files=[setup.cfg]? Still fails loading the config
> options in setup.cfg.
>
> Best regards,
> Yipei
>
> On Wed, Jun 29, 2016 at 8:36 AM, joehuang  wrote:
>
>> Hi, Yipei,
>>
>>
>> "Moreover, I tried to load drivers by line "cfg.CONF.nyp.plugins.simple",
>> the console prompts oslo_config.cfg.NoSuchOptError: no such option in group
>> DEFAULT: nyp. The setup.cfg is defined as follows."
>>
>> You are using entry point but not configuration options for plugin
>> discovery, and no config option you have registered in oslo_config.cfg, so
>> " no such option in group DEFAULT:".
>>
>> Best Regards
>> Chaoyi Huang ( joehuang )
>>
>> --
>> *From:* Yipei Niu [newy...@gmail.com]
>> *Sent:* 28 June 2016 22:05
>> *To:* OpenStack Development Mailing List (not for usage questions)
>> *Cc:* joehuang; Vega Cai; ski...@redhat.com; 金城 忍
>> *Subject:* Re: [tricircle] About registering and loading a plugin
>>
>> Hi all,
>>
>> Thanks a lot for your valuable advice. I have already succeed in
>> registering and loading a self-defined plugin. The entry_point is generated
>> by executing setup.py, and found in .egg-info/entry_points.txt, which is
>> different from using setup.cfg in
>> https://review.openstack.org/#/c/331638/.
>>
>> Moreover, I tried to load drivers by line "cfg.CONF.nyp.plugins.simple",
>> the console prompts oslo_config.cfg.NoSuchOptError: no such option in group
>> DEFAULT: nyp. The setup.cfg is defined as follows.
>>
>> [entry_points]
>> nyp.plugins.formmater =
>> simple = nyp.plugins.simple:SimpleFormatter
>> plain = nyp.plugins.simple:SimpleFormatter
>> field = nyp.plugins.field:FieldList
>>
>> How to solve the problem?
>>
>> Best regards,
>> Yipei
>>
>> On Tue, Jun 28, 2016 at 10:35 AM, Vega Cai  wrote:
>>
>>> Hi Yipei,
>>>
>>> You can also refer to my network type driver implementation:
>>>
>>> https://review.openstack.org/#/c/331638/
>>>
>>> Type driver is registered in setup.cfg and loaded by code.
>>>
>>> BR
>>> Zhiyuan
>>>
>>> On 27 June 2016 at 21:44, Yipei Niu  wrote:
>>>
 Dear all,

 Recently, I learn to name a plugin based on the doc
 http://docs.openstack.org/developer/stevedore/tutorial/naming.html#. I
 define a new entry_point for the plugin, then it fails. The console prompts
 "stevedore.exception.NoMatches: No 'net.nyp.formatter' driver found,
 looking for 'simple'". After setting a new entry_point with setuptools, why
 stevedore cannot find the driver based on the entry_point?

 Best regards,
 Yipei

>>>
>>>
>>
>


-- 
Email:
shin...@linux.com
shin...@redhat.com
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tricircle] About registering and loading a plugin

2016-06-29 Thread Yipei Niu
Hi all,

I have succeed in registering a config option and obtaining it. So how to
load an option from a customized file? Through
cfg.CONF(default_config_files=[setup.cfg]? Still fails loading the config
options in setup.cfg.

Best regards,
Yipei

On Wed, Jun 29, 2016 at 8:36 AM, joehuang  wrote:

> Hi, Yipei,
>
>
> "Moreover, I tried to load drivers by line "cfg.CONF.nyp.plugins.simple",
> the console prompts oslo_config.cfg.NoSuchOptError: no such option in group
> DEFAULT: nyp. The setup.cfg is defined as follows."
>
> You are using entry point but not configuration options for plugin
> discovery, and no config option you have registered in oslo_config.cfg, so
> " no such option in group DEFAULT:".
>
> Best Regards
> Chaoyi Huang ( joehuang )
>
> --
> *From:* Yipei Niu [newy...@gmail.com]
> *Sent:* 28 June 2016 22:05
> *To:* OpenStack Development Mailing List (not for usage questions)
> *Cc:* joehuang; Vega Cai; ski...@redhat.com; 金城 忍
> *Subject:* Re: [tricircle] About registering and loading a plugin
>
> Hi all,
>
> Thanks a lot for your valuable advice. I have already succeed in
> registering and loading a self-defined plugin. The entry_point is generated
> by executing setup.py, and found in .egg-info/entry_points.txt, which is
> different from using setup.cfg in https://review.openstack.org/#/c/331638/
> .
>
> Moreover, I tried to load drivers by line "cfg.CONF.nyp.plugins.simple",
> the console prompts oslo_config.cfg.NoSuchOptError: no such option in group
> DEFAULT: nyp. The setup.cfg is defined as follows.
>
> [entry_points]
> nyp.plugins.formmater =
> simple = nyp.plugins.simple:SimpleFormatter
> plain = nyp.plugins.simple:SimpleFormatter
> field = nyp.plugins.field:FieldList
>
> How to solve the problem?
>
> Best regards,
> Yipei
>
> On Tue, Jun 28, 2016 at 10:35 AM, Vega Cai  wrote:
>
>> Hi Yipei,
>>
>> You can also refer to my network type driver implementation:
>>
>> https://review.openstack.org/#/c/331638/
>>
>> Type driver is registered in setup.cfg and loaded by code.
>>
>> BR
>> Zhiyuan
>>
>> On 27 June 2016 at 21:44, Yipei Niu  wrote:
>>
>>> Dear all,
>>>
>>> Recently, I learn to name a plugin based on the doc
>>> http://docs.openstack.org/developer/stevedore/tutorial/naming.html#. I
>>> define a new entry_point for the plugin, then it fails. The console prompts
>>> "stevedore.exception.NoMatches: No 'net.nyp.formatter' driver found,
>>> looking for 'simple'". After setting a new entry_point with setuptools, why
>>> stevedore cannot find the driver based on the entry_point?
>>>
>>> Best regards,
>>> Yipei
>>>
>>
>>
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tricircle] About registering and loading a plugin

2016-06-28 Thread joehuang
Hi, Yipei,



"Moreover, I tried to load drivers by line "cfg.CONF.nyp.plugins.simple", the 
console prompts oslo_config.cfg.NoSuchOptError: no such option in group 
DEFAULT: nyp. The setup.cfg is defined as follows."

You are using entry point but not configuration options for plugin discovery, 
and no config option you have registered in oslo_config.cfg, so " no such 
option in group DEFAULT:".

Best Regards
Chaoyi Huang ( joehuang )


From: Yipei Niu [newy...@gmail.com]
Sent: 28 June 2016 22:05
To: OpenStack Development Mailing List (not for usage questions)
Cc: joehuang; Vega Cai; ski...@redhat.com; 金城 忍
Subject: Re: [tricircle] About registering and loading a plugin

Hi all,

Thanks a lot for your valuable advice. I have already succeed in registering 
and loading a self-defined plugin. The entry_point is generated by executing 
setup.py, and found in .egg-info/entry_points.txt, which is different from 
using setup.cfg in https://review.openstack.org/#/c/331638/.

Moreover, I tried to load drivers by line "cfg.CONF.nyp.plugins.simple", the 
console prompts oslo_config.cfg.NoSuchOptError: no such option in group 
DEFAULT: nyp. The setup.cfg is defined as follows.

[entry_points]
nyp.plugins.formmater =
simple = nyp.plugins.simple:SimpleFormatter
plain = nyp.plugins.simple:SimpleFormatter
field = nyp.plugins.field:FieldList

How to solve the problem?

Best regards,
Yipei

On Tue, Jun 28, 2016 at 10:35 AM, Vega Cai 
> wrote:
Hi Yipei,

You can also refer to my network type driver implementation:

https://review.openstack.org/#/c/331638/

Type driver is registered in setup.cfg and loaded by code.

BR
Zhiyuan

On 27 June 2016 at 21:44, Yipei Niu 
> wrote:
Dear all,

Recently, I learn to name a plugin based on the doc 
http://docs.openstack.org/developer/stevedore/tutorial/naming.html#. I define a 
new entry_point for the plugin, then it fails. The console prompts 
"stevedore.exception.NoMatches: No 'net.nyp.formatter' driver found, looking 
for 'simple'". After setting a new entry_point with setuptools, why stevedore 
cannot find the driver based on the entry_point?

Best regards,
Yipei


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tricircle] About registering and loading a plugin

2016-06-28 Thread Yipei Niu
Hi all,

Thanks a lot for your valuable advice. I have already succeed in
registering and loading a self-defined plugin. The entry_point is generated
by executing setup.py, and found in .egg-info/entry_points.txt, which is
different from using setup.cfg in https://review.openstack.org/#/c/331638/.

Moreover, I tried to load drivers by line "cfg.CONF.nyp.plugins.simple",
the console prompts oslo_config.cfg.NoSuchOptError: no such option in group
DEFAULT: nyp. The setup.cfg is defined as follows.

[entry_points]
nyp.plugins.formmater =
simple = nyp.plugins.simple:SimpleFormatter
plain = nyp.plugins.simple:SimpleFormatter
field = nyp.plugins.field:FieldList

How to solve the problem?

Best regards,
Yipei

On Tue, Jun 28, 2016 at 10:35 AM, Vega Cai  wrote:

> Hi Yipei,
>
> You can also refer to my network type driver implementation:
>
> https://review.openstack.org/#/c/331638/
>
> Type driver is registered in setup.cfg and loaded by code.
>
> BR
> Zhiyuan
>
> On 27 June 2016 at 21:44, Yipei Niu  wrote:
>
>> Dear all,
>>
>> Recently, I learn to name a plugin based on the doc
>> http://docs.openstack.org/developer/stevedore/tutorial/naming.html#. I
>> define a new entry_point for the plugin, then it fails. The console prompts
>> "stevedore.exception.NoMatches: No 'net.nyp.formatter' driver found,
>> looking for 'simple'". After setting a new entry_point with setuptools, why
>> stevedore cannot find the driver based on the entry_point?
>>
>> Best regards,
>> Yipei
>>
>
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tricircle] About registering and loading a plugin

2016-06-27 Thread Vega Cai
Hi Yipei,

You can also refer to my network type driver implementation:

https://review.openstack.org/#/c/331638/

Type driver is registered in setup.cfg and loaded by code.

BR
Zhiyuan

On 27 June 2016 at 21:44, Yipei Niu  wrote:

> Dear all,
>
> Recently, I learn to name a plugin based on the doc
> http://docs.openstack.org/developer/stevedore/tutorial/naming.html#. I
> define a new entry_point for the plugin, then it fails. The console prompts
> "stevedore.exception.NoMatches: No 'net.nyp.formatter' driver found,
> looking for 'simple'". After setting a new entry_point with setuptools, why
> stevedore cannot find the driver based on the entry_point?
>
> Best regards,
> Yipei
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tricircle] About registering and loading a plugin

2016-06-27 Thread joehuang
Hello, Yipei,



You can use entry point inspector to check whether there is some error in the 
plugin registration and loading:



sudo pip install entry_point_inspector

epi group list

epi group show 
epi ep show 



https://pypi.python.org/pypi/entry_point_inspector



If there is some error when loading the plugin, you may find error information 
the show command.



Best Regards

Chaoyi Huang ( joehuang )


From: Yipei Niu [newy...@gmail.com]
Sent: 27 June 2016 21:44
To: OpenStack Development Mailing List (not for usage questions)
Cc: joehuang; Zhiyuan Cai; ski...@redhat.com; 金城 忍
Subject: [tricircle] About registering and loading a plugin

Dear all,

Recently, I learn to name a plugin based on the doc 
http://docs.openstack.org/developer/stevedore/tutorial/naming.html#. I define a 
new entry_point for the plugin, then it fails. The console prompts 
"stevedore.exception.NoMatches: No 'net.nyp.formatter' driver found, looking 
for 'simple'". After setting a new entry_point with setuptools, why stevedore 
cannot find the driver based on the entry_point?

Best regards,
Yipei
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [tricircle] About registering and loading a plugin

2016-06-27 Thread Yipei Niu
Dear all,

Recently, I learn to name a plugin based on the doc
http://docs.openstack.org/developer/stevedore/tutorial/naming.html#. I
define a new entry_point for the plugin, then it fails. The console prompts
"stevedore.exception.NoMatches: No 'net.nyp.formatter' driver found,
looking for 'simple'". After setting a new entry_point with setuptools, why
stevedore cannot find the driver based on the entry_point?

Best regards,
Yipei
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev