Skip to content

Commit 9cc424c

Browse files
authored
Merge pull request #577 from zigbee-alliance/#547-Add-new-fields-into-Model-entity
#547 Add new fields into Model entity
2 parents 26cf245 + f9492ab commit 9cc424c

File tree

32 files changed

+1752
-196
lines changed

32 files changed

+1752
-196
lines changed

docs/static/openapi.yml

+75
Original file line numberDiff line numberDiff line change
@@ -8793,6 +8793,21 @@ paths:
87938793
format: int64
87948794
managedAclExtensionRequestFlowUrl:
87958795
type: string
8796+
enhancedSetupFlowOptions:
8797+
type: integer
8798+
format: int32
8799+
enhancedSetupFlowTCUrl:
8800+
type: string
8801+
enhancedSetupFlowTCRevision:
8802+
type: integer
8803+
format: int32
8804+
enhancedSetupFlowTCDigest:
8805+
type: string
8806+
enhancedSetupFlowTCFileSize:
8807+
type: integer
8808+
format: int64
8809+
maintenanceUrl:
8810+
type: string
87968811
pagination:
87978812
type: object
87988813
properties:
@@ -9019,6 +9034,21 @@ paths:
90199034
format: int64
90209035
managedAclExtensionRequestFlowUrl:
90219036
type: string
9037+
enhancedSetupFlowOptions:
9038+
type: integer
9039+
format: int32
9040+
enhancedSetupFlowTCUrl:
9041+
type: string
9042+
enhancedSetupFlowTCRevision:
9043+
type: integer
9044+
format: int32
9045+
enhancedSetupFlowTCDigest:
9046+
type: string
9047+
enhancedSetupFlowTCFileSize:
9048+
type: integer
9049+
format: int64
9050+
maintenanceUrl:
9051+
type: string
90229052
default:
90239053
description: An unexpected error response.
90249054
schema:
@@ -22312,6 +22342,21 @@ definitions:
2231222342
format: int64
2231322343
managedAclExtensionRequestFlowUrl:
2231422344
type: string
22345+
enhancedSetupFlowOptions:
22346+
type: integer
22347+
format: int32
22348+
enhancedSetupFlowTCUrl:
22349+
type: string
22350+
enhancedSetupFlowTCRevision:
22351+
type: integer
22352+
format: int32
22353+
enhancedSetupFlowTCDigest:
22354+
type: string
22355+
enhancedSetupFlowTCFileSize:
22356+
type: integer
22357+
format: int64
22358+
maintenanceUrl:
22359+
type: string
2231522360
zigbeealliance.distributedcomplianceledger.model.ModelVersion:
2231622361
type: object
2231722362
properties:
@@ -22442,6 +22487,21 @@ definitions:
2244222487
format: int64
2244322488
managedAclExtensionRequestFlowUrl:
2244422489
type: string
22490+
enhancedSetupFlowOptions:
22491+
type: integer
22492+
format: int32
22493+
enhancedSetupFlowTCUrl:
22494+
type: string
22495+
enhancedSetupFlowTCRevision:
22496+
type: integer
22497+
format: int32
22498+
enhancedSetupFlowTCDigest:
22499+
type: string
22500+
enhancedSetupFlowTCFileSize:
22501+
type: integer
22502+
format: int64
22503+
maintenanceUrl:
22504+
type: string
2244522505
pagination:
2244622506
type: object
2244722507
properties:
@@ -22522,6 +22582,21 @@ definitions:
2252222582
format: int64
2252322583
managedAclExtensionRequestFlowUrl:
2252422584
type: string
22585+
enhancedSetupFlowOptions:
22586+
type: integer
22587+
format: int32
22588+
enhancedSetupFlowTCUrl:
22589+
type: string
22590+
enhancedSetupFlowTCRevision:
22591+
type: integer
22592+
format: int32
22593+
enhancedSetupFlowTCDigest:
22594+
type: string
22595+
enhancedSetupFlowTCFileSize:
22596+
type: integer
22597+
format: int64
22598+
maintenanceUrl:
22599+
type: string
2252522600
zigbeealliance.distributedcomplianceledger.model.QueryGetModelVersionResponse:
2252622601
type: object
2252722602
properties:

