Bring the YANG model into line with Juno object model.
Break out binding extension into separate model.
Change-Id: I527c5625d14f991afd9030847e7b4d8d8b020f06
Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
description "This YANG module defines L3 attributes that are used by Openstack
- Ice House Neutron modules.";
+ Juno House Neutron modules.";
revision "2014-10-02" {
description
}
grouping L3-attrs {
-
- leaf-list external_network_id {
- description "The network_id, for the external gateways. If this is empty, then this
- network does not have external access";
+ leaf distribted {
+ 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;
}
+ leaf-list routes {
+ description "list of routes for this router.";
+ type string;
+ }
leaf router-status {
description "Contains the Router status.";
type string;
type yang:uuid;
description "UUID to index this object.";
}
-
leaf tenant-id {
type yang:uuid;
description "The Tenant ID of this object.";
description "The floating IP address.";
type inet:ip-address;
}
- leaf fixed-ip-address {
+ list 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
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;
+ key subnet-id;
+ leaf subnet-id {
+ type yang:uuid;
+ }
+ leaf ip-address {
+ type inet:ip-address;
+ }
}
leaf status {
type string;
}
grouping interface-attrs {
+ leaf uuid {
+ type yang:uuid;
+ description "UUID to index this object.";
+ }
+ leaf tenant-id {
+ type yang:uuid;
+ description "The Tenant ID of this object.";
+ }
leaf subnet-id {
description "Contains the Subnet ID of the interface.";
type yang:uuid;
uses attrs:base-attrs;
uses attrs:admin-attrs;
uses L3-attrs;
+ 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;
+ leaf subnet-id {
+ type yang:uuid;
+ }
+ leaf ip-address {
+ type inet:ip-address;
+ }
+ }
+ }
list interfaces {
description "List of interfaces associated with this router object.";
uses interface-attrs;
contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
description "This YANG module defines groupings that are used by Openstack
- Ice House Neutron YANG modules.";
+ Juno House Neutron YANG modules.";
revision "2014-10-02" {
description
- "Initial version of attributes used by OpenStack Ice House Neutron
+ "Initial version of attributes used by OpenStack Icehouse House Neutron
models";
}
--- /dev/null
+/*
+ * Copyright (c) 2015 IBM Corporation. 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-binding {
+
+ yang-version 1;
+
+ namespace "urn:opendaylight:neutron-binding";
+
+ prefix neutron-binding;
+
+ import ietf-yang-types { prefix "yang"; }
+ // It requires rfc6991 (revision 2013-07-15), but odl don't have it, so this patch verify build will fail.
+ import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
+ import neutron-attrs { prefix "attrs"; }
+ import neutron-ports { prefix "ports"; }
+ import neutron { prefix "neutron"; }
+
+
+ organization "OpenDaylight Neutron Group";
+
+ contact "Ryan Moats <rmoats@us.ibm.com>";
+
+ description "This YANG module defines binding attributes that are used by Openstack
+ Juno Port YANG modules.";
+
+ grouping binding-attrs {
+ leaf host-id {
+ type yang:uuid;
+ description "The ID of the host where the port is allocated. In some cases,
+ different implementations can run on different hosts.";
+ }
+
+ list vif-details {
+ description "A dictionary that enables the application to pass information
+ about functions that the Networking API provides. To enable or
+ disable port filtering features such as security group and anti-MAC/IP
+ spoofing, specify port-filter: True or port-filter: False ";
+ leaf port-filter {
+ type boolean;
+ }
+ leaf ovs-hybrid-plug {
+ type boolean;
+ }
+ }
+ leaf vif-type {
+ type string;
+ }
+ leaf vnic-type {
+ type string;
+ }
+ leaf profile {
+ type string;
+ }
+ }
+
+ augment "/neutron:neutron/neutron:ports/neutron:port"{
+ description "
+ This module augments the ports container in the neutron-ports
+ module with binding information.
+ ";
+ uses binding-attrs;
+ }
+}
contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
description "This YANG module defines metering attributes that are used by Openstack
- Ice House Neutron YANG modules.";
+ Juno House Neutron YANG modules.";
revision "2014-10-02" {
description
}
}
}
-}
\ No newline at end of file
+}
contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
- description "This YANG module defines Openstack Ice House Neutron Network model";
+ description "This YANG module defines Openstack Juno House Neutron Network model";
revision "2014-10-02" {
description
contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
- description "This YANG module defines Openstack Ice House Neutron Ports model";
+ description "This YANG module defines Openstack Juno House Neutron Ports model";
revision "2014-10-02" {
description
}
grouping port-attrs {
- leaf binding-host-id {
- type yang:uuid;
- description "The ID of the host where the port is allocated. In some cases,
- different implementations can run on different hosts.";
- }
- leaf-list allowed-address-pairs {
- type string;
+ list allowed-address-pairs {
description "Allowed address pairs for this port. For example: neutron port-create
net1 --allowed-address-pairs type=dict list=true mac_address=<mac_address>,ip_address=<ip_cidr>
Setting an allowed-address-pair that matches the mac_address and
ip_address of a port is prevented. This is because that would
have no effect since traffic matching the mac_address and ip_address
is already allowed to pass through the port";
+ leaf port-id {
+ type string;
+ }
+ leaf mac-address {
+ type string;
+ }
+ leaf ip-address {
+ type string;
+ }
}
leaf network-id {
list extra-dhcp-opts {
description "Extra DHCP options";
reference "http://developer.openstack.org/api-ref-networking-v2.html";
- key id ;
- leaf id {
- type string;
- }
leaf opt-name {
type string;
}
type string;
}
}
-
- list binding-vif-details {
- description "A dictionary that enables the application to pass information
- about functions that the Networking API provides. To enable or
- disable port filtering features such as security group and anti-MAC/IP
- spoofing, specify port-filter: True or port-filter: False ";
-
- key id;
- leaf id {
- type string;
- }
-
- leaf port-filter {
- type boolean;
- }
- leaf ovs-hybrid-plug {
- type boolean;
- }
- }
- leaf binding-vif-type {
- type string;
- }
- leaf binding-vnic-type {
- type string;
- }
leaf device-owner {
type string;
}
contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
description "This YANG module defines provider attributes that are used by Openstack
- Ice House Neutron YANG modules.";
+ Juno House Neutron YANG modules.";
revision "2014-10-02" {
description
contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
description "This YANG module defines Security group objects that are used by Openstack
- Ice House Neutron YANG modules.";
+ Juno House Neutron YANG modules.";
revision "2014-10-02" {
description
uses attrs:base-attrs;
uses security-group-attrs;
description "List of Metering Labels.";
+ leaf-list security-rules {
+ type yang:uuid;
+ }
}
}
}
}
}
}
-}
\ No newline at end of file
+}
contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
- description "This YANG module defines Openstack Ice House Neutron Subnets model";
+ description "This YANG module defines Openstack Juno House Neutron Subnets model";
revision "2014-10-02" {
description
leaf enable-dhcp {
type boolean;
description "Specifies whether DHCP is enabled for this subnet or not.";
+ default "true";
}
}
grouping subnets-attributes {
}
}
}
-}
\ No newline at end of file
+}