Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model DiscoveryCapabilitiesBitmask field #589

Merged
merged 42 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
845aba9
fixed 0 bit model validations
DenisRybas Aug 1, 2024
4efa4c7
fixed message tests
DenisRybas Aug 1, 2024
522cb51
fixed model CLI tests
DenisRybas Aug 1, 2024
9032130
updated integration tests
DenisRybas Aug 1, 2024
953d0e2
updated https validation in model
DenisRybas Aug 1, 2024
defb1c4
updated model static validations
DenisRybas Aug 1, 2024
8fc23f6
added new field, updated validations and tests
DenisRybas Aug 1, 2024
4f4ff4c
updated CLI commands
DenisRybas Aug 1, 2024
940e2da
linted
DenisRybas Aug 1, 2024
7b1f215
fixed model tests
DenisRybas Aug 2, 2024
7582332
fixed tests
DenisRybas Aug 2, 2024
f5b9c75
debug
DenisRybas Aug 2, 2024
eae8884
fixed failing tests
DenisRybas Aug 2, 2024
9bfdd6f
uncommented tests
DenisRybas Aug 2, 2024
f7d28b8
processed comments
DenisRybas Aug 2, 2024
6dc67a8
int32 -> uint32 for discoveryCapabilitiesBitmask
DenisRybas Aug 2, 2024
c1743ed
added unit tests for static validations
DenisRybas Aug 2, 2024
4c676eb
updated tests and validations
DenisRybas Aug 2, 2024
03c4076
simplified validation logic
DenisRybas Aug 2, 2024
91985c9
simplified validation logic
DenisRybas Aug 2, 2024
194e25c
Merge branch 'master' of https://github.com/zigbee-alliance/distribut…
DenisRybas Sep 3, 2024
f7c924a
added CommissioningFallbackUrl field
DenisRybas Sep 3, 2024
e8fc592
updated msg tests
DenisRybas Sep 3, 2024
abfb51b
updated tests
DenisRybas Sep 3, 2024
09291ed
updated integration tests
DenisRybas Sep 3, 2024
93dec05
added commissioningFallbackUrl to msg server
DenisRybas Sep 3, 2024
cf80cd1
linted
DenisRybas Sep 3, 2024
bf21256
updated CLI integration tests
DenisRybas Sep 3, 2024
8082387
added CommissioningFallbackUrl to model handler tests
DenisRybas Sep 3, 2024
4c44a41
linted
DenisRybas Sep 3, 2024
a1b9c9b
fixed model integration tests
DenisRybas Sep 4, 2024
17c8ca9
updated docs
DenisRybas Sep 5, 2024
a23646a
reverted tests
DenisRybas Sep 5, 2024
c2b2669
Merge branch 'master' of https://github.com/zigbee-alliance/distribut…
DenisRybas Sep 5, 2024
15e273c
reverted tests
DenisRybas Sep 5, 2024
8a9c965
processed commets, updated tests
DenisRybas Sep 5, 2024
ef19e13
fixed tx tests
DenisRybas Sep 5, 2024
7b2ee42
fixed tx update model tests
DenisRybas Sep 5, 2024
852d1ce
updated model tx validations
DenisRybas Sep 6, 2024
a8ef46d
updated tests
DenisRybas Sep 6, 2024
85e4739
Merge branch 'master' of https://github.com/zigbee-alliance/distribut…
DenisRybas Sep 6, 2024
cc18b71
ignite rebuilt
DenisRybas Sep 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ Not all fields can be edited (see `EDIT_MODEL`).
- 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.
- 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.
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability. Should be equal to 0 (default 0)
- discoveryCapabilitiesBitmask: `optional(uint16)` - Identifies the device's available technologies for device discovery (default 0). This field SHALL be populated if CommissioningFallbackUrl is populated
- commissioningFallbackURL: `optional(string)` - This field SHALL identify a vendor-specific commissioning-fallback URL for the device model, which can be used by a Commissioner in case commissioning fails to direct the user to a manufacturer-provided mechanism to provide resolution to commissioning issues.
- In State:
- `model/Model/value/<vid>/<pid>`
- `model/VendorProducts/value/<vid>`
Expand All @@ -237,7 +239,7 @@ dcld tx model add-model --vid=<uint16> --pid=<uint16> --deviceTypeID=<uint16> --
```bash
dcld tx model add-model --vid=<uint16> --pid=<uint16> --deviceTypeID=<uint16> --productName=<string> --productLabel=<string or path> --partNumber=<string>
--commissioningCustomFlow=<uint8> --commissioningCustomFlowUrl=<string> --commissioningModeInitialStepsHint=<uint32> --commissioningModeInitialStepsInstruction=<string>
--commissioningModeSecondaryStepsHint=<uint32> --commissioningModeSecondaryStepsInstruction=<string> --userManualURL=<string> --supportURL=<string> --productURL=<string> --lsfURL=<string>
--commissioningModeSecondaryStepsHint=<uint32> --commissioningModeSecondaryStepsInstruction=<string> --userManualURL=<string> --supportURL=<string> --productURL=<string> --lsfURL=<string> --discoveryCapabilitiesBitmask=<uint16> --commissioningFallbackURL<string>
--from=<account>
```

