Get the zone id for the zone.
964535
def get_zoneID(self, headers, zone):
        """"""
        zoneIDurl = self.BASE_URL + '?name=' + zone
        zoneIDrequest = requests.get(zoneIDurl, headers=headers)
        zoneID = zoneIDrequest.json()['result'][0]['id']
        return zoneID
896947
public int getNodeIdForZoneNary(int zoneId, int zoneNary, byte[] key) {
        List<Node> replicatingNodes = this.routingStrategy.routeRequest(key);
        int zoneNAry = -1;
        for(Node node: replicatingNodes) {
            // bump up the counter if we encounter a replica in the given zone;
            // return current node if counter now matches requested
            if(node.getZoneId() == zoneId) {
                zoneNAry++;

                if(zoneNAry == zoneNary) {
                    return node.getId();
                }
            }
        }
        if(zoneNAry == -1) {
            throw new VoldemortException("Could not find any replicas for the key "
                                         + ByteUtils.toHexString(key) + " in given zone " + zoneId);
        } else {
            throw new VoldemortException("Could not find " + (zoneNary + 1)
                                         + " replicas for the key " + ByteUtils.toHexString(key)
                                         + " in given zone " + zoneId + ". Only found "
                                         + (zoneNAry + 1));
        }
    }
998134
def _get_zone(self, domain, domain_id):
        
        api = self.api[self.account]
        for request in api['zone']['GET']:
            url = (request.copy()).get('url', '/').replace('<id>', domain_id)
            params = request.get('params', {}).copy()
            for param in params:
                params[param] = params[param].replace('<id>', domain_id)
            response = self._get(url, query_params=params)
        dom = Provider._filter_dom(response.text, api['filter'])
        zone_file_filter = [{'name': 'textarea', 'attrs': {'name': api['zone']['file']}}]
        zone_file = Provider._filter_dom(dom, zone_file_filter).renderContents().decode('UTF-8')
        hidden = Provider._extract_hidden_data(dom)
        zone = {'data': dns.zone.from_text(zone_file, origin=domain, relativize=False),
                'hidden': hidden}
        LOGGER.info('Hetzner => Get zone for domain %s', domain)
        return zone
966237
public Interval withZoneId(ZoneId zone) {
        requireNonNull(zone);
        return new Interval(startDate, startTime, endDate, endTime, zone);
    }
825192
public String resolveTimeZoneId(String zoneId) {
    String alias = _CalendarUtils.getTimeZoneAlias(zoneId);
    if (alias != null) {
      zoneId = alias;
    }
    alias = TimeZoneAliases.getAlias(zoneId);
    if (alias != null) {
      zoneId = alias;
    }
    return zoneId;
  }
1195767
def get_id(self):
        """"""
        waypoint_index = 0
        if 'waypointIndex' in self.my_osid_object._my_map:
            waypoint_index = self.my_osid_object._my_map['waypointIndex']
        # NOTE that the order of the dict **must** match the order in generate_children()
        #   when creating the child_part_id
        #   1) level
        #   2) objective_ids
        #   3) parent_id
        #   4) waypoint_index
        magic_identifier = OrderedDict({
            'level': self._level,
            'objective_ids': self.my_osid_object._my_map['learningObjectiveIds'],
        })
        if self._magic_parent_id is not None:
            magic_identifier['parent_id'] = str(self._magic_parent_id)
        magic_identifier['waypoint_index'] = waypoint_index

        identifier = quote('{0}?{1}'.format(str(self.my_osid_object._my_map['_id']),
                                            json.dumps(magic_identifier)))
        return Id(namespace='assessment_authoring.AssessmentPart',
                  identifier=identifier,
                  authority=MAGIC_PART_AUTHORITY)
94250
def GetZoneGroupState(self, *args, **kwargs):
        """"""
        kwargs['cache'] = kwargs.get('cache', zone_group_state_shared_cache)
        return self.send_command('GetZoneGroupState', *args, **kwargs)
212871
def get_zone(name)
      params = {
          'command' => 'listZones',
          'available' => 'true'
      }
      json = send_request(params)

      networks = json['zone']
      return nil unless networks

      networks.each { |z|
        if name.is_uuid? then
          return z if z['id'] == name
        else
          return z if z['name'] == name
        end
      }
      nil
    end
1152443
protected int parseZoneId() {
        int result = -1;
        String zoneIdStr = this.request.getHeader(RestMessageHeaders.X_VOLD_ZONE_ID);
        if(zoneIdStr != null) {
            try {
                int zoneId = Integer.parseInt(zoneIdStr);
                if(zoneId < 0) {
                    logger.error("ZoneId cannot be negative. Assuming the default zone id.");
                } else {
                    result = zoneId;
                }
            } catch(NumberFormatException nfe) {
                logger.error("Exception when validating request. Incorrect zone id parameter. Cannot parse this to int: "
                                     + zoneIdStr,
                             nfe);
            }
        }
        return result;
    }
899506
def get_modes(self, zone):
        """"""
        self._populate_full_data()
        device = self._get_device(zone)
        return device['thermostat']['allowedModes']
261182
def zones(self):
        
        import ns1.rest.zones
        return ns1.rest.zones.Zones(self.config)
1294181
def get_records(self, zone_name):
        
        records = self._client.get('/domain/zone/{}/record'.format(zone_name))
        return [self.get_record(zone_name, record_id) for record_id in records]
337337
private function getZoneName(Zone $zone, LayoutTypeInterface $layoutType): string
    {
        if ($layoutType->hasZone($zone->getIdentifier())) {
            return $layoutType->getZone($zone->getIdentifier())->getName();
        }

        return $zone->getIdentifier();
    }
469045
public static ZoneId getZoneId(String zoneId) {
        return JMMap
                .getOrPutGetNew(zoneIdCache, zoneId, () -> ZoneId.of(zoneId));
    }
854299
def get_record(self, zone_name, record_id):
        
        return self._client.get(
            '/domain/zone/{}/record/{}'.format(zone_name, record_id))
520385
def get_iso(name, zone_name=nil)
      zone = zone_name ? get_zone(zone_name) : get_default_zone

      params = {
          'command' => 'listIsos',
          'isoFilter' => 'executable',
      }
      params['zoneid'] = zone['id'] if zone

      json = send_request(params)
      iso = json['iso']
      return nil unless iso

      iso.each { |i|
        if name.is_uuid? then
          return i if i['id'] == name
        else
          return i if i['name'] == name
        end
      }
      nil
    end
1077142
def get_zone(self, zone_name):
        
        for zone in self.get_zones():
            if zone_name == zone['name']:
                return zone

        raise RuntimeError("Unknown zone")