Merge ~rmescandon/snappy-hwe-snaps/+git/wifi-connect:bind-control-interface-in-snap-common into ~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-connect:master

Proposed by Roberto Mier Escandon
Status: Merged
Approved by: Kyle Nitzsche
Approved revision: 867305b7654e369060cd9706feeabdbac6c51e18
Merged at revision: e48663f930449e0439bc6b5bba51c53e14e8f7ed
Proposed branch: ~rmescandon/snappy-hwe-snaps/+git/wifi-connect:bind-control-interface-in-snap-common
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-connect:master
Diff against target: 68 lines (+3/-14)
4 files modified
README.md (+1/-9)
snap/snapcraft.yaml (+1/-1)
spread_tests/lib/utilities.sh (+0/-3)
wifiap/restclient.go (+1/-1)
Reviewer Review Type Date Requested Status
Kyle Nitzsche (community) Approve
Simon Fels Approve
System Enablement Bot continuous-integration Approve
Sheila Miguez (community) Approve
Review via email: mp+325752@code.launchpad.net

Description of the change

Mounting wifi-ap control interface directly in SNAP_COMMON path instead of SNAP_COMMON/sockets. This avoids us to create that folder once the snap is installed.

To post a comment you must log in.
Revision history for this message
Sheila Miguez (codersquid) wrote :

Looks good

review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve
Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/README.md b/README.md
index 0707ffa..d100e2f 100644
--- a/README.md
+++ b/README.md
@@ -31,15 +31,6 @@ snap install --edge|beta wifi-connect
3131
32Use beta channel if it contains version 0.9, else edge.32Use beta channel if it contains version 0.9, else edge.
3333
34## Create content sharing directory for wifi-ap:control interface
35
36```bash
37sudo mkdir /var/snap/wifi-connect/common/sockets
38```
39
40Note: Currently content share interface requires a reboot after connection, as described below.
41
42(TODO: Later we'll use an interface hook script to automatically create that directory)
4334
44## Connect interfaces35## Connect interfaces
4536
@@ -51,6 +42,7 @@ snap connect wifi-connect:network-manager network-manager:service
51```42```
5243
53Note: wifi-ap and network-manager interfaces auto-connect.44Note: wifi-ap and network-manager interfaces auto-connect.
45Note: Currently content share interface requires a reboot after connection, as described below.
5446
55# Set NetWorkManager to control all networking47# Set NetWorkManager to control all networking
5648
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 80554f1..b5f8aad 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -25,7 +25,7 @@ plugs:
25 control:25 control:
26 interface: content26 interface: content
27 content: socket-directory27 content: socket-directory
28 target: $SNAP_COMMON/sockets28 target: $SNAP_COMMON
29 default-provider: wifi-ap29 default-provider: wifi-ap
3030
31parts:31parts:
diff --git a/spread_tests/lib/utilities.sh b/spread_tests/lib/utilities.sh
index 0beb932..6a17233 100755
--- a/spread_tests/lib/utilities.sh
+++ b/spread_tests/lib/utilities.sh
@@ -74,9 +74,6 @@ install_snap_under_test() {
74 # Install prebuilt snap74 # Install prebuilt snap
75 snap install --dangerous ${PROJECT_PATH}/${SNAP_NAME}_*_${SNAP_ARCH}.snap75 snap install --dangerous ${PROJECT_PATH}/${SNAP_NAME}_*_${SNAP_ARCH}.snap
7676
77 # Create content sharing directory if needed
78 [ -e /var/snap/wifi-connect/common/sockets ] || mkdir -p /var/snap/wifi-connect/common/sockets
79
80 connect_interfaces77 connect_interfaces
8178
82 # set NetworkManager to control all networking79 # set NetworkManager to control all networking
diff --git a/wifiap/restclient.go b/wifiap/restclient.go
index 39e3b35..1a6d8c4 100644
--- a/wifiap/restclient.go
+++ b/wifiap/restclient.go
@@ -30,7 +30,7 @@ const (
30 configurationURI = "/configuration"30 configurationURI = "/configuration"
31)31)
3232
33var socketPath = os.Getenv("SNAP_COMMON") + "/sockets/control"33var socketPath = os.Getenv("SNAP_COMMON") + "/control"
3434
35// TransportClient operations executed by any client requesting server.35// TransportClient operations executed by any client requesting server.
36type TransportClient interface {36type TransportClient interface {

Subscribers

People subscribed via source and target branches