General function to add an oid entry to the MIB subtree.
172188
def add_oid_entry(self, oid, type, value, label=None):
		""""""
		if self.debug:
			print('DEBUG: %s %s %s %s'%(oid,type,value,label))
		item={'type': str(type), 'value': str(value)}
		if label is not None:
		    item['label']=str(label)
		self.pending[oid]=item
696690
def _add_interface(self, interface_id, mgt=None, **kw):
        
        _kw = copy.deepcopy(kw) # Preserve original kw, especially lists
        mgt = mgt if mgt else {}
        
        if 'cvi_mode' in _kw:
            self.data.update(cvi_mode=_kw.pop('cvi_mode'))
        
        if 'macaddress' in _kw:
            self.data.update(
                macaddress=_kw.pop('macaddress'))
            if 'cvi_mode' not in self.data:
                self.data.update(cvi_mode='packetdispatch')
        
        if 'zone_ref' in _kw:
            zone_ref = _kw.pop('zone_ref')
            self.data.update(zone_ref=zone_helper(zone_ref) if zone_ref else None)
        
        if 'comment' in _kw:
            self.data.update(comment=_kw.pop('comment'))

        interfaces = _kw.pop('interfaces', [])
        for interface in interfaces:
            vlan_id = interface.pop('vlan_id', None)
            if vlan_id:
                _interface_id = '{}.{}'.format(interface_id, vlan_id)
            else:
                _interface_id = interface_id
    
            _interface = []
            if_mgt = {k: str(v) == str(_interface_id) for k, v in mgt.items()}
            
            if 'cluster_virtual' in interface and 'network_value' in interface:
                cluster_virtual = interface.pop('cluster_virtual')
                network_value = interface.pop('network_value')
                if cluster_virtual and network_value:
                    cvi = ClusterVirtualInterface.create(
                        _interface_id, cluster_virtual, network_value,
                        auth_request=True if if_mgt.get('primary_mgt') else False)
                      
                    _interface.append({cvi.typeof: cvi.data})
    
            for node in interface.pop('nodes', []):
                _node = if_mgt.copy()
                _node.update(outgoing=True if if_mgt.get('primary_mgt') else False)
                # Add node specific key/value pairs set on the node. This can
                # also be used to override management settings
                _node.update(node)
                ndi = NodeInterface.create(
                    interface_id=_interface_id, **_node)
                _interface.append({ndi.typeof: ndi.data})

            if vlan_id:
                vlan_interface = {
                    'interface_id': _interface_id,
                    'zone_ref': zone_helper(interface.pop('zone_ref', None)),
                    'comment': interface.pop('comment', None),
                    'interfaces': _interface}
                # Add remaining kwargs on vlan level to VLAN physical interface
                for name, value in interface.items():
                    vlan_interface[name] = value
                self.data.setdefault('vlanInterfaces', []).append(
                    vlan_interface)
            else:
                self.data.setdefault('interfaces', []).extend(
                    _interface)

        # Remaining kw go to base level interface
        for name, value in _kw.items():
            self.data[name] = value
401100
private void leafEntryIDs(MkAppTreeNode<O> node, ModifiableDBIDs result) {
    if(node.isLeaf()) {
      for(int i = 0; i < node.getNumEntries(); i++) {
        MkAppEntry entry = node.getEntry(i);
        result.add(((LeafEntry) entry).getDBID());
      }
    }
    else {
      for(int i = 0; i < node.getNumEntries(); i++) {
        MkAppTreeNode<O> childNode = getNode(node.getEntry(i));
        leafEntryIDs(childNode, result);
      }
    }
  }
827090
def _add_junction(item):
    '''
    
    '''
    type_, channels = _expand_one_key_dictionary(item)
    junction = UnnamedStatement(type='junction')
    for item in channels:
        type_, value = _expand_one_key_dictionary(item)
        channel = UnnamedStatement(type='channel')
        for val in value:
            if _is_reference(val):
                _add_reference(val, channel)
            elif _is_inline_definition(val):
                _add_inline_definition(val, channel)
        junction.add_child(channel)
    _current_statement.add_child(junction)
525171
def _add_sbi_id(self, sbi_id):
        """"""
        sbi_ids = self.sbi_ids
        sbi_ids.append(sbi_id)
        DB.set_hash_value(self._key, 'sbi_ids', sbi_ids)
647742
def add_entry(self, **kw):
        
        self.data.setdefault('entries', []).append(
            {'{}_entry'.format(self.typeof): kw})
855191
def _add(self, codeobj):
        """"""
        assert isinstance(codeobj, CodeStatement)
        codeobj._si = len(self.body)
        self.body.append(codeobj)
122674
def add_mimetype(mimedb, mimetype, extension):
    """"""
    # If extension is already a common type, strict=True must be used.
    strict = extension in mimedb.types_map[True]
    mimedb.add_type(mimetype, extension, strict=strict)
