Merge ~sylvain-pineau/checkbox-ng:xml-removal into checkbox-ng:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 8e701f5f659050cccc355b9080e22a9feb73a2e7
Merged at revision: 29dd46691720384c6f99a452fb5e5fcdcf1061db
Proposed branch: ~sylvain-pineau/checkbox-ng:xml-removal
Merge into: checkbox-ng:master
Diff against target: 592 lines (+40/-263)
10 files modified
checkbox_ng/certification.py (+2/-146)
checkbox_ng/launcher/subcommands.py (+11/-38)
checkbox_ng/test_certification.py (+19/-42)
dev/null (+0/-1)
docs/conf.py (+1/-3)
docs/index.rst (+0/-18)
docs/launcher-tutorial.rst (+6/-9)
docs/stack.rst (+1/-3)
requirements/deb-core.txt (+0/-1)
setup.py (+0/-2)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Needs Resubmitting
Maciej Kisielewski (community) Approve
Review via email: mp+326371@code.launchpad.net

Description of the change

Remove XML/HEXR exporter support from checkbox-ng

Requires: https://code.launchpad.net/~sylvain-pineau/plainbox/+git/plainbox/+merge/326677

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

+1.

I found one additional change worth considering. See inline.

review: Approve
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

sample_xml -> sample_archive

