diff --git a/lib/Shine/Lustre/Server.py b/lib/Shine/Lustre/Server.py index e4310a6..d543cea 100644 --- a/lib/Shine/Lustre/Server.py +++ b/lib/Shine/Lustre/Server.py @@ -93,6 +93,10 @@ def __init__(self, hostname, nids, hdlr=None): def __str__(self): return "%s (%s)" % (self.hostname, ','.join(self.nids)) + def __lt__(self, other): + # Cast hostname into str until NodeSet is sortable + return (str(self.hostname), self.nids) < (str(other.hostname), self.nids) + @classmethod def hostname_long(cls): """