[Openstack Heat] - Problems to find right Heat syntax to declare static route in a router template

ddorra at t-online.de ddorra at t-online.de
Wed Dec 21 13:50:29 UTC 2022


Hi Lajos,
 
many thanks for your hints!  
 
Dieter

> Hi, 
>
> 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):
>
>  OS::Neutron::ExtraRoute  https://docs.openstack.org/api-ref/network/v2/index.html#update-router
>
>  OS::Neutron::ExtraRouteSethttps://docs.openstack.org/api-ref/network/v2/index.html#add-extra-routes-to-router
>
> 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).
>  So in hot template it will look something like this:
>  type: OS::Neutron::ExtraRouteSet
>  properties:
>   router: { get_resource: myrouter0 }
>   routes:
>   - destination: 179.24.2.0/24
>   nexthop: 192.168.222.221
> 
>  Lajos
>
> >  ddorra at t-online.de <ddorra at t-online.de> ezt írta (időpont: 2022. dec. 19., H, 21:43):
> >  Hi,
> > 
> >  I want extend my router HOT template by adding a static route. 
> >  
> >  In the Openstack cli this would be 
> >  
> >      openstack router add route --route destination='1.2.3.4/17',gateway='10.0.0.66' myrouter
> >  
> >  From the OS::Neutron::Router resource description I guess this belongs into the value_specs 
> >  section as a map, but all my attempts failed, e.g.
> >  
> >  router1:
> >    type: 'OS::Neutron::Router'
> >    properties:
> >      external_gateway_info:
> >        network: provider
> >      name: myrouter
> >    value_specs:
> >      route:
> >        destination: '0.0.0.0/0'
> >        gateway: '10.0.0.62'
> >  
> >  Can somebody help me with the correct syntax? 
> >  
> >  
> >  Thanks & best regards,
> >  Dieter
 
 




More information about the openstack-discuss mailing list