Skip to content

Commit 39f5048

Browse files
committed
devices: add SSHEnabled to devices
SSHEnabled has been added to the devices API when `fields` is set to all Updates #39 Signed-off-by: Zach Buchheit <zachb@tailscale.com>
1 parent ac08a0b commit 39f5048

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

devices.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ type Device struct {
9393
UpdateAvailable bool `json:"updateAvailable"`
9494

9595
// The below are only included in listings when querying `all` fields.
96+
SSHEnabled bool `json:"sshEnabled"`
9697
AdvertisedRoutes []string `json:"AdvertisedRoutes"`
9798
EnabledRoutes []string `json:"enabledRoutes"`
9899
ClientConnectivity *ClientConnectivity `json:"clientConnectivity"`

devices_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ func TestClient_Devices_Get(t *testing.T) {
6666
TailnetLockError: "test error",
6767
TailnetLockKey: "tlpub:test",
6868
UpdateAvailable: true,
69+
SSHEnabled: false,
6970
AdvertisedRoutes: []string{"127.0.0.1", "127.0.0.2"},
7071
EnabledRoutes: []string{"127.0.0.1"},
7172
ClientConnectivity: &ClientConnectivity{
@@ -172,6 +173,7 @@ func TestClient_Devices_List(t *testing.T) {
172173
NodeKey: "nodekey:test",
173174
OS: "windows",
174175
UpdateAvailable: true,
176+
SSHEnabled: false,
175177
AdvertisedRoutes: []string{"127.0.0.1", "127.0.0.2"},
176178
EnabledRoutes: []string{"127.0.0.1"},
177179
ClientConnectivity: &ClientConnectivity{

0 commit comments

Comments
 (0)