So the syntax is now:
nmcli con edit [id | uuid | path ] <ID>
- for editing an existing connection
nmcli con edit [type <new connection type>] [con-name <new connection name>]
- for adding a new connection
Supported libraries are:
GNU Readline (libreadline) http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
NetBSD Editline (libedit) http://www.thrysoee.dk/editline/
We load these symbols:
readline() - main function allowing getting user input and aditing that
add_history() - stores strings to history
rl_insert_text() - insert text into the line at the current cursor position
rl_startup_hook - hook to call just before readline prints the first prompt
nmcli connection edit [type <type>] [con-name <name>]
Examples:
nmcli c e
nmcli c e type ethernet
nmcli c e type wifi con-name "My home Wi-Fi"
nmcli c e type bond
...
Abstract class, fake implementation and a manual testing tool for
NetworkManager's internal IPv6 router discovery module. When a real
implementation is ready, it will replace nm-ip6-manager and will be used
by nm-device.
Callers of these functions now only care whether two IP configs are
different and not what specific property changed, so we can simplify
this code down to a simple comparison for equality, based on the hashing
that's already done for the DNS manager.
Note that this patch doesn't effectively change any code.
Functions moved from nm-system:
* nm_system_apply_ip?_config → nm_ip?_config_commit
* ip?_dest_in_same_subnet → nm_ip?_config_destination_is_direct
Functions moved from NetworkManagerUtils:
* nm_utils_merge_ip?_config → nm_ip?_config_merge_setting
Functions renamed (and moved down to form one group):
* nm_ip?_config_new_for_interface → nm_ip?_config_capture
(The rationale for the rename is that from the achitectural point of
view it doesn't matter whether the function creates a new object or
updates an existing one. After the rename, it's obvious that
nm_ip?_config_capture() and nm_ip?_config_commit() are counterparts of
each other.)
We should also quit on 'DEACTIVATED' state' when monitoring active connection
state.
Reproducer:
nmcli con add con-name myvlan dev eth1 id 88
nmcli -p con up myvlan
0652d9c596 changed IP states like this:
| old behaviour | new behaviour
---------------------------------------------------------
success | IP_DONE && config is not NULL | IP_DONE
failure | IP_DONE && config is NULL | IP_FAIL
But some failure paths was not updated.
nm_platform_*_sync() functions check the cached kernel configuration
items (addresses, routes) before adding addresses to the kernel.
Therefore we don't need to be so careful about pushing NetworkManager
configuration to the kernel.
This patch helps to avoid having to compare nm_ip[46]_config objects,
which should only be created when a configuration change is being
performed.