Parse tags into a dict.

        input tags: a comma separated list of 'key:value' pairs.
            Example: foo:bar,spam:eggs
        output dtags: a dict of tags.
            Example: {'foo': 'bar', 'spam': 'eggs'}

def parse_tags(self, tags):
        """Parse tags into a dict.

        input tags: a comma separated list of 'key:value' pairs.
            Example: foo:bar,spam:eggs
        output dtags: a dict of tags.
            Example: {'foo': 'bar', 'spam': 'eggs'}
        """
        dtags = {}
        if tags:
            try:
                dtags = dict([x.split(':') for x in tags.split(',')])
            except ValueError:
                # one of the 'key:value' pairs was missing
                logger.info('Invalid tags passed: %s', tags)
                dtags = {}

        return dtags