docs/transactions.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,13 @@ Not all fields can be edited (see `EDIT_MODEL`).
213213
- supportURL: `optional(string)` - URL that contains product specific web page that contains support details for the device model.
214214
- productURL: `optional(string)` - URL that contains product specific web page that contains details for the device model.
215215
- lsfURL: `optional(string)` - URL to the Localized String File of this product.
216-
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
216+
- enhancedSetupFlowOptions: `optional(uint16)` - enhancedSetupFlowOptions SHALL identify the configuration options for the Enhanced Setup Flow.
217+
- enhancedSetupFlowTCUrl: `optional(string)` - enhancedSetupFlowTCUrl SHALL identify a link to the Enhanced Setup Flow Terms and Condition File for this product. This field SHALL be present if and only if the EnhancedSetupFlowOptions field has bit 0 set.
218+
- enhancedSetupFlowTCRevision: `optional(uint16)` - enhancedSetupFlowTCRevision is an increasing positive integer indicating the latest available version of the Enhanced Setup Flow Terms and Conditions file. This field SHALL be present if and only if the EnhancedSetupFlowOptions field has bit 0 set.
219+
- enhancedSetupFlowTCDigest: `optional(string)` - enhancedSetupFlowTCDigest SHALL contain the digest of the entire contents of the associated file downloaded from the EnhancedSetupFlowTCUrl field, encoded in base64 string representation and SHALL be used to ensure the contents of the downloaded file are authentic. This field SHALL be present if and only if the EnhancedSetupFlowOptions field has bit 0 set.
220+
- enhancedSetupFlowTCFileSize: `optional(uint32)` - enhancedSetupFlowTCFileSize SHALL indicate the total size of the Enhanced Setup Flow Terms and Conditions file in bytes, and SHALL be used to ensure the downloaded file size is within the bounds of EnhancedSetupFlowTCFileSize. This field SHALL be present if and only if the EnhancedSetupFlowOptions field has bit 0 set.
221+
- maintenanceUrl: `optional(string)` - maintenanceUrl SHALL identify a link to a vendor-specific URL which SHALL provide a manufacturer specific means to resolve any functionality limitations indicated by the TERMS_AND_CONDITIONS_CHANGED status code. This field SHALL be present if and only if the EnhancedSetupFlowOptions field has bit 0 set.
222+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 1)
217223
- In State:
218224
- `model/Model/value/<vid>/<pid>`
219225
- `model/VendorProducts/value/<vid>`
@@ -260,9 +266,15 @@ All non-edited fields remain the same.
260266
- supportURL: `optional(string)` - URL that contains product specific web page that contains support details for the device model.
261267
- productURL: `optional(string)` - URL that contains product specific web page that contains details for the device model.
262268
- lsfURL: `optional(string)` - URL to the Localized String File of this product.
263-
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
264269
- lsfRevision: `optional(uint32)` - LsfRevision is a monotonically increasing positive integer indicating the latest available version of Localized String File.
265270
- commissioningModeInitialStepsHint: `optional(uint32)` - commissioningModeInitialStepsHint SHALL identify a hint for the steps that can be used to put into commissioning mode a device that has not yet been commissioned. This field is a bitmap with values defined in the Pairing Hint Table. For example, a value of 1 (bit 0 is set) indicates that a device that has not yet been commissioned will enter Commissioning Mode upon a power cycle. Note that this value cannot be updated to 0.
271+
- enhancedSetupFlowOptions: `optional(uint16)` - enhancedSetupFlowOptions SHALL identify the configuration options for the Enhanced Setup Flow.
272+
- enhancedSetupFlowTCUrl: `optional(string)` - enhancedSetupFlowTCUrl SHALL identify a link to the Enhanced Setup Flow Terms and Condition File for this product. This field SHALL be present if and only if the EnhancedSetupFlowOptions field has bit 0 set.
273+
- enhancedSetupFlowTCRevision: `optional(uint16)` - enhancedSetupFlowTCRevision is an increasing positive integer indicating the latest available version of the Enhanced Setup Flow Terms and Conditions file. This field SHALL be present if and only if the EnhancedSetupFlowOptions field has bit 0 set.
274+
- enhancedSetupFlowTCDigest: `optional(string)` - enhancedSetupFlowTCDigest SHALL contain the digest of the entire contents of the associated file downloaded from the EnhancedSetupFlowTCUrl field, encoded in base64 string representation and SHALL be used to ensure the contents of the downloaded file are authentic. This field SHALL be present if and only if the EnhancedSetupFlowOptions field has bit 0 set.
275+
- enhancedSetupFlowTCFileSize: `optional(uint32)` - enhancedSetupFlowTCFileSize SHALL indicate the total size of the Enhanced Setup Flow Terms and Conditions file in bytes, and SHALL be used to ensure the downloaded file size is within the bounds of EnhancedSetupFlowTCFileSize. This field SHALL be present if and only if the EnhancedSetupFlowOptions field has bit 0 set.
276+
- maintenanceUrl: `optional(string)` - maintenanceUrl SHALL identify a link to a vendor-specific URL which SHALL provide a manufacturer specific means to resolve any functionality limitations indicated by the TERMS_AND_CONDITIONS_CHANGED status code. This field SHALL be present if and only if the EnhancedSetupFlowOptions field has bit 0 set.
277+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 1)
266278
- In State: `model/Model/value/<vid>/<pid>`
267279
- Who can send:
268280
- Vendor account associated with the same vid who has created the model

