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,943 @@
|
|
|
1
|
+
from functools import cached_property
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from typing import Any, Dict, List, Literal, Optional, Union
|
|
4
|
+
|
|
5
|
+
from cryptography.hazmat.primitives import hashes
|
|
6
|
+
|
|
7
|
+
from .manage_repository import ManageRepository
|
|
8
|
+
|
|
9
|
+
from ...context import Context
|
|
10
|
+
from ....model.public.client.filter.export_filter import ExportFilter
|
|
11
|
+
from ....model.public.client.enum.object_types import ObjectType, ReleaseObjectType
|
|
12
|
+
from ....model.public.client.enum.operation_type import OperationType
|
|
13
|
+
from ....model.public.client.common.changes import Change, ChangeDependencies
|
|
14
|
+
from ....model.public.client.common.audit_log import AuditLog
|
|
15
|
+
from ....model.public.client.filter.export_folders_filter import ExportFoldersFilter
|
|
16
|
+
from ....model.public.client.common.configurations import Configuration, DeployConfiguration, DraftConfiguration, ReleaseConfiguration
|
|
17
|
+
|
|
18
|
+
from ...action.inventory.export_folders_action import export_folders_action
|
|
19
|
+
from ...action.inventory.deploy_configurations_action import deploy_configurations_action
|
|
20
|
+
from ...action.inventory.recall_released_configuration_action import recall_released_configurations_action
|
|
21
|
+
from ...action.inventory.recall_folder_action import recall_folder_action
|
|
22
|
+
from ...action.inventory.release_configuartions_action import release_configuartions_action
|
|
23
|
+
from ...action.inventory.remove_folder_action import remove_folder_action
|
|
24
|
+
from ...action.inventory.remove_folder_from_trash_action import remove_folder_from_trash_action
|
|
25
|
+
from ...action.inventory.remove_configurations_action import remove_configurations_action
|
|
26
|
+
from ...action.inventory.remove_configurations_from_trash_action import remove_configurations_from_trash_action
|
|
27
|
+
from ...action.inventory.restore_configuration_from_trash_action import restore_configuration_from_trash_action
|
|
28
|
+
from ...action.inventory.validate_configuration_action import validate_configuration_action
|
|
29
|
+
from ...action.inventory.revoke_configurations_action import revoke_configurations_action
|
|
30
|
+
from ...action.inventory.store_configuration_action import store_configuration_action
|
|
31
|
+
from ...action.inventory.get_changes_action import get_changes_action
|
|
32
|
+
from ...action.inventory.get_change_dependencies_action import get_change_dependencies_action
|
|
33
|
+
from ...action.inventory.export_configurations_action import export_configurations_action
|
|
34
|
+
from ...action.inventory.import_configurations_action import import_configurations_action
|
|
35
|
+
from ...action.inventory.import_deploy_configurations_action import import_deploy_configurations_action
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class Manage:
|
|
39
|
+
"""Manages inventory objects."""
|
|
40
|
+
|
|
41
|
+
def __init__(self, context: Context):
|
|
42
|
+
self._ctx = context
|
|
43
|
+
|
|
44
|
+
@cached_property
|
|
45
|
+
def repository(self) -> ManageRepository:
|
|
46
|
+
return ManageRepository(context=self._ctx)
|
|
47
|
+
|
|
48
|
+
def deploy_configurations(
|
|
49
|
+
self,
|
|
50
|
+
controller_id: str,
|
|
51
|
+
delete: Optional[List[DeployConfiguration]] = None,
|
|
52
|
+
deploy: Optional[List[DraftConfiguration]] = None,
|
|
53
|
+
redeploy: Optional[List[DeployConfiguration]] = None,
|
|
54
|
+
audit_log: Optional[AuditLog] = None
|
|
55
|
+
) -> bool:
|
|
56
|
+
"""
|
|
57
|
+
Create a deployment for configurations stored in the inventory
|
|
58
|
+
to the specified controller.
|
|
59
|
+
|
|
60
|
+
Please note that the controller processes the deployment asynchronously.
|
|
61
|
+
A return value of `True` only indicates that both JOC and the controller have successfully received the command.
|
|
62
|
+
|
|
63
|
+
The deployment can:
|
|
64
|
+
- Deploy draft configurations,
|
|
65
|
+
- Redeploy already deployed configurations,
|
|
66
|
+
- Remove deployed configurations from the controller.
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
controller_id (str):
|
|
70
|
+
The ID of the controller to which the deployment
|
|
71
|
+
should be applied.
|
|
72
|
+
|
|
73
|
+
delete (Optional[List[DeployConfiguration]]):
|
|
74
|
+
A list of deployed configurations to be removed
|
|
75
|
+
from the controller.
|
|
76
|
+
|
|
77
|
+
deploy (Optional[List[DraftConfiguration]]):
|
|
78
|
+
A list of draft configurations to be deployed.
|
|
79
|
+
|
|
80
|
+
redeploy (Optional[List[DeployConfiguration]]):
|
|
81
|
+
A list of already deployed configurations to be redeployed.
|
|
82
|
+
|
|
83
|
+
audit_log (Optional[AuditLog]):
|
|
84
|
+
Optional audit log information to create an audit entry
|
|
85
|
+
for this operation.
|
|
86
|
+
|
|
87
|
+
Returns:
|
|
88
|
+
bool:
|
|
89
|
+
Returns `True` if the deployment was successful,
|
|
90
|
+
otherwise `False`.
|
|
91
|
+
|
|
92
|
+
Raises:
|
|
93
|
+
ValueError:
|
|
94
|
+
If required arguments are missing or invalid.
|
|
95
|
+
|
|
96
|
+
RuntimeError:
|
|
97
|
+
If the deployment fails or the server version
|
|
98
|
+
is incompatible.
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
return deploy_configurations_action(
|
|
102
|
+
context=self._ctx,
|
|
103
|
+
controller_id=controller_id,
|
|
104
|
+
delete_deployed_configs=delete,
|
|
105
|
+
deploy_draft_configs=deploy,
|
|
106
|
+
redeploy_deployed_configs=redeploy,
|
|
107
|
+
audit_log=audit_log
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
def export_folders(
|
|
111
|
+
self,
|
|
112
|
+
controller_id: str,
|
|
113
|
+
out_dir: Union[Path, str],
|
|
114
|
+
filter: ExportFoldersFilter,
|
|
115
|
+
filename: str = "export.zip",
|
|
116
|
+
archive_format: Literal["ZIP", "TAR_GZ"] = "ZIP",
|
|
117
|
+
audit_log: Optional[AuditLog] = None
|
|
118
|
+
) -> bool:
|
|
119
|
+
"""
|
|
120
|
+
Export inventory configurations as an archive file.
|
|
121
|
+
|
|
122
|
+
Draft, deployed, and released configurations can be exported
|
|
123
|
+
based on the provided filter criteria.
|
|
124
|
+
|
|
125
|
+
Args:
|
|
126
|
+
controller_id (str):
|
|
127
|
+
The ID of the controller associated with the export.
|
|
128
|
+
|
|
129
|
+
out_dir (Union[Path, str]):
|
|
130
|
+
The target directory where the archive file will be created.
|
|
131
|
+
|
|
132
|
+
filter (ExportFoldersFilter):
|
|
133
|
+
Defines which folders and object types should be exported.
|
|
134
|
+
|
|
135
|
+
filename (str):
|
|
136
|
+
The name of the archive file. Defaults to "export.zip".
|
|
137
|
+
|
|
138
|
+
archive_format (Literal["ZIP", "TAR_GZ"]):
|
|
139
|
+
The archive format to be created. Defaults to "ZIP".
|
|
140
|
+
|
|
141
|
+
audit_log (Optional[AuditLog]):
|
|
142
|
+
Optional audit log information to create an audit entry
|
|
143
|
+
for this operation.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
bool:
|
|
147
|
+
Returns `True` if the export was successful,
|
|
148
|
+
otherwise `False`.
|
|
149
|
+
|
|
150
|
+
Raises:
|
|
151
|
+
ValueError:
|
|
152
|
+
If required arguments are missing or invalid.
|
|
153
|
+
|
|
154
|
+
RuntimeError:
|
|
155
|
+
If the export fails or the server version
|
|
156
|
+
is incompatible.
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
return export_folders_action(
|
|
160
|
+
context=self._ctx,
|
|
161
|
+
controller_id=controller_id,
|
|
162
|
+
out_dir=out_dir,
|
|
163
|
+
filename=filename,
|
|
164
|
+
archive_format=archive_format,
|
|
165
|
+
filter=filter,
|
|
166
|
+
audit_log=audit_log
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
def recall_released_configurations(
|
|
170
|
+
self,
|
|
171
|
+
configurations: List[ReleaseConfiguration],
|
|
172
|
+
audit_log: Optional[AuditLog]
|
|
173
|
+
) -> bool:
|
|
174
|
+
"""
|
|
175
|
+
Recall previously released configurations.
|
|
176
|
+
|
|
177
|
+
Args:
|
|
178
|
+
configurations (List[ReleaseConfiguration]):
|
|
179
|
+
The released configurations to be recalled.
|
|
180
|
+
|
|
181
|
+
audit_log (Optional[AuditLog]):
|
|
182
|
+
Optional audit log information to create an audit entry
|
|
183
|
+
for this operation.
|
|
184
|
+
|
|
185
|
+
Returns:
|
|
186
|
+
bool:
|
|
187
|
+
Returns `True` if the recall was successful,
|
|
188
|
+
otherwise `False`.
|
|
189
|
+
|
|
190
|
+
Raises:
|
|
191
|
+
ValueError:
|
|
192
|
+
If required arguments are missing or invalid.
|
|
193
|
+
|
|
194
|
+
RuntimeError:
|
|
195
|
+
If the operation fails or the server version
|
|
196
|
+
is incompatible.
|
|
197
|
+
"""
|
|
198
|
+
|
|
199
|
+
return recall_released_configurations_action(
|
|
200
|
+
context=self._ctx,
|
|
201
|
+
configurations=configurations,
|
|
202
|
+
audit_log=audit_log
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
def recall_folder(
|
|
206
|
+
self,
|
|
207
|
+
folder_path: str,
|
|
208
|
+
filter_object_types: Optional[List[ReleaseObjectType]] = None,
|
|
209
|
+
filter_no_invalid_objects: bool = False,
|
|
210
|
+
recursive: bool = True,
|
|
211
|
+
audit_log: Optional[AuditLog] = None
|
|
212
|
+
) -> bool:
|
|
213
|
+
"""
|
|
214
|
+
Recall released configurations from a folder.
|
|
215
|
+
|
|
216
|
+
Args:
|
|
217
|
+
folder_path (str):
|
|
218
|
+
The path of the folder containing released configurations.
|
|
219
|
+
|
|
220
|
+
filter_object_types (Optional[List[ReleaseObjectType]]):
|
|
221
|
+
Restricts the recall operation to specific object types.
|
|
222
|
+
|
|
223
|
+
filter_no_invalid_objects (bool):
|
|
224
|
+
If `True`, excludes invalid objects from the recall.
|
|
225
|
+
Defaults to `False`.
|
|
226
|
+
|
|
227
|
+
recursive (bool):
|
|
228
|
+
If `True`, includes subfolders recursively.
|
|
229
|
+
Defaults to `True`.
|
|
230
|
+
|
|
231
|
+
audit_log (Optional[AuditLog]):
|
|
232
|
+
Optional audit log information to create an audit entry
|
|
233
|
+
for this operation.
|
|
234
|
+
|
|
235
|
+
Returns:
|
|
236
|
+
bool:
|
|
237
|
+
Returns `True` if the recall was successful,
|
|
238
|
+
otherwise `False`.
|
|
239
|
+
|
|
240
|
+
Raises:
|
|
241
|
+
ValueError:
|
|
242
|
+
If required arguments are missing or invalid.
|
|
243
|
+
|
|
244
|
+
RuntimeError:
|
|
245
|
+
If the operation fails or the server version
|
|
246
|
+
is incompatible.
|
|
247
|
+
"""
|
|
248
|
+
|
|
249
|
+
return recall_folder_action(
|
|
250
|
+
context=self._ctx,
|
|
251
|
+
folder_path=folder_path,
|
|
252
|
+
filter_object_types=filter_object_types,
|
|
253
|
+
filter_no_invalid_objects=filter_no_invalid_objects,
|
|
254
|
+
recursive=recursive,
|
|
255
|
+
audit_log=audit_log
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
def release_configuartions(
|
|
259
|
+
self,
|
|
260
|
+
update: Optional[List[ReleaseConfiguration]] = None,
|
|
261
|
+
delete: Optional[List[ReleaseConfiguration]] = None,
|
|
262
|
+
audit_log: Optional[AuditLog] = None
|
|
263
|
+
) -> bool:
|
|
264
|
+
"""
|
|
265
|
+
Release configurations by path and object type.
|
|
266
|
+
|
|
267
|
+
Args:
|
|
268
|
+
update (Optional[List[ReleaseConfiguration]]):
|
|
269
|
+
Configurations to be released or updated.
|
|
270
|
+
|
|
271
|
+
delete (Optional[List[ReleaseConfiguration]]):
|
|
272
|
+
Released configurations to be removed.
|
|
273
|
+
|
|
274
|
+
audit_log (Optional[AuditLog]):
|
|
275
|
+
Optional audit log information to create an audit entry
|
|
276
|
+
for this operation.
|
|
277
|
+
|
|
278
|
+
Returns:
|
|
279
|
+
bool:
|
|
280
|
+
Returns `True` if the release was successful,
|
|
281
|
+
otherwise `False`.
|
|
282
|
+
|
|
283
|
+
Raises:
|
|
284
|
+
ValueError:
|
|
285
|
+
If required arguments are missing or invalid.
|
|
286
|
+
|
|
287
|
+
RuntimeError:
|
|
288
|
+
If the operation fails or the server version
|
|
289
|
+
is incompatible.
|
|
290
|
+
"""
|
|
291
|
+
|
|
292
|
+
return release_configuartions_action(
|
|
293
|
+
context=self._ctx,
|
|
294
|
+
update=update,
|
|
295
|
+
delete=delete,
|
|
296
|
+
audit_log=audit_log
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
def remove_folder(
|
|
300
|
+
self,
|
|
301
|
+
folder_path: str,
|
|
302
|
+
audit_log: Optional[AuditLog] = None
|
|
303
|
+
) -> bool:
|
|
304
|
+
"""
|
|
305
|
+
Remove a folder containing inventory configurations.
|
|
306
|
+
|
|
307
|
+
Args:
|
|
308
|
+
folder_path (str):
|
|
309
|
+
The path of the folder to be removed.
|
|
310
|
+
|
|
311
|
+
audit_log (Optional[AuditLog]):
|
|
312
|
+
Optional audit log information to create an audit entry
|
|
313
|
+
for this operation.
|
|
314
|
+
|
|
315
|
+
Returns:
|
|
316
|
+
bool:
|
|
317
|
+
Returns `True` if the folder was successfully removed,
|
|
318
|
+
otherwise `False`.
|
|
319
|
+
|
|
320
|
+
Raises:
|
|
321
|
+
ValueError:
|
|
322
|
+
If required arguments are missing or invalid.
|
|
323
|
+
|
|
324
|
+
RuntimeError:
|
|
325
|
+
If the operation fails or the server version
|
|
326
|
+
is incompatible.
|
|
327
|
+
"""
|
|
328
|
+
|
|
329
|
+
return remove_folder_action(
|
|
330
|
+
context=self._ctx,
|
|
331
|
+
folder_path=folder_path,
|
|
332
|
+
audit_log=audit_log
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
def remove_folder_from_trash_action(
|
|
336
|
+
self,
|
|
337
|
+
folder_path: str,
|
|
338
|
+
audit_log: Optional[AuditLog] = None
|
|
339
|
+
) -> bool:
|
|
340
|
+
"""
|
|
341
|
+
Permanently delete a folder from the inventory trash.
|
|
342
|
+
|
|
343
|
+
Args:
|
|
344
|
+
folder_path (str):
|
|
345
|
+
The path of the folder to be permanently deleted.
|
|
346
|
+
|
|
347
|
+
audit_log (Optional[AuditLog]):
|
|
348
|
+
Optional audit log information to create an audit entry
|
|
349
|
+
for this operation.
|
|
350
|
+
|
|
351
|
+
Returns:
|
|
352
|
+
bool:
|
|
353
|
+
Returns `True` if the folder was permanently deleted,
|
|
354
|
+
otherwise `False`.
|
|
355
|
+
|
|
356
|
+
Raises:
|
|
357
|
+
ValueError:
|
|
358
|
+
If required arguments are missing or invalid.
|
|
359
|
+
|
|
360
|
+
RuntimeError:
|
|
361
|
+
If the operation fails or the server version
|
|
362
|
+
is incompatible.
|
|
363
|
+
"""
|
|
364
|
+
|
|
365
|
+
return remove_folder_from_trash_action(
|
|
366
|
+
context=self._ctx,
|
|
367
|
+
folder_path=folder_path,
|
|
368
|
+
audit_log=audit_log
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
def remove_configuration(
|
|
372
|
+
self,
|
|
373
|
+
configurations: List[Configuration],
|
|
374
|
+
audit_log: Optional[AuditLog] = None
|
|
375
|
+
) -> bool:
|
|
376
|
+
"""
|
|
377
|
+
Remove inventory configurations.
|
|
378
|
+
|
|
379
|
+
Args:
|
|
380
|
+
configurations (List[Configuration]):
|
|
381
|
+
The configurations to be removed.
|
|
382
|
+
|
|
383
|
+
audit_log (Optional[AuditLog]):
|
|
384
|
+
Optional audit log information to create an audit entry
|
|
385
|
+
for this operation.
|
|
386
|
+
|
|
387
|
+
Returns:
|
|
388
|
+
bool:
|
|
389
|
+
Returns `True` if the configurations were successfully removed,
|
|
390
|
+
otherwise `False`.
|
|
391
|
+
|
|
392
|
+
Raises:
|
|
393
|
+
ValueError:
|
|
394
|
+
If required arguments are missing or invalid.
|
|
395
|
+
|
|
396
|
+
RuntimeError:
|
|
397
|
+
If the operation fails or the server version
|
|
398
|
+
is incompatible.
|
|
399
|
+
"""
|
|
400
|
+
|
|
401
|
+
return remove_configurations_action(
|
|
402
|
+
context=self._ctx,
|
|
403
|
+
configurations=configurations,
|
|
404
|
+
audit_log=audit_log
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
def remove_configurations_from_trash(
|
|
408
|
+
self,
|
|
409
|
+
configurations: List[Configuration],
|
|
410
|
+
audit_log: Optional[AuditLog] = None
|
|
411
|
+
) -> bool:
|
|
412
|
+
"""
|
|
413
|
+
Permanently delete configurations from the inventory trash.
|
|
414
|
+
|
|
415
|
+
Args:
|
|
416
|
+
configurations (List[Configuration]):
|
|
417
|
+
The configurations to be permanently deleted.
|
|
418
|
+
|
|
419
|
+
audit_log (Optional[AuditLog]):
|
|
420
|
+
Optional audit log information to create an audit entry
|
|
421
|
+
for this operation.
|
|
422
|
+
|
|
423
|
+
Returns:
|
|
424
|
+
bool:
|
|
425
|
+
Returns `True` if the configurations were permanently deleted,
|
|
426
|
+
otherwise `False`.
|
|
427
|
+
|
|
428
|
+
Raises:
|
|
429
|
+
ValueError:
|
|
430
|
+
If required arguments are missing or invalid.
|
|
431
|
+
|
|
432
|
+
RuntimeError:
|
|
433
|
+
If the operation fails or the server version
|
|
434
|
+
is incompatible.
|
|
435
|
+
"""
|
|
436
|
+
|
|
437
|
+
return remove_configurations_from_trash_action(
|
|
438
|
+
context=self._ctx,
|
|
439
|
+
configurations=configurations,
|
|
440
|
+
audit_log=audit_log
|
|
441
|
+
)
|
|
442
|
+
|
|
443
|
+
def restore_configuration_from_trash(
|
|
444
|
+
self,
|
|
445
|
+
configuration: Configuration,
|
|
446
|
+
new_path: str,
|
|
447
|
+
add_prefix: Optional[str] = None,
|
|
448
|
+
add_suffix: Optional[str] = None,
|
|
449
|
+
audit_log: Optional[AuditLog] = None
|
|
450
|
+
) -> str:
|
|
451
|
+
"""
|
|
452
|
+
Restore a configuration from the inventory trash.
|
|
453
|
+
|
|
454
|
+
Args:
|
|
455
|
+
configuration (Configuration):
|
|
456
|
+
The configuration to be restored.
|
|
457
|
+
|
|
458
|
+
new_path (str):
|
|
459
|
+
The target path where the configuration should be restored.
|
|
460
|
+
|
|
461
|
+
add_prefix (Optional[str]):
|
|
462
|
+
A prefix to be added to the restored configuration name.
|
|
463
|
+
|
|
464
|
+
add_suffix (Optional[str]):
|
|
465
|
+
A suffix to be added to the restored configuration name.
|
|
466
|
+
|
|
467
|
+
audit_log (Optional[AuditLog]):
|
|
468
|
+
Optional audit log information to create an audit entry
|
|
469
|
+
for this operation.
|
|
470
|
+
|
|
471
|
+
Returns:
|
|
472
|
+
str:
|
|
473
|
+
The path of the restored configuration.
|
|
474
|
+
|
|
475
|
+
Raises:
|
|
476
|
+
ValueError:
|
|
477
|
+
If required arguments are missing or invalid.
|
|
478
|
+
|
|
479
|
+
RuntimeError:
|
|
480
|
+
If the operation fails or the server version
|
|
481
|
+
is incompatible.
|
|
482
|
+
"""
|
|
483
|
+
|
|
484
|
+
return restore_configuration_from_trash_action(
|
|
485
|
+
context=self._ctx,
|
|
486
|
+
configuration=configuration,
|
|
487
|
+
new_path=new_path,
|
|
488
|
+
add_prefix=add_prefix,
|
|
489
|
+
add_suffix=add_suffix,
|
|
490
|
+
audit_log=audit_log
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
def validate_configuration(
|
|
494
|
+
self,
|
|
495
|
+
object_type: ObjectType,
|
|
496
|
+
file: Union[Path, str, Dict[str, Any]]
|
|
497
|
+
) -> bool:
|
|
498
|
+
"""
|
|
499
|
+
Validate a configuration provided as a file path
|
|
500
|
+
or as a JSON dictionary.
|
|
501
|
+
|
|
502
|
+
Args:
|
|
503
|
+
object_type (ObjectType):
|
|
504
|
+
The type of the configuration object.
|
|
505
|
+
|
|
506
|
+
file (Union[Path, str, Dict[str, Any]]):
|
|
507
|
+
The configuration provided either as a file path
|
|
508
|
+
or as a JSON dictionary.
|
|
509
|
+
|
|
510
|
+
Returns:
|
|
511
|
+
bool:
|
|
512
|
+
Returns `True` if the configuration is valid,
|
|
513
|
+
otherwise `False`.
|
|
514
|
+
|
|
515
|
+
Raises:
|
|
516
|
+
ValueError:
|
|
517
|
+
If required arguments are missing or invalid.
|
|
518
|
+
|
|
519
|
+
RuntimeError:
|
|
520
|
+
If validation fails or the server version
|
|
521
|
+
is incompatible.
|
|
522
|
+
"""
|
|
523
|
+
|
|
524
|
+
return validate_configuration_action(
|
|
525
|
+
context=self._ctx,
|
|
526
|
+
object_type=object_type,
|
|
527
|
+
file=file
|
|
528
|
+
)
|
|
529
|
+
|
|
530
|
+
def revoke_configurations_action(
|
|
531
|
+
self,
|
|
532
|
+
controller_ids: List[str],
|
|
533
|
+
configurations: List[DeployConfiguration],
|
|
534
|
+
audit_log: Optional[AuditLog] = None
|
|
535
|
+
) -> bool:
|
|
536
|
+
"""
|
|
537
|
+
Revoke deployed configurations from the specified controllers.
|
|
538
|
+
|
|
539
|
+
Args:
|
|
540
|
+
controller_ids (List[str]):
|
|
541
|
+
The IDs of the controllers from which the configurations
|
|
542
|
+
should be revoked.
|
|
543
|
+
|
|
544
|
+
configurations (List[DeployConfiguration]):
|
|
545
|
+
The deployed configurations to be revoked.
|
|
546
|
+
|
|
547
|
+
audit_log (Optional[AuditLog]):
|
|
548
|
+
Optional audit log information to create an audit entry
|
|
549
|
+
for this operation.
|
|
550
|
+
|
|
551
|
+
Returns:
|
|
552
|
+
bool:
|
|
553
|
+
Returns `True` if the configurations were successfully revoked,
|
|
554
|
+
otherwise `False`.
|
|
555
|
+
|
|
556
|
+
Raises:
|
|
557
|
+
ValueError:
|
|
558
|
+
If required arguments are missing or invalid.
|
|
559
|
+
|
|
560
|
+
RuntimeError:
|
|
561
|
+
If the operation fails or the server version
|
|
562
|
+
is incompatible.
|
|
563
|
+
"""
|
|
564
|
+
|
|
565
|
+
return revoke_configurations_action(
|
|
566
|
+
context=self._ctx,
|
|
567
|
+
controller_ids=controller_ids,
|
|
568
|
+
configurations=configurations,
|
|
569
|
+
audit_log=audit_log
|
|
570
|
+
)
|
|
571
|
+
|
|
572
|
+
def store_configuration(
|
|
573
|
+
self,
|
|
574
|
+
configuration: Configuration,
|
|
575
|
+
payload: Optional[Dict[str, Any]] = None,
|
|
576
|
+
no_invalid: bool = False,
|
|
577
|
+
audit_log: Optional[AuditLog] = None
|
|
578
|
+
) -> bool:
|
|
579
|
+
"""
|
|
580
|
+
Store an inventory configuration.
|
|
581
|
+
|
|
582
|
+
Args:
|
|
583
|
+
configuration (Configuration):
|
|
584
|
+
The configuration metadata.
|
|
585
|
+
|
|
586
|
+
payload (Optional[Dict[str, Any]]):
|
|
587
|
+
The JSON payload representing the configuration content.
|
|
588
|
+
Can be `None` if only a folder is to be created.
|
|
589
|
+
|
|
590
|
+
no_invalid (bool):
|
|
591
|
+
If `True`, prevents storing invalid configurations.
|
|
592
|
+
Defaults to `False`.
|
|
593
|
+
|
|
594
|
+
audit_log (Optional[AuditLog]):
|
|
595
|
+
Optional audit log information to create an audit entry
|
|
596
|
+
for this operation.
|
|
597
|
+
|
|
598
|
+
Returns:
|
|
599
|
+
bool:
|
|
600
|
+
Returns `True` if the configuration was successfully stored,
|
|
601
|
+
otherwise `False`.
|
|
602
|
+
|
|
603
|
+
Raises:
|
|
604
|
+
ValueError:
|
|
605
|
+
If required arguments are missing or invalid.
|
|
606
|
+
|
|
607
|
+
RuntimeError:
|
|
608
|
+
If the operation fails or the server version
|
|
609
|
+
is incompatible.
|
|
610
|
+
"""
|
|
611
|
+
|
|
612
|
+
return store_configuration_action(
|
|
613
|
+
context=self._ctx,
|
|
614
|
+
configuration=configuration,
|
|
615
|
+
payload=payload,
|
|
616
|
+
no_invalid=no_invalid,
|
|
617
|
+
audit_log=audit_log
|
|
618
|
+
)
|
|
619
|
+
|
|
620
|
+
def get_changes(self, names: List[str]) -> List[Change]:
|
|
621
|
+
"""
|
|
622
|
+
Retrieve one or more changes by name.
|
|
623
|
+
|
|
624
|
+
Args:
|
|
625
|
+
names (List[str]):
|
|
626
|
+
The names of the changes to be retrieved.
|
|
627
|
+
|
|
628
|
+
Returns:
|
|
629
|
+
List[Change]:
|
|
630
|
+
A list of matching change objects.
|
|
631
|
+
|
|
632
|
+
Raises:
|
|
633
|
+
ValueError:
|
|
634
|
+
If required arguments are missing or invalid.
|
|
635
|
+
|
|
636
|
+
RuntimeError:
|
|
637
|
+
If the operation fails or the server version
|
|
638
|
+
is incompatible.
|
|
639
|
+
"""
|
|
640
|
+
|
|
641
|
+
return get_changes_action(
|
|
642
|
+
context=self._ctx,
|
|
643
|
+
names=names
|
|
644
|
+
)
|
|
645
|
+
|
|
646
|
+
def get_change_dependencies(
|
|
647
|
+
self,
|
|
648
|
+
operation_type: OperationType,
|
|
649
|
+
changes: List[Change],
|
|
650
|
+
filter_paths: Optional[List[str]] = None,
|
|
651
|
+
filter_no_references: bool = False,
|
|
652
|
+
filter_no_referencing: bool = False
|
|
653
|
+
) -> List[ChangeDependencies]:
|
|
654
|
+
"""
|
|
655
|
+
Resolve the direct dependencies for the given changes
|
|
656
|
+
within the specified operation context.
|
|
657
|
+
|
|
658
|
+
Args:
|
|
659
|
+
operation_type (OperationType):
|
|
660
|
+
The operation context (e.g. DEPLOY, EXPORT)
|
|
661
|
+
that defines how dependencies are evaluated.
|
|
662
|
+
|
|
663
|
+
changes (List[Change]):
|
|
664
|
+
The changes for which dependencies should be resolved.
|
|
665
|
+
|
|
666
|
+
filter_paths (Optional[List[str]]):
|
|
667
|
+
If provided, only dependencies whose path starts
|
|
668
|
+
with one of these values will be included.
|
|
669
|
+
|
|
670
|
+
filter_no_references (bool):
|
|
671
|
+
If `True`, excludes outgoing references
|
|
672
|
+
(objects referenced by the given changes).
|
|
673
|
+
Defaults to `False`.
|
|
674
|
+
|
|
675
|
+
filter_no_referencing (bool):
|
|
676
|
+
If `True`, excludes incoming references
|
|
677
|
+
(objects that reference the given changes).
|
|
678
|
+
Defaults to `False`.
|
|
679
|
+
|
|
680
|
+
Returns:
|
|
681
|
+
List[ChangeDependencies]:
|
|
682
|
+
A list of dependency results, each representing
|
|
683
|
+
one root change and its direct dependencies.
|
|
684
|
+
|
|
685
|
+
Raises:
|
|
686
|
+
ValueError:
|
|
687
|
+
If required arguments are missing or invalid.
|
|
688
|
+
|
|
689
|
+
RuntimeError:
|
|
690
|
+
If dependency resolution fails or the server version
|
|
691
|
+
is incompatible.
|
|
692
|
+
"""
|
|
693
|
+
|
|
694
|
+
return get_change_dependencies_action(
|
|
695
|
+
context=self._ctx,
|
|
696
|
+
operation_type=operation_type,
|
|
697
|
+
changes=changes,
|
|
698
|
+
filter_paths=filter_paths,
|
|
699
|
+
filter_no_references=filter_no_references,
|
|
700
|
+
filter_no_referencing=filter_no_referencing
|
|
701
|
+
)
|
|
702
|
+
|
|
703
|
+
def export_configurations(
|
|
704
|
+
self,
|
|
705
|
+
controller_id: str,
|
|
706
|
+
out_dir: Union[Path, str],
|
|
707
|
+
filter: ExportFilter,
|
|
708
|
+
filename: str = "export.zip",
|
|
709
|
+
archive_format: Literal["ZIP", "TAR_GZ"] = "ZIP",
|
|
710
|
+
audit_log: Optional[AuditLog] = None
|
|
711
|
+
) -> bool:
|
|
712
|
+
"""
|
|
713
|
+
Export unsigned configuration files as an archive.
|
|
714
|
+
|
|
715
|
+
The export creates an archive file (ZIP or TAR_GZ)
|
|
716
|
+
containing unsigned JSON configuration files based
|
|
717
|
+
on the specified filter criteria.
|
|
718
|
+
|
|
719
|
+
Args:
|
|
720
|
+
controller_id (str):
|
|
721
|
+
The ID of the controller associated with the export.
|
|
722
|
+
|
|
723
|
+
out_dir (Union[Path, str]):
|
|
724
|
+
The target directory where the archive file
|
|
725
|
+
will be created.
|
|
726
|
+
|
|
727
|
+
filter (ExportFilter):
|
|
728
|
+
Defines the criteria used to select the
|
|
729
|
+
configurations to be exported.
|
|
730
|
+
|
|
731
|
+
filename (str):
|
|
732
|
+
The name of the archive file.
|
|
733
|
+
Defaults to "export.zip".
|
|
734
|
+
|
|
735
|
+
archive_format (Literal["ZIP", "TAR_GZ"]):
|
|
736
|
+
The archive format to be created.
|
|
737
|
+
Defaults to "ZIP".
|
|
738
|
+
|
|
739
|
+
audit_log (Optional[AuditLog]):
|
|
740
|
+
Optional audit log information to create
|
|
741
|
+
an audit entry for this operation.
|
|
742
|
+
|
|
743
|
+
Returns:
|
|
744
|
+
bool:
|
|
745
|
+
Returns `True` if the export was successful,
|
|
746
|
+
otherwise `False`.
|
|
747
|
+
|
|
748
|
+
Raises:
|
|
749
|
+
ValueError:
|
|
750
|
+
If required arguments are missing or invalid.
|
|
751
|
+
|
|
752
|
+
RuntimeError:
|
|
753
|
+
If the export fails or the server version
|
|
754
|
+
is incompatible.
|
|
755
|
+
"""
|
|
756
|
+
|
|
757
|
+
return export_configurations_action(
|
|
758
|
+
context=self._ctx,
|
|
759
|
+
controller_id=controller_id,
|
|
760
|
+
out_dir=out_dir,
|
|
761
|
+
filename=filename,
|
|
762
|
+
filter=filter,
|
|
763
|
+
archive_format=archive_format,
|
|
764
|
+
audit_log=audit_log
|
|
765
|
+
)
|
|
766
|
+
|
|
767
|
+
def import_configurations(
|
|
768
|
+
self,
|
|
769
|
+
file_path: Union[Path, str],
|
|
770
|
+
archive_format: Literal["ZIP", "TAR_GZ"] = "ZIP",
|
|
771
|
+
overwrite: bool = False,
|
|
772
|
+
inventory_target_folder: Optional[str] = None,
|
|
773
|
+
add_suffix: Optional[str] = None,
|
|
774
|
+
add_prefix: Optional[str] = None,
|
|
775
|
+
overwrite_tags: bool = False,
|
|
776
|
+
audit_log: Optional[AuditLog] = None
|
|
777
|
+
) -> bool:
|
|
778
|
+
"""
|
|
779
|
+
Import inventory configurations into JS7 JOC.
|
|
780
|
+
|
|
781
|
+
Supported inputs:
|
|
782
|
+
- ZIP or TAR.GZ archives ('.zip', '.tar.gz', '.tgz').
|
|
783
|
+
If a directory contains multiple archives, all archives
|
|
784
|
+
are processed recursively.
|
|
785
|
+
- Directories containing '.json' configuration files
|
|
786
|
+
(processed recursively).
|
|
787
|
+
- A single '.json' configuration file.
|
|
788
|
+
|
|
789
|
+
The import behavior can be customized using overwrite options,
|
|
790
|
+
target folder settings, prefix/suffix handling, tag overwriting,
|
|
791
|
+
and optional audit logging.
|
|
792
|
+
|
|
793
|
+
Args:
|
|
794
|
+
file_path (Union[Path, str]):
|
|
795
|
+
The local path to the file or directory to be imported.
|
|
796
|
+
|
|
797
|
+
archive_format (Literal["ZIP", "TAR_GZ"]):
|
|
798
|
+
The archive format to be created by the client.
|
|
799
|
+
This does not refer to the local format specified
|
|
800
|
+
by `file_path`. Defaults to "ZIP".
|
|
801
|
+
|
|
802
|
+
overwrite (bool):
|
|
803
|
+
If `True`, existing inventory objects will be overwritten.
|
|
804
|
+
Defaults to `False`.
|
|
805
|
+
|
|
806
|
+
inventory_target_folder (Optional[str]):
|
|
807
|
+
Specifies the target folder in the inventory where
|
|
808
|
+
imported objects should be stored.
|
|
809
|
+
|
|
810
|
+
add_suffix (Optional[str]):
|
|
811
|
+
A suffix to be added to the names of imported objects.
|
|
812
|
+
|
|
813
|
+
add_prefix (Optional[str]):
|
|
814
|
+
A prefix to be added to the names of imported objects.
|
|
815
|
+
|
|
816
|
+
overwrite_tags (bool):
|
|
817
|
+
If `True`, existing tags of inventory objects will be
|
|
818
|
+
overwritten. Defaults to `False`.
|
|
819
|
+
|
|
820
|
+
audit_log (Optional[AuditLog]):
|
|
821
|
+
Optional audit log information to create an audit entry
|
|
822
|
+
for this operation.
|
|
823
|
+
|
|
824
|
+
Returns:
|
|
825
|
+
bool:
|
|
826
|
+
Returns `True` if the operation was successful,
|
|
827
|
+
otherwise `False`.
|
|
828
|
+
|
|
829
|
+
Raises:
|
|
830
|
+
ValueError:
|
|
831
|
+
If required arguments are missing or invalid.
|
|
832
|
+
|
|
833
|
+
RuntimeError:
|
|
834
|
+
If the server version is incompatible or if an unexpected
|
|
835
|
+
response is returned.
|
|
836
|
+
"""
|
|
837
|
+
|
|
838
|
+
return import_configurations_action(
|
|
839
|
+
context=self._ctx,
|
|
840
|
+
file_path=file_path,
|
|
841
|
+
archive_format=archive_format,
|
|
842
|
+
overwrite=overwrite,
|
|
843
|
+
target_folder=inventory_target_folder,
|
|
844
|
+
suffix=add_suffix,
|
|
845
|
+
prefix=add_prefix,
|
|
846
|
+
overwrite_tags=overwrite_tags,
|
|
847
|
+
audit_log=audit_log
|
|
848
|
+
)
|
|
849
|
+
|
|
850
|
+
def import_deploy_configurations(
|
|
851
|
+
self,
|
|
852
|
+
controller_id: str,
|
|
853
|
+
file_path: Union[Path, str],
|
|
854
|
+
private_key_file: Union[Path, str],
|
|
855
|
+
public_key_file: Optional[Union[Path, str]] = None,
|
|
856
|
+
key_password: Optional[bytes] = None,
|
|
857
|
+
hash_alg: hashes.HashAlgorithm = hashes.SHA512(),
|
|
858
|
+
archive_format: Literal["ZIP", "TAR_GZ"] = "ZIP",
|
|
859
|
+
audit_log: Optional[AuditLog] = None
|
|
860
|
+
) -> bool:
|
|
861
|
+
"""
|
|
862
|
+
Import and deploy inventory configurations to a JS7 Controller.
|
|
863
|
+
|
|
864
|
+
This operation uploads configuration objects ('.json') or archives
|
|
865
|
+
('.zip', '.tar.gz', '.tgz') to JOC and immediately deploys them
|
|
866
|
+
to the specified Controller.
|
|
867
|
+
|
|
868
|
+
Unlike `import_configurations`, this method performs a signed
|
|
869
|
+
deployment and therefore requires:
|
|
870
|
+
|
|
871
|
+
- Security Level HIGH enabled in JOC
|
|
872
|
+
- A valid private key for signing
|
|
873
|
+
- A matching public key configured in JOC
|
|
874
|
+
|
|
875
|
+
Supported inputs:
|
|
876
|
+
- A single '.json' configuration file
|
|
877
|
+
- A directory containing '.json' files (processed recursively)
|
|
878
|
+
- ZIP or TAR.GZ archives containing '.json' files
|
|
879
|
+
(archives inside directories are processed recursively)
|
|
880
|
+
|
|
881
|
+
All configuration files are signed locally. For each '.json'
|
|
882
|
+
file, a corresponding '.json.sig' file is generated and included
|
|
883
|
+
in the uploaded archive.
|
|
884
|
+
|
|
885
|
+
Args:
|
|
886
|
+
controller_id (str):
|
|
887
|
+
The identifier of the Controller to which the configurations
|
|
888
|
+
should be deployed.
|
|
889
|
+
|
|
890
|
+
file_path (Union[Path, str]):
|
|
891
|
+
The local path to a configuration file, archive, or directory
|
|
892
|
+
containing configuration files.
|
|
893
|
+
|
|
894
|
+
private_key_file (Union[Path, str]):
|
|
895
|
+
Path to the private key (PEM format) used to sign
|
|
896
|
+
configuration files before deployment.
|
|
897
|
+
|
|
898
|
+
public_key_file (Optional[Union[Path, str]]):
|
|
899
|
+
Optional public key (PEM format) used for local
|
|
900
|
+
signature verification prior to upload.
|
|
901
|
+
|
|
902
|
+
key_password (Optional[bytes]):
|
|
903
|
+
Optional password for an encrypted private key.
|
|
904
|
+
|
|
905
|
+
hash_alg (hashes.HashAlgorithm):
|
|
906
|
+
Hash algorithm used for signing (e.g. SHA256, SHA512).
|
|
907
|
+
Defaults to SHA512.
|
|
908
|
+
|
|
909
|
+
archive_format (Literal["ZIP", "TAR_GZ"]):
|
|
910
|
+
The archive format created by the client before upload.
|
|
911
|
+
Defaults to "ZIP".
|
|
912
|
+
|
|
913
|
+
audit_log (Optional[AuditLog]):
|
|
914
|
+
Optional audit log information to create an audit entry
|
|
915
|
+
for this deployment.
|
|
916
|
+
|
|
917
|
+
Returns:
|
|
918
|
+
bool:
|
|
919
|
+
Returns `True` if the deployment was successful,
|
|
920
|
+
otherwise `False`.
|
|
921
|
+
|
|
922
|
+
Raises:
|
|
923
|
+
ValueError:
|
|
924
|
+
If required parameters are missing or invalid.
|
|
925
|
+
|
|
926
|
+
RuntimeError:
|
|
927
|
+
If the server version is incompatible, the signing process fails,
|
|
928
|
+
or an unexpected response is returned.
|
|
929
|
+
"""
|
|
930
|
+
|
|
931
|
+
return import_deploy_configurations_action(
|
|
932
|
+
context=self._ctx,
|
|
933
|
+
controller_id=controller_id,
|
|
934
|
+
file_path=file_path,
|
|
935
|
+
archive_format=archive_format,
|
|
936
|
+
private_key_file=private_key_file,
|
|
937
|
+
public_key_file=public_key_file,
|
|
938
|
+
key_password=key_password,
|
|
939
|
+
hash_alg=hash_alg,
|
|
940
|
+
audit_log=audit_log
|
|
941
|
+
)
|
|
942
|
+
|
|
943
|
+
|