js7-client-python 2.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- js7/__init__.py +8 -0
- js7/api/joc/http/v_2_8_2/agent/cluster/confirm_node_loss.py +36 -0
- js7/api/joc/http/v_2_8_2/agent/cluster/switchover.py +36 -0
- js7/api/joc/http/v_2_8_2/agent/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/agents.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/cluster/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/cluster/deploy.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/cluster/revoke.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/cluster/store.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/export.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/import.py +74 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/cluster/deploy.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/cluster/revoke.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/cluster/store.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/cluster/subagents/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/cluster/subagents/disable.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/cluster/subagents/enable.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/cluster/subagents/reset.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/cluster/subagents/store.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/deploy.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/disable.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/enable.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/revoke.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/inventory/store.py +36 -0
- js7/api/joc/http/v_2_8_2/agents/reset.py +36 -0
- js7/api/joc/http/v_2_8_2/authentication/auth.py +32 -0
- js7/api/joc/http/v_2_8_2/authentication/joc_cockpit_permissions.py +28 -0
- js7/api/joc/http/v_2_8_2/authentication/login.py +35 -0
- js7/api/joc/http/v_2_8_2/authentication/logout.py +28 -0
- js7/api/joc/http/v_2_8_2/configuration/configuration.py +36 -0
- js7/api/joc/http/v_2_8_2/configuration/save.py +36 -0
- js7/api/joc/http/v_2_8_2/controller/abort.py +36 -0
- js7/api/joc/http/v_2_8_2/controller/abort_and_restart.py +36 -0
- js7/api/joc/http/v_2_8_2/controller/cluster/appoint_nodes.py +36 -0
- js7/api/joc/http/v_2_8_2/controller/cluster/confirm_node_loss.py +36 -0
- js7/api/joc/http/v_2_8_2/controller/cluster/switchover.py +36 -0
- js7/api/joc/http/v_2_8_2/controller/components.py +36 -0
- js7/api/joc/http/v_2_8_2/controller/controller.py +36 -0
- js7/api/joc/http/v_2_8_2/controller/register.py +42 -0
- js7/api/joc/http/v_2_8_2/controller/restart.py +36 -0
- js7/api/joc/http/v_2_8_2/controller/terminate.py +36 -0
- js7/api/joc/http/v_2_8_2/controller/test.py +36 -0
- js7/api/joc/http/v_2_8_2/controller/unregister.py +36 -0
- js7/api/joc/http/v_2_8_2/daily_plan/orders/cancel.py +36 -0
- js7/api/joc/http/v_2_8_2/daily_plan/orders/copy.py +36 -0
- js7/api/joc/http/v_2_8_2/daily_plan/orders/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/daily_plan/orders/generate.py +36 -0
- js7/api/joc/http/v_2_8_2/daily_plan/orders/modify.py +36 -0
- js7/api/joc/http/v_2_8_2/daily_plan/orders/orders.py +36 -0
- js7/api/joc/http/v_2_8_2/daily_plan/orders/submit.py +36 -0
- js7/api/joc/http/v_2_8_2/daily_plan/projections/calendar.py +36 -0
- js7/api/joc/http/v_2_8_2/daily_plan/projections/dates.py +36 -0
- js7/api/joc/http/v_2_8_2/daily_plan/projections/recreate.py +28 -0
- js7/api/joc/http/v_2_8_2/daily_plan/submissions/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/account/change_password.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/account/permissions.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/account/rename.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/account/store.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/accounts/accounts.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/accounts/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/accounts/disable.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/accounts/enable.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/accounts/reset_password.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/blocked_account/store.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/blocked_accounts/blocked_accounts.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/blocked_accounts/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/folder/folder.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/folder/rename.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/folders/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/folders/folders.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/folders/store.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/identity_service/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/identity_service/identity_service.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/identity_service/rename.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/identity_service/store.py +42 -0
- js7/api/joc/http/v_2_8_2/iam/identity_services/identity_services.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/permission/permission.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/permission/rename.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/permissions/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/permissions/permissions.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/permissions/store.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/role/rename.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/role/role.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/role/store.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/roles/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/iam/roles/roles.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/changes/changes.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/dependencies.py +33 -0
- js7/api/joc/http/v_2_8_2/inventory/deployment/deploy.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/deployment/import_deploy.py +66 -0
- js7/api/joc/http/v_2_8_2/inventory/deployment/revoke.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/export/export.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/export/folder.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/import_objects.py +88 -0
- js7/api/joc/http/v_2_8_2/inventory/releasables/recall/folder.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/releasables/recall/recall.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/release.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/remove/folder.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/remove/remove.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/git/add.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/git/checkout.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/git/clone.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/git/commit.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/git/credentials/add.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/git/credentials/credentials.py +28 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/git/credentials/remove.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/git/pull.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/git/push.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/read.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/store.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/repository/update.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/revalidate/folder.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/store.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/trash/delete/delete.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/trash/delete/folder.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/trash/restore.py +36 -0
- js7/api/joc/http/v_2_8_2/inventory/validate.py +42 -0
- js7/api/joc/http/v_2_8_2/joc/cluster/restart.py +36 -0
- js7/api/joc/http/v_2_8_2/joc/cluster/run.py +36 -0
- js7/api/joc/http/v_2_8_2/joc/cluster/switch_member.py +36 -0
- js7/api/joc/http/v_2_8_2/joc/license.py +28 -0
- js7/api/joc/http/v_2_8_2/joc/proxies/restart.py +36 -0
- js7/api/joc/http/v_2_8_2/joc/version.py +28 -0
- js7/api/joc/http/v_2_8_2/joc/versions.py +36 -0
- js7/api/joc/http/v_2_8_2/orders/add.py +33 -0
- js7/api/joc/http/v_2_8_2/orders/cancel.py +33 -0
- js7/api/joc/http/v_2_8_2/orders/confirm.py +36 -0
- js7/api/joc/http/v_2_8_2/orders/continue.py +36 -0
- js7/api/joc/http/v_2_8_2/orders/history.py +36 -0
- js7/api/joc/http/v_2_8_2/orders/orders.py +36 -0
- js7/api/joc/http/v_2_8_2/orders/remove_when_terminated.py +33 -0
- js7/api/joc/http/v_2_8_2/orders/resume.py +36 -0
- js7/api/joc/http/v_2_8_2/orders/suspend.py +36 -0
- js7/api/joc/http/v_2_8_2/settings/settings.py +28 -0
- js7/api/joc/http/v_2_8_2/settings/store.py +36 -0
- js7/api/joc/http/v_2_8_2/tasks/history.py +36 -0
- js7/api/joc/http/v_2_8_2/workflow/transition.py +36 -0
- js7/api/joc/http/v_2_8_2/workflow/workflow.py +36 -0
- js7/api/joc/http/v_2_8_2/workflows/resume.py +36 -0
- js7/api/joc/http/v_2_8_2/workflows/skip.py +36 -0
- js7/api/joc/http/v_2_8_2/workflows/stop.py +36 -0
- js7/api/joc/http/v_2_8_2/workflows/suspend.py +36 -0
- js7/api/joc/http/v_2_8_2/workflows/unskip.py +36 -0
- js7/api/joc/http/v_2_8_2/workflows/unstop.py +36 -0
- js7/api/joc/http/v_2_8_2/workflows/workflows.py +36 -0
- js7/api/joc/interface/dispatcher.py +76 -0
- js7/api/joc/interface/interface.py +8 -0
- js7/api/joc/interface/resolver.py +75 -0
- js7/client/action/agent/confirm_node_loss_agent_action.py +75 -0
- js7/client/action/agent/delete_subagent_action.py +77 -0
- js7/client/action/agent/delete_subagent_clusters_action.py +75 -0
- js7/client/action/agent/deploy_cluster_agents_action.py +75 -0
- js7/client/action/agent/deploy_standalone_agents_action.py +75 -0
- js7/client/action/agent/deploy_subagent_clusters_action.py +75 -0
- js7/client/action/agent/disable_standalone_agents_action.py +75 -0
- js7/client/action/agent/disable_subagents_action.py +75 -0
- js7/client/action/agent/enable_standalone_agents_action.py +75 -0
- js7/client/action/agent/enable_subagents_action.py +75 -0
- js7/client/action/agent/export_agents_action.py +101 -0
- js7/client/action/agent/get_agents_status_action.py +55 -0
- js7/client/action/agent/import_agents_action.py +139 -0
- js7/client/action/agent/remove_agent_action.py +79 -0
- js7/client/action/agent/reset_agents_action.py +79 -0
- js7/client/action/agent/reset_subagent_action.py +79 -0
- js7/client/action/agent/revoke_cluster_agents_action.py +75 -0
- js7/client/action/agent/revoke_standalone_agents_action.py +75 -0
- js7/client/action/agent/revoke_subagent_clusters_action.py +75 -0
- js7/client/action/agent/store_cluster_agents_action.py +99 -0
- js7/client/action/agent/store_standalone_agents_action.py +87 -0
- js7/client/action/agent/store_subagent_clusters_action.py +83 -0
- js7/client/action/agent/store_subagents_action.py +97 -0
- js7/client/action/agent/switchover_agent_action.py +75 -0
- js7/client/action/controller/appoint_nodes_controller_action.py +67 -0
- js7/client/action/controller/cancel_and_restart_controller_action.py +72 -0
- js7/client/action/controller/cancel_controller_action.py +71 -0
- js7/client/action/controller/confirm_cluster_node_loss_action.py +68 -0
- js7/client/action/controller/get_controller_components_action.py +41 -0
- js7/client/action/controller/get_controller_status_action.py +72 -0
- js7/client/action/controller/register_controller_action.py +93 -0
- js7/client/action/controller/restart_controller_action.py +72 -0
- js7/client/action/controller/switchover_controller_cluster_action.py +67 -0
- js7/client/action/controller/terminate_controller_action.py +72 -0
- js7/client/action/controller/test_controller_instance_action.py +65 -0
- js7/client/action/controller/unregister_controller_action.py +68 -0
- js7/client/action/daily_plan/cancel_orders_action.py +59 -0
- js7/client/action/daily_plan/copy_orders_action.py +108 -0
- js7/client/action/daily_plan/create_projections_action.py +24 -0
- js7/client/action/daily_plan/delete_orders_action.py +80 -0
- js7/client/action/daily_plan/delete_submissions_action.py +83 -0
- js7/client/action/daily_plan/generate_orders_action.py +121 -0
- js7/client/action/daily_plan/get_calendar_projections_action.py +59 -0
- js7/client/action/daily_plan/get_orders_action.py +70 -0
- js7/client/action/daily_plan/get_projection_dates_action.py +59 -0
- js7/client/action/daily_plan/modify_orders_action.py +130 -0
- js7/client/action/daily_plan/submit_orders_action.py +79 -0
- js7/client/action/helper/decrypt_action.py +82 -0
- js7/client/action/helper/encrypt_action.py +87 -0
- js7/client/action/iam/block_account_action.py +71 -0
- js7/client/action/iam/change_account_password_action.py +96 -0
- js7/client/action/iam/disable_accounts_action.py +75 -0
- js7/client/action/iam/enable_accounts_action.py +75 -0
- js7/client/action/iam/get_account_permissions_action.py +75 -0
- js7/client/action/iam/get_accounts_action.py +76 -0
- js7/client/action/iam/get_blocked_accounts_action.py +76 -0
- js7/client/action/iam/get_folder_permissions_action.py +112 -0
- js7/client/action/iam/get_identity_service_settings_action.py +70 -0
- js7/client/action/iam/get_identity_services_action.py +102 -0
- js7/client/action/iam/get_permissions_action.py +113 -0
- js7/client/action/iam/get_roles_action.py +57 -0
- js7/client/action/iam/remove_accounts_action.py +75 -0
- js7/client/action/iam/remove_folder_permissions_action.py +91 -0
- js7/client/action/iam/remove_identity_service_action.py +67 -0
- js7/client/action/iam/remove_permissions_action.py +88 -0
- js7/client/action/iam/remove_roles_action.py +75 -0
- js7/client/action/iam/rename_account_action.py +83 -0
- js7/client/action/iam/rename_folder_permissions_action.py +100 -0
- js7/client/action/iam/rename_identity_service_action.py +75 -0
- js7/client/action/iam/rename_permission_action.py +103 -0
- js7/client/action/iam/rename_role_action.py +83 -0
- js7/client/action/iam/reset_account_passwords_action.py +75 -0
- js7/client/action/iam/set_folder_permissions_action.py +96 -0
- js7/client/action/iam/set_permissions_action.py +91 -0
- js7/client/action/iam/store_account_action.py +69 -0
- js7/client/action/iam/store_identity_service_action.py +75 -0
- js7/client/action/iam/store_identity_service_settings_action.py +74 -0
- js7/client/action/iam/store_role_action.py +79 -0
- js7/client/action/iam/unblock_accounts_action.py +67 -0
- js7/client/action/inventory/deploy_configurations_action.py +138 -0
- js7/client/action/inventory/export_configurations_action.py +203 -0
- js7/client/action/inventory/export_folders_action.py +160 -0
- js7/client/action/inventory/get_change_dependencies_action.py +161 -0
- js7/client/action/inventory/get_changes_action.py +59 -0
- js7/client/action/inventory/get_git_credentials_action.py +29 -0
- js7/client/action/inventory/git_add_action.py +72 -0
- js7/client/action/inventory/git_checkout_action.py +88 -0
- js7/client/action/inventory/git_clone_action.py +84 -0
- js7/client/action/inventory/git_commit_action.py +80 -0
- js7/client/action/inventory/git_pull_action.py +72 -0
- js7/client/action/inventory/git_push_action.py +76 -0
- js7/client/action/inventory/import_configurations_action.py +153 -0
- js7/client/action/inventory/import_deploy_configurations_action.py +188 -0
- js7/client/action/inventory/read_from_local_repository_action.py +67 -0
- js7/client/action/inventory/recall_folder_action.py +89 -0
- js7/client/action/inventory/recall_released_configuration_action.py +75 -0
- js7/client/action/inventory/release_configuartions_action.py +89 -0
- js7/client/action/inventory/remove_configurations_action.py +77 -0
- js7/client/action/inventory/remove_configurations_from_trash_action.py +80 -0
- js7/client/action/inventory/remove_folder_action.py +67 -0
- js7/client/action/inventory/remove_folder_from_trash_action.py +69 -0
- js7/client/action/inventory/remove_git_credentials_action.py +53 -0
- js7/client/action/inventory/remove_repository_configuration_action.py +84 -0
- js7/client/action/inventory/restore_configuration_from_trash_action.py +84 -0
- js7/client/action/inventory/revalidate_folder_action.py +46 -0
- js7/client/action/inventory/revoke_configurations_action.py +86 -0
- js7/client/action/inventory/store_configuration_action.py +79 -0
- js7/client/action/inventory/store_git_credentials_action.py +99 -0
- js7/client/action/inventory/store_repository_configuration_action.py +124 -0
- js7/client/action/inventory/update_repository_configuration_action.py +85 -0
- js7/client/action/inventory/validate_configuration_action.py +58 -0
- js7/client/action/joc/get_components_versions_action.py +57 -0
- js7/client/action/joc/get_license_info_action.py +22 -0
- js7/client/action/joc/get_settings_action.py +19 -0
- js7/client/action/joc/get_version_action.py +17 -0
- js7/client/action/joc/restart_proxies_action.py +50 -0
- js7/client/action/joc/restart_service_action.py +74 -0
- js7/client/action/joc/run_service_action.py +74 -0
- js7/client/action/joc/store_settings_action.py +62 -0
- js7/client/action/joc/switch_over_action.py +89 -0
- js7/client/action/order/add_orders_action.py +115 -0
- js7/client/action/order/cancel_orders_action.py +93 -0
- js7/client/action/order/confirm_orders_action.py +86 -0
- js7/client/action/order/continue_orders_action.py +86 -0
- js7/client/action/order/get_order_history_action.py +84 -0
- js7/client/action/order/get_orders_action.py +83 -0
- js7/client/action/order/remove_terminated_orders_action.py +86 -0
- js7/client/action/order/resume_orders_action.py +102 -0
- js7/client/action/order/suspend_orders_action.py +97 -0
- js7/client/action/task/get_task_history_info_action.py +88 -0
- js7/client/action/workflow/get_workflow_versions_action.py +131 -0
- js7/client/action/workflow/resume_workflows_action.py +76 -0
- js7/client/action/workflow/set_workflow_version_as_current_action.py +86 -0
- js7/client/action/workflow/skip_job_instructions_action.py +83 -0
- js7/client/action/workflow/stop_job_instructions_action.py +83 -0
- js7/client/action/workflow/suspend_workflows_action.py +76 -0
- js7/client/action/workflow/unskip_job_instructions_action.py +83 -0
- js7/client/action/workflow/unstop_job_instructions_action.py +79 -0
- js7/client/auth/auth_provider.py +109 -0
- js7/client/auth/login.py +34 -0
- js7/client/auth/logout.py +22 -0
- js7/client/client.py +250 -0
- js7/client/context.py +40 -0
- js7/client/feature/agent/agent.py +26 -0
- js7/client/feature/agent/deploy.py +134 -0
- js7/client/feature/agent/manage.py +363 -0
- js7/client/feature/agent/operate.py +577 -0
- js7/client/feature/controller/controller.py +19 -0
- js7/client/feature/controller/manage.py +214 -0
- js7/client/feature/controller/operate.py +274 -0
- js7/client/feature/daily_plan/daily_plan.py +14 -0
- js7/client/feature/daily_plan/manage.py +179 -0
- js7/client/feature/daily_plan/operate.py +354 -0
- js7/client/feature/iam/iam.py +14 -0
- js7/client/feature/iam/manage.py +1311 -0
- js7/client/feature/inventory/inventory.py +13 -0
- js7/client/feature/inventory/manage.py +943 -0
- js7/client/feature/inventory/manage_repository.py +533 -0
- js7/client/feature/joc/joc.py +18 -0
- js7/client/feature/joc/manage.py +102 -0
- js7/client/feature/joc/operate.py +185 -0
- js7/client/feature/order/manage.py +79 -0
- js7/client/feature/order/operate.py +346 -0
- js7/client/feature/order/order.py +18 -0
- js7/client/feature/task/task.py +54 -0
- js7/client/feature/workflow/manage.py +54 -0
- js7/client/feature/workflow/operate.py +336 -0
- js7/client/feature/workflow/workflow.py +19 -0
- js7/java/lib/3rd-party/bcpg-jdk15to18-1.78.1.jar +0 -0
- js7/java/lib/3rd-party/bcpkix-jdk15to18-1.78.1.jar +0 -0
- js7/java/lib/3rd-party/bcprov-jdk15to18-1.78.1.jar +0 -0
- js7/java/lib/3rd-party/bcutil-jdk15to18-1.78.1.jar +0 -0
- js7/java/lib/3rd-party/commons-io-2.15.1.jar +0 -0
- js7/java/lib/3rd-party/commons-lang3-3.14.0.jar +0 -0
- js7/java/lib/3rd-party/jackson-core-2.14.2.jar +0 -0
- js7/java/lib/3rd-party/jackson-databind-2.14.2.jar +0 -0
- js7/java/lib/3rd-party/jackson-dataformat-xml-2.14.2.jar +0 -0
- js7/java/lib/3rd-party/jakarta.annotation-api-2.1.1.jar +0 -0
- js7/java/lib/3rd-party/javax.activation-api-1.2.0.jar +0 -0
- js7/java/lib/3rd-party/jaxb-api-2.4.0-b180830.0359.jar +0 -0
- js7/java/lib/3rd-party/org.apache.logging.log4j.log4j-api-2.23.1.jar +0 -0
- js7/java/lib/3rd-party/org.apache.logging.log4j.log4j-core-2.23.1.jar +0 -0
- js7/java/lib/3rd-party/org.apache.logging.log4j.log4j-slf4j2-impl-2.23.1.jar +0 -0
- js7/java/lib/3rd-party/org.slf4j.slf4j-api-2.0.13.jar +0 -0
- js7/java/lib/3rd-party/stax2-api-4.2.1.jar +0 -0
- js7/java/lib/3rd-party/woodstox-core-6.5.0.jar +0 -0
- js7/java/lib/sos/sos-commons-encryption-2.7.3.jar +0 -0
- js7/java/lib/sos/sos-commons-exception-2.7.3.jar +0 -0
- js7/java/lib/sos/sos-commons-sign-2.7.3.jar +0 -0
- js7/java/lib/sos/sos-webservices-json-2.7.3.jar +0 -0
- js7/model/__init__.py +132 -0
- js7/model/configuration/auth_configuration.py +24 -0
- js7/model/configuration/client_configuration.py +6 -0
- js7/model/configuration/http_configuration.py +10 -0
- js7/model/error/http/joc_exceptions.py +151 -0
- js7/model/private/api/endpoint.py +30 -0
- js7/model/private/http/joc/joc_v_2_8_2.py +3666 -0
- js7/model/public/client/common/__init__.py +27 -0
- js7/model/public/client/common/accounts.py +21 -0
- js7/model/public/client/common/audit_log.py +8 -0
- js7/model/public/client/common/changes.py +18 -0
- js7/model/public/client/common/configurations.py +53 -0
- js7/model/public/client/common/cycle.py +12 -0
- js7/model/public/client/common/git_credentials.py +12 -0
- js7/model/public/client/common/identity_service.py +14 -0
- js7/model/public/client/common/schedule_time.py +50 -0
- js7/model/public/client/common/store_agents.py +96 -0
- js7/model/public/client/enum/__init__.py +19 -0
- js7/model/public/client/enum/object_types.py +48 -0
- js7/model/public/client/enum/operation_type.py +11 -0
- js7/model/public/client/enum/order_priority.py +9 -0
- js7/model/public/client/filter/__init__.py +35 -0
- js7/model/public/client/filter/daily_plan_order_filters.py +255 -0
- js7/model/public/client/filter/element/__init__.py +3 -0
- js7/model/public/client/filter/element/folder.py +6 -0
- js7/model/public/client/filter/element/workflow_id.py +10 -0
- js7/model/public/client/filter/export_filter.py +52 -0
- js7/model/public/client/filter/export_folders_filter.py +34 -0
- js7/model/public/client/filter/get_order_filter.py +59 -0
- js7/model/public/client/filter/order_history_filter.py +113 -0
- js7/model/public/client/filter/resume_order_filter.py +45 -0
- js7/model/public/client/filter/suspend_order_filter.py +44 -0
- js7/model/public/client/filter/tasks_filter.py +50 -0
- js7/model/public/client/input/__init__.py +2 -0
- js7/model/public/client/input/add_order.py +50 -0
- js7/service/http_service.py +206 -0
- js7/util/bytes_converter/bytes_to_archive_bytes.py +52 -0
- js7/util/bytes_converter/bytes_to_file.py +12 -0
- js7/util/bytes_converter/files_to_bytes.py +52 -0
- js7/util/bytes_converter/read_bytes_archive_files_to_bytes.py +69 -0
- js7/util/bytes_converter/sign_to_bytes.py +106 -0
- js7/util/check_matching_version.py +20 -0
- js7/util/detect_archive_type.py +37 -0
- js7/util/str_converter/order_id_to_order_name.py +5 -0
- js7/validator/http/joc_http_status_validator.py +155 -0
- js7_client_python-2.0.1.0.dist-info/LICENSE +674 -0
- js7_client_python-2.0.1.0.dist-info/METADATA +763 -0
- js7_client_python-2.0.1.0.dist-info/RECORD +389 -0
- js7_client_python-2.0.1.0.dist-info/WHEEL +5 -0
- js7_client_python-2.0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from typing import Any, Dict, List, Literal, Optional, Tuple, Union
|
|
3
|
+
|
|
4
|
+
from ...client import Context
|
|
5
|
+
from ....model.public.client.common.audit_log import AuditLog
|
|
6
|
+
from ....model.private.http.joc.joc_v_2_8_2 import OK as OK_V_2_8_2
|
|
7
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
8
|
+
|
|
9
|
+
from ....util.bytes_converter.bytes_to_archive_bytes import bytes_to_archive_bytes
|
|
10
|
+
from ....util.bytes_converter.read_bytes_archive_files_to_bytes import read_bytes_archive_files_to_bytes
|
|
11
|
+
from ....util.bytes_converter.files_to_bytes import files_to_bytes
|
|
12
|
+
from ....util.check_matching_version import check_matching_version
|
|
13
|
+
from ....util.detect_archive_type import detect_archive_type
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def import_configurations_action(
|
|
17
|
+
*,
|
|
18
|
+
context: Context,
|
|
19
|
+
file_path: Union[Path, str],
|
|
20
|
+
archive_format: Literal["ZIP", "TAR_GZ"],
|
|
21
|
+
overwrite: bool,
|
|
22
|
+
target_folder: Optional[str],
|
|
23
|
+
suffix: Optional[str],
|
|
24
|
+
prefix: Optional[str],
|
|
25
|
+
overwrite_tags: bool,
|
|
26
|
+
audit_log: Optional[AuditLog]
|
|
27
|
+
) -> bool:
|
|
28
|
+
|
|
29
|
+
if check_matching_version(min="2.6.5", max="2.8.3", check=context.version):
|
|
30
|
+
options, archive = _build_v_2_8_2_request(
|
|
31
|
+
file_path=Path(file_path),
|
|
32
|
+
archive_format=archive_format,
|
|
33
|
+
overwrite=overwrite,
|
|
34
|
+
target_folder=target_folder,
|
|
35
|
+
suffix=suffix,
|
|
36
|
+
prefix=prefix,
|
|
37
|
+
overwrite_tags=overwrite_tags,
|
|
38
|
+
audit_log=audit_log
|
|
39
|
+
)
|
|
40
|
+
else:
|
|
41
|
+
raise RuntimeError(f"Version {context.version} is not compatible with building the request.")
|
|
42
|
+
|
|
43
|
+
# Calls the dispatcher for the matching JOC version
|
|
44
|
+
result = context.joc_api.dispatch(endpoint_id="inventory/import", call=EndpointCall(
|
|
45
|
+
http_service=context.http_service,
|
|
46
|
+
access_token=context.auth_provider.login(),
|
|
47
|
+
payload=archive,
|
|
48
|
+
options=options
|
|
49
|
+
))
|
|
50
|
+
|
|
51
|
+
if isinstance(result, OK_V_2_8_2):
|
|
52
|
+
return bool(result.ok)
|
|
53
|
+
|
|
54
|
+
raise RuntimeError(f"Unexpected response type: {type(result).__name__}")
|
|
55
|
+
|
|
56
|
+
#---------------------------------------#
|
|
57
|
+
# Build 2.8.2 request #
|
|
58
|
+
# Returns: [Formdata, List of archives] #
|
|
59
|
+
#---------------------------------------#
|
|
60
|
+
def _build_v_2_8_2_request(
|
|
61
|
+
*,
|
|
62
|
+
file_path: Path,
|
|
63
|
+
archive_format: Literal["ZIP", "TAR_GZ"],
|
|
64
|
+
overwrite: bool,
|
|
65
|
+
target_folder: Optional[str],
|
|
66
|
+
suffix: Optional[str],
|
|
67
|
+
prefix: Optional[str],
|
|
68
|
+
overwrite_tags: bool,
|
|
69
|
+
audit_log: Optional[AuditLog]
|
|
70
|
+
) -> Tuple[Dict[str, Any], bytes]:
|
|
71
|
+
|
|
72
|
+
# Validate: file_path
|
|
73
|
+
if not file_path.exists():
|
|
74
|
+
raise ValueError(f"File path does not exist: {file_path}")
|
|
75
|
+
|
|
76
|
+
# Validate: archive_format
|
|
77
|
+
if archive_format not in ("ZIP", "TAR_GZ"):
|
|
78
|
+
raise ValueError("'archive_format' must be 'ZIP' or 'TAR_GZ'.")
|
|
79
|
+
|
|
80
|
+
# Build: files_as_bytes
|
|
81
|
+
files_as_bytes = files_to_bytes(
|
|
82
|
+
file_path=file_path,
|
|
83
|
+
filter_suffixes=[".json", ".zip", ".tar.gz", ".tgz"]
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
if not files_as_bytes:
|
|
87
|
+
raise ValueError(
|
|
88
|
+
"No matching files found for import. "
|
|
89
|
+
"Expected: '*.json', '*.zip', '*.tar.gz', '*.tgz'."
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
# Build: res_files
|
|
93
|
+
files: List[Tuple[str, bytes]] = []
|
|
94
|
+
|
|
95
|
+
for path, file in files_as_bytes:
|
|
96
|
+
# Skips invalid filenames
|
|
97
|
+
if path.rsplit("/", 1)[-1].startswith((".", "_", "-")):
|
|
98
|
+
continue
|
|
99
|
+
|
|
100
|
+
archive_type = detect_archive_type(file)
|
|
101
|
+
|
|
102
|
+
if not archive_type and path.endswith(".json"):
|
|
103
|
+
files.append((path, file))
|
|
104
|
+
else:
|
|
105
|
+
arch_files = read_bytes_archive_files_to_bytes(
|
|
106
|
+
file=file,
|
|
107
|
+
filter_suffixes=[".json"]
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
if not arch_files:
|
|
111
|
+
continue
|
|
112
|
+
|
|
113
|
+
for arch_path, arch_file in arch_files:
|
|
114
|
+
# Skips invalid filenames
|
|
115
|
+
if arch_path.rsplit("/", 1)[-1].startswith((".", "_", "-")):
|
|
116
|
+
continue
|
|
117
|
+
|
|
118
|
+
# Removes archive suffix
|
|
119
|
+
path = path.split(".")[0]
|
|
120
|
+
|
|
121
|
+
new_path = path + "/" + arch_path
|
|
122
|
+
files.append((new_path, arch_file))
|
|
123
|
+
|
|
124
|
+
# Build: res_archive
|
|
125
|
+
res_archive = bytes_to_archive_bytes(archive_format=archive_format, files=files)
|
|
126
|
+
|
|
127
|
+
# Build: options
|
|
128
|
+
res_options: Dict[str, Any] = {
|
|
129
|
+
"format": archive_format,
|
|
130
|
+
"overwrite": overwrite,
|
|
131
|
+
"overwrite_tags": overwrite_tags
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if target_folder:
|
|
135
|
+
res_options["target_folder"] = target_folder
|
|
136
|
+
|
|
137
|
+
if suffix:
|
|
138
|
+
res_options["suffix"] = suffix
|
|
139
|
+
|
|
140
|
+
if prefix:
|
|
141
|
+
res_options["prefix"] = prefix
|
|
142
|
+
|
|
143
|
+
# Build: audit_log
|
|
144
|
+
if audit_log:
|
|
145
|
+
if audit_log.ticket_link:
|
|
146
|
+
res_options["audit_log_ticket_link"] = audit_log.ticket_link
|
|
147
|
+
if audit_log.comment:
|
|
148
|
+
res_options["audit_log_comment"] = audit_log.comment
|
|
149
|
+
if audit_log.time_spent:
|
|
150
|
+
res_options["audit_log_time_spent"] = audit_log.time_spent
|
|
151
|
+
|
|
152
|
+
# Result
|
|
153
|
+
return res_options, res_archive
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from typing import Any, Dict, List, Literal, Optional, Tuple, Union
|
|
3
|
+
|
|
4
|
+
from cryptography.hazmat.primitives import hashes, serialization
|
|
5
|
+
from cryptography.hazmat.primitives.asymmetric import rsa, ec
|
|
6
|
+
from cryptography.hazmat.backends import default_backend
|
|
7
|
+
|
|
8
|
+
from ...client import Context
|
|
9
|
+
from ....model.public.client.common.audit_log import AuditLog
|
|
10
|
+
from ....model.private.http.joc.joc_v_2_8_2 import OK as OK_V_2_8_2
|
|
11
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
12
|
+
|
|
13
|
+
from ....util.bytes_converter.bytes_to_archive_bytes import bytes_to_archive_bytes
|
|
14
|
+
from ....util.bytes_converter.read_bytes_archive_files_to_bytes import read_bytes_archive_files_to_bytes
|
|
15
|
+
from ....util.bytes_converter.files_to_bytes import files_to_bytes
|
|
16
|
+
from ....util.check_matching_version import check_matching_version
|
|
17
|
+
from ....util.detect_archive_type import detect_archive_type
|
|
18
|
+
from ....util.bytes_converter.sign_to_bytes import sign_to_bytes
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def import_deploy_configurations_action(
|
|
22
|
+
*,
|
|
23
|
+
context: Context,
|
|
24
|
+
controller_id: str,
|
|
25
|
+
file_path: Union[Path, str],
|
|
26
|
+
archive_format: Literal["ZIP", "TAR_GZ"],
|
|
27
|
+
private_key_file: Union[Path, str],
|
|
28
|
+
public_key_file: Optional[Union[Path, str]],
|
|
29
|
+
key_password: Optional[bytes],
|
|
30
|
+
hash_alg: hashes.HashAlgorithm,
|
|
31
|
+
audit_log: Optional[AuditLog]
|
|
32
|
+
) -> bool:
|
|
33
|
+
|
|
34
|
+
if check_matching_version(min="2.6.5", max="2.8.3", check=context.version):
|
|
35
|
+
options, archive = _build_v_2_8_2_request(
|
|
36
|
+
controller_id=controller_id,
|
|
37
|
+
file_path=Path(file_path),
|
|
38
|
+
archive_format=archive_format,
|
|
39
|
+
private_key_file=Path(private_key_file),
|
|
40
|
+
public_key_file=Path(public_key_file) if public_key_file else None,
|
|
41
|
+
key_password=key_password,
|
|
42
|
+
hash_alg=hash_alg,
|
|
43
|
+
audit_log=audit_log
|
|
44
|
+
)
|
|
45
|
+
else:
|
|
46
|
+
raise RuntimeError(f"Version {context.version} is not compatible with building the request.")
|
|
47
|
+
|
|
48
|
+
# Calls the dispatcher for the matching JOC version
|
|
49
|
+
result = context.joc_api.dispatch(endpoint_id="inventory/deployment/import_deploy", call=EndpointCall(
|
|
50
|
+
http_service=context.http_service,
|
|
51
|
+
access_token=context.auth_provider.login(),
|
|
52
|
+
payload=archive,
|
|
53
|
+
options=options
|
|
54
|
+
))
|
|
55
|
+
|
|
56
|
+
if isinstance(result, OK_V_2_8_2):
|
|
57
|
+
return bool(result.ok)
|
|
58
|
+
|
|
59
|
+
raise RuntimeError(f"Unexpected response type: {type(result).__name__}")
|
|
60
|
+
|
|
61
|
+
def get_signature_alg(
|
|
62
|
+
private_key_file: Path,
|
|
63
|
+
key_password: Optional[bytes],
|
|
64
|
+
hash_alg: hashes.HashAlgorithm,
|
|
65
|
+
) -> str:
|
|
66
|
+
|
|
67
|
+
with open(private_key_file, "rb") as f:
|
|
68
|
+
key = serialization.load_pem_private_key(
|
|
69
|
+
f.read(),
|
|
70
|
+
password=key_password,
|
|
71
|
+
backend=default_backend(),
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
if isinstance(key, rsa.RSAPrivateKey):
|
|
75
|
+
key_part = "RSA"
|
|
76
|
+
elif isinstance(key, ec.EllipticCurvePrivateKey):
|
|
77
|
+
key_part = "ECDSA"
|
|
78
|
+
else:
|
|
79
|
+
raise TypeError("Only RSA and ECDSA private keys are supported")
|
|
80
|
+
|
|
81
|
+
return f"{hash_alg.name.upper()}with{key_part}"
|
|
82
|
+
|
|
83
|
+
#-------------------------------#
|
|
84
|
+
# Build 2.8.2 request #
|
|
85
|
+
# Returns: [Formdata, Aarchive] #
|
|
86
|
+
#-------------------------------#
|
|
87
|
+
def _build_v_2_8_2_request(
|
|
88
|
+
*,
|
|
89
|
+
controller_id: str,
|
|
90
|
+
file_path: Path,
|
|
91
|
+
archive_format: Literal["ZIP", "TAR_GZ"],
|
|
92
|
+
private_key_file: Path,
|
|
93
|
+
public_key_file: Optional[Path],
|
|
94
|
+
key_password: Optional[bytes],
|
|
95
|
+
hash_alg: hashes.HashAlgorithm,
|
|
96
|
+
audit_log: Optional[AuditLog]
|
|
97
|
+
) -> Tuple[Dict[str, Any], bytes]:
|
|
98
|
+
|
|
99
|
+
# Validate: controller_id
|
|
100
|
+
if not controller_id:
|
|
101
|
+
raise ValueError(f"'controller_id' is required.")
|
|
102
|
+
|
|
103
|
+
# Validate: file_path
|
|
104
|
+
if not file_path.exists():
|
|
105
|
+
raise ValueError(f"File path does not exist: {file_path}")
|
|
106
|
+
|
|
107
|
+
# Validate: archive_format
|
|
108
|
+
if archive_format not in ("ZIP", "TAR_GZ"):
|
|
109
|
+
raise ValueError("'archive_format' must be 'ZIP' or 'TAR_GZ'.")
|
|
110
|
+
|
|
111
|
+
# Build: files_as_bytes
|
|
112
|
+
files_as_bytes = files_to_bytes(
|
|
113
|
+
file_path=file_path,
|
|
114
|
+
filter_suffixes=[".json", ".zip", ".tar.gz", ".tgz"]
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
if not files_as_bytes:
|
|
118
|
+
raise ValueError(
|
|
119
|
+
"No matching files found for import. "
|
|
120
|
+
"Expected: '*.json', '*.zip', '*.tar.gz', '*.tgz'."
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
# Build: files
|
|
124
|
+
files: List[Tuple[str, bytes]] = []
|
|
125
|
+
|
|
126
|
+
for path, file in files_as_bytes:
|
|
127
|
+
# Skips invalid filenames
|
|
128
|
+
if path.rsplit("/", 1)[-1].startswith((".", "_", "-")):
|
|
129
|
+
continue
|
|
130
|
+
|
|
131
|
+
archive_type = detect_archive_type(file)
|
|
132
|
+
|
|
133
|
+
if not archive_type and path.endswith(".json"):
|
|
134
|
+
files.append((path, file))
|
|
135
|
+
else:
|
|
136
|
+
arch_files = read_bytes_archive_files_to_bytes(
|
|
137
|
+
file=file,
|
|
138
|
+
filter_suffixes=[".json"]
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
if not arch_files:
|
|
142
|
+
continue
|
|
143
|
+
|
|
144
|
+
for arch_path, arch_file in arch_files:
|
|
145
|
+
# Skips invalid filenames
|
|
146
|
+
if arch_path.rsplit("/", 1)[-1].startswith((".", "_", "-")):
|
|
147
|
+
continue
|
|
148
|
+
|
|
149
|
+
# Removes archive suffix
|
|
150
|
+
path = path.split(".")[0]
|
|
151
|
+
|
|
152
|
+
new_path = path + "/" + arch_path
|
|
153
|
+
files.append((new_path, arch_file))
|
|
154
|
+
|
|
155
|
+
# Build: Signing
|
|
156
|
+
files.extend(sign_to_bytes(
|
|
157
|
+
files=files,
|
|
158
|
+
private_key_file=private_key_file,
|
|
159
|
+
public_key_file=public_key_file,
|
|
160
|
+
key_password=key_password,
|
|
161
|
+
hash_alg=hash_alg
|
|
162
|
+
))
|
|
163
|
+
|
|
164
|
+
# Build: res_archive
|
|
165
|
+
res_archive = bytes_to_archive_bytes(archive_format=archive_format, files=files)
|
|
166
|
+
|
|
167
|
+
# Build: options
|
|
168
|
+
res_options: Dict[str, Any] = {
|
|
169
|
+
"controller_id": controller_id,
|
|
170
|
+
"signature_algorithm": get_signature_alg(
|
|
171
|
+
private_key_file=private_key_file,
|
|
172
|
+
key_password=key_password,
|
|
173
|
+
hash_alg=hash_alg
|
|
174
|
+
),
|
|
175
|
+
"format": archive_format,
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
# Build: audit_log
|
|
179
|
+
if audit_log:
|
|
180
|
+
if audit_log.ticket_link:
|
|
181
|
+
res_options["audit_log_ticket_link"] = audit_log.ticket_link
|
|
182
|
+
if audit_log.comment:
|
|
183
|
+
res_options["audit_log_comment"] = audit_log.comment
|
|
184
|
+
if audit_log.time_spent:
|
|
185
|
+
res_options["audit_log_time_spent"] = audit_log.time_spent
|
|
186
|
+
|
|
187
|
+
# Result
|
|
188
|
+
return res_options, res_archive
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
from typing import List, Literal
|
|
2
|
+
|
|
3
|
+
from ...context import Context
|
|
4
|
+
from ....model.public.client.common.configurations import Configuration
|
|
5
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
6
|
+
from ....model.public.client.enum.object_types import ObjectType
|
|
7
|
+
from ....model.private.http.joc.joc_v_2_8_2 import (
|
|
8
|
+
ResponseFolder as ResponseFolder_V_2_8_2,
|
|
9
|
+
ReadFromFilter as ReadFromFilter_V_2_8_2,
|
|
10
|
+
Category as Category_V_2_8_2,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
from ....util.check_matching_version import check_matching_version
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def read_from_local_repository_action(
|
|
17
|
+
*,
|
|
18
|
+
context: Context,
|
|
19
|
+
folder_path: str,
|
|
20
|
+
category: Literal["LOCAL", "ROLLOUT"]
|
|
21
|
+
) -> List[Configuration]:
|
|
22
|
+
|
|
23
|
+
if check_matching_version(min="2.6.5", max="2.8.3", check=context.version):
|
|
24
|
+
request_data = _build_v_2_8_2_request(folder_path=folder_path, category=category)
|
|
25
|
+
else:
|
|
26
|
+
raise RuntimeError(f"Version {context.version} is not compatible with building the request.")
|
|
27
|
+
|
|
28
|
+
# Calls the dispatcher for the matching JOC version
|
|
29
|
+
result = context.joc_api.dispatch(endpoint_id="inventory/repository/read", call=EndpointCall(
|
|
30
|
+
http_service=context.http_service,
|
|
31
|
+
access_token=context.auth_provider.login(),
|
|
32
|
+
payload=request_data,
|
|
33
|
+
options=None
|
|
34
|
+
))
|
|
35
|
+
|
|
36
|
+
if isinstance(result, ResponseFolder_V_2_8_2):
|
|
37
|
+
if not result.items:
|
|
38
|
+
return []
|
|
39
|
+
|
|
40
|
+
return [
|
|
41
|
+
Configuration(
|
|
42
|
+
object_type=ObjectType(item.object_type.value if item.object_type else ""),
|
|
43
|
+
path=item.folder or ""
|
|
44
|
+
)
|
|
45
|
+
for item in result.items
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
raise RuntimeError(f"Unexpected response type: {type(result).__name__}")
|
|
49
|
+
|
|
50
|
+
#---------------------#
|
|
51
|
+
# Build 2.8.2 request #
|
|
52
|
+
#---------------------#
|
|
53
|
+
def _build_v_2_8_2_request(*, folder_path: str, category: Literal["LOCAL", "ROLLOUT"]) -> ReadFromFilter_V_2_8_2:
|
|
54
|
+
# Validates controller id and category
|
|
55
|
+
if not folder_path or not category:
|
|
56
|
+
raise ValueError("'folder_path' and 'category' are required.")
|
|
57
|
+
|
|
58
|
+
# Validate: category
|
|
59
|
+
if category not in ("LOCAL", "ROLLOUT"):
|
|
60
|
+
raise ValueError("'category' must be one of 'LOCAL' or 'ROLLOUT'.")
|
|
61
|
+
|
|
62
|
+
# Result
|
|
63
|
+
return ReadFromFilter_V_2_8_2(
|
|
64
|
+
folder=folder_path,
|
|
65
|
+
category=Category_V_2_8_2(category), # Raises ValueError() if invalid.
|
|
66
|
+
recursive=True
|
|
67
|
+
)
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
from typing import List, Optional
|
|
2
|
+
|
|
3
|
+
from ....model.public.client.common.audit_log import AuditLog
|
|
4
|
+
from ....model.public.client.enum.object_types import ReleaseObjectType
|
|
5
|
+
from ...context import Context
|
|
6
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
7
|
+
from ....model.private.http.joc.joc_v_2_8_2 import (
|
|
8
|
+
CommonConfigurationType as ConfigurationType_V_2_8_2,
|
|
9
|
+
RequestFolder as RequestFolder_V_2_8_2,
|
|
10
|
+
AuditParams as AuditParams_V_2_8_2,
|
|
11
|
+
OK as OK_V_2_8_2,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
from ....util.check_matching_version import check_matching_version
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def recall_folder_action(
|
|
18
|
+
*,
|
|
19
|
+
context: Context,
|
|
20
|
+
folder_path: str,
|
|
21
|
+
filter_object_types: Optional[List[ReleaseObjectType]],
|
|
22
|
+
filter_no_invalid_objects: bool,
|
|
23
|
+
recursive: bool,
|
|
24
|
+
audit_log: Optional[AuditLog]
|
|
25
|
+
) -> bool:
|
|
26
|
+
|
|
27
|
+
if check_matching_version(min="2.6.5", max="2.8.3", check=context.version):
|
|
28
|
+
request_data = _build_v_2_8_2_request(
|
|
29
|
+
folder_path=folder_path,
|
|
30
|
+
filter_object_types=filter_object_types,
|
|
31
|
+
filter_no_invalid_objects=filter_no_invalid_objects,
|
|
32
|
+
recursive=recursive,
|
|
33
|
+
audit_log=audit_log,
|
|
34
|
+
)
|
|
35
|
+
else:
|
|
36
|
+
raise RuntimeError(f"Version {context.version} is not compatible with building the request.")
|
|
37
|
+
|
|
38
|
+
# Calls the dispatcher for the matching JOC version
|
|
39
|
+
result = context.joc_api.dispatch(endpoint_id="inventory/releasables/recall/folder", call=EndpointCall(
|
|
40
|
+
http_service=context.http_service,
|
|
41
|
+
access_token=context.auth_provider.login(),
|
|
42
|
+
payload=request_data,
|
|
43
|
+
options=None,
|
|
44
|
+
))
|
|
45
|
+
|
|
46
|
+
if isinstance(result, OK_V_2_8_2):
|
|
47
|
+
return bool(result.ok)
|
|
48
|
+
|
|
49
|
+
raise RuntimeError(f"Unexpected response type: {type(result).__name__}")
|
|
50
|
+
|
|
51
|
+
#---------------------#
|
|
52
|
+
# Build 2.8.2 request #
|
|
53
|
+
#---------------------#
|
|
54
|
+
def _build_v_2_8_2_request(
|
|
55
|
+
*,
|
|
56
|
+
folder_path: str,
|
|
57
|
+
filter_object_types: Optional[List[ReleaseObjectType]],
|
|
58
|
+
filter_no_invalid_objects: bool,
|
|
59
|
+
recursive: bool,
|
|
60
|
+
audit_log: Optional[AuditLog],
|
|
61
|
+
) -> RequestFolder_V_2_8_2:
|
|
62
|
+
|
|
63
|
+
# Validate: folder_path
|
|
64
|
+
if not folder_path:
|
|
65
|
+
raise ValueError("'folder_path' must not be empty.")
|
|
66
|
+
|
|
67
|
+
# Build: res_audit_log
|
|
68
|
+
res_audit_log = AuditParams_V_2_8_2(
|
|
69
|
+
ticket_link=audit_log.ticket_link,
|
|
70
|
+
comment=audit_log.comment,
|
|
71
|
+
time_spent=audit_log.time_spent
|
|
72
|
+
) if audit_log else None
|
|
73
|
+
|
|
74
|
+
# Build: res_object_types
|
|
75
|
+
res_object_types = [
|
|
76
|
+
ConfigurationType_V_2_8_2(obj_type.value)
|
|
77
|
+
for obj_type in filter_object_types
|
|
78
|
+
] if filter_object_types else None
|
|
79
|
+
|
|
80
|
+
# Result
|
|
81
|
+
return RequestFolder_V_2_8_2(
|
|
82
|
+
controller_id=None,
|
|
83
|
+
path=folder_path,
|
|
84
|
+
recursive=recursive,
|
|
85
|
+
object_types=res_object_types,
|
|
86
|
+
audit_log=res_audit_log,
|
|
87
|
+
only_valid_objects=filter_no_invalid_objects,
|
|
88
|
+
cancel_orders_date_from=None,
|
|
89
|
+
)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
from typing import List, Optional
|
|
2
|
+
|
|
3
|
+
from ...context import Context
|
|
4
|
+
from ....model.public.client.common.configurations import ReleaseConfiguration
|
|
5
|
+
from ....model.public.client.common.audit_log import AuditLog
|
|
6
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
7
|
+
from ....model.private.http.joc.joc_v_2_8_2 import (
|
|
8
|
+
CommonConfigurationType as ConfigurationType_V_2_8_2,
|
|
9
|
+
Releasable as Releasable_V_2_8_2,
|
|
10
|
+
ReleasableRecallFilter as ReleasableRecallFilter_V_2_8_2,
|
|
11
|
+
OK as OK_V_2_8_2,
|
|
12
|
+
AuditParams as AuditParams_V_2_8_2
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
from ....util.check_matching_version import check_matching_version
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def recall_released_configurations_action(
|
|
19
|
+
*,
|
|
20
|
+
context: Context,
|
|
21
|
+
configurations: List[ReleaseConfiguration],
|
|
22
|
+
audit_log: Optional[AuditLog]
|
|
23
|
+
) -> bool:
|
|
24
|
+
|
|
25
|
+
if check_matching_version(min="2.6.5", max="2.8.3", check=context.version):
|
|
26
|
+
request_data = _build_v_2_8_2_request(
|
|
27
|
+
configurations=configurations,
|
|
28
|
+
audit_log=audit_log
|
|
29
|
+
)
|
|
30
|
+
else:
|
|
31
|
+
raise RuntimeError(f"Version {context.version} is not compatible with building the request.")
|
|
32
|
+
|
|
33
|
+
# Calls the dispatcher for the matching JOC version
|
|
34
|
+
result = context.joc_api.dispatch(endpoint_id="inventory/releasables/recall", call=EndpointCall(
|
|
35
|
+
http_service=context.http_service,
|
|
36
|
+
access_token=context.auth_provider.login(),
|
|
37
|
+
payload=request_data,
|
|
38
|
+
options=None,
|
|
39
|
+
))
|
|
40
|
+
|
|
41
|
+
if isinstance(result, OK_V_2_8_2):
|
|
42
|
+
return bool(result.ok)
|
|
43
|
+
|
|
44
|
+
raise RuntimeError(f"Unexpected response type: {type(result).__name__}")
|
|
45
|
+
|
|
46
|
+
#---------------------#
|
|
47
|
+
# Build 2.8.2 request #
|
|
48
|
+
#---------------------#
|
|
49
|
+
def _build_v_2_8_2_request(
|
|
50
|
+
*,
|
|
51
|
+
configurations: List[ReleaseConfiguration],
|
|
52
|
+
audit_log: Optional[AuditLog]
|
|
53
|
+
) -> ReleasableRecallFilter_V_2_8_2:
|
|
54
|
+
|
|
55
|
+
# Build: res_releasables
|
|
56
|
+
res_releasables = [
|
|
57
|
+
Releasable_V_2_8_2(
|
|
58
|
+
path=c.path,
|
|
59
|
+
object_type=ConfigurationType_V_2_8_2(c.object_type.value) # Raises ValueError() if invalid.
|
|
60
|
+
)
|
|
61
|
+
for c in configurations
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
# Build: Audit Log
|
|
65
|
+
res_audit_log = AuditParams_V_2_8_2(
|
|
66
|
+
ticket_link=audit_log.ticket_link,
|
|
67
|
+
comment=audit_log.comment,
|
|
68
|
+
time_spent=audit_log.time_spent
|
|
69
|
+
) if audit_log else None
|
|
70
|
+
|
|
71
|
+
# Result
|
|
72
|
+
return ReleasableRecallFilter_V_2_8_2(
|
|
73
|
+
releasables=res_releasables,
|
|
74
|
+
audit_log=res_audit_log,
|
|
75
|
+
)
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
from typing import List, Optional
|
|
2
|
+
|
|
3
|
+
from ....model.public.client.common.configurations import ReleaseConfiguration
|
|
4
|
+
from ....model.public.client.common.audit_log import AuditLog
|
|
5
|
+
from ...context import Context
|
|
6
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
7
|
+
from ....model.private.http.joc.joc_v_2_8_2 import (
|
|
8
|
+
CommonConfigurationType as ConfigurationType_V_2_8_2,
|
|
9
|
+
CommonRequestFilter as CommonRequestFilter_V_2_8_2,
|
|
10
|
+
AuditParams as AuditParams_V_2_8_2,
|
|
11
|
+
ReleaseFilter as ReleaseFilter_V_2_8_2,
|
|
12
|
+
OK as OK_V_2_8_2
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
from ....util.check_matching_version import check_matching_version
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def release_configuartions_action(
|
|
19
|
+
*,
|
|
20
|
+
context: Context,
|
|
21
|
+
update: Optional[List[ReleaseConfiguration]],
|
|
22
|
+
delete: Optional[List[ReleaseConfiguration]],
|
|
23
|
+
audit_log: Optional[AuditLog]
|
|
24
|
+
) -> bool:
|
|
25
|
+
|
|
26
|
+
if check_matching_version(min="2.6.5", max="2.8.3", check=context.version):
|
|
27
|
+
request_data = _build_v_2_8_2_request(
|
|
28
|
+
update=update,
|
|
29
|
+
delete=delete,
|
|
30
|
+
audit_log=audit_log
|
|
31
|
+
)
|
|
32
|
+
else:
|
|
33
|
+
raise RuntimeError(f"Version {context.version} is not compatible with building the request.")
|
|
34
|
+
|
|
35
|
+
# Calls the dispatcher for the matching JOC version
|
|
36
|
+
result = context.joc_api.dispatch(endpoint_id="inventory/release", call=EndpointCall(
|
|
37
|
+
http_service=context.http_service,
|
|
38
|
+
access_token=context.auth_provider.login(),
|
|
39
|
+
payload=request_data,
|
|
40
|
+
options=None,
|
|
41
|
+
))
|
|
42
|
+
|
|
43
|
+
if isinstance(result, OK_V_2_8_2):
|
|
44
|
+
return bool(result.ok)
|
|
45
|
+
|
|
46
|
+
raise RuntimeError(f"Unexpected response type: {type(result).__name__}")
|
|
47
|
+
|
|
48
|
+
#---------------------#
|
|
49
|
+
# Build 2.8.2 request #
|
|
50
|
+
#---------------------#
|
|
51
|
+
def _build_v_2_8_2_request(*,
|
|
52
|
+
update: Optional[List[ReleaseConfiguration]],
|
|
53
|
+
delete: Optional[List[ReleaseConfiguration]],
|
|
54
|
+
audit_log: Optional[AuditLog]
|
|
55
|
+
) -> ReleaseFilter_V_2_8_2:
|
|
56
|
+
|
|
57
|
+
# Build: Audit log
|
|
58
|
+
res_audit_log = AuditParams_V_2_8_2(
|
|
59
|
+
ticket_link=audit_log.ticket_link,
|
|
60
|
+
comment=audit_log.comment,
|
|
61
|
+
time_spent=audit_log.time_spent
|
|
62
|
+
) if audit_log else None
|
|
63
|
+
|
|
64
|
+
# Build: Update
|
|
65
|
+
res_update = [
|
|
66
|
+
CommonRequestFilter_V_2_8_2(
|
|
67
|
+
path=u.path,
|
|
68
|
+
object_type=ConfigurationType_V_2_8_2(u.object_type.value) # Raises ValueError() if invalid.
|
|
69
|
+
)
|
|
70
|
+
for u in update
|
|
71
|
+
] if update else None
|
|
72
|
+
|
|
73
|
+
# Build: Delete
|
|
74
|
+
res_delete = [
|
|
75
|
+
CommonRequestFilter_V_2_8_2(
|
|
76
|
+
path=d.path,
|
|
77
|
+
object_type=ConfigurationType_V_2_8_2(d.object_type.value) # Raises ValueError() if invalid.
|
|
78
|
+
)
|
|
79
|
+
for d in delete
|
|
80
|
+
] if delete else None
|
|
81
|
+
|
|
82
|
+
# Result
|
|
83
|
+
return ReleaseFilter_V_2_8_2(
|
|
84
|
+
audit_log=res_audit_log,
|
|
85
|
+
delete=res_delete,
|
|
86
|
+
update=res_update,
|
|
87
|
+
add_orders_date_from=None,
|
|
88
|
+
include_late=None,
|
|
89
|
+
)
|