Commit Graph

369 Commits

Author SHA1 Message Date
Beniamino Galvani
8b9ea0b7c6 checkpoint: consider all devices when an empty list is passed
First, consider all devices and not only realized and managed ones
when an empty list is passed. Also, move the list evaluation to the
checkpoint manager, since the check for device conflicts is done
there.

Fixes: 3e09aed2a0
2016-09-26 15:10:39 +02:00
Thomas Haller
93a753e311 capabilities: add comment about capability range 2016-09-23 16:09:06 +02:00
Thomas Haller
4a6c07d4e5 capabilities: fix data type to "u" / uint32
The property NM_MANAGER_CAPABILITIES was already "au".
The types must be used consistently.
2016-09-23 15:49:52 +02:00
Marius Vollmer
1bb00ae66a manager: Add "Capabilities" property 2016-09-23 15:49:52 +02:00
Thomas Haller
6fb917178a dbus: deprecated NM specific PropertiesChanged signals
Nowadays, users should use the standard "PropertiesChanged" signal
on "org.freedesktop.DBus.Properties" interface.
2016-09-02 20:13:36 +02:00
Thomas Haller
e54b6c2bd5 doc: fix mistake in documenting Reload D-Bus call 2016-09-01 16:53:54 +02:00
Thomas Haller
fbbebc2123 device: always expose device statistics information
Instead of updating the device-statistic counters only periodically as
we refresh the link, update them on every link-changed event from
platform.

That means, also for devices that have RefreshRateMs at zero, the values
will be updated at random times when the link information changes.
The difference is, that previously the counters would be zero unless
RefreshRateMs was set. Now, they have some (probably stale) values
which however are not guaranteed to be kept up-to-date.

Also, now we refresh more often then promised by RefreshRateMs. But the API
technically doesn't specify that, so if we find there is a problem with
this, we may revert it later.
2016-08-17 16:08:21 +02:00
Alfonso Sanchez-Beato
24b193ab64 device: add statistics interface
Add statistics interface to all device instances. When active, the
properties of this interface are refreshed whenever there is network
activity for the device.

Activation is performed by changing RefreshRateMs property. If set to
zero, the interface is deactivated. If set to other value, the rest of
the interface properties are refreshed whenever the related network
metric changes, being RefreshRateMs the minimum time between property
changes, in milliseconds.
2016-08-17 15:50:20 +02:00
Beniamino Galvani
3e09aed2a0 checkpoint: add create, rollback and destroy D-Bus API
Co-authored-by: Thomas Haller <thaller@redhat.com>
2016-08-17 14:55:34 +02:00
Thomas Haller
0acee97220 config,dns: support Reload flags to specify that only parts should be reloaded
Support 3 new flags for Reload:

  - 0x01 (CONF): reload the configuration from disk
  - 0x02 (DNS_RC): write DNS configuration to resolv.conf
  - 0x04 (DNS_FULL): restart DNS plugin

Omitting all flags is the same as reloading everything, thus SIGHUP.
2016-06-01 19:06:34 +02:00
Thomas Haller
1d0e0eeffd manager: add Reload() D-Bus command
Add new Reload D-Bus command to reload NetworkManager configuration.

For now, this is like sending SIGHUP to the process. There are several
advantages here:

  - it is guarded via PolicyKit authentication while signals
    can only be sent by root.

  - the user can wait for the reload to be complete instead of sending
    an asynchronous signal. For now, we operation completes after
    nm_config_reload() returns, but later we could delay the response
    further until specific parts are fully reloaded.

  - SIGHUP reloads everything including re-reading configuration from
    disk while SIGUSR1 reloads just certain parts such as writing out DNS
    configuration anew.
    Now, the Reload command has a flags argument which is more granular
    in selecting parts which are to be reloaded. For example, via
    signals the user can:

      1) send SIGUSR1: this writes out the DNS configuration to
         resolv.conf and possibly reloads other parts without
         re-reading configuration and without restarting the DNS plugin.
      2) send SIGHUP: this reloads configuration from disk,
         writes out resolv.conf and restarts the DNS plugin.

    There is no way, to only restart the DNS plugin without also reloading
    everything else.
