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] Inventory does not fetch more than 500 Entities #228

Closed
ArtemProt opened this issue Jul 6, 2022 · 1 comment
Closed

[Bug] Inventory does not fetch more than 500 Entities #228

ArtemProt opened this issue Jul 6, 2022 · 1 comment
Assignees
Labels
1.7 bug Something isn't working
Projects

Comments

@ArtemProt
Copy link

ArtemProt commented Jul 6, 2022

Describe the bug
Inventory plugin does not return more than 500 VMs entities from PC with more than 500 VMs (in my test it was 640)

To Reproduce
Steps to reproduce the behavior:

  1. ansible command
    ansible-inventory --list
  2. sample playbook used
    Tried to setup length to 1000

https://github.com/nutanix/nutanix.ansible/blob/f4174ea138fce27ba385e83bf3cd1ae6f6fdfd27/plugins/inventory/ntnx_prism_vm_inventory.py#L57

cat nutanix.yml
plugin: nutanix.ncp.ntnx_prism_vm_inventory
nutanix_hostname: ""
nutanix_password: ""
nutanix_username: "admin"
nutanix_port: "9440"
validate_certs: false
data: {"offset": 0, "length": 1000}

Stack trace
no stack trace we simple got in return just 1st 500 VMs

Expected behavior
As PC V3 API has limitation of 500 entities to return we need to implement pagination on
list method of entity class maybe

https://github.com/nutanix/nutanix.ansible/blob/f4174ea138fce27ba385e83bf3cd1ae6f6fdfd27/plugins/module_utils/entity.py#L157

@ArtemProt ArtemProt added the bug Something isn't working label Jul 6, 2022
@bhati-pradeep bhati-pradeep added this to To do in 1.7.0 Sep 12, 2022
@bhati-pradeep bhati-pradeep moved this from To do to In progress in 1.7.0 Sep 15, 2022
@bhati-pradeep bhati-pradeep moved this from In progress to Done in 1.7.0 Sep 15, 2022
@bhati-pradeep bhati-pradeep moved this from Done to In progress in 1.7.0 Sep 15, 2022
@bhati-pradeep bhati-pradeep moved this from In progress to Done in 1.7.0 Sep 21, 2022
@bhati-pradeep
Copy link
Collaborator

Fixed in release v1.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7 bug Something isn't working
Projects
No open projects
1.7.0
  
Done
Development

No branches or pull requests

5 participants