'Create metadata for the volume.
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/block-storage/v2/#create-volume-metadata'

def create_volume_metadata(self, volume_id, metadata):

    put_body = json.dumps({'metadata': metadata})
    url = ('volumes/%s/metadata' % volume_id)
    (resp, body) = self.post(url, put_body)
    body = json.loads(body)
    self.expected_success(200, resp.status)
    return rest_client.ResponseBody(resp, body)
