diff --git a/yang/coreswitch.yang b/yang/coreswitch.yang index 8cd66db..8c1eed0 100644 --- a/yang/coreswitch.yang +++ b/yang/coreswitch.yang @@ -330,6 +330,62 @@ module coreswitch { } } } + list localsid { /* update based on draft-raza-spring-srv6-yang */ + key "prefix"; + leaf prefix { + type inet:ipv6-prefix; + } + list nexthop { + key "address"; + leaf "address" { + type inet:ipv6-address; + } + list action { + key "action-type"; + leaf action-type { + type enumeration { + enum End; + enum End.X; + enum End.T; + enum End.DX2; + enum End.DX6; + enum End.DX4; + enum End.DT6; + enum End.B6; + enum End.B6.Encaps; + } + } + leaf-list segments { + when "../action-type = 'End.B6' || ../action-type = 'End.B6.Encaps'"; + type inet:ipv6-address; + /* mandatory true; */ + } + leaf nh6 { + when "../action-type = 'End.X' || ../action-type = 'End.DX6'"; + type inet:ipv6-address; + /* mandatory true; */ + } + leaf table { + when "../action-type = 'End.T' || ../action-type = 'End.DT6'"; + type uint8 { + range 1..255; + } + /* mandatory true; */ + } + leaf oif { + when "../action-type = 'End.DX2'"; + type string; + /* mandatory true; */ + description "Output interface name"; + } + leaf nh4 { + when "../action-type = 'End.DX4'"; + type inet:ipv4-address; + /* mandatory true; */ + } + } + } + } } leaf nexthop-walker { type empty;