def _create_patches(old, new):
    """"Create patches for updating cluster template and cluster

    Returns patches include operations for each parameters to update values
    """
    patch = []
    for key in new:
        path = '/' + key
        if key in old and old[key] != new[key]:
            if new[key] is None or new[key] == '':
                patch.append({'op': 'remove', 'path': path})
            else:
                patch.append({'op': 'replace', 'path': path, 'value': new[key]}
                    )
        elif key not in old:
            patch.append({'op': 'add', 'path': path, 'value': new[key]})
    for key in old:
        path = '/' + key
        if key not in new:
            patch.append({'op': 'remove', 'path': path})
    for p in patch:
        if 'value' in p:
            p['value'] = str(p['value'])
    return patch
