Merge "Drop notification based designate support"

This commit is contained in:
Zuul 2018-05-11 17:18:41 +00:00 committed by Gerrit Code Review
commit 39a642096f
12 changed files with 0 additions and 77 deletions

View File

@ -1 +0,0 @@
nova_compute_hooks.py

View File

@ -1 +0,0 @@
nova_compute_hooks.py

View File

@ -1 +0,0 @@
nova_compute_hooks.py

View File

@ -592,22 +592,6 @@ class MetadataServiceContext(context.OSContextGenerator):
return ctxt
class DesignateContext(context.OSContextGenerator):
def __call__(self):
ctxt = {}
ctxt['enable_designate'] = False
for rid in relation_ids('nova-designate'):
if related_units(rid):
ctxt['enable_designate'] = True
if ctxt['enable_designate']:
notification_topics = ['notifications',
'notifications_designate']
ctxt['notification_topics'] = ','.join(notification_topics)
ctxt['notify_on_state_change'] = 'vm_and_task_state'
return ctxt
class NeutronComputeContext(context.OSContextGenerator):
interfaces = []

View File

@ -488,13 +488,6 @@ def lxc_changed():
CONFIGS.write(NOVA_CONF)
@hooks.hook('nova-designate-relation-changed',
'nova-designate-relation-broken')
@restart_on_change(restart_map())
def designate_changed():
CONFIGS.write(NOVA_CONF)
@hooks.hook('ceph-access-relation-changed')
def ceph_access(rid=None, unit=None):
'''Setup libvirt secret for specific ceph backend access'''

View File

@ -87,7 +87,6 @@ from nova_compute_context import (
CEPH_CONF,
ceph_config_file,
HostIPContext,
DesignateContext,
NovaComputeVirtContext,
NOVA_API_AA_PROFILE,
NOVA_COMPUTE_AA_PROFILE,
@ -152,7 +151,6 @@ BASE_RESOURCE_MAP = {
context.NotificationDriverContext(),
MetadataServiceContext(),
HostIPContext(),
DesignateContext(),
NovaComputeVirtContext(),
context.LogLevelContext(),
context.InternalEndpointContext(),

View File

@ -32,8 +32,6 @@ requires:
interface: glance
ceph:
interface: ceph-client
nova-designate:
interface: nova-designate
lxd:
interface: containers
scope: container

View File

@ -107,12 +107,6 @@ volume_api_class = nova.volume.cinder.API
instances_path = {{ instances_path }}
{% endif -%}
{% if enable_designate -%}
notification_driver = {{ notification_driver }}
notification_topics = {{ notification_topics }}
notify_on_state_change = {{ notify_on_state_change }}
{% endif -%}
{% if sections and 'DEFAULT' in sections -%}
{% for key, value in sections['DEFAULT'] -%}
{{ key }} = {{ value }}

View File

@ -108,10 +108,6 @@ volume_api_class = nova.volume.cinder.API
instances_path = {{ instances_path }}
{% endif -%}
{% if enable_designate -%}
notify_on_state_change = {{ notify_on_state_change }}
{% endif -%}
{% if sections and 'DEFAULT' in sections -%}
{% for key, value in sections['DEFAULT'] -%}
{{ key }} = {{ value }}

View File

@ -108,10 +108,6 @@ volume_api_class = nova.volume.cinder.API
instances_path = {{ instances_path }}
{% endif -%}
{% if enable_designate -%}
notify_on_state_change = {{ notify_on_state_change }}
{% endif -%}
{% if sections and 'DEFAULT' in sections -%}
{% for key, value in sections['DEFAULT'] -%}
{{ key }} = {{ value }}

View File

@ -109,10 +109,6 @@ volume_api_class = nova.volume.cinder.API
instances_path = {{ instances_path }}
{% endif -%}
{% if enable_designate -%}
notify_on_state_change = {{ notify_on_state_change }}
{% endif -%}
{% if sections and 'DEFAULT' in sections -%}
{% for key, value in sections['DEFAULT'] -%}
{{ key }} = {{ value }}

View File

@ -502,35 +502,6 @@ class NovaComputeContextTests(CharmTestCase):
(True, None))
class DesignateContextTests(CharmTestCase):
def setUp(self):
super(DesignateContextTests, self).setUp(context, TO_PATCH)
self.relation_get.side_effect = self.test_relation.get
self.config.side_effect = self.test_config.get
self.host_uuid = 'e46e530d-18ae-4a67-9ff0-e6e2ba7c60a7'
def test_designate_relation(self):
self.test_relation.set({})
designatectxt = context.DesignateContext()
self.relation_ids.return_value = ['nova-designate:0']
self.related_units.return_value = 'designate/0'
self.assertEqual(designatectxt(), {
'enable_designate': True,
'notification_topics': 'notifications,notifications_designate',
'notify_on_state_change': 'vm_and_task_state',
})
def test_no_designate_relation(self):
self.test_relation.set({})
designatectxt = context.DesignateContext()
self.relation_ids.return_value = []
self.related_units.return_value = None
self.assertEqual(designatectxt(), {
'enable_designate': False,
})
class SerialConsoleContextTests(CharmTestCase):
def setUp(self):