Ignore log messages in unittests
[ganeti-local] / qa / qa_rapi.py
index ce0cfde..da7f90d 100644 (file)
@@ -43,7 +43,7 @@ NoProxyOpener = urllib2.build_opener(urllib2.ProxyHandler({}))
 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")
 
@@ -51,32 +51,20 @@ NODE_FIELDS = ("name", "dtotal", "dfree",
                "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("/")