yang model for neutron extensions api 08/40508/2
authorIsaku Yamahata <isaku.yamahata@intel.com>
Sat, 18 Jun 2016 01:36:57 +0000 (18:36 -0700)
committerIsaku Yamahata <isaku.yamahata@intel.com>
Fri, 15 Jul 2016 19:51:15 +0000 (12:51 -0700)
This patch defines a yang model for neutron extension api [1].
Through this model, openstack service provider is able to tell networking-odl
which neutron extensions are supported.

[1] http://developer.openstack.org/api-ref-networking-v2-ext.html#neutron_extensions

Change-Id: I68fc840545d260486fb7ab2e9cab10b9628daf1a
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
model/src/main/yang/neutron-extensions.yang [new file with mode: 0644]
model/src/main/yang/neutron.yang

diff --git a/model/src/main/yang/neutron-extensions.yang b/model/src/main/yang/neutron-extensions.yang
new file mode 100644 (file)
index 0000000..36b7863
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2016 Intel 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-extensions {
+    yang-version 1;
+
+    namespace "urn:opendaylight:neutron-extensions";
+
+    prefix neutron-extensions;
+
+    organization "OpenDaylight Neutron Group";
+
+    contact "Isaku Yamahata <isaku.yamahata@gmail.com>";
+
+    description "This YANG module defines neutron extensions attributes that are used
+        by OpenDaylight Neutron YANG modules.
+        http://developer.openstack.org/api-ref-networking-v2-ext.html#neutron_extensions";
+
+    revision "2016-06-17" {
+        description
+                "OpenDaylight Boron release";
+    }
+
+    grouping extension-attributes {
+        leaf name {
+            type string;
+            description "The name of the extension";
+        }
+        leaf alias {
+            type string;
+            description "The alias for the extension";
+        }
+    }
+
+    grouping extensions-attributes {
+        container extensions {
+            config false;
+            list extension {
+                key "alias";
+                uses extension-attributes;
+            }
+        }
+    }
+}
index 42a4b1dc1d856162b39413caf4d3aeda4eab6482..13a4b9d781fe080df21de812aece9cfb0d9594e2 100644 (file)
@@ -14,6 +14,7 @@ module neutron {
 
     prefix neutron;
 
+    import neutron-extensions { prefix "extensions"; }
     import neutron-networks { prefix "networks"; }
     import neutron-ports { prefix "ports"; }
     import neutron-subnets { prefix "subnets"; }
@@ -41,6 +42,7 @@ module neutron {
     }
 
     container neutron {
+        uses extensions:extensions-attributes;
         uses networks:networks-attributes;
         uses subnets:subnets-attributes;
         uses ports:ports-attributes;