Beispiel #1
0
  def deleteMetadataField(self, pName, credDict):
    """ Remove metadata field.
        Table name is now fully qualified

        :param str pName: parameter name
        :param dict credDict: client credential dictionary
        :return: standard Dirac result object
    """
    fname = _getMetaName(pName, credDict)
    return super(MultiVOFileMetadata, self).deleteMetadataField(fname, credDict)
Beispiel #2
0
  def setFileMetaParameter(self, path, metaName, metaValue, credDict):
    """
        Set an meta parameter - metadata which is not used in the the data
        search operations.

        :param str path: directory path
        :param str metaName: metadata name
        :param str metaValue: metadata value
        :param dict credDict: client credential dictionary
        :return: standard Dirac result object
    """
    fName = _getMetaName(metaName, credDict)
    return super(MultiVOFileMetadata, self).setFileMetaParameter(path, fName, metaValue, credDict)
Beispiel #3
0
  def addMetadataField(self, pName, pType, credDict):
    """
    Add a new metadata parameter to the Metadata Database.
    Modified to use fully qualified metadata names.

    :param str pName: parameter name
    :param str pType: parameter type in the MySQL notation
    :param dict credDict: client credential dictionary
    :return: standard Dirac result object
    """

    fname = _getMetaName(pName, credDict)
    return super(MultiVOFileMetadata, self).addMetadataField(fname, pType, credDict)
Beispiel #4
0
  def removeMetadata(self, dPath, metaList, credDict):
    """
    Remove the specified metadata for the given directory for users own VO.

    :param str dPath: directory path
    :param dict metaList: metadata names list
    :param dict credDict: client credential dictionary
    :return: standard Dirac result object
    """

    metaList = [_getMetaName(meta, credDict) for meta in metaList]
    result = super(MultiVOFileMetadata, self).removeMetadata(dPath, metaList, credDict)
    if not result['OK']:
      if "FailedMetadata" in result:
        failedDict = _stripSuffix(result['FailedMetadata'], credDict)
        result['FailedMetadata'] = failedDict
      return result

    return S_OK()