diff --git a/lib/rapi/rlib2.py b/lib/rapi/rlib2.py index 35aee518db3e5b5e989a83f8cd65185c0f2c89aa..91fc0202cbf82594ab4927261d280c6f54aa62d4 100644 --- a/lib/rapi/rlib2.py +++ b/lib/rapi/rlib2.py @@ -35,7 +35,7 @@ I_FIELDS = ["name", "admin_state", "os", "disk_template", "nic.ips", "nic.macs", "nic.bridges", "disk.sizes", - "beparams", + "beparams", "hvparams", "oper_state", "oper_ram", "status", "tags"] diff --git a/qa/ganeti-qa.py b/qa/ganeti-qa.py index 1bd4d5cdb5d02eb59e2d8f9692143b19a0b8d3c0..4c2a2fcffe1b9dfba8dc443606c61171ce035a7f 100755 --- a/qa/ganeti-qa.py +++ b/qa/ganeti-qa.py @@ -74,8 +74,9 @@ def SetupCluster(): """Initializes the cluster. """ - RunTest(qa_cluster.TestClusterInit) - RunTest(qa_node.TestNodeAddAll) + if qa_config.TestEnabled('create-cluster'): + RunTest(qa_cluster.TestClusterInit) + RunTest(qa_node.TestNodeAddAll) if qa_config.TestEnabled('node-info'): RunTest(qa_node.TestNodeInfo) @@ -308,7 +309,8 @@ def main(): finally: qa_config.ReleaseNode(pnode) - RunTest(qa_node.TestNodeRemoveAll) + if qa_config.TestEnabled('create-cluster'): + RunTest(qa_node.TestNodeRemoveAll) if qa_config.TestEnabled('cluster-destroy'): RunTest(qa_cluster.TestClusterDestroy) diff --git a/qa/qa-sample.json b/qa/qa-sample.json index 7c5027f1151afa9ec674f0d8b6e8d6ca9efcf800..3c3a6641ced0046bc42317d82b8890a4e5355c80 100644 --- a/qa/qa-sample.json +++ b/qa/qa-sample.json @@ -38,6 +38,7 @@ "tags": true, "rapi": true, + "create-cluster": true, "cluster-verify": true, "cluster-info": true, "cluster-burnin": true, diff --git a/qa/qa_rapi.py b/qa/qa_rapi.py index f2f68f9579960db08c698401d2eec5009a6920e8..f4db02112a10df9b2586f7efbe2c27975829c45f 100644 --- a/qa/qa_rapi.py +++ b/qa/qa_rapi.py @@ -41,10 +41,11 @@ NoProxyOpener = urllib2.build_opener(urllib2.ProxyHandler({})) INSTANCE_FIELDS = ("name", "os", "pnode", "snodes", - "admin_state", "admin_ram", - "disk_template", "ip", "mac", "bridge", - "sda_size", "sdb_size", "vcpus", - "oper_state", "status", "tags") + "admin_state", + "disk_template", "disk.sizes", + "nic.ips", "nic.macs", "nic.bridges", + "beparams", "hvparams", + "oper_state", "oper_ram", "status", "tags") NODE_FIELDS = ("name", "dtotal", "dfree", "mtotal", "mnode", "mfree", @@ -119,8 +120,8 @@ def TestEmptyCluster(): def _VerifyNodes(data): master_entry = { - "name": master_name, - "uri": "/nodes/%s" % master_name, + "id": master_name, + "uri": "/2/nodes/%s" % master_name, } AssertIn(master_entry, data) @@ -131,13 +132,13 @@ def TestEmptyCluster(): _DoTests([ ("/", None), - ("/info", _VerifyInfo), - ("/tags", None), - ("/nodes", _VerifyNodes), - ("/nodes?bulk=1", _VerifyNodesBulk), - ("/instances", []), - ("/instances?bulk=1", []), - ("/os", None), + ("/2/info", _VerifyInfo), + ("/2/tags", None), + ("/2/nodes", _VerifyNodes), + ("/2/nodes?bulk=1", _VerifyNodesBulk), + ("/2/instances", []), + ("/2/instances?bulk=1", []), + ("/2/os", None), ]) @@ -159,9 +160,9 @@ def TestInstance(instance): _VerifyInstance(instance_data) _DoTests([ - ("/instances/%s" % instance["name"], _VerifyInstance), - ("/instances", _VerifyInstancesList), - ("/instances?bulk=1", _VerifyInstancesBulk), + ("/2/instances/%s" % instance["name"], _VerifyInstance), + ("/2/instances", _VerifyInstancesList), + ("/2/instances?bulk=1", _VerifyInstancesBulk), ]) @@ -183,9 +184,9 @@ def TestNode(node): _VerifyNode(node_data) _DoTests([ - ("/nodes/%s" % node["primary"], _VerifyNode), - ("/nodes", _VerifyNodesList), - ("/nodes?bulk=1", _VerifyNodesBulk), + ("/2/nodes/%s" % node["primary"], _VerifyNode), + ("/2/nodes", _VerifyNodesList), + ("/2/nodes?bulk=1", _VerifyNodesBulk), ]) @@ -194,11 +195,11 @@ def TestTags(kind, name, tags): """ if kind == constants.TAG_CLUSTER: - uri = "/tags" + uri = "/2/tags" elif kind == constants.TAG_NODE: - uri = "/nodes/%s/tags" % name + uri = "/2/nodes/%s/tags" % name elif kind == constants.TAG_INSTANCE: - uri = "/instances/%s/tags" % name + uri = "/2/instances/%s/tags" % name else: raise errors.ProgrammerError("Unknown tag kind")