From e1876432f740aa4937efc64fa1aa496b1bc341d3 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Thu, 23 Jul 2009 14:41:02 +0100
Subject: [PATCH] Get rid of constants.RAPI_ENABLE

This constant is unused, except in qa. Removing it since it's always True.

This patch also removes the unused qa_rapi.PrintRemoteAPIWarning
function, and removes a comment about temporary constants "until we have
cluster parameters".

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/constants.py |  2 --
 qa/qa_rapi.py    | 14 +-------------
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/lib/constants.py b/lib/constants.py
index 9df5d7196..9dcb5f307 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -472,8 +472,6 @@ OPS_FINALIZED = frozenset([OP_STATUS_CANCELED,
 ELOG_MESSAGE = "message"
 ELOG_PROGRESS = "progress"
 
-# Temporary RAPI constants until we have cluster parameters
-RAPI_ENABLE = True
 RAPI_PORT = 5080
 
 # max dynamic devices
diff --git a/qa/qa_rapi.py b/qa/qa_rapi.py
index 7c668c518..76b96f10b 100644
--- a/qa/qa_rapi.py
+++ b/qa/qa_rapi.py
@@ -58,19 +58,7 @@ 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):
-- 
GitLab