def get_next_adapter(self, intr_type='eth'):
        """
            method to get the next adapter
            we'll want to always return an adapter with a 0 alias
            take the highest primary if exists, increment by 1 and return

            :param type: The type of network adapter
            :type type: str
            :return: 3 strings 'adapter_name', 'primary_number', 'alias_number'
        """
        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 __HOLE__, 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'
dataset/ETHPy150Open rtucker-mozilla/mozilla_inventory/systems/models.py/System.get_next_adapter