Ability to run cmd scripts directly.

Add a conditional check to call main() in cmd scripts if they're
being invoked directly. Some already had them, but most simply
relied on the entrypoints wrappers declared in setup.py. With this
change, users can more easily test and debug the various command
scripts directly without needing setup magic.

Change-Id: I16c26e954687de8af5f971936fb8eee2072c06bc
Reviewed-on: https://review.openstack.org/26966
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
8 files changed