dipex 4.34.2__tar.gz → 4.34.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dipex-4.34.2 → dipex-4.34.3}/PKG-INFO +1 -1
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/ad_writer.py +14 -6
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/read_ad_conf_settings.py +5 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/mocks.py +15 -2
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_ad_writer.py +28 -0
- {dipex-4.34.2 → dipex-4.34.3}/pyproject.toml +1 -1
- {dipex-4.34.2 → dipex-4.34.3}/exporters/sql_export/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/exporters/sql_export/gql_lora_cache_async.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/exporters/sql_export/lc_for_jobs_db.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/exporters/sql_export/lora_cache.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/exporters/sql_export/main.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/exporters/sql_export/old_lora_cache.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/exporters/sql_export/sql_export.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/exporters/sql_export/sql_table_defs.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/exporters/sql_export/sql_url.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/exporters/sql_export/trigger.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/exporters/utils/priority_by_class.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/config.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/date_utils.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/employees.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/engagement.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/exceptions.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/fix_departments.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/graphql.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/it_systems.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/main.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/models.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/scripts/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/scripts/fix_status8.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/scripts/generate_org_unit_level_uuid.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sd_changed_at.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sd_changed_at_redo.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sd_cli.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sd_common.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sd_fixup.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sd_importer.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sd_log_analyzer.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sd_payloads.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sd_to_pydantic.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sdclient/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sdclient/client.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sdclient/requests.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sdclient/responses.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/skip.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/sync_job_id.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/test_mo_against_sd.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/test_sd_connectivity.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/fixtures.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/org_manipulations.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/sdclient/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/sdclient/manual.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/sdclient/test_requests.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/sdclient/test_sdclient.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_config.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_date_utils.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_employee.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_engagement.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_fix_departments.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_graphql.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_it_systems.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_sd_changed_at.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_sd_common.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_sd_importer.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_sd_log_analyzer.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_sd_to_pydantic.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_skip.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/tests/test_sync_job_id.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/config.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/initial.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/initial_classes.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/los_files.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/los_import.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/los_leder.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/los_org.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/los_pers.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/los_stam.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/payloads.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/conftest.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/helpers.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/strategies.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/test_config.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/test_initial.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/test_los_files.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/test_los_import.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/test_los_leder.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/test_los_org.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/test_los_pers.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/test_los_stam.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/test_payloads.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/tests/test_util.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/util.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/aarhus/uuids.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/ad_common.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/ad_exceptions.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/ad_fix_enddate.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/ad_jinja_filters.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/ad_life_cycle.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/ad_logger.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/ad_reader.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/ad_sync.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/ad_template_engine.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/ad_templates.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/import_ad_group_into_mo.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/mo_to_ad_sync.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/payloads.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/sync_mo_uuid_to_ad.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/test_connectivity.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/name_simulator.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_ad_common.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_ad_fix_enddate.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_ad_jinja_filters.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_ad_life_cycle.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_ad_logger.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_ad_reader.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_ad_sync.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_dot_mapping.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_first_included.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_import_ad_group_into_mo.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_location_element.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_mo_data_source.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_mo_to_ad_sync.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_morestsource.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_read_ad_conf_settings.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_recursive_dict_update.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_sync_mo_uuid_to_ad.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_usernames.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_utils.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/user_names.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/username_rules/method_2.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/utils.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/adtreesync/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/adtreesync/config.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/adtreesync/ldap.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/adtreesync/main.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/adtreesync/tests/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/adtreesync/tests/test_main.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/apos_importer.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ballerup/ballerup-amqp.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ballerup/ballerup.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/ballerup/udvalg_import.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/br/303/270ndby/br/303/270ndby.py" +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/calculate_primary/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/calculate_primary/calculate_primary.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/calculate_primary/common.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/calculate_primary/default.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/calculate_primary/opus.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/calculate_primary/sd.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/calculate_primary/tests/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/calculate_primary/tests/test_primary.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/cpr_mapper.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/dar_helper/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/dar_helper/dar_helper.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/dawa_helper.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/egedal/egedal.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/fkorg_it_systems/import_fkorg_orgunits.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/fkorg_it_systems/test_import_fk_org.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/gir/initial_read/emd_csv.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/gir/initial_read/main.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/gir/initial_read/mo_lora_client.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/gir/initial_read/org_unit_csv.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/hj/303/270rring/hj/303/270rring.py" +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/holstebro/holstebro.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/kle/__init__.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/kle/kle_import.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/kle/kle_import_export.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/kle/kle_xlsx.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/kle/payloads.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/n/303/246stved/n/303/246stved.py" +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/opus/clear_and_import_opus.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/opus/opus_diff_import.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/opus/opus_exceptions.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/opus/opus_file_reader.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/opus/opus_helpers.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/opus/opus_reimport_one.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/opus/org_tree_print/main.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/opus/payloads.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/opus/tests/test_opus_diff_import.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/opus/tests/test_opus_file_reader.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/opus/tests/test_opus_helpers.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/related_units/from_adtreesync.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/related_units/import_related_units.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/rundb/db_overview.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/rundb/tests/test_db_overview.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/viborg/udvalg_import.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/viborg/viborg.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/viborg/viborg_uuids.py +0 -0
- {dipex-4.34.2 → dipex-4.34.3}/integrations/viborg/viborg_without_ad.py +0 -0
|
@@ -472,20 +472,28 @@ class ADWriter(AD):
|
|
|
472
472
|
self.helper = MoraHelper(
|
|
473
473
|
hostname=self.settings["global"]["mora.base"], use_cache=False
|
|
474
474
|
)
|
|
475
|
-
# Read manager information with graphql
|
|
476
|
-
graphql = MOGraphqlSource(self.settings)
|
|
477
|
-
# overwrite method no matter what datasource.
|
|
478
|
-
self.datasource.get_manager_uuid = graphql.get_manager_uuid
|
|
479
475
|
|
|
476
|
+
self._use_graphql_source_if_feature_flagged()
|
|
480
477
|
self._init_name_creator()
|
|
481
|
-
|
|
482
478
|
self._environment = self._get_jinja_environment()
|
|
483
|
-
|
|
484
479
|
self._reader = ADParameterReader()
|
|
485
480
|
|
|
486
481
|
def read_user(self, user=None, cpr=None):
|
|
487
482
|
return self._reader.read_user(user=user, cpr=cpr)
|
|
488
483
|
|
|
484
|
+
def _use_graphql_source_if_feature_flagged(self):
|
|
485
|
+
feature_flag = self.settings.get("primary_write", {}).get("use_future_managers")
|
|
486
|
+
if feature_flag:
|
|
487
|
+
logger.info(
|
|
488
|
+
"Using MOGraphqlSource to patch %r.get_manager_uuid", self.datasource
|
|
489
|
+
)
|
|
490
|
+
# Read manager information with graphql
|
|
491
|
+
graphql = MOGraphqlSource(self.settings)
|
|
492
|
+
# overwrite method no matter what datasource.
|
|
493
|
+
self.datasource.get_manager_uuid = graphql.get_manager_uuid
|
|
494
|
+
else:
|
|
495
|
+
logger.info("Not using MOGraphqlSource")
|
|
496
|
+
|
|
489
497
|
def _init_name_creator(self):
|
|
490
498
|
self.name_creator = UserNameGen.get_implementation()
|
|
491
499
|
if not self.skip_occupied_names:
|
|
@@ -171,6 +171,11 @@ def _read_primary_write_information(top_settings):
|
|
|
171
171
|
if "integrations.ad_writer.skip_locations" in top_settings:
|
|
172
172
|
conf["skip_locations"] = top_settings["integrations.ad_writer.skip_locations"]
|
|
173
173
|
|
|
174
|
+
# Feature flag "use future managers" (#47213)
|
|
175
|
+
conf["use_future_managers"] = top_settings.get(
|
|
176
|
+
"integrations.ad_writer.use_future_managers", False
|
|
177
|
+
)
|
|
178
|
+
|
|
174
179
|
# Check for illegal configuration of AD Write.
|
|
175
180
|
mo_to_ad_fields = conf["mo_to_ad_fields"]
|
|
176
181
|
template_to_ad_fields = conf["template_to_ad_fields"]
|
|
@@ -487,19 +487,32 @@ class MockADWriterContext(ExitStack):
|
|
|
487
487
|
def __init__(self, **kwargs):
|
|
488
488
|
super().__init__()
|
|
489
489
|
|
|
490
|
+
self._read_ou_addresses = kwargs.get("read_ou_addresses")
|
|
491
|
+
|
|
490
492
|
settings = copy.deepcopy(self.all_settings)
|
|
493
|
+
|
|
491
494
|
template_to_ad_fields = kwargs.get("template_to_ad_fields", {})
|
|
492
495
|
template_to_ad_fields_when_disable = kwargs.get(
|
|
493
496
|
"template_to_ad_fields_when_disable", {}
|
|
494
497
|
)
|
|
495
|
-
skip_locations = kwargs.get("skip_locations")
|
|
496
|
-
self._read_ou_addresses = kwargs.get("read_ou_addresses")
|
|
497
498
|
settings["primary_write"]["template_to_ad_fields"].update(template_to_ad_fields)
|
|
498
499
|
settings["primary_write"]["template_to_ad_fields_when_disable"].update(
|
|
499
500
|
template_to_ad_fields_when_disable
|
|
500
501
|
)
|
|
502
|
+
|
|
503
|
+
skip_locations = kwargs.get("skip_locations")
|
|
501
504
|
if skip_locations:
|
|
502
505
|
settings["primary_write"]["skip_locations"] = skip_locations
|
|
506
|
+
|
|
507
|
+
# This feature flag defaults to True in tests using `MockADWriterContext` even
|
|
508
|
+
# though `read_ad_conf_settings._read_primary_write_information` defaults to
|
|
509
|
+
# False.
|
|
510
|
+
# This is because the tests that verify code paths related to `get_manager_uuid`
|
|
511
|
+
# currently can only test `ADWriter` when `use_future_managers` is True.
|
|
512
|
+
settings["primary_write"]["use_future_managers"] = kwargs.get(
|
|
513
|
+
"use_future_managers", True
|
|
514
|
+
)
|
|
515
|
+
|
|
503
516
|
self._settings = settings
|
|
504
517
|
|
|
505
518
|
self._run_ps_response = kwargs.get("run_ps_response") or MagicMock()
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import copy
|
|
2
|
+
import inspect
|
|
3
|
+
import logging
|
|
2
4
|
import re
|
|
3
5
|
from datetime import datetime
|
|
4
6
|
from unittest import mock
|
|
@@ -35,6 +37,7 @@ from .mocks import MockADParameterReaderWithManager
|
|
|
35
37
|
from .mocks import MockADWriterContext
|
|
36
38
|
from .mocks import MockLoraCacheUnitAddress
|
|
37
39
|
from .mocks import MockLoraCacheWithManager
|
|
40
|
+
from .mocks import MockMOGraphqlSource
|
|
38
41
|
from .mocks import MockMORESTSource
|
|
39
42
|
from .test_utils import dict_modifier
|
|
40
43
|
from .test_utils import mo_modifier
|
|
@@ -1131,6 +1134,7 @@ class _TestRealADWriter(TestCase):
|
|
|
1131
1134
|
skip_locations=skip_locations,
|
|
1132
1135
|
read_ou_addresses=read_ou_addresses,
|
|
1133
1136
|
run_ps_response=kwargs.pop("run_ps_response", None),
|
|
1137
|
+
use_future_managers=kwargs.pop("use_future_managers", True),
|
|
1134
1138
|
):
|
|
1135
1139
|
instance = ADWriter(**kwargs)
|
|
1136
1140
|
instance.get_from_ad = get_from_ad
|
|
@@ -1656,3 +1660,27 @@ class TestGetManagerUUID(_TestRealADWriter):
|
|
|
1656
1660
|
assert mo_values["manager_cpr"] == mo_values["_manager_mo_user"]["cpr_no"]
|
|
1657
1661
|
assert mo_values["manager_mail"] == "address-value"
|
|
1658
1662
|
assert mo_values["manager_sam"] == MO_MANAGER_SAM
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
class TestUseFutureManagersFeatureFlag:
|
|
1666
|
+
def test_effect_when_false(self, caplog):
|
|
1667
|
+
with MockADWriterContext(use_future_managers=False):
|
|
1668
|
+
with caplog.at_level(logging.INFO):
|
|
1669
|
+
ad_writer = ADWriter()
|
|
1670
|
+
# Assert that `ADWriter._use_graphql_source_if_feature_flagged` does
|
|
1671
|
+
# not monkeypatch `self.datasource.get_manager_uuid`.
|
|
1672
|
+
assert inspect.getsourcelines(
|
|
1673
|
+
ad_writer.datasource.get_manager_uuid
|
|
1674
|
+
) == inspect.getsourcelines(MockMORESTSource.get_manager_uuid)
|
|
1675
|
+
assert "Not using MOGraphqlSource" in caplog.text
|
|
1676
|
+
|
|
1677
|
+
def test_effect_when_true(self, caplog):
|
|
1678
|
+
with MockADWriterContext(use_future_managers=True):
|
|
1679
|
+
with caplog.at_level(logging.INFO):
|
|
1680
|
+
ad_writer = ADWriter()
|
|
1681
|
+
# Assert that `ADWriter._use_graphql_source_if_feature_flagged`
|
|
1682
|
+
# monkeypatches `self.datasource.get_manager_uuid` when True.
|
|
1683
|
+
assert inspect.getsourcelines(
|
|
1684
|
+
ad_writer.datasource.get_manager_uuid
|
|
1685
|
+
) == inspect.getsourcelines(MockMOGraphqlSource.get_manager_uuid)
|
|
1686
|
+
assert "Using MOGraphqlSource to patch" in caplog.text
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dipex-4.34.2 → dipex-4.34.3}/integrations/SD_Lon/sdlon/scripts/generate_org_unit_level_uuid.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_import_ad_group_into_mo.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_read_ad_conf_settings.py
RENAMED
|
File without changes
|
{dipex-4.34.2 → dipex-4.34.3}/integrations/ad_integration/tests/test_recursive_dict_update.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|