Lines Matching full:hosts
39 def _host_modifier(self, hosts, operation, lock_reason=''): argument
42 Add hosts to self.locked_hosts for LOCK and remove hosts from
47 @param lock_reason: a string, a reason for locking the hosts
51 self.locked_hosts = self.locked_hosts.union(hosts)
53 self.locked_hosts = self.locked_hosts.difference(hosts)
106 """Tests host locking, all hosts not in self.locked_hosts."""
107 hosts = [self.HOST2]
110 manager.lock(hosts, lock_reason='Locking for test')
115 """Tests host locking, some hosts not in self.locked_hosts."""
116 hosts = [self.HOST1, self.HOST2]
119 manager.lock(hosts, lock_reason='Locking for test')
125 """Tests host locking, all hosts in self.locked_hosts."""
126 hosts = [self.HOST1, self.HOST2]
127 self.manager.locked_hosts = set(hosts)
128 self.manager.lock(hosts)
129 self.assertEqual(set(hosts), self.manager.locked_hosts)
133 """Tests host unlocking, all hosts not in self.locked_hosts."""
134 hosts = [self.HOST2]
136 self.manager.unlock(hosts)