Skip to content

Commit

Permalink
Merge pull request #381 from abdulla-ashurov/issue-777
Browse files Browse the repository at this point in the history
Add a new flag `Certification ID of Software Component` to the `Compliance` scheme
  • Loading branch information
ashcherbakov committed Jul 5, 2022
2 parents e6d805c + a22c9fb commit 6e3647e
Show file tree
Hide file tree
Showing 61 changed files with 1,185 additions and 840 deletions.
20 changes: 20 additions & 0 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ paths:
type: string
parentChild:
type: string
certificationIdOfSoftwareComponent:
type: string
pagination:
type: object
properties:
Expand Down Expand Up @@ -478,6 +480,8 @@ paths:
type: string
parentChild:
type: string
certificationIdOfSoftwareComponent:
type: string
default:
description: An unexpected error response.
schema:
Expand Down Expand Up @@ -606,6 +610,8 @@ paths:
type: string
parentChild:
type: string
certificationIdOfSoftwareComponent:
type: string
pagination:
type: object
properties:
Expand Down Expand Up @@ -796,6 +802,8 @@ paths:
type: string
parentChild:
type: string
certificationIdOfSoftwareComponent:
type: string
default:
description: An unexpected error response.
schema:
Expand Down Expand Up @@ -14027,6 +14035,8 @@ definitions:
type: string
parentChild:
type: string
certificationIdOfSoftwareComponent:
type: string
zigbeealliance.distributedcomplianceledger.compliance.DeviceSoftwareCompliance:
type: object
properties:
Expand Down Expand Up @@ -14099,6 +14109,8 @@ definitions:
type: string
parentChild:
type: string
certificationIdOfSoftwareComponent:
type: string
zigbeealliance.distributedcomplianceledger.compliance.ProvisionalModel:
type: object
properties:
Expand Down Expand Up @@ -14231,6 +14243,8 @@ definitions:
type: string
parentChild:
type: string
certificationIdOfSoftwareComponent:
type: string
pagination:
type: object
properties:
Expand Down Expand Up @@ -14333,6 +14347,8 @@ definitions:
type: string
parentChild:
type: string
certificationIdOfSoftwareComponent:
type: string
pagination:
type: object
properties:
Expand Down Expand Up @@ -14537,6 +14553,8 @@ definitions:
type: string
parentChild:
type: string
certificationIdOfSoftwareComponent:
type: string
zigbeealliance.distributedcomplianceledger.compliance.QueryGetDeviceSoftwareComplianceResponse:
type: object
properties:
Expand Down Expand Up @@ -14612,6 +14630,8 @@ definitions:
type: string
parentChild:
type: string
certificationIdOfSoftwareComponent:
type: string
zigbeealliance.distributedcomplianceledger.compliance.QueryGetProvisionalModelResponse:
type: object
properties:
Expand Down
10 changes: 6 additions & 4 deletions docs/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ from the revocation list.
- programType `optional(string)` - optional field describing the program type
- programTypeVersion `optional(string)` - optional field describing the program type version
- transport `optional(string)` - optional field describing the transport
- parentChild `optional(string)` - optional field describing the parent/child - Currently 'parent' and 'child' types are supported.
- parentChild `optional(string)` - optional field describing the parent/child - Currently 'parent' and 'child' types are supported
- certificationIDOfSoftwareComponent `optional(string)` - optional field describing the certification ID of software component
- In State:
- `compliance/ComplianceInfo/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
- `compliance/CertifiedModel/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
Expand All @@ -438,7 +439,7 @@ from the revocation list.
- CLI command:
- `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>`
- CLI command full:
- `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>`
- `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>`

#### REVOKE_MODEL_CERTIFICATION

Expand Down Expand Up @@ -497,7 +498,8 @@ Can not be set if there is already a certification record on the ledger (certifi
- programType `optional(string)` - optional field describing the program type
- programTypeVersion `optional(string)` - optional field describing the program type version
- transport `optional(string)` - optional field describing the transport
- parentChild `optional(string)` - optional field describing the parent/child - Currently 'parent' and 'child' types are supported.
- parentChild `optional(string)` - optional field describing the parent/child - Currently 'parent' and 'child' types are supported
- certificationIDOfSoftwareComponent `optional(string)` - optional field describing the certification ID of software component
- In State:
- `compliance/ComplianceInfo/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
- `compliance/ProvisionalModel/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
Expand All @@ -506,7 +508,7 @@ Can not be set if there is already a certification record on the ledger (certifi
- CLI command:
- `dcld tx compliance provision-model --vid=<uint16> --pid=<uint16> --softwareVersion=<uint32> --certificationType=<matter|zigbee|access control|product security> --provisionalDate=<rfc3339 encoded date> --from=<account>`
- CLI command full:
- `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>`
- `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>`

#### GET_CERTIFIED_MODEL

Expand Down
4 changes: 3 additions & 1 deletion integration_tests/cli/compliance-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ test_divider

# ADD CERTIFY MODEL WITH ALL OPTIONAL FIELDS
echo "Certify Model with VID: $vid PID: $pid SV: ${sv} with zigbee certification"
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)
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)
echo "$result"
check_response "$result" "\"code\": 0"

