Comments (2)
Actually, it looks like refresh_devices_list is correctly filtering the list of results to those matching the devices specified (by id).
Yes, that is true. What I was referring to was that refresh_devices_list
only returns entries found in the list of results returned from module.get_devices()
. If a devices passed in the initial devices
list cannot be found in the return value of module.get_devices()
then the function will not include an entry for that device ( as opposed to doing something like creating a Device
object with a state
of deleted
/deprovisioned
or something to that effect ).
Sorry that I wasn't clear!
from ansible-collection-metal.
Thanks for reporting this @ischeinkman.
by polling the results refresh_devices_list and checking that all devices returned match their requirements, but refresh_devices_list only returns devices visible from the API without checking to see if that includes all the device IDs passed as a parameter.
Actually, it looks like refresh_devices_list
is correctly filtering the list of results to those matching the devices specified (by id).
The bug here is in the "all". As a vacuous truth the condition is met. We can add a len()
check to ensure that the expected number of refreshed devices are found.
>>> if all(d == 1 for d in []):
... print("yes")
...
yes
from ansible-collection-metal.
Related Issues (15)
- Device module integration tests cleanup is not consistent for all Ansible versions
- Release, versioning, and deprecation policy
- Document that this project follows semver
- fix Ansible documentation style guide violations
- use ansible.builtin.file instead of file
- Ansible Inclusion HOT 6
- Crosslink to the Ansible Scenario Guide for Equinix Metal
- Add support for Equinix Metal Metros HOT 1
- Add stable-2.11 (Ansible 4) to test matrix
- Error 422: Public ipv4 subnet size '31' is invalid for VMware ESXi 7.0
- Add support for Metal Gateway and VRF
- Add support for Metal Port resources
- Add hardware_reservation_id support for equinix.metal.device
- Deprecate this module (Ansible Collection Metal) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-collection-metal.