Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model bgpsrte restruct #172

Merged
merged 18 commits into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
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
1,036 changes: 993 additions & 43 deletions artifacts/openapi.yaml

Large diffs are not rendered by default.

920 changes: 884 additions & 36 deletions artifacts/otg.proto

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions device/bgp/bgp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,15 @@ components:
type: array
items:
$ref: './bgpv6routerange.yaml#/components/schemas/Bgp.V6RouteRange'
v4_srte_policies:
description: >-
Segment Routing Traffic Engineering (SR TE) Policy for IPv4 Address Family Identifier (AFI).
SuryyaKrJana marked this conversation as resolved.
Show resolved Hide resolved
type: array
items:
$ref: './bgpsrtev4policy.yaml#/components/schemas/BgpSrte.V4Policy'
v6_srte_policies:
description: >-
Segment Routing Traffic Engineering (SR TE) Policy for IPv6 Address Family Identifier (AFI).
SuryyaKrJana marked this conversation as resolved.
Show resolved Hide resolved
type: array
items:
$ref: './bgpsrtev6policy.yaml#/components/schemas/BgpSrte.V6Policy'
55 changes: 55 additions & 0 deletions device/bgp/bgpextcommunity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
components:
schemas:
Bgp.ExtCommunity:
description: >-
The Extended Communities Attribute is a transitive optional BGP
attribute, with the Type Code 16. Community and Extended Communities
attributes to trigger routing decisions, such as acceptance, rejection,
preference, or redistribution. An extended community is an 8-Bytes value.
It is also divided into two main parts. The first 2 Bytes of the community
encode a type and sub-type fields and the last 6 Bytes carry a unique set of data in a
format defined by the type and sub-type field. Extended communities provide a larger
range for grouping or categorizing communities.
type: object
properties:
type:
description: |-
Extended Community Type field of 1 Byte.
- administrator_as_2octet: Two-Octet AS Specific Extended Community (RFC 4360).
- administrator_ipv4_address: IPv4 Address Specific Extended Community (RFC 4360).
- administrator_as_4octet: 4-Octet AS Specific Extended Community (RFC 5668).
- opaque: Opaque Extended Community (RFC 7432).
- evpn: EVPN Extended Community (RFC 7153).
- administrator_as_2octet_link_bandwidth : Link Bandwidth Extended Community (RFC 7153).
type: string
enum:
- administrator_as_2octet
- administrator_ipv4_address
- administrator_as_4octet
- opaque
- evpn
- administrator_as_2octet_link_bandwidth
subtype:
description: |-
Extended Community Sub Type field of 1 Byte.
- route_target: Route Target.
- origin: Origin.
- extended_bandwidth: Specifies the link bandwidth.
- color: Specifies the color value.
- encapsulation: Specifies the Encapsulation Extended Community.
- mac_address: Specifies the Extended community MAC address.
type: string
enum:
- route_target
- origin
- extended_bandwidth
- color
- encapsulation
- mac_address
value:
description: >-
Extended Community value of 6 Bytes.
Example - for the Opaque type and Color subtype value can be
'0000000000c8' for the color value 200.
type: string
format: hex
32 changes: 32 additions & 0 deletions device/bgp/bgpsrteadvanced.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
components:
schemas:
BgpSrte.Advanced:
SuryyaKrJana marked this conversation as resolved.
Show resolved Hide resolved
description: >-
Configuration for advanced BGP SRTE settings.
type: object
properties:
origin:
description: >-
The origin value.
A null value implies this feature is not enabled.
SuryyaKrJana marked this conversation as resolved.
Show resolved Hide resolved
type: string
enum:
- igp
- egp
SuryyaKrJana marked this conversation as resolved.
Show resolved Hide resolved
multi_exit_discriminator:
description: >-
The Multi Exit Discriminator (MED) value.
A null value implies MED feature is not enabled.
type: integer
enable_local_preference:
description: >-
Enable inclusion of Local Preference attribute which is mandatory
for iBGP and optional for eBGP.
type: boolean
default: true
local_preference:
SuryyaKrJana marked this conversation as resolved.
Show resolved Hide resolved
description: >-
Local Preference attribute,
for iBGP peers to select the path for the traffic leaving the AS.
type: integer
default: 0
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ components:
schemas:
BgpSrte.BindingSubTlv:
description: >-
Configuration for BGP binding sub TLV settings.
Configuration for the binding SID sub-TLV.
This is used to signal the binding SID related information
of the SR Policy candidate path.
type: object
properties:
binding_sid_type:
description: >-
TBD
Type of the binding SID.
Supported types are "No Binding SID" or "Four Octets Sid" or "IPv6 SID".
type: string
enum:
- no_binding
Expand All @@ -16,35 +19,21 @@ components:
default: no_binding
four_octet_sid:
description: >-
TBD
SuryyaKrJana marked this conversation as resolved.
Show resolved Hide resolved
Binding SID is encoded in 4 octets.
type: integer
default: 0
bsid_as_mpls_label:
description: >-
Only valid if binding_sid_type is four_octet_sid
type: boolean
default: false
ipv6_sid:
description: >-
Only valid if binding_sid_type is ipv6_sid
IPv6 SID value.
type: string
format: ipv6
default: ::0
SuryyaKrJana marked this conversation as resolved.
Show resolved Hide resolved
s_flag:
description: >-
TBD
S-Flag encodes the "Specified-BSID-only" behavior.
type: boolean
default: false
i_flag:
description: >-
TBD
I-Flag encodes the "Drop Upon Invalid" behavior.
type: boolean
default: false
remaining_flag_bits:
description: >-
TBD
type: integer
minimum: 0
maximum: 63
default: 0

16 changes: 16 additions & 0 deletions device/bgp/bgpsrtepolicycolorsubtlv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
components:
schemas:
BgpSrte.ColorSubTlv:
description: >-
Configuration for the Policy Color attribute sub-TLV.
The Color sub-TLV MAY be used as a way to "color" the corresponding
Tunnel TLV. The Value field of the sub-TLV is eight octets long and
consists of a Color Extended Community. First two octets of its Value field are 0x030b as type and subtype of extended
community. Remaining six octets are are exposed to configure.
type: object
properties:
color:
description: >-
Six octet values. Example: 000000000064 for color value 100.
type: string
format: hex
16 changes: 16 additions & 0 deletions device/bgp/bgpsrtepolicynamesubtlv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
components:
schemas:
BgpSrte.PolicyNameSubTlv:
description: >-
Configuration for the Policy Name sub-TLV.
The Policy Name sub-TLV is used to attach a symbolic name
to the SR Policy candidate path.
type: object
properties:
policy_name:
description: >-
Symbolic name for the policy that should be a string
of printable ASCII characters, without a NULL terminator.
type: string
minimum: 1
maximum: 32
15 changes: 15 additions & 0 deletions device/bgp/bgpsrtepolicyprioritysubtlv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
components:
schemas:
BgpSrte.PolicyPrioritySubTlv:
description: >-
Configuration for the Policy Priority sub-TLV.
The Policy Priority to indicate the order in which the SR policies
are re-computed upon topological change.
type: object
properties:
policy_priority:
description: >-
One-octet Priority value.
type: integer
minimum: 0
maximum: 255
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ components:
schemas:
BgpSrte.PreferenceSubTlv:
description: >-
Configuration for BGP preference sub TLV settings.
Configuration for BGP preference sub TLV of the SR Policy candidate path.
type: object
properties:
preference:
description: >-
TBD
The preference value of the SR Policy candidate path.
type: integer
default: 0
Loading