'Retrieves properties based on the type.'

def _retrieve_properties(self, method, *args, **kwargs):

    spec_set = kwargs.get('specSet')[0]
    spec_type = spec_set.propSet[0].type
    properties = spec_set.propSet[0].pathSet
    if (not isinstance(properties, list)):
        properties = properties.split()
    objs = spec_set.objectSet
    lst_ret_objs = FakeRetrieveResult()
    for obj in objs:
        try:
            obj_ref = obj.obj
            if (obj_ref == 'RootFolder'):
                mdo_refs = _db_content[spec_type]
            elif (obj_ref.type != spec_type):
                parent_mdo = _db_content[obj_ref.type][obj_ref]
                path = obj.selectSet[0].path
                mdo_refs = parent_mdo.get(path).ManagedObjectReference
            else:
                mdo_refs = [obj_ref]
            for mdo_ref in mdo_refs:
                mdo = _db_content[spec_type][mdo_ref]
                prop_list = []
                for prop_name in properties:
                    prop = Prop(prop_name, mdo.get(prop_name))
                    prop_list.append(prop)
                obj_content = ObjectContent(mdo.obj, prop_list)
                lst_ret_objs.add_object(obj_content)
        except Exception:
            LOG.exception('_retrieve_properties    error')
            continue
    return lst_ret_objs
