Merge ~kzapalowicz/snappy-hwe-snaps/+git/engineering-tests:fix/udisks2-default-interfaces into ~snappy-hwe-team/snappy-hwe-snaps/+git/udisks2:master

Proposed by Konrad Zapałowicz
Status: Superseded
Proposed branch: ~kzapalowicz/snappy-hwe-snaps/+git/engineering-tests:fix/udisks2-default-interfaces
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/udisks2:master
Diff against target: 4097 lines (+3780/-0) (has conflicts)
50 files modified
.ci_tests_disabled (+1/-0)
.gitignore (+7/-0)
COPYING (+674/-0)
MAINTAINERS (+4/-0)
README.md (+61/-0)
bin/plainbox-wrapper (+3/-0)
bin/run-bluez-tests (+5/-0)
bin/run-modem-manager-tests (+5/-0)
bin/run-network-manager-tests (+5/-0)
bin/run-pulseaudio-tests (+5/-0)
bin/run-tests (+5/-0)
bin/run-tpm-tests (+5/-0)
bin/run-udisks2-tests (+5/-0)
bin/run-wifi-ap-tests (+5/-0)
bin/run-wireless-tools-tests (+5/-0)
bluez/manage.py (+10/-0)
bluez/units/desktop.pxu (+142/-0)
bluez/units/general.pxu (+302/-0)
bluez/units/hid.pxu (+83/-0)
bluez/units/setup.pxu (+140/-0)
captive-redirect/manage.py (+10/-0)
captive-redirect/units/captive-redirect.pxu (+102/-0)
media-hub/manage.py (+10/-0)
media-hub/units/media-hub-snap.pxu (+73/-0)
media-hub/units/media-hub.pxu (+65/-0)
modem-manager/manage.py (+10/-0)
modem-manager/units/modem-manager.pxu (+103/-0)
network-manager/manage.py (+10/-0)
network-manager/units/network-manager.pxu (+325/-0)
network-manager/units/power_management.pxu (+31/-0)
network-manager/units/snap.pxu (+101/-0)
network-manager/units/wireless.pxu (+54/-0)
pulseaudio/manage.py (+10/-0)
pulseaudio/units/pulseaudio.pxu (+106/-0)
snapcraft.yaml (+123/-0)
tpm/manage.py (+10/-0)
tpm/units/tpm.pxu (+135/-0)
udisks2/manage.py (+10/-0)
udisks2/units/udisks2.pxu (+319/-0)
upower/manage.py (+10/-0)
upower/units/00_general.pxu (+52/-0)
upower/units/10_battery_powered.pxu (+129/-0)
upower/units/20_ac_powered.pxu (+49/-0)
wifi-ap/manage.py (+10/-0)
wifi-ap/units/wifi-ap.pxu (+158/-0)
wireless-tools/manage.py (+10/-0)
wireless-tools/units/wireless-tools.pxu (+100/-0)
wpa-supplicant/manage.py (+10/-0)
wpa-supplicant/units/00_general.pxu (+99/-0)
wpa-supplicant/units/10_network_manager.pxu (+74/-0)
Conflict in .gitignore
Conflict in MAINTAINERS
Conflict in README.md
Conflict in snapcraft.yaml
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Review via email: mp+325385@code.launchpad.net

This proposal has been superseded by a proposal from 2017-06-09.

Description of the change

udisks2: add network-bind interface connection

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Unmerged commits

ac6b7f0... by =?utf-8?q?Konrad_Zapa=C5=82owicz?= <email address hidden>

udisks2: add network-bind interface connection

2a176cd... by System Enablement CI Bot <email address hidden>

Merge remote tracking branch feature/add-test-for-ethernet-enablement

Merge-Proposal: https://code.launchpad.net/~morphis/snappy-hwe-snaps/+git/engineering-tests/+merge/317753

8a5cf9d... by Simon Fels

Fix typo

204e9ab... by Simon Fels

Add pack accidentially dropped crash test

11f4e65... by Simon Fels

Be more precise for a few network-manager test cases

c96d66f... by Simon Fels

Add precondition test case which checks for WoL support

0fca020... by Simon Fels

Add test case for network-manager to go through ethernet enablement

b8a4cad... by System Enablement CI Bot <email address hidden>

Merge remote tracking branch feature/udisks2-add-debug-tests

Merge-Proposal: https://code.launchpad.net/~kzapalowicz/snappy-hwe-snaps/+git/engineering-tests/+merge/324848

9c83a17... by =?utf-8?q?Konrad_Zapa=C5=82owicz?= <email address hidden>

udisks2: remove note that is not valid anymore

The https://bugs.launchpad.net/snapd/+bug/1636934 is fixed and released
with snapd 2.24 therefore a note related to this bug is not valid
anymore. This commit removes it.

ec2322c... by =?utf-8?q?Konrad_Zapa=C5=82owicz?= <email address hidden>

