Fix RAPI to include missing network fields
authorChristos Stavrakakis <cstavr@grnet.gr>
Wed, 10 Jul 2013 10:48:21 +0000 (13:48 +0300)
committerGuido Trotter <ultrotter@google.com>
Wed, 10 Jul 2013 12:45:26 +0000 (14:45 +0200)
Fix RAPI interface to include missing network fields. Specifically, fix
instance queries to include the network name for instance NICs. Also fix
network queries to include missing common fields, like uuid and serial.

Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

lib/rapi/rlib2.py

index 9314b9a..48f491e 100644 (file)
@@ -72,7 +72,7 @@ I_FIELDS = ["name", "admin_state", "os",
             "pnode", "snodes",
             "disk_template",
             "nic.ips", "nic.macs", "nic.modes",
             "pnode", "snodes",
             "disk_template",
             "nic.ips", "nic.macs", "nic.modes",
-            "nic.links", "nic.networks", "nic.bridges",
+            "nic.links", "nic.networks", "nic.networks.names", "nic.bridges",
             "network_port",
             "disk.sizes", "disk_usage",
             "beparams", "hvparams",
             "network_port",
             "disk.sizes", "disk_usage",
             "beparams", "hvparams",
@@ -97,8 +97,8 @@ NET_FIELDS = ["name", "network", "gateway",
               "mac_prefix",
               "free_count", "reserved_count",
               "map", "group_list", "inst_list",
               "mac_prefix",
               "free_count", "reserved_count",
               "map", "group_list", "inst_list",
-              "external_reservations", "tags",
-              ]
+              "external_reservations",
+              ] + _COMMON_FIELDS
 
 G_FIELDS = [
   "alloc_policy",
 
 G_FIELDS = [
   "alloc_policy",