Getting FAAS renderer started
[groupbasedpolicy.git] / renderers / faas / src / main / yang / faas.yang
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. 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 {
10     yang-version 1;
11
12     namespace "urn:opendaylight:groupbasedpolicy:faas";
13     prefix "faas";
14
15     import gbp-common { prefix gbp-common; }
16     import endpoint { prefix endpoint; }
17     import resolved-policy { prefix resolved-policy; }
18
19     description
20         "This module defines the group-based policy faas renderer model.";
21
22     revision "2015-10-09" {
23         description
24                 "Initial revision.";
25     }
26
27     grouping has-contract-key {
28         leaf contract-tenant-id {
29             description "Related tenant id";
30             type gbp-common:tenant-id;
31         }
32
33         leaf contract-id {
34             description "Related contract id";
35             type gbp-common:contract-id;
36         }
37     }
38
39     container mapped-service-profiles {
40         description "The list of mapped services";
41
42         config false;
43
44         list mapped-service-profile {
45             description "a service is an EPG-Contract-EPG";
46
47             key "consumer-epg-id contract-id provider-epg-id";
48
49             uses resolved-policy:has-consumer-epg-key;
50             uses has-contract-key;
51             uses resolved-policy:has-provider-epg-key;
52             leaf faas-security-rules-groups {
53                 description "Faas rules generated from GBP contract";
54                 type gbp-common:uuid;
55             }
56             leaf-list faas-routers {
57                 description "Faas logical routers";
58                 type gbp-common:uuid;
59             }
60             leaf-list faas-switches {
61                 description "Faas logical switches";
62                 type gbp-common:uuid;
63             }
64             leaf-list faas-ports {
65                 description "Faas logical ports";
66                 type gbp-common:uuid;
67             }
68             leaf-list faas-subnets {
69                 description "Faas subnets";
70                 type gbp-common:uuid;
71             }
72         }
73         list mapped-endpoints {
74             uses endpoint:l2-key;
75             leaf-list faas-ports {
76                 description "Faas logical ports";
77                 type gbp-common:uuid;
78             }
79         }
80     }
81 }