Jiří Klimeš
2eede80108
cli: deny removing values of nmcli-unchangable properties
...
nmc_setting_reset_property() function checks whether we allow changing the property
(set_func != NULL) and if so, the property value is reset to default.
2013-09-06 15:00:34 +02:00
Jiří Klimeš
70cc30cb73
cli: add missing connection:type to nmc_add_prop_funcs() in editor
2013-09-06 14:12:26 +02:00
Jiří Klimeš
50bec85f98
cli: allow editing team and team-port settings in interactive editor
2013-09-04 12:43:11 +02:00
Jiri Pirko
eb05cbeb9c
cli: add team and team-slave detail printing
...
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2013-09-04 12:43:11 +02:00
Jiří Klimeš
2d9366bcee
cli: connect IP addresses/method handlers for existing connections (rh #998137 )
...
The handlers detecting changes of IP addresses/method in nmcli interactive
editor were connected only for newly created connection. That's why the
automagic feature of setting 'method' when 'addresses' are changed and vice
versa worked just for new connections, but not while editing existing
connections.
2013-09-02 13:20:04 +02:00
Jiří Klimeš
36465df124
cli: remove 802-11-wireless.security property from nmcli as it is deprecated
...
If a Wi-Fi connection is secured, it contains 802-11-wireless-security setting.
That's it. There's no need to have this property.
2013-09-02 09:46:31 +02:00
Jiří Klimeš
d646cf909f
cli: disable setting 'rate' and 'tx-power' properties in editor
...
The properties are not implemented in NM core, nor in ifcfg-rh plugin. Thus
they are not preserved over re-reading from ifcfg-* file. Moreover they are
highly dependent on drivers.
When we allowed editing them, the connection changed after re-reading and
was marked as dirty (and users were puzzled).
2013-08-29 13:43:00 +02:00
Thomas Haller
a7588227ed
cli: bugfix verification for wifi channel in edit mode
...
This bug caused the edit mode to refuse most of the valid wifi channels.
The bug was present since the beginning, so all versions before this
commit will have this issue.
https://bugzilla.redhat.com/show_bug.cgi?id=999999
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-08-23 17:13:56 +02:00
Pavel Šimerda
320a9d16a3
all: replace struct in_addr with guint32
2013-08-03 00:15:07 -05:00
Jiří Klimeš
6f633a678a
cli: editor: automagic changes of IP 'addresses'/'method' if the other is set
2013-07-30 14:04:47 +02:00
Jiří Klimeš
5f0f4b83b1
cli: add support for InfiniBand's 'p-key' and 'parent' to interactive editor
2013-07-22 14:43:39 +02:00
Jiří Klimeš
8bcc68a00b
cli: trivial; use mtu variable instead of calling *_get_mtu() again
2013-07-22 14:07:07 +02:00
Dan Williams
16f5818927
cli: simplify setting creation
2013-07-22 13:37:17 +02:00
Jiří Klimeš
def37e4e0d
cli: nmc_property_get_gvalue() nmc_property_set_gvalue()
...
Functions to
- get property value and return it in GValue
- set property value from GValue
2013-07-22 13:37:16 +02:00
Jiří Klimeš
937eb48590
cli: 'connection edit' - edit/add connections in an interactive editor
...
nmcli connection edit [type <type>] [con-name <name>]
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
...
2013-07-22 13:32:32 +02:00
Jiří Klimeš
5d1a6813d0
cli: print newly added 'gateway-ping-timeout' connection's property
2013-06-24 12:25:12 +02:00
Dan Winship
2c13439df1
cli: add support for new InfiniBand properties
2013-06-13 15:56:14 -03:00
Dan Williams
a1dde9b516
cli: use a table for setting details functions
...
It's a bit clearer to find the setting and add new ones.
2013-06-06 10:06:39 +02:00
Dan Williams
b0863cbc4d
mobile: don't fail in old MM code when using deprecated functions
...
We want to keep using these deprecated functions when talking to
the old ModemManager to ensure behavior is unchanged.
2013-06-05 12:42:12 -05:00
Jiří Klimeš
28704d1f42
cli: 'dev wifi list' use nm_utils_ssid_to_utf8() to display SSID; add SSID-HEX
...
This commit removes enclosing '' from SSID.
SSID-HEX is printed as a string of hex characters (each 2 chars represent one
byte).
2013-05-31 09:38:03 +02:00
Jiří Klimeš
66098fa607
cli: trivial update of NmcOutputField initializers
...
no actual change
2013-05-31 09:38:03 +02:00
Jiří Klimeš
1d1cfd77d3
cli: adapt the code for the new flags and printing facilities
...
The data are added to output_data at first, and then they are printed all at
once using print_data(), that takes care of proper alignment and display.
The static 'width' values defined in NmcOutputField columns are not used now,
but dynamically computed maximal widths override them.
2013-05-31 09:38:03 +02:00
Jiří Klimeš
4d048cc2d8
cli: fix displaying unknown flags/bands
2013-05-06 14:00:10 +02:00
Dan Williams
e09550ec62
cli: clarify generic getter alloc/free behavior
2013-05-03 10:31:50 -05:00
Dan Winship
5fec30d98e
Revert :carrier-detect properties and associated code
...
Ignoring carrier is generally something you want at the machine level
(eg, for a server), not at the connection level.
2013-04-03 10:23:49 -04:00
Dan Winship
9e71bb3cd5
cli: add property get functions - returning property value for presentation
...
Simplify code by using property get functions, with most of them
autogenerated based on GObject properties and GValue transforms.
Based on a patch from Jiří Klimeš
2013-03-26 12:15:49 -04:00
Jiří Klimeš
113d358ce5
cli: make 'value' in NmcOutputField non const
2013-03-26 12:15:49 -04:00
Jiří Klimeš
3c98c2798f
cli: show connection:interface-name property for connections
2013-03-14 12:18:38 +01:00
Jiří Klimeš
18609641a0
cli: add CARRIER-DETECT properties for wired, infiniband, vlan settings
2013-02-18 10:09:33 +01:00
Jiří Klimeš
609b2d1782
cli: add missing properties (mainly secrets flags, and some others)
2013-01-30 15:27:06 +01:00
Jiří Klimeš
7881cb3252
cli: add missing 'dhcp-hostname' property to 'ipv6' setting
2013-01-30 12:27:13 +01:00
Jiří Klimeš
0c7bf6ba67
cli: add generic setting_details() for printing NMSetting
2013-01-30 12:27:13 +01:00
Jiří Klimeš
0f05bfb01f
cli: fix a possible crash on missing SSID
2013-01-21 14:49:24 +01:00
Thomas Graf
789f8c730d
cli: add bridge support
2012-11-30 13:21:51 -06:00
Jiří Klimeš
dc3b2a4c81
cli: print 'secondaries' property of 'connection' setting
...
nmcli -f connection con list id "my connection"
2012-09-24 10:38:17 +02:00
Jiří Klimeš
bafd97b087
cli: add missing properties of 'connection' setting
...
zone
master
slave-type
2012-09-05 16:14:37 +02:00
Jiří Klimeš
05a83b909d
cli: add 'ip6-privacy' property of ipv6 setting
2012-07-18 12:56:31 +02:00
Jiří Klimeš
5903392887
cli: free strings when printing adsl setting
2012-06-07 12:28:06 +02:00
Jiří Klimeš
716a09d7ac
cli: use "--" instead of "no set" for NULL strings
2012-06-04 12:25:43 +02:00
Pantelis Koukousoulas
8039dd30d8
adsl: add libnm-glib and nmcli code
...
For the finale, this is the libnm-glib and nmcli part of the support,
with this you can now make a full pppoatm connection from NetworkManager
by configuring it in system scope in a keyfile.
As an example, here is mine:
(password and username snipped for obvious reasons)
[connection]
id=MYISP
uuid=34d04e69-fdd9-4231-af2c-25ed1f34dc1e
type=adsl
timestamp=1304621332
[adsl]
username=user@myisp.com
password=mypassword
vpi=8
vci=35
encapsulation=vcmux
protocol=pppoa
[ipv6]
method=ignore
[ipv4]
method=auto
Extract from logs:
NetworkManager[29155]: <info> Activation (ueagle-atm0) starting connection 'MYISP'
NetworkManager[29155]: <info> (ueagle-atm0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 1 of 5 (Device Prepare) started...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 2 of 5 (Device Configure) scheduled...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 1 of 5 (Device Prepare) complete.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 2 of 5 (Device Configure) starting...
NetworkManager[29155]: <info> (ueagle-atm0): device state change: prepare -> config (reason 'none') [40 50 0]
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 2 of 5 (Device Configure) successful.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 3 of 5 (IP Configure Start) scheduled.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 2 of 5 (Device Configure) complete.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 3 of 5 (IP Configure Start) started...
NetworkManager[29155]: <info> (ueagle-atm0): device state change: config -> ip-config (reason 'none') [50 70 0]
NetworkManager[29155]: <info> starting PPP connection
NetworkManager[29155]: <debug> [1304671146.590156] [nm-ppp-manager.c:1047] nm_ppp_manager_start(): command line: /usr/sbin/pppd nodetach lock nodefaultroute user user@myisp.com plugin pppoatm.so 8.35 noipdefault noauth usepeerdns lcp-echo-failure 0 lcp-echo-interval 0 ipparam /org/freedesktop/NetworkManager/PPP/0 plugin /opt/nmadsl/lib/pppd/2.4.5/nm-pppd-plugin.so
NetworkManager[29155]: <info> pppd started with pid 29175
NetworkManager[29155]: <debug> [1304671146.591235] [NetworkManagerUtils.c:816] nm_utils_get_proc_sys_net_value(): (ueagle-atm0): error reading /proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra: (4) Failed to open file '/proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra': No such file or directory
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 3 of 5 (IP Configure Start) complete.
Plugin pppoatm.so loaded.
Plugin /opt/nmadsl/lib/pppd/2.4.5/nm-pppd-plugin.so loaded.
** Message: nm-ppp-plugin: (plugin_init): initializing
** Message: nm-ppp-plugin: (nm_phasechange): status 3 / phase 'serial connection'
NetworkManager[29155]: <debug> [1304671146.612937] [nm-udev-manager.c:621] handle_uevent(): UDEV event: action 'add' subsys 'net' device 'ppp0'
NetworkManager[29155]: <debug> [1304671146.613134] [nm-udev-manager.c:525] net_add(): ignoring interface with type 512
NetworkManager[29155]: <debug> [1304671146.617308] [nm-netlink-monitor.c:117] link_msg_handler(): netlink link message: iface idx 35 flags 0x1090
Using interface ppp0
Connect: ppp0 <--> 8.35
** Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
** Message: nm-ppp-plugin: (nm_phasechange): status 6 / phase 'authenticate'
** Message: nm-ppp-plugin: (get_credentials): passwd-hook, requesting credentials...
NetworkManager[29155]: <debug> [1304671149.639511] [nm-agent-manager.c:1044] nm_agent_manager_get_secrets(): Secrets requested for connection /org/freedesktop/NetworkManager/Settings/0 (adsl)
NetworkManager[29155]: <debug> [1304671149.639684] [nm-settings-connection.c:717] nm_settings_connection_get_secrets(): (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) secrets requested flags 0x1 hint 'password'
NetworkManager[29155]: <debug> [1304671149.640950] [nm-agent-manager.c:959] get_start(): (0x9b4ad10/adsl) system settings secrets sufficient
NetworkManager[29155]: <debug> [1304671149.641332] [nm-settings-connection.c:573] agent_secrets_done_cb(): (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) existing secrets returned
NetworkManager[29155]: <debug> [1304671149.641541] [nm-settings-connection.c:579] agent_secrets_done_cb(): (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) secrets request completed
NetworkManager[29155]: <debug> [1304671149.643074] [nm-settings-connection.c:618] agent_secrets_done_cb(): (34d04e69-fdd9-4231-af2c-25ed1f34dc1e/adsl:1) new agent secrets processed
** Message: nm-ppp-plugin: (get_credentials): got credentials from NetworkManager
PAP authentication succeeded
** Message: nm-ppp-plugin: (nm_phasechange): status 8 / phase 'network'
local IP address 94.70.90.201
remote IP address 80.106.108.12
primary DNS address 195.170.0.1
secondary DNS address 195.170.2.2
** Message: nm-ppp-plugin: (nm_phasechange): status 9 / phase 'running'
** Message: nm-ppp-plugin: (nm_ip_up): ip-up event
** Message: nm-ppp-plugin: (nm_ip_up): sending Ip4Config to NetworkManager...
NetworkManager[29155]: <debug> [1304671150.607440] [nm-netlink-monitor.c:117] link_msg_handler(): netlink link message: iface idx 35 flags 0x110D1
NetworkManager[29155]: <info> PPP manager(IP Config Get) reply received.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 4 of 5 (IP4 Configure Get) scheduled...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 4 of 5 (IP4 Configure Get) started...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 5 of 5 (IP Configure Commit) scheduled...
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 4 of 5 (IP4 Configure Get) complete.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 5 of 5 (IP Configure Commit) started...
NetworkManager[29155]: <debug> [1304671150.608918] [nm-system.c:222] sync_addresses(): (ppp0): syncing addresses (family 2)
NetworkManager[29155]: <info> (ueagle-atm0): device state change: ip-config -> activated (reason 'none') [70 100 0]
NetworkManager[29155]: <info> Policy set 'MYISP' (ppp0) as default for IPv4 routing and DNS.
NetworkManager[29155]: <info> Activation (ueagle-atm0) successful, device activated.
NetworkManager[29155]: <info> Activation (ueagle-atm0) Stage 5 of 5 (IP Configure Commit) complete.
Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
2012-05-18 15:42:56 -05:00
Dan Winship
8a2267ab6b
Fix a few misc issues noticed by Coverity
2012-04-05 13:30:09 -04:00
Dan Williams
c113bf222a
cli: fix VLAN priority map listing
2012-03-09 14:56:11 -06:00
Jiří Klimeš
5519ff9952
cli: add 'vlan' setting
2012-03-05 09:52:10 +01:00
Jiří Klimeš
71e7434d1a
cli: add 'bond' setting
2012-03-05 09:52:03 +01:00
Jiří Klimeš
8e22a535cc
cli: add 'transport-mode' property of infiniband setting
2012-02-01 11:47:19 +01:00
Jiří Klimeš
3a6c69d576
cli: add 'pac-file' property of 802-1x setting
2012-02-01 10:50:56 +01:00
Jiří Klimeš
bed4d15339
cli: use nm_utils_hwaddr_ntoa() from libnm-util
2011-12-09 13:47:06 +01:00
Jiří Klimeš
607cbffed2
cli: add 'infiniband' setting support
2011-12-09 13:20:36 +01:00
Jiří Klimeš
8962c98539
cli: use nm_connection_get_setting_<type>() to clean up code
2011-12-09 12:04:59 +01:00
Jiří Klimeš
d9330ffdc4
cli: print some missing properties in settings
2011-09-07 12:10:42 +02:00