code: def get_location_id(self, location):
          
  
          if isinstance(location, int):
              return location
          mask = "mask[id,name,regions[keyname]]"
          if match(r'[a-zA-Z]{3}[0-9]{2}', location) is not None:
              search = {'name': {'operation': location}}
          else:
              search = {'regions': {'keyname': {'operation': location}}}
          datacenter = self.client.call('SoftLayer_Location', 'getDatacenters', mask=mask, filter=search)
          if len(datacenter) != 1:
              raise exceptions.SoftLayerError("Unable to find location: %s" % location)
          return datacenter[0]['id']
docs: Finds the location ID of a given datacenter
  
          This is mostly used so either a dc name, or regions keyname can be used when ordering
          :param str location: Region Keyname (DALLAS13) or datacenter name (dal13)
          :returns: integer id of the datacenter