TDK-11851 Enhancement of tr69ACSUtility file#185
Conversation
Reason for change: To add revert changes for prerequisite set operations Procedure: Test in BPI Risks: None
There was a problem hiding this comment.
Pull request overview
This PR enhances the TR-069 ACS prerequisite flow by capturing original TR-181 datamodel values before modifying them, and introduces a helper to revert those prerequisite changes after test execution.
Changes:
- Extend
tr069ACSPreRequisite()to read and return the initial values of TR-181 parameters modified during onboarding. - Add
revertPrerequisite()to restore the modified TR-181 parameters back to their original values.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| print("Enable Device.ManagementServer.EnableCWMP parameter") | ||
| tdkTestObj_tr181 = obj.createTestStep('TDKB_TR181Stub_Set') | ||
| actualresult, details = setTR181Value(tdkTestObj_tr181, "Device.ManagementServer.EnableCWMP", "true", "bool") | ||
| print("Get the initial value of Device.ManagementServer.EnableCWMP") |
There was a problem hiding this comment.
We already have utility function getTR181Value() to get value. In future, please make use of existing utilities as much as possible.
| tdkTestObj_tr181 = obj.createTestStep('TDKB_TR181Stub_Set') | ||
| actualresult, details = setTR181Value(tdkTestObj_tr181, "Device.ManagementServer.EnableCWMP", "true", "bool") | ||
| print("Get the initial value of Device.ManagementServer.EnableCWMP") | ||
| tdkTestObj_tr181 = obj.createTestStep('TDKB_TR181Stub_Get') |
There was a problem hiding this comment.
We can do GET of all first, followed by set multiple.
| ########## End of function ########## | ||
|
|
||
| # revertPrerequisite() | ||
| # Syntax : revertPrerequisite(itdkTestObj_tr181,initialValues) |
There was a problem hiding this comment.
itdkTestObj_tr181
There was a problem hiding this comment.
mismatch in function signature
| # : initialValues - List of initial values of DMs | ||
| # : step - Current test step count | ||
| # Return Value: revertFlag - flag indicating the overall revert status | ||
| def revertPrerequisite(obj,initialValues,step): |
There was a problem hiding this comment.
A multiple set operation would do for revert. If that fails, revert failure flag can be set. You can check if revert need to be done step by step instead of a bulk set.
Reason for change: To add revert changes for prerequisite set operations
Procedure: Test in BPI
Risks: None