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
VarDict: convenience methods #6647
VarDict: convenience methods #6647
Conversation
@@ -93,7 +106,7 @@ def __str__(self): | |||
|
|||
|
|||
class VarDict(object): | |||
reserved_names = ('__vars__', 'var', 'set_meta', 'set', 'output', 'diff', 'facts', 'has_changed') | |||
reserved_names = ('__vars__', '_var', 'var', 'set_meta', 'get_meta', 'set', 'output', 'diff', 'facts', 'has_changed', 'as_dict') |
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.
Hmm, isn't changing this field a breaking change (since now using _var
, get_meta
, and as_dict
is illegal and will result in an exception)?
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 guess it is - I had not considered it from that perspective. Will update the changelog fragment, but cannot escape from that.
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.
done
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.
Hmm, in that case we should probably only merge it for 8.0.0 and not backport it to stable-7.
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.
makes sense to me
@russoz thanks! |
SUMMARY
Add convenience methods for variables and the
VarDict
class.ISSUE TYPE
COMPONENT NAME
plugins/module_utils/vardict.py