summaryrefslogtreecommitdiffstats
path: root/vbd/api/src/main/yang/vbridge-topology.yang
blob: 36e50aea0f13223616f438833b19ea1c5ca3d74f (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
module vbridge-topology {
    // vi: set et smarttab sw=4 tabstop=4:

    yang-version 1;
    namespace "urn:opendaylight:params:xml:ns:yang:vbridge:topology";
    prefix "vbridge";

    organization "Cisco Systems, Inc.";

    contact "Robert Varga <rovarga@cisco.com>";

    description
        "Base model describing a virtual bridge domain mapped expressed
        as a network topology. Implementations of this model are expected
        to map this topology onto an underlay transport/managent topology,
        such as a NETCONF topology talking to forwarding boxes

        Copyright (c) 2015 Cisco and/or its affiliates.

        Licensed under the Apache License, Version 2.0 (the \"License\");
        you may not use this file except in compliance with the License.
        You may obtain a copy of the License at:

            http://www.apache.org/licenses/LICENSE-2.0

        Unless required by applicable law or agreed to in writing, software
        distributed under the License is distributed on an \"AS IS\" BASIS,
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        See the License for the specific language governing permissions and
        limitations under the License.";

    revision "2016-01-29" {
        description "Initial cut";
    }

    import ietf-inet-types { prefix "inet"; }
    import network-topology { prefix nt; revision-date 2013-10-21; }
    import odl-external-reference { prefix extref; }
    import v3po { prefix "v3po"; }

    identity tunnel-type {
        description "Type of tunneling technology";
    }

    typedef tunnel-type-ref {
        description "Reference to a tunneling technology";
        type identityref {
            base tunnel-type;
        }
    }

    identity tunnel-type-vxlan {
        // FIXME: should be in a vxlan-specific model
        description "VXLAN tunneling";
        base tunnel-type;
    }

    augment "/nt:network-topology/nt:topology/nt:topology-types" {
        container vbridge-topology {
            presence "Indicates a virtual bridge domain topology";
        }
    }

    augment "/nt:network-topology/nt:topology" {
        when "./nt:topology-types/vbridge-topology";

        // Pointer to the NETCONF topology which supports this bridge domain
        // FIXME: must "../../nt:underlay-topology";

        leaf tunnel-type {
            description "Tunnel technology to use for encapsulation";
            type tunnel-type-ref;
        }

        choice tunnel-parameters {
            container vxlan {
                // FIXME: should be in a vxlan-specific model
                when "../type = tunnel-type-vxlan";
                leaf vni {
                    description "VNI to use for encap";
                    type v3po:vxlan-vni;
                    mandatory true;
                }
            }
        }

        uses v3po:bridge-domain-attributes;
    }

    augment "/nt:network-topology/nt:topology/nt:node" {
        when "../nt:topology-types/vbridge-topology";

        container bridge-member {
            presence "Indicates this node is part of the bridge domain";

            // Pointer to the NETCONF node which supports this bridge member
            must "../../nt:supporting-node";

            // FIXME: this is implementation specific, depends on whether
            // the underlay has an a concept of a bridge domain.
            leaf supporting-bridge-domain {
                description
                    "Reference to the network element bridge domain, which has
                    been configured to support this virtual bridge domain on
                    this bridge member.

                    This reference needs to be resolved against the supporting
                    node's configuration data store.";
                config false;
                type extref:external-reference;
            }
        }
    }

    augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point" {
        when "../bridge-member";

        choice interface-type {
            leaf user-interface {
                description
                    "Reference to the network element interface, which is
                    configured to be a member of this virtual bridge domain.

                    This reference needs to be resolved against the supporting
                    node's configuration data store.";
                type extref:external-reference;
                mandatory true;
            }
            leaf tunnel-interface {
                description
                    "Reference to the network element interface, which is
                    configured to on the member to support exchange of packet
                    passing through this virtual bridge domain towards other
                    domain members.

                    This reference needs to be resolved against the supporting
                    node's configuration data store.";
                config false;
                type extref:external-reference;
                mandatory true;
            }
        }
    }

    augment "/nt:network-topology/nt:topology/nt:link" {
        when "../nt:topology-types/vbridge-topology";

        leaf tunnel {
            description
                "Reference to the network element tunnel interface supporting
                cross-connect between two bridge members.

                This reference needs to be resolved against the supporting
                node's operational data store.";
            config false;
            type extref:external-reference;
        }
    }
}