review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/checkbox_ng/certification.py b/checkbox_ng/certification.py
index c46956a..bccae83 100644
--- a/checkbox_ng/certification.py
+++ b/checkbox_ng/certification.py
@@ -23,7 +23,7 @@
23=============================================================================23=============================================================================
2424
25This module contains a PlainBox transport that knows how to send the25This module contains a PlainBox transport that knows how to send the
26certification XML data to the Canonical certification database.26certification tarball to the Canonical certification database.
27"""27"""
2828
29from gettext import gettext as _29from gettext import gettext as _
@@ -41,147 +41,6 @@ import requests
41logger = getLogger("checkbox.ng.certification")41logger = getLogger("checkbox.ng.certification")
4242
4343
44class CertificationTransport(TransportBase):
45 """
46 Transport for sending data to certification database.
47 - POSTs data to a http(s) endpoint
48 - Adds a header with a hardware identifier
49 - Payload can be in:
50 * checkbox xml-compatible format.
51 This means it will work best with a stream produced by the xml
52 exporter.
53 """
54
55 def __init__(self, where, options):
56 """
57 Initialize the Certification Transport.
58
59 The options string may contain 'secure_id' which must be
60 a 15-character (or longer) alphanumeric ID for the system.
61
62 It may also contain a submit_to_hexr boolean, set to 1
63 to enable submission to hexr.
64 """
65 super().__init__(where, options)
66 # Interpret this setting here
67 submit_to_hexr = self.options.get('submit_to_hexr')
68 self._submit_to_hexr = False
69 try:
70 if submit_to_hexr and (submit_to_hexr.lower() in
71 ('yes', 'true') or
72 int(submit_to_hexr) == 1):
73 self._submit_to_hexr = True
74 except ValueError:
75 # Just leave it at False
76 pass
77 self._secure_id = self.options.get('secure_id')
78 if self._secure_id is not None:
79 self._validate_secure_id(self._secure_id)
80
81 def send(self, data, config=None, session_state=None):
82 """
83 Sends data to the specified server.
84
85 :param data:
86 Data containing the xml dump to be sent to the server. This
87 can be either bytes or a file-like object (BytesIO works fine too).
88 If this is a file-like object, it will be read and streamed "on
89 the fly".
90 :param config:
91 Optional PlainBoxConfig object. If http_proxy and https_proxy
92 values are set in this config object, they will be used to send
93 data via the specified protocols. Note that the transport also
94 honors the http_proxy and https_proxy environment variables.
95 Proxy string format is http://[user:password@]<proxy-ip>:port
96 :param session_state:
97 The session for which this transport is associated with
98 the data being sent (optional)
99 :returns:
100 A dictionary with responses from the server if submission
101 was successful. This should contain an 'id' key, however
102 the server response may change, so the only guarantee
103 we make is that this will be non-False if the server
104 accepted the data. Returns empty dictionary otherwise.
105 :raises requests.exceptions.Timeout:
106 If sending timed out.
107 :raises requests.exceptions.ConnectionError:
108 If connection failed outright.
109 :raises requests.exceptions.HTTPError:
110 If the server returned a non-success result code
111 """
112 proxies = None
113 if config and config.environment is not Unset:
114 proxies = {
115 proto[:-len("_proxy")]: config.environment[proto]
116 for proto in ['http_proxy', 'https_proxy']
117 if proto in config.environment
118 }
119 # Find the effective value of secure_id:
120 # - use the configuration object (if available)
121 # - override with secure_id= option (if defined)
122 secure_id = None
123 if config is not None and hasattr(config, 'secure_id'):
124 secure_id = config.secure_id
125 if self._secure_id is not None:
126 secure_id = self._secure_id
127 if secure_id is None:
128 raise InvalidSecureIDError(_("Secure ID not specified"))
129 self._validate_secure_id(secure_id)
130 logger.debug(
131 _("Sending to %s, Secure ID is %s"), self.url, secure_id)
132 headers = {"X_HARDWARE_ID": secure_id}
133 # Similar handling for submit_to_hexr
134 submit_to_hexr = False
135 if config is not None and hasattr(config, 'submit_to_hexr'):
136 submit_to_hexr = config.submit_to_hexr
137 logger.debug(_("submit_to_hexr set to %s by config"),
138 submit_to_hexr)
139 if self._submit_to_hexr:
140 submit_to_hexr = self._submit_to_hexr
141 logger.debug(_("submit_to_hexr set to %s by UI"), submit_to_hexr)
142 # We could always set this header since hexr will only process a value
143 # of 'True', but this avoids injecting that extraneous knowledge into
144 # the tests.
145 # Note that hexr will only process a submission with this header's
146 # value set to 'True', so this boolean conversion should be ok.
147 if submit_to_hexr:
148 headers["X-Share-With-HEXR"] = submit_to_hexr
149
150 # Requests takes care of properly handling a file-like data.
151 form_payload = {"data": data}
152 try:
153 response = requests.post(
154 self.url, files=form_payload, headers=headers, proxies=proxies)
155 except requests.exceptions.Timeout as exc:
156 raise TransportError(
157 _("Request to {0} timed out: {1}").format(self.url, exc))
158 except requests.exceptions.InvalidSchema as exc:
159 raise TransportError(
160 _("Invalid destination URL: {0}").format(exc))
161 except requests.exceptions.ConnectionError as exc:
162 raise TransportError(
163 _("Unable to connect to {0}: {1}").format(self.url, exc))
164 if response is not None:
165 try:
166 # This will raise HTTPError for status != 20x
167 response.raise_for_status()
168 except requests.exceptions.RequestException as exc:
169 raise TransportError(str(exc))
170 logger.debug("Success! Server said %s", response.text)
171 try:
172 return response.json()
173 except Exception as exc:
174 raise TransportError(str(exc))
175
176 # ISessionStateTransport.send must return dictionary
177 return {}
178
179 def _validate_secure_id(self, secure_id):
180 if not re.match(SECURE_ID_PATTERN, secure_id):
181 raise InvalidSecureIDError(
182 _("secure_id must be 15-character (or more) alphanumeric string"))
183
184
185class SubmissionServiceTransport(TransportBase):44class SubmissionServiceTransport(TransportBase):
186 """45 """
187 Transport for sending data to certification database.46 Transport for sending data to certification database.
@@ -197,9 +56,6 @@ class SubmissionServiceTransport(TransportBase):
19756
198 The options string may contain 'secure_id' which must be57 The options string may contain 'secure_id' which must be
199 a 15-character (or longer) alphanumeric ID for the system.58 a 15-character (or longer) alphanumeric ID for the system.
200
201 It may also contain a submit_to_hexr boolean, set to 1
202 to enable submission to hexr.
203 """59 """
204 super().__init__(where, options)60 super().__init__(where, options)
205 self._secure_id = self.options.get('secure_id')61 self._secure_id = self.options.get('secure_id')
@@ -211,7 +67,7 @@ class SubmissionServiceTransport(TransportBase):
211 Sends data to the specified server.67 Sends data to the specified server.
21268
213 :param data:69 :param data:
214 Data containing the xml dump to be sent to the server. This70 Data containing the session dump to be sent to the server. This
215 can be either bytes or a file-like object (BytesIO works fine too).71 can be either bytes or a file-like object (BytesIO works fine too).
216 If this is a file-like object, it will be read and streamed "on72 If this is a file-like object, it will be read and streamed "on
217 the fly".73 the fly".
diff --git a/checkbox_ng/launcher/subcommands.py b/checkbox_ng/launcher/subcommands.py
index af8ce9c..ce5a2e6 100644
--- a/checkbox_ng/launcher/subcommands.py
+++ b/checkbox_ng/launcher/subcommands.py
@@ -98,19 +98,8 @@ class Submit(Command):
98 if ctx.args.staging:98 if ctx.args.staging:
99 url = ('https://certification.staging.canonical.com/'99 url = ('https://certification.staging.canonical.com/'
100 'api/v1/submission/{}/'.format(ctx.args.secure_id))100 'api/v1/submission/{}/'.format(ctx.args.secure_id))
101 if ctx.args.submission.endswith('xml'):101 from checkbox_ng.certification import SubmissionServiceTransport
102 from checkbox_ng.certification import CertificationTransport102 transport_cls = SubmissionServiceTransport
103 transport_cls = CertificationTransport
104 mode = 'r'
105 enc = 'utf-8'
106 url = ('https://certification.canonical.com/'
107 'submissions/submit/')
108 if ctx.args.staging:
109 url = ('https://certification.staging.canonical.com/'
110 'submissions/submit/')
111 else:
112 from checkbox_ng.certification import SubmissionServiceTransport
113 transport_cls = SubmissionServiceTransport
114 transport = transport_cls(url, options_string)103 transport = transport_cls(url, options_string)
115 try:104 try:
116 with open(ctx.args.submission, mode, encoding=enc) as subm_file:105 with open(ctx.args.submission, mode, encoding=enc) as subm_file:
@@ -587,24 +576,24 @@ class Launcher(Command, MainLoopStage):
587 self.launcher.reports['1_text_to_screen'] = {576 self.launcher.reports['1_text_to_screen'] = {
588 'transport': 'stdout', 'exporter': 'text', 'forced': 'yes'}577 'transport': 'stdout', 'exporter': 'text', 'forced': 'yes'}
589 elif report == 'certification':578 elif report == 'certification':
590 self.launcher.exporters['hexr'] = {579 self.launcher.exporters['tar'] = {
591 'unit': 'com.canonical.plainbox::hexr'}580 'unit': 'com.canonical.plainbox::tar'}
592 self.launcher.transports['c3'] = {581 self.launcher.transports['c3'] = {
593 'type': 'certification',582 'type': 'submission-service',
594 'secure_id': self.launcher.transports.get('c3', {}).get(583 'secure_id': self.launcher.transports.get('c3', {}).get(
595 'secure_id', None)}584 'secure_id', None)}
596 self.launcher.reports['upload to certification'] = {585 self.launcher.reports['upload to certification'] = {
597 'transport': 'c3', 'exporter': 'hexr'}586 'transport': 'c3', 'exporter': 'tar'}
598 elif report == 'certification-staging':587 elif report == 'certification-staging':
599 self.launcher.exporters['hexr'] = {588 self.launcher.exporters['tar'] = {
600 'unit': 'com.canonical.plainbox::hexr'}589 'unit': 'com.canonical.plainbox::tar'}
601 self.launcher.transports['c3-staging'] = {590 self.launcher.transports['c3-staging'] = {
602 'type': 'certification',591 'type': 'submission-service',
603 'secure_id': self.launcher.transports.get('c3', {}).get(592 'secure_id': self.launcher.transports.get('c3', {}).get(
604 'secure_id', None),593 'secure_id', None),
605 'staging': 'yes'}594 'staging': 'yes'}
606 self.launcher.reports['upload to certification-staging'] = {595 self.launcher.reports['upload to certification-staging'] = {
607 'transport': 'c3-staging', 'exporter': 'hexr'}596 'transport': 'c3-staging', 'exporter': 'tar'}
608 elif report == 'submission_files':597 elif report == 'submission_files':
609 # LP:1585326 maintain isoformat but removing ':' chars that cause598 # LP:1585326 maintain isoformat but removing ':' chars that cause
610 # issues when copying files.599 # issues when copying files.
@@ -612,7 +601,7 @@ class Launcher(Command, MainLoopStage):
612 timestamp = datetime.datetime.utcnow().strftime(isoformat)601 timestamp = datetime.datetime.utcnow().strftime(isoformat)
613 if not os.path.exists(self.base_dir):602 if not os.path.exists(self.base_dir):
614 os.makedirs(self.base_dir)603 os.makedirs(self.base_dir)
615 for exporter, file_ext in [('hexr', '.xml'), ('html', '.html'),604 for exporter, file_ext in [('html', '.html'),
616 ('junit', '.junit.xml'),605 ('junit', '.junit.xml'),
617 ('xlsx', '.xlsx'), ('tar', '.tar.xz')]:606 ('xlsx', '.xlsx'), ('tar', '.tar.xz')]:
618 path = os.path.join(self.base_dir, ''.join(607 path = os.path.join(self.base_dir, ''.join(
@@ -652,22 +641,6 @@ class Launcher(Command, MainLoopStage):
652 elif tr_type == 'stream':641 elif tr_type == 'stream':
653 self.transports[transport] = cls(642 self.transports[transport] = cls(
654 self.launcher.transports[transport]['stream'])643 self.launcher.transports[transport]['stream'])
655 elif tr_type == 'certification':
656 if self.launcher.transports[transport].get('staging', False):
657 url = ('https://certification.staging.canonical.com/'
658 'submissions/submit/')
659 else:
660 url = ('https://certification.canonical.com/'
661 'submissions/submit/')
662 secure_id = self.launcher.transports[transport].get(
663 'secure_id', None)
664 if not secure_id and self.is_interactive:
665 secure_id = input(self.C.BLUE(_('Enter secure-id:')))
666 if secure_id:
667 options = "secure_id={}".format(secure_id)
668 else:
669 options = ""
670 self.transports[transport] = cls(url, options)
671 elif tr_type == 'submission-service':644 elif tr_type == 'submission-service':
672 secure_id = self.launcher.transports[transport].get(645 secure_id = self.launcher.transports[transport].get(
673 'secure_id', None)646 'secure_id', None)
diff --git a/checkbox_ng/test_certification.py b/checkbox_ng/test_certification.py
index e2d558e..2c61bab 100644
--- a/checkbox_ng/test_certification.py
+++ b/checkbox_ng/test_certification.py
@@ -1,9 +1,10 @@
1# This file is part of Checkbox.1# This file is part of Checkbox.
2#2#
3# Copyright 2012, 2013 Canonical Ltd.3# Copyright 2012, 2017 Canonical Ltd.
4# Written by:4# Written by:
5# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>5# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
6# Daniel Manrique <roadmr@ubuntu.com>6# Daniel Manrique <roadmr@ubuntu.com>
7# Sylvain Pineau <sylvain.pineau@canonical.com>
7#8#
8# Checkbox is free software: you can redistribute it and/or modify9# Checkbox is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License version 3,10# it under the terms of the GNU General Public License version 3,
@@ -37,10 +38,10 @@ from plainbox.vendor.mock import MagicMock
37from requests.exceptions import ConnectionError, InvalidSchema, HTTPError38from requests.exceptions import ConnectionError, InvalidSchema, HTTPError
38import requests39import requests
3940
40from checkbox_ng.certification import CertificationTransport41from checkbox_ng.certification import SubmissionServiceTransport
4142
4243
43class CertificationTransportTests(TestCase):44class SubmissionServiceTransportTests(TestCase):
4445
45 # URL are just here to exemplify, since we mock away all network access,46 # URL are just here to exemplify, since we mock away all network access,
46 # they're not really used.47 # they're not really used.
@@ -51,39 +52,34 @@ class CertificationTransportTests(TestCase):
51 valid_option_string = "secure_id={}".format(valid_secure_id)52 valid_option_string = "secure_id={}".format(valid_secure_id)
5253
53 def setUp(self):54 def setUp(self):
54 self.sample_xml = BytesIO(resource_string(55 self.sample_archive = BytesIO(resource_string(
55 "plainbox", "test-data/xml-exporter/example-data.xml"56 "plainbox", "test-data/tar-exporter/example-data.tar.xz"
56 ))57 ))
57 self.patcher = mock.patch('requests.post')58 self.patcher = mock.patch('requests.post')
58 self.mock_requests = self.patcher.start()59 self.mock_requests = self.patcher.start()
5960
60 def test_parameter_parsing(self):61 def test_parameter_parsing(self):
61 # Makes sense since I'm overriding the base class's constructor.62 # Makes sense since I'm overriding the base class's constructor.
62 transport = CertificationTransport(63 transport = SubmissionServiceTransport(
63 self.valid_url, self.valid_option_string)64 self.valid_url, self.valid_option_string)
64 self.assertEqual(self.valid_url, transport.url)65 self.assertEqual(self.valid_url, transport.url)
65 self.assertEqual(self.valid_secure_id,66 self.assertEqual(self.valid_secure_id,
66 transport.options['secure_id'])67 transport.options['secure_id'])
6768
68 def test_submit_to_hexr_interpretation(self):
69 transport = CertificationTransport(
70 self.valid_url, "submit_to_hexr=1")
71 self.assertTrue(transport._submit_to_hexr is True)
72
73 def test_invalid_length_secure_id_are_rejected(self):69 def test_invalid_length_secure_id_are_rejected(self):
74 length = 1470 length = 14
75 dummy_id = "a" * length71 dummy_id = "a" * length
76 option_string = "secure_id={}".format(dummy_id)72 option_string = "secure_id={}".format(dummy_id)
77 with self.assertRaises(InvalidSecureIDError):73 with self.assertRaises(InvalidSecureIDError):
78 CertificationTransport(self.valid_url, option_string)74 SubmissionServiceTransport(self.valid_url, option_string)
7975
80 def test_invalid_characters_in_secure_id_are_rejected(self):76 def test_invalid_characters_in_secure_id_are_rejected(self):
81 option_string = "secure_id=aA0#"77 option_string = "secure_id=aA0#"
82 with self.assertRaises(InvalidSecureIDError):78 with self.assertRaises(InvalidSecureIDError):
83 CertificationTransport(self.valid_url, option_string)79 SubmissionServiceTransport(self.valid_url, option_string)
8480
85 def test_invalid_url(self):81 def test_invalid_url(self):
86 transport = CertificationTransport(82 transport = SubmissionServiceTransport(
87 self.invalid_url, self.valid_option_string)83 self.invalid_url, self.valid_option_string)
88 dummy_data = BytesIO(b"some data to send")84 dummy_data = BytesIO(b"some data to send")
89 requests.post.side_effect = InvalidSchema85 requests.post.side_effect = InvalidSchema
@@ -92,12 +88,11 @@ class CertificationTransportTests(TestCase):
92 result = transport.send(dummy_data)88 result = transport.send(dummy_data)
93 self.assertIsNotNone(result)89 self.assertIsNotNone(result)
94 requests.post.assert_called_with(90 requests.post.assert_called_with(
95 self.invalid_url, files={'data': dummy_data},91 self.invalid_url, data=dummy_data, proxies=None)
96 headers={'X_HARDWARE_ID': self.valid_secure_id}, proxies=None)
9792
98 @mock.patch('checkbox_ng.certification.logger')93 @mock.patch('checkbox_ng.certification.logger')
99 def test_valid_url_cant_connect(self, mock_logger):94 def test_valid_url_cant_connect(self, mock_logger):
100 transport = CertificationTransport(95 transport = SubmissionServiceTransport(
101 self.unreachable_url, self.valid_option_string)96 self.unreachable_url, self.valid_option_string)
102 dummy_data = BytesIO(b"some data to send")97 dummy_data = BytesIO(b"some data to send")
103 requests.post.side_effect = ConnectionError98 requests.post.side_effect = ConnectionError
@@ -105,37 +100,20 @@ class CertificationTransportTests(TestCase):
105 result = transport.send(dummy_data)100 result = transport.send(dummy_data)
106 self.assertIsNotNone(result)101 self.assertIsNotNone(result)
107 requests.post.assert_called_with(self.unreachable_url,102 requests.post.assert_called_with(self.unreachable_url,
108 files={'data': dummy_data},103 data=dummy_data,
109 headers={'X_HARDWARE_ID':
110 self.valid_secure_id},
111 proxies=None)
112
113 @mock.patch('checkbox_ng.certification.logger')
114 def test_share_with_hexr_header_sent(self, mock_logger):
115 transport = CertificationTransport(
116 self.valid_url, self.valid_option_string+",submit_to_hexr=1")
117 dummy_data = BytesIO(b"some data to send")
118 result = transport.send(dummy_data)
119 self.assertIsNotNone(result)
120 requests.post.assert_called_with(self.valid_url,
121 files={'data': dummy_data},
122 headers={'X_HARDWARE_ID':
123 self.valid_secure_id,
124 'X-Share-With-HEXR':
125 True},
126 proxies=None)104 proxies=None)
127105
128 def test_send_success(self):106 def test_send_success(self):
129 transport = CertificationTransport(107 transport = SubmissionServiceTransport(
130 self.valid_url, self.valid_option_string)108 self.valid_url, self.valid_option_string)
131 requests.post.return_value = MagicMock(name='response')109 requests.post.return_value = MagicMock(name='response')
132 requests.post.return_value.status_code = 200110 requests.post.return_value.status_code = 200
133 requests.post.return_value.text = '{"id": 768}'111 requests.post.return_value.text = '{"id": 768}'
134 result = transport.send(self.sample_xml)112 result = transport.send(self.sample_archive)
135 self.assertTrue(result)113 self.assertTrue(result)
136114
137 def test_send_failure(self):115 def test_send_failure(self):
138 transport = CertificationTransport(116 transport = SubmissionServiceTransport(
139 self.valid_url, self.valid_option_string)117 self.valid_url, self.valid_option_string)
140 requests.post.return_value = MagicMock(name='response')118 requests.post.return_value = MagicMock(name='response')
141 requests.post.return_value.status_code = 412119 requests.post.return_value.status_code = 412
@@ -145,7 +123,7 @@ class CertificationTransportTests(TestCase):
145 requests.post.return_value.raise_for_status = MagicMock(123 requests.post.return_value.raise_for_status = MagicMock(
146 side_effect=HTTPError)124 side_effect=HTTPError)
147 with self.assertRaises(TransportError):125 with self.assertRaises(TransportError):
148 transport.send(self.sample_xml)126 transport.send(self.sample_archive)
149127
150 def proxy_test(self, environment, proxies):128 def proxy_test(self, environment, proxies):
151 test_environment = environment129 test_environment = environment
@@ -153,7 +131,7 @@ class CertificationTransportTests(TestCase):
153 test_config = PlainBoxConfig()131 test_config = PlainBoxConfig()
154 test_config.environment = test_environment132 test_config.environment = test_environment
155133
156 transport = CertificationTransport(134 transport = SubmissionServiceTransport(
157 self.valid_url, self.valid_option_string)135 self.valid_url, self.valid_option_string)
158 dummy_data = BytesIO(b"some data to send")136 dummy_data = BytesIO(b"some data to send")
159137
@@ -163,8 +141,7 @@ class CertificationTransportTests(TestCase):
163 result = transport.send(dummy_data, config=test_config)141 result = transport.send(dummy_data, config=test_config)
164 self.assertTrue(result)142 self.assertTrue(result)
165 requests.post.assert_called_with(143 requests.post.assert_called_with(
166 self.valid_url, files={'data': dummy_data},144 self.valid_url, data=dummy_data,
167 headers={'X_HARDWARE_ID': self.valid_secure_id},
168 proxies=test_proxies)145 proxies=test_proxies)
169146
170 def test_set_only_one_proxy(self):147 def test_set_only_one_proxy(self):
diff --git a/contrib/com.canonical.certification.PlainBox1.service b/contrib/com.canonical.certification.PlainBox1.service
171deleted file mode 100644148deleted file mode 100644
index a40cf65..0000000
--- a/contrib/com.canonical.certification.PlainBox1.service
+++ /dev/null
@@ -1,3 +0,0 @@
1[D-BUS Service]
2Name=com.canonical.certification.PlainBox1
3Exec=/usr/bin/checkbox service
diff --git a/docs/conf.py b/docs/conf.py
index 970bfc7..58b6dba 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -24,9 +24,7 @@ else:
24 # Inject mock modules so that we can build the24 # Inject mock modules so that we can build the
25 # documentation without having the real stuff available25 # documentation without having the real stuff available
26 from plainbox.vendor import mock26 from plainbox.vendor import mock
27 for mod_name in ['lxml', 'xlsxwriter', 'dbus', 'dbus.lowlevel',27 for mod_name in ['xlsxwriter']:
28 'dbus.exceptions', 'dbus._compat', 'dbus.service',
29 '_dbus_bindings']:
30 sys.modules[mod_name] = mock.Mock()28 sys.modules[mod_name] = mock.Mock()
31 print("Mocked {}".format(mod_name))29 print("Mocked {}".format(mod_name))
32try:30try:
diff --git a/docs/index.rst b/docs/index.rst
index 844f14f..ea4a5df 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -31,24 +31,6 @@ or newer.
3131
32 $ sudo add-apt-repository ppa:hardware-certification/public && sudo apt-get update && sudo apt-get install checkbox-ng32 $ sudo add-apt-repository ppa:hardware-certification/public && sudo apt-get update && sudo apt-get install checkbox-ng
3333
34Running stable release update tests
35^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36
37Checkbox has special support for running stable release updates tests in an
38automated manner. This runs all the jobs from the *sru.test plan* and sends the
39results to the certification website.
40
41To run SRU tests you will need to know the so-called :term:`Secure ID` of the
42device you are testing. Once you know that all you need to do is run:
43
44.. code-block:: bash
45
46 $ checkbox sru $secure_id submission.xml
47
48The second argument, submission.xml, is a name of the fallback file that is
49only created when sending the data to the certification website fails to work
50for any reason.
51
52Table of contents34Table of contents
53=================35=================
5436
diff --git a/docs/launcher-tutorial.rst b/docs/launcher-tutorial.rst
index 74dcf0d..d6dd71d 100644
--- a/docs/launcher-tutorial.rst
+++ b/docs/launcher-tutorial.rst
@@ -99,7 +99,7 @@ number of the stock ones. In launchers version 1 there are 4 stock reports you
99may use:99may use:
100100
101 * ``text`` - print results as text on standard output101 * ``text`` - print results as text on standard output
102 * ``submission_files`` - write ``html``, ``xlsx``, ``json`` and ``xml``102 * ``submission_files`` - write ``html``, ``xlsx``, ``json`` and ``tar.xz``
103 files to ``$XDG_DATA_HOME`` directory (or to ``~/.local/share/`` if103 files to ``$XDG_DATA_HOME`` directory (or to ``~/.local/share/`` if
104 ``$XDG_DATA_HOME`` is not defined.104 ``$XDG_DATA_HOME`` is not defined.
105 * ``certification`` - send results to certification site105 * ``certification`` - send results to certification site
@@ -485,7 +485,7 @@ report to standard output.
485 exporter = text485 exporter = text
486486
4872) Interactive testing of FooBar project. Report should be uploaded to the4872) Interactive testing of FooBar project. Report should be uploaded to the
488staging version of certification site and saved to /tmp/submission.xml488staging version of certification site and saved to /tmp/submission.tar.xz
489489
490::490::
491491
@@ -512,15 +512,12 @@ staging version of certification site and saved to /tmp/submission.xml
512512
513 [transport:local_file]513 [transport:local_file]
514 type = file514 type = file
515 path = /tmp/submission.xml515 path = /tmp/submission.tar.xz
516
517 [exporter:xml]
518 unit = com.canonical.plainbox::hexr
519516
520 [report:c3-staging]517 [report:c3-staging]
521 transport = outfile518 transport = certification
522 exporter = xml519 exporter = tar
523520
524 [report:file]521 [report:file]
525 transport = local_file522 transport = local_file
526 exporter = xml523 exporter = tar
diff --git a/docs/stack.rst b/docs/stack.rst
index 7e8a6aa..8e36841 100644
--- a/docs/stack.rst
+++ b/docs/stack.rst
@@ -71,11 +71,9 @@ Component Descriptions
71| Checkbox (CLI) | - The python command-line interface | Application |71| Checkbox (CLI) | - The python command-line interface | Application |
72| | | |72| | | |
73| | - the text user interface | |73| | - the text user interface | |
74| | - the SRU testing command | |
75| | | |74| | | |
76| | - Additional certification APIs | |75| | - Additional certification APIs | |
77| | | |76| | | |
78| | - sending data to Launchpad | |
79| | - sending data to HEXR | |77| | - sending data to HEXR | |
80+------------------------+---------------------------------------+-------------+78+------------------------+---------------------------------------+-------------+
81| Client Certification | - canonical-certification-client | Provider |79| Client Certification | - canonical-certification-client | Provider |
@@ -107,7 +105,7 @@ Component Descriptions
107| | - Trusted launcher | |105| | - Trusted launcher | |
108| | - Dependency resolver | |106| | - Dependency resolver | |
109| | - Command line handling | |107| | - Command line handling | |
110| | - The XML, HTML and XSLX exporters | |108| | - The HTML and XSLX exporters | |
111| | - and more... | |109| | - and more... | |
112| | | |110| | | |
113| | - Provider development toolkit | |111| | - Provider development toolkit | |
diff --git a/requirements/deb-core.txt b/requirements/deb-core.txt
index 5806499..18a7ef6 100644
--- a/requirements/deb-core.txt
+++ b/requirements/deb-core.txt
@@ -1,2 +1 @@
1python3-guacamole1python3-guacamole
2python3-lxml
diff --git a/requirements/deb-dbus.txt b/requirements/deb-dbus.txt
3deleted file mode 1006442deleted file mode 100644
index a1d5df0..0000000
--- a/requirements/deb-dbus.txt
+++ /dev/null
@@ -1 +0,0 @@
1python3-dbus
diff --git a/requirements/pip-dbus.txt b/requirements/pip-dbus.txt
2deleted file mode 1006440deleted file mode 100644
index 43e3c72..0000000
--- a/requirements/pip-dbus.txt
+++ /dev/null
@@ -1 +0,0 @@
1funcsigs==0.3
diff --git a/requirements/rpm-dbus.txt b/requirements/rpm-dbus.txt
2deleted file mode 1006440deleted file mode 100644
index a1d5df0..0000000
--- a/requirements/rpm-dbus.txt
+++ /dev/null
@@ -1 +0,0 @@
1python3-dbus
diff --git a/setup.py b/setup.py
index 2b7bfaa..ac86e70 100755
--- a/setup.py
+++ b/setup.py
@@ -70,8 +70,6 @@ setup(
70 'checkbox-cli=checkbox_ng.launcher.checkbox_cli:main',70 'checkbox-cli=checkbox_ng.launcher.checkbox_cli:main',
71 ],71 ],
72 'plainbox.transport': [72 'plainbox.transport': [
73 'certification='
74 'checkbox_ng.certification:CertificationTransport',
75 'submission-service='73 'submission-service='
76 'checkbox_ng.certification:SubmissionServiceTransport',74 'checkbox_ng.certification:SubmissionServiceTransport',
77 ],75 ],

Subscribers

People subscribed via source and target branches