Skip to content

Commit

Permalink
feat: implement Settings.ReloadConnections
Browse files Browse the repository at this point in the history
  • Loading branch information
appnostic-io committed Feb 24, 2021
1 parent 594bfca commit 0858763
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0858763

Please sign in to comment.