cli: add alias to nmcli device connect|disconnect

nmcli now accepts `nmcli device up|down` which works the same way as
`nmcli device connect|disconnect`

I also edited man pages of nmcli with new options.
This commit is contained in:
Vojtech Bubela 2021-06-23 15:59:10 +02:00 committed by Thomas Haller
parent 478754a504
commit 5cd1b2669d
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 29 additions and 2 deletions

View file

@ -1323,9 +1323,11 @@
<arg choice='plain'><command>status</command></arg>
<arg choice='plain'><command>show</command></arg>
<arg choice='plain'><command>set</command></arg>
<arg choice='plain'><command>up</command></arg>
<arg choice='plain'><command>connect</command></arg>
<arg choice='plain'><command>reapply</command></arg>
<arg choice='plain'><command>modify</command></arg>
<arg choice='plain'><command>down</command></arg>
<arg choice='plain'><command>disconnect</command></arg>
<arg choice='plain'><command>delete</command></arg>
<arg choice='plain'><command>monitor</command></arg>
@ -1391,7 +1393,7 @@
<varlistentry>
<term>
<command>connect</command>
<command>up</command>
<arg choice='plain'><replaceable>ifname</replaceable></arg>
</term>
@ -1409,6 +1411,18 @@
seconds.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>connect</command>
<arg choice='plain'><replaceable>ifname</replaceable></arg>
</term>
<listitem>
<para> Alias for command <command>up</command>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
@ -1448,7 +1462,7 @@
<varlistentry>
<term>
<command>disconnect</command>
<command>down</command>
<arg choice='plain' rep='repeat'><replaceable>ifname</replaceable></arg>
</term>
@ -1461,7 +1475,18 @@
will be 10 seconds.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>disconnect</command>
<arg choice='plain' rep='repeat'><replaceable>ifname</replaceable></arg>
</term>
<listitem>
<para> Alias for command <command>down</command>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>

View file

@ -5032,6 +5032,8 @@ nmc_command_func_device(const NMCCommand *cmd, NmCli *nmc, int argc, const char
{"lldp", do_device_lldp, usage_device_lldp, FALSE, FALSE},
{"modify", do_device_modify, usage_device_modify, TRUE, TRUE},
{NULL, do_devices_status, usage, TRUE, TRUE},
{"up", do_device_connect, usage_device_connect, TRUE, TRUE},
{"down", do_devices_disconnect, usage_device_disconnect, TRUE, TRUE},
};
next_arg(nmc, &argc, &argv, NULL);