Get and store the map of resource records to domain names that
        point to them.
331194
def get_route53_records(self):
        '''  '''

        r53_conn = route53.Route53Connection()
        all_zones = r53_conn.get_zones()

        route53_zones = [ zone for zone in all_zones if zone.name[:-1]
                          not in self.route53_excluded_zones ]

        self.route53_records = {}

        for zone in route53_zones:
            rrsets = r53_conn.get_all_rrsets(zone.id)

            for record_set in rrsets:
                record_name = record_set.name

                if record_name.endswith('.'):
                    record_name = record_name[:-1]

                for resource in record_set.resource_records:
                    self.route53_records.setdefault(resource, set())
                    self.route53_records[resource].add(record_name)
889383
function buildResourceMap(resourceDefinitions, start) {
    var map = {};
    if(resourceDefinitions) {
      for(var i = 0, len = resourceDefinitions.length; i < len; i++) {
        addResourceToMap(map, resourceDefinitions[i], start);
      }
    }

    return map;
  }
1098142
function mapResources (resources) {
    var result = {};

    resources.forEach(function (r) {
      result[r.urn] = r;
    });

    var categorisations = resources.filter(function (r) { return r.class === 'Categorisation'; });
    var dataflows = resources.filter(function (r) { return r.class === 'Dataflow'; });
    var categoryschemes = resources.filter(function (r) { return r.class === 'CategoryScheme'; });
    var categories = [];

    function getCategories (c) {
      if (c.items === undefined) return;
      c.items.forEach(getCategories);
      categories = categories.concat(c.items);
    }

    categoryschemes.forEach(getCategories);

    var categoryMap = {};
    categories.forEach(function (c) { categoryMap[c.urn] = c; });

    categorisations.forEach(function (c) {
      var source = result[c.source.href];
      var target = categoryMap[c.target.href];
      if (target === undefined) return;
      if (target.children === undefined) target.children = [];
      target.children.push(source);
    });

    return result;
  }
119216
def list(self, domain_id, sub_domain=None):
        '''
        '''
        optional_args = {}
        if sub_domain != None:
            optional_args['sub_domain'] = sub_domain
        r = self._api.do_post('Record.List', domain_id=domain_id,
                              **optional_args)
        record_list = []
        for record in r['records']:
            record['domain_id'] = domain_id
            record_list.append(Record(record))
        return record_list
939475
def list_domains():
    '''
    
    '''
    with _get_xapi_session() as xapi:
        hosts = xapi.VM.get_all()
        ret = []

        for _host in hosts:
            if xapi.VM.get_record(_host)['is_control_domain'] is False:
                ret.append(xapi.VM.get_name_label(_host))

        return ret
74840
public ArrayList<OvhRecord> domain_recommendedDNSRecords_GET(String domain) throws IOException {
		String qPath = "/email/domain/{domain}/recommendedDNSRecords";
		StringBuilder sb = path(qPath, domain);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t4);
	}
262885
def get_resources(cls):
        """"""
        my_plurals = resource_helper.build_plural_mappings(
            {}, RESOURCE_ATTRIBUTE_MAP)
        attributes.PLURALS.update(my_plurals)
        attr_map = RESOURCE_ATTRIBUTE_MAP
        ext_resources = resource_helper.build_resource_info(my_plurals,
                                                            attr_map,
                                                            constants.A10_CERTIFICATE)

        return ext_resources
786757
def _list_records(self, rtype=None, name=None, content=None):
        """"""
        records = []
        paginator = RecordSetPaginator(self.r53_client, self.domain_id)
        for record in paginator.all_record_sets():
            if rtype is not None and record['Type'] != rtype:
                continue
            if name is not None and record['Name'] != self._fqdn_name(name):
                continue
            if record.get('AliasTarget', None) is not None:
                record_content = [record['AliasTarget'].get('DNSName', None)]
            if record.get('ResourceRecords', None) is not None:
                record_content = [self._format_content(record['Type'], value['Value']) for value
                                  in record['ResourceRecords']]
            if content is not None and content not in record_content:
                continue
            LOGGER.debug('record: %s', record)
            records.append({
                'type': record['Type'],
                'name': self._full_name(record['Name']),
                'ttl': record.get('TTL', None),
                'content': record_content[0] if len(record_content) == 1 else record_content,
            })
        LOGGER.debug('list_records: %s', records)
        return records
288306
def create_record_set(self, rs_dict):
        """"""
        record_set_md5 = get_record_set_md5(rs_dict["Name"], rs_dict["Type"])
        rs = route53.RecordSetType.from_dict(record_set_md5, rs_dict)
        rs = add_hosted_zone_id_if_missing(rs, self.hosted_zone_id)
        rs = self.add_hosted_zone_id_for_alias_target_if_missing(rs)
        return self.template.add_resource(rs)
