"""Licenses assigned on an endpoint, as facts (``LicenseMixin.get_licenses``). The edition key says which edition runs -- ``esxBasic`` is the free vSphere Hypervisor, whose API refuses every write; what follows from that is the caller's to decide. The license key itself is never reported. """ from __future__ import annotations from typing import Any from napalm_device_types.models import LicenseDict def license_list(licenses: list[dict[str, Any]]) -> list[LicenseDict]: return [ {"name": lic.get("name", ""), "status": "active", "edition": str(lic.get("editionKey", ""))} for lic in licenses ]