l.h.i.h.IHWSubmissionSet(Interface) : interface documentation

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

The set of HWDBSubmissions.
Method createSubmission Store submitted raw hardware information in a Librarian file.
Method getBySubmissionKey Return the submission with the given submission key, or None.
Method getByFingerprintName Return the submissions for the given system fingerprint string.
Method getByOwner Return the submissions for the given person.
Method submissionIdExists Return True, if a record with ths ID exists, else return False.
Method getByStatus Return the submissions with the given status.
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 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.
def createSubmission(date_created, format, private, contactable, submission_key, emailaddress, distroarchseries, raw_submission, filename, filesize, system):
Store submitted raw hardware information in a Librarian file.

If a submission with an identical submission_key already exists, an HWSubmissionKeyNotUnique exception is raised.

def getBySubmissionKey(submission_key, user=None):
Return the submission with the given submission key, or None.

If a submission is marked as private, it is only returned if user == HWSubmission.owner, of if user is an admin.

def getByFingerprintName(name, user=None):
Return the submissions for the given system fingerprint string.

If a submission is marked as private, it is only returned if user == HWSubmission.owner, or if user is an admin.

def getByOwner(owner, user=None):
Return the submissions for the given person.

If a submission is marked as private, it is only returned if user == HWSubmission.owner, or if user is an admin.

def submissionIdExists(submission_key):
Return True, if a record with ths ID exists, else return False.
def getByStatus(status, user=None):
Return the submissions with the given status.

If no user is specified, only public submissions are returned. If a regular user is specified, public submissions and private submissions owned by the user are returned. For admins and for the janitor, all submissions with the given status are returned.

ParametersstatusA status as enumerated in HWSubmissionProcessingStatus.
userThe IPerson running the query.
ReturnsThe submissions having the given status.
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.
def numSubmissionsWithDevice(bus=None, vendor_id=None, product_id=None, driver_name=None, package_name=None, distro_target=None):
Count the number of submissions mentioning a device or a driver.

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).
distro_targetLimit the count to submissions made for the given distribution, distroseries or distroarchseries. (optional).
ReturnsA tuple (submissions_with_device, all_submissions) 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.
def numOwnersOfDevice(bus=None, vendor_id=None, product_id=None, driver_name=None, package_name=None, distro_target=None):
The number of people owning a device or using a driver.

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).
distro_targetLimit the count to submissions made for the given distribution, distroseries or distroarchseries. (optional).
ReturnsA tuple (device_owners, all_hardware_reporters) where device_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_hardware_reporters is the number of persons who made a HWDB submission, optionally limited to submission made on the given distro_target installation.
def deviceDriverOwnersAffectedByBugs(bus=None, vendor_id=None, product_id=None, 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 device owners 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.
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 2018-11-19 00:00:14.