Home | History | Annotate | Download | only in site_utils

Lines Matching full:inventory

6 """Create e-mail reports of the Lab's DUT inventory.
110 _LOGFILE = 'lab-inventory.log'
357 """Collection of `HostJobHistory` objects for the Lab's inventory.
363 boards in the inventory, in unspecified order.
369 """Return a Lab inventory with specified parameters.
371 By default, gathers inventory from `HostJobHistory` objects
373 is supplied, the inventory will be restricted to only the
428 the board's inventory then lab techs will be asked to fix
449 """Return the total number of DUTs in the inventory."""
454 """Return the total number of boards in the inventory."""
513 inventory.
547 def _generate_repair_recommendation(inventory, num_recommend):
566 @param inventory Inventory for generating recommendations.
573 for board in inventory.get_managed_boards():
575 counts = inventory[board]
622 def _generate_board_inventory_message(inventory):
623 """Generate the "board inventory" e-mail message.
625 The board inventory is a list by board summarizing the number
636 @param inventory _LabInventory object with the inventory to
638 @return String with the inventory message to be sent.
641 logging.debug('Creating board inventory')
646 for board in inventory.get_managed_boards():
647 logging.debug('Counting board inventory for %s', board)
648 counts = inventory[board]
668 message = ['Summary of DUTs in inventory:',
676 'Boards in inventory: %d' % len(summaries),
678 'Full board inventory:\n',
697 def _generate_pool_inventory_message(inventory):
698 """Generate the "pool inventory" e-mail message.
700 The pool inventory is a list by pool and board summarizing the
707 @param inventory _LabInventory object with the inventory to
709 @return String with the inventory message to be sent.
712 logging.debug('Creating pool inventory')
722 for board, counts in inventory.items():
723 logging.debug('Counting inventory for %s, %s',
742 """Send an inventory e-mail message.
751 @param tag Tag identifying the inventory for logging
861 description='Gather and report lab inventory statistics')
868 help='Generate board inventory message, '
872 help='Generate pool inventory message, '
933 def _populate_board_counts(inventory):
945 @param inventory _LabInventory object with the inventory to
951 for counts in inventory.values():
982 logging.debug('Starting lab inventory for %s', timestamp)
986 logging.debug('Will include board inventory')
988 logging.debug('Will include pool inventory')
991 inventory = _LabInventory.create_inventory(
994 inventory.get_num_duts(),
995 inventory.get_num_boards())
998 _populate_board_counts(inventory)
1003 inventory, arguments.recommend) + '\n\n\n'
1006 board_message = _generate_board_inventory_message(inventory)
1009 'DUT board inventory %s' % timestamp,
1016 'DUT pool inventory %s' % timestamp,
1018 _generate_pool_inventory_message(inventory))
1030 inventory = _LabInventory.create_inventory(
1032 return inventory.get_managed_boards()