"role": "Role",
"ctime": "CTime", "mtime": "MTime", "uuid": "UUID",
"master_capable": "MasterCapable", "vm_capable": "VMCapable",
+ "group": "Group", "group.uuid": "GroupUUID",
}
"pinst_cnt", "sinst_cnt",
"pinst_list", "sinst_list",
"pip", "sip", "tags",
- "master",
- "role"] + _SIMPLE_FIELDS
+ "master", "role",
+ "group.uuid", "group",
+ ] + _SIMPLE_FIELDS
)
def CheckArguments(self):
nodenames = utils.NiceSort(nodenames)
nodelist = [all_info[name] for name in nodenames]
+ if "group" in self.op.output_fields:
+ groups = self.cfg.GetAllNodeGroupsInfo()
+ else:
+ groups = {}
+
# begin data gathering
if self.do_node_query:
val = "O"
else:
val = "R"
+ elif field == "group.uuid":
+ val = node.group
+ elif field == "group":
+ ng = groups.get(node.group, None)
+ if ng is None:
+ val = "<unknown>"
+ else:
+ val = ng.name
else:
raise errors.ParameterError(field)
node_output.append(val)
<para>whether the node can host instances</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>group</term>
+ <listitem>
+ <para>the name of the node's group, if known (the query
+ is done without locking, so data consistency is not
+ guaranteed)</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>group.uuid</term>
+ <listitem>
+ <para>the UUID of the node's group</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>