Closed muresan closed 9 months ago
Still puzzled how the test ever passed:
=== RUN TestAccLibvirtNodeInfoDataSource
data_source_libvirt_node_info_test.go:11: Step 1/2 error: Check failed: Check 1/1 error: data.libvirt_node_info.info: Attribute 'cpus' didn't match "^\\d+", got ""
-```
d.Set("cpu_model", int8ToString(model))
d.Set("cpu_cores_total", cpus)
d.Set("cpu_cores_per_socket", cores)
d.Set("numa_nodes", nodes)
d.Set("cpu_sockets", sockets)
d.Set("cpu_threads_per_core", threads)
d.Set("numa_nodes", nodes)
d.Set("memory_total_kb", memory)
Test tests for an attribute cpu, which has never been set. It is clear integration tests were not run, and shows the need to get them to run in CI with nested virtualization.
Hello,
this PR adds support for new data sources:
libvirt_node_info
- to retrieve node information and make it available to Terraform. (virsh nodeinfo
)libvirt_node_devices
- retrieves the list of devices available in the node, can be filtered by capability. (virsh nodedev-list
)libvirt_node_device_info
- retrieves information about a single device. (virsh nodedev-dumpxml
)Apart from the changes to
docs
andprovider.go
to plugin in the documentation and the new resources, changes are in new files.