Commit Graph

13 Commits

Author SHA1 Message Date
Borjan Tchakaloff
3a49d17dfd syncthing_folder: Always share a folder with the current device
All checks were successful
buildbot/travis_bionic Build done.
buildbot/multibuild_parent Build done.
There is no need to require that the device being configured is
explictly mentioned in its configuration. We can get it through
the status endpoint and automatically add it to the set of devices
the folder is shared with.
2021-02-19 17:40:28 +01:00
Borjan Tchakaloff
c3cd1e450d Extract fetching data from the REST API 2021-02-18 17:35:43 +01:00
Borjan Tchakaloff
c7aa08f97a syncthing_folder: Do not duplicate the msg key 2021-02-18 17:18:30 +01:00
Borjan Tchakaloff
38ff2db9ca syncthing_folder: Accept names of known devices 2021-02-18 17:03:55 +01:00
Borjan Tchakaloff
6777a9ab6a syncthing_folder: Default to empty device list
When defining a new shared folder, the configuration is missing and
thus there are no current devices configured.
2021-02-17 18:05:08 +01:00
Borjan Tchakaloff
1b2952c1a6 syncthing_folder: Keep existing device ordering
Keep the existing list of devices if it contains the expected
devices.  This change fixes the current/expected configurations
comparison on devices ordering.
2021-01-01 17:17:39 +01:00
Borjan Tchakaloff
e336ebde13 syncthing_folder: Accept path to the configuration file
Specifying `config_file` overrides the default path relative to
the current user.

This is handy when the executing user is a different user.
2021-01-01 15:57:21 +01:00
Borjan Tchakaloff
8fee0cb114 syncthing_folder: Accept file-system watcher flag
Accept the `fs_watcher` flag matching the `folder.fsWatcherEnabled`
attribute.
2021-01-01 15:57:21 +01:00
Borjan Tchakaloff
866f329f47 syncthing_folder: Accept folder type
Accept the `type` value matching the `folder.type` attribute.
2021-01-01 15:57:21 +01:00
Borjan Tchakaloff
7532f87638 syncthing_folder: Accept permission ignoring flag
Accept the `ignore_perms` flag matching the `folder.ignorePerms`
attribute.
2021-01-01 15:57:21 +01:00
Borjan Tchakaloff
1136e9b06b syncthing_folder: Factor folder configuration
The folder configuration is parametrized in one place, no need for
duplicates.
2021-01-01 15:57:21 +01:00
Borjan Tchakaloff
83e9add60c syncthing_folder: Always update the devices the folder is shared with
Ensure all devices the folder should be shared with is part of the
folder configuration.

Previously, only at folder creation would the devices be set.
2021-01-01 15:28:15 +01:00
Rafael Bodill
8b7b85b8f1 Initial commit 2018-11-28 21:22:58 +02:00