:py:mod:`beans` =============== .. py:module:: beans .. autoapi-nested-parse:: A class to create all the beans used in the API. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: beans.batch_job_executor_provider beans.config_client beans.default_request_session beans.get_background_tasks_manager beans.get_external_api_clients beans.get_iam_constants beans.get_job_repository beans.get_jobs_service beans.get_kubernetes_client beans.get_mongo_client beans.get_oauth2_service_service_token_factory beans.get_panda_client beans.get_redis_cache beans.get_site_capabilities_queue_client beans.interactive_job_executor_provider beans.panda_batch_job_executor beans.panda_job_deployment_config beans.request_timeout_adapter beans.resource_broker_service_provider beans.starlette_config beans.test_batch_job_executor .. py:function:: batch_job_executor_provider(provider = os.getenv('WMS_BACKEND', 'test')) Create and return a map of job factories functions. .. py:function:: config_client() Create and return a ConfigClient instance. .. py:function:: default_request_session() Create and return a default requests Session with timeout adapter. .. py:function:: get_background_tasks_manager() Create and return a BackgroundTaskManager instance. .. py:function:: get_external_api_clients(oauth2_service_token_factory = Depends(get_oauth2_service_service_token_factory), config = Depends(starlette_config), session_timeout_adapter = Depends(request_timeout_adapter)) Create and return external API clients. .. py:function:: get_iam_constants(config = Depends(starlette_config)) Create and return an IAM constants instance. :param config: :return: .. py:function:: get_job_repository(redis_cache = Depends(get_redis_cache), mongo_client = Depends(get_mongo_client)) Create and return a Jobs repository instance. .. py:function:: get_jobs_service(job_repository = Depends(get_job_repository), batch_job_executor = Depends(batch_job_executor_provider()), interactive_job_executor = Depends(interactive_job_executor_provider), background_task_manager = Depends(get_background_tasks_manager)) Create and return an ExecutionService instance. .. py:function:: get_kubernetes_client(panda_deployment_config = Depends(panda_job_deployment_config), job_repository = Depends(get_job_repository)) Create and return a Kubernetes client. .. py:function:: get_mongo_client() Create and return an AsyncMongo client instance. .. py:function:: get_oauth2_service_service_token_factory(config = Depends(starlette_config), redis_cache = Depends(get_redis_cache), iam_constants = Depends(get_iam_constants)) Create and return an OAuth2ServiceTokenFactory instance. :param iam_constants: :param config: :param redis_cache: :return: OAuth2ServiceTokenFactory instance .. py:function:: get_panda_client() Create and return a Panda API client. .. py:function:: get_redis_cache() Create and return a Redis cache instance. .. py:function:: get_site_capabilities_queue_client(external_api_clients = Depends(get_external_api_clients), config = Depends(config_client)) Create and return a SiteCapabilitiesQueueClient instance. .. py:function:: interactive_job_executor_provider(broker_service = Depends(resource_broker_service_provider)) Create and return an InteractiveJobExecutor instance using injected broker service. .. py:function:: panda_batch_job_executor(panda_client = Depends(get_panda_client), kubernetes_client = Depends(get_kubernetes_client), site_capabilities_queue_client = Depends(get_site_capabilities_queue_client), background_task_manager = Depends(get_background_tasks_manager)) Create and return a Panda Job Factory instance. .. py:function:: panda_job_deployment_config(cfg = Depends(config_client)) Create and return a PandaJobDeploymentConfig instance. .. py:function:: request_timeout_adapter() Create and return a TimeoutAdapter instance. .. py:function:: resource_broker_service_provider(external_api_clients = Depends(get_external_api_clients)) Create and return an ExecutionBroker instance with all required clients. .. py:function:: starlette_config() Create and return a Starlette Config instance. .. py:function:: test_batch_job_executor() Create and return a Test Job Factory instance.