[openstack-dev] [openstack][neutron]adding and parsing new configuration option in neutron.conf

Ihar Hrachyshka ihrachys at redhat.com
Thu Jul 14 09:47:16 UTC 2016


Megan Liu <meirongliu2008 at gmail.com> wrote:

> Hi
>
> I am new to Openstack neutron. I have problem of parsing new added option  
> in neutron.conf. Do I have to register the new added option in code to be  
> able to read the option value from neutron.conf or not.

Yes, you should register it with oslo.config:  
http://docs.openstack.org/developer/oslo.config/cfg.html#registering-options



>
> After adding new option in neutron.conf,  in the code , I try to use
>
>
> neutron.conf
> .......
> remote_ipam_ip= XXX
>
> .......
>
> In the code
>
> ******
>
> from oslo_config import cfg
>
> ipam_ip_val=cfg.CONF.remote_ipam_ip
>
> ******
> I got error :
> File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 1906, in  
> __getattr__
> 2016-07-14 11:34:11.085 12001 ERROR neutron.api.v2.resource     raise  
> NoSuchOptError(name)
> 2016-07-14 11:34:11.085 12001 ERROR neutron.api.v2.resource  
> NoSuchOptError: no such option: remote_ipam_ip
>
>
> Thanks.
>
> Meirong
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev





More information about the OpenStack-dev mailing list