816469
def _ProcessRegistryKeySource(self, source):
    """"""
    keys = source.base_source.attributes.get("keys", [])
    if not keys:
      return

    interpolated_paths = artifact_utils.InterpolateListKbAttributes(
        input_list=keys,
        knowledge_base=self.knowledge_base,
        ignore_errors=self.ignore_interpolation_errors)

    glob_expressions = map(rdf_paths.GlobExpression, interpolated_paths)

    patterns = []
    for pattern in glob_expressions:
      patterns.extend(pattern.Interpolate(knowledge_base=self.knowledge_base))
    patterns.sort(key=len, reverse=True)

    file_finder_action = rdf_file_finder.FileFinderAction.Stat()
    request = rdf_file_finder.FileFinderArgs(
        paths=patterns,
        action=file_finder_action,
        follow_links=True,
        pathtype=rdf_paths.PathSpec.PathType.REGISTRY)
    action = vfs_file_finder.RegistryKeyFromClient

    yield action, request
867167
def list_domains(container_id=None):
    '''
    
    '''
    if container_id:
        url = '{0}/domain?{1}'.format(_base_url(), container_id)
    else:
        url = '{0}/domain'.format(_base_url())

    orgs = _paginate(url,
                     "domains",
                     method='GET',
                     decode=True,
                     decode_type='json',
                     header_dict={
                         'X-DC-DEVKEY': _api_key(),
                         'Content-Type': 'application/json',
                     }
    )

    ret = {'domains': orgs}
    return ret
857987
def _init_map(self, record_types=None, **kwargs):
        """"""

        osid_objects.OsidSourceableForm._init_map(self)
        osid_objects.OsidObjectForm._init_map(self, record_types=record_types)
        self._my_map['copyrightRegistration'] = self._copyright_registration_default
        self._my_map['assignedRepositoryIds'] = [str(kwargs['repository_id'])]
        self._my_map['copyright'] = self._copyright_default
        self._my_map['title'] = self._title_default
        self._my_map['distributeVerbatim'] = self._distribute_verbatim_default
        self._my_map['createdDate'] = self._created_date_default
        self._my_map['distributeAlterations'] = self._distribute_alterations_default
        self._my_map['principalCreditString'] = self._principal_credit_string_default
        self._my_map['publishedDate'] = self._published_date_default
        self._my_map['sourceId'] = self._source_default
        self._my_map['providerLinkIds'] = self._provider_links_default
        self._my_map['publicDomain'] = self._public_domain_default
        self._my_map['distributeCompositions'] = self._distribute_compositions_default
        self._my_map['compositionId'] = self._composition_default
        self._my_map['published'] = self._published_default
        self._my_map['assetContents'] = []
855382
function(services) {

    return _.map(services, function(service) {

      // Start with a hostnames collector
      var hostnames = [];

      // Handle 'default' key
      if (service.default) {
        hostnames.push(app.name);
      }

      // Handle legacy 'hostname' key
      if (service.hostname) {
        hostnames.push([service.hostname, app.name].join('.'));
      }

      // Handle 'subdomains'
      if (service.subdomains) {
        _.forEach(service.subdomains, function(subdomain) {
          hostnames.push([subdomain, app.name].join('.'));
        });
      }

      // Handle 'custom'
      if (service.custom) {
        _.forEach(service.custom, function(url) {
          hostnames.push(url);
        });
      }

      // Determine whether the protocol is http or https
      var protocol = (service.secure) ? 'https://' : 'http://';

      // Return an array of parsed hostnames
      return _.map(hostnames, function(hostname) {
        return protocol + [hostname, app.domain].join('.');
      });

    });

  }
1190533
public java.util.Map<String, String> getDomainNames() {
        if (domainNames == null) {
            domainNames = new com.amazonaws.internal.SdkInternalMap<String, String>();
        }
        return domainNames;
    }
817650
private List<String> getDomainsFromUrl(URL url) {
        String host = url.getHost();
        String[] paths = new String[] {};
        if (url.getPath() != null) {
            paths = url.getPath().split("/");
        }
        List<String> domains = new ArrayList<String>(paths.length + 1);
        StringBuilder relative = new StringBuilder().append("http://").append(host).append("/");
        domains.add(relative.toString());
        for (String path : paths) {
            if (path.length() > 0) {
                relative.append(path).append("/");
                domains.add(relative.toString());
            }
        }
        return domains;
    }
708502
def _update_records(self, records, data):
        
        data = {k: v for k, v in data.items() if v}
        records = [dict(record, **data) for record in records]
        return self._apicall(
            'updateDnsRecords',
            domainname=self.domain,
            dnsrecordset={'dnsrecords': records},
        ).get('dnsrecords', [])
554997
def domain_records(self, domain_id):
        
        json = self.request('/domains/%s/records' % domain_id, method='GET')
        status = json.get('status')
        if status == 'OK':
            records_json = json.get('records', [])
            records = [Record.from_json(record) for record in records_json]
            return records
        else:
            message = json.get('message')
            raise DOPException('[%s]: %s' % (status, message))