~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/hardwaredb/doc/hwdb-device-tables.txt

  • Committer: Jeroen Vermeulen
  • Date: 2011-09-27 16:14:09 UTC
  • mto: This revision was merged to the branch mainline in revision 14059.
  • Revision ID: jeroen.vermeulen@canonical.com-20110927161409-11cn1ltv6i6qhaa4
Lint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
= Hardware Database Device Tables =
 
1
Hardware Database Device Tables
 
2
===============================
2
3
 
3
4
These tables represent devices and complete systems in the database. They
4
5
allow look up of devices by their bus IDs and by their human readable
5
6
vendor and product names. They also link devices to drivers.
6
7
 
7
 
== HWVendorName ==
 
8
HWVendorName
 
9
------------
8
10
 
9
11
HWVendorName is a simple list of vendor names. A new entry is created by
10
12
IHWVendorNameSet.create().
144
146
    None
145
147
 
146
148
 
147
 
== HWVendorID ==
 
149
HWVendorID
 
150
----------
148
151
 
149
152
HWVendorID associates a bus, as enumerated by HWBus, with a bus-specific
150
153
vendor ID and a vendor name. We store the IDs as a string, because not all
467
470
    PCI 0x8086
468
471
 
469
472
 
470
 
== HWDevice ==
 
473
HWDevice
 
474
--------
471
475
 
472
476
A HWDevice instance stores core data about a hardware device: The bus
473
477
it can connect to, the vendor ID, the product ID, the human readable
711
715
    ParameterError: '12345678901234567' is not a valid product ID for SCSI
712
716
 
713
717
 
714
 
=== Unknown Vendor IDs ===
 
718
Unknown Vendor IDs
 
719
..................
715
720
 
716
721
If IHWDevice.create is called with a vendor ID that for which there
717
722
is no IHWVendorID record, the latter is automatically created. Since
735
740
    >>> print new_vendor_device.bus_vendor.vendor_name.name
736
741
    Unknown
737
742
 
738
 
=== Device Variants ===
 
743
 
 
744
Device Variants
 
745
...............
739
746
 
740
747
While most devices can be uniquely identified by their vendor and product
741
748
IDs, there are some cases, where different devices have identical IDs:
843
850
    <BLANKLINE>
844
851
    >>> LaunchpadZopelessLayer.txn.abort()
845
852
 
846
 
=== Retrieving HWDevice records ===
 
853
Retrieving HWDevice records
 
854
...........................
847
855
 
848
856
Existing HWDevice records can be retrieved by calling
849
857
HWDeviceSet.getByDeviceID()
1122
1130
    linux-image-2.6.24-19-generic ahci
1123
1131
 
1124
1132
 
1125
 
== HWDeviceNameVariant ==
 
1133
HWDeviceNameVariant
 
1134
-------------------
1126
1135
 
1127
1136
Many OEM products are sold by more than one vendor under different
1128
1137
product names; some manufacturers sell the same device under
1168
1177
    >>> LaunchpadZopelessLayer.txn.abort()
1169
1178
 
1170
1179
 
1171
 
== HWDriver ==
 
1180
HWDriver
 
1181
--------
1172
1182
 
1173
1183
If a device is reported as having problems, then we are more
1174
1184
interested in which drivers are involved rather than the fact that
1465
1475
    >>> LaunchpadZopelessLayer.switchDbUser('hwdb-submission-processor')
1466
1476
 
1467
1477
 
1468
 
== Driver names and package names ==
 
1478
Driver names and package names
 
1479
------------------------------
1469
1480
 
1470
1481
The same driver names can appear multiple times in HWDriver.
1471
1482
HWDriverSet.all_driver_names() returns a list of distinct driver
1502
1513
    >>> LaunchpadZopelessLayer.switchDbUser('hwdb-submission-processor')
1503
1514
 
1504
1515
 
1505
 
== HWDeviceDriverLink ==
 
1516
HWDeviceDriverLink
 
1517
------------------
1506
1518
 
1507
1519
This table links devices and drivers.
1508
1520
 
1643
1655
    None
1644
1656
 
1645
1657
 
1646
 
== HWDeviceClass ==
 
1658
HWDeviceClass
 
1659
-------------
1647
1660
 
1648
1661
This table specifies the class or classes of a device. A device class
1649
1662
describes the capabilities of a device, i.e, if it is a printer,
1711
1724
    >>> LaunchpadZopelessLayer.switchDbUser('hwdb-submission-processor')
1712
1725
 
1713
1726
 
1714
 
== HWSubmissionDevice ==
 
1727
HWSubmissionDevice
 
1728
------------------
1715
1729
 
1716
1730
This table links devices listed in a submission to the
1717
1731
HWDeviceDriverLink table. Additionally it links a device of a
1850
1864
    None
1851
1865
 
1852
1866
 
1853
 
== Statistical functions ==
 
1867
Statistical functions
 
1868
---------------------
1854
1869
 
1855
1870
HWSubmissionDeviceSet.numDevicesInSubmissions() returns how often a
1856
1871
device appears in HWDB submissions.
2266
2281
    (0L, 2L)
2267
2282
 
2268
2283
 
2269
 
== Relations between bugs and HWDB submissions ==
 
2284
Relations between bugs and HWDB submissions
 
2285
-------------------------------------------
2270
2286
 
2271
2287
We can query which owners of a device, or which people owning a device
2272
2288
controlled by a given driver, are related to a set of bugs. We must
2456
2472
    Sample Person
2457
2473
 
2458
2474
 
2459
 
=== Searching for drivers instead of devices ===
 
2475
Searching for drivers instead of devices
 
2476
........................................
2460
2477
 
2461
2478
We can also look for people using a given driver and being affected by a
2462
2479
bug.