diff --git a/.flake8 b/.flake8 index cd405d8af..ef042001c 100644 --- a/.flake8 +++ b/.flake8 @@ -20,4 +20,4 @@ ignore = E111,E114,E121,E122,E125,E126,E127,E131,E261,E265,E266 addopts = --failed-first -p no:random-order --cov=. --cov-report=term --cov-report=xml testpaths = ./lib_common ./lib_client ./test_utilities ./gmn ./client_cli ./client_onedrive python_files = test_*.py -DJANGO_SETTINGS_MODULE = gmn.settings_test +DJANGO_SETTINGS_MODULE = d1_gmn.settings_test diff --git a/.isort.cfg b/.isort.cfg index e26178ef3..69643694f 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -1,5 +1,5 @@ [settings] -forced_separate=d1_common,d1_client,django,gmn,d1_test +forced_separate=d1_common,d1_client,django,d1_gmn,d1_test indent=' ' line_length=80 #multi_line_output=3 diff --git a/.travis.yml b/.travis.yml index c738baceb..d5aa547cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: script: # Travis clones the project to $TRAVIS_BUILD_DIR and cds there before running # the scripts. - - python ./dev_tools/setup_all.py $TRAVIS_BUILD_DIR develop + - python ./dev_tools/src/d1_dev/setup-all.py develop # Debug - pip freeze - pip check diff --git a/gmn/src/gmn/__init__.py b/gmn/src/d1_gmn/__init__.py similarity index 93% rename from gmn/src/gmn/__init__.py rename to gmn/src/d1_gmn/__init__.py index be4a98abd..52ea2788a 100644 --- a/gmn/src/gmn/__init__.py +++ b/gmn/src/d1_gmn/__init__.py @@ -18,4 +18,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -default_app_config = 'gmn.app.startup.GMNStartupChecks' +default_app_config = 'd1_gmn.app.startup.GMNStartupChecks' diff --git a/gmn/src/gmn/app/__init__.py b/gmn/src/d1_gmn/app/__init__.py similarity index 100% rename from gmn/src/gmn/app/__init__.py rename to gmn/src/d1_gmn/app/__init__.py diff --git a/gmn/src/gmn/app/auth.py b/gmn/src/d1_gmn/app/auth.py similarity index 95% rename from gmn/src/gmn/app/auth.py rename to gmn/src/d1_gmn/app/auth.py index f1fbf647f..91856f7ef 100644 --- a/gmn/src/gmn/app/auth.py +++ b/gmn/src/d1_gmn/app/auth.py @@ -27,13 +27,13 @@ import logging -import d1_common.const +import d1_gmn.app.models +import d1_gmn.app.node_registry + import d1_common.cert.subjects -import d1_common.types.exceptions +import d1_common.const import d1_common.types.dataoneTypes - -import gmn.app.models -import gmn.app.node_registry +import d1_common.types.exceptions import django.conf import django.core.cache @@ -90,7 +90,7 @@ def level_to_action(level): def get_trusted_subjects(): return ( - gmn.app.node_registry.get_cn_subjects() | + d1_gmn.app.node_registry.get_cn_subjects() | django.conf.settings.DATAONE_TRUSTED_SUBJECTS | {_get_client_side_certificate_subject()} ) @@ -168,14 +168,14 @@ def is_allowed(request, level, pid): # and when the ACL is updated. # - The permission must be for an action level that is the same or higher than # the requested action level. - return gmn.app.models.Permission.objects.filter( + return d1_gmn.app.models.Permission.objects.filter( sciobj__pid__did=pid, subject__subject__in=request.all_subjects_set, level__gte=level ).exists() def has_create_update_delete_permission(request): - return gmn.app.models.WhitelistForCreateUpdateDelete.objects.filter( + return d1_gmn.app.models.WhitelistForCreateUpdateDelete.objects.filter( subject__subject__in=request.all_subjects_set).exists() \ or is_trusted_subject(request) @@ -198,7 +198,7 @@ def assert_allowed(request, level, pid): Raise NotFound if object does not exist. Return NoneType if subject is allowed. """ - if not gmn.app.models.ScienceObject.objects.filter(pid__did=pid).exists(): + if not d1_gmn.app.models.ScienceObject.objects.filter(pid__did=pid).exists(): raise d1_common.types.exceptions.NotFound( 0, u'Attempted to perform operation on non-existing object. pid="{}"'. format(pid) diff --git a/gmn/src/gmn/app/db_filter.py b/gmn/src/d1_gmn/app/db_filter.py similarity index 88% rename from gmn/src/gmn/app/db_filter.py rename to gmn/src/d1_gmn/app/db_filter.py index 4076fb745..1caf2cae6 100644 --- a/gmn/src/gmn/app/db_filter.py +++ b/gmn/src/d1_gmn/app/db_filter.py @@ -39,19 +39,20 @@ import re +import d1_gmn.app.models +import d1_gmn.app.views.asserts +import d1_gmn.app.views.util + import d1_common.const import d1_common.date_time import d1_common.types.exceptions -import gmn.app.models -import gmn.app.views.asserts -import gmn.app.views.util - def add_access_policy_filter(query, request, column_name): q = ( - gmn.app.models.Subject.objects.filter(subject__in=request.all_subjects_set) - .values('permission__sciobj') + d1_gmn.app.models.Subject.objects.filter( + subject__in=request.all_subjects_set + ).values('permission__sciobj') ) filter_arg = '{}__in'.format(column_name) return query.filter(**{filter_arg: q}) @@ -62,8 +63,8 @@ def add_replica_filter(query, request): bool_val = request.GET.get(param_name, True) if bool_val is None: return query - gmn.app.views.asserts.is_bool_param(param_name, bool_val) - if gmn.app.views.util.is_false_param(bool_val): + d1_gmn.app.views.asserts.is_bool_param(param_name, bool_val) + if d1_gmn.app.views.util.is_false_param(bool_val): query = query.filter(pid__localreplica_pid__isnull=True) return query @@ -72,10 +73,10 @@ def add_bool_filter(query, request, column_name, param_name): bool_val = request.GET.get(param_name, None) if bool_val is None: return query - gmn.app.views.asserts.is_bool_param(param_name, bool_val) + d1_gmn.app.views.asserts.is_bool_param(param_name, bool_val) filter_arg = column_name return query.filter( - **{filter_arg: gmn.app.views.util.is_true_param(bool_val)} + **{filter_arg: d1_gmn.app.views.util.is_true_param(bool_val)} ) @@ -94,7 +95,7 @@ def add_datetime_filter(query, request, column_name, param_name, operator): 0, u'Invalid date format for parameter. parameter="{}" date="{}", ' u'parse_error="{}"'.format(param_name, date_str, str(e)) ) - gmn.app.views.asserts.date_is_utc(date) + d1_gmn.app.views.asserts.date_is_utc(date) date = d1_common.date_time.strip_timezone(date) filter_arg = '{}__{}'.format(column_name, operator) return query.filter(**{filter_arg: date}) diff --git a/gmn/src/gmn/app/event_log.py b/gmn/src/d1_gmn/app/event_log.py similarity index 84% rename from gmn/src/gmn/app/event_log.py rename to gmn/src/d1_gmn/app/event_log.py index 02d3d2261..35f274e21 100644 --- a/gmn/src/gmn/app/event_log.py +++ b/gmn/src/d1_gmn/app/event_log.py @@ -25,10 +25,10 @@ from __future__ import absolute_import -import d1_common.types.exceptions +import d1_gmn.app.auth +import d1_gmn.app.models -import gmn.app.auth -import gmn.app.models +import d1_common.types.exceptions def _log(pid, request, event, timestamp=None): @@ -36,13 +36,15 @@ def _log(pid, request, event, timestamp=None): """ ip_address = request.META['REMOTE_ADDR'] user_agent = request.META['HTTP_USER_AGENT'] - subject = gmn.app.auth.get_trusted_subjects_string() + subject = d1_gmn.app.auth.get_trusted_subjects_string() # Support logging events that are not associated with an object. object_model = None if pid is not None: try: - object_model = gmn.app.models.ScienceObject.objects.filter(pid__did=pid)[0] + object_model = d1_gmn.app.models.ScienceObject.objects.filter( + pid__did=pid + )[0] except IndexError: err_msg = u'Attempted to create event log for non-existing object. pid="{}"'\ .format(pid) @@ -62,12 +64,12 @@ def _log(pid, request, event, timestamp=None): def create_log_entry(object_model, event, ip_address, user_agent, subject): - event_log_model = gmn.app.models.EventLog() + event_log_model = d1_gmn.app.models.EventLog() event_log_model.sciobj = object_model - event_log_model.event = gmn.app.models.event(event) - event_log_model.ip_address = gmn.app.models.ip_address(ip_address) - event_log_model.user_agent = gmn.app.models.user_agent(user_agent) - event_log_model.subject = gmn.app.models.subject(subject) + event_log_model.event = d1_gmn.app.models.event(event) + event_log_model.ip_address = d1_gmn.app.models.ip_address(ip_address) + event_log_model.user_agent = d1_gmn.app.models.user_agent(user_agent) + event_log_model.subject = d1_gmn.app.models.subject(subject) event_log_model.save() return event_log_model diff --git a/gmn/src/gmn/app/local_replica.py b/gmn/src/d1_gmn/app/local_replica.py similarity index 86% rename from gmn/src/gmn/app/local_replica.py rename to gmn/src/d1_gmn/app/local_replica.py index 3dd2144e7..1ad256b1c 100644 --- a/gmn/src/gmn/app/local_replica.py +++ b/gmn/src/d1_gmn/app/local_replica.py @@ -22,12 +22,12 @@ from __future__ import absolute_import +import d1_gmn.app.models + import d1_common.checksum import d1_common.types.dataoneTypes import d1_common.types.exceptions -import gmn.app.models - import django.conf from django.db.models import Sum @@ -38,12 +38,12 @@ def is_local_replica(pid): """Includes unprocessed replication requests.""" - return gmn.app.models.LocalReplica.objects.filter(pid__did=pid).exists() + return d1_gmn.app.models.LocalReplica.objects.filter(pid__did=pid).exists() def is_unprocessed_local_replica(pid): """Is local replica with status "queued".""" - return gmn.app.models.LocalReplica.objects.filter( + return d1_gmn.app.models.LocalReplica.objects.filter( pid__did=pid, info__status__status='queued', ).exists() @@ -52,7 +52,7 @@ def is_unprocessed_local_replica(pid): def is_revision_chain_placeholder(pid): """For replicas, the PIDs referenced in revision chains are reserved for use by other replicas.""" - return gmn.app.models.ReplicaRevisionChainReference.objects.filter( + return d1_gmn.app.models.ReplicaRevisionChainReference.objects.filter( pid__did=pid ).exists() @@ -65,14 +65,14 @@ def get_total_size_of_replicas(): def get_total_size_of_completed_replicas(): """Return the total number of bytes of successfully processed replicas. """ - return gmn.app.models.LocalReplica.objects.aggregate( + return d1_gmn.app.models.LocalReplica.objects.aggregate( Sum('pid__scienceobject__size') )['pid__scienceobject__size__sum'] or 0 def get_total_size_of_queued_replicas(): """Return the total number of bytes of requested, unprocessed replicas.""" - return gmn.app.models.ReplicationQueue.objects.filter( + return d1_gmn.app.models.ReplicationQueue.objects.filter( local_replica__info__status__status='queued' ).aggregate(Sum('size'))['size__sum'] or 0 @@ -83,22 +83,22 @@ def add_to_replication_queue(source_node_urn, sysmeta_pyxb): Preconditions: - sysmeta_pyxb.identifier is verified not to exist. E.g., with - gmn.app.views.asserts.is_unused(pid). + d1_gmn.app.views.asserts.is_unused(pid). Postconditions: - The database is set up to track a new replica, with initial status, "queued". - The PID provided in the sysmeta_pyxb is reserved for the replica. """ - replica_info_model = gmn.app.models.replica_info( + replica_info_model = d1_gmn.app.models.replica_info( status_str='queued', source_node_urn=source_node_urn, ) - local_replica_model = gmn.app.models.local_replica( - pid=gmn.app.util.uvalue(sysmeta_pyxb.identifier), + local_replica_model = d1_gmn.app.models.local_replica( + pid=d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier), replica_info_model=replica_info_model, ) - gmn.app.models.replication_queue( + d1_gmn.app.models.replication_queue( local_replica_model=local_replica_model, size=sysmeta_pyxb.size, ) @@ -140,7 +140,7 @@ def assert_request_complies_with_replication_policy(sysmeta_pyxb): raise d1_common.types.exceptions.InvalidRequest( 0, u'This node does not accept replicas from originating node. ' u'originating_node="{}"'. - format(gmn.app.util.uvalue(sysmeta_pyxb.originMemberNode)) + format(d1_gmn.app.util.uvalue(sysmeta_pyxb.originMemberNode)) ) if len(django.conf.settings.REPLICATION_ALLOWEDOBJECTFORMAT): @@ -148,5 +148,5 @@ def assert_request_complies_with_replication_policy(sysmeta_pyxb): ) not in django.conf.settings.REPLICATION_ALLOWEDOBJECTFORMAT: raise d1_common.types.exceptions.InvalidRequest( 0, u'This node does not accept objects of specified format. format="{}"' - .format(gmn.app.util.uvalue(sysmeta_pyxb.formatId)) + .format(d1_gmn.app.util.uvalue(sysmeta_pyxb.formatId)) ) diff --git a/gmn/src/gmn/app/management/__init__.py b/gmn/src/d1_gmn/app/management/__init__.py similarity index 100% rename from gmn/src/gmn/app/management/__init__.py rename to gmn/src/d1_gmn/app/management/__init__.py diff --git a/gmn/src/gmn/app/management/commands/__init__.py b/gmn/src/d1_gmn/app/management/commands/__init__.py similarity index 100% rename from gmn/src/gmn/app/management/commands/__init__.py rename to gmn/src/d1_gmn/app/management/commands/__init__.py diff --git a/gmn/src/gmn/app/management/commands/cert.py b/gmn/src/d1_gmn/app/management/commands/cert.py similarity index 89% rename from gmn/src/gmn/app/management/commands/cert.py rename to gmn/src/d1_gmn/app/management/commands/cert.py index 8f9604c6a..20c5a3baa 100644 --- a/gmn/src/gmn/app/management/commands/cert.py +++ b/gmn/src/d1_gmn/app/management/commands/cert.py @@ -35,13 +35,14 @@ import logging +import d1_gmn.app.management.commands.util +import d1_gmn.app.middleware.session_cert +import d1_gmn.app.models + import d1_common.types.exceptions import d1_common.util -import django.core.management.base -import gmn.app.management.commands.util -import gmn.app.middleware.session_cert -import gmn.app.models +import django.core.management.base # noinspection PyClassHasNoInit @@ -72,7 +73,7 @@ def add_arguments(self, parser): ) def handle(self, *args, **options): - gmn.app.management.commands.util.log_setup(options['debug']) + d1_gmn.app.management.commands.util.log_setup(options['debug']) if options['command'] not in ('view', 'whitelist'): logging.info(self.missing_args_message) return @@ -84,7 +85,7 @@ def handle(self, *args, **options): def _handle(self, command_str, cert_pem_path): cert_pem = self._read_pem_cert(cert_pem_path) primary_str, equivalent_set = ( - gmn.app.middleware.session_cert.get_authenticated_subjects(cert_pem) + d1_gmn.app.middleware.session_cert.get_authenticated_subjects(cert_pem) ) if command_str == 'view': self._view(primary_str, equivalent_set) @@ -103,14 +104,14 @@ def _view(self, primary_str, equivalent_set): logging.info(u' {}'.format(subject_str)) def _whitelist(self, primary_str): - if gmn.app.models.WhitelistForCreateUpdateDelete.objects.filter( - subject=gmn.app.models.subject(primary_str) + if d1_gmn.app.models.WhitelistForCreateUpdateDelete.objects.filter( + subject=d1_gmn.app.models.subject(primary_str) ).exists(): raise django.core.management.base.CommandError( u'Create, update and delete already enabled for subject: {}'. format(primary_str) ) - gmn.app.models.whitelist_for_create_update_delete(primary_str) + d1_gmn.app.models.whitelist_for_create_update_delete(primary_str) logging.info( u'Enabled create, update and delete for subject: {}'.format(primary_str) ) diff --git a/gmn/src/gmn/app/management/commands/export_object_list.py b/gmn/src/d1_gmn/app/management/commands/export_object_list.py similarity index 84% rename from gmn/src/gmn/app/management/commands/export_object_list.py rename to gmn/src/d1_gmn/app/management/commands/export_object_list.py index bbd741a4d..40b61ab7e 100644 --- a/gmn/src/gmn/app/management/commands/export_object_list.py +++ b/gmn/src/d1_gmn/app/management/commands/export_object_list.py @@ -25,10 +25,10 @@ import logging -import django.core.management.base +import d1_gmn.app.management.commands.util +import d1_gmn.app.models -import gmn.app.management.commands.util -import gmn.app.models +import django.core.management.base # noinspection PyClassHasNoInit @@ -51,22 +51,22 @@ def add_arguments(self, parser): parser.add_argument('path', type=str, help='path to export file') def handle(self, *args, **options): - gmn.app.management.commands.util.log_setup(options['debug']) + d1_gmn.app.management.commands.util.log_setup(options['debug']) logging.info( u'Running management command: {}'. - format(gmn.app.management.commands.util.get_command_name()) + format(d1_gmn.app.management.commands.util.get_command_name()) ) - gmn.app.management.commands.util.abort_if_other_instance_is_running() + d1_gmn.app.management.commands.util.abort_if_other_instance_is_running() self.export_object_list(options['path'], options['public']) logging.info(u'Exported object list to: {}'.format(options['path'])) def export_object_list(self, path, public_only): with open(path, 'w') as f: - for sciobj_model in gmn.app.models.ScienceObject.objects.all(): + for sciobj_model in d1_gmn.app.models.ScienceObject.objects.all(): # Permissions are cumulative, so if a subject has permissions for an # object, that permissions are guaranteed to include "read", the # lowest level permission. - for permission_model in gmn.app.models.Permission.objects.filter( + for permission_model in d1_gmn.app.models.Permission.objects.filter( sciobj=sciobj_model ): if public_only: diff --git a/gmn/src/gmn/app/management/commands/fix_chains.py b/gmn/src/d1_gmn/app/management/commands/fix_chains.py similarity index 79% rename from gmn/src/gmn/app/management/commands/fix_chains.py rename to gmn/src/d1_gmn/app/management/commands/fix_chains.py index 184db3372..8c3c19f0c 100644 --- a/gmn/src/gmn/app/management/commands/fix_chains.py +++ b/gmn/src/d1_gmn/app/management/commands/fix_chains.py @@ -28,15 +28,15 @@ import logging -import gmn.app.auth -import gmn.app.management.commands.util -import gmn.app.models -import gmn.app.node -import gmn.app.revision -import gmn.app.sysmeta -import gmn.app.util -import gmn.app.views.asserts -import gmn.app.views.diagnostics +import d1_gmn.app.auth +import d1_gmn.app.management.commands.util +import d1_gmn.app.models +import d1_gmn.app.node +import d1_gmn.app.revision +import d1_gmn.app.sysmeta +import d1_gmn.app.util +import d1_gmn.app.views.asserts +import d1_gmn.app.views.diagnostics import django.conf import django.core.management.base @@ -55,12 +55,12 @@ def add_arguments(self, parser): ) def handle(self, *args, **options): - gmn.app.management.commands.util.log_setup(options['debug']) + d1_gmn.app.management.commands.util.log_setup(options['debug']) logging.info( u'Running management command: {}'. - format(gmn.app.management.commands.util.get_command_name()) + format(d1_gmn.app.management.commands.util.get_command_name()) ) - gmn.app.management.commands.util.abort_if_other_instance_is_running() + d1_gmn.app.management.commands.util.abort_if_other_instance_is_running() fix_chains = obsoletedBy() fix_chains.run() @@ -70,7 +70,7 @@ def handle(self, *args, **options): class obsoletedBy(object): def __init__(self): - self._events = gmn.app.management.commands.util.EventCounter() + self._events = d1_gmn.app.management.commands.util.EventCounter() def run(self): try: @@ -88,7 +88,7 @@ def _check_debug_mode(self): ) def _add_revision_refs(self): - for sciobj_model in gmn.app.models.ScienceObject.objects.all(): + for sciobj_model in d1_gmn.app.models.ScienceObject.objects.all(): pid = sciobj_model.pid.did logging.debug('Checking. pid="{}"'.format(pid)) self._events.count('Total') @@ -99,7 +99,7 @@ def _add_revision_refs(self): def _set_obsoletes_if_missing(self, pid, obsoletes_pid): if not self._has_obsoletes(pid): - gmn.app.revision.set_revision( + d1_gmn.app.revision.set_revision( pid, obsoletes_pid=obsoletes_pid, ) @@ -111,7 +111,7 @@ def _set_obsoletes_if_missing(self, pid, obsoletes_pid): def _set_obsoleted_by_if_missing(self, pid, obsoleted_by_pid): if not self._has_obsoleted_by(pid): - gmn.app.revision.set_revision( + d1_gmn.app.revision.set_revision( pid, obsoleted_by_pid=obsoleted_by_pid, ) @@ -123,8 +123,8 @@ def _set_obsoleted_by_if_missing(self, pid, obsoleted_by_pid): def _has_obsoletes(self, pid): try: - return gmn.app.util.get_sci_model(pid).obsoletes is not None - except gmn.app.models.ScienceObject.DoesNotExist: + return d1_gmn.app.util.get_sci_model(pid).obsoletes is not None + except d1_gmn.app.models.ScienceObject.DoesNotExist: logging.debug( 'obsoletes ref to non-existing object. pid="{}"'.format(pid) ) @@ -133,8 +133,8 @@ def _has_obsoletes(self, pid): def _has_obsoleted_by(self, pid): try: - return gmn.app.util.get_sci_model(pid).obsoleted_by is not None - except gmn.app.models.ScienceObject.DoesNotExist: + return d1_gmn.app.util.get_sci_model(pid).obsoleted_by is not None + except d1_gmn.app.models.ScienceObject.DoesNotExist: logging.debug( 'obsoletedBy ref to non-existing object. pid="{}"'.format(pid) ) diff --git a/gmn/src/gmn/app/management/commands/fix_sysmeta.py b/gmn/src/d1_gmn/app/management/commands/fix_sysmeta.py similarity index 84% rename from gmn/src/gmn/app/management/commands/fix_sysmeta.py rename to gmn/src/d1_gmn/app/management/commands/fix_sysmeta.py index fa4ba3720..71b4795a1 100644 --- a/gmn/src/gmn/app/management/commands/fix_sysmeta.py +++ b/gmn/src/d1_gmn/app/management/commands/fix_sysmeta.py @@ -26,19 +26,19 @@ import logging +import d1_gmn.app.auth +import d1_gmn.app.management.commands.util +import d1_gmn.app.models +import d1_gmn.app.node +import d1_gmn.app.revision +import d1_gmn.app.sysmeta +import d1_gmn.app.util +import d1_gmn.app.views.asserts +import d1_gmn.app.views.diagnostics + import d1_client.cnclient import d1_client.iter.sysmeta_multi -import gmn.app.auth -import gmn.app.management.commands.util -import gmn.app.models -import gmn.app.node -import gmn.app.revision -import gmn.app.sysmeta -import gmn.app.util -import gmn.app.views.asserts -import gmn.app.views.diagnostics - import django.conf import django.core.management.base @@ -56,12 +56,12 @@ def add_arguments(self, parser): ) def handle(self, *args, **options): - gmn.app.management.commands.util.log_setup(options['debug']) + d1_gmn.app.management.commands.util.log_setup(options['debug']) logging.info( u'Running management command: {}'. - format(gmn.app.management.commands.util.get_command_name()) + format(d1_gmn.app.management.commands.util.get_command_name()) ) - gmn.app.management.commands.util.abort_if_other_instance_is_running() + d1_gmn.app.management.commands.util.abort_if_other_instance_is_running() fix_chains = FixSystemMetadata() fix_chains.run() @@ -71,7 +71,7 @@ def handle(self, *args, **options): class FixSystemMetadata(object): def __init__(self): - self._events = gmn.app.management.commands.util.EventCounter() + self._events = d1_gmn.app.management.commands.util.EventCounter() def run(self): try: @@ -98,16 +98,16 @@ def _fix_system_metadata_all(self): } ) for i, sysmeta_pyxb in enumerate(sysmeta_iter): - pid = gmn.app.util.uvalue(sysmeta_pyxb.identifier) - cn_submitter = gmn.app.util.uvalue(sysmeta_pyxb.submitter) - if not gmn.app.sysmeta.is_pid(pid): + pid = d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) + cn_submitter = d1_gmn.app.util.uvalue(sysmeta_pyxb.submitter) + if not d1_gmn.app.sysmeta.is_pid(pid): logging.warn(u'CN PID not on MN. pid="{}"'.format(pid)) self._events.count(u'CN PID not on MN') continue - sciobj_model = gmn.app.util.get_sci_model(pid) + sciobj_model = d1_gmn.app.util.get_sci_model(pid) mn_submitter = sciobj_model.submitter.subject if cn_submitter != mn_submitter: - sciobj_model.submitter = gmn.app.models.subject(cn_submitter) + sciobj_model.submitter = d1_gmn.app.models.subject(cn_submitter) sciobj_model.save() logging.info( u'Updated submitter. pid="{}" cn_submitter="{}" mn_submitter="{}"'. @@ -121,9 +121,9 @@ def _fix_system_metadata_all(self): ) self._events.count(u'Submitter already matches') - # num_total = gmn.app.models.ScienceObject.objects.count() + # num_total = d1_gmn.app.models.ScienceObject.objects.count() # num_checked = 0 - # for sciobj_model in gmn.app.models.ScienceObject.objects.all(): + # for sciobj_model in d1_gmn.app.models.ScienceObject.objects.all(): # num_checked += 1 # pid = sciobj_model.pid.did # logging.info( @@ -137,7 +137,7 @@ def _fix_system_metadata_all(self): # self._events.count('Failed') # # def _fix_system_metadata(self, pid): - # sciobj_model = gmn.app.util.get_sci_model(pid) + # sciobj_model = d1_gmn.app.util.get_sci_model(pid) # if not self._is_recent_system_metadata(sciobj_model.uploaded_timestamp): # logging.info('Skipped not recent dateUploaded. pid="{}"'.format(pid)) # self._events.count('Skipped not recent dateUploaded') diff --git a/gmn/src/gmn/app/management/commands/jwt.py b/gmn/src/d1_gmn/app/management/commands/jwt.py similarity index 88% rename from gmn/src/gmn/app/management/commands/jwt.py rename to gmn/src/d1_gmn/app/management/commands/jwt.py index bc08ce94b..965b3cbc8 100644 --- a/gmn/src/gmn/app/management/commands/jwt.py +++ b/gmn/src/d1_gmn/app/management/commands/jwt.py @@ -30,14 +30,16 @@ import logging +import jwt + +import d1_gmn.app.management.commands.util +import d1_gmn.app.middleware.session_jwt +import d1_gmn.app.models + import d1_common.types.exceptions import d1_common.util -import django.core.management.base -import jwt -import gmn.app.management.commands.util -import gmn.app.middleware.session_jwt -import gmn.app.models +import django.core.management.base # noinspection PyClassHasNoInit @@ -67,7 +69,7 @@ def add_arguments(self, parser): ) def handle(self, *args, **options): - gmn.app.management.commands.util.log_setup(options['debug']) + d1_gmn.app.management.commands.util.log_setup(options['debug']) if options['command'] not in ('view', 'whitelist'): logging.info(self.missing_args_message) return @@ -79,7 +81,7 @@ def handle(self, *args, **options): def _handle(self, command_str, jwt_path): jwt_base64 = self._read_jwt(jwt_path) try: - primary_list = gmn.app.middleware.session_jwt.get_subject_list_without_validate( + primary_list = d1_gmn.app.middleware.session_jwt.get_subject_list_without_validate( jwt_base64 ) if not primary_list: @@ -101,14 +103,14 @@ def _view(self, primary_str): logging.info(u' {}'.format(primary_str)) def _whitelist(self, primary_str): - if gmn.app.models.WhitelistForCreateUpdateDelete.objects.filter( - subject=gmn.app.models.subject(primary_str) + if d1_gmn.app.models.WhitelistForCreateUpdateDelete.objects.filter( + subject=d1_gmn.app.models.subject(primary_str) ).exists(): raise django.core.management.base.CommandError( u'Create, update and delete already enabled for subject: {}'. format(primary_str) ) - gmn.app.models.whitelist_for_create_update_delete(primary_str) + d1_gmn.app.models.whitelist_for_create_update_delete(primary_str) logging.info( u'Enabled create, update and delete for subject: {}'.format(primary_str) ) diff --git a/gmn/src/gmn/app/management/commands/migrate_v1_to_v2.py b/gmn/src/d1_gmn/app/management/commands/migrate_v1_to_v2.py similarity index 85% rename from gmn/src/gmn/app/management/commands/migrate_v1_to_v2.py rename to gmn/src/d1_gmn/app/management/commands/migrate_v1_to_v2.py index 0bff8dfa7..0286559f0 100644 --- a/gmn/src/gmn/app/management/commands/migrate_v1_to_v2.py +++ b/gmn/src/d1_gmn/app/management/commands/migrate_v1_to_v2.py @@ -31,22 +31,22 @@ import psycopg2 import psycopg2.extras +import d1_gmn.app.auth +import d1_gmn.app.management.commands.util +import d1_gmn.app.models +import d1_gmn.app.node +import d1_gmn.app.revision +import d1_gmn.app.sysmeta +import d1_gmn.app.util +import d1_gmn.app.views.asserts +import d1_gmn.app.views.diagnostics +import d1_gmn.app.views.util + import d1_common.types.exceptions import d1_common.url import d1_client.cnclient_2_0 -import gmn.app.auth -import gmn.app.management.commands.util -import gmn.app.models -import gmn.app.node -import gmn.app.revision -import gmn.app.sysmeta -import gmn.app.util -import gmn.app.views.asserts -import gmn.app.views.diagnostics -import gmn.app.views.util - import django.conf import django.core.management.base @@ -88,23 +88,23 @@ def add_arguments(self, parser): ) def handle(self, *args, **options): - gmn.app.management.commands.util.log_setup(options['debug']) + d1_gmn.app.management.commands.util.log_setup(options['debug']) logging.info( u'Running management command: {}'. - format(gmn.app.management.commands.util.get_command_name()) + format(d1_gmn.app.management.commands.util.get_command_name()) ) - gmn.app.management.commands.util.abort_if_other_instance_is_running() + d1_gmn.app.management.commands.util.abort_if_other_instance_is_running() m = V2Migration() if not options['force'] and not self._db_is_empty(): logging.error( u'There is already data in the v2 database. Use --force to overwrite.' ) return - gmn.app.views.diagnostics.delete_all_objects() + d1_gmn.app.views.diagnostics.delete_all_objects() m.migrate() def _db_is_empty(self): - q = gmn.app.models.IdNamespace.objects.all() + q = d1_gmn.app.models.IdNamespace.objects.all() return not len(q) @@ -114,7 +114,7 @@ def _db_is_empty(self): class V2Migration(object): def __init__(self): self._v1_cursor = self._create_v1_cursor() - self._events = gmn.app.management.commands.util.EventCounter() + self._events = d1_gmn.app.management.commands.util.EventCounter() def migrate(self): try: @@ -150,8 +150,8 @@ def _migrate_filesystem(self): for file_name in file_list: pid = d1_common.url.decodePathElement(file_name) old_file_path = os.path.join(dir_path, file_name) - new_file_path = gmn.app.util.sciobj_file_path(pid) - gmn.app.util.create_missing_directories(new_file_path) + new_file_path = d1_gmn.app.util.sciobj_file_path(pid) + d1_gmn.app.util.create_missing_directories(new_file_path) new_dir_path = os.path.dirname(new_file_path) if self._are_on_same_disk(old_file_path, new_dir_path): self._log('Creating SciObj hard link') @@ -213,23 +213,25 @@ def _create_sciobj(self, topo_revision_list): # "obsoletedBy" back references are fixed in a second pass. sysmeta_pyxb.obsoletedBy = None self._log_pid_info('Creating SciObj DB representation', i, n, pid) - gmn.app.sysmeta.create(sysmeta_pyxb, sciobj_row['url']) + d1_gmn.app.sysmeta.create(sysmeta_pyxb, sciobj_row['url']) def _update_obsoleted_by(self, obsoleted_by_pid_list): n = len(obsoleted_by_pid_list) for i, pid_tup in enumerate(obsoleted_by_pid_list): pid, obsoleted_by_pid = pid_tup if obsoleted_by_pid is not None: - if gmn.app.sysmeta.is_did(pid) and gmn.app.sysmeta.is_did( + if d1_gmn.app.sysmeta.is_did(pid) and d1_gmn.app.sysmeta.is_did( obsoleted_by_pid ): self._log_pid_info('Updating obsoletedBy', i, n, pid) - gmn.app.revision.set_revision(pid, obsoleted_by_pid=obsoleted_by_pid) + d1_gmn.app.revision.set_revision( + pid, obsoleted_by_pid=obsoleted_by_pid + ) def _identifiers(self, sysmeta_pyxb): - pid = gmn.app.util.get_value(sysmeta_pyxb, 'identifier') - obsoletes_pid = gmn.app.util.get_value(sysmeta_pyxb, 'obsoletes') - obsoleted_by_pid = gmn.app.util.get_value(sysmeta_pyxb, 'obsoletedBy') + pid = d1_gmn.app.util.get_value(sysmeta_pyxb, 'identifier') + obsoletes_pid = d1_gmn.app.util.get_value(sysmeta_pyxb, 'obsoletes') + obsoleted_by_pid = d1_gmn.app.util.get_value(sysmeta_pyxb, 'obsoletedBy') return pid, obsoletes_pid, obsoleted_by_pid def _topological_sort(self, unsorted_list): @@ -288,7 +290,7 @@ def _sysmeta_pyxb_by_sciobj_row(self, sciobj_row): ) try: with open(sysmeta_xml_ver_path, 'rb') as f: - return gmn.app.views.util.deserialize(f.read()) + return d1_gmn.app.views.util.deserialize(f.read()) except (EnvironmentError, d1_common.types.exceptions.DataONEException) as e: raise django.core.management.base.CommandError( 'Unable to read SysMeta. error="{}"'.format(str(e)) @@ -327,20 +329,22 @@ def _migrate_events(self): 'Processing event logs', i, self._v1_cursor.rowcount, '{} {}'.format(event_row['event'], event_row['pid']) ) - if gmn.app.sysmeta.is_did(event_row['pid']): - sciobj_model = gmn.app.models.ScienceObject.objects.get( + if d1_gmn.app.sysmeta.is_did(event_row['pid']): + sciobj_model = d1_gmn.app.models.ScienceObject.objects.get( pid__did=event_row['pid'] ) - event_log_model = gmn.app.models.EventLog() + event_log_model = d1_gmn.app.models.EventLog() event_log_model.sciobj = sciobj_model - event_log_model.event = gmn.app.models.event(event_row['event']) - event_log_model.ip_address = gmn.app.models.ip_address( + event_log_model.event = d1_gmn.app.models.event(event_row['event']) + event_log_model.ip_address = d1_gmn.app.models.ip_address( event_row['ip_address'] ) - event_log_model.user_agent = gmn.app.models.user_agent( + event_log_model.user_agent = d1_gmn.app.models.user_agent( event_row['user_agent'] ) - event_log_model.subject = gmn.app.models.subject(event_row['subject']) + event_log_model.subject = d1_gmn.app.models.subject( + event_row['subject'] + ) event_log_model.save() # Must update timestamp separately due to auto_now_add=True event_log_model.timestamp = event_row['date_logged'] @@ -349,7 +353,7 @@ def _migrate_events(self): # Whitelist def _migrate_whitelist(self): - gmn.app.models.WhitelistForCreateUpdateDelete.objects.all().delete() + d1_gmn.app.models.WhitelistForCreateUpdateDelete.objects.all().delete() # noinspection SqlResolve self._v1_cursor.execute( """ @@ -363,8 +367,8 @@ def _migrate_whitelist(self): logging.info( 'Migrating whitelist subject: {}'.format(whitelist_row['subject']) ) - w = gmn.app.models.WhitelistForCreateUpdateDelete() - w.subject = gmn.app.models.subject(whitelist_row['subject']) + w = d1_gmn.app.models.WhitelistForCreateUpdateDelete() + w.subject = d1_gmn.app.models.subject(whitelist_row['subject']) w.save() self._events.count('Whitelisted subject') @@ -389,7 +393,7 @@ def _update_node_doc(self): ) return client = self._create_cn_client() - node_pyxb = gmn.app.node.get_pyxb() + node_pyxb = d1_gmn.app.node.get_pyxb() try: success_bool = client.updateNodeCapabilities( django.conf.settings.NODE_IDENTIFIER, node_pyxb diff --git a/gmn/src/gmn/app/management/commands/node.py b/gmn/src/d1_gmn/app/management/commands/node.py similarity index 97% rename from gmn/src/gmn/app/management/commands/node.py rename to gmn/src/d1_gmn/app/management/commands/node.py index 192f46232..9a5d1c7cc 100644 --- a/gmn/src/gmn/app/management/commands/node.py +++ b/gmn/src/d1_gmn/app/management/commands/node.py @@ -26,15 +26,15 @@ import util +import d1_gmn.app.models +import d1_gmn.app.node + import d1_common.types.exceptions import d1_common.util import d1_common.xml import d1_client.cnclient_2_0 -import gmn.app.models -import gmn.app.node - import django.conf import django.core.management.base @@ -73,7 +73,7 @@ def handle(self, *args, **options): raise django.core.management.base.CommandError(str(e)) def _handle(self, command_str): - node_pyxb = gmn.app.node.get_pyxb() + node_pyxb = d1_gmn.app.node.get_pyxb() if command_str == 'view': logging.info(d1_common.xml.pretty_xml(node_pyxb.toxml('utf-8'))) elif command_str == 'register': diff --git a/gmn/src/gmn/app/management/commands/process_refresh_queue.py b/gmn/src/d1_gmn/app/management/commands/process_refresh_queue.py similarity index 86% rename from gmn/src/gmn/app/management/commands/process_refresh_queue.py rename to gmn/src/d1_gmn/app/management/commands/process_refresh_queue.py index ed3b82592..6e0e7096f 100644 --- a/gmn/src/gmn/app/management/commands/process_refresh_queue.py +++ b/gmn/src/d1_gmn/app/management/commands/process_refresh_queue.py @@ -25,16 +25,16 @@ import logging +import d1_gmn.app.auth +import d1_gmn.app.event_log +import d1_gmn.app.management.commands.util +import d1_gmn.app.models +import d1_gmn.app.sysmeta + import d1_client.cnclient import d1_client.d1client import d1_client.mnclient -import gmn.app.auth -import gmn.app.event_log -import gmn.app.management.commands.util -import gmn.app.models -import gmn.app.sysmeta - import django.conf import django.core.management.base from django.db import transaction @@ -53,13 +53,13 @@ def add_arguments(self, parser): ) def handle(self, *args, **options): - gmn.app.management.commands.util.log_setup(options['debug']) + d1_gmn.app.management.commands.util.log_setup(options['debug']) logging.info( u'Running management command: {}'. - format(gmn.app.management.commands.util.get_command_name()) + format(d1_gmn.app.management.commands.util.get_command_name()) ) - gmn.app.management.commands.util.abort_if_other_instance_is_running() - gmn.app.management.commands.util.abort_if_stand_alone_instance() + d1_gmn.app.management.commands.util.abort_if_other_instance_is_running() + d1_gmn.app.management.commands.util.abort_if_stand_alone_instance() p = SysMetaRefreshQueueProcessor() p.process_refresh_queue() @@ -72,7 +72,7 @@ def __init__(self): self.cn_client = self._create_cn_client() def process_refresh_queue(self): - queue_queryset = gmn.app.models.SystemMetadataRefreshQueue.objects.filter( + queue_queryset = d1_gmn.app.models.SystemMetadataRefreshQueue.objects.filter( status__status='queued' ) if not len(queue_queryset): @@ -118,12 +118,12 @@ def _refresh(self, queue_model): with transaction.atomic(): self._update_sysmeta(sysmeta_pyxb) self._update_request_status(queue_model, 'completed') - gmn.app.event_log.create_log_entry( + d1_gmn.app.event_log.create_log_entry( queue_model.sciobj, 'update', '0.0.0.0', '[refresh]', '[refresh]' ) def _update_request_status(self, queue_model, status_str): - queue_model.status = gmn.app.models.sysmeta_refresh_status(status_str) + queue_model.status = d1_gmn.app.models.sysmeta_refresh_status(status_str) queue_model.save() def _inc_and_get_failed_attempts(self, queue_model): @@ -135,7 +135,7 @@ def _inc_and_get_failed_attempts(self, queue_model): return queue_model.failed_attempts def _remove_completed_requests_from_queue(self): - gmn.app.models.SystemMetadataRefreshQueue.objects.filter( + d1_gmn.app.models.SystemMetadataRefreshQueue.objects.filter( status__status__in=('completed', 'failed') ).delete() @@ -159,17 +159,17 @@ def _update_sysmeta(self, sysmeta_pyxb): No sanity checking is done on the provided System Metadata. It comes from a CN and is implicitly trusted. """ - gmn.app.sysmeta.create_or_update(sysmeta_pyxb) + d1_gmn.app.sysmeta.create_or_update(sysmeta_pyxb) def _assert_is_pid_of_native_object(self, pid): - if not gmn.app.sysmeta.is_pid_of_existing_object(pid): + if not d1_gmn.app.sysmeta.is_pid_of_existing_object(pid): raise RefreshError( u'Object referenced by PID does not exist or is not valid target for' u'System Metadata refresh. pid="{}"'.format(pid) ) def _assert_pid_matches_request(self, sysmeta_pyxb, pid): - if gmn.app.util.uvalue(sysmeta_pyxb.identifier) != pid: + if d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) != pid: raise RefreshError( u'PID in retrieved System Metadata does not match the object for which ' u'refresh was requested. pid="{}"'.format(pid) diff --git a/gmn/src/gmn/app/management/commands/process_replication_queue.py b/gmn/src/d1_gmn/app/management/commands/process_replication_queue.py similarity index 86% rename from gmn/src/gmn/app/management/commands/process_replication_queue.py rename to gmn/src/d1_gmn/app/management/commands/process_replication_queue.py index a976493ed..16a5dc423 100644 --- a/gmn/src/gmn/app/management/commands/process_replication_queue.py +++ b/gmn/src/d1_gmn/app/management/commands/process_replication_queue.py @@ -29,6 +29,14 @@ import logging import shutil +import d1_gmn.app.event_log +import d1_gmn.app.local_replica +import d1_gmn.app.management.commands.util +import d1_gmn.app.models +import d1_gmn.app.sysmeta +import d1_gmn.app.util +import d1_gmn.app.views.util + import d1_common.const import d1_common.date_time import d1_common.types.exceptions @@ -39,14 +47,6 @@ import d1_client.d1client import d1_client.mnclient -import gmn.app.event_log -import gmn.app.local_replica -import gmn.app.management.commands.util -import gmn.app.models -import gmn.app.sysmeta -import gmn.app.util -import gmn.app.views.util - import django.conf import django.core.management.base import django.db.transaction @@ -65,13 +65,13 @@ def add_arguments(self, parser): ) def handle(self, *args, **options): - gmn.app.management.commands.util.log_setup(options['debug']) + d1_gmn.app.management.commands.util.log_setup(options['debug']) logging.info( u'Running management command: {}'. - format(gmn.app.management.commands.util.get_command_name()) + format(d1_gmn.app.management.commands.util.get_command_name()) ) - gmn.app.management.commands.util.abort_if_other_instance_is_running() - gmn.app.management.commands.util.abort_if_stand_alone_instance() + d1_gmn.app.management.commands.util.abort_if_other_instance_is_running() + d1_gmn.app.management.commands.util.abort_if_stand_alone_instance() p = ReplicationQueueProcessor() p.process_replication_queue() @@ -84,7 +84,7 @@ def __init__(self): self.cn_client = self._create_cn_client() def process_replication_queue(self): - queue_queryset = gmn.app.models.ReplicationQueue.objects.filter( + queue_queryset = d1_gmn.app.models.ReplicationQueue.objects.filter( local_replica__info__status__status='queued' ) if not len(queue_queryset): @@ -143,7 +143,7 @@ def _set_origin(self, queue_model, sysmeta_pyxb): sysmeta_pyxb.serialVersion = 1 def _inc_and_get_failed_attempts(self, queue_model): - replication_queue_model = gmn.app.models.ReplicationQueue.objects.get( + replication_queue_model = d1_gmn.app.models.ReplicationQueue.objects.get( local_replica=queue_model.local_replica ) replication_queue_model.failed_attempts += 1 @@ -155,7 +155,7 @@ def _update_request_status(self, queue_model, status_str, dataone_error=None): self._update_cn_request_status(queue_model, status_str, dataone_error) def _update_local_request_status(self, queue_model, status_str): - gmn.app.models.update_replica_status( + d1_gmn.app.models.update_replica_status( queue_model.local_replica.info, status_str ) @@ -168,7 +168,7 @@ def _update_cn_request_status( ) def _remove_completed_requests_from_queue(self): - gmn.app.models.ReplicationQueue.objects.filter( + d1_gmn.app.models.ReplicationQueue.objects.filter( local_replica__info__status__status='completed' ).delete() @@ -201,7 +201,7 @@ def _resolve_source_node_id_to_base_url(self, source_node): node_list = self._get_node_list() discovered_nodes = [] for node in node_list.node: - discovered_node_id = gmn.app.util.uvalue(node.identifier) + discovered_node_id = d1_gmn.app.util.uvalue(node.identifier) discovered_nodes.append(discovered_node_id) if discovered_node_id == source_node: return node.baseURL @@ -223,44 +223,44 @@ def _create_replica(self, sysmeta_pyxb, sciobj_stream): revision chains and SIDs. So this create sequence differs significantly from the regular one that is accessed through MNStorage.create(). """ - pid = gmn.app.util.uvalue(sysmeta_pyxb.identifier) + pid = d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) self._assert_is_pid_of_local_unprocessed_replica(pid) self._check_and_create_replica_revision(sysmeta_pyxb, 'obsoletes') self._check_and_create_replica_revision(sysmeta_pyxb, 'obsoletedBy') url = u'file:///{}'.format(d1_common.url.encodePathElement(pid)) - sciobj_model = gmn.app.sysmeta.create_or_update(sysmeta_pyxb, url) + sciobj_model = d1_gmn.app.sysmeta.create_or_update(sysmeta_pyxb, url) self._store_science_object_bytes(pid, sciobj_stream) - gmn.app.event_log.create_log_entry( + d1_gmn.app.event_log.create_log_entry( sciobj_model, 'create', '0.0.0.0', '[replica]', '[replica]' ) def _check_and_create_replica_revision(self, sysmeta_pyxb, attr_str): revision_attr = getattr(sysmeta_pyxb, attr_str) if revision_attr is not None: - pid = gmn.app.util.uvalue(revision_attr) + pid = d1_gmn.app.util.uvalue(revision_attr) self._assert_pid_is_unknown_or_replica(pid) self._create_replica_revision_reference(pid) def _create_replica_revision_reference(self, pid): - gmn.app.models.replica_revision_chain_reference(pid) + d1_gmn.app.models.replica_revision_chain_reference(pid) def _store_science_object_bytes(self, pid, sciobj_stream): - sciobj_path = gmn.app.util.sciobj_file_path(pid) - gmn.app.util.create_missing_directories(sciobj_path) + sciobj_path = d1_gmn.app.util.sciobj_file_path(pid) + d1_gmn.app.util.create_missing_directories(sciobj_path) with open(sciobj_path, 'wb') as f: shutil.copyfileobj(sciobj_stream, f) def _assert_is_pid_of_local_unprocessed_replica(self, pid): - if not gmn.app.local_replica.is_unprocessed_local_replica(pid): + if not d1_gmn.app.local_replica.is_unprocessed_local_replica(pid): raise ReplicateError( u'The identifier is already in use on the local Member Node. ' u'pid="{}"'.format(pid) ) def _assert_pid_is_unknown_or_replica(self, pid): - if gmn.app.sysmeta.is_did( + if d1_gmn.app.sysmeta.is_did( pid - ) and not gmn.app.local_replica.is_local_replica(pid): + ) and not d1_gmn.app.local_replica.is_local_replica(pid): raise ReplicateError( u'The identifier is already in use on the local Member Node. ' u'pid="{}"'.format(pid) diff --git a/gmn/src/gmn/app/management/commands/update_access_policy.py b/gmn/src/d1_gmn/app/management/commands/update_access_policy.py similarity index 76% rename from gmn/src/gmn/app/management/commands/update_access_policy.py rename to gmn/src/d1_gmn/app/management/commands/update_access_policy.py index d6a8a420e..d841ace94 100644 --- a/gmn/src/gmn/app/management/commands/update_access_policy.py +++ b/gmn/src/d1_gmn/app/management/commands/update_access_policy.py @@ -25,20 +25,20 @@ import logging import os +import d1_gmn.app.auth +import d1_gmn.app.management.commands.util +import d1_gmn.app.models +import d1_gmn.app.node +import d1_gmn.app.revision +import d1_gmn.app.sysmeta +import d1_gmn.app.util +import d1_gmn.app.views.asserts +import d1_gmn.app.views.diagnostics +import d1_gmn.app.views.util + import d1_common.types.exceptions import d1_common.url -import gmn.app.auth -import gmn.app.management.commands.util -import gmn.app.models -import gmn.app.node -import gmn.app.revision -import gmn.app.sysmeta -import gmn.app.util -import gmn.app.views.asserts -import gmn.app.views.diagnostics -import gmn.app.views.util - import django.conf import django.core.management.base @@ -60,12 +60,12 @@ def add_arguments(self, parser): ) def handle(self, *args, **options): - gmn.app.management.commands.util.log_setup(options['debug']) + d1_gmn.app.management.commands.util.log_setup(options['debug']) logging.info( u'Running management command: {}'. - format(gmn.app.management.commands.util.get_command_name()) + format(d1_gmn.app.management.commands.util.get_command_name()) ) - gmn.app.management.commands.util.abort_if_other_instance_is_running() + d1_gmn.app.management.commands.util.abort_if_other_instance_is_running() m = UpdateAccessPolicy() m.run(options['sysmeta_root_path']) @@ -75,7 +75,7 @@ def handle(self, *args, **options): class UpdateAccessPolicy(object): def __init__(self): - self._events = gmn.app.management.commands.util.EventCounter() + self._events = d1_gmn.app.management.commands.util.EventCounter() def run(self, sysmeta_root_path): try: @@ -101,28 +101,28 @@ def _update_access_policy(self, sysmeta_xml_path): try: sysmeta_pyxb = self._deserialize_sysmeta_xml_file(sysmeta_xml_path) self._access_policy_to_model( - gmn.app.util.uvalue(sysmeta_pyxb.identifier), sysmeta_pyxb + d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier), sysmeta_pyxb ) except django.core.management.base.CommandError as e: logging.error(str(e)) self._events.count('Failed') else: - logging.info(gmn.app.util.uvalue(sysmeta_pyxb.identifier)) + logging.info(d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier)) self._events.count('Updated') def _deserialize_sysmeta_xml_file(self, sysmeta_xml_path): try: with open(sysmeta_xml_path, 'rb') as f: - return gmn.app.views.util.deserialize(f) + return d1_gmn.app.views.util.deserialize(f) except (EnvironmentError, d1_common.types.exceptions.DataONEException) as e: raise django.core.management.base.CommandError( 'Unable to read SysMeta. error="{}"'.format(str(e)) ) def _access_policy_to_model(self, pid, sysmeta_pyxb): - if not gmn.app.sysmeta._has_access_policy_pyxb(sysmeta_pyxb): + if not d1_gmn.app.sysmeta._has_access_policy_pyxb(sysmeta_pyxb): return - if not gmn.app.sysmeta.is_pid(pid): + if not d1_gmn.app.sysmeta.is_pid(pid): return - sci_model = gmn.app.util.get_sci_model(pid) - gmn.app.sysmeta._access_policy_pyxb_to_model(sci_model, sysmeta_pyxb) + sci_model = d1_gmn.app.util.get_sci_model(pid) + d1_gmn.app.sysmeta._access_policy_pyxb_to_model(sci_model, sysmeta_pyxb) diff --git a/gmn/src/gmn/app/management/commands/util.py b/gmn/src/d1_gmn/app/management/commands/util.py similarity index 95% rename from gmn/src/gmn/app/management/commands/util.py rename to gmn/src/d1_gmn/app/management/commands/util.py index a2451ba8b..312f5303f 100644 --- a/gmn/src/gmn/app/management/commands/util.py +++ b/gmn/src/d1_gmn/app/management/commands/util.py @@ -22,13 +22,13 @@ from __future__ import absolute_import -import os -import sys import fcntl import logging +import os +import sys import tempfile -import gmn.app.models +import d1_gmn.app.models import django.conf import django.core.management.base @@ -81,8 +81,8 @@ def get_command_name(): def is_subject_in_whitelist(subject_str): - return gmn.app.models.WhitelistForCreateUpdateDelete.objects.filter( - subject=gmn.app.models.subject(subject_str) + return d1_gmn.app.models.WhitelistForCreateUpdateDelete.objects.filter( + subject=d1_gmn.app.models.subject(subject_str) ).exists() diff --git a/gmn/src/gmn/app/management/commands/whitelist.py b/gmn/src/d1_gmn/app/management/commands/whitelist.py similarity index 84% rename from gmn/src/gmn/app/management/commands/whitelist.py rename to gmn/src/d1_gmn/app/management/commands/whitelist.py index 0c2e8790e..35aba9fc9 100644 --- a/gmn/src/gmn/app/management/commands/whitelist.py +++ b/gmn/src/d1_gmn/app/management/commands/whitelist.py @@ -24,13 +24,14 @@ import logging +import d1_gmn.app.management.commands.util +import d1_gmn.app.middleware.session_cert +import d1_gmn.app.models + import d1_common.types.exceptions import d1_common.util -import django.core.management.base -import gmn.app.management.commands.util -import gmn.app.middleware.session_cert -import gmn.app.models +import django.core.management.base # noinspection PyClassHasNoInit @@ -64,7 +65,7 @@ def add_arguments(self, parser): ) def handle(self, *args, **options): - gmn.app.management.commands.util.log_setup(options['debug']) + d1_gmn.app.management.commands.util.log_setup(options['debug']) if options['command'] not in ('view', 'add', 'remove', 'bulk'): logging.info(self.missing_args_message) return @@ -87,7 +88,8 @@ def _handle(self, command_str, command_arg_str): def _view(self): logging.info(u'Subjects in whitelist:') - for whitelist_model in gmn.app.models.WhitelistForCreateUpdateDelete.objects.all(): + for whitelist_model in d1_gmn.app.models.WhitelistForCreateUpdateDelete.objects.all( + ): logging.info(' {}'.format(whitelist_model.subject.subject)) def _add(self, subject_str): @@ -95,11 +97,11 @@ def _add(self, subject_str): raise django.core.management.base.CommandError( u'Please specify a subject to add', ) - if gmn.app.management.commands.util.is_subject_in_whitelist(subject_str): + if d1_gmn.app.management.commands.util.is_subject_in_whitelist(subject_str): raise django.core.management.base.CommandError( u'Subject already in whitelist: {}'.format(subject_str) ) - gmn.app.models.whitelist_for_create_update_delete(subject_str) + d1_gmn.app.models.whitelist_for_create_update_delete(subject_str) logging.info(u'Added subject to whitelist: {}'.format(subject_str)) def _remove(self, subject_str): @@ -107,14 +109,14 @@ def _remove(self, subject_str): raise django.core.management.base.CommandError( u'Please specify a subject to remove', ) - if not gmn.app.management.commands.util.is_subject_in_whitelist( + if not d1_gmn.app.management.commands.util.is_subject_in_whitelist( subject_str ): raise django.core.management.base.CommandError( u'Subject is not in whitelist: {}'.format(subject_str) ) - gmn.app.models.WhitelistForCreateUpdateDelete.objects.filter( - subject=gmn.app.models.subject(subject_str) + d1_gmn.app.models.WhitelistForCreateUpdateDelete.objects.filter( + subject=d1_gmn.app.models.subject(subject_str) ).delete() logging.info(u'Removed subject from whitelist: {}'.format(subject_str)) @@ -125,11 +127,11 @@ def _bulk(self, whitelist_file_path): ) subject_cnt = 0 with open(whitelist_file_path) as f: - gmn.app.models.WhitelistForCreateUpdateDelete.objects.all().delete() + d1_gmn.app.models.WhitelistForCreateUpdateDelete.objects.all().delete() for subject_str in f: subject_str = subject_str.strip() if subject_str == '' or subject_str.startswith('#'): continue - gmn.app.models.whitelist_for_create_update_delete(subject_str) + d1_gmn.app.models.whitelist_for_create_update_delete(subject_str) subject_cnt += 1 logging.info(u'Created new whitelist with {} subjects'.format(subject_cnt)) diff --git a/gmn/src/gmn/app/middleware/__init__.py b/gmn/src/d1_gmn/app/middleware/__init__.py similarity index 100% rename from gmn/src/gmn/app/middleware/__init__.py rename to gmn/src/d1_gmn/app/middleware/__init__.py diff --git a/gmn/src/gmn/app/middleware/detail_codes.py b/gmn/src/d1_gmn/app/middleware/detail_codes.py similarity index 100% rename from gmn/src/gmn/app/middleware/detail_codes.py rename to gmn/src/d1_gmn/app/middleware/detail_codes.py diff --git a/gmn/src/gmn/app/middleware/exception_handler.py b/gmn/src/d1_gmn/app/middleware/exception_handler.py similarity index 98% rename from gmn/src/gmn/app/middleware/exception_handler.py rename to gmn/src/d1_gmn/app/middleware/exception_handler.py index 02c1da779..3fa22448b 100644 --- a/gmn/src/gmn/app/middleware/exception_handler.py +++ b/gmn/src/d1_gmn/app/middleware/exception_handler.py @@ -45,12 +45,12 @@ import sys import traceback +import d1_gmn.app.middleware.detail_codes + import d1_common.const import d1_common.ext.mimeparser import d1_common.types.exceptions -import gmn.app.middleware.detail_codes - import django.conf import django.http @@ -112,7 +112,7 @@ def _django_html_exception_page(self): def _wrap_internal_exception_in_dataone_exception(self, request): e = d1_common.types.exceptions.ServiceFailure(0, traceback.format_exc(), '') e.detailCode = str( - gmn.app.middleware.detail_codes.dataone_exception_to_detail_code() + d1_gmn.app.middleware.detail_codes.dataone_exception_to_detail_code() .detail_code(request, e) ) e.traceInformation = self._traceback_to_text() diff --git a/gmn/src/gmn/app/middleware/profiling_handler.py b/gmn/src/d1_gmn/app/middleware/profiling_handler.py similarity index 100% rename from gmn/src/gmn/app/middleware/profiling_handler.py rename to gmn/src/d1_gmn/app/middleware/profiling_handler.py diff --git a/gmn/src/gmn/app/middleware/request_handler.py b/gmn/src/d1_gmn/app/middleware/request_handler.py similarity index 100% rename from gmn/src/gmn/app/middleware/request_handler.py rename to gmn/src/d1_gmn/app/middleware/request_handler.py index 45cc49055..ef4ceb5f5 100644 --- a/gmn/src/gmn/app/middleware/request_handler.py +++ b/gmn/src/d1_gmn/app/middleware/request_handler.py @@ -28,8 +28,8 @@ import d1_common import d1_common.const import d1_common.types.exceptions -import django.conf +import django.conf import django.http diff --git a/gmn/src/gmn/app/middleware/response_handler.py b/gmn/src/d1_gmn/app/middleware/response_handler.py similarity index 91% rename from gmn/src/gmn/app/middleware/response_handler.py rename to gmn/src/d1_gmn/app/middleware/response_handler.py index 8bf934ab5..5743de361 100644 --- a/gmn/src/gmn/app/middleware/response_handler.py +++ b/gmn/src/d1_gmn/app/middleware/response_handler.py @@ -25,19 +25,19 @@ from __future__ import absolute_import -import logging import datetime +import logging + +import d1_gmn.app.views.util import d1_common.const import d1_common.type_conversions -import d1_common.types.exceptions import d1_common.types.dataoneTypes_v1_1 import d1_common.types.dataoneTypes_v2_0 +import d1_common.types.exceptions -import gmn.app.views.util - -import django.db import django.conf +import django.db import django.http from django.db.models import Max @@ -100,12 +100,13 @@ def _serialize_object(self, request, view_result): return response def _generate_object_list(self, request, db_query, start, total): - objectList = gmn.app.views.util.dataoneTypes(request).objectList() + objectList = d1_gmn.app.views.util.dataoneTypes(request).objectList() for row in db_query: - objectInfo = gmn.app.views.util.dataoneTypes(request).ObjectInfo() + objectInfo = d1_gmn.app.views.util.dataoneTypes(request).ObjectInfo() objectInfo.identifier = row.pid.did objectInfo.formatId = row.format.format - checksum = gmn.app.views.util.dataoneTypes(request).Checksum(row.checksum) + checksum = d1_gmn.app.views.util.dataoneTypes(request + ).Checksum(row.checksum) checksum.algorithm = row.checksum_algorithm.checksum_algorithm objectInfo.checksum = checksum objectInfo.dateSysMetadataModified = datetime.datetime.isoformat( @@ -119,9 +120,9 @@ def _generate_object_list(self, request, db_query, start, total): return objectList def _generate_log_records(self, request, db_query, start, total): - log = gmn.app.views.util.dataoneTypes(request).log() + log = d1_gmn.app.views.util.dataoneTypes(request).log() for row in db_query: - logEntry = gmn.app.views.util.dataoneTypes(request).LogEntry() + logEntry = d1_gmn.app.views.util.dataoneTypes(request).LogEntry() logEntry.entryId = str(row.id) logEntry.identifier = row.sciobj.pid.did logEntry.ipAddress = row.ip_address.ip_address @@ -137,7 +138,7 @@ def _generate_log_records(self, request, db_query, start, total): return log def _http_response_with_identifier_type(self, request, pid): - pid_pyxb = gmn.app.views.util.dataoneTypes(request).identifier(pid) + pid_pyxb = d1_gmn.app.views.util.dataoneTypes(request).identifier(pid) pid_xml = pid_pyxb.toxml('utf-8') return django.http.HttpResponse(pid_xml, d1_common.const.CONTENT_TYPE_XML) diff --git a/gmn/src/gmn/app/middleware/session_cert.py b/gmn/src/d1_gmn/app/middleware/session_cert.py similarity index 100% rename from gmn/src/gmn/app/middleware/session_cert.py rename to gmn/src/d1_gmn/app/middleware/session_cert.py diff --git a/gmn/src/gmn/app/middleware/session_jwt.py b/gmn/src/d1_gmn/app/middleware/session_jwt.py similarity index 100% rename from gmn/src/gmn/app/middleware/session_jwt.py rename to gmn/src/d1_gmn/app/middleware/session_jwt.py index 2a720572a..c90df0071 100644 --- a/gmn/src/gmn/app/middleware/session_jwt.py +++ b/gmn/src/d1_gmn/app/middleware/session_jwt.py @@ -22,15 +22,15 @@ from __future__ import absolute_import -import ssl -import socket import logging +import socket +import ssl import urlparse -import jwt -import httplib -import cryptography.x509 import cryptography.hazmat.backends +import cryptography.x509 +import httplib +import jwt import d1_common.const import d1_common.types.exceptions diff --git a/gmn/src/gmn/app/middleware/view_handler.py b/gmn/src/d1_gmn/app/middleware/view_handler.py similarity index 94% rename from gmn/src/gmn/app/middleware/view_handler.py rename to gmn/src/d1_gmn/app/middleware/view_handler.py index c2904b30a..e133d403a 100644 --- a/gmn/src/gmn/app/middleware/view_handler.py +++ b/gmn/src/d1_gmn/app/middleware/view_handler.py @@ -25,12 +25,12 @@ import logging import StringIO +import d1_gmn.app.middleware.session_cert +import d1_gmn.app.middleware.session_jwt + import d1_common import d1_common.const -import gmn.app.middleware.session_cert -import gmn.app.middleware.session_jwt - import django.conf @@ -73,10 +73,11 @@ def get_active_subject_set(self, request): # Add subjects from any provided certificate and JWT and store them in # the Django request obj. cert_primary_str, cert_equivalent_set = ( - gmn.app.middleware.session_cert.get_subjects(request) + d1_gmn.app.middleware.session_cert.get_subjects(request) ) jwt_subject_list = ( - gmn.app.middleware.session_jwt.validate_jwt_and_get_subject_list(request) + d1_gmn.app.middleware.session_jwt. + validate_jwt_and_get_subject_list(request) ) primary_subject_str = cert_primary_str all_subjects_set = ( diff --git a/gmn/src/gmn/app/migrations/0001_initial.py b/gmn/src/d1_gmn/app/migrations/0001_initial.py similarity index 100% rename from gmn/src/gmn/app/migrations/0001_initial.py rename to gmn/src/d1_gmn/app/migrations/0001_initial.py diff --git a/gmn/src/gmn/app/migrations/0002_scienceobject_filename.py b/gmn/src/d1_gmn/app/migrations/0002_scienceobject_filename.py similarity index 100% rename from gmn/src/gmn/app/migrations/0002_scienceobject_filename.py rename to gmn/src/d1_gmn/app/migrations/0002_scienceobject_filename.py diff --git a/gmn/src/gmn/app/migrations/0003_mediatype_mediatypeproperty.py b/gmn/src/d1_gmn/app/migrations/0003_mediatype_mediatypeproperty.py similarity index 100% rename from gmn/src/gmn/app/migrations/0003_mediatype_mediatypeproperty.py rename to gmn/src/d1_gmn/app/migrations/0003_mediatype_mediatypeproperty.py diff --git a/gmn/src/gmn/app/migrations/0004_auto_20170523_0137.py b/gmn/src/d1_gmn/app/migrations/0004_auto_20170523_0137.py similarity index 100% rename from gmn/src/gmn/app/migrations/0004_auto_20170523_0137.py rename to gmn/src/d1_gmn/app/migrations/0004_auto_20170523_0137.py diff --git a/gmn/src/gmn/app/migrations/0005_auto_20170527_1554.py b/gmn/src/d1_gmn/app/migrations/0005_auto_20170527_1554.py similarity index 100% rename from gmn/src/gmn/app/migrations/0005_auto_20170527_1554.py rename to gmn/src/d1_gmn/app/migrations/0005_auto_20170527_1554.py diff --git a/gmn/src/gmn/app/migrations/0006_chainidtopersistentid.py b/gmn/src/d1_gmn/app/migrations/0006_chainidtopersistentid.py similarity index 100% rename from gmn/src/gmn/app/migrations/0006_chainidtopersistentid.py rename to gmn/src/d1_gmn/app/migrations/0006_chainidtopersistentid.py diff --git a/gmn/src/gmn/app/migrations/0007_delete_chainidtopersistentid.py b/gmn/src/d1_gmn/app/migrations/0007_delete_chainidtopersistentid.py similarity index 100% rename from gmn/src/gmn/app/migrations/0007_delete_chainidtopersistentid.py rename to gmn/src/d1_gmn/app/migrations/0007_delete_chainidtopersistentid.py diff --git a/gmn/src/gmn/app/migrations/0008_chainidtopersistentid.py b/gmn/src/d1_gmn/app/migrations/0008_chainidtopersistentid.py similarity index 100% rename from gmn/src/gmn/app/migrations/0008_chainidtopersistentid.py rename to gmn/src/d1_gmn/app/migrations/0008_chainidtopersistentid.py diff --git a/gmn/src/gmn/app/migrations/0009_auto_20170603_0546.py b/gmn/src/d1_gmn/app/migrations/0009_auto_20170603_0546.py similarity index 100% rename from gmn/src/gmn/app/migrations/0009_auto_20170603_0546.py rename to gmn/src/d1_gmn/app/migrations/0009_auto_20170603_0546.py diff --git a/gmn/src/gmn/app/migrations/__init__.py b/gmn/src/d1_gmn/app/migrations/__init__.py similarity index 100% rename from gmn/src/gmn/app/migrations/__init__.py rename to gmn/src/d1_gmn/app/migrations/__init__.py diff --git a/gmn/src/gmn/app/models.py b/gmn/src/d1_gmn/app/models.py similarity index 100% rename from gmn/src/gmn/app/models.py rename to gmn/src/d1_gmn/app/models.py diff --git a/gmn/src/gmn/app/node.py b/gmn/src/d1_gmn/app/node.py similarity index 100% rename from gmn/src/gmn/app/node.py rename to gmn/src/d1_gmn/app/node.py diff --git a/gmn/src/gmn/app/node_registry.py b/gmn/src/d1_gmn/app/node_registry.py similarity index 97% rename from gmn/src/gmn/app/node_registry.py rename to gmn/src/d1_gmn/app/node_registry.py index 225e87b0b..da80c17ab 100644 --- a/gmn/src/gmn/app/node_registry.py +++ b/gmn/src/d1_gmn/app/node_registry.py @@ -28,9 +28,9 @@ import logging -import d1_client.cnclient +import d1_gmn.app.util -import gmn.app.util +import d1_client.cnclient import django.conf import django.core.cache @@ -96,7 +96,7 @@ def get_cn_subjects_from_dataone_root(): for service in services: if service.name == 'CNCore': for subject in node.subject: - cn_subjects.add(gmn.app.util.uvalue(subject)) + cn_subjects.add(d1_gmn.app.util.uvalue(subject)) break return cn_subjects diff --git a/gmn/src/gmn/app/psycopg_adapter.py b/gmn/src/d1_gmn/app/psycopg_adapter.py similarity index 100% rename from gmn/src/gmn/app/psycopg_adapter.py rename to gmn/src/d1_gmn/app/psycopg_adapter.py diff --git a/gmn/src/gmn/app/restrict_to_verb.py b/gmn/src/d1_gmn/app/restrict_to_verb.py similarity index 100% rename from gmn/src/gmn/app/restrict_to_verb.py rename to gmn/src/d1_gmn/app/restrict_to_verb.py diff --git a/gmn/src/gmn/app/revision.py b/gmn/src/d1_gmn/app/revision.py similarity index 73% rename from gmn/src/gmn/app/revision.py rename to gmn/src/d1_gmn/app/revision.py index 63c1a2e8b..907115a64 100644 --- a/gmn/src/gmn/app/revision.py +++ b/gmn/src/d1_gmn/app/revision.py @@ -22,10 +22,10 @@ from __future__ import absolute_import -import gmn.app -import gmn.app.auth -import gmn.app.models -import gmn.app.util +import d1_gmn.app +import d1_gmn.app.auth +import d1_gmn.app.models +import d1_gmn.app.util # PyXB @@ -35,7 +35,7 @@ def has_sid(sysmeta_pyxb): def get_sid(sysmeta_pyxb): - return gmn.app.util.get_value(sysmeta_pyxb, 'seriesId') + return d1_gmn.app.util.get_value(sysmeta_pyxb, 'seriesId') # DB updates @@ -47,17 +47,17 @@ def create_chain(sid, pid): Preconditions: - {sid} must either be None or be previously unused. - gmn.app.views.asserts.is_unused() + d1_gmn.app.views.asserts.is_unused() - {pid} must exist and be verified to be a PID. - gmn.app.views.asserts.is_pid() + d1_gmn.app.views.asserts.is_pid() """ - sid_model = gmn.app.models.did(sid) if sid else None - pid_model = gmn.app.models.did(pid) - chain_model = gmn.app.models.ChainIdToSeriesID( + sid_model = d1_gmn.app.models.did(sid) if sid else None + pid_model = d1_gmn.app.models.did(pid) + chain_model = d1_gmn.app.models.ChainIdToSeriesID( sid=sid_model, head_pid=pid_model ) chain_model.save() - pid_to_chain_model = gmn.app.models.PersistentIdToChainID( + pid_to_chain_model = d1_gmn.app.models.PersistentIdToChainID( chain=chain_model, pid=pid_model ) pid_to_chain_model.save() @@ -71,22 +71,22 @@ def add_pid_to_chain(sid, old_pid, new_pid): Preconditions: - {sid} must either be None or match the SID already assigned to the chain. - Both {old_pid} and {new_pid} must exist and be verified to be PIDs - gmn.app.views.asserts.is_pid() + d1_gmn.app.views.asserts.is_pid() """ - old_pid_to_chain_model = gmn.app.models.PersistentIdToChainID.objects.get( + old_pid_to_chain_model = d1_gmn.app.models.PersistentIdToChainID.objects.get( pid__did=old_pid ) - new_pid_to_chain_model = gmn.app.models.PersistentIdToChainID( + new_pid_to_chain_model = d1_gmn.app.models.PersistentIdToChainID( chain=old_pid_to_chain_model.chain, - pid=gmn.app.models.IdNamespace.objects.get(did=new_pid) + pid=d1_gmn.app.models.IdNamespace.objects.get(did=new_pid) ) new_pid_to_chain_model.save() if sid: - chain_model = gmn.app.models.ChainIdToSeriesID.objects.get(sid__did=sid) + chain_model = d1_gmn.app.models.ChainIdToSeriesID.objects.get(sid__did=sid) assert chain_model.sid is None or chain_model.sid.did == sid, \ 'Cannot change SID for existing chain' - chain_model.sid = gmn.app.models.did(sid) + chain_model.sid = d1_gmn.app.models.did(sid) chain_model.save() @@ -97,12 +97,12 @@ def update_sid_to_head_pid_map(pid): Preconditions: - {pid} must exist and be verified to be a PID. - gmn.app.views.asserts.is_pid() + d1_gmn.app.views.asserts.is_pid() """ - sci_model = gmn.app.util.get_sci_model(pid) + sci_model = d1_gmn.app.util.get_sci_model(pid) while sci_model.obsoleted_by is not None: - sci_model = gmn.app.util.get_sci_model(sci_model.obsoleted_by.did) - chain_model = gmn.app.models.PersistentIdToChainID.objects.get( + sci_model = d1_gmn.app.util.get_sci_model(sci_model.obsoleted_by.did) + chain_model = d1_gmn.app.models.PersistentIdToChainID.objects.get( pid__did=pid ).chain chain_model.head_pid = sci_model.pid @@ -111,32 +111,33 @@ def update_sid_to_head_pid_map(pid): def delete_chain(pid): """""" - pid_to_chain_model = gmn.app.models.PersistentIdToChainID.objects.get( + pid_to_chain_model = d1_gmn.app.models.PersistentIdToChainID.objects.get( pid__did=pid ) chain_model = pid_to_chain_model.chain pid_to_chain_model.delete() - if not gmn.app.models.PersistentIdToChainID.objects.filter( + if not d1_gmn.app.models.PersistentIdToChainID.objects.filter( chain=chain_model, ).exists(): if chain_model.sid: # Cascades back to chain_model. - gmn.app.models.IdNamespace.objects.filter(did=chain_model.sid.did).delete() + d1_gmn.app.models.IdNamespace.objects.filter(did=chain_model.sid.did + ).delete() else: chain_model.delete() def set_revision(pid, obsoletes_pid=None, obsoleted_by_pid=None): - sciobj_model = gmn.app.util.get_sci_model(pid) + sciobj_model = d1_gmn.app.util.get_sci_model(pid) set_revision_by_model(sciobj_model, obsoletes_pid, obsoleted_by_pid) sciobj_model.save() def set_revision_by_model(sciobj_model, obsoletes_pid, obsoleted_by_pid): if obsoletes_pid: - sciobj_model.obsoletes = gmn.app.models.did(obsoletes_pid) + sciobj_model.obsoletes = d1_gmn.app.models.did(obsoletes_pid) if obsoleted_by_pid: - sciobj_model.obsoleted_by = gmn.app.models.did(obsoleted_by_pid) + sciobj_model.obsoleted_by = d1_gmn.app.models.did(obsoleted_by_pid) # Cut @@ -149,8 +150,8 @@ def cut_from_chain(sciobj_model): - The object with the pid is verified to exist and to be a member of an revision chain. E.g., with: - gmn.app.views.asserts.is_pid(pid) - gmn.app.views.asserts.is_in_revision_chain(pid) + d1_gmn.app.views.asserts.is_pid(pid) + d1_gmn.app.views.asserts.is_in_revision_chain(pid) - The object can be at any location in the chain, including the head or tail. @@ -175,7 +176,7 @@ def cut_from_chain(sciobj_model): def _cut_head_from_chain(sciobj_model): - new_head_model = gmn.app.util.get_sci_model(sciobj_model.obsoletes.did) + new_head_model = d1_gmn.app.util.get_sci_model(sciobj_model.obsoletes.did) new_head_model.obsoleted_by = None sciobj_model.obsoletes = None sciobj_model.save() @@ -183,7 +184,7 @@ def _cut_head_from_chain(sciobj_model): def _cut_tail_from_chain(sciobj_model): - new_tail_model = gmn.app.util.get_sci_model(sciobj_model.obsoleted_by.did) + new_tail_model = d1_gmn.app.util.get_sci_model(sciobj_model.obsoleted_by.did) new_tail_model.obsoletes = None sciobj_model.obsoleted_by = None sciobj_model.save() @@ -191,8 +192,8 @@ def _cut_tail_from_chain(sciobj_model): def _cut_embedded_from_chain(sciobj_model): - prev_model = gmn.app.util.get_sci_model(sciobj_model.obsoletes.did) - next_model = gmn.app.util.get_sci_model(sciobj_model.obsoleted_by.did) + prev_model = d1_gmn.app.util.get_sci_model(sciobj_model.obsoletes.did) + next_model = d1_gmn.app.util.get_sci_model(sciobj_model.obsoleted_by.did) prev_model.obsoleted_by = next_model.pid next_model.obsoletes = prev_model.pid sciobj_model.obsoletes = None @@ -209,9 +210,11 @@ def resolve_sid(sid): """Get the PID to which the {sid} currently maps. Preconditions: - - {sid} is verified to exist. E.g., with gmn.app.views.asserts.is_sid(). + - {sid} is verified to exist. E.g., with d1_gmn.app.views.asserts.is_sid(). """ - return gmn.app.models.ChainIdToSeriesID.objects.get(sid__did=sid).head_pid.did + return d1_gmn.app.models.ChainIdToSeriesID.objects.get( + sid__did=sid + ).head_pid.did def get_sid_by_pid(pid): @@ -222,9 +225,9 @@ def get_sid_by_pid(pid): This is the reverse of resolve. Preconditions: - - {pid} is verified to exist. E.g., with gmn.app.views.asserts.is_pid(). + - {pid} is verified to exist. E.g., with d1_gmn.app.views.asserts.is_pid(). """ - sid_model = gmn.app.models.PersistentIdToChainID.objects.get( + sid_model = d1_gmn.app.models.PersistentIdToChainID.objects.get( pid__did=pid ).chain.sid if sid_model: @@ -237,12 +240,12 @@ def get_sid_by_pid(pid): # typically obtained by resolving a SID. If the given PID is not in a chain, a # list containing the single object is returned. # """ -# sci_model = gmn.app.util.get_sci_model(pid) +# sci_model = d1_gmn.app.util.get_sci_model(pid) # while sci_model.obsoletes: -# sci_model = gmn.app.util.get_sci_model(sci_model.obsoletes.pid.did) +# sci_model = d1_gmn.app.util.get_sci_model(sci_model.obsoletes.pid.did) # chain_pid_list = [sci_model.pid.did] # while sci_model.obsoleted_by: -# sci_model = gmn.app.util.get_sci_model( +# sci_model = d1_gmn.app.util.get_sci_model( # sci_model.obsoleted_by.pid.did # ) # chain_pid_list.append(sci_model.pid.did) @@ -250,11 +253,12 @@ def get_sid_by_pid(pid): def is_sid(did): - return gmn.app.models.ChainIdToSeriesID.objects.filter(sid__did=did).exists() + return d1_gmn.app.models.ChainIdToSeriesID.objects.filter(sid__did=did + ).exists() def is_obsoleted(pid): - return gmn.app.util.get_sci_model(pid).obsoleted_by is not None + return d1_gmn.app.util.get_sci_model(pid).obsoleted_by is not None def is_in_revision_chain(sciobj_model): @@ -274,7 +278,7 @@ def is_tail(sciobj_model): # {pid} belongs. # # Preconditions: -# - {sid} is verified to exist. E.g., with gmn.app.views.asserts.is_sid(). +# - {sid} is verified to exist. E.g., with d1_gmn.app.views.asserts.is_sid(). # """ # chain_pid_list = get_pids_in_revision_chain(pid) # resolved_pid = resolve_sid(sid) @@ -288,20 +292,20 @@ def is_tail(sciobj_model): # - {sid} is verified to be unused if creating a standalone object (that may later become # the first object in a chain). # - {sid} is verified to belong to the given chain updating. -# - {pid} is verified to exist. E.g., with gmn.app.views.asserts.is_pid(). +# - {pid} is verified to exist. E.g., with d1_gmn.app.views.asserts.is_pid(). # """ -# gmn.app.models.sid_to_pid(sid, pid) -# gmn.app.models.sid_to_head_pid(sid, pid) +# d1_gmn.app.models.sid_to_pid(sid, pid) +# d1_gmn.app.models.sid_to_head_pid(sid, pid) # def get_sid_by_pid(pid): # """Get the SID to which the {pid} maps. # Return None if there is no SID maps to {pid}. # """ # try: -# return gmn.app.models.SeriesIdToPersistentId.objects.get( +# return d1_gmn.app.models.SeriesIdToPersistentId.objects.get( # pid__did=pid # ).sid.did -# except gmn.app.models.SeriesIdToPersistentId.DoesNotExist: +# except d1_gmn.app.models.SeriesIdToPersistentId.DoesNotExist: # return None # def move_sid_to_last_object_in_chain(pid): @@ -315,7 +319,7 @@ def is_tail(sciobj_model): # database maintains the current mapping going forward. # # Preconditions: -# - PID is verified to exist. E.g., with gmn.app.views.asserts.is_pid(). +# - PID is verified to exist. E.g., with d1_gmn.app.views.asserts.is_pid(). # # Postconditions: # - The SID maps to the last object in the chain. diff --git a/gmn/src/gmn/app/startup.py b/gmn/src/d1_gmn/app/startup.py similarity index 96% rename from gmn/src/gmn/app/startup.py rename to gmn/src/d1_gmn/app/startup.py index ba8481589..13ef609c2 100644 --- a/gmn/src/gmn/app/startup.py +++ b/gmn/src/d1_gmn/app/startup.py @@ -26,16 +26,17 @@ import random import string +import d1_gmn.app.util + import d1_common.util + import django.apps import django.conf import django.core.exceptions -import gmn.app.util - class GMNStartupChecks(django.apps.AppConfig): - name = 'gmn.app.startup' + name = 'd1_gmn.app.startup' def ready(self): self._check_cert_file(django.conf.settings.CLIENT_CERT_PATH) @@ -63,7 +64,7 @@ def _check_cert_file(self, cert_pem_path): if cert_pem_path is None: return try: - gmn.app.util.assert_readable_file(cert_pem_path) + d1_gmn.app.util.assert_readable_file(cert_pem_path) except ValueError as e: raise django.core.exceptions.ImproperlyConfigured( u'Configuration error: Invalid certificate: {}'.format(str(e)) diff --git a/gmn/src/gmn/app/static/css/font-awesome.min.css b/gmn/src/d1_gmn/app/static/css/font-awesome.min.css similarity index 100% rename from gmn/src/gmn/app/static/css/font-awesome.min.css rename to gmn/src/d1_gmn/app/static/css/font-awesome.min.css diff --git a/gmn/src/gmn/app/static/images/d1_logo.png b/gmn/src/d1_gmn/app/static/images/d1_logo.png similarity index 100% rename from gmn/src/gmn/app/static/images/d1_logo.png rename to gmn/src/d1_gmn/app/static/images/d1_logo.png diff --git a/gmn/src/gmn/app/static/images/preface-wrapper-bg.png b/gmn/src/d1_gmn/app/static/images/preface-wrapper-bg.png similarity index 100% rename from gmn/src/gmn/app/static/images/preface-wrapper-bg.png rename to gmn/src/d1_gmn/app/static/images/preface-wrapper-bg.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/animated-overlay.gif b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/animated-overlay.gif similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/animated-overlay.gif rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/animated-overlay.gif diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_flat_55_999999_40x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_flat_55_999999_40x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_flat_55_999999_40x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_flat_55_999999_40x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_flat_75_aaaaaa_40x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_flat_75_aaaaaa_40x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_flat_75_aaaaaa_40x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_flat_75_aaaaaa_40x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_glass_45_0078ae_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_glass_45_0078ae_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_glass_45_0078ae_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_glass_45_0078ae_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_glass_55_f8da4e_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_glass_55_f8da4e_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_glass_55_f8da4e_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_glass_55_f8da4e_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_glass_75_79c9ec_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_glass_75_79c9ec_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_glass_75_79c9ec_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_glass_75_79c9ec_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_0078ae_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_0078ae_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_0078ae_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_0078ae_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_056b93_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_056b93_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_056b93_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_056b93_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_d8e7f3_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_d8e7f3_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_d8e7f3_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_d8e7f3_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_e0fdff_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_e0fdff_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_e0fdff_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_e0fdff_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_f5e175_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_f5e175_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_f5e175_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_f5e175_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_f7a50d_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_f7a50d_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_f7a50d_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_f7a50d_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_fcd113_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_fcd113_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_fcd113_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/images/ui-icons_fcd113_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/jquery-ui-1.10.4.custom.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/jquery-ui-1.10.4.custom.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/jquery-ui-1.10.4.custom.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/jquery-ui-1.10.4.custom.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/jquery-ui-1.10.4.custom.min.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/jquery-ui-1.10.4.custom.min.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/css/start/jquery-ui-1.10.4.custom.min.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/css/start/jquery-ui-1.10.4.custom.min.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/AUTHORS.txt b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/AUTHORS.txt similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/AUTHORS.txt rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/AUTHORS.txt diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/Gruntfile.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/Gruntfile.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/Gruntfile.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/Gruntfile.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/MIT-LICENSE.txt b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/MIT-LICENSE.txt similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/MIT-LICENSE.txt rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/MIT-LICENSE.txt diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/README.md b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/README.md similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/README.md rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/README.md diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/demos.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/demos.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/demos.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/demos.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/calendar.gif b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/calendar.gif similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/calendar.gif rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/calendar.gif diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-config-on-tile.gif b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-config-on-tile.gif similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-config-on-tile.gif rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-config-on-tile.gif diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-config-on.gif b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-config-on.gif similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-config-on.gif rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-config-on.gif diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-spindown-closed.gif b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-spindown-closed.gif similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-spindown-closed.gif rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-spindown-closed.gif diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-spindown-open.gif b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-spindown-open.gif similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-spindown-open.gif rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/demo-spindown-open.gif diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/icon-docs-info.gif b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/icon-docs-info.gif similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/icon-docs-info.gif rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/icon-docs-info.gif diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/pbar-ani.gif b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/pbar-ani.gif similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/pbar-ani.gif rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/images/pbar-ani.gif diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/index.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/index.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/index.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/index.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/cycler.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/cycler.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/cycler.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/cycler.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/default.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/default.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/default.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/default.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/images/earth.jpg b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/images/earth.jpg similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/images/earth.jpg rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/images/earth.jpg diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/images/flight.jpg b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/images/flight.jpg similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/images/flight.jpg rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/images/flight.jpg diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/images/rocket.jpg b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/images/rocket.jpg similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/images/rocket.jpg rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/images/rocket.jpg diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/index.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/index.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/index.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/position/index.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content1.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content1.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content1.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content1.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content2.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content2.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content2.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content2.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content3-slow.php b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content3-slow.php similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content3-slow.php rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content3-slow.php diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content4-broken.php b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content4-broken.php similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content4-broken.php rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/ajax/content4-broken.php diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/bottom.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/bottom.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/bottom.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/bottom.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/collapsible.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/collapsible.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/collapsible.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/collapsible.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/default.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/default.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/default.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/default.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/index.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/index.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/index.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/index.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/manipulation.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/manipulation.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/manipulation.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/manipulation.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/mouseover.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/mouseover.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/mouseover.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/mouseover.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/sortable.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/sortable.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/sortable.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/sortable.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/vertical.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/vertical.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/vertical.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/tabs/vertical.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/widget/default.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/widget/default.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/widget/default.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/widget/default.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/widget/index.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/widget/index.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/widget/index.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/demos/widget/index.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/jQuery.widget.bridge.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/jQuery.widget.bridge.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/jQuery.widget.bridge.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/jQuery.widget.bridge.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/jQuery.widget.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/jQuery.widget.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/jQuery.widget.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/jQuery.widget.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/mouse.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/mouse.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/mouse.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/mouse.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/position.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/position.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/position.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/position.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/tabs.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/tabs.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/tabs.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/docs/tabs.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/globalize.culture.de-DE.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/globalize.culture.de-DE.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/globalize.culture.de-DE.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/globalize.culture.de-DE.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/globalize.culture.ja-JP.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/globalize.culture.ja-JP.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/globalize.culture.ja-JP.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/globalize.culture.ja-JP.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/globalize.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/globalize.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/globalize.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/globalize.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/jquery.mousewheel.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/jquery.mousewheel.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/jquery.mousewheel.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/jquery.mousewheel.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/jshint.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/jshint.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/jshint.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/jshint.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/qunit.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/qunit.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/qunit.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/qunit.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/qunit.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/qunit.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/qunit.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/external/qunit.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/jquery-1.10.2.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/jquery-1.10.2.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/jquery-1.10.2.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/jquery-1.10.2.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/package.json b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/package.json similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/package.json rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/package.json diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/animated-overlay.gif b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/animated-overlay.gif similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/animated-overlay.gif rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/animated-overlay.gif diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_flat_75_ffffff_40x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_flat_75_ffffff_40x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_flat_75_ffffff_40x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_flat_75_ffffff_40x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_65_ffffff_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_65_ffffff_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_65_ffffff_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_65_ffffff_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_75_dadada_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_75_dadada_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_75_dadada_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_75_dadada_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_222222_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_222222_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_222222_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_222222_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_2e83ff_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_2e83ff_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_2e83ff_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_2e83ff_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_454545_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_454545_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_454545_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_454545_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_888888_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_888888_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_888888_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_888888_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_cd0a0a_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_cd0a0a_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_cd0a0a_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/images/ui-icons_cd0a0a_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery-ui.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery-ui.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery-ui.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery-ui.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.all.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.all.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.all.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.all.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.base.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.base.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.base.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.base.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.core.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.core.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.core.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.core.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.tabs.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.tabs.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.tabs.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.tabs.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.theme.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.theme.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.theme.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/jquery.ui.theme.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/animated-overlay.gif b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/animated-overlay.gif similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/animated-overlay.gif rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/animated-overlay.gif diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_222222_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_222222_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_222222_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_222222_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_2e83ff_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_2e83ff_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_2e83ff_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_2e83ff_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_454545_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_454545_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_454545_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_454545_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_888888_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_888888_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_888888_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_888888_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_cd0a0a_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_cd0a0a_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_cd0a0a_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/images/ui-icons_cd0a0a_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery-ui.min.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery-ui.min.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery-ui.min.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery-ui.min.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery.ui.core.min.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery.ui.core.min.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery.ui.core.min.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery.ui.core.min.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery.ui.tabs.min.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery.ui.tabs.min.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery.ui.tabs.min.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery.ui.tabs.min.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery.ui.theme.min.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery.ui.theme.min.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery.ui.theme.min.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/base/minified/jquery.ui.theme.min.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/animated-overlay.gif b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/animated-overlay.gif similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/animated-overlay.gif rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/animated-overlay.gif diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_flat_55_999999_40x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_flat_55_999999_40x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_flat_55_999999_40x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_flat_55_999999_40x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_flat_75_aaaaaa_40x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_flat_75_aaaaaa_40x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_flat_75_aaaaaa_40x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_flat_75_aaaaaa_40x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_glass_45_0078ae_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_glass_45_0078ae_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_glass_45_0078ae_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_glass_45_0078ae_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_glass_55_f8da4e_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_glass_55_f8da4e_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_glass_55_f8da4e_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_glass_55_f8da4e_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_glass_75_79c9ec_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_glass_75_79c9ec_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_glass_75_79c9ec_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_glass_75_79c9ec_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_gloss-wave_45_e14f1c_500x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_gloss-wave_75_2191c0_500x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-bg_inset-hard_100_fcfdfd_1x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_0078ae_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_0078ae_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_0078ae_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_0078ae_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_056b93_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_056b93_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_056b93_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_056b93_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_d8e7f3_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_d8e7f3_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_d8e7f3_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_d8e7f3_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_e0fdff_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_e0fdff_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_e0fdff_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_e0fdff_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_f5e175_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_f5e175_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_f5e175_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_f5e175_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_f7a50d_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_f7a50d_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_f7a50d_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_f7a50d_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_fcd113_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_fcd113_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_fcd113_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/images/ui-icons_fcd113_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery-ui.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery-ui.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery-ui.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery-ui.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.all.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.all.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.all.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.all.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.base.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.base.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.base.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.base.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.core.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.core.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.core.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.core.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.tabs.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.tabs.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.tabs.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.tabs.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.theme.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.theme.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.theme.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/jquery.ui.theme.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/animated-overlay.gif b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/animated-overlay.gif similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/animated-overlay.gif rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/animated-overlay.gif diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_flat_55_999999_40x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_flat_55_999999_40x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_flat_55_999999_40x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_flat_55_999999_40x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_flat_75_aaaaaa_40x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_flat_75_aaaaaa_40x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_flat_75_aaaaaa_40x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_flat_75_aaaaaa_40x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_glass_45_0078ae_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_glass_45_0078ae_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_glass_45_0078ae_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_glass_45_0078ae_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_glass_55_f8da4e_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_glass_55_f8da4e_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_glass_55_f8da4e_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_glass_55_f8da4e_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_glass_75_79c9ec_1x400.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_glass_75_79c9ec_1x400.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_glass_75_79c9ec_1x400.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_glass_75_79c9ec_1x400.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_gloss-wave_45_e14f1c_500x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_gloss-wave_45_e14f1c_500x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_gloss-wave_45_e14f1c_500x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_gloss-wave_45_e14f1c_500x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_gloss-wave_50_6eac2c_500x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_gloss-wave_50_6eac2c_500x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_gloss-wave_50_6eac2c_500x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_gloss-wave_50_6eac2c_500x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_gloss-wave_75_2191c0_500x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_gloss-wave_75_2191c0_500x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_gloss-wave_75_2191c0_500x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_gloss-wave_75_2191c0_500x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_inset-hard_100_fcfdfd_1x100.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_inset-hard_100_fcfdfd_1x100.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_inset-hard_100_fcfdfd_1x100.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-bg_inset-hard_100_fcfdfd_1x100.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_0078ae_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_0078ae_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_0078ae_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_0078ae_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_056b93_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_056b93_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_056b93_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_056b93_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_d8e7f3_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_d8e7f3_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_d8e7f3_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_d8e7f3_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_e0fdff_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_e0fdff_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_e0fdff_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_e0fdff_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_f5e175_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_f5e175_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_f5e175_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_f5e175_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_f7a50d_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_f7a50d_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_f7a50d_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_f7a50d_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_fcd113_256x240.png b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_fcd113_256x240.png similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_fcd113_256x240.png rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/images/ui-icons_fcd113_256x240.png diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery-ui.min.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery-ui.min.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery-ui.min.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery-ui.min.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery.ui.core.min.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery.ui.core.min.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery.ui.core.min.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery.ui.core.min.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery.ui.tabs.min.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery.ui.tabs.min.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery.ui.tabs.min.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery.ui.tabs.min.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery.ui.theme.min.css b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery.ui.theme.min.css similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery.ui.theme.min.css rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/themes/start/minified/jquery.ui.theme.min.css diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.core.jquery.json b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.core.jquery.json similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.core.jquery.json rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.core.jquery.json diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.mouse.jquery.json b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.mouse.jquery.json similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.mouse.jquery.json rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.mouse.jquery.json diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.position.jquery.json b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.position.jquery.json similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.position.jquery.json rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.position.jquery.json diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.tabs.jquery.json b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.tabs.jquery.json similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.tabs.jquery.json rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.tabs.jquery.json diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.widget.jquery.json b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.widget.jquery.json similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.widget.jquery.json rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui.widget.jquery.json diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery-ui.custom.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery-ui.custom.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery-ui.custom.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery-ui.custom.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.core.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.core.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.core.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.core.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.mouse.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.mouse.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.mouse.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.mouse.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.position.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.position.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.position.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.position.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.tabs.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.tabs.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.tabs.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.tabs.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.widget.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.widget.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.widget.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/jquery.ui.widget.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery-ui.custom.min.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery-ui.custom.min.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery-ui.custom.min.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery-ui.custom.min.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.core.min.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.core.min.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.core.min.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.core.min.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.mouse.min.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.mouse.min.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.mouse.min.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.mouse.min.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.position.min.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.position.min.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.position.min.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.position.min.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.tabs.min.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.tabs.min.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.tabs.min.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.tabs.min.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.widget.min.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.widget.min.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.widget.min.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/development-bundle/ui/minified/jquery.ui.widget.min.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/index.html b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/index.html similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/index.html rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/index.html diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/js/jquery-1.10.2.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/js/jquery-1.10.2.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/js/jquery-1.10.2.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/js/jquery-1.10.2.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.js diff --git a/gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.min.js b/gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.min.js similarity index 100% rename from gmn/src/gmn/app/static/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.min.js rename to gmn/src/d1_gmn/app/static/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.min.js diff --git a/gmn/src/gmn/app/static/robots.txt b/gmn/src/d1_gmn/app/static/robots.txt similarity index 100% rename from gmn/src/gmn/app/static/robots.txt rename to gmn/src/d1_gmn/app/static/robots.txt diff --git a/gmn/src/gmn/app/sysmeta.py b/gmn/src/d1_gmn/app/sysmeta.py similarity index 76% rename from gmn/src/gmn/app/sysmeta.py rename to gmn/src/d1_gmn/app/sysmeta.py index a5ef01259..416438ef3 100644 --- a/gmn/src/gmn/app/sysmeta.py +++ b/gmn/src/d1_gmn/app/sysmeta.py @@ -29,6 +29,13 @@ import pyxb +import d1_gmn.app +import d1_gmn.app.auth +import d1_gmn.app.local_replica +import d1_gmn.app.models +import d1_gmn.app.revision +import d1_gmn.app.util + import d1_common.date_time import d1_common.types import d1_common.types.dataoneTypes @@ -37,13 +44,6 @@ import d1_common.util import d1_common.xml -import gmn.app -import gmn.app.auth -import gmn.app.local_replica -import gmn.app.models -import gmn.app.revision -import gmn.app.util - def archive_object(pid): """Set the status of an object to archived. @@ -53,7 +53,7 @@ def archive_object(pid): - The object is not a replica. - The object is not archived. """ - sciobj_model = gmn.app.util.get_sci_model(pid) + sciobj_model = d1_gmn.app.util.get_sci_model(pid) sciobj_model.is_archived = True sciobj_model.save() _update_modified_timestamp(sciobj_model) @@ -81,18 +81,18 @@ def create_or_update(sysmeta_pyxb, url=None): Preconditions: - For Create, PID is verified not to exist. E.g., with - gmn.app.views.asserts.is_unused(pid). + d1_gmn.app.views.asserts.is_unused(pid). - Any supplied SID is verified to be valid for the given operation. E.g., with - gmn.app.views.asserts.is_valid_sid_for_chain(). + d1_gmn.app.views.asserts.is_valid_sid_for_chain(). """ - pid = gmn.app.util.uvalue(sysmeta_pyxb.identifier) + pid = d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) try: - sci_model = gmn.app.util.get_sci_model(pid) - except gmn.app.models.ScienceObject.DoesNotExist: - sci_model = gmn.app.models.ScienceObject() - sci_model.pid = gmn.app.models.did(pid) + sci_model = d1_gmn.app.util.get_sci_model(pid) + except d1_gmn.app.models.ScienceObject.DoesNotExist: + sci_model = d1_gmn.app.models.ScienceObject() + sci_model.pid = d1_gmn.app.models.did(pid) sci_model.url = url sci_model.serial_version = sysmeta_pyxb.serialVersion sci_model.uploaded_timestamp = sysmeta_pyxb.dateUploaded @@ -112,7 +112,7 @@ def create_or_update(sysmeta_pyxb, url=None): def is_did(did): - return gmn.app.models.IdNamespace.objects.filter(did=did).exists() + return d1_gmn.app.models.IdNamespace.objects.filter(did=did).exists() def is_pid(did): @@ -120,23 +120,23 @@ def is_pid(did): Includes unprocessed replicas and revision chain placeholders for remote objects. """ - return is_did(did) and not gmn.app.revision.is_sid(did) + return is_did(did) and not d1_gmn.app.revision.is_sid(did) def is_pid_of_existing_object(pid): """Excludes SIDs, unprocessed replicas and revision chain placeholders for remote objects. """ - return gmn.app.models.ScienceObject.objects.filter(pid__did=pid).exists() + return d1_gmn.app.models.ScienceObject.objects.filter(pid__did=pid).exists() def is_archived(pid): return is_pid_of_existing_object(pid) \ - and gmn.app.util.get_sci_model(pid).is_archived + and d1_gmn.app.util.get_sci_model(pid).is_archived def update_modified_timestamp(pid): - sci_model = gmn.app.util.get_sci_model(pid) + sci_model = d1_gmn.app.util.get_sci_model(pid) _update_modified_timestamp(sci_model) @@ -147,13 +147,13 @@ def model_to_pyxb(pid): def get_identifier_type(did): if not is_did(did): return u'unused on this Member Node' - elif gmn.app.revision.is_sid(did): + elif d1_gmn.app.revision.is_sid(did): return u'a Series ID (SID)' elif is_pid_of_existing_object(did): return u'a Persistent ID (PID) of an existing local object' - elif gmn.app.local_replica.is_local_replica(did): + elif d1_gmn.app.local_replica.is_local_replica(did): return u'a Persistent ID (PID) of a local replica' - elif gmn.app.local_replica.is_revision_chain_placeholder(did): + elif d1_gmn.app.local_replica.is_revision_chain_placeholder(did): return \ u'a Persistent ID (PID) that is reserved due to being referenced in ' \ u'the revision chain of a local replica' @@ -167,7 +167,7 @@ def get_identifier_type(did): def _model_to_pyxb(pid): - sciobj_model = gmn.app.util.get_sci_model(pid) + sciobj_model = d1_gmn.app.util.get_sci_model(pid) sysmeta_pyxb = _base_model_to_pyxb(sciobj_model) if _has_media_type_db(sciobj_model): sysmeta_pyxb.mediaType = _media_type_model_to_pyxb(sciobj_model) @@ -183,36 +183,36 @@ def _model_to_pyxb(pid): def _base_pyxb_to_model(sci_model, sysmeta_pyxb): sci_model.modified_timestamp = sysmeta_pyxb.dateSysMetadataModified - sci_model.format = gmn.app.models.format(sysmeta_pyxb.formatId) + sci_model.format = d1_gmn.app.models.format(sysmeta_pyxb.formatId) sci_model.filename = getattr(sysmeta_pyxb, 'fileName', None) - sci_model.checksum = gmn.app.util.uvalue(sysmeta_pyxb.checksum) - sci_model.checksum_algorithm = gmn.app.models.checksum_algorithm( + sci_model.checksum = d1_gmn.app.util.uvalue(sysmeta_pyxb.checksum) + sci_model.checksum_algorithm = d1_gmn.app.models.checksum_algorithm( sysmeta_pyxb.checksum.algorithm ) sci_model.size = sysmeta_pyxb.size if sysmeta_pyxb.submitter: - sci_model.submitter = gmn.app.models.subject( - gmn.app.util.uvalue(sysmeta_pyxb.submitter) + sci_model.submitter = d1_gmn.app.models.subject( + d1_gmn.app.util.uvalue(sysmeta_pyxb.submitter) ) - sci_model.rights_holder = gmn.app.models.subject( - gmn.app.util.uvalue(sysmeta_pyxb.rightsHolder) + sci_model.rights_holder = d1_gmn.app.models.subject( + d1_gmn.app.util.uvalue(sysmeta_pyxb.rightsHolder) ) - sci_model.origin_member_node = gmn.app.models.node( - gmn.app.util.uvalue(sysmeta_pyxb.originMemberNode) + sci_model.origin_member_node = d1_gmn.app.models.node( + d1_gmn.app.util.uvalue(sysmeta_pyxb.originMemberNode) ) - sci_model.authoritative_member_node = gmn.app.models.node( - gmn.app.util.uvalue(sysmeta_pyxb.authoritativeMemberNode) + sci_model.authoritative_member_node = d1_gmn.app.models.node( + d1_gmn.app.util.uvalue(sysmeta_pyxb.authoritativeMemberNode) ) - gmn.app.revision.set_revision_by_model( + d1_gmn.app.revision.set_revision_by_model( sci_model, - gmn.app.util.get_value(sysmeta_pyxb, 'obsoletes'), - gmn.app.util.get_value(sysmeta_pyxb, 'obsoletedBy'), + d1_gmn.app.util.get_value(sysmeta_pyxb, 'obsoletes'), + d1_gmn.app.util.get_value(sysmeta_pyxb, 'obsoletedBy'), ) sci_model.is_archived = sysmeta_pyxb.archived or False - # series_id = gmn.app.util.get_value(sysmeta_pyxb, 'seriesId') + # series_id = d1_gmn.app.util.get_value(sysmeta_pyxb, 'seriesId') # if series_id: - # gmn.app.sysmeta_revision.update_or_create_sid_to_pid_map( - # series_id, gmn.app.util.uvalue(sysmeta_pyxb.identifier) + # d1_gmn.app.sysmeta_revision.update_or_create_sid_to_pid_map( + # series_id, d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) # ) @@ -243,7 +243,7 @@ def sub_sciobj(sub_sciobj_model): base_pyxb.obsoletes = sub_sciobj(sciobj_model.obsoletes) base_pyxb.obsoletedBy = sub_sciobj(sciobj_model.obsoleted_by) base_pyxb.archived = sciobj_model.is_archived - base_pyxb.seriesId = gmn.app.revision.get_sid_by_pid(sciobj_model.pid.did) + base_pyxb.seriesId = d1_gmn.app.revision.get_sid_by_pid(sciobj_model.pid.did) return base_pyxb @@ -280,13 +280,13 @@ def _media_type_pyxb_to_model(sci_model, sysmeta_pyxb): def _delete_existing_media_type(sysmeta_pyxb): - gmn.app.models.MediaType.objects.filter( - sciobj__pid__did=gmn.app.util.uvalue(sysmeta_pyxb.identifier) + d1_gmn.app.models.MediaType.objects.filter( + sciobj__pid__did=d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) ).delete() def _insert_media_type_name_row(sci_model, media_type_pyxb): - media_type_model = gmn.app.models.MediaType( + media_type_model = d1_gmn.app.models.MediaType( sciobj=sci_model, name=media_type_pyxb.name ) media_type_model.save() @@ -295,22 +295,24 @@ def _insert_media_type_name_row(sci_model, media_type_pyxb): def _insert_media_type_property_rows(media_type_model, media_type_pyxb): for p in media_type_pyxb.property_: - media_type_property_model = gmn.app.models.MediaTypeProperty( - media_type=media_type_model, name=p.name, value=gmn.app.util.uvalue(p) + media_type_property_model = d1_gmn.app.models.MediaTypeProperty( + media_type=media_type_model, name=p.name, value=d1_gmn.app.util.uvalue(p) ) media_type_property_model.save() def _has_media_type_db(sciobj_model): - return gmn.app.models.MediaType.objects.filter(sciobj=sciobj_model).exists() + return d1_gmn.app.models.MediaType.objects.filter(sciobj=sciobj_model).exists() def _media_type_model_to_pyxb(sciobj_model): - media_type_model = gmn.app.models.MediaType.objects.get(sciobj=sciobj_model) + media_type_model = d1_gmn.app.models.MediaType.objects.get( + sciobj=sciobj_model + ) media_type_pyxb = d1_common.types.dataoneTypes.MediaType() media_type_pyxb.name = media_type_model.name - for media_type_property_model in gmn.app.models.MediaTypeProperty.objects.filter( + for media_type_property_model in d1_gmn.app.models.MediaTypeProperty.objects.filter( media_type=media_type_model ): media_type_property_pyxb = d1_common.types.dataoneTypes.MediaTypeProperty( @@ -354,11 +356,11 @@ def _access_policy_pyxb_to_model(sci_model, sysmeta_pyxb): # Add an implicit allow rule with all permissions for the rights holder. allow_rights_holder = d1_common.types.dataoneTypes.AccessRule() permission = d1_common.types.dataoneTypes.Permission( - gmn.app.auth.CHANGEPERMISSION_STR + d1_gmn.app.auth.CHANGEPERMISSION_STR ) allow_rights_holder.permission.append(permission) allow_rights_holder.subject.append( - gmn.app.util.uvalue(sysmeta_pyxb.rightsHolder) + d1_gmn.app.util.uvalue(sysmeta_pyxb.rightsHolder) ) top_level = _get_highest_level_action_for_rule(allow_rights_holder) _insert_permission_rows(sci_model, allow_rights_holder, top_level) @@ -370,7 +372,8 @@ def _access_policy_pyxb_to_model(sci_model, sysmeta_pyxb): def _has_access_policy_db(sciobj_model): - return gmn.app.models.Permission.objects.filter(sciobj=sciobj_model).exists() + return d1_gmn.app.models.Permission.objects.filter(sciobj=sciobj_model + ).exists() def _has_access_policy_pyxb(sysmeta_pyxb): @@ -380,15 +383,15 @@ def _has_access_policy_pyxb(sysmeta_pyxb): def _delete_existing_access_policy(sysmeta_pyxb): - gmn.app.models.Permission.objects.filter( - sciobj__pid__did=gmn.app.util.uvalue(sysmeta_pyxb.identifier) + d1_gmn.app.models.Permission.objects.filter( + sciobj__pid__did=d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) ).delete() def _get_highest_level_action_for_rule(allow_rule): top_level = 0 for permission in allow_rule.permission: - level = gmn.app.auth.action_to_level(permission) + level = d1_gmn.app.auth.action_to_level(permission) if level > top_level: top_level = level return top_level @@ -396,8 +399,9 @@ def _get_highest_level_action_for_rule(allow_rule): def _insert_permission_rows(sci_model, allow_rule, top_level): for s in allow_rule.subject: - permission_model = gmn.app.models.Permission( - sciobj=sci_model, subject=gmn.app.models.subject(gmn.app.util.uvalue(s)), + permission_model = d1_gmn.app.models.Permission( + sciobj=sci_model, + subject=d1_gmn.app.models.subject(d1_gmn.app.util.uvalue(s)), level=top_level ) permission_model.save() @@ -405,7 +409,7 @@ def _insert_permission_rows(sci_model, allow_rule, top_level): def _access_policy_model_to_pyxb(sciobj_model): access_policy_pyxb = d1_common.types.dataoneTypes.AccessPolicy() - for permission_model in gmn.app.models.Permission.objects.filter( + for permission_model in d1_gmn.app.models.Permission.objects.filter( sciobj=sciobj_model ): # Skip implicit permissions for rightsHolder. @@ -413,7 +417,7 @@ def _access_policy_model_to_pyxb(sciobj_model): continue access_rule_pyxb = d1_common.types.dataoneTypes.AccessRule() permission_pyxb = d1_common.types.dataoneTypes.Permission( - gmn.app.auth.level_to_action(permission_model.level) + d1_gmn.app.auth.level_to_action(permission_model.level) ) access_rule_pyxb.permission.append(permission_pyxb) access_rule_pyxb.subject.append(permission_model.subject.subject) @@ -437,7 +441,7 @@ def _access_policy_model_to_pyxb(sciobj_model): def _replication_policy_pyxb_to_model(sciobj_model, sysmeta_pyxb): _delete_existing_replication_policy(sciobj_model) - replication_policy_model = gmn.app.models.ReplicationPolicy() + replication_policy_model = d1_gmn.app.models.ReplicationPolicy() replication_policy_model.sciobj = sciobj_model replication_policy_model.replication_is_allowed = ( sysmeta_pyxb.replicationPolicy.replicationAllowed @@ -449,10 +453,12 @@ def _replication_policy_pyxb_to_model(sciobj_model, sysmeta_pyxb): def add(node_ref_pyxb, rep_node_model): for rep_node_urn in node_ref_pyxb: - # node_urn_model = gmn.app.models.Node.objects.get_or_create( + # node_urn_model = d1_gmn.app.models.Node.objects.get_or_create( # urn=rep_node_urn.value() # )[0] - node_urn_model = gmn.app.models.node(gmn.app.util.uvalue(rep_node_urn)) + node_urn_model = d1_gmn.app.models.node( + d1_gmn.app.util.uvalue(rep_node_urn) + ) rep_node_obj = rep_node_model() rep_node_obj.node = node_urn_model rep_node_obj.replication_policy = replication_policy_model @@ -460,23 +466,25 @@ def add(node_ref_pyxb, rep_node_model): add( sysmeta_pyxb.replicationPolicy.preferredMemberNode, - gmn.app.models.PreferredMemberNode + d1_gmn.app.models.PreferredMemberNode ) add( sysmeta_pyxb.replicationPolicy.blockedMemberNode, - gmn.app.models.BlockedMemberNode + d1_gmn.app.models.BlockedMemberNode ) return replication_policy_model def _has_replication_policy_db(sciobj_model): - return gmn.app.models.ReplicationPolicy.objects.filter(sciobj=sciobj_model - ).exists() + return d1_gmn.app.models.ReplicationPolicy.objects.filter( + sciobj=sciobj_model + ).exists() def _delete_existing_replication_policy(sciobj_model): - gmn.app.models.ReplicationPolicy.objects.filter(sciobj=sciobj_model).delete() + d1_gmn.app.models.ReplicationPolicy.objects.filter(sciobj=sciobj_model + ).delete() def _has_replication_policy_pyxb(sysmeta_pyxb): @@ -486,7 +494,7 @@ def _has_replication_policy_pyxb(sysmeta_pyxb): def _replication_policy_model_to_pyxb(sciobj_model): - replication_policy_model = gmn.app.models.ReplicationPolicy.objects.get( + replication_policy_model = d1_gmn.app.models.ReplicationPolicy.objects.get( sciobj=sciobj_model ) replication_policy_pyxb = d1_common.types.dataoneTypes.ReplicationPolicy() @@ -501,10 +509,11 @@ def add(rep_pyxb, rep_node_model): add( replication_policy_pyxb.preferredMemberNode, - gmn.app.models.PreferredMemberNode + d1_gmn.app.models.PreferredMemberNode ) add( - replication_policy_pyxb.blockedMemberNode, gmn.app.models.BlockedMemberNode + replication_policy_pyxb.blockedMemberNode, + d1_gmn.app.models.BlockedMemberNode ) return replication_policy_pyxb @@ -527,12 +536,12 @@ def replica_pyxb_to_model(sciobj_model, sysmeta_pyxb): def _register_remote_replica(sciobj_model, replica_pyxb): - replica_info_model = gmn.app.models.replica_info( + replica_info_model = d1_gmn.app.models.replica_info( status_str=replica_pyxb.replicationStatus, - source_node_urn=gmn.app.util.uvalue(replica_pyxb.replicaMemberNode), + source_node_urn=d1_gmn.app.util.uvalue(replica_pyxb.replicaMemberNode), timestamp=replica_pyxb.replicaVerified, ) - gmn.app.models.remote_replica( + d1_gmn.app.models.remote_replica( sciobj_model=sciobj_model, replica_info_model=replica_info_model, ) @@ -540,7 +549,7 @@ def _register_remote_replica(sciobj_model, replica_pyxb): def replica_model_to_pyxb(sciobj_model): replica_pyxb_list = [] - for replica_model in gmn.app.models.RemoteReplica.objects.filter( + for replica_model in d1_gmn.app.models.RemoteReplica.objects.filter( sciobj=sciobj_model ): replica_pyxb = d1_common.types.dataoneTypes.Replica() diff --git a/gmn/src/gmn/app/templates/404.html b/gmn/src/d1_gmn/app/templates/404.html similarity index 100% rename from gmn/src/gmn/app/templates/404.html rename to gmn/src/d1_gmn/app/templates/404.html diff --git a/gmn/src/gmn/app/templates/500.html b/gmn/src/d1_gmn/app/templates/500.html similarity index 100% rename from gmn/src/gmn/app/templates/500.html rename to gmn/src/d1_gmn/app/templates/500.html diff --git a/gmn/src/gmn/app/templates/diag.html b/gmn/src/d1_gmn/app/templates/diag.html similarity index 100% rename from gmn/src/gmn/app/templates/diag.html rename to gmn/src/d1_gmn/app/templates/diag.html diff --git a/gmn/src/gmn/app/templates/echo_session.xhtml b/gmn/src/d1_gmn/app/templates/echo_session.xhtml similarity index 100% rename from gmn/src/gmn/app/templates/echo_session.xhtml rename to gmn/src/d1_gmn/app/templates/echo_session.xhtml diff --git a/gmn/src/gmn/app/templates/home.html b/gmn/src/d1_gmn/app/templates/home.html similarity index 100% rename from gmn/src/gmn/app/templates/home.html rename to gmn/src/d1_gmn/app/templates/home.html diff --git a/gmn/src/gmn/app/templates/object_permissions.xhtml b/gmn/src/d1_gmn/app/templates/object_permissions.xhtml similarity index 100% rename from gmn/src/gmn/app/templates/object_permissions.xhtml rename to gmn/src/d1_gmn/app/templates/object_permissions.xhtml diff --git a/gmn/src/gmn/app/templates/replicate_get_queue.xml b/gmn/src/d1_gmn/app/templates/replicate_get_queue.xml similarity index 100% rename from gmn/src/gmn/app/templates/replicate_get_queue.xml rename to gmn/src/d1_gmn/app/templates/replicate_get_queue.xml diff --git a/gmn/src/gmn/app/templates/test_slash.html b/gmn/src/d1_gmn/app/templates/test_slash.html similarity index 100% rename from gmn/src/gmn/app/templates/test_slash.html rename to gmn/src/d1_gmn/app/templates/test_slash.html diff --git a/gmn/src/gmn/app/templates/trusted_subjects.xhtml b/gmn/src/d1_gmn/app/templates/trusted_subjects.xhtml similarity index 100% rename from gmn/src/gmn/app/templates/trusted_subjects.xhtml rename to gmn/src/d1_gmn/app/templates/trusted_subjects.xhtml diff --git a/gmn/src/gmn/app/urls.py b/gmn/src/d1_gmn/app/urls.py similarity index 74% rename from gmn/src/gmn/app/urls.py rename to gmn/src/d1_gmn/app/urls.py index 2947ec6e3..267dc16ec 100644 --- a/gmn/src/gmn/app/urls.py +++ b/gmn/src/d1_gmn/app/urls.py @@ -22,10 +22,11 @@ from __future__ import absolute_import +import d1_gmn.app.views.diagnostics +import d1_gmn.app.views.external +import d1_gmn.app.views.internal + import django.conf -import gmn.app.views.diagnostics -import gmn.app.views.external -import gmn.app.views.internal # Django from django.conf.urls import url @@ -39,43 +40,43 @@ # MNCore.ping() - GET /monitor/ping url( r'^v[12]/monitor/ping/?$', - gmn.app.views.external.get_monitor_ping, + d1_gmn.app.views.external.get_monitor_ping, name='get_monitor_ping', ), # MNCore.getLogRecords() - GET /log url( r'^v[12]/log/?$', - gmn.app.views.external.get_log, + d1_gmn.app.views.external.get_log, name='get_log', ), # MNCore.getCapabilities() - GET / and GET /node url( r'^v[12]/?$', - gmn.app.views.external.get_node, + d1_gmn.app.views.external.get_node, name='get_node', ), url( r'^v[12]/node/?$', - gmn.app.views.external.get_node, + d1_gmn.app.views.external.get_node, ), # Tier 1: Read API (MNRead) # MNRead.get() - GET /object/{did} url( r'^v[12]/object/(.+)$', - gmn.app.views.external.dispatch_object, + d1_gmn.app.views.external.dispatch_object, name='dispatch_object', ), # MNRead.getSystemMetadata() - GET /meta/{did} url( r'^v[12]/meta/(.+)$', - gmn.app.views.external.get_meta, + d1_gmn.app.views.external.get_meta, name='get_meta', ), # MNStorage.updateSystemMetadata() - PUT /meta url( r'^v2/meta$', - gmn.app.views.external.put_meta, + d1_gmn.app.views.external.put_meta, name='put_meta', ), # MNRead.describe() - HEAD /object/{did} @@ -83,25 +84,25 @@ # MNRead.getChecksum() - GET /checksum/{did} url( r'^v[12]/checksum/(.+)$', - gmn.app.views.external.get_checksum, + d1_gmn.app.views.external.get_checksum, name='get_checksum', ), # MNRead.listObjects() - GET /object url( r'^v[12]/object/?$', - gmn.app.views.external.dispatch_object_list, + d1_gmn.app.views.external.dispatch_object_list, name='dispatch_object_list', ), # MNRead.synchronizationFailed() - POST /error url( r'^v[12]/error/?$', - gmn.app.views.external.post_error, + d1_gmn.app.views.external.post_error, name='post_error', ), # MNRead.getReplica() - GET /replica/{did} url( r'^v[12]/replica/(.+)/?$', - gmn.app.views.external.get_replica, + d1_gmn.app.views.external.get_replica, name='get_replica', ), @@ -109,13 +110,13 @@ # MNAuthorization.isAuthorized() - GET /isAuthorized/{did} url( r'^v[12]/isAuthorized/(.+)/?$', - gmn.app.views.external.get_is_authorized, + d1_gmn.app.views.external.get_is_authorized, name='get_is_authorized', ), # MNStorage.systemMetadataChanged() - POST /refreshSystemMetadata/{did} url( r'^v[12]/dirtySystemMetadata/?$', - gmn.app.views.external.post_refresh_system_metadata, + d1_gmn.app.views.external.post_refresh_system_metadata, name='post_refresh_system_metadata', ), @@ -127,7 +128,7 @@ # MNStorage.generateIdentifier() url( r'^v[12]/generate/?$', - gmn.app.views.external.post_generate_identifier, + d1_gmn.app.views.external.post_generate_identifier, name='post_generate_identifier', ), # MNStorage.delete() - DELETE /object/{did} @@ -135,19 +136,21 @@ # MNStorage.archive() - PUT /archive/{did} url( r'^v[12]/archive/(.+)/?$', - gmn.app.views.external.put_archive, + d1_gmn.app.views.external.put_archive, name='put_archive', ), # Tier 4: Replication API (MNReplication) # MNReplication.replicate() - POST /replicate url( r'^v[12]/replicate/?$', - gmn.app.views.external.post_replicate, + d1_gmn.app.views.external.post_replicate, name='post_replicate', ), ] -urlpatterns.extend([url(r'^home/?$', gmn.app.views.internal.home, name='home')]) +urlpatterns.extend( + [url(r'^home/?$', d1_gmn.app.views.internal.home, name='home')] +) # Diagnostic APIs that can be made available in production. @@ -156,24 +159,24 @@ # Replication. url( r'^diag/get_replication_queue/?$', - gmn.app.views.diagnostics.get_replication_queue, + d1_gmn.app.views.diagnostics.get_replication_queue, name='get_replication_queue', ), # Authentication. url( r'^diag/echo_session/?$', - gmn.app.views.diagnostics.echo_session, + d1_gmn.app.views.diagnostics.echo_session, name='echo_session', ), # Misc. url( r'^diag/echo_request_object/?$', - gmn.app.views.diagnostics.echo_request_object, + d1_gmn.app.views.diagnostics.echo_request_object, name='echo_request_object', ), url( r'^diag/echo_raw_post_data/?$', - gmn.app.views.diagnostics.echo_raw_post_data, + d1_gmn.app.views.diagnostics.echo_raw_post_data, name='echo_raw_post_data', ), ]) @@ -185,69 +188,69 @@ # Diagnostics portal url( r'^diag$', - gmn.app.views.diagnostics.diagnostics, + d1_gmn.app.views.diagnostics.diagnostics, name='diag', ), # Replication. url( r'^diag/get_replication_queue$', - gmn.app.views.diagnostics.get_replication_queue, + d1_gmn.app.views.diagnostics.get_replication_queue, name='get_replication_queue', ), url( r'^diag/clear_replication_queue$', - gmn.app.views.diagnostics.clear_replication_queue, + d1_gmn.app.views.diagnostics.clear_replication_queue, name='clear_replication_queue', ), # Misc. url( r'^diag/create/(.+)$', - gmn.app.views.diagnostics.create, + d1_gmn.app.views.diagnostics.create, name='create', ), url( r'^diag/slash/(.+?)/(.+?)/(.+?)$', - gmn.app.views.diagnostics.slash, + d1_gmn.app.views.diagnostics.slash, name='slash', ), url( - r'^diag/exception/(.+?)$', gmn.app.views.diagnostics.exception, + r'^diag/exception/(.+?)$', d1_gmn.app.views.diagnostics.exception, name='exception' ), url( r'^diag/delete_all_objects$', - gmn.app.views.diagnostics.delete_all_objects_view, + d1_gmn.app.views.diagnostics.delete_all_objects_view, name='delete_all_objects_view', ), url( r'^diag/trusted_subjects$', - gmn.app.views.diagnostics.trusted_subjects, + d1_gmn.app.views.diagnostics.trusted_subjects, name='trusted_subjects', ), url( r'^diag/whitelist_subject$', - gmn.app.views.diagnostics.whitelist_subject, + d1_gmn.app.views.diagnostics.whitelist_subject, name='whitelist_subject', ), url( r'^diag/object_permissions/(.+?)$', - gmn.app.views.diagnostics.object_permissions, + d1_gmn.app.views.diagnostics.object_permissions, name='object_permissions', ), url( r'^diag/get_setting/(.+)$', - gmn.app.views.diagnostics.get_setting, + d1_gmn.app.views.diagnostics.get_setting, name='get_setting', ), # Event Log. url( r'^diag/delete_event_log$', - gmn.app.views.diagnostics.delete_event_log, + d1_gmn.app.views.diagnostics.delete_event_log, name='delete_event_log', ), url( r'^diag/inject_fictional_event_log$', - gmn.app.views.diagnostics.inject_fictional_event_log, + d1_gmn.app.views.diagnostics.inject_fictional_event_log, name='inject_fictional_event_log', ), ]) diff --git a/gmn/src/gmn/app/util.py b/gmn/src/d1_gmn/app/util.py similarity index 97% rename from gmn/src/gmn/app/util.py rename to gmn/src/d1_gmn/app/util.py index c5e01ff21..9f74f7fe7 100644 --- a/gmn/src/gmn/app/util.py +++ b/gmn/src/d1_gmn/app/util.py @@ -30,7 +30,7 @@ import traceback import urlparse -import gmn.app +import d1_gmn.app import django.conf @@ -168,7 +168,7 @@ def is_proxy_url(url): def get_sci_model(pid): - return gmn.app.models.ScienceObject.objects.get(pid__did=pid) + return d1_gmn.app.models.ScienceObject.objects.get(pid__did=pid) def get_value(sysmeta_pyxb, sysmeta_attr): @@ -197,7 +197,7 @@ def delete_unused_subjects(): as any unused subjects will automatically be reused if needed in the future. """ # This causes Django to create a single join (check with query.query) - query = gmn.app.models.Subject.objects.all() + query = d1_gmn.app.models.Subject.objects.all() query = query.filter(scienceobject_submitter__isnull=True) query = query.filter(scienceobject_rights_holder__isnull=True) query = query.filter(eventlog__isnull=True) diff --git a/gmn/src/gmn/app/views/__init__.py b/gmn/src/d1_gmn/app/views/__init__.py similarity index 100% rename from gmn/src/gmn/app/views/__init__.py rename to gmn/src/d1_gmn/app/views/__init__.py diff --git a/gmn/src/gmn/app/views/asserts.py b/gmn/src/d1_gmn/app/views/asserts.py similarity index 87% rename from gmn/src/gmn/app/views/asserts.py rename to gmn/src/d1_gmn/app/views/asserts.py index 24933e006..b6dfb2b03 100644 --- a/gmn/src/gmn/app/views/asserts.py +++ b/gmn/src/d1_gmn/app/views/asserts.py @@ -30,21 +30,21 @@ import requests +import d1_gmn.app.db_filter +import d1_gmn.app.event_log +import d1_gmn.app.local_replica +import d1_gmn.app.models +import d1_gmn.app.psycopg_adapter +import d1_gmn.app.revision +import d1_gmn.app.sysmeta +import d1_gmn.app.util + import d1_common.checksum import d1_common.const import d1_common.date_time import d1_common.types import d1_common.types.exceptions -import gmn.app.db_filter -import gmn.app.event_log -import gmn.app.local_replica -import gmn.app.models -import gmn.app.psycopg_adapter -import gmn.app.revision -import gmn.app.sysmeta -import gmn.app.util - import django.conf # ------------------------------------------------------------------------------ @@ -61,10 +61,10 @@ def is_unused(did): - Must not have been accepted for replication. - Must not be referenced as obsoletes or obsoleted_by in any object """ - if gmn.app.sysmeta.is_did(did): + if d1_gmn.app.sysmeta.is_did(did): raise d1_common.types.exceptions.IdentifierNotUnique( 0, u'Identifier is already in use as {}. id="{}"' - .format(gmn.app.sysmeta.get_identifier_type(did), did), identifier=did + .format(d1_gmn.app.sysmeta.get_identifier_type(did), did), identifier=did ) @@ -72,7 +72,7 @@ def is_valid_for_update(pid): """Assert that the System Metadata for the object with the given {pid} can be updated. """ - gmn.app.sysmeta.is_pid_of_existing_object(pid) + d1_gmn.app.sysmeta.is_pid_of_existing_object(pid) is_not_replica(pid) is_not_archived(pid) @@ -86,7 +86,7 @@ def is_valid_sid_for_chain(pid, sid): """ if not sid: return - existing_sid = gmn.app.revision.get_sid_by_pid(pid) + existing_sid = d1_gmn.app.revision.get_sid_by_pid(pid) if existing_sid is None: is_unused(sid) else: @@ -109,8 +109,8 @@ def does_not_contain_replica_sections(sysmeta_pyxb): raise d1_common.types.exceptions.InvalidSystemMetadata( 0, u'A replica section was included. A new object object created via ' u'create() or update() cannot already have replicas. pid="{}"'. - format(gmn.app.util.uvalue(sysmeta_pyxb.identifier)), - identifier=gmn.app.util.uvalue(sysmeta_pyxb.identifier) + format(d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier)), + identifier=d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) ) @@ -122,38 +122,39 @@ def sysmeta_is_not_archived(sysmeta_pyxb): 0, u'Archived flag was set. A new object created via create() or update() ' u'cannot already be archived. pid="{}"'.format( - gmn.app.util.uvalue(sysmeta_pyxb.identifier) - ), identifier=gmn.app.util.uvalue(sysmeta_pyxb.identifier) + d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) + ), identifier=d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) ) def is_did(did): - if gmn.app.sysmeta.is_did(did): + if d1_gmn.app.sysmeta.is_did(did): raise d1_common.types.exceptions.NotFound( 0, u'Unknown identifier. id="{}"'.format(did), identifier=did ) def is_pid_of_existing_object(did): - if not gmn.app.sysmeta.is_pid_of_existing_object(did): + if not d1_gmn.app.sysmeta.is_pid_of_existing_object(did): raise d1_common.types.exceptions.NotFound( 0, u'Identifier is {}. Expected a Persistent ID (PID) for an existing ' - u'object. id="{}"'.format(gmn.app.sysmeta.get_identifier_type(did), did), - identifier=did + u'object. id="{}"'.format( + d1_gmn.app.sysmeta.get_identifier_type(did), did + ), identifier=did ) def is_sid(did): - if not gmn.app.revision.is_sid(did): + if not d1_gmn.app.revision.is_sid(did): raise d1_common.types.exceptions.InvalidRequest( 0, u'Identifier is {}. Expected a Series ID (SID). id="{}"'.format( - gmn.app.sysmeta.get_identifier_type(did), did + d1_gmn.app.sysmeta.get_identifier_type(did), did ), identifier=did ) def is_not_replica(pid): - if gmn.app.local_replica.is_local_replica(pid): + if d1_gmn.app.local_replica.is_local_replica(pid): raise d1_common.types.exceptions.InvalidRequest( 0, u'Object is a replica and cannot be updated on this Member Node. ' u'The operation must be performed on the authoritative Member Node. ' @@ -162,7 +163,7 @@ def is_not_replica(pid): def is_not_archived(pid): - if gmn.app.sysmeta.is_archived(pid): + if d1_gmn.app.sysmeta.is_archived(pid): raise d1_common.types.exceptions.InvalidRequest( 0, u'The object has been archived and cannot be updated. ' u'pid="{}"'.format(pid), identifier=pid @@ -170,8 +171,8 @@ def is_not_archived(pid): def has_matching_modified_timestamp(new_sysmeta_pyxb): - pid = gmn.app.util.uvalue(new_sysmeta_pyxb.identifier) - old_sysmeta_model = gmn.app.util.get_sci_model(pid) + pid = d1_gmn.app.util.uvalue(new_sysmeta_pyxb.identifier) + old_sysmeta_model = d1_gmn.app.util.get_sci_model(pid) old_ts = old_sysmeta_model.modified_timestamp new_ts = new_sysmeta_pyxb.dateSysMetadataModified if old_ts != new_ts: @@ -184,7 +185,7 @@ def has_matching_modified_timestamp(new_sysmeta_pyxb): def is_bool_param(param_name, bool_val): - if not gmn.app.views.util.is_bool_param(bool_val): + if not d1_gmn.app.views.util.is_bool_param(bool_val): raise d1_common.types.exceptions.InvalidRequest( 0, u'Invalid boolean value for parameter. parameter="{}" value="{}"'.format( @@ -214,12 +215,12 @@ def obsoletes_not_specified(sysmeta_pyxb): def obsoletes_matches_pid_if_specified(sysmeta_pyxb, old_pid): if sysmeta_pyxb.obsoletes is not None: - if gmn.app.util.uvalue(sysmeta_pyxb.obsoletes) != old_pid: + if d1_gmn.app.util.uvalue(sysmeta_pyxb.obsoletes) != old_pid: raise d1_common.types.exceptions.InvalidSystemMetadata( 0, u'Persistent ID (PID) specified in System Metadata "obsoletes" ' u'field does not match PID specified in URL. ' u'sysmeta_pyxb="{}", url="{}"'.format( - gmn.app.util.uvalue(sysmeta_pyxb.obsoletes), old_pid + d1_gmn.app.util.uvalue(sysmeta_pyxb.obsoletes), old_pid ) ) @@ -230,7 +231,7 @@ def revision_references_existing_objects_if_specified(sysmeta_pyxb): def is_in_revision_chain(pid): - if not gmn.app.revision.is_in_revision_chain(pid): + if not d1_gmn.app.revision.is_in_revision_chain(pid): raise d1_common.types.exceptions.InvalidRequest( 0, u'Object is not in a revision chain. pid="{}"'.format(pid), identifier=pid @@ -238,10 +239,10 @@ def is_in_revision_chain(pid): def _check_pid_exists_if_specified(sysmeta_pyxb, sysmeta_attr): - pid = gmn.app.util.get_value(sysmeta_pyxb, sysmeta_attr) + pid = d1_gmn.app.util.get_value(sysmeta_pyxb, sysmeta_attr) if pid is None: return - if not gmn.app.models.ScienceObject.objects.filter(pid__did=pid).exists(): + if not d1_gmn.app.models.ScienceObject.objects.filter(pid__did=pid).exists(): raise d1_common.types.exceptions.InvalidSystemMetadata( 0, u'System Metadata field references non-existing object. ' u'field="{}", pid="{}"'.format(sysmeta_attr, pid) @@ -249,7 +250,7 @@ def _check_pid_exists_if_specified(sysmeta_pyxb, sysmeta_attr): def is_not_obsoleted(pid): - if gmn.app.revision.is_obsoleted(pid): + if d1_gmn.app.revision.is_obsoleted(pid): raise d1_common.types.exceptions.InvalidRequest( 0, u'Object has already been obsoleted. pid="{}"'.format(pid), identifier=pid @@ -348,7 +349,7 @@ def url_is_retrievable(url): def url_pid_matches_sysmeta(sysmeta_pyxb, pid): - sysmeta_pid = gmn.app.util.uvalue(sysmeta_pyxb.identifier) + sysmeta_pid = d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) if sysmeta_pid != pid: raise d1_common.types.exceptions.InvalidSystemMetadata( 0, diff --git a/gmn/src/gmn/app/views/create.py b/gmn/src/d1_gmn/app/views/create.py similarity index 79% rename from gmn/src/gmn/app/views/create.py rename to gmn/src/d1_gmn/app/views/create.py index a9660ebda..65409e74c 100644 --- a/gmn/src/gmn/app/views/create.py +++ b/gmn/src/d1_gmn/app/views/create.py @@ -21,12 +21,12 @@ """ from __future__ import absolute_import -import d1_common.url +import d1_gmn.app.event_log +import d1_gmn.app.sysmeta +import d1_gmn.app.util +import d1_gmn.app.views.asserts -import gmn.app.event_log -import gmn.app.sysmeta -import gmn.app.util -import gmn.app.views.asserts +import d1_common.url import django.core.files.move @@ -36,7 +36,7 @@ def create(request, sysmeta_pyxb): Preconditions: - PID is verified not to be unused, E.g., with - gmn.app.views.asserts.is_unused(). + d1_gmn.app.views.asserts.is_unused(). Postconditions: - Files and database rows are added as necessary to add a new object. @@ -44,17 +44,17 @@ def create(request, sysmeta_pyxb): # Proxy object vendor specific extension. if 'HTTP_VENDOR_GMN_REMOTE_URL' in request.META: url = request.META['HTTP_VENDOR_GMN_REMOTE_URL'] - gmn.app.views.asserts.url_is_http_or_https(url) - gmn.app.views.asserts.url_is_retrievable(url) + d1_gmn.app.views.asserts.url_is_http_or_https(url) + d1_gmn.app.views.asserts.url_is_retrievable(url) else: # http://en.wikipedia.org/wiki/File_URI_scheme - pid = gmn.app.util.uvalue(sysmeta_pyxb.identifier) + pid = d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) url = u'file:///{}'.format(d1_common.url.encodePathElement(pid)) _object_pid_post_store_local(request, pid) - gmn.app.sysmeta.create_or_update(sysmeta_pyxb, url) + d1_gmn.app.sysmeta.create_or_update(sysmeta_pyxb, url) # Log the create event for this object. - gmn.app.event_log.create( - gmn.app.util.uvalue(sysmeta_pyxb.identifier), request + d1_gmn.app.event_log.create( + d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier), request ) @@ -66,8 +66,8 @@ def _object_pid_post_store_local(request, pid): temporary to the final location. Django automatically handles this when using the file related fields in the models. """ - sciobj_path = gmn.app.util.sciobj_file_path(pid) - gmn.app.util.create_missing_directories(sciobj_path) + sciobj_path = d1_gmn.app.util.sciobj_file_path(pid) + d1_gmn.app.util.create_missing_directories(sciobj_path) try: django.core.files.move.file_move_safe( request.FILES['object'].temporary_file_path(), sciobj_path diff --git a/gmn/src/gmn/app/views/decorators.py b/gmn/src/d1_gmn/app/views/decorators.py similarity index 85% rename from gmn/src/gmn/app/views/decorators.py rename to gmn/src/d1_gmn/app/views/decorators.py index 3d3576644..9a3969c6f 100644 --- a/gmn/src/gmn/app/views/decorators.py +++ b/gmn/src/d1_gmn/app/views/decorators.py @@ -23,17 +23,17 @@ import functools +import d1_gmn.app.auth +import d1_gmn.app.revision +import d1_gmn.app.sysmeta +import d1_gmn.app.views.asserts +import d1_gmn.app.views.util + import d1_common.const import d1_common.types import d1_common.types.exceptions import d1_common.url -import gmn.app.auth -import gmn.app.revision -import gmn.app.sysmeta -import gmn.app.views.asserts -import gmn.app.views.util - import django.conf # ------------------------------------------------------------------------------ @@ -59,14 +59,14 @@ def wrapper(request, did, *args, **kwargs): def resolve_sid_func(request, did): - if gmn.app.views.util.is_v1_api(request): - gmn.app.views.asserts.is_pid_of_existing_object(did) + if d1_gmn.app.views.util.is_v1_api(request): + d1_gmn.app.views.asserts.is_pid_of_existing_object(did) return did - elif gmn.app.views.util.is_v2_api(request): - if gmn.app.sysmeta.is_pid(did): + elif d1_gmn.app.views.util.is_v2_api(request): + if d1_gmn.app.sysmeta.is_pid(did): return did - elif gmn.app.revision.is_sid(did): - return gmn.app.revision.resolve_sid(did) + elif d1_gmn.app.revision.is_sid(did): + return d1_gmn.app.revision.resolve_sid(did) else: raise d1_common.types.exceptions.NotFound( 0, u'Unknown identifier. id="{}"'.format(did), identifier=did @@ -143,12 +143,12 @@ def wrapper(request, *args, **kwargs): def trusted(request): - if not gmn.app.auth.is_trusted_subject(request): + if not d1_gmn.app.auth.is_trusted_subject(request): raise d1_common.types.exceptions.NotAuthorized( 0, u'Access allowed only for trusted subjects. active_subjects="{}", ' u'trusted_subjects="{}"'.format( - gmn.app.auth.format_active_subjects(request), - gmn.app.auth.get_trusted_subjects_string() + d1_gmn.app.auth.format_active_subjects(request), + d1_gmn.app.auth.get_trusted_subjects_string() ) ) @@ -160,7 +160,7 @@ def assert_create_update_delete_permission(f): @functools.wraps(f) def wrapper(request, *args, **kwargs): - gmn.app.auth.assert_create_update_delete_permission(request) + d1_gmn.app.auth.assert_create_update_delete_permission(request) return f(request, *args, **kwargs) return wrapper @@ -177,7 +177,7 @@ def wrapper(request, *args, **kwargs): 0, u'Access allowed only for authenticated subjects. Please reconnect with ' u'a valid DataONE session certificate. active_subjects="{}"'. - format(gmn.app.auth.format_active_subjects(request)) + format(d1_gmn.app.auth.format_active_subjects(request)) ) return f(request, *args, **kwargs) @@ -196,7 +196,7 @@ def wrapper(request, *args, **kwargs): u'Access allowed only for verified accounts. Please reconnect with a ' u'valid DataONE session certificate in which the identity of the ' u'primary subject has been verified. active_subjects="{}"' - .format(gmn.app.auth.format_active_subjects(request)) + .format(d1_gmn.app.auth.format_active_subjects(request)) ) return f(request, *args, **kwargs) @@ -209,7 +209,7 @@ def required_permission(f, level): @functools.wraps(f) def wrapper(request, pid, *args, **kwargs): - gmn.app.auth.assert_allowed(request, level, pid) + d1_gmn.app.auth.assert_allowed(request, level, pid) return f(request, pid, *args, **kwargs) return wrapper @@ -218,16 +218,16 @@ def wrapper(request, pid, *args, **kwargs): def changepermission_permission(f): """Assert that subject has changePermission or high for object. """ - return required_permission(f, gmn.app.auth.CHANGEPERMISSION_LEVEL) + return required_permission(f, d1_gmn.app.auth.CHANGEPERMISSION_LEVEL) def write_permission(f): """Assert that subject has write permission or higher for object. """ - return required_permission(f, gmn.app.auth.WRITE_LEVEL) + return required_permission(f, d1_gmn.app.auth.WRITE_LEVEL) def read_permission(f): """Assert that subject has read permission or higher for object. """ - return required_permission(f, gmn.app.auth.READ_LEVEL) + return required_permission(f, d1_gmn.app.auth.READ_LEVEL) diff --git a/gmn/src/gmn/app/views/diagnostics.py b/gmn/src/d1_gmn/app/views/diagnostics.py similarity index 75% rename from gmn/src/gmn/app/views/diagnostics.py rename to gmn/src/d1_gmn/app/views/diagnostics.py index 46f4ad166..b4bab97ed 100644 --- a/gmn/src/gmn/app/views/diagnostics.py +++ b/gmn/src/d1_gmn/app/views/diagnostics.py @@ -33,24 +33,24 @@ import shutil import urlparse +import d1_gmn.app.auth +import d1_gmn.app.db_filter +import d1_gmn.app.event_log +import d1_gmn.app.models +import d1_gmn.app.node_registry +import d1_gmn.app.psycopg_adapter +import d1_gmn.app.restrict_to_verb +import d1_gmn.app.sysmeta +import d1_gmn.app.util +import d1_gmn.app.views.asserts +import d1_gmn.app.views.create +import d1_gmn.app.views.util + import d1_common.const import d1_common.date_time import d1_common.types.dataoneTypes import d1_common.types.exceptions -import gmn.app.auth -import gmn.app.db_filter -import gmn.app.event_log -import gmn.app.models -import gmn.app.node_registry -import gmn.app.psycopg_adapter -import gmn.app.restrict_to_verb -import gmn.app.sysmeta -import gmn.app.util -import gmn.app.views.asserts -import gmn.app.views.create -import gmn.app.views.util - import django.apps import django.conf from django.db.models import Q @@ -64,7 +64,7 @@ # ------------------------------------------------------------------------------ -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def diagnostics(request): if 'clear_db' in request.GET: delete_all_objects() @@ -82,11 +82,11 @@ def diagnostics(request): # ------------------------------------------------------------------------------ -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def get_replication_queue(request): - q = gmn.app.models.ReplicationQueue.objects.all() + q = d1_gmn.app.models.ReplicationQueue.objects.all() if 'excludecompleted' in request.GET: - q = gmn.app.models.ReplicationQueue.objects.filter( + q = d1_gmn.app.models.ReplicationQueue.objects.filter( ~Q(local_replica__info__status__status='completed') ) return render_to_response( @@ -96,12 +96,12 @@ def get_replication_queue(request): # noinspection PyUnusedLocal -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def clear_replication_queue(request): - for rep_queue_model in gmn.app.models.ReplicationQueue.objects.filter( + for rep_queue_model in d1_gmn.app.models.ReplicationQueue.objects.filter( local_replica__info__status__status='queued' ): - gmn.app.models.IdNamespace.objects.filter( + d1_gmn.app.models.IdNamespace.objects.filter( did=rep_queue_model.local_replica.pid.did ).delete() return redirect('diag') @@ -112,7 +112,7 @@ def clear_replication_queue(request): # ------------------------------------------------------------------------------ -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def echo_session(request): return render_to_response( 'echo_session.xhtml', {'subjects': sorted(request.all_subjects_set)}, @@ -121,27 +121,27 @@ def echo_session(request): # noinspection PyUnusedLocal -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def trusted_subjects(request): return render_to_response( 'trusted_subjects.xhtml', { 'subjects': sorted( - gmn.app.node_registry.get_cn_subjects() | + d1_gmn.app.node_registry.get_cn_subjects() | django.conf.settings.DATAONE_TRUSTED_SUBJECTS ) }, content_type=d1_common.const.CONTENT_TYPE_XHTML ) -@gmn.app.restrict_to_verb.post +@d1_gmn.app.restrict_to_verb.post def whitelist_subject(request): """Add a subject to the whitelist""" - subject_model = gmn.app.models.subject(request.POST['subject']) - whitelist_model = gmn.app.models.WhitelistForCreateUpdateDelete() + subject_model = d1_gmn.app.models.subject(request.POST['subject']) + whitelist_model = d1_gmn.app.models.WhitelistForCreateUpdateDelete() whitelist_model.subject = subject_model whitelist_model.save() - return gmn.app.views.util.http_response_with_boolean_true_type() + return d1_gmn.app.views.util.http_response_with_boolean_true_type() # ------------------------------------------------------------------------------ @@ -151,42 +151,44 @@ def whitelist_subject(request): def create(request, pid): """Minimal version of create() used for inserting test objects.""" - sysmeta_pyxb = gmn.app.views.util.deserialize(request.FILES['sysmeta']) - gmn.app.views.create.create(request, sysmeta_pyxb) - return gmn.app.views.util.http_response_with_boolean_true_type() + sysmeta_pyxb = d1_gmn.app.views.util.deserialize(request.FILES['sysmeta']) + d1_gmn.app.views.create.create(request, sysmeta_pyxb) + return d1_gmn.app.views.util.http_response_with_boolean_true_type() # noinspection PyUnusedLocal -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def slash(request, p1, p2, p3): """Correctly handles arguments separated by slashes""" return render_to_response('test_slash.html', {'p1': p1, 'p2': p2, 'p3': p3}) # noinspection PyUnusedLocal -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def exception(request, exception_type): """Correctly catches and serializes exceptions raised by views""" if exception_type == 'python': raise Exception("Test Python Exception") elif exception_type == 'dataone': raise d1_common.types.exceptions.InvalidRequest(0, 'Test DataONE Exception') - return gmn.app.views.util.http_response_with_boolean_true_type() + return d1_gmn.app.views.util.http_response_with_boolean_true_type() -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def echo_request_object(request): pp = pprint.PrettyPrinter(indent=2) return HttpResponse(u'
{}
'.format(cgi.escape(pp.pformat(request)))) -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def object_permissions(request, pid): - gmn.app.views.asserts.is_pid_of_existing_object(pid) + d1_gmn.app.views.asserts.is_pid_of_existing_object(pid) subjects = [] - permissions = gmn.app.models.Permission.objects.filter(sciobj__pid__did=pid) + permissions = d1_gmn.app.models.Permission.objects.filter( + sciobj__pid__did=pid + ) for permission in permissions: - action = gmn.app.auth.LEVEL_ACTION_MAP[permission.level] + action = d1_gmn.app.auth.LEVEL_ACTION_MAP[permission.level] subjects.append((permission.subject.subject, action)) return render_to_response( 'object_permissions.xhtml', @@ -195,7 +197,7 @@ def object_permissions(request, pid): # noinspection PyUnusedLocal -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def get_setting(request, setting_str): """Get a value from django.conf.settings.py or settings.py""" setting_obj = getattr(django.conf.settings, setting_str, '') @@ -216,10 +218,10 @@ def echo_raw_post_data(request): # noinspection PyUnusedLocal -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def delete_all_objects_view(request): delete_all_objects() - return gmn.app.views.util.http_response_with_boolean_true_type() + return d1_gmn.app.views.util.http_response_with_boolean_true_type() def delete_all_objects(): @@ -248,14 +250,14 @@ def _clear_db(): def _delete_all_sciobj_files(): if os.path.exists(django.conf.settings.OBJECT_STORE_PATH): shutil.rmtree(django.conf.settings.OBJECT_STORE_PATH) - gmn.app.util.create_missing_directories( + d1_gmn.app.util.create_missing_directories( django.conf.settings.OBJECT_STORE_PATH ) def _delete_subjects_and_permissions(): - gmn.app.models.Permission.objects.all().delete() - gmn.app.models.Subject.objects.all().delete() + d1_gmn.app.models.Permission.objects.all().delete() + d1_gmn.app.models.Subject.objects.all().delete() def _delete_object_from_filesystem(sci_obj): @@ -263,7 +265,7 @@ def _delete_object_from_filesystem(sci_obj): pid = sci_obj.pid.did url_split = urlparse.urlparse(sci_obj.url) if url_split.scheme == 'file': - sci_obj_path = gmn.app.util.sciobj_file_path(pid) + sci_obj_path = d1_gmn.app.util.sciobj_file_path(pid) try: os.unlink(sci_obj_path) except EnvironmentError: @@ -278,16 +280,16 @@ def _delete_object_from_filesystem(sci_obj): # noinspection PyUnusedLocal def delete_event_log(request): - gmn.app.models.Event.objects.all().delete() - gmn.app.models.IpAddress.objects.all().delete() - gmn.app.models.UserAgent.objects.all().delete() - gmn.app.models.EventLog.objects.all().delete() - return gmn.app.views.util.http_response_with_boolean_true_type() + d1_gmn.app.models.Event.objects.all().delete() + d1_gmn.app.models.IpAddress.objects.all().delete() + d1_gmn.app.models.UserAgent.objects.all().delete() + d1_gmn.app.models.EventLog.objects.all().delete() + return d1_gmn.app.views.util.http_response_with_boolean_true_type() -@gmn.app.restrict_to_verb.post +@d1_gmn.app.restrict_to_verb.post def inject_fictional_event_log(request): - gmn.app.views.asserts.post_has_mime_parts(request, (('file', 'csv'),)) + d1_gmn.app.views.asserts.post_has_mime_parts(request, (('file', 'csv'),)) # Create event log entries. csv_reader = csv.reader(request.FILES['csv']) @@ -310,8 +312,8 @@ def inject_fictional_event_log(request): } # noinspection PyProtectedMember - gmn.app.event_log._log( + d1_gmn.app.event_log._log( pid, request, event, d1_common.date_time.strip_timezone(timestamp) ) - return gmn.app.views.util.http_response_with_boolean_true_type() + return d1_gmn.app.views.util.http_response_with_boolean_true_type() diff --git a/gmn/src/gmn/app/views/external.py b/gmn/src/d1_gmn/app/views/external.py similarity index 64% rename from gmn/src/gmn/app/views/external.py rename to gmn/src/d1_gmn/app/views/external.py index 365dd930c..033ea2149 100644 --- a/gmn/src/gmn/app/views/external.py +++ b/gmn/src/d1_gmn/app/views/external.py @@ -30,6 +30,22 @@ import requests +import d1_gmn.app.auth +import d1_gmn.app.db_filter +import d1_gmn.app.event_log +import d1_gmn.app.local_replica +import d1_gmn.app.models +import d1_gmn.app.node +import d1_gmn.app.psycopg_adapter +import d1_gmn.app.restrict_to_verb +import d1_gmn.app.revision +import d1_gmn.app.sysmeta +import d1_gmn.app.util +import d1_gmn.app.views.asserts +import d1_gmn.app.views.create +import d1_gmn.app.views.decorators +import d1_gmn.app.views.util + import d1_common.checksum import d1_common.const import d1_common.date_time @@ -39,22 +55,6 @@ import d1_client.cnclient import d1_client.object_format_info -import gmn.app.auth -import gmn.app.db_filter -import gmn.app.event_log -import gmn.app.local_replica -import gmn.app.models -import gmn.app.node -import gmn.app.psycopg_adapter -import gmn.app.restrict_to_verb -import gmn.app.revision -import gmn.app.sysmeta -import gmn.app.util -import gmn.app.views.asserts -import gmn.app.views.create -import gmn.app.views.decorators -import gmn.app.views.util - import django.conf import django.http import django.utils.http @@ -108,12 +108,12 @@ def dispatch_object_list(request): # Unrestricted access. -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def get_monitor_ping(request): """MNCore.ping() → Boolean """ - response = gmn.app.views.util.http_response_with_boolean_true_type() - gmn.app.views.util.add_http_date_to_response_header( + response = d1_gmn.app.views.util.http_response_with_boolean_true_type() + d1_gmn.app.views.util.add_http_date_to_response_header( response, datetime.datetime.utcnow() ) return response @@ -122,42 +122,42 @@ def get_monitor_ping(request): # Anyone can call getLogRecords but only objects to which they have read access # or higher are returned. No access control is applied if called by trusted D1 # infrastructure. -@gmn.app.restrict_to_verb.get -@gmn.app.views.decorators.get_log_records_access +@d1_gmn.app.restrict_to_verb.get +@d1_gmn.app.views.decorators.get_log_records_access def get_log(request): """MNCore.getLogRecords(session[, fromDate][, toDate][, idFilter][, event] [, start=0][, count=1000]) → Log """ - query = gmn.app.models.EventLog.objects.order_by('-timestamp').select_related() - if not gmn.app.auth.is_trusted_subject(request): - query = gmn.app.db_filter.add_access_policy_filter( + query = d1_gmn.app.models.EventLog.objects.order_by('-timestamp').select_related() + if not d1_gmn.app.auth.is_trusted_subject(request): + query = d1_gmn.app.db_filter.add_access_policy_filter( query, request, 'sciobj__id' ) - query = gmn.app.db_filter.add_datetime_filter( + query = d1_gmn.app.db_filter.add_datetime_filter( query, request, 'timestamp', 'fromDate', 'gte' ) - query = gmn.app.db_filter.add_datetime_filter( + query = d1_gmn.app.db_filter.add_datetime_filter( query, request, 'timestamp', 'toDate', 'lt' ) - query = gmn.app.db_filter.add_string_filter( + query = d1_gmn.app.db_filter.add_string_filter( query, request, 'event__event', 'event' ) # Cannot use the resolve_sid decorator here since the SID/PID filter is passed # as a query parameter and the parameter changes names between v1 and v2. - if gmn.app.views.util.is_v1_api(request): + if d1_gmn.app.views.util.is_v1_api(request): id_filter_str = 'pidFilter' - elif gmn.app.views.util.is_v2_api(request): + elif d1_gmn.app.views.util.is_v2_api(request): id_filter_str = 'idFilter' else: assert False, u'Unable to determine API version' # did = request.GET.get('idFilter', None) # if did is not None: - # request.GET[id_filter_str] = gmn.app.views.asserts.resolve_sid_func(did) - query = gmn.app.db_filter.add_string_begins_with_filter( + # request.GET[id_filter_str] = d1_gmn.app.views.asserts.resolve_sid_func(did) + query = d1_gmn.app.db_filter.add_string_begins_with_filter( query, request, 'sciobj__pid__did', id_filter_str ) query_unsliced = query - query, start, count = gmn.app.db_filter.add_slice_filter(query, request) + query, start, count = d1_gmn.app.db_filter.add_slice_filter(query, request) return { 'query': query, 'start': start, @@ -168,12 +168,12 @@ def get_log(request): # Unrestricted access. -@gmn.app.restrict_to_verb.get +@d1_gmn.app.restrict_to_verb.get def get_node(request): """MNCore.getCapabilities() → Node """ - major_version_int = 2 if gmn.app.views.util.is_v2_api(request) else 1 - node_pretty_xml = gmn.app.node.get_pretty_xml(major_version_int) + major_version_int = 2 if d1_gmn.app.views.util.is_v2_api(request) else 1 + node_pretty_xml = d1_gmn.app.node.get_pretty_xml(major_version_int) return django.http.HttpResponse( node_pretty_xml, d1_common.const.CONTENT_TYPE_XML ) @@ -201,26 +201,26 @@ def _add_object_properties_to_response_header(response, sciobj): sciobj.checksum_algorithm.checksum_algorithm, sciobj.checksum ) response['DataONE-SerialVersion'] = sciobj.serial_version - gmn.app.views.util.add_http_date_to_response_header( + d1_gmn.app.views.util.add_http_date_to_response_header( response, datetime.datetime.utcnow() ) -@gmn.app.restrict_to_verb.get -@gmn.app.views.decorators.decode_id -@gmn.app.views.decorators.resolve_sid -@gmn.app.views.decorators.read_permission +@d1_gmn.app.restrict_to_verb.get +@d1_gmn.app.views.decorators.decode_id +@d1_gmn.app.views.decorators.resolve_sid +@d1_gmn.app.views.decorators.read_permission def get_object(request, pid): """MNRead.get(session, did) → OctetStream """ - sciobj = gmn.app.models.ScienceObject.objects.get(pid__did=pid) + sciobj = d1_gmn.app.models.ScienceObject.objects.get(pid__did=pid) content_type_str = _content_type_from_format(sciobj.format.format) response = django.http.StreamingHttpResponse( _get_sciobj_iter(sciobj), content_type_str ) _add_object_properties_to_response_header(response, sciobj) # Log the access of this object. - gmn.app.event_log.read(pid, request) + d1_gmn.app.event_log.read(pid, request) # Since the iterator that generates data for StreamingHttpResponse runs # after the view has returned, it is not protected by the implicit transaction # around a request. However, in the unlikely event that a request is made to @@ -231,18 +231,18 @@ def get_object(request, pid): def _get_sciobj_iter(sciobj): - if gmn.app.util.is_proxy_url(sciobj.url): + if d1_gmn.app.util.is_proxy_url(sciobj.url): return _get_sciobj_iter_remote(sciobj.url) else: return _get_sciobj_iter_local(sciobj.pid.did) def _get_sciobj_iter_local(pid): - file_in_path = gmn.app.util.sciobj_file_path(pid) + file_in_path = d1_gmn.app.util.sciobj_file_path(pid) # Can't use "with". sciobj_file = open(file_in_path, 'rb') # Return an iterator that iterates over the raw bytes of the object in chunks. - return gmn.app.util.fixed_chunk_size_iterator(sciobj_file) + return d1_gmn.app.util.fixed_chunk_size_iterator(sciobj_file) def _get_sciobj_iter_remote(url): @@ -261,38 +261,38 @@ def _get_sciobj_iter_remote(url): ) -@gmn.app.restrict_to_verb.get -@gmn.app.views.decorators.decode_id -@gmn.app.views.decorators.resolve_sid -@gmn.app.views.decorators.read_permission +@d1_gmn.app.restrict_to_verb.get +@d1_gmn.app.views.decorators.decode_id +@d1_gmn.app.views.decorators.resolve_sid +@d1_gmn.app.views.decorators.read_permission def get_meta(request, pid): """MNRead.getSystemMetadata(session, pid) → SystemMetadata """ - gmn.app.event_log.read(pid, request) - return gmn.app.views.util.generate_sysmeta_xml_matching_api_version( + d1_gmn.app.event_log.read(pid, request) + return d1_gmn.app.views.util.generate_sysmeta_xml_matching_api_version( request, pid ) -@gmn.app.restrict_to_verb.head -@gmn.app.views.decorators.decode_id -@gmn.app.views.decorators.resolve_sid -@gmn.app.views.decorators.read_permission +@d1_gmn.app.restrict_to_verb.head +@d1_gmn.app.views.decorators.decode_id +@d1_gmn.app.views.decorators.resolve_sid +@d1_gmn.app.views.decorators.read_permission def head_object(request, pid): """MNRead.describe(session, did) → DescribeResponse """ - sciobj = gmn.app.models.ScienceObject.objects.get(pid__did=pid) + sciobj = d1_gmn.app.models.ScienceObject.objects.get(pid__did=pid) response = django.http.HttpResponse() _add_object_properties_to_response_header(response, sciobj) # Log the access of this object. - gmn.app.event_log.read(pid, request) + d1_gmn.app.event_log.read(pid, request) return response -@gmn.app.restrict_to_verb.get -@gmn.app.views.decorators.decode_id -@gmn.app.views.decorators.resolve_sid -@gmn.app.views.decorators.read_permission +@d1_gmn.app.restrict_to_verb.get +@d1_gmn.app.views.decorators.decode_id +@d1_gmn.app.views.decorators.resolve_sid +@d1_gmn.app.views.decorators.read_permission def get_checksum(request, pid): """MNRead.getChecksum(session, did[, checksumAlgorithm]) → Checksum """ @@ -314,21 +314,21 @@ def get_checksum(request, pid): ) ) - sciobj_model = gmn.app.models.ScienceObject.objects.get(pid__did=pid) + sciobj_model = d1_gmn.app.models.ScienceObject.objects.get(pid__did=pid) sciobj_iter = _get_sciobj_iter(sciobj_model) checksum_obj = d1_common.checksum.create_checksum_object_from_iterator( sciobj_iter, algorithm ) # Log the access of this object. # TODO: look into log type other than 'read' - gmn.app.event_log.read(pid, request) + d1_gmn.app.event_log.read(pid, request) return django.http.HttpResponse( checksum_obj.toxml('utf-8'), d1_common.const.CONTENT_TYPE_XML ) -@gmn.app.restrict_to_verb.get -@gmn.app.views.decorators.list_objects_access +@d1_gmn.app.restrict_to_verb.get +@d1_gmn.app.views.decorators.list_objects_access def get_object_list(request): """MNRead.listObjects(session[, fromDate][, toDate][, formatId] [, replicaStatus][, start=0][, count=1000]) → ObjectList @@ -336,22 +336,22 @@ def get_object_list(request): # The ObjectList is returned ordered by modified_timestamp ascending. The # order has been left undefined in the spec, to allow MNs to select what is # optimal for them. - query = gmn.app.models.ScienceObject.objects.order_by('modified_timestamp') + query = d1_gmn.app.models.ScienceObject.objects.order_by('modified_timestamp') #.select_related() - if not gmn.app.auth.is_trusted_subject(request): - query = gmn.app.db_filter.add_access_policy_filter(query, request, 'id') - query = gmn.app.db_filter.add_datetime_filter( + if not d1_gmn.app.auth.is_trusted_subject(request): + query = d1_gmn.app.db_filter.add_access_policy_filter(query, request, 'id') + query = d1_gmn.app.db_filter.add_datetime_filter( query, request, 'modified_timestamp', 'fromDate', 'gte' ) - query = gmn.app.db_filter.add_datetime_filter( + query = d1_gmn.app.db_filter.add_datetime_filter( query, request, 'modified_timestamp', 'toDate', 'lt' ) - query = gmn.app.db_filter.add_string_filter( + query = d1_gmn.app.db_filter.add_string_filter( query, request, 'format__format', 'formatId' ) - query = gmn.app.db_filter.add_replica_filter(query, request) + query = d1_gmn.app.db_filter.add_replica_filter(query, request) query_unsliced = query - query, start, count = gmn.app.db_filter.add_slice_filter(query, request) + query, start, count = d1_gmn.app.db_filter.add_slice_filter(query, request) return { 'query': query, 'start': start, @@ -361,14 +361,14 @@ def get_object_list(request): } -@gmn.app.restrict_to_verb.post -@gmn.app.views.decorators.trusted_permission +@d1_gmn.app.restrict_to_verb.post +@d1_gmn.app.views.decorators.trusted_permission def post_error(request): """MNRead.synchronizationFailed(session, message) """ - gmn.app.views.asserts.post_has_mime_parts(request, (('file', 'message'),)) + d1_gmn.app.views.asserts.post_has_mime_parts(request, (('file', 'message'),)) try: - synchronization_failed = gmn.app.views.util.deserialize( + synchronization_failed = d1_gmn.app.views.util.deserialize( request.FILES['message'] ) except d1_common.types.exceptions.DataONEException as e: @@ -378,7 +378,7 @@ def post_error(request): u'Received notification of synchronization error from CN but was unable ' u'to deserialize the DataONE Exception passed by the CN. ' u'message="{}" error="{}"'.format( - gmn.app.views.util.read_utf8_xml(request.FILES['message']), str(e) + d1_gmn.app.views.util.read_utf8_xml(request.FILES['message']), str(e) ) ) else: @@ -386,24 +386,24 @@ def post_error(request): u'Received notification of synchronization error from CN:\n{}'. format(str(synchronization_failed)) ) - return gmn.app.views.util.http_response_with_boolean_true_type() + return d1_gmn.app.views.util.http_response_with_boolean_true_type() # Access control is performed within function. -@gmn.app.restrict_to_verb.get -@gmn.app.views.decorators.decode_id -@gmn.app.views.decorators.resolve_sid +@d1_gmn.app.restrict_to_verb.get +@d1_gmn.app.views.decorators.decode_id +@d1_gmn.app.views.decorators.resolve_sid def get_replica(request, pid): """MNReplication.getReplica(session, did) → OctetStream """ _assert_node_is_authorized(request, pid) - sciobj = gmn.app.models.ScienceObject.objects.get(pid__did=pid) + sciobj = d1_gmn.app.models.ScienceObject.objects.get(pid__did=pid) response = django.http.HttpResponse() _add_object_properties_to_response_header(response, sciobj) response._container = _get_sciobj_iter(sciobj) response._is_str = False # Log the replication of this object. - gmn.app.event_log.replicate(pid, request) + d1_gmn.app.event_log.replicate(pid, request) return response @@ -429,7 +429,7 @@ def _assert_node_is_authorized(request, pid): ) -@gmn.app.restrict_to_verb.put +@d1_gmn.app.restrict_to_verb.put # TODO: Check if by update by SID not supported by design def put_meta(request): """MNStorage.updateSystemMetadata(session, pid, sysmeta) → boolean @@ -438,26 +438,26 @@ def put_meta(request): need to clarify what can be modified and what the behavior should be when working with SIDs and chains. """ - gmn.app.util.coerce_put_post(request) - gmn.app.views.asserts.post_has_mime_parts( + d1_gmn.app.util.coerce_put_post(request) + d1_gmn.app.views.asserts.post_has_mime_parts( request, (('field', 'pid'), ('file', 'sysmeta')) ) pid = request.POST['pid'] - gmn.app.auth.assert_allowed(request, gmn.app.auth.WRITE_LEVEL, pid) - gmn.app.views.asserts.is_valid_for_update(pid) - new_sysmeta_pyxb = gmn.app.views.util.deserialize(request.FILES['sysmeta']) - gmn.app.views.asserts.has_matching_modified_timestamp(new_sysmeta_pyxb) - gmn.app.views.util.set_mn_controlled_values( + d1_gmn.app.auth.assert_allowed(request, d1_gmn.app.auth.WRITE_LEVEL, pid) + d1_gmn.app.views.asserts.is_valid_for_update(pid) + new_sysmeta_pyxb = d1_gmn.app.views.util.deserialize(request.FILES['sysmeta']) + d1_gmn.app.views.asserts.has_matching_modified_timestamp(new_sysmeta_pyxb) + d1_gmn.app.views.util.set_mn_controlled_values( request, new_sysmeta_pyxb, update_submitter=False ) - gmn.app.sysmeta.create_or_update(new_sysmeta_pyxb) + d1_gmn.app.sysmeta.create_or_update(new_sysmeta_pyxb) # SID - if gmn.app.revision.has_sid(new_sysmeta_pyxb): - sid = gmn.app.revision.get_sid(new_sysmeta_pyxb) - gmn.app.views.asserts.is_valid_sid_for_chain(pid, sid) - gmn.app.revision.update_sid_to_head_pid_map(pid) - gmn.app.event_log.update(pid, request) - return gmn.app.views.util.http_response_with_boolean_true_type() + if d1_gmn.app.revision.has_sid(new_sysmeta_pyxb): + sid = d1_gmn.app.revision.get_sid(new_sysmeta_pyxb) + d1_gmn.app.views.asserts.is_valid_sid_for_chain(pid, sid) + d1_gmn.app.revision.update_sid_to_head_pid_map(pid) + d1_gmn.app.event_log.update(pid, request) + return d1_gmn.app.views.util.http_response_with_boolean_true_type() # ------------------------------------------------------------------------------ @@ -466,9 +466,9 @@ def put_meta(request): # Unrestricted. -@gmn.app.restrict_to_verb.get -@gmn.app.views.decorators.decode_id -@gmn.app.views.decorators.resolve_sid +@d1_gmn.app.restrict_to_verb.get +@d1_gmn.app.views.decorators.decode_id +@d1_gmn.app.views.decorators.resolve_sid def get_is_authorized(request, pid): """MNAuthorization.isAuthorized(did, action) -> Boolean """ @@ -478,29 +478,29 @@ def get_is_authorized(request, pid): ) # Convert action string to action level. Raises InvalidRequest if the # action string is not valid. - level = gmn.app.auth.action_to_level(request.GET['action']) - gmn.app.auth.assert_allowed(request, level, pid) - return gmn.app.views.util.http_response_with_boolean_true_type() + level = d1_gmn.app.auth.action_to_level(request.GET['action']) + d1_gmn.app.auth.assert_allowed(request, level, pid) + return d1_gmn.app.views.util.http_response_with_boolean_true_type() -@gmn.app.restrict_to_verb.post -@gmn.app.views.decorators.trusted_permission +@d1_gmn.app.restrict_to_verb.post +@d1_gmn.app.views.decorators.trusted_permission def post_refresh_system_metadata(request): """MNStorage.systemMetadataChanged(session, did, serialVersion, dateSysMetaLastModified) → boolean """ - gmn.app.views.asserts.post_has_mime_parts( + d1_gmn.app.views.asserts.post_has_mime_parts( request, (('field', 'pid'), ('field', 'serialVersion'), ('field', 'dateSysMetaLastModified'),) ) - gmn.app.views.asserts.is_pid_of_existing_object(request.POST['pid']) - gmn.app.models.sysmeta_refresh_queue( + d1_gmn.app.views.asserts.is_pid_of_existing_object(request.POST['pid']) + d1_gmn.app.models.sysmeta_refresh_queue( request.POST['pid'], request.POST['serialVersion'], request.POST['dateSysMetaLastModified'], 'queued', ).save() - return gmn.app.views.util.http_response_with_boolean_true_type() + return d1_gmn.app.views.util.http_response_with_boolean_true_type() # ------------------------------------------------------------------------------ @@ -551,45 +551,45 @@ def post_refresh_system_metadata(request): # actual exception is not included. -@gmn.app.restrict_to_verb.post -@gmn.app.views.decorators.assert_create_update_delete_permission +@d1_gmn.app.restrict_to_verb.post +@d1_gmn.app.views.decorators.assert_create_update_delete_permission def post_object_list(request): """MNStorage.create(session, did, object, sysmeta) → Identifier """ - gmn.app.views.asserts.post_has_mime_parts( + d1_gmn.app.views.asserts.post_has_mime_parts( request, (('field', 'pid'), ('file', 'object'), ('file', 'sysmeta')) ) - sysmeta_pyxb = gmn.app.views.util.deserialize(request.FILES['sysmeta']) - gmn.app.views.asserts.obsoletes_not_specified(sysmeta_pyxb) + sysmeta_pyxb = d1_gmn.app.views.util.deserialize(request.FILES['sysmeta']) + d1_gmn.app.views.asserts.obsoletes_not_specified(sysmeta_pyxb) new_pid = request.POST['pid'] - gmn.app.views.asserts.is_unused(new_pid) - sid = gmn.app.revision.get_sid(sysmeta_pyxb) - # if gmn.app.sysmeta_revision.has_sid(sysmeta_pyxb): + d1_gmn.app.views.asserts.is_unused(new_pid) + sid = d1_gmn.app.revision.get_sid(sysmeta_pyxb) + # if d1_gmn.app.sysmeta_revision.has_sid(sysmeta_pyxb): if sid: - gmn.app.views.asserts.is_unused(sid) + d1_gmn.app.views.asserts.is_unused(sid) _create(request, sysmeta_pyxb, new_pid) - gmn.app.revision.create_chain(sid, new_pid) + d1_gmn.app.revision.create_chain(sid, new_pid) return new_pid -@gmn.app.restrict_to_verb.put -@gmn.app.views.decorators.decode_id +@d1_gmn.app.restrict_to_verb.put +@d1_gmn.app.views.decorators.decode_id # TODO: Update by SID not supported. Check if by design -# @gmn.app.views.decorators.resolve_sid -@gmn.app.views.decorators.write_permission # OLD object +# @d1_gmn.app.views.decorators.resolve_sid +@d1_gmn.app.views.decorators.write_permission # OLD object def put_object(request, old_pid): """MNStorage.update(session, pid, object, newPid, sysmeta) → Identifier """ if django.conf.settings.REQUIRE_WHITELIST_FOR_UPDATE: - gmn.app.auth.assert_create_update_delete_permission(request) - gmn.app.util.coerce_put_post(request) - gmn.app.views.asserts.post_has_mime_parts( + d1_gmn.app.auth.assert_create_update_delete_permission(request) + d1_gmn.app.util.coerce_put_post(request) + d1_gmn.app.views.asserts.post_has_mime_parts( request, (('field', 'newPid'), ('file', 'object'), ('file', 'sysmeta')) ) - gmn.app.views.asserts.is_valid_for_update(old_pid) - gmn.app.views.asserts.is_not_obsoleted(old_pid) - sysmeta_pyxb = gmn.app.views.util.deserialize(request.FILES['sysmeta']) - gmn.app.views.asserts.obsoletes_matches_pid_if_specified( + d1_gmn.app.views.asserts.is_valid_for_update(old_pid) + d1_gmn.app.views.asserts.is_not_obsoleted(old_pid) + sysmeta_pyxb = d1_gmn.app.views.util.deserialize(request.FILES['sysmeta']) + d1_gmn.app.views.asserts.obsoletes_matches_pid_if_specified( sysmeta_pyxb, old_pid ) new_pid = request.POST['newPid'] @@ -597,39 +597,41 @@ def put_object(request, old_pid): _create(request, sysmeta_pyxb, new_pid) # The create event for the new object is added in _create(). The update event # on the old object is added here. - gmn.app.revision.set_revision(old_pid, obsoleted_by_pid=new_pid) + d1_gmn.app.revision.set_revision(old_pid, obsoleted_by_pid=new_pid) # SID - sid = gmn.app.revision.get_sid(sysmeta_pyxb) - gmn.app.views.asserts.is_valid_sid_for_chain(old_pid, sid) - gmn.app.revision.add_pid_to_chain(sid, old_pid, new_pid) - # if gmn.app.sysmeta_revision.has_sid(sysmeta_pyxb): - # sid = gmn.app.sysmeta_revision.get_sid(sysmeta_pyxb) - # gmn.app.sysmeta_revision.update_or_create_sid_to_pid_map(sid, new_pid) + sid = d1_gmn.app.revision.get_sid(sysmeta_pyxb) + d1_gmn.app.views.asserts.is_valid_sid_for_chain(old_pid, sid) + d1_gmn.app.revision.add_pid_to_chain(sid, old_pid, new_pid) + # if d1_gmn.app.sysmeta_revision.has_sid(sysmeta_pyxb): + # sid = d1_gmn.app.sysmeta_revision.get_sid(sysmeta_pyxb) + # d1_gmn.app.sysmeta_revision.update_or_create_sid_to_pid_map(sid, new_pid) - gmn.app.event_log.update(old_pid, request) - gmn.app.sysmeta.update_modified_timestamp(old_pid) + d1_gmn.app.event_log.update(old_pid, request) + d1_gmn.app.sysmeta.update_modified_timestamp(old_pid) return new_pid def _create(request, sysmeta_pyxb, new_pid): - gmn.app.views.asserts.is_unused(new_pid) - gmn.app.views.asserts.does_not_contain_replica_sections(sysmeta_pyxb) - gmn.app.views.asserts.sysmeta_is_not_archived(sysmeta_pyxb) - gmn.app.views.asserts.url_pid_matches_sysmeta(sysmeta_pyxb, new_pid) - gmn.app.views.asserts.obsoleted_by_not_specified(sysmeta_pyxb) - gmn.app.views.asserts.validate_sysmeta_against_uploaded(request, sysmeta_pyxb) - gmn.app.views.util.set_mn_controlled_values(request, sysmeta_pyxb) + d1_gmn.app.views.asserts.is_unused(new_pid) + d1_gmn.app.views.asserts.does_not_contain_replica_sections(sysmeta_pyxb) + d1_gmn.app.views.asserts.sysmeta_is_not_archived(sysmeta_pyxb) + d1_gmn.app.views.asserts.url_pid_matches_sysmeta(sysmeta_pyxb, new_pid) + d1_gmn.app.views.asserts.obsoleted_by_not_specified(sysmeta_pyxb) + d1_gmn.app.views.asserts.validate_sysmeta_against_uploaded( + request, sysmeta_pyxb + ) + d1_gmn.app.views.util.set_mn_controlled_values(request, sysmeta_pyxb) #d1_common.date_time.is_utc(sysmeta_pyxb.dateSysMetadataModified) - gmn.app.views.create.create(request, sysmeta_pyxb) + d1_gmn.app.views.create.create(request, sysmeta_pyxb) # No locking. Public access. -@gmn.app.restrict_to_verb.post +@d1_gmn.app.restrict_to_verb.post def post_generate_identifier(request): """MNStorage.generateIdentifier(session, scheme[, fragment]) → Identifier """ - gmn.app.views.asserts.post_has_mime_parts(request, (('field', 'scheme'),)) + d1_gmn.app.views.asserts.post_has_mime_parts(request, (('field', 'scheme'),)) if request.POST['scheme'] != 'UUID': raise d1_common.types.exceptions.InvalidRequest( 0, u'Only the UUID scheme is currently supported' @@ -637,18 +639,18 @@ def post_generate_identifier(request): fragment = request.POST.get('fragment', None) while True: pid = (fragment if fragment else u'') + uuid.uuid4().hex - if not gmn.app.models.ScienceObject.objects.filter(pid__did=pid).exists(): + if not d1_gmn.app.models.ScienceObject.objects.filter(pid__did=pid).exists(): return pid -@gmn.app.restrict_to_verb.delete -@gmn.app.views.decorators.decode_id -@gmn.app.views.decorators.resolve_sid -@gmn.app.views.decorators.assert_create_update_delete_permission +@d1_gmn.app.restrict_to_verb.delete +@d1_gmn.app.views.decorators.decode_id +@d1_gmn.app.views.decorators.resolve_sid +@d1_gmn.app.views.decorators.assert_create_update_delete_permission def delete_object(request, pid): """MNStorage.delete(session, did) → Identifier """ - sciobj = gmn.app.models.ScienceObject.objects.get(pid__did=pid) + sciobj = d1_gmn.app.models.ScienceObject.objects.get(pid__did=pid) url_split = urlparse.urlparse(sciobj.url) _delete_from_filesystem(url_split, pid) _delete_from_database(pid) @@ -657,7 +659,7 @@ def delete_object(request, pid): def _delete_from_filesystem(url_split, pid): if url_split.scheme == 'file': - sciobj_path = gmn.app.util.sciobj_file_path(pid) + sciobj_path = d1_gmn.app.util.sciobj_file_path(pid) try: os.unlink(sciobj_path) except EnvironmentError: @@ -665,26 +667,26 @@ def _delete_from_filesystem(url_split, pid): def _delete_from_database(pid): - sciobj_model = gmn.app.util.get_sci_model(pid) - if gmn.app.revision.is_in_revision_chain(sciobj_model): - gmn.app.revision.cut_from_chain(sciobj_model) - gmn.app.revision.delete_chain(pid) + sciobj_model = d1_gmn.app.util.get_sci_model(pid) + if d1_gmn.app.revision.is_in_revision_chain(sciobj_model): + d1_gmn.app.revision.cut_from_chain(sciobj_model) + d1_gmn.app.revision.delete_chain(pid) # The models.CASCADE property is set on all ForeignKey fields, so most object # related info is deleted when deleting the IdNamespace "root". - gmn.app.models.IdNamespace.objects.filter(did=pid).delete() - gmn.app.util.delete_unused_subjects() + d1_gmn.app.models.IdNamespace.objects.filter(did=pid).delete() + d1_gmn.app.util.delete_unused_subjects() -@gmn.app.restrict_to_verb.put -@gmn.app.views.decorators.decode_id -@gmn.app.views.decorators.resolve_sid -@gmn.app.views.decorators.write_permission +@d1_gmn.app.restrict_to_verb.put +@d1_gmn.app.views.decorators.decode_id +@d1_gmn.app.views.decorators.resolve_sid +@d1_gmn.app.views.decorators.write_permission def put_archive(request, pid): """MNStorage.archive(session, did) → Identifier """ - gmn.app.views.asserts.is_not_replica(pid) - gmn.app.views.asserts.is_not_archived(pid) - gmn.app.sysmeta.archive_object(pid) + d1_gmn.app.views.asserts.is_not_replica(pid) + d1_gmn.app.views.asserts.is_not_archived(pid) + d1_gmn.app.sysmeta.archive_object(pid) return pid @@ -693,21 +695,21 @@ def put_archive(request, pid): # ------------------------------------------------------------------------------ -@gmn.app.restrict_to_verb.post -@gmn.app.views.decorators.trusted_permission +@d1_gmn.app.restrict_to_verb.post +@d1_gmn.app.views.decorators.trusted_permission def post_replicate(request): """MNReplication.replicate(session, sysmeta, sourceNode) → boolean """ - gmn.app.views.asserts.post_has_mime_parts( + d1_gmn.app.views.asserts.post_has_mime_parts( request, (('field', 'sourceNode'), ('file', 'sysmeta')) ) - sysmeta_pyxb = gmn.app.sysmeta.deserialize(request.FILES['sysmeta']) - gmn.app.local_replica.assert_request_complies_with_replication_policy( + sysmeta_pyxb = d1_gmn.app.sysmeta.deserialize(request.FILES['sysmeta']) + d1_gmn.app.local_replica.assert_request_complies_with_replication_policy( sysmeta_pyxb ) - pid = gmn.app.util.uvalue(sysmeta_pyxb.identifier) - gmn.app.views.asserts.is_unused(pid) - gmn.app.local_replica.add_to_replication_queue( + pid = d1_gmn.app.util.uvalue(sysmeta_pyxb.identifier) + d1_gmn.app.views.asserts.is_unused(pid) + d1_gmn.app.local_replica.add_to_replication_queue( request.POST['sourceNode'], sysmeta_pyxb ) - return gmn.app.views.util.http_response_with_boolean_true_type() + return d1_gmn.app.views.util.http_response_with_boolean_true_type() diff --git a/gmn/src/gmn/app/views/internal.py b/gmn/src/d1_gmn/app/views/internal.py similarity index 78% rename from gmn/src/gmn/app/views/internal.py rename to gmn/src/d1_gmn/app/views/internal.py index 2bafdd0a6..a7717e174 100644 --- a/gmn/src/gmn/app/views/internal.py +++ b/gmn/src/d1_gmn/app/views/internal.py @@ -30,20 +30,20 @@ import os import platform +import d1_gmn.app.auth +import d1_gmn.app.db_filter +import d1_gmn.app.event_log +import d1_gmn.app.models +import d1_gmn.app.psycopg_adapter +import d1_gmn.app.util +import d1_gmn.app.views.asserts +import d1_gmn.app.views.util + import d1_common.const import d1_common.date_time import d1_common.types.dataoneTypes import d1_common.types.exceptions -import gmn.app.auth -import gmn.app.db_filter -import gmn.app.event_log -import gmn.app.models -import gmn.app.psycopg_adapter -import gmn.app.util -import gmn.app.views.asserts -import gmn.app.views.util - import django import django.conf from django.db.models import Avg @@ -58,33 +58,35 @@ def home(request): if request.path.endswith('/'): return HttpResponseRedirect(request.path[:-1]) - gmn_version = gmn.app.__version__ + gmn_version = d1_gmn.app.__version__ django_version = ', '.join(map(str, django.VERSION)) n_science_objects = '{:,}'.format( - gmn.app.models.ScienceObject.objects.count() + d1_gmn.app.models.ScienceObject.objects.count() ) - avg_sci_data_size_bytes = gmn.app.models.ScienceObject.objects.aggregate( + avg_sci_data_size_bytes = d1_gmn.app.models.ScienceObject.objects.aggregate( Avg('size') )['size__avg'] or 0 avg_sci_data_size = '{:,}'.format(int(avg_sci_data_size_bytes)) - n_objects_by_format = gmn.app.models.ScienceObject.objects.values( + n_objects_by_format = d1_gmn.app.models.ScienceObject.objects.values( 'format', 'format__format' ).annotate(dcount=Count('format')) - n_connections_total = '{:,}'.format(gmn.app.models.EventLog.objects.count()) + n_connections_total = '{:,}'.format( + d1_gmn.app.models.EventLog.objects.count() + ) n_connections_in_last_hour = '{:,}'.format( - gmn.app.models.EventLog.objects.filter( + d1_gmn.app.models.EventLog.objects.filter( timestamp__gte=datetime.datetime.utcnow() - datetime.timedelta(hours=1) ).count() ) - n_unique_subjects = '{:,}'.format(gmn.app.models.Subject.objects.count()) + n_unique_subjects = '{:,}'.format(d1_gmn.app.models.Subject.objects.count()) - n_storage_used = gmn.app.models.ScienceObject.objects.aggregate( + n_storage_used = d1_gmn.app.models.ScienceObject.objects.aggregate( Sum('size') )['size__sum'] or 0 n_storage_free = _get_free_space(django.conf.settings.OBJECT_STORE_PATH) @@ -92,7 +94,7 @@ def home(request): n_storage_used / 1024**3, n_storage_free / 1024**3 ) - n_permissions = '{:,}'.format(gmn.app.models.Permission.objects.count()) + n_permissions = '{:,}'.format(d1_gmn.app.models.Permission.objects.count()) server_time = datetime.datetime.utcnow() diff --git a/gmn/src/gmn/app/views/util.py b/gmn/src/d1_gmn/app/views/util.py similarity index 92% rename from gmn/src/gmn/app/views/util.py rename to gmn/src/d1_gmn/app/views/util.py index 3aa1d77fe..c0506c0fc 100644 --- a/gmn/src/gmn/app/views/util.py +++ b/gmn/src/d1_gmn/app/views/util.py @@ -25,6 +25,15 @@ import datetime import re +import d1_gmn.app.auth +import d1_gmn.app.db_filter +import d1_gmn.app.event_log +import d1_gmn.app.models +import d1_gmn.app.psycopg_adapter +import d1_gmn.app.revision +import d1_gmn.app.sysmeta +import d1_gmn.app.util + import d1_common.const import d1_common.date_time import d1_common.type_conversions @@ -35,15 +44,6 @@ import d1_common.url import d1_common.xml -import gmn.app.auth -import gmn.app.db_filter -import gmn.app.event_log -import gmn.app.models -import gmn.app.psycopg_adapter -import gmn.app.revision -import gmn.app.sysmeta -import gmn.app.util - import django.conf import django.core.files.move import django.http @@ -118,8 +118,8 @@ def deserialize(xml_flo): def generate_sysmeta_xml_matching_api_version(request, pid): - sysmeta_pyxb = gmn.app.sysmeta.model_to_pyxb(pid) - sysmeta_xml_str = gmn.app.sysmeta.serialize(sysmeta_pyxb) + sysmeta_pyxb = d1_gmn.app.sysmeta.model_to_pyxb(pid) + sysmeta_xml_str = d1_gmn.app.sysmeta.serialize(sysmeta_pyxb) if is_v1_api(request): sysmeta_xml_str = d1_common.type_conversions.str_to_v1_str(sysmeta_xml_str) elif is_v2_api(request): @@ -156,7 +156,7 @@ def set_mn_controlled_values(request, sysmeta_pyxb, update_submitter=True): override_value = None if is_trusted_from_client: override_value = ( - gmn.app.util.get_value(sysmeta_pyxb, attr_str) + d1_gmn.app.util.get_value(sysmeta_pyxb, attr_str) if is_simple_content else getattr(sysmeta_pyxb, attr_str, None) ) setattr(sysmeta_pyxb, attr_str, override_value or default_value) diff --git a/gmn/src/gmn/deployment/forward_http_to_https.conf b/gmn/src/d1_gmn/deployment/forward_http_to_https.conf similarity index 100% rename from gmn/src/gmn/deployment/forward_http_to_https.conf rename to gmn/src/d1_gmn/deployment/forward_http_to_https.conf diff --git a/gmn/src/gmn/deployment/gmn2-ssl.conf b/gmn/src/d1_gmn/deployment/gmn2-ssl.conf similarity index 100% rename from gmn/src/gmn/deployment/gmn2-ssl.conf rename to gmn/src/d1_gmn/deployment/gmn2-ssl.conf diff --git a/gmn/src/gmn/deployment/httpd b/gmn/src/d1_gmn/deployment/httpd similarity index 100% rename from gmn/src/gmn/deployment/httpd rename to gmn/src/d1_gmn/deployment/httpd diff --git a/gmn/src/gmn/deployment/migrate_v1_to_v2.sh b/gmn/src/d1_gmn/deployment/migrate_v1_to_v2.sh similarity index 100% rename from gmn/src/gmn/deployment/migrate_v1_to_v2.sh rename to gmn/src/d1_gmn/deployment/migrate_v1_to_v2.sh diff --git a/gmn/src/gmn/deployment/openssl.cnf b/gmn/src/d1_gmn/deployment/openssl.cnf similarity index 100% rename from gmn/src/gmn/deployment/openssl.cnf rename to gmn/src/d1_gmn/deployment/openssl.cnf diff --git a/gmn/src/gmn/manage.py b/gmn/src/d1_gmn/manage.py similarity index 75% rename from gmn/src/gmn/manage.py rename to gmn/src/d1_gmn/manage.py index b28c5add2..704d0f969 100755 --- a/gmn/src/gmn/manage.py +++ b/gmn/src/d1_gmn/manage.py @@ -6,7 +6,7 @@ import sys if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gmn.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "d1_gmn.settings") from django.core.management import execute_from_command_line diff --git a/gmn/src/gmn/settings_template.py b/gmn/src/d1_gmn/settings_template.py similarity index 98% rename from gmn/src/gmn/settings_template.py rename to gmn/src/d1_gmn/settings_template.py index 0374f73fa..99c83125d 100644 --- a/gmn/src/gmn/settings_template.py +++ b/gmn/src/d1_gmn/settings_template.py @@ -24,9 +24,9 @@ from __future__ import absolute_import -import d1_common.util # noinspection PyUnresolvedReferences import d1_common.const +import d1_common.util # ============================================================================== # Debugging @@ -522,11 +522,11 @@ MIDDLEWARE_CLASSES = ( # Custom GMN middleware. - 'gmn.app.middleware.request_handler.RequestHandler', - 'gmn.app.middleware.exception_handler.ExceptionHandler', - 'gmn.app.middleware.response_handler.ResponseHandler', - 'gmn.app.middleware.profiling_handler.ProfilingHandler', - 'gmn.app.middleware.view_handler.ViewHandler', + 'd1_gmn.app.middleware.request_handler.RequestHandler', + 'd1_gmn.app.middleware.exception_handler.ExceptionHandler', + 'd1_gmn.app.middleware.response_handler.ResponseHandler', + 'd1_gmn.app.middleware.profiling_handler.ProfilingHandler', + 'd1_gmn.app.middleware.view_handler.ViewHandler', ) TEMPLATES = [ @@ -561,12 +561,12 @@ } } -ROOT_URLCONF = 'gmn.app.urls' +ROOT_URLCONF = 'd1_gmn.app.urls' INSTALLED_APPS = [ 'django.contrib.staticfiles', - 'gmn.app.startup.GMNStartupChecks', - 'gmn.app', + 'd1_gmn.app.startup.GMNStartupChecks', + 'd1_gmn.app', ] # Django uses SECRET_KEY for a number of security related features, such as diff --git a/gmn/src/gmn/settings_test.py b/gmn/src/d1_gmn/settings_test.py similarity index 91% rename from gmn/src/gmn/settings_test.py rename to gmn/src/d1_gmn/settings_test.py index 184b8a13e..154e77169 100644 --- a/gmn/src/gmn/settings_test.py +++ b/gmn/src/d1_gmn/settings_test.py @@ -134,11 +134,11 @@ MIDDLEWARE_CLASSES = ( # Custom GMN middleware. - 'gmn.app.middleware.request_handler.RequestHandler', - 'gmn.app.middleware.exception_handler.ExceptionHandler', - 'gmn.app.middleware.response_handler.ResponseHandler', - 'gmn.app.middleware.profiling_handler.ProfilingHandler', - 'gmn.app.middleware.view_handler.ViewHandler', + 'd1_gmn.app.middleware.request_handler.RequestHandler', + 'd1_gmn.app.middleware.exception_handler.ExceptionHandler', + 'd1_gmn.app.middleware.response_handler.ResponseHandler', + 'd1_gmn.app.middleware.profiling_handler.ProfilingHandler', + 'd1_gmn.app.middleware.view_handler.ViewHandler', ) TEMPLATES = [ @@ -173,12 +173,12 @@ } } -ROOT_URLCONF = 'gmn.app.urls' +ROOT_URLCONF = 'd1_gmn.app.urls' INSTALLED_APPS = [ 'django.contrib.staticfiles', - 'gmn.app.startup.GMNStartupChecks', - 'gmn.app', + 'd1_gmn.app.startup.GMNStartupChecks', + 'd1_gmn.app', ] SECRET_KEY = '' diff --git a/gmn/src/gmn/tests/__init__.py b/gmn/src/d1_gmn/tests/__init__.py similarity index 100% rename from gmn/src/gmn/tests/__init__.py rename to gmn/src/d1_gmn/tests/__init__.py diff --git a/gmn/src/gmn/tests/gmn_mock.py b/gmn/src/d1_gmn/tests/gmn_mock.py similarity index 89% rename from gmn/src/gmn/tests/gmn_mock.py rename to gmn/src/d1_gmn/tests/gmn_mock.py index d076c6283..7915c5e1d 100644 --- a/gmn/src/gmn/tests/gmn_mock.py +++ b/gmn/src/d1_gmn/tests/gmn_mock.py @@ -77,7 +77,7 @@ def active_subjects_context(active_subject_set): expanded_set = expand_subjects(active_subject_set) logging.debug('ContextManager: active_subjects()') with mock.patch( - 'gmn.app.middleware.view_handler.ViewHandler.get_active_subject_set', + 'd1_gmn.app.middleware.view_handler.ViewHandler.get_active_subject_set', return_value=(sorted(expanded_set)[0], expanded_set), ): yield @@ -105,7 +105,7 @@ def trusted_subjects_context(trusted_subject_set): """ logging.debug('ContextManager: trusted_subjects()') with mock.patch( - 'gmn.app.auth.get_trusted_subjects', + 'd1_gmn.app.auth.get_trusted_subjects', return_value=expand_subjects(trusted_subject_set), ): yield @@ -157,15 +157,15 @@ def disable_auth(): subject """ logging.debug('ContextManager: disable_auth()') with mock.patch( - 'gmn.app.middleware.view_handler.ViewHandler.get_active_subject_set', + 'd1_gmn.app.middleware.view_handler.ViewHandler.get_active_subject_set', return_value=('disabled_auth_subj', {'disabled_auth_subj'}), ): with mock.patch( - 'gmn.app.auth.is_trusted_subject', + 'd1_gmn.app.auth.is_trusted_subject', return_value=True, ): with mock.patch( - 'gmn.app.auth.get_trusted_subjects_string', + 'd1_gmn.app.auth.get_trusted_subjects_string', return_value='disabled_auth_subj', ): # try: @@ -189,15 +189,15 @@ def disable_auth(): # def __enter__(self): # logging.debug('ContextManager: disable_auth_CLASS()') # self.p1 = mock.patch( - # 'gmn.app.middleware.view_handler.ViewHandler.get_active_subject_set', + # 'd1_gmn.app.middleware.view_handler.ViewHandler.get_active_subject_set', # return_value=('disabled_auth_subj', {'disabled_auth_subj'}) # ) # self.p2 = mock.patch( - # 'gmn.app.auth.is_trusted_subject', + # 'd1_gmn.app.auth.is_trusted_subject', # return_value=True, # ) # self.p3 = mock.patch( - # 'gmn.app.auth.get_trusted_subjects_string', + # 'd1_gmn.app.auth.get_trusted_subjects_string', # return_value='disabled_auth_subj' # ) # # print('A' * 100) @@ -219,15 +219,15 @@ def disable_auth(): # subject """ # logging.debug('ContextManager: disable_auth()') # with mock.patch( - # 'gmn.app.middleware.view_handler.ViewHandler.get_active_subject_set', + # 'd1_gmn.app.middleware.view_handler.ViewHandler.get_active_subject_set', # return_value=('disabled_auth_subj', {'disabled_auth_subj'}), # ): # with mock.patch( - # 'gmn.app.auth.is_trusted_subject', + # 'd1_gmn.app.auth.is_trusted_subject', # return_value=True, # ): # with mock.patch( - # 'gmn.app.auth.get_trusted_subjects_string', + # 'd1_gmn.app.auth.get_trusted_subjects_string', # return_value='disabled_auth_subj', # ): # try: @@ -247,15 +247,15 @@ def disable_auth(): # subject """ # logging.debug('ContextManager: disable_auth()') # with mock.patch( - # 'gmn.app.middleware.view_handler.ViewHandler.get_active_subject_set', + # 'd1_gmn.app.middleware.view_handler.ViewHandler.get_active_subject_set', # return_value=('disabled_auth_subj', {'disabled_auth_subj'}), # ): # with mock.patch( - # 'gmn.app.auth.is_trusted_subject', + # 'd1_gmn.app.auth.is_trusted_subject', # return_value=True, # ): # with mock.patch( - # 'gmn.app.auth.get_trusted_subjects_string', + # 'd1_gmn.app.auth.get_trusted_subjects_string', # return_value='disabled_auth_subj', # ): # return func(*args, **kwargs) @@ -275,15 +275,15 @@ def disable_auth(): # subject """ # logging.debug('ContextManager: disable_auth()') # with mock.patch( - # 'gmn.app.middleware.view_handler.ViewHandler.get_active_subject_set', + # 'd1_gmn.app.middleware.view_handler.ViewHandler.get_active_subject_set', # return_value=('disabled_auth_subj', {'disabled_auth_subj'}), # ): # with mock.patch( - # 'gmn.app.auth.is_trusted_subject', + # 'd1_gmn.app.auth.is_trusted_subject', # return_value=True, # ): # with mock.patch( - # 'gmn.app.auth.get_trusted_subjects_string', + # 'd1_gmn.app.auth.get_trusted_subjects_string', # return_value='disabled_auth_subj', # ): # yield diff --git a/gmn/src/gmn/tests/gmn_test_case.py b/gmn/src/d1_gmn/tests/gmn_test_case.py similarity index 97% rename from gmn/src/gmn/tests/gmn_test_case.py rename to gmn/src/d1_gmn/tests/gmn_test_case.py index 4a379df19..17a02bdc7 100644 --- a/gmn/src/gmn/tests/gmn_test_case.py +++ b/gmn/src/d1_gmn/tests/gmn_test_case.py @@ -34,6 +34,11 @@ import pytest import requests +import d1_gmn.app +import d1_gmn.app.models +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_client + import d1_common.checksum import d1_common.types import d1_common.types.dataoneTypes @@ -53,11 +58,6 @@ import d1_client.mnclient_2_0 import d1_client.session -import gmn.app -import gmn.app.models -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_client - DEFAULT_PERMISSION_LIST = [ (['subj1'], ['read']), (['subj2', 'subj3', 'subj4'], ['read', 'write']), @@ -94,7 +94,7 @@ def setup_method(self, method): self.client_v2 = d1_client.mnclient_2_0.MemberNodeClient_2_0( d1_test.d1_test_case.MOCK_BASE_URL ) - self.test_client = gmn.tests.gmn_test_client.GMNTestClient( + self.test_client = d1_gmn.tests.gmn_test_client.GMNTestClient( d1_test.d1_test_case.MOCK_BASE_URL ) self.v1 = d1_common.types.dataoneTypes_v1_1 @@ -274,10 +274,10 @@ def convert_to_replica(self, pid): """Convert a local sciobj to a simulated replica by adding a LocalReplica model to it """ - replica_info_model = gmn.app.models.replica_info( + replica_info_model = d1_gmn.app.models.replica_info( 'completed', 'urn:node:testReplicaSource' ) - gmn.app.models.local_replica(pid, replica_info_model) + d1_gmn.app.models.local_replica(pid, replica_info_model) def call_d1_client(self, api_func, *arg_list, **arg_dict): """Issue d1_client calls under a mocked GMN authentication and authorization @@ -304,7 +304,7 @@ def call_d1_client(self, api_func, *arg_list, **arg_dict): trusted_subj_list = arg_dict.pop('trusted_subj_list', True) disable_auth = arg_dict.pop('disable_auth', True) - with gmn.tests.gmn_mock.set_auth_context( + with d1_gmn.tests.gmn_mock.set_auth_context( ['active_subj_1', 'active_subj_2', 'active_subj_3'] if active_subj_list is True else active_subj_list, ['trusted_subj_1', 'trusted_subj_2'] @@ -422,7 +422,7 @@ def generate_access_policy(self, client, permission_list=None): permission_list = DEFAULT_PERMISSION_LIST access_policy_pyxb = client.bindings.accessPolicy() for subject_list, action_list in permission_list: - subject_list = gmn.tests.gmn_mock.expand_subjects(subject_list) + subject_list = d1_gmn.tests.gmn_mock.expand_subjects(subject_list) action_list = list(action_list) access_rule_pyxb = client.bindings.AccessRule() for subject_str in subject_list: @@ -544,7 +544,7 @@ def prep_node_list(self, node_list, tag_str, num_nodes=5): def dump_permissions(self): logging.debug('Permissions:') - for s in gmn.app.models.Permission.objects.all(): + for s in d1_gmn.app.models.Permission.objects.all(): logging.debug(s.sciobj.pid.did) logging.debug(s.subject) logging.debug(s.level) @@ -552,7 +552,7 @@ def dump_permissions(self): def dump_subjects(self): logging.debug('Subjects:') - for s in gmn.app.models.Subject.objects.all(): + for s in d1_gmn.app.models.Subject.objects.all(): logging.debug(' {}'.format(s.subject)) def dump_pyxb(self, type_pyxb): diff --git a/gmn/src/gmn/tests/gmn_test_client.py b/gmn/src/d1_gmn/tests/gmn_test_client.py similarity index 100% rename from gmn/src/gmn/tests/gmn_test_client.py rename to gmn/src/d1_gmn/tests/gmn_test_client.py diff --git a/gmn/src/gmn/tests/my_token_with_groups.txt b/gmn/src/d1_gmn/tests/my_token_with_groups.txt similarity index 100% rename from gmn/src/gmn/tests/my_token_with_groups.txt rename to gmn/src/d1_gmn/tests/my_token_with_groups.txt diff --git a/gmn/src/gmn/tests/test_archive_revision.py b/gmn/src/d1_gmn/tests/test_archive_revision.py similarity index 90% rename from gmn/src/gmn/tests/test_archive_revision.py rename to gmn/src/d1_gmn/tests/test_archive_revision.py index f5ef242fd..90e610ae2 100644 --- a/gmn/src/gmn/tests/test_archive_revision.py +++ b/gmn/src/d1_gmn/tests/test_archive_revision.py @@ -24,15 +24,15 @@ import responses -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case -class TestArchiveRevision(gmn.tests.gmn_test_case.GMNTestCase): +class TestArchiveRevision(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_0010(self, cn_mn_client_v1_v2): """archive(): Archived flag correctly set and represented""" - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): def assert_archived(client, pid): unarchived_sysmeta_pyxb = client.getSystemMetadata(pid) @@ -49,7 +49,7 @@ def assert_archived(client, pid): # archive() is supported on both CNs and MNs. Since this test creates a # revision chain, and create() is only supported on MNs, we use the MN # client to create the objects when testing both CN and MN archive(). - # with gmn.tests.gmn_mock.disable_auth(): + # with d1_gmn.tests.gmn_mock.disable_auth(): base_sid, pid_chain_list = self.create_revision_chain( self.client_v2, chain_len=5, sid=True, disable_auth=False diff --git a/gmn/src/gmn/tests/test_archive_standalone.py b/gmn/src/d1_gmn/tests/test_archive_standalone.py similarity index 88% rename from gmn/src/gmn/tests/test_archive_standalone.py rename to gmn/src/d1_gmn/tests/test_archive_standalone.py index b43fd15b9..2e9c04b9b 100644 --- a/gmn/src/gmn/tests/test_archive_standalone.py +++ b/gmn/src/d1_gmn/tests/test_archive_standalone.py @@ -24,11 +24,11 @@ import responses -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case -class TestArchiveStandalone(gmn.tests.gmn_test_case.GMNTestCase): +class TestArchiveStandalone(d1_gmn.tests.gmn_test_case.GMNTestCase): def _assert_archived_flag_set(self, client): pid, sid, sciobj_str, sysmeta_pyxb = self.create_obj(client) assert not sysmeta_pyxb.archived @@ -38,13 +38,13 @@ def _assert_archived_flag_set(self, client): assert archived_sysmeta_pyxb.archived @responses.activate - @gmn.tests.gmn_mock.disable_auth() + @d1_gmn.tests.gmn_mock.disable_auth() def test_0010_v1(self): """MNStorage.archive(): Archived flag is set in sysmeta""" self._assert_archived_flag_set(self.client_v1) @responses.activate - @gmn.tests.gmn_mock.disable_auth() + @d1_gmn.tests.gmn_mock.disable_auth() def test_0020_v2(self): """MNStorage.archive(): Archived flag is set in sysmeta""" self._assert_archived_flag_set(self.client_v2) diff --git a/gmn/src/gmn/tests/test_cert.py b/gmn/src/d1_gmn/tests/test_cert.py similarity index 85% rename from gmn/src/gmn/tests/test_cert.py rename to gmn/src/d1_gmn/tests/test_cert.py index 2318f0d48..c64b01ca9 100644 --- a/gmn/src/gmn/tests/test_cert.py +++ b/gmn/src/d1_gmn/tests/test_cert.py @@ -23,12 +23,12 @@ import responses -import gmn.app.middleware.session_cert -import gmn.tests.gmn_test_case +import d1_gmn.app.middleware.session_cert +import d1_gmn.tests.gmn_test_case -class TestCert(gmn.tests.gmn_test_case.GMNTestCase): - cert_simple_subject_info_pem = gmn.tests.gmn_test_case.GMNTestCase.read_sample_file( +class TestCert(d1_gmn.tests.gmn_test_case.GMNTestCase): + cert_simple_subject_info_pem = d1_gmn.tests.gmn_test_case.GMNTestCase.read_sample_file( 'cert_with_simple_subject_info.pem' ) @@ -38,7 +38,7 @@ def test_0010(self): perform validation """ primary_str, equivalent_set = ( - gmn.app.middleware.session_cert. + d1_gmn.app.middleware.session_cert. get_authenticated_subjects(self.cert_simple_subject_info_pem) ) assert primary_str == \ diff --git a/gmn/src/gmn/tests/test_create_and_get_revision.py b/gmn/src/d1_gmn/tests/test_create_and_get_revision.py similarity index 94% rename from gmn/src/gmn/tests/test_create_and_get_revision.py rename to gmn/src/d1_gmn/tests/test_create_and_get_revision.py index e93bfcc37..15602c5f1 100644 --- a/gmn/src/gmn/tests/test_create_and_get_revision.py +++ b/gmn/src/d1_gmn/tests/test_create_and_get_revision.py @@ -28,18 +28,18 @@ import pytest import responses +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_test_client + import d1_common.const import d1_common.types.dataoneTypes import d1_common.types.exceptions import d1_common.util import d1_common.xml -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case -import gmn.tests.gmn_test_client - -class TestCreateAndGetRevision(gmn.tests.gmn_test_case.GMNTestCase): +class TestCreateAndGetRevision(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_1010(self): """MNStorage.create(): Creating a standalone object with new PID and SID @@ -133,7 +133,7 @@ def test(client): new_pid, StringIO.StringIO(new_sciobj_str), new_sysmeta_pyxb ) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -152,7 +152,7 @@ def test(client): with pytest.raises(d1_common.types.exceptions.InvalidSystemMetadata): client.create(new_pid, StringIO.StringIO(sciobj_str), sysmeta_pyxb) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -176,7 +176,7 @@ def test(client): new_pid, StringIO.StringIO(new_sciobj_str), new_sysmeta_pyxb ) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -195,6 +195,6 @@ def test(client): with pytest.raises(d1_common.types.exceptions.InvalidSystemMetadata): client.create(new_pid, StringIO.StringIO(sciobj_str), sysmeta_pyxb) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) diff --git a/gmn/src/gmn/tests/test_create_and_get_standalone.py b/gmn/src/d1_gmn/tests/test_create_and_get_standalone.py similarity index 95% rename from gmn/src/gmn/tests/test_create_and_get_standalone.py rename to gmn/src/d1_gmn/tests/test_create_and_get_standalone.py index 5da1702eb..6def3b804 100644 --- a/gmn/src/gmn/tests/test_create_and_get_standalone.py +++ b/gmn/src/d1_gmn/tests/test_create_and_get_standalone.py @@ -28,20 +28,20 @@ import pytest import responses +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_test_client + import d1_common.const import d1_common.types.dataoneTypes import d1_common.types.exceptions import d1_common.util import d1_common.xml -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case -import gmn.tests.gmn_test_client - import django.test -class TestCreateAndGetStandalone(gmn.tests.gmn_test_case.GMNTestCase): +class TestCreateAndGetStandalone(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate @django.test.override_settings( TRUST_CLIENT_SUBMITTER=True, @@ -59,7 +59,7 @@ def test(client): client, now_dt=datetime.datetime(2010, 10, 10, 10, 10, 10) ) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): response = client.get(pid) assert response.headers['content-length'] == str(len(send_sciobj_str)) @@ -68,7 +68,7 @@ def test(client): assert response.headers['dataone-formatid'] == 'application/octet-stream' assert response.headers['last-modified'] == 'Sun, 10 Oct 2010 10:10:10 GMT' - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -80,7 +80,7 @@ def test(client): with pytest.raises(d1_common.types.exceptions.NotFound): client.get(self.random_pid()) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -93,7 +93,7 @@ def test(client): recv_sciobj_str, recv_sysmeta_pyxb = self.get_obj(client, pid) assert sent_sciobj_str == recv_sciobj_str - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) diff --git a/gmn/src/gmn/tests/test_delete_revision.py b/gmn/src/d1_gmn/tests/test_delete_revision.py similarity index 93% rename from gmn/src/gmn/tests/test_delete_revision.py rename to gmn/src/d1_gmn/tests/test_delete_revision.py index e63dc0d09..b4f562d76 100644 --- a/gmn/src/gmn/tests/test_delete_revision.py +++ b/gmn/src/d1_gmn/tests/test_delete_revision.py @@ -28,15 +28,15 @@ import pytest import responses -import d1_common +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case +import d1_common -class TestDeleteRevision(gmn.tests.gmn_test_case.GMNTestCase): +class TestDeleteRevision(d1_gmn.tests.gmn_test_case.GMNTestCase): def assert_delete(self, client, pid, sid, pid_chain_list): - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): # Is retrievable recv_sciobj_str, recv_sysmeta_pyxb = self.get_obj(client, pid) self.assert_sysmeta_pid_and_sid(recv_sysmeta_pyxb, pid, sid) @@ -90,7 +90,7 @@ def test(client, sid=None): # self._test_chain_delete_head(self.client_v2, sid=True) # @responses.activate - # @gmn.tests.gmn_mock.disable_auth + # @d1_gmn.tests.gmn_mock.disable_auth # def test_0020_v2(self): # """MNStorage.delete(): Revision chain without SID, delete head""" # base_sid, pid_chain_list = self.create_revision_chain(self.client_v2, chain_len=5) diff --git a/gmn/src/gmn/tests/test_delete_standalone.py b/gmn/src/d1_gmn/tests/test_delete_standalone.py similarity index 93% rename from gmn/src/gmn/tests/test_delete_standalone.py rename to gmn/src/d1_gmn/tests/test_delete_standalone.py index 9664943be..81bafcfde 100644 --- a/gmn/src/gmn/tests/test_delete_standalone.py +++ b/gmn/src/d1_gmn/tests/test_delete_standalone.py @@ -28,18 +28,18 @@ import pytest import responses +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case + import d1_common.types.exceptions import d1_common.util import d1_common.xml -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case - -class TestDeleteStandalone(gmn.tests.gmn_test_case.GMNTestCase): +class TestDeleteStandalone(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def _assert_delete(self, client, sid=None): - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): pid, sid, send_sciobj_str, send_sysmeta_pyxb = ( self.create_obj(client, sid=sid) ) diff --git a/gmn/src/gmn/tests/test_describe.py b/gmn/src/d1_gmn/tests/test_describe.py similarity index 88% rename from gmn/src/gmn/tests/test_describe.py rename to gmn/src/d1_gmn/tests/test_describe.py index dc1058d7b..f2961dc9b 100644 --- a/gmn/src/gmn/tests/test_describe.py +++ b/gmn/src/d1_gmn/tests/test_describe.py @@ -24,11 +24,11 @@ import responses -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case -class TestDescribe(gmn.tests.gmn_test_case.GMNTestCase): +class TestDescribe(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_1290_v1(self): """MNStorage.describe(): Returns valid header for valid object""" @@ -41,6 +41,6 @@ def test(client): assert 'last-modified' in info assert 'dataone-checksum' in info - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) diff --git a/gmn/src/gmn/tests/test_generate_identifier.py b/gmn/src/d1_gmn/tests/test_generate_identifier.py similarity index 88% rename from gmn/src/gmn/tests/test_generate_identifier.py rename to gmn/src/d1_gmn/tests/test_generate_identifier.py index df937250b..3d016bdbe 100644 --- a/gmn/src/gmn/tests/test_generate_identifier.py +++ b/gmn/src/d1_gmn/tests/test_generate_identifier.py @@ -25,11 +25,11 @@ import responses -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case -class TestGenerateIdentifier(gmn.tests.gmn_test_case.GMNTestCase): +class TestGenerateIdentifier(d1_gmn.tests.gmn_test_case.GMNTestCase): def _generate_identifier(self, client): fragment = 'test_fragment' identifier = client.generateIdentifier('UUID', fragment) @@ -46,7 +46,7 @@ def test_01(self): def test(client): self._generate_identifier(client) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -61,6 +61,6 @@ def test(client): pid2 = self._generate_identifier(client) assert pid1 != pid2 - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) diff --git a/gmn/src/gmn/tests/test_get_capabilities.py b/gmn/src/d1_gmn/tests/test_get_capabilities.py similarity index 87% rename from gmn/src/gmn/tests/test_get_capabilities.py rename to gmn/src/d1_gmn/tests/test_get_capabilities.py index 7e91c4d6f..769734961 100644 --- a/gmn/src/gmn/tests/test_get_capabilities.py +++ b/gmn/src/d1_gmn/tests/test_get_capabilities.py @@ -25,11 +25,11 @@ import responses -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case -class TestGetCapabilities(gmn.tests.gmn_test_case.GMNTestCase): +class TestGetCapabilities(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_1850_v1(self): """MNCore.getCapabilities(): Returns a valid Node Registry document""" @@ -38,6 +38,6 @@ def test(client): node = client.getCapabilities() assert isinstance(node, client.bindings.Node) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) diff --git a/gmn/src/gmn/tests/test_get_checksum.py b/gmn/src/d1_gmn/tests/test_get_checksum.py similarity index 90% rename from gmn/src/gmn/tests/test_get_checksum.py rename to gmn/src/d1_gmn/tests/test_get_checksum.py index 213d14b40..f91cc287e 100644 --- a/gmn/src/gmn/tests/test_get_checksum.py +++ b/gmn/src/d1_gmn/tests/test_get_checksum.py @@ -27,16 +27,16 @@ import pytest import responses +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case + import d1_common.checksum import d1_common.types import d1_common.types.exceptions import d1_common.util -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case - -class TestGetChecksum(gmn.tests.gmn_test_case.GMNTestCase): +class TestGetChecksum(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_1010(self): """MNRead.getChecksum(): Matching checksums""" @@ -50,7 +50,7 @@ def test(client): ) self.assert_checksums_equal(send_checksum_pyxb, recv_checksum_pyxb) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -72,7 +72,7 @@ def test(client, algorithm_str): send_sysmeta_pyxb.checksum, recv_checksum ) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1, 'MD5') test(self.client_v1, 'SHA-1') test(self.client_v2, 'MD5') @@ -87,7 +87,7 @@ def test(client): with pytest.raises(d1_common.types.exceptions.InvalidRequest): client.getChecksum(pid, 'INVALID_ALGORITHM') - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -99,6 +99,6 @@ def test(client): with pytest.raises(d1_common.types.exceptions.NotFound): client.getChecksum('INVALID_PID') - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) diff --git a/gmn/src/gmn/tests/test_get_log_records.py b/gmn/src/d1_gmn/tests/test_get_log_records.py similarity index 98% rename from gmn/src/gmn/tests/test_get_log_records.py rename to gmn/src/d1_gmn/tests/test_get_log_records.py index 4bcd96911..c2f298e6c 100644 --- a/gmn/src/gmn/tests/test_get_log_records.py +++ b/gmn/src/d1_gmn/tests/test_get_log_records.py @@ -24,15 +24,15 @@ import responses +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case + import d1_test.d1_test_case import d1_test.instance_generator.system_metadata -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case - @d1_test.d1_test_case.reproducible_random_decorator('TestGetLogRecords') -class TestGetLogRecords(gmn.tests.gmn_test_case.GMNTestCase): +class TestGetLogRecords(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_0001(self): """getLogRecords():""" @@ -74,7 +74,7 @@ def test_0001(self): # # # # test(self.client_v1) # - # with gmn.tests.gmn_mock.disable_auth(): + # with d1_gmn.tests.gmn_mock.disable_auth(): # test(self.client_v2) # # # def test_0010(self): diff --git a/gmn/src/gmn/tests/test_get_system_metadata.py b/gmn/src/d1_gmn/tests/test_get_system_metadata.py similarity index 92% rename from gmn/src/gmn/tests/test_get_system_metadata.py rename to gmn/src/d1_gmn/tests/test_get_system_metadata.py index 448cfc96a..3a307f1d0 100644 --- a/gmn/src/gmn/tests/test_get_system_metadata.py +++ b/gmn/src/d1_gmn/tests/test_get_system_metadata.py @@ -27,6 +27,9 @@ import pytest import responses +import d1_gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_test_client + import d1_common.checksum import d1_common.system_metadata import d1_common.types.exceptions @@ -37,11 +40,8 @@ import d1_test.mock_api.django_client import d1_test.mock_api.get -import gmn.tests.gmn_test_case -import gmn.tests.gmn_test_client - -class TestGetSystemMetadata(gmn.tests.gmn_test_case.GMNTestCase): +class TestGetSystemMetadata(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_1000(self): """getSystemMetadata(): Non-existing object raises NotFound""" @@ -50,14 +50,14 @@ def test(client): with pytest.raises(d1_common.types.exceptions.NotFound): client.getSystemMetadata('_invalid_pid_') - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @responses.activate def test_1010(self): """SysMeta: Roundtrip of fully populated System Metadata""" - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): # Prepare fully populated sysmeta orig_sysmeta_pyxb = self.read_xml_file_to_pyxb('systemMetadata_v2_0.xml') pid = self.random_pid() diff --git a/gmn/src/gmn/tests/test_jwt.py b/gmn/src/d1_gmn/tests/test_jwt.py similarity index 86% rename from gmn/src/gmn/tests/test_jwt.py rename to gmn/src/d1_gmn/tests/test_jwt.py index 468ab9acb..0ac476db3 100644 --- a/gmn/src/gmn/tests/test_jwt.py +++ b/gmn/src/d1_gmn/tests/test_jwt.py @@ -25,8 +25,8 @@ import mock import pytest -import gmn.app.middleware.session_jwt -import gmn.tests.gmn_test_case +import d1_gmn.app.middleware.session_jwt +import d1_gmn.tests.gmn_test_case # @django.test.override_settings( @@ -35,16 +35,16 @@ # DATAONE_ROOT='https://cn-stage.test.dataone.org/cn', # ) @pytest.mark.skip('Tests failing because cn certs changed to LE') -class TestJwt(gmn.tests.gmn_test_case.GMNTestCase): +class TestJwt(d1_gmn.tests.gmn_test_case.GMNTestCase): def test_0010(self): """_get_cn_cert() successfully retrieves CN server cert""" - cert_obj = gmn.app.middleware.session_jwt._get_cn_cert() + cert_obj = d1_gmn.app.middleware.session_jwt._get_cn_cert() assert u'cn.dataone.org' in \ [v.value for v in cert_obj.subject] def _parse_test_token(self): jwt_base64 = self.read_sample_file('test_token_2.base64') - return gmn.app.middleware.session_jwt._validate_jwt_and_get_subject_list( + return d1_gmn.app.middleware.session_jwt._validate_jwt_and_get_subject_list( jwt_base64 ) @@ -62,7 +62,7 @@ def test_0030(self): time just before the token expired """ with mock.patch( - 'gmn.app.middleware.session_jwt.jwt.api_jwt.timegm' + 'd1_gmn.app.middleware.session_jwt.jwt.api_jwt.timegm' ) as mock_date: awt_exp_ts = 1475786896 mock_date.return_value = awt_exp_ts - 1 diff --git a/gmn/src/gmn/tests/test_list_objects.py b/gmn/src/d1_gmn/tests/test_list_objects.py similarity index 98% rename from gmn/src/gmn/tests/test_list_objects.py rename to gmn/src/d1_gmn/tests/test_list_objects.py index bc8b0eabc..3262c0a91 100644 --- a/gmn/src/gmn/tests/test_list_objects.py +++ b/gmn/src/d1_gmn/tests/test_list_objects.py @@ -26,18 +26,18 @@ import responses -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case # import d1_common @unittest.skip('TODO') -class TestListObjects(gmn.tests.gmn_test_case.GMNTestCase): +class TestListObjects(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_1010(self): """MNRead.listObjects(): replicaStatus filter""" - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): # Create two objects, one local and one replica local_pid = self.create_obj(self.client_v2)[0] replica_pid = self.create_obj(self.client_v2)[0] diff --git a/gmn/src/gmn/tests/test_objects/10Dappend1.txt b/gmn/src/d1_gmn/tests/test_objects/10Dappend1.txt similarity index 100% rename from gmn/src/gmn/tests/test_objects/10Dappend1.txt rename to gmn/src/d1_gmn/tests/test_objects/10Dappend1.txt diff --git a/gmn/src/gmn/tests/test_objects/10Dappend1.txt.sysmeta b/gmn/src/d1_gmn/tests/test_objects/10Dappend1.txt.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/10Dappend1.txt.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/10Dappend1.txt.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/10Dappend2.txt b/gmn/src/d1_gmn/tests/test_objects/10Dappend2.txt similarity index 100% rename from gmn/src/gmn/tests/test_objects/10Dappend2.txt rename to gmn/src/d1_gmn/tests/test_objects/10Dappend2.txt diff --git a/gmn/src/gmn/tests/test_objects/10Dappend2.txt.sysmeta b/gmn/src/d1_gmn/tests/test_objects/10Dappend2.txt.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/10Dappend2.txt.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/10Dappend2.txt.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/12Cpaup.txt b/gmn/src/d1_gmn/tests/test_objects/12Cpaup.txt similarity index 100% rename from gmn/src/gmn/tests/test_objects/12Cpaup.txt rename to gmn/src/d1_gmn/tests/test_objects/12Cpaup.txt diff --git a/gmn/src/gmn/tests/test_objects/12Cpaup.txt.sysmeta b/gmn/src/d1_gmn/tests/test_objects/12Cpaup.txt.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/12Cpaup.txt.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/12Cpaup.txt.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/15Jmatrix1.txt b/gmn/src/d1_gmn/tests/test_objects/15Jmatrix1.txt similarity index 100% rename from gmn/src/gmn/tests/test_objects/15Jmatrix1.txt rename to gmn/src/d1_gmn/tests/test_objects/15Jmatrix1.txt diff --git a/gmn/src/gmn/tests/test_objects/15Jmatrix1.txt.sysmeta b/gmn/src/d1_gmn/tests/test_objects/15Jmatrix1.txt.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/15Jmatrix1.txt.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/15Jmatrix1.txt.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/15Jmatrix2.txt b/gmn/src/d1_gmn/tests/test_objects/15Jmatrix2.txt similarity index 100% rename from gmn/src/gmn/tests/test_objects/15Jmatrix2.txt rename to gmn/src/d1_gmn/tests/test_objects/15Jmatrix2.txt diff --git a/gmn/src/gmn/tests/test_objects/15Jmatrix2.txt.sysmeta b/gmn/src/d1_gmn/tests/test_objects/15Jmatrix2.txt.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/15Jmatrix2.txt.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/15Jmatrix2.txt.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/15Jmatrix3.txt b/gmn/src/d1_gmn/tests/test_objects/15Jmatrix3.txt similarity index 100% rename from gmn/src/gmn/tests/test_objects/15Jmatrix3.txt rename to gmn/src/d1_gmn/tests/test_objects/15Jmatrix3.txt diff --git a/gmn/src/gmn/tests/test_objects/15Jmatrix3.txt.sysmeta b/gmn/src/d1_gmn/tests/test_objects/15Jmatrix3.txt.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/15Jmatrix3.txt.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/15Jmatrix3.txt.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/15Jmatrix4.txt b/gmn/src/d1_gmn/tests/test_objects/15Jmatrix4.txt similarity index 100% rename from gmn/src/gmn/tests/test_objects/15Jmatrix4.txt rename to gmn/src/d1_gmn/tests/test_objects/15Jmatrix4.txt diff --git a/gmn/src/gmn/tests/test_objects/15Jmatrix4.txt.sysmeta b/gmn/src/d1_gmn/tests/test_objects/15Jmatrix4.txt.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/15Jmatrix4.txt.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/15Jmatrix4.txt.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/26S.nexus b/gmn/src/d1_gmn/tests/test_objects/26S.nexus similarity index 100% rename from gmn/src/gmn/tests/test_objects/26S.nexus rename to gmn/src/d1_gmn/tests/test_objects/26S.nexus diff --git a/gmn/src/gmn/tests/test_objects/26S.nexus.sysmeta b/gmn/src/d1_gmn/tests/test_objects/26S.nexus.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/26S.nexus.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/26S.nexus.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/26S.revised.nexus b/gmn/src/d1_gmn/tests/test_objects/26S.revised.nexus similarity index 100% rename from gmn/src/gmn/tests/test_objects/26S.revised.nexus rename to gmn/src/d1_gmn/tests/test_objects/26S.revised.nexus diff --git a/gmn/src/gmn/tests/test_objects/26S.revised.nexus.sysmeta b/gmn/src/d1_gmn/tests/test_objects/26S.revised.nexus.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/26S.revised.nexus.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/26S.revised.nexus.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/5SLong(for5SShort) b/gmn/src/d1_gmn/tests/test_objects/5SLong(for5SShort) similarity index 100% rename from gmn/src/gmn/tests/test_objects/5SLong(for5SShort) rename to gmn/src/d1_gmn/tests/test_objects/5SLong(for5SShort) diff --git a/gmn/src/gmn/tests/test_objects/5SLong(for5SShort).sysmeta b/gmn/src/d1_gmn/tests/test_objects/5SLong(for5SShort).sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/5SLong(for5SShort).sysmeta rename to gmn/src/d1_gmn/tests/test_objects/5SLong(for5SShort).sysmeta diff --git a/gmn/src/gmn/tests/test_objects/5SLongand5SShort b/gmn/src/d1_gmn/tests/test_objects/5SLongand5SShort similarity index 100% rename from gmn/src/gmn/tests/test_objects/5SLongand5SShort rename to gmn/src/d1_gmn/tests/test_objects/5SLongand5SShort diff --git a/gmn/src/gmn/tests/test_objects/5SLongand5SShort.sysmeta b/gmn/src/d1_gmn/tests/test_objects/5SLongand5SShort.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/5SLongand5SShort.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/5SLongand5SShort.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/5sShortandcpDNA b/gmn/src/d1_gmn/tests/test_objects/5sShortandcpDNA similarity index 100% rename from gmn/src/gmn/tests/test_objects/5sShortandcpDNA rename to gmn/src/d1_gmn/tests/test_objects/5sShortandcpDNA diff --git a/gmn/src/gmn/tests/test_objects/5sShortandcpDNA.sysmeta b/gmn/src/d1_gmn/tests/test_objects/5sShortandcpDNA.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/5sShortandcpDNA.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/5sShortandcpDNA.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/9HNEXUS.txt b/gmn/src/d1_gmn/tests/test_objects/9HNEXUS.txt similarity index 100% rename from gmn/src/gmn/tests/test_objects/9HNEXUS.txt rename to gmn/src/d1_gmn/tests/test_objects/9HNEXUS.txt diff --git a/gmn/src/gmn/tests/test_objects/9HNEXUS.txt.sysmeta b/gmn/src/d1_gmn/tests/test_objects/9HNEXUS.txt.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/9HNEXUS.txt.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/9HNEXUS.txt.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/AnserMatrix.htm b/gmn/src/d1_gmn/tests/test_objects/AnserMatrix.htm similarity index 100% rename from gmn/src/gmn/tests/test_objects/AnserMatrix.htm rename to gmn/src/d1_gmn/tests/test_objects/AnserMatrix.htm diff --git a/gmn/src/gmn/tests/test_objects/AnserMatrix.htm.sysmeta b/gmn/src/d1_gmn/tests/test_objects/AnserMatrix.htm.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/AnserMatrix.htm.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/AnserMatrix.htm.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/Apine28S.nexus b/gmn/src/d1_gmn/tests/test_objects/Apine28S.nexus similarity index 100% rename from gmn/src/gmn/tests/test_objects/Apine28S.nexus rename to gmn/src/d1_gmn/tests/test_objects/Apine28S.nexus diff --git a/gmn/src/gmn/tests/test_objects/Apine28S.nexus.sysmeta b/gmn/src/d1_gmn/tests/test_objects/Apine28S.nexus.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/Apine28S.nexus.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/Apine28S.nexus.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/ApineOPSIN.nexus b/gmn/src/d1_gmn/tests/test_objects/ApineOPSIN.nexus similarity index 100% rename from gmn/src/gmn/tests/test_objects/ApineOPSIN.nexus rename to gmn/src/d1_gmn/tests/test_objects/ApineOPSIN.nexus diff --git a/gmn/src/gmn/tests/test_objects/ApineOPSIN.nexus.sysmeta b/gmn/src/d1_gmn/tests/test_objects/ApineOPSIN.nexus.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/ApineOPSIN.nexus.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/ApineOPSIN.nexus.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/Appendicesfinal.doc b/gmn/src/d1_gmn/tests/test_objects/Appendicesfinal.doc similarity index 100% rename from gmn/src/gmn/tests/test_objects/Appendicesfinal.doc rename to gmn/src/d1_gmn/tests/test_objects/Appendicesfinal.doc diff --git a/gmn/src/gmn/tests/test_objects/Appendicesfinal.doc.sysmeta b/gmn/src/d1_gmn/tests/test_objects/Appendicesfinal.doc.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/Appendicesfinal.doc.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/Appendicesfinal.doc.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/Arthros.nex b/gmn/src/d1_gmn/tests/test_objects/Arthros.nex similarity index 100% rename from gmn/src/gmn/tests/test_objects/Arthros.nex rename to gmn/src/d1_gmn/tests/test_objects/Arthros.nex diff --git a/gmn/src/gmn/tests/test_objects/CaseTDT.xls b/gmn/src/d1_gmn/tests/test_objects/CaseTDT.xls similarity index 100% rename from gmn/src/gmn/tests/test_objects/CaseTDT.xls rename to gmn/src/d1_gmn/tests/test_objects/CaseTDT.xls diff --git a/gmn/src/gmn/tests/test_objects/CaseTDT.xls.sysmeta b/gmn/src/d1_gmn/tests/test_objects/CaseTDT.xls.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/CaseTDT.xls.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/CaseTDT.xls.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/CodemlResults.zip b/gmn/src/d1_gmn/tests/test_objects/CodemlResults.zip similarity index 100% rename from gmn/src/gmn/tests/test_objects/CodemlResults.zip rename to gmn/src/d1_gmn/tests/test_objects/CodemlResults.zip diff --git a/gmn/src/gmn/tests/test_objects/CodemlResults.zip.sysmeta b/gmn/src/d1_gmn/tests/test_objects/CodemlResults.zip.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/CodemlResults.zip.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/CodemlResults.zip.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/Combined_Morocco.xls b/gmn/src/d1_gmn/tests/test_objects/Combined_Morocco.xls similarity index 100% rename from gmn/src/gmn/tests/test_objects/Combined_Morocco.xls rename to gmn/src/d1_gmn/tests/test_objects/Combined_Morocco.xls diff --git a/gmn/src/gmn/tests/test_objects/Combined_Morocco.xls.sysmeta b/gmn/src/d1_gmn/tests/test_objects/Combined_Morocco.xls.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/Combined_Morocco.xls.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/Combined_Morocco.xls.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/DPBG_EnhMethods.pdf b/gmn/src/d1_gmn/tests/test_objects/DPBG_EnhMethods.pdf similarity index 100% rename from gmn/src/gmn/tests/test_objects/DPBG_EnhMethods.pdf rename to gmn/src/d1_gmn/tests/test_objects/DPBG_EnhMethods.pdf diff --git a/gmn/src/gmn/tests/test_objects/DPBG_EnhMethods.pdf.sysmeta b/gmn/src/d1_gmn/tests/test_objects/DPBG_EnhMethods.pdf.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/DPBG_EnhMethods.pdf.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/DPBG_EnhMethods.pdf.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/DPBG_SupplTables.pdf b/gmn/src/d1_gmn/tests/test_objects/DPBG_SupplTables.pdf similarity index 100% rename from gmn/src/gmn/tests/test_objects/DPBG_SupplTables.pdf rename to gmn/src/d1_gmn/tests/test_objects/DPBG_SupplTables.pdf diff --git a/gmn/src/gmn/tests/test_objects/DPBG_SupplTables.pdf.sysmeta b/gmn/src/d1_gmn/tests/test_objects/DPBG_SupplTables.pdf.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/DPBG_SupplTables.pdf.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/DPBG_SupplTables.pdf.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/Drugeffect.xls b/gmn/src/d1_gmn/tests/test_objects/Drugeffect.xls similarity index 100% rename from gmn/src/gmn/tests/test_objects/Drugeffect.xls rename to gmn/src/d1_gmn/tests/test_objects/Drugeffect.xls diff --git a/gmn/src/gmn/tests/test_objects/Drugeffect.xls.sysmeta b/gmn/src/d1_gmn/tests/test_objects/Drugeffect.xls.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/Drugeffect.xls.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/Drugeffect.xls.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/Duputie.etal.MolEcol2009.DryadData.xls b/gmn/src/d1_gmn/tests/test_objects/Duputie.etal.MolEcol2009.DryadData.xls similarity index 100% rename from gmn/src/gmn/tests/test_objects/Duputie.etal.MolEcol2009.DryadData.xls rename to gmn/src/d1_gmn/tests/test_objects/Duputie.etal.MolEcol2009.DryadData.xls diff --git a/gmn/src/gmn/tests/test_objects/Duputie.etal.MolEcol2009.DryadData.xls.sysmeta b/gmn/src/d1_gmn/tests/test_objects/Duputie.etal.MolEcol2009.DryadData.xls.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/Duputie.etal.MolEcol2009.DryadData.xls.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/Duputie.etal.MolEcol2009.DryadData.xls.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/EGFRalleles.zip b/gmn/src/d1_gmn/tests/test_objects/EGFRalleles.zip similarity index 100% rename from gmn/src/gmn/tests/test_objects/EGFRalleles.zip rename to gmn/src/d1_gmn/tests/test_objects/EGFRalleles.zip diff --git a/gmn/src/gmn/tests/test_objects/EGFRalleles.zip.sysmeta b/gmn/src/d1_gmn/tests/test_objects/EGFRalleles.zip.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/EGFRalleles.zip.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/EGFRalleles.zip.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/ExpressiononMetabolite.xls b/gmn/src/d1_gmn/tests/test_objects/ExpressiononMetabolite.xls similarity index 100% rename from gmn/src/gmn/tests/test_objects/ExpressiononMetabolite.xls rename to gmn/src/d1_gmn/tests/test_objects/ExpressiononMetabolite.xls diff --git a/gmn/src/gmn/tests/test_objects/ExpressiononMetabolite.xls.sysmeta b/gmn/src/d1_gmn/tests/test_objects/ExpressiononMetabolite.xls.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/ExpressiononMetabolite.xls.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/ExpressiononMetabolite.xls.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/FigS2_Hsieh.pdf b/gmn/src/d1_gmn/tests/test_objects/FigS2_Hsieh.pdf similarity index 100% rename from gmn/src/gmn/tests/test_objects/FigS2_Hsieh.pdf rename to gmn/src/d1_gmn/tests/test_objects/FigS2_Hsieh.pdf diff --git a/gmn/src/gmn/tests/test_objects/FigS2_Hsieh.pdf.sysmeta b/gmn/src/d1_gmn/tests/test_objects/FigS2_Hsieh.pdf.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/FigS2_Hsieh.pdf.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/FigS2_Hsieh.pdf.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/FigS4_Hsieh.pdf b/gmn/src/d1_gmn/tests/test_objects/FigS4_Hsieh.pdf similarity index 100% rename from gmn/src/gmn/tests/test_objects/FigS4_Hsieh.pdf rename to gmn/src/d1_gmn/tests/test_objects/FigS4_Hsieh.pdf diff --git a/gmn/src/gmn/tests/test_objects/FigS4_Hsieh.pdf.sysmeta b/gmn/src/d1_gmn/tests/test_objects/FigS4_Hsieh.pdf.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/FigS4_Hsieh.pdf.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/FigS4_Hsieh.pdf.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/Fishbein.nexus b/gmn/src/d1_gmn/tests/test_objects/Fishbein.nexus similarity index 100% rename from gmn/src/gmn/tests/test_objects/Fishbein.nexus rename to gmn/src/d1_gmn/tests/test_objects/Fishbein.nexus diff --git a/gmn/src/gmn/tests/test_objects/Fishbein.nexus.sysmeta b/gmn/src/d1_gmn/tests/test_objects/Fishbein.nexus.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/Fishbein.nexus.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/Fishbein.nexus.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/GurgelLSmeans.xls b/gmn/src/d1_gmn/tests/test_objects/GurgelLSmeans.xls similarity index 100% rename from gmn/src/gmn/tests/test_objects/GurgelLSmeans.xls rename to gmn/src/d1_gmn/tests/test_objects/GurgelLSmeans.xls diff --git a/gmn/src/gmn/tests/test_objects/GurgelLSmeans.xls.sysmeta b/gmn/src/d1_gmn/tests/test_objects/GurgelLSmeans.xls.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/GurgelLSmeans.xls.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/GurgelLSmeans.xls.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/GurgelMIAMEcompliance.doc b/gmn/src/d1_gmn/tests/test_objects/GurgelMIAMEcompliance.doc similarity index 100% rename from gmn/src/gmn/tests/test_objects/GurgelMIAMEcompliance.doc rename to gmn/src/d1_gmn/tests/test_objects/GurgelMIAMEcompliance.doc diff --git a/gmn/src/gmn/tests/test_objects/GurgelMIAMEcompliance.doc.sysmeta b/gmn/src/d1_gmn/tests/test_objects/GurgelMIAMEcompliance.doc.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/GurgelMIAMEcompliance.doc.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/GurgelMIAMEcompliance.doc.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/abundances-SCalifornia2003.xls b/gmn/src/d1_gmn/tests/test_objects/abundances-SCalifornia2003.xls similarity index 100% rename from gmn/src/gmn/tests/test_objects/abundances-SCalifornia2003.xls rename to gmn/src/d1_gmn/tests/test_objects/abundances-SCalifornia2003.xls diff --git a/gmn/src/gmn/tests/test_objects/abundances-SCalifornia2003.xls.sysmeta b/gmn/src/d1_gmn/tests/test_objects/abundances-SCalifornia2003.xls.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/abundances-SCalifornia2003.xls.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/abundances-SCalifornia2003.xls.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/anterior1.jpg b/gmn/src/d1_gmn/tests/test_objects/anterior1.jpg similarity index 100% rename from gmn/src/gmn/tests/test_objects/anterior1.jpg rename to gmn/src/d1_gmn/tests/test_objects/anterior1.jpg diff --git a/gmn/src/gmn/tests/test_objects/anterior1.jpg.sysmeta b/gmn/src/d1_gmn/tests/test_objects/anterior1.jpg.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/anterior1.jpg.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/anterior1.jpg.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/anterior2.jpg b/gmn/src/d1_gmn/tests/test_objects/anterior2.jpg similarity index 100% rename from gmn/src/gmn/tests/test_objects/anterior2.jpg rename to gmn/src/d1_gmn/tests/test_objects/anterior2.jpg diff --git a/gmn/src/gmn/tests/test_objects/anterior2.jpg.sysmeta b/gmn/src/d1_gmn/tests/test_objects/anterior2.jpg.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/anterior2.jpg.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/anterior2.jpg.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/baker.HD_matrix b/gmn/src/d1_gmn/tests/test_objects/baker.HD_matrix similarity index 100% rename from gmn/src/gmn/tests/test_objects/baker.HD_matrix rename to gmn/src/d1_gmn/tests/test_objects/baker.HD_matrix diff --git a/gmn/src/gmn/tests/test_objects/baker.HD_matrix.sysmeta b/gmn/src/d1_gmn/tests/test_objects/baker.HD_matrix.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/baker.HD_matrix.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/baker.HD_matrix.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/baum.append.txt b/gmn/src/d1_gmn/tests/test_objects/baum.append.txt similarity index 100% rename from gmn/src/gmn/tests/test_objects/baum.append.txt rename to gmn/src/d1_gmn/tests/test_objects/baum.append.txt diff --git a/gmn/src/gmn/tests/test_objects/baum.append.txt.sysmeta b/gmn/src/d1_gmn/tests/test_objects/baum.append.txt.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/baum.append.txt.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/baum.append.txt.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/brochu.mc b/gmn/src/d1_gmn/tests/test_objects/brochu.mc similarity index 100% rename from gmn/src/gmn/tests/test_objects/brochu.mc rename to gmn/src/d1_gmn/tests/test_objects/brochu.mc diff --git a/gmn/src/gmn/tests/test_objects/brochu.mc.sysmeta b/gmn/src/d1_gmn/tests/test_objects/brochu.mc.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/brochu.mc.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/brochu.mc.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/brownbear.const.xml b/gmn/src/d1_gmn/tests/test_objects/brownbear.const.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/brownbear.const.xml rename to gmn/src/d1_gmn/tests/test_objects/brownbear.const.xml diff --git a/gmn/src/gmn/tests/test_objects/brownbear.const.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/brownbear.const.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/brownbear.const.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/brownbear.const.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/chlorobium.expon.xml b/gmn/src/d1_gmn/tests/test_objects/chlorobium.expon.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/chlorobium.expon.xml rename to gmn/src/d1_gmn/tests/test_objects/chlorobium.expon.xml diff --git a/gmn/src/gmn/tests/test_objects/chlorobium.expon.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/chlorobium.expon.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/chlorobium.expon.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/chlorobium.expon.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/co2.nex b/gmn/src/d1_gmn/tests/test_objects/co2.nex similarity index 100% rename from gmn/src/gmn/tests/test_objects/co2.nex rename to gmn/src/d1_gmn/tests/test_objects/co2.nex diff --git a/gmn/src/gmn/tests/test_objects/co2.nex.sysmeta b/gmn/src/d1_gmn/tests/test_objects/co2.nex.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/co2.nex.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/co2.nex.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/combined.nex b/gmn/src/d1_gmn/tests/test_objects/combined.nex similarity index 100% rename from gmn/src/gmn/tests/test_objects/combined.nex rename to gmn/src/d1_gmn/tests/test_objects/combined.nex diff --git a/gmn/src/gmn/tests/test_objects/combined.nex.sysmeta b/gmn/src/d1_gmn/tests/test_objects/combined.nex.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/combined.nex.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/combined.nex.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/command_files.zip b/gmn/src/d1_gmn/tests/test_objects/command_files.zip similarity index 100% rename from gmn/src/gmn/tests/test_objects/command_files.zip rename to gmn/src/d1_gmn/tests/test_objects/command_files.zip diff --git a/gmn/src/gmn/tests/test_objects/command_files.zip.sysmeta b/gmn/src/d1_gmn/tests/test_objects/command_files.zip.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/command_files.zip.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/command_files.zip.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/consensus_trees.zip b/gmn/src/d1_gmn/tests/test_objects/consensus_trees.zip similarity index 100% rename from gmn/src/gmn/tests/test_objects/consensus_trees.zip rename to gmn/src/d1_gmn/tests/test_objects/consensus_trees.zip diff --git a/gmn/src/gmn/tests/test_objects/consensus_trees.zip.sysmeta b/gmn/src/d1_gmn/tests/test_objects/consensus_trees.zip.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/consensus_trees.zip.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/consensus_trees.zip.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/emerson.app b/gmn/src/d1_gmn/tests/test_objects/emerson.app similarity index 100% rename from gmn/src/gmn/tests/test_objects/emerson.app rename to gmn/src/d1_gmn/tests/test_objects/emerson.app diff --git a/gmn/src/gmn/tests/test_objects/emerson.app.sysmeta b/gmn/src/d1_gmn/tests/test_objects/emerson.app.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/emerson.app.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/emerson.app.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/figure5-reconstruction.jpeg b/gmn/src/d1_gmn/tests/test_objects/figure5-reconstruction.jpeg similarity index 100% rename from gmn/src/gmn/tests/test_objects/figure5-reconstruction.jpeg rename to gmn/src/d1_gmn/tests/test_objects/figure5-reconstruction.jpeg diff --git a/gmn/src/gmn/tests/test_objects/figure5-reconstruction.jpeg.sysmeta b/gmn/src/d1_gmn/tests/test_objects/figure5-reconstruction.jpeg.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/figure5-reconstruction.jpeg.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/figure5-reconstruction.jpeg.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/fitch2.mc b/gmn/src/d1_gmn/tests/test_objects/fitch2.mc similarity index 100% rename from gmn/src/gmn/tests/test_objects/fitch2.mc rename to gmn/src/d1_gmn/tests/test_objects/fitch2.mc diff --git a/gmn/src/gmn/tests/test_objects/fitch2.mc.sysmeta b/gmn/src/d1_gmn/tests/test_objects/fitch2.mc.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/fitch2.mc.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/fitch2.mc.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1031%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1031%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1031%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1031%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1031%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1031%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1031%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1031%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1032%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1032%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1032%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1032%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1032%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1032%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1032%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1032%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1033%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1033%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1033%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1033%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1033%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1033%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1033%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1033%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1034%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1034%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1034%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1034%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1034%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1034%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1034%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1034%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1035%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1035%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1035%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1035%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1035%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1035%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1035%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1035%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1037%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1037%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1037%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1037%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1037%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1037%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1037%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1037%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1042%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1042%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1042%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1042%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1042%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1042%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1042%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1042%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.105%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.105%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.105%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.105%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.105%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.105%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.105%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.105%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.107%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.107%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.107%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.107%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.107%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.107%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.107%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.107%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1071%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1071%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1071%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1071%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1071%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1071%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1071%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1071%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1072%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1072%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1072%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1072%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1072%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1072%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1072%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1072%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1073%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1073%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1073%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1073%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1073%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1073%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1073%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1073%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1074%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1074%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1074%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1074%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1074%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1074%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1074%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1074%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1075%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1075%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1075%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1075%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1075%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1075%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1075%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1075%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1076%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1076%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1076%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1076%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1076%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1076%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1076%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1076%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1088%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1088%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1088%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1088%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1088%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1088%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1088%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1088%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.109%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.109%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.109%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.109%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.109%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.109%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.109%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.109%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1099%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1099%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1099%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1099%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1099%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1099%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1099%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1099%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.110%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.110%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.110%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.110%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.110%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.110%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.110%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.110%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1100%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1100%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1100%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1100%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1100%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1100%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1100%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1100%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1101%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1101%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1101%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1101%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1101%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1101%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1101%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1101%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1102%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1102%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1102%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1102%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1102%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1102%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1102%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1102%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1103%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1103%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1103%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1103%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1103%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1103%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1103%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1103%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.112%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.112%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.112%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.112%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.112%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.112%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.112%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.112%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.113%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.113%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.113%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.113%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.113%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.113%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.113%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.113%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.114%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.114%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.114%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.114%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.114%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.114%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.114%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.114%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.115%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.115%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.115%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.115%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.115%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.115%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.115%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.115%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1160%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1160%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1160%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1160%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1160%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1160%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1160%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1160%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1227%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1227%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1227%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1227%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1227%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1227%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1227%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1227%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1228%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1228%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1228%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1228%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1228%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1228%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1228%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1228%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1232%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1232%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1232%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1232%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1232%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1232%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1232%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1232%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1235%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1235%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1235%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1235%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1235%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1235%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1235%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1235%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1253%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1253%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1253%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1253%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1253%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1253%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1253%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1253%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1254%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1254%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1254%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1254%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1254%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1254%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.1254%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.1254%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.135%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.135%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.135%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.135%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.135%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.135%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.135%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.135%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.139%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.139%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.139%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.139%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.139%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.139%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.139%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.139%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.141%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.141%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.141%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.141%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.141%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.141%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.141%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.141%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.142%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.142%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.142%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.142%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.142%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.142%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.142%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.142%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.167%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.167%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.167%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.167%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.167%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.167%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.167%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.167%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.174%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.174%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.174%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.174%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.174%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.174%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.174%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.174%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.208%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.208%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.208%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.208%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.208%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.208%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.208%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.208%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.209%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.209%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.209%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.209%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.209%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.209%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.209%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.209%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.210%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.210%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.210%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.210%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.210%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.210%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.210%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.210%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.212%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.212%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.212%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.212%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.212%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.212%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.212%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.212%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.215%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.215%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.215%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.215%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.215%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.215%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.215%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.215%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.216%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.216%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.216%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.216%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.216%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.216%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.216%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.216%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.218%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.218%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.218%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.218%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.218%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.218%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.218%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.218%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.31%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.31%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.31%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.31%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.31%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.31%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.31%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.31%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.34%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.34%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.34%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.34%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.34%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.34%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.34%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.34%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.35%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.35%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.35%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.35%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.35%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.35%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.35%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.35%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.632%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.632%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.632%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.632%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.632%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.632%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.632%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.632%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.635%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.635%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.635%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.635%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.635%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.635%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.635%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.635%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.654%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.654%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.654%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.654%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.654%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.654%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.654%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.654%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.669%2Fmets.xml b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.669%2Fmets.xml similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.669%2Fmets.xml rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.669%2Fmets.xml diff --git a/gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.669%2Fmets.xml.sysmeta b/gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.669%2Fmets.xml.sysmeta similarity index 100% rename from gmn/src/gmn/tests/test_objects/hdl:10255%2Fdryad.669%2Fmets.xml.sysmeta rename to gmn/src/d1_gmn/tests/test_objects/hdl:10255%2Fdryad.669%2Fmets.xml.sysmeta diff --git a/gmn/src/gmn/tests/test_proxy_mode.py b/gmn/src/d1_gmn/tests/test_proxy_mode.py similarity index 95% rename from gmn/src/gmn/tests/test_proxy_mode.py rename to gmn/src/d1_gmn/tests/test_proxy_mode.py index 2431386aa..d7b6c70a2 100644 --- a/gmn/src/gmn/tests/test_proxy_mode.py +++ b/gmn/src/d1_gmn/tests/test_proxy_mode.py @@ -30,6 +30,10 @@ import requests import responses +import d1_gmn.app.util +import d1_gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_test_client + import d1_common.type_conversions import d1_common.types.exceptions import d1_common.url @@ -38,12 +42,8 @@ import d1_test.d1_test_case import d1_test.mock_api.get -import gmn.app.util -import gmn.tests.gmn_test_case -import gmn.tests.gmn_test_client - -class TestProxyMode(gmn.tests.gmn_test_case.GMNTestCase): +class TestProxyMode(d1_gmn.tests.gmn_test_case.GMNTestCase): def setup_method(self, method): super(TestProxyMode, self).setup_method(method) d1_test.mock_api.get.add_callback(d1_test.d1_test_case.MOCK_REMOTE_BASE_URL) @@ -57,7 +57,7 @@ def create_and_check_proxy_obj( If {do_redirect} is True, a 302 redirect operation is added. This tests that GMN is able to follow redirects when establishing the proxy stream """ - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): # Create pid = self.random_pid() @@ -83,7 +83,7 @@ def create_and_check_proxy_obj( # Check # Object was not stored locally - sciobj_path = gmn.app.util.sciobj_file_path(pid) + sciobj_path = d1_gmn.app.util.sciobj_file_path(pid) assert not os.path.isfile(sciobj_path) # self.assertEquals(os.path.getsize(sciobj_path), 0) diff --git a/gmn/src/gmn/tests/test_replicate.py b/gmn/src/d1_gmn/tests/test_replicate.py similarity index 94% rename from gmn/src/gmn/tests/test_replicate.py rename to gmn/src/d1_gmn/tests/test_replicate.py index 334950408..c43cb17d7 100644 --- a/gmn/src/gmn/tests/test_replicate.py +++ b/gmn/src/d1_gmn/tests/test_replicate.py @@ -26,15 +26,15 @@ import pytest import responses -import d1_common +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_test_client -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case -import gmn.tests.gmn_test_client +import d1_common @pytest.mark.skip('TODO') -class TestReplicate(gmn.tests.gmn_test_case.GMNTestCase): +class TestReplicate(d1_gmn.tests.gmn_test_case.GMNTestCase): # ---------------------------------------------------------------------------- # MNReplication.replicate() @@ -67,7 +67,7 @@ def test_1910_v1(self): IdentifierNotUnique. Does NOT check if GMN acts on the request and actually performs the replication """ - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): self._test_1910(self.client_v1) @responses.activate diff --git a/gmn/src/gmn/tests/test_revision.py b/gmn/src/d1_gmn/tests/test_revision.py similarity index 79% rename from gmn/src/gmn/tests/test_revision.py rename to gmn/src/d1_gmn/tests/test_revision.py index 90ba5c63b..1357fa25d 100644 --- a/gmn/src/gmn/tests/test_revision.py +++ b/gmn/src/d1_gmn/tests/test_revision.py @@ -17,7 +17,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Test gmn.app.sysmeta_revision module +"""Test d1_gmn.app.sysmeta_revision module """ from __future__ import absolute_import @@ -27,29 +27,29 @@ import responses -import gmn.app.revision -import gmn.app.util -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case +import d1_gmn.app.revision +import d1_gmn.app.util +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case -class TestCutFromChain(gmn.tests.gmn_test_case.GMNTestCase): +class TestCutFromChain(d1_gmn.tests.gmn_test_case.GMNTestCase): def assert_cut_from_chain(self, client, pid, sid, pid_chain_list): - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): # Is retrievable recv_sciobj_str, recv_sysmeta_pyxb = self.get_obj(client, pid) self.assert_sysmeta_pid_and_sid(recv_sysmeta_pyxb, pid, sid) # Is in chain - sciobj_model = gmn.app.util.get_sci_model(pid) - assert gmn.app.revision.is_in_revision_chain(sciobj_model) + sciobj_model = d1_gmn.app.util.get_sci_model(pid) + assert d1_gmn.app.revision.is_in_revision_chain(sciobj_model) # Cut from the chain logging.debug( 'cut_from_chain() pid="{}" chain_len="{}"'. format(sciobj_model.pid.did, len(pid_chain_list)) ) - gmn.app.revision.cut_from_chain(sciobj_model) + d1_gmn.app.revision.cut_from_chain(sciobj_model) # Is no longer in chain - assert not gmn.app.revision.is_in_revision_chain(sciobj_model) + assert not d1_gmn.app.revision.is_in_revision_chain(sciobj_model) # New chain is valid pid_chain_list.remove(pid) self.assert_valid_chain(client, pid_chain_list, sid) @@ -80,8 +80,8 @@ def test(client, sid=None): client, random.choice(pid_chain_list), sid, pid_chain_list ) # Last one now not in chain even though not explicitly cut - sciobj_model = gmn.app.util.get_sci_model(pid_chain_list[0]) - assert not gmn.app.revision.is_in_revision_chain(sciobj_model) + sciobj_model = d1_gmn.app.util.get_sci_model(pid_chain_list[0]) + assert not d1_gmn.app.revision.is_in_revision_chain(sciobj_model) test(self.client_v1) test(self.client_v2) diff --git a/gmn/src/gmn/tests/test_synchronization_failed.py b/gmn/src/d1_gmn/tests/test_synchronization_failed.py similarity index 86% rename from gmn/src/gmn/tests/test_synchronization_failed.py rename to gmn/src/d1_gmn/tests/test_synchronization_failed.py index b5b97fa3d..43ba06846 100644 --- a/gmn/src/gmn/tests/test_synchronization_failed.py +++ b/gmn/src/d1_gmn/tests/test_synchronization_failed.py @@ -26,14 +26,14 @@ import pytest import responses -import d1_common +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_test_client -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case -import gmn.tests.gmn_test_client +import d1_common -class TestSynchronizationFailed(gmn.tests.gmn_test_case.GMNTestCase): +class TestSynchronizationFailed(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_1800(self): """MNRead.synchronizationFailed() with valid error returns 200 OK""" @@ -47,7 +47,7 @@ def test(client): exception = d1_common.types.exceptions.SynchronizationFailed(0, msg, pid) client.synchronizationFailed(exception) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -61,7 +61,8 @@ def test(client): pid = self.random_pid() msg = 'TEST MESSAGE FROM GMN_INTEGRATION_TESTER' exception = d1_common.types.exceptions.SynchronizationFailed(0, msg, pid) - with gmn.tests.gmn_mock.set_auth_context(['unk_subj'], ['trusted_subj']): + with d1_gmn.tests.gmn_mock.set_auth_context(['unk_subj'], + ['trusted_subj']): with pytest.raises(d1_common.types.exceptions.NotAuthorized): client.synchronizationFailed(exception) @@ -79,7 +80,7 @@ class InvalidException(Exception): def serialize(self): return 'INVALID SERIALIZED DATAONE EXCEPTION' - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): result_bool = client.synchronizationFailed(InvalidException()) assert result_bool diff --git a/gmn/src/gmn/tests/test_sysmeta_util.py b/gmn/src/d1_gmn/tests/test_sysmeta_util.py similarity index 75% rename from gmn/src/gmn/tests/test_sysmeta_util.py rename to gmn/src/d1_gmn/tests/test_sysmeta_util.py index b78e15126..05193b046 100644 --- a/gmn/src/gmn/tests/test_sysmeta_util.py +++ b/gmn/src/d1_gmn/tests/test_sysmeta_util.py @@ -17,7 +17,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -'''Test gmn.app.util module +'''Test d1_gmn.app.util module ''' from __future__ import absolute_import @@ -25,14 +25,14 @@ import pytest import responses -import gmn.app.models -import gmn.app.util -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case +import d1_gmn.app.models +import d1_gmn.app.util +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case @pytest.mark.skip('TODO. pytest-django does not support assertQuerysetEqual') -class TestSysmetaUtil(gmn.tests.gmn_test_case.GMNTestCase): +class TestSysmetaUtil(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_0010(self): """delete_unused_subjects()""" @@ -45,26 +45,26 @@ def test(client): 'subj9', 'submitter_subj' ] # In the beginning, there were no subjects - assert gmn.app.models.Subject.objects.count() == 0 + assert d1_gmn.app.models.Subject.objects.count() == 0 # Then the user said, "let there be an object." pid, sid, sciobj_str, sysmeta_pyxb = self.create_obj(client, sid=True) # The user saw that the object was good assert pid == sysmeta_pyxb.identifier.value() # The user separated the objects from the subjects - qs = gmn.app.models.Subject.objects.all().order_by('subject' - ).values('subject') + qs = d1_gmn.app.models.Subject.objects.all().order_by('subject' + ).values('subject') # And called the subjects the subj_list self.assertQuerysetEqual(qs, subj_list, transform=lambda x: x['subject']) # The user then passed special rights to his favoured subject - gmn.app.models.whitelist_for_create_update_delete('rights_holder_subj') + d1_gmn.app.models.whitelist_for_create_update_delete('rights_holder_subj') # But became wrathful and wiped out the object client.delete(pid) # And observed that all the subjects perished, except for his favoured one - qs = gmn.app.models.Subject.objects.all().order_by('subject' - ).values('subject') + qs = d1_gmn.app.models.Subject.objects.all().order_by('subject' + ).values('subject') self.assertQuerysetEqual( qs, ['rights_holder_subj'], transform=lambda x: x['subject'] ) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v2) diff --git a/gmn/src/gmn/tests/test_system_metadata_changed.py b/gmn/src/d1_gmn/tests/test_system_metadata_changed.py similarity index 84% rename from gmn/src/gmn/tests/test_system_metadata_changed.py rename to gmn/src/d1_gmn/tests/test_system_metadata_changed.py index 5f91e302e..d388ce292 100644 --- a/gmn/src/gmn/tests/test_system_metadata_changed.py +++ b/gmn/src/d1_gmn/tests/test_system_metadata_changed.py @@ -26,20 +26,21 @@ import pytest import responses +import d1_gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_test_client + import d1_common import d1_common.date_time -import gmn.tests.gmn_test_case -import gmn.tests.gmn_test_client - -class TestSystemMetadataChanged(gmn.tests.gmn_test_case.GMNTestCase): +class TestSystemMetadataChanged(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_0110(self): """systemMetadataChanged(): Access by untrusted subject raises NotAuthorized""" def test(client): - with gmn.tests.gmn_mock.set_auth_context(['unk_subj'], ['trusted_subj']): + with d1_gmn.tests.gmn_mock.set_auth_context(['unk_subj'], + ['trusted_subj']): with pytest.raises(d1_common.types.exceptions.NotAuthorized): client.systemMetadataChanged('test', 0, d1_common.date_time.utc_now()) @@ -56,7 +57,7 @@ def test(client): '_bogus_pid_', 1, d1_common.date_time.utc_now() ) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -68,6 +69,6 @@ def test(client): pid, sid, sciobj_str, sysmeta_pyxb = self.create_obj(client, sid=True) assert client.systemMetadataChanged(pid, 1, d1_common.date_time.utc_now()) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) diff --git a/gmn/src/gmn/tests/test_trusted_client_overrides.py b/gmn/src/d1_gmn/tests/test_trusted_client_overrides.py similarity index 95% rename from gmn/src/gmn/tests/test_trusted_client_overrides.py rename to gmn/src/d1_gmn/tests/test_trusted_client_overrides.py index d53e7044d..31610b372 100644 --- a/gmn/src/gmn/tests/test_trusted_client_overrides.py +++ b/gmn/src/d1_gmn/tests/test_trusted_client_overrides.py @@ -27,13 +27,13 @@ import responses -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case import django.test -class TestTrustedClientOverrides(gmn.tests.gmn_test_case.GMNTestCase): +class TestTrustedClientOverrides(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def _test_override(self, mn_client_v2): override_list = [ @@ -48,7 +48,7 @@ def _test_override(self, mn_client_v2): (False, 'dateUploaded', datetime.datetime(1981, 1, 1, 1, 1, 1)), ] - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): pid, sid, sciobj_str, send_sysmeta_pyxb = self.generate_sciobj_with_defaults( mn_client_v2, True, sid=True ) diff --git a/gmn/src/gmn/tests/test_unicode.py b/gmn/src/d1_gmn/tests/test_unicode.py similarity index 93% rename from gmn/src/gmn/tests/test_unicode.py rename to gmn/src/d1_gmn/tests/test_unicode.py index 3b62a471f..a0f87a305 100644 --- a/gmn/src/gmn/tests/test_unicode.py +++ b/gmn/src/d1_gmn/tests/test_unicode.py @@ -27,14 +27,14 @@ import pytest import responses +import d1_gmn.tests.gmn_test_case + import d1_common import d1_common.system_metadata -import gmn.tests.gmn_test_case - @pytest.mark.skip('TODO') -class TestUnicode(gmn.tests.gmn_test_case.GMNTestCase): +class TestUnicode(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_0010(self): """Unicode: GMN and libraries handle Unicode correctly""" @@ -58,6 +58,6 @@ def test(client): ) client.delete(pid) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) diff --git a/gmn/src/gmn/tests/test_update_system_metadata.py b/gmn/src/d1_gmn/tests/test_update_system_metadata.py similarity index 92% rename from gmn/src/gmn/tests/test_update_system_metadata.py rename to gmn/src/d1_gmn/tests/test_update_system_metadata.py index 6597b66f6..67e80a3c0 100644 --- a/gmn/src/gmn/tests/test_update_system_metadata.py +++ b/gmn/src/d1_gmn/tests/test_update_system_metadata.py @@ -33,6 +33,10 @@ import pytest import responses +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_test_client + import d1_common.const import d1_common.system_metadata import d1_common.types.dataoneTypes @@ -40,18 +44,14 @@ import d1_common.util import d1_common.xml -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case -import gmn.tests.gmn_test_client - -# @gmn.tests.gmn_mock.trusted_subjects_decorator(['trusted_subj']) @pytest.mark.skip('TODO') -class TestUpdateSystemMetadata(gmn.tests.gmn_test_case.GMNTestCase): +class TestUpdateSystemMetadata(d1_gmn.tests.gmn_test_case.GMNTestCase): # MNStorage.updateSystemMetadata(). Method was added in v2. + # @d1_gmn.tests.gmn_mock.trusted_subjects_decorator(['trusted_subj']) def _update_access_policy(self, pid, permission_list): - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): access_policy_pyxb = self.generate_access_policy(self.v2, permission_list) sciobj_str, sysmeta_pyxb = self.get_obj(self.client_v2, pid) sysmeta_pyxb.accessPolicy = access_policy_pyxb @@ -59,7 +59,7 @@ def _update_access_policy(self, pid, permission_list): self.client_v2.updateSystemMetadata(pid, sysmeta_pyxb) def _get(self, pid, active_subj_list): - with gmn.tests.gmn_mock.set_auth_context( + with d1_gmn.tests.gmn_mock.set_auth_context( active_subj_list, ['trusted_subj'] ): self.client_v2.get(pid) @@ -117,7 +117,7 @@ def test_0110(self): self._get(pid, subject_str) # isAuthorized() raises NotAuthorized for unknown subject - with gmn.tests.gmn_mock.set_auth_context(['unk_subj'], ['trusted_subj']): + with d1_gmn.tests.gmn_mock.set_auth_context(['unk_subj'], ['trusted_subj']): with pytest.raises(d1_common.types.exceptions.NotAuthorized): self.client_v2.isAuthorized(pid, 'read') with pytest.raises(d1_common.types.exceptions.NotAuthorized): @@ -131,13 +131,13 @@ def test_0110(self): # isAuthorized() raises NotAuthorized for known subject with inadequate # permission level - with gmn.tests.gmn_mock.set_auth_context(['subj9'], ['trusted_subj']): + with d1_gmn.tests.gmn_mock.set_auth_context(['subj9'], ['trusted_subj']): with pytest.raises(d1_common.types.exceptions.NotAuthorized): self.client_v2.isAuthorized(pid, 'changePermission') # isAuthorized() returns True for known subject with adequate permission # level - with gmn.tests.gmn_mock.set_auth_context(['subj5'], ['trusted_subj']): + with d1_gmn.tests.gmn_mock.set_auth_context(['subj5'], ['trusted_subj']): assert self.client_v2.isAuthorized(pid, 'changePermission') assert self.client_v2.isAuthorized(pid, 'write') @@ -159,7 +159,7 @@ def test(client): with pytest.raises(d1_common.types.exceptions.InvalidRequest): client.updateSystemMetadata(pid, sysmeta_pyxb) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): # Not relevant for v1 test(self.client_v2) @@ -179,12 +179,12 @@ def test(client): sciobj_str, new_sysmeta_pyxb = self.get_obj(client, pid) assert new_sysmeta_pyxb.rightsHolder.value() == 'newRightsHolder' - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): # Not relevant for v1 test(self.client_v2) @responses.activate - @gmn.tests.gmn_mock.no_client_trust_decorator + @d1_gmn.tests.gmn_mock.no_client_trust_decorator def test_3063(self): """MNStorage.updateSystemMetadata() - Does not change dateUploaded @@ -209,7 +209,7 @@ def test(client): assert new_sysmeta_pyxb.dateSysMetadataModified > \ old_sysmeta_pyxb.dateSysMetadataModified - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): # Not relevant for v1 test(self.client_v2) @@ -231,7 +231,7 @@ def test(client): new_sysmeta_pyxb = client.getSystemMetadata(pid) assert new_sysmeta_pyxb.rightsHolder.value() == random_subject_str - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): # Not relevant for v1 test(self.client_v2) @@ -269,6 +269,6 @@ def test(client): assert d1_common.system_metadata. \ is_equivalent_pyxb(ver3_sysmeta_pyxb, ver4_sysmeta_pyxb) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): # Not relevant for v1 test(self.client_v2) diff --git a/gmn/src/gmn/tests/test_update_with_sid.py b/gmn/src/d1_gmn/tests/test_update_with_sid.py similarity index 97% rename from gmn/src/gmn/tests/test_update_with_sid.py rename to gmn/src/d1_gmn/tests/test_update_with_sid.py index 4bc618b0e..23b933ef1 100644 --- a/gmn/src/gmn/tests/test_update_with_sid.py +++ b/gmn/src/d1_gmn/tests/test_update_with_sid.py @@ -29,17 +29,17 @@ import pytest import responses +import d1_gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_test_client + import d1_common.const import d1_common.types.dataoneTypes import d1_common.types.exceptions import d1_common.util import d1_common.xml -import gmn.tests.gmn_test_case -import gmn.tests.gmn_test_client - -class TestUpdateWithSid(gmn.tests.gmn_test_case.GMNTestCase): +class TestUpdateWithSid(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_1000(self): """MNStorage.update(): Reusing SID when creating two standalone objects diff --git a/gmn/src/gmn/tests/test_update_without_sid.py b/gmn/src/d1_gmn/tests/test_update_without_sid.py similarity index 95% rename from gmn/src/gmn/tests/test_update_without_sid.py rename to gmn/src/d1_gmn/tests/test_update_without_sid.py index e84c76558..3401a6e05 100644 --- a/gmn/src/gmn/tests/test_update_without_sid.py +++ b/gmn/src/d1_gmn/tests/test_update_without_sid.py @@ -32,18 +32,18 @@ import pytest import responses +import d1_gmn.tests.gmn_mock +import d1_gmn.tests.gmn_test_case +import d1_gmn.tests.gmn_test_client + import d1_common.const import d1_common.types.dataoneTypes import d1_common.types.exceptions import d1_common.util import d1_common.xml -import gmn.tests.gmn_mock -import gmn.tests.gmn_test_case -import gmn.tests.gmn_test_client - -class TestUpdateWithoutSid(gmn.tests.gmn_test_case.GMNTestCase): +class TestUpdateWithoutSid(d1_gmn.tests.gmn_test_case.GMNTestCase): @responses.activate def test_0010(self): """update(): Raises NotAuthorized if none of the trusted subjects are @@ -178,7 +178,7 @@ def test(client): assert log.logEntry[0].event == 'create' assert log.logEntry[0].identifier.value() == pid_update - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -204,7 +204,7 @@ def test(client): assert sysmeta_after_update_pyxb.dateUploaded == \ sysmeta_before_update_pyxb.dateUploaded - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -224,7 +224,7 @@ def test(client): client, pid_create, permission_list=None ) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -246,7 +246,7 @@ def test(client): client, old_pid, new_pid=other_pid ) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) @@ -267,6 +267,6 @@ def test(client): with pytest.raises(d1_common.types.exceptions.InvalidSystemMetadata): client.update(old_pid, StringIO.StringIO(sciobj_str), pid, sysmeta_pyxb) - with gmn.tests.gmn_mock.disable_auth(): + with d1_gmn.tests.gmn_mock.disable_auth(): test(self.client_v1) test(self.client_v2) diff --git a/gmn/src/gmn/wsgi.py b/gmn/src/d1_gmn/wsgi.py similarity index 97% rename from gmn/src/gmn/wsgi.py rename to gmn/src/d1_gmn/wsgi.py index 74c9b02ab..cfccac4ad 100644 --- a/gmn/src/gmn/wsgi.py +++ b/gmn/src/d1_gmn/wsgi.py @@ -24,12 +24,13 @@ import sys import d1_common.util + import django.core.handlers.wsgi # Django from django import http from django.utils import datastructures -os.environ['DJANGO_SETTINGS_MODULE'] = 'gmn.settings' +os.environ['DJANGO_SETTINGS_MODULE'] = 'd1_gmn.settings' # Add the service folder to the search path. sys.path.append(d1_common.util.abs_path('.')) diff --git a/lib_client/src/examples/create_science_object.py b/lib_client/src/examples/create_science_object.py index e961c5528..553a73604 100644 --- a/lib_client/src/examples/create_science_object.py +++ b/lib_client/src/examples/create_science_object.py @@ -88,7 +88,7 @@ # Member Node, this can be localhost. MN_BASE_URL = 'http://localhost:8000/' #MN_BASE_URL = 'https://localhost/mn' -#MN_BASE_URL = 'https://gmn.test.dataone.org/mn' +#MN_BASE_URL = 'https://d1_gmn.test.dataone.org/mn' # Paths to the certificate and key to use when creating the object. If the # certificate has the key embedded, the _KEY setting should be set to None. The