Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: region_list does not with with an ID filter as in the docs #557

Open
enygren opened this issue Aug 9, 2024 · 2 comments
Open

[Bug]: region_list does not with with an ID filter as in the docs #557

enygren opened this issue Aug 9, 2024 · 2 comments
Labels
bug issues that report a bug

Comments

@enygren
Copy link

enygren commented Aug 9, 2024

Ansible Version

ansible [core 2.13.10]

Ansible Configuration

No response

Effected Components

region_list

Expected Behavior

Should have filtered to return a specific region by id

Actual Behavior

Errors that id is not a valid filter

Steps to Reproduce

Sample task:

    - name: Get region information
      linode.cloud.region_list:
        api_token: "{{ linode.api_token }}"
        filters:
          - name: id
            values: us-east
      register: region_result

fails with:

fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "api_token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "api_url": "https://api.linode.com/",
            "api_version": "v4",
            "ca_path": null,
            "count": null,
            "filters": [
                {
                    "name": "id",
                    "values": [
                        "us-east"
                    ]
                }
            ],
            "label": null,
            "order": "asc",
            "order_by": null,
            "state": null,
            "tags": null,
            "ua_prefix": null
        }
    },
    "msg": "Error from Linode API: [400] Cannot filter on id"
}

Although this example comes directly from:

https://github.com/linode/ansible_linode/blob/dev/docs/modules/region_list.md

@enygren enygren added the bug issues that report a bug label Aug 9, 2024
@enygren
Copy link
Author

enygren commented Aug 9, 2024

It may be that adding in a way to get a specific region by id would be preferable for this use-case?
(eg, for https://techdocs.akamai.com/linode-api/reference/get-region)

Need is to be able to get attributes for a particular region (eg, site_type)

@zliang-akamai
Copy link
Member

HI @enygren, thanks for the bug report! We will be looking into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues that report a bug
Projects
None yet
Development

No branches or pull requests

2 participants