Пример #1
0
func WaitForSSH(d Driver) error {
	if err := utils.WaitFor(sshAvailableFunc(d)); err != nil {
		fmt.Errorf("Too many retries waiting for SSH to be available.  Last error: %s", err)
	}

	return nil
}
Пример #2
0
func waitForReady(virtualGuestId int) error {
	fmt.Fprintf(os.Stderr, "Waiting for machine %d to be running, this may take a few minutes...\n", virtualGuestId)

	if err := utils.WaitFor(WaitForVirtualGuestToRunning(virtualGuestId)); err != nil {
		return fmt.Errorf("Error waiting for machine %d to be running: %s", virtualGuestId, err)
	}

	return nil
}
Пример #3
0
func waitForReady(host *host.Host) error {
	fmt.Fprintf(os.Stderr, "Waiting for machine %s to be running, this may take a few minutes...\n", host.Name)

	if err := utils.WaitFor(drivers.MachineInState(host.Driver, state.Running)); err != nil {
		return fmt.Errorf("Error waiting for machine %s to be running: %s", host.Name, err)
	}

	fmt.Fprintf(os.Stderr, "Machine %s is running, waiting for SSH to be available ...\n", host.Name)

	if err := drivers.WaitForSSH(host.Driver); err != nil {
		return fmt.Errorf("Error waiting %s for SSH: %s", host.Name, err)
	}

	return nil
}
Пример #4
0
			fmt.Println("PreCheck...", err)

			err = sl_driver.Create()

			//			real_driver.Id = 16407243

			fmt.Println("Create...", err)

			Expect(err).To(BeNil())

			if err != nil {
				fmt.Println("Create Error", err)
			}

			if err == nil {
				if err = utils.WaitFor(drivers.MachineInState(sl_driver, state.Running)); err != nil {
					fmt.Printf("Error waiting for machine %s to be running: %s\n", real_driver.MachineName, err)
				}
			}

			sshHostname, err := sl_driver.GetSSHHostname()

			fmt.Println(sshHostname)

			fmt.Println(err)

		})
	})
})