Skip to content

Commit 6e3647e

Browse files
authored
Merge pull request #381 from abdulla-ashurov/issue-777
Add a new flag `Certification ID of Software Component` to the `Compliance` scheme
2 parents e6d805c + a22c9fb commit 6e3647e

File tree

61 files changed

+1185
-840
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1185
-840
lines changed

docs/static/openapi.yml

+20
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ paths:
295295
type: string
296296
parentChild:
297297
type: string
298+
certificationIdOfSoftwareComponent:
299+
type: string
298300
pagination:
299301
type: object
300302
properties:
@@ -478,6 +480,8 @@ paths:
478480
type: string
479481
parentChild:
480482
type: string
483+
certificationIdOfSoftwareComponent:
484+
type: string
481485
default:
482486
description: An unexpected error response.
483487
schema:
@@ -606,6 +610,8 @@ paths:
606610
type: string
607611
parentChild:
608612
type: string
613+
certificationIdOfSoftwareComponent:
614+
type: string
609615
pagination:
610616
type: object
611617
properties:
@@ -796,6 +802,8 @@ paths:
796802
type: string
797803
parentChild:
798804
type: string
805+
certificationIdOfSoftwareComponent:
806+
type: string
799807
default:
800808
description: An unexpected error response.
801809
schema:
@@ -14027,6 +14035,8 @@ definitions:
1402714035
type: string
1402814036
parentChild:
1402914037
type: string
14038+
certificationIdOfSoftwareComponent:
14039+
type: string
1403014040
zigbeealliance.distributedcomplianceledger.compliance.DeviceSoftwareCompliance:
1403114041
type: object
1403214042
properties:
@@ -14099,6 +14109,8 @@ definitions:
1409914109
type: string
1410014110
parentChild:
1410114111
type: string
14112+
certificationIdOfSoftwareComponent:
14113+
type: string
1410214114
zigbeealliance.distributedcomplianceledger.compliance.ProvisionalModel:
1410314115
type: object
1410414116
properties:
@@ -14231,6 +14243,8 @@ definitions:
1423114243
type: string
1423214244
parentChild:
1423314245
type: string
14246+
certificationIdOfSoftwareComponent:
14247+
type: string
1423414248
pagination:
1423514249
type: object
1423614250
properties:
@@ -14333,6 +14347,8 @@ definitions:
1433314347
type: string
1433414348
parentChild:
1433514349
type: string
14350+
certificationIdOfSoftwareComponent:
14351+
type: string
1433614352
pagination:
1433714353
type: object
1433814354
properties:
@@ -14537,6 +14553,8 @@ definitions:
1453714553
type: string
1453814554
parentChild:
1453914555
type: string
14556+
certificationIdOfSoftwareComponent:
14557+
type: string
1454014558
zigbeealliance.distributedcomplianceledger.compliance.QueryGetDeviceSoftwareComplianceResponse:
1454114559
type: object
1454214560
properties:
@@ -14612,6 +14630,8 @@ definitions:
1461214630
type: string
1461314631
parentChild:
1461414632
type: string
14633+
certificationIdOfSoftwareComponent:
14634+
type: string
1461514635
zigbeealliance.distributedcomplianceledger.compliance.QueryGetProvisionalModelResponse:
1461614636
type: object
1461714637
properties:

