yang model revise: neutron-l2gateways.yang
[neutron.git] / model / src / main / yang / neutron-l2gateways.yang
1 /*
2  * Copyright (c) 2015 Hewlett-Packard Development Company 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-l2gateways{
9     yang-version 1;
10     namespace "urn:opendaylight:neutron-l2gateways";
11     prefix neutron-l2gateways;
12
13     import ietf-yang-types { prefix "yang"; }
14     import neutron-attrs { prefix "attrs"; }
15
16     organization "OpenDaylight Neutron Group";
17
18     description "This YANG module defines l2gateway objects that are used by
19                  Openstack kilo Neutron YANG modules.";
20
21     revision "2015-07-12" {
22         description
23                 "Initial version of l2gateway group objects used by OpenStack
24                  kilo Neutron models";
25     }
26
27     grouping l2gateway-connection-attributes {
28         leaf l2gateway-id {
29             type yang:uuid;
30         }
31         leaf network-id {
32             type yang:uuid;
33         }
34         leaf segment-id {
35             type int32;
36         }
37         leaf port-id {
38             type yang:uuid;
39         }
40     }
41
42     grouping l2gateway-attributes {
43         leaf l2gateway-name {
44             type string;
45         }
46         list devices {
47             description "Description of devices.";
48             key "uuid";
49             leaf uuid {
50                 type yang:uuid;
51             }
52             leaf device-name {
53                 type string;
54             }
55             list interfaces {
56                 description "Description of interfaces";
57                 key interface-name;
58                 leaf interface-name {
59                     type string;
60                 }
61                 leaf-list segmentation-ids {
62                     description "Description of segmentations";
63                     type int32;
64                 }
65             }
66         }
67      }
68
69    grouping l2gateways-attributes {
70         container l2gateways {
71             list l2gateway {
72                 description "l2gateway description ";
73                 key "uuid";
74                 uses attrs:base-attributes;
75                 uses l2gateway-attributes;
76             }
77         }
78     }
79
80     grouping l2gateway-connections-attributes{
81          container l2gatewayConnections {
82             list l2gatewayConnection {
83                 description "l2gateway connection description ";
84                 key "uuid";
85                 uses attrs:base-attributes;
86                 uses l2gateway-connection-attributes;
87             }
88         }
89      }
90
91 }