diff --git a/debian-isogen/examples/network-config b/debian-isogen/examples/network-config index bd4ad79..461b90b 100644 --- a/debian-isogen/examples/network-config +++ b/debian-isogen/examples/network-config @@ -1,74 +1,47 @@ -{ -"links": [ - { - "name": "pxe0", - "id": "pxe0", - "type": "phy", - "ethernet_mac_address": "52:54:00:7d:15:63" - }, - { - "name": "oam0", - "type": "phy", - "id": "oam0", - "ethernet_mac_address": "52:54:00:bf:b2:d8" - }, - { - "name": "stor0", - "id": "stor0", - "type": "phy", - "ethernet_mac_address": "52:54:00:9b:2c:71" - }, - { - "name": "underlay0", - "type": "phy", - "id": "underlay0", - "ethernet_mac_address": "52:54:00:9b:2c:71" - } -], -"networks": [ - { - "id": "pxe0-ipv4", - "type": "ipv4", - "link": "pxe0", - "ip_address": "192.168.10.100", - "netmask": "255.255.255.0" - }, - { - "id": "oam0-ipv4", - "type": "ipv4", - "link": "oam0", - "ip_address": "192.168.100.100", - "netmask": "255.255.255.0", - "routes": [ - { - "network": "0.0.0.0", - "netmask": "0.0.0.0", - "gateway": "192.168.100.1" - } - ] - }, - { - "id": "stor0-ipv4", - "type": "ipv4", - "link": "stor0", - "ip_address": "192.168.20.100", - "netmask": "255.255.255.0" - }, - { - "id": "underlay0-ipv4", - "type": "ipv4", - "link": "underlay0", - "ip_address": "192.168.30.100", - "netmask": "255.255.255.0" - } - - -], -"services": [ - { - "address": "8.8.8.8", - "type": "dns" - } -] -} +--- +links: +- name: pxe0 + id: pxe0 + type: phy + ethernet_mac_address: 52:54:00:7d:15:63 +- name: oam0 + type: phy + id: oam0 + ethernet_mac_address: 52:54:00:bf:b2:d8 +- name: stor0 + id: stor0 + type: phy + ethernet_mac_address: 52:54:00:9b:2c:71 +- name: underlay0 + type: phy + id: underlay0 + ethernet_mac_address: 52:54:00:9b:2c:71 +networks: +- id: pxe0-ipv4 + type: ipv4 + link: pxe0 + ip_address: 192.168.10.100 + netmask: 255.255.255.0 +- id: oam0-ipv4 + type: ipv4 + link: oam0 + ip_address: 192.168.100.100 + netmask: 255.255.255.0 + routes: + - network: 0.0.0.0 + netmask: 0.0.0.0 + gateway: 192.168.100.1 +- id: stor0-ipv4 + type: ipv4 + link: stor0 + ip_address: 192.168.20.100 + netmask: 255.255.255.0 +- id: underlay0-ipv4 + type: ipv4 + link: underlay0 + ip_address: 192.168.30.100 + netmask: 255.255.255.0 +services: +- address: 8.8.8.8 + type: dns diff --git a/debian-isogen/files/build.sh b/debian-isogen/files/build.sh index 2ea325a..b564054 100644 --- a/debian-isogen/files/build.sh +++ b/debian-isogen/files/build.sh @@ -28,7 +28,7 @@ chroot "${CHROOT}" < "${BASEDIR}/packages_install.sh" mkdir -p "${CLOUD_DATA_LATEST}" cp "${BASEDIR}/meta_data.json" "${CLOUD_DATA_LATEST}" cp "${USER_DATA}" "${CLOUD_DATA_LATEST}/user_data" -cp "${NET_CONFIG}" "${CLOUD_DATA_LATEST}/network_data.json" +yq r -j "${NET_CONFIG}" > "${CLOUD_DATA_LATEST}/network_data.json" echo "datasource_list: [ ConfigDrive, None ]" > \ "${CHROOT}/etc/cloud/cloud.cfg.d/95_no_cloud_ds.cfg"