Merge ~sylvain-pineau/plainbox-provider-checkbox:json_attachments_no_key into plainbox-provider-checkbox:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: b8462f5bf34786413add49f1a1404b0ccfd4bbff
Merged at revision: adfec3866c718ce3382aa1ce7626475e1c5d6226
Proposed branch: ~sylvain-pineau/plainbox-provider-checkbox:json_attachments_no_key
Merge into: plainbox-provider-checkbox:master
Diff against target: 48 lines (+9/-6)
1 file modified
jobs/submission.txt.in (+9/-6)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+321661@code.launchpad.net

Description of the change

little patch to allow the new tarball submission format to contain a json export based on dicts (and not a dict of list of dict...)

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

self-approved

review: Approve
Revision history for this message
Jeff Lane  (bladernr) wrote :

You linked the wrong bug...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/submission.txt.in b/jobs/submission.txt.in
2index fcd61e6..0fafa85 100644
3--- a/jobs/submission.txt.in
4+++ b/jobs/submission.txt.in
5@@ -1,7 +1,9 @@
6 id: dkms_info_json
7 plugin: attachment
8 category_id: 2013.com.canonical.plainbox::info
9-command: dkms_info --format json | plainbox dev parse dkms-info
10+command:
11+ dkms_info --format json | plainbox dev parse dkms-info | \
12+ jq --indent 4 '.dkms_info'
13 _description: Attaches json dumps of installed dkms package information.
14 _summary: Attaches json dumps of installed dkms package information.
15
16@@ -26,9 +28,9 @@ requires: package.name == 'dmidecode'
17 user: root
18 command:
19 dmidecode -t bios -t system | plainbox dev parse dmidecode | \
20- jq --indent 4 '{"raw-devices-dmi": [.[0]."_attributes" +
21+ jq --indent 4 '[.[0]."_attributes" +
22 {"category": .[0]."category"}, .[1]."_attributes" +
23- {"category": .[1]."category"}]}'
24+ {"category": .[1]."category"}]'
25 estimated_duration: 1
26 _description: Attaches dmidecode output
27 _summary: Attaches json dumps of udev_resource raw dmi devices
28@@ -38,8 +40,7 @@ plugin: attachment
29 category_id: 2013.com.canonical.plainbox::info
30 command:
31 find /etc/modprobe.* -name \*.conf | xargs cat | plainbox dev parse modprobe |
32- jq --indent 4 'to_entries | {"modprobe-info":
33- map({"module": .key, "options": .value})}'
34+ jq --indent 4 'to_entries | map({"module": .key, "options": .value})'
35 estimated_duration: 0.015
36 _description: Attaches the contents of the various modprobe conf files.
37 _summary: Attach the contents of /etc/modprobe.*
38@@ -48,7 +49,9 @@ id: lspci_standard_config_json
39 _summary: Attach PCI configuration space hex dump
40 plugin: attachment
41 category_id: 2013.com.canonical.plainbox::info
42-command: lspci -x | plainbox dev parse pci-subsys-id
43+command:
44+ lspci -x | plainbox dev parse pci-subsys-id | \
45+ jq --indent 4 '.pci_subsystem_id'
46 estimated_duration: 0.1
47 _description: Attaches a hex dump of the standard part of the PCI configuration
48 space for all PCI devices.

Subscribers

People subscribed via source and target branches