From: Ben Pfaff Date: Wed, 12 Oct 2011 17:20:37 +0000 (-0700) Subject: ovs.db.types: Consistently use commas in formatting large numbers. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dae57238bc0ae2527b7d6f95482c5f17cba2e16e;p=openvswitch ovs.db.types: Consistently use commas in formatting large numbers. Suggested-by: Justin Pettit --- diff --git a/python/ovs/db/types.py b/python/ovs/db/types.py index 18b7081e..a8a53dd0 100644 --- a/python/ovs/db/types.py +++ b/python/ovs/db/types.py @@ -310,14 +310,16 @@ class BaseType(object): english = 'at most %g' % self.max elif self.min_length != 0 and self.max_length != sys.maxint: if self.min_length == self.max_length: - english = 'exactly %d characters long' % (self.min_length) + english = ('exactly %s characters long' + % commafy(self.min_length)) else: - english = ('between %d and %d characters long' - % (self.min_length, self.max_length)) + english = ('between %s and %s characters long' + % (commafy(self.min_length), + commafy(self.max_length))) elif self.min_length != 0: - return 'at least %d characters long' % self.min_length + return 'at least %s characters long' % commafy(self.min_length) elif self.max_length != sys.maxint: - english = 'at most %d characters long' % self.max_length + english = 'at most %s characters long' % commafy(self.max_length) else: english = '' @@ -517,13 +519,14 @@ class Type(object): else: if self.n_max == sys.maxint: if self.n_min: - quantity = "%d or more " % self.n_min + quantity = "%s or more " % commafy(self.n_min) else: quantity = "" elif self.n_min: - quantity = "%d to %d " % (self.n_min, self.n_max) + quantity = "%s to %s " % (commafy(self.n_min), + commafy(self.n_max)) else: - quantity = "up to %d " % self.n_max + quantity = "up to %s " % commafy(self.n_max) if self.value: return "map of %s%s-%s pairs" % (quantity, keyName, valueName) diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 56d4a1c2..611f47db 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -1461,7 +1461,8 @@ compatibility with 802.1ag compliant implementations. Defaults to false. - + When down, the CFM module marks all CCMs it generates as operationally down without triggering a fault. This allows remote maintenance points to choose not to forward traffic to the