Add default nameservers to IPv4 subnet
This allows VMs to reach the internet to install packages Change-Id: I42e74eaac06f91ba0eeba648a286e69a4e477f2e
This commit is contained in:
parent
6319ca9fbd
commit
7ae874af48
@ -27,12 +27,17 @@ OPTIONS = [
|
||||
cfg.IntOpt('ipv4_prefixlen',
|
||||
default=24,
|
||||
help="The mask bits for IPv4 subnets"),
|
||||
cfg.ListOpt('ipv4_dns_nameservers',
|
||||
default=['8.8.8.8', '8.8.4.4'],
|
||||
help="The CIDR block to allocate IPv4 subnets from"),
|
||||
cfg.StrOpt('ipv6_cidr',
|
||||
default='2001:db8::/48',
|
||||
help="The CIDR block to allocate IPv6 subnets from"),
|
||||
cfg.IntOpt('ipv6_prefixlen',
|
||||
default=64,
|
||||
help="The mask bits for IPv6 subnets"),
|
||||
cfg.ListOpt('ipv6_dns_nameservers',
|
||||
help="The CIDR block to allocate IPv4 subnets from"),
|
||||
cfg.IntOpt('custom_mtu_size',
|
||||
default=1350,
|
||||
help=("Customized maximum transfer unit size\n"
|
||||
|
@ -158,6 +158,10 @@ class NetworkStackFixture(heat.HeatStackFixture):
|
||||
def ipv4_subnet_gateway_ip(self):
|
||||
return netaddr.IPAddress(self.ipv4_subnet_details['gateway_ip'])
|
||||
|
||||
@property
|
||||
def ipv4_dns_nameservers(self):
|
||||
return ','.join(CONF.tobiko.neutron.ipv4_dns_nameservers or [])
|
||||
|
||||
@property
|
||||
def ipv6_subnet_details(self):
|
||||
return neutron.get_subnet(self.ipv6_subnet_id)
|
||||
@ -170,6 +174,10 @@ class NetworkStackFixture(heat.HeatStackFixture):
|
||||
def ipv6_subnet_gateway_ip(self):
|
||||
return netaddr.IPAddress(self.ipv6_subnet_details['gateway_ip'])
|
||||
|
||||
@property
|
||||
def ipv6_dns_nameservers(self):
|
||||
return ','.join(CONF.tobiko.neutron.ipv6_dns_nameservers or [])
|
||||
|
||||
@property
|
||||
def gateway_details(self):
|
||||
return neutron.get_router(self.gateway_id)
|
||||
|
@ -42,16 +42,12 @@ parameters:
|
||||
ipv4_dns_nameservers:
|
||||
description: IPv4 nameservers IP addresses
|
||||
type: comma_delimited_list
|
||||
default: []
|
||||
constraints:
|
||||
- custom_constraint: dns_name
|
||||
default: ''
|
||||
|
||||
ipv6_dns_nameservers:
|
||||
description: IPv6 nameservers IP addresses
|
||||
type: comma_delimited_list
|
||||
default: []
|
||||
constraints:
|
||||
- custom_constraint: dns_name
|
||||
default: ''
|
||||
|
||||
ipv6_address_mode:
|
||||
description: IPv6 address mode
|
||||
|
Loading…
x
Reference in New Issue
Block a user