-
Notifications
You must be signed in to change notification settings - Fork 75
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
Implement interfaces selection like ifupdown1 #265
base: master
Are you sure you want to change the base?
Implement interfaces selection like ifupdown1 #265
Commits on Jun 16, 2023
-
Methods to handle interfaces selection like ifupdown1
ifupdown2 does not exactly respect ifupdown1 interfaces selection. It is a bit messed up between auto/all/allow/IFLIST. In ifupdown1, you must provide a -a/--all or IFLIST (except for query -l command). The --allow CLASSes are used for filtering interfaces to modify. The -a/--all command set an 'auto' CLASS if no allowed CLASS are provided. `ifup -a` command, UP all interfaces with the auto CLASS. `ifup eth1` command, UP eth1 interface (no CLASS filtering). `ifup -a --allow special`, only UP interfaces with the special CLASS. `ifup --allow hotplug eth4`, only UP eth4 interface if it has the hotplug CLASS. For query command, the -a/--all is implicit. In ifupdown2, the --allow CLASS is used as a way to retrieve interfaces. ifup/ifdown neither `--allow hotplug eth4` nor `-a --allow special` work. ifquery command returns duplicate interfaces in output.
Olivier BLIN committedJun 16, 2023 Configuration menu - View commit details
-
Copy full SHA for 40c2049 - Browse repository at this point
Copy the full SHA 40c2049View commit details -
Early expand for the ifacenames variable
This variable is passed to multiple functions where interfaces are expanded if a specific pattern is given. Sometimes, functions forget to do the expand and fail to give a result... Remaining expand in the code can be removed later without impact.
Olivier BLIN committedJun 16, 2023 Configuration menu - View commit details
-
Copy full SHA for 18af407 - Browse repository at this point
Copy the full SHA 18af407View commit details -
Parsing integration for all ifupdown2 operations
Use the new methods to create a standard interface selection for ifup, ifdown, ifquery and ifreload operations. ifquery and ifreload have a tricky implicit configuration, but I have tried to not modify the ifupdown2 behavior in any way. There is one changement on the -a/--all option that can be present or not when implicit. Now, the `ifreload -a -c` command works for example.
Olivier BLIN committedJun 16, 2023 Configuration menu - View commit details
-
Copy full SHA for d426c77 - Browse repository at this point
Copy the full SHA d426c77View commit details -
New behavior for _get_filtered_ifacenames_with_classes
Manage the IFLIST or -a/--all input for selection. Early call of _preprocess_ifacenames to control interfaces. Use --allow CLASS as a filter and not as an interfaces selector.
Olivier BLIN committedJun 16, 2023 Configuration menu - View commit details
-
Copy full SHA for c4ee00b - Browse repository at this point
Copy the full SHA c4ee00bView commit details -
Implement new interfaces selection for ifquery
* The 'no ifaces found matching' exception has been replaced by a quiet early return
Olivier BLIN committedJun 16, 2023 Configuration menu - View commit details
-
Copy full SHA for bc8f70a - Browse repository at this point
Copy the full SHA bc8f70aView commit details -
Implement new interfaces selection for ifdown
* The 'no ifaces found matching' exception has been replaced by a quiet early return
Olivier BLIN committedJun 16, 2023 Configuration menu - View commit details
-
Copy full SHA for dc716bf - Browse repository at this point
Copy the full SHA dc716bfView commit details -
Implement new interfaces selection for ifup
* The 'no ifaces found matching' exception has been replaced by a quiet early return
Olivier BLIN committedJun 16, 2023 Configuration menu - View commit details
-
Copy full SHA for 647443d - Browse repository at this point
Copy the full SHA 647443dView commit details -
Implement new interfaces selection for ifreload
Reload operation uses a -a/--all option without --allow auto as default. This command has an impact on ALL interfaces by default. The --allow can be set to filter the targetted interfaces. I do not really understand why the IFLIST is disable on this operation. It could be very useful.
Olivier BLIN committedJun 16, 2023 Configuration menu - View commit details
-
Copy full SHA for 7822e66 - Browse repository at this point
Copy the full SHA 7822e66View commit details -
ifupdown1 and ifupdown2 man are missleading on the -a/--all option.
Olivier BLIN committedJun 16, 2023 Configuration menu - View commit details
-
Copy full SHA for bff9eab - Browse repository at this point
Copy the full SHA bff9eabView commit details
Commits on Jan 10, 2024
-
Add support to call ifupdown on all interfaces
For ifupdown compatibility, '--all' implies '--allow auto'. '--allow-all' parameter offers a way to have all interfaces without implicit filter. On ifquery, --all is implicit when no interfaces are provided. So 'ifquery --allow-all' shows information on all interfaces.
Olivier BLIN committedJan 10, 2024 Configuration menu - View commit details
-
Copy full SHA for 1e4e089 - Browse repository at this point
Copy the full SHA 1e4e089View commit details -
Update man for --allow-all flag
Olivier BLIN committedJan 10, 2024 Configuration menu - View commit details
-
Copy full SHA for d1ad0bc - Browse repository at this point
Copy the full SHA d1ad0bcView commit details