Skip to content

Commit

Permalink
[Python] CreateControllersOnFabric support paaTrustStorePath (#28049)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianfeng-yang authored and pull[bot] committed Mar 4, 2024
1 parent 195b166 commit 1041714
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 1041714

Please sign in to comment.