Skip to content

Commit 3ba9bbd

Browse files
authored
Merge pull request #18 from yourapiexpert/master
Feature: Implement Settings.ReloadConnections
2 parents 44424b8 + 0858763 commit 3ba9bbd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Settings.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ type Settings interface {
2727
// ListConnections gets list the saved network connections known to NetworkManager
2828
ListConnections() ([]Connection, error)
2929

30+
// ReloadConnections tells NetworkManager to reload all connection files from disk, including noticing any added or deleted connection files.
31+
ReloadConnections() error
32+
3033
// GetConnectionByUUID gets the connection, given that connection's UUID.
3134
GetConnectionByUUID(uuid string) (Connection, error)
3235

@@ -75,6 +78,12 @@ func (s *settings) ListConnections() ([]Connection, error) {
7578
return connections, nil
7679
}
7780

81+
// ReloadConnections tells NetworkManager to reload (and apply) configuration files
82+
// from disk taking notice of any added or removed connections.
83+
func (s *settings) ReloadConnections() error {
84+
return s.call(SettingsReloadConnections)
85+
}
86+
7887
// GetConnectionByUUID gets the connection, given that connection's UUID.
7988
func (s *settings) GetConnectionByUUID(uuid string) (Connection, error) {
8089
var path dbus.ObjectPath

0 commit comments

Comments
 (0)