func (d *Driver) ipAddress() (ip string, err error) {
	c, err := d.newAzureClient()
	if err != nil {
		return "", err
	}

	var ipType string
	if d.UsePrivateIP || d.NoPublicIP {
		ipType = "Private"
		ip, err = c.GetPrivateIPAddress(d.ResourceGroup, d.naming().NIC())
	} else {
		ipType = "Public"
		ip, err = c.GetPublicIPAddress(d.ResourceGroup,
			d.naming().IP(),
			d.DNSLabel != "")
	}

	log.Debugf("Retrieving %s IP address...", ipType)
	if err != nil {
		return "", fmt.Errorf("Error querying %s IP: %v", ipType, err)
	}
	if ip == "" {
		log.Debugf("%s IP address is not yet allocated.", ipType)
	}
	return ip, nil
}
func (d *Driver) ipAddress() (ip string, err error) {
	c, err := d.newAzureClient()
	if err != nil {
		return "", err
	}

	var ipType string
	if d.UsePrivateIP || d.NoPublicIP {
		ipType = "Private"
		ip, err = c.GetPrivateIPAddress(d.ResourceGroup, d.naming().NIC())
	} else {
		ipType = "Public"
		ip, err = c.GetPublicIPAddress(d.ResourceGroup,
			d.naming().IP(),
			d.DNSLabel != "")
	}

	log.Debugf("Retrieving %s IP address...", ipType)
	if err != nil {
		return "", fmt.Errorf("Error querying %s IP: %v", ipType, err)
	}
	if ip == "" {
		log.Debugf("%s IP address is not yet allocated.", ipType)
	}
	return ip, nil
}
func ( d * Driver ) ipAddress ( ) ( ip string , err error ) { c , err := d . newAzureClient ( ) if err != nil { return " " , err } var ipType string if d . UsePrivateIP || d . NoPublicIP { ipType = " " ip , err = c . GetPrivateIPAddress ( d . ResourceGroup , d . naming ( ) . NIC ( ) ) } else { ipType = " " ip , err = c . GetPublicIPAddress ( d . ResourceGroup , d . naming ( ) . IP ( ) , d . DNSLabel != " " ) } log . Debugf ( " " , ipType ) if err != nil { return " " , fmt . Errorf ( " " , ipType , err ) } if ip == " " { log . Debugf ( " " , ipType ) } return ip , nil }
// ipAddress returns machine’s private or public IP address according to the
// configuration. If no IP address is found it returns empty string.
ipAddress returns machine’s private or public IP address according to the configuration . If no IP address is found it returns empty string .