docs/interfaces.md: improve interfaces documentation #1409

Merged
merged 18 commits into from Aug 8, 2016

Conversation

Projects
None yet
3 participants
Contributor

jdstrand commented Jun 24, 2016

  • docs/interfaces.md: alphabetize the interfaces
  • docs/interfaces.md: add 'Making connections' section
  • docs/interfaces.md: remove references to ubuntu-core
  • fix quoting in 'Making connections' section
  • docs/interfaces.md: add 'Availability'
  • docs/interfaces.md: add missing interfaces, cleanup availability
  • add 'Native vs classic interfaces', remove 'Usage', misc cleanups
  • cleanups for pretty markdown
  • LP: #1570618
Contributor

jdstrand commented Jun 24, 2016

Since this is documentation and not code, I suggest reading interfaces.md via 'View' under /files.

docs/interfaces.md
-### network
+## Native vs classic interfaces
@niemeyer

niemeyer Jun 24, 2016

Contributor

Needs some rewording. There's no "classic interface" and "native interface" in snapd. There's the classic Ubuntu system, and there's Ubuntu Core. The interface set on both of those is the same.

@jdstrand

jdstrand Jun 24, 2016

Contributor

I reworded this section and it is now called 'Transitional interfaces'.

docs/interfaces.md
@@ -12,184 +12,350 @@ Slots may support multiple connections to plugs. For example the OS snap
exposes the ``network`` slot and all applications that can talk over the
network connect their plugs there.
-## Supported Interfaces - Basic
+The availability of an interface depends on whether snapd is running on a
+classic (eg, traditional desktop or server) or on a native system. Interfaces
@niemeyer

niemeyer Jun 24, 2016

Contributor

This is not generally true, and saying so undermines an important aspect of the system that we very much care about. Snaps are the same on classic and on Ubuntu Core, and interfaces are the same as well. Some very specific interfaces may be available or not, and this is not even just about classic or not. It's about the nature of the ecosystem. Not all devices will offer all interfaces.

@jdstrand

jdstrand Jun 24, 2016

Contributor

The interface set isn't the same though per implicit.go and confirmed by examining snap interfaces on a daily core image and on a desktop system. There are a lot of interfaces that aren't exposed in core: cups-control, gsettings, opengl, pulseaudio, unity7 and x11 and soon content. I wanted to call this out, but I wasn't sure how to do it without going with 'classic vs native'.

Do you have suggestions on how this should be described if not native vs classic? How do I describe those interfaces that only show up on devices that are traditional Linux systems (ie, what I referred to as 'classic').

UPDATE: also camera and optical-drive, but I'm not sure why those are classic only. A bug? Waiting on gadget snap?

@jdstrand

jdstrand Jun 28, 2016

Contributor

@niemeyer - can you review my comments? I'm not sure how to move forward. Thanks!

@niemeyer

niemeyer Aug 4, 2016

Contributor

Again, it's not classic vs. native. It's just that interfaces may be available or not for any given system.

I don't know why camera and optical-drive are classic only either. They shouldn't be.

docs/interfaces.md
-## Supported Interfaces - Basic
+The availability of an interface depends on whether snapd is running on a
+classic (eg, traditional desktop or server) or on a native system. Interfaces
+may also be implicit to the OS snap or implemented only via snaps providing the
@niemeyer

niemeyer Jun 24, 2016

Contributor

The term "implicit" is an irrelevant implementation detail that we shouldn't surface on the UI or the documentation. These are real plugs and slots on the core snap. We're creating them dynamically simply because it was easier for us to put the system in place this way, but we don't want to surface this fact to the user, and in fact it most probably will go away altogether in favor of having these interfaces defined and controlled in the core snap itself.

@jdstrand

jdstrand Jun 24, 2016

Contributor

Done.

Contributor

niemeyer commented Jun 24, 2016

First pass done, Jamie. A lot of the polishing is very welcome, but a few details need tweaking.

@niemeyer niemeyer added the Reviewed label Jun 24, 2016

jdstrand added some commits Jun 24, 2016

@pedronis pedronis removed the Reviewed label Jul 28, 2016

Contributor

jdstrand commented Aug 3, 2016

@niemeyer - ping regarding open questions from me in response to your initial review.

docs/interfaces.md
-### network
+## Transitional interfaces
@niemeyer

niemeyer Aug 4, 2016

Contributor

Looks good, thanks.

docs/interfaces.md
-Usage: reserved
-Auto-Connect: yes
+* Auto-Connect: yes
+* Availability: OS snap (classic)
@niemeyer

niemeyer Aug 4, 2016

Contributor

These should all be "core snap" now, but I'm not quite sure we should be documenting that as such. Devices may easily end up not offering certain slots, and other slots may easily move around to different snaps. The point of our interface design is precisely that we're not making any promises about what is available where, yet the system will behave correctly independently of that.

@jdstrand

jdstrand Aug 4, 2016

Contributor

Availability is gone, but any references to 'OS snap' are now 'core snap'.

docs/interfaces.md
+Can access OpenGL hardware.
+
+* Auto-Connect: yes
+* Availability: OS snap (classic)
@niemeyer

niemeyer Aug 4, 2016

Contributor

Why classic? What if the device has a screen? What if I install a native snap system on my laptop and install a unity8 snap?

@jdstrand

jdstrand Aug 4, 2016

Contributor

I was just documenting the code. I don't know why opengl is classic only.

docs/interfaces.md
+
+### bool-file
+
+Can access GPIO paths for LED brightness and GPIO values.
@niemeyer

niemeyer Aug 4, 2016

Contributor

We'll see an actual gpio interface soon (it's being worked on right now..). Can we please drop docs for bool-file for the time being? Not sure we'll want to keep it.

@jdstrand

jdstrand Aug 4, 2016

Contributor

Removed

docs/interfaces.md
+* Auto-Connect: yes for snaps from same publisher, no otherwise
+* Availability: with providing snap
+* Attributes:
+ * read (slot): read-only path from providing snap to expose to the consuming snap
@niemeyer

niemeyer Aug 4, 2016

Contributor

These are lists IIRC.

@jdstrand

jdstrand Aug 4, 2016

Contributor

Fixed

Contributor

jdstrand commented Aug 4, 2016

@niemeyer - I believe I addressed all of your concerns. I removed Availability and reworded to be more generic and reference snap interfaces.

Contributor

jdstrand commented Aug 8, 2016

This is what is failing in the integration test:

FAIL: /home/jenkins-slave/workspace/github-snappy-integration-tests-cloud/src/github.com/snapcore/snapd/integration-tests/tests/create_user_test.go:36: createUserSuite.TestCreateUserCreatesUser

That has nothing to do with this PR.

Contributor

jdstrand commented Aug 8, 2016

retest this please

@niemeyer niemeyer merged commit 06b2785 into snapcore:master Aug 8, 2016

2 of 3 checks passed

Integration tests
Details
autopkgtest Success
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jdstrand jdstrand deleted the jdstrand:improve-interfaces-documentation branch Aug 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment