rucio 35.7.0__py3-none-any.whl → 37.0.0rc2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rucio might be problematic. Click here for more details.
- rucio/alembicrevision.py +1 -1
- rucio/{daemons/c3po/collectors → cli}/__init__.py +1 -0
- rucio/cli/account.py +216 -0
- rucio-35.7.0.data/scripts/rucio → rucio/cli/bin_legacy/rucio.py +769 -486
- rucio-35.7.0.data/scripts/rucio-admin → rucio/cli/bin_legacy/rucio_admin.py +476 -423
- rucio/cli/command.py +272 -0
- rucio/cli/config.py +72 -0
- rucio/cli/did.py +191 -0
- rucio/cli/download.py +128 -0
- rucio/cli/lifetime_exception.py +33 -0
- rucio/cli/replica.py +162 -0
- rucio/cli/rse.py +293 -0
- rucio/cli/rule.py +158 -0
- rucio/cli/scope.py +40 -0
- rucio/cli/subscription.py +73 -0
- rucio/cli/upload.py +60 -0
- rucio/cli/utils.py +226 -0
- rucio/client/accountclient.py +0 -1
- rucio/client/baseclient.py +33 -24
- rucio/client/client.py +45 -1
- rucio/client/didclient.py +5 -3
- rucio/client/downloadclient.py +6 -8
- rucio/client/replicaclient.py +0 -2
- rucio/client/richclient.py +317 -0
- rucio/client/rseclient.py +4 -4
- rucio/client/uploadclient.py +26 -12
- rucio/common/bittorrent.py +234 -0
- rucio/common/cache.py +66 -29
- rucio/common/checksum.py +168 -0
- rucio/common/client.py +122 -0
- rucio/common/config.py +22 -35
- rucio/common/constants.py +61 -3
- rucio/common/didtype.py +72 -24
- rucio/common/dumper/__init__.py +45 -38
- rucio/common/dumper/consistency.py +75 -30
- rucio/common/dumper/data_models.py +63 -19
- rucio/common/dumper/path_parsing.py +19 -8
- rucio/common/exception.py +65 -8
- rucio/common/extra.py +5 -10
- rucio/common/logging.py +13 -13
- rucio/common/pcache.py +8 -7
- rucio/common/plugins.py +59 -27
- rucio/common/policy.py +12 -3
- rucio/common/schema/__init__.py +84 -34
- rucio/common/schema/generic.py +0 -17
- rucio/common/schema/generic_multi_vo.py +0 -17
- rucio/common/stomp_utils.py +383 -119
- rucio/common/test_rucio_server.py +12 -6
- rucio/common/types.py +132 -52
- rucio/common/utils.py +93 -643
- rucio/core/account_limit.py +14 -12
- rucio/core/authentication.py +2 -2
- rucio/core/config.py +23 -42
- rucio/core/credential.py +14 -15
- rucio/core/did.py +5 -1
- rucio/core/did_meta_plugins/elasticsearch_meta.py +407 -0
- rucio/core/did_meta_plugins/filter_engine.py +62 -3
- rucio/core/did_meta_plugins/json_meta.py +2 -2
- rucio/core/did_meta_plugins/mongo_meta.py +43 -30
- rucio/core/did_meta_plugins/postgres_meta.py +75 -39
- rucio/core/identity.py +6 -5
- rucio/core/importer.py +4 -3
- rucio/core/lifetime_exception.py +2 -2
- rucio/core/lock.py +8 -7
- rucio/core/message.py +6 -0
- rucio/core/monitor.py +30 -29
- rucio/core/naming_convention.py +2 -2
- rucio/core/nongrid_trace.py +2 -2
- rucio/core/oidc.py +11 -9
- rucio/core/permission/__init__.py +79 -37
- rucio/core/permission/generic.py +1 -7
- rucio/core/permission/generic_multi_vo.py +1 -7
- rucio/core/quarantined_replica.py +4 -3
- rucio/core/replica.py +464 -139
- rucio/core/replica_sorter.py +55 -59
- rucio/core/request.py +34 -32
- rucio/core/rse.py +301 -97
- rucio/core/rse_counter.py +1 -2
- rucio/core/rse_expression_parser.py +7 -7
- rucio/core/rse_selector.py +9 -7
- rucio/core/rule.py +41 -40
- rucio/core/rule_grouping.py +42 -40
- rucio/core/scope.py +5 -4
- rucio/core/subscription.py +26 -28
- rucio/core/topology.py +11 -11
- rucio/core/trace.py +2 -2
- rucio/core/transfer.py +29 -15
- rucio/core/volatile_replica.py +4 -3
- rucio/daemons/atropos/atropos.py +1 -1
- rucio/daemons/auditor/__init__.py +2 -2
- rucio/daemons/auditor/srmdumps.py +6 -6
- rucio/daemons/automatix/automatix.py +32 -21
- rucio/daemons/badreplicas/necromancer.py +2 -2
- rucio/daemons/bb8/nuclei_background_rebalance.py +1 -1
- rucio/daemons/bb8/t2_background_rebalance.py +1 -1
- rucio/daemons/cache/consumer.py +26 -90
- rucio/daemons/common.py +15 -25
- rucio/daemons/conveyor/finisher.py +2 -2
- rucio/daemons/conveyor/poller.py +18 -28
- rucio/daemons/conveyor/receiver.py +53 -123
- rucio/daemons/conveyor/stager.py +1 -0
- rucio/daemons/conveyor/submitter.py +3 -3
- rucio/daemons/hermes/hermes.py +129 -369
- rucio/daemons/judge/evaluator.py +2 -2
- rucio/daemons/oauthmanager/oauthmanager.py +3 -3
- rucio/daemons/reaper/dark_reaper.py +7 -3
- rucio/daemons/reaper/reaper.py +12 -16
- rucio/daemons/rsedecommissioner/config.py +1 -1
- rucio/daemons/rsedecommissioner/profiles/generic.py +5 -4
- rucio/daemons/rsedecommissioner/profiles/types.py +7 -6
- rucio/daemons/rsedecommissioner/rse_decommissioner.py +1 -1
- rucio/daemons/storage/consistency/actions.py +8 -6
- rucio/daemons/tracer/kronos.py +117 -142
- rucio/db/sqla/constants.py +5 -0
- rucio/db/sqla/migrate_repo/versions/1677d4d803c8_split_rse_availability_into_multiple.py +4 -4
- rucio/db/sqla/migrate_repo/versions/30d5206e9cad_increase_oauthrequest_redirect_msg_.py +37 -0
- rucio/db/sqla/models.py +157 -154
- rucio/db/sqla/session.py +58 -27
- rucio/db/sqla/types.py +2 -2
- rucio/db/sqla/util.py +2 -2
- rucio/gateway/account.py +18 -12
- rucio/gateway/account_limit.py +137 -60
- rucio/gateway/authentication.py +18 -12
- rucio/gateway/config.py +30 -20
- rucio/gateway/credential.py +9 -10
- rucio/gateway/did.py +70 -53
- rucio/gateway/dirac.py +6 -4
- rucio/gateway/exporter.py +3 -2
- rucio/gateway/heartbeat.py +6 -4
- rucio/gateway/identity.py +36 -51
- rucio/gateway/importer.py +3 -2
- rucio/gateway/lifetime_exception.py +3 -2
- rucio/gateway/meta_conventions.py +17 -6
- rucio/gateway/permission.py +4 -1
- rucio/gateway/quarantined_replica.py +3 -2
- rucio/gateway/replica.py +31 -22
- rucio/gateway/request.py +27 -18
- rucio/gateway/rse.py +69 -37
- rucio/gateway/rule.py +46 -26
- rucio/gateway/scope.py +3 -2
- rucio/gateway/subscription.py +14 -11
- rucio/gateway/vo.py +12 -8
- rucio/rse/__init__.py +3 -3
- rucio/rse/protocols/bittorrent.py +11 -1
- rucio/rse/protocols/cache.py +0 -11
- rucio/rse/protocols/dummy.py +0 -11
- rucio/rse/protocols/gfal.py +14 -9
- rucio/rse/protocols/globus.py +1 -1
- rucio/rse/protocols/http_cache.py +1 -1
- rucio/rse/protocols/posix.py +2 -2
- rucio/rse/protocols/protocol.py +84 -317
- rucio/rse/protocols/rclone.py +2 -1
- rucio/rse/protocols/rfio.py +10 -1
- rucio/rse/protocols/ssh.py +2 -1
- rucio/rse/protocols/storm.py +2 -13
- rucio/rse/protocols/webdav.py +74 -30
- rucio/rse/protocols/xrootd.py +2 -1
- rucio/rse/rsemanager.py +170 -53
- rucio/rse/translation.py +260 -0
- rucio/tests/common.py +23 -13
- rucio/tests/common_server.py +26 -9
- rucio/transfertool/bittorrent.py +15 -14
- rucio/transfertool/bittorrent_driver.py +5 -7
- rucio/transfertool/bittorrent_driver_qbittorrent.py +9 -8
- rucio/transfertool/fts3.py +20 -16
- rucio/transfertool/mock.py +2 -3
- rucio/vcsversion.py +4 -4
- rucio/version.py +7 -0
- rucio/web/rest/flaskapi/v1/accounts.py +17 -3
- rucio/web/rest/flaskapi/v1/auth.py +5 -5
- rucio/web/rest/flaskapi/v1/credentials.py +3 -2
- rucio/web/rest/flaskapi/v1/dids.py +21 -15
- rucio/web/rest/flaskapi/v1/identities.py +33 -9
- rucio/web/rest/flaskapi/v1/redirect.py +5 -4
- rucio/web/rest/flaskapi/v1/replicas.py +12 -8
- rucio/web/rest/flaskapi/v1/rses.py +15 -4
- rucio/web/rest/flaskapi/v1/traces.py +56 -19
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/alembic.ini.template +1 -1
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/alembic_offline.ini.template +1 -1
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/rucio.cfg.atlas.client.template +3 -2
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/rucio.cfg.template +3 -19
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/rucio_multi_vo.cfg.template +1 -18
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/requirements.server.txt +97 -68
- rucio-37.0.0rc2.data/scripts/rucio +133 -0
- rucio-37.0.0rc2.data/scripts/rucio-admin +97 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-atropos +2 -2
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-auditor +2 -1
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-automatix +2 -2
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-cache-client +17 -10
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-conveyor-receiver +1 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-kronos +1 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-minos +2 -2
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-minos-temporary-expiration +2 -2
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-necromancer +2 -2
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-reaper +6 -6
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-transmogrifier +2 -2
- rucio-37.0.0rc2.dist-info/METADATA +92 -0
- {rucio-35.7.0.dist-info → rucio-37.0.0rc2.dist-info}/RECORD +239 -245
- {rucio-35.7.0.dist-info → rucio-37.0.0rc2.dist-info}/licenses/AUTHORS.rst +3 -0
- rucio/common/schema/atlas.py +0 -413
- rucio/common/schema/belleii.py +0 -408
- rucio/common/schema/domatpc.py +0 -401
- rucio/common/schema/escape.py +0 -426
- rucio/common/schema/icecube.py +0 -406
- rucio/core/permission/atlas.py +0 -1348
- rucio/core/permission/belleii.py +0 -1077
- rucio/core/permission/escape.py +0 -1078
- rucio/daemons/c3po/algorithms/__init__.py +0 -13
- rucio/daemons/c3po/algorithms/simple.py +0 -134
- rucio/daemons/c3po/algorithms/t2_free_space.py +0 -128
- rucio/daemons/c3po/algorithms/t2_free_space_only_pop.py +0 -130
- rucio/daemons/c3po/algorithms/t2_free_space_only_pop_with_network.py +0 -294
- rucio/daemons/c3po/c3po.py +0 -371
- rucio/daemons/c3po/collectors/agis.py +0 -108
- rucio/daemons/c3po/collectors/free_space.py +0 -81
- rucio/daemons/c3po/collectors/jedi_did.py +0 -57
- rucio/daemons/c3po/collectors/mock_did.py +0 -51
- rucio/daemons/c3po/collectors/network_metrics.py +0 -71
- rucio/daemons/c3po/collectors/workload.py +0 -112
- rucio/daemons/c3po/utils/__init__.py +0 -13
- rucio/daemons/c3po/utils/dataset_cache.py +0 -50
- rucio/daemons/c3po/utils/expiring_dataset_cache.py +0 -56
- rucio/daemons/c3po/utils/expiring_list.py +0 -62
- rucio/daemons/c3po/utils/popularity.py +0 -85
- rucio/daemons/c3po/utils/timeseries.py +0 -89
- rucio/rse/protocols/gsiftp.py +0 -92
- rucio-35.7.0.data/scripts/rucio-c3po +0 -85
- rucio-35.7.0.dist-info/METADATA +0 -72
- /rucio/{daemons/c3po → cli/bin_legacy}/__init__.py +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/globus-config.yml.template +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/ldap.cfg.template +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/mail_templates/rule_approval_request.tmpl +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/mail_templates/rule_approved_admin.tmpl +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/mail_templates/rule_approved_user.tmpl +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/mail_templates/rule_denied_admin.tmpl +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/mail_templates/rule_denied_user.tmpl +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/mail_templates/rule_ok_notification.tmpl +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/etc/rse-accounts.cfg.template +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/tools/bootstrap.py +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/tools/merge_rucio_configs.py +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/data/rucio/tools/reset_database.py +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-abacus-account +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-abacus-collection-replica +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-abacus-rse +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-bb8 +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-cache-consumer +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-conveyor-finisher +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-conveyor-poller +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-conveyor-preparer +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-conveyor-stager +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-conveyor-submitter +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-conveyor-throttler +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-dark-reaper +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-dumper +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-follower +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-hermes +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-judge-cleaner +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-judge-evaluator +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-judge-injector +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-judge-repairer +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-oauth-manager +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-replica-recoverer +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-rse-decommissioner +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-storage-consistency-actions +0 -0
- {rucio-35.7.0.data → rucio-37.0.0rc2.data}/scripts/rucio-undertaker +0 -0
- {rucio-35.7.0.dist-info → rucio-37.0.0rc2.dist-info}/WHEEL +0 -0
- {rucio-35.7.0.dist-info → rucio-37.0.0rc2.dist-info}/licenses/LICENSE +0 -0
- {rucio-35.7.0.dist-info → rucio-37.0.0rc2.dist-info}/top_level.txt +0 -0
rucio/db/sqla/models.py
CHANGED
|
@@ -25,9 +25,11 @@ from sqlalchemy.schema import CheckConstraint, ForeignKeyConstraint, Index, Prim
|
|
|
25
25
|
from sqlalchemy.sql import Delete
|
|
26
26
|
from sqlalchemy.types import LargeBinary
|
|
27
27
|
|
|
28
|
+
# schema must be imported as a module to avoid circular imports with policy packages,
|
|
29
|
+
# and it must be renamed to avoid conflicts with the policy package schema modules
|
|
30
|
+
from rucio.common import schema as common_schema
|
|
28
31
|
from rucio.common import utils
|
|
29
|
-
from rucio.common.
|
|
30
|
-
from rucio.common.types import InternalAccount, InternalScope
|
|
32
|
+
from rucio.common.types import InternalAccount, InternalScope # noqa: TCH001 (types are needed by SQLAlchemy)
|
|
31
33
|
from rucio.db.sqla.constants import (
|
|
32
34
|
AccountStatus,
|
|
33
35
|
AccountType,
|
|
@@ -59,6 +61,7 @@ if TYPE_CHECKING:
|
|
|
59
61
|
from sqlalchemy.orm import Session
|
|
60
62
|
from sqlalchemy.sql import Insert, Update
|
|
61
63
|
|
|
64
|
+
|
|
62
65
|
# SQLAlchemy defines the corresponding code behind TYPE_CHECKING
|
|
63
66
|
# https://github.com/sqlalchemy/sqlalchemy/blob/d9acd6223299c118464d30abfa483e26a536239d/lib/sqlalchemy/orm/base.py#L814
|
|
64
67
|
# And pylint/astroid don't have an option to evaluate this code
|
|
@@ -316,7 +319,7 @@ class SoftModelBase(ModelBase):
|
|
|
316
319
|
class Account(BASE, ModelBase):
|
|
317
320
|
"""Represents an account"""
|
|
318
321
|
__tablename__ = 'accounts'
|
|
319
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
322
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
320
323
|
account_type: Mapped[AccountType] = mapped_column(Enum(AccountType, name='ACCOUNTS_TYPE_CHK',
|
|
321
324
|
create_constraint=True,
|
|
322
325
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
@@ -335,7 +338,7 @@ class Account(BASE, ModelBase):
|
|
|
335
338
|
class AccountAttrAssociation(BASE, ModelBase):
|
|
336
339
|
"""Represents an account"""
|
|
337
340
|
__tablename__ = 'account_attr_map'
|
|
338
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
341
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
339
342
|
key: Mapped[str] = mapped_column(String(255))
|
|
340
343
|
value: Mapped[Optional[Union[bool, str]]] = mapped_column(BooleanString(255))
|
|
341
344
|
_table_args = (PrimaryKeyConstraint('account', 'key', name='ACCOUNT_ATTR_MAP_PK'),
|
|
@@ -366,7 +369,7 @@ class IdentityAccountAssociation(BASE, ModelBase):
|
|
|
366
369
|
identity_type: Mapped[IdentityType] = mapped_column(Enum(IdentityType, name='ACCOUNT_MAP_ID_TYPE_CHK',
|
|
367
370
|
create_constraint=True,
|
|
368
371
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
369
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
372
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
370
373
|
is_default: Mapped[bool] = mapped_column(Boolean(name='ACCOUNT_MAP_DEFAULT_CHK', create_constraint=True),
|
|
371
374
|
default=False)
|
|
372
375
|
_table_args = (PrimaryKeyConstraint('identity', 'identity_type', 'account', name='ACCOUNT_MAP_PK'),
|
|
@@ -379,8 +382,8 @@ class IdentityAccountAssociation(BASE, ModelBase):
|
|
|
379
382
|
class Scope(BASE, ModelBase):
|
|
380
383
|
"""Represents a scope"""
|
|
381
384
|
__tablename__ = 'scopes'
|
|
382
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
383
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
385
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
386
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
384
387
|
is_default: Mapped[bool] = mapped_column(Boolean(name='SCOPES_DEFAULT_CHK', create_constraint=True),
|
|
385
388
|
default=False)
|
|
386
389
|
status: Mapped[ScopeStatus] = mapped_column(Enum(ScopeStatus, name='SCOPE_STATUS_CHK',
|
|
@@ -399,9 +402,9 @@ class Scope(BASE, ModelBase):
|
|
|
399
402
|
class DataIdentifier(BASE, ModelBase):
|
|
400
403
|
"""Represents a dataset"""
|
|
401
404
|
__tablename__ = 'dids'
|
|
402
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
403
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
404
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
405
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
406
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
407
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
405
408
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='DIDS_TYPE_CHK',
|
|
406
409
|
create_constraint=True,
|
|
407
410
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
@@ -468,8 +471,8 @@ class DataIdentifier(BASE, ModelBase):
|
|
|
468
471
|
class VirtualPlacements(BASE, ModelBase):
|
|
469
472
|
"""Represents virtual placements"""
|
|
470
473
|
__tablename__ = 'virtual_placements'
|
|
471
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
472
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
474
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
475
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
473
476
|
placements = mapped_column(JSON())
|
|
474
477
|
_table_args = (PrimaryKeyConstraint('scope', 'name', name='VP_PK'),
|
|
475
478
|
ForeignKeyConstraint(['scope', 'name'], ['dids.scope', 'dids.name'], name='VP_FK')
|
|
@@ -478,8 +481,8 @@ class VirtualPlacements(BASE, ModelBase):
|
|
|
478
481
|
|
|
479
482
|
class DidMeta(BASE, ModelBase):
|
|
480
483
|
__tablename__ = 'did_meta'
|
|
481
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
482
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
484
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
485
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
483
486
|
meta: Mapped[Optional[Union[str, dict[str, Any]]]] = mapped_column(JSON())
|
|
484
487
|
did_type: Mapped[Optional[DIDType]] = mapped_column(Enum(DIDType, name='DID_META_DID_TYPE_CHK',
|
|
485
488
|
create_constraint=True,
|
|
@@ -491,8 +494,8 @@ class DidMeta(BASE, ModelBase):
|
|
|
491
494
|
|
|
492
495
|
class DeletedDidMeta(BASE, ModelBase):
|
|
493
496
|
__tablename__ = 'deleted_did_meta'
|
|
494
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
495
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
497
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
498
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
496
499
|
did_type: Mapped[Optional[DIDType]] = mapped_column(Enum(DIDType, name='DEL_DID_META_DID_TYPE_CHK',
|
|
497
500
|
create_constraint=True,
|
|
498
501
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
@@ -505,9 +508,9 @@ class DeletedDidMeta(BASE, ModelBase):
|
|
|
505
508
|
class DeletedDataIdentifier(BASE, ModelBase):
|
|
506
509
|
"""Represents a dataset"""
|
|
507
510
|
__tablename__ = 'deleted_dids'
|
|
508
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
509
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
510
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
511
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
512
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
513
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
511
514
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='DEL_DIDS_TYPE_CHK',
|
|
512
515
|
create_constraint=True,
|
|
513
516
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
@@ -562,9 +565,9 @@ class DeletedDataIdentifier(BASE, ModelBase):
|
|
|
562
565
|
class UpdatedDID(BASE, ModelBase):
|
|
563
566
|
"""Represents the recently updated dids"""
|
|
564
567
|
__tablename__ = 'updated_dids'
|
|
565
|
-
id: Mapped[
|
|
566
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
567
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
568
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
569
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
570
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
568
571
|
rule_evaluation_action: Mapped[DIDReEvaluation] = mapped_column(Enum(DIDReEvaluation, name='UPDATED_DIDS_RULE_EVAL_ACT_CHK',
|
|
569
572
|
create_constraint=True,
|
|
570
573
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
@@ -577,15 +580,15 @@ class UpdatedDID(BASE, ModelBase):
|
|
|
577
580
|
class BadReplica(BASE, ModelBase):
|
|
578
581
|
"""Represents the suspicious or bad replicas"""
|
|
579
582
|
__tablename__ = 'bad_replicas'
|
|
580
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
581
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
582
|
-
rse_id: Mapped[
|
|
583
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
584
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
585
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
583
586
|
reason: Mapped[Optional[str]] = mapped_column(String(255))
|
|
584
587
|
state: Mapped[BadFilesStatus] = mapped_column(Enum(BadFilesStatus, name='BAD_REPLICAS_STATE_CHK',
|
|
585
588
|
create_constraint=True,
|
|
586
589
|
values_callable=lambda obj: [e.value for e in obj]),
|
|
587
590
|
default=BadFilesStatus.SUSPICIOUS)
|
|
588
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
591
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
589
592
|
bytes: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
590
593
|
expires_at: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
591
594
|
_table_args = (PrimaryKeyConstraint('scope', 'name', 'rse_id', 'state', 'created_at', name='BAD_REPLICAS_STATE_PK'),
|
|
@@ -607,7 +610,7 @@ class BadPFN(BASE, ModelBase):
|
|
|
607
610
|
values_callable=lambda obj: [e.value for e in obj]),
|
|
608
611
|
default=BadPFNStatus.SUSPICIOUS)
|
|
609
612
|
reason: Mapped[Optional[str]] = mapped_column(String(255))
|
|
610
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
613
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
611
614
|
expires_at: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
612
615
|
_table_args = (PrimaryKeyConstraint('path', 'state', name='BAD_PFNS_PK'),
|
|
613
616
|
ForeignKeyConstraint(['account'], ['accounts.account'], name='BAD_PFNS_ACCOUNT_FK'))
|
|
@@ -616,13 +619,13 @@ class BadPFN(BASE, ModelBase):
|
|
|
616
619
|
class QuarantinedReplica(BASE, ModelBase):
|
|
617
620
|
"""Represents the quarantined replicas"""
|
|
618
621
|
__tablename__ = 'quarantined_replicas'
|
|
619
|
-
rse_id: Mapped[
|
|
622
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
620
623
|
path: Mapped[str] = mapped_column(String(1024))
|
|
621
624
|
bytes: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
622
625
|
md5: Mapped[Optional[str]] = mapped_column(String(32))
|
|
623
626
|
adler32: Mapped[Optional[str]] = mapped_column(String(8))
|
|
624
|
-
scope: Mapped[Optional[InternalScope]] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
625
|
-
name: Mapped[Optional[str]] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
627
|
+
scope: Mapped[Optional[InternalScope]] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
628
|
+
name: Mapped[Optional[str]] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
626
629
|
_table_args = (PrimaryKeyConstraint('rse_id', 'path', name='QURD_REPLICAS_STATE_PK'),
|
|
627
630
|
ForeignKeyConstraint(['rse_id'], ['rses.id'], name='QURD_REPLICAS_RSE_ID_FK'),
|
|
628
631
|
Index('QUARANTINED_REPLICAS_PATH_IDX', 'path', 'rse_id', unique=True))
|
|
@@ -631,13 +634,13 @@ class QuarantinedReplica(BASE, ModelBase):
|
|
|
631
634
|
class QuarantinedReplicaHistory(BASE, ModelBase):
|
|
632
635
|
"""Represents the quarantined replicas history"""
|
|
633
636
|
__tablename__ = 'quarantined_replicas_history'
|
|
634
|
-
rse_id: Mapped[
|
|
637
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
635
638
|
path: Mapped[str] = mapped_column(String(1024))
|
|
636
639
|
bytes: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
637
640
|
md5: Mapped[Optional[str]] = mapped_column(String(32))
|
|
638
641
|
adler32: Mapped[Optional[str]] = mapped_column(String(8))
|
|
639
|
-
scope: Mapped[Optional[InternalScope]] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
640
|
-
name: Mapped[Optional[str]] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
642
|
+
scope: Mapped[Optional[InternalScope]] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
643
|
+
name: Mapped[Optional[str]] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
641
644
|
deleted_at: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
642
645
|
__mapper_args__ = {
|
|
643
646
|
'primary_key': [rse_id, path] # Fake primary key for SQLA
|
|
@@ -673,10 +676,10 @@ class DIDMetaConventionsConstraint(BASE, ModelBase):
|
|
|
673
676
|
class DataIdentifierAssociation(BASE, ModelBase):
|
|
674
677
|
"""Represents the map between containers/datasets and files"""
|
|
675
678
|
__tablename__ = 'contents'
|
|
676
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH'))) # dataset scope
|
|
677
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH'))) # dataset name
|
|
678
|
-
child_scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH'))) # Provenance scope
|
|
679
|
-
child_name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH'))) # Provenance name
|
|
679
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH'))) # dataset scope
|
|
680
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH'))) # dataset name
|
|
681
|
+
child_scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH'))) # Provenance scope
|
|
682
|
+
child_name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH'))) # Provenance name
|
|
680
683
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='CONTENTS_DID_TYPE_CHK',
|
|
681
684
|
create_constraint=True,
|
|
682
685
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
@@ -701,10 +704,10 @@ class DataIdentifierAssociation(BASE, ModelBase):
|
|
|
701
704
|
class ConstituentAssociation(BASE, ModelBase):
|
|
702
705
|
"""Represents the map between archives and constituents"""
|
|
703
706
|
__tablename__ = 'archive_contents'
|
|
704
|
-
child_scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH'))) # Constituent file scope
|
|
705
|
-
child_name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH'))) # Constituent file name
|
|
706
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH'))) # Archive file scope
|
|
707
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH'))) # Archive file name
|
|
707
|
+
child_scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH'))) # Constituent file scope
|
|
708
|
+
child_name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH'))) # Constituent file name
|
|
709
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH'))) # Archive file scope
|
|
710
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH'))) # Archive file name
|
|
708
711
|
bytes: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
709
712
|
adler32: Mapped[Optional[str]] = mapped_column(String(8))
|
|
710
713
|
md5: Mapped[Optional[str]] = mapped_column(String(32))
|
|
@@ -724,10 +727,10 @@ class ConstituentAssociation(BASE, ModelBase):
|
|
|
724
727
|
class ConstituentAssociationHistory(BASE, ModelBase):
|
|
725
728
|
"""Represents the map history between archives and constituents"""
|
|
726
729
|
__tablename__ = 'archive_contents_history'
|
|
727
|
-
child_scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH'))) # Constituent file scope
|
|
728
|
-
child_name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH'))) # Constituent file name
|
|
729
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH'))) # Archive file scope
|
|
730
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH'))) # Archive file name
|
|
730
|
+
child_scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH'))) # Constituent file scope
|
|
731
|
+
child_name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH'))) # Constituent file name
|
|
732
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH'))) # Archive file scope
|
|
733
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH'))) # Archive file name
|
|
731
734
|
bytes: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
732
735
|
adler32: Mapped[Optional[str]] = mapped_column(String(8))
|
|
733
736
|
md5: Mapped[Optional[str]] = mapped_column(String(32))
|
|
@@ -742,10 +745,10 @@ class ConstituentAssociationHistory(BASE, ModelBase):
|
|
|
742
745
|
class DataIdentifierAssociationHistory(BASE, ModelBase):
|
|
743
746
|
"""Represents the map history between containers/datasets and files"""
|
|
744
747
|
__tablename__ = 'contents_history'
|
|
745
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH'))) # dataset scope
|
|
746
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH'))) # dataset name
|
|
747
|
-
child_scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH'))) # Provenance scope
|
|
748
|
-
child_name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH'))) # Provenance name
|
|
748
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH'))) # dataset scope
|
|
749
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH'))) # dataset name
|
|
750
|
+
child_scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH'))) # Provenance scope
|
|
751
|
+
child_name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH'))) # Provenance name
|
|
749
752
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='CONTENTS_HIST_DID_TYPE_CHK',
|
|
750
753
|
create_constraint=True,
|
|
751
754
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
@@ -771,7 +774,7 @@ class DataIdentifierAssociationHistory(BASE, ModelBase):
|
|
|
771
774
|
class RSE(BASE, SoftModelBase):
|
|
772
775
|
"""Represents a Rucio Location"""
|
|
773
776
|
__tablename__ = 'rses'
|
|
774
|
-
id: Mapped[
|
|
777
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
775
778
|
rse: Mapped[str] = mapped_column(String(255))
|
|
776
779
|
vo: Mapped[str] = mapped_column(String(3), nullable=False, server_default='def')
|
|
777
780
|
rse_type: Mapped[RSEType] = mapped_column(Enum(RSEType, name='RSES_TYPE_CHK',
|
|
@@ -809,7 +812,7 @@ class RSE(BASE, SoftModelBase):
|
|
|
809
812
|
class RSELimit(BASE, ModelBase):
|
|
810
813
|
"""Represents RSE limits"""
|
|
811
814
|
__tablename__ = 'rse_limits'
|
|
812
|
-
rse_id: Mapped[
|
|
815
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
813
816
|
name: Mapped[str] = mapped_column(String(255))
|
|
814
817
|
value: Mapped[int] = mapped_column(BigInteger)
|
|
815
818
|
_table_args = (PrimaryKeyConstraint('rse_id', 'name', name='RSE_LIMITS_PK'),
|
|
@@ -819,7 +822,7 @@ class RSELimit(BASE, ModelBase):
|
|
|
819
822
|
class TransferLimit(BASE, ModelBase):
|
|
820
823
|
"""Represents limits used to throttle transfer requests"""
|
|
821
824
|
__tablename__ = 'transfer_limits'
|
|
822
|
-
id: Mapped[
|
|
825
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
823
826
|
rse_expression: Mapped[str] = mapped_column(String(3000))
|
|
824
827
|
activity: Mapped[Optional[str]] = mapped_column(String(50))
|
|
825
828
|
direction: Mapped[TransferLimitDirection] = mapped_column(Enum(TransferLimitDirection, name='TRANSFER_LIMITS_DIRECTION_TYPE_CHK',
|
|
@@ -840,8 +843,8 @@ class TransferLimit(BASE, ModelBase):
|
|
|
840
843
|
class RSETransferLimit(BASE, ModelBase):
|
|
841
844
|
"""Represents the binding of a transfer limit to an RSE as result of TransferLimit.rse_expression dereference"""
|
|
842
845
|
__tablename__ = 'rse_transfer_limits'
|
|
843
|
-
rse_id: Mapped[
|
|
844
|
-
limit_id: Mapped[
|
|
846
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
847
|
+
limit_id: Mapped[str] = mapped_column(GUID())
|
|
845
848
|
_table_args = (PrimaryKeyConstraint('rse_id', 'limit_id', name='RSE_TRANSFER_LIMITS_PK'),
|
|
846
849
|
Index('RSE_TRANSFER_LIMITS_LIMIT_ID_IDX', 'limit_id', 'rse_id'),
|
|
847
850
|
ForeignKeyConstraint(['rse_id'], ['rses.id'], name='RSE_TRANSFER_LIMITS_RSE_ID_FK'),
|
|
@@ -851,7 +854,7 @@ class RSETransferLimit(BASE, ModelBase):
|
|
|
851
854
|
class RSEUsage(BASE, ModelBase):
|
|
852
855
|
"""Represents location usage"""
|
|
853
856
|
__tablename__ = 'rse_usage'
|
|
854
|
-
rse_id: Mapped[
|
|
857
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
855
858
|
source: Mapped[str] = mapped_column(String(255))
|
|
856
859
|
used: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
857
860
|
free: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
@@ -863,7 +866,7 @@ class RSEUsage(BASE, ModelBase):
|
|
|
863
866
|
class RSEUsageHistory(BASE, ModelBase):
|
|
864
867
|
"""Represents location usage history"""
|
|
865
868
|
__tablename__ = 'rse_usage_history'
|
|
866
|
-
rse_id: Mapped[
|
|
869
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
867
870
|
source: Mapped[str] = mapped_column(String(255))
|
|
868
871
|
used: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
869
872
|
free: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
@@ -874,8 +877,8 @@ class RSEUsageHistory(BASE, ModelBase):
|
|
|
874
877
|
class UpdatedRSECounter(BASE, ModelBase):
|
|
875
878
|
"""Represents the recently updated RSE counters"""
|
|
876
879
|
__tablename__ = 'updated_rse_counters'
|
|
877
|
-
id: Mapped[
|
|
878
|
-
rse_id: Mapped[
|
|
880
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
881
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
879
882
|
files: Mapped[int] = mapped_column(BigInteger)
|
|
880
883
|
bytes: Mapped[int] = mapped_column(BigInteger)
|
|
881
884
|
_table_args = (PrimaryKeyConstraint('id', name='UPDATED_RSE_CNTRS_PK'),
|
|
@@ -886,7 +889,7 @@ class UpdatedRSECounter(BASE, ModelBase):
|
|
|
886
889
|
class RSEAttrAssociation(BASE, ModelBase):
|
|
887
890
|
"""Represents the map between RSEs and tags"""
|
|
888
891
|
__tablename__ = 'rse_attr_map'
|
|
889
|
-
rse_id: Mapped[
|
|
892
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
890
893
|
key: Mapped[str] = mapped_column(String(255))
|
|
891
894
|
value: Mapped[Optional[Union[bool, str]]] = mapped_column(BooleanString(255))
|
|
892
895
|
_table_args = (PrimaryKeyConstraint('rse_id', 'key', name='RSE_ATTR_MAP_PK'),
|
|
@@ -897,7 +900,7 @@ class RSEAttrAssociation(BASE, ModelBase):
|
|
|
897
900
|
class RSEProtocol(BASE, ModelBase):
|
|
898
901
|
"""Represents supported protocols of RSEs (Rucio Storage Elements)"""
|
|
899
902
|
__tablename__ = 'rse_protocols'
|
|
900
|
-
rse_id: Mapped[
|
|
903
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
901
904
|
scheme: Mapped[str] = mapped_column(String(255))
|
|
902
905
|
hostname: Mapped[str] = mapped_column(String(255), server_default='') # For protocol without host e.g. POSIX on local file systems localhost is assumed as being default
|
|
903
906
|
port: Mapped[int] = mapped_column(Integer, server_default='0') # like host, for local protocol the port 0 is assumed to be default
|
|
@@ -920,7 +923,7 @@ class RSEProtocol(BASE, ModelBase):
|
|
|
920
923
|
class RSEQoSAssociation(BASE, ModelBase):
|
|
921
924
|
"""Represents the mapping of RSEs"""
|
|
922
925
|
__tablename__ = 'rse_qos_map'
|
|
923
|
-
rse_id: Mapped[
|
|
926
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
924
927
|
qos_policy: Mapped[str] = mapped_column(String(64))
|
|
925
928
|
_table_args = (PrimaryKeyConstraint('rse_id', 'qos_policy', name='RSE_QOS_MAP_PK'),
|
|
926
929
|
ForeignKeyConstraint(['rse_id'], ['rses.id'], name='RSE_QOS_MAP_RSE_ID_FK'))
|
|
@@ -929,8 +932,8 @@ class RSEQoSAssociation(BASE, ModelBase):
|
|
|
929
932
|
class AccountLimit(BASE, ModelBase):
|
|
930
933
|
"""Represents account limits"""
|
|
931
934
|
__tablename__ = 'account_limits'
|
|
932
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
933
|
-
rse_id: Mapped[
|
|
935
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
936
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
934
937
|
bytes: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
935
938
|
_table_args = (PrimaryKeyConstraint('account', 'rse_id', name='ACCOUNT_LIMITS_PK'),
|
|
936
939
|
ForeignKeyConstraint(['account'], ['accounts.account'], name='ACCOUNT_LIMITS_ACCOUNT_FK'),
|
|
@@ -940,7 +943,7 @@ class AccountLimit(BASE, ModelBase):
|
|
|
940
943
|
class AccountGlobalLimit(BASE, ModelBase):
|
|
941
944
|
"""Represents account limits"""
|
|
942
945
|
__tablename__ = 'account_glob_limits'
|
|
943
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
946
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
944
947
|
rse_expression: Mapped[str] = mapped_column(String(3000))
|
|
945
948
|
bytes: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
946
949
|
_table_args = (PrimaryKeyConstraint('account', 'rse_expression', name='ACCOUNT_GLOBAL_LIMITS_PK'),
|
|
@@ -950,8 +953,8 @@ class AccountGlobalLimit(BASE, ModelBase):
|
|
|
950
953
|
class AccountUsage(BASE, ModelBase):
|
|
951
954
|
"""Represents account usage"""
|
|
952
955
|
__tablename__ = 'account_usage'
|
|
953
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
954
|
-
rse_id: Mapped[
|
|
956
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
957
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
955
958
|
files: Mapped[int] = mapped_column(BigInteger)
|
|
956
959
|
bytes: Mapped[int] = mapped_column(BigInteger)
|
|
957
960
|
_table_args = (PrimaryKeyConstraint('account', 'rse_id', name='ACCOUNT_USAGE_PK'),
|
|
@@ -962,8 +965,8 @@ class AccountUsage(BASE, ModelBase):
|
|
|
962
965
|
class AccountUsageHistory(BASE, ModelBase):
|
|
963
966
|
"""Represents account usage history"""
|
|
964
967
|
__tablename__ = 'account_usage_history'
|
|
965
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
966
|
-
rse_id: Mapped[
|
|
968
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
969
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
967
970
|
files: Mapped[int] = mapped_column(BigInteger)
|
|
968
971
|
bytes: Mapped[int] = mapped_column(BigInteger)
|
|
969
972
|
_table_args = (PrimaryKeyConstraint('account', 'rse_id', 'updated_at', name='ACCOUNT_USAGE_HISTORY_PK'),)
|
|
@@ -972,9 +975,9 @@ class AccountUsageHistory(BASE, ModelBase):
|
|
|
972
975
|
class RSEFileAssociation(BASE, ModelBase):
|
|
973
976
|
"""Represents the map between locations and files"""
|
|
974
977
|
__tablename__ = 'replicas'
|
|
975
|
-
rse_id: Mapped[
|
|
976
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
977
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
978
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
979
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
980
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
978
981
|
bytes: Mapped[int] = mapped_column(BigInteger)
|
|
979
982
|
md5: Mapped[Optional[str]] = mapped_column(String(32))
|
|
980
983
|
adler32: Mapped[Optional[str]] = mapped_column(String(8))
|
|
@@ -992,7 +995,7 @@ class RSEFileAssociation(BASE, ModelBase):
|
|
|
992
995
|
CheckConstraint('STATE IS NOT NULL', name='REPLICAS_STATE_NN'),
|
|
993
996
|
CheckConstraint('bytes IS NOT NULL', name='REPLICAS_SIZE_NN'),
|
|
994
997
|
CheckConstraint('lock_cnt IS NOT NULL', name='REPLICAS_LOCK_CNT_NN'),
|
|
995
|
-
Index('REPLICAS_PATH_IDX', 'path', mysql_length=get_schema_value('NAME_LENGTH')),
|
|
998
|
+
Index('REPLICAS_PATH_IDX', 'path', mysql_length=common_schema.get_schema_value('NAME_LENGTH')),
|
|
996
999
|
Index('REPLICAS_STATE_IDX', 'state'),
|
|
997
1000
|
Index('REPLICAS_RSE_ID_TOMBSTONE_IDX', 'rse_id', 'tombstone'))
|
|
998
1001
|
|
|
@@ -1000,12 +1003,12 @@ class RSEFileAssociation(BASE, ModelBase):
|
|
|
1000
1003
|
class CollectionReplica(BASE, ModelBase):
|
|
1001
1004
|
"""Represents replicas for datasets/collections"""
|
|
1002
1005
|
__tablename__ = 'collection_replicas'
|
|
1003
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1004
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1006
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1007
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1005
1008
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='COLLECTION_REPLICAS_TYPE_CHK',
|
|
1006
1009
|
create_constraint=True,
|
|
1007
1010
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
1008
|
-
rse_id: Mapped[
|
|
1011
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
1009
1012
|
bytes: Mapped[int] = mapped_column(BigInteger)
|
|
1010
1013
|
length: Mapped[int] = mapped_column(BigInteger)
|
|
1011
1014
|
available_bytes: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
@@ -1026,9 +1029,9 @@ class CollectionReplica(BASE, ModelBase):
|
|
|
1026
1029
|
class UpdatedCollectionReplica(BASE, ModelBase):
|
|
1027
1030
|
"""Represents updates to replicas for datasets/collections"""
|
|
1028
1031
|
__tablename__ = 'updated_col_rep'
|
|
1029
|
-
id: Mapped[
|
|
1030
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1031
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1032
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
1033
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1034
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1032
1035
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='UPDATED_COL_REP_TYPE_CHK',
|
|
1033
1036
|
create_constraint=True,
|
|
1034
1037
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
@@ -1042,9 +1045,9 @@ class UpdatedCollectionReplica(BASE, ModelBase):
|
|
|
1042
1045
|
class RSEFileAssociationHistory(BASE, ModelBase):
|
|
1043
1046
|
"""Represents a short history of the deleted replicas"""
|
|
1044
1047
|
__tablename__ = 'replicas_history'
|
|
1045
|
-
rse_id: Mapped[
|
|
1046
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1047
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1048
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
1049
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1050
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1048
1051
|
bytes: Mapped[int] = mapped_column(BigInteger)
|
|
1049
1052
|
_table_args = (PrimaryKeyConstraint('rse_id', 'scope', 'name', name='REPLICAS_HIST_PK'),
|
|
1050
1053
|
ForeignKeyConstraint(['rse_id'], ['rses.id'], name='REPLICAS_HIST_RSE_ID_FK'),
|
|
@@ -1054,11 +1057,11 @@ class RSEFileAssociationHistory(BASE, ModelBase):
|
|
|
1054
1057
|
class ReplicationRule(BASE, ModelBase):
|
|
1055
1058
|
"""Represents data identifier replication rules"""
|
|
1056
1059
|
__tablename__ = 'rules'
|
|
1057
|
-
id: Mapped[
|
|
1060
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
1058
1061
|
subscription_id: Mapped[Optional[uuid.UUID]] = mapped_column(GUID())
|
|
1059
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1060
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1061
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1062
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1063
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1064
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1062
1065
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='RULES_DID_TYPE_CHK',
|
|
1063
1066
|
create_constraint=True,
|
|
1064
1067
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
@@ -1127,11 +1130,11 @@ class ReplicationRule(BASE, ModelBase):
|
|
|
1127
1130
|
class ReplicationRuleHistoryRecent(BASE, ModelBase):
|
|
1128
1131
|
"""Represents replication rules in the recent history"""
|
|
1129
1132
|
__tablename__ = 'rules_hist_recent'
|
|
1130
|
-
id: Mapped[
|
|
1133
|
+
id: Mapped[str] = mapped_column(GUID())
|
|
1131
1134
|
subscription_id: Mapped[Optional[uuid.UUID]] = mapped_column(GUID())
|
|
1132
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1133
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1134
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1135
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1136
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1137
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1135
1138
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='RULES_HIST_RECENT_DIDTYPE_CHK',
|
|
1136
1139
|
create_constraint=True,
|
|
1137
1140
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
@@ -1175,11 +1178,11 @@ class ReplicationRuleHistoryRecent(BASE, ModelBase):
|
|
|
1175
1178
|
class ReplicationRuleHistory(BASE, ModelBase):
|
|
1176
1179
|
"""Represents replication rules in the longterm history"""
|
|
1177
1180
|
__tablename__ = 'rules_history'
|
|
1178
|
-
id: Mapped[
|
|
1181
|
+
id: Mapped[str] = mapped_column(GUID())
|
|
1179
1182
|
subscription_id: Mapped[Optional[uuid.UUID]] = mapped_column(GUID())
|
|
1180
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1181
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1182
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1183
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1184
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1185
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1183
1186
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='RULES_HISTORY_DIDTYPE_CHK',
|
|
1184
1187
|
create_constraint=True,
|
|
1185
1188
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
@@ -1222,11 +1225,11 @@ class ReplicationRuleHistory(BASE, ModelBase):
|
|
|
1222
1225
|
class ReplicaLock(BASE, ModelBase):
|
|
1223
1226
|
"""Represents replica locks"""
|
|
1224
1227
|
__tablename__ = 'locks'
|
|
1225
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1226
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1227
|
-
rule_id: Mapped[
|
|
1228
|
-
rse_id: Mapped[
|
|
1229
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1228
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1229
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1230
|
+
rule_id: Mapped[str] = mapped_column(GUID())
|
|
1231
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
1232
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1230
1233
|
bytes: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
1231
1234
|
state: Mapped[LockState] = mapped_column(Enum(LockState, name='LOCKS_STATE_CHK',
|
|
1232
1235
|
create_constraint=True,
|
|
@@ -1244,11 +1247,11 @@ class ReplicaLock(BASE, ModelBase):
|
|
|
1244
1247
|
class DatasetLock(BASE, ModelBase):
|
|
1245
1248
|
"""Represents dataset locks"""
|
|
1246
1249
|
__tablename__ = 'dataset_locks'
|
|
1247
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1248
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1249
|
-
rule_id: Mapped[
|
|
1250
|
-
rse_id: Mapped[
|
|
1251
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1250
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1251
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1252
|
+
rule_id: Mapped[str] = mapped_column(GUID())
|
|
1253
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
1254
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1252
1255
|
state: Mapped[LockState] = mapped_column(Enum(LockState, name='DATASET_LOCKS_STATE_CHK',
|
|
1253
1256
|
create_constraint=True,
|
|
1254
1257
|
values_callable=lambda obj: [e.value for e in obj]),
|
|
@@ -1269,9 +1272,9 @@ class DatasetLock(BASE, ModelBase):
|
|
|
1269
1272
|
class UpdatedAccountCounter(BASE, ModelBase):
|
|
1270
1273
|
"""Represents the recently updated Account counters"""
|
|
1271
1274
|
__tablename__ = 'updated_account_counters'
|
|
1272
|
-
id: Mapped[
|
|
1273
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1274
|
-
rse_id: Mapped[
|
|
1275
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
1276
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1277
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
1275
1278
|
files: Mapped[int] = mapped_column(BigInteger)
|
|
1276
1279
|
bytes: Mapped[int] = mapped_column(BigInteger)
|
|
1277
1280
|
_table_args = (PrimaryKeyConstraint('id', name='UPDATED_ACCNT_CNTRS_PK'),
|
|
@@ -1283,18 +1286,18 @@ class UpdatedAccountCounter(BASE, ModelBase):
|
|
|
1283
1286
|
class Request(BASE, ModelBase):
|
|
1284
1287
|
"""Represents a request for a single file with a third party service"""
|
|
1285
1288
|
__tablename__ = 'requests'
|
|
1286
|
-
id: Mapped[
|
|
1289
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
1287
1290
|
request_type: Mapped[RequestType] = mapped_column(Enum(RequestType, name='REQUESTS_TYPE_CHK',
|
|
1288
1291
|
create_constraint=True,
|
|
1289
1292
|
values_callable=lambda obj: [e.value for e in obj]),
|
|
1290
1293
|
default=RequestType.TRANSFER)
|
|
1291
|
-
scope: Mapped[Optional[InternalScope]] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1292
|
-
name: Mapped[Optional[str]] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1294
|
+
scope: Mapped[Optional[InternalScope]] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1295
|
+
name: Mapped[Optional[str]] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1293
1296
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='REQUESTS_DIDTYPE_CHK',
|
|
1294
1297
|
create_constraint=True,
|
|
1295
1298
|
values_callable=lambda obj: [e.value for e in obj]),
|
|
1296
1299
|
default=DIDType.FILE)
|
|
1297
|
-
dest_rse_id: Mapped[
|
|
1300
|
+
dest_rse_id: Mapped[str] = mapped_column(GUID())
|
|
1298
1301
|
source_rse_id: Mapped[Optional[uuid.UUID]] = mapped_column(GUID())
|
|
1299
1302
|
attributes: Mapped[Optional[str]] = mapped_column(String(4000))
|
|
1300
1303
|
state: Mapped[RequestState] = mapped_column(Enum(RequestState, name='REQUESTS_STATE_CHK',
|
|
@@ -1321,7 +1324,7 @@ class Request(BASE, ModelBase):
|
|
|
1321
1324
|
estimated_transferred_at: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
1322
1325
|
staging_started_at: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
1323
1326
|
staging_finished_at: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
1324
|
-
account: Mapped[Optional[InternalAccount]] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1327
|
+
account: Mapped[Optional[InternalAccount]] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1325
1328
|
requested_at: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
1326
1329
|
last_processed_by: Mapped[Optional[str]] = mapped_column(String(64))
|
|
1327
1330
|
last_processed_at: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
@@ -1344,9 +1347,9 @@ class Request(BASE, ModelBase):
|
|
|
1344
1347
|
class TransferHop(BASE, ModelBase):
|
|
1345
1348
|
"""Represents source files for transfers"""
|
|
1346
1349
|
__tablename__ = 'transfer_hops'
|
|
1347
|
-
request_id: Mapped[
|
|
1348
|
-
next_hop_request_id: Mapped[
|
|
1349
|
-
initial_request_id: Mapped[
|
|
1350
|
+
request_id: Mapped[str] = mapped_column(GUID())
|
|
1351
|
+
next_hop_request_id: Mapped[str] = mapped_column(GUID())
|
|
1352
|
+
initial_request_id: Mapped[str] = mapped_column(GUID())
|
|
1350
1353
|
_table_args = (PrimaryKeyConstraint('request_id', 'next_hop_request_id', 'initial_request_id', name='TRANSFER_HOPS_PK'),
|
|
1351
1354
|
ForeignKeyConstraint(['initial_request_id'], ['requests.id'], name='TRANSFER_HOPS_INIT_REQ_ID_FK'),
|
|
1352
1355
|
ForeignKeyConstraint(['request_id'], ['requests.id'], name='TRANSFER_HOPS_REQ_ID_FK'),
|
|
@@ -1358,18 +1361,18 @@ class TransferHop(BASE, ModelBase):
|
|
|
1358
1361
|
class RequestHistory(BASE, ModelBase):
|
|
1359
1362
|
"""Represents request history"""
|
|
1360
1363
|
__tablename__ = 'requests_history'
|
|
1361
|
-
id: Mapped[
|
|
1364
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
1362
1365
|
request_type: Mapped[RequestType] = mapped_column(Enum(RequestType, name='REQUESTS_HIST_TYPE_CHK',
|
|
1363
1366
|
create_constraint=True,
|
|
1364
1367
|
values_callable=lambda obj: [e.value for e in obj]),
|
|
1365
1368
|
default=RequestType.TRANSFER)
|
|
1366
|
-
scope: Mapped[Optional[InternalScope]] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1367
|
-
name: Mapped[Optional[str]] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1369
|
+
scope: Mapped[Optional[InternalScope]] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1370
|
+
name: Mapped[Optional[str]] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1368
1371
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='REQUESTS_HIST_DIDTYPE_CHK',
|
|
1369
1372
|
create_constraint=True,
|
|
1370
1373
|
values_callable=lambda obj: [e.value for e in obj]),
|
|
1371
1374
|
default=DIDType.FILE)
|
|
1372
|
-
dest_rse_id: Mapped[
|
|
1375
|
+
dest_rse_id: Mapped[str] = mapped_column(GUID())
|
|
1373
1376
|
source_rse_id: Mapped[Optional[uuid.UUID]] = mapped_column(GUID())
|
|
1374
1377
|
attributes: Mapped[Optional[str]] = mapped_column(String(4000))
|
|
1375
1378
|
state: Mapped[RequestState] = mapped_column(Enum(RequestState, name='REQUESTS_HIST_STATE_CHK',
|
|
@@ -1396,7 +1399,7 @@ class RequestHistory(BASE, ModelBase):
|
|
|
1396
1399
|
estimated_transferred_at: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
1397
1400
|
staging_started_at: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
1398
1401
|
staging_finished_at: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
1399
|
-
account: Mapped[Optional[InternalAccount]] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1402
|
+
account: Mapped[Optional[InternalAccount]] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1400
1403
|
requested_at: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
1401
1404
|
priority: Mapped[Optional[int]] = mapped_column(Integer)
|
|
1402
1405
|
transfertool: Mapped[Optional[str]] = mapped_column(String(64))
|
|
@@ -1410,11 +1413,11 @@ class RequestHistory(BASE, ModelBase):
|
|
|
1410
1413
|
class Source(BASE, ModelBase):
|
|
1411
1414
|
"""Represents source files for transfers"""
|
|
1412
1415
|
__tablename__ = 'sources'
|
|
1413
|
-
request_id: Mapped[
|
|
1414
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1415
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1416
|
-
rse_id: Mapped[
|
|
1417
|
-
dest_rse_id: Mapped[
|
|
1416
|
+
request_id: Mapped[str] = mapped_column(GUID())
|
|
1417
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1418
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1419
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
1420
|
+
dest_rse_id: Mapped[str] = mapped_column(GUID())
|
|
1418
1421
|
url: Mapped[Optional[str]] = mapped_column(String(2048))
|
|
1419
1422
|
bytes: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
1420
1423
|
ranking: Mapped[Optional[int]] = mapped_column(Integer())
|
|
@@ -1432,11 +1435,11 @@ class Source(BASE, ModelBase):
|
|
|
1432
1435
|
class SourceHistory(BASE, ModelBase):
|
|
1433
1436
|
"""Represents history of source files for transfers"""
|
|
1434
1437
|
__tablename__ = 'sources_history'
|
|
1435
|
-
request_id: Mapped[
|
|
1436
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1437
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1438
|
-
rse_id: Mapped[
|
|
1439
|
-
dest_rse_id: Mapped[
|
|
1438
|
+
request_id: Mapped[str] = mapped_column(GUID())
|
|
1439
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1440
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1441
|
+
rse_id: Mapped[str] = mapped_column(GUID())
|
|
1442
|
+
dest_rse_id: Mapped[str] = mapped_column(GUID())
|
|
1440
1443
|
url: Mapped[Optional[str]] = mapped_column(String(2048))
|
|
1441
1444
|
bytes: Mapped[Optional[int]] = mapped_column(BigInteger)
|
|
1442
1445
|
ranking: Mapped[Optional[int]] = mapped_column(Integer())
|
|
@@ -1451,8 +1454,8 @@ class SourceHistory(BASE, ModelBase):
|
|
|
1451
1454
|
class Distance(BASE, ModelBase):
|
|
1452
1455
|
"""Represents distance between rses"""
|
|
1453
1456
|
__tablename__ = 'distances'
|
|
1454
|
-
src_rse_id: Mapped[
|
|
1455
|
-
dest_rse_id: Mapped[
|
|
1457
|
+
src_rse_id: Mapped[str] = mapped_column(GUID())
|
|
1458
|
+
dest_rse_id: Mapped[str] = mapped_column(GUID())
|
|
1456
1459
|
distance: Mapped[Optional[int]] = mapped_column(Integer())
|
|
1457
1460
|
_table_args = (PrimaryKeyConstraint('src_rse_id', 'dest_rse_id', name='DISTANCES_PK'),
|
|
1458
1461
|
ForeignKeyConstraint(['src_rse_id'], ['rses.id'], name='DISTANCES_SRC_RSES_FK'),
|
|
@@ -1463,11 +1466,11 @@ class Distance(BASE, ModelBase):
|
|
|
1463
1466
|
class TransferStats(BASE, ModelBase):
|
|
1464
1467
|
"""Represents counters for transfer link usage"""
|
|
1465
1468
|
__tablename__ = 'transfer_stats'
|
|
1466
|
-
id: Mapped[
|
|
1469
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
1467
1470
|
resolution: Mapped[int] = mapped_column(Integer)
|
|
1468
1471
|
timestamp: Mapped[datetime] = mapped_column(DateTime)
|
|
1469
|
-
dest_rse_id: Mapped[
|
|
1470
|
-
src_rse_id: Mapped[
|
|
1472
|
+
dest_rse_id: Mapped[str] = mapped_column(GUID())
|
|
1473
|
+
src_rse_id: Mapped[str] = mapped_column(GUID())
|
|
1471
1474
|
activity: Mapped[Optional[str]] = mapped_column(String(50))
|
|
1472
1475
|
files_done: Mapped[int] = mapped_column(BigInteger)
|
|
1473
1476
|
bytes_done: Mapped[int] = mapped_column(BigInteger)
|
|
@@ -1481,7 +1484,7 @@ class TransferStats(BASE, ModelBase):
|
|
|
1481
1484
|
class Subscription(BASE, ModelBase):
|
|
1482
1485
|
"""Represents a subscription"""
|
|
1483
1486
|
__tablename__ = 'subscriptions'
|
|
1484
|
-
id: Mapped[
|
|
1487
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
1485
1488
|
name: Mapped[str] = mapped_column(String(64))
|
|
1486
1489
|
filter: Mapped[Optional[str]] = mapped_column(String(4000))
|
|
1487
1490
|
replication_rules: Mapped[Optional[str]] = mapped_column(String(4000))
|
|
@@ -1491,7 +1494,7 @@ class Subscription(BASE, ModelBase):
|
|
|
1491
1494
|
values_callable=lambda obj: [e.value for e in obj]),
|
|
1492
1495
|
default=SubscriptionState.ACTIVE)
|
|
1493
1496
|
last_processed: Mapped[Optional[datetime]] = mapped_column(DateTime, default=datetime.utcnow())
|
|
1494
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1497
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1495
1498
|
lifetime: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
1496
1499
|
comments: Mapped[Optional[str]] = mapped_column(String(4000))
|
|
1497
1500
|
retroactive: Mapped[bool] = mapped_column(Boolean(name='SUBSCRIPTIONS_RETROACTIVE_CHK', create_constraint=True),
|
|
@@ -1508,7 +1511,7 @@ class Subscription(BASE, ModelBase):
|
|
|
1508
1511
|
class SubscriptionHistory(BASE, ModelBase):
|
|
1509
1512
|
"""Represents a subscription history"""
|
|
1510
1513
|
__tablename__ = 'subscriptions_history'
|
|
1511
|
-
id: Mapped[
|
|
1514
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
1512
1515
|
name: Mapped[str] = mapped_column(String(64))
|
|
1513
1516
|
filter: Mapped[Optional[str]] = mapped_column(String(4000))
|
|
1514
1517
|
replication_rules: Mapped[Optional[str]] = mapped_column(String(4000))
|
|
@@ -1518,7 +1521,7 @@ class SubscriptionHistory(BASE, ModelBase):
|
|
|
1518
1521
|
values_callable=lambda obj: [e.value for e in obj]),
|
|
1519
1522
|
default=SubscriptionState.ACTIVE)
|
|
1520
1523
|
last_processed: Mapped[Optional[datetime]] = mapped_column(DateTime, default=datetime.utcnow())
|
|
1521
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1524
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1522
1525
|
lifetime: Mapped[Optional[datetime]] = mapped_column(DateTime)
|
|
1523
1526
|
comments: Mapped[Optional[str]] = mapped_column(String(4000))
|
|
1524
1527
|
retroactive: Mapped[bool] = mapped_column(Boolean(name='SUBS_HISTORY_RETROACTIVE_CHK', create_constraint=True),
|
|
@@ -1531,7 +1534,7 @@ class Token(BASE, ModelBase):
|
|
|
1531
1534
|
"""Represents the authentication tokens and their lifetime"""
|
|
1532
1535
|
__tablename__ = 'tokens'
|
|
1533
1536
|
token: Mapped[str] = mapped_column(String(3072)) # account-identity-appid-uuid -> max length: (+ 30 1 255 1 32 1 32)
|
|
1534
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1537
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1535
1538
|
refresh_token: Mapped[Optional[str]] = mapped_column(String(3072), default=None)
|
|
1536
1539
|
refresh: Mapped[bool] = mapped_column(Boolean(name='TOKENS_REFRESH_CHK', create_constraint=True),
|
|
1537
1540
|
default=False)
|
|
@@ -1552,11 +1555,11 @@ class Token(BASE, ModelBase):
|
|
|
1552
1555
|
class OAuthRequest(BASE, ModelBase):
|
|
1553
1556
|
"""Represents the authentication session parameters of OAuth 2.0 requests"""
|
|
1554
1557
|
__tablename__ = 'oauth_requests'
|
|
1555
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1558
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1556
1559
|
state: Mapped[str] = mapped_column(String(50))
|
|
1557
1560
|
nonce: Mapped[Optional[str]] = mapped_column(String(50))
|
|
1558
1561
|
access_msg: Mapped[Optional[str]] = mapped_column(String(2048))
|
|
1559
|
-
redirect_msg: Mapped[Optional[str]] = mapped_column(String(
|
|
1562
|
+
redirect_msg: Mapped[Optional[str]] = mapped_column(String(4000))
|
|
1560
1563
|
refresh_lifetime: Mapped[Optional[int]] = mapped_column(Integer())
|
|
1561
1564
|
ip: Mapped[Optional[str]] = mapped_column(String(39), nullable=True)
|
|
1562
1565
|
expired_at: Mapped[datetime] = mapped_column(DateTime, default=lambda: datetime.utcnow() + timedelta(seconds=600)) # 10 min lifetime by default
|
|
@@ -1569,7 +1572,7 @@ class OAuthRequest(BASE, ModelBase):
|
|
|
1569
1572
|
class Message(BASE, ModelBase):
|
|
1570
1573
|
"""Represents the event messages"""
|
|
1571
1574
|
__tablename__ = 'messages'
|
|
1572
|
-
id: Mapped[
|
|
1575
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
1573
1576
|
event_type: Mapped[str] = mapped_column(String(256))
|
|
1574
1577
|
payload: Mapped[str] = mapped_column(String(4000))
|
|
1575
1578
|
payload_nolimit: Mapped[Optional[str]] = mapped_column(Text)
|
|
@@ -1583,7 +1586,7 @@ class Message(BASE, ModelBase):
|
|
|
1583
1586
|
class MessageHistory(BASE, ModelBase):
|
|
1584
1587
|
"""Represents the history of event messages"""
|
|
1585
1588
|
__tablename__ = 'messages_history'
|
|
1586
|
-
id: Mapped[
|
|
1589
|
+
id: Mapped[str] = mapped_column(GUID())
|
|
1587
1590
|
event_type: Mapped[Optional[str]] = mapped_column(String(1024))
|
|
1588
1591
|
payload: Mapped[Optional[str]] = mapped_column(String(4000))
|
|
1589
1592
|
payload_nolimit: Mapped[Optional[str]] = mapped_column(Text)
|
|
@@ -1637,7 +1640,7 @@ class Heartbeat(BASE, ModelBase):
|
|
|
1637
1640
|
class NamingConvention(BASE, ModelBase):
|
|
1638
1641
|
"""Represents naming conventions for name within a scope"""
|
|
1639
1642
|
__tablename__ = 'naming_conventions'
|
|
1640
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1643
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1641
1644
|
regexp: Mapped[Optional[str]] = mapped_column(String(255))
|
|
1642
1645
|
convention_type: Mapped[KeyType] = mapped_column(Enum(KeyType, name='CVT_TYPE_CHK',
|
|
1643
1646
|
create_constraint=True,
|
|
@@ -1649,13 +1652,13 @@ class NamingConvention(BASE, ModelBase):
|
|
|
1649
1652
|
class LifetimeException(BASE, ModelBase):
|
|
1650
1653
|
"""Represents the exceptions to the lifetime model"""
|
|
1651
1654
|
__tablename__ = 'lifetime_except'
|
|
1652
|
-
id: Mapped[
|
|
1653
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1654
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1655
|
+
id: Mapped[str] = mapped_column(GUID(), default=utils.generate_uuid)
|
|
1656
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1657
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1655
1658
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='LIFETIME_EXCEPT_TYPE_CHK',
|
|
1656
1659
|
create_constraint=True,
|
|
1657
1660
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
1658
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1661
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1659
1662
|
pattern: Mapped[Optional[str]] = mapped_column(String(255))
|
|
1660
1663
|
comments: Mapped[Optional[str]] = mapped_column(String(4000))
|
|
1661
1664
|
state: Mapped[LifetimeExceptionsState] = mapped_column(Enum(LifetimeExceptionsState, name='LIFETIME_EXCEPT_STATE_CHK',
|
|
@@ -1681,9 +1684,9 @@ class VO(BASE, ModelBase):
|
|
|
1681
1684
|
class DidFollowed(BASE, ModelBase):
|
|
1682
1685
|
"""Represents the datasets followed by a user"""
|
|
1683
1686
|
__tablename__ = 'dids_followed'
|
|
1684
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1685
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1686
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1687
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1688
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1689
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1687
1690
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='DIDS_FOLLOWED_TYPE_CHK',
|
|
1688
1691
|
create_constraint=True,
|
|
1689
1692
|
values_callable=lambda obj: [e.value for e in obj]))
|
|
@@ -1699,9 +1702,9 @@ class DidFollowed(BASE, ModelBase):
|
|
|
1699
1702
|
class FollowEvent(BASE, ModelBase):
|
|
1700
1703
|
"""Represents the events affecting the datasets which are followed"""
|
|
1701
1704
|
__tablename__ = 'dids_followed_events'
|
|
1702
|
-
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(get_schema_value('SCOPE_LENGTH')))
|
|
1703
|
-
name: Mapped[str] = mapped_column(String(get_schema_value('NAME_LENGTH')))
|
|
1704
|
-
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(get_schema_value('ACCOUNT_LENGTH')))
|
|
1705
|
+
scope: Mapped[InternalScope] = mapped_column(InternalScopeString(common_schema.get_schema_value('SCOPE_LENGTH')))
|
|
1706
|
+
name: Mapped[str] = mapped_column(String(common_schema.get_schema_value('NAME_LENGTH')))
|
|
1707
|
+
account: Mapped[InternalAccount] = mapped_column(InternalAccountString(common_schema.get_schema_value('ACCOUNT_LENGTH')))
|
|
1705
1708
|
did_type: Mapped[DIDType] = mapped_column(Enum(DIDType, name='DIDS_FOLLOWED_EVENTS_TYPE_CHK',
|
|
1706
1709
|
create_constraint=True,
|
|
1707
1710
|
values_callable=lambda obj: [e.value for e in obj]))
|