Add --os-cloud support
This adds a new option --os-cloud that allows the configuration values for multiple clouds to be stored in a local file and selected with a single option. Internal option names have had 'os_' removed to be comptible with the options returned from OpenStackConfig().get_one_cloud(). The config file is ~/.config/openstack/clouds.yaml: Sample ------ clouds: devstack: auth: auth_url: http://192.168.122.10:35357/ project_name: demo username: demo password: 0penstack region_name: RegionOne devstack: auth: auth_url: http://192.168.122.10:35357/ project_name: demo username: demo password: 0penstack region_name: RegionOne Co-Authored-By: Monty Taylor <mordred@inaugust.com> Change-Id: I4939acf8067e44ffe06a2e26fc28f1adf8985b7d Depends-On: I45e2550af58aee616ca168d20a557077beeab007
This commit is contained in:
@ -84,9 +84,17 @@ def base_parser(parser):
|
||||
"""
|
||||
|
||||
# Global arguments
|
||||
parser.add_argument(
|
||||
'--os-cloud',
|
||||
metavar='<cloud-config-name>',
|
||||
dest='cloud',
|
||||
default=env('OS_CLOUD'),
|
||||
help='Cloud name in clouds.yaml (Env: OS_CLOUD)',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--os-region-name',
|
||||
metavar='<auth-region-name>',
|
||||
dest='region_name',
|
||||
default=env('OS_REGION_NAME'),
|
||||
help='Authentication region name (Env: OS_REGION_NAME)',
|
||||
)
|
||||
|
Reference in New Issue
Block a user