docs/transactions.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ from the revocation list.
429429
- programType `optional(string)` - optional field describing the program type
430430
- programTypeVersion `optional(string)` - optional field describing the program type version
431431
- transport `optional(string)` - optional field describing the transport
432-
- parentChild `optional(string)` - optional field describing the parent/child - Currently 'parent' and 'child' types are supported.
432+
- parentChild `optional(string)` - optional field describing the parent/child - Currently 'parent' and 'child' types are supported
433+
- certificationIDOfSoftwareComponent `optional(string)` - optional field describing the certification ID of software component
433434
- In State:
434435
- `compliance/ComplianceInfo/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
435436
- `compliance/CertifiedModel/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
@@ -438,7 +439,7 @@ from the revocation list.
438439
- CLI command:
439440
- `dcld tx compliance certify-model --vid=<uint16> --pid=<uint16> --softwareVersion=<uint32> --softwareVersionString=<string> --certificationType=<matter|zigbee|access control|product security> --certificationDate=<rfc3339 encoded date> --cdCertificateId=<string> --from=<account>`
440441
- CLI command full:
441-
- `dcld tx compliance certify-model --vid=<uint16> --pid=<uint16> --softwareVersion=<uint32> --softwareVersionString=<string> --certificationType=<matter|zigbee|access control|product security> --certificationDate=<rfc3339 encoded date> --cdCertificateId=<string> --reason=<string> --cDVersionNumber=<uint32> --familyId=<string> --supportedClusters=<string> --compliantPlatformUsed=<string> --compliantPlatformVersion=<string> --OSVersion=<string> --certificationRoute=<string> --programType=<string> --programTypeVersion=<string> --transport=<string> --parentChild=<string> --from=<account>`
442+
- `dcld tx compliance certify-model --vid=<uint16> --pid=<uint16> --softwareVersion=<uint32> --softwareVersionString=<string> --certificationType=<matter|zigbee|access control|product security> --certificationDate=<rfc3339 encoded date> --cdCertificateId=<string> --reason=<string> --cDVersionNumber=<uint32> --familyId=<string> --supportedClusters=<string> --compliantPlatformUsed=<string> --compliantPlatformVersion=<string> --OSVersion=<string> --certificationRoute=<string> --programType=<string> --programTypeVersion=<string> --transport=<string> --parentChild=<string> --certificationIDOfSoftwareComponent=<string> --from=<account>`
442443

443444
#### REVOKE_MODEL_CERTIFICATION
444445

