Adding Yang Model for Openstack Host Configuration
[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 ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
15     import neutron-attrs { prefix "attrs"; }
16
17     organization "OpenDaylight Neutron Group";
18
19     description "This YANG module defines l2gateway objects that are used by
20                  Openstack kilo Neutron YANG modules.";
21
22     revision "2015-07-12" {
23         description
24                 "Initial version of l2gateway group objects used by OpenStack
25                  kilo Neutron models";
26     }
27
28     grouping l2gateway-connection-attributes {
29                 leaf l2gateway-id {
30                     type yang:uuid;
31                 }
32                 leaf network-id {
33                     type yang:uuid;
34                 }
35                 leaf segment-id {
36                     type int32;
37                 }
38                 leaf port-id {
39                     type yang:uuid;
40                 }
41      }
42
43     grouping l2gateway-attributes {
44         leaf l2gateway-name{
45             type string;
46         }
47         list devices {
48             description "Description of devices.";
49             leaf device-name{
50                 type string;
51             }
52             list interfaces {
53                description "Description of interfaces";
54                leaf interface-name {
55                    type string;
56                }
57                leaf-list segmentation-ids {
58                 description "Description of segmentations";
59                    type int32;
60                }
61             }
62         }
63      }
64
65    grouping l2gateways-attributes {
66         container l2gateways {
67             list l2gateway {
68                 description "l2gateway description ";
69                 key "uuid";
70                 uses attrs:base-attributes;
71                 uses l2gateway-attributes;
72             }
73         }
74     }
75
76     grouping l2gateway-connections-attributes{
77          container l2gatewayConnections {
78             list l2gatewayConnection {
79                 description "l2gateway connection description ";
80                 key "uuid";
81                 uses attrs:base-attributes;
82                 uses l2gateway-connection-attributes;
83             }
84         }
85      }
86
87 }