Home | History | Annotate | Download | only in cros

Lines Matching refs:hosts

55         def _host_modifier(self, hosts, operation, lock_reason=''):
58 Add hosts to self.locked_hosts for LOCK and remove hosts from
63 @param lock_reason: a string, a reason for locking the hosts
67 self.locked_hosts = self.locked_hosts.union(hosts)
69 self.locked_hosts = self.locked_hosts.difference(hosts)
125 """Tests host locking, all hosts not in self.locked_hosts."""
126 hosts = [self.HOST2]
129 manager.lock(hosts, lock_reason='Locking for test')
134 """Tests host locking, some hosts not in self.locked_hosts."""
135 hosts = [self.HOST1, self.HOST2]
138 manager.lock(hosts, lock_reason='Locking for test')
144 """Tests host locking, all hosts in self.locked_hosts."""
145 hosts = [self.HOST1, self.HOST2]
146 self.manager.locked_hosts = set(hosts)
147 self.manager.lock(hosts)
148 self.assertEquals(set(hosts), self.manager.locked_hosts)
152 """Tests host unlocking, all hosts not in self.locked_hosts."""
153 hosts = [self.HOST2]
155 self.manager.unlock(hosts)
160 """Tests host locking, some hosts not in self.locked_hosts."""
161 hosts = [self.HOST1, self.HOST2]
164 manager.unlock(hosts)
169 """Tests host locking, all hosts in self.locked_hosts."""
170 hosts = [self.HOST1, self.HOST2]
173 manager.unlock(hosts)
179 hosts = set([self.HOST1])
188 self.manager._host_modifier(hosts, self.manager.LOCK,
196 hosts = set([self.HOST1])
205 self.manager._host_modifier(hosts, self.manager.UNLOCK)
211 hosts = set([self.HOST1])
221 self.manager._host_modifier(hosts, self.manager.LOCK)