Commit Graph

90 Commits

Author SHA1 Message Date
Joshua Spence 1348f74e9e Fix tests for UniFi Network 7.4 (#146) 2023-06-07 13:21:32 +10:00
github-actions[bot] f3077d3b3c [create-pull-request] automated change (#143)
Co-authored-by: joshuaspence <joshuaspence@users.noreply.github.com>
2023-06-07 09:25:13 +10:00
David Dollar 93d9584462 suport kick user call (#136)
* support kick user call

* fix kick-sta params
2023-05-26 10:40:57 +10:00
Joshua Spence dd2fd56a6f Add more device fields (#111)
These fields will be used to improve acceptance tests.
2023-02-28 20:20:02 +11:00
Michon van Dooren 3add31c46b Don't omitempty Device.PortOverrides (#104) 2023-02-28 09:35:41 +11:00
github-actions[bot] 2ee9596dad [create-pull-request] automated change (#98)
Co-authored-by: joshuaspence <joshuaspence@users.noreply.github.com>
2023-02-15 13:10:53 +11:00
Paul Tyng 71e11b19f0 remove unused func (wrong signature) 2022-10-31 15:53:41 -04:00
Paul Tyng 49ed8b85a7 fix compile error 2022-10-31 15:53:30 -04:00
Paul Tyng 6de33139b5 change stp_priority to numberOrString 2022-10-31 15:48:42 -04:00
Paul Tyng f8c2528edb Pass QOS always for WAN networks 2022-10-22 21:27:45 -04:00
Paul Tyng 0552712b3b Always send schedule 2022-10-22 21:00:33 -04:00
Paul Tyng 887fae8168 handle omitted is true bools 2022-10-19 20:35:58 -04:00
Paul Tyng 84afde7dce sample codegen 2022-10-19 20:35:58 -04:00
github-actions[bot] 2f1f5b51da [create-pull-request] automated change (#92)
Co-authored-by: joshuaspence <joshuaspence@users.noreply.github.com>
2022-09-15 13:37:19 +10:00
Joshua Spence 830972a518 Fix lint 2022-08-10 11:34:44 +10:00
jeanluc 1ac863de1f Fix type of lte_ext_ant/lte_poe fields (#89) 2022-08-10 11:34:05 +10:00
github-actions[bot] 8f0bac78f6 [create-pull-request] automated change (#90)
Co-authored-by: joshuaspence <joshuaspence@users.noreply.github.com>
2022-08-10 11:06:46 +10:00
github-actions[bot] adcc9a2556 [create-pull-request] automated change (#86)
Co-authored-by: joshuaspence <joshuaspence@users.noreply.github.com>
2022-07-27 11:31:42 +10:00
Paul Tyng 4d251731a7 Adjust for 7.1 error handling 2022-07-02 20:13:01 -04:00
github-actions[bot] 7bb0095ae7 [create-pull-request] automated change (#77)
Co-authored-by: joshuaspence <joshuaspence@users.noreply.github.com>
2022-05-25 17:16:18 +10:00
Joshua Spence d2cc2013b7 Forgot to run go generate (#75) 2022-05-16 14:48:27 +10:00
Joshua Spence 09e0556344 Add back mdns_enabled (#73) 2022-05-16 13:56:45 +10:00
github-actions[bot] 85a08e202e [create-pull-request] automated change (#72)
Co-authored-by: joshuaspence <joshuaspence@users.noreply.github.com>
2022-05-13 10:32:05 +10:00
Joshua Spence d2a3d064ac Fix SettingGlobalAp (#71)
Variable names (or struct fields) cannot start with a number.
2022-05-12 13:48:20 +10:00
github-actions[bot] 0e0a9746aa [create-pull-request] automated change (#70)
Co-authored-by: joshuaspence <joshuaspence@users.noreply.github.com>
2022-05-12 11:52:41 +10:00
github-actions[bot] 4bad87d590 [create-pull-request] automated change (#68)
Co-authored-by: joshuaspence <joshuaspence@users.noreply.github.com>
2022-03-29 12:09:06 +11:00
github-actions[bot] 9d4150d235 [create-pull-request] automated change (#63)
Co-authored-by: joshuaspence <joshuaspence@users.noreply.github.com>
2022-03-06 09:47:34 +11:00
Joshua Spence ca31cda3ad Automatically update the controller version (#57)
Create a new GitHub Actions workflow to submit a pull request for new controller versions.
2022-03-06 09:42:24 +11:00
Oskar 3e7bd072ea Omit empty NetworkID in account resource (#59)
* Omit empty NetworkID in account

* Run `go generate`

* Fix tests

Co-authored-by: Joshua Spence <josh@joshuaspence.com>
2022-01-31 15:58:42 +11:00
Paul Tyng bb319b44af Fix generate to use tool 2021-11-21 10:56:54 -05:00
Joshua Spence ff2854e943 Implement Stringer interface for DeviceState (#49)
* Implement `Stringer` interface for `DeviceState`

If device adoption fails the error message isn't very readable at the moment.

```
Error: unexpected state '10', wanted target '2'.
```

* Use `stringer`
2021-09-24 13:55:12 +10:00
Joshua Spence 124f349da4 Format generated golang with go/format (#48) 2021-09-24 13:17:25 +10:00
Joshua Spence 8d4ca5f389 Revert "Add controller version to generated files" (#47)
This reverts commit 13d5677bf3.
2021-09-24 07:21:34 +10:00
Joshua Spence 7d87194aef Update to latest controller version (#46)
* Update to latest controller version

* Fix tests
2021-09-21 23:26:12 +10:00
Joshua Spence 0cb7d3e514 Add AdoptDevice and ForgetDevice methods (#45)
* Add `AdoptDevice` and `ForgetDevice` methods

* Address comments
2021-09-17 11:16:56 +10:00
Paul Tyng 13d5677bf3 Add controller version to generated files 2021-08-31 09:02:23 -04:00
Johannes Heck 4e9d935af2 fix Ht fieldType for device import 2021-08-18 16:10:47 -04:00
Joshua Spence a9d0f1de5a Use --latest 2021-08-11 11:40:15 +10:00
Joshua Spence 8f8e19eb2a Don't commit intermediate files
Don't commit the extracted JSON files as well only need the generated `*.generated.go` files.
2021-08-11 11:40:15 +10:00
Kurt McAlpine 7081791f4f Export fields on SettingMgmtXSshKeys (#41) 2021-07-05 14:51:44 +10:00
Joshua Spence f06d3401ae Run go generate 2021-06-29 17:43:00 -04:00
Joshua Spence 64a73cdd4b Fix linter issues 2021-06-29 17:43:00 -04:00
Joshua Spence 2f7eee3a6a Add dev_id_override to user 2021-06-18 15:39:41 -04:00
Joshua Spence dd685c0447 Fix type of x_ssh_keys
The `unifi_settings_mgmt` resource fails for me with the following error:

```
Error: unable to decode body: GET s/default/get/setting/mgmt unable to unmarshal alias: json: cannot unmarshal object into Go struct field .x_ssh_keys of type string
```

My `x_ssh_keys` looks like this:

```
[
  {
    "name": "Laptop",
    "type": "ssh-rsa",
    "key": "REDACTED",
    "comment": "REDACTED",
    "date": "2021-02-25T08:26:04Z",
    "fingerprint": "REDACTED"
  }
]
```
2021-06-16 09:28:49 -04:00
James Stephenson fbed685c37 Fixing unmarshalling of numberOrString
New unmarshalling rules for fields which could be numeric or string
values were not properly typecasted upon being deserialized.

Cleaned up the api template file and moved custom unmarshalling type
logic into go code out of the template.
2021-04-16 13:41:01 -04:00
Paul Tyng 4ab4036985 Bump to 6.0.43, use go generate
Also moved fetching of JSON information to Go for cross-OS usage.
2021-04-09 09:51:50 -04:00
Kurt McAlpine bd8898db77 Set d.Key for all settings updates 2021-04-09 09:51:50 -04:00
Kurt McAlpine ac8d0c5659 Set key to mgmt for updateSettingMgmt api 2021-04-05 10:40:43 -04:00
Kurt McAlpine 74e2b9dd38 Add GetSettingMgmt and UpdateSettingMgmt functions 2021-03-31 08:05:44 -04:00
Paul Tyng 0c90e4c32e Add dynamic DNS support 2021-03-28 14:41:48 -04:00