[email protected] Maven / Gradle / Ivy
/*
* Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
module neutron-L3 {
yang-version 1;
namespace "urn:opendaylight:neutron-L3";
prefix neutron-L3;
import ietf-yang-types { prefix "yang";}
import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; }
import neutron-attrs { prefix "attrs"; }
organization "OpenDaylight Neutron Group";
contact "J. Gregory Hall , Kiran Sreenivasa ";
description "This YANG module defines attributes used by Openstack Neutron L3 modules.";
revision "2015-07-12" {
description
"OpenDaylight Beryllium release";
}
grouping L3-attributes {
leaf distributed {
description "whether this router is distributed or not.";
type boolean;
default "false";
}
leaf gateway-port-id {
description "the port uuid holding the router's gateway address.";
type yang:uuid;
}
list routes {
description "list of routes for this router.";
key "destination nexthop";
leaf destination {
description "Specifies a destination in CIDR format";
type inet:ip-prefix;
}
leaf nexthop {
type inet:ip-address;
}
}
leaf router-status {
description "Contains the Router status.";
type string;
}
}
grouping L3-floatingip-attributes {
leaf router-id {
description "Contains the Router ID of this floatingip object.";
type yang:uuid;
}
leaf port-id {
description "Contains the Port ID of the fixed IP address that will be
associated with this object.";
type yang:uuid;
}
leaf floating-network-id {
description "The ID of the network associated with the floating IP.";
type yang:uuid;
}
leaf floating-ip-address {
description "The floating IP address.";
type inet:ip-address;
}
leaf fixed-ip-address {
description "The fixed IP address associated with the floating IP.
If you intend to associate the floating IP with a fixed IP at
creation time, then you must indicate the identifier of the
internal port(using port-id object). If an internal port has
multiple associated IP addresses, the service chooses the first
IP unless you explicitly specify the parameter fixed_ip_address
to select a specific IP.";
type inet:ip-address;
}
leaf status {
type string;
description "The network status.";
}
}
grouping routers-attributes {
container routers {
list router {
description "A logical entity for forwarding packets across internal subnets
and NATting them on external networks through an appropriate external
gateway.";
key "uuid";
uses attrs:base-attributes;
uses attrs:admin-attributes;
uses L3-attributes;
container external_gateway_info {
leaf external-network-id {
description "The network_id, for the external gateways. If this is empty, then this
network does not have external access";
type yang:uuid;
}
leaf enable-snat {
description "If true, it indicates that the router is performing snat on external access ";
type boolean;
default "true";
}
list external-fixed-ips {
description "external fixed IPs for this router ";
key "subnet-id ip-address";
leaf subnet-id {
type yang:uuid;
}
leaf ip-address {
type inet:ip-address;
}
}
}
}
}
}
grouping floatingips-attributes {
container floatingips {
list floatingip {
description "An external IP address that is mapped to a port that is
attached to an internal network.";
key "uuid";
uses attrs:id-attributes;
uses L3-floatingip-attributes;
}
}
}
}