summaryrefslogtreecommitdiffstats
path: root/lisp/api/src/main/yang/gpe@2017-08-01.yang
blob: b2c2717f417b1399a1da8818efe7dcb2b38753e9 (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
module gpe {
  yang-version 1;
  namespace "http://fd.io/hc2vpp/yang/gpe";
  prefix "gpe";

  import lisp {
    prefix "lisp";
  }

  import ietf-interfaces {
    prefix "if";
  }

  import ietf-inet-types {
    prefix "inet";
  }

  import ietf-lisp-address-types {
    prefix "lisp-types";
  }

  revision 2017-08-01 {
      description
      "Locator pair composite key support";
  }

  revision 2017-05-18 {
    description
    "Add support for defining lisp gpe forward entries";
  }

  grouping locator-pairs-grouping {
    list locator-pair {
      key "local-locator remote-locator";
      leaf local-locator {
        type inet:ip-address;
        description "Local locator address";
      }
      leaf remote-locator {
        type inet:ip-address;
        description "Remote locator address";
      }
      leaf weight {
        type uint8;
        description "Weight";
      }
    }
  }
  grouping gpe-entry-table-grouping {
    container gpe-entry-table {
      when "../enable = 'true'";

      list gpe-entry {
        key id;
        leaf id {
          type string;
          description "GPE entry ID";
        }
        leaf dp-table {
          type uint32;
          mandatory true;
          description "VRF/BD index";
        }
        leaf vni {
          type uint32;
          mandatory true;
          description "Virtual Network Identifier";
        }
        container local-eid {
          presence "Enforce mandatory only if present";
          uses lisp-types:lisp-address;
          description "Local EID that must be a local address";
        }
        container remote-eid {
          presence "Enforce mandatory only if present";
          uses lisp-types:lisp-address;
          description "Remote EID";
        }
        leaf action {
          type lisp:map-reply-action;
          description "Forwarding action for negative entries";
        }
        uses locator-pairs-grouping;
      }
    }
  }

  grouping gpe-feature-data-grouping {
    //aggregation of all gpe data, restricted by GPE being enabled
    container gpe-feature-data {
      leaf enable {
        type boolean;
        description "Enable/disable GPE feature";
      }

      uses gpe-entry-table-grouping;
    }
  }

  container gpe {
    // gpe_enable_disable

    uses gpe-feature-data-grouping;
    description "GPE configuration";
  }

  container gpe-state {
    //gpe_enable_disable_status_dump
    config false;

    uses gpe-feature-data-grouping;
    description "GPE state";
  }

  container native-forward-paths-tables {
    // gpe_add_del_native_fwd_rpath
    list native-forward-paths-table{
      key table-id;

      leaf table-id {
        type uint32;
      }

      list native-forward-path {
        key next-hop-address;

        leaf next-hop-address {
          type inet:ip-address;
        }

        leaf next-hop-interface {
          type if:interface-ref;
        }
      }
    }
  }

  container native-forward-paths-tables-state {
    // gpe_native_fwd_rpaths_get
    config false;
    list native-forward-paths-table{
      key table-id;

      leaf table-id {
        type uint32;
      }

      list native-forward-path {
        key next-hop-address;

        leaf next-hop-address {
          type inet:ip-address;
        }

        leaf next-hop-interface {
          type if:interface-state-ref;
        }
      }
    }
  }
}