def get_volume_metadata_value(self, volume, key):
    'Get value of particular metadata key.'
    metadata = volume.get('volume_metadata')
    if metadata:
        for i in volume['volume_metadata']:
            if (i['key'] == key):
                return i['value']
    return None
Get value of particular metadata key.
def get_volume_metadata_value(self, volume, key):
    
    metadata = volume.get('volume_metadata')
    if metadata:
        for i in volume['volume_metadata']:
            if (i['key'] == key):
                return i['value']
    return None