Skip to content

Commit 9f518fd

Browse files
committed
Merge
2 parents 00ad34c + 8f2937c commit 9f518fd

35 files changed

Lines changed: 428 additions & 171 deletions

File tree

CODING_AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ Before introducing new types, validators, formats, or storage conventions:
6969
- Strict typing everywhere; avoid `Dict`/`List`/`Tuple`/`Union` and avoid `Any`.
7070
- Prefer built-in generics (`dict[str, int]`, `list[str]`) and `A | B` rather than `Union`.
7171
- Prefer Pydantic `BaseModel` over dict returns for public interfaces.
72+
- Device-scoped API responses (top-level responses that include `mac_address`) must include a top-level `system_description` field using the parsed sysDescr model.
73+
- Do not omit `system_description` on device-scoped responses; when unavailable, return an empty sysDescr model rather than `null`.
7274
- `BaseModel` fields must be one-line `Field(...)` declarations with descriptions.
7375
- Avoid generic returns; every method must have an explicit return type annotation.
7476
- Every method argument must have an explicit type annotation.

demo/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ This will:
128128
- `mac_address``aa:bb:cc:dd:ee:ff`
129129
- `filename` → updated filename
130130
- `device_details.system_description` → generic demo values:
131+
- If canonical API response JSON is present, sanitize:
132+
- `device.mac_address``aa:bb:cc:dd:ee:ff`
133+
- `device.system_description` → generic demo values
134+
- Legacy top-level `system_description` is also sanitized when present
131135

