[nmstate] [RFC] ip route partial editing vs whole-state editing

Hi Guys,

For the IP route editing in nmstate, the parietal editing is

User case A:
    Current routes: via dev eth1
    Desired routes:         changed next hope to

User case B:
    Current routes: via dev eth1
    Desired routes:         add another route entry,
                   via dev eth1
                            for load balance.

With partial editing:
    For A), nmstate API user need to mark exiting routes as 'absent',
    then add new one.
    For B), nmstate API user just add new one.

        * It's easy for user to add new route entry with
          minimum/incremental data passing to nmstate API.
        * When editing certain entry, user need to search it from
          current state and mark it as absent. This adds a lot more
          works in API user.
        * The API is complexing the common user case -- editing route.

With full editing: API user just define what he/she wants.

        * It simple and clear to say in API document about route:
            You get what you asked, nothing else.

        * API user need to define the whole state, which might be
          a headache with 10k+ routes.

I personally favor the full editing staff and add below functions when
full editing is a real concern in the future:

    * nmstate.netapplier.add()              # Add new stuff
    * nmstate.netapplier.edit()             # Override existing stuff
    * nmstate.netapplier.remove()           # Remove stuff

Any comments and suggestions?

Thank you very much.
Best regards.

Gris Ge

Attachment: signature.asc
Description: PGP signature

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