pyang: add missing key for list statement 16/23616/1
authorIsaku Yamahata <isaku.yamahata@intel.com>
Tue, 30 Jun 2015 19:08:45 +0000 (12:08 -0700)
committerIsaku Yamahata <isaku.yamahata@intel.com>
Tue, 30 Jun 2015 21:12:48 +0000 (14:12 -0700)
This patch fixes following pyang errors

> neutron.yang:38: error: the list at "neutron.yang:38 (at neutron-L3.yang:155)" needs at least one key because it is used as config
> neutron.yang:40: error: the list at "neutron.yang:40 (at neutron-metering.yang:80)" needs at least one key because it is used as config
> neutron.yang:41: error: the list at "neutron.yang:41 (at neutron-metering.yang:90)" needs at least one key because it is used as config
> neutron.yang:42: error: the list at "neutron.yang:42 (at neutron-ports.yang:33)" needs at least one key because it is used as config

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

index d2f12200118f0ccd227673d375754fee074ffc29..e0f05cb09024b6dd24e9459bbb934fe506c7978e 100644 (file)
@@ -154,6 +154,7 @@ module neutron-L3 {
                 }
                 list interfaces {
                     description "List of interfaces associated with this router object.";
+                    key "uuid";
                     uses interface-attrs;
                 }
             }
index c695469277916032db7696bedf2c127b54dd14eb..3ec9314adc0d15c5b2decc7cf8786d60b31314a1 100644 (file)
@@ -78,6 +78,7 @@ module neutron-metering {
         container metering-labels {
             description "Container for metering labels.";
             list metering-label {
+                key "uuid";
                 uses attrs:base-attrs;
                 uses metering-label-attrs;
                 description "List of Metering Labels.";
@@ -88,6 +89,7 @@ module neutron-metering {
         container metering-rules {
             description " Container for metering rules.";
             list metering-rule {
+                key "id";
                 uses metering-rule-attrs;
                 description "List of Metering Rules.";
             }
index a7ae07f78d16d9efb578044dd3e2d3850de16ad8..4c8502b3a05717462432eab4843e456eaf5c2384 100644 (file)
@@ -37,6 +37,7 @@ module neutron-ports {
                         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";
+            key "port-id";
             leaf port-id {
                 type string;
             }