Fix some output format issues
Change-Id: I6eab9da1f0c4ff047b27c3d8c572d587a32d61ce
diff --git a/scripts/nbhelper/service.py b/scripts/nbhelper/service.py
index d84f0cb..1ad992c 100644
--- a/scripts/nbhelper/service.py
+++ b/scripts/nbhelper/service.py
@@ -28,10 +28,10 @@
"dns_search": [domainName],
"dns_servers": [domain["dnsServer"]["address"]],
"ntp_servers": [domain["ntpServer"]["address"]],
- "tftp_servers": domain["dhcpServer"]["address"],
- "range": domain["dhcprange"],
+ "tftpd_server": domain["dhcpServer"]["address"],
+ "range": domain["dhcprange"][0],
"subnet": domain["subnet"],
- "routers": [{"ip": domain["router"]}],
+ "routers": domain["router"],
"hosts": list(),
}
@@ -89,11 +89,11 @@
# If service exists, set the FQDN to CNAME records
if ntpServer:
- forwardZoneConfig["cname"]["dns"] = getDomainNameByIP(ntpServer["address"])
+ forwardZoneConfig["cname"]["ntp"] = getDomainNameByIP(ntpServer["address"])
if dhcpServer:
forwardZoneConfig["cname"]["tftp"] = getDomainNameByIP(dhcpServer["address"])
if dnsServer:
- forwardZoneConfig["cname"]["dns"] = getDomainNameByIP(dnsServer["address"])
+ forwardZoneConfig["cname"]["ns"] = getDomainNameByIP(dnsServer["address"])
forwardZoneConfig["ns"].append(getDomainNameByIP(dnsServer["address"]))
for address, host in domain["hosts"].items():