Merge "Fix inconsistent parameter type and default value type"
This commit is contained in:
@@ -462,12 +462,12 @@ controller_worker_opts = [
|
|||||||
help=_('The timezone to use in the Amphora as represented in '
|
help=_('The timezone to use in the Amphora as represented in '
|
||||||
'/usr/share/zoneinfo.')),
|
'/usr/share/zoneinfo.')),
|
||||||
cfg.ListOpt('amp_boot_network_list',
|
cfg.ListOpt('amp_boot_network_list',
|
||||||
default='',
|
default=[],
|
||||||
help=_('List of networks to attach to the Amphorae. '
|
help=_('List of networks to attach to the Amphorae. '
|
||||||
'All networks defined in the list will '
|
'All networks defined in the list will '
|
||||||
'be attached to each amphora.')),
|
'be attached to each amphora.')),
|
||||||
cfg.ListOpt('amp_secgroup_list',
|
cfg.ListOpt('amp_secgroup_list',
|
||||||
default='',
|
default=[],
|
||||||
help=_('List of security groups to attach to the Amphora.')),
|
help=_('List of security groups to attach to the Amphora.')),
|
||||||
cfg.StrOpt('client_ca',
|
cfg.StrOpt('client_ca',
|
||||||
default='/etc/octavia/certs/ca_01.pem',
|
default='/etc/octavia/certs/ca_01.pem',
|
||||||
@@ -888,7 +888,7 @@ driver_agent_opts = [
|
|||||||
default=60,
|
default=60,
|
||||||
help=_('The time, in seconds, to wait for provider agents '
|
help=_('The time, in seconds, to wait for provider agents '
|
||||||
'to shutdown after the exit event has been set.')),
|
'to shutdown after the exit event has been set.')),
|
||||||
cfg.ListOpt('enabled_provider_agents', default='',
|
cfg.ListOpt('enabled_provider_agents', default=[],
|
||||||
help=_('List of enabled provider agents. The driver-agent '
|
help=_('List of enabled provider agents. The driver-agent '
|
||||||
'will launch these agents at startup.'))
|
'will launch these agents at startup.'))
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ class VirtualMachineManager(compute_base.ComputeBase):
|
|||||||
net_id = interface.net_id
|
net_id = interface.net_id
|
||||||
# Pick the first fixed_ip if this is a boot network or if
|
# Pick the first fixed_ip if this is a boot network or if
|
||||||
# there are no boot networks configured (use default network)
|
# there are no boot networks configured (use default network)
|
||||||
if net_id in boot_networks or not boot_networks:
|
if not boot_networks or net_id in boot_networks:
|
||||||
lb_network_ip = interface.fixed_ips[0]['ip_address']
|
lb_network_ip = interface.fixed_ips[0]['ip_address']
|
||||||
break
|
break
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -881,7 +881,7 @@ class TestLoadBalancer(base.BaseAPITest):
|
|||||||
|
|
||||||
def test_create_with_allowed_network_id(self):
|
def test_create_with_allowed_network_id(self):
|
||||||
network_id = uuidutils.generate_uuid()
|
network_id = uuidutils.generate_uuid()
|
||||||
self.conf.config(group="networking", valid_vip_networks=network_id)
|
self.conf.config(group="networking", valid_vip_networks=[network_id])
|
||||||
subnet = network_models.Subnet(id=uuidutils.generate_uuid(),
|
subnet = network_models.Subnet(id=uuidutils.generate_uuid(),
|
||||||
network_id=network_id,
|
network_id=network_id,
|
||||||
ip_version=4)
|
ip_version=4)
|
||||||
@@ -905,7 +905,7 @@ class TestLoadBalancer(base.BaseAPITest):
|
|||||||
def test_create_with_disallowed_network_id(self):
|
def test_create_with_disallowed_network_id(self):
|
||||||
network_id1 = uuidutils.generate_uuid()
|
network_id1 = uuidutils.generate_uuid()
|
||||||
network_id2 = uuidutils.generate_uuid()
|
network_id2 = uuidutils.generate_uuid()
|
||||||
self.conf.config(group="networking", valid_vip_networks=network_id1)
|
self.conf.config(group="networking", valid_vip_networks=[network_id1])
|
||||||
subnet = network_models.Subnet(id=uuidutils.generate_uuid(),
|
subnet = network_models.Subnet(id=uuidutils.generate_uuid(),
|
||||||
network_id=network_id2,
|
network_id=network_id2,
|
||||||
ip_version=4)
|
ip_version=4)
|
||||||
|
|||||||
@@ -357,8 +357,8 @@ class TestValidations(base.TestCase):
|
|||||||
net_id1 = uuidutils.generate_uuid()
|
net_id1 = uuidutils.generate_uuid()
|
||||||
net_id2 = uuidutils.generate_uuid()
|
net_id2 = uuidutils.generate_uuid()
|
||||||
net_id3 = uuidutils.generate_uuid()
|
net_id3 = uuidutils.generate_uuid()
|
||||||
valid_net_ids = ",".join((net_id1, net_id2))
|
self.conf.config(group="networking",
|
||||||
self.conf.config(group="networking", valid_vip_networks=valid_net_ids)
|
valid_vip_networks=[net_id1, net_id2])
|
||||||
validate.network_allowed_by_config(net_id1)
|
validate.network_allowed_by_config(net_id1)
|
||||||
validate.network_allowed_by_config(net_id2)
|
validate.network_allowed_by_config(net_id2)
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
|
|||||||
Reference in New Issue
Block a user