GeezerVison is showing github.com — [Enhancement] make org_settings.device_defaults able to push to existing devices · Issue #217 · code42/py42
[Enhancement] make org_settings.device_defaults able to push to existing devices #217
Description
Summary
Currently if you update the device_defaults in an org_settings object and then commit your changes using sdk.orgs.update_settings(), the changes you make will only apply to newly deployed devices, and will not be pushed to existing devices.
We could add the ability to push changes to existing devices
Proposed API
sdk.orgs.update_settings(org_settings, publish=True)
Intended Use Case
- Updating a setting for all devices across an org
Activity
ceciliastevens commented on Oct 7, 2020
ContributorAuthor
More actions
Doing this actually is tricky. From my experimentation we seem to need to do a few things:
- add
"@publish" : True to the settings dict within the appropriate setting (although the place where this needs to go is often non-obvious
- set deviceDefaults.publishMode to True (if this is not set, we ignore the
@publish, so @publish can be set even if we don't intend to actually publish changes)
We may also want to do some other things to ensure that the change is done properly:
- Update the configDateMs to the current date (which would prevent an overwrite if someone makes a similarly-timed change in the client UI at the same time)
- set
org_settings["customConfig"] = True (this should probably be set already for most orgs, but if it is False I am not certain if the changes will actually be applied)
DiscoRiver commented on Oct 9, 2020
I'll have a look into this on Monday. Thanks!
Metadata
Metadata
Development
No branches or pull requestsIssue actions