Merge "Fix up to work with 0.6.0 of charms.reactive"
This commit is contained in:
commit
7bc655c98c
|
@ -25,7 +25,7 @@ import charms_openstack.ip as os_ip
|
|||
import charmhelpers.core.decorators as decorators
|
||||
import charmhelpers.core.hookenv as hookenv
|
||||
import charmhelpers.core.host as host
|
||||
import charms.reactive as reactive
|
||||
import charms.reactive.relations as relations
|
||||
|
||||
from charmhelpers.contrib.network import ip as ch_ip
|
||||
|
||||
|
@ -539,9 +539,8 @@ class DesignateCharm(openstack_charm.HAOpenStackCharm):
|
|||
hookenv.config('neutron-domain'))):
|
||||
return 'blocked', ('nameservers must be set when specifying'
|
||||
' nova-domain or neutron-domain')
|
||||
dns_backend_available = (reactive
|
||||
.RelationBase
|
||||
.from_state('dns-backend.available'))
|
||||
dns_backend_available = (relations
|
||||
.endpoint_from_flag('dns-backend.available'))
|
||||
invalid_dns = self.options.invalid_pool_config()
|
||||
if invalid_dns:
|
||||
return 'blocked', invalid_dns
|
||||
|
|
|
@ -16,6 +16,7 @@ import subprocess
|
|||
|
||||
import charm.openstack.designate as designate
|
||||
import charms.reactive as reactive
|
||||
import charms.reactive.relations as relations
|
||||
import charmhelpers.core.hookenv as hookenv
|
||||
import charmhelpers.contrib.network.ip as ip
|
||||
|
||||
|
@ -123,10 +124,10 @@ def expose_rndc_address(cluster):
|
|||
def configure_designate_basic(*args):
|
||||
"""Configure the minimum to boostrap designate"""
|
||||
# If cluster relation is available it needs to passed in
|
||||
cluster = reactive.RelationBase.from_state('cluster.available')
|
||||
cluster = relations.endpoint_from_flag('cluster.available')
|
||||
if cluster is not None:
|
||||
args = args + (cluster, )
|
||||
dns_backend = reactive.RelationBase.from_state('dns-backend.available')
|
||||
dns_backend = relations.endpoint_from_flag('dns-backend.available')
|
||||
if dns_backend is not None:
|
||||
args = args + (dns_backend, )
|
||||
with provide_charm_instance() as instance:
|
||||
|
@ -159,10 +160,10 @@ def update_peers(cluster):
|
|||
def configure_designate_full(*args):
|
||||
"""Write out all designate config include bootstrap domain info"""
|
||||
# If cluster relation is available it needs to passed in
|
||||
cluster = reactive.RelationBase.from_state('cluster.available')
|
||||
cluster = relations.endpoint_from_flag('cluster.available')
|
||||
if cluster is not None:
|
||||
args = args + (cluster, )
|
||||
dns_backend = reactive.RelationBase.from_state('dns-backend.available')
|
||||
dns_backend = relations.endpoint_from_flag('dns-backend.available')
|
||||
if dns_backend is not None:
|
||||
args = args + (dns_backend, )
|
||||
with provide_charm_instance() as instance:
|
||||
|
|
Loading…
Reference in New Issue