|
| 1 | +# cupi — Cisco Unity Connection CLI |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +Go CLI tool (`cupi`) for Cisco Unity Connection (CUC). Wraps: |
| 6 | +- **CUPI** — REST/JSON provisioning (`/vmrest/`) — users, distlists, handlers, COS, templates, schedules |
| 7 | +- **PAWS** — Platform admin SOAP (`/platform-services/services/`) — cluster status, DRS backup |
| 8 | +- **AST** — System health XML (`/ast/Astisapi.dll`) — disk, heartbeat, alerts, perfmon |
| 9 | +- **DIME** — Log collection (`/logcollectionservice/services/DimeGetFileService`) — log file downloads |
| 10 | + |
| 11 | +## Key Paths |
| 12 | + |
| 13 | +- Config: `~/.cupi/config.json` (servers map, not `clusters`) |
| 14 | +- Keyring service: `cupi` |
| 15 | +- Module: `github.com/Cloverhound/cupi` |
| 16 | +- Binary: `cupi` |
| 17 | +- Env vars: `CUPI_DEBUG`, `CUPI_DRY_RUN` |
| 18 | + |
| 19 | +## Credential Types |
| 20 | + |
| 21 | +- `cupi` — CUPI REST (default, analogous to `axl` in cucm-cli) |
| 22 | +- `application` — Application-level APIs |
| 23 | +- `platform` — OS admin for PAWS |
| 24 | + |
| 25 | +## Development |
| 26 | + |
| 27 | +```bash |
| 28 | +go build -o cupi . # Build (Version reports "dev") |
| 29 | +./cupi --help # Verify |
| 30 | +./cupi version # Print version |
| 31 | +./cupi upgrade --check # Check for newer release on GitHub |
| 32 | +bash install-local.sh # Install binary (embeds git tag as version) + skill |
| 33 | +go run ./tools/scraper/ # Run API doc scraper |
| 34 | +go test ./tests/ -run TestCLI # Run CLI validation tests (no live server needed) |
| 35 | + |
| 36 | +# Build with explicit version: |
| 37 | +go build -ldflags "-X github.com/Cloverhound/cupi-cli/cmd.Version=v1.2.3" -o cupi . |
| 38 | +``` |
| 39 | + |
| 40 | +## Architecture |
| 41 | + |
| 42 | +- `internal/appconfig/` — `ServerConfig` (not `ClusterConfig`), `defaultServer`, `servers` |
| 43 | +- `internal/auth/` — `CredTypeCUPI="cupi"`, keyring service `"cupi"` |
| 44 | +- `internal/client/rest.go` — JSON REST: `Request/Get/Post/Put/Delete` |
| 45 | +- `internal/client/ast.go` — VOS-common AST only (disk, tftp, heartbeat, alerts, perfmon) |
| 46 | +- `internal/client/paws.go` — PAWS SOAP (identical to cucm-cli, CUPI_DEBUG) |
| 47 | +- `internal/client/dime.go` — DIME log download (identical to cucm-cli, CUPI_DEBUG) |
| 48 | +- `tools/scraper/` — Phase 1 HTML scraper for CUPI API docs |
0 commit comments