Drop notification based designate support
Deprecated at 18.02, removal for 18.05 release; superceeded by Neutron Designate Extension driver. Change-Id: I5bd824027a7bca80176d08f310c4e43a983e6c45
This commit is contained in:
parent
1e919bcef4
commit
d46628dd25
@ -1 +0,0 @@
|
||||
nova_compute_hooks.py
|
@ -1 +0,0 @@
|
||||
nova_compute_hooks.py
|
@ -1 +0,0 @@
|
||||
nova_compute_hooks.py
|
@ -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 = []
|
||||
|
||||
|
@ -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'''
|
||||
|
@ -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(),
|
||||
|
@ -32,8 +32,6 @@ requires:
|
||||
interface: glance
|
||||
ceph:
|
||||
interface: ceph-client
|
||||
nova-designate:
|
||||
interface: nova-designate
|
||||
lxd:
|
||||
interface: containers
|
||||
scope: container
|
||||
|
@ -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 }}
|
||||
|
@ -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 }}
|
||||
|
@ -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 }}
|
||||
|
@ -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 }}
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user