l.h.i.w.IHWDBApplication(ILaunchpadApplication) : interface documentation

Part of lp.hardwaredb.interfaces.webservice View In Hierarchy

Hardware database application application root.
Method devices Return the set of devices.
Method drivers Return the set of drivers.
Method vendorIDs Return the known vendor IDs for the given bus.
Method search Return the submissions matiching the given parmeters.
Method numSubmissionsWithDevice Count the number of submissions mentioning a device or a driver.
Method numOwnersOfDevice The number of people owning a device or using a driver.
Method numDevicesInSubmissions Count how often a device or a driver appears in HWDB submissions.
Method deviceDriverOwnersAffectedByBugs Return persons affected by given bugs and owning a given device.
Method hwInfoByBugRelatedUsers Return a list of owners and devices related to given bugs.

Inherited from ILaunchpadApplication:

Attribute title Title
@operation_parameters(Choice(u'The device bus', HWBus, True), TextLine(u'The vendor ID', True, VENDOR_ID_DESCRIPTION), TextLine(u'The product ID', False, PRODUCT_ID_DESCRIPTION))
@operation_returns_collection_of(IHWDevice)
@export_read_operation()
def devices(bus, vendor_id, product_id=None):
Return the set of devices.
@operation_parameters(TextLine(u'The name of the package containing the driver.', False, u'If package_name is omitted, all driver records returned, optionally limited to those matching the parameter name. If package_name is (empty string), those records are returned where package_name is or None.'), TextLine(u'The name of the driver.', False, u'If name is omitted, all driver records are returned, optionally limited to those matching the parameter package_name.'))
@operation_returns_collection_of(IHWDriver)
@export_read_operation()
def drivers(package_name=None, name=None):
Return the set of drivers.
@operation_parameters(Choice(u'A Device Bus.', HWBus, True))
@operation_returns_collection_of(IHWVendorID)
@export_read_operation()
def vendorIDs(bus):
Return the known vendor IDs for the given bus.
ParametersbusA HWBus value.
ReturnsA list of strings with vendor IDs fr this bus,
@operation_parameters(Reference(IHWDevice, u'A Device', u'If specified, the result set is limited to submissions containing this device.', False), Reference(IHWDriver, u'A Driver', u'If specified, the result set is limited to submissions containing devices that use this driver.', False), Reference(IDistribution, u'A Distribution', u'If specified, the result set is limited to submissions made for this distribution.', False), Reference(IDistroSeries, u'A Distribution Series', u'If specified, the result set is limited to submissions made for the given distribution series.', False), TextLine(u'A processor architecture', u'If specified, the result set is limited to sumbissions made for a specific architecture.', False), Reference(IPerson, u'Person', u'If specified, the result set is limited to sumbissions from this person.', False), Datetime(u'Created Before', u'If specified, exclude results created after this date.', False), Datetime(u'Created After', u'If specified, exclude results created before or on this date.', False), Datetime(u'Created Before', u'If specified, exclude results submitted after this date.', False), Datetime(u'Created After', u'If specified, Exclude results submitted before or on this date.', False))
@call_with(REQUEST_USER)
@operation_returns_collection_of(IHWSubmission)
@export_read_operation()
def search(user=None, device=None, driver=None, distribution=None, distroseries=None, architecture=None, owner=None, created_before=None, created_after=None, submitted_before=None, submitted_after=None):
Return the submissions matiching the given parmeters.

Only one of :distribution: or :distroseries: may be supplied.

ParametersuserThe IPerson running the query. Private submissions are returned only if the person running the query is the owner or an admin.
deviceLimit results to submissions containing this IHWDevice.
driverLimit results to submissions containing devices that use this IHWDriver.
distributionLimit results to submissions made for this IDistribution.
distroseriesLimit results to submissions made for this IDistroSeries.
architectureLimit results to submissions made for a specific architecture.
ownerLimit results to submissions from this person.
created_beforeExclude results created after this date.
created_afterExclude results created before or on this date.
submitted_beforeExclude results submitted after this date.
submitted_afterExclude results submitted before or on this date.
@operation_parameters(Choice(u'The device bus', HWBus, False), TextLine(u'The vendor ID', VENDOR_ID_DESCRIPTION, False), TextLine(u'The product ID', PRODUCT_ID_DESCRIPTION, False), TextLine(u'A driver name', False, u'If specified, the count is limited to devices controlled by this driver.'), TextLine(u'A package name', False, u'If specified, the count is limited to devices controlled by a driver from this package.'), Reference(IDistribution, u'A Distribution', u'If specified, the result set is limited to submissions made for this distribution.', False), Reference(IDistroSeries, u'A Distribution Series', u'If specified, the result set is limited to submissions made for the given distribution series.', False), Reference(IDistroArchSeries, u'A Distribution Series', u'If specified, the result set is limited to submissions made for the given distroarchseries.', False))
@export_read_operation()
def numSubmissionsWithDevice(bus=None, vendor_id=None, product_id=None, driver_name=None, package_name=None, distribution=None, distroseries=None, distroarchseries=None):
Count the number of submissions mentioning a device or a driver.

