The export host option allows users to export their existing host
information for import into a third party system. The output is
'pivoted', so that the key is the host/container name, and the values
are the group memberships and hostvar information. Some top level
networking information, such as load balancer IP addresses, as well as
provider networks, are also provided.
Test scaffolding was added to ensure the export does what is intended.
The tox inventory environment was modified to do coverage testing of
both the dynamic_inventory.py and manage_inventory.py files. The
coverage data is erased between runs, since combined output lead to
incorrect results for dynamic_inventory.py.
Change-Id: I2caa5a0c070b12a74ac26334c63ac8d0de704042
In order to import code from inventory-manage.py, such as for testing
purposes, the file must either be renamed or some very brittle hacks are
necessary to fake an import. This is due to the '-' character in the
file name.
To accomodate both the goal of importable code and maintained
compatibility, the contents of inventory-manage.py have been moved to
manage_inventory.py, and inventory-manage.py simply imports that code
and runs it.
No new functionality is added.
Change-Id: I60e73bed699b159f47e6c5b46d0787cf15fe1a4f