瀏覽代碼

Add cafile option to the keystone section

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Gabriel Adrian Samfira 2 年之前
父節點
當前提交
a139273804
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      coriolis/keystone.py

+ 8 - 0
coriolis/keystone.py

@@ -15,6 +15,10 @@ opts = [
                default=None,
                help='Default auth URL to be used when not specified in the'
                ' migration\'s connection info.'),
+    cfg.StrOpt('cafile',
+               default=None,
+               help='The CA file used to validate openstack service'
+               ' API endpoints.'),
     cfg.IntOpt('identity_api_version',
                min=2, max=3,
                default=2,
@@ -127,6 +131,10 @@ def create_keystone_session(ctxt, connection_info={}):
             "password": password,
         }
 
+    cafile = CONF.keystone.cafile
+    if cafile and cafile != "":
+        verify = cafile
+
     if not auth:
         project_name = connection_info.get("project_name", ctxt.project_name)