1ac4a231d45c8ac7022eb48b0eb290eec746d1f1
[groupbasedpolicy.git] / renderers / faas / src / main / yang / faas-endpoint.yang
1 /*
2  * Copyright (c) 2015 Huawei Technologies 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
9 module faas-endpoint {
10     yang-version 1;
11     namespace "urn:opendaylight:faas:faas-endpoint";
12     prefix "faas-endpoint";
13
14     import yang-ext { prefix ext; revision-date "2013-07-09"; }
15     import opendaylight-inventory { prefix inv; revision-date "2013-08-19"; }
16     import gbp-common { prefix gbp-common; }
17     import endpoint { prefix endpoint; }
18
19     revision 2015-10-09 {
20         description "Initial revision";
21     }
22
23     grouping switch-attach-location {
24         description
25                 "The switch attachment for this endpoint";
26
27         leaf node-id {
28             description "The switch for this attached point";
29             type inv:node-id;
30         }
31
32         leaf node-connector-id {
33             description "The node connector that this point is attached to";
34             type inv:node-connector-id;
35         }
36     }
37
38     grouping endpoint-ext-fields {
39         leaf subnet-id {
40             description "The subnet Id";
41             type gbp-common:unique-id;
42         }
43         uses switch-attach-location;
44     }
45
46     augment "/endpoint:endpoints/endpoint:endpoint" {
47         ext:augment-identifier "faas-endpoint-context";
48         uses endpoint-ext-fields;
49     }
50
51     augment "/endpoint:register-endpoint/endpoint:input" {
52         ext:augment-identifier "faas-endpoint-context-input";
53         uses endpoint-ext-fields;
54     }
55 }