Re: Adding experimental arguments to nmcli tool



On Tue, 2022-03-08 at 22:15 +0100, Thomas Haller wrote:
of course, that's just an example to show all pieces. Above could be
written shorter as:

   nmcli connection modify $PROFILE --keyfile | \
   nmcli connection modify keyfile \
        connection.uuid $(uuidgen) \
        autoconnect no


interestingly, if you don't modify the UUID, then the profile would
already exist, and the command would not add a new profile, but
actually overwrite the existing one.

Actually, we could in general support

  nmcli connection modify "$PROFILE" connection.uuid $(uuidgen) $OPTIONS

as a way to add/clone a profile, and modifying it
... and determining the UUID (currently you cannot specify the UUID of
a new profile via nmcli).

That would be then similar to the existing

  nmcli connection clone $PROFILE1 $NAME2

except, that clone currently does not support $OPTIONS -- but it really
should, for completeness.


I am not saying that all these options should be actually implemented
(especially not in step 1). But that they might make sense in the grand
scheme of things. So it's useful to think about how that would be.



best,
Thomas



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