<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hi,</div>
<div>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 (<a href="https://review.openstack.org/#/c/100567">https://review.openstack.org/#/c/100567</a>/).
 The <span style="white-space: pre;">glance_api_servers</span> had default setting that uses the current glance_host and the glance port. This is a problem when we move to the ‘glance’ section.</div>
<div>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?</div>
<div><br>
</div>
<div>My thinking is that when we use we should use a format of $<group>.<key>. An example is below.</div>
<div><br>
</div>
<div>Original code:</div>
<div>
<pre><div class="line" id="LC53">    <span class="n">cfg</span><span class="o">.</span><span class="n">ListOpt</span><span class="p">(</span><span class="s">'glance_api_servers'</span><span class="p">,</span></div><div style="background-color: rgb(255, 255, 204);" class="line" id="LC54">                <span class="n">default</span><span class="o">=</span><span class="p">[</span><span class="s">'$glance_host:$glance_port'</span><span class="p">],</span></div><div class="line" id="LC55">                <span class="n">help</span><span class="o">=</span><span class="s">'A list of the glance api servers available to nova. '</span></div><div class="line" id="LC56">                     <span class="s">'Prefix with https:// for ssl-based glance api servers. '</span></div><div class="line" id="LC57">                     <span class="s">'([hostname|ip]:port)'</span><span class="p">),</span></div></pre>
</div>
<div>
<pre><div class="line" id="LC53">Proposed change (in the glance section):</div><div class="line" id="LC53">    <span class="n">cfg</span><span class="o">.</span><span class="n">ListOpt</span><span class="p">(</span><span class="s">'api_servers'</span><span class="p">,</span></div><div style="background-color: rgb(255, 255, 204);" class="line" id="LC54">                <span class="n">default</span><span class="o">=</span><span class="p">[</span><span class="s">‘$glance.host:$glance.port'</span><span class="p">],</span></div><div class="line" id="LC55">                <span class="n">help</span><span class="o">=</span><span class="s">'A list of the glance api servers available to nova. '</span></div><div class="line" id="LC56">                     <span class="s">'Prefix with https:// for ssl-based glance api servers. '</span></div><div class="line" id="LC57">                     <span class="s">'([hostname|ip]:port)’</span><span class="p">,</span></div><div class="line" id="LC57"><span class="p">                </span><span class="pln" style="font-family: Calibri, sans-serif;">deprecated_group</span><span class="pun" style="font-family: Calibri, sans-serif;">=</span><span class="str" style="font-family: Calibri, sans-serif;">'DEFAULT’</span><span class="pun" style="font-family: Calibri, sans-serif;">,</span></div><div class="line" id="LC57"><span class="pun" style="font-family: Calibri, sans-serif;">                                          </span><span class="wdi" style="font-family: Calibri, sans-serif;"><span class="pln">deprecated_name</span><span class="pun">=</span><span class="str">'glance_api_servers'</span></span><span class="wdc" style="font-family: Calibri, sans-serif;">),</span></div></pre>
</div>
<div>This would require some preprocessing on the oslo.cfg side to be able to understand the $glance is the specific group and then host is the requested value int he group.</div>
<div><br>
</div>
<div>Thanks</div>
<div>Gary</div>
<div><br>
</div>
</body>
</html>