How akamai/cli-onboard works
Project type and purpose
• This is a Python-based Akamai CLI extension (“cli-onboard”) that provides a set of subcommands under akamai onboard to automate the creation and activation of Akamai Property Manager configurations and WAF policies.
• It is a specialized CLI tool (not a web app or microservice) that reads user-provided JSON/CSV templates, constructs appropriate API calls, and orchestrates a sequence of Akamai API interactions.
File structure
Top-level:
• .gitignore, LICENSE, CHANGELOG.md, README.md, requirements.txt – project metadata.
• bin/ – all Python modules and scripts providing core functionality and subcommands.
• config/ – JSON/YAML logging configuration.
• templates/ – JSON rule templates and sample setup files for each onboard mode.
• cli.json – CLI metadata for Akamai CLI integration.
Under bin/:
• _logging.py, exceptions.py – shared utilities.
• wrapper_api.py – thin wrapper over Akamai Open APIs (PAPI, HAPI, CPS, AppSec).
• utility*.py – helper functions for JSON loading, environment substitution, CSV parsing.
• model/ – data models for each onboard type (appsec, multi_hosts, single_host).
• onboard*.py – entry points for each subcommand (create, single_host, multi_hosts, batch_create, appsec commands).
• steps.py – orchestrates the sequential steps (validation, creation, activation).
• poll.py – waits for asynchronous Akamai operations to complete.
README for additional insights
• Confirms the CLI subcommands, required Akamai API credentials (.edgerc), and the supported workflows (create, single-host, multi-hosts, batch-create, appsec-policy/create/update/remove).
• Describes the JSON/CSV payloads and how the commands map to Akamai PAPI/HAPI/CPS/AppSec endpoints.