cornflow 2.0.0rc1__tar.gz → 2.0.0rc2__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.
- {cornflow-2.0.0rc1/cornflow.egg-info → cornflow-2.0.0rc2}/PKG-INFO +2 -2
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/app.py +264 -239
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/views.py +16 -2
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/authentication/auth.py +6 -1
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/const.py +1 -1
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2/cornflow.egg-info}/PKG-INFO +2 -2
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow.egg-info/requires.txt +1 -1
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/requirements.txt +1 -1
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/setup.py +1 -1
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/MANIFEST.in +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/README.rst +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/airflow_config/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/airflow_config/airflow_local_settings.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/airflow_config/plugins/XCom/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/airflow_config/plugins/XCom/gce_xcom_backend.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/airflow_config/plugins/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/airflow_config/webserver_ldap.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/actions.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/arguments.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/config.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/migrations.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/permissions.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/roles.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/schemas.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/service.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/api_generator.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/endpoint_tools.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/models_tools.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/schema_generator.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/schemas_tools.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/tools.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/users.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/utils.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/views.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/access.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/actions.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/auxiliar.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/cleanup.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/dag.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/permissions.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/roles.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/schemas.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/users.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/config.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/action.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/alarms.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/apiview.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/case.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/dag.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/data_check.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/example_data.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/execution.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/health.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/instance.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/licenses.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/login.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/main_alarms.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/meta_resource.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/permission.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/roles.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/schemas.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/signup.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/tables.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/token.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/user.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/user_role.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/gunicorn.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/README +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/alembic.ini +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/env.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/script.py.mako +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/00757b557b02_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/1af47a419bbd_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/4aac5e0c6e66_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/7c3ea5ab5501_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/991b98e24225_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/999b98e24225.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/a472b5ad50b7_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/c2db9409cb5f_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/c8a6c762e818_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/ca449af8034c_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/cef1df240b27_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/d0e0700dcd8e_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/d1b5be1f0549_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/e1a50dae1ac9_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/e937a5234ce4_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/ebdd955fcc5e_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/f3bee20314a2_.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/action.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/alarms.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/base_data_model.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/case.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/dag.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/dag_permissions.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/execution.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/instance.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/main_alarms.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/meta_models.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/permissions.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/role.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/user.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/user_role.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/view.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/action.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/alarms.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/case.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/common.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/dag.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/example_data.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/execution.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/health.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/instance.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/main_alarms.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/model_json.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/patch.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/permissions.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/query.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/role.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/schemas.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/solution_log.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/tables.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/user.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/user_role.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/view.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/authentication/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/authentication/decorators.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/authentication/ldap.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/compress.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/email.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/exceptions.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/licenses.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/log_config.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/query_tools.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/utils.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/utils_tables.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/validators.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/base_test_execution.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/const.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/custom_liveServer.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/custom_test_case.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/integration/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/integration/test_commands.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/integration/test_cornflowclient.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/ldap/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/ldap/test_ldap_authentication.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/__init__.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_actions.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_alarms.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_apiview.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_application.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_cases.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_cli.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_commands.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_dags.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_data_checks.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_example_data.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_executions.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_external_role_creation.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_generate_from_schema.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_get_resources.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_health.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_instances.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_instances_file.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_licenses.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_log_in.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_main_alarms.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_permissions.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_roles.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_schema_from_models.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_schemas.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_sign_up.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_tables.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_token.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_users.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/tools.py +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow.egg-info/SOURCES.txt +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow.egg-info/dependency_links.txt +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow.egg-info/entry_points.txt +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow.egg-info/top_level.txt +0 -0
- {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cornflow
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0rc2
|
|
4
4
|
Summary: cornflow is an open source multi-solver optimization server with a REST API built using flask.
|
|
5
5
|
Home-page: https://github.com/baobabsoluciones/cornflow
|
|
6
6
|
Author: baobab soluciones
|
|
@@ -14,7 +14,7 @@ Requires-Dist: alembic==1.9.2
|
|
|
14
14
|
Requires-Dist: apispec==6.3.0
|
|
15
15
|
Requires-Dist: cachetools==5.3.3
|
|
16
16
|
Requires-Dist: click==8.1.7
|
|
17
|
-
Requires-Dist: cornflow-client==2.0.
|
|
17
|
+
Requires-Dist: cornflow-client==2.0.0rc2
|
|
18
18
|
Requires-Dist: cryptography==46.0.5
|
|
19
19
|
Requires-Dist: disposable-email-domains==0.0.162
|
|
20
20
|
Requires-Dist: Flask==2.3.2
|
|
@@ -1,239 +1,264 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Main file with the creation of the app logic
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
# Full imports
|
|
6
|
-
import os
|
|
7
|
-
from logging.config import dictConfig
|
|
8
|
-
|
|
9
|
-
import click
|
|
10
|
-
|
|
11
|
-
# Partial imports
|
|
12
|
-
from flask import Flask
|
|
13
|
-
from flask.cli import with_appcontext
|
|
14
|
-
from flask_apispec.extension import FlaskApiSpec
|
|
15
|
-
from flask_cors import CORS
|
|
16
|
-
from flask_migrate import Migrate
|
|
17
|
-
from flask_restful import Api
|
|
18
|
-
from werkzeug.exceptions import NotFound
|
|
19
|
-
from werkzeug.middleware.dispatcher import DispatcherMiddleware
|
|
20
|
-
|
|
21
|
-
# Module imports
|
|
22
|
-
from cornflow.commands import (
|
|
23
|
-
create_service_user_command,
|
|
24
|
-
create_admin_user_command,
|
|
25
|
-
create_planner_user_command,
|
|
26
|
-
register_roles_command,
|
|
27
|
-
register_actions_command,
|
|
28
|
-
register_views_command,
|
|
29
|
-
register_base_permissions_command,
|
|
30
|
-
access_init_command,
|
|
31
|
-
register_deployed_dags_command,
|
|
32
|
-
register_dag_permissions_command,
|
|
33
|
-
)
|
|
34
|
-
from cornflow.config import app_config
|
|
35
|
-
from cornflow.endpoints import resources, alarms_resources
|
|
36
|
-
from cornflow.endpoints.login import LoginEndpoint, LoginOpenAuthEndpoint
|
|
37
|
-
from cornflow.endpoints.signup import SignUpEndpoint
|
|
38
|
-
from cornflow.shared import db, bcrypt
|
|
39
|
-
from cornflow.shared.compress import init_compress
|
|
40
|
-
from cornflow.shared.const import (
|
|
41
|
-
AUTH_DB,
|
|
42
|
-
AUTH_LDAP,
|
|
43
|
-
AUTH_OID,
|
|
44
|
-
CONDITIONAL_ENDPOINTS,
|
|
45
|
-
SIGNUP_WITH_AUTH,
|
|
46
|
-
SIGNUP_WITH_NO_AUTH,
|
|
47
|
-
)
|
|
48
|
-
from cornflow.shared.exceptions import initialize_errorhandlers, ConfigurationError
|
|
49
|
-
from cornflow.shared.log_config import log_config
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def create_app(env_name="development", dataconn=None):
|
|
53
|
-
"""
|
|
54
|
-
|
|
55
|
-
:param str env_name: 'testing' or 'development' or 'production'
|
|
56
|
-
:param str dataconn: string to connect to the database
|
|
57
|
-
:return: the application that is going to be running :class:`Flask`
|
|
58
|
-
:rtype: :class:`Flask`
|
|
59
|
-
"""
|
|
60
|
-
dictConfig(log_config(app_config[env_name].LOG_LEVEL))
|
|
61
|
-
|
|
62
|
-
# Note: Explicit CSRF protection is not configured as the application uses
|
|
63
|
-
# JWT for authentication via headers, mitigating standard CSRF vulnerabilities.
|
|
64
|
-
app = Flask(__name__)
|
|
65
|
-
app.json.sort_keys = False
|
|
66
|
-
app.logger.setLevel(app_config[env_name].LOG_LEVEL)
|
|
67
|
-
|
|
68
|
-
app.config.from_object(app_config[env_name])
|
|
69
|
-
# initialization for init_cornflow_service.py
|
|
70
|
-
if dataconn is not None:
|
|
71
|
-
app.config["SQLALCHEMY_DATABASE_URI"] = dataconn
|
|
72
|
-
CORS(app)
|
|
73
|
-
bcrypt.init_app(app)
|
|
74
|
-
db.init_app(app)
|
|
75
|
-
Migrate(app=app, db=db)
|
|
76
|
-
|
|
77
|
-
if "sqlite" in app.config["SQLALCHEMY_DATABASE_URI"]:
|
|
78
|
-
|
|
79
|
-
def _fk_pragma_on_connect(dbapi_con, _con_record):
|
|
80
|
-
dbapi_con.execute("pragma foreign_keys=ON")
|
|
81
|
-
|
|
82
|
-
with app.app_context():
|
|
83
|
-
from sqlalchemy import event
|
|
84
|
-
|
|
85
|
-
event.listen(db.engine, "connect", _fk_pragma_on_connect)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
)
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
@
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
@
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
@click.
|
|
191
|
-
@click.option("-
|
|
192
|
-
@
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
@click.
|
|
199
|
-
@
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
@click.
|
|
223
|
-
@
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
@click.
|
|
230
|
-
@click.option("-v", "--verbose", is_flag=True, default=False)
|
|
231
|
-
@with_appcontext
|
|
232
|
-
def
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
1
|
+
"""
|
|
2
|
+
Main file with the creation of the app logic
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# Full imports
|
|
6
|
+
import os
|
|
7
|
+
from logging.config import dictConfig
|
|
8
|
+
|
|
9
|
+
import click
|
|
10
|
+
|
|
11
|
+
# Partial imports
|
|
12
|
+
from flask import Flask, Blueprint
|
|
13
|
+
from flask.cli import with_appcontext
|
|
14
|
+
from flask_apispec.extension import FlaskApiSpec
|
|
15
|
+
from flask_cors import CORS
|
|
16
|
+
from flask_migrate import Migrate
|
|
17
|
+
from flask_restful import Api
|
|
18
|
+
from werkzeug.exceptions import NotFound
|
|
19
|
+
from werkzeug.middleware.dispatcher import DispatcherMiddleware
|
|
20
|
+
|
|
21
|
+
# Module imports
|
|
22
|
+
from cornflow.commands import (
|
|
23
|
+
create_service_user_command,
|
|
24
|
+
create_admin_user_command,
|
|
25
|
+
create_planner_user_command,
|
|
26
|
+
register_roles_command,
|
|
27
|
+
register_actions_command,
|
|
28
|
+
register_views_command,
|
|
29
|
+
register_base_permissions_command,
|
|
30
|
+
access_init_command,
|
|
31
|
+
register_deployed_dags_command,
|
|
32
|
+
register_dag_permissions_command,
|
|
33
|
+
)
|
|
34
|
+
from cornflow.config import app_config
|
|
35
|
+
from cornflow.endpoints import resources, alarms_resources
|
|
36
|
+
from cornflow.endpoints.login import LoginEndpoint, LoginOpenAuthEndpoint
|
|
37
|
+
from cornflow.endpoints.signup import SignUpEndpoint
|
|
38
|
+
from cornflow.shared import db, bcrypt
|
|
39
|
+
from cornflow.shared.compress import init_compress
|
|
40
|
+
from cornflow.shared.const import (
|
|
41
|
+
AUTH_DB,
|
|
42
|
+
AUTH_LDAP,
|
|
43
|
+
AUTH_OID,
|
|
44
|
+
CONDITIONAL_ENDPOINTS,
|
|
45
|
+
SIGNUP_WITH_AUTH,
|
|
46
|
+
SIGNUP_WITH_NO_AUTH,
|
|
47
|
+
)
|
|
48
|
+
from cornflow.shared.exceptions import initialize_errorhandlers, ConfigurationError
|
|
49
|
+
from cornflow.shared.log_config import log_config
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def create_app(env_name="development", dataconn=None):
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
:param str env_name: 'testing' or 'development' or 'production'
|
|
56
|
+
:param str dataconn: string to connect to the database
|
|
57
|
+
:return: the application that is going to be running :class:`Flask`
|
|
58
|
+
:rtype: :class:`Flask`
|
|
59
|
+
"""
|
|
60
|
+
dictConfig(log_config(app_config[env_name].LOG_LEVEL))
|
|
61
|
+
|
|
62
|
+
# Note: Explicit CSRF protection is not configured as the application uses
|
|
63
|
+
# JWT for authentication via headers, mitigating standard CSRF vulnerabilities.
|
|
64
|
+
app = Flask(__name__)
|
|
65
|
+
app.json.sort_keys = False
|
|
66
|
+
app.logger.setLevel(app_config[env_name].LOG_LEVEL)
|
|
67
|
+
|
|
68
|
+
app.config.from_object(app_config[env_name])
|
|
69
|
+
# initialization for init_cornflow_service.py
|
|
70
|
+
if dataconn is not None:
|
|
71
|
+
app.config["SQLALCHEMY_DATABASE_URI"] = dataconn
|
|
72
|
+
CORS(app)
|
|
73
|
+
bcrypt.init_app(app)
|
|
74
|
+
db.init_app(app)
|
|
75
|
+
Migrate(app=app, db=db)
|
|
76
|
+
|
|
77
|
+
if "sqlite" in app.config["SQLALCHEMY_DATABASE_URI"]:
|
|
78
|
+
|
|
79
|
+
def _fk_pragma_on_connect(dbapi_con, _con_record):
|
|
80
|
+
dbapi_con.execute("pragma foreign_keys=ON")
|
|
81
|
+
|
|
82
|
+
with app.app_context():
|
|
83
|
+
from sqlalchemy import event
|
|
84
|
+
|
|
85
|
+
event.listen(db.engine, "connect", _fk_pragma_on_connect)
|
|
86
|
+
|
|
87
|
+
# Rutas del Core bajo /cornflow/ via Blueprint (URLs canónicas)
|
|
88
|
+
cornflow_bp = Blueprint("cornflow", __name__, url_prefix="/cornflow")
|
|
89
|
+
api = Api(cornflow_bp)
|
|
90
|
+
for res in resources:
|
|
91
|
+
api.add_resource(res["resource"], res["urls"], endpoint=res["endpoint"])
|
|
92
|
+
if app.config["ALARMS_ENDPOINTS"]:
|
|
93
|
+
for res in alarms_resources:
|
|
94
|
+
api.add_resource(res["resource"], res["urls"], endpoint=res["endpoint"])
|
|
95
|
+
|
|
96
|
+
# Resource for the log-in
|
|
97
|
+
auth_type = app.config["AUTH_TYPE"]
|
|
98
|
+
|
|
99
|
+
if auth_type == AUTH_DB:
|
|
100
|
+
signup_activated = int(app.config["SIGNUP_ACTIVATED"])
|
|
101
|
+
if signup_activated in [SIGNUP_WITH_AUTH, SIGNUP_WITH_NO_AUTH]:
|
|
102
|
+
api.add_resource(
|
|
103
|
+
SignUpEndpoint, CONDITIONAL_ENDPOINTS["signup"], endpoint="signup"
|
|
104
|
+
)
|
|
105
|
+
api.add_resource(
|
|
106
|
+
LoginEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login"
|
|
107
|
+
)
|
|
108
|
+
elif auth_type == AUTH_LDAP:
|
|
109
|
+
api.add_resource(
|
|
110
|
+
LoginEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login"
|
|
111
|
+
)
|
|
112
|
+
elif auth_type == AUTH_OID:
|
|
113
|
+
api.add_resource(
|
|
114
|
+
LoginOpenAuthEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login"
|
|
115
|
+
)
|
|
116
|
+
else:
|
|
117
|
+
raise ConfigurationError(
|
|
118
|
+
error="Invalid authentication type",
|
|
119
|
+
log_txt="Error while configuring authentication. The authentication type is not valid.",
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
app.register_blueprint(cornflow_bp)
|
|
123
|
+
|
|
124
|
+
# Alias de compatibilidad: mismas rutas sin prefijo (URLs legacy)
|
|
125
|
+
api_compat = Api(app)
|
|
126
|
+
for res in resources:
|
|
127
|
+
api_compat.add_resource(res["resource"], res["urls"], endpoint=res["endpoint"] + "_compat")
|
|
128
|
+
if app.config["ALARMS_ENDPOINTS"]:
|
|
129
|
+
for res in alarms_resources:
|
|
130
|
+
api_compat.add_resource(res["resource"], res["urls"], endpoint=res["endpoint"] + "_compat")
|
|
131
|
+
if auth_type == AUTH_DB:
|
|
132
|
+
_signup_activated = int(app.config["SIGNUP_ACTIVATED"])
|
|
133
|
+
if _signup_activated in [SIGNUP_WITH_AUTH, SIGNUP_WITH_NO_AUTH]:
|
|
134
|
+
api_compat.add_resource(SignUpEndpoint, CONDITIONAL_ENDPOINTS["signup"], endpoint="signup_compat")
|
|
135
|
+
api_compat.add_resource(LoginEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login_compat")
|
|
136
|
+
elif auth_type == AUTH_LDAP:
|
|
137
|
+
api_compat.add_resource(LoginEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login_compat")
|
|
138
|
+
elif auth_type == AUTH_OID:
|
|
139
|
+
api_compat.add_resource(LoginOpenAuthEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login_compat")
|
|
140
|
+
|
|
141
|
+
docs = FlaskApiSpec(app)
|
|
142
|
+
for res in resources:
|
|
143
|
+
docs.register(target=res["resource"], endpoint=res["endpoint"], blueprint="cornflow")
|
|
144
|
+
if app.config["ALARMS_ENDPOINTS"]:
|
|
145
|
+
for res in alarms_resources:
|
|
146
|
+
docs.register(target=res["resource"], endpoint=res["endpoint"], blueprint="cornflow")
|
|
147
|
+
|
|
148
|
+
initialize_errorhandlers(app)
|
|
149
|
+
init_compress(app)
|
|
150
|
+
|
|
151
|
+
app.cli.add_command(create_service_user)
|
|
152
|
+
app.cli.add_command(create_admin_user)
|
|
153
|
+
app.cli.add_command(register_roles)
|
|
154
|
+
app.cli.add_command(create_base_user)
|
|
155
|
+
app.cli.add_command(register_actions)
|
|
156
|
+
app.cli.add_command(register_views)
|
|
157
|
+
app.cli.add_command(register_base_assignations)
|
|
158
|
+
app.cli.add_command(access_init)
|
|
159
|
+
app.cli.add_command(register_deployed_dags)
|
|
160
|
+
app.cli.add_command(register_dag_permissions)
|
|
161
|
+
|
|
162
|
+
if int(app.config["EXTERNAL_APP"]) == 1:
|
|
163
|
+
# Legacy mode: DispatcherMiddleware mounts cornflow under APPLICATION_ROOT.
|
|
164
|
+
# The external app is responsible for combining both apps via wsgi.py.
|
|
165
|
+
if app.config["APPLICATION_ROOT"] != "/":
|
|
166
|
+
app.wsgi_app = DispatcherMiddleware(
|
|
167
|
+
NotFound(), {app.config["APPLICATION_ROOT"]: app.wsgi_app}
|
|
168
|
+
)
|
|
169
|
+
else:
|
|
170
|
+
# Plugin mode: autodiscover and mount plugins registered under cornflow.plugins.
|
|
171
|
+
from importlib.metadata import entry_points
|
|
172
|
+
for ep in entry_points(group="cornflow.plugins"):
|
|
173
|
+
ep.load()().init_app(app)
|
|
174
|
+
|
|
175
|
+
return app
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
@click.command("create_service_user")
|
|
179
|
+
@click.option("-u", "--username", required=True, type=str)
|
|
180
|
+
@click.option("-e", "--email", required=True, type=str)
|
|
181
|
+
@click.option("-p", "--password", required=True, type=str)
|
|
182
|
+
@click.option("-v", "--verbose", is_flag=True, default=False)
|
|
183
|
+
@with_appcontext
|
|
184
|
+
def create_service_user(username, email, password, verbose):
|
|
185
|
+
create_service_user_command(username, email, password, verbose)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
@click.command("create_admin_user")
|
|
189
|
+
@click.option("-u", "--username", required=True, type=str)
|
|
190
|
+
@click.option("-e", "--email", required=True, type=str)
|
|
191
|
+
@click.option("-p", "--password", required=True, type=str)
|
|
192
|
+
@click.option("-v", "--verbose", is_flag=True, default=False)
|
|
193
|
+
@with_appcontext
|
|
194
|
+
def create_admin_user(username, email, password, verbose):
|
|
195
|
+
create_admin_user_command(username, email, password, verbose)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
@click.command("create_base_user")
|
|
199
|
+
@click.option("-u", "--username", required=True, type=str)
|
|
200
|
+
@click.option("-e", "--email", required=True, type=str)
|
|
201
|
+
@click.option("-p", "--password", required=True, type=str)
|
|
202
|
+
@click.option("-v", "--verbose", is_flag=True, default=False)
|
|
203
|
+
@with_appcontext
|
|
204
|
+
def create_base_user(username, email, password, verbose):
|
|
205
|
+
create_planner_user_command(username, email, password, verbose)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
@click.command("register_roles")
|
|
209
|
+
@click.option("-v", "--verbose", is_flag=True, default=False)
|
|
210
|
+
@with_appcontext
|
|
211
|
+
def register_roles(verbose):
|
|
212
|
+
register_roles_command(verbose=verbose)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
@click.command("register_actions")
|
|
216
|
+
@click.option("-v", "--verbose", is_flag=True, default=False)
|
|
217
|
+
@with_appcontext
|
|
218
|
+
def register_actions(verbose):
|
|
219
|
+
register_actions_command(verbose)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
@click.command("register_views")
|
|
223
|
+
@click.option("-v", "--verbose", is_flag=True, default=False)
|
|
224
|
+
@with_appcontext
|
|
225
|
+
def register_views(verbose):
|
|
226
|
+
register_views_command(verbose=verbose)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
@click.command("register_base_assignations")
|
|
230
|
+
@click.option("-v", "--verbose", is_flag=True, default=False)
|
|
231
|
+
@with_appcontext
|
|
232
|
+
def register_base_assignations(verbose):
|
|
233
|
+
register_base_permissions_command(verbose=verbose)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
@click.command("access_init")
|
|
237
|
+
@click.option("-v", "--verbose", is_flag=True, default=False)
|
|
238
|
+
@with_appcontext
|
|
239
|
+
def access_init(verbose):
|
|
240
|
+
access_init_command(verbose=verbose)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
@click.command("register_deployed_dags")
|
|
244
|
+
@click.option("-r", "--url", type=str)
|
|
245
|
+
@click.option("-u", "--username", type=str)
|
|
246
|
+
@click.option("-p", "--password", type=str)
|
|
247
|
+
@click.option("-v", "--verbose", is_flag=True, default=False)
|
|
248
|
+
@with_appcontext
|
|
249
|
+
def register_deployed_dags(url, username, password, verbose):
|
|
250
|
+
register_deployed_dags_command(url, username, password, verbose)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
@click.command("register_dag_permissions")
|
|
254
|
+
@click.option("-o", "--open_deployment", default=0, type=int)
|
|
255
|
+
@click.option("-v", "--verbose", is_flag=True, default=False)
|
|
256
|
+
@with_appcontext
|
|
257
|
+
def register_dag_permissions(open_deployment, verbose):
|
|
258
|
+
register_dag_permissions_command(open_deployment=open_deployment, verbose=verbose)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
if __name__ == "__main__":
|
|
262
|
+
environment_name = os.getenv("FLASK_ENV", "development")
|
|
263
|
+
flask_app = create_app(environment_name)
|
|
264
|
+
flask_app.run()
|
|
@@ -120,6 +120,20 @@ def get_views_to_update(
|
|
|
120
120
|
]
|
|
121
121
|
|
|
122
122
|
|
|
123
|
+
def _get_url_from_map(endpoint):
|
|
124
|
+
"""Return the real URL rule from Flask's URL map (includes Blueprint prefix)."""
|
|
125
|
+
try:
|
|
126
|
+
rules_map = current_app.url_map._rules_by_endpoint
|
|
127
|
+
# Try exact match first, then with blueprint prefix (e.g. "cornflow.instance")
|
|
128
|
+
for key in (endpoint, f"cornflow.{endpoint}"):
|
|
129
|
+
rules = list(rules_map.get(key, []))
|
|
130
|
+
if rules:
|
|
131
|
+
return rules[0].rule
|
|
132
|
+
except Exception:
|
|
133
|
+
pass
|
|
134
|
+
return None
|
|
135
|
+
|
|
136
|
+
|
|
123
137
|
def get_views_to_update_and_delete(
|
|
124
138
|
resources_to_register, views_registered_urls_all_attributes
|
|
125
139
|
):
|
|
@@ -130,7 +144,7 @@ def get_views_to_update_and_delete(
|
|
|
130
144
|
"""
|
|
131
145
|
all_resources_to_register_views_endpoints = {
|
|
132
146
|
view["endpoint"]: {
|
|
133
|
-
"url_rule": view["urls"],
|
|
147
|
+
"url_rule": _get_url_from_map(view["endpoint"]) or view["urls"],
|
|
134
148
|
"description": view["resource"].DESCRIPTION,
|
|
135
149
|
}
|
|
136
150
|
for view in resources_to_register
|
|
@@ -157,7 +171,7 @@ def get_views_to_register(resources_to_register, views_registered_urls_all_attri
|
|
|
157
171
|
ViewModel(
|
|
158
172
|
{
|
|
159
173
|
"name": view["endpoint"],
|
|
160
|
-
"url_rule": view["urls"],
|
|
174
|
+
"url_rule": _get_url_from_map(view["endpoint"]) or view["urls"],
|
|
161
175
|
"description": view["resource"].DESCRIPTION,
|
|
162
176
|
}
|
|
163
177
|
)
|
|
@@ -403,8 +403,13 @@ class Auth:
|
|
|
403
403
|
)
|
|
404
404
|
|
|
405
405
|
action_id = PERMISSION_METHOD_MAP[method]
|
|
406
|
+
# Try the URL as-is first; if not found try with /cornflow/ prefix for
|
|
407
|
+
# requests arriving via the legacy (unprefixed) routes.
|
|
408
|
+
view = ViewModel.query.filter_by(url_rule=url).first()
|
|
409
|
+
if view is None and not url.startswith("/cornflow/"):
|
|
410
|
+
view = ViewModel.query.filter_by(url_rule="/cornflow" + url).first()
|
|
406
411
|
try:
|
|
407
|
-
view_id =
|
|
412
|
+
view_id = view.id
|
|
408
413
|
except AttributeError:
|
|
409
414
|
current_app.logger.error(
|
|
410
415
|
"The permission for this endpoint is not in the database."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cornflow
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0rc2
|
|
4
4
|
Summary: cornflow is an open source multi-solver optimization server with a REST API built using flask.
|
|
5
5
|
Home-page: https://github.com/baobabsoluciones/cornflow
|
|
6
6
|
Author: baobab soluciones
|
|
@@ -14,7 +14,7 @@ Requires-Dist: alembic==1.9.2
|
|
|
14
14
|
Requires-Dist: apispec==6.3.0
|
|
15
15
|
Requires-Dist: cachetools==5.3.3
|
|
16
16
|
Requires-Dist: click==8.1.7
|
|
17
|
-
Requires-Dist: cornflow-client==2.0.
|
|
17
|
+
Requires-Dist: cornflow-client==2.0.0rc2
|
|
18
18
|
Requires-Dist: cryptography==46.0.5
|
|
19
19
|
Requires-Dist: disposable-email-domains==0.0.162
|
|
20
20
|
Requires-Dist: Flask==2.3.2
|
|
@@ -9,7 +9,7 @@ with open("requirements.txt", "r") as fh:
|
|
|
9
9
|
|
|
10
10
|
setuptools.setup(
|
|
11
11
|
name="cornflow",
|
|
12
|
-
version="2.0.
|
|
12
|
+
version="2.0.0rc2",
|
|
13
13
|
author="baobab soluciones",
|
|
14
14
|
author_email="cornflow@baobabsoluciones.es",
|
|
15
15
|
description="cornflow is an open source multi-solver optimization server with a REST API built using flask.",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|