Expand Down Expand Up @@ -277,6 +279,7 @@ If one of EnhancedSetupFlow or MaintenanceUrl fields needs to be updated, ALL En
- 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.
- 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.
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability. Should be equal to 0 (default 0)
- commissioningFallbackURL: `optional(string)` - This field SHALL identify a vendor-specific commissioning-fallback URL for the device model, which can be used by a Commissioner in case commissioning fails to direct the user to a manufacturer-provided mechanism to provide resolution to commissioning issues.
- In State: `model/Model/value/<vid>/<pid>`
- Who can send:
- Vendor account associated with the same vid who has created the model
Expand Down
11 changes: 9 additions & 2 deletions integration_tests/cli/model-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ enhancedSetupFlowTCRevision=1
enhancedSetupFlowTCDigest="MWRjNGE0NDA0MWRjYWYxMTU0NWI3NTQzZGZlOTQyZjQ3NDJmNTY4YmU2OGZlZTI3NTQ0MWIwOTJiYjYwZGVlZA=="
enhancedSetupFlowTCFileSize=1024
maintenanceUrl="https://example.org"
commissioningFallbackUrl="https://url.commissioningfallbackurl.dclmodel"
discoveryCapabilitiesBitmask=1
echo "Add Model with VID: $vid_with_pids PID: $pid"
result=$(echo "test1234" | dcld tx model add-model --vid=$vid_with_pids --pid=$pid --deviceTypeID=1 --productName=TestProduct --productLabel="$productLabel" --partNumber=1 --commissioningCustomFlow=0 --enhancedSetupFlowOptions=$enhancedSetupFlowOptions_1 \
--enhancedSetupFlowTCUrl=$enhancedSetupFlowTCUrl --enhancedSetupFlowTCRevision=$enhancedSetupFlowTCRevision --enhancedSetupFlowTCDigest=$enhancedSetupFlowTCDigest --enhancedSetupFlowTCFileSize=$enhancedSetupFlowTCFileSize --maintenanceUrl=$maintenanceUrl --from=$vendor_account_with_pids --yes)
--enhancedSetupFlowTCUrl=$enhancedSetupFlowTCUrl --enhancedSetupFlowTCRevision=$enhancedSetupFlowTCRevision --enhancedSetupFlowTCDigest=$enhancedSetupFlowTCDigest --enhancedSetupFlowTCFileSize=$enhancedSetupFlowTCFileSize --maintenanceUrl=$maintenanceUrl \
--commissioningFallbackUrl=$commissioningFallbackUrl --discoveryCapabilitiesBitmask=$discoveryCapabilitiesBitmask --from=$vendor_account_with_pids --yes)
result=$(get_txn_result "$result")
check_response "$result" "\"code\": 0"
echo "$result"
Expand Down Expand Up @@ -105,6 +108,8 @@ check_response "$result" "\"enhancedSetupFlowTCRevision\": $enhancedSetupFlowTCR
check_response "$result" "\"enhancedSetupFlowTCDigest\": \"$enhancedSetupFlowTCDigest\""
check_response "$result" "\"enhancedSetupFlowTCFileSize\": $enhancedSetupFlowTCFileSize"
check_response "$result" "\"maintenanceUrl\": \"$maintenanceUrl\""
check_response "$result" "\"commissioningFallbackUrl\": \"$commissioningFallbackUrl\""
check_response "$result" "\"discoveryCapabilitiesBitmask\": $discoveryCapabilitiesBitmask"
echo "$result"

