aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-if-aggregate@2018-03-23.yang
blob: 5aa80bbf03748266d82456d6bf783c06349af739 (plain)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
module openconfig-if-aggregate {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/interfaces/aggregate";

  prefix "oc-lag";

  // import some basic types
  import openconfig-interfaces { prefix oc-if; }
  import openconfig-if-ethernet { prefix oc-eth; }
  import iana-if-type { prefix ift; }
  import openconfig-if-types { prefix oc-ift; }
  import openconfig-extensions { prefix oc-ext; }

  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    netopenconfig@googlegroups.com";

  description
    "Model for managing aggregated (aka bundle, LAG) interfaces.";

  oc-ext:openconfig-version "2.3.1";

  revision "2018-03-23" {
    description
      "Fix/cleanup when statements in aggregates model.";
    reference "2.3.1";
  }

  revision "2018-01-05" {
    description
      "Add logical loopback to interface.";
    reference "2.3.0";
  }

  revision "2017-12-22" {
    description
      "Add IPv4 proxy ARP configuration.";
    reference "2.2.0";
  }

  revision "2017-12-21" {
    description
      "Added IPv6 router advertisement configuration.";
    reference "2.1.0";
  }

  revision "2017-07-14" {
    description
      "Added Ethernet/IP state data; Add dhcp-client;
      migrate to OpenConfig types modules; Removed or
      renamed opstate values";
    reference "2.0.0";
  }

  revision "2016-12-22" {
    description
      "Fixes to Ethernet interfaces model";
    reference "1.1.0";
  }

  // extension statements

  // feature statements

  // identity statements

  // typedef statements



  typedef aggregation-type {
    type enumeration {
      enum LACP {
        description "LAG managed by LACP";
      }
      enum STATIC {
        description "Statically configured bundle / LAG";
      }
    }
    description
      "Type to define the lag-type, i.e., how the LAG is
      defined and managed";
  }

  // grouping statements


  grouping aggregation-logical-config {
    description
      "Configuration data for aggregate interfaces";


    leaf lag-type {
      type aggregation-type;
      description
        "Sets the type of LAG, i.e., how it is
        configured / maintained";
    }

    leaf min-links {
      type uint16;
      description
        "Specifies the mininum number of member
        interfaces that must be active for the aggregate interface
        to be available";
    }
  }

  grouping aggregation-logical-state {
    description
      "Operational state data for aggregate interfaces";

    leaf lag-speed {
      type uint32;
      units Mbps;
      description
        "Reports effective speed of the aggregate interface,
        based on speed of active member interfaces";
    }

    leaf-list member {
      when "../../config/lag-type = 'STATIC'" {
        description
          "The simple list of member interfaces is active
          when the aggregate is statically configured";
      }
      type oc-if:base-interface-ref;
      description
        "List of current member interfaces for the aggregate,
        expressed as references to existing interfaces";
    }
  }

  grouping aggregation-logical-top {
    description "Top-level data definitions for LAGs";

    container aggregation {

      description
        "Options for logical interfaces representing
        aggregates";

      container config {
        description
          "Configuration variables for logical aggregate /
          LAG interfaces";

        uses aggregation-logical-config;
      }

      container state {

        config false;
        description
          "Operational state variables for logical
          aggregate / LAG interfaces";

        uses aggregation-logical-config;
        uses aggregation-logical-state;

      }
    }
  }

  grouping ethernet-if-aggregation-config {
    description
      "Adds configuration items for Ethernet interfaces
      belonging to a logical aggregate / LAG";

    leaf aggregate-id {
      type leafref {
        path "/oc-if:interfaces/oc-if:interface/oc-if:name";
      }
      description
        "Specify the logical aggregate interface to which
        this interface belongs";
    }
  }

  // data definition statements

  // augment statements

  augment "/oc-if:interfaces/oc-if:interface" {

    description "Adds LAG configuration to the interface module";

    uses aggregation-logical-top {
      when "oc-if:state/oc-if:type = 'ift:ieee8023adLag' or " +
        "oc-if:state/oc-if:type = 'oc-ift:IF_AGGREGATE'" {
        description
          "active when the interface is set to type LAG";
      }
    }
  }

  augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet/" +
    "oc-eth:config" {
    description
      "Adds LAG settings to individual Ethernet interfaces";

    uses ethernet-if-aggregation-config;
  }

  augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet/" +
    "oc-eth:state" {
    description
      "Adds LAG settings to individual Ethernet interfaces";

    uses ethernet-if-aggregation-config;
  }

  // rpc statements

  // notification statements

}