Просмотр исходного кода

Use IntOpt for the identity_api_version config

The `identity_api_version` config option is supposed to be an int.
So, we should use `IntOpt` to get the config file value.
Ionut Balutoiu 6 лет назад
Родитель
Сommit
21829353b3
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      coriolis/keystone.py

+ 2 - 1
coriolis/keystone.py

@@ -15,7 +15,8 @@ opts = [
                default=None,
                default=None,
                help='Default auth URL to be used when not specified in the'
                help='Default auth URL to be used when not specified in the'
                ' migration\'s connection info.'),
                ' migration\'s connection info.'),
-    cfg.StrOpt('identity_api_version',
+    cfg.IntOpt('identity_api_version',
+               min=2, max=3,
                default=2,
                default=2,
                help='Default Keystone API version.'),
                help='Default Keystone API version.'),
     cfg.BoolOpt('allow_untrusted',
     cfg.BoolOpt('allow_untrusted',