Skip to content

Commit

Permalink
Merge pull request hpe-storage#32 from hpe-storage/plugin_v2
Browse files Browse the repository at this point in the history
Plugin v2
  • Loading branch information
sonivi authored Sep 25, 2018
2 parents df7acae + 3b8cbf7 commit d643e95
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
3 changes: 2 additions & 1 deletion docs/suse caasp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Installing the HPE 3PAR Volume Plug-in for Docker (Containerized Plug-in) for SU

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

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
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

5. **Build the containerized image**
```bash
Expand Down Expand Up @@ -173,6 +173,7 @@ Installing the HPE 3PAR Volume Plug-in for Docker (Containerized Plug-in) for SU
image: hpe-storage/python-hpedockerplugin:plugin_v2
container_name: volplugin
net: host
restart: always
privileged: true
volumes:
- /dev:/dev
Expand Down
19 changes: 7 additions & 12 deletions hpedockerplugin/volume_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,18 +1043,13 @@ def get_volume_snap_details(self, volname, snapname, qualified_name):
vol_detail['fsMode'] = volinfo.get('fsMode')
vol_detail['mountConflictDelay'] = volinfo.get(
'mount_conflict_delay')

cpg = volinfo.get('cpg')
snap_cpg = volinfo.get('snap_cpg')
rcg_info = volinfo.get('rcg_info')
if rcg_info:
driver = self._get_target_driver(rcg_info)
if driver == self._remote_driver:
cpg = self.tgt_bkend_config['hpe3par_cpg']
snap_cpg = self.tgt_bkend_config['hpe3par_snapcpg']

vol_detail['cpg'] = cpg
vol_detail['snap_cpg'] = snap_cpg
vol_detail['cpg'] = volinfo.get('cpg')
vol_detail['snap_cpg'] = volinfo.get('snap_cpg')
if volinfo.get('rcg_info'):
vol_detail['secondary_cpg'] = \
self.tgt_bkend_config.hpe3par_cpg[0]
vol_detail['secondary_snap_cpg'] = \
self.tgt_bkend_config.hpe3par_snapcpg[0]
volume['Status'].update({'volume_detail': vol_detail})

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

0 comments on commit d643e95

Please sign in to comment.