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
Consistent delete/rename #993
Conversation
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.
Just to np comments. Feel free to merge.
src/lib/y2network/config.rb
Outdated
@@ -205,6 +210,54 @@ def configured_interface?(iface_name) | |||
!connections.by_interface(iface_name).empty? | |||
end | |||
|
|||
# @note does not work recursivelly. So for delete it needs to be called for all modified vlans. |
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.
np: recursively
connections.by_interface(old_name).each { |c| c.interface = new_name } | ||
connections.by_interface(old_name).each do |connection| | ||
connection.interface = new_name | ||
rename_dependencies(old_name, new_name, connection) |
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.
np: Perhaps you could omit the old_name
or the new_name
as it is contained in the connection
instance.
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.
where it is contained? I only found it in interface class, but not in connection one.
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.
Is not connection.interface
?
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.
connection.interface is only the new name ( it is string ). So this way it is more explicit for me.
✔️ Public Jenkins job #89 successfully finished |
✔️ Internal Jenkins job #19 successfully finished |
https://trello.com/c/9q8UEvBD/1326-5-network-handle-properly-removal-and-rename-of-interfaces
https://bugzilla.suse.com/show_bug.cgi?id=1153460