Exemplo n.º 1
0
 def list_datasets(self, **kwargs):
     """
     Controller to get DBS datasets
     """
     url = dbs_url()
     if url.find('cmsdbsprod') != -1:  # DBS2
         return dbs2.list_datasets(kwargs)
     url = dbs_url('datasets')
     params = {'dataset': kwargs['dataset']}
     if kwargs['dataset'][0] == '*':
         kwargs['dataset'] = '/' + kwargs['dataset']
     data = get_data(url, kwargs)
     plist = [Dataset(d) for d in data]
     return plist
Exemplo n.º 2
0
 def list_datasets(self, **kwargs):
     """
     Controller to get DBS datasets
     """
     url = dbs_url()
     if url.find("cmsdbsprod") != -1:  # DBS2
         return dbs2.list_datasets(kwargs)
     url = dbs_url("datasets")
     params = {"dataset": kwargs["dataset"]}
     if kwargs["dataset"][0] == "*":
         kwargs["dataset"] = "/" + kwargs["dataset"]
     data = get_data(url, kwargs)
     plist = [Dataset(d) for d in data]
     return plist
Exemplo n.º 3
0
Arquivo: cmsfs.py Projeto: dmwm/cmssh
 def list_datasets(self, **kwargs):
     """
     Controller to get DBS datasets
     """
     url = dbs_url()
     if  url.find('cmsdbsprod') != -1: # DBS2
         return dbs2.list_datasets(kwargs)
     url = dbs_url('datasets')
     params = {'dataset':kwargs.get('dataset', '*')}
     if  kwargs['dataset'][0] == '*':
         kwargs['dataset'] = '/' + kwargs['dataset']
     if  kwargs.has_key('file'):
         kwargs['logical_file_name'] = kwargs['file']
         del kwargs['file']
     data = get_data(url, kwargs)
     plist = [Dataset(d) for d in data]
     return plist