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:

committed by
Thomas Haller

parent
478754a504
commit
5cd1b2669d
@@ -1323,9 +1323,11 @@
|
|||||||
<arg choice='plain'><command>status</command></arg>
|
<arg choice='plain'><command>status</command></arg>
|
||||||
<arg choice='plain'><command>show</command></arg>
|
<arg choice='plain'><command>show</command></arg>
|
||||||
<arg choice='plain'><command>set</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>connect</command></arg>
|
||||||
<arg choice='plain'><command>reapply</command></arg>
|
<arg choice='plain'><command>reapply</command></arg>
|
||||||
<arg choice='plain'><command>modify</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>disconnect</command></arg>
|
||||||
<arg choice='plain'><command>delete</command></arg>
|
<arg choice='plain'><command>delete</command></arg>
|
||||||
<arg choice='plain'><command>monitor</command></arg>
|
<arg choice='plain'><command>monitor</command></arg>
|
||||||
@@ -1391,7 +1393,7 @@
|
|||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<command>connect</command>
|
<command>up</command>
|
||||||
<arg choice='plain'><replaceable>ifname</replaceable></arg>
|
<arg choice='plain'><replaceable>ifname</replaceable></arg>
|
||||||
</term>
|
</term>
|
||||||
|
|
||||||
@@ -1410,6 +1412,18 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</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>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<command>reapply</command>
|
<command>reapply</command>
|
||||||
@@ -1448,7 +1462,7 @@
|
|||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<command>disconnect</command>
|
<command>down</command>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>ifname</replaceable></arg>
|
<arg choice='plain' rep='repeat'><replaceable>ifname</replaceable></arg>
|
||||||
</term>
|
</term>
|
||||||
|
|
||||||
@@ -1462,6 +1476,17 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</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>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
|
@@ -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},
|
{"lldp", do_device_lldp, usage_device_lldp, FALSE, FALSE},
|
||||||
{"modify", do_device_modify, usage_device_modify, TRUE, TRUE},
|
{"modify", do_device_modify, usage_device_modify, TRUE, TRUE},
|
||||||
{NULL, do_devices_status, usage, 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);
|
next_arg(nmc, &argc, &argv, NULL);
|
||||||
|
Reference in New Issue
Block a user