@@ -56,12 +56,14 @@ def _get_device_type_id(self, device_type_name: str) -> int:
56
56
self .fail_current_test (f"Unable to find { device_type_name } device type" )
57
57
return id [0 ]
58
58
59
- def _has_nim (self ):
60
- nim_id = self ._get_device_type_id ('network infrastructure manager' )
59
+ def _has_device_type_supporting_macl (self ):
60
+ # Currently this is just NIM. We may later be able to pull this from the device type scrape using the ManagedAclAllowed condition,
61
+ # but these are not currently exposed directly by the device.
62
+ allowed_ids = [self ._get_device_type_id ('network infrastructure manager' )]
61
63
for endpoint in self .endpoints_tlv .values ():
62
64
desc = Clusters .Descriptor
63
65
device_types = [dt .deviceType for dt in endpoint [desc .id ][desc .Attributes .DeviceTypeList .attribute_id ]]
64
- if nim_id in device_types :
66
+ if set ( allowed_ids ). intersection ( set ( device_types )) :
65
67
# TODO: it's unclear if this needs to be present on every endpoint. Right now, this assumes one is sufficient.
66
68
return True
67
69
return False
@@ -138,9 +140,9 @@ def record_warning(location, problem):
138
140
attribute_id = GlobalAttributeIds .FEATURE_MAP_ID )
139
141
if cluster_id == Clusters .AccessControl .id and f == Clusters .AccessControl .Bitmaps .Feature .kManagedDevice :
140
142
# Managed ACL is treated as a special case because it is only allowed if other endpoints support NIM and disallowed otherwise.
141
- if not self ._has_nim ():
143
+ if not self ._has_device_type_supporting_macl ():
142
144
record_error (
143
- location = location , problem = "MACL feature is disallowed if the Network Infrastructure Manager device type is not present" )
145
+ location = location , problem = "MACL feature is disallowed if the a supported device type is not present" )
144
146
continue
145
147
146
148
if f not in self .xml_clusters [cluster_id ].features .keys ():
0 commit comments