[openstack-dev] [Nova][Oslo.cfg] Configuration string substitution

Yuriy Taraday yorik.sar at gmail.com
Tue Jul 1 13:25:59 UTC 2014


Hello

On Fri, Jun 20, 2014 at 12:48 PM, Radoslav Gerganov <rgerganov at vmware.com>
wrote:

> Hi,
>
> > On Wed, Jun 18, 2014 at 4:47 AM, Gary Kotton <gkotton at vmware.com> wrote:
> > > Hi,
> > > I have encountered a problem with string substitution with the nova
> > > configuration file. The motivation was to move all of the glance
> settings
> > > to
> > > their own section (https://review.openstack.org/#/c/100567/). The
> > > glance_api_servers had default setting that uses the current
> glance_host
> > > and
> > > the glance port. This is a problem when we move to the ‘glance’
> section.
> > > First and foremost I think that we need to decide on how we should
> denote
> > > the string substitutions for group variables and then we can dive into
> > > implementation details. Does anyone have any thoughts on this?
> > > My thinking is that when we use we should use a format of
> $<group>.<key>.
> > > An
> > > example is below.
> > >
> >
> > Do we need to set the variable off somehow to allow substitutions that
> > need the literal '.' after a variable? How often is that likely to
> > come up?
>
> I would suggest to introduce a different form of placeholder for this like:
>
>   default=['${glance.host}:${glance.port}']
>
> similar to how variable substitutions are handled in Bash.  IMO, this is
> more readable and easier to parse.
>
> -Rado


I couldn't help but trying implement this:
https://review.openstack.org/103884

This change allows both ${glance.host} and ${.host} variants.

-- 

Kind regards, Yuriy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140701/d6e0080b/attachment.html>


More information about the OpenStack-dev mailing list