1274449
void addEntry(SelChImpl sc) {
        putDescriptor(totalChannels, IOUtil.fdVal(sc.getFD()));
        putEventOps(totalChannels, 0);
        putReventOps(totalChannels, 0);
        totalChannels++;
    }
56017
def addidsuffix(self, idsuffix, recursive = True):
        """"""
        if self.id: self.id += idsuffix
        if recursive:
            for e in self:
                try:
                    e.addidsuffix(idsuffix, recursive)
                except Exception:
                    pass
298304
def expand_idx_mimetype(type_):
    """"""
    if isinstance(type_, unicode_type):
        match = __IDX_PATTERN.match(type_)
        return __IDX_MAPPING.get(match.group(1), type_) if match else type_
    else:
        return type_
1219205
def insert_entry_for_bucket(self, bucket_key, tree_depth):
        

        # First increase vector count of this subtree
        self.vector_count = self.vector_count + 1

        if tree_depth < len(bucket_key):
            hash_char = bucket_key[tree_depth]

            # This is not the leaf so continue down into the tree towards the leafes

            #print 'hash_char=%c' % hash_char

            # If child node for this character ('0' or '1') is not existing yet, create it
            if not hash_char in self.childs:
                #print 'Creating child for %c' % hash_char
                self.childs[hash_char] = RandomBinaryProjectionTreeNode()

            # Continue on the child
            self.childs[hash_char].insert_entry_for_bucket(bucket_key, tree_depth+1)
        else:
            # This is a leaf, so keep the bucket key
            #print 'Inserting leaf %s(%s, %d), count is %d' % (bucket_key, self.bucket_key, tree_depth, self.vector_count)
            if not self.bucket_key is None:
                if self.bucket_key != bucket_key:
                    raise AttributeError
            self.bucket_key = bucket_key
1262951
def add(self, type, orig, replace):
        
        ret = libxml2mod.xmlACatalogAdd(self._o, type, orig, replace)
        return ret
690091
public void add(
            ASN1ObjectIdentifier oid,
            String value) {
        ASN1EncodableVector v = new ASN1EncodableVector();
        v.add(oid);
        v.add(new DERPrintableString(value));
        add(new DERSet(new DERSequence(v)));
    }
1373669
function addData (db, mime, source) {
  Object.keys(mime).forEach(function (key) {
    var data = mime[key]
    var type = key.toLowerCase()
    var obj = db[type] = db[type] || createTypeEntry(source)

    // add missing data
    setValue(obj, 'charset', data.charset)
    setValue(obj, 'compressible', data.compressible)

    // append new extensions
    appendExtensions(obj, data.extensions)
  })
}
458118
def _add_uid(self, uid, skip_handle=False):
        
        # We might add None values from wherever. Kill them here.
        uid = uid or ''
        if is_arxiv(uid):
            self._ensure_reference_field('arxiv_eprint', normalize_arxiv(uid))
        elif idutils.is_doi(uid):
            self._ensure_reference_field('dois', [])
            self.obj['reference']['dois'].append(idutils.normalize_doi(uid))
        elif idutils.is_handle(uid) and not skip_handle:
            self._ensure_reference_field('persistent_identifiers', [])
            self.obj['reference']['persistent_identifiers'].append({
                'schema': 'HDL',
                'value': idutils.normalize_handle(uid),
            })
        elif idutils.is_urn(uid):
            self._ensure_reference_field('persistent_identifiers', [])
            self.obj['reference']['persistent_identifiers'].append({
                'schema': 'URN',
                'value': uid,
            })
        elif self.RE_VALID_CNUM.match(uid):
            self._ensure_reference_field('publication_info', {})
            self.obj['reference']['publication_info']['cnum'] = uid
        elif is_cds_url(uid):
            self._ensure_reference_field('external_system_identifiers', [])
            self.obj['reference']['external_system_identifiers'].append({
                'schema': 'CDS',
                'value': extract_cds_id(uid),
            })
        elif is_ads_url(uid):
            self._ensure_reference_field('external_system_identifiers', [])
            self.obj['reference']['external_system_identifiers'].append({
                'schema': 'ADS',
                'value': extract_ads_id(uid),
            })
        else:
            # ``idutils.is_isbn`` is too strict in what it accepts.
            try:
                isbn = str(ISBN(uid))
                self._ensure_reference_field('isbn', {})
                self.obj['reference']['isbn'] = isbn
            except Exception:
                raise ValueError('Unrecognized uid type')
537442
function add({
  id, path, types: t, key, value,
}) {
  const programPath = path.findParent(p => p.isProgram());
  const keyMapNode = getKeyMapNode({ id, programPath, types: t });

  keyMapNode.properties.push(t.objectProperty(
    t.identifier(key), t.stringLiteral(value),
  ));
}