<div dir="ltr">Hi,<div>For adding extra/static routes for your routers you have 2 ways in Heat (actually Neutron API has it, and you can use them in hot also):</div><div><ul><li>OS::Neutron::ExtraRoute</li><ul><li><a href="https://docs.openstack.org/api-ref/network/v2/index.html#update-router">https://docs.openstack.org/api-ref/network/v2/index.html#update-router</a><br></li></ul><li>OS::Neutron::ExtraRouteSet</li><ul><li><a href="https://docs.openstack.org/api-ref/network/v2/index.html#add-extra-routes-to-router">https://docs.openstack.org/api-ref/network/v2/index.html#add-extra-routes-to-router</a><br></li></ul></ul><div>The 1st one is the "old" set router attribute, and the 2nd is add_extraroutes & remove_extraroutes is optimized for concurrent updates (see the API ref's description for add_extraroutes).</div></div><div>So in hot template it will look something like this:</div><div>type: OS::Neutron::ExtraRouteSet<br>properties:<br> router: { get_resource: myrouter0 }<br> routes:<br> - destination: <a href="http://179.24.2.0/24">179.24.2.0/24</a><br> nexthop: 192.168.222.221<br></div><div><br></div><div>Lajos</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><a href="mailto:ddorra@t-online.de">ddorra@t-online.de</a> <<a href="mailto:ddorra@t-online.de">ddorra@t-online.de</a>> ezt írta (időpont: 2022. dec. 19., H, 21:43):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p style="margin:0px"><span style="font-family:"courier new",courier;font-size:10pt;color:rgb(0,0,0);text-decoration:none">Hi,</span></p>
<p style="margin:0px"> </p>
<p style="margin:0px"><span style="font-family:"courier new",courier;font-size:10pt;color:rgb(0,0,0);text-decoration:none">I want extend my router HOT template by adding a static route. </span></p>
<p style="margin:0px"> </p>
<p style="margin:0px"><span style="font-family:"courier new",courier;font-size:10pt;color:rgb(0,0,0);text-decoration:none">In the Openstack cli this would be </span></p>
<p style="margin:0px"> </p>
<p style="margin:0px"><span style="font-family:"courier new",courier;font-size:10pt;color:rgb(0,0,0);text-decoration:none"> openstack router add route --route destination='<a href="http://1.2.3.4/17" target="_blank">1.2.3.4/17</a>',gateway='10.0.0.66' myrouter</span></p>
<p style="margin:0px"> </p>
<p style="margin:0px"><span style="font-family:"courier new",courier;font-size:10pt;color:rgb(0,0,0);text-decoration:none">From the OS::Neutron::Router resource description I guess this belongs into the value_specs </span></p>
<p style="margin:0px"><span style="font-family:"courier new",courier;font-size:10pt;color:rgb(0,0,0);text-decoration:none">section as a map, but all my attempts failed, e.g.</span></p>
<p style="margin:0px"> </p>
<p style="margin:0px"><span style="font-family:"courier new",courier;font-size:10pt;color:rgb(0,0,0);text-decoration:none"> router1:<br> type: 'OS::Neutron::Router'<br> properties:<br> external_gateway_info:<br> network: provider<br> name: myrouter<br> value_specs:</span></p>
<p style="margin:0px"><span style="font-family:"courier new",courier;font-size:10pt;color:rgb(0,0,0);text-decoration:none"> route:<br> destination: '<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a>'<br> gateway: '10.0.0.62'<br></span></p>
<p style="margin:0px"> </p>
<p style="margin:0px"><span style="font-family:"courier new",courier;font-size:10pt;color:rgb(0,0,0);text-decoration:none">Can somebody help me with the correct syntax? </span></p>
<p style="margin:0px"> </p>
<p style="margin:0px"> </p>
<p style="margin:0px"><span style="font-family:"courier new",courier;font-size:10pt;color:rgb(0,0,0);text-decoration:none">Thanks & best regards,</span></p>
<p style="margin:0px"><span style="font-family:"courier new",courier;font-size:10pt;color:rgb(0,0,0);text-decoration:none">Dieter</span></p>
<p style="margin:0px"> </p></div></blockquote></div>