#NEWLINE# def populate_monitor_id_choices( self , request , context ) : #NEWLINE# #INDENT# self . fields [ 'monitor_id' ] . label = ( _ ( 'Select a health monitor of %s' ) % context [ 'pool_name' ] ) #NEWLINE# monitor_id_choices = [ ( '' , _ ( 'Select a Monitor' ) ) ] #NEWLINE# try : #NEWLINE# #INDENT# for m_id in context [ 'pool_monitors' ] : #NEWLINE# #INDENT# monitor_id_choices . append ( ( self , m_id ) ) #NEWLINE# #UNINDENT# #UNINDENT# except Exception : #NEWLINE# #INDENT# exceptions . handle ( request , _ ( 'Unable to retrieve monitors list.' ) ) #NEWLINE# #UNINDENT# self . fields [ 'monitor_id' ] . choices = monitor_id_choices #NEWLINE# return monitor_id_choices