blob: b340eaad4a82801e725be63ee2e12e0da05cb3be [file] [log] [blame]
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default
name: 133.2.3. [TC-ACL-2.10] Extension attribute
PICS:
- ACL.S
config:
nodeId: 0x12344321
cluster: "Access Control"
endpoint: 0
nodeId2:
type: node_id
defaultValue: 0xCAFE
TH1CommissionerNodeId:
type: node_id
defaultValue: 112233
TH2CommissionerNodeId:
type: node_id
defaultValue: 112233
discriminator:
type: int16u
defaultValue: 3840
payload:
type: char_string
defaultValue: "MT:-24J0AFN00KA0648G00"
D_OK_EMPTY:
type: octet_string
defaultValue: "hex:1718"
D_OK_SINGLE:
type: octet_string
defaultValue: "hex:17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"
tests:
- label: "Step 1:Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId
- label:
"Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex
attribute"
command: "readAttribute"
cluster: "Operational Credentials"
attribute: "CurrentFabricIndex"
response:
saveAs: TH1FabricIndex
- label:
"Step 3:TH1 puts DUT into commissioning mode, TH2 commissions DUT
using admin node ID N2"
cluster: "Administrator Commissioning"
command: "OpenBasicCommissioningWindow"
timedInteractionTimeoutMs: 10000
arguments:
values:
- name: "CommissioningTimeout"
value: 180
- label: "TH2 starts a commissioning process with DUT"
identity: "beta"
cluster: "CommissionerCommands"
command: "PairWithCode"
arguments:
values:
- name: "nodeId"
value: nodeId2
- name: "payload"
value: payload
- label: "DUT is commissioned by TH2 on Fabric ID2 "
identity: "beta"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId2
- label:
"Step 4:TH2 reads OperationalCredentials cluster CurrentFabricIndex
attribute"
identity: "beta"
command: "readAttribute"
cluster: "Operational Credentials"
attribute: "CurrentFabricIndex"
response:
saveAs: TH2FabricIndex
- label:
"Step 5:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"
PICS: ACL.S.A0000
command: "writeAttribute"
attribute: "ACL"
arguments:
value:
[
{
Privilege: "5",
AuthMode: "2",
Subjects: [TH1CommissionerNodeId, 1111],
Targets: null,
FabricIndex: TH1FabricIndex,
},
{
Privilege: "3",
AuthMode: "3",
Subjects: [3333],
Targets: null,
FabricIndex: TH1FabricIndex,
},
]
- label:
"Step 6:TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"
PICS: ACL.S.A0000
identity: "beta"
command: "writeAttribute"
attribute: "ACL"
arguments:
value:
[
{
Privilege: "5",
AuthMode: "2",
Subjects: [TH2CommissionerNodeId, 2222],
Targets: null,
FabricIndex: TH2FabricIndex,
},
{
Privilege: "3",
AuthMode: "3",
Subjects: [4444],
Targets: null,
FabricIndex: TH2FabricIndex,
},
]
- label:
"Step 7:TH1 writes DUT Endpoint 0 AccessControl cluster Extension
attribute, value is list of AccessControlExtensionStruct containing 1
element 1.struct, Data field: D_OK_EMPTY"
PICS: ACL.S.A0001
command: "writeAttribute"
attribute: "Extension"
arguments:
value: [{ Data: D_OK_EMPTY, FabricIndex: TH1FabricIndex }]
- label:
"Step 8:TH2 writes DUT Endpoint 0 AccessControl cluster Extension
attribute, value is list of AccessControlExtensionStruct containing 1
element 1.struct, Data field: D_OK_SINGLE"
identity: "beta"
PICS: ACL.S.A0001
command: "writeAttribute"
attribute: "Extension"
arguments:
value: [{ Data: D_OK_SINGLE, FabricIndex: TH2FabricIndex }]
- label: "Step 9: Reboot DUT"
PICS: PICS_SDK_CI_ONLY
cluster: "SystemCommands"
command: "Reboot"
- label: "Step 9: Reboot DUT"
verification: |
Not implemented in YAML
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_SKIP_SAMPLE_APP
arguments:
values:
- name: "message"
value: "Reboot the DUT and enter 'y' after success"
- name: "expectedValue"
value: "y"
- label: "TH1 Connects to the device again"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId
- label: "TH2 Connects to the device again"
identity: "beta"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId2
- label:
"Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"
PICS: ACL.S.A0000
command: "readAttribute"
attribute: "ACL"
arguments:
value:
[
{
Privilege: "5",
AuthMode: "2",
Subjects: [TH1CommissionerNodeId, 1111],
Targets: null,
FabricIndex: TH1FabricIndex,
},
{
Privilege: "3",
AuthMode: "3",
Subjects: [3333],
Targets: null,
FabricIndex: TH1FabricIndex,
},
]
- label:
"Step 11:TH1 resds DUT Endpoint 0 AccessControl cluster Extension
attribute, value is list of AccessControlExtensionStruct containing 1
element"
PICS: ACL.S.A0001
command: "readAttribute"
attribute: "Extension"
arguments:
value: [{ Data: D_OK_EMPTY, FabricIndex: TH1FabricIndex }]
- label:
"Step 12:TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"
PICS: ACL.S.A0000
identity: "beta"
command: "readAttribute"
attribute: "ACL"
response:
value:
[
{
Privilege: "5",
AuthMode: "2",
Subjects: [TH2CommissionerNodeId, 2222],
Targets: null,
FabricIndex: TH2FabricIndex,
},
{
Privilege: "3",
AuthMode: "3",
Subjects: [4444],
Targets: null,
FabricIndex: TH2FabricIndex,
},
]
- label:
"Step 13:TH2 reads DUT Endpoint 0 AccessControl cluster Extension
attribute"
PICS: ACL.S.A0001
identity: "beta"
command: "writeAttribute"
attribute: "Extension"
arguments:
value: [{ Data: D_OK_SINGLE, FabricIndex: TH2FabricIndex }]
- label:
"Step 14: If DUT is an app on host, examine persistent storage in
/tmp/chip_kvs text file"
verification: |
sudo vi kvs text file
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_SKIP_SAMPLE_APP
arguments:
values:
- name: "message"
value: "Enter 'y' after success"
- name: "expectedValue"
value: "y"
- label: "Step 15:TH1 removes fabric F2 from DUT"
PICS: OPCREDS.S.C0a.Rsp
cluster: "Operational Credentials"
command: "RemoveFabric"
timedInteractionTimeoutMs: 10000
arguments:
values:
- name: "FabricIndex"
value: TH2FabricIndex
- label:
"Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"
PICS: ACL.S.A0000
command: "writeAttribute"
attribute: "ACL"
arguments:
value:
[
{
Privilege: "5",
AuthMode: "2",
Subjects: [TH1CommissionerNodeId, 1111],
Targets: null,
FabricIndex: TH1FabricIndex,
},
{
Privilege: "3",
AuthMode: "3",
Subjects: [3333],
Targets: null,
FabricIndex: TH1FabricIndex,
},
]
- label:
"Step 17:TH1 reads DUT Endpoint 0 AccessControl cluster Extension
attribute, value is list of AccessControlExtensionStruct containing 1
element"
PICS: ACL.S.A0001
command: "readAttribute"
attribute: "Extension"
arguments:
value: [{ Data: D_OK_EMPTY, FabricIndex: CurrentFabricIndex }]
- label:
"Step 18: If DUT is an app on host, examine persistent storage in
/tmp/chip_kvs text file"
verification: |
sudo vi kvs text file
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_SKIP_SAMPLE_APP
arguments:
values:
- name: "message"
value: "Enter 'y' after success"
- name: "expectedValue"
value: "y"