Patch 1:Moved all the neutron YANG models under the "neutron" top-level as suggested by Ed. Fixed compile errors too.
Patch 2: Fixed Rogue space issues from Flavio.
Patch 3: rebase
Change-Id: I411b1eea5f5a30a1b2b17cb9d5020984803ab349
Signed-off-by: Kiran Sreenivasa <kkoushik@brocade.com>
--- /dev/null
+/*
+ * 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-ext {
+
+ yang-version 1;
+
+ namespace "urn:opendaylight:neutron-L3-ext";
+
+ prefix neutron-L3-ext;
+
+ 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-networks { prefix "networks"; }
+ import neutron { prefix "neutron"; }
+ import neutron-L3 { prefix "neutron-L3"; }
+
+ organization "OpenDaylight Neutron Group";
+
+ contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
+
+ description "This YANG module defines L3 model extensions that are used by Openstack
+ Ice House Neutron modules.";
+
+ revision "2014-10-02" {
+ description
+ "Initial version of L3 model extensions used by OpenStack Ice House Neutron
+ models";
+ }
+
+ augment "/neutron:neutron/neutron:networks/neutron:network"{
+ description "
+ This module augments the networks container in the neutron-networks
+ module with router information.
+ ";
+ leaf external {
+ description "If true, it indicates that the router is externally accessible.";
+ type boolean;
+ default "false";
+ }
+ }
+}
"Initial version of L3 attributes used by OpenStack Ice House Neutron
models";
}
- augment "/networks:networks/networks:network"{
- description "
- This module augments the networks container in the neutron-networks
- module with router information.
- ";
- leaf external {
- description "If true, it indicates that the router is externally accessible.";
- type boolean;
- default "false";
- }
- }
+
grouping L3-attrs {
leaf-list external_network_id {
}
}
- 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-attrs;
- uses attrs:admin-attrs;
- uses L3-attrs;
- list interfaces {
- description "List of interfaces associated with this router object.";
- uses interface-attrs;
+ 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-attrs;
+ uses attrs:admin-attrs;
+ uses L3-attrs;
+ list interfaces {
+ description "List of interfaces associated with this router object.";
+ uses interface-attrs;
+ }
}
}
}
- container floatingips {
- list floatingip {
+ 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.";
+ description "An external IP address that is mapped to a port that is
+ attached to an internal network.";
- key "uuid";
- uses L3-floatingip-attrs;
+ key "uuid";
+ uses L3-floatingip-attrs;
+ }
}
}
-
}
default "false";
}
}
- container metering-labels {
- description "Container for metering labels.";
- list metering-label {
- uses attrs:base-attrs;
- uses metering-label-attrs;
- description "List of Metering Labels.";
+
+ grouping metering-labels-attributes {
+ container metering-labels {
+ description "Container for metering labels.";
+ list metering-label {
+ uses attrs:base-attrs;
+ uses metering-label-attrs;
+ description "List of Metering Labels.";
+ }
}
}
- container metering-rules {
- description " Container for metering rules.";
- list metering-rule {
- uses metering-rule-attrs;
- description "List of Metering Rules.";
+ grouping metering-rules-attributes {
+ container metering-rules {
+ description " Container for metering rules.";
+ list metering-rule {
+ uses metering-rule-attrs;
+ description "List of Metering Rules.";
+ }
}
}
}
\ No newline at end of file
}
- container networks {
- list network {
-
- description "A network is a virtual isolated layer-2 broadcast domain which
- is typically reserved to the tenant who created it, unless the
- network has been explicitly configured to be shared. Tenants can
- create multiple networks, until they reach the thresholds specified
- by per-tenant Quotas. The network is the principal entity for
- the Neutron API. Ports and Subnets must always be associated
- with a network.";
-
- key "uuid";
- uses attrs:base-attrs;
- uses attrs:admin-attrs;
- uses network-attrs;
+ grouping networks-attributes {
+ container networks {
+ list network {
+
+ description "A network is a virtual isolated layer-2 broadcast domain which
+ is typically reserved to the tenant who created it, unless the
+ network has been explicitly configured to be shared. Tenants can
+ create multiple networks, until they reach the thresholds specified
+ by per-tenant Quotas. The network is the principal entity for
+ the Neutron API. Ports and Subnets must always be associated
+ with a network.";
+
+ key "uuid";
+ uses attrs:base-attrs;
+ uses attrs:admin-attrs;
+ uses network-attrs;
+ }
}
}
}
}
}
- container ports {
- list port {
- key "uuid";
- uses attrs:base-attrs;
- uses attrs:admin-attrs;
- uses port-attrs;
+ grouping ports-attributes {
+ container ports {
+ list port {
+ key "uuid";
+ uses attrs:base-attrs;
+ uses attrs:admin-attrs;
+ uses port-attrs;
+ }
}
}
}
--- /dev/null
+/*
+ * 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-provider-ext {
+
+ yang-version 1;
+
+ namespace "urn:opendaylight:neutron-provider-ext";
+
+ prefix neutron-provider-ext;
+
+ 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-networks { prefix "networks"; }
+ import neutron { prefix "neutron"; }
+ import neutron-provider { prefix "provider"; }
+
+ organization "OpenDaylight Neutron Group";
+
+ contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
+
+ description "This YANG module defines provider model extensions that are used by Openstack
+ Ice House Neutron YANG modules.";
+
+ revision "2014-10-02" {
+ description
+ "Initial version of provider model extensions used by OpenStack Ice House Neutron
+ models";
+ }
+
+ augment "/neutron:neutron/neutron:networks/neutron:network"{
+ description "
+ This module augments the networks container in the neutron-networks
+ module with provider information.
+ ";
+ list providers {
+ description "List of provider network(s) associated with this network.";
+ key segmentation-id;
+ uses provider:provider-attrs;
+ }
+ uses provider:provider-attrs;
+ }
+}
this ID is a gre key.";
}
}
-
- augment "/networks:networks/networks:network"{
- description "
- This module augments the networks container in the neutron-networks
- module with provider information.
- ";
- list segments {
- description "List of provider network(s) associated with this network.";
- key segmentation-id;
- uses provider-attrs;
- }
- uses provider-attrs;
- }
}
is ICMP, this value must be an ICMP type.";
}
}
- container security-groups {
- description "Container for security groups.";
- list security-group {
- uses attrs:base-attrs;
- uses security-group-attrs;
- description "List of Metering Labels.";
+
+ grouping security-groups-attributes {
+ container security-groups {
+ description "Container for security groups.";
+ list security-group {
+ uses attrs:base-attrs;
+ uses security-group-attrs;
+ description "List of Metering Labels.";
+ }
}
}
- container security-rules {
- description "Container for security group rules.";
- list security-rule {
- uses security-rule-attrs;
- description "List of Security Group Rules.";
+
+ grouping security-rules-attributes {
+ container security-rules {
+ description "Container for security group rules.";
+ list security-rule {
+ uses security-rule-attrs;
+ description "List of Security Group Rules.";
+ }
}
}
}
\ No newline at end of file
description "Specifies whether DHCP is enabled for this subnet or not.";
}
}
-
- container subnets {
- list subnet {
- key "uuid";
- uses attrs:base-attrs;
- uses subnet-attrs;
+ grouping subnets-attributes {
+ container subnets {
+ list subnet {
+ key "uuid";
+ uses attrs:base-attrs;
+ uses subnet-attrs;
+ }
}
}
}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2014 Cisco 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 {
+
+ yang-version 1;
+
+ namespace "urn:opendaylight:neutron-L3";
+
+ prefix neutron-L3;
+
+ 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-networks { prefix "networks"; }
+ import neutron-ports { prefix "ports"; }
+ import neutron-subnets { prefix "subnets"; }
+ import neutron-secgroups { prefix "secgroups"; }
+ import neutron-L3 { prefix "l3"; }
+ import neutron-metering { prefix "metering"; }
+
+ organization "OpenDaylight Neutron Group";
+
+ contact "Ed Warnicke <eaw@cisco.com>";
+
+ description "This YANG module defines a top level for the neutron models in opendaylight.";
+
+ revision "2015-03-25" {
+ description
+ "Initial version of top level neutron model";
+ }
+
+ container neutron {
+ uses networks:networks-attributes;
+ uses l3:routers-attributes;
+ uses l3:floatingips-attributes;
+ uses metering:metering-labels-attributes;
+ uses metering:metering-rules-attributes;
+ uses ports:ports-attributes;
+ uses secgroups:security-groups-attributes;
+ uses secgroups:security-rules-attributes;
+ uses subnets:subnets-attributes;
+ }
+}
\ No newline at end of file