Files
ols-ucentral-client/tests/config-parser/property-database-platform-example.c
Mike Hansen 04edeb90e4 [OLS-915] Schema-based property generation and platform testing │
Schema-based property database:                                                                                                                                                    │
- Extract 398 properties from schema (vs config files)                                                                                                                             │
- Generate base DB (proto.c: 102 found, 296 unimplemented)                                                                                                                         │
- Generate platform DB (plat-gnma.c: 141 found, 257 unimplemented)                                                                                                                 │
- Support JSON schema (included) and YAML (external repo)                                                                                                                          │

Platform testing framework:                                                                                                                                                        │
- Stub hardware layer (gNMI/gNOI), test real platform logic                                                                                                                        │
- Dual tracking: base parsing + platform application                                                                                                                               │
- Platform mocks for brcm-sonic and example platforms                                                                                                                              │

Changes:                                                                                                                                                                           │
- New: extract-schema-properties.py (JSON/YAML support)                                                                                                                            │
- New: generate-database-from-schema.py, generate-platform-database-from-schema.py                                                                                                 │
- New: Platform mocks and property databases                                                                                                                                       │
- Remove: 4 legacy config-based generation tools                                                                                                                                   │
- Remove: unused ucentral.schema.full.json                                                                                                                                         │
- Update: Simplified fetch-schema.sh, updated MAINTENANCE.md                                                                                                                       │

Tests: 24/24 pass (stub and platform modes)

Signed-off-by: Mike Hansen <mike.hansen@netexperience.com>
2026-01-05 10:00:54 -05:00

26 lines
1.0 KiB
C

/* Platform-specific property database template
*
* Copy this file to property-database-platform-YOUR_PLATFORM.c
* and regenerate with your platform code.
*
* This database tracks properties parsed by platform-specific code in:
* - platform/your-platform/plat-*.c
*
* To regenerate this database:
* cd tests/tools
* python3 rebuild-property-database.py \
* ../../src/ucentral-client/platform/your-platform/plat-*.c \
* ../../config-samples/cfg*.json \
* > ../config-parser/property-database-platform-your-platform.c
*/
static const struct property_metadata platform_property_database_example[] = {
/* Platform-specific properties go here */
/* Example entries:
* {"services.custom-feature.enabled", PROP_CONFIGURED, "platform/example/plat-example.c", "config_custom_apply", 100, ""},
* {"ethernet[].vendor-specific", PROP_CONFIGURED, "platform/example/plat-example.c", "config_port_vendor_apply", 200, ""},
*/
{NULL, 0, NULL, NULL, 0, NULL} /* Terminator */
};