Bump upstream versions
[neutron.git] / model / src / main / yang / neutron-networks.yang
1 /*
2  * Copyright (c) 2015 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 module neutron-networks {
9
10     yang-version 1;
11
12     namespace "urn:opendaylight:neutron-networks";
13
14     prefix neutron-networks;
15
16     import neutron-attrs { prefix "attrs"; }
17
18     organization "OpenDaylight Neutron Group";
19
20     contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
21
22     description "This YANG module defines Openstack Neutron Network model";
23
24     revision "2015-07-12" {
25         description
26                 "OpenDaylight Beryllium release";
27     }
28     identity network-type-base {
29         description
30                 "Base Network type for all Network type identifiers.";
31     }
32
33     identity network-type-flat {
34         base network-type-base;
35         description
36                 "Flat network type identity.";
37     }
38     identity network-type-vlan {
39         base network-type-base;
40         description
41                 "VLAN network type identity.";
42     }
43     identity network-type-vxlan {
44         base network-type-base;
45         description
46                 "VXLAN network type identity.";
47     }
48     identity network-type-gre {
49         base network-type-base;
50         description
51                 "GRE network type identity.";
52     }
53
54     typedef network-type {
55         type identityref {
56             base network-type-base;
57         }
58         description
59                 "This type is used to refer to a Network Type.";
60     }
61
62     grouping networks-attributes {
63         container networks {
64             list network {
65
66                 description "A network is a virtual isolated layer-2 broadcast domain which
67                             is typically reserved to the tenant who created it, unless the
68                             network has been explicitly configured to be shared. Tenants can
69                             create multiple networks, until they reach the thresholds specified
70                             by per-tenant Quotas. The network is the principal entity for 
71                             the Neutron API. Ports and Subnets must always be associated 
72                             with a network.";
73
74                 key "uuid";
75
76                 leaf shared {
77                     type boolean;
78                     default "false";
79                     description "Indicates whether this network or subnet is shared across all
80                                 tenants. By default, only administrative users can change this
81                                 value.";
82                 }
83
84                 leaf vlan-transparent {
85                     type boolean;
86                     default "false";
87                     description "The state of the network, which is VLAN transparent (true) or
88                                 not VLAN transparent (false)";
89                 }
90
91                 uses attrs:base-attributes;
92                 uses attrs:admin-attributes;
93             }
94         }
95     }
96 }