def _get_volume_region(volume):
    return (
        # Rackspace
        getattr(volume.driver, "region", None) or
        # AWS
        getattr(volume.driver, "region_name", None)
    )
Extract the region name from an AWS or Rackspace volume.
dataset/ETHPy150Open ClusterHQ/flocker/admin/cleanup.py/_get_volume_region