@@ -497,7 +498,8 @@ Can not be set if there is already a certification record on the ledger (certifi
497498
- programType `optional(string)` - optional field describing the program type
498499
- programTypeVersion `optional(string)` - optional field describing the program type version
499500
- transport `optional(string)` - optional field describing the transport
500-
- parentChild `optional(string)` - optional field describing the parent/child - Currently 'parent' and 'child' types are supported.
501+
- parentChild `optional(string)` - optional field describing the parent/child - Currently 'parent' and 'child' types are supported
502+
- certificationIDOfSoftwareComponent `optional(string)` - optional field describing the certification ID of software component
501503
- In State:
502504
- `compliance/ComplianceInfo/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
503505
- `compliance/ProvisionalModel/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
@@ -506,7 +508,7 @@ Can not be set if there is already a certification record on the ledger (certifi
506508
- CLI command:
507509
- `dcld tx compliance provision-model --vid=<uint16> --pid=<uint16> --softwareVersion=<uint32> --certificationType=<matter|zigbee|access control|product security> --provisionalDate=<rfc3339 encoded date> --from=<account>`
508510
- CLI command full:
509-
- `dcld tx compliance provision-model --vid=<uint16> --pid=<uint16> --softwareVersion=<uint32> --certificationType=<matter|zigbee|access control|product security> --provisionalDate=<rfc3339 encoded date> --cdCertificateId=<string> --reason=<string> --cDVersionNumber=<uint32> --familyId=<string> --supportedClusters=<string> --compliantPlatformUsed=<string> --compliantPlatformVersion=<string> --OSVersion=<string> --certificationRoute=<string> --programType=<string> --programTypeVersion=<string> --transport=<string> --parentChild=<string> --from=<account>`
511+
- `dcld tx compliance provision-model --vid=<uint16> --pid=<uint16> --softwareVersion=<uint32> --certificationType=<matter|zigbee|access control|product security> --provisionalDate=<rfc3339 encoded date> --cdCertificateId=<string> --reason=<string> --cDVersionNumber=<uint32> --familyId=<string> --supportedClusters=<string> --compliantPlatformUsed=<string> --compliantPlatformVersion=<string> --OSVersion=<string> --certificationRoute=<string> --programType=<string> --programTypeVersion=<string> --transport=<string> --parentChild=<string> --certificationIDOfSoftwareComponent=<string> --from=<account>`
510512

511513
#### GET_CERTIFIED_MODEL
512514

integration_tests/cli/compliance-demo.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ test_divider
542542

543543
# ADD CERTIFY MODEL WITH ALL OPTIONAL FIELDS
544544
echo "Certify Model with VID: $vid PID: $pid SV: ${sv} with zigbee certification"
545-
result=$(echo "$passphrase" | dcld tx compliance certify-model --vid=$vid --pid=$pid --softwareVersion=$sv --softwareVersionString=$svs --certificationType="$zigbee_certification_type" --certificationDate="$certification_date" --cdCertificateId="$cd_certificate_id" --programTypeVersion="1.0" --familyId="someFID" --supportedClusters="someClusters" --compliantPlatformUsed="WIFI" --compliantPlatformVersion="V1" --OSVersion="someV" --certificationRoute="Full" --programType="pType" --transport="someTransport" --parentChild="parent" --from $zb_account --yes)
545+
result=$(echo "$passphrase" | dcld tx compliance certify-model --vid=$vid --pid=$pid --softwareVersion=$sv --softwareVersionString=$svs --certificationType="$zigbee_certification_type" --certificationDate="$certification_date" --cdCertificateId="$cd_certificate_id" --programTypeVersion="1.0" --familyId="someFID" --supportedClusters="someClusters" --compliantPlatformUsed="WIFI" --compliantPlatformVersion="V1" --OSVersion="someV" --certificationRoute="Full" --programType="pType" --transport="someTransport" --parentChild="parent" --certificationIDOfSoftwareComponent="someIDOfSoftwareComponent" --from $zb_account --yes)
546546
echo "$result"
547547
check_response "$result" "\"code\": 0"
548548

@@ -577,6 +577,7 @@ check_response "$result" "\"certificationRoute\": \"Full\""
577577
check_response "$result" "\"programType\": \"pType\""
578578
check_response "$result" "\"transport\": \"someTransport\""
579579
check_response "$result" "\"parentChild\": \"parent\""
580+
check_response "$result" "\"certificationIdOfSoftwareComponent\": \"someIDOfSoftwareComponent\""
580581
echo "$result"
581582

582583
test_divider
@@ -600,6 +601,7 @@ check_response "$result" "\"certificationRoute\": \"Full\""
600601
check_response "$result" "\"programType\": \"pType\""
601602
check_response "$result" "\"transport\": \"someTransport\""
602603
check_response "$result" "\"parentChild\": \"parent\""
604+
check_response "$result" "\"certificationIdOfSoftwareComponent\": \"someIDOfSoftwareComponent\""
603605
echo "$result"
604606
###########################################################################################################################################
605607

integration_tests/cli/compliance-provisioning.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ test_divider
458458

459459
# ADD PROVISION MODEL WITH ALL OPTIONAL FIELDS
460460
echo "Provision Model with VID: $vid PID: $pid SV: ${sv} with zigbee certification"
461-
result=$(echo "$passphrase" | dcld tx compliance provision-model --vid=$vid --pid=$pid --softwareVersion=$sv --softwareVersionString=$svs --certificationType="$certification_type_zb" --provisionalDate="$provision_date" --reason "$provision_reason" --cdCertificateId="$cd_certificate_id" --programTypeVersion="1.0" --familyId="someFID" --supportedClusters="someClusters" --compliantPlatformUsed="WIFI" --compliantPlatformVersion="V1" --OSVersion="someV" --certificationRoute="Full" --programType="pType" --transport="someTransport" --parentChild="parent" --from $zb_account --yes)
461+
result=$(echo "$passphrase" | dcld tx compliance provision-model --vid=$vid --pid=$pid --softwareVersion=$sv --softwareVersionString=$svs --certificationType="$certification_type_zb" --provisionalDate="$provision_date" --reason "$provision_reason" --cdCertificateId="$cd_certificate_id" --programTypeVersion="1.0" --familyId="someFID" --supportedClusters="someClusters" --compliantPlatformUsed="WIFI" --compliantPlatformVersion="V1" --OSVersion="someV" --certificationRoute="Full" --programType="pType" --transport="someTransport" --parentChild="parent" --certificationIDOfSoftwareComponent="someIDOfSoftwareComponent1" --from $zb_account --yes)
462462
echo "$result"
463463
check_response "$result" "\"code\": 0"
464464

@@ -490,6 +490,7 @@ check_response "$result" "\"certificationRoute\": \"Full\""
490490
check_response "$result" "\"programType\": \"pType\""
491491
check_response "$result" "\"transport\": \"someTransport\""
492492
check_response "$result" "\"parentChild\": \"parent\""
493+
check_response "$result" "\"certificationIdOfSoftwareComponent\": \"someIDOfSoftwareComponent1\""
493494
echo "$result"
494495
###########################################################################################################################################
495496

@@ -510,7 +511,7 @@ check_response "$result" "\"code\": 0"
510511

511512
# ADD CERTIFY MODEL WITH SOME OPTIONAL FIELDS
512513
echo "Certify Model with VID: $vid PID: $pid SV: ${sv} with zigbee certification"
513-
result=$(echo "$passphrase" | dcld tx compliance certify-model --vid=$vid --pid=$pid --softwareVersion=$sv --softwareVersionString=$svs --certificationType="$certification_type_zb" --certificationDate="$certification_date" --cdCertificateId="$cd_certificate_id" --programTypeVersion="2.0" --familyId="someFID2" --supportedClusters="someClusters2" --compliantPlatformUsed="ETHERNET" --compliantPlatformVersion="V2" --from $zb_account --yes)
514+
result=$(echo "$passphrase" | dcld tx compliance certify-model --vid=$vid --pid=$pid --softwareVersion=$sv --softwareVersionString=$svs --certificationType="$certification_type_zb" --certificationDate="$certification_date" --cdCertificateId="$cd_certificate_id" --programTypeVersion="2.0" --familyId="someFID2" --supportedClusters="someClusters2" --compliantPlatformUsed="ETHERNET" --compliantPlatformVersion="V2" --certificationIDOfSoftwareComponent="someIDOfSoftwareComponent2" --from $zb_account --yes)
514515
echo "$result"
515516
check_response "$result" "\"code\": 0"
516517

@@ -541,6 +542,7 @@ check_response "$result" "\"certificationRoute\": \"Full\""
541542
check_response "$result" "\"programType\": \"pType\""
542543
check_response "$result" "\"transport\": \"someTransport\""
543544
check_response "$result" "\"parentChild\": \"parent\""
545+
check_response "$result" "\"certificationIdOfSoftwareComponent\": \"someIDOfSoftwareComponent2\""
544546
echo "$result"
545547

546548
# GET DEVICE SOFTWARE COMPLIANCE
@@ -563,6 +565,7 @@ check_response "$result" "\"certificationRoute\": \"Full\""
563565
check_response "$result" "\"programType\": \"pType\""
564566
check_response "$result" "\"transport\": \"someTransport\""
565567
check_response "$result" "\"parentChild\": \"parent\""
568+
check_response "$result" "\"certificationIdOfSoftwareComponent\": \"someIDOfSoftwareComponent2\""
566569
echo "$result"
567570
###########################################################################################################################################
568571

integration_tests/constants/constants.go

+19-18
Original file line numberDiff line numberDiff line change
@@ -96,24 +96,25 @@ var (
9696
Time3 int64 = 1645809278
9797

9898
// Compliance.
99-
ProvisionalDate = "2019-12-12T00:00:00Z"
100-
CertificationDate = "2020-01-01T00:00:00Z"
101-
RevocationDate = "2020-03-03T03:30:00Z"
102-
Reason = "Some Reason"
103-
RevocationReason = "Some Reason"
104-
CertificationType = "zigbee"
105-
CDCertificateID = "15DEXF"
106-
FamilyID = "Some Family ID"
107-
SupportedClusters = "Some Supported Clusters"
108-
CompliantPlatformUsed = "Some Compliance Platform Used"
109-
CompliantPlatformVersion = "Some Compliance Platform Version"
110-
OSVersion = "Some OS Version"
111-
CertificationRoute = "Some Certification Route"
112-
ProgramType = "Some Program Type"
113-
ProgramTypeVersion = "Some Program Type Version"
114-
Transport = "Some Transport"
115-
ParentChild1 = "parent"
116-
ParentChild2 = "child"
99+
ProvisionalDate = "2019-12-12T00:00:00Z"
100+
CertificationDate = "2020-01-01T00:00:00Z"
101+
RevocationDate = "2020-03-03T03:30:00Z"
102+
Reason = "Some Reason"
103+
RevocationReason = "Some Reason"
104+
CertificationType = "zigbee"
105+
CDCertificateID = "15DEXF"
106+
FamilyID = "Some Family ID"
107+
SupportedClusters = "Some Supported Clusters"
108+
CompliantPlatformUsed = "Some Compliance Platform Used"
109+
CompliantPlatformVersion = "Some Compliance Platform Version"
110+
OSVersion = "Some OS Version"
111+
CertificationRoute = "Some Certification Route"
112+
ProgramType = "Some Program Type"
113+
ProgramTypeVersion = "Some Program Type Version"
114+
Transport = "Some Transport"
115+
ParentChild1 = "parent"
116+
ParentChild2 = "child"
117+
CertificationIDOfSoftwareComponent = "some certification ID of software component"
117118

118119
// Testing Result.
119120
TestResult = "http://test.result.com"

0 commit comments

Comments
 (0)