Skip to content
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

Add priority to interfaces so that file names in interfaces.d can be prioritized #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gbeine
Copy link

@gbeine gbeine commented Aug 11, 2021

Debian creates the interfaces following a ranking usually indicated by prepending numbers to the ifcfg-files.
This will be enabled by this patch by adding a 'priority' field to interface definitions.

So something like

  bridge:
  - device: lxcbr0
    priority: 20
    type: bridge
...

will result in the filename 20-ifcfg-lxcbr0 instead of ifcfg-lxcbr0.

…prioritized

Debian creates the interfaces following a ranking usually indicated by prepending numbers to the ifcfg-files.
This will be enabled by this patch by adding a 'priority' field to interface definitions.
:returns: The string to prepend to an network interface filename
"""
result = ""
if interface["priority"]:

Choose a reason for hiding this comment

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

Do we get a KeyError if priority is not set?

Copy link
Author

Choose a reason for hiding this comment

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

Wow, this is old stuff.
I'll check the current state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants