INSTANCE_FIELDS = ("name", "os", "pnode", "snodes",
"admin_state",
"disk_template", "disk.sizes",
- "nic.ips", "nic.macs", "nic.bridges",
+ "nic.ips", "nic.macs", "nic.modes", "nic.links",
"beparams", "hvparams",
"oper_state", "oper_ram", "status", "tags")
"mtotal", "mnode", "mfree",
"pinst_cnt", "sinst_cnt", "tags")
-LIST_FIELDS = ("name", "uri")
+LIST_FIELDS = ("id", "uri")
def Enabled():
"""Return whether remote API tests should be run.
"""
- return constants.RAPI_ENABLE and qa_config.TestEnabled('rapi')
-
-
-def PrintRemoteAPIWarning():
- """Print warning if remote API is not enabled.
-
- """
- if constants.RAPI_ENABLE or not qa_config.TestEnabled('rapi'):
- return
- msg = ("Remote API is not enabled in this Ganeti build. Please run"
- " `configure [...] --enable-rapi'.")
- print
- print qa_utils.FormatWarning(msg)
+ return qa_config.TestEnabled('rapi')
def _DoTests(uris):
master = qa_config.GetMasterNode()
host = master["primary"]
- port = qa_config.get("rapi-port", default=constants.RAPI_PORT)
+ port = qa_config.get("rapi-port", default=constants.DEFAULT_RAPI_PORT)
for uri, verify in uris:
assert uri.startswith("/")
- url = "http://%s:%s%s" % (host, port, uri)
+ url = "https://%s:%s%s" % (host, port, uri)
print "Testing %s ..." % url