udisks2: add tests for debug option

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.ci_tests_disabled b/.ci_tests_disabled
2new file mode 100644
3index 0000000..b7db254
4--- /dev/null
5+++ b/.ci_tests_disabled
6@@ -0,0 +1 @@
7+# Empty
8diff --git a/.gitignore b/.gitignore
9index e4e2149..6a1f796 100644
10--- a/.gitignore
11+++ b/.gitignore
12@@ -1,5 +1,12 @@
13+<<<<<<< .gitignore
14 *.snap
15 *source.tar.bz2
16 parts
17 prime
18 stage
19+=======
20+canonical-se-engineering-tests_*.snap
21+parts/
22+prime/
23+stage/
24+>>>>>>> .gitignore
25diff --git a/COPYING b/COPYING
26new file mode 100644
27index 0000000..94a9ed0
28--- /dev/null
29+++ b/COPYING
30@@ -0,0 +1,674 @@
31+ GNU GENERAL PUBLIC LICENSE
32+ Version 3, 29 June 2007
33+
34+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
35+ Everyone is permitted to copy and distribute verbatim copies
36+ of this license document, but changing it is not allowed.
37+
38+ Preamble
39+
40+ The GNU General Public License is a free, copyleft license for
41+software and other kinds of works.
42+
43+ The licenses for most software and other practical works are designed
44+to take away your freedom to share and change the works. By contrast,
45+the GNU General Public License is intended to guarantee your freedom to
46+share and change all versions of a program--to make sure it remains free
47+software for all its users. We, the Free Software Foundation, use the
48+GNU General Public License for most of our software; it applies also to
49+any other work released this way by its authors. You can apply it to
50+your programs, too.
51+
52+ When we speak of free software, we are referring to freedom, not
53+price. Our General Public Licenses are designed to make sure that you
54+have the freedom to distribute copies of free software (and charge for
55+them if you wish), that you receive source code or can get it if you
56+want it, that you can change the software or use pieces of it in new
57+free programs, and that you know you can do these things.
58+
59+ To protect your rights, we need to prevent others from denying you
60+these rights or asking you to surrender the rights. Therefore, you have
61+certain responsibilities if you distribute copies of the software, or if
62+you modify it: responsibilities to respect the freedom of others.
63+
64+ For example, if you distribute copies of such a program, whether
65+gratis or for a fee, you must pass on to the recipients the same
66+freedoms that you received. You must make sure that they, too, receive
67+or can get the source code. And you must show them these terms so they
68+know their rights.
69+
70+ Developers that use the GNU GPL protect your rights with two steps:
71+(1) assert copyright on the software, and (2) offer you this License
72+giving you legal permission to copy, distribute and/or modify it.
73+
74+ For the developers' and authors' protection, the GPL clearly explains
75+that there is no warranty for this free software. For both users' and
76+authors' sake, the GPL requires that modified versions be marked as
77+changed, so that their problems will not be attributed erroneously to
78+authors of previous versions.
79+
80+ Some devices are designed to deny users access to install or run
81+modified versions of the software inside them, although the manufacturer
82+can do so. This is fundamentally incompatible with the aim of
83+protecting users' freedom to change the software. The systematic
84+pattern of such abuse occurs in the area of products for individuals to
85+use, which is precisely where it is most unacceptable. Therefore, we
86+have designed this version of the GPL to prohibit the practice for those
87+products. If such problems arise substantially in other domains, we
88+stand ready to extend this provision to those domains in future versions
89+of the GPL, as needed to protect the freedom of users.
90+
91+ Finally, every program is threatened constantly by software patents.
92+States should not allow patents to restrict development and use of
93+software on general-purpose computers, but in those that do, we wish to
94+avoid the special danger that patents applied to a free program could
95+make it effectively proprietary. To prevent this, the GPL assures that
96+patents cannot be used to render the program non-free.
97+
98+ The precise terms and conditions for copying, distribution and
99+modification follow.
100+
101+ TERMS AND CONDITIONS
102+
103+ 0. Definitions.
104+
105+ "This License" refers to version 3 of the GNU General Public License.
106+
107+ "Copyright" also means copyright-like laws that apply to other kinds of
108+works, such as semiconductor masks.
109+
110+ "The Program" refers to any copyrightable work licensed under this
111+License. Each licensee is addressed as "you". "Licensees" and
112+"recipients" may be individuals or organizations.
113+
114+ To "modify" a work means to copy from or adapt all or part of the work
115+in a fashion requiring copyright permission, other than the making of an
116+exact copy. The resulting work is called a "modified version" of the
117+earlier work or a work "based on" the earlier work.
118+
119+ A "covered work" means either the unmodified Program or a work based
120+on the Program.
121+
122+ To "propagate" a work means to do anything with it that, without
123+permission, would make you directly or secondarily liable for
124+infringement under applicable copyright law, except executing it on a
125+computer or modifying a private copy. Propagation includes copying,
126+distribution (with or without modification), making available to the
127+public, and in some countries other activities as well.
128+
129+ To "convey" a work means any kind of propagation that enables other
130+parties to make or receive copies. Mere interaction with a user through
131+a computer network, with no transfer of a copy, is not conveying.
132+
133+ An interactive user interface displays "Appropriate Legal Notices"
134+to the extent that it includes a convenient and prominently visible
135+feature that (1) displays an appropriate copyright notice, and (2)
136+tells the user that there is no warranty for the work (except to the
137+extent that warranties are provided), that licensees may convey the
138+work under this License, and how to view a copy of this License. If
139+the interface presents a list of user commands or options, such as a
140+menu, a prominent item in the list meets this criterion.
141+
142+ 1. Source Code.
143+
144+ The "source code" for a work means the preferred form of the work
145+for making modifications to it. "Object code" means any non-source
146+form of a work.
147+
148+ A "Standard Interface" means an interface that either is an official
149+standard defined by a recognized standards body, or, in the case of
150+interfaces specified for a particular programming language, one that
151+is widely used among developers working in that language.
152+
153+ The "System Libraries" of an executable work include anything, other
154+than the work as a whole, that (a) is included in the normal form of
155+packaging a Major Component, but which is not part of that Major
156+Component, and (b) serves only to enable use of the work with that
157+Major Component, or to implement a Standard Interface for which an
158+implementation is available to the public in source code form. A
159+"Major Component", in this context, means a major essential component
160+(kernel, window system, and so on) of the specific operating system
161+(if any) on which the executable work runs, or a compiler used to
162+produce the work, or an object code interpreter used to run it.
163+
164+ The "Corresponding Source" for a work in object code form means all
165+the source code needed to generate, install, and (for an executable
166+work) run the object code and to modify the work, including scripts to
167+control those activities. However, it does not include the work's
168+System Libraries, or general-purpose tools or generally available free
169+programs which are used unmodified in performing those activities but
170+which are not part of the work. For example, Corresponding Source
171+includes interface definition files associated with source files for
172+the work, and the source code for shared libraries and dynamically
173+linked subprograms that the work is specifically designed to require,
174+such as by intimate data communication or control flow between those
175+subprograms and other parts of the work.
176+
177+ The Corresponding Source need not include anything that users
178+can regenerate automatically from other parts of the Corresponding
179+Source.
180+
181+ The Corresponding Source for a work in source code form is that
182+same work.
183+
184+ 2. Basic Permissions.
185+
186+ All rights granted under this License are granted for the term of
187+copyright on the Program, and are irrevocable provided the stated
188+conditions are met. This License explicitly affirms your unlimited
189+permission to run the unmodified Program. The output from running a
190+covered work is covered by this License only if the output, given its
191+content, constitutes a covered work. This License acknowledges your
192+rights of fair use or other equivalent, as provided by copyright law.
193+
194+ You may make, run and propagate covered works that you do not
195+convey, without conditions so long as your license otherwise remains
196+in force. You may convey covered works to others for the sole purpose
197+of having them make modifications exclusively for you, or provide you
198+with facilities for running those works, provided that you comply with
199+the terms of this License in conveying all material for which you do
200+not control copyright. Those thus making or running the covered works
201+for you must do so exclusively on your behalf, under your direction
202+and control, on terms that prohibit them from making any copies of
203+your copyrighted material outside their relationship with you.
204+
205+ Conveying under any other circumstances is permitted solely under
206+the conditions stated below. Sublicensing is not allowed; section 10
207+makes it unnecessary.
208+
209+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
210+
211+ No covered work shall be deemed part of an effective technological
212+measure under any applicable law fulfilling obligations under article
213+11 of the WIPO copyright treaty adopted on 20 December 1996, or
214+similar laws prohibiting or restricting circumvention of such
215+measures.
216+
217+ When you convey a covered work, you waive any legal power to forbid
218+circumvention of technological measures to the extent such circumvention
219+is effected by exercising rights under this License with respect to
220+the covered work, and you disclaim any intention to limit operation or
221+modification of the work as a means of enforcing, against the work's
222+users, your or third parties' legal rights to forbid circumvention of
223+technological measures.
224+
225+ 4. Conveying Verbatim Copies.
226+
227+ You may convey verbatim copies of the Program's source code as you
228+receive it, in any medium, provided that you conspicuously and
229+appropriately publish on each copy an appropriate copyright notice;
230+keep intact all notices stating that this License and any
231+non-permissive terms added in accord with section 7 apply to the code;
232+keep intact all notices of the absence of any warranty; and give all
233+recipients a copy of this License along with the Program.
234+
235+ You may charge any price or no price for each copy that you convey,
236+and you may offer support or warranty protection for a fee.
237+
238+ 5. Conveying Modified Source Versions.
239+
240+ You may convey a work based on the Program, or the modifications to
241+produce it from the Program, in the form of source code under the
242+terms of section 4, provided that you also meet all of these conditions:
243+
244+ a) The work must carry prominent notices stating that you modified
245+ it, and giving a relevant date.
246+
247+ b) The work must carry prominent notices stating that it is
248+ released under this License and any conditions added under section
249+ 7. This requirement modifies the requirement in section 4 to
250+ "keep intact all notices".
251+
252+ c) You must license the entire work, as a whole, under this
253+ License to anyone who comes into possession of a copy. This
254+ License will therefore apply, along with any applicable section 7
255+ additional terms, to the whole of the work, and all its parts,
256+ regardless of how they are packaged. This License gives no
257+ permission to license the work in any other way, but it does not
258+ invalidate such permission if you have separately received it.
259+
260+ d) If the work has interactive user interfaces, each must display
261+ Appropriate Legal Notices; however, if the Program has interactive
262+ interfaces that do not display Appropriate Legal Notices, your
263+ work need not make them do so.
264+
265+ A compilation of a covered work with other separate and independent
266+works, which are not by their nature extensions of the covered work,
267+and which are not combined with it such as to form a larger program,
268+in or on a volume of a storage or distribution medium, is called an
269+"aggregate" if the compilation and its resulting copyright are not
270+used to limit the access or legal rights of the compilation's users
271+beyond what the individual works permit. Inclusion of a covered work
272+in an aggregate does not cause this License to apply to the other
273+parts of the aggregate.
274+
275+ 6. Conveying Non-Source Forms.
276+
277+ You may convey a covered work in object code form under the terms
278+of sections 4 and 5, provided that you also convey the
279+machine-readable Corresponding Source under the terms of this License,
280+in one of these ways:
281+
282+ a) Convey the object code in, or embodied in, a physical product
283+ (including a physical distribution medium), accompanied by the
284+ Corresponding Source fixed on a durable physical medium
285+ customarily used for software interchange.
286+
287+ b) Convey the object code in, or embodied in, a physical product
288+ (including a physical distribution medium), accompanied by a
289+ written offer, valid for at least three years and valid for as
290+ long as you offer spare parts or customer support for that product
291+ model, to give anyone who possesses the object code either (1) a
292+ copy of the Corresponding Source for all the software in the
293+ product that is covered by this License, on a durable physical
294+ medium customarily used for software interchange, for a price no
295+ more than your reasonable cost of physically performing this
296+ conveying of source, or (2) access to copy the
297+ Corresponding Source from a network server at no charge.
298+
299+ c) Convey individual copies of the object code with a copy of the
300+ written offer to provide the Corresponding Source. This
301+ alternative is allowed only occasionally and noncommercially, and
302+ only if you received the object code with such an offer, in accord
303+ with subsection 6b.
304+
305+ d) Convey the object code by offering access from a designated
306+ place (gratis or for a charge), and offer equivalent access to the
307+ Corresponding Source in the same way through the same place at no
308+ further charge. You need not require recipients to copy the
309+ Corresponding Source along with the object code. If the place to
310+ copy the object code is a network server, the Corresponding Source
311+ may be on a different server (operated by you or a third party)
312+ that supports equivalent copying facilities, provided you maintain
313+ clear directions next to the object code saying where to find the
314+ Corresponding Source. Regardless of what server hosts the
315+ Corresponding Source, you remain obligated to ensure that it is
316+ available for as long as needed to satisfy these requirements.
317+
318+ e) Convey the object code using peer-to-peer transmission, provided
319+ you inform other peers where the object code and Corresponding
320+ Source of the work are being offered to the general public at no
321+ charge under subsection 6d.
322+
323+ A separable portion of the object code, whose source code is excluded
324+from the Corresponding Source as a System Library, need not be
325+included in conveying the object code work.
326+
327+ A "User Product" is either (1) a "consumer product", which means any
328+tangible personal property which is normally used for personal, family,
329+or household purposes, or (2) anything designed or sold for incorporation
330+into a dwelling. In determining whether a product is a consumer product,
331+doubtful cases shall be resolved in favor of coverage. For a particular
332+product received by a particular user, "normally used" refers to a
333+typical or common use of that class of product, regardless of the status
334+of the particular user or of the way in which the particular user
335+actually uses, or expects or is expected to use, the product. A product
336+is a consumer product regardless of whether the product has substantial
337+commercial, industrial or non-consumer uses, unless such uses represent
338+the only significant mode of use of the product.
339+
340+ "Installation Information" for a User Product means any methods,
341+procedures, authorization keys, or other information required to install
342+and execute modified versions of a covered work in that User Product from
343+a modified version of its Corresponding Source. The information must
344+suffice to ensure that the continued functioning of the modified object
345+code is in no case prevented or interfered with solely because
346+modification has been made.
347+
348+ If you convey an object code work under this section in, or with, or
349+specifically for use in, a User Product, and the conveying occurs as
350+part of a transaction in which the right of possession and use of the
351+User Product is transferred to the recipient in perpetuity or for a
352+fixed term (regardless of how the transaction is characterized), the
353+Corresponding Source conveyed under this section must be accompanied
354+by the Installation Information. But this requirement does not apply
355+if neither you nor any third party retains the ability to install
356+modified object code on the User Product (for example, the work has
357+been installed in ROM).
358+
359+ The requirement to provide Installation Information does not include a
360+requirement to continue to provide support service, warranty, or updates
361+for a work that has been modified or installed by the recipient, or for
362+the User Product in which it has been modified or installed. Access to a
363+network may be denied when the modification itself materially and
364+adversely affects the operation of the network or violates the rules and
365+protocols for communication across the network.
366+
367+ Corresponding Source conveyed, and Installation Information provided,
368+in accord with this section must be in a format that is publicly
369+documented (and with an implementation available to the public in
370+source code form), and must require no special password or key for
371+unpacking, reading or copying.
372+
373+ 7. Additional Terms.
374+
375+ "Additional permissions" are terms that supplement the terms of this
376+License by making exceptions from one or more of its conditions.
377+Additional permissions that are applicable to the entire Program shall
378+be treated as though they were included in this License, to the extent
379+that they are valid under applicable law. If additional permissions
380+apply only to part of the Program, that part may be used separately
381+under those permissions, but the entire Program remains governed by
382+this License without regard to the additional permissions.
383+
384+ When you convey a copy of a covered work, you may at your option
385+remove any additional permissions from that copy, or from any part of
386+it. (Additional permissions may be written to require their own
387+removal in certain cases when you modify the work.) You may place
388+additional permissions on material, added by you to a covered work,
389+for which you have or can give appropriate copyright permission.
390+
391+ Notwithstanding any other provision of this License, for material you
392+add to a covered work, you may (if authorized by the copyright holders of
393+that material) supplement the terms of this License with terms:
394+
395+ a) Disclaiming warranty or limiting liability differently from the
396+ terms of sections 15 and 16 of this License; or
397+
398+ b) Requiring preservation of specified reasonable legal notices or
399+ author attributions in that material or in the Appropriate Legal
400+ Notices displayed by works containing it; or
401+
402+ c) Prohibiting misrepresentation of the origin of that material, or
403+ requiring that modified versions of such material be marked in
404+ reasonable ways as different from the original version; or
405+
406+ d) Limiting the use for publicity purposes of names of licensors or
407+ authors of the material; or
408+
409+ e) Declining to grant rights under trademark law for use of some
410+ trade names, trademarks, or service marks; or
411+
412+ f) Requiring indemnification of licensors and authors of that
413+ material by anyone who conveys the material (or modified versions of
414+ it) with contractual assumptions of liability to the recipient, for
415+ any liability that these contractual assumptions directly impose on
416+ those licensors and authors.
417+
418+ All other non-permissive additional terms are considered "further
419+restrictions" within the meaning of section 10. If the Program as you
420+received it, or any part of it, contains a notice stating that it is
421+governed by this License along with a term that is a further
422+restriction, you may remove that term. If a license document contains
423+a further restriction but permits relicensing or conveying under this
424+License, you may add to a covered work material governed by the terms
425+of that license document, provided that the further restriction does
426+not survive such relicensing or conveying.
427+
428+ If you add terms to a covered work in accord with this section, you
429+must place, in the relevant source files, a statement of the
430+additional terms that apply to those files, or a notice indicating
431+where to find the applicable terms.
432+
433+ Additional terms, permissive or non-permissive, may be stated in the
434+form of a separately written license, or stated as exceptions;
435+the above requirements apply either way.
436+
437+ 8. Termination.
438+
439+ You may not propagate or modify a covered work except as expressly
440+provided under this License. Any attempt otherwise to propagate or
441+modify it is void, and will automatically terminate your rights under
442+this License (including any patent licenses granted under the third
443+paragraph of section 11).
444+
445+ However, if you cease all violation of this License, then your
446+license from a particular copyright holder is reinstated (a)
447+provisionally, unless and until the copyright holder explicitly and
448+finally terminates your license, and (b) permanently, if the copyright
449+holder fails to notify you of the violation by some reasonable means
450+prior to 60 days after the cessation.
451+
452+ Moreover, your license from a particular copyright holder is
453+reinstated permanently if the copyright holder notifies you of the
454+violation by some reasonable means, this is the first time you have
455+received notice of violation of this License (for any work) from that
456+copyright holder, and you cure the violation prior to 30 days after
457+your receipt of the notice.
458+
459+ Termination of your rights under this section does not terminate the
460+licenses of parties who have received copies or rights from you under
461+this License. If your rights have been terminated and not permanently
462+reinstated, you do not qualify to receive new licenses for the same
463+material under section 10.
464+
465+ 9. Acceptance Not Required for Having Copies.
466+
467+ You are not required to accept this License in order to receive or
468+run a copy of the Program. Ancillary propagation of a covered work
469+occurring solely as a consequence of using peer-to-peer transmission
470+to receive a copy likewise does not require acceptance. However,
471+nothing other than this License grants you permission to propagate or
472+modify any covered work. These actions infringe copyright if you do
473+not accept this License. Therefore, by modifying or propagating a
474+covered work, you indicate your acceptance of this License to do so.
475+
476+ 10. Automatic Licensing of Downstream Recipients.
477+
478+ Each time you convey a covered work, the recipient automatically
479+receives a license from the original licensors, to run, modify and
480+propagate that work, subject to this License. You are not responsible
481+for enforcing compliance by third parties with this License.
482+
483+ An "entity transaction" is a transaction transferring control of an
484+organization, or substantially all assets of one, or subdividing an
485+organization, or merging organizations. If propagation of a covered
486+work results from an entity transaction, each party to that
487+transaction who receives a copy of the work also receives whatever
488+licenses to the work the party's predecessor in interest had or could
489+give under the previous paragraph, plus a right to possession of the
490+Corresponding Source of the work from the predecessor in interest, if
491+the predecessor has it or can get it with reasonable efforts.
492+
493+ You may not impose any further restrictions on the exercise of the
494+rights granted or affirmed under this License. For example, you may
495+not impose a license fee, royalty, or other charge for exercise of
496+rights granted under this License, and you may not initiate litigation
497+(including a cross-claim or counterclaim in a lawsuit) alleging that
498+any patent claim is infringed by making, using, selling, offering for
499+sale, or importing the Program or any portion of it.
500+
501+ 11. Patents.
502+
503+ A "contributor" is a copyright holder who authorizes use under this
504+License of the Program or a work on which the Program is based. The
505+work thus licensed is called the contributor's "contributor version".
506+
507+ A contributor's "essential patent claims" are all patent claims
508+owned or controlled by the contributor, whether already acquired or
509+hereafter acquired, that would be infringed by some manner, permitted
510+by this License, of making, using, or selling its contributor version,
511+but do not include claims that would be infringed only as a
512+consequence of further modification of the contributor version. For
513+purposes of this definition, "control" includes the right to grant
514+patent sublicenses in a manner consistent with the requirements of
515+this License.
516+
517+ Each contributor grants you a non-exclusive, worldwide, royalty-free
518+patent license under the contributor's essential patent claims, to
519+make, use, sell, offer for sale, import and otherwise run, modify and
520+propagate the contents of its contributor version.
521+
522+ In the following three paragraphs, a "patent license" is any express
523+agreement or commitment, however denominated, not to enforce a patent
524+(such as an express permission to practice a patent or covenant not to
525+sue for patent infringement). To "grant" such a patent license to a
526+party means to make such an agreement or commitment not to enforce a
527+patent against the party.
528+
529+ If you convey a covered work, knowingly relying on a patent license,
530+and the Corresponding Source of the work is not available for anyone
531+to copy, free of charge and under the terms of this License, through a
532+publicly available network server or other readily accessible means,
533+then you must either (1) cause the Corresponding Source to be so
534+available, or (2) arrange to deprive yourself of the benefit of the
535+patent license for this particular work, or (3) arrange, in a manner
536+consistent with the requirements of this License, to extend the patent
537+license to downstream recipients. "Knowingly relying" means you have
538+actual knowledge that, but for the patent license, your conveying the
539+covered work in a country, or your recipient's use of the covered work
540+in a country, would infringe one or more identifiable patents in that
541+country that you have reason to believe are valid.
542+
543+ If, pursuant to or in connection with a single transaction or
544+arrangement, you convey, or propagate by procuring conveyance of, a
545+covered work, and grant a patent license to some of the parties
546+receiving the covered work authorizing them to use, propagate, modify
547+or convey a specific copy of the covered work, then the patent license
548+you grant is automatically extended to all recipients of the covered
549+work and works based on it.
550+
551+ A patent license is "discriminatory" if it does not include within
552+the scope of its coverage, prohibits the exercise of, or is
553+conditioned on the non-exercise of one or more of the rights that are
554+specifically granted under this License. You may not convey a covered
555+work if you are a party to an arrangement with a third party that is
556+in the business of distributing software, under which you make payment
557+to the third party based on the extent of your activity of conveying
558+the work, and under which the third party grants, to any of the
559+parties who would receive the covered work from you, a discriminatory
560+patent license (a) in connection with copies of the covered work
561+conveyed by you (or copies made from those copies), or (b) primarily
562+for and in connection with specific products or compilations that
563+contain the covered work, unless you entered into that arrangement,
564+or that patent license was granted, prior to 28 March 2007.
565+
566+ Nothing in this License shall be construed as excluding or limiting
567+any implied license or other defenses to infringement that may
568+otherwise be available to you under applicable patent law.
569+
570+ 12. No Surrender of Others' Freedom.
571+
572+ If conditions are imposed on you (whether by court order, agreement or
573+otherwise) that contradict the conditions of this License, they do not
574+excuse you from the conditions of this License. If you cannot convey a
575+covered work so as to satisfy simultaneously your obligations under this
576+License and any other pertinent obligations, then as a consequence you may
577+not convey it at all. For example, if you agree to terms that obligate you
578+to collect a royalty for further conveying from those to whom you convey
579+the Program, the only way you could satisfy both those terms and this
580+License would be to refrain entirely from conveying the Program.
581+
582+ 13. Use with the GNU Affero General Public License.
583+
584+ Notwithstanding any other provision of this License, you have
585+permission to link or combine any covered work with a work licensed
586+under version 3 of the GNU Affero General Public License into a single
587+combined work, and to convey the resulting work. The terms of this
588+License will continue to apply to the part which is the covered work,
589+but the special requirements of the GNU Affero General Public License,
590+section 13, concerning interaction through a network will apply to the
591+combination as such.
592+
593+ 14. Revised Versions of this License.
594+
595+ The Free Software Foundation may publish revised and/or new versions of
596+the GNU General Public License from time to time. Such new versions will
597+be similar in spirit to the present version, but may differ in detail to
598+address new problems or concerns.
599+
600+ Each version is given a distinguishing version number. If the
601+Program specifies that a certain numbered version of the GNU General
602+Public License "or any later version" applies to it, you have the
603+option of following the terms and conditions either of that numbered
604+version or of any later version published by the Free Software
605+Foundation. If the Program does not specify a version number of the
606+GNU General Public License, you may choose any version ever published
607+by the Free Software Foundation.
608+
609+ If the Program specifies that a proxy can decide which future
610+versions of the GNU General Public License can be used, that proxy's
611+public statement of acceptance of a version permanently authorizes you
612+to choose that version for the Program.
613+
614+ Later license versions may give you additional or different
615+permissions. However, no additional obligations are imposed on any
616+author or copyright holder as a result of your choosing to follow a
617+later version.
618+
619+ 15. Disclaimer of Warranty.
620+
621+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
622+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
623+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
624+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
625+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
626+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
627+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
628+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
629+
630+ 16. Limitation of Liability.
631+
632+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
633+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
634+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
635+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
636+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
637+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
638+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
639+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
640+SUCH DAMAGES.
641+
642+ 17. Interpretation of Sections 15 and 16.
643+
644+ If the disclaimer of warranty and limitation of liability provided
645+above cannot be given local legal effect according to their terms,
646+reviewing courts shall apply local law that most closely approximates
647+an absolute waiver of all civil liability in connection with the
648+Program, unless a warranty or assumption of liability accompanies a
649+copy of the Program in return for a fee.
650+
651+ END OF TERMS AND CONDITIONS
652+
653+ How to Apply These Terms to Your New Programs
654+
655+ If you develop a new program, and you want it to be of the greatest
656+possible use to the public, the best way to achieve this is to make it
657+free software which everyone can redistribute and change under these terms.
658+
659+ To do so, attach the following notices to the program. It is safest
660+to attach them to the start of each source file to most effectively
661+state the exclusion of warranty; and each file should have at least
662+the "copyright" line and a pointer to where the full notice is found.
663+
664+ <one line to give the program's name and a brief idea of what it does.>
665+ Copyright (C) <year> <name of author>
666+
667+ This program is free software: you can redistribute it and/or modify
668+ it under the terms of the GNU General Public License as published by
669+ the Free Software Foundation, either version 3 of the License, or
670+ (at your option) any later version.
671+
672+ This program is distributed in the hope that it will be useful,
673+ but WITHOUT ANY WARRANTY; without even the implied warranty of
674+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
675+ GNU General Public License for more details.
676+
677+ You should have received a copy of the GNU General Public License
678+ along with this program. If not, see <http://www.gnu.org/licenses/>.
679+
680+Also add information on how to contact you by electronic and paper mail.
681+
682+ If the program does terminal interaction, make it output a short
683+notice like this when it starts in an interactive mode:
684+
685+ <program> Copyright (C) <year> <name of author>
686+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
687+ This is free software, and you are welcome to redistribute it
688+ under certain conditions; type `show c' for details.
689+
690+The hypothetical commands `show w' and `show c' should show the appropriate
691+parts of the General Public License. Of course, your program's commands
692+might be different; for a GUI interface, you would use an "about box".
693+
694+ You should also get your employer (if you work as a programmer) or school,
695+if any, to sign a "copyright disclaimer" for the program, if necessary.
696+For more information on this, and how to apply and follow the GNU GPL, see
697+<http://www.gnu.org/licenses/>.
698+
699+ The GNU General Public License does not permit incorporating your program
700+into proprietary programs. If your program is a subroutine library, you
701+may consider it more useful to permit linking proprietary applications with
702+the library. If this is what you want to do, use the GNU Lesser General
703+Public License instead of this License. But first, please read
704+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
705diff --git a/MAINTAINERS b/MAINTAINERS
706index 9129131..d10c926 100644
707--- a/MAINTAINERS
708+++ b/MAINTAINERS
709@@ -1,2 +1,6 @@
710+<<<<<<< MAINTAINERS
711 Scott Sweeny <scott.sweeny@canonical.com>
712+=======
713+Jim Hodapp <jim.hodapp@canonical.com>
714+>>>>>>> MAINTAINERS
715 Simon Fels <simon.fels@canonical.com>
716diff --git a/README.md b/README.md
717index 1f4edc9..2c565a0 100644
718--- a/README.md
719+++ b/README.md
720@@ -1,3 +1,4 @@
721+<<<<<<< README.md
722 # Udisks
723
724 This is the snap package for the Udisks storage management service.
725@@ -11,3 +12,63 @@ This snap is capable of automounting removable drives, but this capability is tu
726 To disable it run
727
728 $ snap set udisks2 automount.enable=false
729+=======
730+# canonical-se-engineering-tests
731+
732+Engineering tests for the System Enablement team
733+
734+## What is this?
735+
736+A snap providing a set of tests to verify functionality of
737+the snaps produced by the System Enablement team at Canonical.
738+
739+It currently covers test cases for the following snaps
740+
741+ * bluez
742+ * modem-manager
743+ * network-manager
744+ * tpm1.2
745+ * wifi-ap
746+
747+## How can I run the tests?
748+
749+First you have to install the current version of the snap from
750+the public Ubuntu store or take a self built one.
751+
752+ $ sudo snap install canonical-se-engineering-tests
753+
754+Also make sure to install the prerequisite snap packages before
755+running the tests:
756+
757+ $ sudo snap install bluez modem-manager network-manager
758+
759+TODO The media-hub framework is not yet snapified. Instructions need to
760+be added here when that happens.
761+
762+Afterwards you have new commands available in /snap/bin you
763+can use to run all available test cases. The first command
764+runs all of the tests and the other ones run individual test
765+categories related to the command's name.
766+
767+ $ /snap/bin/canonical-se-engineering-tests.run
768+ $ /snap/bin/canonical-se-engineering-tests.bluez
769+ $ /snap/bin/canonical-se-engineering-tests.modem-manager
770+ $ /snap/bin/canonical-se-engineering-tests.network-manager
771+ $ /snap/bin/canonical-se-engineering-tests.tpm1-2
772+ $ /snap/bin/canonical-se-engineering-tests.wifi-ap
773+ $ /snap/bin/canonical-se-engineering-tests.media-hub
774+
775+## How can I contribute new tests?
776+
777+If you want to add tests you can get a introduction in the
778+underlying framework plainbox on its documentation website
779+at https://plainbox.readthedocs.io/en/latest/
780+
781+All tests are currently stored in the subdirectory tests/unit
782+of this git repository. We currently add a single .pxu file
783+per snap but this can easily change when necessary.
784+
785+Once you've implemented your tests you can send them for
786+inclusion as merge proposal against the launchpad git
787+repository lp:~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests
788+>>>>>>> README.md
789diff --git a/bin/plainbox-wrapper b/bin/plainbox-wrapper
790new file mode 100755
791index 0000000..444a758
792--- /dev/null
793+++ b/bin/plainbox-wrapper
794@@ -0,0 +1,3 @@
795+#!/bin/sh
796+export PATH="$PATH:$SNAP/usr/sbin"
797+exec python3 $(which plainbox) "$@"
798diff --git a/bin/run-bluez-tests b/bin/run-bluez-tests
799new file mode 100755
800index 0000000..fa2d908
801--- /dev/null
802+++ b/bin/run-bluez-tests
803@@ -0,0 +1,5 @@
804+#!/bin/sh
805+export PATH="$PATH:$SNAP/usr/sbin"
806+exec python3 $(which plainbox) \
807+ run -i '2016.com.canonical.bluez::bluez.*' \
808+ "$@"
809diff --git a/bin/run-modem-manager-tests b/bin/run-modem-manager-tests
810new file mode 100755
811index 0000000..02fea4b
812--- /dev/null
813+++ b/bin/run-modem-manager-tests
814@@ -0,0 +1,5 @@
815+#!/bin/sh
816+export PATH="$PATH:$SNAP/usr/sbin"
817+exec python3 $(which plainbox) \
818+ run -i '2016.com.canonical.modem-manager::modem_manager.*' \
819+ "$@"
820diff --git a/bin/run-network-manager-tests b/bin/run-network-manager-tests
821new file mode 100755
822index 0000000..7f90af1
823--- /dev/null
824+++ b/bin/run-network-manager-tests
825@@ -0,0 +1,5 @@
826+#!/bin/sh
827+export PATH="$PATH:$SNAP/usr/sbin"
828+exec python3 $(which plainbox) \
829+ run -i '2016.com.canonical.network-manager::network_manager.*' \
830+ "$@"
831diff --git a/bin/run-pulseaudio-tests b/bin/run-pulseaudio-tests
832new file mode 100755
833index 0000000..4e0b088
834--- /dev/null
835+++ b/bin/run-pulseaudio-tests
836@@ -0,0 +1,5 @@
837+#!/bin/sh
838+export PATH="$PATH:$SNAP/usr/sbin"
839+exec python3 $(which plainbox) \
840+ run -i '2016.com.canonical.pulseaudio::pulseaudio.*' \
841+ "$@"
842diff --git a/bin/run-tests b/bin/run-tests
843new file mode 100755
844index 0000000..bac4db2
845--- /dev/null
846+++ b/bin/run-tests
847@@ -0,0 +1,5 @@
848+#!/bin/sh
849+export PATH="$PATH:$SNAP/usr/sbin"
850+exec python3 $(which plainbox) \
851+ run -i '2016.com.canonical.system-enablement::.*' \
852+ "$@"
853diff --git a/bin/run-tpm-tests b/bin/run-tpm-tests
854new file mode 100755
855index 0000000..ea48ca1
856--- /dev/null
857+++ b/bin/run-tpm-tests
858@@ -0,0 +1,5 @@
859+#!/bin/sh
860+export PATH="$PATH:$SNAP/usr/sbin"
861+exec python3 $(which plainbox) \
862+ run -i '2016.com.canonical.tpm::tpm.*' \
863+ "$@"
864diff --git a/bin/run-udisks2-tests b/bin/run-udisks2-tests
865new file mode 100755
866index 0000000..5d5c73e
867--- /dev/null
868+++ b/bin/run-udisks2-tests
869@@ -0,0 +1,5 @@
870+#!/bin/sh
871+export PATH="$PATH:$SNAP/usr/sbin"
872+exec python3 $(which plainbox) \
873+ run -i '2017.com.canonical.udisks2::udisks2.*' \
874+ "$@"
875diff --git a/bin/run-wifi-ap-tests b/bin/run-wifi-ap-tests
876new file mode 100755
877index 0000000..0d7dce0
878--- /dev/null
879+++ b/bin/run-wifi-ap-tests
880@@ -0,0 +1,5 @@
881+#!/bin/sh
882+export PATH="$PATH:$SNAP/usr/sbin"
883+exec python3 $(which plainbox) \
884+ run -i '2016.com.canonical.wifi-ap::wifi_ap.*' \
885+ "$@"
886diff --git a/bin/run-wireless-tools-tests b/bin/run-wireless-tools-tests
887new file mode 100755
888index 0000000..69f5769
889--- /dev/null
890+++ b/bin/run-wireless-tools-tests
891@@ -0,0 +1,5 @@
892+#!/bin/sh
893+export PATH="$PATH:$SNAP/usr/sbin"
894+exec python3 $(which plainbox) \
895+ run -i '2016.com.canonical.wireless-tools::wireless-tools.*' \
896+ "$@"
897diff --git a/bluez/manage.py b/bluez/manage.py
898new file mode 100755
899index 0000000..78b0dbd
900--- /dev/null
901+++ b/bluez/manage.py
902@@ -0,0 +1,10 @@
903+#!/usr/bin/env python3
904+from plainbox.provider_manager import setup, N_
905+
906+setup(
907+ name='plainbox-provider-bluez',
908+ namespace='2016.com.canonical.bluez',
909+ version="1.0",
910+ description=N_("Plainbox provider for the BlueZ snap"),
911+ gettext_domain="2016_com_canonical_bluez",
912+)
913diff --git a/bluez/units/desktop.pxu b/bluez/units/desktop.pxu
914new file mode 100644
915index 0000000..0075fa5
916--- /dev/null
917+++ b/bluez/units/desktop.pxu
918@@ -0,0 +1,142 @@
919+# Copyright (C) 2017 Canonical, Ltd.
920+# All rights reserved.
921+#
922+# Written by:
923+# Matteo Croce <matteo.croce@canonical.com>
924+
925+id: bluez/setup/enabled_on_boot_desktop
926+category_id: bluez
927+_description: Ensure that Bluetooth is enabled on boot
928+plugin: manual
929+_steps:
930+ 1. Power on the PC
931+ 2. If Bluetooth isn't enabled on first boot, enable it and reboot
932+_verification:
933+ 1. Go to System Settings->Bluetooth
934+ 2. Check that Bluetooth kill-switch is "on"
935+ 3. Look at Bluetooth indicator: verify it is active and Bluetooth kill switch is "on"
936+ 4. Verify that Bluetooth is still enabled
937+
938+id: bluez/setup/discoverable_by_default_desktop
939+category_id: bluez
940+_description: Ensure that device is discoverable by default
941+plugin: manual
942+_steps:
943+ 1. Power on the PC
944+ 2. Goto System Settings->Bluetooth
945+_verification:
946+ In Ubuntu Touch devices the 'discoverable' option should be enabled by default,
947+ in desktop devices it should not
948+
949+id: bluez/setup/bt_name_correct_desktop
950+category_id: bluez
951+_description: Ensure that the Bluetooth device name is correct
952+plugin: manual
953+_steps:
954+ 1. Power on the PC
955+_verification:
956+ 1. Go to System Settings->Bluetooth
957+ 2. Verify that the Bluetooth device name is correct:
958+ is set to the Ubuntu Touch device name, eg. could be BQ Aquaris E4.5 on Ubuntu Touch,
959+ or to the hostname for desktop
960+
961+id: bluez/connection/device_cycle
962+category_id: bluez
963+_description: Verify that devices will reconnect after power cycle
964+plugin: manual
965+_steps:
966+ 1. Go to Unity Control Center
967+ 2. Click Search for devices
968+ 3. Put the gadget in pairing mode
969+ 4. Select the gadget from the list and click pair
970+ 5. Power off the device
971+ 6. Power on the device
972+_verification:
973+ 1. Verify that the paired device will reconnect automatically,
974+ eg. it appears bold in the list
975+
976+id: bluez/connection/device_disconnect
977+category_id: bluez
978+_description: Verify that the connected device can be disconnected
979+depends: bluez/connection/device_cycle
980+plugin: manual
981+_steps:
982+ 1. Pair a device with a computer
983+ 2. Remove the pairing
984+ 3. Pair the device a second time
985+_verification:
986+ 1. Verify that the device can connect again
987+
988+id: bluez/connection/pc_reboot
989+category_id: bluez
990+_description: Verify that devices will reconnect after reboot
991+depends: bluez/connection/device_cycle
992+plugin: manual
993+_steps:
994+ 1. Pair a device with the computer
995+ 2. Reboot the computer
996+_verification:
997+ 1. Verify that the paired device will reconnect after rebooting it
998+
999+id: bluez/connection/device_discard
1000+category_id: bluez
1001+_description: Verify that the paired device can be forgotten
1002+depends: bluez/connection/device_cycle
1003+plugin: manual
1004+_steps:
1005+ 1. Pair a device with the computer
1006+ 2. Remove the pairing
1007+_verification:
1008+ 1. Verify that the paired device no longer appears in the devices list,
1009+ eg. it's NOT listed in bold in Unity Control Center
1010+
1011+id: bluez/connection/no_connect_discarded
1012+category_id: bluez
1013+_description: Verify that a discarded device don't connect
1014+depends: bluez/connection/device_cycle
1015+plugin: manual
1016+_steps:
1017+ 1. Pair a device with the computer
1018+ 2. Remove the pairing
1019+_verification:
1020+ 1. Verify that the paired device no longer connects
1021+
1022+id: bluez/connection/device_readd
1023+category_id: bluez
1024+_description: Verify that a discarded device can be paired again
1025+depends: bluez/connection/device_cycle
1026+plugin: manual
1027+_steps:
1028+ 1. Pair a device with the computer
1029+ 2. Remove the pairing
1030+ 4. Pair the device again
1031+_verification:
1032+ 1. Ensure that the device can connect
1033+
1034+id: bluez/discoverable/pc_not_discoverable
1035+category_id: bluez
1036+_description: Verify that the PC can disable discovery
1037+plugin: manual
1038+_steps:
1039+ 1. Toggle the PC Bluetooth visibility off
1040+_verification:
1041+ 1. Ensure that the PC can't be discovered from any other device
1042+
1043+id: bluez/discoverable/pc_discoverable
1044+category_id: bluez
1045+_description: Verify that the PC can enable discovery
1046+plugin: manual
1047+_steps:
1048+ 1. Toggle the visibility on
1049+ 2. Do a Bluetooth scan from another device, eg. a smartphone
1050+_verification:
1051+ 1. Ensure that the PC can be discovered from the other device
1052+
1053+id: bluez/setup/ensure_interface_connection_setup_desktop
1054+category_id: bluez
1055+_description: Ensure that the bluez interface is connected
1056+plugin: manual
1057+_verification:
1058+ Open a text editor and make sure you can type text from the HID keyboard
1059+ into the text box. If testing a mouse, ensure that the cursor moves when
1060+ moving your HID mouse.
1061diff --git a/bluez/units/general.pxu b/bluez/units/general.pxu
1062new file mode 100644
1063index 0000000..18b8b52
1064--- /dev/null
1065+++ b/bluez/units/general.pxu
1066@@ -0,0 +1,302 @@
1067+# Copyright (C) 2017 Canonical, Ltd.
1068+# All rights reserved.
1069+#
1070+# Written by:
1071+# Jim Hodapp <jim.hodapp@canonical.com>
1072+# Matteo Croce <matteo.croce@canonical.com>
1073+
1074+unit: category
1075+id: bluez
1076+_name: BlueZ
1077+
1078+id: bluez/setup/enabled_on_boot
1079+category_id: bluez
1080+_description: Ensure that Bluetooth is enabled on boot
1081+plugin: manual
1082+_steps:
1083+ 1. Power on the Device Under Test
1084+ 2. If Bluetooth isn't enabled on first boot, enable it and reboot
1085+ 3. Use bluetoothctl to check if there is an active adapter
1086+ .
1087+ $ bluetoothctl
1088+_verification:
1089+ 1. Check that there is a Controller in the output, eg.
1090+ [NEW] Controller 00:10:20:30:40:50 pi [default]
1091+
1092+id: bluez/scan/start_inquiry
1093+category_id: bluez
1094+_description: Verify that found gadgets are reported during an ongoing device discovery
1095+plugin: manual
1096+_steps:
1097+ 1. Turn Bluetooth on on a gadget and make it discoverable
1098+ 2. Use bluetoothctl to start a device scan:
1099+ .
1100+ $ bluetoothctl
1101+ [bluetooth]# scan on
1102+ [bluetooth]# devices
1103+ .
1104+_verification:
1105+ You should see the gadget listed after the local adapter:
1106+ Device XX:XX:XX:XX:XX:XX My Device
1107+ [NEW] Device 04:52:C7:0D:0C:03 QC 35s
1108+
1109+id: bluez/scan/stop_inquiry
1110+category_id: bluez
1111+_description: Verify that gadgets are not found with scan disabled
1112+plugin: manual
1113+_steps:
1114+ 1. Use bluetoothctl to start stop the device scan
1115+ .
1116+ $ bluetoothctl
1117+ [bluetooth]# scan off
1118+ .
1119+ 2. Turn bluetooth on on a gadget and make it discoverable
1120+ 3. Use bluetoothctl to get the devices list
1121+ .
1122+ $ bluetoothctl
1123+ [bluetooth]# devices
1124+ .
1125+_verification:
1126+ You should only see the local adapter in the list
1127+ Device XX:XX:XX:XX:XX:XX My Device
1128+
1129+id: bluez/pairing/can_be_enabled
1130+category_id: bluez
1131+_description: Verify that the device pairing works
1132+plugin: manual
1133+_steps:
1134+ 1. Use bluetoothctl to enable pairing
1135+ .
1136+ $ bluetoothctl
1137+ [bluetooth]# pairable on
1138+ .
1139+ 2. Pair the Device Under Test from a gadget
1140+_verification:
1141+ 1. You should be able to do the pairing
1142+
1143+id: bluez/pairing/can_be_disabled
1144+category_id: bluez
1145+_description: Verify that the pairing can be disabled
1146+plugin: manual
1147+_steps:
1148+ 1. Use bluetoothctl to disable pairing
1149+ .
1150+ $ bluetoothctl
1151+ [bluetooth]# pairable off
1152+ .
1153+ 2. Pair the Device Under Test from a gadget
1154+_verification:
1155+ 1. You shouldn't be able to do the pairing
1156+
1157+id: bluez/setup/discoverable_by_default
1158+category_id: bluez
1159+_description: Ensure that Device Under Test is discoverable by default
1160+plugin: manual
1161+_steps:
1162+ 1. Type:
1163+ .
1164+ $ bluetoothctl
1165+ [bluetooth]# show
1166+ 2. Scan for devices from a smartphone
1167+_verification:
1168+ 1. Verify that the Device Under Test is discoverable by default, eg.
1169+ .
1170+ $ bluetoothctl
1171+ [bluetooth]# show
1172+ .
1173+ contains the "Discoverable: yes" line
1174+ 2. Check that the Device Under Test can be discovered on the smartphone
1175+
1176+id: bluez/setup/bt_name_correct
1177+category_id: bluez
1178+_description: Ensure that the Bluetooth Device Under Test name is correct
1179+plugin: manual
1180+_steps:
1181+ 1. Type:
1182+ .
1183+ $ bluetoothctl
1184+ [bluetooth]# show
1185+_verification:
1186+ 1. Verify that the Bluetooth Device Under Test name is correct: equals to the Ubuntu Touch
1187+ device name, eg. could be BQ Aquaris E4.5 on Ubuntu Touch,
1188+ or to the hostname for desktop
1189+ .
1190+ Name: Ubuntu
1191+
1192+id: bluez/setup/bt_name_correct_from_gadget
1193+category_id: bluez
1194+_description: Ensure that the Bluetooth Device Under Test name advertise correctly
1195+plugin: manual
1196+_steps:
1197+ 1. Scan for devices from a smartphone
1198+_verification:
1199+ 1. Verify that the Bluetooth Device Under Test name is correct as seen from an external device
1200+
1201+id: bluez/connection/gadget_reconnect_after_power_cycle
1202+category_id: bluez
1203+_description: Verify that gadgets will reconnect after power cycle
1204+plugin: manual
1205+_steps:
1206+ 1. Connect a gadget with the Device Under Test:
1207+ .
1208+ $ bluetoothctl
1209+ bluetooth]# scan on
1210+ Discovery started
1211+ [NEW] Device 01:02:03:04:05:06 device
1212+ [bluetooth]# pair 01:02:03:04:05:06
1213+ Pairing successful
1214+ [bluetooth]# trust 01:02:03:04:05:06
1215+ Trusted
1216+ [bluetooth]# connect 01:02:03:04:05:06
1217+ .
1218+ 2. Power off the gadget
1219+ 3. Power on the gadget
1220+_verification:
1221+ 1. Verify that the paired gadget will reconnect automatically
1222+ .
1223+ $ bluetoothctl
1224+ bluetooth]# info 01:02:03:04:05:06
1225+ .
1226+ and check for "Connected: Yes"
1227+
1228+id: bluez/connection/reconnect_after_dut_reboot
1229+category_id: bluez
1230+_description: Verify that gadgets will reconnect after reboot
1231+plugin: manual
1232+depends: bluez/connection/gadget_reconnect_after_power_cycle
1233+_steps:
1234+ 1. Pair a gadget with the Device Under Test
1235+ 2. Reboot the Device Under Test
1236+_verification:
1237+ 1. Verify that the paired gadget will reconnect after reboot
1238+
1239+id: bluez/connection/gadget_disconnect
1240+category_id: bluez
1241+_description: Verify that the connected gadget can be disconnected
1242+plugin: manual
1243+depends: bluez/connection/gadget_reconnect_after_power_cycle
1244+_steps:
1245+ 1. Connect a gadget with the Device Under Test
1246+ 2. Disconnect it with:
1247+ .
1248+ $ bluetoothctl
1249+ [bluetooth]# disconnect 01:02:03:04:05:06
1250+ .
1251+_verification:
1252+ 1. Verify that the gadget is disconnected
1253+ .
1254+ $ bluetoothctl
1255+ bluetooth]# info 01:02:03:04:05:06
1256+ .
1257+ and check for "Connected: no"
1258+
1259+id: bluez/connection/gadget_can_be_forgotten
1260+category_id: bluez
1261+_description: Verify that the paired gadget can be forgotten
1262+plugin: manual
1263+depends: bluez/connection/gadget_reconnect_after_power_cycle
1264+_steps:
1265+ 1. Pair a gadget with the Device Under Test
1266+ 2. Remove the pairing
1267+ .
1268+ $ bluetoothctl
1269+ [bluetooth]# remove 01:02:03:04:05:06
1270+_verification:
1271+ 1. Verify that the paired gadget no longer appears in the gadgets list
1272+ .
1273+ $ bluetoothctl
1274+ bluetooth]# info 01:02:03:04:05:06
1275+ .
1276+ and check for "Paired: no"
1277+
1278+id: bluez/connection/gadget_paired_again
1279+category_id: bluez
1280+_description: Verify that forgotten gadgets can be paired again
1281+plugin: manual
1282+depends: bluez/connection/gadget_can_be_forgotten
1283+_steps:
1284+ 1. Pair a gadget with the Device Under Test
1285+ 2. Remove the pairing
1286+ 4. Pair the gadget a second time
1287+_verification:
1288+ 1. Ensure that the gadget be paired again:
1289+ .
1290+ $ bluetoothctl
1291+ bluetooth]# info 01:02:03:04:05:06
1292+ .
1293+ and check for "Paired: yes"
1294+
1295+id: bluez/discoverable/dut_not_discoverable
1296+category_id: bluez
1297+_description: Verify that the Device Under Test can disable discovery
1298+plugin: manual
1299+_steps:
1300+ 1. Toggle the Device Under Test Bluetooth visibility off:
1301+ .
1302+ $ bluetoothctl
1303+ bluetooth]# discoverable off
1304+ .
1305+_verification:
1306+ 1. Ensure that the Device Under Test can't be discovered from any other gadget
1307+
1308+id: bluez/discoverable/dut_discoverable
1309+category_id: bluez
1310+_description: Verify that the Device Under Test can enable discovery
1311+plugin: manual
1312+_steps:
1313+ 1. Toggle the Device Under Test Bluetooth visibility on
1314+ .
1315+ $ bluetoothctl
1316+ bluetooth]# discoverable on
1317+ .
1318+_verification:
1319+ 1. Ensure that the Device Under Test can be discovered from other gadgets
1320+
1321+id: bluez/audio/a2dp_ubuntu_classic
1322+category_id: bluez
1323+plugin: manual
1324+depends: bluez/connection/pair_and_connect
1325+_summary: Stream audio to Bluetooth headset
1326+_purpose:
1327+ Verify that you can stream music to a Bluetooth headset via A2DP on Ubuntu
1328+ Classic. Note: Skip this test if not running Ubuntu Classic
1329+_steps:
1330+ 1. Follow the previous tests to list, pair and connect your headset
1331+ Navigate to the Sound panel in System Settings, select your headset device
1332+ in the Output tab, and make sure that Mode is set to A2DP
1333+ Then press the Test Sound button and test each speaker
1334+_verification:
1335+ Verify that you can hear the test sound "Front left", "Front right" in each
1336+ speaker respectively.
1337+
1338+id: bluez/audio/a2dp_disconnect
1339+category_id: bluez
1340+plugin: manual
1341+depends: bluez/audio/a2dp_ubuntu_classic
1342+_summary: Disconnect Bluetooth headset
1343+_purpose:
1344+ Verify that you can disconnect Bluetooth headset while streaming and audio
1345+ playback switches back to the Device Under Test's primary speaker
1346+_steps:
1347+ 1. Follow the previous tests to start streaming audio to the headset via
1348+ A2DP. Then execute the following command to disconnect the headset from
1349+ active A2DP streaming:
1350+ .
1351+ [<dut_name>]# disconnect <gadget_address>
1352+_verification:
1353+ Verify that you see output similar to the following:
1354+ Attempting to disconnect from 04:52:C7:0D:0C:03
1355+ [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no
1356+ Successful disconnected
1357+ [CHG] Device 04:52:C7:0D:0C:03 Connected: no
1358+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Key: 0x0110
1359+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x40
1360+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x0c
1361+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x02
1362+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x41
1363+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x00
1364+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x61
1365+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x71
1366+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0xcd
1367+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x92
1368+ [CHG] Device 04:52:C7:0D:0C:03 ManufacturerData Value: 0x6c
1369diff --git a/bluez/units/hid.pxu b/bluez/units/hid.pxu
1370new file mode 100644
1371index 0000000..394e361
1372--- /dev/null
1373+++ b/bluez/units/hid.pxu
1374@@ -0,0 +1,83 @@
1375+# Copyright (C) 2017 Canonical, Ltd.
1376+# All rights reserved.
1377+#
1378+# Written by:
1379+# Matteo Croce <matteo.croce@canonical.com>
1380+
1381+id: bluez/hid/pair_and_connect_hid
1382+category_id: bluez
1383+plugin: manual
1384+depends: bluez/setup/ensure_interface_connection_setup
1385+_summary: A Bluetooth HID gadget (e.g. keyboard, mouse) is connected and paired
1386+_purpose:
1387+ Check if your Bluetooth HID gadget of choice (e.g. keyboard, mouse) can be
1388+ paired to the host system.
1389+_steps:
1390+ 1. Execute the following command to pair and connect your HID gadget to the
1391+ host system:
1392+ .
1393+ [bluetooth]# scan on
1394+ [bluetooth]# scan off
1395+ [bluetooth]# pair 01:02:03:04:05:06
1396+ [bluetooth]# connect 01:02:03:04:05:06
1397+ .
1398+_verification:
1399+ Open a text editor and make sure you can type text from the HID keyboard
1400+ into the text box. If testing a mouse, ensure that the cursor moves when
1401+ moving your HID mouse
1402+
1403+id: bluez/hid/bt_mouse_works
1404+category_id: bluez
1405+_description: Verify that Bluetooth mice do work
1406+plugin: manual
1407+depends: bluez/hid/pair_and_connect_hid
1408+_steps:
1409+ 1. Scan for a BT mouse and connect it to the DUT
1410+_verification:
1411+ 1. Verify that the paired mouse can move the pointer
1412+ 2. Verify that the device is automatically connected at boot
1413+ 3. Verify that the device is automatically connected after resume from sleep
1414+
1415+id: bluez/hid/bt_keyboard_works
1416+category_id: bluez
1417+_description: Verify that Bluetooth keyboards do work
1418+plugin: manual
1419+_steps:
1420+ 1. Scan for a BT keyboard and connect it to the DUT, eg.
1421+ .
1422+ $ bluetoothctl
1423+ [bluetooth]# scan on
1424+ [bluetooth]# scan off
1425+ [bluetooth]# pair 01:02:03:04:05:06
1426+ Pairing successful
1427+ [bluetooth]# trust 01:02:03:04:05:06
1428+ [bluetooth]# connect 01:02:03:04:05:06
1429+ Trusted
1430+_verification:
1431+ 1. Verify that the paired keyboard can write in a text editor
1432+ 2. Verify that the device is automatically connected at boot
1433+ 3. Verify that the device is automatically connected after resume from sleep
1434+ 4. Press a key on the keyboard and power it off. Verify that the keystrokes are not transferred endlessly
1435+
1436+id: bluez/hid/ble_mouse_works
1437+category_id: bluez
1438+_description: Verify that BLE mices do work
1439+plugin: manual
1440+_steps:
1441+ 1. Pair a BLE mouse with the DUT.
1442+_verification:
1443+ 1. Verify that the paired mouse can move the pointer
1444+ 2. Verify that the device is automatically connected at boot
1445+ 3. Verify that the device is automatically connected after resume from sleep
1446+
1447+id: bluez/hid/ble_keyboard_works
1448+category_id: bluez
1449+_description: Verify that BLE keyboards do work
1450+plugin: manual
1451+_steps:
1452+ 1. Pair a BLE keyboard with the DUT.
1453+_verification:
1454+ 1. Verify that the paired keyboard can write in a text editor
1455+ 2. Verify that the device is automatically connected at boot
1456+ 3. Verify that the device is automatically connected after resume from sleep
1457+ 4. Press a key on the keyboard and power it off. Verify that the keystrokes are not transferred endlessly
1458diff --git a/bluez/units/setup.pxu b/bluez/units/setup.pxu
1459new file mode 100644
1460index 0000000..3060426
1461--- /dev/null
1462+++ b/bluez/units/setup.pxu
1463@@ -0,0 +1,140 @@
1464+# Copyright (C) 2017 Canonical, Ltd.
1465+# All rights reserved.
1466+#
1467+# Written by:
1468+# Matteo Croce <matteo.croce@canonical.com>
1469+
1470+id: bluez/setup/ensure_interface_connection_setup
1471+category_id: bluez
1472+_description: Ensure that the bluez interface is connected
1473+plugin: manual
1474+_steps:
1475+ 1. Connect required bluez slot/plug
1476+ .
1477+ $ sudo snap connect bluez:client bluez:service
1478+ .
1479+_verification:
1480+ Verify that you see the following when running snap interfaces bluez:
1481+ bluez:service bluez:client
1482+
1483+id: bluez/snap/ensure_nonroot_cannot_use
1484+category_id: bluez
1485+plugin: manual
1486+depends: bluez/setup/ensure_interface_connection_setup
1487+_summary: bluetoothctl and obexctl cannot be run as non-root user
1488+_purpose:
1489+ Verify that the bluetoothctl and obexctl commands cannot be run as non-root
1490+_steps:
1491+ 1. Start the bluetoothctl and obexctl commands as non-root user
1492+ .
1493+ $ bluetoothctl
1494+ $ obexctl
1495+ .
1496+_verification:
1497+ You should see outout similar to the following:
1498+ .
1499+ $ bluetoothctl
1500+ This script must be run as root
1501+ $ obexctl
1502+ This script must be run as root
1503+
1504+id: bluez/scan/get_all
1505+category_id: bluez
1506+plugin: manual
1507+depends: bluez/setup/ensure_interface_connection_setup
1508+_summary: All Bluetooth gadgets in range are listed
1509+_purpose:
1510+ Check if all powered on gadgets that are within range as listed.
1511+_steps:
1512+ 1. Execute the following command to retrieve the list of all Bluetooth gadgets:
1513+ .
1514+ $ /snap/bin/bluez.bluetoothctl
1515+ [bluetooth]# scan on
1516+ .
1517+_verification:
1518+ Your expected Bluetooth gadget(s) is/are shown in the output list such as:
1519+ [NEW] Device 04:52:C7:0D:0C:03 QC 35s
1520+
1521+id: bluez/connection/pair_and_connect
1522+category_id: bluez
1523+plugin: manual
1524+depends: bluez/setup/ensure_interface_connection_setup
1525+_summary: A Bluetooth gadget of choice is paired and connected
1526+_purpose:
1527+ Check if your Bluetooth gadget of choice can be paired to the host system.
1528+_steps:
1529+ 1. Execute the following command to pair and connect your gadget to the host
1530+ system using the address listed in the previous scan test:
1531+ .
1532+ [bluetooth]# pair <gadget_address>
1533+ [bluetooth]# connect <gadget_address>
1534+ .
1535+_verification:
1536+ You should see output similar to the following:
1537+ Attempting to pair with 04:52:C7:0D:0C:03
1538+ [CHG] Device 04:52:C7:0D:0C:03 Connected: yes
1539+ [CHG] Device 04:52:C7:0D:0C:03 Modalias: bluetooth:v009Ep400Cd0106
1540+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff
1541+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
1542+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
1543+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
1544+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
1545+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
1546+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
1547+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
1548+ [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes
1549+ [CHG] Device 04:52:C7:0D:0C:03 Paired: yes
1550+ Pairing successful
1551+ [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: no
1552+ [CHG] Device 04:52:C7:0D:0C:03 Connected: no
1553+ Attempting to connect to 04:52:C7:0D:0C:03
1554+ [CHG] Device 04:52:C7:0D:0C:03 Connected: yes
1555+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00000000-deca-fade-deca-deafdecacaff
1556+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
1557+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
1558+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
1559+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
1560+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
1561+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
1562+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
1563+ [CHG] Device 04:52:C7:0D:0C:03 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
1564+ Connection successful
1565+ [CHG] Device 04:52:C7:0D:0C:03 ServicesResolved: yes
1566+
1567+id: bluez/snap/ensure_btmon_can_be started
1568+category_id: bluez
1569+plugin: manual
1570+depends: bluez/setup/ensure_interface_connection_setup
1571+_summary: btmon tools function
1572+_purpose:
1573+ Check that the btmon tool shipped as a part of the bluez snap can be used.
1574+_steps:
1575+ 1. Start the btmon command
1576+ .
1577+ $ sudo btmon
1578+ .
1579+_verification:
1580+ You should see outout similar to the following:
1581+ .
1582+ $ sudo btmon
1583+ Bluetooth monitor ver 5.37
1584+ = New Index: 00:1A:7D:DA:71:08 (BR/EDR,USB,hci0) [hci0] 0.626494
1585+
1586+id: bluez/snap/ensure_hcidump_can_be started
1587+category_id: bluez
1588+plugin: manual
1589+depends: bluez/setup/ensure_interface_connection_setup
1590+_summary: btmon tools works
1591+_purpose:
1592+ Check that the hcidump tool shipped as a part of the bluez snap can be used.
1593+_steps:
1594+ 1. Start the hcidump command
1595+ .
1596+ $ sudo hcidump
1597+ .
1598+_verification:
1599+ You should see outout similar to the following:
1600+ .
1601+ $ sudo hcidump
1602+ HCI sniffer - Bluetooth packet analyzer ver 5.37
1603+ device: hci0 snap_len: 1500 filter: 0xffffffff
1604diff --git a/captive-redirect/manage.py b/captive-redirect/manage.py
1605new file mode 100755
1606index 0000000..56ea1c8
1607--- /dev/null
1608+++ b/captive-redirect/manage.py
1609@@ -0,0 +1,10 @@
1610+#!/usr/bin/env python3
1611+from plainbox.provider_manager import setup, N_
1612+
1613+setup(
1614+ name='plainbox-provider-captive-redirect',
1615+ namespace='2017.com.canonical.captive-redirect',
1616+ version="1.0",
1617+ description=N_("Plainbox provider for the Captive Redirect snap"),
1618+ gettext_domain="2017_com_canonical_captive_redirect",
1619+)
1620diff --git a/captive-redirect/units/captive-redirect.pxu b/captive-redirect/units/captive-redirect.pxu
1621new file mode 100644
1622index 0000000..d45f0e6
1623--- /dev/null
1624+++ b/captive-redirect/units/captive-redirect.pxu
1625@@ -0,0 +1,102 @@
1626+# Copyright (C) 2017 Canonical Ltd.
1627+# All rights reserved.
1628+#
1629+# Written by:
1630+# Matteo Croce <matteo.croce@canonical.com>
1631+
1632+unit: category
1633+id: captive_redirect
1634+_name: Captive portal redirect
1635+
1636+id: captive_redirect/setup/ensure_interface_connection_setup
1637+category_id: captive_redirect
1638+_description: Ensure that the captive-redirect interfaces are connected
1639+plugin: manual
1640+_steps:
1641+ 1. Install the captive-redirect snap via
1642+ .
1643+ $ snap install captive-redirect
1644+ .
1645+_verification:
1646+ Verify that you see the following when running snap interfaces:
1647+ :firewall-control captive-redirect
1648+
1649+id: captive_redirect/setup/default_disabled
1650+category_id: captive_redirect
1651+_description: Ensure that captive-redirect is disabled by default
1652+plugin: manual
1653+_steps:
1654+ 1. Get the configuration with:
1655+ .
1656+ $ captive-redirect.config status
1657+ .
1658+ 2. Ensure that there isn't any REDIRECT iptables chain:
1659+ .
1660+ $ sudo iptables-save |grep captive
1661+ .
1662+_verification:
1663+ 1. Check that the redirect is disabled:
1664+ .
1665+ active: false
1666+ .
1667+ 2. You shouldn't see any iptables rule
1668+
1669+id: captive_redirect/setup/iptables_rules_all_interfaces
1670+category_id: captive_redirect
1671+_description: Ensure that enabling captive-redirect sets up the correct iptables rules
1672+plugin: manual
1673+_steps:
1674+ 1. Enable captive-redirect with:
1675+ .
1676+ $ sudo snap set captive-redirect active=true port=9876
1677+ .
1678+ 2. Get the iptables rules with:
1679+ .
1680+ $ sudo iptables-save |grep captive
1681+ .
1682+_verification:
1683+ 1. You should see iptables rules like:
1684+ .
1685+ :captive - [0:0]
1686+ -A PREROUTING -j captive
1687+ -A captive -p tcp -m multiport --dports 80,443 -j REDIRECT --to-ports 9876
1688+ .
1689+
1690+id: captive_redirect/setup/iptables_rules_one_interface
1691+category_id: captive_redirect
1692+_description: Ensure that enabling captive-redirect sets up iptables rules for a single interface
1693+plugin: manual
1694+_steps:
1695+ 1. Enable captive-redirect with:
1696+ .
1697+ $ sudo snap set captive-redirect active=true port=9999 interfaces=tun4
1698+ .
1699+ 2. Get the iptables rules with:
1700+ .
1701+ $ sudo iptables-save |grep captive
1702+ .
1703+_verification:
1704+ 1. You should see iptables rules like:
1705+ .
1706+ :captive - [0:0]
1707+ -A PREROUTING -j captive
1708+ -A captive -i tun4 -p tcp -m multiport --dports 80,443 -j REDIRECT --to-ports 9999
1709+ .
1710+
1711+id: captive_redirect/functionality/redirect_works
1712+category_id: captive_redirect
1713+_description: Ensure that enabling captive-redirect really redirects the traffic
1714+plugin: manual
1715+_steps:
1716+ 1. Install a sample web server with:
1717+ .
1718+ $ sudo snap install xkcd-webserver
1719+ .
1720+ 2. Connect another device to the DUT (Device Under Test) and setup the DUT as default gateway
1721+ 3. Enable the redirect with:
1722+ .
1723+ $ sudo snap set captive-redirect active=true port=80 interfaces=
1724+ .
1725+ 4. Try to access an HTTP (avoid HTTPS, it will give a certificate error) web page from the device
1726+_verification:
1727+ 1. You should see a blank page pointing to XKCD instead of the typed address
1728diff --git a/media-hub/manage.py b/media-hub/manage.py
1729new file mode 100755
1730index 0000000..81b22c3
1731--- /dev/null
1732+++ b/media-hub/manage.py
1733@@ -0,0 +1,10 @@
1734+#!/usr/bin/env python3
1735+from plainbox.provider_manager import setup, N_
1736+
1737+setup(
1738+ name='plainbox-provider-media-hub',
1739+ namespace='2017.com.canonical.media-hub',
1740+ version="1.0",
1741+ description=N_("Plainbox provider for the media-hub snap"),
1742+ gettext_domain="2017_com_canonical_media_hub",
1743+)
1744diff --git a/media-hub/units/media-hub-snap.pxu b/media-hub/units/media-hub-snap.pxu
1745new file mode 100644
1746index 0000000..24ad2bc
1747--- /dev/null
1748+++ b/media-hub/units/media-hub-snap.pxu
1749@@ -0,0 +1,73 @@
1750+# Copyright (C) 2017 Canonical Ltd.
1751+# All rights reserved.
1752+#
1753+# Written by:
1754+# Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
1755+
1756+id: media_hub/snap_classic/play_wav
1757+category_id: media_hub
1758+plugin: manual
1759+_summary: Confined media-hub can play wav files
1760+_purpose:
1761+ Check if media-hub properly plays wav files when confined. The scenario is
1762+ Unity8 on Classic.
1763+_steps:
1764+ 1. Install snaps and perform needed interface connections
1765+ .
1766+ $ snap install media-hub
1767+ $ snap install --devmode mediaplayer-app
1768+ $ sudo snap connect mediaplayer-app:mpris media-hub:mpris
1769+ .
1770+ 2. Start media-hub-server (needed until LP #1613420 is solved)
1771+ .
1772+ $ media-hub.media-hub-service
1773+ .
1774+ 3. Download sample file
1775+ .
1776+ $ wget -P ~/Music/ http://freewavesamples.com/files/Kawai-K5000W-Buchla-C1.wav
1777+ .
1778+ 4. Launch mediaplayer-app
1779+ .
1780+ $ /snap/bin/mediaplayer-app ~/Music/Kawai-K5000W-Buchla-C1.wav
1781+ .
1782+ 5. Let the song play until the end
1783+ 6. Restart playback after the song finishes
1784+ 7. Pause, then press play again a few times
1785+ 8. While the song is playing, move the slider back and forth in time
1786+ 9. Pause the song, then move the slider again
1787+_verification:
1788+ Verify that in all cases the audio is played as expected.
1789+
1790+id: media_hub/snap_classic/play_mp3
1791+category_id: media_hub
1792+plugin: manual
1793+_summary: Confined media-hub can play an mp3
1794+_purpose:
1795+ Check if media-hub properly plays an mp3 when confined. The scenario is Unity8
1796+ on Classic.
1797+_steps:
1798+ 1. Install snaps and perform needed interface connections
1799+ .
1800+ $ snap install media-hub
1801+ $ snap install --devmode mediaplayer-app
1802+ $ sudo snap connect mediaplayer-app:mpris media-hub:mpris
1803+ .
1804+ 2. Start media-hub-server (needed until LP #1613420 is solved)
1805+ .
1806+ $ media-hub.media-hub-service
1807+ .
1808+ 3. Download sample file
1809+ .
1810+ $ wget -P ~/Music/ http://www.stephaniequinn.com/Music/Canon.mp3
1811+ .
1812+ 4. Launch mediaplayer-app
1813+ .
1814+ $ /snap/bin/mediaplayer-app ~/Music/Canon.mp3
1815+ .
1816+ 5. Let the song play until the end
1817+ 6. Restart playback after the song finishes
1818+ 7. Pause, then press play again a few times
1819+ 8. While the song is playing, move the slider back and forth in time
1820+ 9. Pause the song, then move the slider again
1821+_verification:
1822+ Verify that in all cases the audio is played as expected.
1823diff --git a/media-hub/units/media-hub.pxu b/media-hub/units/media-hub.pxu
1824new file mode 100644
1825index 0000000..bdeec69
1826--- /dev/null
1827+++ b/media-hub/units/media-hub.pxu
1828@@ -0,0 +1,65 @@
1829+# Copyright 2017 Canonical Ltd.
1830+# All rights reserved.
1831+#
1832+# Written by:
1833+# Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
1834+
1835+unit: category
1836+id: media_hub
1837+_name: media-hub
1838+
1839+id: media_hub/video/play_h264
1840+category_id: media_hub
1841+plugin: manual
1842+_summary: H.264 videos play as expected
1843+_purpose:
1844+ Check if media-hub plays properly H.264 videos
1845+_steps:
1846+ 1. Download H.264 video
1847+ .
1848+ $ wget https://download.blender.org/durian/trailer/sintel_trailer-720p.mp4
1849+ .
1850+ 2. Start media-hub-server
1851+ .
1852+ $ MIR_SOCKET=/run/user/$UID/mir_socket media-hub-server --desktop_file_hint=unity8
1853+ .
1854+ 3. Start to play the video
1855+ .
1856+ $ MIR_SOCKET=/run/user/$UID/mir_socket QT_QPA_PLATFORM=ubuntumirclient DISPLAY=:0 /usr/bin/mediaplayer-app --desktop_file_hint=unity8 sintel_trailer-720p.mp4
1857+ .
1858+ 4. Let the video play until the end
1859+ 5. Re-start after the video finishes
1860+ 6. Pause, then press play again a few times
1861+ 7. While the video is playing, move the slider back and forth in time
1862+ 8. Pause the video, then move the slider again
1863+ 9. Re-size, maximize, then minimize the window several times
1864+_verification:
1865+ Verify that in all cases the video is played as expected.
1866+
1867+id: media_hub/video/play_mpeg4
1868+category_id: media_hub
1869+plugin: manual
1870+_summary: MPEG4 videos play as expected
1871+_purpose:
1872+ Check if media-hub plays properly MPEG4 videos
1873+_steps:
1874+ 1. Download H.264 video
1875+ .
1876+ $ wget https://download.blender.org/durian/trailer/Sintel_Trailer.480p.DivX_Home_Theater.divx
1877+ .
1878+ 2. Start media-hub-server
1879+ .
1880+ $ MIR_SOCKET=/run/user/$UID/mir_socket media-hub-server --desktop_file_hint=unity8
1881+ .
1882+ 3. Start to play the video
1883+ .
1884+ $ MIR_SOCKET=/run/user/$UID/mir_socket QT_QPA_PLATFORM=ubuntumirclient DISPLAY=:0 /usr/bin/mediaplayer-app --desktop_file_hint=unity8 Sintel_Trailer.480p.DivX_Home_Theater.divx
1885+ .
1886+ 4. Let the video play until the end
1887+ 5. Re-start after the video finishes
1888+ 6. Pause, then press play again a few times
1889+ 7. While the video is playing, move the slider back and forth in time
1890+ 8. Pause the video, then move the slider again
1891+ 9. Re-size, maximize, then minimize the window several times
1892+_verification:
1893+ Verify that in all cases the video is played as expected.
1894diff --git a/modem-manager/manage.py b/modem-manager/manage.py
1895new file mode 100755
1896index 0000000..8570bb9
1897--- /dev/null
1898+++ b/modem-manager/manage.py
1899@@ -0,0 +1,10 @@
1900+#!/usr/bin/env python3
1901+from plainbox.provider_manager import setup, N_
1902+
1903+setup(
1904+ name='plainbox-provider-modem-manager',
1905+ namespace='2016.com.canonical.modem-manager',
1906+ version="1.0",
1907+ description=N_("Plainbox provider for the ModemManager snap"),
1908+ gettext_domain="2016_com_canonical_modem_manager",
1909+)
1910diff --git a/modem-manager/units/modem-manager.pxu b/modem-manager/units/modem-manager.pxu
1911new file mode 100644
1912index 0000000..3912ac2
1913--- /dev/null
1914+++ b/modem-manager/units/modem-manager.pxu
1915@@ -0,0 +1,103 @@
1916+# Copyright 2016 Canonical Ltd.
1917+# All rights reserved.
1918+#
1919+# Written by:
1920+# Jim Hodapp <jim.hodapp@canonical.com>
1921+# Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>
1922+
1923+unit: category
1924+id: modem_manager
1925+_name: Modem Manager
1926+
1927+id: modem_manager/setup/ensure_interface_connection_setup
1928+category_id: modem_manager
1929+_description: Ensure that the modem-manager interface is connected
1930+plugin: manual
1931+_steps:
1932+ 1. Install network-manager if not already installed
1933+ .
1934+ $ sudo snap install network-manager
1935+ .
1936+ 2. Connect required modem-manager/network-manager slots/plugs
1937+ .
1938+ $ sudo snap connect modem-manager:mmcli modem-manager:service
1939+ $ sudo snap connect network-manager:nmcli network-manager:service
1940+ $ sudo snap connect network-manager:modem-manager modem-manager:service
1941+ $ sudo snap connect network-manager:ppp ubuntu-core:ppp
1942+ .
1943+_verification:
1944+ Verify that you see the following when running snap interfaces:
1945+ modem-manager:service modem-manager:mmcli,network-manager:modem-manager
1946+ network-manager:service network-manager:nmcli
1947+ :ppp network-manager
1948+
1949+id: modem_manager/modems/get_all
1950+category_id: modem_manager
1951+plugin: manual
1952+depends: modem_manager/setup/ensure_interface_connection_setup
1953+_summary: All active modem configuration items are listed
1954+_purpose:
1955+ Check if the modem shows up as being recognized by modem-manager.
1956+_steps:
1957+ 1. Execute the following command to retrieve the list of all detected modems:
1958+ .
1959+ $ sudo mmcli -L
1960+_verification:
1961+ Your expected modem is shown in the output list.
1962+
1963+id: modem_manager/modems/get_info
1964+category_id: modem_manager
1965+plugin: manual
1966+depends: modem_manager/setup/ensure_interface_connection_setup
1967+_summary: All modem information listed
1968+_purpose:
1969+ Check if the modem details can be listed.
1970+_steps:
1971+ 1. Execute the following command to retrieve the list of all detected modems.
1972+ Note, the modem number is listed from the previous test:
1973+ .
1974+ $ sudo mmcli -m <modem_number>
1975+_verification:
1976+ Your desired modem detail is listed.
1977+
1978+id: modem_manager/modems/connect
1979+category_id: modem_manager
1980+plugin: manual
1981+depends: modem_manager/setup/ensure_interface_connection_setup
1982+_summary: Connect to a listed modem
1983+_purpose:
1984+ Connect to a listed modem and verify connection status
1985+_steps:
1986+ 1. Execute the following commands to connect to a particular modem. First run
1987+ "sudo nmcli d" to find out what you need to put in <interface> (look for
1988+ TYPE=gsm, the interface will be the name in the DEVICE column). It will
1989+ probably be something that starts with "tty" or "cdc". Also, replace
1990+ <op_apn> by looking up the APN string for your cell provider at
1991+ http://www.apn-settings.com (e.g. "fast.t-mobile.com" for T-Mobile 4G).
1992+ Finally, "gsmconn" is an arbitrary connection name and can be set to
1993+ anything that makes sense for the connection type.
1994+ .
1995+ $ sudo nmcli c add type gsm ifname <interface> con-name gsmconn apn <op_apn>
1996+ $ sudo nmcli r wwan on
1997+ .
1998+ 2. Check that the connection is up with "sudo nmcli d". It should show that
1999+ state is "connected". This can take some time depending on network
2000+ conditions and on the modem type.
2001+ .
2002+ 3. Check which is the network interface for the cellular connection. For this,
2003+ fist run
2004+ .
2005+ $ sudo nmcli d show <interface>
2006+ .
2007+ (here <interface> is the one from point 1), check the IP4.ADDRESS field,
2008+ then run
2009+ .
2010+ $ ip address
2011+ .
2012+ and there you can find the network interface that owns that address.
2013+ .
2014+ 4. Add a route to 8.8.8.8 with
2015+ .
2016+ $ sudo ip route add 8.8.8.8 dev <network-interface>
2017+_verification:
2018+ Verify that you have a modem connection by pinging 8.8.8.8.
2019diff --git a/network-manager/manage.py b/network-manager/manage.py
2020new file mode 100755
2021index 0000000..86969f2
2022--- /dev/null
2023+++ b/network-manager/manage.py
2024@@ -0,0 +1,10 @@
2025+#!/usr/bin/env python3
2026+from plainbox.provider_manager import setup, N_
2027+
2028+setup(
2029+ name='plainbox-provider-network-manager',
2030+ namespace='2016.com.canonical.network-manager',
2031+ version="1.0",
2032+ description=N_("Plainbox provider for the NetworkManager snap"),
2033+ gettext_domain="2016_com_canonical_network_manager",
2034+)
2035diff --git a/network-manager/units/network-manager.pxu b/network-manager/units/network-manager.pxu
2036new file mode 100644
2037index 0000000..27d9b8b
2038--- /dev/null
2039+++ b/network-manager/units/network-manager.pxu
2040@@ -0,0 +1,325 @@
2041+# Copyright 2016 Canonical Ltd.
2042+# All rights reserved.
2043+#
2044+# Written by:
2045+# Lorn Potter <lorn.potter@canonical.com>
2046+# Simon Fels <simon.fels@canonical.com>
2047+
2048+unit: category
2049+id: network_manager
2050+_name: Network Manager
2051+
2052+id: network_manager/misc/check_for_crashes
2053+category_id: network_manager
2054+plugin: manual
2055+_summary: Verify that NetworkManager hasn't crashed in previous runs.
2056+_steps:
2057+ 1. Power on a Desktop system, this tests does not apply elsewhere.
2058+ 2. List content of /var/crash for crash dumps:
2059+ .
2060+ ls -l /var/crash
2061+ .
2062+_verification:
2063+ 1. Check that /var/crash is empty.
2064+
2065+id: network_manager/ethernet/enable_support
2066+category_id: network_manager
2067+plugin: manual
2068+_summary: Ethernet support for NetworkManager needs to be manually enabled
2069+_purpose:
2070+ By default ethernet support is disabled in the network-manager snap. In order
2071+ to be able to get it managed through NetworkManager a few manual steps need to
2072+ be performed.
2073+_steps:
2074+ 1. Create /etc/netplan/00-default-nm-renderer.yaml with the following content:
2075+ .
2076+ network:
2077+ renderer: NetworkManager
2078+ .
2079+ 2. Drop any other files from /etc/netplan and reboot the device.
2080+_verification:
2081+ NOTE: The device may get another IP address assigned as before. Use a network
2082+ scanner or a monitor+keyboard to check which IP address it got assigned.
2083+ .
2084+ Once the device is rebooted you should be able to connect to it by using the
2085+ network connection offered on the ethernet port. When logged into the device
2086+ verify NetworkManager automatically connected the ethernet port:
2087+ .
2088+ $ network-manager.nmcli d
2089+ DEVICE TYPE STATE CONNECTION
2090+ eth0 ethernet connected eth0
2091+ [...]
2092+ .
2093+ The state of all ethernet devices with a plugged cable and a working network
2094+ behind should be 'connected'.
2095+
2096+id: network_manager/ethernet/all_ports_detected
2097+depends: network_manager/ethernet/enable_support
2098+category_id: network_manager
2099+plugin: manual
2100+_summary: NetworkManager should detect all available ethernet ports
2101+_purpose:
2102+ NetworkManager should detect all available ethernet ports by default
2103+ on a system and list them as usable devices.
2104+_steps:
2105+ 1. List all available ethernet ports
2106+ $ ifconfig -a | grep -E '$eth'
2107+ $ ifconfig -a | grep -E '$en'
2108+ 2. List all ethernet ports NetworkManager knows about
2109+ $ network-manager.nmcli d
2110+_verification:
2111+ Both steps should show the same list of ethernet network interfaces.
2112+
2113+id: network_manager/ethernet/auto_connected
2114+depends: network_manager/ethernet/enable_support
2115+category_id: network_manager
2116+plugin: manual
2117+_summary: NetworkManager should auto-connect any ethernet port with a link
2118+_purpose:
2119+ When a cable is plugged into an ethernet port NetworkManager should try
2120+ to automatically connect the port.
2121+ .
2122+ NOTE: This test assumes that the cable you plug into the port is connected
2123+ to a network which offers a DHCP server.
2124+_steps:
2125+ 1. Ensure that there is no connection for the port you want to use for
2126+ testing. Using a serial console to perform this test is recommended.
2127+ 2. Drop any existing connections listed by
2128+ $ network-manager.nmcli c show
2129+ which are meant for the ethernet port of the device with
2130+ $ network-manager.nmcli c delete <UUID>
2131+ 3. Plug the cable into the ethernet port.
2132+_verification:
2133+ The ethernet port should be automatically connected by NetworkManager. This
2134+ can be verified with
2135+ $ network-manager.nmcli d | grep <ethernet device name>
2136+ eth0 ethernet connected <connection name>
2137+ Please note that the <connection name> can be different as its
2138+ automatically selected by NetworkManager. It can be "Wired Connection 1"
2139+ for example.
2140+
2141+id: network_manager/ethernet/auto_connect_existing_connection
2142+depends: network_manager/ethernet/enable_support
2143+category_id: network_manager
2144+plugin: manual
2145+_summary: Cable plug/unplug should give an existing connection
2146+_purpose:
2147+ When a cable is unplugged and plugged again the ethernet port should
2148+ be automatically reconnected.
2149+_steps:
2150+ 1. Check if the ethernet port is currently connected
2151+ $ network-manager.nmcli d
2152+ 2. Unplug the cable from the ethernet port and check the connection
2153+ $ network-manager.nmcli d
2154+ 3. Plug the cable again and check the connection status.
2155+_verification:
2156+ Before the cable is unplugged the ethernet port should be marked
2157+ as connected. Once the cable is removed the connection status
2158+ should switch to unconnected. When plugged back in, it should be marked
2159+ again as connected.
2160+
2161+id: network_manager/ethernet/unmanaged
2162+category_id: network_manager
2163+plugin: manual
2164+depends: network_manager/ethernet/auto_connected
2165+_summary: Check if ethernet device is unmanaged.
2166+_purpose:
2167+ Check if the ethernet device is not managed by Network Manager.
2168+ .
2169+ NOTE: This only applies to devices where ethernet is not managed by
2170+ NetworkManager. Check if /etc/netplan/00-default-nm-renderer.yaml
2171+ exists. If it does not, then NetworkManager doesn't touch any
2172+ ethernet connection. If it exists, skip this test.
2173+_steps:
2174+ 1. Execute the following command to retrieve the list of all detected connections.
2175+ Note, the AP number is listed from the previous test:
2176+ .
2177+ $ /snap/bin/network-manager.nmcli d | grep en
2178+_verification:
2179+ The network device is listed as 'unmanaged', as an example:
2180+ enxb827ebf6b919 ethernet unmanaged --
2181+
2182+id: network_manager/connections/get_all
2183+category_id: network_manager
2184+plugin: manual
2185+depends: network_manager/ethernet/auto_connected
2186+_summary: All active AP configuration items are listed
2187+_purpose:
2188+ Check if the AP shows up as being recognized by Network Manager.
2189+_steps:
2190+ 1. Execute the following command to retrieve the list of all detected connections:
2191+ .
2192+ $ /snap/bin/network-manager.nmcli d wifi list
2193+_verification:
2194+ Your expected AP is shown in the output list for example:
2195+ pool1 Infra 6 54 Mbit/s 75 *** WPA2
2196+
2197+id: network_manager/connections/agent
2198+category_id: network_manager
2199+plugin: manual
2200+depends: network_manager/ethernet/auto_connected
2201+_summary: Register for secret agent
2202+_purpose:
2203+ Register for Network Manager's secret agent and verify status
2204+_steps:
2205+ 1. Execute the following command to register secret agent:
2206+ .
2207+ $ /snap/bin/network-manager.nmcli a
2208+_verification:
2209+ Output should be similiar to this:
2210+ nmcli successfully registered as a Network Manager's secret agent.
2211+ nmcli successfully registered as a polkit agent.
2212+
2213+id: network_manager/connections/connect
2214+category_id: network_manager
2215+plugin: manual
2216+depends: network_manager/ethernet/auto_connected
2217+_summary: Connect to a listed AP
2218+_purpose:
2219+ Connect to a listed AP and verify connection status
2220+_steps:
2221+ 1. Execute the following commands to connect to a particular AP.
2222+ .
2223+ $ /snap/bin/network-manager.nmcli dev wifi con "yourssid" password "yourpassword"
2224+ Note, replace yourssid with the ssid if the AP you will connect to, and replace yourpassword
2225+ with the actual password/passphrase.
2226+_verification:
2227+ Verify that you have a AP connection by issuing this command:
2228+ $ ifconfig | grep -A 2 wl
2229+ .
2230+ verifying that the interface has an IP address with output similiar to this:
2231+ wlp5s0 Link encap:Ethernet HWaddr 70:77:81:33:92:6b
2232+ inet addr:10.0.0.108 Bcast:10.0.0.255 Mask:255.255.255.0
2233+ inet6 addr: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64 Scope:Global
2234+
2235+id: network_manager/connections/get_info
2236+category_id: network_manager
2237+plugin: manual
2238+depends: network_manager/ethernet/auto_connected
2239+_summary: All AP information listed
2240+_purpose:
2241+ Check if the AP details can be listed.
2242+_steps:
2243+ 1. Execute the following command to retrieve the list of all detected connections.
2244+ Note, the AP ssid is listed from the previous test:
2245+ .
2246+ $ /snap/bin/network-manager.nmcli -p -f general,ip4,ip6 c show <AP_SSID>
2247+_verification:
2248+ Your desired AP detail is listed and has ip4/ip6 address.
2249+ ===============================================================================
2250+ Activate connection details (1554e3b2-76e6-4adc-b986-215b7393f8d9)
2251+ ===============================================================================
2252+ GENERAL.NAME: pool1
2253+ GENERAL.UUID: 1554e3b2-76e6-4adc-b986-215b7393f8d9
2254+ GENERAL.DEVICES: wlp5s0
2255+ GENERAL.STATE: activated
2256+ GENERAL.DEFAULT: no
2257+ GENERAL.DEFAULT6: no
2258+ GENERAL.VPN: no
2259+ GENERAL.ZONE: --
2260+ GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
2261+ GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/3
2262+ GENERAL.SPEC-OBJECT: /org/freedesktop/NetworkManager/AccessPoint/0
2263+ GENERAL.MASTER-PATH: --
2264+ -------------------------------------------------------------------------------
2265+ IP4.ADDRESS[1]: 10.0.0.108/24
2266+ IP4.GATEWAY: 10.0.0.138
2267+ IP4.DNS[1]: 10.0.0.138
2268+ IP4.DOMAIN[1]: gateway
2269+ -------------------------------------------------------------------------------
2270+ IP6.ADDRESS[1]: 2001:8003:6501:2000:c1b3:3359:d2a3:f2d1/64
2271+ IP6.ADDRESS[2]: 2001:8003:6501:2000:7277:81ff:fe33:926b/64
2272+ IP6.ADDRESS[3]: fe80::7277:81ff:fe33:926b/64
2273+ IP6.GATEWAY: fe80::e2b9:e5ff:fe5a:91b0
2274+ IP6.DNS[1]: 2001:8003:6501:2000::1
2275+ IP6.DOMAIN[1]: gateway
2276+ -------------------------------------------------------------------------------
2277+
2278+id: network_manager/ethernet/device_supports_wol
2279+depends: network_manager/ethernet/enable_support
2280+category_id: network_manager
2281+plugin: manual
2282+_summary: Verify that the device under test has support for Wake-on-LAN
2283+_purpose:
2284+ Verify that the device you're running the tests on supports Wake-on-LAN. For
2285+ example, devices like the Raspberry PI (1-3) do not support Wake-on-LAN.
2286+_steps:
2287+ Verify that your device supports Wake-on-LAN. You can look into the specs
2288+ for your device, ask the vendor or search through the internet.
2289+ .
2290+ For example the Raspberry PI can't suspend to RAM which is discussed and
2291+ outlined in https://github.com/raspberrypi/linux/issues/1281 which also
2292+ makes Wake-on-LAN impossible.
2293+_verification:
2294+ If device does not support Wake-on-LAN please SKIP this test case and all
2295+ depending test cases will be skipped too. If Wake-on-LAN is supported mark
2296+ test as PASSED.
2297+
2298+id: network_manager/ethernet/uses_global_wol
2299+depends: network_manager/ethernet/device_supports_wol
2300+category_id: network_manager
2301+plugin: manual
2302+_summary: Ethernet connections are using global wake-on-lan setting
2303+_purpose:
2304+ Check if an ethernet connection created by NetworkManager automatically uses the
2305+ global default for wake-on-lan.
2306+ .
2307+ NOTE: This requires a system which is configured to not use netplan to
2308+ generate connections for NetworkManager. On such a system an ethernet
2309+ connection will always have wake-on-lan disabled as netplan does this
2310+ by default if not explicitly stated in the netplan configuration.
2311+_steps:
2312+ 1. Find connection UUID for the ethernet port
2313+ $ network-manager.nmcli c show | grep eth0
2314+ 2. Verify the connection uses the global wake-on-lan setting
2315+ $ network-manager.nmcli -m multiline -f 802-3-ethernet.wake-on-lan c show <UUID>
2316+_verification:
2317+ The output should look like this:
2318+ .
2319+ 802-3-ethernet.wake-on-lan: 1 (default)
2320+
2321+id: network_manager/ethernet/has_wol_enabled_by_default
2322+depends: network_manager/ethernet/device_supports_wol
2323+category_id: network_manager
2324+plugin: manual
2325+_summary: Ethernet port has wake-on-lan enabled by default
2326+_purpose:
2327+ Check if the actual ethernet device has wake-on-lan correctly enabled when
2328+ its connection is maintained by NetworkManager.
2329+_steps:
2330+ 1. Install the se-test-tools snap
2331+ $ snap install --devmode --edge se-test-tools
2332+ 2. Check the ethernet port for the wake-on-lan setting (eth0 in this case)
2333+ $ sudo se-test-tools.ethtool eth0
2334+_verification:
2335+ The output should be similar to this:
2336+ Settings for eth0:
2337+ [...]
2338+ Supports Wake-on: pumbg
2339+ Wake-on: g
2340+ [...]
2341+ .
2342+ The relevant line is the "Wake-on:" one. It should have the value "g"
2343+ set which marks the port as waking up on the magic packet.
2344+
2345+id: network_manager/ethernet/wakes_up_with_wol
2346+depends: network_manager/ethernet/device_supports_wol
2347+category_id: network_manager
2348+plugin: manual
2349+_summary: Wake on LAN configured by NetworkManager can wake up the device
2350+_purpose:
2351+ Check that another system can wake up from S5 the SUT using the connected ethernet port.
2352+_steps:
2353+ 1. Ensure there is an ethernet cable attached to one of the ports and it's configured via
2354+ NetworkManager. Check with
2355+ $ network-manager.nmcli d | grep eth0
2356+ 2. Note the MAC address of the the eth0 port
2357+ $ ifconfig eth0
2358+ 3. Power off the system by running
2359+ $ sudo poweroff
2360+ 4. From another computer on the same network run the following command:
2361+ $ wakeonlan {mac}
2362+ If wakeonlan tool is not installed run:
2363+ $ sudo apt install wakeonlan
2364+_verification:
2365+ Did the SUT wake up from S5?
2366diff --git a/network-manager/units/power_management.pxu b/network-manager/units/power_management.pxu
2367new file mode 100644
2368index 0000000..8ae9b78
2369--- /dev/null
2370+++ b/network-manager/units/power_management.pxu
2371@@ -0,0 +1,31 @@
2372+# Copyright 2016 Canonical Ltd.
2373+# All rights reserved.
2374+#
2375+# Written by:
2376+# Simon Fels <simon.fels@canonical.com>
2377+
2378+id: network_manager/power_management/connections_come_back_after_resume
2379+category_id: network_manager
2380+plugin: manual
2381+_summary: Connections managed by NetworkManager should come back when device wakes up
2382+_purpose:
2383+ When a device goes to sleep NetworkManager disconnects all connections but
2384+ will reconnect them back when the device reawakens.
2385+_steps:
2386+ 1. Verify the device is connectd to a WiFi or ethernet network. You can use
2387+ .
2388+ $ network-manager.nmcli d
2389+ .
2390+ to check if a wireless network interface is connected or not.
2391+ 2. Suspend the device by calling
2392+ .
2393+ $ systemctl suspend
2394+ .
2395+ 3. Wake up the device again by pressing its power button
2396+_verification:
2397+ When the device comes back from suspend after pressing the power button
2398+ verify with
2399+ .
2400+ $ network-manager.nmcli d
2401+ .
2402+ that the previously connected WiFi/ethernet network is again connected.
2403diff --git a/network-manager/units/snap.pxu b/network-manager/units/snap.pxu
2404new file mode 100644
2405index 0000000..419901a
2406--- /dev/null
2407+++ b/network-manager/units/snap.pxu
2408@@ -0,0 +1,101 @@
2409+# Copyright 2017 Canonical Ltd.
2410+# All rights reserved.
2411+#
2412+# Written by:
2413+# Matteo Croce <matteo.croce@canonical.com>
2414+
2415+id: network_manager/snap/check_interfaces
2416+category_id: network_manager
2417+plugin: manual
2418+_summary: Verify that snap interfaces are correctly connected
2419+_steps:
2420+ 1. Install the snap from the store:
2421+ .
2422+ $ snap install network-manager
2423+ .
2424+_verification:
2425+ 1. Verify that the 'network-manager' snap has all required plug connected:
2426+ .
2427+ $ snap interfaces |grep network-manager
2428+ :network-setup-observe network-manager
2429+ :ppp network-manager
2430+ modem-manager:service modem-manager:mmcli,network-manager:modem-manager
2431+ network-manager:service network-manager:nmcli
2432+ .
2433+
2434+id: network_manager/wifi/periodic_scanning
2435+category_id: network_manager
2436+depends: network_manager/snap/check_interfaces
2437+plugin: manual
2438+_summary: Verify that periodic Wi-Fi scanning occurs
2439+_steps:
2440+ 1. Run wpa_cli to ensure that periodic scanning is occurring:
2441+ .
2442+ $ sudo wpa_cli
2443+ wpa_cli v2.4
2444+ .
2445+ Selected interface 'wlp3s0'
2446+ .
2447+ Interactive mode
2448+ .
2449+ .
2450+ 2. Get the scan results with:
2451+ .
2452+ > scan_results
2453+ .
2454+_verification:
2455+ 1. You should see some output like this at least once every 120 seconds
2456+ in the wpa_cli output
2457+ .
2458+ <3>CTRL-EVENT-SCAN-STARTED
2459+ <3>CTRL-EVENT-SCAN-RESULTS
2460+ .
2461+ 2. You should see the list of reachable Access Points, eg.
2462+ .
2463+ bssid / frequency / signal level / flags / ssid
2464+ 12:34:56:78:89:ab 2437 -85 [WPA2-PSK-CCMP+TKIP][ESS] Home-AP
2465+
2466+
2467+id: network_manager/wifi/no_dbus_duplicate_signals
2468+category_id: network_manager
2469+depends: network_manager/snap/check_interfaces
2470+plugin: manual
2471+_summary: Ensure that dbus signals aren't duplicated
2472+_steps:
2473+ 1. Run dbus-monitor:
2474+ .
2475+ dbus-monitor --system --profile type=signal,interface=org.freedesktop.DBus.Properties
2476+ .
2477+_verification:
2478+ 1. Ensure that when scanning occurs, there aren't duplicate PropertiesChanged
2479+ signals sent for each AccessPoint object path.
2480+ There should be a single DBus PropertiesChanged signal for each /AccessPoint/X):
2481+ .
2482+ sig 1489573828 1805 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/0 org.freedesktop.DBus.Properties PropertiesChanged
2483+ sig 1489573828 1806 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/1 org.freedesktop.DBus.Properties PropertiesChanged
2484+ sig 1489573828 1807 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/2 org.freedesktop.DBus.Properties PropertiesChanged
2485+ sig 1489573828 1808 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/3 org.freedesktop.DBus.Properties PropertiesChanged
2486+ sig 1489573828 1809 :1.13 <none> /org/freedesktop/NetworkManager/AccessPoint/4 org.freedesktop.DBus.Properties PropertiesChanged
2487+
2488+
2489+id: network_manager/wifi/ap_expires
2490+category_id: network_manager
2491+depends: network_manager/snap/check_interfaces
2492+plugin: manual
2493+_summary: Ensure that AccessPoint entries are volatile
2494+_steps:
2495+ 1. Bring up an AP (eg. from a smartphone)
2496+ 2. Start wpa_cli and do a wireless scan:
2497+ .
2498+ $ wpa_cli
2499+ > scan
2500+ .
2501+ wait 10 seconds, and get the scan results.
2502+ .
2503+ > scan_results
2504+ .
2505+ 3. Shutdown the AP on the smartphone
2506+ 4. Wait 120 seconds
2507+ 5. Retry the wireless scan
2508+_verification:
2509+ 1. In the second scan the smartphone AP should not be present
2510diff --git a/network-manager/units/wireless.pxu b/network-manager/units/wireless.pxu
2511new file mode 100644
2512index 0000000..52a84d2
2513--- /dev/null
2514+++ b/network-manager/units/wireless.pxu
2515@@ -0,0 +1,54 @@
2516+# Copyright 2016 Canonical Ltd.
2517+# All rights reserved.
2518+#
2519+# Written by:
2520+# Simon Fels <simon.fels@canonical.com>
2521+
2522+id: network_manager/wireless/powersave_off_by_default
2523+category_id: network_manager
2524+plugin: manual
2525+_summary: NetworkManager should disable powersave by default
2526+_purpose:
2527+ The powersave configuration option should cause the mode on the
2528+ actual hardware device to be turned off by default.
2529+_steps:
2530+ Install wireless-tools snap and check that powersave is turned off
2531+ on the actual hardware wireless device.
2532+ $ snap install wireless-tools
2533+_verification:
2534+ The iw utility should return the following for the selected wireless device
2535+ $ sudo wireless-tools.iw dev wlan0 get power_save
2536+ Power save: off
2537+
2538+id: network_manager/wireless/powersave_config_default_off
2539+category_id: network_manager
2540+plugin: manual
2541+_summary:
2542+ The configuration option should be set to disable by default
2543+_purpose:
2544+ On installation the snap sets the option to a default value
2545+ which should always be the same.
2546+_steps:
2547+ Retrieve the configuration value via
2548+ $ snap get network-manager wifi.powersave
2549+_verification:
2550+ The returned value should be "disable".
2551+
2552+id: network_manager/wireless/powersave_can_be_enabled
2553+category_id: network_manager
2554+plugin: manual
2555+_summary:
2556+ Enabling powersave with the configuration option of the snap should turn it on.
2557+_purpose:
2558+ The network-manager snap uses a configure hook to control how
2559+ the WiFi powersave option is set. It should be possible to enable
2560+ the option on the actual hardware wireless device with it.
2561+_steps:
2562+ 1. Enable powersave via the configure hook
2563+ $ snap set network-manager wifi.powersave=enable
2564+_verification:
2565+ Powersave should now be turned on for all wireless devices. This
2566+ can be verified with
2567+ $ snap install wireless-tools
2568+ $ sudo wireless-tools.iw dev wlan0 get power_save
2569+ Power save: on
2570diff --git a/pulseaudio/manage.py b/pulseaudio/manage.py
2571new file mode 100755
2572index 0000000..5e7f5ce
2573--- /dev/null
2574+++ b/pulseaudio/manage.py
2575@@ -0,0 +1,10 @@
2576+#!/usr/bin/env python3
2577+from plainbox.provider_manager import setup, N_
2578+
2579+setup(
2580+ name='plainbox-provider-pulseaudio',
2581+ namespace='2016.com.canonical.pulseaudio',
2582+ version="1.0",
2583+ description=N_("Plainbox provider for the PulseAudio snap"),
2584+ gettext_domain="2016_com_canonical_pulseaudio",
2585+)
2586diff --git a/pulseaudio/units/pulseaudio.pxu b/pulseaudio/units/pulseaudio.pxu
2587new file mode 100644
2588index 0000000..43af155
2589--- /dev/null
2590+++ b/pulseaudio/units/pulseaudio.pxu
2591@@ -0,0 +1,106 @@
2592+# Copyright 2016 Canonical Ltd.
2593+# All rights reserved.
2594+#
2595+# Written by:
2596+# Konrad Zapalowicz <konrad.zapalowicz@canonical.com>
2597+
2598+unit: category
2599+id: pulseaudio
2600+_name: PulseAudio
2601+
2602+id: pulseaudio/setup/ensure_interface_connection_setup
2603+category_id: pulseaudio
2604+_description: Ensure that the pulseaudio interface is auto-connected
2605+plugin: manual
2606+_steps:
2607+ 1. List the interfaces
2608+ .
2609+ $ snap interfaces
2610+ .
2611+_verification:
2612+ Verify that you see the following:
2613+ pulseaudio:service pulseaudio:client
2614+ :network pulseaudio
2615+
2616+id: pulseaudio/pactl/ensure-commands-can-be-run-by-root
2617+category_id: pulseaudio
2618+_description: Ensure that the pulseaudio commands can be run only by root
2619+plugin: manual
2620+depends: pulseaudio/setup/ensure_interface_connection_setup
2621+_steps:
2622+ 1. Try to run pactl
2623+ .
2624+ $ pulseaudio.pactl
2625+ .
2626+ 2. Try to run paplay
2627+ .
2628+ $ pulseaudio.paplay
2629+ .
2630+ 3. Try to run parec
2631+ .
2632+ $ pulseaudio.parec
2633+ .
2634+_verification:
2635+ Verify that each step ends with the following message:
2636+ This script must be run as root
2637+
2638+id: pulseaudio/pactl/ensure-modules-are-listed
2639+category_id: pulseaudio
2640+_description: Ensure that the correct modules are loaded
2641+plugin: manual
2642+depends: pulseaudio/setup/ensure_interface_connection_setup
2643+_steps:
2644+ 1. List the loaded modules
2645+ .
2646+ $ sudo pulseaudio.pactl list short
2647+ .
2648+_verification:
2649+ Verify that you see output similar to following:
2650+ 0 module-device-restore
2651+ 1 module-stream-restore
2652+ 2 module-card-restore
2653+ 3 module-augment-properties
2654+ 4 module-switch-on-port-available
2655+ 5 module-udev-detect
2656+ ...
2657+ 80 protocol-native.c pactl
2658+ 0 alsa_card.pci-0000_00_1b.0 module-alsa-card.c
2659+ .
2660+ Verify that amongs the other the following modules are listed:
2661+ module-device-restore
2662+ module-stream-restore
2663+ module-card-restore
2664+ module-switch-on-port-available
2665+ module-rescue-streams
2666+ module-always-sink
2667+
2668+id: pulseaudio/parecord/ensure-audio-can-be-recorded
2669+category_id: pulseaudio
2670+_description: Ensure that it is possible to record audio
2671+plugin: manual
2672+depends: pulseaudio/setup/ensure_interface_connection_setup
2673+_steps:
2674+ 1. Record an audio .wav file
2675+ .
2676+ $ sudo pulseaudio.parec ~/record.wav
2677+ .
2678+_verification:
2679+ Verify that the record.wav file has been created and it's size is
2680+ greater than zero. Verify that the recorded file can be played and
2681+ it is possible to hear the audio.
2682+
2683+id: pulseaudio/paplay/ensure-audio-can-be-played
2684+category_id: pulseaudio
2685+_description: Ensure that it is possible to play auio files
2686+plugin: manual
2687+depends: pulseaudio/setup/ensure_interface_connection_setup
2688+_steps:
2689+ 1. Play an audio .wav file
2690+ .
2691+ $ sudo pulseaudio.paplay ~/file.wav
2692+ .
2693+_verification:
2694+ Verify that the audio is hearable through the speakers. In case the
2695+ speakers are not available verify that the sink status has changed
2696+ from SUSPEND to RUNNING [use the sudo pulseaudio.pactl list sinks
2697+ command for that]
2698diff --git a/snapcraft.yaml b/snapcraft.yaml
2699index a6a81af..8be6477 100644
2700--- a/snapcraft.yaml
2701+++ b/snapcraft.yaml
2702@@ -1,3 +1,4 @@
2703+<<<<<<< snapcraft.yaml
2704 name: udisks2
2705 version: 2.6.4-3-dev
2706 summary: D-Bus service to access and manipulate storage devices
2707@@ -109,3 +110,125 @@ parts:
2708 source: .
2709 prime:
2710 - bin/udisksctl.sh
2711+=======
2712+name: canonical-se-engineering-tests
2713+summary: Canonical System Enablement Engineering Test cases
2714+description: >
2715+ Various test cases the System Enablement team at Canonical
2716+ executes before a snap is allowed to enter the store and
2717+ be used by any user.
2718+ The source code is available for reference and contribution at
2719+ https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests
2720+version: 6
2721+confinement: strict
2722+grade: stable
2723+
2724+apps:
2725+ plainbox:
2726+ command: bin/plainbox-wrapper
2727+ run:
2728+ command: bin/run-tests
2729+ bluez:
2730+ command: bin/run-bluez-tests
2731+ network-manager:
2732+ command: bin/run-network-manager-tests
2733+ modem-manager:
2734+ command: bin/run-modem-manager-tests
2735+ tpm:
2736+ command: bin/run-tpm-tests
2737+ wifi-ap:
2738+ command: bin/run-wifi-ap-tests
2739+ wireless-tools:
2740+ command: bin/run-wireless-tools-tests
2741+ pulseaudio:
2742+ command: bin/run-pulseaudio-tests
2743+ upower:
2744+ command: bin/plainbox-wrapper run -i '2016.com.canonical.upower::upower.*'
2745+ udisks2:
2746+ command: bin/run-udisks2-tests
2747+ alsa-utils:
2748+ command: bin/plainbox-wrapper run -i '2017.com.canonical.alsa-utils::alsa_utils.*'
2749+ media-hub:
2750+ command: bin/plainbox-wrapper run -i '2017.com.canonical.media-hub::media_hub.*'
2751+ captive-redirect:
2752+ command: bin/plainbox-wrapper run -i '2017.com.canonical.captive-redirect::captive_redirect.*'
2753+ wpa-supplicant:
2754+ command: bin/plainbox-wrapper run -i '2017.com.canonical.wpa-supplicant::wpa_supplicant.*'
2755+
2756+parts:
2757+ common:
2758+ plugin: dump
2759+ source: .
2760+ snap:
2761+ - COPYING
2762+ plainbox-local:
2763+ plugin: python
2764+ python-packages:
2765+ - plainbox
2766+ - requests-oauthlib
2767+ - xlsxwriter
2768+ build-packages:
2769+ - libxml2-dev
2770+ - libxslt1-dev
2771+ - zlib1g-dev
2772+ - build-essential
2773+ bluez:
2774+ plugin: plainbox-provider
2775+ source: ./bluez
2776+ after: [plainbox-local]
2777+ modem-manager:
2778+ plugin: plainbox-provider
2779+ source: ./modem-manager
2780+ after: [plainbox-local]
2781+ network-manager:
2782+ plugin: plainbox-provider
2783+ source: ./network-manager
2784+ after: [plainbox-local]
2785+ pulseaudio:
2786+ plugin: plainbox-provider
2787+ source: ./pulseaudio
2788+ after: [plainbox-local]
2789+ tpm:
2790+ plugin: plainbox-provider
2791+ source: ./tpm
2792+ after: [plainbox-local]
2793+ wifi-ap:
2794+ plugin: plainbox-provider
2795+ source: ./wifi-ap
2796+ after: [plainbox-local]
2797+ wireless-tools:
2798+ plugin: plainbox-provider
2799+ source: ./wireless-tools
2800+ after: [plainbox-local]
2801+ upower:
2802+ plugin: plainbox-provider
2803+ source: ./upower
2804+ after: [plainbox-local]
2805+ udisks2:
2806+ plugin: plainbox-provider
2807+ source: ./udisks2
2808+ after: [plainbox-local]
2809+ alsa-utils:
2810+ plugin: plainbox-provider
2811+ source: git://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/alsa-utils
2812+ source-branch: master
2813+ source-subdir: tests/manual
2814+ after: [plainbox-local]
2815+ media-hub:
2816+ plugin: plainbox-provider
2817+ source: ./media-hub
2818+ after: [plainbox-local]
2819+ captive-redirect:
2820+ plugin: plainbox-provider
2821+ source: ./captive-redirect
2822+ after: [plainbox-local]
2823+ wpa-supplicant:
2824+ plugin: plainbox-provider
2825+ source: ./wpa-supplicant
2826+ after: [plainbox-local]
2827+ launchers:
2828+ plugin: dump
2829+ source: .
2830+ snap:
2831+ - bin/
2832+>>>>>>> snapcraft.yaml
2833diff --git a/tpm/manage.py b/tpm/manage.py
2834new file mode 100755
2835index 0000000..7135842
2836--- /dev/null
2837+++ b/tpm/manage.py
2838@@ -0,0 +1,10 @@
2839+#!/usr/bin/env python3
2840+from plainbox.provider_manager import setup, N_
2841+
2842+setup(
2843+ name='plainbox-provider-tpm',
2844+ namespace='2016.com.canonical.tpm',
2845+ version="1.0",
2846+ description=N_("Plainbox provider for the TPM snap"),
2847+ gettext_domain="2016_com_canonical_tpm",
2848+)
2849diff --git a/tpm/units/tpm.pxu b/tpm/units/tpm.pxu
2850new file mode 100644
2851index 0000000..b00bd89
2852--- /dev/null
2853+++ b/tpm/units/tpm.pxu
2854@@ -0,0 +1,135 @@
2855+# Copyright 2016 Canonical Ltd.
2856+# All rights reserved.
2857+#
2858+# Written by:
2859+# Scott Sweeny <scott.sweeny@canonical.com>
2860+
2861+unit: category
2862+id: tpm1.2
2863+_name: TPM 1.2
2864+
2865+id: tpm1.2/setup/ensure_interface_connection_setup
2866+category_id: tpm1.2
2867+_description: Ensure that the tpm1.2 interfaces are connected
2868+plugin: manual
2869+_steps:
2870+ 1. Connect required tpm1.2 slots/plugs
2871+ .
2872+ $ sudo snap connect tpm:network :network
2873+ $ sudo snap connect tpm:network-bind :network-bind
2874+ $ sudo snap connect tpm:tpm :tpm
2875+ .
2876+_verification:
2877+ Verify that you see the following when running snap interfaces:
2878+ :network tpm
2879+ :network-bind tpm
2880+ :tpm tpm
2881+
2882+id: tpm1.2/setup/get_version
2883+category_id: tpm1.2
2884+plugin: manual
2885+depends: tpm1.2/setup/ensure_interface_connection_setup
2886+_summary: Can get version information from the TPM chip
2887+_purpose:
2888+ Check that basic communication with the TPM chip is working and that version
2889+ information can be retrieved with the expected command.
2890+_steps:
2891+ 1. Execute the following command to show the TPM version:
2892+ .
2893+ $ /snap/bin/tpm.version
2894+_verification:
2895+ Output is similar to below with all fields showing data:
2896+ .
2897+ TPM 1.2 Version Info:
2898+ Chip Version: 1.2.5.81
2899+ Spec Level: 2
2900+ Errata Revision: 3
2901+ TPM Vendor ID: WEC
2902+ Vendor Specific data: 0000
2903+ TPM Version: 01010000
2904+ Manufacturer Info: 57454300
2905+
2906+id: tpm1.2/setup/self_test
2907+category_id: tpm1.2
2908+plugin: manual
2909+depends: tpm1.2/setup/ensure_interface_connection_setup
2910+_summary: TPM self test runs successfully
2911+_purpose:
2912+ Check that the TPM self test runs successfully and returns no errors.
2913+_steps:
2914+ 1. Execute the following command to run the TPM self test:
2915+ .
2916+ $ /snap/bin/tpm.selftest
2917+_verification:
2918+ Output is similar to below (actual values are not important) and no
2919+ error messages are shown:
2920+ .
2921+ TPM Test Results:
2922+ ff010205 51ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
2923+ ffffffff ffffffff ffffffff ffff0000 00000000 00000000 00000000 00000000
2924+ 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000
2925+
2926+
2927+id: tpm1.2/configuration/take_ownership
2928+category_id: tpm1.2
2929+plugin: manual
2930+depends: tpm1.2/setup/ensure_interface_connection_setup
2931+_summary: Taking ownership of the device is possible
2932+_purpose:
2933+ Check that you are able to take ownership of the device using TPM commands.
2934+_steps:
2935+ 1.Execute the following command to take ownership of the TPM chip:
2936+ .
2937+ $ /snap/bin/tpm.takeownership
2938+ .
2939+_verification:
2940+ Verify that you are prompted for both the owner key and the SRK (storage
2941+ root key) and that no errors are returned.
2942+ .
2943+ NOTE: This command will only work if it has not been run before. You can
2944+ reset the TPM with:
2945+ .
2946+ $ /snap/bin/tpm.clear
2947+ .
2948+ Which will invalidate all existing keys and passwords and disable the chip.
2949+ Once this is done you must re-enable the TPM from the device's BIOS before
2950+ it can be used.
2951+
2952+id: tpm1.2/crypto/show_public_key
2953+category_id: tpm1.2
2954+plugin: manual
2955+depends: tpm1.2/setup/ensure_interface_connection_setup
2956+_summary: Showing the public endorsement key succeeds
2957+_purpose:
2958+ Check to make sure that the endorsement key pair exists and the public key
2959+ can be queried.
2960+_steps:
2961+ 1. Execute the following command to see the public key:
2962+ .
2963+ $ /snap/bin/tpm.getpubek
2964+ .
2965+ You may see an error similar to:
2966+ .
2967+ Tspi_TPM_GetPubEndorsementKey failed: 0x00000008 - layer=tpm, code=0008 (8), The TPM target command has been disabled
2968+ .
2969+ This can be safely ignored as long as the public key data is displayed.
2970+_verification:
2971+ Verify that the public key data is shown, for example:
2972+ .
2973+ Public Endorsement Key:
2974+ Version: 01010000
2975+ Usage: 0x0002 (Unknown)
2976+ Flags: 0x00000000 (!VOLATILE, !MIGRATABLE, !REDIRECTION)
2977+ AuthUsage: 0x00 (Never)
2978+ Algorithm: 0x00000020 (Unknown)
2979+ Encryption Scheme: 0x00000012 (Unknown)
2980+ Signature Scheme: 0x00000010 (Unknown)
2981+ Public Key:
2982+ 8b59fad6 83514128 d56e2aa0 5eef7cff ad23c90d 0dd9b1e2 31ef093d 72d947d8
2983+ e02fbe3a 3c235ff0 9c487973 40a28c9b 8b83aaaf dc1254ad 31a95410 811742e5
2984+ 92c16823 6f663413 f7067d3a 9af09ccc 12944a13 51d32980 59a98740 4008ab0c
2985+ 07b7d93b 9393691c 8ae7d84c 5fd4fcef 147934f1 09326225 d5d1b652 ab3e12ee
2986+ fbd1cfba b18abedc de2215cb 97006b92 839fd9a4 3158bc8f 028fe516 550905b3
2987+ e3eef1e1 9f8dd3ab 331cbe62 d32ce937 0c11ad41 1d2e50f3 c69c7cde cd0bf564
2988+ 4b7b16f8 0885dc66 d4411aba a824c1f1 ea8aa743 5c62fad7 e9540b85 5c0dc7af
2989+ 3c1615ae 56af18e4 770aa107 06ef274b 202e2e3e d4c280d8 5ca9e886 9d889e31
2990diff --git a/udisks2/manage.py b/udisks2/manage.py
2991new file mode 100755
2992index 0000000..ead6da0
2993--- /dev/null
2994+++ b/udisks2/manage.py
2995@@ -0,0 +1,10 @@
2996+#!/usr/bin/env python3
2997+from plainbox.provider_manager import setup, N_
2998+
2999+setup(
3000+ name='plainbox-provider-udisks2',
3001+ namespace='2017.com.canonical.udisks2',
3002+ version="1.0",
3003+ description=N_("Plainbox provider for the udisks2 snap"),
3004+ gettext_domain="2017_com_canonical_udisks2",
3005+)
3006diff --git a/udisks2/units/udisks2.pxu b/udisks2/units/udisks2.pxu
3007new file mode 100644
3008index 0000000..7667aa5
3009--- /dev/null
3010+++ b/udisks2/units/udisks2.pxu
3011@@ -0,0 +1,319 @@
3012+# Copyright 2017 Canonical Ltd.
3013+# All rights reserved.
3014+#
3015+# Written by:
3016+# Scott Sweeny <scott.sweeny@canonical.com>
3017+
3018+unit: category
3019+id: udisks2
3020+_name: UDisks2
3021+
3022+id: udisks2/setup/ensure_interface_connection_setup
3023+category_id: udisks2
3024+_description: Ensure that the udisks2 interfaces are connected
3025+plugin: manual
3026+_steps:
3027+ 1. Run the following:
3028+ $ sudo snap interfaces udisks2
3029+ .
3030+_verification:
3031+ Verify that you see the following:
3032+ Slot Plug
3033+ :mount-observe udisks2
3034+ :network-bind udisks2
3035+ udisks2:service udisks2:client
3036+ - udisks2:hardware-observe
3037+
3038+id: udisks2/client/can_communicate_with_udisksd
3039+category_id: udisks2
3040+plugin: manual
3041+depends: udisks2/setup/ensure_interface_connection_setup
3042+_summary: udisksctl can communicate with udisksd
3043+_purpose:
3044+ Makes sure udisksctl can communicate with udisksd
3045+_steps:
3046+ 1. Run a simple udisksctl command
3047+ .
3048+ $ sudo udisks2.udisksctl status
3049+ .
3050+_verification:
3051+ Verify that the command returns a list of connected storage devices and no
3052+ errors.
3053+
3054+id: udisks2/service/can_receive_hotplug_events
3055+category_id: udisks2
3056+plugin:manual
3057+depends: udisks2/client/can_communicate_with_udisksd
3058+_summary: udisks can see when a drive is plugged in
3059+_purpose:
3060+ Makes sure that udisks gets the hotplug event when a USB drive is
3061+ plugged in
3062+_steps:
3063+ 1. Start the udisks client and have it watch for new events
3064+ .
3065+ $ sudo udisks2.udisksctl monitor
3066+ .
3067+ 2. Plug in a USB storage device and wait for activity from the client
3068+ .
3069+ 3. Unplug the USB storage device and wait for activity from the client
3070+ .
3071+_verification:
3072+ Verify that udisks shows information about the USB device when it's plugged
3073+ in, and that it recognizes when the device is removed.
3074+ .
3075+ The information shown when the device is plugged in will be everything
3076+ udisks knows about the device and its partitions, expressed as DBus objects.
3077+ You will likely see something like:
3078+ .
3079+ 21:37:20.621: Added /org/freedesktop/UDisks2/drives/Kingston_DataTraveler_2_2e0_0607151625382
3080+ org.freedesktop.UDisks2.Drive:
3081+ CanPowerOff: true
3082+ Configuration: {}
3083+ ConnectionBus: usb
3084+ Ejectable: true
3085+ Id: Kingston-DataTraveler-2.0-0607151625382
3086+ Media: thumb
3087+ MediaAvailable: true
3088+ MediaChangeDetected: true
3089+ .
3090+ and so on for the drive itself, each block device, and each filesystem
3091+
3092+id: udisks2/service/can_mount_unmount
3093+category_id: udisks2
3094+plugin: manual
3095+depends: udisks2/client/can_communicate_with_udisksd
3096+_summary: udisks can mount and unmount a storage device
3097+_purpose:
3098+ Makes sure that udisks can mount and unmount a storage device, and that
3099+ the mount points are visible outside of the snap
3100+_steps:
3101+ 1. Plug in a USB storage device
3102+ 2. Run the following:
3103+ .
3104+ $ sudo udisks2.udisksctl status
3105+ .
3106+ and note the name under the "DEVICE" column for the drive you just
3107+ plugged in. It should be "sdb" or similar
3108+ 3. Mount the filesystem on the device:
3109+ .
3110+ $ sudo udisks2.udisksctl mount -b /dev/<device>1
3111+ .
3112+ Where <device> is the value from the status call above. This should mount
3113+ the first filesystem on the device and return the path
3114+ 4. Examine the mount point:
3115+ .
3116+ $ sudo -s # You must be root to see the mount point
3117+ $ ls /mountpoint/path/returned/above
3118+ .
3119+ Make sure the contents of that directory match what you expect to see on
3120+ the drive.
3121+ .
3122+ Leave the root shell
3123+ $ exit
3124+ 5. Unmount the filesystem:
3125+ .
3126+ $ sudo udisks2.udisksctl unmount -b /dev/<device>1
3127+_verification:
3128+ Verify that mounts and unmounts are performed successfully, and that the
3129+ contents of the drive can be seen from your shell (i.e. outside of the snap's
3130+ own namespace)
3131+
3132+id: udisks2/automount/default_off
3133+category_id: udisks2
3134+plugin: manual
3135+depends: udisks2/setup/ensure_interface_connection_setup
3136+_summary: The automount option defaults to off
3137+_purpose:
3138+ Makes sure that the automount option defaults to disabled
3139+_steps:
3140+ 1. Install the udisks2 snap fresh (i.e. not an upgrade)
3141+ 2. Run the following:
3142+ .
3143+ $ sudo snap get udisks2 automount.enable
3144+_verification:
3145+ Verify that the returned value is "false"
3146+
3147+id: udisks2/automount/disabling_works
3148+category_id: udisks2
3149+plugin: manual
3150+depends: udisks2/automount/default_off
3151+_summary: Disabling automount actually disables automount
3152+_purpose:
3153+ Makes sure that when automount.enabled is set to "false" automounts are
3154+ prevented
3155+_steps:
3156+ 1. Make sure that automount is disabled. Run:
3157+ .
3158+ $ sudo snap set udisks2 automount.enable=false
3159+ 2. Plug in a USB storage device
3160+_verification:
3161+ Verify that no filesystem on the USB device was mounted. /media/root/ should
3162+ be empty
3163+
3164+id: udisks2/automount/automount_works
3165+category_id: udisks2
3166+plugin: manual
3167+depends: udisks2/automount/default_off
3168+_summary: When enabled, automounting works
3169+_purpose:
3170+ Makes sure that automounting a USB drive works when the option is enabled
3171+_steps:
3172+ 1. Make sure that automount is enabled. Run:
3173+ .
3174+ $ sudo snap set udisks2 automount.enable=true
3175+ 2. Plug in a USB storage drive
3176+_verification:
3177+ Verify that the filesystem on the USB device was mounted to
3178+ /media/root/<filesystem label>, for example /media/root/7C69-3855
3179+
3180+id: udisks2/automount/automount_does_not_mount_system_devices
3181+category_id: udisks2
3182+plugin: manual
3183+depends: udisks2/automount/automount_works
3184+_summary: When enabled, automount does not mount system devices
3185+_purpose:
3186+ Makes sure that automount is only restricted to pluggable devices, not system
3187+_steps:
3188+ 1. Make sure that automount is enabled. Run:
3189+ .
3190+ $ sudo snap set udisks2 automount.enable=true
3191+ 3. Reboot the device and wait for it to power on again
3192+ 4. Run the following:
3193+ .
3194+ $ sudo udisks2.udisksctl status
3195+ .
3196+ and check the names under the "DEVICE" column. It should just contain
3197+ thumb drives [if any is plugged-in] and the filesystem. For example,
3198+ in case of RaspberryPi it would contain just: mmcblk0.
3199+ Make sure that system devices, such as an ESP partition, are
3200+ not displayed here.
3201+ 5. Examine the mount point:
3202+ .
3203+ $ sudo -s # You must be root to see the mount point
3204+ $ ls /media/root
3205+ .
3206+ Make sure the contents of that directory match what you expect to see on
3207+ the drive.
3208+ .
3209+ Leave the root shell
3210+ $ exit
3211+_verification:
3212+ Verify that none of the system devices were mounted and their filesystems
3213+ are not available /media/root/<filesystem label>
3214+
3215+id: udisks2/automount/automount_does_mount_usb_devices_plugged_before_boot
3216+category_id: udisks2
3217+plugin: manual
3218+depends: udisks2/automount/automount_works
3219+_summary: When enabled, automount mount USB devices plugged before boot
3220+_purpose:
3221+ Makes sure that system can mount devices plugged in before boot
3222+_steps:
3223+ 1. Make sure that automount is enabled. Run:
3224+ .
3225+ $ sudo snap set udisks2 automount.enable=true
3226+ 2. Switch the device off, insert USB flash drive and boot the device again
3227+ 3. Run the following:
3228+ .
3229+ $ sudo udisks2.udisksctl status
3230+ .
3231+ and check the names under the "DEVICE" column. It should contain the device
3232+ that has been plugged before booting.
3233+ 4. Examine the mount point:
3234+ .
3235+ $ sudo -s # You must be root to see the mount point
3236+ $ ls /media/root
3237+ .
3238+ Make sure the contents of that directory match what you expect to see on
3239+ the drive.
3240+ .
3241+ Leave the root shell
3242+ $ exit
3243+_verification:
3244+ Verify that the cold-plugged device is mounted on boot
3245+
3246+id: udisks2/automount/automount_works_after_manual_unmount
3247+category_id: udisks2
3248+plugin: manual
3249+depends: udisks2/automount/automount_works
3250+_summary: When enabled, automount still works after unmount has been called manually
3251+_purpose:
3252+ Make sure that the system can auto mount devices after the unmount has been called
3253+_steps:
3254+ 1. Make sure that automount is enabled. Run:
3255+ .
3256+ $ sudo snap set udisks2 automount.enable=true
3257+ 2. Insert USB flash drive
3258+ 3. Examine the mount point:
3259+ .
3260+ $ sudo ls /media/root
3261+ .
3262+ Make sure the USB drive that just have been plugged in is listed there.
3263+ 4. Run the following:
3264+ .
3265+ $ sudo udisks2.udisksctl status
3266+ .
3267+ and check the names under the "DEVICE" column. It should contain the device
3268+ that has been plugged before booting.
3269+ 5. Unmount manually:
3270+ .
3271+ $ sudo udisks2.udisksctl unmount -b /dev/<device>1
3272+ 6. Insert another USB flash drive
3273+ 7. Examine the mount point:
3274+ .
3275+ $ sudo ls /media/root
3276+ .
3277+ Make sure the USB drive that just have been plugged in is listed there.
3278+_verification:
3279+ Verify that the USB drive that has been plugged in after the first one has
3280+ been unmounted manually is mounted.
3281+
3282+id: udisks2/debug/default_off
3283+category_id: udisks2
3284+plugin: manual
3285+depends: udisks2/setup/ensure_interface_connection_setup
3286+_summary: The debug option defaults to off
3287+_purpose:
3288+ Makes sure that the debug option defaults to disabled
3289+_steps:
3290+ 1. Install the udisks2 snap fresh (i.e. not an upgrade)
3291+ 2. Run the following:
3292+ .
3293+ $ sudo snap get udisks2 debug.enable
3294+_verification:
3295+ Verify that the returned value is "false"
3296+
3297+id: udisks2/debug/disabling_works
3298+category_id: udisks2
3299+plugin: manual
3300+depends: udisks2/debug/default_off
3301+_summary: Disabling debug actually disables debug logging
3302+_purpose:
3303+ Makes sure that when debug.enabled is set to "false" no loggs are written
3304+_steps:
3305+ 1. Make sure that debug is disabled. Run:
3306+ .
3307+ $ sudo snap set udisks2 debug.enable=false
3308+ 2. Plug in a USB storage device
3309+_verification:
3310+ Verify that no debug information coming from files such as jobs.go,
3311+ dispatcher.go, udisks2.go is written to the journal.
3312+
3313+id: udisks2/automount/debug_works
3314+category_id: udisks2
3315+plugin: manual
3316+depends: udisks2/debug/default_off
3317+_summary: When debug is enabled logs are available
3318+_purpose:
3319+ Makes sure that when debug option is enabled the logs are available
3320+_steps:
3321+ 1. Make sure that debug is enabled. Run:
3322+ .
3323+ $ sudo snap set udisks2 debug.enable=true
3324+ 2. Restart ciborium service for the above change to take effect
3325+ .
3326+ $ sudo systemctl restart snap.udisks2.ciborium.service
3327+ 3. Plug in a USB storage drive
3328+_verification:
3329+ Verify that debug information coming from udisks2 snap (files such as
3330+ jobs.go, dispatcher.go, udisks2.go) is written to the journal.
3331diff --git a/upower/manage.py b/upower/manage.py
3332new file mode 100755
3333index 0000000..a30933e
3334--- /dev/null
3335+++ b/upower/manage.py
3336@@ -0,0 +1,10 @@
3337+#!/usr/bin/env python3
3338+from plainbox.provider_manager import setup, N_
3339+
3340+setup(
3341+ name='plainbox-provider-upower',
3342+ namespace='2016.com.canonical.upower',
3343+ version="1.0",
3344+ description=N_("Plainbox provider for the upower snap"),
3345+ gettext_domain="2016_com_canonical_upower",
3346+)
3347diff --git a/upower/units/00_general.pxu b/upower/units/00_general.pxu
3348new file mode 100644
3349index 0000000..3ab4d2d
3350--- /dev/null
3351+++ b/upower/units/00_general.pxu
3352@@ -0,0 +1,52 @@
3353+# Copyright 2016 Canonical Ltd.
3354+# All rights reserved.
3355+#
3356+# Written by:
3357+# Simon Fels <simon.fels@canonical.com>
3358+
3359+unit: category
3360+id: upower
3361+_name: UPower
3362+
3363+id: upower/general/can_be_installed
3364+category_id: upower
3365+_description: Ensure that the upower snap can be installed
3366+plugin: manual
3367+_steps:
3368+ Install upower snap from the appropiate channel via the following command
3369+ .
3370+ $ snap install --candidate upower
3371+ .
3372+ NOTE: Depending on which channel you want to test you need to select the
3373+ right one. The command above uses the candidate channel as that is the
3374+ most used one.
3375+_verification:
3376+ The installation of the snap should finish with no errors.
3377+
3378+id: upower/general/service_started
3379+category_id: upower
3380+_description: Ensure that the upowerd service is up and running
3381+plugin: manual
3382+_steps:
3383+ Check service status with the following command
3384+ $ systemctl status snap.upower.service.service
3385+_verification:
3386+ Output should look like this:
3387+ snap.upower.upowerd.service - Service for snap application upower.upowerd
3388+ Loaded: loaded (/etc/systemd/system/snap.upower.upowerd.service; enabled; vendor preset: enabled)
3389+ Active: active (running) since Thu 2016-12-15 16:13:37 UTC; 54ms ago
3390+ Main PID: 4265 (upowerd)
3391+ CGroup: /system.slice/snap.upower.upowerd.service
3392+ 4265 /snap/upower/x1/usr/libexec/upowerd
3393+
3394+id: upower/general/client_can_talk_to_service
3395+category_id: upower
3396+_description: Verify that the upower client can talk to the service
3397+plugin: manual
3398+_steps:
3399+ Enumerate available devices available on the system:
3400+ $ upower -e
3401+_verification:
3402+ Output should look like this and at least one device should be present:
3403+ /org/freedesktop/UPower/devices/battery_BAT0
3404+ /org/freedesktop/UPower/devices/DisplayDevice
3405diff --git a/upower/units/10_battery_powered.pxu b/upower/units/10_battery_powered.pxu
3406new file mode 100644
3407index 0000000..d5fe6b1
3408--- /dev/null
3409+++ b/upower/units/10_battery_powered.pxu
3410@@ -0,0 +1,129 @@
3411+# Copyright 2016 Canonical Ltd.
3412+# All rights reserved.
3413+#
3414+# Written by:
3415+# Simon Fels <simon.fels@canonical.com>
3416+
3417+id: upower/battery_powered/battery_detected
3418+category_id: upower
3419+_description: Verify upower is able to detect the battery of the system
3420+plugin: manual
3421+_steps:
3422+ Query upowerd for available power devices on the system
3423+ $ upower -d
3424+_verification:
3425+ The output should be similar to the following and should list the
3426+ battery of your system:
3427+ .
3428+ Device: /org/freedesktop/UPower/devices/line_power_AC
3429+ native-path: AC
3430+ power supply: yes
3431+ updated: Do 15 Dez 2016 15:06:55 CET (7163 seconds ago)
3432+ has history: no
3433+ has statistics: no
3434+ line-power
3435+ warning-level: none
3436+ online: yes
3437+ icon-name: 'ac-adapter-symbolic'
3438+ .
3439+ Device: /org/freedesktop/UPower/devices/battery_BAT0
3440+ native-path: BAT0
3441+ vendor: SANYO
3442+ model: 45N1779
3443+ serial: 115
3444+ power supply: yes
3445+ updated: Do 15 Dez 2016 17:05:18 CET (60 seconds ago)
3446+ has history: yes
3447+ has statistics: yes
3448+ battery
3449+ present: yes
3450+ rechargeable: yes
3451+ state: fully-charged
3452+ warning-level: none
3453+ energy: 97,05 Wh
3454+ energy-empty: 0 Wh
3455+ energy-full: 97,13 Wh
3456+ energy-full-design: 99,47 Wh
3457+ energy-rate: 7,983 W
3458+ voltage: 12,374 V
3459+ percentage: 99%
3460+ capacity: 97,6475%
3461+ technology: lithium-ion
3462+ icon-name: 'battery-full-charged-symbolic'
3463+ .
3464+ Device: /org/freedesktop/UPower/devices/DisplayDevice
3465+ power supply: yes
3466+ updated: Do 15 Dez 2016 16:41:14 CET (1504 seconds ago)
3467+ has history: no
3468+ has statistics: no
3469+ battery
3470+ present: yes
3471+ state: fully-charged
3472+ warning-level: none
3473+ energy: 97,05 Wh
3474+ energy-full: 97,13 Wh
3475+ energy-rate: 7,983 W
3476+ percentage: 99%
3477+ icon-name: 'battery-full-charged-symbolic'
3478+ .
3479+ Daemon:
3480+ daemon-version: 0.99.4
3481+ on-battery: no
3482+ lid-is-closed: no
3483+ lid-is-present: yes
3484+ critical-action: PowerOff
3485+
3486+id: upower/battery_powered/battery_discharging
3487+category_id: upower
3488+_description: Verify upower reports discharging battery
3489+plugin: manual
3490+_steps:
3491+ 1. Unplug the power cable from your battery powered device
3492+ 2. Listen to reported changes from upower
3493+ $ upower -m
3494+_verification:
3495+ Leave the monitor running for some time. It should report the device changes
3496+ for the battery device:
3497+ .
3498+ [17:22:55.277]device changed: /org/freedesktop/UPowerr/devices/battery_BAT0
3499+ [17:22:55.277]device changed: /org/freedesktop/UPower/devices/battery_BAT0
3500+ .
3501+ Verify with the following command that the actual battery capacity is changing
3502+ .
3503+ $ upower -i /org/freedesktop/UPower/devices/battery_BAT0 | capacity
3504+ capacity: 97,6475%
3505+ .
3506+ and that the state of the battery device is changed to 'discharging'
3507+ .
3508+ $ upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep state
3509+ state: discharging
3510+
3511+id: upower/battery_powered/low_battery_causes_poweroff
3512+category_id: upower
3513+_description: Verify upower reports discharging battery
3514+plugin: manual
3515+_steps:
3516+ A battery with a low capacity should cause the device to power off. This
3517+ involves as a first step to wait until the battery of the device under test
3518+ is close to being empty. The default trigger of the poweroff action is by
3519+ default at <= 2%
3520+ .
3521+ Depending on how full your device battery is you have to wait some time
3522+ until it is discharged enough.
3523+ .
3524+ Watch the system via
3525+ .
3526+ $ sudo journalctl --no-pager -f
3527+_verification:
3528+ Once the defined threshold of the battery capacity is reached the system
3529+ should power off itself. You can spot this by looking at the output
3530+ of the journalctl command which should print something like:
3531+ .
3532+ Dec 15 16:37:02 localhost.localdomain systemd-logind[1022]: System is powering down
3533+ [...]
3534+ Dec 15 16:37:02 localhost.localdomain systemd[1]: Starting Power-Off...
3535+ Dec 15 16:37:02 localhost.localdomain systemd[1]: Starting Update UTMP about System Runlevel Changes...
3536+ Dec 15 16:37:02 localhost.localdomain systemd[1]: Started Power-Off.
3537+ Dec 15 16:37:02 localhost.localdomain systemd[1]: Started Update UTMP about System Runlevel Changes.
3538+ Dec 15 16:37:02 localhost.localdomain systemd[1]: Reached target Power-Off.
3539+ Dec 15 16:37:02 localhost.localdomain systemd-logind[1022]: Operation 'shutdown' finished.
3540diff --git a/upower/units/20_ac_powered.pxu b/upower/units/20_ac_powered.pxu
3541new file mode 100644
3542index 0000000..169f0e3
3543--- /dev/null
3544+++ b/upower/units/20_ac_powered.pxu
3545@@ -0,0 +1,49 @@
3546+# Copyright 2016 Canonical Ltd.
3547+# All rights reserved.
3548+#
3549+# Written by:
3550+# Simon Fels <simon.fels@canonical.com>
3551+
3552+id: upower/ac_powered/source_detected
3553+category_id: upower
3554+_description: Verify upower is able to detect the AC power source
3555+plugin: manual
3556+_steps:
3557+ Query upowerd for available power devices on the system
3558+ .
3559+ $ upower -e
3560+_verification:
3561+ The AC power source should be listed in the result, e.g.:
3562+ .
3563+ /org/freedesktop/UPower/devices/line_power_AC
3564+
3565+id: upower/ac_powered/status_plugged
3566+category_id: upower
3567+_description: Verify upower report AC source as plugged
3568+plugin: manual
3569+_steps:
3570+ Plug in the AC adapter to your device and query upower with
3571+ .
3572+ $ upower -i /org/freedesktop/UPower/devices/line_power_AC | grep online
3573+ for the online status of the source.
3574+_verification:
3575+ The output should be
3576+ .
3577+ online: yes
3578+ .
3579+ If the source is not plugged upower will report a "no" instead of "yes".
3580+
3581+id: upower/ac_powered/status_unplugged
3582+category_id: upower
3583+_description: Verify upower report AC source as unplugged
3584+plugin: manual
3585+_steps:
3586+ Unplug the AC adapter from your device and query upower with
3587+ $ upower -i /org/freedesktop/UPower/devices/line_power_AC | grep online
3588+ for the online status of the source.
3589+_verification:
3590+ The output should be
3591+ .
3592+ online: no
3593+ .
3594+ If the source is plugged upower will report a "yes" instead of "no".
3595diff --git a/wifi-ap/manage.py b/wifi-ap/manage.py
3596new file mode 100755
3597index 0000000..824585c
3598--- /dev/null
3599+++ b/wifi-ap/manage.py
3600@@ -0,0 +1,10 @@
3601+#!/usr/bin/env python3
3602+from plainbox.provider_manager import setup, N_
3603+
3604+setup(
3605+ name='plainbox-provider-wifi-ap',
3606+ namespace='2016.com.canonical.wifi-ap',
3607+ version="1.0",
3608+ description=N_("Plainbox provider for the WiFi AP snap"),
3609+ gettext_domain="2016_com_canonical_wifi_ap",
3610+)
3611diff --git a/wifi-ap/units/wifi-ap.pxu b/wifi-ap/units/wifi-ap.pxu
3612new file mode 100644
3613index 0000000..503197a
3614--- /dev/null
3615+++ b/wifi-ap/units/wifi-ap.pxu
3616@@ -0,0 +1,158 @@
3617+# Copyright 2016 Canonical Ltd.
3618+# All rights reserved.
3619+#
3620+# Written by:
3621+# Jim Hodapp <jim.hodapp@canonical.com>
3622+# Simon Fels <simon.fels@canonical.com>
3623+
3624+unit: category
3625+id: wifi_ap
3626+_name: WiFi Access Point
3627+
3628+id: wifi_ap/setup/ensure_interface_connection_setup
3629+category_id: wifi_ap
3630+_description: Ensure that the wifi_ap interfaces are connected
3631+plugin: manual
3632+_steps:
3633+ 0. If the wifi-ap snap is already installed remove it via
3634+ .
3635+ $ snap remove wifi-ap
3636+ .
3637+ 1. Network Manager setup
3638+ .
3639+ For snaps on Classic:
3640+ NetworkManager is part of the base Ubuntu Desktop system
3641+ and does not need to be installed again.
3642+ .
3643+ For an Ubuntu Core system you have to install
3644+ the NetworkManager snap from the Ubuntu store.
3645+ $ snap install network-manager
3646+ .
3647+ 2. Install now the wifi-ap snap via
3648+ .
3649+ $ snap install wifi-ap
3650+ .
3651+_verification:
3652+ Verify that you see the following when running snap interfaces:
3653+ :firewall-control wifi-ap
3654+ :network-control wifi-ap
3655+ :network wifi-ap
3656+ :network-bind wifi-ap
3657+ .
3658+ For snaps on Classic:
3659+ :network-manager wifi-ap
3660+ .
3661+ For full-snap based system:
3662+ network-manager:service wifi-ap:network-manager
3663+
3664+id: wifi_ap/configuration/get_all
3665+category_id: wifi_ap
3666+plugin: manual
3667+depends: wifi_ap/setup/ensure_interface_connection_setup
3668+_summary: All WiFi AP configuration items are listed
3669+_purpose:
3670+ Check if the configuration of the WiFi AP can be listed
3671+ with the expected command.
3672+_steps:
3673+ 1. Execute the following command to retrieve all configuration items:
3674+ .
3675+ $ /snap/bin/wifi-ap.config get
3676+_verification:
3677+ All available configuration items are listed as output.
3678+
3679+id: wifi_ap/configuration/set_any
3680+category_id: wifi_ap
3681+plugin: manual
3682+depends: wifi_ap/setup/ensure_interface_connection_setup
3683+_summary: Setting any configuration key is possible
3684+_purpose:
3685+ Check if any configuration key can be set via the
3686+ configuration system of the snap.
3687+_steps:
3688+ 1. Retrieve the current value of a specific configuration item
3689+ e.g. 'wifi.interface'.
3690+ .
3691+ $ /snap/bin/wifi-ap.config get wifi.interface
3692+ .
3693+ 2. Set a new value for the same configuration item
3694+ .
3695+ $ sudo /snap/bin/wifi-ap.config set wifi.interface=wlan1
3696+ .
3697+ 3. Retrieve the current value of the same configuration item
3698+ for comparison.
3699+ .
3700+ $ /snap/bin/wifi-ap.config get wifi.interface
3701+_verification:
3702+ Verify that the new value for the configuration is not the same
3703+ as before the 'set' operation and is now the the value specified
3704+ in step 2.
3705+
3706+id: wifi_ap/connect/enable_ap
3707+category_id: wifi_ap
3708+plugin: manual
3709+depends: wifi_ap/setup/ensure_interface_connection_setup
3710+_summary: Enabling the AP succeeds
3711+_purpose:
3712+ Check to make sure the AP can be enabled.
3713+_steps:
3714+ 0. If the AP is already enabled as on some devices where the
3715+ automated wizard was able to find a good configuration
3716+ automatically you can skip the following steps. You can
3717+ verify if the AP is active by calling
3718+ .
3719+ $ /snap/bin/wifi-ap.status
3720+ ap.active: true
3721+ .
3722+ 1. Look up and set the wifi interface to the proper name
3723+ e.g. from default wlan0 to enp0s3
3724+ .
3725+ $ ifconfig
3726+ $ /snap/bin/wifi-ap.config set wifi.interface=<interface_name>
3727+ .
3728+ 2. Enable the AP with the default configuration for other key values
3729+ .
3730+ $ sudo /snap/bin/wifi-ap.config set disabled=false
3731+ .
3732+ 3. Verify that the AP is enabled by looking at the key/value pair
3733+ .
3734+ $ /snap/bin/wifi-ap.config get disabled
3735+_verification:
3736+ Verify that the new value for the disabled is set to false. Also verify that a
3737+ different machine such as a phone or a laptop can connect to the AP using
3738+ SSID of "Ubuntu" and no security type.
3739+
3740+id: wifi_ap/configuration/control_socket
3741+category_id: wifi_ap
3742+plugin: manual
3743+depends: wifi_ap/setup/ensure_interface_connection_setup
3744+_summary: Check content interface
3745+_purpose:
3746+ Check if the content interface is accessible and
3747+ it exports a socket for a consumer snap.
3748+_steps:
3749+ 1. Install the wifiap-consumer snap
3750+ .
3751+ $ sudo snap install wifiap-consumer
3752+ .
3753+ 2. Connect the wifi-ap and wifiap-consumer content interface
3754+ .
3755+ $ sudo snap connect wifiap-consumer:control wifi-ap:control
3756+ .
3757+ 3. Get the configuration with the unix HTTP client
3758+ .
3759+ $ sudo wifiap-consumer.unixhttpc /v1/configuration
3760+ .
3761+_verification:
3762+ Verify that the configuration is a valid JSON with reasonable data, like:
3763+ {
3764+ "result": {
3765+ "debug": false,
3766+ "disabled": false,
3767+ "wifi.interface": "wlan0",
3768+ "wifi.security": "open",
3769+ "wifi.ssid": "Ubuntu"
3770+ },
3771+ "status": "OK",
3772+ "status-code": 200,
3773+ "type": "sync"
3774+ }
3775diff --git a/wireless-tools/manage.py b/wireless-tools/manage.py
3776new file mode 100755
3777index 0000000..93a5a14
3778--- /dev/null
3779+++ b/wireless-tools/manage.py
3780@@ -0,0 +1,10 @@
3781+#!/usr/bin/env python3
3782+from plainbox.provider_manager import setup, N_
3783+
3784+setup(
3785+ name='plainbox-provider-wireless-tools',
3786+ namespace='2016.com.canonical.wireless-tools',
3787+ version="1.0",
3788+ description=N_("Plainbox provider for the Wireless tools snap"),
3789+ gettext_domain="2016_com_canonical_wireless_tools",
3790+)
3791diff --git a/wireless-tools/units/wireless-tools.pxu b/wireless-tools/units/wireless-tools.pxu
3792new file mode 100644
3793index 0000000..39c070e
3794--- /dev/null
3795+++ b/wireless-tools/units/wireless-tools.pxu
3796@@ -0,0 +1,100 @@
3797+# Copyright 2016 Canonical Ltd.
3798+# All rights reserved.
3799+#
3800+# Written by:
3801+# Konrad Zapalowicz <konrad.zapalowicz@canonical.com>
3802+
3803+unit: category
3804+id:wireless-tools
3805+_name: Wireless Tools
3806+
3807+id: wireless-tools/setup/ensure_interface_connection_setup
3808+category_id: wireless-tools
3809+_description: Ensure that wireless_tools interfaces are connected
3810+plugin: manual
3811+_steps:
3812+ 1. Connect required wireless-tools slots/plugs
3813+ .
3814+ $ sudo snap connect wireless-tools:network-control :network-control
3815+ .
3816+_verification:
3817+ Verify that you see the following when running snap interfaces:
3818+ :network wireless-tools
3819+ :network-bind wireless-tools
3820+ :network-control wireless-tools
3821+
3822+id: wireless-tools/rfkill/list
3823+category_id:wireless-tools
3824+plugin: manual
3825+depends: wireless-tools/setup/ensure_interface_connection_setup
3826+_summary: The RF kill switches are listed
3827+_purpose: Check if all RF kill switches that are available on the HW are listed.
3828+_steps:
3829+ 1. Execute the following command to retrieve the list of all RF kill switches:
3830+ .
3831+ $ /snap/bin/wireless-tools.rfkill list
3832+ .
3833+_verification:
3834+ Your expected RF kill switche(s) is/are shown in the output such as:
3835+ <id>: <name>: <description>
3836+ Soft blocked: <yes|no>
3837+ Hard blocked: <yes|no>
3838+ .
3839+ For example:
3840+ 1: phy0: Wireless LAN
3841+ Soft blocked: no
3842+ Hard blocked: no
3843+ 2: hci0: Bluetooth
3844+ Soft blocked: yes
3845+ Hard blocked: no
3846+
3847+id: wireless-tools/rfkill/change_state
3848+category_id:wireless-tools
3849+plugin: manual
3850+depends: wireless-tools/rfkill/list
3851+_summary: It is possible to change the state of RF kill
3852+_purpose: Check if it is possible to change a state of the RF kill switch
3853+_steps:
3854+ 1. Execute the following commands first to list the available RF kill switches
3855+ .
3856+ $ /snap/bin/wireles-tools.rfkill list
3857+ .
3858+ 2. Change the state of the selected RF kill switch using the id obtained in
3859+ the previous step. Note that the action: block or unblock shall be selected
3860+ based on the initial state of the RF kill switch: blocked yes or no.
3861+ .
3862+ $ /snap/bin/wireless-tools.rfkill [un]block <id>
3863+ .
3864+_verification:
3865+ There shall be no output on the standard output however there shall be a
3866+ change of state visible when listing the RF kill switches.
3867+ .
3868+ $ /snap/bin/wireless_tools.rfkill list
3869+ .
3870+
3871+id: wireless_tools/rfkill/capture_event
3872+category_id: wireless-tools
3873+plugin: manual
3874+depends: wireless-tools/rfkill/list
3875+_summary: It is possible to see the events related to RF kill switch(es)
3876+_purpose: Check if it is possible to capture the event notifications
3877+_steps:
3878+ 1. Execute the following command to enter the capture-events mode
3879+ .
3880+ $ /snap/bin/wireless_tools.rfkill event
3881+ .
3882+ 2. Change the state of the RF kill switch using a hardware button if
3883+ available.
3884+_verification:
3885+ The command executed in the step 1 shall block and display the current state
3886+ of the RF kill switches in a following form:
3887+ <timestamp>: idx <id> type <type id> op <op id> soft <0|1> hard <0|1>
3888+ Pressing the hardware RF kill switch should be printed in the following
3889+ form as in the above. For example:
3890+ 1478774281.491635: idx 0 type 2 op 0 soft 0 hard 0
3891+ 1478774281.491762: idx 1 type 1 op 0 soft 0 hard 0
3892+ 1478774281.491776: idx 2 type 2 op 0 soft 1 hard 0
3893+ 1478774301.905695: idx 2 type 2 op 2 soft 0 hard 0
3894+ 1478774307.837112: idx 0 type 2 op 2 soft 1 hard 0
3895+ 1478774310.817935: idx 2 type 2 op 2 soft 1 hard 0
3896+ 1478774310.818989: idx 2 type 2 op 1 soft 1 hard 0
3897diff --git a/wpa-supplicant/manage.py b/wpa-supplicant/manage.py
3898new file mode 100755
3899index 0000000..500ad63
3900--- /dev/null
3901+++ b/wpa-supplicant/manage.py
3902@@ -0,0 +1,10 @@
3903+#!/usr/bin/env python3
3904+from plainbox.provider_manager import setup, N_
3905+
3906+setup(
3907+ name='plainbox-provider-wpa-supplicant',
3908+ namespace='2017.com.canonical.wpa-supplicant',
3909+ version="1.0",
3910+ description=N_("Plainbox provider for the wpa-supplicant snap"),
3911+ gettext_domain="2017_com_canonical_wpa_supplicant",
3912+)
3913diff --git a/wpa-supplicant/units/00_general.pxu b/wpa-supplicant/units/00_general.pxu
3914new file mode 100644
3915index 0000000..11d61b4
3916--- /dev/null
3917+++ b/wpa-supplicant/units/00_general.pxu
3918@@ -0,0 +1,99 @@
3919+# Copyright 2017 Canonical Ltd.
3920+# All rights reserved.
3921+#
3922+# Written by:
3923+# Simon Fels <simon.fels@canonical.com>
3924+
3925+unit: category
3926+id: wpa_supplicant
3927+_name: wpa-supplicant
3928+
3929+id: wpa_supplicant/general/can_be_installed
3930+category_id: wpa_supplicant
3931+_description: Ensure that the wpa-supplicant snap can be installed
3932+plugin: manual
3933+_steps:
3934+ Install wpa-supplicant snap from the appropiate channel via the following command
3935+ .
3936+ $ snap install [--<channel>] wpa-supplicant
3937+ .
3938+ NOTE: Depending on which channel you want to test you need to select the right one.
3939+_verification:
3940+ The installation of the snap should finish with no errors.
3941+
3942+id: wpa_supplicant/general/slots_and_plugs_connected
3943+category_id: wpa_supplicant
3944+depends: wpa_supplicant/general/can_be_installed
3945+plugin: manual
3946+_summary: Verify that all plugs and slots of the snap are connected automatically.
3947+_steps:
3948+ 1. Install the snap from the store:
3949+ .
3950+ $ snap wpa-supplicant
3951+ .
3952+_verification:
3953+ 1. Verify that the 'wpa-supplicant' snap has all required plugs and slots connected
3954+ and you see a similar output like the example below. If any further plugs
3955+ from other snaps are shown for the same slot this can be safely ignored.
3956+ .
3957+ $ snap interfaces wpa-supplicant
3958+ Slot Plug
3959+ :network wpa-supplicant
3960+ :network-control wpa-supplicant
3961+ wpa-supplicant:legacy-service -
3962+ wpa-supplicant:service network-manager:wpa,wpa-supplicant:wpa
3963+
3964+id: wpa_supplicant/general/service_failed_to_start_without_reboot
3965+category_id: wpa_supplicant
3966+depends: wpa_supplicant/general/can_be_installed
3967+_description:
3968+ Verify that the wpa-supplicant can't be started after installation of the snap
3969+ without a system reboot.
3970+plugin: manual
3971+_steps:
3972+ Check service status with the following command
3973+ $ systemctl status snap.wpa-supplicant.wpa.service
3974+_verification:
3975+ Output should look like this:
3976+ .
3977+ * snap.wpa-supplicant.wpa.service - Service for snap application wpa-supplicant.wpa
3978+ Loaded: loaded (/etc/systemd/system/snap.wpa-supplicant.wpa.service; enabled; vendor preset: enabled)
3979+ Active: inactive (dead) (Result: exit-code) since Mon 2017-03-20 10:45:00 UTC; 5s ago
3980+ Process: 2645 ExecStart=/usr/bin/snap run wpa-supplicant.wpa (code=exited, status=255)
3981+ Main PID: 2645 (code=exited, status=255)
3982+
3983+id: wpa_supplicant/general/service_starts_after_reboot
3984+category_id: wpa_supplicant
3985+depends: wpa_supplicant/general/service_failed_to_start_without_reboot
3986+_description: Ensure that the wpa-supplicant service is up and running
3987+plugin: manual
3988+_steps:
3989+ 1. Reboot the device
3990+ .
3991+ $ sudo reboot
3992+ .
3993+ 2. When the device finished booting, check service status with the following command:
3994+ .
3995+ $ systemctl status snap.wpa-supplicant.wpa.service
3996+_verification:
3997+ Output should look like this:
3998+ .
3999+ * snap.wpa-supplicant.wpa.service - Service for snap application wpa-supplicant.wpa
4000+ Loaded: loaded (/etc/systemd/system/snap.wpa-supplicant.wpa.service; enabled; vendor preset: enabled)
4001+ Active: active (running) since Mon 2017-03-20 08:50:29 UTC; 1h 50min ago
4002+ Main PID: 1587 (wpa_supplicant)
4003+
4004+id: wpa_supplicant/general/system_has_a_single_wpa_running
4005+category_id: wpa_supplicant
4006+depends: wpa_supplicant/general/service_starts_after_reboot
4007+_description: Ensure that only a single wpa-supplicant instance runs on the system.
4008+plugin: manual
4009+_steps:
4010+ Check which wpa-supplicant processes are running via
4011+ .
4012+ $ pgrep wpa_supplicant
4013+_verification:
4014+ The output should list only a single process id, e.g.:
4015+ .
4016+ $ pgrep wpa_supplicant
4017+ 2134
4018diff --git a/wpa-supplicant/units/10_network_manager.pxu b/wpa-supplicant/units/10_network_manager.pxu
4019new file mode 100644
4020index 0000000..3b33e4c
4021--- /dev/null
4022+++ b/wpa-supplicant/units/10_network_manager.pxu
4023@@ -0,0 +1,74 @@
4024+# Copyright 2017 Canonical Ltd.
4025+# All rights reserved.
4026+#
4027+# Written by:
4028+# Simon Fels <simon.fels@canonical.com>
4029+
4030+id: wpa_supplicant/network_manager/wpa_plug_connected
4031+category_id: wpa_supplicant
4032+depends: wpa_supplicant/general/system_has_a_single_wpa_running
4033+_description:
4034+ Ensure that the necessary wpa plug of the network-manager snap is connected.
4035+plugin: manual
4036+_steps:
4037+ 1. Install the NetworkManager snap from the store
4038+ .
4039+ $ snap install network-manager
4040+ .
4041+ 2. List plug/slot connections for the wpa-supplicant snap
4042+ .
4043+ $ snap interfaces wpa-supplicant
4044+_verification:
4045+ Output should look like:
4046+ .
4047+ Slot Plug
4048+ [...]
4049+ wpa-supplicant:service network-manager:wpa
4050+
4051+id: wpa_supplicant/network_manager/finds_wifi_networks
4052+category_id: wpa_supplicant
4053+depends: wpa_supplicant/network_manager/wpa_plug_connected
4054+_description:
4055+ Verify WiFi networks can be found by using the wpa-supplicant and
4056+ network-manager snaps.
4057+plugin: manual
4058+_steps:
4059+ 1. Trigger a scan for WiFi networks
4060+ .
4061+ $ nmcli d wifi rescan
4062+ .
4063+ 2. List found WiFi networks
4064+ .
4065+ $ nmcli d wifi
4066+_verification:
4067+ The output should look similar to the following and should list available
4068+ WiFi networks in your environment:
4069+ .
4070+ * SSID MODE CHAN RATE SIGNAL BARS SECURITY
4071+ * test1 Infra 6 54 Mbit/s 85 **** WPA1 WPA2
4072+ test2 Infra 6 54 Mbit/s 45 ** WPA1 WPA2
4073+
4074+id: wpa_supplicant/network_manager/connect_secure_wifi_network
4075+category_id: wpa_supplicant
4076+depends: wpa_supplicant/network_manager/finds_wifi_networks
4077+_description:
4078+ Verify connecting one of the previously found WiFi networks is possible.
4079+ network-manager snaps.
4080+plugin: manual
4081+_steps:
4082+ Connect one of the previously found WiFi networks via:
4083+ .
4084+ $ nmcli d wifi connect <SSID> password <password>
4085+ .
4086+ Replace <SSID> and <password> with the right values for your selected WiFi
4087+ network.
4088+_verification:
4089+ The nmcli command call should return with no error. Verify why running
4090+ .
4091+ $ echo $?
4092+ 0
4093+ .
4094+ Also verify that the WiFi network is connected:
4095+ .
4096+ $ nmcli d | grep wifi
4097+ wlan0 wifi connected test1

Subscribers

People subscribed via source and target branches