Skip to content

net, udn: Change passt binding plugin to core binding#4033

Open
frenzyfriday wants to merge 1 commit intoRedHatQE:mainfrom
frenzyfriday:passt-core-binding
Open

net, udn: Change passt binding plugin to core binding#4033
frenzyfriday wants to merge 1 commit intoRedHatQE:mainfrom
frenzyfriday:passt-core-binding

Conversation

@frenzyfriday
Copy link
Contributor

@frenzyfriday frenzyfriday commented Mar 2, 2026

As a part of the passt-beta VEP [1] passt is now a core binding instead of a binding plugin.
This commit updates the udn passt tests so that they use VMs with interface that has passtBinding instead of binding:passt

[1] https://github.com/kubevirt/enhancements/blob/main/veps/sig-network/passt/passt-beta.md

Short description:
More details:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:

passtBinding is the name of the interface binding according to KubeVirt schema
Since this is a camel case and python requires it to be a snake case I have added noqa at passtBinding: dict[Any, Any] | None = None # noqa: N815 following this example

Tested locally on a 4.22 cluster

uv run pytest tests/network/user_defined_network/test_user_defined_network_passt.py
2026-03-04T12:44:14.152318 utilities.pytest_utils INFO Getting artifactory server information using cluster host url: https://api.anbanerj-passt-422.rhos-psi.cnv-qe.rhood.us:6443
2026-03-04T12:44:14.153650 utilities.pytest_utils INFO Using user requested `ARTIFACTORY_SERVER` environment variable: rhos-psi.cnv-qe.rhood.us
2026-03-04T12:44:14.666730 utilities.bitwarden INFO Cache info stats for pulling secrets: CacheInfo(hits=0, misses=1, maxsize=None, currsize=0)
2026-03-04T12:44:14.973324 utilities.bitwarden INFO Cache info stats for getting specific secret: CacheInfo(hits=0, misses=1, maxsize=None, currsize=0)
/home/anbanerj/work/cnv/openshift-virtualization-tests/.venv/lib64/python3.14/site-packages/kubernetes/client/exceptions.py:91: DeprecationWarning: HTTPResponse.getheaders() is deprecated and will be removed in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.
  self.headers = http_resp.getheaders()
/home/anbanerj/work/cnv/openshift-virtualization-tests/.venv/lib64/python3.14/site-packages/kubernetes/client/exceptions.py:91: DeprecationWarning: HTTPResponse.getheaders() is deprecated and will be removed in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.
  self.headers = http_resp.getheaders()
2026-03-04T12:44:15.387223 ocp_resources Namespace INFO Create Namespace cnv-tests-run-in-progress-ns
2026-03-04T12:44:15.387757 ocp_resources Namespace INFO Posting {'apiVersion': 'v1', 'kind': 'Namespace', 'metadata': {'name': 'cnv-tests-run-in-progress-ns'}, 'spec': {}}
2026-03-04T12:44:15.689152 ocp_resources Namespace INFO Wait until Namespace cnv-tests-run-in-progress-ns is created
2026-03-04T12:44:15.893780 ocp_resources Namespace INFO Wait for Namespace cnv-tests-run-in-progress-ns status to be Active
2026-03-04T12:44:16.097526 ocp_resources Namespace INFO Status of Namespace cnv-tests-run-in-progress-ns is Active
2026-03-04T12:44:16.099252 ocp_resources Namespace INFO Update Namespace cnv-tests-run-in-progress-ns:
{'metadata': {'labels': {'pod-security.kubernetes.io/enforce': 'privileged', 'security.openshift.io/scc.podSecurityLabelSync': 'false'}, 'name': 'cnv-tests-run-in-progress-ns'}}
2026-03-04T12:44:16.306973 ocp_resources ConfigMap INFO Create ConfigMap cnv-tests-run-in-progress
2026-03-04T12:44:16.307513 ocp_resources ConfigMap INFO Posting {'apiVersion': 'v1', 'kind': 'ConfigMap', 'metadata': {'name': 'cnv-tests-run-in-progress', 'namespace': 'cnv-tests-run-in-progress-ns'}, 'data': '*******'}
2026-03-04T12:44:16.711789 ocp_resources ConfigMap INFO Wait until ConfigMap cnv-tests-run-in-progress is created
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.14.3, pytest-9.0.2, pluggy-1.6.0
benchmark: 5.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/anbanerj/work/cnv/openshift-virtualization-tests
configfile: pytest.ini (WARNING: ignoring pytest config in pyproject.toml!)
plugins: repeat-0.9.4, testconfig-0.2.0, jira-0.3.22, mock-3.15.1, html-4.1.1, dependency-0.6.0, metadata-3.1.1, progress-1.4.0, anyio-4.12.1, order-1.3.0, benchmark-5.2.3
collected 3 items                                                                                                                                                                                                 

