'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`'

def list_locations(self, ex_id=None):

    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)
