2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
12 namespace "urn:opendaylight:groupbasedpolicy:faas";
15 import gbp-common { prefix gbp-common; revision-date 2014-04-21; }
16 import faas-common { prefix faas-common; revision-date 2015-10-13; }
17 import endpoint { prefix endpoint; revision-date 2014-04-21; }
18 import resolved-policy { prefix resolved-policy; revision-date 2015-08-28; }
21 "This module defines the group-based policy faas renderer model.";
23 revision "2015-10-09" {
31 description "private scope within a tenant domain";
34 description "public scope that is exposed outside the tenant domain such as the Internet";
38 typedef service-communication-layer {
40 enum layer-undefined {
41 description "Undefined layer";
44 description "layer 2";
47 description "layer 3";
51 grouping has-contract-key {
52 leaf contract-tenant-id {
53 description "Related tenant id";
54 type gbp-common:tenant-id;
58 description "Related contract id";
59 type gbp-common:contract-id;
63 grouping has-logical-entity {
64 leaf logical-router-id {
65 type faas-common:uuid;
67 leaf logical-switch-id {
68 type faas-common:uuid;
70 leaf-list gbp-subnet-id {
71 type gbp-common:subnet-id;
75 container logical-networks {
76 description "The mapped logical networks based on GBP resolved services";
80 list logical-network {
81 description "Mapped logical network for an EPG-Contract-EPG service";
83 key "consumer-epg-id contract-id provider-epg-id consumer-tenant-id provider-tenant-id";
85 uses resolved-policy:has-consumer-epg-key;
86 uses has-contract-key;
87 uses resolved-policy:has-provider-epg-key;
88 leaf communication-layer {
89 description "logical network communication layer";
90 type service-communication-layer;
92 container consumer-network {
93 uses has-logical-entity;
94 leaf network-scope-type {
95 description "if public, it means the router has a public access port";
100 container provider-network {
101 uses has-logical-entity;
102 leaf network-scope-type {
103 description "if public, it means the router has a public access port";
111 grouping tenant-pair-id {
113 type gbp-common:tenant-id;
115 leaf faas-tenant-id {
116 type faas-common:uuid;
119 container mapped-tenants-entities {
130 type gbp-common:tenant-id;
132 list mapped-contract {
133 key "gbp-contract-id";
134 leaf gbp-contract-id {
135 type gbp-common:contract-id;
137 leaf faas-security-rules-id {
138 type faas-common:uuid;
144 type gbp-common:subnet-id;
146 leaf faas-subnet-id {
147 type faas-common:uuid;
150 list mapped-endpoint {
151 key "l2-context mac-address";
152 uses endpoint:l2-key;
153 leaf endpoint-location {
154 type faas-common:uuid;