Returns a dictionary {'submissions_with_device: n1, 'all_submissions': n2}, where submissions_with_device is the number of submissions having the given device or driver and matching the distro target criterion and where all_submissions is the number of submissions matching the distro target criterion.

You may specify at most one of the parameters distribution, distroseries or distroarchseries.

At least each of bus, vendor_id, product_id must not be None or driver_name must not be None.

ParametersbusThe HWBus of the device (optional).
vendor_idThe vendor ID of the device (optional).
product_idThe product ID of the device (optional).
driver_nameThe name of the driver used for the device (optional).
package_nameThe name of the package the driver is a part of. (optional).
distributionLimit the count to submissions made for the given distribution, distroseries or distroarchseries. (optional).
distroseriesLimit the count to submissions made for the given distroseries. (optional).
distroarchseriesLimit the count to submissions made for the given distroarchseries. (optional).
@operation_parameters(Choice(u'The device bus', HWBus, False), TextLine(u'The vendor ID', VENDOR_ID_DESCRIPTION, False), TextLine(u'The product ID', PRODUCT_ID_DESCRIPTION, False), TextLine(u'A driver name', False, u'If specified, the count is limited to devices controlled by this driver.'), TextLine(u'A package name', False, u'If specified, the count is limited to devices controlled by a driver from this package.'), Reference(IDistribution, u'A Distribution', u'If specified, the result set is limited to submissions made for this distribution.', False), Reference(IDistroSeries, u'A Distribution Series', u'If specified, the result set is limited to submissions made for the given distribution series.', False), Reference(IDistroArchSeries, u'A Distribution Series', u'If specified, the result set is limited to submissions made for the given distroarchseries.', False))
@export_read_operation()
def numOwnersOfDevice(bus=None, vendor_id=None, product_id=None, driver_name=None, package_name=None, distribution=None, distroseries=None, distroarchseries=None):
The number of people owning a device or using a driver.

Returns a dictionary {'owners': n1, 'all_submitters': n2} where owners is the number of people who made a HWDB submission containing the given device or driver, optionally limited to submissions made for the given distro target. all_submitters is the number of persons who made a HWDB submission, optionally limited to submission made on the given distro target installation.

You may specify at most one of the parameters distribution, distroseries or distroarchseries.

At least each of bus, vendor_id, product_id must not be None or driver_name must not be None.

ParametersbusThe HWBus of the device (optional).
vendor_idThe vendor ID of the device (optional).
product_idThe product ID of the device (optional).
driver_nameThe name of the driver used for the device (optional).
package_nameThe name of the package the driver is a part of. (optional).
distributionLimit the count to submissions made for the given distribution, distroseries or distroarchseries. (optional).
distroseriesLimit the count to submissions made for the given distroseries. (optional).
distroarchseriesLimit the count to submissions made for the given distroarchseries. (optional).
@operation_parameters(Choice(u'The device bus', HWBus, False), TextLine(u'The vendor ID', VENDOR_ID_DESCRIPTION, False), TextLine(u'The product ID', PRODUCT_ID_DESCRIPTION, False), TextLine(u'A driver name', False, u'If specified, the count is limited to devices controlled by this driver.'), TextLine(u'A package name', False, u'If specified, the count is limited to devices controlled by a driver from this package.'), Reference(IDistribution, u'A Distribution', u'If specified, the result set is limited to submissions made for this distribution.', False), Reference(IDistroSeries, u'A Distribution Series', u'If specified, the result set is limited to submissions made for the given distribution series.', False), Reference(IDistroArchSeries, u'A Distribution Series', u'If specified, the result set is limited to submissions made for the given distroarchseries.', False))
@export_read_operation()
def numDevicesInSubmissions(bus=None, vendor_id=None, product_id=None, driver_name=None, package_name=None, distribution=None, distroseries=None, distroarchseries=None):
Count how often a device or a driver appears in HWDB submissions.

You may specify at most one of the parameters distribution, distroseries or distroarchseries.

At least each of bus, vendor_id, product_id must not be None or driver_name must not be None.

ParametersbusThe HWBus of the device (optional).
vendor_idThe vendor ID of the device (optional).
product_idThe product ID of the device (optional).
driver_nameLimit the count to devices controlled by the given driver (optional).
package_nameLimit the count to devices controlled by a driver from the given package (optional).
distributionLimit the count to submissions made for the given distribution, distroseries or distroarchseries. (optional).
distroseriesLimit the count to submissions made for the given distroseries. (optional).
distroarchseriesLimit the count to submissions made for the given distroarchseries. (optional).
ReturnsThe number how often the given device appears in HWDB submissions.
@operation_parameters(Choice(u'The device bus', HWBus, False), TextLine(u'The vendor ID', VENDOR_ID_DESCRIPTION, False), TextLine(u'The product ID', PRODUCT_ID_DESCRIPTION, False), TextLine(u'A driver name', False, u'If specified, the search is limited to devices controlled by this driver.'), TextLine(u'A package name', False, u'If specified, the search is limited to devices controlled by a driver from this package.'), List(u'A set of bug IDs', u'Search submitters, subscribers or affected users of bugs with these IDs.', Int(), False), List(u'A set of bug tags', u'Search submitters, subscribers or affected users of bugs having one of these tags.', TextLine(), False), Bool(u'Search for users affected by a bug', u'If true, those device owners are looked up which are affected by one of the selected bugs.', False), Bool(u'Search for users who subscribed to a bug', u'If true, those device owners are looked up which to one of the selected bugs.', False))
@call_with(REQUEST_USER)
@operation_returns_collection_of(IPerson)
@export_read_operation()
def deviceDriverOwnersAffectedByBugs(bus, vendor_id, product_id, driver_name=None, package_name=None, bug_ids=None, bug_tags=None, affected_by_bug=False, subscribed_to_bug=False, user=None):
Return persons affected by given bugs and owning a given device.

bug_ids must be a non-empty sequence of bug IDs, or bug_tags must be a non-empty sequence of bug tags.

The parameters bus, vendor_id, product_id must not be None, or driver_name must not be None.

By default, only those persons are returned which have reported a bug matching the given bug conditions.

Owners of private submissions are returned only if user is the owner of the private submission or if user is an admin.

ParametersbusThe HWBus of the device.
vendor_idThe vendor ID of the device.
product_idThe product ID of the device.
driver_nameLimit the search to devices controlled by the given driver.
package_nameLimit the search to devices controlled by a driver from the given package.
bug_idsA sequence of bug IDs for which affected are looked up.
bug_tagsA sequence of bug tags
affected_by_bugIf True, those persons are looked up that have marked themselves as being affected by a one of the bugs matching the bug criteria.
subscribed_to_bugIf True, those persons are looked up that are subscribed to a bug matching one of the bug criteria.
userThe person making the query.
@operation_parameters(List(u'A set of bug IDs', u'Search for devices and their owners related to bugs with these IDs.', Int(), False), List(u'A set of bug tags', u'Search for devices and their owners related to bugs having one of these tags.', TextLine(), False), Bool(u'Search for users affected by a bug', u'If true, those device owners are looked up which are affected by one of the selected bugs.', False), Bool(u'Search for users who subscribed to a bug', u'If true, those device owners are looked up which to one of the selected bugs.', False))
@call_with(REQUEST_USER)
@export_read_operation()
def hwInfoByBugRelatedUsers(bug_ids=None, bug_tags=None, affected_by_bug=False, subscribed_to_bug=False, user=None):
Return a list of owners and devices related to given bugs.

Actually returns a list of tuples where the tuple is of the form, (person name, bus name, vendor id, product id).`

Parametersbug_idsA sequence of bug IDs for which affected are looked up.
bug_tagsA sequence of bug tags
affected_by_bugIf True, those persons are looked up that have marked themselves as being affected by a one of the bugs matching the bug criteria.
subscribed_to_bugIf True, those persons are looked up that are subscribed to a bug matching one of the bug criteria.
userThe person making the query.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.