Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1677bebb2 | ||
|
|
ebf437dac6 | ||
|
|
005575d18e |
No files matched your search
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.5.0] - 2026-11-26
|
||||
|
||||
### Added
|
||||
- `get_vms()` reports each VM's `uid` (napalm-device-types 4.44.0's `VMDict.uid`,
|
||||
NetOrk/netork#2728): its instance UUID, which already survives a migration and a
|
||||
restore. netOrk knows a guest by `uid` on every hypervisor that has one.
|
||||
|
||||
## [0.4.0] - 2026-11-25
|
||||
|
||||
### Added
|
||||
|
||||
@@ -87,6 +87,8 @@ def _vm(
|
||||
return {
|
||||
"name": vm.get("name", ""),
|
||||
"vmid": vm["config.instanceUuid"],
|
||||
# VMDict.uid: the instance UUID already survives a migration and a restore.
|
||||
"uid": vm["config.instanceUuid"],
|
||||
"moref": vm["_moref"],
|
||||
"type": "vm",
|
||||
"status": _STATUS.get(vm.get("runtime.powerState", ""), "unknown"),
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "napalm-vmware"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
description = "NAPALM drivers for VMware ESXi hosts and vCenter Server (vSphere API via pyVmomi)"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
|
||||
@@ -33,6 +33,11 @@ class TestVmListFromVcsim:
|
||||
assert vm["node"] == "localhost.localdomain"
|
||||
assert vm["type"] == "vm"
|
||||
|
||||
def test_the_uid_is_the_instance_uuid(self, esxi_data, vm0):
|
||||
# VMDict.uid: an identity that survives a migration and a restore; vSphere's
|
||||
# instance UUID is one (NetOrk/netork#2728).
|
||||
assert _vms(esxi_data)[0]["uid"] == vm0["config.instanceUuid"]
|
||||
|
||||
def test_vcenter_node_is_the_esxi_host(self, vcenter_data):
|
||||
nodes = {vm["name"]: vm["node"] for vm in _vms(vcenter_data)}
|
||||
assert nodes["DC0_H0_VM0"] == "DC0_H0"
|
||||
|
||||
Reference in new issue
Block a user