'Check if the datastore is compliant with given profile.
:param datastore: datastore to check the compliance
:param profile_name: profile to check the compliance against
:return: True if the datastore is compliant; False otherwise
:raises ProfileNotFoundException:'

def is_datastore_compliant(self, datastore, profile_name):

    LOG.debug('Checking    datastore:    %(datastore)s    compliance    against    profile:    %(profile)s.', {'datastore': datastore, 'profile': profile_name})
    if (profile_name is None):
        return True
    profile_id = self.get_profile_id(profile_name)
    is_compliant = bool(self._filter_by_profile({datastore: None}, profile_id))
    LOG.debug('Compliance    is    %(is_compliant)s    for    datastore:    %(datastore)s    against    profile:    %(profile)s.', {'is_compliant': is_compliant, 'datastore': datastore, 'profile': profile_name})
    return is_compliant