132136
```json
133137
{

docs/api/fast-api/common/response.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,35 @@ Status Lookup: [Status Codes](../status/fast-api-status-codes.md)
88

99
```json
1010
{
11-
"mac_address": "aa:bb:cc:dd:ee:ff",
1211
"status": 0,
1312
"message": null,
13+
"device": {
14+
"mac_address": "aa:bb:cc:dd:ee:ff",
15+
"system_description": {
16+
"HW_REV": "",
17+
"VENDOR": "",
18+
"BOOTR": "",
19+
"SW_REV": "",
20+
"MODEL": "",
21+
"is_empty": true
22+
}
23+
},
1424
"data": []
1525
}
1626
```
1727

1828
> Some endpoints use `"results"` (object or array) instead of `"data"`. The chosen key is documented per-endpoint Guide.
29+
> `device` is the top-level device identity block.
1930
2031
## Fields
2132

2233
| Field | Type | Description |
2334
| ------------------ | --------------- | ----------------------------------------------------------------------- |
24-
| `mac_address` | string | Target CM MAC (any supported format; normalized internally). |
2535
| `status` | integer | Numeric result from `ServiceStatusCode` (see Status Codes link above). |
2636
| `message` | string or null | Optional human-readable message (`null` if not set). |
37+
| `device` | object | Canonical device identity block containing `mac_address` and `system_description`. |
38+
| `device.mac_address` | string | Target CM MAC (normalized internally). |
39+
| `device.system_description` | object | Parsed sysDescr model; empty model when sysDescr is unavailable. |
2740
| `data` / `results` | object or array | Endpoint-specific payload (may be an object or an array; may be empty). |
2841

2942
## PNM Header

docs/api/fast-api/single/ds/ofdm/channel-stats.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ TFTP parameters are not required.
1313

1414
## Response
1515

16-
This endpoint returns the standard envelope described in [Common → Response](../../../common/response.md) (`mac_address`, `status`, `message`, `data`).
16+
This endpoint returns the standard envelope described in [Common → Response](../../../common/response.md) (`status`, `message`, `device`, `data`).
17+
18+
`device` is the top-level device identity block and contains `device.mac_address` and `device.system_description` (empty model when unavailable).
1719

1820
`data` is an **array** of downstream OFDM channels. Each item contains the SNMP table `index`, the `channel_id`, and an `entry` with DS-OFDM configuration and statistics.
1921

docs/api/fast-api/single/ds/ofdm/profile-stats.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ TFTP parameters are not required.
2525

2626
## Response
2727

28-
This endpoint returns the standard envelope described in [Common → Response](../../../common/response.md) (`mac_address`, `status`, `message`, `data`).
28+
This endpoint returns the standard envelope described in [Common → Response](../../../common/response.md) (`status`, `message`, `device`, `data`).
29+
30+
`device` is the top-level device identity block and contains `device.mac_address` and `device.system_description` (empty model when unavailable).
2931
On success, `data` is an array of OFDM channels with per-profile counters.
3032

3133
### Abbreviated example

docs/api/fast-api/single/ds/scqam/channel-stats.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ TFTP parameters are not required.
1313

1414
## Response
1515

16-
This endpoint returns the standard envelope described in [Common → Response](../../../common/response.md) (`mac_address`, `status`, `message`, `data`).
16+
This endpoint returns the standard envelope described in [Common → Response](../../../common/response.md) (`status`, `message`, `device`, `data`).
17+
18+
`device` is the top-level device identity block and contains `device.mac_address` and `device.system_description` (empty model when unavailable).
1719

1820
### Abbreviated Example
1921

docs/api/fast-api/single/ds/scqam/cw-error-rate.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ TFTP parameters are not required for this measurement.
3636

3737
## Response
3838

39-
This endpoint returns the standard envelope described in [Common → Response](../../../common/response.md) (`mac_address`, `status`, `message`, `data`).
39+
This endpoint returns the standard envelope described in [Common → Response](../../../common/response.md) (`status`, `message`, `device`, `data`).
40+
41+
`device` is the top-level device identity block and contains `device.mac_address` and `device.system_description` (empty model when unavailable).
4042

4143
The `data` field is an array of per-channel codeword error summaries for each detected downstream SC-QAM channel.
4244

docs/api/fast-api/single/fdd/fdd-diplexer-band-edge-cap.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ TFTP parameters are not required.
1313

1414
## Response
1515

16-
This endpoint returns the standard envelope described in [Common → Response](../../common/response.md) (`mac_address`, `status`, `message`, `data`).
16+
This endpoint returns the standard envelope described in [Common → Response](../../common/response.md) (`status`, `message`, `device`, `data`).
17+
18+
`device` is the top-level device identity block and contains `device.mac_address` and `device.system_description` (empty model when unavailable).
1719

1820
`data` is an **array** of capability sets. Each item contains a capability `index` and an `entry` with the upstream upper, downstream lower, and downstream upper diplexer band-edge frequencies (in MHz).
1921

docs/api/fast-api/single/fdd/fdd-system-diplexer-configuration.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ TFTP parameters are not required.
1313

1414
## Response
1515

16-
This endpoint returns the standard envelope described in [Common → Response](../../common/response.md) (`mac_address`, `status`, `message`, `data`).
16+
This endpoint returns the standard envelope described in [Common → Response](../../common/response.md) (`status`, `message`, `device`, `data`).
17+
18+
`device` is the top-level device identity block and contains `device.mac_address` and `device.system_description` (empty model when unavailable).
1719

1820
`data` is an **object** with the SNMP `index` and an `entry` containing the configured band-edge frequencies (MHz).
1921

docs/api/fast-api/single/general/diplexer-configuration.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ TFTP parameters are not required.
1313

1414
## Response
1515

16-
This endpoint returns the standard envelope described in [Common → Response](../../common/response.md) (`mac_address`, `status`, `message`, `data`).
16+
This endpoint returns the standard envelope described in [Common → Response](../../common/response.md) (`status`, `message`, `device`, `data`).
17+
18+
`device` is the top-level device identity block and contains `device.mac_address` and `device.system_description` (empty model when unavailable).
1719

1820
### Abbreviated Example
1921

0 commit comments

Comments
 (0)