3 \�me � � @ s� d dl Z d dlZd dlZd dlZd dlmZ d dlmZmZm Z d dlm Z d dlmZm Z d dlmZmZ d dlmZ d dlmZ d d lmZ eje�Zeejg�Zd5Zd ZG dd� d�Zdd� Z ej!ej"gZ#G dd� de j$�Z%G dd� de%�Z&dd� Z'dd� Z(dd� Z)dd� Z*dd� Z+d d!� Z,d"d#� Z-d$d%� Z.d&d'� Z/d(d)� Z0d*d+� Z1d6d-d.�Z2d/d0� Z3d1d2� Z4e&e j5ffe%e j5e j6ffgZ7d3d4� Z8dS )7� N)�List)�dmi�net�sources)� url_helper)�util�warnings)� EventScope� EventType)�NoDHCPLeaseError)�EphemeralIPNetwork)�ec2� datasource�Ec2� strict_id�warnc @ s, e Zd ZdZdZdZdZdZdZdZ dZ d S ) � CloudNamesZaliyunZawsZ brightboxZzstack�e24cloudZoutscale�unknownzno-ec2-metadataN)�__name__� __module__�__qualname__�ALIYUN�AWS� BRIGHTBOX�ZSTACK�E24CLOUD�OUTSCALE�UNKNOWN�NO_EC2_METADATA� r r �#/usr/lib/python3.6/DataSourceEc2.pyr ! s r c C s | j dkod| jkS )Ni� zmeta-data/tags/)�code�url)� exceptionr r r! �skip_404_tag_errors1 s r% c sx e Zd ZU dZdddgZdZdddgZee d Z d Z dZej ZdZejejejejejhiZ� fd d�Zdd� Zdd� Zdd� Zedd� �Zedd� �Zedd� �Zedd� �Z edd� �Z!edd � �Z"ed!d"� �Z#d#d$� Z$d%d&� Z%d'd(� Z&d)d*� Z'd+d,� Z(ed-d.� �Z)ed/d0� �Z*d1d2� Z+ed3d4� �Z,e� fd5d6��Z-d7d8� Z.dDd9d:�Z/d;d<� Z0d=d>� Z1dEd?d@�Z2dFdBdC�Z3� Z4S )G� DataSourceEc2r zhttp://169.254.169.254zhttp://[fd00:ec2::254]zhttp://instance-data.:8773z 2009-04-04z 2021-03-23z 2018-09-24z 2016-09-02�x �2 NFc s t t| �j|||� d | _d S )N)�superr&