mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
VR CsGuestNetwork obey useextdns
This commit is contained in:
parent
ed820bebe5
commit
2790d7a69b
@ -38,13 +38,15 @@ class CsGuestNetwork:
|
||||
def get_dns(self):
|
||||
if not self.guest:
|
||||
return self.config.get_dns()
|
||||
# Can a router provide dhcp but not dns?
|
||||
if 'dns' in self.data and 'router_guest_gateway' in self.data:
|
||||
return [self.data['router_guest_gateway']] + self.data['dns'].split(',')
|
||||
elif "router_guest_gateway" in self.data:
|
||||
return [self.data['router_guest_gateway']]
|
||||
else:
|
||||
return [""]
|
||||
|
||||
dns = []
|
||||
if not self.config.use_extdns() and 'router_guest_gateway' in self.data:
|
||||
dns.append(self.data['router_guest_gateway'])
|
||||
|
||||
if 'dns' in self.data:
|
||||
dns.extend(self.data['dns'].split(','))
|
||||
|
||||
return dns or ['']
|
||||
|
||||
def set_dns(self, val):
|
||||
self.data['dns'] = val
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user