def get_next_adapter(self, intr_type='eth'):
        if self.staticinterface_set.count() == 0:
            return intr_type, '0', '0'
        else:
            primary_list = []
            for i in self.staticinterface_set.all():
                i.update_attrs()
                try:
                    primary_list.append(int(i.attrs.primary))
                except AttributeError, e:
                    continue

            ## sort and reverse the list to get the highest
            ## perhaps someday come up with the lowest available
            ## this should work for now
            primary_list.sort()
            primary_list.reverse()
            if not primary_list:
                return intr_type, '0', '0'
            else:
                return intr_type, str(primary_list[0] + 1), '0'
Callback used for Children object.
dataset/ETHPy150Open rtucker-mozilla/mozilla_inventory/systems/models.py/System.get_next_adapter--crossover with--dataset/ETHPy150Open Knewton/pettingzoo-python/pettingzoo/dbag.py/DistributedBag._process_children_changed