~landscape/charms/precise/storage/multiple-units

« back to all changes in this revision

Viewing changes to hooks/storage-provider.d/block-storage-broker/block-storage-relation-changed

  • Committer: Bjorn Tillenius
  • Date: 2016-01-20 14:04:56 UTC
  • Revision ID: bjorn@canonical.com-20160120140456-q2qfp5g9tgr5rbxy
Add comment.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
device_path = common_util._get_from_relation(
53
53
    "block-storage", "block-device-path")
54
54
 
 
55
# Get the device path from block-device-path-map if it exists, since
 
56
# that works when multiple storage units exist. Older version of the
 
57
# block-storage-broker charm doesn't set it, though.
55
58
device_path_map = common_util._get_from_relation(
56
59
    "block-storage", "block-device-path-map")
57
 
 
58
60
if device_path_map is not None:
59
61
    device_path_map = json.loads(device_path_map)
60
62
    hookenv.log(