yang model: add service provider feature model 81/52081/2
authorIsaku Yamahata <isaku.yamahata@intel.com>
Mon, 20 Feb 2017 16:24:38 +0000 (11:24 -0500)
committerIsaku Yamahata <isaku.yamahata@intel.com>
Mon, 20 Feb 2017 16:50:57 +0000 (11:50 -0500)
As ODL is starting to add more functionalities like port status update
for networking-odl, the negotiation between networking-odl and ODL
openstack service provider to keep compatibility.
networking-odl is supposed to work with multiple versions of ODL,
multiple instances of openstack service providers. So networking-odl
needs to know what neutron extensions/features is supported by
given ODL version/openstack service provider.
This patch defines a yang model for it so that networking-odl can
retrieve from ODL at start up and configure itself.

Change-Id: I90b6bbc3079559209fb444ab79cc88af6a2dc58a
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
model/src/main/yang/neutron-extensions.yang
model/src/main/yang/neutron.yang

index 2d0b3a0b88106fc6e9908e9a77b16143f022f038..9fea24f9709397145252c9be672f2a7802923aac 100644 (file)
@@ -50,4 +50,48 @@ module neutron-extensions {
             }
         }
     }
+
+    identity service-provider-feature-type-base {
+        description "Base identity for Feature that openstack service provider
+                    supports.";
+    }
+
+    // The list of openstack service provider features.
+    // Maintain the list of features as they are introduced
+    // identity extension-report {
+    //     description "extensions-attributes is populated";
+    //     base service-provider-feature-type-base;
+    // }
+    // identity port-status {
+    //     description "port status is updated";
+    //     base service-provider-feature-type-base;
+    // }
+
+    grouping service-provider-feature-attributes {
+        leaf service-provider-feature {
+            type identityref {
+                base service-provider-feature-type-base;
+            }
+            description "supported features by openstack service provider";
+        }
+        leaf configuration {
+            type string;
+            description "The configuration of this feature";
+        }
+    }
+
+    grouping service-provider-features-attributes {
+        description "List of features that openstack service provider supports.
+                    networking-odl will retrieve this list and configures itself
+                    to use what features.
+                    This is for networking-odl to support multiple versions
+                    ODL and multiple openstack service providers";
+        container features {
+            config false;
+            list feature {
+                key "service-provider-feature";
+                uses service-provider-feature-attributes;
+            }
+        }
+    }
 }
index 2663ab22c98316088d192129376235e2ce4baa8e..1fc44bbbcc06090d4ff75003e0adfac2a4c6f293 100644 (file)
@@ -45,6 +45,7 @@ module neutron {
 
     container neutron {
         uses extensions:extensions-attributes;
+        uses extensions:service-provider-features-attributes;
         uses networks:networks-attributes;
         uses subnets:subnets-attributes;
         uses ports:ports-attributes;