import monasca_setup.detection


class Keystone(monasca_setup.detection.ServicePlugin):

    """Detect Keystone daemons and setup configuration to monitor them.

    """

    def __init__(self, template_dir, overwrite=True, args=None):
        service_params = {
            'template_dir': template_dir,
            'overwrite': overwrite,
            'service_name': 'identity-service',
            'process_names': ['keystone-'],
            'service_api_url': 'http://localhost:35357/v3',
            'search_pattern': '.*v3.0.*'
        }

        super(Keystone, self).__init__(service_params)

import monasca_setup.detection


class Keystone(monasca_setup.detection.ServicePlugin):

    """Detect Keystone daemons and setup configuration to monitor them.

    """

    def __init__(self, template_dir, overwrite=True, args=None):
        service_params = {
            'template_dir': template_dir,
            'overwrite': overwrite,
            'service_name': 'identity-service',
            'process_names': ['keystone-'],
            'service_api_url': 'http://localhost:35357/v3',
            'search_pattern': '.*v3\..*'
        }

        super(Keystone, self).__init__(service_params)

Update search pattern for Keystone setup plugin
Update search pattern for Keystone setup plugin

Devstack (and possibly elsewhere) is using a newer version of keystone,
v3.4, so the match_pattern generated by the detection plugin (v3.0) was
failing.  This patch changes the patter to match any "v3." version.

Change-Id: I68e77f5a4df511e5d61d82f57f8b6b5a0beaca62
