Create a new :class:`DomainSample` on the server.

        :param domain: The domain as a string.
        :param tlp_level: The TLP-Level
        :param tags: Tags to add to the sample.
        :return: The created sample.
765333
def create(cls, domain, tlp_level=0, tags=[]):
        
        return cls._create(domain=domain, tlp_level=tlp_level, tags=tags)
1355829
def create(cls, uri, tlp_level=0, tags=[]):
        
        return cls._create(uri=uri, tlp_level=tlp_level, tags=tags)
602933
def filter_by_domain(self, domain):
        
        query = self._copy()
        query.domain = domain
        return query
45873
def tld=(new_tld)
      replaced_tld = domain.sub(/#{tld}\z/, new_tld)
      self.host = PublicSuffix::Domain.new(replaced_tld).to_s
    end
1244937
def get_domain_info(self, domain):
        
        url = self.API_TEMPLATE + self.DOMAIN_INFO.format(domain=domain)
        return self._get_json_from_response(url)
564619
def create_domainalias(self, domainid, data):
        """"""
        return self.api_call(
            ENDPOINTS['domainaliases']['new'],
            dict(domainid=domainid),
            body=data)
1037603
def ready_for_challenge(domain, dns_challenge)
      record = "#{dns_challenge.record_name}.#{domain}"
      challenge_value = dns_challenge.record_content
      txt_value = Resolv::DNS.open do |dns|
        records = dns.getresources(record, Resolv::DNS::Resource::IN::TXT);
        records.empty? ? nil : records.map(&:data).join(" ")
      end
      txt_value == challenge_value
    end
1026919
def domain(random=random, *args, **kwargs):
    
    words = random.choice([
        noun(random=random),
        thing(random=random),
        adjective(random=random)+noun(random=random),
    ])
    return _slugify(words)+tld(random=random)
799873
def domain_create(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(keep_name=True, **kwargs)
    return cloud.create_domain(**kwargs)
999754
def domain_create(args)
      raise ArgumentError, "You can't create a domain with ns records, you must do an update afterwards" if args.key?(:ns)
      raise ArgumentError, "You can't create a domain with ds or key records, you must do an update afterwards" if args.key?(:dsData) || args.key?(:keyData)
      super
    end
396934
def create_tag(self, name):
        
        return self._tag(self.request('/v2/tags', method='POST', data={
            "name": name,
        })["tag"])
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
212078
function createARecord (domain, subdomain, ip, cb) {
        var body = {
            name: subdomain,
            type: 'A',
            content: ip
        };
        _hoverRequest('POST', '/domains/' + domain + '/dns', body, cb);
    }
1049944
def list_tags(DomainName=None, ARN=None,
           region=None, key=None, keyid=None, profile=None):
    '''
    

    '''

    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        if ARN is None:
            if DomainName is None:
                raise SaltInvocationError('One (but not both) of ARN or '
                         'domain must be specified.')
            domaindata = status(DomainName=DomainName,
                            region=region, key=key, keyid=keyid,
                            profile=profile)
            if not domaindata or 'domain' not in domaindata:
                log.warning('Domain tags not updated')
                return {'tagged': False}
            ARN = domaindata.get('domain', {}).get('ARN')
        elif DomainName is not None:
            raise SaltInvocationError('One (but not both) of ARN or '
                         'domain must be specified.')
        ret = conn.list_tags(ARN=ARN)
        log.warning(ret)
        tlist = ret.get('TagList', [])
        tagdict = {}
        for tag in tlist:
            tagdict[tag.get('Key')] = tag.get('Value')
        return {'tags': tagdict}
    except ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
82296
def create_server(self, *args, **kwargs):
        
        # hpcloud's management console stuffs all of its tags in a "tags" tag.
        # populate it with the stack and role values here only at server
        # creation time.  what users do with it after server creation is up to
        # them.
        tags = kwargs['tags']
        tags[A.tags.TAGS] = ','.join([
                tags.get(A.tags.STACK, ''),
                tags.get(A.tags.ROLE, ''),
                ])
        # Don't create an explicit floating IP; gets one 
        # automatically
        if 'floating_ip' not in kwargs:
            kwargs['floating_ip'] = False
        s = super(HPNova, self).create_server(*args, **kwargs)
        return fix_hp_addrs(s)
1089894
def query_domain(self, domain, typenames, domainquerytype='list', count=False):
        

        objects = self._get_repo_filter(Layer.objects)

        if domainquerytype == 'range':
            return [tuple(objects.aggregate(Min(domain), Max(domain)).values())]
        else:
            if count:
                return [(d[domain], d['%s__count' % domain])
                        for d in objects.values(domain).annotate(Count(domain))]
            else:
                return objects.values_list(domain).distinct()
441029
def tagger(self):
        
        domain = 0
        if domain not in self.domains:
            self.register_domain(domain=domain)
        return self.domains[domain].tagger