cli: don't require "ifname" when adding connection

$ nmcli connection add type ethernet con-name t autoconnect no
  Error: ifname argument is required.

This reverts commit a91eafdf95 ('cli: 'con add': make ifname mandatory
(except bond,bridge,vlan) (bgo #698113)'). Apparently ifname argument was
required to avoid confusion (unexpected behavior). But I don't agree
that is an issue, it's just annoying. Often you really have just one
ethernet or Wi-Fi device, so this does not seem helpful.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/222
This commit is contained in:
Thomas Haller 2019-08-01 07:50:53 +02:00
parent 2c5176912d
commit 02e5a8d10a

View file

@ -5015,7 +5015,6 @@ static const NMMetaPropertyInfo *const property_infos_CONNECTION[] = {
PROPERTY_INFO_WITH_DESC (NM_SETTING_CONNECTION_INTERFACE_NAME,
.is_cli_option = TRUE,
.property_alias = "ifname",
.inf_flags = NM_META_PROPERTY_INF_FLAG_REQD,
.prompt = NM_META_TEXT_PROMPT_IFNAME,
.property_type = DEFINE_PROPERTY_TYPE (
.get_fcn = _get_fcn_gobject,