Lines Matching full:machine
23 """Raised when machine does not respond to ping."""
27 """Raised when cannot find info about machine on machine servers."""
31 """Raised when user requests to add/remove a ChromeOS HW Lab machine.."""
35 """Raised when user requests to add a machine that's already on the server."""
39 """Raised when attempt to add/remove a machine from local server fails."""
43 """Raised when server fails to lock/unlock machine as requested."""
47 """Raised when user attmepts to unlock machine locked by someone else."""
56 """Raised when cannot get information about lab machine from lab server."""
74 in the Python virtual machine (and signal handling) and cannot be changed.
89 remotes: A list of machine names or ip addresses to be managed. Names
93 a machine that was locked by someone else.
95 local_server: A string containing the name or ip address of the machine
139 error_msg = ('Local autotest server machine %s not responding to ping.' %
157 def CheckMachine(self, machine, error_msg): argument
158 """Verifies that machine is responding to ping.
161 machine: String containing the name or ip address of machine to check.
165 MachineNotPingable: If machine is not responding to 'ping'
167 if not machines.MachineIsPingable(machine, logging_level='none'):
168 cros_machine = machine + '.cros'
172 def MachineIsKnown(self, machine): argument
173 """Checks to see if either AFE server knows the given machine.
176 machine: String containing name or ip address of machine to check.
179 Boolean indicating if the machine is in the list of known machines for
182 if machine in self.toolchain_lab_machines:
184 elif self.local_afe and machine in self.GetAllNonlabMachines():
223 local machine header (different spacing).
233 """Removes a machine from the local AFE server.
236 m: The machine to remove.
239 MissingHostInfo: Can't find machine to be removed.
247 raise MissingHostInfo('Cannot find/delete machine %s.' % m)
250 """Adds a machine to the local AFE server.
253 m: The machine to be added.
256 error_msg = 'Machine %s is not responding to ping.' % m
265 on the local server. Call AddLocalMachine for each valid machine.
268 DuplicateAdd: Attempt to add a machine that is already on the server.
269 UpdateNonLocalMachine: Attempt to add a ChromeOS HW lab machine.
271 machine.
277 'Machine %s is already in the ChromeOS HW'
281 raise DuplicateAdd('Machine %s is already on the local server.' % m)
295 RemoveLocalMachine for each valid machine.
299 machine.
305 'Machine %s is in the ChromeOS HW Lab. '
322 machine_states: A dictionary of the current state of every machine in
355 def UpdateLockInAFE(self, should_lock_machine, machine): argument
356 """Calls an AFE server to lock/unlock a machine.
359 should_lock_machine: Boolean indicating whether to lock the machine (True)
360 or unlock the machine (False).
361 machine: The machine to update.
364 LockingError: An error occurred while attempting to update the machine
373 cros_name = machine + '.cros'
375 machine = cros_name
376 if machine in self.toolchain_lab_machines:
377 m = machine.split('.')[0]
380 m = machine
390 raise LockingError('Unable to %s machine %s. %s' % (action, m, str(e)))
411 self.logger.LogOutput('Locked machine(s) %s.' % m)
413 self.logger.LogOutput('Unlocked machine(s) %s.' % m)
418 def _InternalRemoveMachine(self, machine): argument
419 """Remove machine from internal list of machines.
422 machine: Name of machine to be removed from internal list.
424 # Check to see if machine is lab machine and if so, make sure it has
426 cros_machine = machine
427 if machine.find('rack') > 0 and machine.find('row') > 0:
428 if machine.find('.cros') == -1:
432 m for m in self.machines if m != cros_machine and m != machine
436 """Check that every machine in requested list is in the proper state.
438 If the cmd is 'unlock' verify that every machine is locked by requestor.
439 If the cmd is 'lock' verify that every machine is currently unlocked.
442 machine_states: A dictionary of the current state of every machine in
448 DontOwnLock: The lock on a requested machine is owned by someone else.
453 self.logger.LogWarning('Attempt to unlock already unlocked machine '
458 raise DontOwnLock('Attempt to unlock machine (%s) locked by someone '
463 'Attempt to lock already locked machine (%s)' % k)
486 by machine name.
489 cmd: The command for which we are getting the machine states. This is
494 A dictionary of machine states for all the machines in the AFELockManager
500 machine.
564 help='Lock given machine(s).')
570 help='Unlock given machine(s).')
576 help='List current status of given machine(s).')
582 help='Add machine to local machine server.')
588 help='Remove machine from the local machine server.')
594 help='Do not try to use local machine server.')