-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Creating friendly functions for establishing new controllers on existing or new fabrics #37009
base: master
Are you sure you want to change the base?
Conversation
- This is to help resolve task filed: project-chip/matter-test-scripts#465 - Created 2 friendly functions for establishing new controllers on new and existing fabrics
Changed Files
|
PR #37009: Size comparison from f25f635 to 89c27a6 Full report (70 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Outdated
Show resolved
Hide resolved
- Moved code from matter_testing support module to CertificateAuthority module's CertificateAuthorityManager class - Changed to using 1 single function for both creating controllers, thne if statement to determine if using a new or existing fabric - Created new standalone script to test functionality.
- Resolving linting errors
Changiing adminList[] value back to 0 for the moment.
@@ -315,6 +315,21 @@ def NewCertificateAuthority(self, caIndex: Optional[int] = None, maximizeCertCha | |||
|
|||
return ca | |||
|
|||
def create_new_controller(self, vendorid: int = 0xFFF1, fabricId: int = 1, new_fabric: bool = True, CaList: int = 0, nodeid: int = 2): |
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.
CaList
as a name does not match the others and seems to confuse git syntax coloring. Overall we have to pick a style as we seem to have:
- vendrid and nodeid are
lowercaseconcatenated
- fabricId is
lowerCamelCase
- new_fabric is
lower_snake_case
- CaList is
UppserCamelCase
I like consistency. Let's use lower_camel_case
for all argument names as I believe this is typical for python.
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.
That sounds good,
It is a bit interesting that the CaList arg name triggered the git syntax coloring in that way lol.
I will get this updated to using lower_camel_case for the argument names.
- Updated to change arg names to using lower_snake_case for create_new_controller function.
Testing
Added standalone test script "src/python_testing/TC_CreateNewController.py" to validate