Skip to content

Commit d643e95

Browse files
author
sonivi
authored
Merge pull request hpe-storage#32 from hpe-storage/plugin_v2
Plugin v2
2 parents df7acae + 3b8cbf7 commit d643e95

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

docs/suse caasp/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Installing the HPE 3PAR Volume Plug-in for Docker (Containerized Plug-in) for SU
144144

145145
<https://github.com/hpe-storage/python-hpedockerplugin/blob/plugin_v2/config/hpe.conf.sample.3parFC>
146146

147-
4. Either you can build the container image by following instructions in step 5 below, or use an pre-existing 2.1 image of the plugin container by substituting `image: hpestorage/legacyvolumeplugin:2.1` in docker-compose.yml given in step 6
147+
4. Either you can build the container image by following instructions in step 5 below, or use an pre-existing 2.1 image of the plugin container by substituting `image: hpestorage/legacyvolumeplugin:2.1-suse` in docker-compose.yml given in step 6
148148

149149
5. **Build the containerized image**
150150
```bash
@@ -173,6 +173,7 @@ Installing the HPE 3PAR Volume Plug-in for Docker (Containerized Plug-in) for SU
173173
image: hpe-storage/python-hpedockerplugin:plugin_v2
174174
container_name: volplugin
175175
net: host
176+
restart: always
176177
privileged: true
177178
volumes:
178179
- /dev:/dev

hpedockerplugin/volume_manager.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,18 +1043,13 @@ def get_volume_snap_details(self, volname, snapname, qualified_name):
10431043
vol_detail['fsMode'] = volinfo.get('fsMode')
10441044
vol_detail['mountConflictDelay'] = volinfo.get(
10451045
'mount_conflict_delay')
1046-
1047-
cpg = volinfo.get('cpg')
1048-
snap_cpg = volinfo.get('snap_cpg')
1049-
rcg_info = volinfo.get('rcg_info')
1050-
if rcg_info:
1051-
driver = self._get_target_driver(rcg_info)
1052-
if driver == self._remote_driver:
1053-
cpg = self.tgt_bkend_config['hpe3par_cpg']
1054-
snap_cpg = self.tgt_bkend_config['hpe3par_snapcpg']
1055-
1056-
vol_detail['cpg'] = cpg
1057-
vol_detail['snap_cpg'] = snap_cpg
1046+
vol_detail['cpg'] = volinfo.get('cpg')
1047+
vol_detail['snap_cpg'] = volinfo.get('snap_cpg')
1048+
if volinfo.get('rcg_info'):
1049+
vol_detail['secondary_cpg'] = \
1050+
self.tgt_bkend_config.hpe3par_cpg[0]
1051+
vol_detail['secondary_snap_cpg'] = \
1052+
self.tgt_bkend_config.hpe3par_snapcpg[0]
10581053
volume['Status'].update({'volume_detail': vol_detail})
10591054

10601055
response = json.dumps({u"Err": err, u"Volume": volume})

0 commit comments

Comments
 (0)