pyang: missing key in neutron port attribute 17/23617/2
authorIsaku Yamahata <isaku.yamahata@intel.com>
Tue, 30 Jun 2015 19:12:51 +0000 (12:12 -0700)
committerIsaku Yamahata <isaku.yamahata@intel.com>
Thu, 2 Jul 2015 20:02:01 +0000 (13:02 -0700)
This patch fixes the following error by pyang.
ip version is missing for extra dhcp attribute and add key statement.

> neutron.yang:42: error: the list at "neutron.yang:42 (at neutron-ports.yang:54)" needs at least one key because it is used as config

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

index a7ae07f78d16d9efb578044dd3e2d3850de16ad8..8f1e9062a951e880a3b44012271d8635cc6687e2 100644 (file)
@@ -54,12 +54,19 @@ module neutron-ports {
         list extra-dhcp-opts {
             description "Extra DHCP options";
             reference "http://developer.openstack.org/api-ref-networking-v2.html";
+            key "opt-name ip-version";
             leaf opt-name {
                 type string;
             }
             leaf opt-value {
                 type string;
             }
+            leaf ip-version {
+                type enumeration {
+                    enum 4;
+                    enum 6;
+                }
+            }
         }
         leaf device-owner {
             type string;