default='',
help="3PAR Super user password",
secret=True),
- #TODO(kmartin): Remove hp3par_domain during I release.
+ # TODO(kmartin): Remove hp3par_domain during I release.
cfg.StrOpt('hp3par_domain',
default=None,
help="This option is DEPRECATED and no longer used. "
Version history:
1.2.0 - Updated hp3parclient API use to 2.0.x
+ 1.2.1 - Check that the VVS exists
"""
- VERSION = "1.2.0"
+ VERSION = "1.2.1"
stats = {}
LOG.debug("SSH CMD = %s " % cmd)
(stdout, stderr) = self._run_ssh(cmd, False)
-
# we have to strip out the input and exit lines
tmp = stdout.split("\r\n")
out = tmp[5:len(tmp) - 2]
cpg, vvs_name, qos):
if vvs_name is not None:
# Admin has set a volume set name to add the volume to
- self._cli_run(['createvvset', '-add', vvs_name, volume_name])
+ out = self._cli_run(['createvvset', '-add', vvs_name, volume_name])
+ if out and len(out) == 1:
+ if 'does not exist' in out[0]:
+ raise exception.InvalidInput(reason=_('VV Set %s does '
+ 'not exist.')
+ % vvs_name)
else:
vvs_name = self._get_3par_vvs_name(volume['id'])
domain = self.get_domain(cpg)
try:
self._add_volume_to_volume_set(volume, volume_name,
cpg, vvs_name, qos)
- except Exception as ex:
+ except exception.InvalidInput as ex:
# Delete the volume if unable to add it to the volume set
self.client.deleteVolume(volume_name)
- LOG.error(str(ex))
- raise exception.CinderException(ex.get_description())
+ raise exception.CinderException(str(ex))
except hpexceptions.HTTPConflict:
raise exception.Duplicate(_("Volume (%s) already exists on array")
% volume_name)
except exception.InvalidInput as ex:
LOG.error(str(ex))
raise ex
+ except exception.CinderException as ex:
+ LOG.error(str(ex))
+ raise ex
except Exception as ex:
LOG.error(str(ex))
raise exception.CinderException(ex.get_description())