test_divider
Expand Down Expand Up @@ -159,9 +164,10 @@ newEnhancedSetupFlowTCRevision=2
newEnhancedSetupFlowTCDigest="MWRjM2E0MTA0MWRjYWYxMTU0NWI3NTQzZGZlOTQyZjQ3NDJmNTY4YmU2OGZlZTI3NTQ0MWIwOTJiYjYxZGVlZA=="
newEnhancedSetupFlowTCFileSize=2048
newMaintenanceUrl="https://example2.org"
newCommissioningFallbackUrl="https://url.commissioningfallbackurl2.dclmodel"
echo "Update Model with VID: ${vid_with_pids} PID: ${pid} with new description, enhancedSetupFlowTCUrl, enhancedSetupFlowTCRevision, enhancedSetupFlowTCDigest, enhancedSetupFlowTCFileSize and maintenanceUrl"
result=$(echo "test1234" | dcld tx model update-model --vid=$vid_with_pids --pid=$pid --from $vendor_account_with_pids --yes --productLabel "$description" --enhancedSetupFlowOptions=$enhancedSetupFlowOptions_1 \
--enhancedSetupFlowTCUrl=$newEnhancedSetupFlowTCUrl --enhancedSetupFlowTCRevision=$newEnhancedSetupFlowTCRevision --enhancedSetupFlowTCDigest=$newEnhancedSetupFlowTCDigest --enhancedSetupFlowTCFileSize=$newEnhancedSetupFlowTCFileSize --maintenanceUrl=$newMaintenanceUrl --from=$vendor_account_with_pids --yes)
--enhancedSetupFlowTCUrl=$newEnhancedSetupFlowTCUrl --enhancedSetupFlowTCRevision=$newEnhancedSetupFlowTCRevision --enhancedSetupFlowTCDigest=$newEnhancedSetupFlowTCDigest --enhancedSetupFlowTCFileSize=$newEnhancedSetupFlowTCFileSize --maintenanceUrl=$newMaintenanceUrl --commissioningFallbackUrl=$newCommissioningFallbackUrl --from=$vendor_account_with_pids --yes)
result=$(get_txn_result "$result")
check_response "$result" "\"code\": 0"
echo "$result"
Expand Down Expand Up @@ -189,6 +195,7 @@ check_response "$result" "\"enhancedSetupFlowTCRevision\": $newEnhancedSetupFlow
check_response "$result" "\"enhancedSetupFlowTCDigest\": \"$newEnhancedSetupFlowTCDigest\""
check_response "$result" "\"enhancedSetupFlowTCFileSize\": $newEnhancedSetupFlowTCFileSize"
check_response "$result" "\"maintenanceUrl\": \"$newMaintenanceUrl\""
check_response "$result" "\"commissioningFallbackUrl\": \"$newCommissioningFallbackUrl\""
echo "$result"

