[RFC] Improving hardware access for snaps
Jamie Strandboge
jamie at canonical.com
Fri Jan 30 22:31:44 UTC 2015
On 01/30/2015 04:18 PM, Jamie Strandboge wrote:
...
> = UX =
> Relevant packaging yaml:
> name: foo
> version: 0.1
> ...
> services:
> - name: bar
> start: bin/bar
> - name: baz
> start: bin/baz
>
>
> == adding access ==
> $ snappy install foo
> ...
>
> $ snappy add-hw foo.bar /dev/ttyS0
> 'foo.bar' is now allowed to access /dev/ttyS0
Hmm, one thing that occurred to me is that while we want to give the device
access to a particular service/cli binary, I don't think users have a way to see
what services/cli binaries a snap provides, do they? In other words:
$ snappy install foo
...
$ snappy add-hw foo.bar /dev/ttyS0
How does the user know to specify 'foo.bar'? Does the new snappy cli UX cover
this anywhere? If not, we'll can leave the original proposal, but prompt when
the user specifies only the package name and when there is more than one
service/cli binary to choose from (like in the above yaml example). Eg:
$ snappy install foo
...
$ snappy add-hw foo /dev/ttyS0 <=== only package name specified
Add access to '/dev/ttyS0' for which of the following:
[1] foo.bar
[2] foo.baz
[3] all of the above
> 1
'foo.bar' is now allowed to access /dev/ttyS0
$ snappy add-hw foo.bar /dev/ttyS1 <=== package name + service specified
'foo.bar' is now allowed to access /dev/ttyS1
--
Jamie Strandboge http://www.ubuntu.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20150130/078fa4f4/attachment.pgp>
More information about the snappy-devel
mailing list