Syntax for specifying an interface by name is too verbose/redundant

Bug #1782229 reported by Mike Pontillo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Won't Fix
Undecided
Unassigned

Bug Description

Given the following Netplan syntax, whereby I only need to know that an interface by the name `ens3` exists:

"""
network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      match:
        name: ens3
  bridges:
    br0:
      interfaces: [ens3]
      dhcp4: true
"""

... it would be nice to be able to use a less verbose syntax. For example, it would be nice if the following syntax were equivalent to the above:

"""
network:
  version: 2
  renderer: networkd
  ethernets:
    ens3: {}
  bridges:
    br0:
      interfaces: [ens3]
      dhcp4: true
"""

description: updated
summary: - Syntax for specifying an interface by name is redundant
+ Syntax for specifying an interface by name is too verbose/redundant
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Actually, this seems like it's maybe just a documentation bug. I tried this just now and it worked. ;-)

Here's my working config:

"""
network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      dhcp4: yes
    ens9: {}
  bridges:
    br0:
      interfaces: [ens9]
      addresses:
       - 172.16.99.10/24
"""

I guess if the dictionary key is an interface name, netplan considers it a match-by-name by default..?

Revision history for this message
Lukas Märdian (slyon) wrote :

Indeed. If no "match: ..." stanza is given. It will assume the ID to be an interface name.

Changed in netplan:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.