test_divider
Expand Down
2 changes: 2 additions & 0 deletions integration_tests/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ var (
EnhancedSetupFlowTCDigest = "MmNmMjRkYmE1ZmIwYTMwZTI2ZTgzYjJhYzViOWUyOWUxYjE2MWU1YzFmYTc0MjVlNzMwNDMzNjI5MzhiOTgyNA=="
EnhancedSetupFlowTCFileSize = 1
MaintenanceURL = "https://url.maintenanceurl.dclmodel"
CommissioningFallbackURL = "https://url.commissioningfallbackurl.dclmodel"
DiscoveryCapabilitiesBitmask uint32 = 1
LsfURL = "https://url.lsfurl.dclmodel"
DataURL = "https://url.data.dclmodel"
DataURL2 = "https://url.data.dclmodel2"
Expand Down
22 changes: 12 additions & 10 deletions integration_tests/grpc_rest/model/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,18 @@ func NewMsgCreateModel(vid int32, pid int32, signer string) *modeltypes.MsgCreat
CommissioningModeInitialStepsInstruction: testconstants.CommissioningModeInitialStepsInstruction,
CommissioningModeSecondaryStepsHint: testconstants.CommissioningModeSecondaryStepsHint,
CommissioningModeSecondaryStepsInstruction: testconstants.CommissioningModeSecondaryStepsInstruction,
UserManualUrl: testconstants.UserManualURL,
SupportUrl: testconstants.SupportURL,
ProductUrl: testconstants.ProductURL,
LsfUrl: testconstants.LsfURL,
EnhancedSetupFlowOptions: testconstants.EnhancedSetupFlowOptions,
EnhancedSetupFlowTCUrl: testconstants.EnhancedSetupFlowTCURL,
EnhancedSetupFlowTCRevision: int32(testconstants.EnhancedSetupFlowTCRevision),
EnhancedSetupFlowTCDigest: testconstants.EnhancedSetupFlowTCDigest,
EnhancedSetupFlowTCFileSize: uint32(testconstants.EnhancedSetupFlowTCFileSize),
MaintenanceUrl: testconstants.MaintenanceURL,
UserManualUrl: testconstants.UserManualURL,
SupportUrl: testconstants.SupportURL,
ProductUrl: testconstants.ProductURL,
LsfUrl: testconstants.LsfURL,
EnhancedSetupFlowOptions: testconstants.EnhancedSetupFlowOptions,
EnhancedSetupFlowTCUrl: testconstants.EnhancedSetupFlowTCURL,
EnhancedSetupFlowTCRevision: int32(testconstants.EnhancedSetupFlowTCRevision),
EnhancedSetupFlowTCDigest: testconstants.EnhancedSetupFlowTCDigest,
EnhancedSetupFlowTCFileSize: uint32(testconstants.EnhancedSetupFlowTCFileSize),
MaintenanceUrl: testconstants.MaintenanceURL,
CommissioningFallbackUrl: testconstants.CommissioningFallbackURL,
DiscoveryCapabilitiesBitmask: testconstants.DiscoveryCapabilitiesBitmask,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ message Model {
string enhancedSetupFlowTCDigest = 23 [(gogoproto.moretags) = "validate:\"required_if_bit_0_set=EnhancedSetupFlowOptions,omitempty,max=128\""];
uint32 enhancedSetupFlowTCFileSize = 24 [(gogoproto.moretags) = "validate:\"required_with=EnhancedSetupFlowTCUrl\""];;
string maintenanceUrl = 25 [(gogoproto.moretags) = "validate:\"required_if_bit_0_set=EnhancedSetupFlowOptions,omitempty,url,startswith=https:,max=256\""];
uint32 discoveryCapabilitiesBitmask = 26 [(gogoproto.moretags) = "validate:\"gte=0,lte=14\""];
string commissioningFallbackUrl = 27 [(gogoproto.moretags) = "validate:\"omitempty,url,startsnotwith=http:,max=256\""];

}

Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ message MsgCreateModel {
string enhancedSetupFlowTCDigest = 22 [(gogoproto.moretags) = "validate:\"required_if_bit_0_set=EnhancedSetupFlowOptions,omitempty,max=128\""];
uint32 enhancedSetupFlowTCFileSize = 23 [(gogoproto.moretags) = "validate:\"required_with=EnhancedSetupFlowTCUrl\""];;
string maintenanceUrl = 24 [(gogoproto.moretags) = "validate:\"required_if_bit_0_set=EnhancedSetupFlowOptions,omitempty,url,startswith=https:,max=256\""];
uint32 discoveryCapabilitiesBitmask = 25 [(gogoproto.moretags) = "validate:\"gte=0,lte=14\""];
ashcherbakov marked this conversation as resolved.
Show resolved Hide resolved
string commissioningFallbackUrl = 26 [(gogoproto.moretags) = "validate:\"omitempty,url,startsnotwith=http:,max=256\""];
}
message MsgCreateModelResponse {}

Expand Down Expand Up @@ -74,6 +76,7 @@ message MsgUpdateModel {
string enhancedSetupFlowTCDigest = 20 [(gogoproto.moretags) = "validate:\"required_if_bit_0_set=EnhancedSetupFlowOptions,omitempty,max=128\""];
uint32 enhancedSetupFlowTCFileSize = 21 [(gogoproto.moretags) = "validate:\"required_with=EnhancedSetupFlowTCUrl\""];;
string maintenanceUrl = 22 [(gogoproto.moretags) = "validate:\"required_if_bit_0_set=EnhancedSetupFlowOptions,omitempty,url,startswith=https:,max=256\""];
string commissioningFallbackUrl = 23 [(gogoproto.moretags) = "validate:\"omitempty,url,startsnotwith=http:,max=256\""];
}
message MsgUpdateModelResponse {}

Expand Down
2 changes: 2 additions & 0 deletions x/model/client/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const (
FlagProductLabel = "productLabel"
FlagProductLabelShortcut = "d"
FlagPartNumber = "partNumber"
FlagDiscoveryCapabilitiesBitmask = "discoveryCapabilitiesBitmask"
FlagCommissioningCustomFlow = "commissioningCustomFlow"
FlagCommissioningCustomFlowURL = "commissioningCustomFlowURL"
FlagCommissioningModeInitialStepsHint = "commissioningModeInitialStepsHint"
Expand All @@ -27,6 +28,7 @@ const (
FlagEnhancedSetupFlowTCDigest = "enhancedSetupFlowTCDigest"
FlagEnhancedSetupFlowTCFileSize = "enhancedSetupFlowTCFileSize"
FlagMaintenanceURL = "maintenanceUrl"
FlagCommissioningFallbackURL = "commissioningFallbackUrl"
// Flags for ModelVersion.
FlagSoftwareVersion = "softwareVersion"
FlagSoftwareVersionShortcut = "v"
Expand Down
17 changes: 17 additions & 0 deletions x/model/client/cli/tx_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func CmdCreateModel() *cobra.Command {
productName string
productLabel string
partNumber string
discoveryCapabilitiesBitmask uint32
commissioningCustomFlow int32
commissioningCustomFlowURL string
commissioningModeInitialStepsHint uint32
Expand All @@ -35,6 +36,7 @@ func CmdCreateModel() *cobra.Command {
enhancedSetupFlowTCDigest string
enhancedSetupFlowTCFileSize uint32
maintenanceURL string
commissioningFallbackURL string
schemaVersion uint32
)

Expand All @@ -43,6 +45,10 @@ func CmdCreateModel() *cobra.Command {
Short: "Add new Model",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) (err error) {
if commissioningFallbackURL != "" && discoveryCapabilitiesBitmask == 0 {
ashcherbakov marked this conversation as resolved.
Show resolved Hide resolved
return types.ErrFallbackURLRequiresBitmask
}

clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
Expand All @@ -61,6 +67,7 @@ func CmdCreateModel() *cobra.Command {
productName,
productLabel,
partNumber,
discoveryCapabilitiesBitmask,
commissioningCustomFlow,
commissioningCustomFlowURL,
commissioningModeInitialStepsHint,
Expand All @@ -78,6 +85,7 @@ func CmdCreateModel() *cobra.Command {
enhancedSetupFlowTCDigest,
enhancedSetupFlowTCFileSize,
maintenanceURL,
commissioningFallbackURL,
)

// validate basic will be called in GenerateOrBroadcastTxCLI
Expand All @@ -102,6 +110,9 @@ func CmdCreateModel() *cobra.Command {
"Model description (string or path to file containing data)")
cmd.Flags().StringVar(&partNumber, FlagPartNumber, "",
"Model Part Number (or sku)")
cmd.Flags().Uint32Var(&discoveryCapabilitiesBitmask, FlagDiscoveryCapabilitiesBitmask, 0,
ashcherbakov marked this conversation as resolved.
Show resolved Hide resolved
`This field identifies the device's available technologies for device discovery.
This field SHALL be populated if CommissioningFallbackUrl is populated`)
cmd.Flags().Int32Var(&commissioningCustomFlow, FlagCommissioningCustomFlow, 0,
`A value of 1 indicates that user interaction with the device (pressing a button, for example) is
required before commissioning can take place. When CommissioningCustomflow is set to a value of 2,
Expand Down Expand Up @@ -153,6 +164,8 @@ and for these values the commissioningModeSecondaryStepInstruction SHALL be set`
"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.")
cmd.Flags().StringVar(&maintenanceURL, FlagMaintenanceURL, "",
"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.")
cmd.Flags().StringVar(&commissioningFallbackURL, FlagCommissioningFallbackURL, "",
"This field SHALL identify a vendor-specific commissioning-fallback URL for the device model, which can be used by a Commissioner in case commissioning fails to direct the user to a manufacturer-provided mechanism to provide resolution to commissioning issues.")

_ = cmd.MarkFlagRequired(FlagVid)
_ = cmd.MarkFlagRequired(FlagPid)
Expand Down Expand Up @@ -186,6 +199,7 @@ func CmdUpdateModel() *cobra.Command {
enhancedSetupFlowTCDigest string
enhancedSetupFlowTCFileSize uint32
maintenanceURL string
commissioningFallbackURL string
)

cmd := &cobra.Command{
Expand Down Expand Up @@ -226,6 +240,7 @@ func CmdUpdateModel() *cobra.Command {
enhancedSetupFlowTCDigest,
enhancedSetupFlowTCFileSize,
maintenanceURL,
commissioningFallbackURL,
)

// validate basic will be called in GenerateOrBroadcastTxCLI
Expand Down Expand Up @@ -289,6 +304,8 @@ will enter Commissioning Mode upon a power cycle. Note that this value cannot be
"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.")
cmd.Flags().StringVar(&maintenanceURL, FlagMaintenanceURL, "",
"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.")
cmd.Flags().StringVar(&commissioningFallbackURL, FlagCommissioningFallbackURL, "",
"This field SHALL identify a vendor-specific commissioning-fallback URL for the device model, which can be used by a Commissioner in case commissioning fails to direct the user to a manufacturer-provided mechanism to provide resolution to commissioning issues.")

cli.AddTxFlagsToCmd(cmd)

Expand Down
Loading
Loading