diff --git a/jarvis_util/util/hostfile.py b/jarvis_util/util/hostfile.py index 5d015de..a91b6c2 100644 --- a/jarvis_util/util/hostfile.py +++ b/jarvis_util/util/hostfile.py @@ -172,6 +172,9 @@ def subset(self, count): sub.hosts_ip = self.hosts_ip[:count] return sub + def copy(self): + return self.subset(len(self)) + def is_subset(self): return len(self.hosts) != len(self.all_hosts)