]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Get host group id when Huawei driver initializing
authorzhangchao010 <zhangchao010@huawei.com>
Wed, 25 Sep 2013 16:00:20 +0000 (00:00 +0800)
committerzhangchao010 <zhangchao010@huawei.com>
Wed, 25 Sep 2013 16:00:20 +0000 (00:00 +0800)
Get host group id when Huawei driver initializing to make sure
host group id won't be None after cinder node host sys reboot.

fixes bug 1230372

Change-Id: Ia3d5de116804930b2bb0035e4c991ebb9801ee76

cinder/volume/drivers/huawei/ssh_common.py

index e4dae758dc1abfa33abce8866949d8ac8090d79b..28cea104b7231dffe22a1001e192990e4a16e7aa 100644 (file)
@@ -113,6 +113,7 @@ class TseriesCommon():
         self.login_info = self._get_login_info()
         self.lun_distribution = self._get_lun_distribution_info()
         self.luncopy_list = self._get_all_luncopy_name()
+        self.hostgroup_id = self._get_hostgroup_id(HOST_GROUP_NAME)
 
     def _check_conf_file(self):
         """Check config file, make sure essential items are set."""
@@ -1151,6 +1152,7 @@ class DoradoCommon(TseriesCommon):
 
         self._check_conf_file()
         self.lun_distribution = self._get_lun_ctr_info()
+        self.hostgroup_id = self._get_hostgroup_id(HOST_GROUP_NAME)
 
     def _check_conf_file(self):
         """Check the config file, make sure the key elements are set."""