- 14 May, 2018 2 commits
-
-
Thomas Haller authored
Functions like nmc_find_connection() and nmc_find_active_connection() can easily find multiple matching results. For example, the "connection.id" in NetworkManager is not enforced to be unique, so if the user adds multiple connections with the same name, they should be all selected. The previous API had a @pos argument, that allowed to iterate over the results. Change that, to return all matches in a GPtrArray. Also, extend connection-show and other places, to anticipate that a connection might be active multiple times in any moment.
-
Thomas Haller authored
Beside nmc_find_connection(), which is very similar. Also, drop unused argument @cons.
-
- 23 Apr, 2018 1 commit
-
-
Thomas Haller authored
-
- 16 Oct, 2017 1 commit
-
-
Beniamino Galvani authored
In a later commit we'll add a new generic client function used by nmcli and nmtui. nm-client-utils.c seems the right place for it, so move the file to the base library that is used by both clients. While at it, also put in that file some functions that will be needed by nmtui.
-
- 12 Apr, 2017 2 commits
-
-
Thomas Haller authored
-
Thomas Haller authored
The IP4 info adds a new type: to expose strv arguments for addresses, etc.
-
- 05 Apr, 2017 1 commit
-
-
Thomas Haller authored
When generating output data, nmcli iterates over a list of property-descriptors (nmc_fields_ip4_config), creates an intermediate array (output_data) and finally prints it. However, previously both the meta data (nmc_fields_ip4_config) and the intermediate format use the same type NmcOutputField. This means, certain fields are relevant to describe a property, and other fields are output/formatting fields. Split this up. Now, the meta data is tracked in form of an NMMetaAbstractInfo lists. This separates the information about properties from intermediate steps during creation of the output. Note that currently functions like print_ip4_config() still have all the knowledge about how to generate the output. That is wrong, instead, the meta data (NMMetaAbstractInfo) should describe how to create the output and then all those functions could be replaced. This means, later we want to add more knowledge to the NMMetaAbstractInfo, so it is important to keep them separate from NmcOutputField.
-
- 30 Mar, 2017 3 commits
-
-
Thomas Haller authored
We should not violate the global data to track the output data while it is constructed and printed. Most of the time, we actually clear the output data anyway -- either before constructing it, or after printing it. In some cases we didn't, but I think that is a bug. It's really hard to keep track of this. The output data should belong to a certain scope and get destroyed afterwards. Passing it around is very confusing. Don't do that.
-
Thomas Haller authored
These functions are only used by nm-meta-setting-desc.c. Make them internal. Unfortunately, they are part of "common.h" which cannot be used without the rest of nmcli. Still todo.
-
Thomas Haller authored
-
- 06 Mar, 2017 1 commit
-
-
Beniamino Galvani authored
-
- 11 Nov, 2016 1 commit
-
-
Lubomir Rintel authored
-
- 04 Oct, 2016 1 commit
-
-
Atul Anand authored
libnm-core: pac-script property in NMSettingProxy now represents the script itself not the location. It ensures that the connection is self contained. nmcli: Supports loading of PAC Script via file path or written explicitly.
-
- 19 Sep, 2016 1 commit
-
-
Jiří Klimeš authored
and rename it to nmc_rl_gen_func()
-
- 20 Aug, 2016 2 commits
-
-
Beniamino Galvani authored
The error returned to users when a load_connection(s)/set_logging call fails due to D-Bus policy denial is a bit obscure: $ nmcli general logging level debug Error: failed to set logging: Rejected send message, 4 matched rules; type="method_call", sender=":1.233" (uid=1001 pid=27225 comm="nmcli general logging level debug ") interface="org.freedesktop.NetworkManager" member="SetLogging" error name="(unset)" requested_reply="0" destination=":1.207" (uid=0 pid=25793 comm="/usr/sbin/NetworkManager --no-daemon ") Convert it to a more comprehensible: $ nmcli general logging level debug Error: failed to set logging: access denied https://bugzilla.redhat.com/show_bug.cgi?id=1362542 (cherry picked from commit 805925f9)
-
Beniamino Galvani authored
The error returned to users when a load_connection(s)/set_logging call fails due to D-Bus policy denial is a bit obscure: $ nmcli general logging level debug Error: failed to set logging: Rejected send message, 4 matched rules; type="method_call", sender=":1.233" (uid=1001 pid=27225 comm="nmcli general logging level debug ") interface="org.freedesktop.NetworkManager" member="SetLogging" error name="(unset)" requested_reply="0" destination=":1.207" (uid=0 pid=25793 comm="/usr/sbin/NetworkManager --no-daemon ") Convert it to a more comprehensible: $ nmcli general logging level debug Error: failed to set logging: access denied https://bugzilla.redhat.com/show_bug.cgi?id=1362542
-
- 01 Aug, 2016 2 commits
-
-
Lubomir Rintel authored
-
Lubomir Rintel authored
Start completing by the id if the filter type is not specified
-
- 29 Jun, 2016 3 commits
-
-
Lubomir Rintel authored
-
Lubomir Rintel authored
-
Lubomir Rintel authored
-
- 07 Dec, 2015 1 commit
-
-
Jiří Klimeš authored
adds nmc_readline_echo() function that can disable displaying characters.
-
- 10 Nov, 2015 1 commit
-
-
Beniamino Galvani authored
The list of LLDP neighbors is available through the D-Bus interface and libnm already provides functions to retrieve it; make the list available through nmcli as well. Sample output: $ nmcli device lldp NEIGHBOR[0].DEVICE: eth0 NEIGHBOR[0].CHASSIS-ID: 00:13:21:58:CA:42 NEIGHBOR[0].PORT-ID: 1 NEIGHBOR[0].PORT-DESCRIPTION: 1 NEIGHBOR[0].SYSTEM-NAME: ProCurve Switch 2600-8-PWR NEIGHBOR[0].SYSTEM-DESCRIPTION: ProCurve J8762A Switch 2600-8-PWR, revision H.08.89 NEIGHBOR[0].SYSTEM-CAPABILITIES: 20 (mac-bridge,router) NEIGHBOR[1].DEVICE: eth2 NEIGHBOR[1].CHASSIS-ID: 00:01:30:F8:AD:A2 NEIGHBOR[1].PORT-ID: 1/1 NEIGHBOR[1].PORT-DESCRIPTION: Summit300-48-Port 1001 NEIGHBOR[1].SYSTEM-NAME: Summit300-48 NEIGHBOR[1].SYSTEM-DESCRIPTION: Summit300-48 - Version 7.4e.1 (Build 5) NEIGHBOR[1].SYSTEM-CAPABILITIES: 20 (mac-bridge,router) https://bugzilla.gnome.org/show_bug.cgi?id=757307
-
- 09 Nov, 2015 1 commit
-
-
Jiří Klimeš authored
-
- 09 Jun, 2015 1 commit
-
-
Beniamino Galvani authored
-
- 20 Nov, 2014 1 commit
-
-
Jiří Klimeš authored
And move secrets getting code to common.c (without changes).
-
- 07 Nov, 2014 4 commits
-
-
Dan Winship authored
As with NMIP4Config and NMIP6Config, merge the two DHCP config classes into one in the public API.
-
Dan Winship authored
Create NMIPConfig as the parent of NMIP4Config and NMIP6Config, and remove the two subclasses from the public API; while it's convenient to still have both internally, they are now identical to the outside world.
-
Dan Winship authored
The gateway is a global property of the IPv4/IPv6 configuration, not an attribute of any particular address. So represent it as such in the API; remove the gateway from NMIPAddress, and add it to NMSettingIPConfig. Behind the scenes, the gateway is still serialized along with the first address in NMSettingIPConfig:addresses, and is deserialized from that if the settings dictionary doesn't contain a 'gateway' key. Adjust nmcli's interactive mode to prompt for IP addresses and gateway separately. (Patch partly from Jirka Klimeš.)
-
Dan Winship authored
Merge NMIP4Address and NMIP6Address into NMIPAddress, and NMIP4Route and NMIP6Route into NMIPRoute. The new types represent IP addresses as strings, rather than in binary, and so are address-family agnostic.
-
- 28 Oct, 2014 1 commit
-
-
Dan Winship authored
libnm mostly used GPtrArrays in its APIs, except that arrays of connections were usually GSLists. Fix this and make them GPtrArrays too (and rename nm_client_list_connections() to nm_client_get_connections() to match everything else).
-
- 01 Aug, 2014 2 commits
-
-
Dan Winship authored
Add NetworkManager.h, which includes all of the other NM header, and require all external users of libnm to use that rather than the individual headers. (An exception is made for nm-dbus-interface.h, nm-vpn-dbus-interface.h, and nm-version.h, which can be included separately.)
-
Dan Winship authored
GLib/Gtk have mostly settled on the convention that two-letter acronyms in type names remain all-caps (eg, "IO"), but longer acronyms become initial-caps-only (eg, "Tcp"). NM was inconsistent, with most long acronyms using initial caps only (Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP, PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all three-or-more-letter-long acronyms (and update nmcli and nmtui for the libnm changes).
-
- 30 Jul, 2014 1 commit
-
-
Dan Winship authored
Create a new clients/ subdirectory at the top level, and move cli/ and tui/ into it, as well as nm-online.c (which was previously in test/, which made no sense). cli/ was split into two subdirectories, src/ and completion/. While this does simplify things (given that the completion file and the binary both need to be named "nmcli"), it bloats the source tree, and we can work around it by just renaming the completion file at install time. Then we can combine the two directories into one and just have it all under clients/cli/.
-
- 24 Jun, 2014 1 commit
-
-
Jiří Klimeš authored
We rather cancel the input and show new prompt on readline. It is more expected behaviour for interactive input when quitting.
-
- 11 Jun, 2014 1 commit
-
-
- 06 Jun, 2014 1 commit
-
-
Jiří Klimeš authored
The old Function, CPFunction, CPPFunction and VFunction typedefs are considered deprecated starting from readline 4.2 (though were not marked as such): http://lists.gnu.org/archive/html/bug-bash/2000-10/msg00078.html Compatibility typedefs have been in place up to readline 6.2 but were removed with the 6.3 release thus causing build to break. http://lists.gnu.org/archive/html/bug-readline/2014-04/msg00018.html https://bugzilla.gnome.org/show_bug.cgi?id=731294
-
- 04 Jun, 2014 2 commits
-
-
Jiří Klimeš authored
for nmc_readline()
-
Jiří Klimeš authored
Renames readline_x() to nmc_readline() gen_func_basic() to nmc_rl_gen_func_basic() The commit doesn't change functionality, only moves and renames the functions, so that they can be used in other places too.
-
- 22 Apr, 2014 1 commit
-
-
Jiří Klimeš authored
- check if the values being set are existing connections - also allow specifying connections by names, translating them transparently to UUIDs. - nmcli-specific section for 'describe' command added (We use a global nm_cli variable in nmc_property_connection_set_secondaries())
-