def get_mor_by_property(service_instance, object_type, property_value, property_name='name', container_ref=None):
 object_list = get_mors_with_properties(service_instance, object_type, property_list=[property_name], container_ref=container_ref)
 for obj in object_list:
  obj_id = str(obj.get('object', '')).strip('\'"')
  if ((obj[property_name] == property_value) or (property_value == obj_id)):
   return obj['object']
 return None

def get_mor_by_property ( service_instance , object_type , property_value , property_name = 'name' , container_ref = None ) : object_list = get_mors_with_properties ( service_instance , object_type , property_list = [ property_name ] , container_ref = container_ref ) for obj in object_list : obj_id = str ( obj . get ( 'object' , '' ) ) . strip ( '\'"' ) if ( ( obj [ property_name ] == property_value ) or ( property_value == obj_id ) ) : return obj [ 'object' ] return None
returns the first managed object reference having the specified property value .