def list_locations(self, ex_id=None):
        """
        List locations (datacenters) available for instantiating servers and
        networks.

        :keyword ex_id: Filters the location list to this id
        :type    ex_id: ``str``

        :return:  List of locations
        :rtype:  ``list`` of :class:`NodeLocation`
        """
        params = {}
        if ex_id is not None:
            params['id'] = ex_id

        return self._to_locations(
            self.connection
            .request_with_orgId_api_2(
                'infrastructure/datacenter',
                params=params
            ).object
        )
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/dimensiondata.py/DimensionDataNodeDriver.list_locations/original