@@ -48,13 +48,15 @@ cd_certificate_id="some ID"
48
48
49
49
echo " Add Model with VID: $vid_in_hex_format PID: $pid_in_hex_format "
50
50
result=$( echo " $passphrase " | dcld tx model add-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --deviceTypeID=1 --productName=TestProduct --productLabel=TestingProductLabel --partNumber=1 --commissioningCustomFlow=0 --from $vendor_account --yes)
51
+ result=$( get_txn_result " $result " )
51
52
echo $result
52
53
check_response " $result " " \" code\" : 0"
53
54
54
55
test_divider
55
56
56
57
echo " Certify unknown Model Version with VID: $vid_in_hex_format PID: $pid_in_hex_format SV: ${sv} with zigbee certification"
57
58
result=$( echo " $passphrase " | dcld tx compliance certify-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --softwareVersion=$sv --softwareVersionString=$svs --certificationType=" $zigbee_certification_type " --certificationDate=" $certification_date " --cdCertificateId=" $cd_certificate_id " --from $zb_account --yes)
59
+ result=$( get_txn_result " $result " )
58
60
echo " $result "
59
61
check_response " $result " " \" code\" : 517"
60
62
check_response " $result " " No model version"
@@ -63,6 +65,7 @@ test_divider
63
65
64
66
echo " Add Model Version with VID: $vid_in_hex_format PID: $pid_in_hex_format SV: $sv SoftwareVersionString:$svs "
65
67
result=$( echo ' $passphrase' | dcld tx model add-model-version --cdVersionNumber=1 --maxApplicableSoftwareVersion=10 --minApplicableSoftwareVersion=1 --vid=$vid_in_hex_format --pid=$pid_in_hex_format --softwareVersion=$sv --softwareVersionString=$svs --from=$vendor_account --yes)
68
+ result=$( get_txn_result " $result " )
66
69
echo $result
67
70
check_response " $result " " \" code\" : 0"
68
71
@@ -116,13 +119,15 @@ test_divider
116
119
invalid_svs=$RANDOM
117
120
echo " Certify Model with VID: $vid_in_hex_format PID: $pid_in_hex_format SV: ${sv} with zigbee certification and invalid SoftwareVersionString: $invalid_svs "
118
121
result=$( echo " $passphrase " | dcld tx compliance certify-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --softwareVersion=$sv --softwareVersionString=$invalid_svs --certificationType=" $zigbee_certification_type " --certificationDate=" $certification_date " --cdCertificateId=" $cd_certificate_id " --from $zb_account --yes)
122
+ result=$( get_txn_result " $result " )
119
123
check_response " $result " " \" code\" : 306"
120
124
# check_response "$result" "failed to execute message; message index: 0: Model with vid=$vid, pid=$pid, softwareVersion=$sv present on the ledger does not have matching softwareVersionString=$invalid_svs: model version does not match"
121
125
122
126
test_divider
123
127
124
128
echo " Certify Model with VID: $vid_in_hex_format PID: $pid_in_hex_format SV: ${sv} with zigbee certification"
125
129
result=$( echo " $passphrase " | dcld tx compliance certify-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --softwareVersion=$sv --softwareVersionString=$svs --certificationType=" $zigbee_certification_type " --certificationDate=" $certification_date " --cdCertificateId=" $cd_certificate_id " --cdVersionNumber=1 --from $zb_account --yes)
130
+ result=$( get_txn_result " $result " )
126
131
echo " $result "
127
132
check_response " $result " " \" code\" : 0"
128
133
@@ -131,6 +136,7 @@ test_divider
131
136
echo " Certify Model with VID: $vid_in_hex_format PID: $pid_in_hex_format SV: ${sv} with matter certification"
132
137
echo " dcld tx compliance certify-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --softwareVersion=$sv --softwareVersionString=$svs --certificationType=" $matter_certification_type " --certificationDate=" $certification_date " --from $zb_account --yes"
133
138
result=$( echo " $passphrase " | dcld tx compliance certify-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --softwareVersion=$sv --softwareVersionString=$svs --certificationType=" $matter_certification_type " --certificationDate=" $certification_date " --cdCertificateId=" $cd_certificate_id " --cdVersionNumber=1 --from $zb_account --yes)
139
+ result=$( get_txn_result " $result " )
134
140
echo " $result "
135
141
check_response " $result " " \" code\" : 0"
136
142
@@ -139,6 +145,7 @@ test_divider
139
145
echo " ReCertify Model with VID: $vid_in_hex_format PID: $pid_in_hex_format SV: ${sv} by different account"
140
146
zigbee_certification_type=" zigbee"
141
147
result=$( echo " $passphrase " | dcld tx compliance certify-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --softwareVersion=$sv --softwareVersionString=$svs --certificationType=" $zigbee_certification_type " --certificationDate=" $certification_date " --cdCertificateId=" $cd_certificate_id " --cdVersionNumber=1 --from $second_zb_account --yes)
148
+ result=$( get_txn_result " $result " )
142
149
check_response " $result " " \" code\" : 303"
143
150
check_response " $result " " already certified on the ledger"
144
151
echo " $result "
@@ -148,6 +155,7 @@ test_divider
148
155
echo " ReCertify Model with VID: $vid_in_hex_format PID: $pid_in_hex_format SV: ${sv} by same account"
149
156
zigbee_certification_type=" zigbee"
150
157
result=$( echo " $passphrase " | dcld tx compliance certify-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --softwareVersion=$sv --softwareVersionString=$svs --certificationType=" $zigbee_certification_type " --certificationDate=" $certification_date " --cdCertificateId=" $cd_certificate_id " --cdVersionNumber=1 --from $zb_account --yes)
158
+ result=$( get_txn_result " $result " )
151
159
check_response " $result " " \" code\" : 303"
152
160
check_response " $result " " already certified on the ledger"
153
161
echo " $result "
@@ -249,6 +257,7 @@ revocation_reason="some reason"
249
257
echo " Revoke Certification for Model with VID: $vid_in_hex_format PID: $pid_in_hex_format SV: ${sv} from the past"
250
258
revocation_date_past=" 2020-01-01T00:00:00Z"
251
259
result=$( echo " $passphrase " | dcld tx compliance revoke-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --softwareVersion=$sv --softwareVersionString=$svs --certificationType=" $zigbee_certification_type " --revocationDate=" $revocation_date_past " --reason " $revocation_reason " --cdVersionNumber=1 --from $zb_account --yes)
260
+ result=$( get_txn_result " $result " )
252
261
check_response " $result " " \" code\" : 302"
253
262
check_response " $result " " must be after"
254
263
echo " $result "
@@ -259,6 +268,7 @@ test_divider
259
268
echo " Revoke Certification for Model with VID: $vid_in_hex_format PID: $pid_in_hex_format SV: ${sv} "
260
269
revocation_date=" 2020-02-02T02:20:20Z"
261
270
result=$( echo " $passphrase " | dcld tx compliance revoke-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --softwareVersion=$sv --softwareVersionString=$svs --certificationType=" $zigbee_certification_type " --revocationDate=" $revocation_date " --reason " $revocation_reason " --cdVersionNumber=1 --from $zb_account --yes)
271
+ result=$( get_txn_result " $result " )
262
272
check_response " $result " " \" code\" : 0"
263
273
echo " $result "
264
274
@@ -314,6 +324,7 @@ test_divider
314
324
echo " Again Certify Model with VID: $vid_in_hex_format PID: $pid_in_hex_format SV: ${sv} "
315
325
certification_date=" 2020-03-03T00:00:00Z"
316
326
result=$( echo " $passphrase " | dcld tx compliance certify-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --softwareVersion=$sv --softwareVersionString=$svs --certificationType=" $zigbee_certification_type " --certificationDate=" $certification_date " --cdCertificateId=" $cd_certificate_id " --cdVersionNumber=1 --from $zb_account --yes)
327
+ result=$( get_txn_result " $result " )
317
328
check_response " $result " " \" code\" : 0"
318
329
echo " $result "
319
330
0 commit comments