Repository: rucio/rucio

Issue:
Introduce BelleII activities
Motivation
----------
Introduce BelleII activities





Discussion:

Resolving patch:
diff --git a/lib/rucio/api/dirac.py b/lib/rucio/api/dirac.py
--- a/lib/rucio/api/dirac.py
+++ b/lib/rucio/api/dirac.py
@@ -26,7 +26,6 @@
 from rucio.core.scope import list_scopes
 from rucio.core import dirac
 from rucio.common.exception import AccessDenied
-from rucio.common.types import InternalAccount
 from rucio.common.utils import extract_scope
 
 
@@ -67,5 +66,4 @@ def add_files(lfns, issuer, ignore_availability):
     if not has_permission(issuer=issuer, action='add_dids', kwargs=kwargs):
         raise AccessDenied('Account %s can not bulk add data identifier' % (issuer))
 
-    issuer = InternalAccount(issuer)
     dirac.add_files(lfns=lfns, account=issuer, ignore_availability=ignore_availability, session=None)
diff --git a/lib/rucio/common/schema/belleii.py b/lib/rucio/common/schema/belleii.py
--- a/lib/rucio/common/schema/belleii.py
+++ b/lib/rucio/common/schema/belleii.py
@@ -41,12 +41,12 @@
 
 ACTIVITY = {"description": "Activity name",
             "type": "string",
-            "enum": ["Data Brokering", "Data Consolidation", "Data rebalancing",
-                     "Debug", "Express", "Functional Test", "Group Subscriptions",
-                     "Production Input", "Production Output",
+            "enum": ["Data Consolidation", "Data Rebalancing",
+                     "Functional Test", "Functional Test WebDAV", "Recovery",
+                     "Production Input", "Production Output", "Production Merge",
                      "Analysis Input", "Analysis Output", "Staging",
-                     "T0 Export", "T0 Tape", "Upload/Download (Job)",
-                     "Upload/Download (User)", "User Subscriptions"]}
+                     "Raw Export", "Upload/Download (Job)", "Upload/Download (User)",
+                     "User Merge", "User Transfers"]}
 
 SCOPE_LENGTH = 25
 
diff --git a/lib/rucio/core/dirac.py b/lib/rucio/core/dirac.py
--- a/lib/rucio/core/dirac.py
+++ b/lib/rucio/core/dirac.py
@@ -70,7 +70,6 @@ def add_files(lfns, account, ignore_availability, session=None):
     for lfn in lfns:
         # First chekck if the file exists
         filename = lfn['lfn']
-        print(filename)
         lfn_scope, _ = extract_scope(filename, scopes)
         lfn_scope = InternalScope(lfn_scope)
         if _exists(lfn_scope, filename):
@@ -118,18 +117,16 @@ def add_files(lfns, account, ignore_availability, session=None):
             files['pfn'] = str(pfn)
         if guid:
             files['meta'] = {'guid': guid}
-        res = add_replicas(rse_id=rse_id,
-                           files=[files],
-                           dataset_meta=None,
-                           account=account,
-                           ignore_availability=ignore_availability,
-                           session=session)
+        add_replicas(rse_id=rse_id,
+                     files=[files],
+                     dataset_meta=None,
+                     account=account,
+                     ignore_availability=ignore_availability,
+                     session=session)
         attachments.append({'scope': dsn_scope, 'name': dsn_name, 'dids': [{'scope': lfn_scope, 'name': filename}]})
-        print(res)
 
         # Now loop over the ascendants of the dataset and created them
         for lpn in lpns[1:]:
-            print('HERE')
             child_scope, _ = extract_scope(lpn, scopes)
             child_scope = InternalScope(child_scope)
             if (lpn not in exist_lfn) and (not _exists(child_scope, lpn)):
@@ -150,7 +147,6 @@ def add_files(lfns, account, ignore_availability, session=None):
                 parent_scope, _ = extract_scope(parent_name, scopes)
                 parent_scope = InternalScope(parent_scope)
                 attachments.append({'scope': parent_scope, 'name': parent_name, 'dids': [{'scope': child_scope, 'name': lpn}]})
-        print(attachments)
     # Finally attach everything
     attach_dids_to_dids(attachments,
                         account=account,


Test patch: