Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions lisa/microsoft/runbook/examples/vm_spec_validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# VM Specification Validation Runbook
#
# This runbook provisions Azure VMs based on specifications from a CSV file
# and validates that each VM matches the declared hardware properties.
#
# The CSV combinator iterates over every row in the CSV file. Each row sets
# the vm_size (used by the platform to provision) and expected_* variables
# (used by the test suite to validate).
#
# Usage:
# lisa -r lisa\microsoft\runbook\examples\vm_spec_validation.yml \
# --variable "subscription_id:<your_sub_id>" \
# --variable "csv_file:lisa\microsoft\runbook\examples\vm_specs.csv"
#
# You can also override location, marketplace_image, etc. from the CLI.

test_pass: "adhoc"

name: vm_spec_validation

include:
- path: ../azure.yml

extension:
- ../../testsuites

variable:
# Path to the CSV file with VM specifications (override via CLI if needed)
- name: csv_file
value: 'lisa\microsoft\runbook\examples\vm_specs.csv'

Comment on lines +10 to +31
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This runbook example uses Windows-style backslashes in paths (both in the CLI example and the default csv_file value). Other runbook examples in this repo use forward slashes (e.g. lisa/microsoft/runbook/examples/git_bisect.yml), which are more portable across OSes/shells. Consider switching to forward slashes in the example paths to make the sample runbook work out-of-the-box on Linux runners.

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +31
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example runbook uses Windows-style backslashes in paths (e.g., lisa\microsoft\...). On Linux/macOS runners this is usually treated as a literal backslash and can cause “file not found”. Consider switching example paths to forward slashes for cross-platform usability.

Copilot uses AI. Check for mistakes.
# -------------------------------------------------------------------
# Variables populated by the CSV combinator for each row.
# They are marked is_case_visible so the test suite can read them.
# -------------------------------------------------------------------
- name: vm_size
value: ""
is_case_visible: true
- name: expected_cpu_count
value: ""
is_case_visible: true
- name: expected_memory_gb
value: ""
is_case_visible: true
- name: expected_gpu_count
value: ""
is_case_visible: true
- name: expected_nic_count
value: ""
is_case_visible: true
- name: expected_max_disks
value: ""
is_case_visible: true
- name: expected_max_iops
value: ""
is_case_visible: true
- name: nvme_expected_max_disks
value: ""
is_case_visible: true
- name: nvme_expected_max_iops
value: ""
is_case_visible: true
- name: expected_network_bw
value: ""
is_case_visible: true
- name: expected_storage_throughput
value: ""
is_case_visible: true
- name: location
value: "westus2"
- name: marketplace_image
value: "Canonical:0001-com-ubuntu-server-jammy:22_04-lts-gen2:latest"
- name: test_pass
value: "adhoc"
- name: keep_environment
value: "no"
- name: subscription_id
value: ""
combinator:
type: csv
file_name: $(csv_file)
column_mapping:
- column: vm_size
variable: vm_size
- column: expected_cpu_count
variable: expected_cpu_count
- column: expected_memory_gb
variable: expected_memory_gb
- column: expected_gpu_count
variable: expected_gpu_count
- column: expected_nic_count
variable: expected_nic_count
- column: expected_max_disks
variable: expected_max_disks
- column: expected_max_iops
variable: expected_max_iops
- column: nvme_expected_max_disks
variable: nvme_expected_max_disks
- column: nvme_expected_max_iops
variable: nvme_expected_max_iops
- column: expected_network_bw
variable: expected_network_bw
- column: expected_storage_throughput
variable: expected_storage_throughput

# Select only the vm_spec_validation test cases
testcase:
- criteria:
area: vm_spec_validation
name: ""
2 changes: 2 additions & 0 deletions lisa/microsoft/runbook/examples/vm_specs.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vm_size,expected_cpu_count,expected_memory_gb,expected_nic_count,expected_network_bw,expected_max_disks,expected_max_iops,expected_storage_throughput,expected_gpu_count,nvme_expected_max_disks,nvme_expected_max_iops
Standard_D32s_v5,32,128,8,"16,000",32,"51,200",865,,,
Loading
Loading