2016-06-01 19:06:34 +02:00
Beniamino Galvani
3c649e6429 team: expose current device configuration through D-Bus and nmcli
Add a new "Config" property to the D-Bus interface for team devices
and show its value through "nmcli device show". The property contains
the full JSON configuration from teamd for the device.

https://bugzilla.redhat.com/show_bug.cgi?id=1310435
2016-05-26 09:16:46 +02:00
Beniamino Galvani
bfabfb05ae core: add DNS priority to NMIP6Config 2016-05-12 17:13:50 +02:00
Beniamino Galvani
f09f5e1ec8 core: add DNS priority to NMIP4Config 2016-05-12 17:13:50 +02:00
Lubomir Rintel
a8e8e76641 dbus: fix up the XML formatting
The conversion script didn't do a very good job. It got fired.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
015c061a16 dbus: correct the NMDevice::StateReason type 2016-04-05 14:37:51 +02:00
Lubomir Rintel
2ae34aef9f dbus: correct the links to types
gdbus-codegen is not smart enough to understand #Type, include raw
docbook directly.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
6e2b188361 dbus: convert the annotations to gtk-doc blocks 2016-04-05 14:37:51 +02:00
Lubomir Rintel
ccf1d5bd94 dbus: remove the telepathy annotations
We now generate documentation with gdbus-codegen and these are now
useless.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
618373a14f dbus: use the annotations for documentation
gdbus only understands those (and gtk docstrings, which we should eventually
use) when generating the documentation.
2016-03-26 11:28:19 +01:00
Lubomir Rintel
f88dd66e6d introspection: build docbook when generating the code 2016-03-26 11:28:19 +01:00
Beniamino Galvani
1c0fb2f652 introspection: fix description for vxlan ageing property 2016-02-29 13:47:47 +01:00
Thomas Haller
734f45e0e0 doc: update introspection/all.xml to include missing nm-device xmls 2016-02-23 15:23:22 +01:00
Thomas Haller
f40c479845 introspection: document the meaning of active connections 2016-02-16 11:24:49 +01:00
Thomas Haller
62910d19d7 core: add NMDevice's GetAppliedConnection D-Bus call
Expose applied connection in D-Bus API.

https://bugzilla.gnome.org/show_bug.cgi?id=760884
2016-02-16 11:24:49 +01:00
Thomas Haller
6898e2169e all: add version-id argument to device's Reapply method
This breaks API and ABI for the functions related to Reapply,
which got introduced in the current 1.1 development phase.

The version-id is here to allow users to error out if the connection
on the device was changed by a concurrent action.

https://bugzilla.gnome.org/show_bug.cgi?id=761714
2016-02-16 11:24:49 +01:00
Lubomir Rintel
1490c36bb9 device: add O.FD.NM.Device.Reapply() call
The introspection data and daemon stub. There's no settings that can be
reapplied at the moment.
2016-01-10 23:13:34 +01:00
Beniamino Galvani
a448854b44 device/vxlan: support device creation 2015-12-09 16:36:46 +01:00
Beniamino Galvani
4de8851eca device/macvlan: support device creation 2015-12-09 14:30:08 +01:00
Dan Williams
5da37a129c api/manager: add GetAllDevices() method and AllDevices property
Returns both realized and un-realized devices.
2015-12-04 12:16:41 +01:00
Dan Williams
d6f9230beb core: add "real" NMDevice property
This property is TRUE for devices that exist either as a kernel device
or are backed by some other resource (eg, ModemManager object, Bluez
device, etc).  It will eventually be FALSE for software devices that
are not yet instantiated.
2015-12-04 12:15:12 +01:00
Beniamino Galvani
8361fbf010 device/ip-tunnel: add support for IP6TNL tunnels 2015-12-01 17:39:41 +01:00
Beniamino Galvani
3dfeec75e5 device: remove NMDeviceGre
As per previous commit, GRE tunnels are now represented as generic IP
tunnel devices.
2015-12-01 17:39:41 +01:00
Beniamino Galvani
570fdce93f device: add NMDeviceIPTunnel
The new object type represents tunnels over IPv4 and IPv6.

We have a single setting type (NMSettingIPTunnel) for tunnels and it
can't be shared among different device factories. So we define also a
single device type for all tunnels.

