Skip to content

Commit

Permalink
Add copy method
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemartinlogan committed Mar 30, 2024
1 parent 5681be1 commit 11f5a15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jarvis_util/util/hostfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 11f5a15

Please sign in to comment.