'Parse an ``Application`` instance for its volume and return
a ``dict`` representing the Flocker-format YAML configuration
for the volume, or ``None`` if no volume is set for the application.
NOTE: We only support one volume per conainer for now, this
logic will need refactoring in future if this changes.'

def convert_volume(self):

    if self._application.volume:
        volume_dict = {u'mountpoint': self._application.volume.mountpoint.path}
        dataset = self._application.volume.dataset
        volume_dict[u'dataset_id'] = dataset.dataset_id
        if (dataset.maximum_size is not None):
            volume_dict[u'maximum_size'] = unicode(dataset.maximum_size)
        return volume_dict
    return None