integration_tests/cli/auth-demo-hex.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ test_divider
7777

7878
productName="Device #1"
7979
echo "$user adds Model with VID: $vid_in_hex_format PID: $pid"
80-
result=$(echo "test1234" | dcld tx model add-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --productName="$productName" --productLabel="Device Description" --commissioningCustomFlow=0 --deviceTypeID=12 --partNumber=12 --from=$user_address --yes)
80+
result=$(echo "test1234" | dcld tx model add-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --productName="$productName" --productLabel="Device Description" --commissioningCustomFlow=0 --deviceTypeID=12 --partNumber=12 --enhancedSetupFlowOptions=1 --from=$user_address --yes)
8181
result=$(get_txn_result "$result")
8282
check_response_and_report "$result" "\"code\": 0"
8383

@@ -86,14 +86,14 @@ test_divider
8686
vid_plus_one_in_hex_format=0xA14
8787
vidPlusOne=$((vid_in_hex_format+1))
8888
echo "$user adds Model with a VID: $vid_plus_one_in_hex_format PID: $pid_in_hex_format, This fails with Permission denied as the VID is not associated with this vendor account."
89-
result=$(echo "test1234" | dcld tx model add-model --vid=$vid_plus_one_in_hex_format --pid=$pid_in_hex_format --productName="$productName" --productLabel="Device Description" --commissioningCustomFlow=0 --deviceTypeID=12 --partNumber=12 --from=$user_address --yes 2>&1) || true
89+
result=$(echo "test1234" | dcld tx model add-model --vid=$vid_plus_one_in_hex_format --pid=$pid_in_hex_format --productName="$productName" --productLabel="Device Description" --commissioningCustomFlow=0 --deviceTypeID=12 --partNumber=12 --enhancedSetupFlowOptions=1 --from=$user_address --yes 2>&1) || true
9090
result=$(get_txn_result "$result")
9191
check_response_and_report "$result" "transaction should be signed by a vendor account containing the vendorID $vidPlusOne"
9292

9393
test_divider
9494

9595
echo "$user updates Model with VID: $vid_in_hex_format PID: $pid_in_hex_format"
96-
result=$(echo "test1234" | dcld tx model update-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --productName="$productName" --productLabel="Device Description" --partNumber=12 --from=$user_address --yes)
96+
result=$(echo "test1234" | dcld tx model update-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --productName="$productName" --productLabel="Device Description" --partNumber=12 --enhancedSetupFlowOptions=2 --from=$user_address --yes)
9797
result=$(get_txn_result "$result")
9898
check_response_and_report "$result" "\"code\": 0"
9999

integration_tests/cli/auth-demo.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ vid=$RANDOM
628628
pid=$RANDOM
629629
productName="Device #2"
630630
echo "$user adds Model with VID: $vid PID: $pid"
631-
result=$(echo "test1234" | dcld tx model add-model --vid=$vid --pid=$pid --productName="$productName" --productLabel="Device Description" --commissioningCustomFlow=0 --deviceTypeID=12 --partNumber=12 --from=$user_address --yes 2>&1) || true
631+
result=$(echo "test1234" | dcld tx model add-model --vid=$vid --pid=$pid --productName="$productName" --productLabel="Device Description" --commissioningCustomFlow=0 --deviceTypeID=12 --partNumber=12 --enhancedSetupFlowOptions=1 --from=$user_address --yes 2>&1) || true
632632
check_response_and_report "$result" "key not found" raw
633633

