diff --git a/hooks/nova-designate-relation-broken b/hooks/nova-designate-relation-broken deleted file mode 120000 index 3ba0bdea..00000000 --- a/hooks/nova-designate-relation-broken +++ /dev/null @@ -1 +0,0 @@ -nova_compute_hooks.py \ No newline at end of file diff --git a/hooks/nova-designate-relation-changed b/hooks/nova-designate-relation-changed deleted file mode 120000 index 3ba0bdea..00000000 --- a/hooks/nova-designate-relation-changed +++ /dev/null @@ -1 +0,0 @@ -nova_compute_hooks.py \ No newline at end of file diff --git a/hooks/nova-designate-relation-joined b/hooks/nova-designate-relation-joined deleted file mode 120000 index 3ba0bdea..00000000 --- a/hooks/nova-designate-relation-joined +++ /dev/null @@ -1 +0,0 @@ -nova_compute_hooks.py \ No newline at end of file diff --git a/hooks/nova_compute_context.py b/hooks/nova_compute_context.py index f6b5d332..019a63c6 100644 --- a/hooks/nova_compute_context.py +++ b/hooks/nova_compute_context.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 = [] diff --git a/hooks/nova_compute_hooks.py b/hooks/nova_compute_hooks.py index 3f8fac1f..274852b3 100755 --- a/hooks/nova_compute_hooks.py +++ b/hooks/nova_compute_hooks.py @@ -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''' diff --git a/hooks/nova_compute_utils.py b/hooks/nova_compute_utils.py index 66eb44b4..24d10482 100644 --- a/hooks/nova_compute_utils.py +++ b/hooks/nova_compute_utils.py @@ -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(), diff --git a/metadata.yaml b/metadata.yaml index 93a2b3ee..592b06cf 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -32,8 +32,6 @@ requires: interface: glance ceph: interface: ceph-client - nova-designate: - interface: nova-designate lxd: interface: containers scope: container diff --git a/templates/liberty/nova.conf b/templates/liberty/nova.conf index 0035c7ea..bf00cede 100644 --- a/templates/liberty/nova.conf +++ b/templates/liberty/nova.conf @@ -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 }} diff --git a/templates/mitaka/nova.conf b/templates/mitaka/nova.conf index 9db4dd96..c43095a6 100644 --- a/templates/mitaka/nova.conf +++ b/templates/mitaka/nova.conf @@ -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 }} diff --git a/templates/newton/nova.conf b/templates/newton/nova.conf index d419125e..e57fb1d1 100644 --- a/templates/newton/nova.conf +++ b/templates/newton/nova.conf @@ -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 }} diff --git a/templates/ocata/nova.conf b/templates/ocata/nova.conf index 476012a1..aebe4a43 100644 --- a/templates/ocata/nova.conf +++ b/templates/ocata/nova.conf @@ -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 }} diff --git a/unit_tests/test_nova_compute_contexts.py b/unit_tests/test_nova_compute_contexts.py index 2f90af7f..83e6362a 100644 --- a/unit_tests/test_nova_compute_contexts.py +++ b/unit_tests/test_nova_compute_contexts.py @@ -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):