Containment endpoint can only have relative location
[groupbasedpolicy.git] / groupbasedpolicy / src / main / yang / model / endpoint-location-provider.yang
1 /*\r
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 \r
9 module endpoint-location-provider {\r
10     yang-version 1;\r
11 \r
12     namespace "urn:opendaylight:groupbasedpolicy:endpoint_location_provider";\r
13     prefix "ep-loc-provider";\r
14 \r
15     import base-endpoint { prefix base-endpoint; revision-date 2016-04-27; }\r
16     import forwarding { prefix forwarding; revision-date 2016-04-27; }\r
17 \r
18     description\r
19         "This module defines network element structure for location provider.";\r
20 \r
21     revision "2016-04-19" {\r
22         description\r
23             "Initial revision.";\r
24     }\r
25 \r
26     typedef provider-name {\r
27         type string;\r
28     }\r
29 \r
30     container location-providers {\r
31         list location-provider {\r
32             key "provider";\r
33             leaf provider {\r
34                 type provider-name;\r
35             }\r
36             list provider-address-endpoint-location {\r
37                 key "context-type context-id address-type address";\r
38                 uses base-endpoint:address-endpoint-key;\r
39                 uses base-endpoint:has-location;\r
40             }\r
41             list provider-containment-endpoint-location {\r
42                 key "context-type context-id";\r
43                 uses forwarding:context-key;\r
44                 uses base-endpoint:has-relative-location;\r
45             }\r
46         }\r
47     }\r
48 }