634634

@@ -1335,21 +1335,21 @@ test_divider
13351335

13361336
productName="Device #1"
13371337
echo "$user adds Model with VID: $vid PID: $pid"
1338-
result=$(echo "test1234" | dcld tx model add-model --vid=$vid --pid=$pid --productName="$productName" --productLabel="Device Description" --commissioningCustomFlow=0 --deviceTypeID=12 --partNumber=12 --from=$user_address --yes)
1338+
result=$(echo "test1234" | dcld tx model add-model --vid=$vid --pid=$pid --productName="$productName" --productLabel="Device Description" --commissioningCustomFlow=0 --deviceTypeID=12 --partNumber=12 --enhancedSetupFlowOptions=1 --from=$user_address --yes)
13391339
result=$(get_txn_result "$result")
13401340
check_response_and_report "$result" "\"code\": 0"
13411341

13421342
test_divider
13431343

13441344
vidPlusOne=$((vid+1))
13451345
echo "$user adds Model with a VID: $vidPlusOne PID: $pid, This fails with Permission denied as the VID is not associated with this vendor account."
1346-
result=$(echo "test1234" | dcld tx model add-model --vid=$vidPlusOne --pid=$pid --productName="$productName" --productLabel="Device Description" --commissioningCustomFlow=0 --deviceTypeID=12 --partNumber=12 --from=$user_address --yes 2>&1) || true
1346+
result=$(echo "test1234" | dcld tx model add-model --vid=$vidPlusOne --pid=$pid --productName="$productName" --productLabel="Device Description" --commissioningCustomFlow=0 --deviceTypeID=12 --partNumber=12 --enhancedSetupFlowOptions=1 --from=$user_address --yes 2>&1) || true
13471347
result=$(get_txn_result "$result")
13481348
check_response_and_report "$result" "transaction should be signed by a vendor account containing the vendorID $vidPlusOne"
13491349

13501350
test_divider
13511351
echo "$user updates Model with VID: $vid PID: $pid"
1352-
result=$(echo "test1234" | dcld tx model update-model --vid=$vid --pid=$pid --productName="$productName" --productLabel="Device Description" --partNumber=12 --from=$user_address --yes)
1352+
result=$(echo "test1234" | dcld tx model update-model --vid=$vid --pid=$pid --productName="$productName" --productLabel="Device Description" --partNumber=12 --enhancedSetupFlowOptions=2 --from=$user_address --yes)
13531353
result=$(get_txn_result "$result")
13541354
check_response_and_report "$result" "\"code\": 0"
13551355

integration_tests/cli/common.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ create_model_and_version() {
162162
local _softwareVersion="$3"
163163
local _softwareVersionString="$4"
164164
local _user_address="$5"
165-
result=$(echo "$passphrase" | dcld tx model add-model --vid=$_vid --pid=$_pid --deviceTypeID=1 --productName=TestProduct --productLabel=TestingProductLabel --partNumber=1 --commissioningCustomFlow=0 --from=$_user_address --yes)
165+
result=$(echo "$passphrase" | dcld tx model add-model --vid=$_vid --pid=$_pid --deviceTypeID=1 --productName=TestProduct --productLabel=TestingProductLabel --partNumber=1 --commissioningCustomFlow=0 --enhancedSetupFlowOptions=1 --from=$_user_address --yes)
166166
result=$(get_txn_result "$result")
167167
check_response "$result" "\"code\": 0"
168168
result=$(echo "$passphrase" | dcld tx model add-model-version --cdVersionNumber=1 --maxApplicableSoftwareVersion=10 --minApplicableSoftwareVersion=1 --vid=$_vid --pid=$_pid --softwareVersion=$_softwareVersion --softwareVersionString=$_softwareVersionString --from=$_user_address --yes)

integration_tests/cli/compliance-demo-hex.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ matter_certification_type="matter"
4747
cd_certificate_id="some ID"
4848

4949
echo "Add Model with VID: $vid_in_hex_format PID: $pid_in_hex_format"
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)
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 --enhancedSetupFlowOptions=1 --from $vendor_account --yes)
5151
result=$(get_txn_result "$result")
5252
echo $result
5353
check_response "$result" "\"code\": 0"

