Merge pull request #18 from yourapiexpert/master

Feature: Implement Settings.ReloadConnections
This commit is contained in:
Christian Müller 2021-03-26 09:02:50 +01:00 committed by GitHub
commit 3ba9bbd706
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,9 @@ type Settings interface {
// ListConnections gets list the saved network connections known to NetworkManager
ListConnections() ([]Connection, error)
// ReloadConnections tells NetworkManager to reload all connection files from disk, including noticing any added or deleted connection files.
ReloadConnections() error
// GetConnectionByUUID gets the connection, given that connection's UUID.
GetConnectionByUUID(uuid string) (Connection, error)
@ -75,6 +78,12 @@ func (s *settings) ListConnections() ([]Connection, error) {
return connections, nil
}
// ReloadConnections tells NetworkManager to reload (and apply) configuration files
// from disk taking notice of any added or removed connections.
func (s *settings) ReloadConnections() error {
return s.call(SettingsReloadConnections)
}
// GetConnectionByUUID gets the connection, given that connection's UUID.
func (s *settings) GetConnectionByUUID(uuid string) (Connection, error) {
var path dbus.ObjectPath