-
Notifications
You must be signed in to change notification settings - Fork 231
VM Specification Validation Test Suite #4408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SRIKKANTH
wants to merge
10
commits into
main
Choose a base branch
from
smyakam/26_04_06/sku_checker
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ee034bf
VM Specification Validation Test Suite
SRIKKANTH 16e74ed
Update lisa/microsoft/runbook/examples/vm_spec_validation.yml
SRIKKANTH cc3f477
Update vm_spec_validation.py
SRIKKANTH 8ff7c0c
Update vm_spec_validation.py
SRIKKANTH af8a571
Update vm_spec_validation.py
SRIKKANTH 2b3e1e7
Update vm_spec_validation.py
SRIKKANTH c0aa3b3
Update vm_specs.csv
SRIKKANTH 91e1d54
Update vm_spec_validation.py
SRIKKANTH f48c17f
Update vm_spec_validation.py
SRIKKANTH 3e77bb9
Update vm_spec_validation.py
SRIKKANTH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
|
||
| # ------------------------------------------------------------------- | ||
| # 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: "" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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,,, |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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_filevalue). 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.