Skip to content
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

[Python] CreateControllersOnFabric support paaTrustStorePath #28049

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ async def CreateControllersOnFabric(fabricAdmin: FabricAdmin,
controllerNodeIds: typing.List[int],
privilege: Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum,
targetNodeId: int,
catTags: typing.List[int] = []) -> typing.List[ChipDeviceController]:
catTags: typing.List[int] = [],
paaTrustStorePath: str = "") -> typing.List[ChipDeviceController]:
''' Create new ChipDeviceController instances on a given fabric with a specific privilege on a target node.

Args:
Expand All @@ -130,12 +131,13 @@ async def CreateControllersOnFabric(fabricAdmin: FabricAdmin,
targetNodeId: The Node ID of the target.
catTags: CAT Tags to include in the NOC of controller, as well as when setting
up the ACLs on the target.
paaTrustStorePath: Path to the PAA trust store. If one isn't provided, a suitable default is selected.
'''

controllerList = []

for nodeId in controllerNodeIds:
newController = fabricAdmin.NewController(nodeId=nodeId, catTags=catTags)
newController = fabricAdmin.NewController(nodeId=nodeId, paaTrustStorePath=paaTrustStorePath, catTags=catTags)
await GrantPrivilege(adminDevCtrl, newController, privilege, targetNodeId, catTags)
controllerList.append(newController)

Expand Down