Merge "Fixed missing tunnel type"
[groupbasedpolicy.git] / neutron-mapper / src / main / yang / mapper.yang
1 module neutron-mapper {
2     yang-version 1;
3
4     namespace "urn:opendaylight:groupbasedpolicy:neutron-mapper";
5     prefix "gbp-neutron-mapper";
6
7     import gbp-common {prefix gbp-common;}
8     import endpoint {prefix gbp-endpoint;}
9     import ietf-inet-types {prefix inet;}
10
11     description 
12         "This module defines the mapping model between Neutron IDs and GBP IDs. 
13         These mappings are used just internaly and are NOT EXPORTED.";
14
15     revision "2015-02-23" {
16         description
17             "Initial revision.";
18     }
19
20     grouping tenant-id-fields {
21         leaf tenant-id {
22                 description "A unique ID for the tenant";
23                 mandatory true;
24                 type gbp-common:tenant-id;
25         }
26     }
27
28     grouping endpoint-group-pair-fields {
29         leaf provider-epg-id {
30             type gbp-common:endpoint-group-id;
31         }
32         leaf consumer-epg-id {
33             type gbp-common:endpoint-group-id;
34         }
35         leaf contract-id {
36             type gbp-common:contract-id;
37         }
38     }
39
40     container mappings {
41         config false;
42         container network-mappings {
43             list network-mapping {
44                 key network-id;
45                 leaf network-id {
46                     description "A unique ID for the neutron network == gbp l2-flood-domain";
47                     type gbp-common:unique-id;
48                 }
49                 leaf l2-bridge-domain-id {
50                     description "A unique ID of l2-bridge-domain generated for neutron network";
51                     type gbp-common:l2-bridge-domain-id;
52                 }
53                 leaf l3-context-id {
54                     description "A unique ID of l3-context generated for neutron network";
55                     type gbp-common:l3-context-id;
56                 }
57             }
58         }
59         container endpoint-group-pair-to-contract-mappings {
60             list endpoint-group-pair-to-contract-mapping {
61                 key "provider-epg-id consumer-epg-id";
62                 uses endpoint-group-pair-fields;
63             }
64         }
65     }
66
67 }