-
Notifications
You must be signed in to change notification settings - Fork 23
MGMT-21646: Static Networking Configuration #214
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| +3 −0 | .gitignore | |
| +13 −13 | .tekton/assisted-service-mcp-saas-main-pull-request.yaml | |
| +20 −13 | .tekton/assisted-service-mcp-saas-main-push.yaml | |
| +2 −1 | Dockerfile | |
| +4 −0 | Makefile | |
| +2 −0 | OWNERS | |
| +69 −0 | integration_test/mock_server/README.md | |
| +3 −0 | integration_test/mock_server/go.mod | |
| +256 −0 | integration_test/mock_server/mock_server.go | |
| +148 −0 | integration_test/performance/README.md | |
| +455 −0 | integration_test/performance/performance_test.py | |
| +177 −0 | integration_test/performance/run_performance_test.sh | |
| +12 −0 | pyproject.toml | |
| +13 −23 | scripts/deploy_from_template.sh | |
| +331 −45 | server.py | |
| +16 −0 | static_net/__init__.py | |
| +106 −0 | static_net/config.py | |
| +229 −0 | static_net/template.py | |
| +66 −0 | tests/template.yaml | |
| +6 −0 | tests/test_server.py | |
| +476 −0 | tests/test_static_net.py | |
| +590 −268 | uv.lock |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,13 +36,6 @@ | |||||||||||||||||||||||||||||||||||||||||
| - - tool_name: list_operator_bundles | ||||||||||||||||||||||||||||||||||||||||||
| arguments: {} | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| - conversation_group: static_networking_support_conv | ||||||||||||||||||||||||||||||||||||||||||
| conversation: | ||||||||||||||||||||||||||||||||||||||||||
| - eval_id: static_networking_support | ||||||||||||||||||||||||||||||||||||||||||
| eval_query: Create a cluster with static networking | ||||||||||||||||||||||||||||||||||||||||||
| eval_types: [response_eval:sub-string] | ||||||||||||||||||||||||||||||||||||||||||
| expected_keywords: ["I do not support creating clusters with static networking", "assisted-installer web-based wizard"] | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| - conversation_group: sno_requirements_conv | ||||||||||||||||||||||||||||||||||||||||||
| conversation: | ||||||||||||||||||||||||||||||||||||||||||
| - eval_id: sno_requirements | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -194,3 +187,46 @@ | |||||||||||||||||||||||||||||||||||||||||
| cluster_id: "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" | ||||||||||||||||||||||||||||||||||||||||||
| expected_keywords: ["cluster", "eval-test2-uniq-cluster-name", "test.local", "4.18.22"] | ||||||||||||||||||||||||||||||||||||||||||
| description: Test handling requesting a cluster by name | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| - conversation_group: static_net_config_vlan | ||||||||||||||||||||||||||||||||||||||||||
| description: Configure a basic static network config for two hosts with vlans | ||||||||||||||||||||||||||||||||||||||||||
| conversation: | ||||||||||||||||||||||||||||||||||||||||||
| - eval_id: create_eval_test_sno | ||||||||||||||||||||||||||||||||||||||||||
| eval_query: create a new single node cluster named eval-test-static-net-cluster, running on version 4.19.7 with the x86_64 CPU architecture, configured under the base domain example.com, without an ssh key. | ||||||||||||||||||||||||||||||||||||||||||
| eval_types: [tool_eval] | ||||||||||||||||||||||||||||||||||||||||||
| expected_tool_calls: | ||||||||||||||||||||||||||||||||||||||||||
| - - tool_name: create_cluster | ||||||||||||||||||||||||||||||||||||||||||
| arguments: | ||||||||||||||||||||||||||||||||||||||||||
| name: "eval-test-static-net-cluster" | ||||||||||||||||||||||||||||||||||||||||||
| version: "4\\.19\\.7" | ||||||||||||||||||||||||||||||||||||||||||
| base_domain: "example\\.com" | ||||||||||||||||||||||||||||||||||||||||||
| single_node: "(?i:true)" | ||||||||||||||||||||||||||||||||||||||||||
| cpu_architecture: "x86_64" | ||||||||||||||||||||||||||||||||||||||||||
| ssh_public_key: null | ||||||||||||||||||||||||||||||||||||||||||
| - eval_id: configure_hosts | ||||||||||||||||||||||||||||||||||||||||||
| eval_query: | | ||||||||||||||||||||||||||||||||||||||||||
| I want to configure static networking. Create configs for two hosts: both have a single vlan interface backed by an ethernet interface. The first has an ethernet interface with mac address c5:d6:bc:f0:05:20, and the vlan interface has ip address 10.0.0.5/24. The second has an ethernet mac address of a0:a9:b6:81:c7:a6 and a vlan ip address of 10.0.0.6/24. The vlan id for both is 400. Use the name eth0 for the ethernet interface and vlan0 as the name of the vlan interface for both hosts. Also I want DNS config for both of these configs with a DNS server 8.8.8.8. | ||||||||||||||||||||||||||||||||||||||||||
| eval_types: [tool_eval] | ||||||||||||||||||||||||||||||||||||||||||
| expected_tool_calls: | ||||||||||||||||||||||||||||||||||||||||||
| - - tool_name: generate_nmstate_yaml | ||||||||||||||||||||||||||||||||||||||||||
| arguments: | ||||||||||||||||||||||||||||||||||||||||||
| params: |- | ||||||||||||||||||||||||||||||||||||||||||
| \{"ethernet_ifaces": \[\{"mac_address": "c5:d6:bc:f0:05:20", "name": "eth0"}\], "vlan_ifaces": \[{"name": "vlan0", "vlan_id": 400, "base_interface_name": "eth0", "ipv4_address": {"address": "10.0.0.5", "cidr_length": 24}}\], "dns": {"dns_servers": \["8.8.8.8"\]}} | ||||||||||||||||||||||||||||||||||||||||||
| - - tool_name: generate_nmstate_yaml | ||||||||||||||||||||||||||||||||||||||||||
| arguments: | ||||||||||||||||||||||||||||||||||||||||||
| params: |- | ||||||||||||||||||||||||||||||||||||||||||
| {"ethernet_ifaces": \[{"mac_address": "a0:a9:b6:81:c7:a6", "name": "eth0"}\], "vlan_ifaces": \[{"name": "vlan0", "vlan_id": 400, "base_interface_name": "eth0", "ipv4_address": {"address": "10.0.0.6", "cidr_length": 24}}\], "dns": {"dns_servers": \["8.8.8.8"\]}} | ||||||||||||||||||||||||||||||||||||||||||
| - eval_id: apply_to_cluster | ||||||||||||||||||||||||||||||||||||||||||
| eval_query: Yes, apply it to the cluster. | ||||||||||||||||||||||||||||||||||||||||||
| eval_types: [tool_eval] | ||||||||||||||||||||||||||||||||||||||||||
| expected_tool_calls: | ||||||||||||||||||||||||||||||||||||||||||
| - - tool_name: alter_static_network_config_nmstate_for_host | ||||||||||||||||||||||||||||||||||||||||||
| arguments: | ||||||||||||||||||||||||||||||||||||||||||
| cluster_id: "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" | ||||||||||||||||||||||||||||||||||||||||||
| index: null | ||||||||||||||||||||||||||||||||||||||||||
| new_nmstate_yaml: "10.0.0.5" | ||||||||||||||||||||||||||||||||||||||||||
| - - tool_name: alter_static_network_config_nmstate_for_host | ||||||||||||||||||||||||||||||||||||||||||
| arguments: | ||||||||||||||||||||||||||||||||||||||||||
| cluster_id: "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" | ||||||||||||||||||||||||||||||||||||||||||
| index: null | ||||||||||||||||||||||||||||||||||||||||||
| new_nmstate_yaml: "10.0.0.6" | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+223
to
+232
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ Verification inconclusivenew_nmstate_yaml should contain YAML, not an IP literal; assert by regex if full YAML is too long Right now you’re matching “10.0.0.x”. That doesn’t reflect the intended argument type and risks false positives. Apply this diff to assert presence within the YAML: - new_nmstate_yaml: "10.0.0.5"
+ new_nmstate_yaml: "(?s).*10\\.0\\.0\\.5.*"
@@
- new_nmstate_yaml: "10.0.0.6"
+ new_nmstate_yaml: "(?s).*10\\.0\\.0\\.6.*"Optionally add expected validate_nmstate_yaml calls after generation and before apply to align with the new flow. Assert full nmstate YAML (not an IP literal) new_nmstate_yaml currently contains bare IP literals — require a multiline regex that asserts the IP appears inside the nmstate YAML to avoid false positives. - new_nmstate_yaml: "10.0.0.5"
+ new_nmstate_yaml: "(?s).*10\\.0\\.0\\.5.*"
@@
- new_nmstate_yaml: "10.0.0.6"
+ new_nmstate_yaml: "(?s).*10\\.0\\.0\\.6.*"Add validate_nmstate_yaml checks between generation and apply to align with this flow. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.