~ctf/checkbox/bug811177

« back to all changes in this revision

Viewing changes to scripts/network_question

  • Committer: Marc Tardif
  • Date: 2007-10-04 23:12:10 UTC
  • Revision ID: marc.tardif@canonical.com-20071004231210-unxckndkgndxfdp6
Refactored questions to use templates and scripts which fixes bug #149195.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
from hwtest.pci import get_pci_devices
 
4
from hwtest.pci_ids import get_class, get_device
 
5
 
 
6
 
 
7
devices = get_pci_devices()
 
8
network_devices = filter(
 
9
    lambda x: get_class(x["class_name"]) == "Network controller",
 
10
    devices)
 
11
network_strings = map(
 
12
    lambda x: get_device(x["vendor"], x["device"]),
 
13
    network_devices)
 
14
 
 
15
print "\n".join(network_strings)