<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/cli/src/utils.h, branch th/NMStringTable</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>cli: consolidate active and configured connections (rh #997999)</title>
<updated>2014-01-23T12:45:46+00:00</updated>
<author>
<name>Jiří Klimeš</name>
<email>jklimes@redhat.com</email>
</author>
<published>2013-11-07T13:47:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=26f8889286aa1a210fc0211f202224137b0acf36'/>
<id>26f8889286aa1a210fc0211f202224137b0acf36</id>
<content type='text'>
Handle connection profiles in a single 'show' command instead of 'show active'
and 'show configured'.

nmcli con show [--active] [[id|uuid|path|apath] &lt;bla&gt;]

nmcli con show           : display all connection profiles
nmcli con show --active  : only display active connection profiles
                           (filters out inactive profiles)

nmcli con show myeth     : display details of "myeth" profile, and also active
                           connection info (if the profile is active)
nmcli -f profile con show myeth : only display "myeth"'s static configuration
nmcli -f active  con show myeth : only display active details of "myeth"
nmcli -f connection.id,ipv4,general con show myeth
                                          : display "connection.id"a property
                                            "ipv4" setting and "GENERAL" group
                                            of active data

https://bugzilla.redhat.com/show_bug.cgi?id=997999
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Handle connection profiles in a single 'show' command instead of 'show active'
and 'show configured'.

nmcli con show [--active] [[id|uuid|path|apath] &lt;bla&gt;]

nmcli con show           : display all connection profiles
nmcli con show --active  : only display active connection profiles
                           (filters out inactive profiles)

nmcli con show myeth     : display details of "myeth" profile, and also active
                           connection info (if the profile is active)
nmcli -f profile con show myeth : only display "myeth"'s static configuration
nmcli -f active  con show myeth : only display active details of "myeth"
nmcli -f connection.id,ipv4,general con show myeth
                                          : display "connection.id"a property
                                            "ipv4" setting and "GENERAL" group
                                            of active data

https://bugzilla.redhat.com/show_bug.cgi?id=997999
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: allow specifying 'group.name' syntax for '--fields'</title>
<updated>2013-12-17T12:51:34+00:00</updated>
<author>
<name>Jiří Klimeš</name>
<email>jklimes@redhat.com</email>
</author>
<published>2013-12-10T11:00:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=94bb83a370648dd5e3cd815e0d48125d7a491e30'/>
<id>94bb83a370648dd5e3cd815e0d48125d7a491e30</id>
<content type='text'>
and use it for 'nmcli device show'.

This allows filtering output not only for whole groups, but also for individual
fields in commands that print data in groups (sections).

Example:
$ nmcli -f general.device,general.driver,ipv4,ipv6.address device show eth0
GENERAL.DEVICE:                         eth0
GENERAL.DRIVER:                         e1000e
IP4.ADDRESS[1]:                         ip = 10.0.5.228/23, gw = 10.0.5.254
IP4.ADDRESS[2]:                         ip = 5.5.5.5/32, gw = 5.5.5.1
IP4.DNS[1]:                             192.168.122.1
IP4.DNS[2]:                             8.8.8.8
IP4.DOMAIN[1]:                          mycompany.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and use it for 'nmcli device show'.

This allows filtering output not only for whole groups, but also for individual
fields in commands that print data in groups (sections).

Example:
$ nmcli -f general.device,general.driver,ipv4,ipv6.address device show eth0
GENERAL.DEVICE:                         eth0
GENERAL.DRIVER:                         e1000e
IP4.ADDRESS[1]:                         ip = 10.0.5.228/23, gw = 10.0.5.254
IP4.ADDRESS[2]:                         ip = 5.5.5.5/32, gw = 5.5.5.1
IP4.DNS[1]:                             192.168.122.1
IP4.DNS[2]:                             8.8.8.8
IP4.DOMAIN[1]:                          mycompany.com
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: add 'nmcli' command for nmcli connection editor configuration</title>
<updated>2013-07-22T11:37:16+00:00</updated>
<author>
<name>Jiří Klimeš</name>
<email>jklimes@redhat.com</email>
</author>
<published>2013-04-05T21:42:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=ca1c0cdaf4071b4505681f5923d05ccd22882999'/>
<id>ca1c0cdaf4071b4505681f5923d05ccd22882999</id>
<content type='text'>
- show/hide status line:  nmcli&gt; nmcli status-line yes | no
- editor prompt color:    nmcli&gt; nmcli prompt-color &lt;0-8&gt;  (0 = normal/without color)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- show/hide status line:  nmcli&gt; nmcli status-line yes | no
- editor prompt color:    nmcli&gt; nmcli prompt-color &lt;0-8&gt;  (0 = normal/without color)
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: 'connection edit' - edit/add connections in an interactive editor</title>
<updated>2013-07-22T11:32:32+00:00</updated>
<author>
<name>Jiří Klimeš</name>
<email>jklimes@redhat.com</email>
</author>
<published>2013-01-18T14:21:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=937eb485905d0c1df88cda9a391185f556e47643'/>
<id>937eb485905d0c1df88cda9a391185f556e47643</id>
<content type='text'>
nmcli connection edit [type &lt;type&gt;] [con-name &lt;name&gt;]

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
...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
nmcli connection edit [type &lt;type&gt;] [con-name &lt;name&gt;]

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
...
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: 'dev wifi list' use nm_utils_ssid_to_utf8() to display SSID; add SSID-HEX</title>
<updated>2013-05-31T07:38:03+00:00</updated>
<author>
<name>Jiří Klimeš</name>
<email>jklimes@redhat.com</email>
</author>
<published>2013-05-16T14:26:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=28704d1f422c3dce80936b2b0d7d61ef4523b557'/>
<id>28704d1f422c3dce80936b2b0d7d61ef4523b557</id>
<content type='text'>
This commit removes enclosing '' from SSID.
SSID-HEX is printed as a string of hex characters (each 2 chars represent one
byte).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit removes enclosing '' from SSID.
SSID-HEX is printed as a string of hex characters (each 2 chars represent one
byte).
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: enhance printing to align tabular output properly and not to waste space</title>
<updated>2013-05-31T07:38:03+00:00</updated>
<author>
<name>Jiří Klimeš</name>
<email>jklimes@redhat.com</email>
</author>
<published>2013-05-22T06:36:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=e6870789b561b818cbb6d649d7707e2203d5720b'/>
<id>e6870789b561b818cbb6d649d7707e2203d5720b</id>
<content type='text'>
Until now we have used a static width defined for each column for tabular
output. Even if this worked in most cases, it was not optimal, because by
using too wide columns we wasted space, and in case of a too narrow column the
alignment broke. So, we need to know the longest string in a column to be able
to align columns in the tabular output. Thus, the printing has to be postponed
till we have all data available, and can find the widest column. This value is
then used for aligning while printing the data.

Arrays of NmcOutputField (rows) are inserted into output_data array. When all
data have been added, print_data() can be used to print the whole output_data
array with proper alignment.

A single row can be printed using print_required_fields().

Also, output flags are redone to better match the new output_data array.
The flags are needed for every row (in tabular output); they are stored in
the first field (NmcOutputField) for the whole row.

Addapted set_val_str() and set_val_arr() to set value type (char * x char **).
Added set_val_strc(), set_val_arrc() for const values that should not be freed.

output_data takes ownership of the data added to it and takes care of freeing
the memory.

See e.g.
https://bugzilla.gnome.org/show_bug.cgi?id=699503
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Until now we have used a static width defined for each column for tabular
output. Even if this worked in most cases, it was not optimal, because by
using too wide columns we wasted space, and in case of a too narrow column the
alignment broke. So, we need to know the longest string in a column to be able
to align columns in the tabular output. Thus, the printing has to be postponed
till we have all data available, and can find the widest column. This value is
then used for aligning while printing the data.

Arrays of NmcOutputField (rows) are inserted into output_data array. When all
data have been added, print_data() can be used to print the whole output_data
array with proper alignment.

A single row can be printed using print_required_fields().

Also, output flags are redone to better match the new output_data array.
The flags are needed for every row (in tabular output); they are stored in
the first field (NmcOutputField) for the whole row.

Addapted set_val_str() and set_val_arr() to set value type (char * x char **).
Added set_val_strc(), set_val_arrc() for const values that should not be freed.

output_data takes ownership of the data added to it and takes care of freeing
the memory.

See e.g.
https://bugzilla.gnome.org/show_bug.cgi?id=699503
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: nmc_string_to_bool() - util function for converting string to boolean</title>
<updated>2013-05-07T17:41:36+00:00</updated>
<author>
<name>Jiří Klimeš</name>
<email>jklimes@redhat.com</email>
</author>
<published>2013-04-06T21:25:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=04d590a92335ddc79d12d81eae31af0519d76a15'/>
<id>04d590a92335ddc79d12d81eae31af0519d76a15</id>
<content type='text'>
["true", "yes", "on"] -&gt; TRUE
["false", "no", "off"] -&gt; FALSE
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
["true", "yes", "on"] -&gt; TRUE
["false", "no", "off"] -&gt; FALSE
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: util functions for converting string to int</title>
<updated>2013-05-07T17:41:36+00:00</updated>
<author>
<name>Jiří Klimeš</name>
<email>jklimes@redhat.com</email>
</author>
<published>2013-01-16T11:28:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=ddd3ea2cd43b78aab2c50d336be5b14ffae9f7e8'/>
<id>ddd3ea2cd43b78aab2c50d336be5b14ffae9f7e8</id>
<content type='text'>
nmc_string_to_int()  - converts string to signed long int (decimal)
nmc_string_to_uint() - converts string to unsigned long int (decimal)
nmc_string_to_int_base()  - converts string to signed long int with given base
nmc_string_to_uint_base() - converts string to unsigned long int with given base
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
nmc_string_to_int()  - converts string to signed long int (decimal)
nmc_string_to_uint() - converts string to unsigned long int (decimal)
nmc_string_to_int_base()  - converts string to signed long int with given base
nmc_string_to_uint_base() - converts string to unsigned long int with given base
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: nmc_string_is_valid() utility function</title>
<updated>2013-05-07T17:41:36+00:00</updated>
<author>
<name>Jiří Klimeš</name>
<email>jklimes@redhat.com</email>
</author>
<published>2013-04-08T07:25:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8598ee1139a43835155c4b8bd1eae45b8bd4df47'/>
<id>8598ee1139a43835155c4b8bd1eae45b8bd4df47</id>
<content type='text'>
This function checks whether a string is contained among allowed strings. It
performs case-insensitive comparison and supports shortcuts if they are unique.
It returns a pointer to the found string in allowed array, or NULL.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function checks whether a string is contained among allowed strings. It
performs case-insensitive comparison and supports shortcuts if they are unique.
It returns a pointer to the found string in allowed array, or NULL.
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: add nmc_arg_is_help() and use it to save some code lines</title>
<updated>2013-04-18T09:25:49+00:00</updated>
<author>
<name>Jiří Klimeš</name>
<email>jklimes@redhat.com</email>
</author>
<published>2013-04-18T09:25:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=7d5df73d76bd91092cc88a44deea2ff62560a7c0'/>
<id>7d5df73d76bd91092cc88a44deea2ff62560a7c0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
