2 * Copyright (c) 2016 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
9 module l2-l3-forwarding {
12 namespace "urn:opendaylight:groupbasedpolicy:forwarding:l2_l3";
13 prefix "l2-l3-forwarding";
15 import forwarding { prefix forwarding; revision-date 2016-04-27; }
16 import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
17 import yang-ext {prefix ext; revision-date 2013-07-09;}
19 revision "2016-04-27" {
25 base forwarding:context-type;
28 identity l2-bridge-domain {
29 base forwarding:context-type;
32 identity l2-flood-domain {
33 base forwarding:context-type;
37 base forwarding:network-domain;
40 identity mac-address-type {
41 description "Values by MAC address type MUST be compatible with type ietf-yang-types:mac-address.
42 This address type can be used only if forwarding:context-type is l2-bridge-domain.";
43 base forwarding:address-type;
46 identity ip-prefix-type {
47 description "Values by IP prefix type MUST be compatible with type ietf-inet-types:ipv-prefix.
48 This address type can be used only if forwarding:context-type is l3-context.";
49 base forwarding:address-type;
52 grouping subnet-fields {
54 description "The IP prefix that defines the subnet";
57 leaf virtual-router-ip {
59 "IP address to use for a virtual gateway router
60 for the subnet, if desired.";
65 "External gateways for subnets we serve,
66 includes prefixes for static routing";
80 augment "/forwarding:forwarding/forwarding:forwarding-by-tenant/forwarding:network-domain" {
81 ext:augment-identifier "subnet-augment-forwarding";
83 when "../forwarding:network-domain-type = 'l2-l3-forwarding:subnet'";
88 // TODO add augment to renderer.yang