Create a new Extended Attribute Record.

        Parameters:
         None.
        Returns:
         Nothing.
508422
def new(self):
        # type: () -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('This XARecord is already initialized!')

        # FIXME: we should allow the user to set these
        self._group_id = 0
        self._user_id = 0
        self._attributes = 0
        self._filenum = 0
        self._initialized = True
352778
def new(self):
        # type: () -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('PD record already initialized!')

        self._initialized = True
        self.padding = b''
129613
def create_record(self, domain, name, _type, data, params=None):
        ''' 
        '''
        params = update_params(params, {
            'domain': domain,
            'name': name,
            'type': _type,
            'data': data
        })
        return self.request('/v1/dns/create_record', params, 'POST')
1211405
def create!(attributes)
      new_attributes = map_to_keys(attributes)

      new_attributes = new_attributes.merge(
        RecordTypeManager::FIELD_NAME => klass.record_type_id
      ) if klass.record_type_id

      client.create!(klass.object_name, new_attributes)
    end
345512
def _create(self, **attributes):
        

        attributes['enabled'] = True
        if 'name' in self._data:
            attributes['description'] = self._data['name']
        obj_ref = self.api.add(self.obj_parent(), self.obj_type(), **attributes)
        self.api.commit()
        return self.api.remapIds(obj_ref)
691828
def _create_record(self, rtype, name, content):
        
        with self._session(self.domain, self.domain_id) as ddata:
            # Validate method parameters
            if not rtype or not name or not content:
                LOGGER.warning('Hetzner => Record has no rtype|name|content specified')
                return False

            # Add record to zone
            name = ddata['cname'] if ddata['cname'] else self._fqdn_name(name)
            rrset = ddata['zone']['data'].get_rdataset(name, rdtype=rtype, create=True)
            for rdata in rrset:
                if self._convert_content(rtype, content) == rdata.to_text():
                    LOGGER.info('Hetzner => Record with content \'%s\' already exists',
                                content)
                    return True

            ttl = (rrset.ttl if 0 < rrset.ttl < self._get_lexicon_option('ttl')
                   else self._get_lexicon_option('ttl'))
            rdataset = dns.rdataset.from_text(rrset.rdclass, rrset.rdtype,
                                              ttl, self._convert_content(rtype, content))
            rrset.update(rdataset)
            # Post zone to Hetzner
            synced_change = self._post_zone(ddata['zone'])
            if synced_change:
                self._propagated_record(rtype, name, self._convert_content(rtype, content),
                                        ddata['nameservers'])
            return synced_change
1330106
def new_record(self, key, value):
    
    new_record = self.get('new_record', {})
    ids = self.get('ids', [])

    for value in force_list(value):
        for id_ in force_list(value.get('a')):
            ids.append({
                'schema': 'SPIRES',
                'value': id_,
            })

        new_recid = force_single_element(value.get('d', ''))
        if new_recid:
            new_record = get_record_ref(new_recid, 'authors')

    self['ids'] = ids
    return new_record
1188636
def _create_record(name, field_defs, step_name, inputs, unlist, file_vs, std_vs, parallel):
    
    if field_defs:
        fields = []
        inherit = []
        inherit_all = False
        inherit_exclude = []
        for fdef in field_defs:
            if not fdef.get("type"):
                if fdef["id"] == "inherit":
                    inherit_all = True
                    inherit_exclude = fdef.get("exclude", [])
                else:
                    inherit.append(fdef["id"])
            else:
                cur = {"name": _get_string_vid(fdef["id"]),
                       "type": fdef["type"]}
                fields.append(_add_secondary_to_rec_field(fdef, cur))
        if inherit_all:
            fields.extend(_infer_record_outputs(inputs, unlist, file_vs, std_vs, parallel, exclude=inherit_exclude))
        elif inherit:
            fields.extend(_infer_record_outputs(inputs, unlist, file_vs, std_vs, parallel, inherit))
    else:
        fields = _infer_record_outputs(inputs, unlist, file_vs, std_vs, parallel)
    out = {"id": "%s/%s" % (step_name, name),
           "type": {"name": name,
                    "type": "record",
                    "fields": fields}}
    if parallel in ["batch-single", "multi-batch"]:
        out = _nest_variable(out)
    return out
793158
def new(self):
        # type: () -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('CE record already initialized!')

        self.bl_cont_area = 0  # This will get set during reshuffle_extents
        self.offset_cont_area = 0  # This will get set during reshuffle_extents
        self.len_cont_area = 0  # This will be calculated based on fields put in

        self._initialized = True
800576
def new_document(self):
        
        doc = Document(self, None)
        doc.create()
        super(CouchDatabase, self).__setitem__(doc['_id'], doc)
        return doc
357685
def create(self):
        

        # Ensure that an existing document will not be "updated"
        doc = dict(self)
        if doc.get('_rev') is not None:
            doc.__delitem__('_rev')

        headers = {'Content-Type': 'application/json'}
        resp = self.r_session.post(
            self._database.database_url,
            headers=headers,
            data=json.dumps(doc, cls=self.encoder)
        )
        resp.raise_for_status()
        data = response_to_json_dict(resp)
        super(Document, self).__setitem__('_id', data['id'])
        super(Document, self).__setitem__('_rev', data['rev'])
1098459
def extend(self, attributes, prefix):
        

        self._contents += [Attribute(attr, prefix) for attr in attributes]
976814
def create_attributes(klass, attributes, previous_object=None):
        

        result = super(ContentType, klass).create_attributes(attributes, previous_object)

        if 'fields' not in result:
            result['fields'] = []
        return result
1261482
def create_record(self, dns_type, name, content, **kwargs):
        
        data = {
            'type': dns_type,
            'name': name,
            'content': content
        }
        if kwargs.get('ttl') and kwargs['ttl'] != 1:
            data['ttl'] = kwargs['ttl']
        if kwargs.get('proxied') is True:
            data['proxied'] = True
        else:
            data['proxied'] = False
        content = self.request(
            self.api_url + self.zone['id'] + '/dns_records',
            'post',
            data=data
        )
        print('DNS record successfully created')
        return content['result']
1135008
def create(self, **kwargs):
        
        obj = self.model(**kwargs)
        obj.save(force_insert=True, using=self._using)
        return obj
1256496
def _generate_create_dict(record, record_type, data, ttl, **kwargs):
        """"""

        # Basic dns record structure
        resource_record = {
            'host': record,
            'data': data,
            'ttl': ttl,
            'type': record_type
        }

        for (key, value) in kwargs.items():
            resource_record.setdefault(key, value)

        return resource_record
342131
def add_record(self, length):
        # type: (int) -> None
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('CE record not yet initialized!')

        self.len_cont_area += length