diff --git a/ducktape/cluster/remoteaccount.py b/ducktape/cluster/remoteaccount.py index bc574c9dd..e255b65dc 100644 --- a/ducktape/cluster/remoteaccount.py +++ b/ducktape/cluster/remoteaccount.py @@ -775,3 +775,9 @@ def __repr__(self): def __str__(self): return "MachineType(cpu core:{}, memory(GB):{}, boot disk(GB):{}, additional disks(GB):{})" \ .format(self.cpu_core, self.mem_size_gb, self.disk_size_gb, self.additional_disks) + + def __eq__(self, other): + return other and other.__dict__ == self.__dict__ + + def __hash__(self): + return hash(tuple(sorted(self.__dict__.items())))