integration_tests/cli/compliance-demo.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ check_response "$result" "No model version"
5656
test_divider
5757

5858
echo "Add Model with VID: $vid PID: $pid"
59-
result=$(echo "$passphrase" | dcld tx model add-model --vid=$vid --pid=$pid --deviceTypeID=1 --productName=TestProduct --productLabel=TestingProductLabel --partNumber=1 --commissioningCustomFlow=0 --from $vendor_account --yes)
59+
result=$(echo "$passphrase" | dcld tx model add-model --vid=$vid --pid=$pid --deviceTypeID=1 --productName=TestProduct --productLabel=TestingProductLabel --partNumber=1 --commissioningCustomFlow=0 --enhancedSetupFlowOptions=1 --from $vendor_account --yes)
6060
result=$(get_txn_result "$result")
6161
echo $result
6262
check_response "$result" "\"code\": 0"
@@ -551,7 +551,7 @@ svs=$RANDOM
551551

552552
# ADD MODEL
553553
echo "Add Model with VID: $vid PID: $pid"
554-
result=$(echo "$passphrase" | dcld tx model add-model --vid=$vid --pid=$pid --deviceTypeID=1 --productName=TestProduct --productLabel=TestingProductLabel --partNumber=1 --commissioningCustomFlow=0 --from $vendor_account --yes)
554+
result=$(echo "$passphrase" | dcld tx model add-model --vid=$vid --pid=$pid --deviceTypeID=1 --productName=TestProduct --productLabel=TestingProductLabel --partNumber=1 --enhancedSetupFlowOptions=1 --commissioningCustomFlow=0 --from $vendor_account --yes)
555555
result=$(get_txn_result "$result")
556556
echo $result
557557
check_response "$result" "\"code\": 0"

integration_tests/cli/model-demo-hex.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ test_divider
5757

5858
productLabel="Device #1"
5959
echo "Add Model with VID: $vid_in_hex_format PID: $pid_in_hex_format"
60-
result=$(echo "test1234" | dcld tx model add-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --deviceTypeID=1 --productName=TestProduct --productLabel="$productLabel" --partNumber=1 --commissioningCustomFlow=0 --from=$vendor_account --yes)
60+
result=$(echo "test1234" | dcld tx model add-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --deviceTypeID=1 --productName=TestProduct --productLabel="$productLabel" --partNumber=1 --commissioningCustomFlow=0 --enhancedSetupFlowOptions=1 --from=$vendor_account --yes)
6161
result=$(get_txn_result "$result")
6262
check_response "$result" "\"code\": 0"
6363
echo "$result"
@@ -90,7 +90,7 @@ test_divider
9090

9191
echo "Update Model with VID: ${vid_in_hex_format} PID: ${pid_in_hex_format} with new description"
9292
description="New Device Description"
93-
result=$(echo "test1234" | dcld tx model update-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --from $vendor_account --yes --productLabel "$description")
93+
result=$(echo "test1234" | dcld tx model update-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --enhancedSetupFlowOptions=2 --from $vendor_account --yes --productLabel "$description")
9494
result=$(get_txn_result "$result")
9595
check_response "$result" "\"code\": 0"
9696
echo "$result"
@@ -108,7 +108,7 @@ test_divider
108108

109109
echo "Update Model with VID: ${vid_in_hex_format} PID: ${pid_in_hex_format} modifying supportURL"
110110
supportURL="https://newsupporturl.test"
111-
result=$(echo "test1234" | dcld tx model update-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --from $vendor_account --yes --supportURL "$supportURL")
111+
result=$(echo "test1234" | dcld tx model update-model --vid=$vid_in_hex_format --pid=$pid_in_hex_format --enhancedSetupFlowOptions=2 --from $vendor_account --yes --supportURL "$supportURL")
112112
result=$(get_txn_result "$result")
113113
check_response "$result" "\"code\": 0"
114114
echo "$result"

0 commit comments

Comments
 (0)