def filter_attributes(resource_type):
    """Returns a list of attributes for a given resource type.

    :param str resource_type: type of resource whose list of attributes we want
        to extract. Valid values are 'adminTask', 'task', 'adminVApp', 'vApp'
        and 'adminCatalogItem', 'catalogItem'.

    :return: the list of attributes that are relevant for the given resource
        type.

    :rtype: list
    """
    attributes = None
    if resource_type in ['adminTask', 'task']:
        attributes = ['id', 'name', 'objectName', 'status', 'startDate']
    elif resource_type in ['adminVApp', 'vApp']:
        attributes = [
            'id', 'name', 'numberOfVMs', 'status', 'numberOfCpus',
            'memoryAllocationMB', 'storageKB', 'ownerName', 'isDeployed',
            'isEnabled', 'vdcName'
        ]
    elif resource_type in ['adminCatalogItem', 'catalogItem']:
        attributes = [
            'id', 'name', 'catalogName', 'storageKB', 'status', 'entityType',
            'vdcName', 'isPublished', 'ownerName'
        ]
    return attributes