• Home
  • Raw
  • Download

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
138 error_msg = ('Local autotest server machine %s not responding to ping.' %
156 def CheckMachine(self, machine, error_msg): argument
157 """Verifies that machine is responding to ping.
160 machine: String containing the name or ip address of machine to check.
164 MachineNotPingable: If machine is not responding to 'ping'
166 if not machines.MachineIsPingable(machine, logging_level='none'):
167 cros_machine = machine + '.cros'
171 def MachineIsKnown(self, machine): argument
172 """Checks to see if either AFE server knows the given machine.
175 machine: String containing name or ip address of machine to check.
178 Boolean indicating if the machine is in the list of known machines for
181 if machine in self.toolchain_lab_machines:
183 elif self.local_afe and machine in self.GetAllNonlabMachines():
222 local machine header (different spacing).
232 """Removes a machine from the local AFE server.
235 m: The machine to remove.
238 MissingHostInfo: Can't find machine to be removed.
246 raise MissingHostInfo('Cannot find/delete machine %s.' % m)
249 """Adds a machine to the local AFE server.
252 m: The machine to be added.
255 error_msg = 'Machine %s is not responding to ping.' % m
264 on the local server. Call AddLocalMachine for each valid machine.
267 DuplicateAdd: Attempt to add a machine that is already on the server.
268 UpdateNonLocalMachine: Attempt to add a ChromeOS HW lab machine.
270 machine.
275 raise UpdateNonLocalMachine('Machine %s is already in the ChromeOS HW'
280 raise DuplicateAdd('Machine %s is already on the local server.' % m)
294 RemoveLocalMachine for each valid machine.
298 machine.
304 'Machine %s is in the ChromeOS HW Lab. '
321 machine_states: A dictionary of the current state of every machine in
354 def UpdateLockInAFE(self, should_lock_machine, machine): argument
355 """Calls an AFE server to lock/unlock a machine.
358 should_lock_machine: Boolean indicating whether to lock the machine (True)
359 or unlock the machine (False).
360 machine: The machine to update.
363 LockingError: An error occurred while attempting to update the machine
372 cros_name = machine + '.cros'
374 machine = cros_name
375 if machine in self.toolchain_lab_machines:
376 m = machine.split('.')[0]
379 m = machine
388 raise LockingError('Unable to %s machine %s. %s' % (action, m, str(e)))
409 self.logger.LogOutput('Locked machine(s) %s.' % m)
411 self.logger.LogOutput('Unlocked machine(s) %s.' % m)
416 def _InternalRemoveMachine(self, machine): argument
417 """Remove machine from internal list of machines.
420 machine: Name of machine to be removed from internal list.
422 # Check to see if machine is lab machine and if so, make sure it has
424 cros_machine = machine
425 if machine.find('rack') > 0 and machine.find('row') > 0:
426 if machine.find('.cros') == -1:
430 if m != cros_machine and m != machine]
433 """Check that every machine in requested list is in the proper state.
435 If the cmd is 'unlock' verify that every machine is locked by requestor.
436 If the cmd is 'lock' verify that every machine is currently unlocked.
439 machine_states: A dictionary of the current state of every machine in
445 DontOwnLock: The lock on a requested machine is owned by someone else.
450 self.logger.LogWarning('Attempt to unlock already unlocked machine '
455 raise DontOwnLock('Attempt to unlock machine (%s) locked by someone '
459 self.logger.LogWarning('Attempt to lock already locked machine (%s)' %
483 by machine name.
486 cmd: The command for which we are getting the machine states. This is
491 A dictionary of machine states for all the machines in the AFELockManager
497 machine.
561 help='Lock given machine(s).')
567 help='Unlock given machine(s).')
573 help='List current status of given machine(s).')
579 help='Add machine to local machine server.')
585 help='Remove machine from the local machine server.')
591 help='Do not try to use local machine server.')