def validateOutputDatasets(outDsets, dbsUrl): """ Validate output datasets after all the other arguments have been locally update during assignment. """ if len(outDsets) != len(set(outDsets)): msg = "Output dataset contains duplicates and it has to be fixed! %s" % outDsets raise InvalidSpecParameterValue(msg) datatier = [] for dataset in outDsets: procds, tier = dataset.split("/")[2:] datatier.append(tier) try: procdataset(procds) except AssertionError as ex: msg = "Bad output dataset name, check the processed dataset name.\n %s" % str( ex) raise InvalidSpecParameterValue(msg) # TODO: this url conversion below can be removed in one year from now, thus March 2022 dbsUrl = dbsUrl.replace("cmsweb.cern.ch", "cmsweb-prod.cern.ch") # Verify whether the output datatiers are available in DBS _validateDatatier(datatier, dbsUrl)
def validateOutputDatasets(outDsets, dbsUrl): """ Validate output datasets after all the other arguments have been locally update during assignment """ datatier = [] for dataset in outDsets: tokens = dataset.split("/") procds = tokens[2] datatier.append(tokens[3]) try: procdataset(procds) except AssertionError as ex: msg = "Bad output dataset name, check the processed dataset.\n %s" % str(ex) raise InvalidSpecParameterValue(msg) # Verify whether the output datatiers are available in DBS _validateDatatier(datatier, dbsUrl)
def validateOutputDatasets(outDsets, dbsUrl): """ Validate output datasets after all the other arguments have been locally update during assignment. """ if len(outDsets) != len(set(outDsets)): msg = "Output dataset contains duplicates and it has to be fixed! %s" % outDsets raise InvalidSpecParameterValue(msg) datatier = [] for dataset in outDsets: procds, tier = dataset.split("/")[2:] datatier.append(tier) try: procdataset(procds) except AssertionError as ex: msg = "Bad output dataset name, check the processed dataset name.\n %s" % str(ex) raise InvalidSpecParameterValue(msg) # Verify whether the output datatiers are available in DBS _validateDatatier(datatier, dbsUrl)