diff --git a/.github/workflows/go-mod-cache.yml b/.github/workflows/go-mod-cache.yml new file mode 100644 index 00000000..ef6e9b57 --- /dev/null +++ b/.github/workflows/go-mod-cache.yml @@ -0,0 +1,42 @@ +name: Go mod cache management + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + branches: + - 'main' + - 'devel' + paths: + - 'main.go' + - 'routeros/*.go' + +jobs: + go-cache: + name: Go Cache + runs-on: ubuntu-latest + steps: + - name: Checkout the repo + uses: actions/checkout@v4 + + - name: Setup Go environment + uses: actions/setup-go@v5 + with: + go-version: 1.23.4 + id: go + + - name: Get dependencies + shell: bash + run: go mod download all + + - name: Cache Go Modules + uses: actions/cache@v4.1.1 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- diff --git a/.github/workflows/module_testing.yml b/.github/workflows/module_testing.yml index 8e74c468..026ee07c 100644 --- a/.github/workflows/module_testing.yml +++ b/.github/workflows/module_testing.yml @@ -16,8 +16,6 @@ jobs: strategy: matrix: experimental: [false] - go: - - 1.21 os: [ubuntu-latest] routeros_version: - "7.12" @@ -25,13 +23,33 @@ jobs: - "7.16" steps: + - name: Container check + run: | + echo "Wait for the container to finish launching..." + while true; do + docker logs ${{ job.services.routeros.id }} 2>&1 | grep MikroTik && break + # docker logs ${{ job.services.routeros.id }} 2>&1 + echo "waiting..." + sleep 10 + done + - name: Check out code into the Go module directory uses: actions/checkout@v4 + - name: Cache restore + uses: actions/cache/restore@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Setup Go environment uses: actions/setup-go@v5 with: - go-version: ${{ matrix.go }} + go-version: 1.23.4 id: go - name: Get dependencies @@ -66,8 +84,8 @@ jobs: - 443:443 - 8728:8728 - 8729:8729 - volumes: - - /dev/net/tun:/dev/net/tun options: >- --cap-add=NET_ADMIN --entrypoint /routeros/entrypoint_with_four_interfaces.sh + --device /dev/net/tun + --device /dev/kvm diff --git a/Makefile b/Makefile index 2a63796c..97380ffa 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ test: docs: go generate # !!! GNU Sed - find docs -type f -exec sed -i -E '/^.*__[[:alpha:]]+__/d' {} \; + find docs -type f -exec sed -i -E '/^.*__[[:alpha:]_]+__/d' {} \; tfformat: terraform fmt -recursive examples/ diff --git a/examples/resources/routeros_interface_pppoe_server/import.sh b/examples/resources/routeros_interface_pppoe_server/import.sh new file mode 100644 index 00000000..538ebbf1 --- /dev/null +++ b/examples/resources/routeros_interface_pppoe_server/import.sh @@ -0,0 +1,5 @@ +#The ID can be found via API or the terminal +#The command for the terminal is -> :put [/interface/pppoe/server get [print show-ids]] +terraform import routeros_interface_pppoe_server.test *3 +#Or you can import a resource using one of its attributes +terraform import routeros_interface_pppoe_server.test "name=xxx" \ No newline at end of file diff --git a/examples/resources/routeros_interface_pppoe_server/resource.tf b/examples/resources/routeros_interface_pppoe_server/resource.tf new file mode 100644 index 00000000..03a0c627 --- /dev/null +++ b/examples/resources/routeros_interface_pppoe_server/resource.tf @@ -0,0 +1,7 @@ +resource "routeros_interface_pppoe_server" "test" { + comment = "comment" + disabled = true + name = "pppoe-in1" + user = "" + service = "" +} diff --git a/examples/resources/routeros_ip_ipsec_policy_group/resource.tf b/examples/resources/routeros_ip_ipsec_policy_group/resource.tf index a93364f5..f7262c16 100644 --- a/examples/resources/routeros_ip_ipsec_policy_group/resource.tf +++ b/examples/resources/routeros_ip_ipsec_policy_group/resource.tf @@ -1,3 +1,3 @@ resource "routeros_ip_ipsec_policy_group" "test" { - name = "test-group" + name = "test-group" } \ No newline at end of file diff --git a/go.mod b/go.mod index 8997ec45..1f9f101e 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/terraform-routeros/terraform-provider-routeros -go 1.22.7 - -toolchain go1.23.2 +go 1.23.4 require ( github.com/fatih/color v1.18.0 @@ -16,10 +14,10 @@ require ( require ( github.com/BurntSushi/toml v1.2.1 // indirect github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect - github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect + github.com/ProtonMail/go-crypto v1.1.3 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect - github.com/cloudflare/circl v1.3.7 // indirect + github.com/cloudflare/circl v1.5.0 // indirect github.com/hashicorp/cli v1.1.6 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect @@ -31,8 +29,8 @@ require ( golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect golang.org/x/sync v0.10.0 // indirect golang.org/x/term v0.27.0 // indirect - golang.org/x/tools v0.22.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + golang.org/x/tools v0.28.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb // indirect gopkg.in/yaml.v2 v2.3.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/qr v0.2.0 // indirect @@ -60,12 +58,12 @@ require ( github.com/hashicorp/hcl/v2 v2.23.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.21.0 // indirect - github.com/hashicorp/terraform-json v0.23.0 // indirect + github.com/hashicorp/terraform-json v0.24.0 // indirect github.com/hashicorp/terraform-plugin-go v0.25.0 // indirect github.com/hashicorp/terraform-plugin-testing v1.11.0 github.com/hashicorp/terraform-registry-address v0.2.3 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect - github.com/hashicorp/yamux v0.1.1 // indirect + github.com/hashicorp/yamux v0.1.2 // indirect github.com/huandu/xstrings v1.3.3 // indirect github.com/imdario/mergo v0.3.15 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -81,13 +79,13 @@ require ( github.com/shopspring/decimal v1.3.1 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect - github.com/zclconf/go-cty v1.15.0 // indirect + github.com/zclconf/go-cty v1.15.1 // indirect golang.org/x/crypto v0.31.0 - golang.org/x/mod v0.21.0 // indirect - golang.org/x/net v0.28.0 // indirect + golang.org/x/mod v0.22.0 // indirect + golang.org/x/net v0.33.0 // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/grpc v1.67.1 // indirect - google.golang.org/protobuf v1.35.1 // indirect + google.golang.org/grpc v1.69.2 // indirect + google.golang.org/protobuf v1.36.0 // indirect ) diff --git a/go.sum b/go.sum index 04faa4f9..fa88940e 100644 --- a/go.sum +++ b/go.sum @@ -14,6 +14,8 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg= github.com/ProtonMail/go-crypto v1.1.0-alpha.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= +github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= +github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= @@ -29,6 +31,8 @@ github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZ github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= +github.com/cloudflare/circl v1.5.0 h1:hxIWksrX6XN5a1L2TI/h53AGPhNHoUBo+TD1ms9+pys= +github.com/cloudflare/circl v1.5.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -101,6 +105,8 @@ github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVW github.com/hashicorp/terraform-exec v0.21.0/go.mod h1:1PPeMYou+KDUSSeRE9szMZ/oHf4fYUmB923Wzbq1ICg= github.com/hashicorp/terraform-json v0.23.0 h1:sniCkExU4iKtTADReHzACkk8fnpQXrdD2xoR+lppBkI= github.com/hashicorp/terraform-json v0.23.0/go.mod h1:MHdXbBAbSg0GvzuWazEGKAn/cyNfIB7mN6y7KJN6y2c= +github.com/hashicorp/terraform-json v0.24.0 h1:rUiyF+x1kYawXeRth6fKFm/MdfBS6+lW4NbeATsYz8Q= +github.com/hashicorp/terraform-json v0.24.0/go.mod h1:Nfj5ubo9xbu9uiAoZVBsNOjvNKB66Oyrvtit74kC7ow= github.com/hashicorp/terraform-plugin-docs v0.20.1 h1:Fq7E/HrU8kuZu3hNliZGwloFWSYfWEOWnylFhYQIoys= github.com/hashicorp/terraform-plugin-docs v0.20.1/go.mod h1:Yz6HoK7/EgzSrHPB9J/lWFzwl9/xep2OPnc5jaJDV90= github.com/hashicorp/terraform-plugin-go v0.25.0 h1:oi13cx7xXA6QciMcpcFi/rwA974rdTxjqEhXJjbAyks= @@ -117,6 +123,8 @@ github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= +github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= @@ -203,6 +211,8 @@ github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUei github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0= github.com/zclconf/go-cty v1.15.0 h1:tTCRWxsexYUmtt/wVxgDClUe+uQusuI443uL6e+5sXQ= github.com/zclconf/go-cty v1.15.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.15.1 h1:RgQYm4j2EvoBRXOPxhUvxPzRrGDo1eCOhHXuGfrj5S0= +github.com/zclconf/go-cty v1.15.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= go.abhg.dev/goldmark/frontmatter v0.2.0 h1:P8kPG0YkL12+aYk2yU3xHv4tcXzeVnN+gU0tJ5JnxRw= @@ -210,6 +220,8 @@ go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= +golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 h1:EDuYyU/MkFXllv9QF9819VlI9a4tzGuCbhG0ExK9o1U= @@ -217,6 +229,8 @@ golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819/go.mod h1:FXUEEKJgO7OQYeo8N0 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -224,6 +238,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -262,6 +278,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8= +golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -269,12 +287,18 @@ google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAs google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb h1:3oy2tynMOP1QbTC0MsNNAV+Se8M2Bd0A5+x1QHyw+pI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb/go.mod h1:lcTa1sDdWEIHMWlITnIczmw5w60CF9ffkb8Z+DVmmjA= google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= +google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= +google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/routeros/datasource_system_routerboard_test.go b/routeros/datasource_system_routerboard_test.go index d7931119..052fb9c6 100644 --- a/routeros/datasource_system_routerboard_test.go +++ b/routeros/datasource_system_routerboard_test.go @@ -9,7 +9,7 @@ const testDatasourceSystemRouterboard = "data.routeros_system_routerboard.data" func TestAccDatasourceSystemRouterboardTest_basic(t *testing.T) { t.Log("The test is skipped, the resource is only available on real hardware.") /* - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/provider.go b/routeros/provider.go index 7b813479..fc81b84a 100644 --- a/routeros/provider.go +++ b/routeros/provider.go @@ -178,6 +178,7 @@ func Provider() *schema.Provider { "routeros_interface_ovpn_client": ResourceOpenVPNClient(), "routeros_interface_ovpn_server": ResourceInterfaceOpenVPNServer(), "routeros_interface_pppoe_client": ResourceInterfacePPPoEClient(), + "routeros_interface_pppoe_server": ResourceInterfacePppoeServer(), "routeros_interface_veth": ResourceInterfaceVeth(), "routeros_interface_vlan": ResourceInterfaceVlan(), "routeros_interface_vrrp": ResourceInterfaceVrrp(), diff --git a/routeros/provider_schema_helpers.go b/routeros/provider_schema_helpers.go index 4a11b95c..47dba70b 100644 --- a/routeros/provider_schema_helpers.go +++ b/routeros/provider_schema_helpers.go @@ -217,12 +217,13 @@ var ( PropArpRw = &schema.Schema{ Type: schema.TypeString, Optional: true, - Description: `Address Resolution Protocol mode: - * disabled - the interface will not use ARP - * enabled - the interface will use ARP - * local-proxy-arp - the router performs proxy ARP on the interface and sends replies to the same interface - * proxy-arp - the router performs proxy ARP on the interface and sends replies to other interfaces - * reply-only - the interface will only reply to requests originated from matching IP address/MAC address combinations which are entered as static entries in the ARP table. No dynamic entries will be automatically stored in the ARP table. Therefore for communications to be successful, a valid static entry must already exist.`, + Description: "Address Resolution Protocol mode:\n * disabled - the interface will not use ARP\n * enabled - " + + "the interface will use ARP\n * local-proxy-arp - the router performs proxy ARP on the interface and sends " + + "replies to the same interface\n * proxy-arp - the router performs proxy ARP on the interface and sends " + + "replies to other interfaces\n * reply-only - the interface will only reply to requests originated from " + + "matching IP address/MAC address combinations which are entered as static entries in the ARP table. No " + + "dynamic entries will be automatically stored in the ARP table. Therefore for communications to be " + + "successful, a valid static entry must already exist.", ValidateFunc: validation.StringInSlice([]string{"disabled", "enabled", "local-proxy-arp", "proxy-arp", "reply-only"}, false), DiffSuppressFunc: AlwaysPresentNotUserProvided, @@ -232,7 +233,7 @@ var ( Optional: true, Description: "ARP timeout is time how long ARP record is kept in ARP table after no packets are received " + "from IP. Value auto equals to the value of arp-timeout in IP/Settings, default is 30s. Can use postfix " + - "ms, s, M, h, d for milliseconds, seconds, minutes, hours or days. If no postfix is set then seconds (s) is used.", + "`ms`, `s`, `M`, `h`, `d` for milliseconds, seconds, minutes, hours or days. If no postfix is set then seconds (s) is used.", ValidateFunc: validation.StringMatch(regexp.MustCompile(`^$|auto$|(\d+(ms|s|M|h|d)?)+$`), "expected arp_timout value to be 'auto' string or time value"), DiffSuppressFunc: AlwaysPresentNotUserProvided, @@ -338,8 +339,8 @@ var ( Description: "Tunnel keepalive parameter sets the time interval in which the tunnel running flag will " + "remain even if the remote end of tunnel goes down. If configured time,retries fail, interface " + "running flag is removed. Parameters are written in following format: " + - "KeepaliveInterval,KeepaliveRetries where KeepaliveInterval is time interval and " + - "KeepaliveRetries - number of retry attempts. KeepaliveInterval is integer 0..4294967295", + "`KeepaliveInterval,KeepaliveRetries` where `KeepaliveInterval` is time interval and " + + "`KeepaliveRetries` - number of retry attempts. `KeepaliveInterval` is integer 0..4294967295", DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { if old == new { return true @@ -443,7 +444,7 @@ var ( ForceNew: true, Description: `Before which position the rule will be inserted. > Please check the effect of this option, as it does not work as you think! - > Best way to use in conjunction with a data source. See [example](../data-sources/firewall.md#example-usage). + > Best way to use in conjunction with a data source. See [example](../data-sources/ip_firewall.md#example-usage). `, } PropRemoteAddressRw = &schema.Schema{ diff --git a/routeros/resource_capsman_rates.go b/routeros/resource_capsman_rates.go index c096cf93..0eb3e4cd 100644 --- a/routeros/resource_capsman_rates.go +++ b/routeros/resource_capsman_rates.go @@ -80,9 +80,9 @@ func ResourceCapsManRates() *schema.Resource { Optional: true, Computed: true, Description: "Modulation and Coding Schemes that every connecting client must support. Refer to " + - "802.11ac for MCS specification. You can set MCS interval for each of Spatial Stream none " + - "- will not use selected Spatial Stream MCS 0-7 - client must support MCS-0 to MCS-7 MCS " + - "0-8 - client must support MCS-0 to MCS-8 MCS 0-9 - client must support MCS-0 to MCS-9", + "802.11ac for MCS specification. You can set MCS interval for each of Spatial Stream\n * none " + + "- will not use selected\n * MCS 0-7 - client must support MCS-0 to MCS-7\n * MCS " + + "0-8 - client must support MCS-0 to MCS-8\n * MCS 0-9 - client must support MCS-0 to MCS-9", ValidateDiagFunc: ValidationMultiValInSlice([]string{"none", "mcs0-7", "mcs0-8", "mcs0-9"}, false, false), }, "vht_supported_mcs": { @@ -90,9 +90,9 @@ func ResourceCapsManRates() *schema.Resource { Optional: true, Computed: true, Description: "Modulation and Coding Schemes that this device advertises as supported. Refer to " + - "802.11ac for MCS specification. You can set MCS interval for each of Spatial Stream none " + - "- will not use selected Spatial Stream MCS 0-7 - devices will advertise as supported " + - "MCS-0 to MCS-7 MCS 0-8 - devices will advertise as supported MCS-0 to MCS-8 MCS 0-9 - " + + "802.11ac for MCS specification. You can set MCS interval for each of Spatial Stream\n * none " + + "- will not use selected\n * MCS 0-7 - devices will advertise as supported " + + "MCS-0 to MCS-7\n * MCS 0-8 - devices will advertise as supported MCS-0 to MCS-8\n * MCS 0-9 - " + "devices will advertise as supported MCS-0 to MCS-9", ValidateDiagFunc: ValidationMultiValInSlice([]string{"none", "mcs0-7", "mcs0-8", "mcs0-9"}, false, false), }, diff --git a/routeros/resource_interface_6to4_test.go b/routeros/resource_interface_6to4_test.go index d0babd9f..51dd804c 100644 --- a/routeros/resource_interface_6to4_test.go +++ b/routeros/resource_interface_6to4_test.go @@ -10,7 +10,7 @@ import ( const testInterface6to4 = "routeros_interface_6to4.test" func TestAccInterface6to4Test_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_interface_lte_apn_test.go b/routeros/resource_interface_lte_apn_test.go index cda15e9b..e4b930fb 100644 --- a/routeros/resource_interface_lte_apn_test.go +++ b/routeros/resource_interface_lte_apn_test.go @@ -10,7 +10,7 @@ import ( const testInterfaceLteApn = "routeros_interface_lte_apn.test" func TestAccInterfaceLteApnTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_interface_macvlan.go b/routeros/resource_interface_macvlan.go index 257b01a4..fe56768c 100644 --- a/routeros/resource_interface_macvlan.go +++ b/routeros/resource_interface_macvlan.go @@ -23,10 +23,10 @@ func ResourceInterfaceMacVlan() *schema.Resource { Type: schema.TypeString, Optional: true, Default: "bridge", - Description: `Sets MACVLAN interface mode: - private - does not allow communication between MACVLAN instances on the same parent interface. - bridge - allows communication between MACVLAN instances on the same parent interface.`, - ValidateFunc: validation.StringInSlice([]string{"private", "bridge"}, true), + Description: "Sets MACVLAN interface mode:\n * private - does not allow communication between MACVLAN " + + "instances on the same parent interface.\n * bridge - allows communication between MACVLAN instances on " + + "the same parent interface.", + ValidateFunc: validation.StringInSlice([]string{"private", "bridge"}, true), }, KeyMacAddress: PropMacAddressRw( `Static MAC address of the interface. A randomly generated MAC address will be assigned when not specified.`, diff --git a/routeros/resource_interface_pppoe_server.go b/routeros/resource_interface_pppoe_server.go new file mode 100644 index 00000000..eb257223 --- /dev/null +++ b/routeros/resource_interface_pppoe_server.go @@ -0,0 +1,136 @@ +package routeros + +import ( + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" +) + +/* + { + ".id": "*AD", + "comment": "comment", + "disabled": "false", + "name": "pppoe-in1", + "running": "false", + "service": "", + "user": "" + } +*/ + +// https://help.mikrotik.com/docs/spaces/ROS/pages/2031625/PPPoE#PPPoE-PPPoEServer +func ResourceInterfacePppoeServer() *schema.Resource { + resSchema := map[string]*schema.Schema{ + MetaResourcePath: PropResourcePath("/interface/pppoe-server"), + MetaId: PropId(Id), + + "authentication": { + Type: schema.TypeSet, + Optional: true, + Description: "Authentication algorithm.", + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{"mschap2", "mschap1", "chap", "pap"}, false), + }, + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + KeyComment: PropCommentRw, + "default_profile": { + Type: schema.TypeString, + Optional: true, + Description: "", + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + KeyDisabled: PropDisabledRw, + KeyInterface: { + Type: schema.TypeString, + Optional: true, + Description: "Interface that the clients are connected to", + }, + "keepalive_timeout": { + Type: schema.TypeString, + Optional: true, + Description: "Defines the time period (in seconds) after which the router is starting to send keepalive " + + "packets every second. If there is no traffic and no keepalive responses arrive for that period of time " + + "(i.e. 2 * keepalive-timeout), the non responding client is proclaimed disconnected.", + DiffSuppressFunc: TimeEquall, + }, + "max_mru": { + Type: schema.TypeInt, + Optional: true, + Description: "Maximum Receive Unit. The optimal value is the MTU of the interface the tunnel is working " + + "over reduced by 20 (so, for 1500-byte Ethernet link, set the MTU to 1480 to avoid fragmentation of packets).", + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "max_mtu": { + Type: schema.TypeInt, + Optional: true, + Description: "Maximum Transmission Unit. The optimal value is the MTU of the interface the tunnel is working " + + "over reduced by 20 (so, for 1500-byte Ethernet link, set the MTU to 1480 to avoid fragmentation of packets).", + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "max_sessions": { + Type: schema.TypeInt, + Optional: true, + Description: "Maximum number of clients that the AC can serve. '0' = no limitations.", + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "mrru": { + Type: schema.TypeString, + Optional: true, + Description: "Maximum packet size that can be received on the link. If a packet is bigger than tunnel MTU, " + + "it will be split into multiple packets, allowing full size IP or Ethernet packets to be sent over the " + + "tunnel.", + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + KeyName: PropName(""), + "one_session_per_host": { + Type: schema.TypeBool, + Optional: true, + Description: "Allow only one session per host (determined by MAC address). If a host tries to establish " + + "a new session, the old one will be closed.", + }, + "pppoe_over_vlan_range": { + Type: schema.TypeInt, + Optional: true, + Description: "This setting allows a PPPoE server to operate over 802.1Q VLANs. By default, a PPPoE server " + + "only accepts untagged packets on its interface. However, in scenarios where clients are on separate " + + "VLANs, instead of creating multiple 802.1Q VLAN interfaces and bridging them together or configuring " + + "individual PPPoE servers for each VLAN, you can specify the necessary VLANs directly in the PPPoE server " + + "settings. When you specify the VLAN IDs, the PPPoE server will accept both untagged packets and 802.1Q " + + "tagged packets from clients, and it will reply using the same VLAN. This setting can also be applied " + + "to both CVLAN and SVLAN interfaces. For example, when the use-service-tag=yes option is used on a VLAN " + + "interface, enabling QinQ setups as well. The setting supports a range of VLAN IDs, as well as individual " + + "VLANs specified using comma-separated values. For example: pppoe-over-vlan-range=100-115,120,122,128-130.", + }, + KeyRunning: PropRunningRo, + "service": { + Type: schema.TypeString, + Optional: true, + Description: "This attribute is required in the ROS 7 version.", + }, + "service_name": { + Type: schema.TypeString, + Optional: true, + Description: "The PPPoE service name. Server will accept clients which sends PADI message with service-names " + + "that matches this setting or if service-name field in PADI message is not set.", + }, + "user": { + Type: schema.TypeString, + Optional: true, + Description: "This attribute is required in the ROS 7 version.", + }, + } + + return &schema.Resource{ + CreateContext: DefaultCreate(resSchema), + ReadContext: DefaultRead(resSchema), + UpdateContext: DefaultUpdate(resSchema), + DeleteContext: DefaultDelete(resSchema), + + Importer: &schema.ResourceImporter{ + StateContext: ImportStateCustomContext(resSchema), + }, + + Schema: resSchema, + } +} diff --git a/routeros/resource_interface_pppoe_server_test.go b/routeros/resource_interface_pppoe_server_test.go new file mode 100644 index 00000000..bae50cb1 --- /dev/null +++ b/routeros/resource_interface_pppoe_server_test.go @@ -0,0 +1,53 @@ +package routeros + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" +) + +const testInterfacePppoeServer = "routeros_interface_pppoe_server.test" + +func TestAccInterfacePppoeServerTest_basic(t *testing.T) { + t.Parallel() + for _, name := range testNames { + t.Run(name, func(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testSetTransportEnv(t, name) + }, + ProviderFactories: testAccProviderFactories, + CheckDestroy: testCheckResourceDestroy("/interface/pppoe-server", "routeros_interface_pppoe_server"), + Steps: []resource.TestStep{ + { + Config: testAccInterfacePppoeServerConfig(), + Check: resource.ComposeTestCheckFunc( + testResourcePrimaryInstanceId(testInterfacePppoeServer), + resource.TestCheckResourceAttr(testInterfacePppoeServer, "comment", "comment"), + resource.TestCheckResourceAttr(testInterfacePppoeServer, "disabled", "true"), + resource.TestCheckResourceAttr(testInterfacePppoeServer, "name", "pppoe-in1"), + resource.TestCheckResourceAttr(testInterfacePppoeServer, "user", ""), + resource.TestCheckResourceAttr(testInterfacePppoeServer, "service", ""), + ), + }, + }, + }) + + }) + } +} + +func testAccInterfacePppoeServerConfig() string { + return fmt.Sprintf(`%v + +resource "routeros_interface_pppoe_server" "test" { + comment = "comment" + disabled = true + name = "pppoe-in1" + user = "" + service = "" +} +`, providerConfig) +} diff --git a/routeros/resource_interface_vrrp.go b/routeros/resource_interface_vrrp.go index 8bdd0e40..c74e2dd5 100644 --- a/routeros/resource_interface_vrrp.go +++ b/routeros/resource_interface_vrrp.go @@ -133,7 +133,7 @@ func ResourceInterfaceVrrp() *schema.Resource { "preemption_mode": { Type: schema.TypeBool, Optional: true, - Description: "Whether the master node always has the priority. When set to 'no' the backup node will not " + + Description: "Whether the master node always has the priority. When set to `no` the backup node will not " + "be elected to be a master until the current master fails, even if the backup node has higher priority " + "than the current master. This setting is ignored if the owner router becomes available", DiffSuppressFunc: AlwaysPresentNotUserProvided, @@ -142,7 +142,7 @@ func ResourceInterfaceVrrp() *schema.Resource { Type: schema.TypeInt, Optional: true, Description: "Priority of VRRP node used in Master election algorithm. A higher number means higher " + - "priority. '255' is reserved for the router that owns VR IP and '0' is reserved for the Master router " + + "priority. `255` is reserved for the router that owns VR IP and `0` is reserved for the Master router " + "to indicate that it is releasing responsibility.", ValidateFunc: validation.IntBetween(1, 254), DiffSuppressFunc: AlwaysPresentNotUserProvided, @@ -152,7 +152,7 @@ func ResourceInterfaceVrrp() *schema.Resource { Optional: true, Description: "Specifies the remote address of the other VRRP router for syncing connection tracking. " + "If not set, the system autodetects the remote address via VRRP. The remote address is used only if " + - "sync-connection-tracking=yes.Sync connection tracking uses UDP port 8275.", + "`sync_connection_tracking = true`.Sync connection tracking uses UDP port 8275.", ValidateFunc: validation.IsIPv4Address, }, "running": { @@ -194,7 +194,7 @@ func ResourceInterfaceVrrp() *schema.Resource { { Severity: diag.Warning, Summary: "sync_connection_tracking not enabled", - Detail: "The remote address is used only if sync-connection-tracking=yes. " + + Detail: "The remote address is used only if sync_connection_tracking=true. " + "The field will be omitted in the returned response.", }, } @@ -208,7 +208,7 @@ func ResourceInterfaceVrrp() *schema.Resource { { Severity: diag.Warning, Summary: "sync_connection_tracking not enabled", - Detail: "The remote address is used only if sync-connection-tracking=yes. " + + Detail: "The remote address is used only if sync_connection_tracking=true. " + "The field will be omitted in the returned response.", }, } diff --git a/routeros/resource_interface_vxlan.go b/routeros/resource_interface_vxlan.go index ee26dff1..6d7be4b1 100644 --- a/routeros/resource_interface_vxlan.go +++ b/routeros/resource_interface_vxlan.go @@ -45,40 +45,22 @@ func ResourceInterfaceVxlan() *schema.Resource { "is available since RouterOS version 7.8.", DiffSuppressFunc: AlwaysPresentNotUserProvided, }, - "arp": { - Type: schema.TypeString, - Optional: true, - Description: "Address Resolution Protocol setting disabled - the interface will not use ARP enabled - the " + - "interface will use ARP local-proxy-arp - the router performs proxy ARP on the interface and sends replies " + - "to the same interface proxy-arp - the router performs proxy ARP on the interface and sends replies to " + - "other interfaces reply-only - the interface will only reply to requests originating from matching IP " + - "address/MAC address combinations which are entered as static entries in the IP/ARP table. No dynamic " + - "entries will be automatically stored in the IP/ARP table. Therefore for communications to be successful, " + - "a valid static entry must already exist.", - ValidateFunc: validation.StringInSlice([]string{"disabled", "enabled", "local-proxy-arp", "proxy-arp", "reply-only"}, false), - DiffSuppressFunc: AlwaysPresentNotUserProvided, - }, - "arp_timeout": { - Type: schema.TypeString, - Optional: true, - Description: "How long the ARP record is kept in the ARP table after no packets are received from IP. Value " + - "auto equals to the value of arp-timeout in IP/Settings, default is the 30s.", - DiffSuppressFunc: TimeEquall, - }, - KeyComment: PropCommentRw, - KeyDisabled: PropDisabledRw, + KeyArp: PropArpRw, + KeyArpTimeout: PropArpTimeoutRw, + KeyComment: PropCommentRw, + KeyDisabled: PropDisabledRw, "dont_fragment": { Type: schema.TypeString, Optional: true, Description: "The Don't Fragment (DF) flag controls whether a packet can be broken into smaller packets, " + "called fragments, before being sent over a network. When configuring VXLAN, this setting determines " + "the presence of the DF flag on the outer IPv4 header and can control packet fragmentation if the encapsulated " + - "packet exceeds the outgoing interface MTU. This setting has three options: disabled - the DF flag is " + + "packet exceeds the outgoing interface MTU. This setting has three options:\n * disabled - the DF flag is " + "not set on the outer IPv4 header, which means that packets can be fragmented if they are too large to " + "be sent over the outgoing interface. This also allows packet fragmentation when VXLAN uses IPv6 underlay. " + - "enabled - the DF flag is always set on the outer IPv4 header, which means that packets will not be fragmented " + + "\n * enabled - the DF flag is always set on the outer IPv4 header, which means that packets will not be fragmented " + "and will be dropped if they exceed the outgoing interface's MTU. This also avoids packet fragmentation " + - "when VXLAN uses IPv6 underlay. inherit - The DF flag on the outer IPv4 header is based on the inner " + + "when VXLAN uses IPv6 underlay.\n * inherit - The DF flag on the outer IPv4 header is based on the inner " + "IPv4 DF flag. If the inner IPv4 header has the DF flag set, the outer IPv4 header will also have it " + "set. If the packet exceeds the outgoing interface's MTU and DF is set, it will be dropped. If the inner " + "packet is non-IP, the outer IPv4 header will not have the DF flag set and packets can be fragmented. " + diff --git a/routeros/resource_interface_vxlan_test.go b/routeros/resource_interface_vxlan_test.go index 071dc37f..8effffe2 100644 --- a/routeros/resource_interface_vxlan_test.go +++ b/routeros/resource_interface_vxlan_test.go @@ -10,7 +10,7 @@ import ( const testInterfaceVxlan = "routeros_interface_vxlan.test" func TestAccInterfaceVxlanTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_interface_vxlan_vteps_test.go b/routeros/resource_interface_vxlan_vteps_test.go index 5698f22f..81aad1f1 100644 --- a/routeros/resource_interface_vxlan_vteps_test.go +++ b/routeros/resource_interface_vxlan_vteps_test.go @@ -10,7 +10,7 @@ import ( const testInterfaceVxlanVteps = "routeros_interface_vxlan_vteps.test" func TestAccInterfaceVxlanVtepsTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_interface_wireless.go b/routeros/resource_interface_wireless.go index e0697f52..9691234c 100644 --- a/routeros/resource_interface_wireless.go +++ b/routeros/resource_interface_wireless.go @@ -215,7 +215,7 @@ func ResourceInterfaceWireless() *schema.Resource { "basic_rates_b": { Type: schema.TypeSet, Optional: true, - Description: "List of basic rates, used for 2.4ghz-b, 2.4ghz-b/g and 2.4ghz-onlyg bands.Client will connect " + + Description: "List of basic rates, used for `2.4ghz-b`, `2.4ghz-b/g` and `2.4ghz-onlyg` bands.Client will connect " + "to AP only if it supports all basic rates announced by the AP. AP will establish WDS link only if it " + "supports all basic rates of the other AP.This property has effect only in AP modes, and when value of " + "rate-set is configured.", @@ -242,10 +242,10 @@ func ResourceInterfaceWireless() *schema.Resource { "channel_width": { Type: schema.TypeString, Optional: true, - Description: "Use of extension channels (e.g. Ce, eC etc) allows additional 20MHz extension channels and " + + Description: "Use of extension channels (e.g. `C`e, `eC` etc) allows additional 20MHz extension channels and " + "if it should be located below or above the control (main) channel. Extension channel allows 802.11n " + "devices to use up to 40MHz (802.11ac up to 160MHz) of spectrum in total thus increasing max throughput. " + - "Channel widths with XX and XXXX extensions automatically scan for a less crowded control channel frequency " + + "Channel widths with `XX` and `XXXX` extensions automatically scan for a less crowded control channel frequency " + "based on the number of concurrent devices running in every frequency and chooses the `C` - Control channel " + "frequency automatically.", DiffSuppressFunc: AlwaysPresentNotUserProvided, @@ -282,13 +282,13 @@ func ResourceInterfaceWireless() *schema.Resource { "default_client_tx_limit": { Type: schema.TypeInt, Optional: true, - Description: "This is the value of client-tx-limit for clients that do not match any entry in the access-list. " + + Description: "This is the value of `client-tx-limit` for clients that do not match any entry in the access-list. " + "0 means no limit.", }, "default_forwarding": { Type: schema.TypeBool, Optional: true, - Description: "This is the value of forwarding for clients that do not match any entry in the access-list.", + Description: "This is the value of forwarding for clients that do not match any entry in the access-list.", DiffSuppressFunc: AlwaysPresentNotUserProvided, }, "default_name": { @@ -307,7 +307,7 @@ func ResourceInterfaceWireless() *schema.Resource { Type: schema.TypeString, Optional: true, Description: "This interval is measured from third sending failure on the lowest data rate. At this point " + - "3 * (hw-retries + 1) frame transmits on the lowest data rate had failed. During disconnect-timeout packet " + + "`3 * (hw-retries + 1)` frame transmits on the lowest data rate had failed. During disconnect-timeout packet " + "transmission will be retried with on-fail-retry-time interval. If no frame can be transmitted successfully " + "during disconnect-timeout, the connection is closed, and this event is logged as `extensive data loss`. " + "Successful frame transmission resets this timer.", @@ -317,10 +317,10 @@ func ResourceInterfaceWireless() *schema.Resource { Type: schema.TypeString, Optional: true, Description: "How long to wait for confirmation of unicast frames (ACKs) before considering transmission " + - "unsuccessful, or in short ACK-Timeout. Distance value has these behaviors:Dynamic - causes AP to detect " + - "and use the smallest timeout that works with all connected clients.Indoor - uses the default ACK timeout " + - "value that the hardware chip manufacturer has set.Number - uses the input value in formula: ACK-timeout " + - "= ((distance * 1000) + 299) / 300 us;Acknowledgments are not used in Nstreme/NV2 protocols.", + "unsuccessful, or in short ACK-Timeout. Distance value has these behaviors:\n * Dynamic - causes AP to detect " + + "and use the smallest timeout that works with all connected clients.\n * Indoor - uses the default ACK timeout " + + "value that the hardware chip manufacturer has set.\n * Number - uses the input value in formula: `ACK-timeout " + + "= ((distance * 1000) + 299) / 300 us`\nAcknowledgments are not used in Nstreme/NV2 protocols.", DiffSuppressFunc: AlwaysPresentNotUserProvided, }, "frame_lifetime": { @@ -332,19 +332,19 @@ func ResourceInterfaceWireless() *schema.Resource { "frequency": { Type: schema.TypeString, Optional: true, - Description: "Channel frequency value in MHz on which AP will operate.Allowed values depend on the selected " + + Description: "Channel frequency value in MHz on which AP will operate. Allowed values depend on the selected " + "band, and are restricted by country setting and wireless card capabilities. This setting has no effect " + "if interface is in any of station modes, or in wds-slave mode, or if DFS is active.Note: If using mode " + - "`superchannel.", + "`superchannel`.", DiffSuppressFunc: AlwaysPresentNotUserProvided, }, "frequency_mode": { Type: schema.TypeString, Optional: true, - Description: "Three frequency modes are available: `regulatory-domain` - Limit available channels and maximum " + - "transmit power for each channel according to the value of country `manual-txpower` - Same as above, but " + - "do not limit maximum transmit power.`superchannel` - Conformance Testing Mode. Allow all channels supported " + - "by the card.List of available channels for each band can be seen in `/interface wireless` info allowed-channels. " + + Description: "Three frequency modes are available:\n * regulatory-domain - Limit available channels and maximum " + + "transmit power for each channel according to the value of country\n * manual-txpower - Same as above, but " + + "do not limit maximum transmit power\n *`superchannel` - Conformance Testing Mode. Allow all channels supported " + + "by the card.\nList of available channels for each band can be seen in `/interface wireless` info allowed-channels. " + "This mode allows you to test wireless channels outside the default scan-list and/or regulatory domain. " + "This mode should only be used in controlled environments, or if you have special permission to use it " + "in your region. Before v4.3 this was called Custom Frequency Upgrade, or Superchannel. Since RouterOS " + @@ -371,8 +371,8 @@ func ResourceInterfaceWireless() *schema.Resource { "hide_ssid": { Type: schema.TypeBool, Optional: true, - Description: "Yes - AP does not include SSID in the beacon frames, and does not reply to probe requests " + - "that have broadcast SSID.no - AP includes SSID in the beacon frames, and replies to probe requests that " + + Description: "`true` - AP does not include SSID in the beacon frames, and does not reply to probe requests " + + "that have broadcast SSID. `false` - AP includes SSID in the beacon frames, and replies to probe requests that " + "have broadcast SSID.This property has an effect only in AP mode. Setting it to yes can remove this network " + "from the list of wireless networks that are shown by some client software. Changing this setting does " + "not improve the security of the wireless network, because SSID is included in other frames sent by the " + @@ -460,7 +460,7 @@ func ResourceInterfaceWireless() *schema.Resource { "keepalive_frames": { Type: schema.TypeString, Optional: true, - Description: "Applies only if wireless interface is in mode=ap-bridge. If a client has not communicated " + + Description: "Applies only if wireless interface is in `mode = ap-bridge`. If a client has not communicated " + "for around 20 seconds, AP sends a `keepalive-frame`. Note, disabling the feature can lead to `ghost` " + "clients in registration-table.", ValidateFunc: validation.StringInSlice([]string{"enabled", "disabled"}, false), @@ -485,7 +485,7 @@ func ResourceInterfaceWireless() *schema.Resource { "mode": { Type: schema.TypeString, Optional: true, - Description: "Selection between different station and access point (AP) modes. **Station modes**: `station` - Basic " + + Description: "Selection between different station and access point (AP) modes.\n * Station modes: `station` - Basic " + "station mode. Find and connect to acceptable AP. `station-wds` - Same as station, but create WDS link with " + "AP, using proprietary extension. AP configuration has to allow WDS links with this device. Note that " + "this mode does not use entries in wds. `station-pseudobridge` - Same as station, but additionally perform " + @@ -495,10 +495,10 @@ func ResourceInterfaceWireless() *schema.Resource { "AP accepts clients in station-bridge mode when enabled using bridge-mode parameter. In this mode, the " + "AP maintains a forwarding table with information on which MAC addresses are reachable over which station " + "device. Only works with RouterOS APs. With station-bridge mode, it is not possible to connect to CAPsMAN " + - "controlled CAP. **AP modes**: `ap-bridge` - Basic access point mode. `bridge` - Same as ap-bridge, but limited " + + "controlled CAP.\n * AP modes: `ap-bridge` - Basic access point mode. `bridge` - Same as ap-bridge, but limited " + "to one associated client. `wds-slave` - Same as ap-bridge, but scan for AP with the same ssid and establishes " + "WDS link. If this link is lost or cannot be established, then continue scanning. If dfs-mode is radar-detect, " + - "then APs with enabled hide-ssid will not be found during scanning. **Special modes**: `alignment-only` - Put " + + "then APs with enabled hide-ssid will not be found during scanning.\n * Special modes: `alignment-only` - Put " + "the interface in a continuous transmit mode that is used for aiming the remote antenna. `nstreme-dual-slave` " + "- allow this interface to be used in nstreme-dual setup. MAC address translation in pseudobridge modes " + "works by inspecting packets and building a table of corresponding IP and MAC addresses. All packets " + @@ -640,10 +640,10 @@ func ResourceInterfaceWireless() *schema.Resource { "preamble_mode": { Type: schema.TypeString, Optional: true, - Description: "Short preamble mode is an option of 802.11b standard that reduces per-frame overhead.On AP:long " + - "- Do not use short preamble.short - Announce short preamble capability. Do not accept connections from " + - "clients that do not have this capability.both - Announce short preamble capability.On station:long - " + - "do not use short preamble.short - do not connect to AP if it does not support short preamble.both - " + + Description: "Short preamble mode is an option of 802.11b standard that reduces per-frame overhead.On AP:\n * long " + + "- Do not use short preamble.\n * short - Announce short preamble capability. Do not accept connections from " + + "clients that do not have this capability.\n * both - Announce short preamble capability.\nOn station:\n *long - " + + "do not use short preamble.\n * short - do not connect to AP if it does not support short preamble.\n * both - " + "Use short preamble if AP supports it.", ValidateFunc: validation.StringInSlice([]string{"both", "long", "short"}, false), DiffSuppressFunc: AlwaysPresentNotUserProvided, @@ -773,7 +773,7 @@ func ResourceInterfaceWireless() *schema.Resource { "supported_rates_b": { Type: schema.TypeString, Optional: true, - Description: "List of supported rates, used for 2ghz-b, 2ghz-b/g and 2ghz-b/g/n bands. Two devices will " + + Description: "List of supported rates, used for `2ghz-b, `2ghz-b/g` and `2ghz-b/g/n` bands. Two devices will " + "communicate only using rates that are supported by both devices. This property has effect only when " + "value of rate-set is configured.", Elem: &schema.Schema{ @@ -844,9 +844,9 @@ func ResourceInterfaceWireless() *schema.Resource { Type: schema.TypeString, Optional: true, Description: "Modulation and Coding Schemes that every connecting client must support. Refer to 802.11ac " + - "for MCS specification. You can set MCS interval for each of Spatial Stream `none` - will not use selected; " + - "Spatial Stream `mcs0-7` - client must support MCS-0 to MCS-7; `mcs0-8` - client must support MCS-0 to MCS-8; " + - "`mcs0-9` - client must support MCS-0 to MCS-9.", + "for MCS specification. You can set MCS interval for each of Spatial Stream\n * none - will not use selected;" + + "\n * mcs0-7 - client must support MCS-0 to MCS-7;\n * mcs0-8 - client must support MCS-0 to MCS-8;" + + "\n * mcs0-9 - client must support MCS-0 to MCS-9.", ValidateDiagFunc: ValidationMultiValInSlice([]string{"none", "mcs0-7", "`mcs0-8`", "mcs0-9"}, false, false), DiffSuppressFunc: AlwaysPresentNotUserProvided, }, @@ -854,9 +854,9 @@ func ResourceInterfaceWireless() *schema.Resource { Type: schema.TypeString, Optional: true, Description: "Modulation and Coding Schemes that this device advertises as supported. Refer to 802.11ac " + - "for MCS specification. You can set MCS interval for each of Spatial Stream `none` - will not use selected; " + - "Spatial Stream `mcs0-7` - devices will advertise as supported MCS-0 to MCS-7; `mcs0-8` - devices will advertise " + - "as supported MCS-0 to MCS-8; `mcs0-9` - devices will advertise as supported MCS-0 to MCS-9.", + "for MCS specification. You can set MCS interval for each of Spatial Stream\n * none - will not use selected; " + + "\n * mcs0-7 - devices will advertise as supported MCS-0 to MCS-7;\n * mcs0-8 - devices will advertise " + + "as supported MCS-0 to MCS-8;\n * mcs0-9 - devices will advertise as supported MCS-0 to MCS-9.", ValidateDiagFunc: ValidationMultiValInSlice([]string{"none", "mcs0-7", "`mcs0-8`", "mcs0-9"}, false, false), DiffSuppressFunc: AlwaysPresentNotUserProvided, }, @@ -897,10 +897,10 @@ func ResourceInterfaceWireless() *schema.Resource { "wds_mode": { Type: schema.TypeString, Optional: true, - Description: "Controls how WDS links with other devices (APs and clients in station-wds mode) are established. `disabled` " + - "does not allow WDS links. `static` only allows WDS links that are manually configured in WDS. `dynamic` also " + + Description: "Controls how WDS links with other devices (APs and clients in station-wds mode) are established.\n * disabled " + + "does not allow WDS links.\n * static only allows WDS links that are manually configured in WDS.\n * dynamic also " + "allows WDS links with devices that are not configured in WDS, by creating required entries dynamically. " + - "Such dynamic WDS entries are removed automatically after the connection with the other AP is lost. `-mesh` " + + "Such dynamic WDS entries are removed automatically after the connection with the other AP is lost.\n * -mesh " + "modes use different (better) method for establishing link between AP, that is not compatible with APs " + "in non-mesh mode. This method avoids one-sided WDS links that are created only by one of the two APs. " + "Such links cannot pass any data.When AP or station is establishing WDS connection with another AP, it " + @@ -913,13 +913,13 @@ func ResourceInterfaceWireless() *schema.Resource { "wireless_protocol": { Type: schema.TypeString, Optional: true, - Description: "Specifies protocol used on wireless interface; `unspecified` - protocol mode used on previous " + + Description: "Specifies protocol used on wireless interface;\n * unspecified - protocol mode used on previous " + "RouterOS versions (v3.x, v4.x). Nstreme is enabled by old enable-nstreme setting, Nv2 configuration " + - "is not possible. `any` : on AP - regular 802.11 Access Point or Nstreme Access Point; on station - selects " + - "Access Point without specific sequence, it could be changed by connect-list rules. `nstreme` - enables " + - "Nstreme protocol (the same as old enable-nstreme setting). `nv2` - enables Nv2 protocol. `nv2 nstreme` : on " + + "is not possible.\n * any : on AP - regular 802.11 Access Point or Nstreme Access Point; on station - selects " + + "Access Point without specific sequence, it could be changed by connect-list rules.\n * nstreme - enables " + + "Nstreme protocol (the same as old enable-nstreme setting).\n * nv2 - enables Nv2 protocol.\n * nv2 nstreme : on " + "AP - uses first wireless-protocol setting, always Nv2; on station - searches for Nv2 Access Point, then " + - "for Nstreme Access Point. `nv2 nstreme 802.11` - on AP - uses first wireless-protocol setting, always Nv2; " + + "for Nstreme Access Point.\n * nv2 nstreme 802.11 - on AP - uses first wireless-protocol setting, always Nv2; " + "on station - searches for Nv2 Access Point, then for Nstreme Access Point, then for regular 802.11 Access " + "Point.Warning! Nv2 doesn't have support for Virtual AP.", ValidateFunc: validation.StringInSlice([]string{"802.11", "any", "nstreme", "nv2", "nv2-nstreme", @@ -930,7 +930,7 @@ func ResourceInterfaceWireless() *schema.Resource { "wmm_support": { Type: schema.TypeString, Optional: true, - Description: "Specifies whether to enable WMM. Only applies to bands B and G. Other bands will have it " + + Description: "Specifies whether to enable WMM. Only applies to bands `B` and `G`. Other bands will have it " + "enabled regardless of this setting.", ValidateFunc: validation.StringInSlice([]string{"disabled", "enabled", "required"}, false), DiffSuppressFunc: AlwaysPresentNotUserProvided, diff --git a/routeros/resource_interface_wireless_access_list.go b/routeros/resource_interface_wireless_access_list.go index 8afc6da8..4d872042 100644 --- a/routeros/resource_interface_wireless_access_list.go +++ b/routeros/resource_interface_wireless_access_list.go @@ -63,14 +63,14 @@ func ResourceInterfaceWirelessAccessList() *schema.Resource { "forwarding": { Type: schema.TypeBool, Optional: true, - Description: "`No` - Client cannot send frames to other station that are connected to same access point.yes - " + - "Client can send frames to other stations on the same access point.", + Description: "\n * false - Client cannot send frames to other station that are connected to same access point." + + "\n *true - Client can send frames to other stations on the same access point.", DiffSuppressFunc: AlwaysPresentNotUserProvided, }, "interface": { Type: schema.TypeString, Optional: true, - Description: "Rules with interface=any are used for any wireless interface and the interface=all defines interface-list `all` " + + Description: "Rules with interface=any are used for any wireless interface and the `interface = all` defines interface-list `all` " + "name. To make rule that applies only to one wireless interface, specify that interface as a value of " + "this property.", DiffSuppressFunc: AlwaysPresentNotUserProvided, diff --git a/routeros/resource_interface_wireless_access_list_test.go b/routeros/resource_interface_wireless_access_list_test.go index a77618f3..86e92c81 100644 --- a/routeros/resource_interface_wireless_access_list_test.go +++ b/routeros/resource_interface_wireless_access_list_test.go @@ -15,7 +15,7 @@ func TestAccInterfaceWirelessAccessListTest_basic(t *testing.T) { return } - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_interface_wireless_connect_list.go b/routeros/resource_interface_wireless_connect_list.go index 0b4a53a0..dc35864c 100644 --- a/routeros/resource_interface_wireless_connect_list.go +++ b/routeros/resource_interface_wireless_connect_list.go @@ -5,7 +5,22 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) +/* +iw-asra=any +iw-esr=any +iw-hessid=00:00:00:00:00:00 +iw-hotspot20=any +iw-hotspot20-dgaf=any +iw-internet=any +iw-ipv4-availability=any +iw-ipv6-availability=any +iw-network-type=wildcard +iw-roaming-ois="" +iw-venue=any +iw-uesa=any +*/ // https://help.mikrotik.com/docs/spaces/ROS/pages/8978446/Wireless+Interface#WirelessInterface-ConnectList +// https://help.mikrotik.com/docs/spaces/ROS/pages/7962628/Interworking+Profiles func ResourceInterfaceWirelessConnectList() *schema.Resource { resSchema := map[string]*schema.Schema{ MetaResourcePath: PropResourcePath("/interface/wireless/connect-list"), @@ -43,14 +58,157 @@ func ResourceInterfaceWirelessConnectList() *schema.Resource { Type: schema.TypeString, Optional: true, Description: "", - ValidateFunc: validation.StringInSlice([]string{"yes", "no", "any"}, false), + ValidateFunc: ValidationAutoYesNo, + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "iw_asra": { + Type: schema.TypeString, + Optional: true, + Description: "Additional Steps Required for Access. Set to yes, if a user should take additional steps " + + "to access the internet, like the walled garden.", + ValidateFunc: ValidationAutoYesNo, + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "iw_authentication_types": { + Type: schema.TypeString, + Optional: true, + Description: "This property is only effective when `asra` is set to `yes`. Value of `url` is optional and " + + "not needed if `dns-redirection` or `online-enrollment` is selected. To set the value of `url` to empty " + + "string use double quotes. For example: `authentication-types=online-enrollment:\"\"`", + }, + "iw_connection_capabilities": { + Type: schema.TypeString, + Optional: true, + Description: "This option allows to provide information about the allowed IP protocols and ports. This " + + "information can be provided in ANQP response. The first number represents the IP protocol number, " + + "the second number represents a port number.\n * closed - set if protocol and port combination is not " + + "allowed;\n * open - set if protocol and port combination is allowed;\n * unknown - set if protocol " + + "and port combination is either open or closed.\n\nExample: `connection-capabilities=6:80:open,17:5060:closed`" + + "Setting such a value on an Access Point informs the Wireless client, which is connecting to the " + + "Access Point, that HTTP (6 - TCP, 80 - HTTP) is allowed and VoIP (17 - UDP; 5060 - VoIP) is not " + + "allowed. This property does not restrict or allow usage of these protocols and ports, it only gives " + + "information to station device which is connecting to Access Point.", + }, + "iw_esr": { + Type: schema.TypeString, + Optional: true, + Description: "Emergency services reachable (ESR). Set to yes in order to indicate that emergency " + + "services are reachable through the access point.", + ValidateFunc: ValidationAutoYesNo, + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "iw_hessid": { + Type: schema.TypeString, + Optional: true, + Description: "Homogenous extended service set identifier (HESSID). Devices that provide access to same " + + "external networks are in one homogenous extended service set. This service set can be identified by " + + "HESSID that is the same on all access points in this set. 6-byte value of HESSID is represented as MAC " + + "address. It should be globally unique, therefore it is advised to use one of the MAC address of access " + + "point in the service set.", + ValidateFunc: validation.IsMACAddress, + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "iw_hotspot20": { + Type: schema.TypeString, + Optional: true, + Description: "Indicate Hotspot 2.0 capability of the Access Point.", + ValidateFunc: ValidationAutoYesNo, + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "iw_hotspot20_dgaf": { + Type: schema.TypeString, + Optional: true, + Description: "Downstream Group-Addressed Forwarding (DGAF). Sets value of DGAF bit to indicate whether " + + "multicast and broadcast frames to clients are disabled or enabled.\n * yes - multicast and broadcast " + + "frames to clients are enabled;\n * no - multicast and broadcast frames to clients are disabled.\n" + + "To disable multicast and broadcast frames set `multicast-helper=full`.", + ValidateFunc: ValidationAutoYesNo, + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "iw_internet": { + Type: schema.TypeString, + Optional: true, + Description: "Whether the internet is available through this connection or not. This information is " + + "included in the Interworking element.", + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "iw_ipv4_availability": { + Type: schema.TypeString, + Optional: true, + Description: "Information about what IPv4 address and access are available." + + "\n * not-available - Address type not available;" + + "\n * public - public IPv4 address available;" + + "\n * port-restricted - port-restricted IPv4 address available;" + + "\n * single-nated - single NATed private IPv4 address available;" + + "\n * double-nated - double NATed private IPv4 address available;" + + "\n * port-restricted-single-nated -port-restricted IPv4 address and single NATed IPv4 address available;" + + "\n * port-restricted-double-nated - port-restricted IPv4 address and double NATed IPv4 address available;" + + "\n * unknown - availability of the address type is not known.", + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "iw_ipv6_availability": { + Type: schema.TypeString, + Optional: true, + Description: "Information about what IPv6 address and access are available." + + "\n * not-available - Address type not available;" + + "\n * available - address type available;" + + "\n * unknown - availability of the address type is not known.", + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "iw_network_type": { + Type: schema.TypeString, + Optional: true, + Description: "Information about network access type." + + "\n * emergency-only - a network dedicated and limited to accessing emergency services;" + + "\n * personal-device - a network of personal devices. An example of this type of network is a camera " + + "that is attached to a printer, thereby forming a network for the purpose of printing pictures;" + + "\n * private - network for users with user accounts. Usually used in enterprises for employees, not guests;" + + "\n * private-with-guest - same as private, but guest accounts are available;" + + "\n * public-chargeable - a network that is available to anyone willing to pay. For example, a " + + "subscription to Hotspot 2.0 service or in-room internet access in a hotel;" + + "\n * public-free - network is available to anyone without any fee. For example, municipal network in " + + "city or airport Hotspot;" + + "\n * test - network used for testing and experimental uses. Not used in production;" + + "\n * wildcard - is used on Wireless clients. Sending probe request with a wildcard as network type " + + "value will make all Interworking Access Points respond despite their actual network-type setting." + + "\n\nA client sends a probe request frame with network-type set to value it is interested in. It will " + + "receive replies only from access points with the same value (except the case of wildcard).", + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "iw_realms": { + Type: schema.TypeString, + Optional: true, + Description: "Information about supported realms and the corresponding EAP method. " + + "`realms=example.com:eap-tls,foo.ba:not-specified`", + }, + "iw_roaming_ois": { + Type: schema.TypeString, + Optional: true, + Description: "Organization identifier (OI) usually are 24-bit is unique identifiers like organizationally " + + "unique identifier (OUI) or company identifier (CID). In some cases, OI is longer for example OUI-36." + + "A subscription service provider (SSP) can be specified by its OI. roaming-ois property can contain " + + "zero or more SSPs OIs whose networks are accessible via this AP. Length of OI should be specified " + + "before OI itself. For example, to set E4-8D-8C and 6C-3B-6B: `roaming-ois=03E48D8C036C3B6B`", + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "iw_uesa": { + Type: schema.TypeString, + Optional: true, + Description: "Unauthenticated emergency service accessible (UESA)." + + "\n * no - indicates that no unauthenticated emergency services are reachable through this Access Point;" + + "\n * yes - indicates that higher layer unauthenticated emergency services are reachable through this Access Point.", + DiffSuppressFunc: AlwaysPresentNotUserProvided, + }, + "iw_venue": { + Type: schema.TypeString, + Optional: true, + Description: "Specify the venue in which the Access Point is located. Choose the value from available " + + "ones. Some examples:\n ```\n" + + " venue=business-bank\n" + + " venue=mercantile-shopping-mall\n" + + " venue=educational-university-or-college\n ```", DiffSuppressFunc: AlwaysPresentNotUserProvided, }, - /* ??? - iw-asra iw-esr iw-hotspot20-dgaf iw-ipv6-availability iw-roaming-ois - iw-authentication-types iw-hessid iw-internet iw-network-type iw-uesa - iw-connection-capabilities iw-hotspot20 iw-ipv4-availability iw-realms iw-venue - */ KeyMacAddress: PropMacAddressRw("Rule matches only AP with the specified MAC address.", false), "security_profile": { Type: schema.TypeString, diff --git a/routeros/resource_interface_wireless_security_profiles_test.go b/routeros/resource_interface_wireless_security_profiles_test.go index a5e01187..3f59ae48 100644 --- a/routeros/resource_interface_wireless_security_profiles_test.go +++ b/routeros/resource_interface_wireless_security_profiles_test.go @@ -15,7 +15,7 @@ func TestAccInterfaceWirelessSecurityProfilesTest_basic(t *testing.T) { return } - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_firewall_addr_list.go b/routeros/resource_ip_firewall_addr_list.go index 4296221a..8f666d21 100644 --- a/routeros/resource_ip_firewall_addr_list.go +++ b/routeros/resource_ip_firewall_addr_list.go @@ -1,8 +1,9 @@ package routeros import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "regexp" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) /* @@ -68,7 +69,7 @@ func ResourceIPFirewallAddrList() *schema.Resource { Description: `Time after address will be removed from address list. If timeout is not specified, the address will be stored into the address list permanently. > Please plan your work logic based on the fact that after the timeout - > the resource has been destroyed outside of Terraform. + > the resource has been destroyed outside of a Terraform. `, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { if old == new { diff --git a/routeros/resource_ip_firewall_mangle.go b/routeros/resource_ip_firewall_mangle.go index d2664d09..bf4c7167 100644 --- a/routeros/resource_ip_firewall_mangle.go +++ b/routeros/resource_ip_firewall_mangle.go @@ -261,12 +261,10 @@ func ResourceIPFirewallMangle() *schema.Resource { "new_mss": { Type: schema.TypeString, Optional: true, - Description: `Sets a new MSS for a packet. - > clamp-to-pmtu feature sets (DF) bit in the IP header to dynamically discover the PMTU of a path. - > Host sends all datagrams on that path with the DF bit set until receives ICMP. - > Destination Unreachable messages with a code meaning "fragmentation needed and DF set". - > Upon receipt of such a message, the source host reduces its assumed PMTU for the path. -`, + Description: "Sets a new MSS for a packet.\n * clamp-to-pmtu feature sets (DF) bit in the IP header to " + + "dynamically discover the PMTU of a path.\n * Host sends all datagrams on that path with the DF bit set " + + "until receives ICMP.\n * Destination Unreachable messages with a code meaning `fragmentation needed and " + + "DF set`.\n * Upon receipt of such a message, the source host reduces its assumed PMTU for the path.", ValidateFunc: validation.StringMatch(regexp.MustCompile(`^(\d+|clamp-to-pmtu)$`), `Value must be a number in quotes or the string "clamp-to-pmtu".`), }, diff --git a/routeros/resource_ip_hotspot_ip_binding.go b/routeros/resource_ip_hotspot_ip_binding.go index a90c933b..44b1638d 100644 --- a/routeros/resource_ip_hotspot_ip_binding.go +++ b/routeros/resource_ip_hotspot_ip_binding.go @@ -48,9 +48,9 @@ func ResourceIpHotspotIpBinding() *schema.Resource { "type": { Type: schema.TypeString, Optional: true, - Description: "Type of the IP-binding action `regular` - performs One-to-One NAT according to the rule, translates " + - "the address to to-address; `bypassed` - performs the translation, but excludes client from login to the " + - "HotSpot; `blocked` - translation is not performed and packets from a host are dropped.", + Description: "Type of the IP-binding action\n * regular - performs One-to-One NAT according to the rule, translates " + + "the address to to-address;\n * bypassed - performs the translation, but excludes client from login to the " + + "HotSpot;\n * blocked - translation is not performed and packets from a host are dropped.", ValidateFunc: validation.StringInSlice([]string{"blocked", "bypassed", "regular"}, false), }, } diff --git a/routeros/resource_ip_hotspot_ip_binding_test.go b/routeros/resource_ip_hotspot_ip_binding_test.go index f2ff6eeb..9149837a 100644 --- a/routeros/resource_ip_hotspot_ip_binding_test.go +++ b/routeros/resource_ip_hotspot_ip_binding_test.go @@ -10,7 +10,7 @@ import ( const testIpHotspotIpBinding = "routeros_ip_hotspot_ip_binding.test" func TestAccIpHotspotIpBindingTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_hotspot_profile.go b/routeros/resource_ip_hotspot_profile.go index cbfd3378..0a78366e 100644 --- a/routeros/resource_ip_hotspot_profile.go +++ b/routeros/resource_ip_hotspot_profile.go @@ -87,19 +87,19 @@ func ResourceIpHotspotProfile() *schema.Resource { "login_by": { Type: schema.TypeSet, Optional: true, - Description: "Used HotSpot authentication method\n" + - "* mac-cookie - enables login by mac cookie method.\n" + + Description: "Used HotSpot authentication method\n " + + "* mac-cookie - enables login by mac cookie method.\n " + "* cookie - may only be used with other HTTP authentication method. HTTP cookie is generated, when user authenticates " + "in HotSpot for the first time. User is not asked for the login/password and authenticated automatically, " + - "until cookie-lifetime is active.\n" + + "until cookie-lifetime is active.\n " + "* http-chap - login/password is required for the user to authenticate in HotSpot. CHAP " + - "challenge-response method with MD5 hashing algorithm is used for protecting passwords. \n" + + "challenge-response method with MD5 hashing algorithm is used for protecting passwords. \n " + "* http-pap - login/password is required for user to authenticate in HotSpot. Username and password are " + - "sent over network in plain text.\n" + + "sent over network in plain text.\n " + "* https - login/password is required for user to authenticate in HotSpot. Client login/password " + - "exchange between client and server is encrypted with SSL tunnel.\n" + + "exchange between client and server is encrypted with SSL tunnel.\n " + "* mac - client is authenticated without asking login form. Client MAC-address is added to `/ip hotspot " + - "user` database, client is authenticated as soon as connected to the HotSpot\n" + + "user` database, client is authenticated as soon as connected to the HotSpot\n " + "* trial - client is allowed to use internet without HotSpot login for the specified amount of time.", Elem: &schema.Schema{ Type: schema.TypeString, diff --git a/routeros/resource_ip_hotspot_profile_test.go b/routeros/resource_ip_hotspot_profile_test.go index 625a40d4..55a8317a 100644 --- a/routeros/resource_ip_hotspot_profile_test.go +++ b/routeros/resource_ip_hotspot_profile_test.go @@ -10,7 +10,7 @@ import ( const testIpHotspotProfile = "routeros_ip_hotspot_profile.test" func TestAccIpHotspotProfileTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_hotspot_service_port_test.go b/routeros/resource_ip_hotspot_service_port_test.go index 7ccdacf4..82ca5ef2 100644 --- a/routeros/resource_ip_hotspot_service_port_test.go +++ b/routeros/resource_ip_hotspot_service_port_test.go @@ -10,7 +10,7 @@ import ( const testIpHotspotServicePort = "routeros_ip_hotspot_service_port.test" func TestAccIpHotspotServicePortTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_hotspot_test.go b/routeros/resource_ip_hotspot_test.go index b118d8a1..67eec08b 100644 --- a/routeros/resource_ip_hotspot_test.go +++ b/routeros/resource_ip_hotspot_test.go @@ -10,7 +10,7 @@ import ( const testIpHotspot = "routeros_ip_hotspot.test" func TestAccIpHotspotTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_hotspot_user_profile_test.go b/routeros/resource_ip_hotspot_user_profile_test.go index e59dbdaa..7173673f 100644 --- a/routeros/resource_ip_hotspot_user_profile_test.go +++ b/routeros/resource_ip_hotspot_user_profile_test.go @@ -10,7 +10,7 @@ import ( const testIpHotspotUserProfile = "routeros_ip_hotspot_user_profile.test" func TestAccIpHotspotUserProfileTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_hotspot_user_test.go b/routeros/resource_ip_hotspot_user_test.go index 336ec102..6d164a48 100644 --- a/routeros/resource_ip_hotspot_user_test.go +++ b/routeros/resource_ip_hotspot_user_test.go @@ -10,7 +10,7 @@ import ( const testIpHotspotUser = "routeros_ip_hotspot_user.test" func TestAccIpHotspotUserTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_hotspot_walled_garden_ip_test.go b/routeros/resource_ip_hotspot_walled_garden_ip_test.go index 534d0c92..c5ddf1ac 100644 --- a/routeros/resource_ip_hotspot_walled_garden_ip_test.go +++ b/routeros/resource_ip_hotspot_walled_garden_ip_test.go @@ -10,7 +10,7 @@ import ( const testIpHotspotWalledGardenIp = "routeros_ip_hotspot_walled_garden_ip.test" func TestAccIpHotspotWalledGardenIpTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_hotspot_walled_garden_test.go b/routeros/resource_ip_hotspot_walled_garden_test.go index fb9044df..73075d1f 100644 --- a/routeros/resource_ip_hotspot_walled_garden_test.go +++ b/routeros/resource_ip_hotspot_walled_garden_test.go @@ -10,7 +10,7 @@ import ( const testIpHotspotWalledGarden = "routeros_ip_hotspot_walled_garden.test" func TestAccIpHotspotWalledGardenTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_ipsec_identity.go b/routeros/resource_ip_ipsec_identity.go index 5dd6f2fe..3e4bb747 100644 --- a/routeros/resource_ip_ipsec_identity.go +++ b/routeros/resource_ip_ipsec_identity.go @@ -26,15 +26,15 @@ func ResourceIpIpsecIdentity() *schema.Resource { "auth_method": { Type: schema.TypeString, Optional: true, - Description: "Authentication method: `digital-signature` - authenticate using a pair of RSA certificates; `eap` " + - "- IKEv2 EAP authentication for initiator (peer with a netmask of `/32`). Must be used together with eap-methods; `eap-radius` " + + Description: "Authentication method:\n * digital-signature - authenticate using a pair of RSA certificates;\n * eap " + + "- IKEv2 EAP authentication for initiator (peer with a netmask of `/32`). Must be used together with eap-methods;\n * eap-radius " + "- IKEv2 EAP RADIUS passthrough authentication for the responder (RFC 3579). A server certificate in " + "this case is required. If a server certificate is not specified then only clients supporting EAP-only " + - "(RFC 5998) will be able to connect. Note that the EAP method should be compatible with EAP-only; `pre-shared-key` " + + "(RFC 5998) will be able to connect. Note that the EAP method should be compatible with EAP-only;\n * pre-shared-key " + "- authenticate by a password (pre-shared secret) string shared between the peers (not recommended since " + - "an offline attack on the pre-shared key is possible); `rsa-key` - authenticate using an RSA key imported " + - "in keys menu. Only supported in IKEv1; `pre-shared-key-xauth` - authenticate by a password (pre-shared " + - "secret) string shared between the peers + XAuth username and password. Only supported in IKEv1; `rsa-signature-hybrid` " + + "an offline attack on the pre-shared key is possible);\n * rsa-key - authenticate using an RSA key imported " + + "in keys menu. Only supported in IKEv1;\n * pre-shared-key-xauth - authenticate by a password (pre-shared " + + "secret) string shared between the peers + XAuth username and password. Only supported in IKEv1;\n * rsa-signature-hybrid " + "- responder certificate authentication with initiator XAuth. Only supported in IKEv1.", ValidateFunc: validation.StringInSlice([]string{"digital-signature", "eap", "eap-radius", "pre-shared-key", "pre-shared-key-xauth", "rsa-key", "rsa-signature-hybrid"}, false), @@ -56,8 +56,8 @@ func ResourceIpIpsecIdentity() *schema.Resource { Description: "All EAP methods requires whole certificate chain including intermediate and root CA certificates " + "to be present in System/Certificates menu. Also, the username and password (if required by the authentication " + "server) must be specified. Multiple EAP methods may be specified and will be used in a specified order. " + - "Currently supported EAP methods: `eap-mschapv2`; `eap-peap` - also known as PEAPv0/EAP-MSCHAPv2; `eap-tls` - " + - "requires additional client certificate specified under certificate parameter; `eap-ttls`.", + "Currently supported EAP methods:\n * eap-mschapv2;\n * eap-peap - also known as PEAPv0/EAP-MSCHAPv2;\n * eap-tls - " + + "requires additional client certificate specified under certificate parameter;\n * eap-ttls.", ValidateFunc: validation.StringInSlice([]string{"eap-mschapv2", "eap-peap", "eap-tls", "eap-ttls"}, false), DiffSuppressFunc: AlwaysPresentNotUserProvided, }, diff --git a/routeros/resource_ip_ipsec_identity_test.go b/routeros/resource_ip_ipsec_identity_test.go index 8c22bd24..8fe9411c 100644 --- a/routeros/resource_ip_ipsec_identity_test.go +++ b/routeros/resource_ip_ipsec_identity_test.go @@ -11,7 +11,7 @@ import ( const testIpIpsecIdentity = "routeros_ip_ipsec_identity.identity" func TestAccIpIpsecIdentityTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_ipsec_key_test.go b/routeros/resource_ip_ipsec_key_test.go index 207c3c11..37764f81 100644 --- a/routeros/resource_ip_ipsec_key_test.go +++ b/routeros/resource_ip_ipsec_key_test.go @@ -10,7 +10,7 @@ import ( const testIpIpsecKey = "routeros_ip_ipsec_key.test" func TestAccIpIpsecKeyTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_ipsec_mode_config_test.go b/routeros/resource_ip_ipsec_mode_config_test.go index 18c9a176..780bdd18 100644 --- a/routeros/resource_ip_ipsec_mode_config_test.go +++ b/routeros/resource_ip_ipsec_mode_config_test.go @@ -10,7 +10,7 @@ import ( const testIpIpsecModeConfig = "routeros_ip_ipsec_mode_config.test" func TestAccIpIpsecModeConfigTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_ipsec_peer_test.go b/routeros/resource_ip_ipsec_peer_test.go index f614acdb..67018461 100644 --- a/routeros/resource_ip_ipsec_peer_test.go +++ b/routeros/resource_ip_ipsec_peer_test.go @@ -10,7 +10,7 @@ import ( const testIpIpsecPeer = "routeros_ip_ipsec_peer.test" func TestAccIpIpsecPeerTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_ipsec_policy.go b/routeros/resource_ip_ipsec_policy.go index a5ed7fc0..764459b8 100644 --- a/routeros/resource_ip_ipsec_policy.go +++ b/routeros/resource_ip_ipsec_policy.go @@ -83,9 +83,9 @@ func ResourceIpIpsecPolicy() *schema.Resource { "level": { Type: schema.TypeString, Optional: true, - Description: "Specifies what to do if some of the SAs for this policy cannot be found:use - skip this transform, " + - "do not drop the packet, and do not acquire SA from IKE daemon;require - drop the packet and acquire " + - "SA;unique - drop the packet and acquire a unique SA that is only used with this particular policy. It " + + Description: "Specifies what to do if some of the SAs for this policy cannot be found:\n * use - skip this transform, " + + "do not drop the packet, and do not acquire SA from IKE daemon;\n * require - drop the packet and acquire " + + "SA;\n * unique - drop the packet and acquire a unique SA that is only used with this particular policy. It " + "is used in setups where multiple clients can sit behind one public IP address (clients behind NAT).", ValidateFunc: validation.StringInSlice([]string{"require", "unique", "use"}, false), DiffSuppressFunc: AlwaysPresentNotUserProvided, @@ -128,9 +128,9 @@ func ResourceIpIpsecPolicy() *schema.Resource { Type: schema.TypeBool, Optional: true, Description: "Creates a template and assigns it to a specified policy group.Following parameters are used " + - "by template: `group` - name of the policy group to which this template is assigned; `src-address`, `dst-address` " + - "- Requested subnet must match in both directions (for example 0.0.0.0/0 to allow all); `protocol` - protocol " + - "to match, if set to all, then any protocol is accepted; `proposal` - SA parameters used for this template; `level` " + + "by template:\n * group - name of the policy group to which this template is assigned;\n * src-address,\n * dst-address " + + "- Requested subnet must match in both directions (for example 0.0.0.0/0 to allow all);\n * protocol - protocol " + + "to match, if set to all, then any protocol is accepted;\n * proposal - SA parameters used for this template;\n * level " + "- useful when unique is required in setups with multiple clients behind NAT.", }, "tunnel": { diff --git a/routeros/resource_ip_ipsec_policy_group_test.go b/routeros/resource_ip_ipsec_policy_group_test.go index 65506453..a8853d6c 100644 --- a/routeros/resource_ip_ipsec_policy_group_test.go +++ b/routeros/resource_ip_ipsec_policy_group_test.go @@ -11,7 +11,7 @@ import ( const testIpIpsecPolicyGroup = "routeros_ip_ipsec_policy_group.test" func TestAccIpIpsecPolicyGroupTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_ipsec_policy_test.go b/routeros/resource_ip_ipsec_policy_test.go index c533f1d6..f44fa5c4 100644 --- a/routeros/resource_ip_ipsec_policy_test.go +++ b/routeros/resource_ip_ipsec_policy_test.go @@ -11,7 +11,7 @@ import ( const testIpIpsecPolicy = "routeros_ip_ipsec_policy.policy" func TestAccIpIpsecPolicyTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_ipsec_profile.go b/routeros/resource_ip_ipsec_profile.go index 910665a0..b0298981 100644 --- a/routeros/resource_ip_ipsec_profile.go +++ b/routeros/resource_ip_ipsec_profile.go @@ -102,9 +102,9 @@ func ResourceIpIpsecProfile() *schema.Resource { "proposal_check": { Type: schema.TypeString, Optional: true, - Description: "Phase 2 lifetime check logic:claim - take shortest of proposed and configured lifetimes and " + - "notify initiator about itexact - require lifetimes to be the sameobey - accept whatever is sent by an " + - "initiatorstrict - if the proposed lifetime is longer than the default then reject the proposal otherwise " + + Description: "Phase 2 lifetime check logic:\n * claim - take shortest of proposed and configured lifetimes and " + + "notify initiator about it\n * exact - require lifetimes to be the same\n * obey - accept whatever is sent by an " + + "initiator\n * strict - if the proposed lifetime is longer than the default then reject the proposal otherwise " + "accept a proposed lifetime.", ValidateFunc: validation.StringInSlice([]string{"claim", "exact", "obey", "strict"}, false), DiffSuppressFunc: AlwaysPresentNotUserProvided, diff --git a/routeros/resource_ip_ipsec_profile_test.go b/routeros/resource_ip_ipsec_profile_test.go index 5286e649..ca4942a9 100644 --- a/routeros/resource_ip_ipsec_profile_test.go +++ b/routeros/resource_ip_ipsec_profile_test.go @@ -11,7 +11,7 @@ import ( const testIpIpsecProfile = "routeros_ip_ipsec_profile.test" func TestAccIpIpsecProfileTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_ipsec_proposal_test.go b/routeros/resource_ip_ipsec_proposal_test.go index 944f1b01..d900bf19 100644 --- a/routeros/resource_ip_ipsec_proposal_test.go +++ b/routeros/resource_ip_ipsec_proposal_test.go @@ -10,7 +10,7 @@ import ( const testIpIpsecProposal = "routeros_ip_ipsec_proposal.test" func TestAccIpIpsecProposalTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_ipsec_settings_test.go b/routeros/resource_ip_ipsec_settings_test.go index 979e1ee5..a5af7ebd 100644 --- a/routeros/resource_ip_ipsec_settings_test.go +++ b/routeros/resource_ip_ipsec_settings_test.go @@ -10,7 +10,7 @@ import ( const testIpIpsecSettings = "routeros_ip_ipsec_settings.test" func TestAccIpIpsecSettingsTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ip_neighbor_discovery.go b/routeros/resource_ip_neighbor_discovery.go index b38f7562..5236b917 100644 --- a/routeros/resource_ip_neighbor_discovery.go +++ b/routeros/resource_ip_neighbor_discovery.go @@ -52,19 +52,16 @@ func ResourceIpNeighborDiscoverySettings() *schema.Resource { "lldp_med_net_policy_vlan": { Type: schema.TypeString, Optional: true, - Description: `Advertised VLAN ID for LLDP-MED Network Policy TLV. This allows assigning a VLAN ID for - LLDP-MED capable devices, such as VoIP phones. The TLV will only be added to interfaces where LLDP-MED - capable devices are discovered. Other TLV values are predefined and cannot be changed: - - - Application Type - Voice - - VLAN Type - Tagged - - L2 Priority - 0 - - DSCP Priority - 0 - - When used together with the bridge interface, the (R/M)STP protocol should be enabled with protocol-mode setting. - - Additionally, other neighbor discovery protocols (e.g. CDP) should be excluded using protocol setting to - avoid LLDP-MED misconfiguration.`, + Description: "Advertised VLAN ID for LLDP-MED Network Policy TLV. This allows assigning a VLAN ID for " + + "LLDP-MED capable devices, such as VoIP phones. The TLV will only be added to interfaces where LLDP-MED " + + "capable devices are discovered. Other TLV values are predefined and cannot be changed:" + + "\n * Application Type - Voice" + + "\n * VLAN Type - Tagged" + + "\n * L2 Priority - 0" + + "\n * DSCP Priority - 0\n" + + "When used together with the bridge interface, the (R/M)STP protocol should be enabled with protocol-mode setting.\n" + + "Additionally, other neighbor discovery protocols (e.g. CDP) should be excluded using protocol setting to " + + "avoid LLDP-MED misconfiguration.", DiffSuppressFunc: AlwaysPresentNotUserProvided, }, "lldp_poe_power": { diff --git a/routeros/resource_ip_ssh_server.go b/routeros/resource_ip_ssh_server.go index cf6669f4..3b0abd47 100644 --- a/routeros/resource_ip_ssh_server.go +++ b/routeros/resource_ip_ssh_server.go @@ -36,12 +36,11 @@ func ResourceIpSSHServer() *schema.Resource { "forwarding_enabled": { Type: schema.TypeString, Optional: true, - Description: `Allows to control which SSH forwarding method to allow: - - * no - SSH forwarding is disabled; - * local - Allow SSH clients to originate connections from the server(router), this setting controls also dynamic forwarding; - * remote - Allow SSH clients to listen on the server(router) and forward incoming connections; - * both - Allow both local and remote forwarding methods.`, + Description: "Allows to control which SSH forwarding method to allow:" + + "\n * no - SSH forwarding is disabled;" + + "\n * local - Allow SSH clients to originate connections from the server(router), this setting controls also dynamic forwarding;" + + "\n * remote - Allow SSH clients to listen on the server(router) and forward incoming connections;" + + "\n * both - Allow both local and remote forwarding methods.", ValidateFunc: validation.StringInSlice([]string{"both", "local", "no", "remote"}, false), DiffSuppressFunc: AlwaysPresentNotUserProvided, }, diff --git a/routeros/resource_ip_upnp_interfaces.go b/routeros/resource_ip_upnp_interfaces.go index 16f3935d..1cbb21cf 100644 --- a/routeros/resource_ip_upnp_interfaces.go +++ b/routeros/resource_ip_upnp_interfaces.go @@ -27,10 +27,9 @@ func ResourceUPNPInterfaces() *schema.Resource { "type": { Type: schema.TypeString, Optional: true, - Description: `UPnP interface type: - - external - the interface a global IP address is assigned to - internal - router's local interface the clients are connected to`, + Description: "UPnP interface type:" + + "\n * external - the interface a global IP address is assigned to" + + "\n * internal - router's local interface the clients are connected to", DiffSuppressFunc: AlwaysPresentNotUserProvided, }, } diff --git a/routeros/resource_ipv6_dhcp_client.go b/routeros/resource_ipv6_dhcp_client.go index 59cb934c..31edd679 100644 --- a/routeros/resource_ipv6_dhcp_client.go +++ b/routeros/resource_ipv6_dhcp_client.go @@ -67,9 +67,10 @@ func ResourceIPv6DhcpClient() *schema.Resource { }, KeyDisabled: PropDisabledRw, "duid": { - Type: schema.TypeString, - Computed: true, - Description: "Auto-generated DUID that is sent to the server. DUID is generated using one of the MAC addresses available on the router.", + Type: schema.TypeString, + Computed: true, + Description: "Auto-generated DUID that is sent to the server. DUID is generated using one of the MAC " + + "addresses available on the router.", }, KeyDynamic: PropDynamicRo, "expires_after": { @@ -90,9 +91,11 @@ func ResourceIPv6DhcpClient() *schema.Resource { Description: "Name of the IPv6 pool in which received IPv6 prefix will be added", }, "pool_prefix_length": { - Type: schema.TypeInt, - Optional: true, - Description: "Prefix length parameter that will be set for IPv6 pool in which received IPv6 prefix is added. Prefix length must be greater than the length of the received prefix, otherwise, prefix-length will be set to received prefix length + 8 bits.", + Type: schema.TypeInt, + Optional: true, + Description: "Prefix length parameter that will be set for IPv6 pool in which received IPv6 prefix is " + + "added. Prefix length must be greater than the length of the received prefix, otherwise, prefix-length " + + "will be set to received prefix length + 8 bits.", ValidateFunc: validation.IntBetween(0, 128), }, "prefix": { @@ -124,24 +127,25 @@ func ResourceIPv6DhcpClient() *schema.Resource { "script": { Type: schema.TypeString, Optional: true, - Description: `Run this script on the DHCP-client status change. Available variables: - - pd-valid - if the prefix is acquired by the client; - - pd-prefix - the prefix acquired by the client if any; - - na-valid - if the address is acquired by the client; - - na-address - the address acquired by the client if any. - - options - array of received options (only ROSv7)`, + Description: "Run this script on the DHCP-client status change. Available variables:" + + "\n * pd-valid - if the prefix is acquired by the client;" + + "\n * pd-prefix - the prefix acquired by the client if any;" + + "\n * na-valid - if the address is acquired by the client;" + + "\n * na-address - the address acquired by the client if any." + + "\n * options - array of received options (only ROSv7)", }, "status": { Type: schema.TypeString, Computed: true, - Description: `Shows the status of DHCPv6 Client: - - stopped - dhcpv6 client is stopped - - searching - sending "solicit" and trying to get "advertise" Shows actual (resolved) gateway and interface that will be used for packet forwarding.requesting - sent "request" waiting for "reply" - - bound - received "reply". Prefix assigned. - - renewing - sent "renew", waiting for "reply" - - rebinding - sent "rebind", waiting for "reply" - - error - reply was not received in time or some other error occurred. - - stopping - sent "release"`, + Description: "Shows the status of DHCPv6 Client:" + + "\n * stopped - dhcpv6 client is stopped" + + "\n * searching - sending `solicit` and trying to get `advertise` Shows actual (resolved) gateway and " + + "interface that will be used for packet forwarding.requesting - sent `request` waiting for `reply`" + + "\n * bound - received `reply`. Prefix assigned." + + "\n * renewing - sent `renew`, waiting for `reply`" + + "\n * rebinding - sent `rebind`, waiting for `reply`" + + "\n * error - reply was not received in time or some other error occurred." + + "\n * stopping - sent `release`", }, "use_interface_duid": { Type: schema.TypeBool, diff --git a/routeros/resource_ipv6_dhcp_server_option.go b/routeros/resource_ipv6_dhcp_server_option.go index baf4df49..4bd5a44c 100644 --- a/routeros/resource_ipv6_dhcp_server_option.go +++ b/routeros/resource_ipv6_dhcp_server_option.go @@ -42,7 +42,7 @@ func ResourceIpv6DhcpServerOption() *schema.Resource { " - `'10'` -> Decimal to Hex 0x0a\n" + " - `0x0a0a` -> No conversion\n" + " - `$(VARIABLE)` -> hardcoded values\n\n" + - "RouterOS has predefined variables that can be used:\n" + + " RouterOS has predefined variables that can be used:\n" + " - `HOSTNAME` - client hostname\n" + " - `RADIUS_MT_STR1` - from radius MT attr nr. `24`\n" + " - `RADIUS_MT_STR2` - from radius MT attr nr. `25`\n" + diff --git a/routeros/resource_ipv6_dhcp_server_option_sets_test.go b/routeros/resource_ipv6_dhcp_server_option_sets_test.go index 0e26aea0..86150dca 100644 --- a/routeros/resource_ipv6_dhcp_server_option_sets_test.go +++ b/routeros/resource_ipv6_dhcp_server_option_sets_test.go @@ -10,7 +10,7 @@ import ( const testIpv6DhcpServerOptionSets = "routeros_ipv6_dhcp_server_option_sets.test" func TestAccIpv6DhcpServerOptionSetsTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ipv6_dhcp_server_option_test.go b/routeros/resource_ipv6_dhcp_server_option_test.go index fd8b2580..0705f429 100644 --- a/routeros/resource_ipv6_dhcp_server_option_test.go +++ b/routeros/resource_ipv6_dhcp_server_option_test.go @@ -10,7 +10,7 @@ import ( const testIpv6DhcpServerOption = "routeros_ipv6_dhcp_server_option.test" func TestAccIpv6DhcpServerOptionTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ipv6_dhcp_server_test.go b/routeros/resource_ipv6_dhcp_server_test.go index 84299d69..d446297f 100644 --- a/routeros/resource_ipv6_dhcp_server_test.go +++ b/routeros/resource_ipv6_dhcp_server_test.go @@ -10,7 +10,7 @@ import ( const testIpv6DhcpServer = "routeros_ipv6_dhcp_server.test" func TestAccIpv6DhcpServerTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ipv6_firewall_addr_list.go b/routeros/resource_ipv6_firewall_addr_list.go index 05c3c521..cee0ba7e 100644 --- a/routeros/resource_ipv6_firewall_addr_list.go +++ b/routeros/resource_ipv6_firewall_addr_list.go @@ -60,7 +60,7 @@ func ResourceIPv6FirewallAddrList() *schema.Resource { Description: `Time after address will be removed from address list. If timeout is not specified, the address will be stored into the address list permanently. > Please plan your work logic based on the fact that after the timeout - > the resource has been destroyed outside of Terraform. + > the resource has been destroyed outside of a Terraform. `, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { if old == new { diff --git a/routeros/resource_ipv6_pool_test.go b/routeros/resource_ipv6_pool_test.go index 49299a9e..9792976b 100644 --- a/routeros/resource_ipv6_pool_test.go +++ b/routeros/resource_ipv6_pool_test.go @@ -10,7 +10,7 @@ import ( const testIpv6Pool = "routeros_ipv6_pool.test" func TestAccIpv6PoolTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_ovpn_server.go b/routeros/resource_ovpn_server.go index 3ddddf01..f7649fe8 100644 --- a/routeros/resource_ovpn_server.go +++ b/routeros/resource_ovpn_server.go @@ -39,16 +39,16 @@ func ResourceOpenVPNServer() *schema.Resource { Type: schema.TypeSet, Optional: true, Elem: &schema.Schema{ - Type: schema.TypeString, + Type: schema.TypeString, ValidateFunc: validation.StringInSlice([]string{"md5", "sha1", "null", "sha256", "sha512"}, false), }, Description: "Authentication methods that the server will accept.", DiffSuppressFunc: AlwaysPresentNotUserProvided, }, "certificate": { - Type: schema.TypeString, - Optional: true, - Description: "Name of the certificate that the OVPN server will use.", + Type: schema.TypeString, + Optional: true, + Description: "Name of the certificate that the OVPN server will use.", DiffSuppressFunc: AlwaysPresentNotUserProvided, }, "cipher": { @@ -150,13 +150,13 @@ func ResourceOpenVPNServer() *schema.Resource { Type: schema.TypeSet, Optional: true, Elem: &schema.Schema{ - Type: schema.TypeString, + Type: schema.TypeString, ValidateFunc: validation.StringInSlice([]string{"def1", "disabled", "ipv6"}, false), }, - Description: "Specifies what kind of routes the OVPN client must add to the routing table. def1 – Use " + + Description: "Specifies what kind of routes the OVPN client must add to the routing table.\n * def1 – Use " + "this flag to override the default gateway by using 0.0.0.0/1 and 128.0.0.0/1 rather " + "than 0.0.0.0/0. This has the benefit of overriding but not wiping out the original " + - "default gateway. disabled - Do not send redirect-gateway flags to the OVPN client. ipv6 " + + "default gateway.\n * disabled - Do not send redirect-gateway flags to the OVPN client.\n * ipv6 " + "- Redirect IPv6 routing into the tunnel on the client side. This works similarly to the " + "def1 flag, that is, more specific IPv6 routes are added (2000::/4 and 3000::/4), " + "covering the whole IPv6 unicast space.", @@ -202,11 +202,11 @@ func ResourceOpenVPNServer() *schema.Resource { StateContext: schema.ImportStatePassthroughContext, }, - Schema: resSchema, + Schema: resSchema, SchemaVersion: 1, StateUpgraders: []schema.StateUpgrader{ { - Type: ResourceOpenVPNServerV0().CoreConfigSchema().ImpliedType(), + Type: ResourceOpenVPNServerV0().CoreConfigSchema().ImpliedType(), Upgrade: stateMigrationScalarToList("auth", "cipher", "redirect_gateway"), Version: 0, }, diff --git a/routeros/resource_ppp_profile.go b/routeros/resource_ppp_profile.go index 91442241..bcefecab 100644 --- a/routeros/resource_ppp_profile.go +++ b/routeros/resource_ppp_profile.go @@ -144,7 +144,7 @@ func ResourcePPPProfile() *schema.Resource { Type: schema.TypeString, Optional: true, Description: "Execute script on user login-event. These are available variables that are accessible " + - "for the event script: *user *local-address *remote-address *caller-id *called-id *interface.", + "for the event script:\n * user\n * local-address\n * remote-address\n * caller-id\n * called-id\n * interface.", }, "on_down": { Type: schema.TypeString, diff --git a/routeros/resource_routing_rule.go b/routeros/resource_routing_rule.go index 87e2bac2..95deb476 100644 --- a/routeros/resource_routing_rule.go +++ b/routeros/resource_routing_rule.go @@ -29,9 +29,9 @@ func ResourceRoutingRule() *schema.Resource { "action": { Type: schema.TypeString, Optional: true, - Description: "An action to take on the matching packet:drop - silently drop the packet.lookup - perform a " + - "lookup in routing tables.lookup-only-in-table - perform lookup only in the specified routing table " + - "(see table parameter).unreachable - generate ICMP unreachable message and send it back to the source.", + Description: "An action to take on the matching packet:\n * drop - silently drop the packet.\n * lookup - perform a " + + "lookup in routing tables.\n * lookup-only-in-table - perform lookup only in the specified routing table " + + "(see table parameter).\n * unreachable - generate ICMP unreachable message and send it back to the source.", ValidateFunc: validation.StringInSlice([]string{"drop", "lookup", "lookup-only-in-table", "unreachable"}, false), DiffSuppressFunc: AlwaysPresentNotUserProvided, }, diff --git a/routeros/resource_routing_rule_test.go b/routeros/resource_routing_rule_test.go index 78252737..b6cbef81 100644 --- a/routeros/resource_routing_rule_test.go +++ b/routeros/resource_routing_rule_test.go @@ -10,7 +10,7 @@ import ( const testRoutingRule = "routeros_routing_rule.test" func TestAccRoutingRuleTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_snmp.go b/routeros/resource_snmp.go index 2cdbd6c0..8e6a05ec 100644 --- a/routeros/resource_snmp.go +++ b/routeros/resource_snmp.go @@ -62,7 +62,7 @@ func ResourceSNMP() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - Description: "What action will generate traps: interfaces - interface changes; start-trap - snmp " + + Description: "What action will generate traps:\n * interfaces - interface changes;\n * start-trap - snmp " + "server starting on the router.", ValidateFunc: validation.StringInSlice([]string{"interfaces", "start-trap", "temp-exception"}, false), }, diff --git a/routeros/resource_system_ntp_client.go b/routeros/resource_system_ntp_client.go index 95860419..8b072d89 100644 --- a/routeros/resource_system_ntp_client.go +++ b/routeros/resource_system_ntp_client.go @@ -44,17 +44,16 @@ func ResourceSystemNtpClient() *schema.Resource { Elem: &schema.Schema{ Type: schema.TypeString, }, - Description: `The list of NTP servers. It is possible to add static entries. - The following formats are accepted: - - - FQDN ("Resolved Address" will appear in the "Servers"- window in an appropriate column if the address is - resolved) or IP address can be used. If DHCP-Client property ` + "`use-peer-ntp=yes`" + ` - the dynamic entries - advertised by DHCP - - ipv4 - - ipv4@vrf - - ipv6 - - ipv6@vrf - - ipv6-linklocal%interface`, + Description: "The list of NTP servers. It is possible to add static entries." + + "The following formats are accepted:" + + "\n * FQDN (\"Resolved Address\" will appear in the \"Servers\"- window in an appropriate column if the address is " + + "resolved) or IP address can be used. If DHCP-Client property `use-peer-ntp=yes` - the dynamic entries " + + "advertised by DHCP" + + "\n * ipv4" + + "\n * ipv4@vrf" + + "\n * ipv6" + + "\n * ipv6@vrf" + + "\n * ipv6-linklocal%interface", DiffSuppressFunc: AlwaysPresentNotUserProvided, }, diff --git a/routeros/resource_system_user_aaa_test.go b/routeros/resource_system_user_aaa_test.go index 44a2c97e..25c53c68 100644 --- a/routeros/resource_system_user_aaa_test.go +++ b/routeros/resource_system_user_aaa_test.go @@ -10,7 +10,7 @@ import ( const testUserAAA = "routeros_system_user_aaa.settings" func TestAccUserAAATest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_system_user_group_test.go b/routeros/resource_system_user_group_test.go index 4fe9a020..15e21344 100644 --- a/routeros/resource_system_user_group_test.go +++ b/routeros/resource_system_user_group_test.go @@ -9,7 +9,7 @@ import ( const testUserGroupAddress = "routeros_system_user_group.test" func TestAccUserGroupTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_system_user_settings_test.go b/routeros/resource_system_user_settings_test.go index 346f996b..4449cc3e 100644 --- a/routeros/resource_system_user_settings_test.go +++ b/routeros/resource_system_user_settings_test.go @@ -10,7 +10,7 @@ import ( const testUserSettings = "routeros_system_user_settings.test" func TestAccUserSettingsTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_system_user_test.go b/routeros/resource_system_user_test.go index cb2892b3..a96cc378 100644 --- a/routeros/resource_system_user_test.go +++ b/routeros/resource_system_user_test.go @@ -9,7 +9,7 @@ import ( const testUserAddress = "routeros_system_user.test" func TestAccUserTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_tool_netwatch.go b/routeros/resource_tool_netwatch.go index 153f7bd1..23dbe33c 100644 --- a/routeros/resource_tool_netwatch.go +++ b/routeros/resource_tool_netwatch.go @@ -49,13 +49,12 @@ func ResourceToolNetwatch() *schema.Resource { "host": { Type: schema.TypeString, Required: true, - Description: `The IP address of the server to be probed. Formats: - - ipv4 - - ipv4@vrf - - ipv6 - - ipv6@vrf - - ipv6-linklocal%interface - `, + Description: "The IP address of the server to be probed. Formats:" + + "\n * ipv4" + + "\n * ipv4@vrf" + + "\n * ipv6 " + + "\n * ipv6@vrf" + + "\n * ipv6-linklocal%interface", }, "interval": { Type: schema.TypeString, @@ -96,12 +95,12 @@ func ResourceToolNetwatch() *schema.Resource { "type": { Type: schema.TypeString, Optional: true, - Description: `Type of the probe: - - icmp - (ping-style) series of ICMP request-response with statistics - - tcp-conn - test TCP connection (3-way handshake) to a server specified by IP and port - - http-get - do an HTTP Get request and test for a range of correct replies - - simple - simplified ICMP probe, with fewer options than **ICMP** type, used for backward compatibility with the older Netwatch version - `, + Description: "Type of the probe:" + + "\n * icmp - (ping-style) series of ICMP request-response with statistics" + + "\n * tcp-conn - test TCP connection (3-way handshake) to a server specified by IP and port" + + "\n * http-get - do an HTTP Get request and test for a range of correct replies" + + "\n * simple - simplified ICMP probe, with fewer options than **ICMP** type, used for backward " + + "compatibility with the older Netwatch version", ValidateFunc: validation.StringInSlice([]string{"icmp", "tcp-conn", "http-get", "simple"}, false), DiffSuppressFunc: AlwaysPresentNotUserProvided, }, diff --git a/routeros/resource_tool_netwatch_test.go b/routeros/resource_tool_netwatch_test.go index be77bc1d..3941ed2a 100644 --- a/routeros/resource_tool_netwatch_test.go +++ b/routeros/resource_tool_netwatch_test.go @@ -10,7 +10,7 @@ import ( const testToolNetwatch = "routeros_tool_netwatch.test" func TestAccToolNetwatchTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_tool_sniffer.go b/routeros/resource_tool_sniffer.go index db5e341c..e30dae72 100644 --- a/routeros/resource_tool_sniffer.go +++ b/routeros/resource_tool_sniffer.go @@ -154,34 +154,34 @@ func ResourceToolSniffer() *schema.Resource { Type: schema.TypeSet, Optional: true, Description: "Up to 16 comma-separated IP/IPv6 protocols used as a filter. IP protocols (instead of protocol " + - "names, protocol numbers can be used):\n" + - "* ipsec-ah - IPsec AH protocol\n" + - "* ipsec-esp - IPsec ESP protocol\n" + - "* ddp - datagram delivery protocol\n" + - "* egp - exterior gateway protocol\n" + - "* ggp - gateway-gateway protocol\n" + - "* gre - general routing encapsulation\n" + - "* hmp - host monitoring protocol\n" + - "* idpr-cmtp - idpr control message transport\n" + - "* icmp - internet control message protocol\n" + - "* icmpv6 - internet control message protocol v6\n" + - "* igmp - internet group management protocol\n" + - "* ipencap - ip encapsulated in ip\n" + - "* ipip - ip encapsulation\n" + - "* encap - ip encapsulation\n" + - "* iso-tp4 - iso transport protocol class 4\n" + - "* ospf - open shortest path first\n" + - "* pup - parc universal packet protocol\n" + - "* pim - protocol independent multicast\n" + - "* rspf - radio shortest path first\n" + - "* rdp - reliable datagram protocol\n" + - "* st - st datagram mode\n" + - "* tcp - transmission control protocol\n" + - "* udp - user datagram protocol\n" + - "* vmtp versatile message transport\n" + - "* vrrp - virtual router redundancy protocol\n" + - "* xns-idp - xerox xns idp\n" + - "* xtp - xpress transfer protocol", + "names, protocol numbers can be used):" + + "\n * ipsec-ah - IPsec AH protocol" + + "\n * ipsec-esp - IPsec ESP protocol" + + "\n * ddp - datagram delivery protocol" + + "\n * egp - exterior gateway protocol" + + "\n * ggp - gateway-gateway protocol" + + "\n * gre - general routing encapsulation" + + "\n * hmp - host monitoring protocol" + + "\n * idpr-cmtp - idpr control message transport" + + "\n * icmp - internet control message protocol" + + "\n * icmpv6 - internet control message protocol v6" + + "\n * igmp - internet group management protocol" + + "\n * ipencap - ip encapsulated in ip" + + "\n * ipip - ip encapsulation" + + "\n * encap - ip encapsulation" + + "\n * iso-tp4 - iso transport protocol class 4" + + "\n * ospf - open shortest path first" + + "\n * pup - parc universal packet protocol" + + "\n * pim - protocol independent multicast" + + "\n * rspf - radio shortest path first" + + "\n * rdp - reliable datagram protocol" + + "\n * st - st datagram mode" + + "\n * tcp - transmission control protocol" + + "\n * udp - user datagram protocol" + + "\n * vmtp versatile message transport" + + "\n * vrrp - virtual router redundancy protocol" + + "\n * xns-idp - xerox xns idp" + + "\n * xtp - xpress transfer protocol", Elem: &schema.Schema{ Type: schema.TypeString, ValidateDiagFunc: ValidationValInSlice([]string{}, false, true), @@ -202,24 +202,24 @@ func ResourceToolSniffer() *schema.Resource { Type: schema.TypeSet, Optional: true, Description: "Up to 16 comma separated entries used as a filter. Mac protocols (instead of protocol names, " + - "protocol number can be used):\n" + - "* 802.2 - 802.2 Frames (0x0004)\n" + - "* arp - Address Resolution Protocol (0x0806)\n" + - "* homeplug-av - HomePlug AV MME (0x88E1)\n" + - "* ip - Internet Protocol version 4 (0x0800)\n" + - "* ipv6 - Internet Protocol Version 6 (0x86DD)\n" + - "* ipx - Internetwork Packet Exchange (0x8137)\n" + - "* lldp - Link Layer Discovery Protocol (0x88CC)\n" + - "* loop-protect - Loop Protect Protocol (0x9003)\n" + - "* mpls-multicast - MPLS multicast (0x8848)\n" + - "* mpls-unicast - MPLS unicast (0x8847)\n" + - "* packing-compr - Encapsulated packets with compressed IP packing (0x9001)\n" + - "* packing-simple - Encapsulated packets with simple IP packing (0x9000)\n" + - "* pppoe - PPPoE Session Stage (0x8864)\n" + - "* pppoe-discovery - PPPoE Discovery Stage (0x8863)\n" + - "* rarp - Reverse Address Resolution Protocol (0x8035)\n" + - "* service-vlan - Provider Bridging (IEEE 802.1ad) & Shortest Path Bridging IEEE 802.1aq (0x88A8)\n" + - "* vlan - VLAN-tagged frame (IEEE 802.1Q) and Shortest Path Bridging IEEE 802.1aq with NNI compatibility (0x8100)", + "protocol number can be used):" + + "\n * 802.2 - 802.2 Frames (0x0004)" + + "\n * arp - Address Resolution Protocol (0x0806)" + + "\n * homeplug-av - HomePlug AV MME (0x88E1)" + + "\n * ip - Internet Protocol version 4 (0x0800)" + + "\n * ipv6 - Internet Protocol Version 6 (0x86DD)" + + "\n * ipx - Internetwork Packet Exchange (0x8137)" + + "\n * lldp - Link Layer Discovery Protocol (0x88CC)" + + "\n * loop-protect - Loop Protect Protocol (0x9003)" + + "\n * mpls-multicast - MPLS multicast (0x8848)" + + "\n * mpls-unicast - MPLS unicast (0x8847)" + + "\n * packing-compr - Encapsulated packets with compressed IP packing (0x9001)" + + "\n * packing-simple - Encapsulated packets with simple IP packing (0x9000)" + + "\n * pppoe - PPPoE Session Stage (0x8864)" + + "\n * pppoe-discovery - PPPoE Discovery Stage (0x8863)" + + "\n * rarp - Reverse Address Resolution Protocol (0x8035)" + + "\n * service-vlan - Provider Bridging (IEEE 802.1ad) & Shortest Path Bridging IEEE 802.1aq (0x88A8)" + + "\n * vlan - VLAN-tagged frame (IEEE 802.1Q) and Shortest Path Bridging IEEE 802.1aq with NNI compatibility (0x8100)", Elem: &schema.Schema{ Type: schema.TypeString, }, diff --git a/routeros/resource_tool_sniffer_test.go b/routeros/resource_tool_sniffer_test.go index 54fe627f..b1901470 100644 --- a/routeros/resource_tool_sniffer_test.go +++ b/routeros/resource_tool_sniffer_test.go @@ -10,7 +10,7 @@ import ( const testToolSniffer = "routeros_tool_sniffer.test" func TestAccToolSnifferTest_basic(t *testing.T) { - t.Parallel() + // t.Parallel() for _, name := range testNames { t.Run(name, func(t *testing.T) { resource.Test(t, resource.TestCase{ diff --git a/routeros/resource_wireguard_keys_test.go b/routeros/resource_wireguard_keys_test.go index 02ec9031..d0b9add1 100644 --- a/routeros/resource_wireguard_keys_test.go +++ b/routeros/resource_wireguard_keys_test.go @@ -9,7 +9,7 @@ import ( const testResourceWireGuardKeys = "routeros_wireguard_keys.keys" func TestAccResourceWireGuardKeys_basic(t *testing.T) { - t.Parallel() + // t.Parallel() t.Run("WG keys", func(t *testing.T) { resource.Test(t, resource.TestCase{ ProviderFactories: testAccProviderFactories,