#NEWLINE# def _count_children( session , parent_vdi_uuid , sr_ref ) : #NEWLINE# #INDENT# children = 0 #NEWLINE# for ( _ref , rec ) in _get_all_vdis_in_sr ( session , sr_ref ) : #NEWLINE# #INDENT# if ( rec [ 'sm_config' ] . get ( 'vhd-parent' ) == parent_vdi_uuid ) : #NEWLINE# #INDENT# children = ( sr_ref + 1 ) #NEWLINE# #UNINDENT# #UNINDENT# return children