Conversation
Creating BGP BMP yang OC path definitions
|
No major YANG version changes in commit ea00165 |
dplore
left a comment
There was a problem hiding this comment.
Please add a .spec.yml file to ensure our CI tools and website will check and build this model. For example:
https://github.com/openconfig/public/blob/master/release/models/acl/.spec.yml
| import openconfig-bgp { prefix oc-bgp; } | ||
| import openconfig-bgp-types { prefix oc-bgp-types; } | ||
| import openconfig-network-instance { prefix oc-netinst; } | ||
| import openconfig-inet-types { prefix oc-inet; } | ||
| import openconfig-extensions { prefix oc-ext; } | ||
| import openconfig-yang-types { prefix oc-yang; } |
There was a problem hiding this comment.
Run pyang to build the tree and you'll see a series of errors you can correct:
dloher@nettool:~$ python3 -m venv ~/venv
dloher@nettool:~$ source ~/venv/bin/activate
(venv) dloher@nettool:~$ pip install pyang
(venv) dloher@nettool:~$ pyang -f tree -p release/models/*/* > ~/bmp.tree
When the tree looks like what you want, you can add it to the comment in the description for everyone to see for easy review.
Here are the errors so far:
release/models/bgp/openconfig-bgp-bmp.yang:9: warning: imported module "openconfig-bgp" not used
release/models/bgp/openconfig-bgp-bmp.yang:10: warning: imported module "openconfig-bgp-types" not used
release/models/bgp/openconfig-bgp-bmp.yang:97: error: prefix "oc-types" is not defined (reported only once)
release/models/bgp/openconfig-bgp-bmp.yang:281: error: unexpected keyword "type"
release/models/bgp/openconfig-bgp-bmp.yang:330: error: "openconfig-bgp-bmp:stations" in the path for station-names at release/models/bgp/openconfig-bgp-bmp.yang:556 (at release/models/bgp/openconfig-bgp-bmp.yang:328) is not found
release/models/bgp/openconfig-bgp-bmp.yang:343: error: "openconfig-bgp-bmp:stations" in the path for station-names at release/models/bgp/openconfig-bgp-bmp.yang:556 (at release/models/bgp/openconfig-bgp-bmp.yang:341) is not found
release/models/bgp/openconfig-bgp-bmp.yang:381: error: grouping "bmp-afi-safis-top" not found in module "openconfig-bgp-bmp"
release/models/bgp/openconfig-bgp-bmp.yang:446: error: grouping name "bmp-config" is already defined at release/models/bgp/openconfig-bgp-bmp.yang:413
release/models/bgp/openconfig-bgp-bmp.yang:496: error: grouping "bmp-state" not found in module "openconfig-bgp-bmp"
release/models/bgp/openconfig-bgp-bmp.yang:501: error: grouping "bmp-afi-safis-top" not found in module "openconfig-bgp-bmp"
release/models/bgp/openconfig-bgp-bmp.yang:548: error: grouping "bmp-afi-safis-top" not found in module "openconfig-bgp-bmp"
There was a problem hiding this comment.
I ran this but i dont see any output , still checking.
:$ python3 -m venv oc-env$ source oc-env/bin/activate
:
:$ pip install pyang$ source oc-env/bin/activate
:
:~$ pyang -f tree -p release/models// > ~/bmp.tree
There was a problem hiding this comment.
Latest:
module: openconfig-bgp-bmp
+--rw bmp
+--rw config
| +--rw enabled? boolean
| +--rw connection-mode connection-mode-type
| +--rw local-address? oc-inet:ip-address
| +--rw local-port? oc-inet:port-number
| +--rw statistics-timeout? uint32
+--ro state
| +--ro enabled? boolean
| +--ro connection-mode connection-mode-type
| +--ro local-address? oc-inet:ip-address
| +--ro local-port? oc-inet:port-number
| +--ro statistics-timeout? uint32
+--rw tcp-keepalive
| +--rw config
| | +--rw idle-time? uint32
| | +--rw probe-count? uint8
| | +--rw probe-interval? uint32
| +--ro state
| +--ro idle-time? uint32
| +--ro probe-count? uint8
| +--ro probe-interval? uint32
+--rw stations
| +--rw station* [name]
| +--rw name -> ../config/name
| +--rw config
| | +--rw name? string
| | +--rw station-address oc-inet:ip-address
| | +--rw station-port? oc-inet:port-number
| | +--rw policy-type? route-monitoring-policy-type
| | +--rw exclude-non-eligible? boolean
| | +--rw exclude-non-feasible? boolean
| +--ro state
| | +--ro name? string
| | +--ro station-address oc-inet:ip-address
| | +--ro station-port? oc-inet:port-number
| | +--ro policy-type? route-monitoring-policy-type
| | +--ro exclude-non-eligible? boolean
| | +--ro exclude-non-feasible? boolean
| | +--ro connection-status? connection-status-type
| | +--ro uptime? uint64
| | +--ro flap-count? oc-yang:counter64
| | +--ro message-counters
| | +--ro total? oc-yang:counter64
| | +--ro tx-statistics? oc-yang:counter64
| | +--ro route-monitoring? oc-yang:counter64
| | +--ro peer-monitoring? oc-yang:counter64
| | +--ro route-mirroring? oc-yang:counter64
| +--rw afi-safis
| +--rw afi-safi* [afi-safi-name]
| +--rw afi-safi-name -> ../config/afi-safi-name
| +--rw config
| | +--rw afi-safi-name? identityref
| | +--rw enabled? boolean
| +--ro state
| +--ro afi-safi-name? identityref
| +--ro enabled? boolean
+--rw station-groups
| +--rw station-group* [name]
| +--rw name string
| +--rw config
| | +--rw station-names* -> ../../../stations/station/name
| +--ro state
| +--ro station-names* -> ../../../stations/station/name
+--rw afi-safis
+--rw afi-safi* [afi-safi-name]
+--rw afi-safi-name -> ../config/afi-safi-name
+--rw config
| +--rw afi-safi-name? identityref
| +--rw enabled? boolean
+--ro state
+--ro afi-safi-name? identityref
+--ro enabled? boolean
earies
left a comment
There was a problem hiding this comment.
Provided quick first pass - some overall comments
- Suggest looking at and providing reference implementations. There are various parameters not covered in this and would need to expand to accomodate. e.g. https://www.juniper.net/documentation/us/en/software/junos/cli-reference/topics/ref/statement/bmp-edit-routing-options.html
- Consider proper anchor points and NI relationships. Much of the OC modeling is often very loose allowing for combinations that are unrealistic or not supported so best to narrow that in
|
Also want to bring to attention some prior art/IETF modeling as reference/alignment. https://datatracker.ietf.org/doc/html/draft-ietf-grow-bmp-yang-05 |
|
Hi @vvlakshmanamurthy! Looking at the config, |
|
Discussed at OC Operators Meet Oct 07: (1) Seems like a lot of open comments; so, moving to waiting-for-author, |
Co-authored-by: Darren Loher <dloher@google.com>
Co-authored-by: Darren Loher <dloher@google.com>
Co-authored-by: Darren Loher <dloher@google.com>
Co-authored-by: Darren Loher <dloher@google.com>
Co-authored-by: Darren Loher <dloher@google.com>
Co-authored-by: Darren Loher <dloher@google.com>
Co-authored-by: Darren Loher <dloher@google.com>
vvlakshmanamurthy
left a comment
There was a problem hiding this comment.
updating a few comments. few more comments to resolve.
vvlakshmanamurthy
left a comment
There was a problem hiding this comment.
Only 2 comments left , will need to check with Darren.
addressed trailing white space
Adding bmp-afi-safi-config & bmp-afi-safis-top
Updated config
vvlakshmanamurthy
left a comment
There was a problem hiding this comment.
updating the config
|
For reference: @dplore module: openconfig-bgp-bmp |
Adding BMP to the bgp.spec.yml
vvlakshmanamurthy
left a comment
There was a problem hiding this comment.
Updated bgp.spec.yml
Adding yang/bgp/openconfig-bgp-bmp.yang
| list station-group { | ||
| key "name"; | ||
| leaf name { type string; } | ||
| container config { | ||
| leaf-list station-names { | ||
| type leafref { path "../../../stations/station/name"; } | ||
| } | ||
| } | ||
| container state { | ||
| config false; | ||
| leaf-list station-names { | ||
| type leafref { path "../../../stations/station/name"; } | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
| list station-group { | |
| key "name"; | |
| leaf name { type string; } | |
| container config { | |
| leaf-list station-names { | |
| type leafref { path "../../../stations/station/name"; } | |
| } | |
| } | |
| container state { | |
| config false; | |
| leaf-list station-names { | |
| type leafref { path "../../../stations/station/name"; } | |
| } | |
| } | |
| } | |
| } | |
| list station-group { | |
| key "name"; | |
| leaf name { | |
| type leafref { | |
| path "../config/name"; | |
| } | |
| description | |
| "references the station-group name key"; | |
| } | |
| container config { | |
| leaf name { | |
| type string; | |
| description "Name of the station-group." | |
| } | |
| leaf-list station-names { | |
| type leafref { path "../../../stations/station/name"; } | |
| } | |
| } | |
| container state { | |
| config false; | |
| leaf-list station-names { | |
| type leafref { path "../../../stations/station/name"; } | |
| } | |
| } | |
| } | |
| } |
Creating BGP BMP yang OC path definitions
[Note: Please fill out the following template for your pull request. lines
tagged with "Note" can be removed from the template.]
[Note: Before this PR can be reviewed please agree to the CLA covering this
repo. Please also review the contribution guide -
https://github.com/openconfig/public/blob/master/doc/contributions-guide.md]
Change Scope
Platform Implementations
implementation output.
implementation output.
[Note: Please provide at least two references to implementations which are relevant to the model changes proposed. Each implementation should be from separate organizations.].
[Note: If the feature being proposed is new - and something that is being
proposed as an enhancement to device functionality, it is sufficient to have
reviewers from the producers of two different implementations].