Open ezr-ondrej opened 4 years ago
Yeah, better examples are indeed a good idea. The second idea is also good, but more work. Are you planning to work on this?
Maybe this is an wanted behavior because you can't guarantee same order of lists in ansible on each run. But for network interfaces and volumes the order is essentially.
So before here are changes made it has to be clarified whether order can guarantied or not. If not there should be a key rank
or so, to reflect the order in that way.
From hacking the vcr wrapper around py2/3 incompatibilities, i'd suspect that lists are ordered stable, but dicts are not.
From hacking the vcr wrapper around py2/3 incompatibilities, i'd suspect that lists are ordered stable, but dicts are not.
For current format, Foreman will ensure the order. But there is no reason not to use Arrays for APIs. Most languages has ordered stable arrays/lists. I'm trying this out in https://github.com/theforeman/foreman/pull/8006
I believe that now we can use arrays from next foreman version as theforeman/foreman#8006 got merged.
Compute attributes
interfaces_attributes
andvolumes_attributes
needs to be dicts. These are really dicts in form of:It's a bit ugly and strange. Maybe it's a good idea to:
vm_attrs
dict