Properly specify dns in network_metadata

The network-info spec states that dns should be specified as a service
in the network-info.json.

Change-Id: Ibdcc83f73e5ebca97d6beca35ab432b7ddd9a0f7
This commit is contained in:
Gregory Haynes 2015-12-06 17:56:53 -08:00
parent 1dc2451ede
commit 5dec04a8d0
1 changed files with 9 additions and 1 deletions

View File

@ -113,9 +113,17 @@ def main():
'type': 'ipv4_dhcp',
})
services = []
if module.params['ipv4_nameserver']:
services.append({
'type': 'dns',
'address': module.params['ipv4_nameserver']
})
network_metadata = {
'links': links,
'networks': networks
'networks': networks,
'services': services
}
facts = {'network_metadata': network_metadata}