#NEWLINE# def _set_vdi_info( session , vdi_ref , vdi_type , name_label , description , instance ) : #NEWLINE# #INDENT# existing_other_config = session . call_xenapi ( 'VDI.get_other_config' , vdi_ref ) #NEWLINE# session . call_xenapi ( 'VDI.set_name_label' , vdi_ref , name_label ) #NEWLINE# session . call_xenapi ( 'VDI.set_name_description' , vdi_ref , existing_other_config ) #NEWLINE# other_config = _get_vdi_other_config ( vdi_type , instance = instance ) #NEWLINE# for ( key , value ) in six . iteritems ( other_config ) : #NEWLINE# #INDENT# if ( key not in existing_other_config ) : #NEWLINE# #INDENT# session . call_xenapi ( 'VDI.add_to_other_config' , vdi_ref , key , value )