<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style id="owaParaStyle">P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
</head>
<body fPStyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<p>Hi, Yipei,</p>
<p> </p>
<div>"Moreover, I tried to load drivers by line "<font color="black" size="2" face="Menlo"><span style="BACKGROUND-COLOR: white; FONT-SIZE: 9pt">cfg.CONF.nyp.plugins.</span></font><font color="black" size="2" face="Menlo"><span style="BACKGROUND-COLOR: white; FONT-SIZE: 9pt">simple</span></font>",
 the console prompts oslo_config.cfg.NoSuchOptError: no such option in group DEFAULT: nyp. The setup.cfg is defined as follows."</div>
<div> </div>
<div>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:".</div>
<div> </div>
<div>Best Regards</div>
<div>Chaoyi Huang ( joehuang )</div>
<div> </div>
<div style="FONT-FAMILY: Times New Roman; COLOR: #000000; FONT-SIZE: 16px">
<hr tabindex="-1">
<div style="DIRECTION: ltr" id="divRpF454973"><font color="#000000" size="2" face="Tahoma"><b>From:</b> Yipei Niu [newypei@gmail.com]<br>
<b>Sent:</b> 28 June 2016 22:05<br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions)<br>
<b>Cc:</b> joehuang; Vega Cai; skinjo@redhat.com; ½ð³Ç ÈÌ<br>
<b>Subject:</b> Re: [tricircle] About registering and loading a plugin<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Hi all,
<div><br>
</div>
<div>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 <a style="FONT-SIZE: 13px" href="https://review.openstack.org/#/c/331638/" target="_blank">https://review.openstack.org/#/c/331638/</a>. </div>
<div><br>
</div>
<div>Moreover, I tried to load drivers by line "<span style="BACKGROUND-COLOR: rgb(255,255,255)"><font color="#000000"><span style="FONT-FAMILY: Menlo; FONT-SIZE: 9pt">cfg.CONF.nyp.plugins.</span><span style="FONT-FAMILY: Menlo; FONT-SIZE: 9pt">simple</span></font></span>",
 the console prompts oslo_config.cfg.NoSuchOptError: no such option in group DEFAULT: nyp. The setup.cfg is defined as follows.</div>
<div>
<pre style="BACKGROUND-COLOR: rgb(43,43,43); FONT-FAMILY: Menlo; COLOR: rgb(169,183,198); FONT-SIZE: 9pt">[entry_points]<br>nyp.plugins.formmater =<br>    simple = nyp.plugins.simple:SimpleFormatter<br>    plain = nyp.plugins.simple:SimpleFormatter<br>    field = nyp.plugins.field:FieldList</pre>
</div>
<div>How to solve the problem?</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Yipei</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jun 28, 2016 at 10:35 AM, Vega Cai <span dir="ltr">
<<a href="mailto:luckyvega.g@gmail.com" target="_blank">luckyvega.g@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div dir="ltr">Hi Yipei,
<div><br>
</div>
<div>You can also refer to my network type driver implementation:</div>
<div><br>
</div>
<div><a href="https://review.openstack.org/#/c/331638/" target="_blank">https://review.openstack.org/#/c/331638/</a><br>
</div>
<div><br>
</div>
<div>Type driver is registered in setup.cfg and loaded by code.</div>
<div><br>
</div>
<div>BR</div>
<div>Zhiyuan</div>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On 27 June 2016 at 21:44, Yipei Niu <span dir="ltr"><<a href="mailto:newypei@gmail.com" target="_blank">newypei@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div dir="ltr">Dear all,
<div><br>
</div>
<div>Recently, I learn to name a plugin based on the doc <a href="http://docs.openstack.org/developer/stevedore/tutorial/naming.html#" target="_blank">
http://docs.openstack.org/developer/stevedore/tutorial/naming.html#</a>. 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?</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Yipei</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>