From 23f1bf290dbe4d60dd14198debacc0c329cff22e Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Wed, 12 Dec 2012 11:00:23 +0100
Subject: [PATCH] uidpool: Remove roman number support

Doing so simplifies to code a bit and never had a practical use.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 lib/client/gnt_cluster.py |  4 +---
 lib/uidpool.py            | 13 ++++++-------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py
index ccbc7a9e6..fe82da609 100644
--- a/lib/client/gnt_cluster.py
+++ b/lib/client/gnt_cluster.py
@@ -447,9 +447,7 @@ def ShowClusterConfig(opts, args):
            result["shared_file_storage_dir"])
   ToStdout("  - maintenance of node health: %s",
            result["maintain_node_health"])
-  ToStdout("  - uid pool: %s",
-            uidpool.FormatUidPool(result["uid_pool"],
-                                  roman=opts.roman_integers))
+  ToStdout("  - uid pool: %s", uidpool.FormatUidPool(result["uid_pool"]))
   ToStdout("  - default instance allocator: %s", result["default_iallocator"])
   ToStdout("  - primary ip version: %d", result["primary_ip_version"])
   ToStdout("  - preallocation wipe disks: %s", result["prealloc_wipe_disks"])
diff --git a/lib/uidpool.py b/lib/uidpool.py
index e3492a74f..eb5057d29 100644
--- a/lib/uidpool.py
+++ b/lib/uidpool.py
@@ -36,7 +36,6 @@ import random
 
 from ganeti import errors
 from ganeti import constants
-from ganeti import compat
 from ganeti import utils
 from ganeti import pathutils
 
@@ -116,17 +115,17 @@ def RemoveFromUidPool(uid_pool, remove_uids):
     uid_pool.remove(uid_range)
 
 
-def _FormatUidRange(lower, higher, roman=False):
+def _FormatUidRange(lower, higher):
   """Convert a user-id range definition into a string.
 
   """
   if lower == higher:
-    return str(compat.TryToRoman(lower, convert=roman))
-  return "%s-%s" % (compat.TryToRoman(lower, convert=roman),
-                    compat.TryToRoman(higher, convert=roman))
+    return str(lower)
 
+  return "%s-%s" % (lower, higher)
 
-def FormatUidPool(uid_pool, separator=None, roman=False):
+
+def FormatUidPool(uid_pool, separator=None):
   """Convert the internal representation of the user-id pool into a string.
 
   The output format is also accepted by ParseUidPool()
@@ -139,7 +138,7 @@ def FormatUidPool(uid_pool, separator=None, roman=False):
   """
   if separator is None:
     separator = ", "
-  return separator.join([_FormatUidRange(lower, higher, roman=roman)
+  return separator.join([_FormatUidRange(lower, higher)
                          for lower, higher in uid_pool])
 
 
-- 
GitLab