File: //lib/python3/dist-packages/cloudinit/sources/__pycache__/DataSourceScaleway.cpython-310.pyc
o
x[h�: � @ s. d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlZd dlm Z d dl
mZ d dlm
Z
d dlmZmZmZmZmZ d dlmZmZ d dlmZ d d lmZmZ d d
lmZ d dlmZ e� e!�Z"dd
gZ#dZ$dZ%dZ&G dd� dej'j(�Z)dd� Z*dd� Z+G dd� dej,�Z-e-ej.ffgZ/dd� Z0dS )� N)�urlparse)�ConnectionError)�HTTPConnection)�PoolManager)�dmi�performance�sources�
url_helper�util)�
EventScope� EventType)�NoDHCPLeaseError)�EphemeralDHCPv4�EphemeralIPv6Network)�DataSourceHostname)�ProcessExecutionErrorzhttp://169.254.42.42zhttp://[fd00:42::42]� � �
c s* e Zd ZdZ� fdd�Zddd�Z� ZS )�SourceAddressAdapterzF
Adapter for requests to choose the local address to bind to.
c s || _ tt| �jdi |�� d S )N� )�source_address�superr �__init__)�selfr �kwargs�� __class__r �F/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceScaleway.pyr + s zSourceAddressAdapter.__init__Fc C s0 t jtjtjdfg }t|||| j|d�| _d S )N� )� num_pools�maxsize�blockr �socket_options)r �default_socket_options�socket�
SOL_SOCKET�SO_REUSEPORTr r �poolmanager)r �connectionsr! r"