]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
3PAR driver add missing domain check on QOS cmd
authorKurt Martin <kurt.f.martin@hp.com>
Thu, 22 Aug 2013 16:28:37 +0000 (09:28 -0700)
committerKurt Martin <kurt.f.martin@hp.com>
Thu, 22 Aug 2013 16:28:37 +0000 (09:28 -0700)
The 3PAR drivers need to support CPGs that are not part of a
virtual domain on the 3PAR backend. This patch now checks
if the domain is set before calling the createvvset command.
This instance was overlooked in the following patch that has
already been merged: https://review.openstack.org/#/c/42697/

Also fixes: bug 1212328

Change-Id: I0375dfc89104775582b9258f18f97c683e6148b1

cinder/volume/drivers/san/hp/hp_3par_common.py

index 9cce016bcb3138ada6892e95339aa8300e46ced7..15350a28c89ed9b891886ce7d0d8fe7b5feb7ddf 100644 (file)
@@ -632,7 +632,10 @@ exit
         else:
             vvs_name = self._get_3par_vvs_name(volume['id'])
             domain = self.get_domain(cpg)
-            self._cli_run(['createvvset', '-domain', domain, vvs_name])
+            if domain is not None:
+                self._cli_run(['createvvset', '-domain', domain, vvs_name])
+            else:
+                self._cli_run(['createvvset', vvs_name])
             self._set_qos_rule(qos, vvs_name)
             self._cli_run(['createvvset', '-add', vvs_name, volume_name])