Re: [RFC] [nmstate] Linux routing in nmstate





On Tue, Mar 5, 2019 at 9:35 AM Edward Haas <edwardh redhat com> wrote:


On Tue, Mar 5, 2019 at 9:25 AM Gris Ge <fge redhat com> wrote:
On Mon, Mar 04, 2019 at 05:58:01PM +0100, Thomas Haller wrote:
> On Mon, 2019-03-04 at 22:11 +0800, Gris Ge wrote:
> >  * Top tree is 'routes', and subtree is 'ipv4' and 'ipv6'.
> >    Even the IPv4 and IPv6 route entry are mostly identical, but we
> > need
> >    schema to differentiate the 'destination' address type in a simple
> >    way.
>
> Hi,
>
>   {
>     routes: {
>       [0] = {
>         addr-family: ipv4,
>         ...
>       },
>       ...
>     },
>   }
>
> I think the answer is "yes".
I agree. But Edward has some concern about how to enforce the
'destination' format if we unified the route, which I think we can lose
the schema on the destination to string let runtime do the syntax check.

The issue is with the nmstate clients, not nmstate itself.
The clients will have to write their own code to make sure they are passing
the correct thing. schema to code generator would have done that for them automatically.

As far as I know, existing schema standards do not support changing the type or format of one
entry based on a different entry value.


> "protocol" possibly should still be renamed to "source". Or "origin"?
The origin is better. Source might confuse with source routing.
>
> best,
> Thomas



--
Gris Ge


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]