Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][RFR] Add ceilometer endpoint to create_rest() #10211

Merged
merged 1 commit into from
Jun 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions cfme/common/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,25 @@ def _fill_amqp_endpoint_dicts(self, provider_attributes, connection_configs):
events_connection["endpoint"]["security_protocol"] = security_protocol
connection_configs.append(events_connection)

def _fill_ceilometer_endpoint_dicts(self, provider_attributes, connection_configs):
"""Fills dicts with Ceilometer events endpoint data.

Helper method for ``self.create_rest``
"""
if 'events' not in self.endpoints:
return

endpoint_events = self.endpoints['events']

event_stream = getattr(endpoint_events, 'event_stream', None)
if not (event_stream and event_stream.lower() == 'ceilometer'):
return

events_connection = {
'endpoint': {'role': 'ceilometer'}
}
connection_configs.append(events_connection)

def _fill_smartstate_endpoint_dicts(self, provider_attributes):
"""Fills dicts with smartstate endpoint data.

Expand Down Expand Up @@ -501,6 +520,7 @@ def create_rest(self, check_existing=False, validate_inventory=False):
self._fill_candu_endpoint_dicts(provider_attributes, connection_configs)
self._fill_rsa_endpoint_dicts(connection_configs)
self._fill_amqp_endpoint_dicts(provider_attributes, connection_configs)
self._fill_ceilometer_endpoint_dicts(provider_attributes, connection_configs)
self._fill_smartstate_endpoint_dicts(provider_attributes)
self._fill_vmrc_console_endpoint_dicts(provider_attributes)
self._compile_connection_configurations(provider_attributes, connection_configs)
Expand Down