diff --git a/confluent_server/confluent/config/attributes.py b/confluent_server/confluent/config/attributes.py index 44c85248..3537864b 100644 --- a/confluent_server/confluent/config/attributes.py +++ b/confluent_server/confluent/config/attributes.py @@ -491,6 +491,9 @@ node = { 'description': ('Fingerprint of the SSH key of the OS running on the ' 'system.'), }, + 'dns.domain': { + 'description': 'DNS Domain searched by default by the system' + }, 'dns.servers': { 'description': 'DNS Server or servers to provide to node', }, diff --git a/confluent_server/confluent/selfservice.py b/confluent_server/confluent/selfservice.py index a12eba1c..55ecd3b1 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -64,7 +64,7 @@ def handle_request(env, start_response): ncfg['ipv4_netmask'] = netutil.cidr_to_mask(ncfg['prefix']) deployinfo = cfg.get_node_attributes( nodename, ('deployment.*', 'console.method', 'crypted.rootpassword', - 'services.*')) + 'dns.*')) deployinfo = deployinfo.get(nodename, {}) profile = deployinfo.get( 'deployment.pendingprofile', {}).get('value', '') @@ -117,6 +117,8 @@ def handle_request(env, start_response): for dns in deployinfo.get( 'dns.servers', {}).get('value', '').split(','): ncfg['nameservers'].append(dns) + dnsdomain = dedployinfo.get('dns.domain', {}).get('value', None) + ncfg['dnsdomain'] = dnsdomain start_response('200 OK', (('Content-Type', retype),)) yield dumper(ncfg) elif env['PATH_INFO'] == '/self/sshcert':