Append a domain to the existing id if it doesn't already exist
432249
def _append_domain(opts):
    '''
    
    '''
    # Domain already exists
    if opts['id'].endswith(opts['append_domain']):
        return opts['id']
    # Trailing dot should mean an FQDN that is terminated, leave it alone.
    if opts['id'].endswith('.'):
        return opts['id']
    return '{0[id]}.{0[append_domain]}'.format(opts)
803677
function (config, ID) {

        if (!ID) ID = '/';

        if (typeof config[environment] === 'string') hosts[ID] = config[environment];

        for (let element in config) {

            let elementID = (ID === '/') ? '/' + element : ID + '/' + element;
            if (typeof config[element] === 'object') iterate(config[element], elementID);

        }

    }
192696
def _append_request_ids(self, resp):
        
        if isinstance(resp, list):
            # Add list of request_ids if response is of type list.
            for resp_obj in resp:
                self._append_request_id(resp_obj)
        elif resp is not None:
            # Add request_ids if response contains single object.
            self._append_request_id(resp)
488584
def _request_add_dns_record(self, record):
        """"""
        return self._request_internal("Add_DNS_Record",
                                      domain=self.domain,
                                      record=record)
259162
def change_id(self, new_id):
        """"""
        self._load_raw_content()
        self._id = new_id
        self.get_filename(renew=True)
        self.get_filepath(renew=True)
        return
757920
def replace(self, request, id):
        """"""
        try:
            object = self.model.objects.get(id=id)
        except self.model.DoesNotExist:
            return self._render(
                request = request,
                template = '404',
                context = {
                    'error': 'The %s could not be found.' % self.model.__name__.lower()
                },
                status = 404,
                prefix_template_path = False
            )

        form = (self.form or generate_form(self.model))(request.PUT, instance=object)

        if form.is_valid():
            object = form.save()

            return self.show(request, id)
        else:
            return self._render(
                request = request,
                template = 'edit',
                context = {
                    'form': form
                },
                status = 400
            )
416393
private void addEntityID(Map<String, String> requestParameters, StringBuilder uri) {
        if (StringUtils.hasText(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID))) {
            uri.append("/").append(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID));
        }
    }
426934
public void addId(final URI id, final String value) {
        if (id != null && value != null) {
            final URI localId = id.normalize();
            final String localValue = value.trim();
            idMap.put(localId, localValue);
        }
    }
769328
def append_id(self, id_col_name='append_id', cols=None):
        
        from .. import preprocess
        if id_col_name in self.schema:
            raise ValueError('ID column collides with existing columns.')
        append_id_obj = getattr(preprocess, '_AppendID')(id_col=id_col_name, selected_cols=cols)
        return append_id_obj.transform(self)
2927
def setup_dns(domain)
# TODO should we just use the ID instead of the full href?
      owner=@deployment.href
      @dns = SharedDns.new(domain)
      raise "Unable to reserve DNS" unless @dns.reserve_dns(owner)
      @dns.set_dns_inputs(@deployment)
    end
194861
def add(self, domain_accession, domain_type, match_quality):
        ''''''
        self.matches[domain_type] = self.matches.get(domain_type, {})
        self.matches[domain_type][domain_accession] = match_quality
396203
function add(appName, domain, callback) {
    commons.post(format('/%s/apps/%s/domains/', deis.version, appName), {
      domain: domain.toString()
    }, callback);
  }
728474
def append_index_id(id, ids):
    
    index = 1
    mod = '%s_%s' % (id, index)
    while mod in ids:
        index += 1
        mod = '%s_%s' % (id, index)
    ids.append(mod)
    return mod, ids
1167492
def uid_exists(uid):
    """"""
    try:
        pwd.getpwuid(uid)
        uid_exists = True
    except KeyError:
        uid_exists = False
    return uid_exists
394298
function replaceURL(id, url, linkText) {
    if (!linkText) linkText = url
    replaceText(id, "<a href='" + url + "'>" + linkText + "</a>");
}
182642
def set_domain!(new_domain)
      raise ArgumentError, "The new hostname cannot be nil" unless new_domain
      raise ArgumentError, "The new hostname cannot be empty" if new_domain.empty?

      edit_template = {
        "domain" => new_domain
      }

      self.service.editObject(edit_template)
      self.refresh_details()
    end
686882
def domain_update(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    if 'new_name' in kwargs:
        kwargs['name'] = kwargs.pop('new_name')
    return cloud.update_domain(**kwargs)