-
Notifications
You must be signed in to change notification settings - Fork 212
Add source_address_prefixes as a variable to the azure runbook #3839
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
Conversation
… default Co-authored-by: LiliDeng <10083705+LiliDeng@users.noreply.github.com>
@squirrelsc LGTM. |
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@squirrelsc if you need me to assist with this PR, please tag me. |
@LiliDeng I think the |
Co-authored-by: squirrelsc <27178119+squirrelsc@users.noreply.github.com>
Added support for string input in commit 7515652. The String format (comma-separated): lisa -r ./microsoft/runbook/azure.yml -v "source_address_prefixes:192.168.1.0/24,10.0.0.0/8" List format (original): lisa -r ./microsoft/runbook/azure.yml -v "source_address_prefixes:['192.168.1.0/24','10.0.0.0/8']" The implementation follows the same pattern as Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@copilot please fix the flake8 error.
|
Co-authored-by: LiliDeng <10083705+LiliDeng@users.noreply.github.com>
@copilot can you rebase the code from main and resolve the conflict? |
Rebased the code from main branch and resolved the merge conflicts in commit 5887326. The Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@copilot please update doc here https://github.com/microsoft/lisa/blob/main/docs/run_test/platform.rst#set-other-azure-parameters for how to use source_address_prefixes |
Co-authored-by: LiliDeng <10083705+LiliDeng@users.noreply.github.com>
Updated the documentation for |
- Enhanced _get_ip_addresses method with ast.literal_eval for robust string parsing - Added proper error handling for malformed list strings - Simplified documentation examples to show string and list formats only - Removed variable file example as requested Co-authored-by: LiliDeng <10083705+LiliDeng@users.noreply.github.com>
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@squirrelsc LGTM, and I have tested it. |
This PR adds
source_address_prefixes
as a configurable parameter to the Azure runbook (microsoft/runbook/azure.yml
), allowing users to specify source IP address restrictions for network security groups.Changes Made
source_address_prefixes
variable with default value[]
(empty list) to the variables sectionsource_address_prefixes: $(source_address_prefixes)
to the azure platform configuration to enable variable substitutionUsage
Users can now specify source address prefixes via command line:
Implementation Details
The parameter flows through the system as follows:
azure.yml
runbook defines the variable and passes it to the Azure platform configurationAzurePlatformSchema
accepts the parameter (already existed)AzureArmParameter
class includes the parameter (already existed)This change only exposes an existing parameter that was previously hardcoded, making it user-configurable while maintaining backward compatibility with the empty default.
Fixes #3838.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.