#NEWLINE# def __enter__( self ) : #NEWLINE# #INDENT# context = self . _config . context #NEWLINE# if context . ami . get ( 'suffix' , None ) : #NEWLINE# #INDENT# environ [ 'AMINATOR_AMI_SUFFIX' ] = context . ami . suffix #NEWLINE# #UNINDENT# if context . ami . get ( 'creator' , None ) : #NEWLINE# #INDENT# environ [ 'AMINATOR_CREATOR' ] = context . ami . creator #NEWLINE# #UNINDENT# if context . ami . get ( 'vm_type' , None ) : #NEWLINE# #INDENT# environ [ 'AMINATOR_VM_TYPE' ] = context . ami . vm_type #NEWLINE# #UNINDENT# if context . ami . get ( 'enhanced_networking' , None ) : #NEWLINE# #INDENT# environ [ 'AMINATOR_ENHANCED_NETWORKING' ] = str ( int ( context . ami . enhanced_networking ) ) #NEWLINE# #UNINDENT# if context . ami . get ( 'enhanced_networking' , False ) : #NEWLINE# #INDENT# if ( context . ami . get ( 'vm_type' , 'paravirtual' ) != 'hvm' ) : #NEWLINE# #INDENT# raise ValueError ( '--enhanced-networking requires --vm-type hvm' ) #NEWLINE# #UNINDENT# #UNINDENT# return self