Export the uuid in RAPI
authorIustin Pop <iustin@google.com>
Wed, 23 Sep 2009 17:11:32 +0000 (19:11 +0200)
committerIustin Pop <iustin@google.com>
Thu, 24 Sep 2009 11:38:11 +0000 (13:38 +0200)
This also simplifies a little the field declaration in RAPI.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/rapi/rlib2.py

index 345d693..1cc2822 100644 (file)
@@ -31,6 +31,7 @@ from ganeti import rapi
 from ganeti.rapi import baserlib
 
 
+_COMMON_FIELDS = ["ctime", "mtime", "uuid", "serial_no", "tags"]
 I_FIELDS = ["name", "admin_state", "os",
             "pnode", "snodes",
             "disk_template",
@@ -39,16 +40,16 @@ I_FIELDS = ["name", "admin_state", "os",
             "disk.sizes", "disk_usage",
             "beparams", "hvparams",
             "oper_state", "oper_ram", "status",
-            "tags"]
+            ] + _COMMON_FIELDS
 
 N_FIELDS = ["name", "offline", "master_candidate", "drained",
             "dtotal", "dfree",
             "mtotal", "mnode", "mfree",
-            "pinst_cnt", "sinst_cnt", "tags",
+            "pinst_cnt", "sinst_cnt",
             "ctotal", "cnodes", "csockets",
-            "pip", "sip", "serial_no", "role",
+            "pip", "sip", "role",
             "pinst_list", "sinst_list",
-            ]
+            ] + _COMMON_FIELDS
 
 _NR_DRAINED = "drained"
 _NR_MASTER_CANDIATE = "master-candidate"