def cluster_attach_policy(base, cluster_id, policy_id, expected_status=
    'SUCCEEDED', wait_timeout=None):
    """Utility function that attach a policy to cluster."""
    params = {'policy_attach': {'enabled': True, 'policy_id': policy_id}}
    res = base.client.trigger_action('clusters', cluster_id, params=params)
    action_id = res['location'].split('/actions/')[1]
    res = base.client.wait_for_status('actions', action_id, expected_status,
        wait_timeout)
    return res['body']['status_reason']
