-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBGPlab.yang
85 lines (75 loc) · 1.82 KB
/
BGPlab.yang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
module BGPlab {
namespace "http://com/example/BGPlab";
prefix BGPlab;
import ietf-inet-types {
prefix inet;
}
import tailf-ncs {
prefix ncs;
}
import tailf-common {
prefix tailf;
}
list BGPlab {
key name;
uses ncs:service-data;
ncs:servicepoint "BGPlab";
leaf name {
tailf:cli-expose-key-name; // makes name appear at cli
tailf:info "Unique id/name";
type string;
}
// may replace this with other ways of refering to the devices.
leaf-list device {
type leafref {
path "/ncs:devices/ncs:device/ncs:name";
}
}
// replace with your own stuff here
/*.. common configs ..*/
leaf password {
tailf:info "BGP neighbor password";
type string;
}
container left {
tailf:cli-flatten-container;
tailf:info "Config inputs for left ios-xr device";
/*.. bgp info ..*/
leaf asn {
tailf:info "BGP AS No";
type uint16;
}
leaf left_ip {
tailf:info "IP for this side as neighbor ip address";
type inet:ipv4-address;
}
/*.. device info ..*/
leaf device {
tailf:info "Left device";
type leafref {
path "/ncs:devices/ncs:device/ncs:name";
}
}
} // container left
container right {
tailf:cli-flatten-container;
tailf:info "Config inputs for right ios device";
/*.. bgp info ..*/
leaf asn {
tailf:info "BGP AS No";
type uint16;
}
leaf right_ip {
tailf:info "IP for this side as neighbor ip address";
type inet:ipv4-address;
}
/*.. device info ..*/
leaf device {
tailf:info "Right device";
type leafref {
path "/ncs:devices/ncs:device/ncs:name";
}
}
} // container right
}
}