Merge "Modify the verification in RBDConnector"

This commit is contained in:
Zuul 2018-10-01 17:24:26 +00:00 committed by Gerrit Code Review
commit e5f83f9889
1 changed files with 5 additions and 5 deletions

View File

@ -103,12 +103,12 @@ class RBDConnector(base.BaseLinuxConnector):
try:
user = connection_properties['auth_username']
pool, volume = connection_properties['name'].split('/')
cluster_name = connection_properties.get('cluster_name')
monitor_ips = connection_properties.get('hosts')
monitor_ports = connection_properties.get('ports')
cluster_name = connection_properties['cluster_name']
monitor_ips = connection_properties['hosts']
monitor_ports = connection_properties['ports']
keyring = connection_properties.get('keyring')
except IndexError:
msg = _("Connect volume failed, malformed connection properties")
except (KeyError, ValueError):
msg = _("Connect volume failed, malformed connection properties.")
raise exception.BrickException(msg=msg)
conf = self._create_ceph_conf(monitor_ips, monitor_ports,