326
326
@patch.object(hooks, 'get_hacluster_config')
327
def test_ha_joined_no_bound_ip(self, _get_ha_config):
330
'ha-bindiface': 'eth1',
331
'ha-mcastport': '5405',
333
vip_params = 'params ip="10.0.0.1" cidr_netmask="21" nic="eth120"'
334
_get_ha_config.return_value = _ha_config
335
self.test_config.set('vip_iface', 'eth120')
336
self.test_config.set('vip_cidr', '21')
337
self.get_iface_for_address.return_value = None
338
self.get_netmask_for_address.return_value = None
340
'init_services': {'res_neutron_haproxy': 'haproxy'},
341
'corosync_bindiface': _ha_config['ha-bindiface'],
342
'corosync_mcastport': _ha_config['ha-mcastport'],
344
'res_neutron_eth120_vip': 'ocf:heartbeat:IPaddr2',
345
'res_neutron_haproxy': 'lsb:haproxy'
348
'res_neutron_eth120_vip': vip_params,
349
'res_neutron_haproxy': 'op monitor interval="5s"'
351
'clones': {'cl_nova_haproxy': 'res_neutron_haproxy'}
353
self._call_hook('ha-relation-joined')
354
self.relation_set.assert_called_with(
358
@patch.object(hooks, 'get_hacluster_config')
327
359
def test_ha_joined_with_ipv6(self, _get_ha_config):
328
360
self.test_config.set('prefer-ipv6', 'True')