Can "snap info" be extended to list a snap's plugs and slots?

Bug #2017310 reported by Robert P. J. Day
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Triaged
Wishlist
Unassigned

Bug Description

I think it would be useful if there was some way to ask the question, "What plugs and slots are defined for snap X?" For instance, if I run:
```
$ snap connections ubuntu-frame
Interface Plug Slot Notes
content - ubuntu-frame:ubuntu-frame-diagnostic -
content[graphics-core20] ubuntu-frame:graphics-core20 mesa-core20:graphics-core20 -
hardware-observe ubuntu-frame:hardware-observe :hardware-observe -
login-session-control ubuntu-frame:login-session-control - -
network-bind ubuntu-frame:network-bind :network-bind -
opengl ubuntu-frame:opengl :opengl -
wayland - ubuntu-frame:wayland -
x11 ubuntu-frame:x11 :x11
```
I can see that ubuntu-frame has a slot for wayland, but it would be more convenient if I could just ask, "What plugs and slots are defined by ubuntu-frame?" It seems as if "snap info" still has lots of room to display more info if one uses "--verbose", would it be hard to add this info to the output?

description: updated
Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

Hello,
Did you try 'snap interfaces <snap-name>' command?
Is that what you need?

Thanks

Revision history for this message
Robert P. J. Day (rpjday) wrote : Re: [Bug 2017310] Re: Can "snap info" be extended to list a snap's plugs and slots?

Yes, but that command is officially deprecated, see "snap interfaces
--help", and I'd prefer not to present commands in, say, a SC101 class that
might disappear without warning.

On Wed, May 10, 2023 at 8:37 AM Sergio Cazzolato <email address hidden>
wrote:

> Hello,
> Did you try 'snap interfaces <snap-name>' command?
> Is that what you need?
>
> Thanks
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/2017310
>
> Title:
> Can "snap info" be extended to list a snap's plugs and slots?
>
> Status in snapd:
> New
>
> Bug description:
> I think it would be useful if there was some way to ask the question,
> "What plugs and slots are defined for snap X?" For instance, if I run:
> ```
> $ snap connections ubuntu-frame
> Interface Plug Slot
> Notes
> content -
> ubuntu-frame:ubuntu-frame-diagnostic -
> content[graphics-core20] ubuntu-frame:graphics-core20
> mesa-core20:graphics-core20 -
> hardware-observe ubuntu-frame:hardware-observe
> :hardware-observe -
> login-session-control ubuntu-frame:login-session-control -
> -
> network-bind ubuntu-frame:network-bind
> :network-bind -
> opengl ubuntu-frame:opengl :opengl
> -
> wayland -
> ubuntu-frame:wayland -
> x11 ubuntu-frame:x11 :x11
> ```
> I can see that ubuntu-frame has a slot for wayland, but it would be more
> convenient if I could just ask, "What plugs and slots are defined by
> ubuntu-frame?" It seems as if "snap info" still has lots of room to display
> more info if one uses "--verbose", would it be hard to add this info to the
> output?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/snapd/+bug/2017310/+subscriptions
>
>

Revision history for this message
Robert P. J. Day (rpjday) wrote :

That command seems fine, except that it is officially deprecated so I am reluctant to make it part of the SC101 course.

Changed in snapd:
importance: Undecided → Wishlist
Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

Ok, it will be triaged soon

As a workaround snap connections can be used as well:

list of plugs
snap connections spotify | awk '{print $2}' | grep spotify: | cut -d ":" -f2

list of slots
snap connections spotify | awk '{print $3}' | grep spotify: | cut -d ":" -f2

Changed in snapd:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.