'Ensures that only one monitor is specified of any type.'

def check_enabled_monitor(self, ext):

    ept = ext.entry_point_target
    ept_parts = ept.split(':')
    namespace_parts = ept_parts[0].split('.')
    namespace = '.'.join(namespace_parts[0:(-1)])
    if (self.type_monitor_loaded[namespace] is not False):
        LOG.warning('Excluding    %(namespace)s    monitor    %(monitor_name)s.    Already    loaded    %(loaded_monitor)s.', {'namespace': namespace, 'monitor_name': ext.name, 'loaded_monitor': self.type_monitor_loaded[namespace]})
        return False
    cfg_monitors = [(('cpu.' + cfg) if ('.' not in cfg) else cfg) for cfg in CONF.compute_monitors]
    cfg_monitors = [(('nova.compute.monitors.' + cfg) if ('nova.compute.monitors.' not in cfg) else cfg) for cfg in cfg_monitors]
    if (((namespace + '.') + ext.name) in cfg_monitors):
        self.type_monitor_loaded[namespace] = ext.name
        return True
    LOG.warning('Excluding    %(namespace)s    monitor    %(monitor_name)s.    Not    in    the    list    of    enabled    monitors    (CONF.compute_monitors).', {'namespace': namespace, 'monitor_name': ext.name})
    return False
