Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
ceb8bc3
Add IS-IS SRv6 OTG model (RFC 9352)
SuryyaKrJana Apr 22, 2026
9cedf12
Update auto generated content
actions-user Apr 22, 2026
d578af0
Remove Flex-Algo specific Source Router ID sub-TLVs from SRv6 model
SuryyaKrJana Apr 22, 2026
7a915ed
Update auto generated content
actions-user Apr 22, 2026
3854115
Refactor prefix attribute flags into IsisSRv6.PrefixAttributes object
SuryyaKrJana Apr 22, 2026
c5b5701
Update auto generated content
actions-user Apr 22, 2026
702517a
changed compact structures
SuryyaKrJana Apr 22, 2026
a570f28
Merge branch 'isis-srv6-review' of https://github.com/open-traffic-ge…
SuryyaKrJana Apr 22, 2026
edc7c16
Update auto generated content
actions-user Apr 22, 2026
4a63209
review comment incorporation
SuryyaKrJana Apr 28, 2026
fcf8db3
Update auto generated content
actions-user Apr 28, 2026
f6d8994
Add SRv6 P0 model changes: routing_type, uSID container, My Local SID…
SuryyaKrJana May 4, 2026
6d86f44
Update auto generated content
actions-user May 4, 2026
dfc563c
IS-IS SRv6 OTG model RFC compliance and scope cleanup
SuryyaKrJana May 6, 2026
267e415
Update auto generated content
actions-user May 6, 2026
ad462a1
Remove x-reserved-field-uids from pre-release SRv6 schemas; revert MO…
SuryyaKrJana May 6, 2026
b88f890
Update auto generated content
actions-user May 6, 2026
def69ef
flow: add segment_routing_usid choice to Flow.Ipv6Routing (RFC 9800)
SuryyaKrJana May 7, 2026
cb6eb48
docs: add artifact commit rule to MODEL-GUIDE.md; revert auto-generat…
SuryyaKrJana May 7, 2026
7404261
Update auto generated content
actions-user May 7, 2026
5dd300b
Merge branch 'isis-srv6-review' of https://github.com/open-traffic-ge…
SuryyaKrJana May 7, 2026
79c4adc
Update auto generated content
actions-user May 7, 2026
0a91e38
flow: remove oam flag from SRH flags; renumber alert to uid 2
SuryyaKrJana May 7, 2026
3273777
Merge branch 'isis-srv6-review' of https://github.com/open-traffic-ge…
SuryyaKrJana May 7, 2026
856039b
Update auto generated content
actions-user May 7, 2026
ccba139
isis: add IsisSRv6.Msd schema; extend node capability and interface M…
SuryyaKrJana May 9, 2026
622ee99
Merge branch 'isis-srv6-review' of https://github.com/open-traffic-ge…
SuryyaKrJana May 9, 2026
8076e73
Update auto generated content
actions-user May 9, 2026
8b11ec2
made protected, alert,.. etc single value
SuryyaKrJana May 11, 2026
cbc40bf
Merge branch 'isis-srv6-review' of https://github.com/open-traffic-ge…
SuryyaKrJana May 11, 2026
80550b5
Update auto generated content
actions-user May 11, 2026
3eded20
incorporated some internal review comments
SuryyaKrJana May 11, 2026
2b00caf
Merge branch 'isis-srv6-review' of https://github.com/open-traffic-ge…
SuryyaKrJana May 11, 2026
942eb28
Update auto generated content
actions-user May 11, 2026
e76ce31
review comment incorporated for traffic
SuryyaKrJana May 11, 2026
111f493
Merge branch 'isis-srv6-review' of https://github.com/open-traffic-ge…
SuryyaKrJana May 11, 2026
fec2498
review comment incorporated for traffic
SuryyaKrJana May 11, 2026
5615c09
Update auto generated content
actions-user May 11, 2026
33065cd
review comments
SuryyaKrJana May 12, 2026
0b7c7f9
Merge branch 'isis-srv6-review' of https://github.com/open-traffic-ge…
SuryyaKrJana May 12, 2026
3c3c1cb
Update auto generated content
actions-user May 12, 2026
f81f0e0
flow/ipv6: add dst_usids for structured SRv6 uSID reduced-encapsulati…
SuryyaKrJana May 13, 2026
ccf0a69
Merge origin/isis-srv6-review; keep remote artifacts
SuryyaKrJana May 13, 2026
a98dae0
Update auto generated content
actions-user May 13, 2026
ca06926
merging from the master
SuryyaKrJana May 14, 2026
3870ed8
Update auto generated content
actions-user May 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ goclient
debug.log
*.pyc
__pycache__
.env
.env
.venv
116 changes: 115 additions & 1 deletion MODEL-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ This document describes the philosophy and the best practices to be followed whi
* [Modeling Best Practices](#modeling-best-practices)
* [Adding New APIs](#adding-new-apis)
* [Properties](#properties)
* [Object Presence vs. Enable Booleans](#object-presence-vs-enable-booleans)
* [Config Schemas vs. State/Result Schemas](#config-schemas-vs-stateresult-schemas)
* [Naming](#naming)
* [Cross-File References](#cross-file-references)
* [Keyword Limitations](#keyword-limitations)
* [Keyword Extensions](#keyword-extensions)
* [Descriptions](#descriptions)
* [Building & Validating](#building--validating)
* [Pull Requests](#pull-requests)

## Philosophy
Expand Down Expand Up @@ -47,13 +51,81 @@ This document describes the philosophy and the best practices to be followed whi

### Properties

* Don't expose a property if it must always be a particular value (eg. prefix length for loopback IP addresses).
* Dont expose a property if it must always be a particular value (eg. prefix length for loopback IP addresses).
* Give descriptive names to properties, so that it’s apparent what value it is supposed to hold. e.g. `port_names` vs `port`
* Choose sensible values for default, min and max.
* Do not assign defaults to properties for which holding a null value has a meaning.
* Do not mark properties are required if they can hold sensible default values.
* A property MUST NOT be both `required` AND have a `default` value. The build will reject it with a `TypeError`. If a default exists, the field is optional by definition.
* Use proper `x-status`.

#### Object Presence vs. Enable Booleans

* Do NOT add an `active`, `enable`, or `include_*` boolean alongside a `$ref` (object) field to control whether it is included. Object presence is self-describing: setting the field means "include it", omitting it means "do not include it". The boolean is redundant and adds API noise.

```yaml
# WRONG — include_sid_structure is redundant for a $ref field
include_sid_structure:
type: boolean
default: false
x-field-uid: 4
sid_structure:
$ref: ‘#/components/schemas/Foo.SidStructure’
x-field-uid: 5

# CORRECT — object presence is the gate
sid_structure:
$ref: ‘#/components/schemas/Foo.SidStructure’
x-field-uid: 4
```

* DO use an `include_*` boolean alongside a scalar field (integer, boolean, string) when the difference between "not advertised" and "advertised with value 0 / false" is meaningful. In these cases, the scalar’s default alone cannot communicate intent.

```yaml
# Correct — include boolean needed: max_sl=0 means "advertised as 0",
# while include_max_sl=false means "do not advertise this MSD type at all"
include_max_sl:
type: boolean
default: false
x-field-uid: 1
max_sl:
type: integer
format: uint32
default: 0
x-field-uid: 2
```

#### Config Schemas vs. State/Result Schemas

* **Config schemas** (under `device/` and related) represent configuration intent. They SHOULD have sensible `default` values on optional fields.

* **State/Result schemas** (under `result/`) represent values received or learned from the network. They MUST NOT have `default` values — absence of a field means it was not present in the received message; presence means it was received with that value.

* State schemas MUST NOT include `include_*` boolean controls. The presence of a field IS the indicator that it was received.

```yaml
# Config schema — include flags control advertisement; defaults set baseline
IsisFoo.NodeMsd:
properties:
include_max_sl:
type: boolean
default: false
x-field-uid: 1
max_sl:
type: integer
format: uint32
default: 0
x-field-uid: 2

# State schema — no include flags, no defaults; presence = received
IsisLsp.NodeMsd:
properties:
max_sl:
type: integer
format: uint32
x-field-uid: 1
```

### Naming

* `property names` MUST be snake_case.
Expand All @@ -73,6 +145,21 @@ This document describes the philosophy and the best practices to be followed whi

* `schema`
* top level `schema objects` should avoid properties as simple data types and strive to encapsulate those properties in an object to allow for future extensibility.
* Config schemas use `Protocol.Feature` namespace (e.g., `Isis.SegmentRouting`, `Bgp.V4Peer`).
* State/result schemas that represent received protocol data typically use a `ProtocolLsp.Feature` or `ProtocolState.Feature` namespace (e.g., `IsisLsp.SRv6Capability`, `BgpPeer.State`) to make the config vs. state distinction explicit.

#### Cross-File References

* When a schema in one YAML file references a schema defined in another YAML file within the same model, use a relative path `$ref`:

```yaml
srv6_locators:
type: array
items:
$ref: './srv6.yaml#/components/schemas/IsisSRv6.Locator'
```

* Within the same file, use the local `#/components/schemas/SchemaName` form.

### Keyword Limitations

Expand Down Expand Up @@ -401,6 +488,8 @@ The build script will enforce the following keyword conventions:
* They need to be unique (within the object), and once assigned can never be changed/re-used, even if the field itself is deprecated and eventually removed.
* They are required for maintaining protobuff backwards compatibility.
* Should follow protobuff [Assigning Field Numbers](https://developers.google.com/protocol-buffers/docs/proto3#assigning_field_numbers) conventions.
* On a development branch that has not yet been published/merged, UIDs may be renumbered when fields are added or removed during the design phase. Once a schema is published (merged to the main branch and released), UIDs are permanently frozen and renumbering is forbidden even on a new branch.
* When adding new fields to an existing published schema, always assign the next available UID — never fill gaps left by deprecated/removed fields.

* Use-Case : Adding a New Property to an Existing Object
* Adding a new property 'peer_name' to an existing object.
Expand Down Expand Up @@ -480,6 +569,31 @@ The build script will enforce the following keyword conventions:
* _"Number of times the session went from Up to Down state"_


## Building & Validating

* Always run the build after any YAML change to catch structural errors early.
* The build must be run with the virtual environment activated so that the code generator (`openapiart`) and the formatter (`black`) use the correct Python:

```bash
source .venv/Scripts/activate && python build.py # Windows (Git Bash / bash shell)
source .venv/bin/activate && python build.py # Linux / macOS
```

Running `python build.py` without activating the venv, or calling the venv Python directly (`.venv/Scripts/python.exe build.py`), can cause the `black` subprocess launched by `openapiart` to use a different Python installation and fail.

* A successful build produces updated artifacts under `artifacts/`. The following files from that directory are intentionally committed to git as part of a PR (they are the published API contract):
* `artifacts/openapi.yaml` — merged OpenAPI specification
* `artifacts/openapi.html` — rendered API documentation
* `artifacts/otg.proto` — protobuf service definition

* The following generated files under `artifacts/` MUST NOT be committed to git. They are large machine-generated outputs that are re-created locally by each developer on build:
* `artifacts/otg/otg.py` — generated Python SDK
* `artifacts/otg/otg_pb2.py` — generated protobuf Python bindings
* `artifacts/otg/otg_pb2_grpc.py` — generated gRPC Python bindings
* `artifacts/otg/__init__.py`

These files should be listed in `.gitignore` (or the equivalent) to prevent accidental commits.

## Pull Requests

* Describe use-case & list issue id in the PR.
Expand Down
12 changes: 6 additions & 6 deletions artifacts/openapi.html

Large diffs are not rendered by default.

Loading