tests/network/user_defined_network/test_user_defined_network_passt.py 2026-03-04T12:51:09.185488 libs.net.traffic_generator WARNING Command: ["pkill -f 'iperf3 --server --port 5201 --one-off'", '[fedora@ibm-p8-kvm-03-guest-02 ~]'] - exec failed. Error: timeout: echo rc==$?==
rc==1==
[fedora@ibm-p8-kvm-03-guest-02 ~]$ 
.
TEST: test_passt_connectivity_is_preserved_during_client_live_migration STATUS: PASSED
------------------------------------------------------- TEARDOWN -------------------------------------------------------

__________________________________________________________________ 1 of 3 completed, 1 Pass, 0 Fail, 0 Skip, 0 XPass, 0 XFail, 0 Error, 0 ReRun ___________________________________________________________________

tests/network/user_defined_network/test_user_defined_network_passt.py 
-------------------------- test_passt_connectivity_is_preserved_during_server_live_migration --------------------------
-------------------------------------------------------- SETUP --------------------------------------------------------
2026-03-04T12:52:19.894934 libs.net.traffic_generator WARNING Command: ["pkill -f 'iperf3 --server --port 5201 --one-off'", '[fedora@ibm-p8-kvm-03-guest-02 ~]'] - exec failed. Error: timeout: echo rc==$?==
rc==1==
[fedora@ibm-p8-kvm-03-guest-02 ~]$ 
.
__________________________________________________________________ 2 of 3 completed, 2 Pass, 0 Fail, 0 Skip, 0 XPass, 0 XFail, 0 Error, 0 ReRun ___________________________________________________________________

tests/deprecated_api/test_deprecation_audit_logs.py .
__________________________________________________________________ 3 of 3 completed, 3 Pass, 0 Fail, 0 Skip, 0 XPass, 0 XFail, 0 Error, 0 ReRun ___________________________________________________________________
                                                                                                                                                                                                            [100%]2026-03-04T13:01:53.426090 ocp_resources ConfigMap INFO Delete ConfigMap cnv-tests-run-in-progress
2026-03-04T13:01:53.805700 ocp_resources ConfigMap INFO Deleting {'kind': 'ConfigMap', 'apiVersion': 'v1', 'metadata': {'name': 'cnv-tests-run-in-progress', 'namespace': 'cnv-tests-run-in-progress-ns', 'uid': '90949547-380f-4f88-b72a-2e50cd3f4f1e', 'resourceVersion': '956452', 'creationTimestamp': '2026-03-04T11:44:16Z', 'managedFields': [{'manager': 'OpenAPI-Generator', 'operation': 'Update', 'apiVersion': 'v1', 'time': '2026-03-04T11:44:16Z', 'fieldsType': 'FieldsV1', 'fieldsV1': {'f:data': {'.': {}, 'f:host': {}, 'f:pytest_cmd': {}, 'f:run-in-container': {}, 'f:running_from_dir': {}, 'f:session-id': {}, 'f:user': {}}}}]}, 'data': '*******'}
2026-03-04T13:01:54.004305 ocp_resources ConfigMap INFO Wait until ConfigMap cnv-tests-run-in-progress is deleted
2026-03-04T13:01:54.363678 ocp_resources Namespace INFO Delete Namespace cnv-tests-run-in-progress-ns
2026-03-04T13:01:54.722166 ocp_resources Namespace INFO Deleting {'kind': 'Namespace', 'apiVersion': 'v1', 'metadata': {'name': 'cnv-tests-run-in-progress-ns', 'uid': '3706e3fd-f850-4b67-9993-f4ce9d4a034c', 'resourceVersion': '956450', 'creationTimestamp': '2026-03-04T11:44:15Z', 'labels': {'kubernetes.io/metadata.name': 'cnv-tests-run-in-progress-ns', 'pod-security.kubernetes.io/audit': 'restricted', 'pod-security.kubernetes.io/audit-version': 'latest', 'pod-security.kubernetes.io/enforce': 'privileged', 'pod-security.kubernetes.io/enforce-version': 'latest', 'pod-security.kubernetes.io/warn': 'restricted', 'pod-security.kubernetes.io/warn-version': 'latest', 'security.openshift.io/scc.podSecurityLabelSync': 'false'}, 'annotations': {'openshift.io/sa.scc.mcs': 's0:c30,c0', 'openshift.io/sa.scc.supplemental-groups': '1000870000/10000', 'openshift.io/sa.scc.uid-range': '1000870000/10000', 'security.openshift.io/MinimallySufficientPodSecurityStandard': 'restricted'}, 'managedFields': [{'manager': 'cluster-policy-controller', 'operation': 'Apply', 'apiVersion': 'v1', 'time': '2026-03-04T11:44:15Z', 'fieldsType': 'FieldsV1', 'fieldsV1': {'f:metadata': {'f:annotations': {'f:openshift.io/sa.scc.mcs': {}, 'f:openshift.io/sa.scc.supplemental-groups': {}, 'f:openshift.io/sa.scc.uid-range': {}}}}}, {'manager': 'pod-security-admission-label-synchronization-controller', 'operation': 'Apply', 'apiVersion': 'v1', 'time': '2026-03-04T11:44:15Z', 'fieldsType': 'FieldsV1', 'fieldsV1': {'f:metadata': {'f:annotations': {'f:security.openshift.io/MinimallySufficientPodSecurityStandard': {}}, 'f:labels': {'f:pod-security.kubernetes.io/audit': {}, 'f:pod-security.kubernetes.io/audit-version': {}, 'f:pod-security.kubernetes.io/enforce-version': {}, 'f:pod-security.kubernetes.io/warn': {}, 'f:pod-security.kubernetes.io/warn-version': {}}}}}, {'manager': 'OpenAPI-Generator', 'operation': 'Update', 'apiVersion': 'v1', 'time': '2026-03-04T11:44:16Z', 'fieldsType': 'FieldsV1', 'fieldsV1': {'f:metadata': {'f:labels': {'.': {}, 'f:kubernetes.io/metadata.name': {}, 'f:pod-security.kubernetes.io/enforce': {}, 'f:security.openshift.io/scc.podSecurityLabelSync': {}}}}}]}, 'spec': {'finalizers': ['kubernetes']}, 'status': {'phase': 'Active'}}
2026-03-04T13:01:54.927043 ocp_resources Namespace INFO Wait until Namespace cnv-tests-run-in-progress-ns is deleted
=================================================================================== 3 passed, 39 warnings in 1066.45s (0:17:46) ===================================================================================

================================================================================================ warnings summary =================================================================================================
tests/network/user_defined_network/test_user_defined_network_passt.py: 13 warnings
tests/deprecated_api/test_deprecation_audit_logs.py: 4 warnings
.venv/lib64/python3.14/site-packages/kubernetes/client/exceptions.py:91: 2 warnings
  /home/anbanerj/work/cnv/openshift-virtualization-tests/.venv/lib64/python3.14/site-packages/kubernetes/client/exceptions.py:91: DeprecationWarning: HTTPResponse.getheaders() is deprecated and will be removed in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.
    self.headers = http_resp.getheaders()

tests/network/user_defined_network/test_user_defined_network_passt.py::test_passt_connectivity_is_preserved_during_client_live_migration
tests/network/user_defined_network/test_user_defined_network_passt.py::test_passt_connectivity_is_preserved_during_client_live_migration
tests/network/user_defined_network/test_user_defined_network_passt.py::test_passt_connectivity_is_preserved_during_client_live_migration
tests/network/user_defined_network/test_user_defined_network_passt.py::test_passt_connectivity_is_preserved_during_server_live_migration
  /home/anbanerj/work/cnv/openshift-virtualization-tests/.venv/lib64/python3.14/site-packages/ocp_resources/resource.py:1612: FutureWarning: 'client' arg will be mandatory in the next major release. `config_file` and `context` args will be removed.
    super().__init__(

tests/network/user_defined_network/test_user_defined_network_passt.py::test_passt_connectivity_is_preserved_during_client_live_migration
tests/network/user_defined_network/test_user_defined_network_passt.py::test_passt_connectivity_is_preserved_during_client_live_migration
  /home/anbanerj/work/cnv/openshift-virtualization-tests/libs/vm/vm.py:177: FutureWarning: `dyn_client` arg will be renamed to `client` and will be mandatory in the next major release. `config_file` and `context` will be removed.
    architecture=get_nodes_cpu_architecture(nodes=list(Node.get())),

tests/network/user_defined_network/test_user_defined_network_passt.py: 16 warnings
  /usr/lib64/python3.14/pty.py:66: DeprecationWarning: This process (pid=19735) is multi-threaded, use of forkpty() may lead to deadlocks in the child.
    pid, fd = os.forkpty()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================================================================================== 3 passed, 41 warnings in 1066.46s (0:17:46) ===================================================================================
2026-03-04T13:01:54.004892 timeout_sampler INFO Waiting for 240 seconds [0:04:00], retry every 1 seconds. (Function: ocp_resources.resource.wait_deleted.lambda: self.exists)
2026-03-04T13:01:54.216115 timeout_sampler INFO Elapsed time: 0.0008318424224853516 [0:00:00.000832]
2026-03-04T13:01:54.927632 timeout_sampler INFO Waiting for 240 seconds [0:04:00], retry every 1 seconds. (Function: ocp_resources.resource.wait_deleted.lambda: self.exists)
2026-03-04T13:02:03.348344 timeout_sampler INFO Elapsed time: 8.269455194473267 [0:00:08.269455]

jira-ticket:

CNV-76560

Summary by CodeRabbit

  • New Features
    • Interfaces can now include optional per-interface passt configuration, enabling passt behavior to be specified per network interface.
  • Tests
    • Test suite updated to validate the new per-interface passt configuration and ensure expected network behavior when it is used.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 2, 2026

📝 Walkthrough

Walkthrough

Renames the UDN passt binding constant to UDN_PASST_CORE_BINDING_NAME = "passtBinding", adds an optional passtBinding field to Interface, updates udn_primary_network to pass passtBinding when that binding is used, and updates tests to reference the new constant.

Changes

Cohort / File(s) Summary
UDN Binding Configuration
libs/net/udn.py
Replaces UDN_BINDING_PASST_PLUGIN_NAME with UDN_PASST_CORE_BINDING_NAME = "passtBinding". Updates udn_primary_network to construct Interface(..., passtBinding={}) when binding == UDN_PASST_CORE_BINDING_NAME, otherwise uses NetBinding(name=binding).
Interface Specification
libs/vm/spec.py
Adds optional field `passtBinding: dict[Any, Any]
Tests
tests/network/user_defined_network/test_user_defined_network_passt.py
Replaces imports and usages of UDN_BINDING_PASST_PLUGIN_NAME with UDN_PASST_CORE_BINDING_NAME in test VM creation calls.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: renaming the passt binding constant from a plugin to a core binding in the network/udn modules.
Description check ✅ Passed The description includes context (passt-beta VEP, KubeVirt schema), rationale for camelCase/noqa, testing evidence (3 passed tests locally), and Jira ticket reference.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-virtualization-qe-bot-4

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: A tracking issue is created for this PR and will be closed when the PR is merged or closed
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: Enabled categories: branch, can-be-merged, cherry-pick, has-conflicts, hold, needs-rebase, size, verified, wip

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest verify-bugs-are-open - verify-bugs-are-open
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 2 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No WIP, hold, conflict labels
  5. Verified: PR must be marked as verified (if verification is enabled)

📊 Review Process

Approvers and Reviewers

Approvers:

  • EdDev
  • dshchedr
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • Anatw
  • EdDev
  • RoniKishner
  • azhivovk
  • dshchedr
  • rnetser
  • servolkov
  • vsibirsk
  • yossisegev
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is automatically removed on each new commit
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 2, 2026
@frenzyfriday
Copy link
Contributor Author

/wip

@frenzyfriday frenzyfriday force-pushed the passt-core-binding branch 2 times, most recently from 16386a8 to 580c2ff Compare March 4, 2026 11:15
@frenzyfriday frenzyfriday marked this pull request as ready for review March 4, 2026 11:15
@openshift-virtualization-qe-bot-4

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: A tracking issue is created for this PR and will be closed when the PR is merged or closed
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: Enabled categories: branch, can-be-merged, cherry-pick, has-conflicts, hold, needs-rebase, size, verified, wip

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest verify-bugs-are-open - verify-bugs-are-open
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 2 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No WIP, hold, conflict labels
  5. Verified: PR must be marked as verified (if verification is enabled)

📊 Review Process

Approvers and Reviewers

Approvers:

  • EdDev
  • dshchedr
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • Anatw
  • EdDev
  • RoniKishner
  • azhivovk
  • dshchedr
  • rnetser
  • servolkov
  • vsibirsk
  • yossisegev
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is automatically removed on each new commit
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
libs/vm/spec.py (1)

77-77: ⚠️ Potential issue | 🟠 Major

HIGH: Remove the newly introduced linter suppression on Line 77

Line 77 adds a new # noqa: N815. New suppressions are disallowed because they hide naming violations and accumulate lint debt. Keep internal field naming compliant (e.g., passt_binding) and map to external API key passtBinding at the serialization boundary.

Suggested direction
 `@dataclass`
 class Interface:
     name: str
     masquerade: dict[Any, Any] | None = None
     bridge: dict[Any, Any] | None = None
     sriov: dict[Any, Any] | None = None
-    passtBinding: dict[Any, Any] | None = None  # noqa: N815
+    passt_binding: dict[Any, Any] | None = None
     binding: NetBinding | None = None
     state: str | None = None
# then map passt_binding -> "passtBinding" when building the manifest dict
# (where VMSpec/Interface is serialized).

As per coding guidelines: "**/*.py: NEVER add linter suppressions like # noqa, # type: ignore, or # pylint: disable — if linter complains, fix the code instead".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@libs/vm/spec.py` at line 77, The new field name uses a disallowed noqa;
rename the field from passtBinding to a PEP8-compliant passt_binding (update its
declaration, any uses, and constructor/assignments) and remove the "# noqa:
N815" suppression, then update the serialization boundary (where
VMSpec/Interface is converted to the manifest/dict) to emit the external key
"passtBinding" from the internal passt_binding value so external API stays
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@libs/vm/spec.py`:
- Line 77: The new field name uses a disallowed noqa; rename the field from
passtBinding to a PEP8-compliant passt_binding (update its declaration, any
uses, and constructor/assignments) and remove the "# noqa: N815" suppression,
then update the serialization boundary (where VMSpec/Interface is converted to
the manifest/dict) to emit the external key "passtBinding" from the internal
passt_binding value so external API stays unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: df8132ea-f16e-4ae2-8d92-e346daa6fe49

📥 Commits

Reviewing files that changed from the base of the PR and between 9c1d162 and 580c2ff.

📒 Files selected for processing (3)
  • libs/net/udn.py
  • libs/vm/spec.py
  • tests/network/user_defined_network/test_user_defined_network_passt.py

@frenzyfriday
Copy link
Contributor Author

♻️ Duplicate comments (1)

libs/vm/spec.py (1)> 77-77: ⚠️ Potential issue | 🟠 Major

HIGH: Remove the newly introduced linter suppression on Line 77
Line 77 adds a new # noqa: N815. New suppressions are disallowed because they hide naming violations and accumulate lint debt. Keep internal field naming compliant (e.g., passt_binding) and map to external API key passtBinding at the serialization boundary.

Suggested direction

 `@dataclass`
 class Interface:
     name: str
     masquerade: dict[Any, Any] | None = None
     bridge: dict[Any, Any] | None = None
     sriov: dict[Any, Any] | None = None
-    passtBinding: dict[Any, Any] | None = None  # noqa: N815
+    passt_binding: dict[Any, Any] | None = None
     binding: NetBinding | None = None
     state: str | None = None
# then map passt_binding -> "passtBinding" when building the manifest dict
# (where VMSpec/Interface is serialized).

As per coding guidelines: "**/*.py: NEVER add linter suppressions like # noqa, # type: ignore, or # pylint: disable — if linter complains, fix the code instead".

🤖 Prompt for AI Agents

Verify each finding against the current code and only fix it if needed.

In `@libs/vm/spec.py` at line 77, The new field name uses a disallowed noqa;
rename the field from passtBinding to a PEP8-compliant passt_binding (update its
declaration, any uses, and constructor/assignments) and remove the "# noqa:
N815" suppression, then update the serialization boundary (where
VMSpec/Interface is converted to the manifest/dict) to emit the external key
"passtBinding" from the internal passt_binding value so external API stays
unchanged.

🤖 Prompt for all review comments with AI agents

Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@libs/vm/spec.py`:
- Line 77: The new field name uses a disallowed noqa; rename the field from
passtBinding to a PEP8-compliant passt_binding (update its declaration, any
uses, and constructor/assignments) and remove the "# noqa: N815" suppression,
then update the serialization boundary (where VMSpec/Interface is converted to
the manifest/dict) to emit the external key "passtBinding" from the internal
passt_binding value so external API stays unchanged.

ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: df8132ea-f16e-4ae2-8d92-e346daa6fe49

📥 Commits
Reviewing files that changed from the base of the PR and between 9c1d162 and 580c2ff.

📒 Files selected for processing (3)

passtBinding is the name of the interface binding according to KubeVirt schema
Since this is a camel case and python requires it to be a snake case I have added noqa at passtBinding: dict[Any, Any] | None = None # noqa: N815 following this example

As a part of the passt-beta VEP [1] passt is now a core binding
instead of a binding plugin.
This commit updates the udn passt tests so that they use VMs with
interface that has passtBinding instead of binding:passt

[1] https://github.com/kubevirt/enhancements/blob/main/veps/sig-network/passt/passt-beta.md
@frenzyfriday
Copy link
Contributor Author

Last change is a rebase

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
libs/vm/spec.py (1)

77-77: ⚠️ Potential issue | 🟠 Major

HIGH: Remove the newly added # noqa: N815 on Interface.passtBinding.

Suppressions here create lint debt and bypass the repo rule; use a compliant internal name and map it to the external manifest key during serialization.

Proposed direction
-    passtBinding: dict[Any, Any] | None = None  # noqa: N815
+    passt_binding: dict[Any, Any] | None = None

Then map passt_bindingpasstBinding in the VM manifest serialization path.

As per coding guidelines: **/*.py: NEVER add linter suppressions like # noqa, # type: ignore, or # pylint: disable — if linter complains, fix the code instead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@libs/vm/spec.py` at line 77, Remove the `# noqa: N815` suppression and rename
the Interface attribute from `passtBinding` to a linter-compliant internal name
`passt_binding` (update the attribute definition and all internal references),
then update the VM manifest serialization path (the code that emits the VM
manifest / serialize function for Interface) to map the internal `passt_binding`
back to the external manifest key `passtBinding` so the external schema remains
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@libs/vm/spec.py`:
- Line 77: Remove the `# noqa: N815` suppression and rename the Interface
attribute from `passtBinding` to a linter-compliant internal name
`passt_binding` (update the attribute definition and all internal references),
then update the VM manifest serialization path (the code that emits the VM
manifest / serialize function for Interface) to map the internal `passt_binding`
back to the external manifest key `passtBinding` so the external schema remains
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 205d3867-3415-43d3-a32e-a977023ff5a5

📥 Commits

Reviewing files that changed from the base of the PR and between 580c2ff and 30d76b4.

📒 Files selected for processing (3)
  • libs/net/udn.py
  • libs/vm/spec.py
  • tests/network/user_defined_network/test_user_defined_network_passt.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants