Pass dns-domain over neutron-api relation
In order to have nova-metadata-api use the same dns-domain as neutron
when nova-metadata-api runs on nova-cloud-controller we must pass the
dns-domain on the neutron-api relation.
Change-Id: I14fe163a445b6dcffccced762041942de7d6b41d
Partial-Bug: #1805645
(cherry picked from commit f90eef2c4b
)
This commit is contained in:
parent
936f903837
commit
04d60143a0
|
@ -442,6 +442,11 @@ def neutron_api_relation_joined(rid=None):
|
|||
else:
|
||||
relation_data['neutron-api-ready'] = "no"
|
||||
|
||||
# LP Bug#1805645
|
||||
dns_domain = get_dns_domain()
|
||||
if dns_domain:
|
||||
relation_data['dns-domain'] = dns_domain
|
||||
|
||||
relation_set(relation_id=rid, **relation_data)
|
||||
# Nova-cc may have grabbed the neutron endpoint so kick identity-service
|
||||
# relation to register that its here
|
||||
|
|
|
@ -390,6 +390,7 @@ class NeutronAPIHooksTests(CharmTestCase):
|
|||
self.relation_ids.side_effect = self._fake_relids
|
||||
_canonical_url.return_value = host
|
||||
self.api_port.return_value = port
|
||||
self.get_dns_domain.return_value = "dnsdomain."
|
||||
neutron_url = '%s:%s' % (host, port)
|
||||
_relation_data = {
|
||||
'enable-sriov': False,
|
||||
|
@ -397,6 +398,7 @@ class NeutronAPIHooksTests(CharmTestCase):
|
|||
'neutron-url': neutron_url,
|
||||
'neutron-security-groups': 'no',
|
||||
'neutron-api-ready': 'no',
|
||||
'dns-domain': 'dnsdomain.',
|
||||
}
|
||||
self._call_hook('neutron-api-relation-joined')
|
||||
self.relation_set.assert_called_with(
|
||||
|
|
Loading…
Reference in New Issue