-
Notifications
You must be signed in to change notification settings - Fork 84
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
properly tagging storage option based on zcl.json #1140
Changes from all commits
e15a46e
bcad57d
35e4480
c386190
6df3140
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -560,6 +560,7 @@ function prepareCluster(cluster, context, isExtension = false) { | |
if (context.listsUseAttributeAccessInterface && attribute.$.entryType) { | ||
storagePolicy = dbEnum.storagePolicy.attributeAccessInterface | ||
} else if ( | ||
context.listsUseAttributeAccessInterface && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this change? The attributeAccessInterfaceAttributes bit is not dependent on what lists do, is it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually thought this was a boolean that indicated whether or not the |
||
context.attributeAccessInterfaceAttributes && | ||
context.attributeAccessInterfaceAttributes[cluster.name] && | ||
context.attributeAccessInterfaceAttributes[cluster.name].includes(name) | ||
|
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.
This is mixing up storage policy (which can be "any" or "attributeAccessInterface") and storage option, which can be "external", "ram", "nvm". See also #367
So what I would suggest is that instead of storing "storage option" values in a field that stores storage policy, instead we just use a local variable for the storage option to use for our db insert.
Incidentally, when I was looking over this setup, the
resolve
method onstoragePolicy
in db-enum.js is broken: it hasstoragePolicy.attributeAccess
where it should havestoragePolicy.attributeAccessInterface
, no? Not directly relevant to this PR, but we should fix it here or in a followup.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.
agree, I will make a follow up PR. Thank you.