Skip to content

Comments

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

Open
gbeine wants to merge 1 commit intomichaelrigart:masterfrom
gbeine-forks:master
Open

Add priority to interfaces so that file names in interfaces.d can be prioritized#113
gbeine wants to merge 1 commit intomichaelrigart:masterfrom
gbeine-forks:master

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