diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py index ccbc7a9e6af63c20d4a657211b095c3965f26258..fe82da609c57af8deb5324edfb979101a8157ee7 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 e3492a74f4c9df69be75694f2f3c7b531f0d1cca..eb5057d295c8f951705dff452cc1206145331424 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])