src/build/fuchsia/device_target.py
def __ProvisionDevice(self):
    """Netboots a device with Fuchsia. If |_node_name| is set, then only a
    device with a matching node name is used.

    The device is up and reachable via SSH when the function is successfully
    completes."""

    bootserver_path = GetHostToolPathFromPlatform('bootserver')
    bootserver_command = [
        bootserver_path,
        '-1',
        '--fvm',
        EnsurePathExists(
            boot_data.GetTargetFile('storage-sparse.blk',
                                    self._GetTargetSdkArch(),
                                    boot_data.TARGET_TYPE_GENERIC)),
        EnsurePathExists(boot_data.GetBootImage(self._output_dir,
                                                self._GetTargetSdkArch(),
                                                boot_data.TARGET_TYPE_GENERIC))]

    if self._node_name:
      bootserver_command += ['-n', self._node_name]

    bootserver_command += ['--']
    bootserver_command += boot_data.GetKernelArgs(self._output_dir)

    logging.debug(' '.join(bootserver_command))
    stdout = subprocess.check_output(bootserver_command,
                                     stderr=subprocess.STDOUT)

    # Parse the nodename from bootserver stdout.
    m = re.search(r'.*Proceeding with nodename (?P<nodename>.*)$', stdout,
                  re.MULTILINE)
    if not m:
      raise Exception('Couldn\'t parse nodename from bootserver output.')
    self._node_name = m.groupdict()['nodename']
    logging.info('Booted device "%s".' % self._node_name)

    # Repeatdly query mDNS until we find the device, or we hit the timeout of
    # DISCOVERY_TIMEOUT_SECS.
    logging.info('Waiting for device to join network.')
    for _ in xrange(_BOOT_DISCOVERY_ATTEMPTS):
      if self.__Discover():
        break

    if not self._host:
      raise Exception('Device %s couldn\'t be discovered via mDNS.' %
                      self._node_name)

    self._WaitUntilReady();

    # Update the target's hash to match the current tree's.
    self.PutFile(os.path.join(SDK_ROOT, '.hash'), TARGET_HASH_FILE_PATH)
Netboots a device with Fuchsia. If |_node_name| is set, then only a
    device with a matching node name is used.

    The device is up and reachable via SSH when the function is successfully
    completes.
Netboots a device with Fuchsia. If |_node_name| is set, then only a
device with a matching node name is used.

The device is up and reachable via SSH when the function is successfully
completes.
Netboots a device with Fuchsia . If |_node_name| is set then only a device with a matching node name is used . The device is up and reachable via SSH when the function is successfully completes .
def __ProvisionDevice(self):
    bootserver_path = GetHostToolPathFromPlatform('bootserver')
    bootserver_command = [
        bootserver_path,
        '-1',
        '--fvm',
        EnsurePathExists(
            boot_data.GetTargetFile('storage-sparse.blk',
                                    self._GetTargetSdkArch(),
                                    boot_data.TARGET_TYPE_GENERIC)),
        EnsurePathExists(boot_data.GetBootImage(self._output_dir,
                                                self._GetTargetSdkArch(),
                                                boot_data.TARGET_TYPE_GENERIC))]
    if self._node_name:
      bootserver_command += ['-n', self._node_name]
    bootserver_command += ['--']
    bootserver_command += boot_data.GetKernelArgs(self._output_dir)
    logging.debug(' '.join(bootserver_command))
    stdout = subprocess.check_output(bootserver_command,
                                     stderr=subprocess.STDOUT)
    m = re.search(r'.*Proceeding with nodename (?P<nodename>.*)$', stdout,
                  re.MULTILINE)
    if not m:
      raise Exception('Couldn\'t parse nodename from bootserver output.')
    self._node_name = m.groupdict()['nodename']
    logging.info('Booted device "%s".' % self._node_name)
    logging.info('Waiting for device to join network.')
    for _ in xrange(_BOOT_DISCOVERY_ATTEMPTS):
      if self.__Discover():
        break
    if not self._host:
      raise Exception('Device %s couldn\'t be discovered via mDNS.' %
                      self._node_name)
    self._WaitUntilReady();
    self.PutFile(os.path.join(SDK_ROOT, '.hash'), TARGET_HASH_FILE_PATH)
def __ProvisionDevice ( self ) : bootserver_path = GetHostToolPathFromPlatform ( 'bootserver' ) bootserver_command = [ bootserver_path , '-1' , '--fvm' , EnsurePathExists ( boot_data . GetTargetFile ( 'storage-sparse.blk' , self . _GetTargetSdkArch ( ) , boot_data . TARGET_TYPE_GENERIC ) ) , EnsurePathExists ( boot_data . GetBootImage ( self . _output_dir , self . _GetTargetSdkArch ( ) , boot_data . TARGET_TYPE_GENERIC ) ) ] if self . _node_name : bootserver_command += [ '-n' , self . _node_name ] bootserver_command += [ '--' ] bootserver_command += boot_data . GetKernelArgs ( self . _output_dir ) logging . debug ( ' ' . join ( bootserver_command ) ) stdout = subprocess . check_output ( bootserver_command , stderr = subprocess . STDOUT ) m = re . search ( r'.*Proceeding with nodename (?P<nodename>.*)$' , stdout , re . MULTILINE ) if not m : raise Exception ( 'Couldn\'t parse nodename from bootserver output.' ) self . _node_name = m . groupdict ( ) [ 'nodename' ] logging . info ( 'Booted device "%s".' % self . _node_name ) logging . info ( 'Waiting for device to join network.' ) for _ in xrange ( _BOOT_DISCOVERY_ATTEMPTS ) : if self . __Discover ( ) : break if not self . _host : raise Exception ( 'Device %s couldn\'t be discovered via mDNS.' % self . _node_name ) self . _WaitUntilReady ( ) ; self . PutFile ( os . path . join ( SDK_ROOT , '.hash' ) , TARGET_HASH_FILE_PATH )
Netboots a device with Fuchsia.
Netboots a device with Fuchsia .
"""Netboots a device with Fuchsia. If |_node_name| is set, then only a
    device with a matching node name is used.

    The device is up and reachable via SSH when the function is successfully
    completes.""" # Parse the nodename from bootserver stdout. # Repeatdly query mDNS until we find the device, or we hit the timeout of # DISCOVERY_TIMEOUT_SECS. # Update the target's hash to match the current tree's.
self