module bgp-message { yang-version 1; namespace "urn:opendaylight:params:xml:ns:yang:bgp-message"; prefix "bgp-msg"; import ietf-inet-types { prefix inet; revision-date 2010-09-24; } organization "Cisco Systems, Inc."; contact "Dana Kutenicsova "; description "This module contains the base data model of a BGP message. It rolls up the definitions contained in RFC4271 and RFC4893. Copyright (c)2013 Cisco Systems, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html"; revision "2013-09-18" { description "Initial revision."; reference "RFC4271, RFC4893"; } typedef origin-value { reference "http://tools.ietf.org/html/rfc4271#section-5"; type enumeration { enum igp { value 0; } enum egp { value 1; } enum incomplete { value 2; } } } typedef protocol-version { type uint8 { range 1..7; } } typedef as-number { type uint32; } grouping as-path-segment { choice segment { case a-set { leaf-list as-set { type as-number; } } case a-list { list as-sequence { container sequence { leaf as { type as-number; } } } } mandatory true; } } notification open { description "Open Message"; reference "http://tools.ietf.org/html/rfc4271#section-4.2"; leaf version { type protocol-version; default 4; } leaf my-as-number { type uint16; default 23456; } leaf hold-timer { type uint16; mandatory true; } leaf bgp-identifier { type inet:ipv4-address; mandatory true; } list optional-parameters { reference "http://tools.ietf.org/html/rfc3392#section-4"; choice parameters { container as4-bytes { reference "http://tools.ietf.org/html/rfc6793"; leaf as-number { type as-number; } } } } } notification update { description "Update Message"; reference "http://tools.ietf.org/html/rfc4271#section-4.3"; container path-attributes { reference "http://tools.ietf.org/html/rfc4271#section-5"; container origin { reference "http://tools.ietf.org/html/rfc4271#section-5.1.1"; leaf value { type origin-value; mandatory true; } } container as-path { reference "http://tools.ietf.org/html/rfc4271#section-5.1.2"; list segments { uses as-path-segment; } } container next-hop { reference "http://tools.ietf.org/html/rfc4271#section-5.1.3"; leaf hop { type inet:ipv4-address; mandatory true; } } container multi-exit-disc { reference "http://tools.ietf.org/html/rfc4271#section-5.1.4"; leaf med { type uint32; } } container local-pref { reference "http://tools.ietf.org/html/rfc4271#section-5.1.5"; leaf pref { type uint32; } } container atomic-aggregate { reference "http://tools.ietf.org/html/rfc4271#section-5.1.6"; presence "Atomic Aggregare attribute is present."; } container aggregator { reference "http://tools.ietf.org/html/rfc4271#section-5.1.7"; leaf as { type as-number; } leaf ip { type inet:ipv4-address; } } } container withdrawn-routes { leaf-list withdrawn-routes { type inet:ipv4-prefix; } } container nlri { leaf-list nlri { type inet:ipv4-prefix; } } } notification keepalive { description "Keepalive Message"; reference "http://tools.ietf.org/html/rfc4271#section-4.4"; } notification notify { description "Notification Message"; reference "http://tools.ietf.org/html/rfc4271#section-4.5"; leaf error-code { type uint8; mandatory true; } leaf error-subcode { type uint8; mandatory true; } leaf data { type binary; } } }