Skip to content

Commit

Permalink
Fix RemoveFabric responses to follow the spec. (#14688)
Browse files Browse the repository at this point in the history
* Fix RemoveFabric to follow the spec.

It should be returning a NOCResponse, not a status.

* Address review comments.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Nov 8, 2023
1 parent 0794d5f commit 1586402
Show file tree
Hide file tree
Showing 42 changed files with 364 additions and 3,657 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2333,7 +2333,7 @@ server cluster OnOffSwitchConfiguration = 7 {
}

server cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -2394,7 +2394,7 @@ server cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct RemoveTrustedRootCertificateRequest {
Expand All @@ -2420,9 +2420,9 @@ server cluster OperationalCredentials = 62 {
}

response struct NOCResponse {
INT8U statusCode = 0;
INT8U fabricIndex = 1;
CHAR_STRING debugText = 2;
OperationalCertStatus statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional CHAR_STRING debugText = 2;
}

response struct OpCSRResponse {
Expand Down
10 changes: 5 additions & 5 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ server cluster OnOff = 6 {
}

server cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -733,7 +733,7 @@ server cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct RemoveTrustedRootCertificateRequest {
Expand All @@ -759,9 +759,9 @@ server cluster OperationalCredentials = 62 {
}

response struct NOCResponse {
INT8U statusCode = 0;
INT8U fabricIndex = 1;
CHAR_STRING debugText = 2;
OperationalCertStatus statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional CHAR_STRING debugText = 2;
}

response struct OpCSRResponse {
Expand Down
10 changes: 5 additions & 5 deletions examples/door-lock-app/door-lock-common/door-lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ server cluster NetworkCommissioning = 49 {
}

server cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -1095,7 +1095,7 @@ server cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct RemoveTrustedRootCertificateRequest {
Expand All @@ -1121,9 +1121,9 @@ server cluster OperationalCredentials = 62 {
}

response struct NOCResponse {
INT8U statusCode = 0;
INT8U fabricIndex = 1;
CHAR_STRING debugText = 2;
OperationalCertStatus statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional CHAR_STRING debugText = 2;
}

response struct OpCSRResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ client cluster OnOff = 6 {
}

server cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -1073,7 +1073,7 @@ server cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct RemoveTrustedRootCertificateRequest {
Expand All @@ -1099,9 +1099,9 @@ server cluster OperationalCredentials = 62 {
}

response struct NOCResponse {
INT8U statusCode = 0;
INT8U fabricIndex = 1;
CHAR_STRING debugText = 2;
OperationalCertStatus statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional CHAR_STRING debugText = 2;
}

response struct OpCSRResponse {
Expand Down
10 changes: 5 additions & 5 deletions examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ server cluster OnOffSwitchConfiguration = 7 {
}

server cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -1233,7 +1233,7 @@ server cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct RemoveTrustedRootCertificateRequest {
Expand All @@ -1259,9 +1259,9 @@ server cluster OperationalCredentials = 62 {
}

response struct NOCResponse {
INT8U statusCode = 0;
INT8U fabricIndex = 1;
CHAR_STRING debugText = 2;
OperationalCertStatus statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional CHAR_STRING debugText = 2;
}

response struct OpCSRResponse {
Expand Down
10 changes: 5 additions & 5 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ server cluster OnOff = 6 {
}

server cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -589,7 +589,7 @@ server cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct RemoveTrustedRootCertificateRequest {
Expand All @@ -615,9 +615,9 @@ server cluster OperationalCredentials = 62 {
}

response struct NOCResponse {
INT8U statusCode = 0;
INT8U fabricIndex = 1;
CHAR_STRING debugText = 2;
OperationalCertStatus statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional CHAR_STRING debugText = 2;
}

response struct OpCSRResponse {
Expand Down
10 changes: 5 additions & 5 deletions examples/log-source-app/log-source-common/log-source-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ server cluster NetworkCommissioning = 49 {
}

server cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -342,7 +342,7 @@ server cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct UpdateFabricLabelRequest {
Expand All @@ -359,9 +359,9 @@ server cluster OperationalCredentials = 62 {
}

response struct NOCResponse {
INT8U statusCode = 0;
INT8U fabricIndex = 1;
CHAR_STRING debugText = 2;
OperationalCertStatus statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional CHAR_STRING debugText = 2;
}

response struct OpCSRResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ server cluster OtaSoftwareUpdateProvider = 41 {
}

server cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -451,7 +451,7 @@ server cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct UpdateFabricLabelRequest {
Expand All @@ -468,9 +468,9 @@ server cluster OperationalCredentials = 62 {
}

response struct NOCResponse {
INT8U statusCode = 0;
INT8U fabricIndex = 1;
CHAR_STRING debugText = 2;
OperationalCertStatus statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional CHAR_STRING debugText = 2;
}

response struct OpCSRResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 {
}

server cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -495,7 +495,7 @@ server cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct RemoveTrustedRootCertificateRequest {
Expand All @@ -521,9 +521,9 @@ server cluster OperationalCredentials = 62 {
}

response struct NOCResponse {
INT8U statusCode = 0;
INT8U fabricIndex = 1;
CHAR_STRING debugText = 2;
OperationalCertStatus statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional CHAR_STRING debugText = 2;
}

response struct OpCSRResponse {
Expand Down
14 changes: 7 additions & 7 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ server cluster OnOff = 6 {
}

client cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -618,7 +618,7 @@ client cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct RemoveTrustedRootCertificateRequest {
Expand Down Expand Up @@ -646,7 +646,7 @@ client cluster OperationalCredentials = 62 {
}

server cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -700,7 +700,7 @@ server cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct RemoveTrustedRootCertificateRequest {
Expand All @@ -726,9 +726,9 @@ server cluster OperationalCredentials = 62 {
}

response struct NOCResponse {
INT8U statusCode = 0;
INT8U fabricIndex = 1;
CHAR_STRING debugText = 2;
OperationalCertStatus statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional CHAR_STRING debugText = 2;
}

response struct OpCSRResponse {
Expand Down
14 changes: 7 additions & 7 deletions examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ server cluster OnOff = 6 {
}

client cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -618,7 +618,7 @@ client cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct RemoveTrustedRootCertificateRequest {
Expand Down Expand Up @@ -646,7 +646,7 @@ client cluster OperationalCredentials = 62 {
}

server cluster OperationalCredentials = 62 {
enum NodeOperationalCertStatus : ENUM8 {
enum OperationalCertStatus : ENUM8 {
kSuccess = 0;
kInvalidPublicKey = 1;
kInvalidNodeOpId = 2;
Expand Down Expand Up @@ -700,7 +700,7 @@ server cluster OperationalCredentials = 62 {
}

request struct RemoveFabricRequest {
INT8U fabricIndex = 0;
fabric_idx fabricIndex = 0;
}

request struct RemoveTrustedRootCertificateRequest {
Expand All @@ -726,9 +726,9 @@ server cluster OperationalCredentials = 62 {
}

response struct NOCResponse {
INT8U statusCode = 0;
INT8U fabricIndex = 1;
CHAR_STRING debugText = 2;
OperationalCertStatus statusCode = 0;
optional fabric_idx fabricIndex = 1;
optional CHAR_STRING debugText = 2;
}

response struct OpCSRResponse {
Expand Down
Loading

0 comments on commit 1586402

Please sign in to comment.