Expand Down Expand Up @@ -577,6 +577,7 @@ check_response "$result" "\"certificationRoute\": \"Full\""
check_response "$result" "\"programType\": \"pType\""
check_response "$result" "\"transport\": \"someTransport\""
check_response "$result" "\"parentChild\": \"parent\""
check_response "$result" "\"certificationIdOfSoftwareComponent\": \"someIDOfSoftwareComponent\""
echo "$result"

test_divider
Expand All @@ -600,6 +601,7 @@ check_response "$result" "\"certificationRoute\": \"Full\""
check_response "$result" "\"programType\": \"pType\""
check_response "$result" "\"transport\": \"someTransport\""
check_response "$result" "\"parentChild\": \"parent\""
check_response "$result" "\"certificationIdOfSoftwareComponent\": \"someIDOfSoftwareComponent\""
echo "$result"
###########################################################################################################################################

Expand Down
7 changes: 5 additions & 2 deletions integration_tests/cli/compliance-provisioning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ test_divider

# ADD PROVISION MODEL WITH ALL OPTIONAL FIELDS
echo "Provision Model with VID: $vid PID: $pid SV: ${sv} with zigbee certification"
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)
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)
echo "$result"
check_response "$result" "\"code\": 0"

Expand Down Expand Up @@ -490,6 +490,7 @@ check_response "$result" "\"certificationRoute\": \"Full\""
check_response "$result" "\"programType\": \"pType\""
check_response "$result" "\"transport\": \"someTransport\""
check_response "$result" "\"parentChild\": \"parent\""
check_response "$result" "\"certificationIdOfSoftwareComponent\": \"someIDOfSoftwareComponent1\""
echo "$result"
###########################################################################################################################################

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

# ADD CERTIFY MODEL WITH SOME OPTIONAL FIELDS
echo "Certify Model with VID: $vid PID: $pid SV: ${sv} with zigbee certification"
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)
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)
echo "$result"
check_response "$result" "\"code\": 0"

Expand Down Expand Up @@ -541,6 +542,7 @@ check_response "$result" "\"certificationRoute\": \"Full\""
check_response "$result" "\"programType\": \"pType\""
check_response "$result" "\"transport\": \"someTransport\""
check_response "$result" "\"parentChild\": \"parent\""
check_response "$result" "\"certificationIdOfSoftwareComponent\": \"someIDOfSoftwareComponent2\""
echo "$result"

# GET DEVICE SOFTWARE COMPLIANCE
Expand All @@ -563,6 +565,7 @@ check_response "$result" "\"certificationRoute\": \"Full\""
check_response "$result" "\"programType\": \"pType\""
check_response "$result" "\"transport\": \"someTransport\""
check_response "$result" "\"parentChild\": \"parent\""
check_response "$result" "\"certificationIdOfSoftwareComponent\": \"someIDOfSoftwareComponent2\""
echo "$result"
###########################################################################################################################################

Expand Down
37 changes: 19 additions & 18 deletions integration_tests/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,25 @@ var (
Time3 int64 = 1645809278

// Compliance.
ProvisionalDate = "2019-12-12T00:00:00Z"
CertificationDate = "2020-01-01T00:00:00Z"
RevocationDate = "2020-03-03T03:30:00Z"
Reason = "Some Reason"
RevocationReason = "Some Reason"
CertificationType = "zigbee"
CDCertificateID = "15DEXF"
FamilyID = "Some Family ID"
SupportedClusters = "Some Supported Clusters"
CompliantPlatformUsed = "Some Compliance Platform Used"
CompliantPlatformVersion = "Some Compliance Platform Version"
OSVersion = "Some OS Version"
CertificationRoute = "Some Certification Route"
ProgramType = "Some Program Type"
ProgramTypeVersion = "Some Program Type Version"
Transport = "Some Transport"
ParentChild1 = "parent"
ParentChild2 = "child"
ProvisionalDate = "2019-12-12T00:00:00Z"
CertificationDate = "2020-01-01T00:00:00Z"
RevocationDate = "2020-03-03T03:30:00Z"
Reason = "Some Reason"
RevocationReason = "Some Reason"
CertificationType = "zigbee"
CDCertificateID = "15DEXF"
FamilyID = "Some Family ID"
SupportedClusters = "Some Supported Clusters"
CompliantPlatformUsed = "Some Compliance Platform Used"
CompliantPlatformVersion = "Some Compliance Platform Version"
OSVersion = "Some OS Version"
CertificationRoute = "Some Certification Route"
ProgramType = "Some Program Type"
ProgramTypeVersion = "Some Program Type Version"
Transport = "Some Transport"
ParentChild1 = "parent"
ParentChild2 = "child"
CertificationIDOfSoftwareComponent = "some certification ID of software component"

// Testing Result.
TestResult = "http://test.result.com"
Expand Down
Loading

0 comments on commit 6e3647e

Please sign in to comment.