#NEWLINE# def _initialize_controller_slot_counter( self , instance , vm_gen ) : #NEWLINE# #INDENT# free_slots_by_device_type = { #NEWLINE# #INDENT# constants . CTRL_TYPE_IDE : ( [ os_win_const . IDE_CONTROLLER_SLOTS_NUMBER ] * 2 ) , #NEWLINE# constants . CTRL_TYPE_SCSI : [ os_win_const . SCSI_CONTROLLER_SLOTS_NUMBER ] , #NEWLINE# #UNINDENT# } #NEWLINE# if configdrive . required_by ( self ) : #NEWLINE# #INDENT# if ( vm_gen == constants . VM_GEN_1 ) : #NEWLINE# #INDENT# free_slots_by_device_type [ constants . CTRL_TYPE_IDE ] [ 1 ] -= 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# free_slots_by_device_type [ constants . CTRL_TYPE_SCSI ] [ 0 ] -= 1 #NEWLINE# #UNINDENT# #UNINDENT# return free_slots_by_device_type