Default DNS servers for servers in Neutron network
Add default DNS server (Google's one) for the Servers created inside Neutron network. Change-Id: Id6e799056b70fd3ae11f196fb3eb55fa1e3f204d
This commit is contained in:
parent
1b54698628
commit
458a7c83cf
@ -1084,7 +1084,10 @@ class FakeNeutronClient(object):
|
|||||||
def create_subnet(self, data):
|
def create_subnet(self, data):
|
||||||
subnet = setup_dict(data["subnet"],
|
subnet = setup_dict(data["subnet"],
|
||||||
required=["network_id", "cidr", "ip_version"],
|
required=["network_id", "cidr", "ip_version"],
|
||||||
defaults={"name": generate_name("subnet_")})
|
defaults={
|
||||||
|
"name": generate_name("subnet_"),
|
||||||
|
"dns_nameservers": ["8.8.8.8", "8.8.4.4"]
|
||||||
|
})
|
||||||
if subnet["network_id"] not in self.__networks:
|
if subnet["network_id"] not in self.__networks:
|
||||||
raise neutron_exceptions.NeutronClientException
|
raise neutron_exceptions.NeutronClientException
|
||||||
|
|
||||||
@ -1092,7 +1095,6 @@ class FakeNeutronClient(object):
|
|||||||
subnet.update({"id": subnet_id,
|
subnet.update({"id": subnet_id,
|
||||||
"enable_dhcp": True,
|
"enable_dhcp": True,
|
||||||
"tenant_id": self.__tenant_id,
|
"tenant_id": self.__tenant_id,
|
||||||
"dns_nameservers": [],
|
|
||||||
"ipv6_ra_mode": None,
|
"ipv6_ra_mode": None,
|
||||||
"allocation_pools": [],
|
"allocation_pools": [],
|
||||||
"gateway_ip": re.sub("./.*$", "1", subnet["cidr"]),
|
"gateway_ip": re.sub("./.*$", "1", subnet["cidr"]),
|
||||||
|
Loading…
Reference in New Issue
Block a user