Fix openstack inventory for when we have multiple servers with the same
name but different IDs. Instead of giving every server with the same
name the details for the first server returned with that name add the
individual servers as they are returned.
This was a logic bug where in a loop over a list of servers we always
added the first server in that list despite having more than one server.
There are cases where the host list back from the cloud comes back
duplicated. This causes us to report those with UUIDs, which we do to
support truly different servers with the same name. However, in the case
where duplicate host entries have the same UUID, we can know it's a data
hiccup.
The OpenStack inventory lists hostnames as the UUIDs because hostsnames
are not guarnateed to be unique on OpenStack. However, for the common
case, this is just confusing.
The new behavior is a visible change, so make it an opt-in via config.
Only turn the hostnames to UUIDs if there are duplicate hostnames.
renamed plugins to contrib (they are not really plugins)
rewrote README.md to reflect new usage
added new dir to setup.py so it gets copied with installation, in views
of making using inventory scripts easier in teh future
2015-07-10 10:30:33 -04:00
Renamed from plugins/inventory/openstack.py (Browse further)