'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):

    dtags = {}
    if tags:
        try:
            dtags = dict([x.split(':') for x in tags.split(',')])
        except ValueError:
            logger.info('Invalid    tags    passed:    %s', tags)
            dtags = {}
    return dtags
