az-scout plugin for On-Demand Capacity Reservation (ODCR) coverage analysis
Project description
az-scout-plugin-odcr-coverage
An az-scout plugin that analyses On-Demand Capacity Reservation (ODCR) coverage for Azure VMs.
Identifies VMs at risk of allocation failure by combining VM inventory, Activity Log allocation events, and existing ODCR utilization — then classifies each VM by risk level.
Features
- Risk classification — critical (past allocation failures), high (always-on without ODCR), medium, low, covered
- Allocation event timeline — start/deallocate/failed events from Activity Log with configurable lookback (3–30 days)
- ODCR utilization — reserved capacity, used/unused counts per reservation group
- Multi-subscription — analyse across multiple subscriptions with incremental rendering and progress bar
- VM detail modal — click any VM row to see risk profile, allocation summary, and event timeline
- Cross-highlighting — hover an ODCR card to highlight associated VMs, and vice versa
- Azure Portal links — direct links to each VM in the Azure Portal
- MCP tool —
get_odcr_coverageavailable to AI agents (Claude, VS Code Copilot) - Chat mode — "ODCR Advisor" for guided capacity reservation analysis
- Caching — VM list (5 min), capacity reservations (5 min), activity log (10 min)
Installation
pip install az-scout-plugin-odcr-coverage
# or
uv pip install az-scout-plugin-odcr-coverage
Restart az-scout — the plugin is discovered automatically.
MCP Tool
| Tool | Parameters | Description |
|---|---|---|
get_odcr_coverage |
region, subscription_id, lookback_days? (default: 7), uptime_threshold? (default: 90), tenant_id? |
Analyse ODCR coverage with per-VM risk classification and allocation history |
RBAC Requirements
| Role | Why |
|---|---|
| Reader | List VMs (via ARG), Capacity Reservation Groups |
| Reader or Monitoring Reader | Activity Log queries |
Setup
uv pip install az-scout-plugin-odcr-coverage
az-scout # plugin is auto-discovered
For development:
git clone https://github.com/az-scout/az-scout-plugin-odcr-coverage
cd az-scout-plugin-odcr-coverage
uv sync --group dev
uv pip install -e .
az-scout # plugin is auto-discovered
Structure
az-scout-plugin-odcr-coverage/
├── .github/
│ ├── copilot-instructions.md # Copilot context for this plugin
│ └── workflows/
│ └── ci.yml # CI pipeline (lint + test, Python 3.11–3.13)
├── pyproject.toml
├── README.md
└── src/
└── az_scout_odcr_coverage/
├── __init__.py # Plugin class + module-level `plugin` instance
├── routes.py # FastAPI APIRouter (optional)
├── tools.py # MCP tool functions (optional)
└── static/
├── css/
│ └── odcr-coverage.css # Plugin styles (auto-loaded via css_entry)
├── html/
│ └── odcr-coverage-tab.html # HTML fragment (fetched by JS at runtime)
└── js/
└── odcr-coverage-tab.js # Tab UI logic (auto-loaded via js_entry)
How it works
- The plugin JS loads the HTML fragment into
#plugin-tab-odcr-coverage. - It listens to
azscout:*context events from the core app. - When tenant and region are set, it fetches subscriptions from
/api/subscriptions. - The user picks subscriptions and clicks Analyse.
- The plugin calls
GET /plugins/odcr-coverage/coverage?region=…&subscription_id=…. - VM list and power state are fetched via Azure Resource Graph (single query); capacity reservations and activity log are fetched in parallel.
Quality checks
uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
uv run mypy src/
uv run pytest
Copilot support
The .github/copilot-instructions.md file provides context to GitHub Copilot about
the plugin structure, conventions, and az-scout plugin API.
License
Disclaimer
This tool is not affiliated with Microsoft. All capacity, pricing, and availability information is indicative and not a guarantee of deployment success. Values are dynamic and may change between planning and actual deployment. Always validate in official Microsoft sources and in your target tenant/subscription.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file az_scout_plugin_odcr_coverage-2026.3.2.tar.gz.
File metadata
- Download URL: az_scout_plugin_odcr_coverage-2026.3.2.tar.gz
- Upload date:
- Size: 131.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f955822399bce94a8731c26d5ccc5930be6bd6dfc5a77451e3123b32375ba6a
|
|
| MD5 |
90960166d1853be4a99ce155ad13fe83
|
|
| BLAKE2b-256 |
71cd3157d76eab94df3fd691aabfd9e3799edb507222e9894ddcebaf58ea578e
|
Provenance
The following attestation bundles were made for az_scout_plugin_odcr_coverage-2026.3.2.tar.gz:
Publisher:
publish.yml on az-scout/az-scout-plugin-odcr-coverage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
az_scout_plugin_odcr_coverage-2026.3.2.tar.gz -
Subject digest:
5f955822399bce94a8731c26d5ccc5930be6bd6dfc5a77451e3123b32375ba6a - Sigstore transparency entry: 1109340226
- Sigstore integration time:
-
Permalink:
az-scout/az-scout-plugin-odcr-coverage@a60787ac5c283e7a2a26c216a3d21293d42c61be -
Branch / Tag:
refs/tags/v2026.3.2 - Owner: https://github.com/az-scout
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a60787ac5c283e7a2a26c216a3d21293d42c61be -
Trigger Event:
push
-
Statement type:
File details
Details for the file az_scout_plugin_odcr_coverage-2026.3.2-py3-none-any.whl.
File metadata
- Download URL: az_scout_plugin_odcr_coverage-2026.3.2-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ea6b946fe352ddd73959e87cc25be6b60770a04cd1a322fba344a5d8e0329b6
|
|
| MD5 |
0e72780b5d23d64857aa84c0c637891f
|
|
| BLAKE2b-256 |
3ea16990c5d9f3c663bac1d2e07db5613cbe16e441cfd16845d2c3c89f1ee0f6
|
Provenance
The following attestation bundles were made for az_scout_plugin_odcr_coverage-2026.3.2-py3-none-any.whl:
Publisher:
publish.yml on az-scout/az-scout-plugin-odcr-coverage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
az_scout_plugin_odcr_coverage-2026.3.2-py3-none-any.whl -
Subject digest:
9ea6b946fe352ddd73959e87cc25be6b60770a04cd1a322fba344a5d8e0329b6 - Sigstore transparency entry: 1109340228
- Sigstore integration time:
-
Permalink:
az-scout/az-scout-plugin-odcr-coverage@a60787ac5c283e7a2a26c216a3d21293d42c61be -
Branch / Tag:
refs/tags/v2026.3.2 - Owner: https://github.com/az-scout
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a60787ac5c283e7a2a26c216a3d21293d42c61be -
Trigger Event:
push
-
Statement type: