-
Notifications
You must be signed in to change notification settings - Fork 94
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
Validate interface in desired port list of controller #2693
Conversation
b045fc5
to
73d9c4f
Compare
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
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.
Instead of checking whether it is empty, you should check whether the port list is desired or not.
With your current path, you incorrectly allows this YAML:
---
interfaces:
- name: br0
type: linux-bridge
bridge:
ports: []
- name: bond99
type: bond
state: up
controller: br0
link-aggregation:
mode: balance-rr
port:
- eth2
- eth1
73d9c4f
to
d4bf286
Compare
Thanks for the comment, I updated the patch. |
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.
Please include unit test case for
---
interfaces:
- name: br0
type: linux-bridge
bridge:
ports: []
- name: bond99
type: bond
state: up
controller: br0
link-aggregation:
mode: balance-rr
port:
- eth2
- eth1
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.
Your integration test case test_port_remove_and_validate_port_controller
has no clean up. Please introduce a fixture and do the clean up no matter test case passed or not.
c7a4459
to
6ab993a
Compare
I added the unit test. |
I updated the code to reuse the existing fixture for proper cleanup, thanks. |
6ab993a
to
445bbda
Compare
445bbda
to
b0a58aa
Compare
When the last port of the controller is absent, the port list of the controller becomes empty, in the situaiton of applying the controller and port settings again, before generating the port config, we should only validate if interface is in the desired port list of controller. Resolves: https://issues.redhat.com/browse/RHEL-31977 Signed-off-by: Wen Liang <liangwen12year@gmail.com>
b0a58aa
to
f8ff4b4
Compare
When the last port of the controller is absent, the port list of the controller becomes empty, in the situaiton of applying the controller and port settings again, before generating the port config, we should not validate if interface is in the port list of controller when port is empty.
Resolves: https://issues.redhat.com/browse/RHEL-31977