Use choices kwarg when defining string options with defined choices
The ssh_connect_method and ssh_auth_method config options only allow
defined sets of choices, so enforce that using the choices kwarg with
StrOpt.
Change-Id: I862e1d6add8d74085987f7b86b3b8a4e67afe937
diff --git a/tempest/config.py b/tempest/config.py
index 0cda018..9414973 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -255,6 +255,7 @@
"when sshing to a guest."),
cfg.StrOpt('ssh_auth_method',
default='keypair',
+ choices=('keypair', 'configured', 'adminpass', 'disabled'),
help="Auth method used for authenticate to the instance. "
"Valid choices are: keypair, configured, adminpass "
"and disabled. "
@@ -264,6 +265,7 @@
"Disabled: avoid using ssh when it is an option."),
cfg.StrOpt('ssh_connect_method',
default='floating',
+ choices=('fixed', 'floating'),
help="How to connect to the instance? "
"fixed: using the first ip belongs the fixed network "
"floating: creating and using a floating ip."),