Fix support for network-spaces
Drop provision of hostname parameter for mysql-shared/shared-db relations; newer interface versions automatically set the hostname parameter based on Juju 2.0 network space bindings or the units private-address in older Juju versions. Change-Id: I55ff32c26478399fd8486ce0a618ad1a80b6476b
This commit is contained in:
parent
c46a805a1b
commit
42609d7cef
|
@ -14,7 +14,6 @@
|
|||
|
||||
|
||||
import charm.openstack.designate as designate
|
||||
import charmhelpers.core.hookenv as hookenv
|
||||
import charms.reactive as reactive
|
||||
|
||||
COMPLETE_INTERFACE_STATES = [
|
||||
|
@ -44,9 +43,9 @@ def setup_amqp_req(amqp):
|
|||
def setup_database(database):
|
||||
"""Send request designate accounts and dbs"""
|
||||
database.configure('designate', 'designate',
|
||||
hookenv.unit_private_ip(), prefix='designate')
|
||||
prefix='designate')
|
||||
database.configure('dpm', 'dpm',
|
||||
hookenv.unit_private_ip(), prefix='dpm')
|
||||
prefix='dpm')
|
||||
designate.assess_status()
|
||||
|
||||
|
||||
|
|
|
@ -151,18 +151,15 @@ class TestDesignateHandlers(unittest.TestCase):
|
|||
def test_database(self):
|
||||
self.patch(handlers.designate, 'assess_status')
|
||||
database = mock.MagicMock()
|
||||
self.patch(handlers.hookenv, 'unit_private_ip', 'private_ip')
|
||||
handlers.setup_database(database)
|
||||
calls = [
|
||||
mock.call(
|
||||
'designate',
|
||||
'designate',
|
||||
'private_ip',
|
||||
prefix='designate'),
|
||||
mock.call(
|
||||
'dpm',
|
||||
'dpm',
|
||||
'private_ip',
|
||||
prefix='dpm'),
|
||||
]
|
||||
database.configure.has_calls(calls)
|
||||
|
|
Loading…
Reference in New Issue