This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/src/sonic-yang-models/yang-models/sonic-device_neighbor_metadata.yang
mssonicbld 151a194212
[YANG] Add MgmtLeafRouter to Device Neighbor Metadata element type list (#15202) (#15231)
Why I did it
Introduce a new valid neighbor element type to YANG.

Work item tracking
Microsoft ADO (number only): 23994521
How I did it
Add MgmtLeafRouter to element network type list.

How to verify it
Passes UTs

Co-authored-by: Jing Kan <jika@microsoft.com>
2023-05-26 14:23:00 -07:00

101 lines
3.1 KiB
YANG

module sonic-device_neighbor_metadata {
yang-version 1.1;
namespace "http://github.com/Azure/sonic-device_neighbor_metadata";
prefix device_neighbor_metadata;
import ietf-yang-types {
prefix yang;
}
import ietf-inet-types {
prefix inet;
}
import sonic-types {
prefix stypes;
}
description "DEVICE_NEIGHBOR_METADATA YANG Module for SONiC OS";
revision 2022-08-25 {
description "First Revision";
}
container sonic-device_neighbor_metadata {
container DEVICE_NEIGHBOR_METADATA {
description "DEVICE_NEIGHBOR_METADATA part of config_db.json";
list DEVICE_NEIGHBOR_METADATA_LIST {
key "name";
leaf name {
description "Host name string, max length 255";
type string {
length 1..255;
}
}
leaf hwsku {
type stypes:hwsku;
}
leaf lo_addr {
description "Device loopback ipv4 address, type of ietf-inet
ipv4-prefix or ipv4-address";
type union {
type inet:ipv4-prefix;
type inet:ipv4-address;
}
}
leaf lo_addr_v6 {
description "Device loopback ipv6 address, type of ietf-inet
ipv6-prefix or ipv6-address";
type union {
type inet:ipv6-prefix;
type inet:ipv6-address;
}
}
leaf mgmt_addr {
description "Device management ipv4 address, type of ietf-inet
ipv4-prefix or ipv4-address";
type union {
type inet:ipv4-prefix;
type inet:ipv4-address;
}
}
leaf mgmt_addr_v6 {
description "Device management ipv6 address, type of ietf-inet
ipv6-prefix or ipv6-address";
type union {
type inet:ipv6-prefix;
type inet:ipv6-address;
}
}
leaf type {
description "Network element type";
type string {
pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|Asic|Supervior|MgmtToRRouter|MgmtLeafRouter|SpineRouter|BackEndToRRouter|BackEndLeafRouter|EPMS|MgmtTsToR|BmcMgmtToRRouter|Server|MiniPower|SmartCable|Ixia|not-provisioned";
}
}
leaf deployment_id {
type uint32;
}
}
/* end of list DEVICE_NEIGHBOR_METADATA_LIST */
}
/* end of container DEVICE_NEIGHBOR_METADATA */
}
/* end of container sonic-device_neighbor_metadata */
}
/* end of module sonic-device_neighbor_metadata */