T8205 Ensure the vyos_user module works when user properties are defined in…#445
T8205 Ensure the vyos_user module works when user properties are defined in…#445
Conversation
… aggregate Ensure the vyos_user module works when user properties are defined in aggregate. Previously the value variable is not filled when a property is configured as a property of a user. This gives a python error when the value variable is called.
|
All contributors have signed the CLA ✍️ ✅ |
|
@gideon-kuijt-northwave thanks for your contribution! |
omnom62
left a comment
There was a problem hiding this comment.
@gideon-kuijt-northwave thanks!
is it possible to sign CIA, add changelog and possibly - unit and/or integration test to demo the fix?
|
I have read the CLA Document and I hereby sign the CLA |
Create changelog for vyos_user aggregate bugfix
|
@omnom62 I've signed the CLA, and added a changelog fragment. Also added a unit test for the aggregate function, this generates the same error as before my change. |
|
I added a task for this: T8205. @gideon-kuijt-northwave please prepend to the title and internal references and then check the box for the task ID. |
gaige
left a comment
There was a problem hiding this comment.
Good to go once we have the task information updated.
|
@gaige Thanks for the review. I've updated the title, change log file and checkboxes. |
As I understand, this change request no longer applies
…_fix.yml Remove unintended whitespace in changelog fragment: T8205_vyos_user_aggregate_fix.yml
Ensure the vyos_user module works when user properties are defined in aggregate. Previously the value variable is not filled when a property is configured as a property of a user. This gives a python error when the value variable is called.
Change Summary
Types of changes
Related Task(s)
https://vyos.dev/T8205
Related PR(s)
Component(s) name
vyos_user
Proposed changes
Ensuring that the value variable will always be defined in the get_param_value function regardless of whether it is created inside or outside the aggregate of the vyos_user module.
How to test
Version information:
Ran a playbook with the following configuration:
This results in the following error:
"msg": "Task failed: cannot access local variable 'value' where it is not associated with a value"
Test results
(had to create an ignore file for ansible 2.20 for action-plugin-docs)
Tested against VyOS versions:
It seems that currently there are no unit tests for aggregate scenario's hence this error slipped through.
Checklist:
changelogs/fragmentsto describe the changes