def associate_ip_address(zone_id, networks)
      params = {
          'command' => 'associateIpAddress',
          'zoneId' => zone_id
      }
      #Choose the first network from the list
      if networks.nil? || networks.empty?
        default_network = get_default_network(zone_id)
        params['networkId'] = default_network['id']
      else
        params['networkId'] = get_network(networks.first)['id']
      end
      Chef::Log.debug("associate ip params: #{params}")
      json = send_async_request(params)
      json['ipaddress']
    end
def associate_ip_address(zone_id, networks)
      params = {
          'command' => 'associateIpAddress',
          'zoneId' => zone_id
      }
      #Choose the first network from the list
      if networks.nil? || networks.empty?
        default_network = get_default_network(zone_id)
        params['networkId'] = default_network['id']
      else
        params['networkId'] = get_network(networks.first)['id']
      end
      Chef::Log.debug("associate ip params: #{params}")
      json = send_async_request(params)
      json['ipaddress']
    end
Acquires and associates a public IP to an account.