Skip to content

TDK-11851 Enhancement of tr69ACSUtility file#185

Open
saniya-09 wants to merge 2 commits into
developfrom
feature/TDK-11851
Open

TDK-11851 Enhancement of tr69ACSUtility file#185
saniya-09 wants to merge 2 commits into
developfrom
feature/TDK-11851

Conversation

@saniya-09
Copy link
Copy Markdown
Contributor

Reason for change: To add revert changes for prerequisite set operations
Procedure: Test in BPI
Risks: None

Reason for change: To add revert changes for prerequisite set operations
Procedure: Test in BPI
Risks: None
Copilot AI review requested due to automatic review settings May 26, 2026 09:29
@saniya-09 saniya-09 requested a review from a team as a code owner May 26, 2026 09:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread framework/fileStore/tr69ACSUtility.py
Comment thread framework/fileStore/tr69ACSUtility.py
Comment thread framework/fileStore/tr69ACSUtility.py
Comment thread framework/fileStore/tr69ACSUtility.py
Comment thread framework/fileStore/tr69ACSUtility.py
Comment thread framework/fileStore/tr69ACSUtility.py
Comment thread framework/fileStore/tr69ACSUtility.py
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")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do GET of all first, followed by set multiple.

########## End of function ##########

# revertPrerequisite()
# Syntax : revertPrerequisite(itdkTestObj_tr181,initialValues)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

itdkTestObj_tr181

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants