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 Escandón  on 2017-06-15
Status: Merged
Approved by: Kyle Nitzsche on 2017-06-15
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 Approve on 2017-06-15
Simon Fels Approve on 2017-06-15
System Enablement Bot continuous-integration Approve on 2017-06-15
Sheila Miguez 2017-06-15 Approve on 2017-06-15
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.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/README.md b/README.md
2index 0707ffa..d100e2f 100644
3--- a/README.md
4+++ b/README.md
5@@ -31,15 +31,6 @@ snap install --edge|beta wifi-connect
6
7 Use beta channel if it contains version 0.9, else edge.
8
9-## Create content sharing directory for wifi-ap:control interface
10-
11-```bash
12-sudo mkdir /var/snap/wifi-connect/common/sockets
13-```
14-
15-Note: Currently content share interface requires a reboot after connection, as described below.
16-
17-(TODO: Later we'll use an interface hook script to automatically create that directory)
18
19 ## Connect interfaces
20
21@@ -51,6 +42,7 @@ snap connect wifi-connect:network-manager network-manager:service
22 ```
23
24 Note: wifi-ap and network-manager interfaces auto-connect.
25+Note: Currently content share interface requires a reboot after connection, as described below.
26
27 # Set NetWorkManager to control all networking
28
29diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
30index 80554f1..b5f8aad 100644
31--- a/snap/snapcraft.yaml
32+++ b/snap/snapcraft.yaml
33@@ -25,7 +25,7 @@ plugs:
34 control:
35 interface: content
36 content: socket-directory
37- target: $SNAP_COMMON/sockets
38+ target: $SNAP_COMMON
39 default-provider: wifi-ap
40
41 parts:
42diff --git a/spread_tests/lib/utilities.sh b/spread_tests/lib/utilities.sh
43index 0beb932..6a17233 100755
44--- a/spread_tests/lib/utilities.sh
45+++ b/spread_tests/lib/utilities.sh
46@@ -74,9 +74,6 @@ install_snap_under_test() {
47 # Install prebuilt snap
48 snap install --dangerous ${PROJECT_PATH}/${SNAP_NAME}_*_${SNAP_ARCH}.snap
49
50- # Create content sharing directory if needed
51- [ -e /var/snap/wifi-connect/common/sockets ] || mkdir -p /var/snap/wifi-connect/common/sockets
52-
53 connect_interfaces
54
55 # set NetworkManager to control all networking
56diff --git a/wifiap/restclient.go b/wifiap/restclient.go
57index 39e3b35..1a6d8c4 100644
58--- a/wifiap/restclient.go
59+++ b/wifiap/restclient.go
60@@ -30,7 +30,7 @@ const (
61 configurationURI = "/configuration"
62 )
63
64-var socketPath = os.Getenv("SNAP_COMMON") + "/sockets/control"
65+var socketPath = os.Getenv("SNAP_COMMON") + "/control"
66
67 // TransportClient operations executed by any client requesting server.
68 type TransportClient interface {

Subscribers

People subscribed via source and target branches