Commit f4e86448 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

rlib: Expose node group tags

Commit 1ffd2673

 added support for tagging node groups. Also add a
check for exposed fields.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent e987f166
......@@ -74,11 +74,12 @@ N_FIELDS = ["name", "offline", "master_candidate", "drained",
"group.uuid",
] + _COMMON_FIELDS
G_FIELDS = ["name", "uuid",
"alloc_policy",
"node_cnt", "node_list",
"ctime", "mtime", "serial_no",
] # "tags" is missing to be able to use _COMMON_FIELDS here.
G_FIELDS = [
"alloc_policy",
"name",
"node_cnt",
"node_list",
] + _COMMON_FIELDS
J_FIELDS = [
"id", "ops", "status", "summary",
......
......@@ -45,6 +45,16 @@ class TestConstants(unittest.TestCase):
assert "console" in query.INSTANCE_FIELDS
self.assertTrue("console" not in rlib2.I_FIELDS)
def testFields(self):
checks = {
constants.QR_INSTANCE: rlib2.I_FIELDS,
constants.QR_NODE: rlib2.N_FIELDS,
constants.QR_GROUP: rlib2.G_FIELDS,
}
for (qr, fields) in checks.items():
self.assertFalse(set(fields) - set(query.ALL_FIELDS[qr].keys()))
class TestParseInstanceCreateRequestVersion1(testutils.GanetiTestCase):
def setUp(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment