Get an existing retention policy.

    database
        The database to operate on.

    name
        Name of the policy to modify.

    CLI Example:

    .. code-block:: bash

        salt '*' influxdb08.retention_policy_get metrics default

def retention_policy_get(database,
                         name,
                         user=None,
                         password=None,
                         host=None,
                         port=None):
    '''
    Get an existing retention policy.

    database
        The database to operate on.

    name
        Name of the policy to modify.

    CLI Example:

    .. code-block:: bash

        salt '*' influxdb08.retention_policy_get metrics default
    '''
    client = _client(user=user, password=password, host=host, port=port)

    for policy in client.get_list_retention_policies(database):
        if policy['name'] == name:
            return policy

    return None