Current Path : /usr/lib/python2.7/dist-packages/landscape/lib/ |
Current File : //usr/lib/python2.7/dist-packages/landscape/lib/cloud.pyc |
ó ÍÿŠTc @ sE d d l m Z d Z d e f Z d Z d d „ Z d d „ Z d S( iÿÿÿÿ( t fetch_asyncs 169.254.169.254s http://%s/latesti@ c sj g ‰ t d ˆ ˆ ƒ } | j ‡ ‡ f d † ƒ | j ‡ ‡ f d † ƒ ‡ f d † } | j | ƒ | S( s Fetch EC2 information about the cloud instance. The C{fetch} parameter provided above is non-mocker testing purposes. s instance-idc s t d ˆ ˆ ƒ S( Ns instance-type( t _fetch_ec2_item( t ignore( t cloud_datat fetch( s7 /usr/lib/python2.7/dist-packages/landscape/lib/cloud.pyt <lambda> s c s t d ˆ ˆ ƒ S( Ns ami-id( R ( R ( R R ( s7 /usr/lib/python2.7/dist-packages/landscape/lib/cloud.pyR s c sC d „ } ˆ \ } } } i | | ƒ d 6| | ƒ d 6| | ƒ d 6S( s1 Record the instance data returned by the EC2 API.c S s! | d k r | j d ƒ t Sd S( Ns utf-8( t Nonet decodet MAX_LENGTH( t value( ( s7 /usr/lib/python2.7/dist-packages/landscape/lib/cloud.pyt _process_result s s instance-ids ami-ids instance-type( ( R R t instance_idt instance_typet ami_id( R ( s7 /usr/lib/python2.7/dist-packages/landscape/lib/cloud.pyt return_result s ( R t addCallback( R t deferredR ( ( R R s7 /usr/lib/python2.7/dist-packages/landscape/lib/cloud.pyt fetch_ec2_meta_data s c C s? t d | } | d k r# t } n | | d t ƒj | j ƒ S( sž Get data at C{path} on the EC2 API endpoint, and add the result to the C{accumulate} list. The C{fetch} parameter is provided for testing only. s /meta-data/t followN( t EC2_APIR R t FalseR t append( t patht accumulateR t url( ( s7 /usr/lib/python2.7/dist-packages/landscape/lib/cloud.pyR &