Setup#
- class Setup(config: ConfigManager, ui_config: UIConfigManager, plist_manager: PropertyListManager)[source]#
Handles the initial setup process for the Patcher CLI tool.
This class guides users through configuring the necessary components to integrate with their Jamf environment. The setup includes creating API roles, clients, and configuring user interface settings for PDF reports.
- Parameters:
config (
ConfigManager
) – Manages application configuration, including credential storage.ui_config (
UIConfigManager
) – Handles UI-related configurations for the setup process.plist_manager (PropertyListManager)
- property completed: bool[source]#
Indicates whether the setup process has been completed.
- Returns:
True if setup has been completed, False otherwise.
- Return type:
- async start(animator: Animation | None = None) None [source]#
Allows the user to choose between different setup methods (Standard or SSO).
An optional
Animation
object can be passed to update animation messages at runtime. Defaults toself.animator
.Options:
STANDARD
prompts for basic credentials, obtains basic token, creates API integration, saves client credentials and obtains an AccessToken.SSO
prompts for existing API credentials, obtains AccessToken and saves credentials.
See also
For SSO users, reference our Handling SSO in Jamf Pro page for assistance creating an API integration.
- Parameters:
animator (
Optional
[Animation
]) – The animation instance to update messages. Defaults toself.animator
.- Raises:
SetupError – If a token could not be fetched, credentials are missing or setup could not be marked complete.
- Return type:
None
- reset_setup() bool [source]#
Resets setup completion flag (), removing the
setup_completed
key/value from the property list.This effectively marks Setup completion as False and will re-trigger the setup assistant.
- Returns:
True
if the Setup section in the property list file was removed.- Return type: