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,79 @@
|
|
|
1
|
+
from typing import Any, Dict, Optional
|
|
2
|
+
|
|
3
|
+
from ....model.public.client.common.configurations import Configuration
|
|
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
|
+
AuditParams as AuditParams_V_2_8_2,
|
|
9
|
+
ConfigurationObject as ConfigurationObject_V_2_8_2,
|
|
10
|
+
CommonConfigurationType as ConfigurationType_V_2_8_2,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
from ....util.check_matching_version import check_matching_version
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def store_configuration_action(
|
|
17
|
+
*,
|
|
18
|
+
context: Context,
|
|
19
|
+
configuration: Configuration,
|
|
20
|
+
payload: Optional[Dict[str, Any]],
|
|
21
|
+
no_invalid: bool,
|
|
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
|
+
configuration=configuration,
|
|
28
|
+
payload=payload,
|
|
29
|
+
no_invalid=no_invalid,
|
|
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/store", 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, ConfigurationObject_V_2_8_2):
|
|
44
|
+
if result.valid is False:
|
|
45
|
+
raise ValueError(f"Configuration is invalid: {result.invalid_msg}")
|
|
46
|
+
return True
|
|
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(
|
|
54
|
+
*,
|
|
55
|
+
configuration: Configuration,
|
|
56
|
+
payload: Optional[Dict[str, Any]],
|
|
57
|
+
no_invalid: bool,
|
|
58
|
+
audit_log: Optional[AuditLog]
|
|
59
|
+
) -> ConfigurationObject_V_2_8_2:
|
|
60
|
+
|
|
61
|
+
# Validate: payload
|
|
62
|
+
if configuration.object_type.value != "FOLDER" and not payload:
|
|
63
|
+
raise ValueError("'payload' is required.")
|
|
64
|
+
|
|
65
|
+
# Build: Audit log
|
|
66
|
+
res_audit_log = AuditParams_V_2_8_2(
|
|
67
|
+
ticket_link=audit_log.ticket_link,
|
|
68
|
+
comment=audit_log.comment,
|
|
69
|
+
time_spent=audit_log.time_spent
|
|
70
|
+
) if audit_log else None
|
|
71
|
+
|
|
72
|
+
# Result
|
|
73
|
+
return ConfigurationObject_V_2_8_2(
|
|
74
|
+
path=configuration.path,
|
|
75
|
+
object_type=ConfigurationType_V_2_8_2(configuration.object_type.value), # Raises ValueError() if invalid.
|
|
76
|
+
configuration=payload,
|
|
77
|
+
audit_log=res_audit_log,
|
|
78
|
+
valid=no_invalid,
|
|
79
|
+
)
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from ...context import Context
|
|
4
|
+
from ....model.public.client.common.audit_log import AuditLog
|
|
5
|
+
from ....model.public.client.common.git_credentials import GitCredentials
|
|
6
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
7
|
+
from ....model.private.http.joc.joc_v_2_8_2 import (
|
|
8
|
+
AuditParams as AuditParams_V_2_8_2,
|
|
9
|
+
AddCredentialsFilter as AddCredentialsFilter_V_2_8_2,
|
|
10
|
+
GitCredentials as GitCredentials_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 store_git_credentials_action(
|
|
18
|
+
*,
|
|
19
|
+
context: Context,
|
|
20
|
+
credentials: GitCredentials,
|
|
21
|
+
audit_log: Optional[AuditLog]
|
|
22
|
+
) -> bool:
|
|
23
|
+
|
|
24
|
+
if check_matching_version(min="2.6.5", max="2.8.3", check=context.version):
|
|
25
|
+
request_data = _build_v_2_8_2_request(
|
|
26
|
+
credentials=credentials,
|
|
27
|
+
audit_log=audit_log
|
|
28
|
+
)
|
|
29
|
+
else:
|
|
30
|
+
raise RuntimeError(f"Version {context.version} is not compatible with building the request.")
|
|
31
|
+
|
|
32
|
+
# Calls the dispatcher for the matching JOC version
|
|
33
|
+
result = context.joc_api.dispatch(endpoint_id="inventory/repository/git/credentials/add", call=EndpointCall(
|
|
34
|
+
http_service=context.http_service,
|
|
35
|
+
access_token=context.auth_provider.login(),
|
|
36
|
+
payload=request_data,
|
|
37
|
+
options=None,
|
|
38
|
+
))
|
|
39
|
+
|
|
40
|
+
if isinstance(result, OK_V_2_8_2):
|
|
41
|
+
return bool(result.ok)
|
|
42
|
+
|
|
43
|
+
raise RuntimeError(f"Unexpected response type: {type(result).__name__}")
|
|
44
|
+
|
|
45
|
+
#---------------------#
|
|
46
|
+
# Build 2.8.2 request #
|
|
47
|
+
#---------------------#
|
|
48
|
+
def _build_v_2_8_2_request(
|
|
49
|
+
*,
|
|
50
|
+
credentials: GitCredentials,
|
|
51
|
+
audit_log: Optional[AuditLog]
|
|
52
|
+
) -> AddCredentialsFilter_V_2_8_2:
|
|
53
|
+
|
|
54
|
+
# Validate: git_account
|
|
55
|
+
if not credentials.git_account:
|
|
56
|
+
raise ValueError("'git_account' is required.")
|
|
57
|
+
|
|
58
|
+
# Validate: username
|
|
59
|
+
if not credentials.username:
|
|
60
|
+
raise ValueError("'username' is required.")
|
|
61
|
+
|
|
62
|
+
# Validate: email
|
|
63
|
+
if not credentials.email:
|
|
64
|
+
raise ValueError("'email' is required.")
|
|
65
|
+
|
|
66
|
+
# Validate: password, personal_access_token and key_file_path
|
|
67
|
+
auth_methods = [credentials.password, credentials.personal_access_token, credentials.keyfile_path]
|
|
68
|
+
if sum(value is not None for value in auth_methods) != 1:
|
|
69
|
+
raise ValueError(
|
|
70
|
+
"Exactly one authentication method must be provided: "
|
|
71
|
+
"'password', 'personal_access_token', or 'keyfile_path'."
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Validate: git_server
|
|
75
|
+
if not credentials.git_server:
|
|
76
|
+
raise ValueError("'git_server' is required.")
|
|
77
|
+
|
|
78
|
+
# Build: Audit Log
|
|
79
|
+
res_audit_log = AuditParams_V_2_8_2(
|
|
80
|
+
ticket_link=audit_log.ticket_link,
|
|
81
|
+
comment=audit_log.comment,
|
|
82
|
+
time_spent=audit_log.time_spent
|
|
83
|
+
) if audit_log else None
|
|
84
|
+
|
|
85
|
+
# Result
|
|
86
|
+
return AddCredentialsFilter_V_2_8_2(
|
|
87
|
+
audit_log=res_audit_log,
|
|
88
|
+
credentials=[
|
|
89
|
+
GitCredentials_V_2_8_2(
|
|
90
|
+
email=credentials.email,
|
|
91
|
+
git_account=credentials.git_account,
|
|
92
|
+
git_server=credentials.git_server,
|
|
93
|
+
keyfile_path=credentials.keyfile_path,
|
|
94
|
+
password=credentials.password,
|
|
95
|
+
personal_access_token=credentials.personal_access_token,
|
|
96
|
+
username=credentials.username
|
|
97
|
+
)
|
|
98
|
+
]
|
|
99
|
+
)
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
from typing import List, Literal, Optional, Union
|
|
2
|
+
|
|
3
|
+
from ...context import Context
|
|
4
|
+
from ....model.public.client.common.audit_log import AuditLog
|
|
5
|
+
from ....model.public.client.common.configurations import DraftConfiguration, DeployConfiguration, ReleaseConfiguration
|
|
6
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
7
|
+
from ....model.private.http.joc.joc_v_2_8_2 import (
|
|
8
|
+
AuditParams as AuditParams_V_2_8_2,
|
|
9
|
+
OK as OK_V_2_8_2,
|
|
10
|
+
CommonConfigurationType as ConfigurationType_V_2_8_2,
|
|
11
|
+
PublishConfiguration as Configuration_V_2_8_2,
|
|
12
|
+
CopyToFilter as CopyToFilter_V_2_8_2,
|
|
13
|
+
Configurations as Configurations_V_2_8_2,
|
|
14
|
+
Config as Config_V_2_8_2
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
from ....util.check_matching_version import check_matching_version
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def store_repository_configuration_action(
|
|
21
|
+
*,
|
|
22
|
+
context: Context,
|
|
23
|
+
controller_id: str,
|
|
24
|
+
category: Literal["LOCAL", "ROLLOUT"],
|
|
25
|
+
configurations: List[Union[DraftConfiguration, DeployConfiguration, ReleaseConfiguration]],
|
|
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
|
+
request_data = _build_v_2_8_2_request(
|
|
31
|
+
controller_id=controller_id,
|
|
32
|
+
category=category,
|
|
33
|
+
configurations=configurations,
|
|
34
|
+
audit_log=audit_log
|
|
35
|
+
)
|
|
36
|
+
else:
|
|
37
|
+
raise RuntimeError(f"Version {context.version} is not compatible with building the request.")
|
|
38
|
+
|
|
39
|
+
# Calls the dispatcher for the matching JOC version
|
|
40
|
+
result = context.joc_api.dispatch(endpoint_id="inventory/repository/store", call=EndpointCall(
|
|
41
|
+
http_service=context.http_service,
|
|
42
|
+
access_token=context.auth_provider.login(),
|
|
43
|
+
payload=request_data,
|
|
44
|
+
options=None,
|
|
45
|
+
))
|
|
46
|
+
|
|
47
|
+
if isinstance(result, OK_V_2_8_2):
|
|
48
|
+
return bool(result.ok)
|
|
49
|
+
|
|
50
|
+
raise RuntimeError(f"Unexpected response type: {type(result).__name__}")
|
|
51
|
+
|
|
52
|
+
#---------------------#
|
|
53
|
+
# Build 2.8.2 request #
|
|
54
|
+
#---------------------#
|
|
55
|
+
def _build_v_2_8_2_request(
|
|
56
|
+
*,
|
|
57
|
+
controller_id: str,
|
|
58
|
+
category: Literal["LOCAL", "ROLLOUT"],
|
|
59
|
+
configurations: List[Union[DraftConfiguration, DeployConfiguration, ReleaseConfiguration]],
|
|
60
|
+
audit_log: Optional[AuditLog]
|
|
61
|
+
) -> CopyToFilter_V_2_8_2:
|
|
62
|
+
|
|
63
|
+
# Validate: controller_id
|
|
64
|
+
if not controller_id:
|
|
65
|
+
raise ValueError("'controller_id' is required.")
|
|
66
|
+
|
|
67
|
+
# Validate: category
|
|
68
|
+
if category not in ("LOCAL", "ROLLOUT"):
|
|
69
|
+
raise ValueError("'category' must be one of 'LOCAL' or 'ROLLOUT'.")
|
|
70
|
+
|
|
71
|
+
# Validates configurations
|
|
72
|
+
if not configurations:
|
|
73
|
+
raise ValueError("At least one configuration in 'configurations' is required.")
|
|
74
|
+
|
|
75
|
+
# Build: Configuration
|
|
76
|
+
res_configuration = Configurations_V_2_8_2(
|
|
77
|
+
draft_configurations=[
|
|
78
|
+
Config_V_2_8_2(configuration=Configuration_V_2_8_2(
|
|
79
|
+
commit_id=None,
|
|
80
|
+
object_type=ConfigurationType_V_2_8_2(c.object_type.value),
|
|
81
|
+
path=c.path,
|
|
82
|
+
recursive=c.recursive
|
|
83
|
+
))
|
|
84
|
+
for c in configurations
|
|
85
|
+
if isinstance(c, DraftConfiguration)
|
|
86
|
+
],
|
|
87
|
+
|
|
88
|
+
deploy_configurations=[
|
|
89
|
+
Config_V_2_8_2(configuration=Configuration_V_2_8_2(
|
|
90
|
+
commit_id=c.commit_id,
|
|
91
|
+
object_type=ConfigurationType_V_2_8_2(c.object_type.value),
|
|
92
|
+
path=c.path,
|
|
93
|
+
recursive=c.recursive
|
|
94
|
+
))
|
|
95
|
+
for c in configurations
|
|
96
|
+
if isinstance(c, DeployConfiguration)
|
|
97
|
+
],
|
|
98
|
+
|
|
99
|
+
released_configurations=[
|
|
100
|
+
Config_V_2_8_2(configuration=Configuration_V_2_8_2(
|
|
101
|
+
commit_id=None,
|
|
102
|
+
object_type=ConfigurationType_V_2_8_2(c.object_type.value),
|
|
103
|
+
path=c.path,
|
|
104
|
+
recursive=c.recursive
|
|
105
|
+
))
|
|
106
|
+
for c in configurations
|
|
107
|
+
if isinstance(c, ReleaseConfiguration)
|
|
108
|
+
]
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
# Build: Audit Log
|
|
112
|
+
res_audit_log = AuditParams_V_2_8_2(
|
|
113
|
+
ticket_link=audit_log.ticket_link,
|
|
114
|
+
comment=audit_log.comment,
|
|
115
|
+
time_spent=audit_log.time_spent
|
|
116
|
+
) if audit_log else None
|
|
117
|
+
|
|
118
|
+
# Result
|
|
119
|
+
return CopyToFilter_V_2_8_2(
|
|
120
|
+
controller_id=controller_id,
|
|
121
|
+
local=res_configuration if category == "LOCAL" else None,
|
|
122
|
+
rollout=res_configuration if category == "ROLLOUT" else None,
|
|
123
|
+
audit_log=res_audit_log,
|
|
124
|
+
)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
from typing import List, Literal, Optional
|
|
2
|
+
|
|
3
|
+
from ...context import Context
|
|
4
|
+
from ....model.public.client.common.audit_log import AuditLog
|
|
5
|
+
from ....model.public.client.common.configurations import Configuration
|
|
6
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
7
|
+
from ....model.private.http.joc.joc_v_2_8_2 import (
|
|
8
|
+
AuditParams as AuditParams_V_2_8_2,
|
|
9
|
+
OK as OK_V_2_8_2,
|
|
10
|
+
CommonConfigurationType as ConfigurationType_V_2_8_2,
|
|
11
|
+
Category as Category_V_2_8_2,
|
|
12
|
+
PublishConfiguration as Configuration_V_2_8_2,
|
|
13
|
+
UpdateFromFilter as UpdateFromFilter_V_2_8_2,
|
|
14
|
+
Config as Config_V_2_8_2
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
from ....util.check_matching_version import check_matching_version
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def update_repository_configuration_action(
|
|
21
|
+
*,
|
|
22
|
+
context: Context,
|
|
23
|
+
configurations: List[Configuration],
|
|
24
|
+
category: Literal["LOCAL", "ROLLOUT"],
|
|
25
|
+
audit_log: Optional[AuditLog]
|
|
26
|
+
) -> bool:
|
|
27
|
+
|
|
28
|
+
if check_matching_version(min="2.6.5", max="2.8.3", check=context.version):
|
|
29
|
+
request_data = _build_v_2_8_2_request(configurations=configurations, category=category, audit_log=audit_log)
|
|
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/repository/update", 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[Configuration],
|
|
52
|
+
category: Literal["LOCAL", "ROLLOUT"],
|
|
53
|
+
audit_log: Optional[AuditLog]
|
|
54
|
+
) -> UpdateFromFilter_V_2_8_2:
|
|
55
|
+
|
|
56
|
+
# Validates configurations
|
|
57
|
+
if not configurations:
|
|
58
|
+
raise ValueError("At least one configuration in 'Configurations' is required.")
|
|
59
|
+
|
|
60
|
+
# Validate: category
|
|
61
|
+
if category not in ("LOCAL", "ROLLOUT"):
|
|
62
|
+
raise ValueError("'category' must be one of 'LOCAL' or 'ROLLOUT'.")
|
|
63
|
+
|
|
64
|
+
# Build: Configurations
|
|
65
|
+
res_configurations = [
|
|
66
|
+
Config_V_2_8_2(configuration=Configuration_V_2_8_2(
|
|
67
|
+
object_type=ConfigurationType_V_2_8_2(c.object_type.value), # Raises ValueError() if invalid.
|
|
68
|
+
path=c.path
|
|
69
|
+
))
|
|
70
|
+
for c in configurations
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
# Build: Audit Log
|
|
74
|
+
res_audit_log = AuditParams_V_2_8_2(
|
|
75
|
+
ticket_link=audit_log.ticket_link,
|
|
76
|
+
comment=audit_log.comment,
|
|
77
|
+
time_spent=audit_log.time_spent
|
|
78
|
+
) if audit_log else None
|
|
79
|
+
|
|
80
|
+
# Result
|
|
81
|
+
return UpdateFromFilter_V_2_8_2(
|
|
82
|
+
configurations=res_configurations,
|
|
83
|
+
category=Category_V_2_8_2(category), # Raises ValueError() if invalid.
|
|
84
|
+
audit_log=res_audit_log,
|
|
85
|
+
)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from typing import Any, Dict, Union
|
|
4
|
+
|
|
5
|
+
from ...context import Context
|
|
6
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
7
|
+
from ....model.public.client.enum.object_types import ObjectType
|
|
8
|
+
from ....model.private.http.joc.joc_v_2_8_2 import (
|
|
9
|
+
Validate as Validate_V_2_8_2
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
from ....util.check_matching_version import check_matching_version
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def validate_configuration_action(
|
|
16
|
+
*,
|
|
17
|
+
context: Context,
|
|
18
|
+
object_type: ObjectType,
|
|
19
|
+
file: Union[Path, str, Dict[str, Any]]
|
|
20
|
+
) -> bool:
|
|
21
|
+
|
|
22
|
+
if check_matching_version(min="2.6.5", max="2.8.3", check=context.version):
|
|
23
|
+
request_data = _build_v_2_8_2_request(file)
|
|
24
|
+
else:
|
|
25
|
+
raise RuntimeError(f"Version {context.version} is not compatible with building the request.")
|
|
26
|
+
|
|
27
|
+
# Calls the dispatcher for the matching JOC version
|
|
28
|
+
result = context.joc_api.dispatch(endpoint_id="inventory/validate", call=EndpointCall(
|
|
29
|
+
http_service=context.http_service,
|
|
30
|
+
access_token=context.auth_provider.login(),
|
|
31
|
+
payload=request_data,
|
|
32
|
+
options={ "object_type": object_type },
|
|
33
|
+
))
|
|
34
|
+
|
|
35
|
+
if isinstance(result, Validate_V_2_8_2):
|
|
36
|
+
if result.valid is True:
|
|
37
|
+
return True
|
|
38
|
+
|
|
39
|
+
if result.invalid_msg:
|
|
40
|
+
raise ValueError(result.invalid_msg.split(".executable.script ", 1)[1])
|
|
41
|
+
|
|
42
|
+
return False
|
|
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(file: Union[Path, str, Dict[str, Any]]) -> Dict[str, Any]:
|
|
50
|
+
if isinstance(file, Path):
|
|
51
|
+
with open(file, encoding="utf-8") as f:
|
|
52
|
+
return json.load(f)
|
|
53
|
+
|
|
54
|
+
if isinstance(file, str):
|
|
55
|
+
with open(Path(file), encoding="utf-8") as f:
|
|
56
|
+
return json.load(f)
|
|
57
|
+
|
|
58
|
+
return file
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Optional
|
|
2
|
+
from ...context import Context
|
|
3
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
4
|
+
from ....model.private.http.joc.joc_v_2_8_2 import (
|
|
5
|
+
VersionsFilter as VersionsFilter_V_2_8_2,
|
|
6
|
+
VersionResponse as VersionResponse_V_2_8_2
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from ....util.check_matching_version import check_matching_version
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def get_components_versions_action(
|
|
13
|
+
*,
|
|
14
|
+
context: Context,
|
|
15
|
+
controller_ids: Optional[List[str]],
|
|
16
|
+
agent_ids: Optional[List[str]]
|
|
17
|
+
) -> Dict[str, Any]:
|
|
18
|
+
|
|
19
|
+
if check_matching_version(min="2.6.5", max="2.8.3", check=context.version):
|
|
20
|
+
request_data = _build_v_2_8_2_request(
|
|
21
|
+
controller_ids=controller_ids,
|
|
22
|
+
agent_ids=agent_ids
|
|
23
|
+
)
|
|
24
|
+
else:
|
|
25
|
+
raise RuntimeError(f"Version {context.version} is not compatible with building the request.")
|
|
26
|
+
|
|
27
|
+
# Calls the dispatcher for the matching JOC version
|
|
28
|
+
result = context.joc_api.dispatch(endpoint_id="joc/versions", call=EndpointCall(
|
|
29
|
+
http_service=context.http_service,
|
|
30
|
+
access_token=context.auth_provider.login(),
|
|
31
|
+
payload=request_data,
|
|
32
|
+
options=None
|
|
33
|
+
))
|
|
34
|
+
|
|
35
|
+
if isinstance(result, VersionResponse_V_2_8_2):
|
|
36
|
+
return result.model_dump(mode="json")
|
|
37
|
+
|
|
38
|
+
raise RuntimeError(f"Unexpected response type: {type(result).__name__}")
|
|
39
|
+
|
|
40
|
+
#---------------------#
|
|
41
|
+
# Build 2.8.2 request #
|
|
42
|
+
#---------------------#
|
|
43
|
+
def _build_v_2_8_2_request(
|
|
44
|
+
*,
|
|
45
|
+
controller_ids: Optional[List[str]],
|
|
46
|
+
agent_ids: Optional[List[str]]
|
|
47
|
+
) -> VersionsFilter_V_2_8_2:
|
|
48
|
+
|
|
49
|
+
# Validate: Any of controller_ids or agent_ids
|
|
50
|
+
if not (controller_ids and agent_ids):
|
|
51
|
+
raise ValueError("At least one of 'controller_ids' or 'agent_ids' is required.")
|
|
52
|
+
|
|
53
|
+
# Result
|
|
54
|
+
return VersionsFilter_V_2_8_2(
|
|
55
|
+
controller_ids=controller_ids,
|
|
56
|
+
agent_ids=agent_ids
|
|
57
|
+
)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from typing import Any, Dict, Tuple
|
|
2
|
+
|
|
3
|
+
from ...context import Context
|
|
4
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
5
|
+
from ....model.private.http.joc.joc_v_2_8_2 import (
|
|
6
|
+
Js7LicenseInfo as Js7LicenseInfo_V_2_8_2
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def get_license_info_action(*, context: Context) -> Tuple[bool, Dict[str, Any]]:
|
|
11
|
+
# Calls the dispatcher for the matching JOC version
|
|
12
|
+
result = context.joc_api.dispatch(endpoint_id="joc/license", call=EndpointCall(
|
|
13
|
+
http_service=context.http_service,
|
|
14
|
+
payload=None,
|
|
15
|
+
access_token=context.auth_provider.login(),
|
|
16
|
+
options=None
|
|
17
|
+
))
|
|
18
|
+
|
|
19
|
+
if isinstance(result, Js7LicenseInfo_V_2_8_2):
|
|
20
|
+
return bool(result.valid), result.model_dump(mode="json")
|
|
21
|
+
|
|
22
|
+
raise RuntimeError(f"Unexpected response type: {type(result).__name__}")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from typing import Any, Dict
|
|
2
|
+
from ...context import Context
|
|
3
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
4
|
+
from ....model.private.http.joc.joc_v_2_8_2 import Configuration200 as Configuration200_V_2_8_2
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def get_settings_action(*, context: Context) -> Dict[str, Any]:
|
|
8
|
+
# Calls the dispatcher for the matching JOC version
|
|
9
|
+
result = context.joc_api.dispatch(endpoint_id="settings", call=EndpointCall(
|
|
10
|
+
http_service=context.http_service,
|
|
11
|
+
payload=None,
|
|
12
|
+
access_token=context.auth_provider.login(),
|
|
13
|
+
options=None
|
|
14
|
+
))
|
|
15
|
+
|
|
16
|
+
if isinstance(result, Configuration200_V_2_8_2):
|
|
17
|
+
return result.model_dump(mode="json")
|
|
18
|
+
|
|
19
|
+
raise ValueError("JOC returned no version information.")
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from ...context import Context
|
|
2
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
3
|
+
from ....model.private.http.joc.joc_v_2_8_2 import Version as Version_V_2_8_2
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def get_version_action(*, context: Context) -> str:
|
|
7
|
+
# Calls the dispatcher for the matching JOC version
|
|
8
|
+
result = context.joc_api.dispatch(endpoint_id="joc/version", call=EndpointCall(
|
|
9
|
+
http_service=context.http_service,
|
|
10
|
+
access_token=context.auth_provider.login(),
|
|
11
|
+
))
|
|
12
|
+
|
|
13
|
+
if isinstance(result, Version_V_2_8_2):
|
|
14
|
+
if result.version:
|
|
15
|
+
return result.version
|
|
16
|
+
|
|
17
|
+
raise ValueError("JOC returned no version information.")
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from ...context import Context
|
|
4
|
+
from ....model.public.client.common.audit_log import AuditLog
|
|
5
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
6
|
+
from ....model.private.http.joc.joc_v_2_8_2 import (
|
|
7
|
+
AuditParams as AuditParams_V_2_8_2,
|
|
8
|
+
OK as OK_V_2_8_2,
|
|
9
|
+
ClusterRestart as ClusterRestart_V_2_8_2
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
from ....util.check_matching_version import check_matching_version
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def restart_proxies_action(*, context: Context, audit_log: Optional[AuditLog]) -> bool:
|
|
16
|
+
if check_matching_version(min="2.6.5", max="2.8.3", check=context.version):
|
|
17
|
+
request_data = _build_v_2_8_2_request(audit_log=audit_log)
|
|
18
|
+
else:
|
|
19
|
+
raise RuntimeError(f"Version {context.version} is not compatible with building the request.")
|
|
20
|
+
|
|
21
|
+
# Calls the dispatcher for the matching JOC version
|
|
22
|
+
result = context.joc_api.dispatch(endpoint_id="joc/proxies/restart", call=EndpointCall(
|
|
23
|
+
http_service=context.http_service,
|
|
24
|
+
payload=request_data,
|
|
25
|
+
access_token=context.auth_provider.login(),
|
|
26
|
+
options=None
|
|
27
|
+
))
|
|
28
|
+
|
|
29
|
+
if isinstance(result, OK_V_2_8_2):
|
|
30
|
+
return bool(result.ok)
|
|
31
|
+
|
|
32
|
+
raise RuntimeError(f"Unexpected response type: {type(result).__name__}")
|
|
33
|
+
|
|
34
|
+
#---------------------#
|
|
35
|
+
# Build 2.8.2 request #
|
|
36
|
+
#---------------------#
|
|
37
|
+
def _build_v_2_8_2_request(*, audit_log: Optional[AuditLog]) -> ClusterRestart_V_2_8_2:
|
|
38
|
+
|
|
39
|
+
# Build: audit_log
|
|
40
|
+
res_audit_log = AuditParams_V_2_8_2(
|
|
41
|
+
ticket_link=audit_log.ticket_link,
|
|
42
|
+
comment=audit_log.comment,
|
|
43
|
+
time_spent=audit_log.time_spent
|
|
44
|
+
) if audit_log else None
|
|
45
|
+
|
|
46
|
+
# Result
|
|
47
|
+
return ClusterRestart_V_2_8_2(
|
|
48
|
+
type=None,
|
|
49
|
+
audit_log=res_audit_log
|
|
50
|
+
)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from typing import Literal, Optional
|
|
2
|
+
|
|
3
|
+
from ...context import Context
|
|
4
|
+
from ....model.private.api.endpoint import EndpointCall
|
|
5
|
+
from ....model.public.client.common.audit_log import AuditLog
|
|
6
|
+
from ....model.private.http.joc.joc_v_2_8_2 import (
|
|
7
|
+
AuditParams as AuditParams_V_2_8_2,
|
|
8
|
+
ClusterRestart as ClusterRestart_V_2_8_2,
|
|
9
|
+
ClusterServices as ClusterServices_V_2_8_2,
|
|
10
|
+
ClusterResponse as ClusterResponse_V_2_8_2
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
from ....util.check_matching_version import check_matching_version
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def restart_service_action(
|
|
17
|
+
*,
|
|
18
|
+
context: Context,
|
|
19
|
+
service_type: Literal["cleanup", "cluster", "dailyplan", "history", "lognotification", "monitor"],
|
|
20
|
+
audit_log: Optional[AuditLog]
|
|
21
|
+
) -> bool:
|
|
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(service_type=service_type, audit_log=audit_log)
|
|
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="joc/cluster/restart", call=EndpointCall(
|
|
30
|
+
http_service=context.http_service,
|
|
31
|
+
payload=request_data,
|
|
32
|
+
access_token=context.auth_provider.login(),
|
|
33
|
+
options=None
|
|
34
|
+
))
|
|
35
|
+
|
|
36
|
+
if isinstance(result, ClusterResponse_V_2_8_2):
|
|
37
|
+
if not result.state:
|
|
38
|
+
return False
|
|
39
|
+
|
|
40
|
+
if result.state.value in ["ERROR", "MISSING_CONFIGURATION", "MISSING_HANDLERS", "MISSING_LICENSE", "UNCOMPLETED"]:
|
|
41
|
+
raise Exception(f"Restart of service: {service_type} failed with state: {result.state.value}.")
|
|
42
|
+
|
|
43
|
+
return True
|
|
44
|
+
|
|
45
|
+
raise RuntimeError(f"Unexpected response type: {type(result).__name__}")
|
|
46
|
+
|
|
47
|
+
#---------------------#
|
|
48
|
+
# Build 2.8.2 request #
|
|
49
|
+
#---------------------#
|
|
50
|
+
def _build_v_2_8_2_request(
|
|
51
|
+
*,
|
|
52
|
+
service_type: Literal["cleanup", "cluster", "dailyplan", "history", "lognotification", "monitor"],
|
|
53
|
+
audit_log: Optional[AuditLog]
|
|
54
|
+
) -> ClusterRestart_V_2_8_2:
|
|
55
|
+
|
|
56
|
+
# Validate: service_type
|
|
57
|
+
svc_types = ["cleanup", "cluster", "dailyplan", "history", "lognotification", "monitor"]
|
|
58
|
+
if not service_type:
|
|
59
|
+
raise ValueError("'service_type' is required")
|
|
60
|
+
if service_type not in svc_types:
|
|
61
|
+
raise ValueError(f"Unsupported 'service_type': {service_type}. Supported values are: {svc_types}")
|
|
62
|
+
|
|
63
|
+
# Build: audit_log
|
|
64
|
+
res_audit_log = AuditParams_V_2_8_2(
|
|
65
|
+
ticket_link=audit_log.ticket_link,
|
|
66
|
+
comment=audit_log.comment,
|
|
67
|
+
time_spent=audit_log.time_spent
|
|
68
|
+
) if audit_log else None
|
|
69
|
+
|
|
70
|
+
# Result
|
|
71
|
+
return ClusterRestart_V_2_8_2(
|
|
72
|
+
type=ClusterServices_V_2_8_2(service_type), # Raises ValueError if invalid.
|
|
73
|
+
audit_log=res_audit_log
|
|
74
|
+
)
|