Comment 5 for bug 1686856

Revision history for this message
Ryan McCabe (rmccabe) wrote :

This still appears to be broken in 17.1 and master:

$ cat yaml.txt
network:
    version: 1
    config:
        - type: physical
          name: interface0
          mac_address: "52:54:00:12:34:00"
          subnets:
              - type: static
                address: 10.0.2.15
                netmask: 255.255.255.0
                gateway: 10.0.2.2

$ ./net-convert.py --network-data yaml.txt -d out/ --kind yaml --output-kind sysconfig

$ find out -type f
out/etc/udev/rules.d/70-persistent-net.rules
out/etc/resolv.conf
out/etc/sysconfig/network-scripts/ifcfg-interface0

$ find out -type f -print0|xargs -0 cat
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:00:12:34:00", NAME="interface0"
; Created by cloud-init on instance boot automatically, do not edit.
;
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=static
DEVICE=interface0
HWADDR=52:54:00:12:34:00
IPADDR=10.0.2.15
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no