cloud_ips.go
func (c *Client) MapCloudIPtoServer(identifier string, serverid string) error {
	server, err := c.Server(serverid)
	if err != nil {
		return err
	}
	if len(server.Interfaces) == 0 {
		return fmt.Errorf("Server %s has no interfaces to map cloud ip %s to", server.Id, identifier)
	}
	destination := server.Interfaces[0].Id
	err = c.MapCloudIP(identifier, destination)
	if err != nil {
		return err
	}
	return nil
}
func (c *Client) MapCloudIPtoServer(identifier string, serverid string) error {
	server, err := c.Server(serverid)
	if err != nil {
		return err
	}
	if len(server.Interfaces) == 0 {
		return fmt.Errorf("Server %s has no interfaces to map cloud ip %s to", server.Id, identifier)
	}
	destination := server.Interfaces[0].Id
	err = c.MapCloudIP(identifier, destination)
	if err != nil {
		return err
	}
	return nil
}
func ( c * Client ) MapCloudIPtoServer ( identifier string , serverid string ) error { server , err := c . Server ( serverid ) if err != nil { return err } if len ( server . Interfaces ) == 0 { return fmt . Errorf ( " " , server . Id , identifier ) } destination := server . Interfaces [ 0 ] . Id err = c . MapCloudIP ( identifier , destination ) if err != nil { return err } return nil }
// MapCloudIPtoServer is a convenience method to map a Cloud IP to a
// server. First looks up the server to get the network interface id. Uses the
// first interface found.
MapCloudIPtoServer is a convenience method to map a Cloud IP to a server . First looks up the server to get the network interface id . Uses the first interface found .