Comment 3 for bug 1782221

Revision history for this message
Mike Pontillo (mpontillo) wrote :

I think that having to provide the MAC is redundant and unnecessary.

MAAS, for example, can easily provide the MAC (and already does in many cases, at least for the v1 YAML).

When rendering the YAML in non-MAAS use cases, such as when configuring a LXD container in a script[1], the writer might be able to get the MAC address somehow, but it would be an extra step that would hurt the user experience.

[1]:
# Example of creating a LXC container with a Netplan configuration passed through cloud-init.
lxc init ubuntu:b $CONTAINER -s default --no-profiles
lxc network attach $BRIDGE $CONTAINER eth0 eth0
lxc config set $CONTAINER user.network-config "version: 2
ethernets:
  eth0:
    match:
      name: eth0
bridges:
  br0:
    interfaces: [eth0]
    addresses:
     - 172.16.99.20/24
    nameservers:
      addresses: [172.16.99.22]
    routes:
     - to: 0.0.0.0/0
       via: 172.16.99.22
       metric: 50
"