def parse_mime_type(mime_type):
    type = mime_type.split(';')
    type, plist = type[0], type[1:]
    try:
        type, subtype = type.split('/', 1)
    except ValueError:
        type, subtype = type.strip() or '*', '*'
    else:
        type = type.strip() or '*'
        subtype = subtype.strip() or '*'
    params = {}
    for param in plist:
        param = param.split('=', 1)
        if len(param) == 2:
            key, value = param[0].strip(), param[1].strip()
            if key and value:
                params[key] = value
    return type, subtype, params
Updates security group rules for specified instance.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/util/mimeparse.py/parse_mime_type--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/xenapi/driver.py/XenAPIDriver.refresh_instance_security_rules