This new object will also represent GRE tunnels, which before were
instantiated as NMDeviceGre and had a ".Device.Gre" D-Bus
interface. This commit introduces a change in behavior.
2015-12-01 17:39:41 +01:00
Beniamino Galvani
8ca6e412c1 libnm-glib: add support for TUN devices
Since libnm is the preferred way to interact with NM now, we don't
want to add new device types to libnm-glib.

Make libnm-glib recognize TUN devices as generic ones and modify
NMDeviceGeneric to use the correct D-Bus interface based on the actual
device type.
2015-11-25 11:39:57 +01:00
Beniamino Galvani
07a9364d9c device: export list of LLDP neighbors through D-Bus
This adds a LldpNeighbors property to the Device D-Bus interface
carrying information about devices discovered through LLDP. The
property is an array of hashes and each hash describes the values of
LLDP TLVs for a specific neighbor.
2015-10-12 14:44:30 +02:00
Thomas Haller
fd87ce503c logging: add special logging level "KEEP"
Without this, the user cannot configure only certain logging domains
without touching them all.

E.g.

  # nmcli general logging level DEBUG domains PLATFORM

will disable all non-PLATFORM domains.
Well, the user can do:

  # nmcli general logging level INFO domains PLATFORM:DEBUG
  # nmcli general logging level DEBUG domains ALL:INFO,PLATFORM

but in this case all non-PLATFORM domains are reset explicitly.

Now the user can:

  # nmcli general logging level KEEP domains PLATFORM:DEBUG
  # nmcli general logging level DEBUG domains ALL:KEEP,PLATFORM

which will only change the platform domain.
2015-10-09 14:55:00 +02:00
Beniamino Galvani
c83ac1ed41 manager: export DNS global configuration D-Bus property 2015-10-01 09:05:08 +02:00
Jiří Klimeš
4219aa9a56 device: export S390Subchannels property on Ethernet device
and update match_subchans() to compare number of subchannels too.
2015-09-29 09:30:01 +02:00
Thomas Haller
0eebf580c1 device: allow modifying Managed property
https://bugzilla.redhat.com/show_bug.cgi?id=1114685
https://bugzilla.gnome.org/show_bug.cgi?id=746566
Related: https://bugzilla.gnome.org/show_bug.cgi?id=680909
Related: https://bugzilla.gnome.org/show_bug.cgi?id=731014

Based-on-patch-by: Lubomir Rintel <lkundrak@v3.sk>
2015-09-18 13:14:23 +02:00
Jiří Klimeš
988fa1ba8c introspection: add AUDIT domain to available list in SetLogging() description
Fixes: 41e7051165
2015-08-31 08:59:31 +02:00
Jiří Klimeš
87b2d783b6 core: accept 'ssids':aay option in RequestScan() dictionary parameter
It allows specifying SSIDs that should be probe-scanned, which is useful
for APs with hidden SSID, for example.
2015-08-14 11:27:15 +02:00
Dan Winship
34ba4e14b8 core: port NMManager to gdbus 2015-08-10 09:41:26 -04:00
Dan Winship
6c8f860820 core: port IP/DHCP config to gdbus 2015-08-10 09:41:26 -04:00
Dan Winship
8f36727ac8 ppp-manager: port to gdbus 2015-08-10 09:41:26 -04:00
Dan Winship
c050fb7cd2 devices, active-connection: port to gdbus 2015-08-10 09:41:26 -04:00
Dan Winship
df6706813a settings: port to gdbus 2015-08-10 09:41:26 -04:00
Dan Winship
d040fd18ab introspection: trivial fixes
Add some missing files to libnmdbus.la. Add missing name-fixing
annotations to the XML to make all generated NMDBus types match the
names of their corresponding NM types.
2015-07-24 13:25:47 -04:00
Jiří Klimeš
036901b82e xml: (trivial) fix a typo 2015-06-10 09:34:58 +02:00
Beniamino Galvani
04d5804dd5 nm-manager: add 'metered' property
This introduces a global metered property which makes easier for
clients to obtain the metered status of the current primary
connection.
2015-06-09 18:23:19 +02:00