def start_instance()

in gce_rescue/tasks/operations.py [0:0]


def start_instance(vm: Instance) -> str:
  """Start instance."""

  _logger.info(f'Starting {vm.name}...')
  if vm.status == 'RUNNING':
    _logger.info(f'{vm.name} is already runnning.')
    return

  operation = vm.compute.instances().start(
    **vm.project_data,
    instance = vm.name).execute()
  result = wait_for_operation(vm, oper=operation)

  if result['status'] == 'DONE':
    vm.status = 'RUNNING'
  return vm.status