Пример #1
0
func (d *Driver) Remove() error {
	if err := d.setUserSubscription(); err != nil {
		return err
	}

	if available, _, err := vmClient.CheckHostedServiceNameAvailability(d.MachineName); err != nil {
		return err
	} else if available {
		return nil
	}

	return vmClient.DeleteHostedService(d.MachineName)
}
Пример #2
0
func (driver *Driver) Remove() error {
	err := driver.setUserSubscription()
	if err != nil {
		return err
	}
	available, _, err := vmClient.CheckHostedServiceNameAvailability(driver.Name)
	if err != nil {
		return err
	}
	if available {
		return nil
	}

	log.Debugf("removing %s", driver.Name)

	err = vmClient.DeleteHostedService(driver.Name)
	if err != nil {
		return err
	}

	return nil
}