-
-
Notifications
You must be signed in to change notification settings - Fork 217
[docs] Extend description of templates behaviour #991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Oliver Kraitschy <[email protected]>
@@ -116,6 +122,9 @@ unassigned from a device configuration, they can only be overridden. | |||
They will be always assigned earlier than default templates, so they can | |||
be overridden if needed. | |||
|
|||
Another difference to :ref:`default_templates` is that required templates are | |||
assigned to all devices, not just new devices. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you 100% sure of this? I don't remember we added logic to automatically modify existing devices. As far as I remember the required template would be applied only if the user saves the device object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see it in the code but I noticed that a required template had been marked as assigned (with its checkbox disabled) in all devices after the template was made required. I didn't create a new device at all.
That's why I thought that adding this information to the docs would be useful as this is a clear difference in behaviour compared to default templates.
Edit: this comment #480 (comment) puts some doubt on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to investigate the current behaviour, I did the following:
- Create two devices, in different orgs. None has a template assigned.
- Create four templates, two in each org. In each org one template is a default template and one is a required template.
- Create two shared templates. One is a default template and one is a required template.
- Create two more devices, one in each org.
Then the situation is as follows:
- The first two devices have two templates assigned each. The one required template of their org and the one shared required template.
- The second two devices have four templates assigned each. Two required templates (one of their org and one shared) and two default templates (one of their org and one shared).
So my previous observation and my additions to the docs match my tests.
to any new device but to any new device config. So if you have any | ||
device which was registered before a specific template was made a default | ||
template, you can delete its config and create a new one, then the new config | ||
will automatically have all current default templates assigned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shall keep in mind this could change: #480.
I will put this on hold until #480 is implemented. |
I improved the description of the behaviour of default and required templates a bit.