diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:22 +0000 |
commit | 38b7c80217c4e72b1d8988eb1e60bb6e77334114 (patch) | |
tree | 356e9fd3762877d07cde52d21e77070aeff7e789 /ansible_collections/community/routeros | |
parent | Adding upstream version 7.7.0+dfsg. (diff) | |
download | ansible-38b7c80217c4e72b1d8988eb1e60bb6e77334114.tar.xz ansible-38b7c80217c4e72b1d8988eb1e60bb6e77334114.zip |
Adding upstream version 9.4.0+dfsg.upstream/9.4.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
40 files changed, 5906 insertions, 2759 deletions
diff --git a/ansible_collections/community/routeros/.github/workflows/ansible-test.yml b/ansible_collections/community/routeros/.github/workflows/ansible-test.yml index a5b351913..0444f593f 100644 --- a/ansible_collections/community/routeros/.github/workflows/ansible-test.yml +++ b/ansible_collections/community/routeros/.github/workflows/ansible-test.yml @@ -33,6 +33,7 @@ jobs: - stable-2.13 - stable-2.14 - stable-2.15 + - stable-2.16 - devel # Ansible-test on various stable branches does not yet work well with cgroups v2. # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 @@ -77,6 +78,7 @@ jobs: - stable-2.13 - stable-2.14 - stable-2.15 + - stable-2.16 - devel steps: @@ -109,7 +111,6 @@ jobs: ansible: - devel python: - - 3.9 - "3.10" - "3.11" include: @@ -134,10 +135,13 @@ jobs: python: "3.10" # 2.14 - ansible: stable-2.14 - python: "3.9" + python: "3.11" # 2.15 - ansible: stable-2.15 - python: "3.11" + python: "3.9" + # 2.16 + - ansible: stable-2.16 + python: "3.10" steps: - name: >- diff --git a/ansible_collections/community/routeros/.github/workflows/docs-pr.yml b/ansible_collections/community/routeros/.github/workflows/docs-pr.yml index 4b3f1f373..14a917a5a 100644 --- a/ansible_collections/community/routeros/.github/workflows/docs-pr.yml +++ b/ansible_collections/community/routeros/.github/workflows/docs-pr.yml @@ -32,6 +32,8 @@ jobs: init-extra-html-theme-options: | documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/main/ render-file-line: '> * `$<status>` [$<path_tail>](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr/${{ github.event.number }}/$<path_tail>)' + provide-link-targets: | + ansible_collections.ansible.netcommon.network_cli_connection__parameter-ssh_type publish-docs-gh-pages: # for now we won't run this on forks diff --git a/ansible_collections/community/routeros/.github/workflows/docs-push.yml b/ansible_collections/community/routeros/.github/workflows/docs-push.yml index 7408bbb6f..e4595dd1e 100644 --- a/ansible_collections/community/routeros/.github/workflows/docs-push.yml +++ b/ansible_collections/community/routeros/.github/workflows/docs-push.yml @@ -28,7 +28,7 @@ jobs: uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-push.yml@main with: collection-name: community.routeros - init-lenient: false + init-lenient: true init-fail-on-error: true squash-hierarchy: true init-project: Community.Routeros Collection diff --git a/ansible_collections/community/routeros/.github/workflows/ee.yml b/ansible_collections/community/routeros/.github/workflows/ee.yml index 406703a07..523efaf58 100644 --- a/ansible_collections/community/routeros/.github/workflows/ee.yml +++ b/ansible_collections/community/routeros/.github/workflows/ee.yml @@ -46,6 +46,10 @@ jobs: - name: ansible-core devel @ RHEL UBI 9 ansible_core: https://github.com/ansible/ansible/archive/devel.tar.gz ansible_runner: ansible-runner + other_deps: |2 + python_interpreter: + package_system: python3.11 python3.11-pip python3.11-wheel python3.11-cryptography + python_path: "/usr/bin/python3.11" base_image: docker.io/redhat/ubi9:latest pre_base: '"#"' - name: ansible-core 2.15 @ Rocky Linux 9 @@ -77,12 +81,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.11' diff --git a/ansible_collections/community/routeros/.github/workflows/extra-tests.yml b/ansible_collections/community/routeros/.github/workflows/extra-tests.yml index 0bbcdbb38..54872aab0 100644 --- a/ansible_collections/community/routeros/.github/workflows/extra-tests.yml +++ b/ansible_collections/community/routeros/.github/workflows/extra-tests.yml @@ -26,22 +26,25 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.11' - name: Install ansible-core run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check - name: Install collection dependencies - run: git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ./ansible_collections/community/internal_test_tools + run: | + git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ./ansible_collections/community/internal_test_tools + git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.netcommon.git ./ansible_collections/ansible/netcommon + git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.utils.git ./ansible_collections/ansible/utils # NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429) - # run: ansible-galaxy collection install community.internal_test_tools -p . + # run: ansible-galaxy collection install community.internal_test_tools ansible.netcommon -p . - name: Run sanity tests run: ../../community/internal_test_tools/tools/run.py --color diff --git a/ansible_collections/community/routeros/.github/workflows/import-galaxy.yml b/ansible_collections/community/routeros/.github/workflows/import-galaxy.yml index 55a731035..0c0ee402a 100644 --- a/ansible_collections/community/routeros/.github/workflows/import-galaxy.yml +++ b/ansible_collections/community/routeros/.github/workflows/import-galaxy.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later name: import-galaxy -on: +'on': # Run CI against all pushes (direct commits, also merged PRs) to main, and all Pull Requests push: branches: @@ -12,77 +12,9 @@ on: - stable-* pull_request: -env: - # Adjust this to your collection - NAMESPACE: community - COLLECTION_NAME: routeros - jobs: - build-collection: - name: Build collection artifact - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v3 - with: - path: ./checkout - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install ansible-core - run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check - - - name: Make sure galaxy.yml has version entry - run: >- - python -c - 'import yaml ; - f = open("galaxy.yml", "rb") ; - data = yaml.safe_load(f) ; - f.close() ; - data["version"] = data.get("version") or "0.0.1" ; - f = open("galaxy.yml", "wb") ; - f.write(yaml.dump(data).encode("utf-8")) ; - f.close() ; - ' - working-directory: ./checkout - - - name: Build collection - run: ansible-galaxy collection build - working-directory: ./checkout - - - name: Copy artifact into subdirectory - run: mkdir ./artifact && mv ./checkout/${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}-*.tar.gz ./artifact - - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: ${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}-${{ github.sha }} - path: ./artifact/ - import-galaxy: - name: Import artifact with Galaxy importer - runs-on: ubuntu-latest - needs: - - build-collection - steps: - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install ansible-core - run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check - - - name: Install galaxy-importer - run: pip install galaxy-importer --disable-pip-version-check - - - name: Download artifact - uses: actions/download-artifact@v3 - with: - name: ${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}-${{ github.sha }} - - - name: Run Galaxy importer - run: python -m galaxy_importer.main ${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}-*.tar.gz + permissions: + contents: read + name: Test to import built collection artifact with Galaxy importer + uses: ansible-community/github-action-test-galaxy-import/.github/workflows/test-galaxy-import.yml@main diff --git a/ansible_collections/community/routeros/.github/workflows/reuse.yml b/ansible_collections/community/routeros/.github/workflows/reuse.yml index acd7bc8a7..b6732cc42 100644 --- a/ansible_collections/community/routeros/.github/workflows/reuse.yml +++ b/ansible_collections/community/routeros/.github/workflows/reuse.yml @@ -21,12 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Install dependencies - run: | - pip install reuse - - - name: Check REUSE compliance - run: | - reuse lint + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v3 diff --git a/ansible_collections/community/routeros/CHANGELOG.md b/ansible_collections/community/routeros/CHANGELOG.md new file mode 100644 index 000000000..99d0bbe6a --- /dev/null +++ b/ansible_collections/community/routeros/CHANGELOG.md @@ -0,0 +1,631 @@ +# Community RouterOS Release Notes + +**Topics** + +- <a href="#v2-14-0">v2\.14\.0</a> + - <a href="#release-summary">Release Summary</a> + - <a href="#minor-changes">Minor Changes</a> +- <a href="#v2-13-0">v2\.13\.0</a> + - <a href="#release-summary-1">Release Summary</a> + - <a href="#minor-changes-1">Minor Changes</a> + - <a href="#bugfixes">Bugfixes</a> +- <a href="#v2-12-0">v2\.12\.0</a> + - <a href="#release-summary-2">Release Summary</a> + - <a href="#minor-changes-2">Minor Changes</a> +- <a href="#v2-11-0">v2\.11\.0</a> + - <a href="#release-summary-3">Release Summary</a> + - <a href="#minor-changes-3">Minor Changes</a> +- <a href="#v2-10-0">v2\.10\.0</a> + - <a href="#release-summary-4">Release Summary</a> + - <a href="#minor-changes-4">Minor Changes</a> + - <a href="#bugfixes-1">Bugfixes</a> +- <a href="#v2-9-0">v2\.9\.0</a> + - <a href="#release-summary-5">Release Summary</a> + - <a href="#minor-changes-5">Minor Changes</a> + - <a href="#bugfixes-2">Bugfixes</a> +- <a href="#v2-8-3">v2\.8\.3</a> + - <a href="#release-summary-6">Release Summary</a> + - <a href="#known-issues">Known Issues</a> +- <a href="#v2-8-2">v2\.8\.2</a> + - <a href="#release-summary-7">Release Summary</a> + - <a href="#bugfixes-3">Bugfixes</a> +- <a href="#v2-8-1">v2\.8\.1</a> + - <a href="#release-summary-8">Release Summary</a> + - <a href="#bugfixes-4">Bugfixes</a> +- <a href="#v2-8-0">v2\.8\.0</a> + - <a href="#release-summary-9">Release Summary</a> + - <a href="#minor-changes-6">Minor Changes</a> + - <a href="#bugfixes-5">Bugfixes</a> +- <a href="#v2-7-0">v2\.7\.0</a> + - <a href="#release-summary-10">Release Summary</a> + - <a href="#minor-changes-7">Minor Changes</a> + - <a href="#bugfixes-6">Bugfixes</a> +- <a href="#v2-6-0">v2\.6\.0</a> + - <a href="#release-summary-11">Release Summary</a> + - <a href="#minor-changes-8">Minor Changes</a> + - <a href="#bugfixes-7">Bugfixes</a> +- <a href="#v2-5-0">v2\.5\.0</a> + - <a href="#release-summary-12">Release Summary</a> + - <a href="#minor-changes-9">Minor Changes</a> + - <a href="#bugfixes-8">Bugfixes</a> +- <a href="#v2-4-0">v2\.4\.0</a> + - <a href="#release-summary-13">Release Summary</a> + - <a href="#minor-changes-10">Minor Changes</a> + - <a href="#bugfixes-9">Bugfixes</a> + - <a href="#known-issues-1">Known Issues</a> +- <a href="#v2-3-1">v2\.3\.1</a> + - <a href="#release-summary-14">Release Summary</a> + - <a href="#known-issues-2">Known Issues</a> +- <a href="#v2-3-0">v2\.3\.0</a> + - <a href="#release-summary-15">Release Summary</a> + - <a href="#minor-changes-11">Minor Changes</a> + - <a href="#bugfixes-10">Bugfixes</a> +- <a href="#v2-2-1">v2\.2\.1</a> + - <a href="#release-summary-16">Release Summary</a> + - <a href="#bugfixes-11">Bugfixes</a> +- <a href="#v2-2-0">v2\.2\.0</a> + - <a href="#release-summary-17">Release Summary</a> + - <a href="#minor-changes-12">Minor Changes</a> + - <a href="#bugfixes-12">Bugfixes</a> + - <a href="#new-modules">New Modules</a> +- <a href="#v2-1-0">v2\.1\.0</a> + - <a href="#release-summary-18">Release Summary</a> + - <a href="#minor-changes-13">Minor Changes</a> + - <a href="#bugfixes-13">Bugfixes</a> + - <a href="#new-modules-1">New Modules</a> +- <a href="#v2-0-0">v2\.0\.0</a> + - <a href="#release-summary-19">Release Summary</a> + - <a href="#minor-changes-14">Minor Changes</a> + - <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a> + - <a href="#bugfixes-14">Bugfixes</a> + - <a href="#new-plugins">New Plugins</a> + - <a href="#filter">Filter</a> +- <a href="#v1-2-0">v1\.2\.0</a> + - <a href="#release-summary-20">Release Summary</a> + - <a href="#minor-changes-15">Minor Changes</a> + - <a href="#bugfixes-15">Bugfixes</a> +- <a href="#v1-1-0">v1\.1\.0</a> + - <a href="#release-summary-21">Release Summary</a> + - <a href="#minor-changes-16">Minor Changes</a> +- <a href="#v1-0-1">v1\.0\.1</a> + - <a href="#release-summary-22">Release Summary</a> + - <a href="#bugfixes-16">Bugfixes</a> +- <a href="#v1-0-0">v1\.0\.0</a> + - <a href="#release-summary-23">Release Summary</a> + - <a href="#bugfixes-17">Bugfixes</a> +- <a href="#v0-1-1">v0\.1\.1</a> + - <a href="#release-summary-24">Release Summary</a> + - <a href="#bugfixes-18">Bugfixes</a> +- <a href="#v0-1-0">v0\.1\.0</a> + - <a href="#release-summary-25">Release Summary</a> + - <a href="#minor-changes-17">Minor Changes</a> + +<a id="v2-14-0"></a> +## v2\.14\.0 + +<a id="release-summary"></a> +### Release Summary + +Feature release\. + +<a id="minor-changes"></a> +### Minor Changes + +* api\_info\, api\_modify \- add read\-only fields <code>installed\-version</code>\, <code>latest\-version</code> and <code>status</code> in <code>system package update</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/263](https\://github\.com/ansible\-collections/community\.routeros/pull/263)\)\. +* api\_info\, api\_modify \- added support for <code>interface wifi</code> and its sub\-paths \([https\://github\.com/ansible\-collections/community\.routeros/pull/266](https\://github\.com/ansible\-collections/community\.routeros/pull/266)\)\. +* api\_info\, api\_modify \- remove default value for read\-only <code>running</code> field in <code>interface wireless</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/264](https\://github\.com/ansible\-collections/community\.routeros/pull/264)\)\. + +<a id="v2-13-0"></a> +## v2\.13\.0 + +<a id="release-summary-1"></a> +### Release Summary + +Bugfix and feature release\. + +<a id="minor-changes-1"></a> +### Minor Changes + +* api\_info\, api\_modify \- make path <code>user group</code> modifiable and add <code>comment</code> attribute \([https\://github\.com/ansible\-collections/community\.routeros/issues/256](https\://github\.com/ansible\-collections/community\.routeros/issues/256)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/257](https\://github\.com/ansible\-collections/community\.routeros/pull/257)\)\. +* api\_modify\, api\_info \- add support for the <code>ip vrf</code> path in RouterOS 7 \([https\://github\.com/ansible\-collections/community\.routeros/pull/259](https\://github\.com/ansible\-collections/community\.routeros/pull/259)\) + +<a id="bugfixes"></a> +### Bugfixes + +* facts \- fix date not getting removed for idempotent config export \([https\://github\.com/ansible\-collections/community\.routeros/pull/262](https\://github\.com/ansible\-collections/community\.routeros/pull/262)\)\. + +<a id="v2-12-0"></a> +## v2\.12\.0 + +<a id="release-summary-2"></a> +### Release Summary + +Feature release\. + +<a id="minor-changes-2"></a> +### Minor Changes + +* api\_info\, api\_modify \- add <code>interface ovpn\-client</code> path \([https\://github\.com/ansible\-collections/community\.routeros/issues/242](https\://github\.com/ansible\-collections/community\.routeros/issues/242)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/244](https\://github\.com/ansible\-collections/community\.routeros/pull/244)\)\. +* api\_info\, api\_modify \- add <code>radius</code> path \([https\://github\.com/ansible\-collections/community\.routeros/issues/241](https\://github\.com/ansible\-collections/community\.routeros/issues/241)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/245](https\://github\.com/ansible\-collections/community\.routeros/pull/245)\)\. +* api\_info\, api\_modify \- add <code>routing rule</code> path \([https\://github\.com/ansible\-collections/community\.routeros/issues/162](https\://github\.com/ansible\-collections/community\.routeros/issues/162)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/246](https\://github\.com/ansible\-collections/community\.routeros/pull/246)\)\. +* api\_info\, api\_modify \- add missing path <code>routing bgp template</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/243](https\://github\.com/ansible\-collections/community\.routeros/pull/243)\)\. +* api\_info\, api\_modify \- add support for the <code>tx\-power</code> attribute in <code>interface wireless</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/239](https\://github\.com/ansible\-collections/community\.routeros/pull/239)\)\. +* api\_info\, api\_modify \- removed <code>host</code> primary key in <code>tool netwatch</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/248](https\://github\.com/ansible\-collections/community\.routeros/pull/248)\)\. +* api\_modify\, api\_info \- added support for <code>interface wifiwave2</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/226](https\://github\.com/ansible\-collections/community\.routeros/pull/226)\)\. + +<a id="v2-11-0"></a> +## v2\.11\.0 + +<a id="release-summary-3"></a> +### Release Summary + +Feature and bugfix release\. + +<a id="minor-changes-3"></a> +### Minor Changes + +* api\_info\, api\_modify \- add missing DoH parameters <code>doh\-max\-concurrent\-queries</code>\, <code>doh\-max\-server\-connections</code>\, and <code>doh\-timeout</code> to the <code>ip dns</code> path \([https\://github\.com/ansible\-collections/community\.routeros/issues/230](https\://github\.com/ansible\-collections/community\.routeros/issues/230)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/235](https\://github\.com/ansible\-collections/community\.routeros/pull/235)\) +* api\_info\, api\_modify \- add missing parameters <code>address\-list</code>\, <code>address\-list\-timeout</code>\, <code>randomise\-ports</code>\, and <code>realm</code> to subpaths of the <code>ip firewall</code> path \([https\://github\.com/ansible\-collections/community\.routeros/issues/236](https\://github\.com/ansible\-collections/community\.routeros/issues/236)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/237](https\://github\.com/ansible\-collections/community\.routeros/pull/237)\)\. +* api\_info\, api\_modify \- mark the <code>interface wireless</code> parameter <code>running</code> as read\-only \([https\://github\.com/ansible\-collections/community\.routeros/pull/233](https\://github\.com/ansible\-collections/community\.routeros/pull/233)\)\. +* api\_info\, api\_modify \- set the default value to <code>false</code> for the <code>disabled</code> parameter in some more paths where it can be seen in the documentation \([https\://github\.com/ansible\-collections/community\.routeros/pull/237](https\://github\.com/ansible\-collections/community\.routeros/pull/237)\)\. +* api\_modify \- add missing <code>comment</code> attribute to <code>/routing id</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/234](https\://github\.com/ansible\-collections/community\.routeros/pull/234)\)\. +* api\_modify \- add missing attributes to the <code>routing bgp connection</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/234](https\://github\.com/ansible\-collections/community\.routeros/pull/234)\)\. +* api\_modify \- add versioning to the <code>/tool e\-mail</code> path \(RouterOS 7\.12 release\) \([https\://github\.com/ansible\-collections/community\.routeros/pull/234](https\://github\.com/ansible\-collections/community\.routeros/pull/234)\)\. +* api\_modify \- make <code>/ip traffic\-flow target</code> a multiple value attribute \([https\://github\.com/ansible\-collections/community\.routeros/pull/234](https\://github\.com/ansible\-collections/community\.routeros/pull/234)\)\. + +<a id="v2-10-0"></a> +## v2\.10\.0 + +<a id="release-summary-4"></a> +### Release Summary + +Bugfix and feature release\. + +<a id="minor-changes-4"></a> +### Minor Changes + +* api\_info \- add new <code>include\_read\_only</code> option to select behavior for read\-only values\. By default these are not returned \([https\://github\.com/ansible\-collections/community\.routeros/pull/213](https\://github\.com/ansible\-collections/community\.routeros/pull/213)\)\. +* api\_info\, api\_modify \- add support for <code>address\-list</code> and <code>match\-subdomain</code> introduced by RouterOS 7\.7 in the <code>ip dns static</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/197](https\://github\.com/ansible\-collections/community\.routeros/pull/197)\)\. +* api\_info\, api\_modify \- add support for <code>user</code>\, <code>time</code> and <code>gmt\-offset</code> under the <code>system clock</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/210](https\://github\.com/ansible\-collections/community\.routeros/pull/210)\)\. +* api\_info\, api\_modify \- add support for the <code>interface ppp\-client</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/199](https\://github\.com/ansible\-collections/community\.routeros/pull/199)\)\. +* api\_info\, api\_modify \- add support for the <code>interface wireless</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/195](https\://github\.com/ansible\-collections/community\.routeros/pull/195)\)\. +* api\_info\, api\_modify \- add support for the <code>iot modbus</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/205](https\://github\.com/ansible\-collections/community\.routeros/pull/205)\)\. +* api\_info\, api\_modify \- add support for the <code>ip dhcp\-server option</code> and <code>ip dhcp\-server option sets</code> paths \([https\://github\.com/ansible\-collections/community\.routeros/pull/223](https\://github\.com/ansible\-collections/community\.routeros/pull/223)\)\. +* api\_info\, api\_modify \- add support for the <code>ip upnp interfaces</code>\, <code>tool graphing interface</code>\, <code>tool graphing resource</code> paths \([https\://github\.com/ansible\-collections/community\.routeros/pull/227](https\://github\.com/ansible\-collections/community\.routeros/pull/227)\)\. +* api\_info\, api\_modify \- add support for the <code>ipv6 firewall nat</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/204](https\://github\.com/ansible\-collections/community\.routeros/pull/204)\)\. +* api\_info\, api\_modify \- add support for the <code>mode</code> property in <code>ip neighbor discovery\-settings</code> introduced in RouterOS 7\.7 \([https\://github\.com/ansible\-collections/community\.routeros/pull/198](https\://github\.com/ansible\-collections/community\.routeros/pull/198)\)\. +* api\_info\, api\_modify \- add support for the <code>port remote\-access</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/224](https\://github\.com/ansible\-collections/community\.routeros/pull/224)\)\. +* api\_info\, api\_modify \- add support for the <code>routing filter rule</code> and <code>routing filter select\-rule</code> paths \([https\://github\.com/ansible\-collections/community\.routeros/pull/200](https\://github\.com/ansible\-collections/community\.routeros/pull/200)\)\. +* api\_info\, api\_modify \- add support for the <code>routing table</code> path in RouterOS 7 \([https\://github\.com/ansible\-collections/community\.routeros/pull/215](https\://github\.com/ansible\-collections/community\.routeros/pull/215)\)\. +* api\_info\, api\_modify \- add support for the <code>tool netwatch</code> path in RouterOS 7 \([https\://github\.com/ansible\-collections/community\.routeros/pull/216](https\://github\.com/ansible\-collections/community\.routeros/pull/216)\)\. +* api\_info\, api\_modify \- add support for the <code>user settings</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/201](https\://github\.com/ansible\-collections/community\.routeros/pull/201)\)\. +* api\_info\, api\_modify \- add support for the <code>user</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/211](https\://github\.com/ansible\-collections/community\.routeros/pull/211)\)\. +* api\_info\, api\_modify \- finalize fields for the <code>interface wireless security\-profiles</code> path and enable it \([https\://github\.com/ansible\-collections/community\.routeros/pull/203](https\://github\.com/ansible\-collections/community\.routeros/pull/203)\)\. +* api\_info\, api\_modify \- finalize fields for the <code>ppp profile</code> path and enable it \([https\://github\.com/ansible\-collections/community\.routeros/pull/217](https\://github\.com/ansible\-collections/community\.routeros/pull/217)\)\. +* api\_modify \- add new <code>handle\_read\_only</code> and <code>handle\_write\_only</code> options to handle the module\'s behavior for read\-only and write\-only fields \([https\://github\.com/ansible\-collections/community\.routeros/pull/213](https\://github\.com/ansible\-collections/community\.routeros/pull/213)\)\. +* api\_modify\, api\_info \- support API paths <code>routing id</code>\, <code>routing bgp connection</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/220](https\://github\.com/ansible\-collections/community\.routeros/pull/220)\)\. + +<a id="bugfixes-1"></a> +### Bugfixes + +* api\_info\, api\_modify \- in the <code>snmp</code> path\, ensure that <code>engine\-id\-suffix</code> is only available on RouterOS 7\.10\+\, and that <code>engine\-id</code> is read\-only on RouterOS 7\.10\+ \([https\://github\.com/ansible\-collections/community\.routeros/issues/208](https\://github\.com/ansible\-collections/community\.routeros/issues/208)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/218](https\://github\.com/ansible\-collections/community\.routeros/pull/218)\)\. + +<a id="v2-9-0"></a> +## v2\.9\.0 + +<a id="release-summary-5"></a> +### Release Summary + +Bugfix and feature release\. + +<a id="minor-changes-5"></a> +### Minor Changes + +* api\_info\, api\_modify \- add path <code>caps\-man channel</code> and enable path <code>caps\-man manager interface</code> \([https\://github\.com/ansible\-collections/community\.routeros/issues/193](https\://github\.com/ansible\-collections/community\.routeros/issues/193)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/194](https\://github\.com/ansible\-collections/community\.routeros/pull/194)\)\. +* api\_info\, api\_modify \- add path <code>ip traffic\-flow target</code> \([https\://github\.com/ansible\-collections/community\.routeros/issues/191](https\://github\.com/ansible\-collections/community\.routeros/issues/191)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/192](https\://github\.com/ansible\-collections/community\.routeros/pull/192)\)\. + +<a id="bugfixes-2"></a> +### Bugfixes + +* api\_modify\, api\_info \- add missing parameter <code>engine\-id\-suffix</code> for the <code>snmp</code> path \([https\://github\.com/ansible\-collections/community\.routeros/issues/189](https\://github\.com/ansible\-collections/community\.routeros/issues/189)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/190](https\://github\.com/ansible\-collections/community\.routeros/pull/190)\)\. + +<a id="v2-8-3"></a> +## v2\.8\.3 + +<a id="release-summary-6"></a> +### Release Summary + +Maintenance release with updated documentation\. + +From this version on\, community\.routeros is using the new [Ansible semantic markup](https\://docs\.ansible\.com/ansible/devel/dev\_guide/developing\_modules\_documenting\.html\#semantic\-markup\-within\-module\-documentation) +in its documentation\. If you look at documentation with the ansible\-doc CLI tool +from ansible\-core before 2\.15\, please note that it does not render the markup +correctly\. You should be still able to read it in most cases\, but you need +ansible\-core 2\.15 or later to see it as it is intended\. Alternatively you can +look at [the devel docsite](https\://docs\.ansible\.com/ansible/devel/collections/community/routeros/) +for the rendered HTML version of the documentation of the latest release\. + +<a id="known-issues"></a> +### Known Issues + +* Ansible markup will show up in raw form on ansible\-doc text output for ansible\-core before 2\.15\. If you have trouble deciphering the documentation markup\, please upgrade to ansible\-core 2\.15 \(or newer\)\, or read the HTML documentation on [https\://docs\.ansible\.com/ansible/devel/collections/community/routeros/](https\://docs\.ansible\.com/ansible/devel/collections/community/routeros/)\. + +<a id="v2-8-2"></a> +## v2\.8\.2 + +<a id="release-summary-7"></a> +### Release Summary + +Bugfix release\. + +<a id="bugfixes-3"></a> +### Bugfixes + +* api\_modify\, api\_info \- add missing parameter <code>tls</code> for the <code>tool e\-mail</code> path \([https\://github\.com/ansible\-collections/community\.routeros/issues/179](https\://github\.com/ansible\-collections/community\.routeros/issues/179)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/180](https\://github\.com/ansible\-collections/community\.routeros/pull/180)\)\. + +<a id="v2-8-1"></a> +## v2\.8\.1 + +<a id="release-summary-8"></a> +### Release Summary + +Bugfix release\. + +<a id="bugfixes-4"></a> +### Bugfixes + +* facts \- do not crash in CLI output preprocessing in unexpected situations during line unwrapping \([https\://github\.com/ansible\-collections/community\.routeros/issues/170](https\://github\.com/ansible\-collections/community\.routeros/issues/170)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/177](https\://github\.com/ansible\-collections/community\.routeros/pull/177)\)\. + +<a id="v2-8-0"></a> +## v2\.8\.0 + +<a id="release-summary-9"></a> +### Release Summary + +Bugfix and feature release\. + +<a id="minor-changes-6"></a> +### Minor Changes + +* api\_modify \- adapt data for API paths <code>ip dhcp\-server network</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/156](https\://github\.com/ansible\-collections/community\.routeros/pull/156)\)\. +* api\_modify \- add support for API path <code>snmp community</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/159](https\://github\.com/ansible\-collections/community\.routeros/pull/159)\)\. +* api\_modify \- add support for <code>trap\-interfaces</code> in API path <code>snmp</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/159](https\://github\.com/ansible\-collections/community\.routeros/pull/159)\)\. +* api\_modify \- add support to disable IPv6 in API paths <code>ipv6 settings</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/158](https\://github\.com/ansible\-collections/community\.routeros/pull/158)\)\. +* api\_modify \- support API paths <code>ip firewall layer7\-protocol</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/153](https\://github\.com/ansible\-collections/community\.routeros/pull/153)\)\. +* command \- workaround for extra characters in stdout in RouterOS versions between 6\.49 and 7\.1\.5 \([https\://github\.com/ansible\-collections/community\.routeros/issues/62](https\://github\.com/ansible\-collections/community\.routeros/issues/62)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/161](https\://github\.com/ansible\-collections/community\.routeros/pull/161)\)\. + +<a id="bugfixes-5"></a> +### Bugfixes + +* api\_info\, api\_modify \- fix default and remove behavior for <code>dhcp\-options</code> in path <code>ip dhcp\-client</code> \([https\://github\.com/ansible\-collections/community\.routeros/issues/148](https\://github\.com/ansible\-collections/community\.routeros/issues/148)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/154](https\://github\.com/ansible\-collections/community\.routeros/pull/154)\)\. +* api\_modify \- fix handling of disabled keys on creation \([https\://github\.com/ansible\-collections/community\.routeros/pull/154](https\://github\.com/ansible\-collections/community\.routeros/pull/154)\)\. +* various plugins and modules \- remove unnecessary imports \([https\://github\.com/ansible\-collections/community\.routeros/pull/149](https\://github\.com/ansible\-collections/community\.routeros/pull/149)\)\. + +<a id="v2-7-0"></a> +## v2\.7\.0 + +<a id="release-summary-10"></a> +### Release Summary + +Bugfix and feature release\. + +<a id="minor-changes-7"></a> +### Minor Changes + +* api\_modify\, api\_info \- support API paths <code>ip arp</code>\, <code>ip firewall raw</code>\, <code>ipv6 firewall raw</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/144](https\://github\.com/ansible\-collections/community\.routeros/pull/144)\)\. + +<a id="bugfixes-6"></a> +### Bugfixes + +* api\_modify\, api\_info \- defaults corrected for fields in <code>interface wireguard peers</code> API path \([https\://github\.com/ansible\-collections/community\.routeros/pull/144](https\://github\.com/ansible\-collections/community\.routeros/pull/144)\)\. + +<a id="v2-6-0"></a> +## v2\.6\.0 + +<a id="release-summary-11"></a> +### Release Summary + +Regular bugfix and feature release\. + +<a id="minor-changes-8"></a> +### Minor Changes + +* api\_modify\, api\_info \- add field <code>regexp</code> to <code>ip dns static</code> \([https\://github\.com/ansible\-collections/community\.routeros/issues/141](https\://github\.com/ansible\-collections/community\.routeros/issues/141)\)\. +* api\_modify\, api\_info \- support API paths <code>interface wireguard</code>\, <code>interface wireguard peers</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/143](https\://github\.com/ansible\-collections/community\.routeros/pull/143)\)\. + +<a id="bugfixes-7"></a> +### Bugfixes + +* api\_modify \- do not use <code>name</code> as a unique key in <code>ip dns static</code> \([https\://github\.com/ansible\-collections/community\.routeros/issues/141](https\://github\.com/ansible\-collections/community\.routeros/issues/141)\)\. +* api\_modify\, api\_info \- do not crash if router contains <code>regexp</code> DNS entries in <code>ip dns static</code> \([https\://github\.com/ansible\-collections/community\.routeros/issues/141](https\://github\.com/ansible\-collections/community\.routeros/issues/141)\)\. + +<a id="v2-5-0"></a> +## v2\.5\.0 + +<a id="release-summary-12"></a> +### Release Summary + +Feature and bugfix release\. + +<a id="minor-changes-9"></a> +### Minor Changes + +* api\_info\, api\_modify \- support API paths <code>interface ethernet poe</code>\, <code>interface gre6</code>\, <code>interface vrrp</code> and also support all previously missing fields of entries in <code>ip dhcp\-server</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/137](https\://github\.com/ansible\-collections/community\.routeros/pull/137)\)\. + +<a id="bugfixes-8"></a> +### Bugfixes + +* api\_modify \- <code>address\-pool</code> field of entries in API path <code>ip dhcp\-server</code> is not required anymore \([https\://github\.com/ansible\-collections/community\.routeros/pull/137](https\://github\.com/ansible\-collections/community\.routeros/pull/137)\)\. + +<a id="v2-4-0"></a> +## v2\.4\.0 + +<a id="release-summary-13"></a> +### Release Summary + +Feature release improving the <code>api\*</code> modules\. + +<a id="minor-changes-10"></a> +### Minor Changes + +* api\* modules \- Add new option <code>force\_no\_cert</code> to connect with ADH ciphers \([https\://github\.com/ansible\-collections/community\.routeros/pull/124](https\://github\.com/ansible\-collections/community\.routeros/pull/124)\)\. +* api\_info \- new parameter <code>include\_builtin</code> which allows to include \"builtin\" entries that are automatically generated by ROS and cannot be modified by the user \([https\://github\.com/ansible\-collections/community\.routeros/pull/130](https\://github\.com/ansible\-collections/community\.routeros/pull/130)\)\. +* api\_modify\, api\_info \- support API paths \- <code>interface bonding</code>\, <code>interface bridge mlag</code>\, <code>ipv6 firewall mangle</code>\, <code>ipv6 nd</code>\, <code>system scheduler</code>\, <code>system script</code>\, <code>system ups</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/133](https\://github\.com/ansible\-collections/community\.routeros/pull/133)\)\. +* api\_modify\, api\_info \- support API paths <code>caps\-man access\-list</code>\, <code>caps\-man configuration</code>\, <code>caps\-man datapath</code>\, <code>caps\-man manager</code>\, <code>caps\-man provisioning</code>\, <code>caps\-man security</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/126](https\://github\.com/ansible\-collections/community\.routeros/pull/126)\)\. +* api\_modify\, api\_info \- support API paths <code>interface list</code> and <code>interface list member</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/120](https\://github\.com/ansible\-collections/community\.routeros/pull/120)\)\. +* api\_modify\, api\_info \- support API paths <code>interface pppoe\-client</code>\, <code>interface vlan</code>\, <code>interface bridge</code>\, <code>interface bridge vlan</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/125](https\://github\.com/ansible\-collections/community\.routeros/pull/125)\)\. +* api\_modify\, api\_info \- support API paths <code>ip ipsec identity</code>\, <code>ip ipsec peer</code>\, <code>ip ipsec policy</code>\, <code>ip ipsec profile</code>\, <code>ip ipsec proposal</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/129](https\://github\.com/ansible\-collections/community\.routeros/pull/129)\)\. +* api\_modify\, api\_info \- support API paths <code>ip route</code> and <code>ip route vrf</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/123](https\://github\.com/ansible\-collections/community\.routeros/pull/123)\)\. +* api\_modify\, api\_info \- support API paths <code>ipv6 address</code>\, <code>ipv6 dhcp\-server</code>\, <code>ipv6 dhcp\-server option</code>\, <code>ipv6 route</code>\, <code>queue tree</code>\, <code>routing ospf area</code>\, <code>routing ospf area range</code>\, <code>routing ospf instance</code>\, <code>routing ospf interface\-template</code>\, <code>routing pimsm instance</code>\, <code>routing pimsm interface\-template</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/131](https\://github\.com/ansible\-collections/community\.routeros/pull/131)\)\. +* api\_modify\, api\_info \- support API paths <code>system logging</code>\, <code>system logging action</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/127](https\://github\.com/ansible\-collections/community\.routeros/pull/127)\)\. +* api\_modify\, api\_info \- support field <code>hw\-offload</code> for path <code>ip firewall filter</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/121](https\://github\.com/ansible\-collections/community\.routeros/pull/121)\)\. +* api\_modify\, api\_info \- support fields <code>address\-list</code>\, <code>address\-list\-timeout</code>\, <code>connection\-bytes</code>\, <code>connection\-limit</code>\, <code>connection\-mark</code>\, <code>connection\-rate</code>\, <code>connection\-type</code>\, <code>content</code>\, <code>disabled</code>\, <code>dscp</code>\, <code>dst\-address\-list</code>\, <code>dst\-address\-type</code>\, <code>dst\-limit</code>\, <code>fragment</code>\, <code>hotspot</code>\, <code>icmp\-options</code>\, <code>in\-bridge\-port</code>\, <code>in\-bridge\-port\-list</code>\, <code>ingress\-priority</code>\, <code>ipsec\-policy</code>\, <code>ipv4\-options</code>\, <code>jump\-target</code>\, <code>layer7\-protocol</code>\, <code>limit</code>\, <code>log</code>\, <code>log\-prefix</code>\, <code>nth</code>\, <code>out\-bridge\-port</code>\, <code>out\-bridge\-port\-list</code>\, <code>packet\-mark</code>\, <code>packet\-size</code>\, <code>per\-connection\-classifier</code>\, <code>port</code>\, <code>priority</code>\, <code>psd</code>\, <code>random</code>\, <code>realm</code>\, <code>routing\-mark</code>\, <code>same\-not\-by\-dst</code>\, <code>src\-address</code>\, <code>src\-address\-list</code>\, <code>src\-address\-type</code>\, <code>src\-mac\-address</code>\, <code>src\-port</code>\, <code>tcp\-mss</code>\, <code>time</code>\, <code>tls\-host</code>\, <code>ttl</code> in <code>ip firewall nat</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/133](https\://github\.com/ansible\-collections/community\.routeros/pull/133)\)\. +* api\_modify\, api\_info \- support fields <code>combo\-mode</code>\, <code>comment</code>\, <code>fec\-mode</code>\, <code>mdix\-enable</code>\, <code>poe\-out</code>\, <code>poe\-priority</code>\, <code>poe\-voltage</code>\, <code>power\-cycle\-interval</code>\, <code>power\-cycle\-ping\-address</code>\, <code>power\-cycle\-ping\-enabled</code>\, <code>power\-cycle\-ping\-timeout</code> for path <code>interface ethernet</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/121](https\://github\.com/ansible\-collections/community\.routeros/pull/121)\)\. +* api\_modify\, api\_info \- support fields <code>jump\-target</code>\, <code>reject\-with</code> in <code>ip firewall filter</code> API path\, field <code>comment</code> in <code>ip firwall address\-list</code> API path\, field <code>jump\-target</code> in <code>ip firewall mangle</code> API path\, field <code>comment</code> in <code>ipv6 firewall address\-list</code> API path\, fields <code>jump\-target</code>\, <code>reject\-with</code> in <code>ipv6 firewall filter</code> API path \([https\://github\.com/ansible\-collections/community\.routeros/pull/133](https\://github\.com/ansible\-collections/community\.routeros/pull/133)\)\. +* api\_modify\, api\_info \- support for API fields that can be disabled and have default value at the same time\, support API paths <code>interface gre</code>\, <code>interface eoip</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/128](https\://github\.com/ansible\-collections/community\.routeros/pull/128)\)\. +* api\_modify\, api\_info \- support for fields <code>blackhole</code>\, <code>pref\-src</code>\, <code>routing\-table</code>\, <code>suppress\-hw\-offload</code>\, <code>type</code>\, <code>vrf\-interface</code> in <code>ip route</code> path \([https\://github\.com/ansible\-collections/community\.routeros/pull/131](https\://github\.com/ansible\-collections/community\.routeros/pull/131)\)\. +* api\_modify\, api\_info \- support paths <code>system ntp client servers</code> and <code>system ntp server</code> available in ROS7\, as well as new fields <code>servers</code>\, <code>mode</code>\, and <code>vrf</code> for <code>system ntp client</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/122](https\://github\.com/ansible\-collections/community\.routeros/pull/122)\)\. + +<a id="bugfixes-9"></a> +### Bugfixes + +* api\_modify \- <code>ip route</code> entry can be defined without the need of <code>gateway</code> field\, which is correct for unreachable/blackhole type of routes \([https\://github\.com/ansible\-collections/community\.routeros/pull/131](https\://github\.com/ansible\-collections/community\.routeros/pull/131)\)\. +* api\_modify \- <code>queue interface</code> path works now \([https\://github\.com/ansible\-collections/community\.routeros/pull/131](https\://github\.com/ansible\-collections/community\.routeros/pull/131)\)\. +* api\_modify\, api\_info \- removed wrong field <code>dynamic</code> from API path <code>ipv6 firewall address\-list</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/133](https\://github\.com/ansible\-collections/community\.routeros/pull/133)\)\. +* api\_modify\, api\_info \- the default of the field <code>ingress\-filtering</code> in <code>interface bridge port</code> is now <code>true</code>\, which is the default in ROS \([https\://github\.com/ansible\-collections/community\.routeros/pull/125](https\://github\.com/ansible\-collections/community\.routeros/pull/125)\)\. +* command\, facts \- commands do not timeout in safe mode anymore \([https\://github\.com/ansible\-collections/community\.routeros/pull/134](https\://github\.com/ansible\-collections/community\.routeros/pull/134)\)\. + +<a id="known-issues-1"></a> +### Known Issues + +* api\_modify \- when limits for entries in <code>queue tree</code> are defined as human readable \- for example <code>25M</code> \-\, the configuration will be correctly set in ROS\, but the module will indicate the item is changed on every run even when there was no change done\. This is caused by the ROS API which returns the number in bytes \- for example <code>25000000</code> \(which is inconsistent with the CLI behavior\)\. In order to mitigate that\, the limits have to be defined in bytes \(those will still appear as human readable in the ROS CLI\) \([https\://github\.com/ansible\-collections/community\.routeros/pull/131](https\://github\.com/ansible\-collections/community\.routeros/pull/131)\)\. +* api\_modify\, api\_info \- <code>routing ospf area</code>\, <code>routing ospf area range</code>\, <code>routing ospf instance</code>\, <code>routing ospf interface\-template</code> paths are not fully implemented for ROS6 due to the significant changes between ROS6 and ROS7 \([https\://github\.com/ansible\-collections/community\.routeros/pull/131](https\://github\.com/ansible\-collections/community\.routeros/pull/131)\)\. + +<a id="v2-3-1"></a> +## v2\.3\.1 + +<a id="release-summary-14"></a> +### Release Summary + +Maintenance release with improved documentation\. + +<a id="known-issues-2"></a> +### Known Issues + +* The <code>community\.routeros\.command</code> module claims to support check mode\. Since it cannot judge whether the commands executed modify state or not\, this behavior is incorrect\. Since this potentially breaks existing playbooks\, we will not change this behavior until community\.routeros 3\.0\.0\. + +<a id="v2-3-0"></a> +## v2\.3\.0 + +<a id="release-summary-15"></a> +### Release Summary + +Feature and bugfix release\. + +<a id="minor-changes-11"></a> +### Minor Changes + +* The collection repository conforms to the [REUSE specification](https\://reuse\.software/spec/) except for the changelog fragments \([https\://github\.com/ansible\-collections/community\.routeros/pull/108](https\://github\.com/ansible\-collections/community\.routeros/pull/108)\)\. +* api\* modules \- added <code>timeout</code> parameter \([https\://github\.com/ansible\-collections/community\.routeros/pull/109](https\://github\.com/ansible\-collections/community\.routeros/pull/109)\)\. +* api\_modify\, api\_info \- support API path <code>ip firewall mangle</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/110](https\://github\.com/ansible\-collections/community\.routeros/pull/110)\)\. + +<a id="bugfixes-10"></a> +### Bugfixes + +* api\_modify\, api\_info \- make API path <code>ip dhcp\-server</code> support <code>script</code>\, and <code>ip firewall nat</code> support <code>in\-interface</code> and <code>in\-interface\-list</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/110](https\://github\.com/ansible\-collections/community\.routeros/pull/110)\)\. + +<a id="v2-2-1"></a> +## v2\.2\.1 + +<a id="release-summary-16"></a> +### Release Summary + +Bugfix release\. + +<a id="bugfixes-11"></a> +### Bugfixes + +* api\_modify\, api\_info \- make API path <code>ip dhcp\-server lease</code> support <code>server\=all</code> \([https\://github\.com/ansible\-collections/community\.routeros/issues/104](https\://github\.com/ansible\-collections/community\.routeros/issues/104)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/107](https\://github\.com/ansible\-collections/community\.routeros/pull/107)\)\. +* api\_modify\, api\_info \- make API path <code>ip dhcp\-server network</code> support missing options <code>boot\-file\-name</code>\, <code>dhcp\-option\-set</code>\, <code>dns\-none</code>\, <code>domain</code>\, and <code>next\-server</code> \([https\://github\.com/ansible\-collections/community\.routeros/issues/104](https\://github\.com/ansible\-collections/community\.routeros/issues/104)\, [https\://github\.com/ansible\-collections/community\.routeros/pull/106](https\://github\.com/ansible\-collections/community\.routeros/pull/106)\)\. + +<a id="v2-2-0"></a> +## v2\.2\.0 + +<a id="release-summary-17"></a> +### Release Summary + +New feature release\. + +<a id="minor-changes-12"></a> +### Minor Changes + +* All software licenses are now in the <code>LICENSES/</code> directory of the collection root\. Moreover\, <code>SPDX\-License\-Identifier\:</code> is used to declare the applicable license for every file that is not automatically generated \([https\://github\.com/ansible\-collections/community\.routeros/pull/101](https\://github\.com/ansible\-collections/community\.routeros/pull/101)\)\. + +<a id="bugfixes-12"></a> +### Bugfixes + +* Include <code>LICENSES/BSD\-2\-Clause\.txt</code> file for the <code>routeros</code> module utils \([https\://github\.com/ansible\-collections/community\.routeros/pull/101](https\://github\.com/ansible\-collections/community\.routeros/pull/101)\)\. + +<a id="new-modules"></a> +### New Modules + +* api\_info \- Retrieve information from API +* api\_modify \- Modify data at paths with API + +<a id="v2-1-0"></a> +## v2\.1\.0 + +<a id="release-summary-18"></a> +### Release Summary + +Feature and bugfix release with new modules\. + +<a id="minor-changes-13"></a> +### Minor Changes + +* Added a <code>community\.routeros\.api</code> module defaults group\. Use with <code>group/community\.routeros\.api</code> to provide options for all API\-based modules \([https\://github\.com/ansible\-collections/community\.routeros/pull/89](https\://github\.com/ansible\-collections/community\.routeros/pull/89)\)\. +* Prepare collection for inclusion in an Execution Environment by declaring its dependencies \([https\://github\.com/ansible\-collections/community\.routeros/pull/83](https\://github\.com/ansible\-collections/community\.routeros/pull/83)\)\. +* api \- add new option <code>extended query</code> more complex queries against RouterOS API \([https\://github\.com/ansible\-collections/community\.routeros/pull/63](https\://github\.com/ansible\-collections/community\.routeros/pull/63)\)\. +* api \- update <code>query</code> to accept symbolic parameters \([https\://github\.com/ansible\-collections/community\.routeros/pull/63](https\://github\.com/ansible\-collections/community\.routeros/pull/63)\)\. +* api\* modules \- allow to set an encoding other than the default ASCII for communicating with the API \([https\://github\.com/ansible\-collections/community\.routeros/pull/95](https\://github\.com/ansible\-collections/community\.routeros/pull/95)\)\. + +<a id="bugfixes-13"></a> +### Bugfixes + +* query \- fix query function check for <code>\.id</code> vs\. <code>id</code> arguments to not conflict with routeros arguments like <code>identity</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/68](https\://github\.com/ansible\-collections/community\.routeros/pull/68)\, [https\://github\.com/ansible\-collections/community\.routeros/issues/67](https\://github\.com/ansible\-collections/community\.routeros/issues/67)\)\. +* quoting and unquoting filter plugins\, api module \- handle the escape sequence <code>\\\_</code> correctly as escaping a space and not an underscore \([https\://github\.com/ansible\-collections/community\.routeros/pull/89](https\://github\.com/ansible\-collections/community\.routeros/pull/89)\)\. + +<a id="new-modules-1"></a> +### New Modules + +* api\_facts \- Collect facts from remote devices running MikroTik RouterOS using the API +* api\_find\_and\_modify \- Find and modify information using the API + +<a id="v2-0-0"></a> +## v2\.0\.0 + +<a id="release-summary-19"></a> +### Release Summary + +A new major release with breaking changes in the behavior of <code>community\.routeros\.api</code> and <code>community\.routeros\.command</code>\. + +<a id="minor-changes-14"></a> +### Minor Changes + +* api \- make validation of <code>WHERE</code> for <code>query</code> more strict \([https\://github\.com/ansible\-collections/community\.routeros/pull/53](https\://github\.com/ansible\-collections/community\.routeros/pull/53)\)\. +* command \- the <code>commands</code> and <code>wait\_for</code> options now convert the list elements to strings \([https\://github\.com/ansible\-collections/community\.routeros/pull/55](https\://github\.com/ansible\-collections/community\.routeros/pull/55)\)\. +* facts \- the <code>gather\_subset</code> option now converts the list elements to strings \([https\://github\.com/ansible\-collections/community\.routeros/pull/55](https\://github\.com/ansible\-collections/community\.routeros/pull/55)\)\. + +<a id="breaking-changes--porting-guide"></a> +### Breaking Changes / Porting Guide + +* api \- due to a programming error\, the module never failed on errors\. This has now been fixed\. If you are relying on the module not failing in case of idempotent commands \(resulting in errors like <code>failure\: already have such address</code>\)\, you need to adjust your roles/playbooks\. We suggest to use <code>failed\_when</code> to accept failure in specific circumstances\, for example <code>failed\_when\: \"\'failure\: already have \' in result\.msg\[0\]\"</code> \([https\://github\.com/ansible\-collections/community\.routeros/pull/39](https\://github\.com/ansible\-collections/community\.routeros/pull/39)\)\. +* api \- splitting commands no longer uses a naive split by whitespace\, but a more RouterOS CLI compatible splitting algorithm \([https\://github\.com/ansible\-collections/community\.routeros/pull/45](https\://github\.com/ansible\-collections/community\.routeros/pull/45)\)\. +* command \- the module now always indicates that a change happens\. If this is not correct\, please use <code>changed\_when</code> to determine the correct changed status for a task \([https\://github\.com/ansible\-collections/community\.routeros/pull/50](https\://github\.com/ansible\-collections/community\.routeros/pull/50)\)\. + +<a id="bugfixes-14"></a> +### Bugfixes + +* api \- improve splitting of <code>WHERE</code> queries \([https\://github\.com/ansible\-collections/community\.routeros/pull/47](https\://github\.com/ansible\-collections/community\.routeros/pull/47)\)\. +* api \- when converting result lists to dictionaries\, no longer removes second <code>\=</code> and text following that if present \([https\://github\.com/ansible\-collections/community\.routeros/pull/47](https\://github\.com/ansible\-collections/community\.routeros/pull/47)\)\. +* routeros cliconf plugin \- adjust function signature that was modified in Ansible after creation of this plugin \([https\://github\.com/ansible\-collections/community\.routeros/pull/43](https\://github\.com/ansible\-collections/community\.routeros/pull/43)\)\. + +<a id="new-plugins"></a> +### New Plugins + +<a id="filter"></a> +#### Filter + +* join \- Join a list of arguments to a command +* list\_to\_dict \- Convert a list of arguments to a list of dictionary +* quote\_argument \- Quote an argument +* quote\_argument\_value \- Quote an argument value +* split \- Split a command into arguments + +<a id="v1-2-0"></a> +## v1\.2\.0 + +<a id="release-summary-20"></a> +### Release Summary + +Bugfix and feature release\. + +<a id="minor-changes-15"></a> +### Minor Changes + +* Avoid internal ansible\-core module\_utils in favor of equivalent public API available since at least Ansible 2\.9 \([https\://github\.com/ansible\-collections/community\.routeros/pull/38](https\://github\.com/ansible\-collections/community\.routeros/pull/38)\)\. +* api \- add options <code>validate\_certs</code> \(default value <code>true</code>\)\, <code>validate\_cert\_hostname</code> \(default value <code>false</code>\)\, and <code>ca\_path</code> to control certificate validation \([https\://github\.com/ansible\-collections/community\.routeros/pull/37](https\://github\.com/ansible\-collections/community\.routeros/pull/37)\)\. +* api \- rename option <code>ssl</code> to <code>tls</code>\, and keep the old name as an alias \([https\://github\.com/ansible\-collections/community\.routeros/pull/37](https\://github\.com/ansible\-collections/community\.routeros/pull/37)\)\. +* fact \- add fact <code>ansible\_net\_config\_nonverbose</code> to get idempotent config \(no date\, no verbose\) \([https\://github\.com/ansible\-collections/community\.routeros/pull/23](https\://github\.com/ansible\-collections/community\.routeros/pull/23)\)\. + +<a id="bugfixes-15"></a> +### Bugfixes + +* api \- when using TLS/SSL\, remove explicit cipher configuration to insecure values\, which also makes it impossible to connect to newer RouterOS versions \([https\://github\.com/ansible\-collections/community\.routeros/pull/34](https\://github\.com/ansible\-collections/community\.routeros/pull/34)\)\. + +<a id="v1-1-0"></a> +## v1\.1\.0 + +<a id="release-summary-21"></a> +### Release Summary + +This release allow dashes in usernames for SSH\-based modules\. + +<a id="minor-changes-16"></a> +### Minor Changes + +* command \- added support for a dash \(<code>\-</code>\) in username \([https\://github\.com/ansible\-collections/community\.routeros/pull/18](https\://github\.com/ansible\-collections/community\.routeros/pull/18)\)\. +* facts \- added support for a dash \(<code>\-</code>\) in username \([https\://github\.com/ansible\-collections/community\.routeros/pull/18](https\://github\.com/ansible\-collections/community\.routeros/pull/18)\)\. + +<a id="v1-0-1"></a> +## v1\.0\.1 + +<a id="release-summary-22"></a> +### Release Summary + +Maintenance release with a bugfix for <code>api</code>\. + +<a id="bugfixes-16"></a> +### Bugfixes + +* api \- remove <code>id to \.id</code> as default requirement which conflicts with RouterOS <code>id</code> configuration parameter \([https\://github\.com/ansible\-collections/community\.routeros/pull/15](https\://github\.com/ansible\-collections/community\.routeros/pull/15)\)\. + +<a id="v1-0-0"></a> +## v1\.0\.0 + +<a id="release-summary-23"></a> +### Release Summary + +This is the first production \(non\-prerelease\) release of <code>community\.routeros</code>\. + +<a id="bugfixes-17"></a> +### Bugfixes + +* routeros terminal plugin \- allow slashes in hostnames for terminal detection\. Without this\, slashes in hostnames will result in connection timeouts \([https\://github\.com/ansible\-collections/community\.network/pull/138](https\://github\.com/ansible\-collections/community\.network/pull/138)\)\. + +<a id="v0-1-1"></a> +## v0\.1\.1 + +<a id="release-summary-24"></a> +### Release Summary + +Small improvements and bugfixes over the initial release\. + +<a id="bugfixes-18"></a> +### Bugfixes + +* api \- fix crash when the <code>ssl</code> parameter is used \([https\://github\.com/ansible\-collections/community\.routeros/pull/3](https\://github\.com/ansible\-collections/community\.routeros/pull/3)\)\. + +<a id="v0-1-0"></a> +## v0\.1\.0 + +<a id="release-summary-25"></a> +### Release Summary + +The <code>community\.routeros</code> continues the work on the Ansible RouterOS modules from their state in <code>community\.network</code> 1\.2\.0\. The changes listed here are thus relative to the modules <code>community\.network\.routeros\_\*</code>\. + +<a id="minor-changes-17"></a> +### Minor Changes + +* facts \- now also collecting data about BGP and OSPF \([https\://github\.com/ansible\-collections/community\.network/pull/101](https\://github\.com/ansible\-collections/community\.network/pull/101)\)\. +* facts \- set configuration export on to verbose\, for full configuration export \([https\://github\.com/ansible\-collections/community\.network/pull/104](https\://github\.com/ansible\-collections/community\.network/pull/104)\)\. diff --git a/ansible_collections/community/routeros/CHANGELOG.md.license b/ansible_collections/community/routeros/CHANGELOG.md.license new file mode 100644 index 000000000..edff8c768 --- /dev/null +++ b/ansible_collections/community/routeros/CHANGELOG.md.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/ansible_collections/community/routeros/CHANGELOG.rst b/ansible_collections/community/routeros/CHANGELOG.rst index d82c58e47..c7cc6ef67 100644 --- a/ansible_collections/community/routeros/CHANGELOG.rst +++ b/ansible_collections/community/routeros/CHANGELOG.rst @@ -4,6 +4,156 @@ Community RouterOS Release Notes .. contents:: Topics +v2.14.0 +======= + +Release Summary +--------------- + +Feature release. + +Minor Changes +------------- + +- api_info, api_modify - add read-only fields ``installed-version``, ``latest-version`` and ``status`` in ``system package update`` (https://github.com/ansible-collections/community.routeros/pull/263). +- api_info, api_modify - added support for ``interface wifi`` and its sub-paths (https://github.com/ansible-collections/community.routeros/pull/266). +- api_info, api_modify - remove default value for read-only ``running`` field in ``interface wireless`` (https://github.com/ansible-collections/community.routeros/pull/264). + +v2.13.0 +======= + +Release Summary +--------------- + +Bugfix and feature release. + +Minor Changes +------------- + +- api_info, api_modify - make path ``user group`` modifiable and add ``comment`` attribute (https://github.com/ansible-collections/community.routeros/issues/256, https://github.com/ansible-collections/community.routeros/pull/257). +- api_modify, api_info - add support for the ``ip vrf`` path in RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/259) + +Bugfixes +-------- + +- facts - fix date not getting removed for idempotent config export (https://github.com/ansible-collections/community.routeros/pull/262). + +v2.12.0 +======= + +Release Summary +--------------- + +Feature release. + +Minor Changes +------------- + +- api_info, api_modify - add ``interface ovpn-client`` path (https://github.com/ansible-collections/community.routeros/issues/242, https://github.com/ansible-collections/community.routeros/pull/244). +- api_info, api_modify - add ``radius`` path (https://github.com/ansible-collections/community.routeros/issues/241, https://github.com/ansible-collections/community.routeros/pull/245). +- api_info, api_modify - add ``routing rule`` path (https://github.com/ansible-collections/community.routeros/issues/162, https://github.com/ansible-collections/community.routeros/pull/246). +- api_info, api_modify - add missing path ``routing bgp template`` (https://github.com/ansible-collections/community.routeros/pull/243). +- api_info, api_modify - add support for the ``tx-power`` attribute in ``interface wireless`` (https://github.com/ansible-collections/community.routeros/pull/239). +- api_info, api_modify - removed ``host`` primary key in ``tool netwatch`` path (https://github.com/ansible-collections/community.routeros/pull/248). +- api_modify, api_info - added support for ``interface wifiwave2`` (https://github.com/ansible-collections/community.routeros/pull/226). + +v2.11.0 +======= + +Release Summary +--------------- + +Feature and bugfix release. + +Minor Changes +------------- + +- api_info, api_modify - add missing DoH parameters ``doh-max-concurrent-queries``, ``doh-max-server-connections``, and ``doh-timeout`` to the ``ip dns`` path (https://github.com/ansible-collections/community.routeros/issues/230, https://github.com/ansible-collections/community.routeros/pull/235) +- api_info, api_modify - add missing parameters ``address-list``, ``address-list-timeout``, ``randomise-ports``, and ``realm`` to subpaths of the ``ip firewall`` path (https://github.com/ansible-collections/community.routeros/issues/236, https://github.com/ansible-collections/community.routeros/pull/237). +- api_info, api_modify - mark the ``interface wireless`` parameter ``running`` as read-only (https://github.com/ansible-collections/community.routeros/pull/233). +- api_info, api_modify - set the default value to ``false`` for the ``disabled`` parameter in some more paths where it can be seen in the documentation (https://github.com/ansible-collections/community.routeros/pull/237). +- api_modify - add missing ``comment`` attribute to ``/routing id`` (https://github.com/ansible-collections/community.routeros/pull/234). +- api_modify - add missing attributes to the ``routing bgp connection`` path (https://github.com/ansible-collections/community.routeros/pull/234). +- api_modify - add versioning to the ``/tool e-mail`` path (RouterOS 7.12 release) (https://github.com/ansible-collections/community.routeros/pull/234). +- api_modify - make ``/ip traffic-flow target`` a multiple value attribute (https://github.com/ansible-collections/community.routeros/pull/234). + +v2.10.0 +======= + +Release Summary +--------------- + +Bugfix and feature release. + +Minor Changes +------------- + +- api_info - add new ``include_read_only`` option to select behavior for read-only values. By default these are not returned (https://github.com/ansible-collections/community.routeros/pull/213). +- api_info, api_modify - add support for ``address-list`` and ``match-subdomain`` introduced by RouterOS 7.7 in the ``ip dns static`` path (https://github.com/ansible-collections/community.routeros/pull/197). +- api_info, api_modify - add support for ``user``, ``time`` and ``gmt-offset`` under the ``system clock`` path (https://github.com/ansible-collections/community.routeros/pull/210). +- api_info, api_modify - add support for the ``interface ppp-client`` path (https://github.com/ansible-collections/community.routeros/pull/199). +- api_info, api_modify - add support for the ``interface wireless`` path (https://github.com/ansible-collections/community.routeros/pull/195). +- api_info, api_modify - add support for the ``iot modbus`` path (https://github.com/ansible-collections/community.routeros/pull/205). +- api_info, api_modify - add support for the ``ip dhcp-server option`` and ``ip dhcp-server option sets`` paths (https://github.com/ansible-collections/community.routeros/pull/223). +- api_info, api_modify - add support for the ``ip upnp interfaces``, ``tool graphing interface``, ``tool graphing resource`` paths (https://github.com/ansible-collections/community.routeros/pull/227). +- api_info, api_modify - add support for the ``ipv6 firewall nat`` path (https://github.com/ansible-collections/community.routeros/pull/204). +- api_info, api_modify - add support for the ``mode`` property in ``ip neighbor discovery-settings`` introduced in RouterOS 7.7 (https://github.com/ansible-collections/community.routeros/pull/198). +- api_info, api_modify - add support for the ``port remote-access`` path (https://github.com/ansible-collections/community.routeros/pull/224). +- api_info, api_modify - add support for the ``routing filter rule`` and ``routing filter select-rule`` paths (https://github.com/ansible-collections/community.routeros/pull/200). +- api_info, api_modify - add support for the ``routing table`` path in RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/215). +- api_info, api_modify - add support for the ``tool netwatch`` path in RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/216). +- api_info, api_modify - add support for the ``user settings`` path (https://github.com/ansible-collections/community.routeros/pull/201). +- api_info, api_modify - add support for the ``user`` path (https://github.com/ansible-collections/community.routeros/pull/211). +- api_info, api_modify - finalize fields for the ``interface wireless security-profiles`` path and enable it (https://github.com/ansible-collections/community.routeros/pull/203). +- api_info, api_modify - finalize fields for the ``ppp profile`` path and enable it (https://github.com/ansible-collections/community.routeros/pull/217). +- api_modify - add new ``handle_read_only`` and ``handle_write_only`` options to handle the module's behavior for read-only and write-only fields (https://github.com/ansible-collections/community.routeros/pull/213). +- api_modify, api_info - support API paths ``routing id``, ``routing bgp connection`` (https://github.com/ansible-collections/community.routeros/pull/220). + +Bugfixes +-------- + +- api_info, api_modify - in the ``snmp`` path, ensure that ``engine-id-suffix`` is only available on RouterOS 7.10+, and that ``engine-id`` is read-only on RouterOS 7.10+ (https://github.com/ansible-collections/community.routeros/issues/208, https://github.com/ansible-collections/community.routeros/pull/218). + +v2.9.0 +====== + +Release Summary +--------------- + +Bugfix and feature release. + +Minor Changes +------------- + +- api_info, api_modify - add path ``caps-man channel`` and enable path ``caps-man manager interface`` (https://github.com/ansible-collections/community.routeros/issues/193, https://github.com/ansible-collections/community.routeros/pull/194). +- api_info, api_modify - add path ``ip traffic-flow target`` (https://github.com/ansible-collections/community.routeros/issues/191, https://github.com/ansible-collections/community.routeros/pull/192). + +Bugfixes +-------- + +- api_modify, api_info - add missing parameter ``engine-id-suffix`` for the ``snmp`` path (https://github.com/ansible-collections/community.routeros/issues/189, https://github.com/ansible-collections/community.routeros/pull/190). + +v2.8.3 +====== + +Release Summary +--------------- + +Maintenance release with updated documentation. + +From this version on, community.routeros is using the new `Ansible semantic markup +<https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#semantic-markup-within-module-documentation>`__ +in its documentation. If you look at documentation with the ansible-doc CLI tool +from ansible-core before 2.15, please note that it does not render the markup +correctly. You should be still able to read it in most cases, but you need +ansible-core 2.15 or later to see it as it is intended. Alternatively you can +look at `the devel docsite <https://docs.ansible.com/ansible/devel/collections/community/routeros/>`__ +for the rendered HTML version of the documentation of the latest release. + +Known Issues +------------ + +- Ansible markup will show up in raw form on ansible-doc text output for ansible-core before 2.15. If you have trouble deciphering the documentation markup, please upgrade to ansible-core 2.15 (or newer), or read the HTML documentation on https://docs.ansible.com/ansible/devel/collections/community/routeros/. v2.8.2 ====== @@ -154,7 +304,7 @@ Known Issues ------------ - api_modify - when limits for entries in ``queue tree`` are defined as human readable - for example ``25M`` -, the configuration will be correctly set in ROS, but the module will indicate the item is changed on every run even when there was no change done. This is caused by the ROS API which returns the number in bytes - for example ``25000000`` (which is inconsistent with the CLI behavior). In order to mitigate that, the limits have to be defined in bytes (those will still appear as human readable in the ROS CLI) (https://github.com/ansible-collections/community.routeros/pull/131). -- api_modify, api_info - ``routing ospf area``, ``routing ospf area range``, ``routing ospf instance``, ``routing ospf interface-template`` paths are not fully implemeted for ROS6 due to the significat changes between ROS6 and ROS7 (https://github.com/ansible-collections/community.routeros/pull/131). +- api_modify, api_info - ``routing ospf area``, ``routing ospf area range``, ``routing ospf instance``, ``routing ospf interface-template`` paths are not fully implemented for ROS6 due to the significant changes between ROS6 and ROS7 (https://github.com/ansible-collections/community.routeros/pull/131). v2.3.1 ====== @@ -353,7 +503,6 @@ Release Summary This is the first production (non-prerelease) release of ``community.routeros``. - Bugfixes -------- @@ -380,7 +529,6 @@ Release Summary The ``community.routeros`` continues the work on the Ansible RouterOS modules from their state in ``community.network`` 1.2.0. The changes listed here are thus relative to the modules ``community.network.routeros_*``. - Minor Changes ------------- diff --git a/ansible_collections/community/routeros/FILES.json b/ansible_collections/community/routeros/FILES.json index f0a44a030..65dc9b337 100644 --- a/ansible_collections/community/routeros/FILES.json +++ b/ansible_collections/community/routeros/FILES.json @@ -25,49 +25,49 @@ "name": ".github/workflows/ansible-test.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "21b4409514745adc855018f435409f1ec11567dc50c0c9656df0fe8ac8070b66", + "chksum_sha256": "7733552e950b67d67c9b00ef9bb1d15c38ee2d765d47ab2d7404cc5efa6fa0b7", "format": 1 }, { "name": ".github/workflows/docs-pr.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7447bfd97439ddb95181d05a354af0baaa6075b67897997d2f19e0f140394120", + "chksum_sha256": "ea4a8970f7f5e5bc2151c20eaae47953eeed04275c93c61793f9333862a64244", "format": 1 }, { "name": ".github/workflows/docs-push.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "90515807b7cc45d54a09d6392547c15f802774a4a4f9d3a2953f7f846ac0e12d", + "chksum_sha256": "02ab0cf44983ff3c4f0a852f0eaa01cc7c98e1422a9286592e6e1bcac5a61985", "format": 1 }, { "name": ".github/workflows/ee.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "cd5a0b5b9f6f084d5fdc49f64fd4fbdc279102cf317be836dcbee3265c8a9cfb", + "chksum_sha256": "99536bd592be0fadd2e2c9acce48152aa671b04ba69636097bffd65035c473d6", "format": 1 }, { "name": ".github/workflows/extra-tests.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "4124755ad295f3e9b6cf2968192fb8d8fd54f8faa0df601b80c0aec4d68b45f0", + "chksum_sha256": "355da6ac8dcdeef5fac5fbe943037c1d20d7067233e8d4ce5156a9239e7b58ea", "format": 1 }, { "name": ".github/workflows/import-galaxy.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "310dc7ba44c93f61f5f88b323259f6efb8925681bfbbb15a1a18d774af54dcd6", + "chksum_sha256": "739c36223d6e0e6ccc98907c43cba53296e7b1ccd64a2d995c2ff21df4ab25a5", "format": 1 }, { "name": ".github/workflows/reuse.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "05ee22080e7de7265b2839359ee290b4e81162e089d27d01d59d4af12d54761f", + "chksum_sha256": "18e9a8aa2ea33f801011c5e25d3fb30cff5143b05579d063ff58804ec4646b93", "format": 1 }, { @@ -151,7 +151,7 @@ "name": "changelogs/changelog.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6269eee40124bb0bb68d94fa7e8c8e42c24988985220832aa0c43e056c60af85", + "chksum_sha256": "b9c3d4e8049fa8e3b5e55c2997f4df70ac1942517cfbddb28d7caafef030ba12", "format": 1 }, { @@ -165,7 +165,7 @@ "name": "changelogs/config.yaml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "73b52630d73b33f7f7bf31cd751b732a60f8e3db798afe416d6c6ba67ca80044", + "chksum_sha256": "3cb54c894797529118cca5be83152602e8db6353062d795b6a9aaeecfc188870", "format": 1 }, { @@ -193,21 +193,21 @@ "name": "docs/docsite/rst/api-guide.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "03b35df33b16d917e7fb4d1b975ebfd72e1b050f8a1b25591856fc0d149758f3", + "chksum_sha256": "1076e9e460a1d0f958eaedad9c973d3db25da5f537db9057823cc8d34963eab6", "format": 1 }, { "name": "docs/docsite/rst/quoting.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "635d3a7c79d2a2aa2d49861ea06979b30261a994875aec510fded7e08c0d394f", + "chksum_sha256": "6927f7326a1729c47245673abcd581f93f8ddb3ec203772b0d79499b944217a6", "format": 1 }, { "name": "docs/docsite/rst/ssh-guide.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "42fe9bd067713f5a3ffa9f12d38f773c554524bcb36723763382e997baff5d50", + "chksum_sha256": "e90301653103e84a71bb5896ad6467ea65b29a6b832a072d87daaf1e2724bc9f", "format": 1 }, { @@ -284,7 +284,7 @@ "name": "plugins/doc_fragments/api.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6e1855a22deb8f5a21cadb3594afd67b93e9d0a1500f652d5f558b622948d2b6", + "chksum_sha256": "2867e29eadd3e864ee31be16842c70dd32be5c2495e12652769e85078a8294db", "format": 1 }, { @@ -312,7 +312,7 @@ "name": "plugins/filter/list_to_dict.yml", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "21837e13bd533aeba2e1843375636b607db7f619d856fd3d2c3e1a69cc953a41", + "chksum_sha256": "3469f86f4e183d5ff688c29e6fb79397711a92033e03268b2ea6f7f6bf16809c", "format": 1 }, { @@ -354,7 +354,7 @@ "name": "plugins/module_utils/_api_data.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "07633c6f88a503e55a4560be261bbb7867cc8483b5ec2dcfa9984b5cc32410a5", + "chksum_sha256": "b5880a7e63053e5f40b3824e0e8311dc2f61d93bcadc0d639d65dcc3ba88a723", "format": 1 }, { @@ -368,7 +368,7 @@ "name": "plugins/module_utils/api.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "f3795f24d8089bd6dc90de58ba96126c3468e9ead8f4813b14f48af48e9c2f63", + "chksum_sha256": "611c9cb0bde858082a1e57e756a49e6d8578a5b999287dcb9dad0dd1aabcf99c", "format": 1 }, { @@ -403,49 +403,49 @@ "name": "plugins/modules/api.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "751d2740488997e5c6a41d0c4255059b0dfa5755f8e8d4cafb5a7edc5071bc23", + "chksum_sha256": "4381013d865a6e84df15ac633653ac73ef411221a8d53447e3781fff3dc5f538", "format": 1 }, { "name": "plugins/modules/api_facts.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "2b19e626afe7b30a27896a18d65c1ffdb4ae9446c90b52d01874543d84705590", + "chksum_sha256": "7d0555189b8765d25f8bcc841351647fa1ae839e389847b4c9c8397c118dacd2", "format": 1 }, { "name": "plugins/modules/api_find_and_modify.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0488928f752e283ae5fa10efe58c56b887840e29f43fa1fbdf65a99b6a6fc4d1", + "chksum_sha256": "7ed61fa2c714ee8f7cab1e2747c0d0ea5f19867568b41eb20ab6cdcfa572a68c", "format": 1 }, { "name": "plugins/modules/api_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "9c3c6d4248fee5ec8866cf18848613143b6c12f0972f8daca1886b7279d737ae", + "chksum_sha256": "ed9d94602cc1c6c87fa65e829342c83724376cc8b0d47072e74a6119e10e0505", "format": 1 }, { "name": "plugins/modules/api_modify.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "6ff23dd65b926b1ad9d7de9d8d4fb1bf699a6ad0b49b48751fa95fa40b833712", + "chksum_sha256": "81752a1a70ce47134663c2d721673481a8aea6995469092ae24b13303772820c", "format": 1 }, { "name": "plugins/modules/command.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "de6485210c86278b0f8b388f85b71ec26e85d914fa8b11c8c76a0ea8342977fb", + "chksum_sha256": "e81c807ca34d262e90b36c9ca75ac54dc91510e8ca2f4778c14636c48e8b8b52", "format": 1 }, { "name": "plugins/modules/facts.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "016fffb2831186450dc45cbf680f490963ae9ce26b8a41c4366821eb5146469c", + "chksum_sha256": "5364263e3f30a3c2d0d0c357a5dbc218f60c9e52a8ec6e3f5e50d12ff4e2779c", "format": 1 }, { @@ -620,7 +620,7 @@ "name": "tests/sanity/extra/extra-docs.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "0fbd87476e9c35e4c5feb31be4aa1e8fc6aebf0de13058e5a267879f741ec0bf", + "chksum_sha256": "c52e316daf1292bbb063be19429fd1f06e02bce3c9d4622a8dfc61fa3af06688", "format": 1 }, { @@ -697,7 +697,7 @@ "name": "tests/sanity/ignore-2.10.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b8ef3a5984c970b2097edc50d6e287f010479ee9d1262c24e5f494339abd60ac", + "chksum_sha256": "2a9574f845c6a6ae014798df7136d9f6b2642e5ddec39040c137630a18f8ca4f", "format": 1 }, { @@ -792,10 +792,24 @@ "format": 1 }, { + "name": "tests/sanity/ignore-2.17.txt", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "1af4ae071777877caae7e48c7a1a1c905d990e0d4d832b285970307cc5ad03df", + "format": 1 + }, + { + "name": "tests/sanity/ignore-2.17.txt.license", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", + "format": 1 + }, + { "name": "tests/sanity/ignore-2.9.txt", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "b8ef3a5984c970b2097edc50d6e287f010479ee9d1262c24e5f494339abd60ac", + "chksum_sha256": "2a9574f845c6a6ae014798df7136d9f6b2642e5ddec39040c137630a18f8ca4f", "format": 1 }, { @@ -865,7 +879,7 @@ "name": "tests/unit/plugins/module_utils/test__api_data.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "ab4f09d9aef04cc60d95ae745e6a549d8c2c1d1b43f4b26a11bb986b06aa169d", + "chksum_sha256": "6defff5702c881c28d562db99143acbc1592ca42f038b798fe732c3891be68db", "format": 1 }, { @@ -1152,7 +1166,7 @@ "name": "tests/unit/plugins/modules/fake_api.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "e1a0e7c26d139c804edad990a43d5c241f9b8832ac6edd7e9043123b57b6d231", + "chksum_sha256": "7bc8b4472f73f9e74a3fb0ff3008ccb0a66088bd71f289bd7cf8356848811e8e", "format": 1 }, { @@ -1180,21 +1194,21 @@ "name": "tests/unit/plugins/modules/test_api_find_and_modify.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "a56e613e9fd26ec90ec72f25c15a7ea8ab7ab99dbccffc92c6251226443cffa1", + "chksum_sha256": "e88d7c0c1ee1df86cb85b4a1795803b5f8730e9e4f8f0f50adbd1ae69f06301f", "format": 1 }, { "name": "tests/unit/plugins/modules/test_api_info.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "5acc54f1fb618b84431bb94b626718f7faea823704e2e40b73ac0cc22ae0452c", + "chksum_sha256": "dcaff05ca93f71d6535636e168b2ba4d2ead37cbac7d2a2a2ddf26b009719210", "format": 1 }, { "name": "tests/unit/plugins/modules/test_api_modify.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "8903880a669f9d4a33cb9ba6247ac99d7b94fd7ab7e712d189dfc4ee2b1cda87", + "chksum_sha256": "6773f2b2ac256e33e4f352d0ab86d6bceaf91c9ca2f32e81f7678f4f87a215a8", "format": 1 }, { @@ -1240,10 +1254,24 @@ "format": 1 }, { + "name": "CHANGELOG.md", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "b99dd5a4c3af9a341ee8435a0bd595a093508da336b35963c9f4c21e40442a90", + "format": 1 + }, + { + "name": "CHANGELOG.md.license", + "ftype": "file", + "chksum_type": "sha256", + "chksum_sha256": "6eb915239f9f35407fa68fdc41ed6522f1fdcce11badbdcd6057548023179ac1", + "format": 1 + }, + { "name": "CHANGELOG.rst", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "7f88e8738859c0d903b42d2a5dcada13a7fd01fb3269ace2974666e0817e2e82", + "chksum_sha256": "6f13293d73ce0d0f4ac5a07b1b7e69d3efbfd36dca003148072b792bb5678ffe", "format": 1 }, { @@ -1264,7 +1292,7 @@ "name": "README.md", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "025ee8cc4b894b4a0b87c35b4cef0c747554d44b222c3a4b71344ce8150a49b7", + "chksum_sha256": "be40d1889fd07a702d1422a4da11a614fc9cce965f548eae37f50dfa8cf0ba46", "format": 1 }, { @@ -1278,7 +1306,7 @@ "name": "update-docs.py", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "bd643824d0b7a1ef65d4760c32f1a38ef37dc7c2b4ec55eec76245164950cbb5", + "chksum_sha256": "1624ce27ddbbae15ba0cfefb86d793139201beda0f39a0243701558ee05d6e92", "format": 1 } ], diff --git a/ansible_collections/community/routeros/MANIFEST.json b/ansible_collections/community/routeros/MANIFEST.json index c5afc614b..02c5b44f9 100644 --- a/ansible_collections/community/routeros/MANIFEST.json +++ b/ansible_collections/community/routeros/MANIFEST.json @@ -2,7 +2,7 @@ "collection_info": { "namespace": "community", "name": "routeros", - "version": "2.8.2", + "version": "2.14.0", "authors": [ "Egor Zaitsev (github.com/heuels)", "Nikolay Dachev (github.com/NikolayDachev)", @@ -31,7 +31,7 @@ "name": "FILES.json", "ftype": "file", "chksum_type": "sha256", - "chksum_sha256": "fa74768aa74fe395b07ca0059809ecea66739b21107d3a9e7ce2c81a45393211", + "chksum_sha256": "b61bc5f91d12dd9344c686a1ce2650fea27acfe4e6dceb5ac36d8fc236ecadc0", "format": 1 }, "format": 1 diff --git a/ansible_collections/community/routeros/README.md b/ansible_collections/community/routeros/README.md index 7378c34a0..df692d6d5 100644 --- a/ansible_collections/community/routeros/README.md +++ b/ansible_collections/community/routeros/README.md @@ -13,7 +13,7 @@ You can find [documentation for the modules and plugins in this collection here] ## Tested with Ansible -Tested with the current Ansible 2.9, ansible-base 2.10, ansible-core 2.11, ansible-core 2.12, ansible-core 2.13, and ansible-core 2.14 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported. +Tested with the current Ansible 2.9, ansible-base 2.10, ansible-core 2.11, ansible-core 2.12, ansible-core 2.13, ansible-core 2.14, ansible-core 2.15, and ansible-core 2.16 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported. ## External requirements @@ -163,7 +163,7 @@ See [Ansible's dev guide](https://docs.ansible.com/ansible/devel/dev_guide/devel ## Release notes -See the [changelog](https://github.com/ansible-collections/community.routeros/blob/main/CHANGELOG.rst). +See the [changelog](https://github.com/ansible-collections/community.routeros/blob/main/CHANGELOG.md). ## Roadmap diff --git a/ansible_collections/community/routeros/changelogs/changelog.yaml b/ansible_collections/community/routeros/changelogs/changelog.yaml index e09fa3e38..e23348b3a 100644 --- a/ansible_collections/community/routeros/changelogs/changelog.yaml +++ b/ansible_collections/community/routeros/changelogs/changelog.yaml @@ -189,6 +189,156 @@ releases: name: api_find_and_modify namespace: '' release_date: '2022-05-25' + 2.10.0: + changes: + bugfixes: + - api_info, api_modify - in the ``snmp`` path, ensure that ``engine-id-suffix`` + is only available on RouterOS 7.10+, and that ``engine-id`` is read-only on + RouterOS 7.10+ (https://github.com/ansible-collections/community.routeros/issues/208, + https://github.com/ansible-collections/community.routeros/pull/218). + minor_changes: + - api_info - add new ``include_read_only`` option to select behavior for read-only + values. By default these are not returned (https://github.com/ansible-collections/community.routeros/pull/213). + - api_info, api_modify - add support for ``address-list`` and ``match-subdomain`` + introduced by RouterOS 7.7 in the ``ip dns static`` path (https://github.com/ansible-collections/community.routeros/pull/197). + - api_info, api_modify - add support for ``user``, ``time`` and ``gmt-offset`` + under the ``system clock`` path (https://github.com/ansible-collections/community.routeros/pull/210). + - api_info, api_modify - add support for the ``interface ppp-client`` path (https://github.com/ansible-collections/community.routeros/pull/199). + - api_info, api_modify - add support for the ``interface wireless`` path (https://github.com/ansible-collections/community.routeros/pull/195). + - api_info, api_modify - add support for the ``iot modbus`` path (https://github.com/ansible-collections/community.routeros/pull/205). + - api_info, api_modify - add support for the ``ip dhcp-server option`` and ``ip + dhcp-server option sets`` paths (https://github.com/ansible-collections/community.routeros/pull/223). + - api_info, api_modify - add support for the ``ip upnp interfaces``, ``tool + graphing interface``, ``tool graphing resource`` paths (https://github.com/ansible-collections/community.routeros/pull/227). + - api_info, api_modify - add support for the ``ipv6 firewall nat`` path (https://github.com/ansible-collections/community.routeros/pull/204). + - api_info, api_modify - add support for the ``mode`` property in ``ip neighbor + discovery-settings`` introduced in RouterOS 7.7 (https://github.com/ansible-collections/community.routeros/pull/198). + - api_info, api_modify - add support for the ``port remote-access`` path (https://github.com/ansible-collections/community.routeros/pull/224). + - api_info, api_modify - add support for the ``routing filter rule`` and ``routing + filter select-rule`` paths (https://github.com/ansible-collections/community.routeros/pull/200). + - api_info, api_modify - add support for the ``routing table`` path in RouterOS + 7 (https://github.com/ansible-collections/community.routeros/pull/215). + - api_info, api_modify - add support for the ``tool netwatch`` path in RouterOS + 7 (https://github.com/ansible-collections/community.routeros/pull/216). + - api_info, api_modify - add support for the ``user settings`` path (https://github.com/ansible-collections/community.routeros/pull/201). + - api_info, api_modify - add support for the ``user`` path (https://github.com/ansible-collections/community.routeros/pull/211). + - api_info, api_modify - finalize fields for the ``interface wireless security-profiles`` + path and enable it (https://github.com/ansible-collections/community.routeros/pull/203). + - api_info, api_modify - finalize fields for the ``ppp profile`` path and enable + it (https://github.com/ansible-collections/community.routeros/pull/217). + - api_modify - add new ``handle_read_only`` and ``handle_write_only`` options + to handle the module's behavior for read-only and write-only fields (https://github.com/ansible-collections/community.routeros/pull/213). + - api_modify, api_info - support API paths ``routing id``, ``routing bgp connection`` + (https://github.com/ansible-collections/community.routeros/pull/220). + release_summary: Bugfix and feature release. + fragments: + - 195-add-interface-wireless-data.yml + - 197-dns-static-addrlist-matchsubdomain.yml + - 198-ip-nd-mode.yml + - 199-add-interface-pppclient.yml + - 2.10.0.yml + - 200-add-routing-filter.yml + - 201-add-user-settings.yml + - 203-wireless-security-profiles.yml + - 204-add-ipv6-firewall-nat.yml + - 205-add-iot-modbus.yml + - 210-date-time-gmt-offset.yml + - 211-user.yml + - 213-read-write-only.yml + - 215-add-routing-table.yml + - 216-add-tool-netwatch.yml + - 217-ppp-profiles.yml + - 218-snmp-engine-id.yml + - 220-routing-id-bgp-connection.yml + - 223-add-ip-dhcp-server-option.yml + - 224-add-port-remote-access.yml + - 227-add-upnp-graphing.yml + release_date: '2023-10-08' + 2.11.0: + changes: + minor_changes: + - api_info, api_modify - add missing DoH parameters ``doh-max-concurrent-queries``, + ``doh-max-server-connections``, and ``doh-timeout`` to the ``ip dns`` path + (https://github.com/ansible-collections/community.routeros/issues/230, https://github.com/ansible-collections/community.routeros/pull/235) + - api_info, api_modify - add missing parameters ``address-list``, ``address-list-timeout``, + ``randomise-ports``, and ``realm`` to subpaths of the ``ip firewall`` path + (https://github.com/ansible-collections/community.routeros/issues/236, https://github.com/ansible-collections/community.routeros/pull/237). + - api_info, api_modify - mark the ``interface wireless`` parameter ``running`` + as read-only (https://github.com/ansible-collections/community.routeros/pull/233). + - api_info, api_modify - set the default value to ``false`` for the ``disabled`` + parameter in some more paths where it can be seen in the documentation (https://github.com/ansible-collections/community.routeros/pull/237). + - api_modify - add missing ``comment`` attribute to ``/routing id`` (https://github.com/ansible-collections/community.routeros/pull/234). + - api_modify - add missing attributes to the ``routing bgp connection`` path + (https://github.com/ansible-collections/community.routeros/pull/234). + - api_modify - add versioning to the ``/tool e-mail`` path (RouterOS 7.12 release) + (https://github.com/ansible-collections/community.routeros/pull/234). + - api_modify - make ``/ip traffic-flow target`` a multiple value attribute (https://github.com/ansible-collections/community.routeros/pull/234). + release_summary: Feature and bugfix release. + fragments: + - 2.11.0.yml + - 233-wireless-running-read-only.yml + - 234-bugfixes-and-update-adaptations.yml + - 235-add-missing-dns-attributes.yml + - 237-add-missing-ip-firewall-attributes.yml + release_date: '2023-12-03' + 2.12.0: + changes: + minor_changes: + - api_info, api_modify - add ``interface ovpn-client`` path (https://github.com/ansible-collections/community.routeros/issues/242, + https://github.com/ansible-collections/community.routeros/pull/244). + - api_info, api_modify - add ``radius`` path (https://github.com/ansible-collections/community.routeros/issues/241, + https://github.com/ansible-collections/community.routeros/pull/245). + - api_info, api_modify - add ``routing rule`` path (https://github.com/ansible-collections/community.routeros/issues/162, + https://github.com/ansible-collections/community.routeros/pull/246). + - api_info, api_modify - add missing path ``routing bgp template`` (https://github.com/ansible-collections/community.routeros/pull/243). + - api_info, api_modify - add support for the ``tx-power`` attribute in ``interface + wireless`` (https://github.com/ansible-collections/community.routeros/pull/239). + - api_info, api_modify - removed ``host`` primary key in ``tool netwatch`` path + (https://github.com/ansible-collections/community.routeros/pull/248). + - api_modify, api_info - added support for ``interface wifiwave2`` (https://github.com/ansible-collections/community.routeros/pull/226). + release_summary: Feature release. + fragments: + - 2.12.0.yml + - 226-support-for-WifiWave2.yml + - 239-wireless-tx-power.yml + - 243-add-routing-bgp-template-path.yml + - 244-add-interface-ovpn-client-path.yml + - 245-add-radius-path.yml + - 246-add-routing-rule-path.yml + - 247-removed-primary-key-host-in-tool-netwatch.yml + release_date: '2024-01-21' + 2.13.0: + changes: + bugfixes: + - facts - fix date not getting removed for idempotent config export (https://github.com/ansible-collections/community.routeros/pull/262). + minor_changes: + - api_info, api_modify - make path ``user group`` modifiable and add ``comment`` + attribute (https://github.com/ansible-collections/community.routeros/issues/256, + https://github.com/ansible-collections/community.routeros/pull/257). + - api_modify, api_info - add support for the ``ip vrf`` path in RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/259) + release_summary: Bugfix and feature release. + fragments: + - 2.13.0.yml + - 257-make-user_group-modifiable.yml + - 259-add-routeros7-support-for-ip-vrf.yml + - 262-fix-date-removal.yml + release_date: '2024-02-25' + 2.14.0: + changes: + minor_changes: + - api_info, api_modify - add read-only fields ``installed-version``, ``latest-version`` + and ``status`` in ``system package update`` (https://github.com/ansible-collections/community.routeros/pull/263). + - api_info, api_modify - added support for ``interface wifi`` and its sub-paths + (https://github.com/ansible-collections/community.routeros/pull/266). + - api_info, api_modify - remove default value for read-only ``running`` field + in ``interface wireless`` (https://github.com/ansible-collections/community.routeros/pull/264). + release_summary: Feature release. + fragments: + - 2.14.0.yml + - 263-sys-pkg-update.yml + - 264-wireless-running-default.yml + - 266-interface-wifi.yml + release_date: '2024-03-25' 2.2.0: changes: bugfixes: @@ -276,8 +426,8 @@ releases: in bytes (those will still appear as human readable in the ROS CLI) (https://github.com/ansible-collections/community.routeros/pull/131). - api_modify, api_info - ``routing ospf area``, ``routing ospf area range``, ``routing ospf instance``, ``routing ospf interface-template`` paths are not - fully implemeted for ROS6 due to the significat changes between ROS6 and ROS7 - (https://github.com/ansible-collections/community.routeros/pull/131). + fully implemented for ROS6 due to the significant changes between ROS6 and + ROS7 (https://github.com/ansible-collections/community.routeros/pull/131). minor_changes: - api* modules - Add new option ``force_no_cert`` to connect with ADH ciphers (https://github.com/ansible-collections/community.routeros/pull/124). @@ -447,3 +597,56 @@ releases: - 180-fix-tls-in-tool-email.yml - 2.8.2.yml release_date: '2023-06-19' + 2.8.3: + changes: + known_issues: + - Ansible markup will show up in raw form on ansible-doc text output for ansible-core + before 2.15. If you have trouble deciphering the documentation markup, please + upgrade to ansible-core 2.15 (or newer), or read the HTML documentation on + https://docs.ansible.com/ansible/devel/collections/community/routeros/. + release_summary: 'Maintenance release with updated documentation. + + + From this version on, community.routeros is using the new `Ansible semantic + markup + + <https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#semantic-markup-within-module-documentation>`__ + + in its documentation. If you look at documentation with the ansible-doc CLI + tool + + from ansible-core before 2.15, please note that it does not render the markup + + correctly. You should be still able to read it in most cases, but you need + + ansible-core 2.15 or later to see it as it is intended. Alternatively you + can + + look at `the devel docsite <https://docs.ansible.com/ansible/devel/collections/community/routeros/>`__ + + for the rendered HTML version of the documentation of the latest release. + + ' + fragments: + - 2.8.3.yml + - semantic-markup.yml + release_date: '2023-06-27' + 2.9.0: + changes: + bugfixes: + - api_modify, api_info - add missing parameter ``engine-id-suffix`` for the + ``snmp`` path (https://github.com/ansible-collections/community.routeros/issues/189, + https://github.com/ansible-collections/community.routeros/pull/190). + minor_changes: + - api_info, api_modify - add path ``caps-man channel`` and enable path ``caps-man + manager interface`` (https://github.com/ansible-collections/community.routeros/issues/193, + https://github.com/ansible-collections/community.routeros/pull/194). + - api_info, api_modify - add path ``ip traffic-flow target`` (https://github.com/ansible-collections/community.routeros/issues/191, + https://github.com/ansible-collections/community.routeros/pull/192). + release_summary: Bugfix and feature release. + fragments: + - 180-fix-engine-id-suffix-in-snmp.yml + - 192-add-ip_traffic-flow_target-path.yml + - 194-add-caps-man_channel-and-caps-man_manager_interface.yml + - 2.9.0.yml + release_date: '2023-08-15' diff --git a/ansible_collections/community/routeros/changelogs/config.yaml b/ansible_collections/community/routeros/changelogs/config.yaml index 70a1f6701..86412bafc 100644 --- a/ansible_collections/community/routeros/changelogs/config.yaml +++ b/ansible_collections/community/routeros/changelogs/config.yaml @@ -12,6 +12,9 @@ mention_ancestor: true flatmap: true new_plugins_after_name: removed_features notesdir: fragments +output_formats: +- rst +- md prelude_section_name: release_summary prelude_section_title: Release Summary sections: diff --git a/ansible_collections/community/routeros/docs/docsite/rst/api-guide.rst b/ansible_collections/community/routeros/docs/docsite/rst/api-guide.rst index f3bb6295b..6140d819d 100644 --- a/ansible_collections/community/routeros/docs/docsite/rst/api-guide.rst +++ b/ansible_collections/community/routeros/docs/docsite/rst/api-guide.rst @@ -8,7 +8,7 @@ How to connect to RouterOS devices with the RouterOS API ======================================================== -You can use the :ref:`community.routeros.api module <ansible_collections.community.routeros.api_module>` to connect to a RouterOS device with the RouterOS API. More specific module to modify certain entries are the :ref:`community.routeros.api_modify <ansible_collections.community.routeros.api_modify_module>` and :ref:`community.routeros.api_find_and_modify <ansible_collections.community.routeros.api_find_and_modify_module>` modules. The :ref:`community.routeros.api_info module <ansible_collections.community.routeros.api_info_module>` allows to retrieve information on specific predefined paths that can be used as input for the ``community.routeros.api_modify`` module, and the :ref:`community.routeros.api_facts module <ansible_collections.community.routeros.api_facts_module>` allows to retrieve Ansible facts using the RouterOS API. +You can use the :ansplugin:`community.routeros.api module <community.routeros.api#module>` to connect to a RouterOS device with the RouterOS API. More specific module to modify certain entries are the :ansplugin:`community.routeros.api_modify <community.routeros.api_modify#module>` and :ansplugin:`community.routeros.api_find_and_modify <community.routeros.api_find_and_modify#module>` modules. The :ansplugin:`community.routeros.api_info module <community.routeros.api_info#module>` allows to retrieve information on specific predefined paths that can be used as input for the :ansplugin:`community.routeros.api_modify <community.routeros.api_modify#module>` module, and the :ansplugin:`community.routeros.api_facts module <community.routeros.api_facts#module>` allows to retrieve Ansible facts using the RouterOS API. No special setup is needed; the module needs to be run on a host that can connect to the device's API. The most common case is that the module is run on ``localhost``, either by using ``hosts: localhost`` in the playbook, or by using ``delegate_to: localhost`` for the task. The following example shows how to run the equivalent of ``/ip address print``: @@ -59,12 +59,12 @@ This results in the following output: PLAY RECAP ******************************************************************************************************* localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 -Check out the documenation of the :ref:`community.routeros.api module <ansible_collections.community.routeros.api_module>` for details on the options. +Check out the documentation of the :ansplugin:`community.routeros.api module <community.routeros.api#module>` for details on the options. Using the ``community.routeros.api`` module defaults group ---------------------------------------------------------- -To avoid having to specify common parameters for all the API based modules in every task, you can use the ``community.routeros.api`` module defaults group: +To avoid having to specify common parameters for all the API based modules in every task, you can use the ``community.routeros.api`` :ref:`module defaults group <module_defaults_groups>`: .. code-block:: yaml+jinja @@ -73,7 +73,7 @@ To avoid having to specify common parameters for all the API based modules in ev hosts: localhost gather_facts: false module_defaults: - group/community.routeros.api + group/community.routeros.api: hostname: 192.168.1.1 password: admin username: test1234 @@ -85,7 +85,7 @@ To avoid having to specify common parameters for all the API based modules in ev # If you are using your own PKI, specify the path to your CA certificate here: # ca_path: /path/to/ca-certificate.pem tasks: - - name: Gather facts" + - name: Gather facts community.routeros.api_facts: - name: Get "ip address print" @@ -105,12 +105,12 @@ Here all three tasks will use the options set for the module defaults group. Setting up encryption --------------------- -It is recommended to always use ``tls: true`` when connecting with the API, even if you are only connecting to the device through a trusted network. The following options control how TLS/SSL is used: +It is recommended to always use :ansopt:`tls=true` when connecting with the API, even if you are only connecting to the device through a trusted network. The following options control how TLS/SSL is used: -:force_no_cert: Setting to ``true`` connects to the device without a certificate. **This is discouraged to use in production and is susceptible to Man-in-the-Middle attacks**, but might be useful when setting the device up. The default value is ``false``. -:validate_certs: Setting to ``false`` disables any certificate validation. **This is discouraged to use in production**, but is needed when setting the device up. The default value is ``true``. -:validate_cert_hostname: Setting to ``false`` (default) disables hostname verification during certificate validation. This is needed if the hostnames specified in the certificate do not match the hostname used for connecting (usually the device's IP). It is recommended to set up the certificate correctly and set this to ``true``; the default ``false`` is chosen for backwards compatibility to an older version of the module. -:ca_path: If you are not using a commerically trusted CA certificate to sign your device's certificate, or have not included your CA certificate in Python's truststore, you need to point this option to the CA certificate. +:force_no_cert: Setting to :ansval:`true` connects to the device without a certificate. **This is discouraged to use in production and is susceptible to Man-in-the-Middle attacks**, but might be useful when setting the device up. The default value is :ansval:`false`. +:validate_certs: Setting to :ansval:`false` disables any certificate validation. **This is discouraged to use in production**, but is needed when setting the device up. The default value is :ansval:`true`. +:validate_cert_hostname: Setting to :ansval:`false` (default) disables hostname verification during certificate validation. This is needed if the hostnames specified in the certificate do not match the hostname used for connecting (usually the device's IP). It is recommended to set up the certificate correctly and set this to :ansval:`true`; the default :ansval:`false` is chosen for backwards compatibility to an older version of the module. +:ca_path: If you are not using a commercially trusted CA certificate to sign your device's certificate, or have not included your CA certificate in Python's truststore, you need to point this option to the CA certificate. We recommend to create a CA certificate that is used to sign the certificates for your RouterOS devices, and have the certificates include the correct hostname(s), including the IP of the device. That way, you can fully enable TLS and be sure that you always talk to the correct device. @@ -124,7 +124,7 @@ Installing a certificate on a MikroTik router Installing the certificate is best done with the SSH connection. (See the :ref:`ansible_collections.community.routeros.docsite.ssh-guide` guide for more information.) Once the certificate has been installed, and the HTTPS API enabled, it's easier to work with the API, since it has a quite a few less problems, and returns data as JSON objects instead of text you first have to parse. -First you have to convert the certificate and its private key to a `PKCS #12 bundle <https://en.wikipedia.org/wiki/PKCS_12>`_. This can be done with the :ref:`community.crypto.openssl_pkcs12 <ansible_collections.community.crypto.openssl_pkcs12_module>`. The following playbook assumes that the certificate is available as ``keys/{{ inventory_hostname }}.pem``, and its private key is available as ``keys/{{ inventory_hostname }}.key``. It generates a random passphrase to protect the PKCS#12 file. +First you have to convert the certificate and its private key to a `PKCS #12 bundle <https://en.wikipedia.org/wiki/PKCS_12>`_. This can be done with the :ansplugin:`community.crypto.openssl_pkcs12 <community.crypto.openssl_pkcs12#module>`. The following playbook assumes that the certificate is available as ``keys/{{ inventory_hostname }}.pem``, and its private key is available as ``keys/{{ inventory_hostname }}.key``. It generates a random passphrase to protect the PKCS#12 file. .. code-block:: yaml+jinja @@ -186,7 +186,7 @@ First you have to convert the certificate and its private key to a `PKCS #12 bun The playbook also assumes that ``admin_network`` describes the network from which the HTTPS and API interface can be accessed. This can be for example ``192.168.1.0/24``. -When this playbook completed successfully, you should be able to use the HTTPS admin interface (reachable in a browser from ``https://192.168.1.1/``, with the correct IP inserted), as well as the :ref:`community.routeros.api module <ansible_collections.community.routeros.api_module>` module with TLS and certificate validation enabled: +When this playbook completed successfully, you should be able to use the HTTPS admin interface (reachable in a browser from ``https://192.168.1.1/``, with the correct IP inserted), as well as the :ansplugin:`community.routeros.api module <community.routeros.api#module>` module with TLS and certificate validation enabled: .. code-block:: yaml+jinja diff --git a/ansible_collections/community/routeros/docs/docsite/rst/quoting.rst b/ansible_collections/community/routeros/docs/docsite/rst/quoting.rst index 3091fc857..b1c045382 100644 --- a/ansible_collections/community/routeros/docs/docsite/rst/quoting.rst +++ b/ansible_collections/community/routeros/docs/docsite/rst/quoting.rst @@ -8,12 +8,12 @@ How to quote and unquote commands and arguments =============================================== -When using the :ref:`community.routeros.command module <ansible_collections.community.routeros.command_module>` or the :ref:`community.routeros.api module <ansible_collections.community.routeros.api_module>` modules, you need to pass text data in quoted form. While in some cases quoting is not needed (when passing IP addresses or names without spaces, for example), in other cases it is required, like when passing a comment which contains a space. +When using the :ansplugin:`community.routeros.command module <community.routeros.command#module>` or the :ansplugin:`community.routeros.api module <community.routeros.api#module>` modules, you need to pass text data in quoted form. While in some cases quoting is not needed (when passing IP addresses or names without spaces, for example), in other cases it is required, like when passing a comment which contains a space. The community.routeros collection provides a set of Jinja2 filter plugins which helps you with these tasks: -- The :ref:`community.routeros.quote_argument_value filter <ansible_collections.community.routeros.quote_argument_value_filter>` quotes an argument value: ``'this is a "comment"' | community.routeros.quote_argument_value == '"this is a \\"comment\\""'``. -- The :ref:`community.routeros.quote_argument filter <ansible_collections.community.routeros.quote_argument_filter>` quotes an argument with or without a value: ``'comment=this is a "comment"' | community.routeros.quote_argument == 'comment="this is a \\"comment\\""'``. -- The :ref:`community.routeros.join filter <ansible_collections.community.routeros.join_filter>` quotes a list of arguments and joins them to one string: ``['foo=bar', 'comment=foo is bar'] | community.routeros.join == 'foo=bar comment="foo is bar"'``. -- The :ref:`community.routeros.split filter <ansible_collections.community.routeros.split_filter>` splits a command into a list of arguments (with or without values): ``'foo=bar comment="foo is bar"' | community.routeros.split == ['foo=bar', 'comment=foo is bar']`` -- The :ref:`community.routeros.list_to_dict filter <ansible_collections.community.routeros.list_to_dict_filter>` splits a list of arguments with values into a dictionary: ``['foo=bar', 'comment=foo is bar'] | community.routeros.list_to_dict == {'foo': 'bar', 'comment': 'foo is bar'}``. It has two optional arguments: ``require_assignment`` (default value ``true``) allows to accept arguments without values when set to ``false``; and ``skip_empty_values`` (default value ``false``) allows to skip arguments whose value is empty. +- The :ansplugin:`community.routeros.quote_argument_value filter <community.routeros.quote_argument_value#filter>` quotes an argument value: ``'this is a "comment"' | community.routeros.quote_argument_value == '"this is a \\"comment\\""'``. +- The :ansplugin:`community.routeros.quote_argument filter <community.routeros.quote_argument#filter>` quotes an argument with or without a value: ``'comment=this is a "comment"' | community.routeros.quote_argument == 'comment="this is a \\"comment\\""'``. +- The :ansplugin:`community.routeros.join filter <community.routeros.join#filter>` quotes a list of arguments and joins them to one string: ``['foo=bar', 'comment=foo is bar'] | community.routeros.join == 'foo=bar comment="foo is bar"'``. +- The :ansplugin:`community.routeros.split filter <community.routeros.split#filter>` splits a command into a list of arguments (with or without values): ``'foo=bar comment="foo is bar"' | community.routeros.split == ['foo=bar', 'comment=foo is bar']`` +- The :ansplugin:`community.routeros.list_to_dict filter <community.routeros.list_to_dict#filter>` splits a list of arguments with values into a dictionary: ``['foo=bar', 'comment=foo is bar'] | community.routeros.list_to_dict == {'foo': 'bar', 'comment': 'foo is bar'}``. It has two optional arguments: :ansopt:`community.routeros.list_to_dict#filter:require_assignment` (default value :ansval:`true`) allows to accept arguments without values when set to :ansval:`false`; and :ansopt:`community.routeros.list_to_dict#filter:skip_empty_values` (default value :ansval:`false`) allows to skip arguments whose value is empty. diff --git a/ansible_collections/community/routeros/docs/docsite/rst/ssh-guide.rst b/ansible_collections/community/routeros/docs/docsite/rst/ssh-guide.rst index bdbdbfe84..4b0eb2017 100644 --- a/ansible_collections/community/routeros/docs/docsite/rst/ssh-guide.rst +++ b/ansible_collections/community/routeros/docs/docsite/rst/ssh-guide.rst @@ -10,17 +10,17 @@ How to connect to RouterOS devices with SSH The collection offers two modules to connect to RouterOS devies with SSH: -- The :ref:`community.routeros.facts module <ansible_collections.community.routeros.facts_module>` gathers facts about a RouterOS device; -- The :ref:`community.routeros.command module <ansible_collections.community.routeros.command_module>` executes commands on a RouterOS device. +- The :ansplugin:`community.routeros.facts module <community.routeros.facts#module>` gathers facts about a RouterOS device; +- The :ansplugin:`community.routeros.command module <community.routeros.command#module>` executes commands on a RouterOS device. -The modules need the :ref:`ansible.netcommon.network_cli connection plugin <ansible_collections.ansible.netcommon.network_cli_connection>` for this. +The modules need the :ansplugin:`ansible.netcommon.network_cli connection plugin <ansible.netcommon.network_cli#connection>` for this. Important notes --------------- 1. The SSH-based modules do not support arbitrary symbols in the router's identity. If you are having trouble connecting to your device, please make sure that your MikroTik's identity contains only alphanumeric characters and dashes. Also make sure that the identity string is not longer than 19 characters (`see issue for details <https://github.com/ansible-collections/community.routeros/issues/31>`__). Similar problems can happen for unsupported characters in your username. -2. The :ref:`community.routeros.command module <ansible_collections.community.routeros.command_module>` does not support nesting commands and expects every command to start with a forward slash (``/``). Running the following command will produce an error: +2. The :ansplugin:`community.routeros.command module <community.routeros.command#module>` does not support nesting commands and expects every command to start with a forward slash (``/``). Running the following command will produce an error: .. code-block:: yaml+jinja @@ -29,9 +29,11 @@ Important notes - /ip - print -3. When using the :ref:`community.routeros.command module <ansible_collections.community.routeros.command_module>` module, make sure to not specify too long commands. Alternatively, add something like ``+cet512w`` to the username (replace ``admin`` with ``admin+cet512w``) to tell RouterOS to not wrap before 512 characters in a line (`see issue for details <https://github.com/ansible-collections/community.routeros/issues/6>`__). +3. When using the :ansplugin:`community.routeros.command module <community.routeros.command#module>` module, make sure to not specify too long commands. Alternatively, add something like ``+cet512w`` to the username (replace ``admin`` with ``admin+cet512w``) to tell RouterOS to not wrap before 512 characters in a line (`see issue for details <https://github.com/ansible-collections/community.routeros/issues/6>`__). -4. Finally, the :ref:`ansible.netcommon.network_cli connection plugin <ansible_collections.ansible.netcommon.network_cli_connection>` uses `paramiko <https://pypi.org/project/paramiko/>`_ by default to connect to devices with SSH. You can set its ``ssh_type`` option to ``libssh`` to use `ansible-pylibssh <https://pypi.org/project/ansible-pylibssh/>`_ instead, which offers Python bindings to libssh. See its documentation for details. +4. The :ansplugin:`ansible.netcommon.network_cli connection plugin <ansible.netcommon.network_cli#connection>` uses `paramiko <https://pypi.org/project/paramiko/>`_ by default to connect to devices with SSH. You can set its :ansopt:`ansible.netcommon.network_cli#connection:ssh_type` option to :ansval:`libssh` to use `ansible-pylibssh <https://pypi.org/project/ansible-pylibssh/>`_ instead, which offers Python bindings to libssh. See its documentation for details. + +5. User is **not allowed** to login via SSH by password to modern Mikrotik if SSH key for the user is added! Setting up an inventory ----------------------- @@ -49,7 +51,7 @@ An example inventory ``hosts`` file for a RouterOS device is as follows: ansible_user=admin ansible_ssh_pass=test1234 -This tells Ansible that you have a RouterOS device called ``router`` with IP ``192.168.2.1``. Ansible should use the :ref:`ansible.netcommon.network_cli connection plugin <ansible_collections.ansible.netcommon.network_cli_connection>` together with the the :ref:`community.routeros.routeros cliconf plugin <ansible_collections.community.routeros.routeros_cliconf>`. The credentials are stored as ``ansible_user`` and ``ansible_ssh_pass`` in the inventory. +This tells Ansible that you have a RouterOS device called ``router`` with IP ``192.168.2.1``. Ansible should use the :ansplugin:`ansible.netcommon.network_cli connection plugin <ansible.netcommon.network_cli#connection>` together with the the :ansplugin:`community.routeros.routeros cliconf plugin <community.routeros.routeros#cliconf>`. The credentials are stored as ``ansible_user`` and ``ansible_ssh_pass`` in the inventory. Connecting to the device ------------------------ diff --git a/ansible_collections/community/routeros/plugins/doc_fragments/api.py b/ansible_collections/community/routeros/plugins/doc_fragments/api.py index dea374b95..7f77e8fe4 100644 --- a/ansible_collections/community/routeros/plugins/doc_fragments/api.py +++ b/ansible_collections/community/routeros/plugins/doc_fragments/api.py @@ -43,48 +43,48 @@ options: - ssl port: description: - - RouterOS api port. If I(tls) is set, port will apply to TLS/SSL connection. - - Defaults are C(8728) for the HTTP API, and C(8729) for the HTTPS API. + - RouterOS api port. If O(tls) is set, port will apply to TLS/SSL connection. + - Defaults are V(8728) for the HTTP API, and V(8729) for the HTTPS API. type: int force_no_cert: description: - - Set to C(true) to connect without a certificate when I(tls=true). - - See also I(validate_certs). + - Set to V(true) to connect without a certificate when O(tls=true). + - See also O(validate_certs). - B(Note:) this forces the use of anonymous Diffie-Hellman (ADH) ciphers. The protocol is susceptible to Man-in-the-Middle attacks, because the keys used in the exchange are not authenticated. Instead of simply connecting without a certificate to "make things work" have a look at - I(validate_certs) and I(ca_path). + O(validate_certs) and O(ca_path). type: bool default: false version_added: 2.4.0 validate_certs: description: - - Set to C(false) to skip validation of TLS certificates. - - See also I(validate_cert_hostname). Only used when I(tls=true). + - Set to V(false) to skip validation of TLS certificates. + - See also O(validate_cert_hostname). Only used when O(tls=true). - B(Note:) instead of simply deactivating certificate validations to "make things work", please consider creating your own CA certificate and using it to sign certificates used - for your router. You can tell the module about your CA certificate with the I(ca_path) + for your router. You can tell the module about your CA certificate with the O(ca_path) option. type: bool default: true version_added: 1.2.0 validate_cert_hostname: description: - - Set to C(true) to validate hostnames in certificates. - - See also I(validate_certs). Only used when I(tls=true) and I(validate_certs=true). + - Set to V(true) to validate hostnames in certificates. + - See also O(validate_certs). Only used when O(tls=true) and O(validate_certs=true). type: bool default: false version_added: 1.2.0 ca_path: description: - PEM formatted file that contains a CA certificate to be used for certificate validation. - - See also I(validate_cert_hostname). Only used when I(tls=true) and I(validate_certs=true). + - See also O(validate_cert_hostname). Only used when O(tls=true) and O(validate_certs=true). type: path version_added: 1.2.0 encoding: description: - Use the specified encoding when communicating with the RouterOS device. - - Default is C(ASCII). Note that C(UTF-8) requires librouteros 3.2.1 or newer. + - Default is V(ASCII). Note that V(UTF-8) requires librouteros 3.2.1 or newer. type: str default: ASCII version_added: 2.1.0 diff --git a/ansible_collections/community/routeros/plugins/filter/list_to_dict.yml b/ansible_collections/community/routeros/plugins/filter/list_to_dict.yml index 920414ced..6e7992d3d 100644 --- a/ansible_collections/community/routeros/plugins/filter/list_to_dict.yml +++ b/ansible_collections/community/routeros/plugins/filter/list_to_dict.yml @@ -12,18 +12,18 @@ DOCUMENTATION: options: _input: description: - - A list of assignments. Can be the result of the C(community.routeros.split) filter. + - A list of assignments. Can be the result of the P(community.routeros.split#filter) filter. type: list elements: string required: true require_assignment: description: - - Allows to accept arguments without values when set to C(false). + - Allows to accept arguments without values when set to V(false). type: boolean default: true skip_empty_values: description: - - Allows to skip arguments whose value is empty when set to C(true). + - Allows to skip arguments whose value is empty when set to V(true). type: boolean default: false author: diff --git a/ansible_collections/community/routeros/plugins/module_utils/_api_data.py b/ansible_collections/community/routeros/plugins/module_utils/_api_data.py index 59e5b5c52..a421cffee 100644 --- a/ansible_collections/community/routeros/plugins/module_utils/_api_data.py +++ b/ansible_collections/community/routeros/plugins/module_utils/_api_data.py @@ -9,9 +9,81 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type +from ansible_collections.community.routeros.plugins.module_utils.version import LooseVersion + + +def _compare(a, b, comparator): + if comparator == '==': + return a == b + if comparator == '!=': + return a != b + if comparator == '<': + return a < b + if comparator == '<=': + return a <= b + if comparator == '>': + return a > b + if comparator == '>=': + return a >= b + raise ValueError('Unknown comparator "{comparator}"'.format(comparator=comparator)) + class APIData(object): - def __init__(self, primary_keys=None, + def __init__(self, + unversioned=None, + versioned=None): + if (unversioned is None) == (versioned is None): + raise ValueError('either unversioned or versioned must be provided') + self.unversioned = unversioned + self.versioned = versioned + if self.unversioned is not None: + self.needs_version = self.unversioned.needs_version + self.fully_understood = self.unversioned.fully_understood + else: + self.needs_version = self.versioned is not None + # Mark as 'fully understood' if it is for at least one version + self.fully_understood = False + for dummy, dummy, unversioned in self.versioned: + if unversioned and not isinstance(unversioned, str) and unversioned.fully_understood: + self.fully_understood = True + break + self._current = None if self.needs_version else self.unversioned + + def _select(self, data, api_version): + if data is None: + self._current = None + return False, None + if isinstance(data, str): + self._current = None + return False, data + self._current = data.specialize_for_version(api_version) + return self._current.fully_understood, None + + def provide_version(self, version): + if not self.needs_version: + return self.unversioned.fully_understood, None + api_version = LooseVersion(version) + if self.unversioned is not None: + self._current = self.unversioned.specialize_for_version(api_version) + return self._current.fully_understood, None + for other_version, comparator, data in self.versioned: + if other_version == '*' and comparator == '*': + return self._select(data, api_version) + other_api_version = LooseVersion(other_version) + if _compare(api_version, other_api_version, comparator): + return self._select(data, api_version) + self._current = None + return False, None + + def get_data(self): + if self._current is None: + raise ValueError('either provide_version() was not called or it returned False') + return self._current + + +class VersionedAPIData(object): + def __init__(self, + primary_keys=None, stratify_keys=None, required_one_of=None, mutually_exclusive=None, @@ -20,7 +92,8 @@ class APIData(object): unknown_mechanism=False, fully_understood=False, fixed_entries=False, - fields=None): + fields=None, + versioned_fields=None): if sum([primary_keys is not None, stratify_keys is not None, has_identifier, single_value, unknown_mechanism]) > 1: raise ValueError('primary_keys, stratify_keys, has_identifier, single_value, and unknown_mechanism are mutually exclusive') if unknown_mechanism and fully_understood: @@ -39,6 +112,17 @@ class APIData(object): if fields is None: raise ValueError('fields must be provided') self.fields = fields + if versioned_fields is not None: + if not isinstance(versioned_fields, list): + raise ValueError('unversioned_fields must be a list') + for conditions, name, field in versioned_fields: + if not isinstance(conditions, (tuple, list)): + raise ValueError('conditions must be a list or tuple') + if not isinstance(field, KeyInfo): + raise ValueError('field must be a KeyInfo object') + if name in fields: + raise ValueError('"{name}" appears both in fields and versioned_fields'.format(name=name)) + self.versioned_fields = versioned_fields or [] if primary_keys: for pk in primary_keys: if pk not in fields: @@ -61,26 +145,70 @@ class APIData(object): for ek in exclusive_list: if ek not in fields: raise ValueError('Mutually exclusive key {ek} must be in fields!'.format(ek=ek)) + self.needs_version = len(self.versioned_fields) > 0 + + def specialize_for_version(self, api_version): + fields = self.fields.copy() + for conditions, name, field in self.versioned_fields: + matching = True + for other_version, comparator in conditions: + other_api_version = LooseVersion(other_version) + if not _compare(api_version, other_api_version, comparator): + matching = False + break + if matching: + if name in fields: + raise ValueError( + 'Internal error: field "{field}" already exists for {version}'.format(field=name, version=api_version) + ) + fields[name] = field + return VersionedAPIData( + primary_keys=self.primary_keys, + stratify_keys=self.stratify_keys, + required_one_of=self.required_one_of, + mutually_exclusive=self.mutually_exclusive, + has_identifier=self.has_identifier, + single_value=self.single_value, + unknown_mechanism=self.unknown_mechanism, + fully_understood=self.fully_understood, + fixed_entries=self.fixed_entries, + fields=fields, + ) class KeyInfo(object): - def __init__(self, _dummy=None, can_disable=False, remove_value=None, absent_value=None, default=None, required=False, automatically_computed_from=None): + def __init__(self, + _dummy=None, + can_disable=False, + remove_value=None, + absent_value=None, + default=None, + required=False, + automatically_computed_from=None, + read_only=False, + write_only=False): if _dummy is not None: raise ValueError('KeyInfo() does not have positional arguments') if sum([required, default is not None or can_disable, automatically_computed_from is not None]) > 1: raise ValueError( - 'required, default, automatically_computed_from, and can_disable are mutually exclusive ' + + 'required, default, automatically_computed_from, and can_disable are mutually exclusive ' 'besides default and can_disable which can be set together') if not can_disable and remove_value is not None: raise ValueError('remove_value can only be specified if can_disable=True') if absent_value is not None and any([default is not None, automatically_computed_from is not None, can_disable]): raise ValueError('absent_value can not be combined with default, automatically_computed_from, can_disable=True, or absent_value') + if read_only and write_only: + raise ValueError('read_only and write_only cannot be used at the same time') + if read_only and any([can_disable, remove_value is not None, absent_value is not None, default is not None, required]): + raise ValueError('read_only can not be combined with can_disable, remove_value, absent_value, default, or required') self.can_disable = can_disable self.remove_value = remove_value self.automatically_computed_from = automatically_computed_from self.default = default self.required = required self.absent_value = absent_value + self.read_only = read_only + self.write_only = write_only def split_path(path): @@ -99,2762 +227,4452 @@ def join_path(path): PATHS = { ('interface', 'bonding'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'arp': KeyInfo(default='enabled'), - 'arp-interval': KeyInfo(default='100ms'), - 'arp-ip-targets': KeyInfo(default=''), - 'arp-timeout': KeyInfo(default='auto'), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'down-delay': KeyInfo(default='0ms'), - 'forced-mac-address': KeyInfo(can_disable=True), - 'lacp-rate': KeyInfo(default='30secs'), - 'lacp-user-key': KeyInfo(can_disable=True, remove_value=0), - 'link-monitoring': KeyInfo(default='mii'), - 'mii-interval': KeyInfo(default='100ms'), - 'min-links': KeyInfo(default=0), - 'mlag-id': KeyInfo(can_disable=True, remove_value=0), - 'mode': KeyInfo(default='balance-rr'), - 'mtu': KeyInfo(default=1500), - 'name': KeyInfo(), - 'primary': KeyInfo(default='none'), - 'slaves': KeyInfo(required=True), - 'transmit-hash-policy': KeyInfo(default='layer-2'), - 'up-delay': KeyInfo(default='0ms'), - } + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'arp': KeyInfo(default='enabled'), + 'arp-interval': KeyInfo(default='100ms'), + 'arp-ip-targets': KeyInfo(default=''), + 'arp-timeout': KeyInfo(default='auto'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'down-delay': KeyInfo(default='0ms'), + 'forced-mac-address': KeyInfo(can_disable=True), + 'lacp-rate': KeyInfo(default='30secs'), + 'lacp-user-key': KeyInfo(can_disable=True, remove_value=0), + 'link-monitoring': KeyInfo(default='mii'), + 'mii-interval': KeyInfo(default='100ms'), + 'min-links': KeyInfo(default=0), + 'mlag-id': KeyInfo(can_disable=True, remove_value=0), + 'mode': KeyInfo(default='balance-rr'), + 'mtu': KeyInfo(default=1500), + 'name': KeyInfo(), + 'primary': KeyInfo(default='none'), + 'slaves': KeyInfo(required=True), + 'transmit-hash-policy': KeyInfo(default='layer-2'), + 'up-delay': KeyInfo(default='0ms'), + } + ), ), ('interface', 'bridge'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'admin-mac': KeyInfo(default=''), - 'ageing-time': KeyInfo(default='5m'), - 'arp': KeyInfo(default='enabled'), - 'arp-timeout': KeyInfo(default='auto'), - 'auto-mac': KeyInfo(default=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'dhcp-snooping': KeyInfo(default=False), - 'disabled': KeyInfo(default=False), - 'ether-type': KeyInfo(default='0x8100'), - 'fast-forward': KeyInfo(default=True), - 'frame-types': KeyInfo(default='admit-all'), - 'forward-delay': KeyInfo(default='15s'), - 'igmp-snooping': KeyInfo(default=False), - 'ingress-filtering': KeyInfo(default=True), - 'max-message-age': KeyInfo(default='20s'), - 'mtu': KeyInfo(default='auto'), - 'name': KeyInfo(), - 'priority': KeyInfo(default='0x8000'), - 'protocol-mode': KeyInfo(default='rstp'), - 'pvid': KeyInfo(default=1), - 'transmit-hold-count': KeyInfo(default=6), - 'vlan-filtering': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'admin-mac': KeyInfo(default=''), + 'ageing-time': KeyInfo(default='5m'), + 'arp': KeyInfo(default='enabled'), + 'arp-timeout': KeyInfo(default='auto'), + 'auto-mac': KeyInfo(default=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'dhcp-snooping': KeyInfo(default=False), + 'disabled': KeyInfo(default=False), + 'ether-type': KeyInfo(default='0x8100'), + 'fast-forward': KeyInfo(default=True), + 'frame-types': KeyInfo(default='admit-all'), + 'forward-delay': KeyInfo(default='15s'), + 'igmp-snooping': KeyInfo(default=False), + 'ingress-filtering': KeyInfo(default=True), + 'max-message-age': KeyInfo(default='20s'), + 'mtu': KeyInfo(default='auto'), + 'name': KeyInfo(), + 'priority': KeyInfo(default='0x8000'), + 'protocol-mode': KeyInfo(default='rstp'), + 'pvid': KeyInfo(default=1), + 'transmit-hold-count': KeyInfo(default=6), + 'vlan-filtering': KeyInfo(default=False), + }, + ), ), ('interface', 'eoip'): APIData( - fully_understood=True, - primary_keys=('name',), - fields={ - 'allow-fast-path': KeyInfo(default=True), - 'arp': KeyInfo(default='enabled'), - 'arp-timeout': KeyInfo(default='auto'), - 'clamp-tcp-mss': KeyInfo(default=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'dont-fragment': KeyInfo(default=False), - 'dscp': KeyInfo(default='inherit'), - 'ipsec-secret': KeyInfo(can_disable=True), - 'keepalive': KeyInfo(default='10s,10', can_disable=True), - 'local-address': KeyInfo(default='0.0.0.0'), - 'loop-protect': KeyInfo(default='default'), - 'loop-protect-disable-time': KeyInfo(default='5m'), - 'loop-protect-send-interval': KeyInfo(default='5s'), - 'mac-address': KeyInfo(), - 'mtu': KeyInfo(default='auto'), - 'name': KeyInfo(), - 'remote-address': KeyInfo(required=True), - 'tunnel-id': KeyInfo(required=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name',), + fields={ + 'allow-fast-path': KeyInfo(default=True), + 'arp': KeyInfo(default='enabled'), + 'arp-timeout': KeyInfo(default='auto'), + 'clamp-tcp-mss': KeyInfo(default=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'dont-fragment': KeyInfo(default=False), + 'dscp': KeyInfo(default='inherit'), + 'ipsec-secret': KeyInfo(can_disable=True), + 'keepalive': KeyInfo(default='10s,10', can_disable=True), + 'local-address': KeyInfo(default='0.0.0.0'), + 'loop-protect': KeyInfo(default='default'), + 'loop-protect-disable-time': KeyInfo(default='5m'), + 'loop-protect-send-interval': KeyInfo(default='5s'), + 'mac-address': KeyInfo(), + 'mtu': KeyInfo(default='auto'), + 'name': KeyInfo(), + 'remote-address': KeyInfo(required=True), + 'tunnel-id': KeyInfo(required=True), + }, + ), ), ('interface', 'ethernet'): APIData( - fixed_entries=True, - fully_understood=True, - primary_keys=('default-name', ), - fields={ - 'default-name': KeyInfo(), - 'advertise': KeyInfo(), - 'arp': KeyInfo(default='enabled'), - 'arp-timeout': KeyInfo(default='auto'), - 'auto-negotiation': KeyInfo(default=True), - 'bandwidth': KeyInfo(default='unlimited/unlimited'), - 'combo-mode': KeyInfo(can_disable=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'fec-mode': KeyInfo(can_disable=True), - 'full-duplex': KeyInfo(default=True), - 'l2mtu': KeyInfo(default=1598), - 'loop-protect': KeyInfo(default='default'), - 'loop-protect-disable-time': KeyInfo(default='5m'), - 'loop-protect-send-interval': KeyInfo(default='5s'), - 'mac-address': KeyInfo(), - 'mdix-enable': KeyInfo(), - 'mtu': KeyInfo(default=1500), - 'name': KeyInfo(), - 'orig-mac-address': KeyInfo(), - 'poe-out': KeyInfo(can_disable=True), - 'poe-priority': KeyInfo(can_disable=True), - 'poe-voltage': KeyInfo(can_disable=True), - 'power-cycle-interval': KeyInfo(), - 'power-cycle-ping-address': KeyInfo(can_disable=True), - 'power-cycle-ping-enabled': KeyInfo(), - 'power-cycle-ping-timeout': KeyInfo(can_disable=True), - 'rx-flow-control': KeyInfo(default='off'), - 'sfp-rate-select': KeyInfo(default='high'), - 'sfp-shutdown-temperature': KeyInfo(default='95C'), - 'speed': KeyInfo(), - 'tx-flow-control': KeyInfo(default='off'), - }, + unversioned=VersionedAPIData( + fixed_entries=True, + fully_understood=True, + primary_keys=('default-name', ), + fields={ + 'default-name': KeyInfo(), + 'advertise': KeyInfo(), + 'arp': KeyInfo(default='enabled'), + 'arp-timeout': KeyInfo(default='auto'), + 'auto-negotiation': KeyInfo(default=True), + 'bandwidth': KeyInfo(default='unlimited/unlimited'), + 'combo-mode': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'fec-mode': KeyInfo(can_disable=True), + 'full-duplex': KeyInfo(default=True), + 'l2mtu': KeyInfo(default=1598), + 'loop-protect': KeyInfo(default='default'), + 'loop-protect-disable-time': KeyInfo(default='5m'), + 'loop-protect-send-interval': KeyInfo(default='5s'), + 'mac-address': KeyInfo(), + 'mdix-enable': KeyInfo(), + 'mtu': KeyInfo(default=1500), + 'name': KeyInfo(), + 'orig-mac-address': KeyInfo(), + 'poe-out': KeyInfo(can_disable=True), + 'poe-priority': KeyInfo(can_disable=True), + 'poe-voltage': KeyInfo(can_disable=True), + 'power-cycle-interval': KeyInfo(), + 'power-cycle-ping-address': KeyInfo(can_disable=True), + 'power-cycle-ping-enabled': KeyInfo(), + 'power-cycle-ping-timeout': KeyInfo(can_disable=True), + 'rx-flow-control': KeyInfo(default='off'), + 'sfp-rate-select': KeyInfo(default='high'), + 'sfp-shutdown-temperature': KeyInfo(default='95C'), + 'speed': KeyInfo(), + 'tx-flow-control': KeyInfo(default='off'), + }, + ), ), ('interface', 'ethernet', 'poe'): APIData( - fixed_entries=True, - fully_understood=True, - primary_keys=('name', ), - fields={ - 'name': KeyInfo(), - 'poe-out': KeyInfo(default='auto-on'), - 'poe-priority': KeyInfo(default=10), - 'poe-voltage': KeyInfo(default='auto'), - 'power-cycle-interval': KeyInfo(default='none'), - 'power-cycle-ping-address': KeyInfo(can_disable=True), - 'power-cycle-ping-enabled': KeyInfo(default=False), - 'power-cycle-ping-timeout': KeyInfo(can_disable=True), - } + unversioned=VersionedAPIData( + fixed_entries=True, + fully_understood=True, + primary_keys=('name', ), + fields={ + 'name': KeyInfo(), + 'poe-out': KeyInfo(default='auto-on'), + 'poe-priority': KeyInfo(default=10), + 'poe-voltage': KeyInfo(default='auto'), + 'power-cycle-interval': KeyInfo(default='none'), + 'power-cycle-ping-address': KeyInfo(can_disable=True), + 'power-cycle-ping-enabled': KeyInfo(default=False), + 'power-cycle-ping-timeout': KeyInfo(can_disable=True), + } + ), ), ('interface', 'gre'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'allow-fast-path': KeyInfo(default=True), - 'clamp-tcp-mss': KeyInfo(default=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'dont-fragment': KeyInfo(default=False), - 'dscp': KeyInfo(default='inherit'), - 'ipsec-secret': KeyInfo(can_disable=True), - 'keepalive': KeyInfo(default='10s,10', can_disable=True), - 'local-address': KeyInfo(default='0.0.0.0'), - 'mtu': KeyInfo(default='auto'), - 'name': KeyInfo(), - 'remote-address': KeyInfo(required=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'allow-fast-path': KeyInfo(default=True), + 'clamp-tcp-mss': KeyInfo(default=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'dont-fragment': KeyInfo(default=False), + 'dscp': KeyInfo(default='inherit'), + 'ipsec-secret': KeyInfo(can_disable=True), + 'keepalive': KeyInfo(default='10s,10', can_disable=True), + 'local-address': KeyInfo(default='0.0.0.0'), + 'mtu': KeyInfo(default='auto'), + 'name': KeyInfo(), + 'remote-address': KeyInfo(required=True), + }, + ), ), ('interface', 'gre6'): APIData( - fully_understood=True, - primary_keys=('name',), - fields={ - 'clamp-tcp-mss': KeyInfo(default=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'dscp': KeyInfo(default='inherit'), - 'ipsec-secret': KeyInfo(can_disable=True), - 'keepalive': KeyInfo(default='10s,10', can_disable=True), - 'local-address': KeyInfo(default='::'), - 'mtu': KeyInfo(default='auto'), - 'name': KeyInfo(), - 'remote-address': KeyInfo(required=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name',), + fields={ + 'clamp-tcp-mss': KeyInfo(default=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'dscp': KeyInfo(default='inherit'), + 'ipsec-secret': KeyInfo(can_disable=True), + 'keepalive': KeyInfo(default='10s,10', can_disable=True), + 'local-address': KeyInfo(default='::'), + 'mtu': KeyInfo(default='auto'), + 'name': KeyInfo(), + 'remote-address': KeyInfo(required=True), + }, + ), ), ('interface', 'list'): APIData( - primary_keys=('name', ), - fully_understood=True, - fields={ - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'exclude': KeyInfo(), - 'include': KeyInfo(), - 'name': KeyInfo(), - }, + unversioned=VersionedAPIData( + primary_keys=('name', ), + fully_understood=True, + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'exclude': KeyInfo(), + 'include': KeyInfo(), + 'name': KeyInfo(), + }, + ), ), ('interface', 'list', 'member'): APIData( - primary_keys=('list', 'interface', ), - fully_understood=True, - fields={ - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'interface': KeyInfo(), - 'list': KeyInfo(), - 'disabled': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + primary_keys=('list', 'interface', ), + fully_understood=True, + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'interface': KeyInfo(), + 'list': KeyInfo(), + 'disabled': KeyInfo(default=False), + }, + ), ), ('interface', 'lte', 'apn'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'add-default-route': KeyInfo(), - 'apn': KeyInfo(), - 'default-route-distance': KeyInfo(), - 'name': KeyInfo(), - 'use-peer-dns': KeyInfo(), - }, + unversioned=VersionedAPIData( + unknown_mechanism=True, + # primary_keys=('default', ), + fields={ + 'default': KeyInfo(), + 'add-default-route': KeyInfo(), + 'apn': KeyInfo(), + 'default-route-distance': KeyInfo(), + 'name': KeyInfo(), + 'use-peer-dns': KeyInfo(), + }, + ), + ), + ('interface', 'ppp-client'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'add-default-route': KeyInfo(default=True), + 'allow': KeyInfo(default='pap,chap,mschap1,mschap2'), + 'apn': KeyInfo(default='internet'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'data-channel': KeyInfo(default=0), + 'default-route-distance': KeyInfo(default=1), + 'dial-command': KeyInfo(default="ATDT"), + 'dial-on-demand': KeyInfo(default=True), + 'disabled': KeyInfo(default=True), + 'info-channel': KeyInfo(default=0), + 'keepalive-timeout': KeyInfo(default=30), + 'max-mru': KeyInfo(default=1500), + 'max-mtu': KeyInfo(default=1500), + 'modem-init': KeyInfo(default=''), + 'mrru': KeyInfo(default='disabled'), + 'name': KeyInfo(), + 'null-modem': KeyInfo(default=False), + 'password': KeyInfo(default=''), + 'phone': KeyInfo(default=''), + 'pin': KeyInfo(default=''), + 'port': KeyInfo(), + 'profile': KeyInfo(default='default'), + 'use-peer-dns': KeyInfo(default=True), + 'user': KeyInfo(default=''), + }, + ), ), ('interface', 'pppoe-client'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'ac-name': KeyInfo(default=''), - 'add-default-route': KeyInfo(default=False), - 'allow': KeyInfo(default='pap,chap,mschap1,mschap2'), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'default-route-distance': KeyInfo(default=1), - 'dial-on-demand': KeyInfo(default=False), - 'disabled': KeyInfo(default=True), - 'host-uniq': KeyInfo(can_disable=True), - 'interface': KeyInfo(required=True), - 'keepalive-timeout': KeyInfo(default=10), - 'max-mru': KeyInfo(default='auto'), - 'max-mtu': KeyInfo(default='auto'), - 'mrru': KeyInfo(default='disabled'), - 'name': KeyInfo(), - 'password': KeyInfo(default=''), - 'profile': KeyInfo(default='default'), - 'service-name': KeyInfo(default=''), - 'use-peer-dns': KeyInfo(default=False), - 'user': KeyInfo(default=''), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'ac-name': KeyInfo(default=''), + 'add-default-route': KeyInfo(default=False), + 'allow': KeyInfo(default='pap,chap,mschap1,mschap2'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'default-route-distance': KeyInfo(default=1), + 'dial-on-demand': KeyInfo(default=False), + 'disabled': KeyInfo(default=True), + 'host-uniq': KeyInfo(can_disable=True), + 'interface': KeyInfo(required=True), + 'keepalive-timeout': KeyInfo(default=10), + 'max-mru': KeyInfo(default='auto'), + 'max-mtu': KeyInfo(default='auto'), + 'mrru': KeyInfo(default='disabled'), + 'name': KeyInfo(), + 'password': KeyInfo(default=''), + 'profile': KeyInfo(default='default'), + 'service-name': KeyInfo(default=''), + 'use-peer-dns': KeyInfo(default=False), + 'user': KeyInfo(default=''), + }, + ), ), ('interface', 'vlan'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'arp': KeyInfo(default='enabled'), - 'arp-timeout': KeyInfo(default='auto'), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'interface': KeyInfo(required=True), - 'loop-protect': KeyInfo(default='default'), - 'loop-protect-disable-time': KeyInfo(default='5m'), - 'loop-protect-send-interval': KeyInfo(default='5s'), - 'mtu': KeyInfo(default=1500), - 'name': KeyInfo(), - 'use-service-tag': KeyInfo(default=False), - 'vlan-id': KeyInfo(required=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'arp': KeyInfo(default='enabled'), + 'arp-timeout': KeyInfo(default='auto'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interface': KeyInfo(required=True), + 'loop-protect': KeyInfo(default='default'), + 'loop-protect-disable-time': KeyInfo(default='5m'), + 'loop-protect-send-interval': KeyInfo(default='5s'), + 'mtu': KeyInfo(default=1500), + 'name': KeyInfo(), + 'use-service-tag': KeyInfo(default=False), + 'vlan-id': KeyInfo(required=True), + }, + ), ), ('interface', 'vrrp'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'arp': KeyInfo(default='enabled'), - 'arp-timeout': KeyInfo(default='auto'), - 'authentication': KeyInfo(default='none'), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'group-master': KeyInfo(default=''), - 'interface': KeyInfo(required=True), - 'interval': KeyInfo(default='1s'), - 'mtu': KeyInfo(default=1500), - 'name': KeyInfo(), - 'on-backup': KeyInfo(default=''), - 'on-fail': KeyInfo(default=''), - 'on-master': KeyInfo(default=''), - 'password': KeyInfo(default=''), - 'preemption-mode': KeyInfo(default=True), - 'priority': KeyInfo(default=100), - 'remote-address': KeyInfo(), - 'sync-connection-tracking': KeyInfo(default=False), - 'v3-protocol': KeyInfo(default='ipv4'), - 'version': KeyInfo(default=3), - 'vrid': KeyInfo(default=1), - }, - ), - ('interface', 'wireless', 'security-profiles'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'authentication-types': KeyInfo(), - 'disable-pmkid': KeyInfo(), - 'eap-methods': KeyInfo(), - 'group-ciphers': KeyInfo(), - 'group-key-update': KeyInfo(), - 'interim-update': KeyInfo(), - 'management-protection': KeyInfo(), - 'management-protection-key': KeyInfo(), - 'mode': KeyInfo(), - 'mschapv2-password': KeyInfo(), - 'mschapv2-username': KeyInfo(), - 'name': KeyInfo(), - 'radius-called-format': KeyInfo(), - 'radius-eap-accounting': KeyInfo(), - 'radius-mac-accounting': KeyInfo(), - 'radius-mac-authentication': KeyInfo(), - 'radius-mac-caching': KeyInfo(), - 'radius-mac-format': KeyInfo(), - 'radius-mac-mode': KeyInfo(), - 'static-algo-0': KeyInfo(), - 'static-algo-1': KeyInfo(), - 'static-algo-2': KeyInfo(), - 'static-algo-3': KeyInfo(), - 'static-key-0': KeyInfo(), - 'static-key-1': KeyInfo(), - 'static-key-2': KeyInfo(), - 'static-key-3': KeyInfo(), - 'static-sta-private-algo': KeyInfo(), - 'static-sta-private-key': KeyInfo(), - 'static-transmit-key': KeyInfo(), - 'supplicant-identity': KeyInfo(), - 'tls-certificate': KeyInfo(), - 'tls-mode': KeyInfo(), - 'unicast-ciphers': KeyInfo(), - 'wpa-pre-shared-key': KeyInfo(), - 'wpa2-pre-shared-key': KeyInfo(), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'arp': KeyInfo(default='enabled'), + 'arp-timeout': KeyInfo(default='auto'), + 'authentication': KeyInfo(default='none'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'group-master': KeyInfo(default=''), + 'interface': KeyInfo(required=True), + 'interval': KeyInfo(default='1s'), + 'mtu': KeyInfo(default=1500), + 'name': KeyInfo(), + 'on-backup': KeyInfo(default=''), + 'on-fail': KeyInfo(default=''), + 'on-master': KeyInfo(default=''), + 'password': KeyInfo(default=''), + 'preemption-mode': KeyInfo(default=True), + 'priority': KeyInfo(default=100), + 'remote-address': KeyInfo(), + 'sync-connection-tracking': KeyInfo(default=False), + 'v3-protocol': KeyInfo(default='ipv4'), + 'version': KeyInfo(default=3), + 'vrid': KeyInfo(default=1), + }, + ), ), ('ip', 'hotspot', 'profile'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'dns-name': KeyInfo(), - 'hotspot-address': KeyInfo(), - 'html-directory': KeyInfo(), - 'html-directory-override': KeyInfo(), - 'http-cookie-lifetime': KeyInfo(), - 'http-proxy': KeyInfo(), - 'login-by': KeyInfo(), - 'name': KeyInfo(), - 'rate-limit': KeyInfo(), - 'smtp-server': KeyInfo(), - 'split-user-domain': KeyInfo(), - 'use-radius': KeyInfo(), - }, + unversioned=VersionedAPIData( + unknown_mechanism=True, + # primary_keys=('default', ), + fields={ + 'default': KeyInfo(), + 'dns-name': KeyInfo(), + 'hotspot-address': KeyInfo(), + 'html-directory': KeyInfo(), + 'html-directory-override': KeyInfo(), + 'http-cookie-lifetime': KeyInfo(), + 'http-proxy': KeyInfo(), + 'login-by': KeyInfo(), + 'name': KeyInfo(), + 'rate-limit': KeyInfo(), + 'smtp-server': KeyInfo(), + 'split-user-domain': KeyInfo(), + 'use-radius': KeyInfo(), + }, + ), ), ('ip', 'hotspot', 'user', 'profile'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'add-mac-cookie': KeyInfo(), - 'address-list': KeyInfo(), - 'idle-timeout': KeyInfo(), - 'insert-queue-before': KeyInfo(can_disable=True), - 'keepalive-timeout': KeyInfo(), - 'mac-cookie-timeout': KeyInfo(), - 'name': KeyInfo(), - 'parent-queue': KeyInfo(can_disable=True), - 'queue-type': KeyInfo(can_disable=True), - 'shared-users': KeyInfo(), - 'status-autorefresh': KeyInfo(), - 'transparent-proxy': KeyInfo(), - }, + unversioned=VersionedAPIData( + unknown_mechanism=True, + # primary_keys=('default', ), + fields={ + 'default': KeyInfo(), + 'add-mac-cookie': KeyInfo(), + 'address-list': KeyInfo(), + 'idle-timeout': KeyInfo(), + 'insert-queue-before': KeyInfo(can_disable=True), + 'keepalive-timeout': KeyInfo(), + 'mac-cookie-timeout': KeyInfo(), + 'name': KeyInfo(), + 'parent-queue': KeyInfo(can_disable=True), + 'queue-type': KeyInfo(can_disable=True), + 'shared-users': KeyInfo(), + 'status-autorefresh': KeyInfo(), + 'transparent-proxy': KeyInfo(), + }, + ), ), ('ip', 'ipsec', 'identity'): APIData( - fully_understood=True, - primary_keys=('peer', ), - fields={ - 'auth-method': KeyInfo(default='pre-shared-key'), - 'certificate': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'eap-methods': KeyInfo(default='eap-tls'), - 'generate-policy': KeyInfo(default=False), - 'key': KeyInfo(), - 'match-by': KeyInfo(can_disable=True, remove_value='remote-id'), - 'mode-config': KeyInfo(can_disable=True, remove_value='none'), - 'my-id': KeyInfo(can_disable=True, remove_value='auto'), - 'notrack-chain': KeyInfo(can_disable=True, remove_value=''), - 'password': KeyInfo(), - 'peer': KeyInfo(), - 'policy-template-group': KeyInfo(can_disable=True, remove_value='default'), - 'remote-certificate': KeyInfo(), - 'remote-id': KeyInfo(can_disable=True, remove_value='auto'), - 'remote-key': KeyInfo(), - 'secret': KeyInfo(default=''), - 'username': KeyInfo(), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('peer', ), + fields={ + 'auth-method': KeyInfo(default='pre-shared-key'), + 'certificate': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'eap-methods': KeyInfo(default='eap-tls'), + 'generate-policy': KeyInfo(default=False), + 'key': KeyInfo(), + 'match-by': KeyInfo(can_disable=True, remove_value='remote-id'), + 'mode-config': KeyInfo(can_disable=True, remove_value='none'), + 'my-id': KeyInfo(can_disable=True, remove_value='auto'), + 'notrack-chain': KeyInfo(can_disable=True, remove_value=''), + 'password': KeyInfo(), + 'peer': KeyInfo(), + 'policy-template-group': KeyInfo(can_disable=True, remove_value='default'), + 'remote-certificate': KeyInfo(), + 'remote-id': KeyInfo(can_disable=True, remove_value='auto'), + 'remote-key': KeyInfo(), + 'secret': KeyInfo(default=''), + 'username': KeyInfo(), + }, + ), ), ('ip', 'ipsec', 'mode-config'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'name': KeyInfo(), - 'responder': KeyInfo(), - 'use-responder-dns': KeyInfo(), - }, + unversioned=VersionedAPIData( + unknown_mechanism=True, + # primary_keys=('default', ), + fields={ + 'default': KeyInfo(), + 'name': KeyInfo(), + 'responder': KeyInfo(), + 'use-responder-dns': KeyInfo(), + }, + ), ), ('ip', 'ipsec', 'peer'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'address': KeyInfo(can_disable=True, remove_value=''), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'exchange-mode': KeyInfo(default='main'), - 'local-address': KeyInfo(can_disable=True, remove_value='0.0.0.0'), - 'name': KeyInfo(), - 'passive': KeyInfo(can_disable=True, remove_value=False), - 'port': KeyInfo(can_disable=True, remove_value=500), - 'profile': KeyInfo(default='default'), - 'send-initial-contact': KeyInfo(default=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'address': KeyInfo(can_disable=True, remove_value=''), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'exchange-mode': KeyInfo(default='main'), + 'local-address': KeyInfo(can_disable=True, remove_value='0.0.0.0'), + 'name': KeyInfo(), + 'passive': KeyInfo(can_disable=True, remove_value=False), + 'port': KeyInfo(can_disable=True, remove_value=500), + 'profile': KeyInfo(default='default'), + 'send-initial-contact': KeyInfo(default=True), + }, + ), ), ('ip', 'ipsec', 'policy', 'group'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'name': KeyInfo(), - }, + unversioned=VersionedAPIData( + unknown_mechanism=True, + # primary_keys=('default', ), + fields={ + 'default': KeyInfo(), + 'name': KeyInfo(), + }, + ), ), ('ip', 'ipsec', 'profile'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'dh-group': KeyInfo(default='modp2048,modp1024'), - 'dpd-interval': KeyInfo(default='2m'), - 'dpd-maximum-failures': KeyInfo(default=5), - 'enc-algorithm': KeyInfo(default='aes-128,3des'), - 'hash-algorithm': KeyInfo(default='sha1'), - 'lifebytes': KeyInfo(can_disable=True, remove_value=0), - 'lifetime': KeyInfo(default='1d'), - 'name': KeyInfo(), - 'nat-traversal': KeyInfo(default=True), - 'prf-algorithm': KeyInfo(can_disable=True, remove_value='auto'), - 'proposal-check': KeyInfo(default='obey'), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'dh-group': KeyInfo(default='modp2048,modp1024'), + 'dpd-interval': KeyInfo(default='2m'), + 'dpd-maximum-failures': KeyInfo(default=5), + 'enc-algorithm': KeyInfo(default='aes-128,3des'), + 'hash-algorithm': KeyInfo(default='sha1'), + 'lifebytes': KeyInfo(can_disable=True, remove_value=0), + 'lifetime': KeyInfo(default='1d'), + 'name': KeyInfo(), + 'nat-traversal': KeyInfo(default=True), + 'prf-algorithm': KeyInfo(can_disable=True, remove_value='auto'), + 'proposal-check': KeyInfo(default='obey'), + }, + ), ), ('ip', 'ipsec', 'proposal'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'auth-algorithms': KeyInfo(default='sha1'), - 'disabled': KeyInfo(default=False), - 'enc-algorithms': KeyInfo(default='aes-256-cbc,aes-192-cbc,aes-128-cbc'), - 'lifetime': KeyInfo(default='30m'), - 'name': KeyInfo(), - 'pfs-group': KeyInfo(default='modp1024'), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'auth-algorithms': KeyInfo(default='sha1'), + 'disabled': KeyInfo(default=False), + 'enc-algorithms': KeyInfo(default='aes-256-cbc,aes-192-cbc,aes-128-cbc'), + 'lifetime': KeyInfo(default='30m'), + 'name': KeyInfo(), + 'pfs-group': KeyInfo(default='modp1024'), + }, + ), ), ('ip', 'pool'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'name': KeyInfo(), - 'ranges': KeyInfo(), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'name': KeyInfo(), + 'ranges': KeyInfo(), + }, + ), ), ('ip', 'route'): APIData( - fully_understood=True, - fields={ - 'blackhole': KeyInfo(can_disable=True), - 'check-gateway': KeyInfo(can_disable=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'distance': KeyInfo(), - 'dst-address': KeyInfo(), - 'gateway': KeyInfo(), - 'pref-src': KeyInfo(), - 'routing-table': KeyInfo(default='main'), - 'route-tag': KeyInfo(can_disable=True), - 'routing-mark': KeyInfo(can_disable=True), - 'scope': KeyInfo(), - 'suppress-hw-offload': KeyInfo(default=False), - 'target-scope': KeyInfo(), - 'type': KeyInfo(can_disable=True, remove_value='unicast'), - 'vrf-interface': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'blackhole': KeyInfo(can_disable=True), + 'check-gateway': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'distance': KeyInfo(), + 'dst-address': KeyInfo(), + 'gateway': KeyInfo(), + 'pref-src': KeyInfo(), + 'routing-table': KeyInfo(default='main'), + 'route-tag': KeyInfo(can_disable=True), + 'routing-mark': KeyInfo(can_disable=True), + 'scope': KeyInfo(), + 'suppress-hw-offload': KeyInfo(default=False), + 'target-scope': KeyInfo(), + 'type': KeyInfo(can_disable=True, remove_value='unicast'), + 'vrf-interface': KeyInfo(can_disable=True), + }, + ), + ), + ('ip', 'vrf'): APIData( + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interfaces': KeyInfo(), + 'name': KeyInfo(), + }, + )), + ] ), ('ip', 'route', 'vrf'): APIData( - fully_understood=True, - primary_keys=('routing-mark', ), - fields={ - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'interfaces': KeyInfo(), - 'routing-mark': KeyInfo(), - }, + versioned=[ + ('7', '<', VersionedAPIData( + fully_understood=True, + primary_keys=('routing-mark', ), + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interfaces': KeyInfo(), + 'routing-mark': KeyInfo(), + }, + )), + ], ), ('ip', 'dhcp-server'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'address-pool': KeyInfo(default='static-only'), - 'allow-dual-stack-queue': KeyInfo(can_disable=True, remove_value=True), - 'always-broadcast': KeyInfo(can_disable=True, remove_value=False), - 'authoritative': KeyInfo(default=True), - 'bootp-lease-time': KeyInfo(default='forever'), - 'bootp-support': KeyInfo(can_disable=True, remove_value='static'), - 'client-mac-limit': KeyInfo(can_disable=True, remove_value='unlimited'), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'conflict-detection': KeyInfo(can_disable=True, remove_value=True), - 'delay-threshold': KeyInfo(can_disable=True, remove_value='none'), - 'dhcp-option-set': KeyInfo(can_disable=True, remove_value='none'), - 'disabled': KeyInfo(default=False), - 'insert-queue-before': KeyInfo(can_disable=True, remove_value='first'), - 'interface': KeyInfo(required=True), - 'lease-script': KeyInfo(default=''), - 'lease-time': KeyInfo(default='10m'), - 'name': KeyInfo(), - 'parent-queue': KeyInfo(can_disable=True, remove_value='none'), - 'relay': KeyInfo(can_disable=True, remove_value='0.0.0.0'), - 'server-address': KeyInfo(can_disable=True, remove_value='0.0.0.0'), - 'use-framed-as-classless': KeyInfo(can_disable=True, remove_value=True), - 'use-radius': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'address-pool': KeyInfo(default='static-only'), + 'allow-dual-stack-queue': KeyInfo(can_disable=True, remove_value=True), + 'always-broadcast': KeyInfo(can_disable=True, remove_value=False), + 'authoritative': KeyInfo(default=True), + 'bootp-lease-time': KeyInfo(default='forever'), + 'bootp-support': KeyInfo(can_disable=True, remove_value='static'), + 'client-mac-limit': KeyInfo(can_disable=True, remove_value='unlimited'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'conflict-detection': KeyInfo(can_disable=True, remove_value=True), + 'delay-threshold': KeyInfo(can_disable=True, remove_value='none'), + 'dhcp-option-set': KeyInfo(can_disable=True, remove_value='none'), + 'disabled': KeyInfo(default=False), + 'insert-queue-before': KeyInfo(can_disable=True, remove_value='first'), + 'interface': KeyInfo(required=True), + 'lease-script': KeyInfo(default=''), + 'lease-time': KeyInfo(default='10m'), + 'name': KeyInfo(), + 'parent-queue': KeyInfo(can_disable=True, remove_value='none'), + 'relay': KeyInfo(can_disable=True, remove_value='0.0.0.0'), + 'server-address': KeyInfo(can_disable=True, remove_value='0.0.0.0'), + 'use-framed-as-classless': KeyInfo(can_disable=True, remove_value=True), + 'use-radius': KeyInfo(default=False), + }, + ), + ), + ('routing', 'filter', 'rule'): APIData( + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'chain': KeyInfo(required=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(can_disable=True), + 'rule': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('routing', 'filter', 'select-rule'): APIData( + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'chain': KeyInfo(required=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(can_disable=True), + 'do-group-num': KeyInfo(can_disable=True), + 'do-group-prfx': KeyInfo(can_disable=True), + 'do-jump': KeyInfo(can_disable=True), + 'do-select-num': KeyInfo(can_disable=True), + 'do-select-prfx': KeyInfo(can_disable=True), + 'do-take': KeyInfo(can_disable=True), + 'do-where': KeyInfo(can_disable=True), + }, + )), + ], ), ('routing', 'ospf', 'instance'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'domain-id': KeyInfo(can_disable=True), - 'domain-tag': KeyInfo(can_disable=True), - 'in-filter-chain': KeyInfo(can_disable=True), - 'mpls-te-address': KeyInfo(can_disable=True), - 'mpls-te-area': KeyInfo(can_disable=True), - 'name': KeyInfo(), - 'originate-default': KeyInfo(can_disable=True), - 'out-filter-chain': KeyInfo(can_disable=True), - 'out-filter-select': KeyInfo(can_disable=True), - 'redistribute': KeyInfo(can_disable=True), - 'router-id': KeyInfo(default='main'), - 'routing-table': KeyInfo(can_disable=True), - 'use-dn': KeyInfo(can_disable=True), - 'version': KeyInfo(default=2), - 'vrf': KeyInfo(default='main'), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'domain-id': KeyInfo(can_disable=True), + 'domain-tag': KeyInfo(can_disable=True), + 'in-filter-chain': KeyInfo(can_disable=True), + 'mpls-te-address': KeyInfo(can_disable=True), + 'mpls-te-area': KeyInfo(can_disable=True), + 'name': KeyInfo(), + 'originate-default': KeyInfo(can_disable=True), + 'out-filter-chain': KeyInfo(can_disable=True), + 'out-filter-select': KeyInfo(can_disable=True), + 'redistribute': KeyInfo(can_disable=True), + 'router-id': KeyInfo(default='main'), + 'routing-table': KeyInfo(can_disable=True), + 'use-dn': KeyInfo(can_disable=True), + 'version': KeyInfo(default=2), + 'vrf': KeyInfo(default='main'), + }, + ), ), ('routing', 'ospf', 'area'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'area-id': KeyInfo(default='0.0.0.0'), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'default-cost': KeyInfo(can_disable=True), - 'disabled': KeyInfo(default=False), - 'instance': KeyInfo(required=True), - 'name': KeyInfo(), - 'no-summaries': KeyInfo(can_disable=True), - 'nssa-translator': KeyInfo(can_disable=True), - 'type': KeyInfo(default='default'), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'area-id': KeyInfo(default='0.0.0.0'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'default-cost': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'instance': KeyInfo(required=True), + 'name': KeyInfo(), + 'no-summaries': KeyInfo(can_disable=True), + 'nssa-translator': KeyInfo(can_disable=True), + 'type': KeyInfo(default='default'), + }, + ), ), ('routing', 'ospf', 'area', 'range'): APIData( - fully_understood=True, - primary_keys=('area', 'prefix', ), - fields={ - 'advertise': KeyInfo(default=True), - 'area': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'cost': KeyInfo(can_disable=True), - 'disabled': KeyInfo(default=False), - 'prefix': KeyInfo(), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('area', 'prefix', ), + fields={ + 'advertise': KeyInfo(default=True), + 'area': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'cost': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'prefix': KeyInfo(), + }, + ), ), ('routing', 'ospf', 'interface-template'): APIData( - fully_understood=True, - fields={ - 'area': KeyInfo(required=True), - 'auth': KeyInfo(can_disable=True), - 'auth-id': KeyInfo(can_disable=True), - 'auth-key': KeyInfo(can_disable=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'cost': KeyInfo(default=1), - 'dead-interval': KeyInfo(default='40s'), - 'disabled': KeyInfo(default=False), - 'hello-interval': KeyInfo(default='10s'), - 'instance-id': KeyInfo(default=0), - 'interfaces': KeyInfo(can_disable=True), - 'networks': KeyInfo(can_disable=True), - 'passive': KeyInfo(can_disable=True), - 'prefix-list': KeyInfo(can_disable=True), - 'priority': KeyInfo(default=128), - 'retransmit-interval': KeyInfo(default='5s'), - 'transmit-delay': KeyInfo(default='1s'), - 'type': KeyInfo(default='broadcast'), - 'vlink-neighbor-id': KeyInfo(can_disable=True), - 'vlink-transit-area': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'area': KeyInfo(required=True), + 'auth': KeyInfo(can_disable=True), + 'auth-id': KeyInfo(can_disable=True), + 'auth-key': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'cost': KeyInfo(default=1), + 'dead-interval': KeyInfo(default='40s'), + 'disabled': KeyInfo(default=False), + 'hello-interval': KeyInfo(default='10s'), + 'instance-id': KeyInfo(default=0), + 'interfaces': KeyInfo(can_disable=True), + 'networks': KeyInfo(can_disable=True), + 'passive': KeyInfo(can_disable=True), + 'prefix-list': KeyInfo(can_disable=True), + 'priority': KeyInfo(default=128), + 'retransmit-interval': KeyInfo(default='5s'), + 'transmit-delay': KeyInfo(default='1s'), + 'type': KeyInfo(default='broadcast'), + 'vlink-neighbor-id': KeyInfo(can_disable=True), + 'vlink-transit-area': KeyInfo(can_disable=True), + }, + ), ), ('routing', 'ospf-v3', 'instance'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'disabled': KeyInfo(), - 'distribute-default': KeyInfo(), - 'metric-bgp': KeyInfo(), - 'metric-connected': KeyInfo(), - 'metric-default': KeyInfo(), - 'metric-other-ospf': KeyInfo(), - 'metric-rip': KeyInfo(), - 'metric-static': KeyInfo(), - 'name': KeyInfo(), - 'redistribute-bgp': KeyInfo(), - 'redistribute-connected': KeyInfo(), - 'redistribute-other-ospf': KeyInfo(), - 'redistribute-rip': KeyInfo(), - 'redistribute-static': KeyInfo(), - 'router-id': KeyInfo(), - }, + unversioned=VersionedAPIData( + unknown_mechanism=True, + # primary_keys=('default', ), + fields={ + 'default': KeyInfo(), + 'disabled': KeyInfo(), + 'distribute-default': KeyInfo(), + 'metric-bgp': KeyInfo(), + 'metric-connected': KeyInfo(), + 'metric-default': KeyInfo(), + 'metric-other-ospf': KeyInfo(), + 'metric-rip': KeyInfo(), + 'metric-static': KeyInfo(), + 'name': KeyInfo(), + 'redistribute-bgp': KeyInfo(), + 'redistribute-connected': KeyInfo(), + 'redistribute-other-ospf': KeyInfo(), + 'redistribute-rip': KeyInfo(), + 'redistribute-static': KeyInfo(), + 'router-id': KeyInfo(), + }, + ), ), ('routing', 'ospf-v3', 'area'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'area-id': KeyInfo(), - 'disabled': KeyInfo(), - 'instance': KeyInfo(), - 'name': KeyInfo(), - 'type': KeyInfo(), - }, + unversioned=VersionedAPIData( + unknown_mechanism=True, + # primary_keys=('default', ), + fields={ + 'default': KeyInfo(), + 'area-id': KeyInfo(), + 'disabled': KeyInfo(), + 'instance': KeyInfo(), + 'name': KeyInfo(), + 'type': KeyInfo(), + }, + ), ), ('routing', 'pimsm', 'instance'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'afi': KeyInfo(default='ipv4'), - 'bsm-forward-back': KeyInfo(), - 'crp-advertise-contained': KeyInfo(), - 'disabled': KeyInfo(default=False), - 'name': KeyInfo(), - 'rp-hash-mask-length': KeyInfo(), - 'rp-static-override': KeyInfo(default=False), - 'ssm-range': KeyInfo(), - 'switch-to-spt': KeyInfo(default=True), - 'switch-to-spt-bytes': KeyInfo(default=0), - 'switch-to-spt-interval': KeyInfo(), - 'vrf': KeyInfo(default="main"), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'afi': KeyInfo(default='ipv4'), + 'bsm-forward-back': KeyInfo(), + 'crp-advertise-contained': KeyInfo(), + 'disabled': KeyInfo(default=False), + 'name': KeyInfo(), + 'rp-hash-mask-length': KeyInfo(), + 'rp-static-override': KeyInfo(default=False), + 'ssm-range': KeyInfo(), + 'switch-to-spt': KeyInfo(default=True), + 'switch-to-spt-bytes': KeyInfo(default=0), + 'switch-to-spt-interval': KeyInfo(), + 'vrf': KeyInfo(default="main"), + }, + ), ), ('routing', 'pimsm', 'interface-template'): APIData( - fully_understood=True, - fields={ - 'disabled': KeyInfo(default=False), - 'hello-delay': KeyInfo(default='5s'), - 'hello-period': KeyInfo(default='30s'), - 'instance': KeyInfo(required=True), - 'interfaces': KeyInfo(can_disable=True), - 'join-prune-period': KeyInfo(default='1m'), - 'join-tracking-support': KeyInfo(default=True), - 'override-interval': KeyInfo(default='2s500ms'), - 'priority': KeyInfo(default=1), - 'propagation-delay': KeyInfo(default='500ms'), - 'source-addresses': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'disabled': KeyInfo(default=False), + 'hello-delay': KeyInfo(default='5s'), + 'hello-period': KeyInfo(default='30s'), + 'instance': KeyInfo(required=True), + 'interfaces': KeyInfo(can_disable=True), + 'join-prune-period': KeyInfo(default='1m'), + 'join-tracking-support': KeyInfo(default=True), + 'override-interval': KeyInfo(default='2s500ms'), + 'priority': KeyInfo(default=1), + 'propagation-delay': KeyInfo(default='500ms'), + 'source-addresses': KeyInfo(can_disable=True), + }, + ), + ), + ('routing', 'rule'): APIData( + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'action': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'dst-address': KeyInfo(can_disable=True), + 'interface': KeyInfo(can_disable=True), + 'min-prefix': KeyInfo(can_disable=True), + 'routing-mark': KeyInfo(can_disable=True), + 'src-address': KeyInfo(can_disable=True), + 'table': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('routing', 'table'): APIData( + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'name': KeyInfo(required=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'fib': KeyInfo(), + }, + )), + ], ), ('snmp', 'community'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'addresses': KeyInfo(default='::/0'), - 'authentication-password': KeyInfo(default=''), - 'authentication-protocol': KeyInfo(default='MD5'), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'encryption-password': KeyInfo(default=''), - 'encryption-protocol': KeyInfo(default='DES'), - 'name': KeyInfo(required=True), - 'read-access': KeyInfo(default=True), - 'security': KeyInfo(default='none'), - 'write-access': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'addresses': KeyInfo(default='::/0'), + 'authentication-password': KeyInfo(default=''), + 'authentication-protocol': KeyInfo(default='MD5'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'encryption-password': KeyInfo(default=''), + 'encryption-protocol': KeyInfo(default='DES'), + 'name': KeyInfo(required=True), + 'read-access': KeyInfo(default=True), + 'security': KeyInfo(default='none'), + 'write-access': KeyInfo(default=False), + }, + ), ), ('caps-man', 'aaa'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'called-format': KeyInfo(default='mac:ssid'), - 'interim-update': KeyInfo(default='disabled'), - 'mac-caching': KeyInfo(default='disabled'), - 'mac-format': KeyInfo(default='XX:XX:XX:XX:XX:XX'), - 'mac-mode': KeyInfo(default='as-username'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'called-format': KeyInfo(default='mac:ssid'), + 'interim-update': KeyInfo(default='disabled'), + 'mac-caching': KeyInfo(default='disabled'), + 'mac-format': KeyInfo(default='XX:XX:XX:XX:XX:XX'), + 'mac-mode': KeyInfo(default='as-username'), + }, + ), ), ('caps-man', 'access-list'): APIData( - fully_understood=True, - fields={ - 'action': KeyInfo(can_disable=True), - 'allow-signal-out-of-range': KeyInfo(can_disable=True), - 'ap-tx-limit': KeyInfo(can_disable=True), - 'client-to-client-forwarding': KeyInfo(can_disable=True), - 'client-tx-limit': KeyInfo(can_disable=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(), - 'interface': KeyInfo(can_disable=True), - 'mac-address': KeyInfo(can_disable=True), - 'mac-address-mask': KeyInfo(can_disable=True), - 'private-passphrase': KeyInfo(can_disable=True), - 'radius-accounting': KeyInfo(can_disable=True), - 'signal-range': KeyInfo(can_disable=True), - 'ssid-regexp': KeyInfo(), - 'time': KeyInfo(can_disable=True), - 'vlan-id': KeyInfo(can_disable=True), - 'vlan-mode': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'action': KeyInfo(can_disable=True), + 'allow-signal-out-of-range': KeyInfo(can_disable=True), + 'ap-tx-limit': KeyInfo(can_disable=True), + 'client-to-client-forwarding': KeyInfo(can_disable=True), + 'client-tx-limit': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interface': KeyInfo(can_disable=True), + 'mac-address': KeyInfo(can_disable=True), + 'mac-address-mask': KeyInfo(can_disable=True), + 'private-passphrase': KeyInfo(can_disable=True), + 'radius-accounting': KeyInfo(can_disable=True), + 'signal-range': KeyInfo(can_disable=True), + 'ssid-regexp': KeyInfo(), + 'time': KeyInfo(can_disable=True), + 'vlan-id': KeyInfo(can_disable=True), + 'vlan-mode': KeyInfo(can_disable=True), + }, + ), + ), + ('caps-man', 'channel'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'band': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'control-channel-width': KeyInfo(can_disable=True), + 'extension-channel': KeyInfo(can_disable=True), + 'frequency': KeyInfo(can_disable=True), + 'name': KeyInfo(), + 'reselect-interval': KeyInfo(can_disable=True), + 'save-selected': KeyInfo(can_disable=True), + 'secondary-frequency': KeyInfo(can_disable=True), + 'skip-dfs-channels': KeyInfo(can_disable=True), + 'tx-power': KeyInfo(can_disable=True), + }, + ), ), ('caps-man', 'configuration'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'channel': KeyInfo(can_disable=True), - 'channel.band': KeyInfo(can_disable=True), - 'channel.control-channel-width': KeyInfo(can_disable=True), - 'channel.extension-channel': KeyInfo(can_disable=True), - 'channel.frequency': KeyInfo(can_disable=True), - 'channel.reselect-interval': KeyInfo(can_disable=True), - 'channel.save-selected': KeyInfo(can_disable=True), - 'channel.secondary-frequency': KeyInfo(can_disable=True), - 'channel.skip-dfs-channels': KeyInfo(can_disable=True), - 'channel.tx-power': KeyInfo(can_disable=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'country': KeyInfo(can_disable=True), - 'datapath': KeyInfo(can_disable=True), - 'datapath.arp': KeyInfo(), - 'datapath.bridge': KeyInfo(can_disable=True), - 'datapath.bridge-cost': KeyInfo(can_disable=True), - 'datapath.bridge-horizon': KeyInfo(can_disable=True), - 'datapath.client-to-client-forwarding': KeyInfo(can_disable=True), - 'datapath.interface-list': KeyInfo(can_disable=True), - 'datapath.l2mtu': KeyInfo(), - 'datapath.local-forwarding': KeyInfo(can_disable=True), - 'datapath.mtu': KeyInfo(), - 'datapath.openflow-switch': KeyInfo(can_disable=True), - 'datapath.vlan-id': KeyInfo(can_disable=True), - 'datapath.vlan-mode': KeyInfo(can_disable=True), - 'disconnect-timeout': KeyInfo(can_disable=True), - 'distance': KeyInfo(can_disable=True), - 'frame-lifetime': KeyInfo(can_disable=True), - 'guard-interval': KeyInfo(can_disable=True), - 'hide-ssid': KeyInfo(can_disable=True), - 'hw-protection-mode': KeyInfo(can_disable=True), - 'hw-retries': KeyInfo(can_disable=True), - 'installation': KeyInfo(can_disable=True), - 'keepalive-frames': KeyInfo(can_disable=True), - 'load-balancing-group': KeyInfo(can_disable=True), - 'max-sta-count': KeyInfo(can_disable=True), - 'mode': KeyInfo(can_disable=True), - 'multicast-helper': KeyInfo(can_disable=True), - 'name': KeyInfo(), - 'rates': KeyInfo(can_disable=True), - 'rates.basic': KeyInfo(can_disable=True), - 'rates.ht-basic-mcs': KeyInfo(can_disable=True), - 'rates.ht-supported-mcs': KeyInfo(can_disable=True), - 'rates.supported': KeyInfo(can_disable=True), - 'rates.vht-basic-mcs': KeyInfo(can_disable=True), - 'rates.vht-supported-mcs': KeyInfo(can_disable=True), - 'rx-chains': KeyInfo(can_disable=True), - 'security': KeyInfo(can_disable=True), - 'security.authentication-types': KeyInfo(can_disable=True), - 'security.disable-pmkid': KeyInfo(can_disable=True), - 'security.eap-methods': KeyInfo(can_disable=True), - 'security.eap-radius-accounting': KeyInfo(can_disable=True), - 'security.encryption': KeyInfo(can_disable=True), - 'security.group-encryption': KeyInfo(can_disable=True), - 'security.group-key-update': KeyInfo(), - 'security.passphrase': KeyInfo(can_disable=True), - 'security.tls-certificate': KeyInfo(), - 'security.tls-mode': KeyInfo(), - 'ssid': KeyInfo(can_disable=True), - 'tx-chains': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'channel': KeyInfo(can_disable=True), + 'channel.band': KeyInfo(can_disable=True), + 'channel.control-channel-width': KeyInfo(can_disable=True), + 'channel.extension-channel': KeyInfo(can_disable=True), + 'channel.frequency': KeyInfo(can_disable=True), + 'channel.reselect-interval': KeyInfo(can_disable=True), + 'channel.save-selected': KeyInfo(can_disable=True), + 'channel.secondary-frequency': KeyInfo(can_disable=True), + 'channel.skip-dfs-channels': KeyInfo(can_disable=True), + 'channel.tx-power': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'country': KeyInfo(can_disable=True), + 'datapath': KeyInfo(can_disable=True), + 'datapath.arp': KeyInfo(), + 'datapath.bridge': KeyInfo(can_disable=True), + 'datapath.bridge-cost': KeyInfo(can_disable=True), + 'datapath.bridge-horizon': KeyInfo(can_disable=True), + 'datapath.client-to-client-forwarding': KeyInfo(can_disable=True), + 'datapath.interface-list': KeyInfo(can_disable=True), + 'datapath.l2mtu': KeyInfo(), + 'datapath.local-forwarding': KeyInfo(can_disable=True), + 'datapath.mtu': KeyInfo(), + 'datapath.openflow-switch': KeyInfo(can_disable=True), + 'datapath.vlan-id': KeyInfo(can_disable=True), + 'datapath.vlan-mode': KeyInfo(can_disable=True), + 'disconnect-timeout': KeyInfo(can_disable=True), + 'distance': KeyInfo(can_disable=True), + 'frame-lifetime': KeyInfo(can_disable=True), + 'guard-interval': KeyInfo(can_disable=True), + 'hide-ssid': KeyInfo(can_disable=True), + 'hw-protection-mode': KeyInfo(can_disable=True), + 'hw-retries': KeyInfo(can_disable=True), + 'installation': KeyInfo(can_disable=True), + 'keepalive-frames': KeyInfo(can_disable=True), + 'load-balancing-group': KeyInfo(can_disable=True), + 'max-sta-count': KeyInfo(can_disable=True), + 'mode': KeyInfo(can_disable=True), + 'multicast-helper': KeyInfo(can_disable=True), + 'name': KeyInfo(), + 'rates': KeyInfo(can_disable=True), + 'rates.basic': KeyInfo(can_disable=True), + 'rates.ht-basic-mcs': KeyInfo(can_disable=True), + 'rates.ht-supported-mcs': KeyInfo(can_disable=True), + 'rates.supported': KeyInfo(can_disable=True), + 'rates.vht-basic-mcs': KeyInfo(can_disable=True), + 'rates.vht-supported-mcs': KeyInfo(can_disable=True), + 'rx-chains': KeyInfo(can_disable=True), + 'security': KeyInfo(can_disable=True), + 'security.authentication-types': KeyInfo(can_disable=True), + 'security.disable-pmkid': KeyInfo(can_disable=True), + 'security.eap-methods': KeyInfo(can_disable=True), + 'security.eap-radius-accounting': KeyInfo(can_disable=True), + 'security.encryption': KeyInfo(can_disable=True), + 'security.group-encryption': KeyInfo(can_disable=True), + 'security.group-key-update': KeyInfo(), + 'security.passphrase': KeyInfo(can_disable=True), + 'security.tls-certificate': KeyInfo(), + 'security.tls-mode': KeyInfo(), + 'ssid': KeyInfo(can_disable=True), + 'tx-chains': KeyInfo(can_disable=True), + }, + ), ), ('caps-man', 'datapath'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'arp': KeyInfo(), - 'bridge': KeyInfo(can_disable=True), - 'bridge-cost': KeyInfo(can_disable=True), - 'bridge-horizon': KeyInfo(can_disable=True), - 'client-to-client-forwarding': KeyInfo(can_disable=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'interface-list': KeyInfo(can_disable=True), - 'l2mtu': KeyInfo(), - 'local-forwarding': KeyInfo(can_disable=True), - 'mtu': KeyInfo(), - 'name': KeyInfo(), - 'openflow-switch': KeyInfo(can_disable=True), - 'vlan-id': KeyInfo(can_disable=True), - 'vlan-mode': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'arp': KeyInfo(), + 'bridge': KeyInfo(can_disable=True), + 'bridge-cost': KeyInfo(can_disable=True), + 'bridge-horizon': KeyInfo(can_disable=True), + 'client-to-client-forwarding': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'interface-list': KeyInfo(can_disable=True), + 'l2mtu': KeyInfo(), + 'local-forwarding': KeyInfo(can_disable=True), + 'mtu': KeyInfo(), + 'name': KeyInfo(), + 'openflow-switch': KeyInfo(can_disable=True), + 'vlan-id': KeyInfo(can_disable=True), + 'vlan-mode': KeyInfo(can_disable=True), + }, + ), ), ('caps-man', 'manager', 'interface'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'disabled': KeyInfo(), - 'forbid': KeyInfo(), - 'interface': KeyInfo(), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('interface', ), + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'default': KeyInfo(), + 'disabled': KeyInfo(default=False), + 'forbid': KeyInfo(default=False), + 'interface': KeyInfo(), + }, + ), ), ('caps-man', 'provisioning'): APIData( - fully_understood=True, - fields={ - 'action': KeyInfo(default='none'), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'common-name-regexp': KeyInfo(default=''), - 'disabled': KeyInfo(default=False), - 'hw-supported-modes': KeyInfo(default=''), - 'identity-regexp': KeyInfo(default=''), - 'ip-address-ranges': KeyInfo(default=''), - 'master-configuration': KeyInfo(default='*FFFFFFFF'), - 'name-format': KeyInfo(default='cap'), - 'name-prefix': KeyInfo(default=''), - 'radio-mac': KeyInfo(default='00:00:00:00:00:00'), - 'slave-configurations': KeyInfo(default=''), - }, + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'action': KeyInfo(default='none'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'common-name-regexp': KeyInfo(default=''), + 'disabled': KeyInfo(default=False), + 'hw-supported-modes': KeyInfo(default=''), + 'identity-regexp': KeyInfo(default=''), + 'ip-address-ranges': KeyInfo(default=''), + 'master-configuration': KeyInfo(default='*FFFFFFFF'), + 'name-format': KeyInfo(default='cap'), + 'name-prefix': KeyInfo(default=''), + 'radio-mac': KeyInfo(default='00:00:00:00:00:00'), + 'slave-configurations': KeyInfo(default=''), + }, + ), ), ('caps-man', 'security'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'authentication-types': KeyInfo(can_disable=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disable-pmkid': KeyInfo(can_disable=True), - 'eap-methods': KeyInfo(can_disable=True), - 'eap-radius-accounting': KeyInfo(can_disable=True), - 'encryption': KeyInfo(can_disable=True), - 'group-encryption': KeyInfo(can_disable=True), - 'group-key-update': KeyInfo(), - 'name': KeyInfo(), - 'passphrase': KeyInfo(can_disable=True), - 'tls-certificate': KeyInfo(), - 'tls-mode': KeyInfo(), - } + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'authentication-types': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disable-pmkid': KeyInfo(can_disable=True), + 'eap-methods': KeyInfo(can_disable=True), + 'eap-radius-accounting': KeyInfo(can_disable=True), + 'encryption': KeyInfo(can_disable=True), + 'group-encryption': KeyInfo(can_disable=True), + 'group-key-update': KeyInfo(), + 'name': KeyInfo(), + 'passphrase': KeyInfo(can_disable=True), + 'tls-certificate': KeyInfo(), + 'tls-mode': KeyInfo(), + } + ), ), ('certificate', 'settings'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'crl-download': KeyInfo(default=False), - 'crl-store': KeyInfo(default='ram'), - 'crl-use': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'crl-download': KeyInfo(default=False), + 'crl-store': KeyInfo(default='ram'), + 'crl-use': KeyInfo(default=False), + }, + ), ), ('interface', 'bridge', 'port'): APIData( - fully_understood=True, - primary_keys=('interface', ), - fields={ - 'auto-isolate': KeyInfo(default=False), - 'bpdu-guard': KeyInfo(default=False), - 'bridge': KeyInfo(required=True), - 'broadcast-flood': KeyInfo(default=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'edge': KeyInfo(default='auto'), - 'fast-leave': KeyInfo(default=False), - 'frame-types': KeyInfo(default='admit-all'), - 'horizon': KeyInfo(default='none'), - 'hw': KeyInfo(default=True), - 'ingress-filtering': KeyInfo(default=True), - 'interface': KeyInfo(), - 'internal-path-cost': KeyInfo(default=10), - 'learn': KeyInfo(default='auto'), - 'multicast-router': KeyInfo(default='temporary-query'), - 'path-cost': KeyInfo(default=10), - 'point-to-point': KeyInfo(default='auto'), - 'priority': KeyInfo(default='0x80'), - 'pvid': KeyInfo(default=1), - 'restricted-role': KeyInfo(default=False), - 'restricted-tcn': KeyInfo(default=False), - 'tag-stacking': KeyInfo(default=False), - 'trusted': KeyInfo(default=False), - 'unknown-multicast-flood': KeyInfo(default=True), - 'unknown-unicast-flood': KeyInfo(default=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('interface', ), + fields={ + 'auto-isolate': KeyInfo(default=False), + 'bpdu-guard': KeyInfo(default=False), + 'bridge': KeyInfo(required=True), + 'broadcast-flood': KeyInfo(default=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'edge': KeyInfo(default='auto'), + 'fast-leave': KeyInfo(default=False), + 'frame-types': KeyInfo(default='admit-all'), + 'horizon': KeyInfo(default='none'), + 'hw': KeyInfo(default=True), + 'ingress-filtering': KeyInfo(default=True), + 'interface': KeyInfo(), + 'internal-path-cost': KeyInfo(default=10), + 'learn': KeyInfo(default='auto'), + 'multicast-router': KeyInfo(default='temporary-query'), + 'path-cost': KeyInfo(default=10), + 'point-to-point': KeyInfo(default='auto'), + 'priority': KeyInfo(default='0x80'), + 'pvid': KeyInfo(default=1), + 'restricted-role': KeyInfo(default=False), + 'restricted-tcn': KeyInfo(default=False), + 'tag-stacking': KeyInfo(default=False), + 'trusted': KeyInfo(default=False), + 'unknown-multicast-flood': KeyInfo(default=True), + 'unknown-unicast-flood': KeyInfo(default=True), + }, + ), ), ('interface', 'bridge', 'mlag'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'bridge': KeyInfo(default='none'), - 'peer-port': KeyInfo(default='none'), - } + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'bridge': KeyInfo(default='none'), + 'peer-port': KeyInfo(default='none'), + } + ), ), ('interface', 'bridge', 'port-controller'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'bridge': KeyInfo(default='none'), - 'cascade-ports': KeyInfo(default=''), - 'switch': KeyInfo(default='none'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'bridge': KeyInfo(default='none'), + 'cascade-ports': KeyInfo(default=''), + 'switch': KeyInfo(default='none'), + }, + ), ), ('interface', 'bridge', 'port-extender'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'control-ports': KeyInfo(default=''), - 'excluded-ports': KeyInfo(default=''), - 'switch': KeyInfo(default='none'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'control-ports': KeyInfo(default=''), + 'excluded-ports': KeyInfo(default=''), + 'switch': KeyInfo(default='none'), + }, + ), ), ('interface', 'bridge', 'settings'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'allow-fast-path': KeyInfo(default=True), - 'use-ip-firewall': KeyInfo(default=False), - 'use-ip-firewall-for-pppoe': KeyInfo(default=False), - 'use-ip-firewall-for-vlan': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'allow-fast-path': KeyInfo(default=True), + 'use-ip-firewall': KeyInfo(default=False), + 'use-ip-firewall-for-pppoe': KeyInfo(default=False), + 'use-ip-firewall-for-vlan': KeyInfo(default=False), + }, + ), ), ('interface', 'bridge', 'vlan'): APIData( - fully_understood=True, - primary_keys=('bridge', 'vlan-ids', ), - fields={ - 'bridge': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'tagged': KeyInfo(default=''), - 'untagged': KeyInfo(default=''), - 'vlan-ids': KeyInfo(), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('bridge', 'vlan-ids', ), + fields={ + 'bridge': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'tagged': KeyInfo(default=''), + 'untagged': KeyInfo(default=''), + 'vlan-ids': KeyInfo(), + }, + ), ), ('ip', 'firewall', 'connection', 'tracking'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'enabled': KeyInfo(default='auto'), - 'generic-timeout': KeyInfo(default='10m'), - 'icmp-timeout': KeyInfo(default='10s'), - 'loose-tcp-tracking': KeyInfo(default=True), - 'tcp-close-timeout': KeyInfo(default='10s'), - 'tcp-close-wait-timeout': KeyInfo(default='10s'), - 'tcp-established-timeout': KeyInfo(default='1d'), - 'tcp-fin-wait-timeout': KeyInfo(default='10s'), - 'tcp-last-ack-timeout': KeyInfo(default='10s'), - 'tcp-max-retrans-timeout': KeyInfo(default='5m'), - 'tcp-syn-received-timeout': KeyInfo(default='5s'), - 'tcp-syn-sent-timeout': KeyInfo(default='5s'), - 'tcp-time-wait-timeout': KeyInfo(default='10s'), - 'tcp-unacked-timeout': KeyInfo(default='5m'), - 'udp-stream-timeout': KeyInfo(default='3m'), - 'udp-timeout': KeyInfo(default='10s'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'enabled': KeyInfo(default='auto'), + 'generic-timeout': KeyInfo(default='10m'), + 'icmp-timeout': KeyInfo(default='10s'), + 'loose-tcp-tracking': KeyInfo(default=True), + 'tcp-close-timeout': KeyInfo(default='10s'), + 'tcp-close-wait-timeout': KeyInfo(default='10s'), + 'tcp-established-timeout': KeyInfo(default='1d'), + 'tcp-fin-wait-timeout': KeyInfo(default='10s'), + 'tcp-last-ack-timeout': KeyInfo(default='10s'), + 'tcp-max-retrans-timeout': KeyInfo(default='5m'), + 'tcp-syn-received-timeout': KeyInfo(default='5s'), + 'tcp-syn-sent-timeout': KeyInfo(default='5s'), + 'tcp-time-wait-timeout': KeyInfo(default='10s'), + 'tcp-unacked-timeout': KeyInfo(default='5m'), + 'udp-stream-timeout': KeyInfo(default='3m'), + 'udp-timeout': KeyInfo(default='10s'), + }, + ), ), ('ip', 'neighbor', 'discovery-settings'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'discover-interface-list': KeyInfo(), - 'lldp-med-net-policy-vlan': KeyInfo(default='disabled'), - 'protocol': KeyInfo(default='cdp,lldp,mndp'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + versioned_fields=[ + ([('7.7', '>=')], 'mode', KeyInfo(default='tx-and-rx')), + ], + fields={ + 'discover-interface-list': KeyInfo(), + 'lldp-med-net-policy-vlan': KeyInfo(default='disabled'), + 'protocol': KeyInfo(default='cdp,lldp,mndp'), + }, + ), ), ('ip', 'settings'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'accept-redirects': KeyInfo(default=False), - 'accept-source-route': KeyInfo(default=False), - 'allow-fast-path': KeyInfo(default=True), - 'arp-timeout': KeyInfo(default='30s'), - 'icmp-rate-limit': KeyInfo(default=10), - 'icmp-rate-mask': KeyInfo(default='0x1818'), - 'ip-forward': KeyInfo(default=True), - 'max-neighbor-entries': KeyInfo(default=8192), - 'route-cache': KeyInfo(default=True), - 'rp-filter': KeyInfo(default=False), - 'secure-redirects': KeyInfo(default=True), - 'send-redirects': KeyInfo(default=True), - 'tcp-syncookies': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'accept-redirects': KeyInfo(default=False), + 'accept-source-route': KeyInfo(default=False), + 'allow-fast-path': KeyInfo(default=True), + 'arp-timeout': KeyInfo(default='30s'), + 'icmp-rate-limit': KeyInfo(default=10), + 'icmp-rate-mask': KeyInfo(default='0x1818'), + 'ip-forward': KeyInfo(default=True), + 'max-neighbor-entries': KeyInfo(default=8192), + 'route-cache': KeyInfo(default=True), + 'rp-filter': KeyInfo(default=False), + 'secure-redirects': KeyInfo(default=True), + 'send-redirects': KeyInfo(default=True), + 'tcp-syncookies': KeyInfo(default=False), + }, + ), ), ('ipv6', 'address'): APIData( - fully_understood=True, - fields={ - 'address': KeyInfo(), - 'advertise': KeyInfo(default=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'eui-64': KeyInfo(default=False), - 'from-pool': KeyInfo(), - 'interface': KeyInfo(required=True), - 'no-dad': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'address': KeyInfo(), + 'advertise': KeyInfo(default=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'eui-64': KeyInfo(default=False), + 'from-pool': KeyInfo(), + 'interface': KeyInfo(required=True), + 'no-dad': KeyInfo(default=False), + }, + ), ), ('ipv6', 'settings'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'accept-redirects': KeyInfo(default='yes-if-forwarding-disabled'), - 'accept-router-advertisements': KeyInfo(default='yes-if-forwarding-disabled'), - 'disable-ipv6': KeyInfo(default=False), - 'forward': KeyInfo(default=True), - 'max-neighbor-entries': KeyInfo(default=8192), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'accept-redirects': KeyInfo(default='yes-if-forwarding-disabled'), + 'accept-router-advertisements': KeyInfo(default='yes-if-forwarding-disabled'), + 'disable-ipv6': KeyInfo(default=False), + 'forward': KeyInfo(default=True), + 'max-neighbor-entries': KeyInfo(default=8192), + }, + ), ), ('interface', 'detect-internet'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'detect-interface-list': KeyInfo(default='none'), - 'internet-interface-list': KeyInfo(default='none'), - 'lan-interface-list': KeyInfo(default='none'), - 'wan-interface-list': KeyInfo(default='none'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'detect-interface-list': KeyInfo(default='none'), + 'internet-interface-list': KeyInfo(default='none'), + 'lan-interface-list': KeyInfo(default='none'), + 'wan-interface-list': KeyInfo(default='none'), + }, + ), ), ('interface', 'l2tp-server', 'server'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'allow-fast-path': KeyInfo(default=False), - 'authentication': KeyInfo(default='pap,chap,mschap1,mschap2'), - 'caller-id-type': KeyInfo(default='ip-address'), - 'default-profile': KeyInfo(default='default-encryption'), - 'enabled': KeyInfo(default=False), - 'ipsec-secret': KeyInfo(default=''), - 'keepalive-timeout': KeyInfo(default=30), - 'max-mru': KeyInfo(default=1450), - 'max-mtu': KeyInfo(default=1450), - 'max-sessions': KeyInfo(default='unlimited'), - 'mrru': KeyInfo(default='disabled'), - 'one-session-per-host': KeyInfo(default=False), - 'use-ipsec': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'allow-fast-path': KeyInfo(default=False), + 'authentication': KeyInfo(default='pap,chap,mschap1,mschap2'), + 'caller-id-type': KeyInfo(default='ip-address'), + 'default-profile': KeyInfo(default='default-encryption'), + 'enabled': KeyInfo(default=False), + 'ipsec-secret': KeyInfo(default=''), + 'keepalive-timeout': KeyInfo(default=30), + 'max-mru': KeyInfo(default=1450), + 'max-mtu': KeyInfo(default=1450), + 'max-sessions': KeyInfo(default='unlimited'), + 'mrru': KeyInfo(default='disabled'), + 'one-session-per-host': KeyInfo(default=False), + 'use-ipsec': KeyInfo(default=False), + }, + ), + ), + ('interface', 'ovpn-client'): APIData( + unversioned=VersionedAPIData( + primary_keys=('name', ), + fully_understood=True, + fields={ + 'add-default-route': KeyInfo(default=False), + 'auth': KeyInfo(default='sha1'), + 'certificate': KeyInfo(), + 'cipher': KeyInfo(default='blowfish128'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'connect-to': KeyInfo(), + 'disabled': KeyInfo(default=True), + 'disconnect-notify': KeyInfo(), + 'mac-address': KeyInfo(), + 'max-mtu': KeyInfo(default=1500), + 'mode': KeyInfo(default='ip'), + 'name': KeyInfo(), + 'password': KeyInfo(), + 'port': KeyInfo(default=1194), + 'profile': KeyInfo(default='default'), + 'protocol': KeyInfo(default='tcp'), + 'route-nopull': KeyInfo(default=False), + 'tls-version': KeyInfo(default='any'), + 'use-peer-dns': KeyInfo(default=True), + 'user': KeyInfo(), + 'verify-server-certificate': KeyInfo(default=False), + }, + ), ), ('interface', 'ovpn-server', 'server'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'auth': KeyInfo(), - 'cipher': KeyInfo(), - 'default-profile': KeyInfo(default='default'), - 'enabled': KeyInfo(default=False), - 'keepalive-timeout': KeyInfo(default=60), - 'mac-address': KeyInfo(), - 'max-mtu': KeyInfo(default=1500), - 'mode': KeyInfo(default='ip'), - 'netmask': KeyInfo(default=24), - 'port': KeyInfo(default=1194), - 'require-client-certificate': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'auth': KeyInfo(), + 'cipher': KeyInfo(), + 'default-profile': KeyInfo(default='default'), + 'enabled': KeyInfo(default=False), + 'keepalive-timeout': KeyInfo(default=60), + 'mac-address': KeyInfo(), + 'max-mtu': KeyInfo(default=1500), + 'mode': KeyInfo(default='ip'), + 'netmask': KeyInfo(default=24), + 'port': KeyInfo(default=1194), + 'require-client-certificate': KeyInfo(default=False), + }, + ), ), ('interface', 'pptp-server', 'server'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'authentication': KeyInfo(default='mschap1,mschap2'), - 'default-profile': KeyInfo(default='default-encryption'), - 'enabled': KeyInfo(default=False), - 'keepalive-timeout': KeyInfo(default=30), - 'max-mru': KeyInfo(default=1450), - 'max-mtu': KeyInfo(default=1450), - 'mrru': KeyInfo(default='disabled'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'authentication': KeyInfo(default='mschap1,mschap2'), + 'default-profile': KeyInfo(default='default-encryption'), + 'enabled': KeyInfo(default=False), + 'keepalive-timeout': KeyInfo(default=30), + 'max-mru': KeyInfo(default=1450), + 'max-mtu': KeyInfo(default=1450), + 'mrru': KeyInfo(default='disabled'), + }, + ), ), ('interface', 'sstp-server', 'server'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'authentication': KeyInfo(default='pap,chap,mschap1,mschap2'), - 'certificate': KeyInfo(default='none'), - 'default-profile': KeyInfo(default='default'), - 'enabled': KeyInfo(default=False), - 'force-aes': KeyInfo(default=False), - 'keepalive-timeout': KeyInfo(default=60), - 'max-mru': KeyInfo(default=1500), - 'max-mtu': KeyInfo(default=1500), - 'mrru': KeyInfo(default='disabled'), - 'pfs': KeyInfo(default=False), - 'port': KeyInfo(default=443), - 'tls-version': KeyInfo(default='any'), - 'verify-client-certificate': KeyInfo(default='no'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'authentication': KeyInfo(default='pap,chap,mschap1,mschap2'), + 'certificate': KeyInfo(default='none'), + 'default-profile': KeyInfo(default='default'), + 'enabled': KeyInfo(default=False), + 'force-aes': KeyInfo(default=False), + 'keepalive-timeout': KeyInfo(default=60), + 'max-mru': KeyInfo(default=1500), + 'max-mtu': KeyInfo(default=1500), + 'mrru': KeyInfo(default='disabled'), + 'pfs': KeyInfo(default=False), + 'port': KeyInfo(default=443), + 'tls-version': KeyInfo(default='any'), + 'verify-client-certificate': KeyInfo(default='no'), + }, + ), + ), + ('interface', 'wifi'): APIData( + versioned=[ + ('7.13', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + required_one_of=[['default-name', 'radio-mac', 'master-interface']], + fields={ + 'aaa.called-format': KeyInfo(can_disable=True), + 'aaa.calling-format': KeyInfo(can_disable=True), + 'aaa.interim-update': KeyInfo(can_disable=True), + 'aaa.mac-caching': KeyInfo(can_disable=True), + 'aaa.nas-identifier': KeyInfo(can_disable=True), + 'aaa.password-format': KeyInfo(can_disable=True), + 'aaa.username-format': KeyInfo(can_disable=True), + 'aaa': KeyInfo(can_disable=True), + 'arp-timeout': KeyInfo(default='auto'), + 'arp': KeyInfo(can_disable=True), + 'channel.band': KeyInfo(can_disable=True), + 'channel.frequency': KeyInfo(can_disable=True), + 'channel.secondary-frequency': KeyInfo(can_disable=True), + 'channel.skip-dfs-channels': KeyInfo(can_disable=True), + 'channel.width': KeyInfo(can_disable=True), + 'channel': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'configuration.antenna-gain': KeyInfo(can_disable=True), + 'configuration.beacon-interval': KeyInfo(can_disable=True), + 'configuration.chains': KeyInfo(can_disable=True), + 'configuration.country': KeyInfo(can_disable=True), + 'configuration.dtim-period': KeyInfo(can_disable=True), + 'configuration.hide-ssid': KeyInfo(can_disable=True), + 'configuration.manager': KeyInfo(can_disable=True), + 'configuration.mode': KeyInfo(can_disable=True), + 'configuration.multicast-enhance': KeyInfo(can_disable=True), + 'configuration.qos-classifier': KeyInfo(can_disable=True), + 'configuration.ssid': KeyInfo(can_disable=True), + 'configuration.tx-chain': KeyInfo(can_disable=True), + 'configuration.tx-power': KeyInfo(can_disable=True), + 'configuration': KeyInfo(can_disable=True), + 'datapath.bridge-cost': KeyInfo(can_disable=True), + 'datapath.bridge-horizon': KeyInfo(can_disable=True), + 'datapath.bridge': KeyInfo(can_disable=True), + 'datapath.client-isolation': KeyInfo(can_disable=True), + 'datapath.interface-list': KeyInfo(can_disable=True), + 'datapath.vlan-id': KeyInfo(can_disable=True), + 'datapath': KeyInfo(can_disable=True), + 'default-name': KeyInfo(), + 'disable-running-check': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=True), + 'interworking.3gpp-info': KeyInfo(can_disable=True), + 'interworking.authentication-types': KeyInfo(can_disable=True), + 'interworking.connection-capabilities': KeyInfo(can_disable=True), + 'interworking.domain-names': KeyInfo(can_disable=True), + 'interworking.esr': KeyInfo(can_disable=True), + 'interworking.hessid': KeyInfo(can_disable=True), + 'interworking.hotspot20-dgaf': KeyInfo(can_disable=True), + 'interworking.hotspot20': KeyInfo(can_disable=True), + 'interworking.internet': KeyInfo(can_disable=True), + 'interworking.ipv4-availability': KeyInfo(can_disable=True), + 'interworking.ipv6-availability': KeyInfo(can_disable=True), + 'interworking.network-type': KeyInfo(can_disable=True), + 'interworking.operational-classes': KeyInfo(can_disable=True), + 'interworking.operator-names': KeyInfo(can_disable=True), + 'interworking.realms': KeyInfo(can_disable=True), + 'interworking.roaming-ois': KeyInfo(can_disable=True), + 'interworking.uesa': KeyInfo(can_disable=True), + 'interworking.venue-names': KeyInfo(can_disable=True), + 'interworking.venue': KeyInfo(can_disable=True), + 'interworking.wan-at-capacity': KeyInfo(can_disable=True), + 'interworking.wan-downlink-load': KeyInfo(can_disable=True), + 'interworking.wan-downlink': KeyInfo(can_disable=True), + 'interworking.wan-measurement-duration': KeyInfo(can_disable=True), + 'interworking.wan-status': KeyInfo(can_disable=True), + 'interworking.wan-symmetric': KeyInfo(can_disable=True), + 'interworking.wan-uplink-load': KeyInfo(can_disable=True), + 'interworking.wan-uplink': KeyInfo(can_disable=True), + 'interworking': KeyInfo(can_disable=True), + 'l2mtu': KeyInfo(default=1560), + 'mac-address': KeyInfo(), + 'master-interface': KeyInfo(), + 'mtu': KeyInfo(default=1500), + 'name': KeyInfo(), + 'radio-mac': KeyInfo(), + 'security.authentication-types': KeyInfo(can_disable=True), + 'security.connect-group': KeyInfo(can_disable=True), + 'security.connect-priority': KeyInfo(can_disable=True), + 'security.dh-groups': KeyInfo(can_disable=True), + 'security.disable-pmkid': KeyInfo(can_disable=True), + 'security.eap-accounting': KeyInfo(can_disable=True), + 'security.eap-anonymous-identity': KeyInfo(can_disable=True), + 'security.eap-certificate-mode': KeyInfo(can_disable=True), + 'security.eap-methods': KeyInfo(can_disable=True), + 'security.eap-password': KeyInfo(can_disable=True), + 'security.eap-tls-certificate': KeyInfo(can_disable=True), + 'security.eap-username': KeyInfo(can_disable=True), + 'security.encryption': KeyInfo(can_disable=True), + 'security.ft-mobility-domain': KeyInfo(can_disable=True), + 'security.ft-nas-identifier': KeyInfo(can_disable=True), + 'security.ft-over-ds': KeyInfo(can_disable=True), + 'security.ft-preserve-vlanid': KeyInfo(can_disable=True), + 'security.ft-r0-key-lifetime': KeyInfo(can_disable=True), + 'security.ft-reassociation-deadline': KeyInfo(can_disable=True), + 'security.ft': KeyInfo(can_disable=True), + 'security.group-encryption': KeyInfo(can_disable=True), + 'security.group-key-update': KeyInfo(can_disable=True), + 'security.management-encryption': KeyInfo(can_disable=True), + 'security.management-protection': KeyInfo(can_disable=True), + 'security.owe-transition-interface': KeyInfo(can_disable=True), + 'security.passphrase': KeyInfo(can_disable=True), + 'security.sae-anti-clogging-threshold': KeyInfo(can_disable=True), + 'security.sae-max-failure-rate': KeyInfo(can_disable=True), + 'security.sae-pwe': KeyInfo(can_disable=True), + 'security.wps': KeyInfo(can_disable=True), + 'security': KeyInfo(can_disable=True), + 'steering.neighbor-group': KeyInfo(can_disable=True), + 'steering.rrm': KeyInfo(can_disable=True), + 'steering.wnm': KeyInfo(can_disable=True), + 'steering': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('interface', 'wifi', 'aaa'): APIData( + versioned=[ + ('7.13', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'called-format': KeyInfo(can_disable=True), + 'calling-format': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interim-update': KeyInfo(can_disable=True), + 'mac-caching': KeyInfo(can_disable=True), + 'name': KeyInfo(), + 'nas-identifier': KeyInfo(can_disable=True), + 'password-format': KeyInfo(can_disable=True), + 'username-format': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('interface', 'wifi', 'access-list'): APIData( + versioned=[ + ('7.13', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'action': KeyInfo(default='accept'), + 'allow-signal-out-of-range': KeyInfo(can_disable=True), + 'client-isolation': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interface': KeyInfo(can_disable=True), + 'mac-address-mask': KeyInfo(can_disable=True), + 'mac-address': KeyInfo(can_disable=True), + 'passphrase': KeyInfo(can_disable=True), + 'radius-accounting': KeyInfo(can_disable=True), + 'signal-range': KeyInfo(can_disable=True), + 'ssid-regexp': KeyInfo(can_disable=True), + 'time': KeyInfo(can_disable=True), + 'vlan-id': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('interface', 'wifi', 'cap'): APIData( + versioned=[ + ('7.13', '>=', VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'caps-man-addresses': KeyInfo(default=''), + 'caps-man-certificate-common-names': KeyInfo(default=''), + 'caps-man-names': KeyInfo(default=''), + 'certificate': KeyInfo(default='none'), + 'discovery-interfaces': KeyInfo(default=''), + 'enabled': KeyInfo(default=False), + 'lock-to-caps-man': KeyInfo(default=False), + 'slaves-datapath': KeyInfo(), + 'slaves-static': KeyInfo(), + }, + )), + ], + ), + ('interface', 'wifi', 'capsman'): APIData( + versioned=[ + ('7.13', '>=', VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'ca-certificate': KeyInfo(default=''), + 'certificate': KeyInfo(default='none'), + 'enabled': KeyInfo(default=False), + 'interfaces': KeyInfo(default=''), + 'package-path': KeyInfo(default=''), + 'require-peer-certificate': KeyInfo(default=False), + 'upgrade-policy': KeyInfo(default='none'), + }, + )), + ], + ), + ('interface', 'wifi', 'channel'): APIData( + versioned=[ + ('7.13', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'band': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'frequency': KeyInfo(can_disable=True), + 'name': KeyInfo(), + 'secondary-frequency': KeyInfo(can_disable=True), + 'skip-dfs-channels': KeyInfo(can_disable=True), + 'width': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('interface', 'wifi', 'configuration'): APIData( + versioned=[ + ('7.13', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'aaa': KeyInfo(can_disable=True), + 'antenna-gain': KeyInfo(can_disable=True), + 'beacon-interval': KeyInfo(can_disable=True), + 'chains': KeyInfo(can_disable=True), + 'channel': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'country': KeyInfo(can_disable=True), + 'datapath': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'dtim-period': KeyInfo(can_disable=True), + 'hide-ssid': KeyInfo(default=False), + 'interworking': KeyInfo(can_disable=True), + 'manager': KeyInfo(can_disable=True), + 'mode': KeyInfo(can_disable=True), + 'multicast-enhance': KeyInfo(can_disable=True), + 'name': KeyInfo(), + 'qos-classifier': KeyInfo(can_disable=True), + 'security': KeyInfo(can_disable=True), + 'ssid': KeyInfo(can_disable=True), + 'steering': KeyInfo(can_disable=True), + 'tx-chains': KeyInfo(can_disable=True), + 'tx-power': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('interface', 'wifi', 'datapath'): APIData( + versioned=[ + ('7.13', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'bridge-cost': KeyInfo(can_disable=True), + 'bridge-horizon': KeyInfo(can_disable=True), + 'bridge': KeyInfo(can_disable=True), + 'client-isolation': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interface-list': KeyInfo(can_disable=True), + 'name': KeyInfo(), + 'vlan-id': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('interface', 'wifi', 'interworking'): APIData( + versioned=[ + ('7.13', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + '3gpp-info': KeyInfo(can_disable=True), + 'authentication-types': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'connection-capabilities': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'domain-names': KeyInfo(can_disable=True), + 'esr': KeyInfo(can_disable=True), + 'hessid': KeyInfo(can_disable=True), + 'hotspot20-dgaf': KeyInfo(can_disable=True), + 'hotspot20': KeyInfo(can_disable=True), + 'internet': KeyInfo(can_disable=True), + 'ipv4-availability': KeyInfo(can_disable=True), + 'ipv6-availability': KeyInfo(can_disable=True), + 'name': KeyInfo(), + 'network-type': KeyInfo(can_disable=True), + 'operational-classes': KeyInfo(can_disable=True), + 'operator-names': KeyInfo(can_disable=True), + 'realms': KeyInfo(can_disable=True), + 'roaming-ois': KeyInfo(can_disable=True), + 'uesa': KeyInfo(can_disable=True), + 'venue-names': KeyInfo(can_disable=True), + 'venue': KeyInfo(can_disable=True), + 'wan-at-capacity': KeyInfo(can_disable=True), + 'wan-downlink-load': KeyInfo(can_disable=True), + 'wan-downlink': KeyInfo(can_disable=True), + 'wan-measurement-duration': KeyInfo(can_disable=True), + 'wan-status': KeyInfo(can_disable=True), + 'wan-symmetric': KeyInfo(can_disable=True), + 'wan-uplink-load': KeyInfo(can_disable=True), + 'wan-uplink': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('interface', 'wifi', 'provisioning'): APIData( + versioned=[ + ('7.13', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('action', ), + fields={ + 'action': KeyInfo(default='none'), + 'address-ranges': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'common-name-regexp': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'identity-regexp': KeyInfo(can_disable=True), + 'master-configuration': KeyInfo(can_disable=True), + 'name-format': KeyInfo(can_disable=True), + 'radio-mac': KeyInfo(can_disable=True), + 'slave-configurations': KeyInfo(can_disable=True), + 'supported-bands': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('interface', 'wifi', 'security'): APIData( + versioned=[ + ('7.13', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'authentication-types': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'connect-group': KeyInfo(can_disable=True), + 'connect-priority': KeyInfo(can_disable=True), + 'dh-groups': KeyInfo(can_disable=True), + 'disable-pmkid': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'eap-accounting': KeyInfo(can_disable=True), + 'eap-anonymous-identity': KeyInfo(can_disable=True), + 'eap-certificate-mode': KeyInfo(can_disable=True), + 'eap-methods': KeyInfo(can_disable=True), + 'eap-password': KeyInfo(can_disable=True), + 'eap-tls-certificate': KeyInfo(can_disable=True), + 'eap-username': KeyInfo(can_disable=True), + 'encryption': KeyInfo(can_disable=True), + 'ft-mobility-domain': KeyInfo(can_disable=True), + 'ft-nas-identifier': KeyInfo(can_disable=True), + 'ft-over-ds': KeyInfo(can_disable=True), + 'ft-preserve-vlanid': KeyInfo(can_disable=True), + 'ft-r0-key-lifetime': KeyInfo(can_disable=True), + 'ft-reassociation-deadline': KeyInfo(can_disable=True), + 'ft': KeyInfo(can_disable=True), + 'group-encryption': KeyInfo(can_disable=True), + 'group-key-update': KeyInfo(can_disable=True), + 'management-encryption': KeyInfo(can_disable=True), + 'management-protection': KeyInfo(can_disable=True), + 'name': KeyInfo(), + 'owe-transition-interface': KeyInfo(can_disable=True), + 'passphrase': KeyInfo(can_disable=True), + 'sae-anti-clogging-threshold': KeyInfo(can_disable=True), + 'sae-max-failure-rate': KeyInfo(can_disable=True), + 'sae-pwe': KeyInfo(can_disable=True), + 'wps': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('interface', 'wifi', 'steering'): APIData( + versioned=[ + ('7.13', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'name': KeyInfo(), + 'neighbor-group': KeyInfo(can_disable=True), + 'rrm': KeyInfo(can_disable=True), + 'wnm': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('interface', 'wifiwave2'): APIData( + versioned=[ + ('7.13', '>=', 'RouterOS 7.13 uses WiFi package'), + ('7.8', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + required_one_of=[['default-name', 'master-interface']], + fields={ + 'aaa': KeyInfo(), + 'arp-timeout': KeyInfo(default='auto'), + 'arp': KeyInfo(default='enabled'), + 'channel': KeyInfo(), + 'configuration': KeyInfo(), + 'datapath': KeyInfo(), + 'default-name': KeyInfo(), + 'disable-running-check': KeyInfo(default=False), + 'interworking': KeyInfo(), + 'l2mtu': KeyInfo(default=1600), + 'mac-address': KeyInfo(), + 'master-interface': KeyInfo(), + 'mtu': KeyInfo(default=1500), + 'name': KeyInfo(), + 'security': KeyInfo(), + 'steering': KeyInfo(), + }, + )), + ], + ), + ('interface', 'wifiwave2', 'aaa'): APIData( + versioned=[ + ('7.13', '>=', 'RouterOS 7.13 uses WiFi package'), + ('7.8', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'called-format': KeyInfo(can_disable=True), + 'calling-format': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=True), + 'interim-update': KeyInfo(can_disable=True), + 'mac-caching': KeyInfo(can_disable=True), + 'name': KeyInfo(), + 'nas-identifier': KeyInfo(can_disable=True), + 'password-format': KeyInfo(can_disable=True), + 'username-format': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('interface', 'wifiwave2', 'access-list'): APIData( + versioned=[ + ('7.13', '>=', 'RouterOS 7.13 uses WiFi package'), + ('7.8', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'action': KeyInfo(can_disable=True), + 'allow-signal-out-of-range': KeyInfo(can_disable=True), + 'client-isolation': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=True), + 'interface': KeyInfo(can_disable=True), + 'mac-address': KeyInfo(can_disable=True), + 'mac-address-mask': KeyInfo(can_disable=True), + 'passphrase': KeyInfo(can_disable=True), + 'radius-accounting': KeyInfo(can_disable=True), + 'signal-range': KeyInfo(can_disable=True), + 'ssid-regexp': KeyInfo(), + 'time': KeyInfo(can_disable=True), + 'vlan-id': KeyInfo(can_disable=True), + }, + )), + ], + ), + ('interface', 'wifiwave2', 'cap'): APIData( + versioned=[ + ('7.13', '>=', 'RouterOS 7.13 uses WiFi package'), + ('7.8', '>=', VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'caps-man-addresses': KeyInfo(default=''), + 'caps-man-certificate-common-names': KeyInfo(default=''), + 'caps-man-names': KeyInfo(default=''), + 'certificate': KeyInfo(default='none'), + 'discovery-interfaces': KeyInfo(default=''), + 'enabled': KeyInfo(default=False), + 'lock-to-caps-man': KeyInfo(default=False), + 'slaves-datapath': KeyInfo(), + 'slaves-static': KeyInfo(), + }, + )), + ], + ), + ('interface', 'wifiwave2', 'capsman'): APIData( + versioned=[ + ('7.13', '>=', 'RouterOS 7.13 uses WiFi package'), + ('7.8', '>=', VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'ca-certificate': KeyInfo(default=''), + 'certificate': KeyInfo(default='none'), + 'enabled': KeyInfo(default=False), + 'package-path': KeyInfo(default=''), + 'require-peer-certificate': KeyInfo(default=False), + 'upgrade-policy': KeyInfo(default='none'), + 'interfaces': KeyInfo(default=''), + }, + )), + ], + ), + ('interface', 'wifiwave2', 'channel'): APIData( + versioned=[ + ('7.13', '>=', 'RouterOS 7.13 uses WiFi package'), + ('7.8', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'band': KeyInfo(), + 'frequency': KeyInfo(), + 'name': KeyInfo(), + 'secondary-frequency': KeyInfo(), + 'skip-dfs-channels': KeyInfo(default='disabled'), + 'width': KeyInfo(), + }, + )), + ], + ), + ('interface', 'wifiwave2', 'configuration'): APIData( + versioned=[ + ('7.13', '>=', 'RouterOS 7.13 uses WiFi package'), + ('7.8', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'aaa': KeyInfo(), + 'antenna-gain': KeyInfo(), + 'beacon-interval': KeyInfo(default=100), + 'chains': KeyInfo(), + 'channel': KeyInfo(), + 'country': KeyInfo(default='United States'), + 'datapath': KeyInfo(), + 'dtim-period': KeyInfo(default=1), + 'hide-ssid': KeyInfo(default=False), + 'interworking': KeyInfo(), + 'manager': KeyInfo(), + 'mode': KeyInfo(default='ap'), + 'name': KeyInfo(), + 'security': KeyInfo(), + 'ssid': KeyInfo(), + 'steering': KeyInfo(), + 'tx-chains': KeyInfo(), + 'tx-power': KeyInfo(), + }, + )), + ], + ), + ('interface', 'wifiwave2', 'datapath'): APIData( + versioned=[ + ('7.13', '>=', 'RouterOS 7.13 uses WiFi package'), + ('7.8', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'bridge': KeyInfo(), + 'bridge-cost': KeyInfo(), + 'bridge-horizon': KeyInfo(), + 'client-isolation': KeyInfo(default=False), + 'interface-list': KeyInfo(), + 'name': KeyInfo(), + 'openflow-switch': KeyInfo(), + 'vlan-id': KeyInfo(), + }, + )), + ], + ), + ('interface', 'wifiwave2', 'interworking'): APIData( + versioned=[ + ('7.13', '>=', 'RouterOS 7.13 uses WiFi package'), + ('7.8', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + '3gpp-info': KeyInfo(), + 'authentication-types': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'connection-capabilities': KeyInfo(), + 'disabled': KeyInfo(default=False), + 'domain-names': KeyInfo(), + 'esr': KeyInfo(), + 'hessid': KeyInfo(), + 'hotspot20': KeyInfo(), + 'hotspot20-dgaf': KeyInfo(), + 'internet': KeyInfo(), + 'ipv4-availability': KeyInfo(), + 'ipv6-availability': KeyInfo(), + 'name': KeyInfo(), + 'network-type': KeyInfo(), + 'operational-classes': KeyInfo(), + 'operator-names': KeyInfo(), + 'realms': KeyInfo(), + 'roaming-ois': KeyInfo(), + 'uesa': KeyInfo(), + 'venue': KeyInfo(), + 'venue-names': KeyInfo(), + 'wan-at-capacity': KeyInfo(), + 'wan-downlink': KeyInfo(), + 'wan-downlink-load': KeyInfo(), + 'wan-measurement-duration': KeyInfo(), + 'wan-status': KeyInfo(), + 'wan-symmetric': KeyInfo(), + 'wan-uplink': KeyInfo(), + 'wan-uplink-load': KeyInfo(), + }, + )), + ], + ), + ('interface', 'wifiwave2', 'provisioning'): APIData( + versioned=[ + ('7.13', '>=', 'RouterOS 7.13 uses WiFi package'), + ('7.8', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('action', ), + fields={ + 'action': KeyInfo(default='none'), + 'address-ranges': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'common-name-regexp': KeyInfo(), + 'disabled': KeyInfo(default=False), + 'identity-regexp': KeyInfo(), + 'master-configuration': KeyInfo(), + 'name-format': KeyInfo(), + 'radio-mac': KeyInfo(), + 'slave-configurations': KeyInfo(), + 'supported-bands': KeyInfo(), + }, + )), + ], + ), + ('interface', 'wifiwave2', 'security'): APIData( + versioned=[ + ('7.13', '>=', 'RouterOS 7.13 uses WiFi package'), + ('7.8', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'authentication-types': KeyInfo(), + 'connect-group': KeyInfo(can_disable=True), + 'connect-priority': KeyInfo(), + 'dh-groups': KeyInfo(), + 'disable-pmkid': KeyInfo(default=False), + 'eap-accounting': KeyInfo(default=False), + 'eap-anonymous-identity': KeyInfo(), + 'eap-certificate-mode': KeyInfo(default='dont-verify-certificate'), + 'eap-methods': KeyInfo(), + 'eap-password': KeyInfo(), + 'eap-tls-certificate': KeyInfo(), + 'eap-username': KeyInfo(), + 'encryption': KeyInfo(default='ccmp'), + 'ft-mobility-domain': KeyInfo(default=0xADC4), + 'ft-nas-identifier': KeyInfo(), + 'ft-over-ds': KeyInfo(default=False), + 'ft-preserve-vlanid': KeyInfo(default=True), + 'ft-r0-key-lifetime': KeyInfo(default='600000s'), + 'ft-reassociation-deadline': KeyInfo(default='20s'), + 'ft': KeyInfo(default=False), + 'group-encryption': KeyInfo(default='ccmp'), + 'group-key-update': KeyInfo(default='24h'), + 'management-encryption': KeyInfo(default='cmac'), + 'management-protection': KeyInfo(), + 'name': KeyInfo(), + 'owe-transition-interface': KeyInfo(), + 'passphrase': KeyInfo(default=''), + 'sae-anti-clogging-threshold': KeyInfo(can_disable=True), + 'sae-max-failure-rate': KeyInfo(can_disable=True), + 'sae-pwe': KeyInfo(default='both'), + 'wps': KeyInfo(default='push-button'), + }, + )), + ], + ), + ('interface', 'wifiwave2', 'steering'): APIData( + versioned=[ + ('7.13', '>=', 'RouterOS 7.13 uses WiFi package'), + ('7.8', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'name': KeyInfo(), + 'neighbor-group': KeyInfo(), + 'rrm': KeyInfo(), + 'wnm': KeyInfo(), + }, + )), + ], ), ('interface', 'wireguard'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'listen-port': KeyInfo(), - 'mtu': KeyInfo(default=1420), - 'name': KeyInfo(), - 'private-key': KeyInfo(), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'listen-port': KeyInfo(), + 'mtu': KeyInfo(default=1420), + 'name': KeyInfo(), + 'private-key': KeyInfo(), + }, + ), ), ('interface', 'wireguard', 'peers'): APIData( - fully_understood=True, - primary_keys=('public-key', 'interface'), - fields={ - 'allowed-address': KeyInfo(required=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'endpoint-address': KeyInfo(default=''), - 'endpoint-port': KeyInfo(default=0), - 'interface': KeyInfo(), - 'persistent-keepalive': KeyInfo(can_disable=True, remove_value=0), - 'preshared-key': KeyInfo(can_disable=True, remove_value=''), - 'public-key': KeyInfo(), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('public-key', 'interface'), + fields={ + 'allowed-address': KeyInfo(required=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'endpoint-address': KeyInfo(default=''), + 'endpoint-port': KeyInfo(default=0), + 'interface': KeyInfo(), + 'persistent-keepalive': KeyInfo(can_disable=True, remove_value=0), + 'preshared-key': KeyInfo(can_disable=True, remove_value=''), + 'public-key': KeyInfo(), + }, + ), + ), + ('interface', 'wireless'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + required_one_of=[['default-name', 'master-interface']], + fields={ + 'adaptive-noise-immunity': KeyInfo(default='none'), + 'allow-sharedkey': KeyInfo(default=False), + 'ampdu-priorities': KeyInfo(default=0), + 'amsdu-limit': KeyInfo(default=8192), + 'amsdu-threshold': KeyInfo(default=8192), + 'antenna-gain': KeyInfo(default=0), + 'antenna-mode': KeyInfo(), + 'area': KeyInfo(default=''), + 'arp': KeyInfo(default='enabled'), + 'arp-timeout': KeyInfo(default='auto'), + 'band': KeyInfo(), + 'basic-rates-a/g': KeyInfo(default='6Mbps'), + 'basic-rates-b': KeyInfo(default='1Mbps'), + 'bridge-mode': KeyInfo(default='enabled'), + 'channel-width': KeyInfo(default='20mhz'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'compression': KeyInfo(default=False), + 'country': KeyInfo(default='etsi'), + 'default-ap-tx-limit': KeyInfo(default=0), + 'default-authentication': KeyInfo(default=True), + 'default-client-tx-limit': KeyInfo(default=0), + 'default-forwarding': KeyInfo(default=True), + 'default-name': KeyInfo(), + 'disable-running-check': KeyInfo(default=False), + 'disabled': KeyInfo(default=True), + 'disconnect-timeout': KeyInfo(default='3s'), + 'distance': KeyInfo(default='dynamic'), + 'frame-lifetime': KeyInfo(default=0), + 'frequency': KeyInfo(), + 'frequency-mode': KeyInfo(default='regulatory-domain'), + 'frequency-offset': KeyInfo(default=0), + 'guard-interval': KeyInfo(default='any'), + 'hide-ssid': KeyInfo(default=False), + 'ht-basic-mcs': KeyInfo(), + 'ht-supported-mcs': KeyInfo(), + 'hw-fragmentation-threshold': KeyInfo(default='disabled'), + 'hw-protection-mode': KeyInfo(default='none'), + 'hw-protection-threshold': KeyInfo(default=0), + 'hw-retries': KeyInfo(default=7), + 'installation': KeyInfo(default='any'), + 'interworking-profile': KeyInfo(default='disabled'), + 'keepalive-frames': KeyInfo(default='enabled'), + 'l2mtu': KeyInfo(default=1600), + 'mac-address': KeyInfo(), + 'master-interface': KeyInfo(), + 'max-station-count': KeyInfo(default=2007), + 'mode': KeyInfo(default='ap-bridge'), + 'mtu': KeyInfo(default=1500), + 'multicast-buffering': KeyInfo(default='enabled'), + 'multicast-helper': KeyInfo(default='default'), + 'name': KeyInfo(), + 'noise-floor-threshold': KeyInfo(default='default'), + 'nv2-cell-radius': KeyInfo(default=30), + 'nv2-downlink-ratio': KeyInfo(default=50), + 'nv2-mode': KeyInfo(default='dynamic-downlink'), + 'nv2-noise-floor-offset': KeyInfo(default='default'), + 'nv2-preshared-key': KeyInfo(default=''), + 'nv2-qos': KeyInfo(default='default'), + 'nv2-queue-count': KeyInfo(default=2), + 'nv2-security': KeyInfo(default='disabled'), + 'nv2-sync-secret': KeyInfo(default=''), + 'on-fail-retry-time': KeyInfo(default='100ms'), + 'preamble-mode': KeyInfo(default='both'), + 'radio-name': KeyInfo(), + 'rate-selection': KeyInfo(default='advanced'), + 'rate-set': KeyInfo(default='default'), + 'running': KeyInfo(read_only=True), + 'rx-chains': KeyInfo(default='0,1'), + 'scan-list': KeyInfo(default='default'), + 'secondary-frequency': KeyInfo(default=''), + 'security-profile': KeyInfo(default='default'), + 'skip-dfs-channels': KeyInfo(default='disabled'), + 'ssid': KeyInfo(required=True), + 'station-bridge-clone-mac': KeyInfo(), + 'station-roaming': KeyInfo(default='disabled'), + 'supported-rates-a/g': KeyInfo(), + 'supported-rates-b': KeyInfo(), + 'tdma-period-size': KeyInfo(default=2), + 'tx-chains': KeyInfo(), + 'tx-power': KeyInfo(default=''), + 'tx-power-mode': KeyInfo(default='default'), + 'update-stats-interval': KeyInfo(default='disabled'), + 'vlan-id': KeyInfo(default=1), + 'vlan-mode': KeyInfo(default='no-tag'), + 'wds-cost-range': KeyInfo(default='50-150'), + 'wds-default-bridge': KeyInfo(default='none'), + 'wds-default-cost': KeyInfo(default=100), + 'wds-ignore-ssid': KeyInfo(default=False), + 'wds-mode': KeyInfo(default='disabled'), + 'wireless-protocol': KeyInfo(default='any'), + 'wmm-support': KeyInfo(default='disabled'), + 'wps-mode': KeyInfo(default='push-button'), + }, + ), ), ('interface', 'wireless', 'align'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'active-mode': KeyInfo(default=True), - 'audio-max': KeyInfo(default=-20), - 'audio-min': KeyInfo(default=-100), - 'audio-monitor': KeyInfo(default='00:00:00:00:00:00'), - 'filter-mac': KeyInfo(default='00:00:00:00:00:00'), - 'frame-size': KeyInfo(default=300), - 'frames-per-second': KeyInfo(default=25), - 'receive-all': KeyInfo(default=False), - 'ssid-all': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'active-mode': KeyInfo(default=True), + 'audio-max': KeyInfo(default=-20), + 'audio-min': KeyInfo(default=-100), + 'audio-monitor': KeyInfo(default='00:00:00:00:00:00'), + 'filter-mac': KeyInfo(default='00:00:00:00:00:00'), + 'frame-size': KeyInfo(default=300), + 'frames-per-second': KeyInfo(default=25), + 'receive-all': KeyInfo(default=False), + 'ssid-all': KeyInfo(default=False), + }, + ), ), ('interface', 'wireless', 'cap'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'bridge': KeyInfo(default='none'), - 'caps-man-addresses': KeyInfo(default=''), - 'caps-man-certificate-common-names': KeyInfo(default=''), - 'caps-man-names': KeyInfo(default=''), - 'certificate': KeyInfo(default='none'), - 'discovery-interfaces': KeyInfo(default=''), - 'enabled': KeyInfo(default=False), - 'interfaces': KeyInfo(default=''), - 'lock-to-caps-man': KeyInfo(default=False), - 'static-virtual': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'bridge': KeyInfo(default='none'), + 'caps-man-addresses': KeyInfo(default=''), + 'caps-man-certificate-common-names': KeyInfo(default=''), + 'caps-man-names': KeyInfo(default=''), + 'certificate': KeyInfo(default='none'), + 'discovery-interfaces': KeyInfo(default=''), + 'enabled': KeyInfo(default=False), + 'interfaces': KeyInfo(default=''), + 'lock-to-caps-man': KeyInfo(default=False), + 'static-virtual': KeyInfo(default=False), + }, + ), + ), + ('interface', 'wireless', 'security-profiles'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'authentication-types': KeyInfo(), + 'disable-pmkid': KeyInfo(default=False), + 'disabled': KeyInfo(default=True), + 'eap-methods': KeyInfo(), + 'group-ciphers': KeyInfo(), + 'group-key-update': KeyInfo(default='5m'), + 'interim-update': KeyInfo(), + 'management-protection': KeyInfo(default='disabled'), + 'management-protection-key': KeyInfo(default=''), + 'mode': KeyInfo(default='none'), + 'mschapv2-password': KeyInfo(default=''), + 'mschapv2-username': KeyInfo(default=''), + 'name': KeyInfo(), + 'radius-called-format': KeyInfo(), + 'radius-eap-accounting': KeyInfo(default=False), + 'radius-mac-accounting': KeyInfo(default=False), + 'radius-mac-authentication': KeyInfo(default=False), + 'radius-mac-caching': KeyInfo(default='disabled'), + 'radius-mac-format': KeyInfo(default='XX:XX:XX:XX:XX:XX'), + 'radius-mac-mode': KeyInfo(default='as-username'), + 'static-algo-0': KeyInfo(default='none'), + 'static-algo-1': KeyInfo(default='none'), + 'static-algo-2': KeyInfo(default='none'), + 'static-algo-3': KeyInfo(default='none'), + 'static-key-0': KeyInfo(), + 'static-key-1': KeyInfo(), + 'static-key-2': KeyInfo(), + 'static-key-3': KeyInfo(), + 'static-sta-private-algo': KeyInfo(default='none'), + 'static-sta-private-key': KeyInfo(), + 'static-transmit-key': KeyInfo(), + 'supplicant-identity': KeyInfo(default='MikroTik'), + 'tls-certificate': KeyInfo(default='none'), + 'tls-mode': KeyInfo(), + 'unicast-ciphers': KeyInfo(), + 'wpa-pre-shared-key': KeyInfo(), + 'wpa2-pre-shared-key': KeyInfo(), + }, + ), ), ('interface', 'wireless', 'sniffer'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'channel-time': KeyInfo(default='200ms'), - 'file-limit': KeyInfo(default=10), - 'file-name': KeyInfo(default=''), - 'memory-limit': KeyInfo(default=10), - 'multiple-channels': KeyInfo(default=False), - 'only-headers': KeyInfo(default=False), - 'receive-errors': KeyInfo(default=False), - 'streaming-enabled': KeyInfo(default=False), - 'streaming-max-rate': KeyInfo(default=0), - 'streaming-server': KeyInfo(default='0.0.0.0'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'channel-time': KeyInfo(default='200ms'), + 'file-limit': KeyInfo(default=10), + 'file-name': KeyInfo(default=''), + 'memory-limit': KeyInfo(default=10), + 'multiple-channels': KeyInfo(default=False), + 'only-headers': KeyInfo(default=False), + 'receive-errors': KeyInfo(default=False), + 'streaming-enabled': KeyInfo(default=False), + 'streaming-max-rate': KeyInfo(default=0), + 'streaming-server': KeyInfo(default='0.0.0.0'), + }, + ), ), ('interface', 'wireless', 'snooper'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'channel-time': KeyInfo(default='200ms'), - 'multiple-channels': KeyInfo(default=True), - 'receive-errors': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'channel-time': KeyInfo(default='200ms'), + 'multiple-channels': KeyInfo(default=True), + 'receive-errors': KeyInfo(default=False), + }, + ), + ), + ('iot', 'modbus'): APIData( + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'disabled': KeyInfo(default=True), + 'hardware-port': KeyInfo(default='modbus'), + 'tcp-port': KeyInfo(default=502), + 'timeout': KeyInfo(default=1000), + }, + ), ), ('ip', 'accounting'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'account-local-traffic': KeyInfo(default=False), - 'enabled': KeyInfo(default=False), - 'threshold': KeyInfo(default=256), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'account-local-traffic': KeyInfo(default=False), + 'enabled': KeyInfo(default=False), + 'threshold': KeyInfo(default=256), + }, + ), ), ('ip', 'accounting', 'web-access'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'accessible-via-web': KeyInfo(default=False), - 'address': KeyInfo(default='0.0.0.0/0'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'accessible-via-web': KeyInfo(default=False), + 'address': KeyInfo(default='0.0.0.0/0'), + }, + ), ), ('ip', 'address'): APIData( - fully_understood=True, - primary_keys=('address', 'interface', ), - fields={ - 'address': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'interface': KeyInfo(), - 'network': KeyInfo(automatically_computed_from=('address', )), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('address', 'interface', ), + fields={ + 'address': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interface': KeyInfo(), + 'network': KeyInfo(automatically_computed_from=('address', )), + }, + ), ), ('ip', 'arp'): APIData( - fully_understood=True, - fields={ - 'address': KeyInfo(default='0.0.0.0'), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'interface': KeyInfo(required=True), - 'mac-address': KeyInfo(default='00:00:00:00:00:00'), - 'published': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'address': KeyInfo(default='0.0.0.0'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interface': KeyInfo(required=True), + 'mac-address': KeyInfo(default='00:00:00:00:00:00'), + 'published': KeyInfo(default=False), + }, + ), ), ('ip', 'cloud'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'ddns-enabled': KeyInfo(default=False), - 'ddns-update-interval': KeyInfo(default='none'), - 'update-time': KeyInfo(default=True), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'ddns-enabled': KeyInfo(default=False), + 'ddns-update-interval': KeyInfo(default='none'), + 'update-time': KeyInfo(default=True), + }, + ), ), ('ip', 'cloud', 'advanced'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'use-local-address': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'use-local-address': KeyInfo(default=False), + }, + ), ), ('ip', 'dhcp-client'): APIData( - fully_understood=True, - primary_keys=('interface', ), - fields={ - 'add-default-route': KeyInfo(default=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'default-route-distance': KeyInfo(default=1), - 'dhcp-options': KeyInfo(default='hostname,clientid', can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'interface': KeyInfo(), - 'script': KeyInfo(can_disable=True), - 'use-peer-dns': KeyInfo(default=True), - 'use-peer-ntp': KeyInfo(default=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('interface', ), + fields={ + 'add-default-route': KeyInfo(default=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'default-route-distance': KeyInfo(default=1), + 'dhcp-options': KeyInfo(default='hostname,clientid', can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interface': KeyInfo(), + 'script': KeyInfo(can_disable=True), + 'use-peer-dns': KeyInfo(default=True), + 'use-peer-ntp': KeyInfo(default=True), + }, + ), ), ('ip', 'dhcp-server', 'config'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'accounting': KeyInfo(default=True), - 'interim-update': KeyInfo(default='0s'), - 'store-leases-disk': KeyInfo(default='5m'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'accounting': KeyInfo(default=True), + 'interim-update': KeyInfo(default='0s'), + 'store-leases-disk': KeyInfo(default='5m'), + }, + ), ), ('ip', 'dhcp-server', 'lease'): APIData( - fully_understood=True, - primary_keys=('server', 'address', ), - fields={ - 'address': KeyInfo(), - 'address-lists': KeyInfo(default=''), - 'always-broadcast': KeyInfo(), - 'client-id': KeyInfo(can_disable=True, remove_value=''), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'dhcp-option': KeyInfo(default=''), - 'disabled': KeyInfo(default=False), - 'insert-queue-before': KeyInfo(can_disable=True), - 'mac-address': KeyInfo(can_disable=True, remove_value=''), - 'server': KeyInfo(absent_value='all'), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('server', 'address', ), + fields={ + 'address': KeyInfo(), + 'address-lists': KeyInfo(default=''), + 'always-broadcast': KeyInfo(), + 'client-id': KeyInfo(can_disable=True, remove_value=''), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'dhcp-option': KeyInfo(default=''), + 'disabled': KeyInfo(default=False), + 'insert-queue-before': KeyInfo(can_disable=True), + 'mac-address': KeyInfo(can_disable=True, remove_value=''), + 'server': KeyInfo(absent_value='all'), + }, + ), ), ('ip', 'dhcp-server', 'network'): APIData( - fully_understood=True, - primary_keys=('address', ), - fields={ - 'address': KeyInfo(), - 'boot-file-name': KeyInfo(default=''), - 'caps-manager': KeyInfo(default=''), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'dhcp-option': KeyInfo(default=''), - 'dhcp-option-set': KeyInfo(default=''), - 'dns-none': KeyInfo(default=False), - 'dns-server': KeyInfo(default=''), - 'domain': KeyInfo(default=''), - 'gateway': KeyInfo(default=''), - 'netmask': KeyInfo(can_disable=True, remove_value=0), - 'next-server': KeyInfo(can_disable=True), - 'ntp-server': KeyInfo(default=''), - 'wins-server': KeyInfo(default=''), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('address', ), + fields={ + 'address': KeyInfo(), + 'boot-file-name': KeyInfo(default=''), + 'caps-manager': KeyInfo(default=''), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'dhcp-option': KeyInfo(default=''), + 'dhcp-option-set': KeyInfo(default=''), + 'dns-none': KeyInfo(default=False), + 'dns-server': KeyInfo(default=''), + 'domain': KeyInfo(default=''), + 'gateway': KeyInfo(default=''), + 'netmask': KeyInfo(can_disable=True, remove_value=0), + 'next-server': KeyInfo(can_disable=True), + 'ntp-server': KeyInfo(default=''), + 'wins-server': KeyInfo(default=''), + }, + ), + ), + ('ip', 'dhcp-server', 'option'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name',), + fields={ + 'code': KeyInfo(required=True), + 'name': KeyInfo(), + 'value': KeyInfo(default=''), + 'force': KeyInfo(), + }, + ), + ), + ('ip', 'dhcp-server', 'option', 'sets'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name',), + fields={ + 'name': KeyInfo(required=True), + 'options': KeyInfo(), + }, + ), ), ('ip', 'dns'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'allow-remote-requests': KeyInfo(), - 'cache-max-ttl': KeyInfo(default='1w'), - 'cache-size': KeyInfo(default='2048KiB'), - 'max-concurrent-queries': KeyInfo(default=100), - 'max-concurrent-tcp-sessions': KeyInfo(default=20), - 'max-udp-packet-size': KeyInfo(default=4096), - 'query-server-timeout': KeyInfo(default='2s'), - 'query-total-timeout': KeyInfo(default='10s'), - 'servers': KeyInfo(default=''), - 'use-doh-server': KeyInfo(default=''), - 'verify-doh-cert': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + versioned_fields=[ + ([('7.8', '>=')], 'doh-max-concurrent-queries', KeyInfo(default=50)), + ([('7.8', '>=')], 'doh-max-server-connections', KeyInfo(default=5)), + ([('7.8', '>=')], 'doh-timeout', KeyInfo(default='5s')), + ], + fields={ + 'allow-remote-requests': KeyInfo(), + 'cache-max-ttl': KeyInfo(default='1w'), + 'cache-size': KeyInfo(default='2048KiB'), + 'max-concurrent-queries': KeyInfo(default=100), + 'max-concurrent-tcp-sessions': KeyInfo(default=20), + 'max-udp-packet-size': KeyInfo(default=4096), + 'query-server-timeout': KeyInfo(default='2s'), + 'query-total-timeout': KeyInfo(default='10s'), + 'servers': KeyInfo(default=''), + 'use-doh-server': KeyInfo(default=''), + 'verify-doh-cert': KeyInfo(default=False), + }, + ), ), ('ip', 'dns', 'static'): APIData( - fully_understood=True, - required_one_of=[['name', 'regexp']], - mutually_exclusive=[['name', 'regexp']], - fields={ - 'address': KeyInfo(), - 'cname': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'forward-to': KeyInfo(), - 'mx-exchange': KeyInfo(), - 'mx-preference': KeyInfo(), - 'name': KeyInfo(), - 'ns': KeyInfo(), - 'regexp': KeyInfo(), - 'srv-port': KeyInfo(), - 'srv-priority': KeyInfo(), - 'srv-target': KeyInfo(), - 'srv-weight': KeyInfo(), - 'text': KeyInfo(), - 'ttl': KeyInfo(default='1d'), - 'type': KeyInfo(), - }, + unversioned=VersionedAPIData( + fully_understood=True, + required_one_of=[['name', 'regexp']], + mutually_exclusive=[['name', 'regexp']], + versioned_fields=[ + ([('7.5', '>=')], 'address-list', KeyInfo()), + ([('7.5', '>=')], 'match-subdomain', KeyInfo(default=False)), + ], + fields={ + 'address': KeyInfo(), + 'cname': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'forward-to': KeyInfo(), + 'mx-exchange': KeyInfo(), + 'mx-preference': KeyInfo(), + 'name': KeyInfo(), + 'ns': KeyInfo(), + 'regexp': KeyInfo(), + 'srv-port': KeyInfo(), + 'srv-priority': KeyInfo(), + 'srv-target': KeyInfo(), + 'srv-weight': KeyInfo(), + 'text': KeyInfo(), + 'ttl': KeyInfo(default='1d'), + 'type': KeyInfo(), + }, + ), ), ('ip', 'firewall', 'address-list'): APIData( - fully_understood=True, - primary_keys=('address', 'list', ), - fields={ - 'address': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'list': KeyInfo(), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('address', 'list', ), + fields={ + 'address': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'list': KeyInfo(), + }, + ), ), ('ip', 'firewall', 'filter'): APIData( - fully_understood=True, - stratify_keys=('chain', ), - fields={ - 'action': KeyInfo(), - 'chain': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'connection-bytes': KeyInfo(can_disable=True), - 'connection-limit': KeyInfo(can_disable=True), - 'connection-mark': KeyInfo(can_disable=True), - 'connection-nat-state': KeyInfo(can_disable=True), - 'connection-rate': KeyInfo(can_disable=True), - 'connection-state': KeyInfo(can_disable=True), - 'connection-type': KeyInfo(can_disable=True), - 'content': KeyInfo(can_disable=True), - 'disabled': KeyInfo(), - 'dscp': KeyInfo(can_disable=True), - 'dst-address': KeyInfo(can_disable=True), - 'dst-address-list': KeyInfo(can_disable=True), - 'dst-address-type': KeyInfo(can_disable=True), - 'dst-limit': KeyInfo(can_disable=True), - 'dst-port': KeyInfo(can_disable=True), - 'fragment': KeyInfo(can_disable=True), - 'hotspot': KeyInfo(can_disable=True), - 'hw-offload': KeyInfo(can_disable=True), - 'icmp-options': KeyInfo(can_disable=True), - 'in-bridge-port': KeyInfo(can_disable=True), - 'in-bridge-port-list': KeyInfo(can_disable=True), - 'in-interface': KeyInfo(can_disable=True), - 'in-interface-list': KeyInfo(can_disable=True), - 'ingress-priority': KeyInfo(can_disable=True), - 'ipsec-policy': KeyInfo(can_disable=True), - 'ipv4-options': KeyInfo(can_disable=True), - 'jump-target': KeyInfo(), - 'layer7-protocol': KeyInfo(can_disable=True), - 'limit': KeyInfo(can_disable=True), - 'log': KeyInfo(), - 'log-prefix': KeyInfo(), - 'nth': KeyInfo(can_disable=True), - 'out-bridge-port': KeyInfo(can_disable=True), - 'out-bridge-port-list': KeyInfo(can_disable=True), - 'out-interface': KeyInfo(can_disable=True), - 'out-interface-list': KeyInfo(can_disable=True), - 'p2p': KeyInfo(can_disable=True), - 'packet-mark': KeyInfo(can_disable=True), - 'packet-size': KeyInfo(can_disable=True), - 'per-connection-classifier': KeyInfo(can_disable=True), - 'port': KeyInfo(can_disable=True), - 'priority': KeyInfo(can_disable=True), - 'protocol': KeyInfo(can_disable=True), - 'psd': KeyInfo(can_disable=True), - 'random': KeyInfo(can_disable=True), - 'reject-with': KeyInfo(), - 'routing-mark': KeyInfo(can_disable=True), - 'routing-table': KeyInfo(can_disable=True), - 'src-address': KeyInfo(can_disable=True), - 'src-address-list': KeyInfo(can_disable=True), - 'src-address-type': KeyInfo(can_disable=True), - 'src-mac-address': KeyInfo(can_disable=True), - 'src-port': KeyInfo(can_disable=True), - 'tcp-flags': KeyInfo(can_disable=True), - 'tcp-mss': KeyInfo(can_disable=True), - 'time': KeyInfo(can_disable=True), - 'tls-host': KeyInfo(can_disable=True), - 'ttl': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + stratify_keys=('chain', ), + fields={ + 'action': KeyInfo(), + 'address-list': KeyInfo(can_disable=True), + 'address-list-timeout': KeyInfo(can_disable=True), + 'chain': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'connection-bytes': KeyInfo(can_disable=True), + 'connection-limit': KeyInfo(can_disable=True), + 'connection-mark': KeyInfo(can_disable=True), + 'connection-nat-state': KeyInfo(can_disable=True), + 'connection-rate': KeyInfo(can_disable=True), + 'connection-state': KeyInfo(can_disable=True), + 'connection-type': KeyInfo(can_disable=True), + 'content': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'dscp': KeyInfo(can_disable=True), + 'dst-address': KeyInfo(can_disable=True), + 'dst-address-list': KeyInfo(can_disable=True), + 'dst-address-type': KeyInfo(can_disable=True), + 'dst-limit': KeyInfo(can_disable=True), + 'dst-port': KeyInfo(can_disable=True), + 'fragment': KeyInfo(can_disable=True), + 'hotspot': KeyInfo(can_disable=True), + 'hw-offload': KeyInfo(can_disable=True), + 'icmp-options': KeyInfo(can_disable=True), + 'in-bridge-port': KeyInfo(can_disable=True), + 'in-bridge-port-list': KeyInfo(can_disable=True), + 'in-interface': KeyInfo(can_disable=True), + 'in-interface-list': KeyInfo(can_disable=True), + 'ingress-priority': KeyInfo(can_disable=True), + 'ipsec-policy': KeyInfo(can_disable=True), + 'ipv4-options': KeyInfo(can_disable=True), + 'jump-target': KeyInfo(can_disable=True), + 'layer7-protocol': KeyInfo(can_disable=True), + 'limit': KeyInfo(can_disable=True), + 'log': KeyInfo(can_disable=True), + 'log-prefix': KeyInfo(can_disable=True), + 'nth': KeyInfo(can_disable=True), + 'out-bridge-port': KeyInfo(can_disable=True), + 'out-bridge-port-list': KeyInfo(can_disable=True), + 'out-interface': KeyInfo(can_disable=True), + 'out-interface-list': KeyInfo(can_disable=True), + 'p2p': KeyInfo(can_disable=True), + 'packet-mark': KeyInfo(can_disable=True), + 'packet-size': KeyInfo(can_disable=True), + 'per-connection-classifier': KeyInfo(can_disable=True), + 'port': KeyInfo(can_disable=True), + 'priority': KeyInfo(can_disable=True), + 'protocol': KeyInfo(can_disable=True), + 'psd': KeyInfo(can_disable=True), + 'random': KeyInfo(can_disable=True), + 'realm': KeyInfo(can_disable=True), + 'reject-with': KeyInfo(can_disable=True), + 'routing-mark': KeyInfo(can_disable=True), + 'routing-table': KeyInfo(can_disable=True), + 'src-address': KeyInfo(can_disable=True), + 'src-address-list': KeyInfo(can_disable=True), + 'src-address-type': KeyInfo(can_disable=True), + 'src-mac-address': KeyInfo(can_disable=True), + 'src-port': KeyInfo(can_disable=True), + 'tcp-flags': KeyInfo(can_disable=True), + 'tcp-mss': KeyInfo(can_disable=True), + 'time': KeyInfo(can_disable=True), + 'tls-host': KeyInfo(can_disable=True), + 'ttl': KeyInfo(can_disable=True), + }, + ), ), ('ip', 'firewall', 'mangle'): APIData( - fully_understood=True, - stratify_keys=('chain', ), - fields={ - 'action': KeyInfo(), - 'chain': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'connection-bytes': KeyInfo(can_disable=True), - 'connection-limit': KeyInfo(can_disable=True), - 'connection-mark': KeyInfo(can_disable=True), - 'connection-nat-state': KeyInfo(can_disable=True), - 'connection-rate': KeyInfo(can_disable=True), - 'connection-state': KeyInfo(can_disable=True), - 'connection-type': KeyInfo(can_disable=True), - 'content': KeyInfo(can_disable=True), - 'disabled': KeyInfo(), - 'dscp': KeyInfo(can_disable=True), - 'dst-address': KeyInfo(can_disable=True), - 'dst-address-list': KeyInfo(can_disable=True), - 'dst-address-type': KeyInfo(can_disable=True), - 'dst-limit': KeyInfo(can_disable=True), - 'dst-port': KeyInfo(can_disable=True), - 'fragment': KeyInfo(can_disable=True), - 'hotspot': KeyInfo(can_disable=True), - 'icmp-options': KeyInfo(can_disable=True), - 'in-bridge-port': KeyInfo(can_disable=True), - 'in-bridge-port-list': KeyInfo(can_disable=True), - 'in-interface': KeyInfo(can_disable=True), - 'in-interface-list': KeyInfo(can_disable=True), - 'ingress-priority': KeyInfo(can_disable=True), - 'ipsec-policy': KeyInfo(can_disable=True), - 'ipv4-options': KeyInfo(can_disable=True), - 'jump-target': KeyInfo(), - 'layer7-protocol': KeyInfo(can_disable=True), - 'limit': KeyInfo(can_disable=True), - 'log': KeyInfo(), - 'log-prefix': KeyInfo(), - 'new-connection-mark': KeyInfo(can_disable=True), - 'new-dscp': KeyInfo(can_disable=True), - 'new-mss': KeyInfo(can_disable=True), - 'new-packet-mark': KeyInfo(can_disable=True), - 'new-priority': KeyInfo(can_disable=True), - 'new-routing-mark': KeyInfo(can_disable=True), - 'new-ttl': KeyInfo(can_disable=True), - 'nth': KeyInfo(can_disable=True), - 'out-bridge-port': KeyInfo(can_disable=True), - 'out-bridge-port-list': KeyInfo(can_disable=True), - 'out-interface': KeyInfo(can_disable=True), - 'out-interface-list': KeyInfo(can_disable=True), - 'p2p': KeyInfo(can_disable=True), - 'packet-mark': KeyInfo(can_disable=True), - 'packet-size': KeyInfo(can_disable=True), - 'passthrough': KeyInfo(can_disable=True), - 'per-connection-classifier': KeyInfo(can_disable=True), - 'port': KeyInfo(can_disable=True), - 'priority': KeyInfo(can_disable=True), - 'protocol': KeyInfo(can_disable=True), - 'psd': KeyInfo(can_disable=True), - 'random': KeyInfo(can_disable=True), - 'route-dst': KeyInfo(can_disable=True), - 'routing-mark': KeyInfo(can_disable=True), - 'routing-table': KeyInfo(can_disable=True), - 'sniff-id': KeyInfo(can_disable=True), - 'sniff-target': KeyInfo(can_disable=True), - 'sniff-target-port': KeyInfo(can_disable=True), - 'src-address': KeyInfo(can_disable=True), - 'src-address-list': KeyInfo(can_disable=True), - 'src-address-type': KeyInfo(can_disable=True), - 'src-mac-address': KeyInfo(can_disable=True), - 'src-port': KeyInfo(can_disable=True), - 'tcp-flags': KeyInfo(can_disable=True), - 'tcp-mss': KeyInfo(can_disable=True), - 'time': KeyInfo(can_disable=True), - 'tls-host': KeyInfo(can_disable=True), - 'ttl': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + stratify_keys=('chain', ), + fields={ + 'action': KeyInfo(), + 'address-list': KeyInfo(can_disable=True), + 'address-list-timeout': KeyInfo(can_disable=True), + 'chain': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'connection-bytes': KeyInfo(can_disable=True), + 'connection-limit': KeyInfo(can_disable=True), + 'connection-mark': KeyInfo(can_disable=True), + 'connection-nat-state': KeyInfo(can_disable=True), + 'connection-rate': KeyInfo(can_disable=True), + 'connection-state': KeyInfo(can_disable=True), + 'connection-type': KeyInfo(can_disable=True), + 'content': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'dscp': KeyInfo(can_disable=True), + 'dst-address': KeyInfo(can_disable=True), + 'dst-address-list': KeyInfo(can_disable=True), + 'dst-address-type': KeyInfo(can_disable=True), + 'dst-limit': KeyInfo(can_disable=True), + 'dst-port': KeyInfo(can_disable=True), + 'fragment': KeyInfo(can_disable=True), + 'hotspot': KeyInfo(can_disable=True), + 'icmp-options': KeyInfo(can_disable=True), + 'in-bridge-port': KeyInfo(can_disable=True), + 'in-bridge-port-list': KeyInfo(can_disable=True), + 'in-interface': KeyInfo(can_disable=True), + 'in-interface-list': KeyInfo(can_disable=True), + 'ingress-priority': KeyInfo(can_disable=True), + 'ipsec-policy': KeyInfo(can_disable=True), + 'ipv4-options': KeyInfo(can_disable=True), + 'jump-target': KeyInfo(can_disable=True), + 'layer7-protocol': KeyInfo(can_disable=True), + 'limit': KeyInfo(can_disable=True), + 'log': KeyInfo(can_disable=True), + 'log-prefix': KeyInfo(can_disable=True), + 'new-connection-mark': KeyInfo(can_disable=True), + 'new-dscp': KeyInfo(can_disable=True), + 'new-mss': KeyInfo(can_disable=True), + 'new-packet-mark': KeyInfo(can_disable=True), + 'new-priority': KeyInfo(can_disable=True), + 'new-routing-mark': KeyInfo(can_disable=True), + 'new-ttl': KeyInfo(can_disable=True), + 'nth': KeyInfo(can_disable=True), + 'out-bridge-port': KeyInfo(can_disable=True), + 'out-bridge-port-list': KeyInfo(can_disable=True), + 'out-interface': KeyInfo(can_disable=True), + 'out-interface-list': KeyInfo(can_disable=True), + 'p2p': KeyInfo(can_disable=True), + 'packet-mark': KeyInfo(can_disable=True), + 'packet-size': KeyInfo(can_disable=True), + 'passthrough': KeyInfo(can_disable=True), + 'per-connection-classifier': KeyInfo(can_disable=True), + 'port': KeyInfo(can_disable=True), + 'priority': KeyInfo(can_disable=True), + 'protocol': KeyInfo(can_disable=True), + 'psd': KeyInfo(can_disable=True), + 'random': KeyInfo(can_disable=True), + 'realm': KeyInfo(can_disable=True), + 'route-dst': KeyInfo(can_disable=True), + 'routing-mark': KeyInfo(can_disable=True), + 'routing-table': KeyInfo(can_disable=True), + 'sniff-id': KeyInfo(can_disable=True), + 'sniff-target': KeyInfo(can_disable=True), + 'sniff-target-port': KeyInfo(can_disable=True), + 'src-address': KeyInfo(can_disable=True), + 'src-address-list': KeyInfo(can_disable=True), + 'src-address-type': KeyInfo(can_disable=True), + 'src-mac-address': KeyInfo(can_disable=True), + 'src-port': KeyInfo(can_disable=True), + 'tcp-flags': KeyInfo(can_disable=True), + 'tcp-mss': KeyInfo(can_disable=True), + 'time': KeyInfo(can_disable=True), + 'tls-host': KeyInfo(can_disable=True), + 'ttl': KeyInfo(can_disable=True), + }, + ), ), ('ip', 'firewall', 'nat'): APIData( - fully_understood=True, - stratify_keys=('chain', ), - fields={ - 'action': KeyInfo(), - 'address-list': KeyInfo(), - 'address-list-timeout': KeyInfo(), - 'chain': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'connection-bytes': KeyInfo(can_disable=True), - 'connection-limit': KeyInfo(can_disable=True), - 'connection-mark': KeyInfo(can_disable=True), - 'connection-rate': KeyInfo(can_disable=True), - 'connection-type': KeyInfo(can_disable=True), - 'content': KeyInfo(can_disable=True), - 'disabled': KeyInfo(), - 'dscp': KeyInfo(can_disable=True), - 'dst-address': KeyInfo(can_disable=True), - 'dst-address-list': KeyInfo(can_disable=True), - 'dst-address-type': KeyInfo(can_disable=True), - 'dst-limit': KeyInfo(can_disable=True), - 'dst-port': KeyInfo(can_disable=True), - 'fragment': KeyInfo(can_disable=True), - 'hotspot': KeyInfo(can_disable=True), - 'icmp-options': KeyInfo(can_disable=True), - 'in-bridge-port': KeyInfo(can_disable=True), - 'in-bridge-port-list': KeyInfo(can_disable=True), - 'in-interface': KeyInfo(can_disable=True), - 'in-interface-list': KeyInfo(can_disable=True), - 'ingress-priority': KeyInfo(can_disable=True), - 'ipsec-policy': KeyInfo(can_disable=True), - 'ipv4-options': KeyInfo(can_disable=True), - 'jump-target': KeyInfo(), - 'layer7-protocol': KeyInfo(can_disable=True), - 'limit': KeyInfo(can_disable=True), - 'log': KeyInfo(), - 'log-prefix': KeyInfo(), - 'nth': KeyInfo(can_disable=True), - 'out-bridge-port': KeyInfo(can_disable=True), - 'out-bridge-port-list': KeyInfo(can_disable=True), - 'out-interface': KeyInfo(can_disable=True), - 'out-interface-list': KeyInfo(can_disable=True), - 'packet-mark': KeyInfo(can_disable=True), - 'packet-size': KeyInfo(can_disable=True), - 'per-connection-classifier': KeyInfo(can_disable=True), - 'port': KeyInfo(can_disable=True), - 'priority': KeyInfo(can_disable=True), - 'protocol': KeyInfo(can_disable=True), - 'psd': KeyInfo(can_disable=True), - 'random': KeyInfo(can_disable=True), - 'realm': KeyInfo(can_disable=True), - 'routing-mark': KeyInfo(can_disable=True), - 'same-not-by-dst': KeyInfo(), - 'src-address': KeyInfo(can_disable=True), - 'src-address-list': KeyInfo(can_disable=True), - 'src-address-type': KeyInfo(can_disable=True), - 'src-mac-address': KeyInfo(can_disable=True), - 'src-port': KeyInfo(can_disable=True), - 'tcp-mss': KeyInfo(can_disable=True), - 'time': KeyInfo(can_disable=True), - 'tls-host': KeyInfo(can_disable=True), - 'to-addresses': KeyInfo(can_disable=True), - 'to-ports': KeyInfo(can_disable=True), - 'ttl': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + stratify_keys=('chain', ), + fields={ + 'action': KeyInfo(), + 'address-list': KeyInfo(can_disable=True), + 'address-list-timeout': KeyInfo(can_disable=True), + 'chain': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'connection-bytes': KeyInfo(can_disable=True), + 'connection-limit': KeyInfo(can_disable=True), + 'connection-mark': KeyInfo(can_disable=True), + 'connection-rate': KeyInfo(can_disable=True), + 'connection-type': KeyInfo(can_disable=True), + 'content': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'dscp': KeyInfo(can_disable=True), + 'dst-address': KeyInfo(can_disable=True), + 'dst-address-list': KeyInfo(can_disable=True), + 'dst-address-type': KeyInfo(can_disable=True), + 'dst-limit': KeyInfo(can_disable=True), + 'dst-port': KeyInfo(can_disable=True), + 'fragment': KeyInfo(can_disable=True), + 'hotspot': KeyInfo(can_disable=True), + 'icmp-options': KeyInfo(can_disable=True), + 'in-bridge-port': KeyInfo(can_disable=True), + 'in-bridge-port-list': KeyInfo(can_disable=True), + 'in-interface': KeyInfo(can_disable=True), + 'in-interface-list': KeyInfo(can_disable=True), + 'ingress-priority': KeyInfo(can_disable=True), + 'ipsec-policy': KeyInfo(can_disable=True), + 'ipv4-options': KeyInfo(can_disable=True), + 'jump-target': KeyInfo(can_disable=True), + 'layer7-protocol': KeyInfo(can_disable=True), + 'limit': KeyInfo(can_disable=True), + 'log': KeyInfo(can_disable=True), + 'log-prefix': KeyInfo(can_disable=True), + 'nth': KeyInfo(can_disable=True), + 'out-bridge-port': KeyInfo(can_disable=True), + 'out-bridge-port-list': KeyInfo(can_disable=True), + 'out-interface': KeyInfo(can_disable=True), + 'out-interface-list': KeyInfo(can_disable=True), + 'packet-mark': KeyInfo(can_disable=True), + 'packet-size': KeyInfo(can_disable=True), + 'per-connection-classifier': KeyInfo(can_disable=True), + 'port': KeyInfo(can_disable=True), + 'priority': KeyInfo(can_disable=True), + 'protocol': KeyInfo(can_disable=True), + 'psd': KeyInfo(can_disable=True), + 'random': KeyInfo(can_disable=True), + 'randomise-ports': KeyInfo(can_disable=True), + 'realm': KeyInfo(can_disable=True), + 'routing-mark': KeyInfo(can_disable=True), + 'same-not-by-dst': KeyInfo(can_disable=True), + 'src-address': KeyInfo(can_disable=True), + 'src-address-list': KeyInfo(can_disable=True), + 'src-address-type': KeyInfo(can_disable=True), + 'src-mac-address': KeyInfo(can_disable=True), + 'src-port': KeyInfo(can_disable=True), + 'tcp-mss': KeyInfo(can_disable=True), + 'time': KeyInfo(can_disable=True), + 'tls-host': KeyInfo(can_disable=True), + 'to-addresses': KeyInfo(can_disable=True), + 'to-ports': KeyInfo(can_disable=True), + 'ttl': KeyInfo(can_disable=True), + }, + ), ), ('ip', 'firewall', 'raw'): APIData( - fully_understood=True, - stratify_keys=('chain',), - fields={ - 'action': KeyInfo(), - 'address-list': KeyInfo(), - 'address-list-timeout': KeyInfo(), - 'chain': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'content': KeyInfo(can_disable=True), - 'disabled': KeyInfo(), - 'dscp': KeyInfo(can_disable=True), - 'dst-address': KeyInfo(can_disable=True), - 'dst-address-list': KeyInfo(can_disable=True), - 'dst-address-type': KeyInfo(can_disable=True), - 'dst-limit': KeyInfo(can_disable=True), - 'dst-port': KeyInfo(can_disable=True), - 'fragment': KeyInfo(can_disable=True), - 'hotspot': KeyInfo(can_disable=True), - 'icmp-options': KeyInfo(can_disable=True), - 'in-bridge-port': KeyInfo(can_disable=True), - 'in-bridge-port-list': KeyInfo(can_disable=True), - 'in-interface': KeyInfo(can_disable=True), - 'in-interface-list': KeyInfo(can_disable=True), - 'ingress-priority': KeyInfo(can_disable=True), - 'ipsec-policy': KeyInfo(can_disable=True), - 'ipv4-options': KeyInfo(can_disable=True), - 'jump-target': KeyInfo(), - 'limit': KeyInfo(can_disable=True), - 'log': KeyInfo(), - 'log-prefix': KeyInfo(), - 'nth': KeyInfo(can_disable=True), - 'out-bridge-port': KeyInfo(can_disable=True), - 'out-bridge-port-list': KeyInfo(can_disable=True), - 'out-interface': KeyInfo(can_disable=True), - 'out-interface-list': KeyInfo(can_disable=True), - 'packet-mark': KeyInfo(can_disable=True), - 'packet-size': KeyInfo(can_disable=True), - 'per-connection-classifier': KeyInfo(can_disable=True), - 'port': KeyInfo(can_disable=True), - 'priority': KeyInfo(can_disable=True), - 'protocol': KeyInfo(can_disable=True), - 'psd': KeyInfo(can_disable=True), - 'random': KeyInfo(can_disable=True), - 'src-address': KeyInfo(can_disable=True), - 'src-address-list': KeyInfo(can_disable=True), - 'src-address-type': KeyInfo(can_disable=True), - 'src-mac-address': KeyInfo(can_disable=True), - 'src-port': KeyInfo(can_disable=True), - 'tcp-flags': KeyInfo(can_disable=True), - 'tcp-mss': KeyInfo(can_disable=True), - 'time': KeyInfo(can_disable=True), - 'tls-host': KeyInfo(can_disable=True), - 'ttl': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + stratify_keys=('chain',), + fields={ + 'action': KeyInfo(), + 'address-list': KeyInfo(can_disable=True), + 'address-list-timeout': KeyInfo(can_disable=True), + 'chain': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'content': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'dscp': KeyInfo(can_disable=True), + 'dst-address': KeyInfo(can_disable=True), + 'dst-address-list': KeyInfo(can_disable=True), + 'dst-address-type': KeyInfo(can_disable=True), + 'dst-limit': KeyInfo(can_disable=True), + 'dst-port': KeyInfo(can_disable=True), + 'fragment': KeyInfo(can_disable=True), + 'hotspot': KeyInfo(can_disable=True), + 'icmp-options': KeyInfo(can_disable=True), + 'in-bridge-port': KeyInfo(can_disable=True), + 'in-bridge-port-list': KeyInfo(can_disable=True), + 'in-interface': KeyInfo(can_disable=True), + 'in-interface-list': KeyInfo(can_disable=True), + 'ingress-priority': KeyInfo(can_disable=True), + 'ipsec-policy': KeyInfo(can_disable=True), + 'ipv4-options': KeyInfo(can_disable=True), + 'jump-target': KeyInfo(can_disable=True), + 'limit': KeyInfo(can_disable=True), + 'log': KeyInfo(can_disable=True), + 'log-prefix': KeyInfo(can_disable=True), + 'nth': KeyInfo(can_disable=True), + 'out-bridge-port': KeyInfo(can_disable=True), + 'out-bridge-port-list': KeyInfo(can_disable=True), + 'out-interface': KeyInfo(can_disable=True), + 'out-interface-list': KeyInfo(can_disable=True), + 'packet-mark': KeyInfo(can_disable=True), + 'packet-size': KeyInfo(can_disable=True), + 'per-connection-classifier': KeyInfo(can_disable=True), + 'port': KeyInfo(can_disable=True), + 'priority': KeyInfo(can_disable=True), + 'protocol': KeyInfo(can_disable=True), + 'psd': KeyInfo(can_disable=True), + 'random': KeyInfo(can_disable=True), + 'src-address': KeyInfo(can_disable=True), + 'src-address-list': KeyInfo(can_disable=True), + 'src-address-type': KeyInfo(can_disable=True), + 'src-mac-address': KeyInfo(can_disable=True), + 'src-port': KeyInfo(can_disable=True), + 'tcp-flags': KeyInfo(can_disable=True), + 'tcp-mss': KeyInfo(can_disable=True), + 'time': KeyInfo(can_disable=True), + 'tls-host': KeyInfo(can_disable=True), + 'ttl': KeyInfo(can_disable=True), + }, + ), ), ('ip', 'hotspot', 'user'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(), - 'name': KeyInfo(), - }, + unversioned=VersionedAPIData( + unknown_mechanism=True, + # primary_keys=('default', ), + fields={ + 'default': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(), + 'name': KeyInfo(), + }, + ), ), ('ip', 'ipsec', 'settings'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'accounting': KeyInfo(default=True), - 'interim-update': KeyInfo(default='0s'), - 'xauth-use-radius': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'accounting': KeyInfo(default=True), + 'interim-update': KeyInfo(default='0s'), + 'xauth-use-radius': KeyInfo(default=False), + }, + ), ), ('ip', 'proxy'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'always-from-cache': KeyInfo(default=False), - 'anonymous': KeyInfo(default=False), - 'cache-administrator': KeyInfo(default='webmaster'), - 'cache-hit-dscp': KeyInfo(default=4), - 'cache-on-disk': KeyInfo(default=False), - 'cache-path': KeyInfo(default='web-proxy'), - 'enabled': KeyInfo(default=False), - 'max-cache-object-size': KeyInfo(default='2048KiB'), - 'max-cache-size': KeyInfo(default='unlimited'), - 'max-client-connections': KeyInfo(default=600), - 'max-fresh-time': KeyInfo(default='3d'), - 'max-server-connections': KeyInfo(default=600), - 'parent-proxy': KeyInfo(default='::'), - 'parent-proxy-port': KeyInfo(default=0), - 'port': KeyInfo(default=8080), - 'serialize-connections': KeyInfo(default=False), - 'src-address': KeyInfo(default='::'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'always-from-cache': KeyInfo(default=False), + 'anonymous': KeyInfo(default=False), + 'cache-administrator': KeyInfo(default='webmaster'), + 'cache-hit-dscp': KeyInfo(default=4), + 'cache-on-disk': KeyInfo(default=False), + 'cache-path': KeyInfo(default='web-proxy'), + 'enabled': KeyInfo(default=False), + 'max-cache-object-size': KeyInfo(default='2048KiB'), + 'max-cache-size': KeyInfo(default='unlimited'), + 'max-client-connections': KeyInfo(default=600), + 'max-fresh-time': KeyInfo(default='3d'), + 'max-server-connections': KeyInfo(default=600), + 'parent-proxy': KeyInfo(default='::'), + 'parent-proxy-port': KeyInfo(default=0), + 'port': KeyInfo(default=8080), + 'serialize-connections': KeyInfo(default=False), + 'src-address': KeyInfo(default='::'), + }, + ), ), ('ip', 'smb'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'allow-guests': KeyInfo(default=True), - 'comment': KeyInfo(default='MikrotikSMB'), - 'domain': KeyInfo(default='MSHOME'), - 'enabled': KeyInfo(default=False), - 'interfaces': KeyInfo(default='all'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'allow-guests': KeyInfo(default=True), + 'comment': KeyInfo(default='MikrotikSMB'), + 'domain': KeyInfo(default='MSHOME'), + 'enabled': KeyInfo(default=False), + 'interfaces': KeyInfo(default='all'), + }, + ), ), ('ip', 'smb', 'shares'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'directory': KeyInfo(), - 'disabled': KeyInfo(), - 'max-sessions': KeyInfo(), - 'name': KeyInfo(), - }, + unversioned=VersionedAPIData( + unknown_mechanism=True, + # primary_keys=('default', ), + fields={ + 'default': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'directory': KeyInfo(), + 'disabled': KeyInfo(), + 'max-sessions': KeyInfo(), + 'name': KeyInfo(), + }, + ), ), ('ip', 'smb', 'users'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'disabled': KeyInfo(), - 'name': KeyInfo(), - 'password': KeyInfo(), - 'read-only': KeyInfo(), - }, + unversioned=VersionedAPIData( + unknown_mechanism=True, + # primary_keys=('default', ), + fields={ + 'default': KeyInfo(), + 'disabled': KeyInfo(), + 'name': KeyInfo(), + 'password': KeyInfo(), + 'read-only': KeyInfo(), + }, + ), ), ('ip', 'socks'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'auth-method': KeyInfo(default='none'), - 'connection-idle-timeout': KeyInfo(default='2m'), - 'enabled': KeyInfo(default=False), - 'max-connections': KeyInfo(default=200), - 'port': KeyInfo(default=1080), - 'version': KeyInfo(default=4), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'auth-method': KeyInfo(default='none'), + 'connection-idle-timeout': KeyInfo(default='2m'), + 'enabled': KeyInfo(default=False), + 'max-connections': KeyInfo(default=200), + 'port': KeyInfo(default=1080), + 'version': KeyInfo(default=4), + }, + ), ), ('ip', 'ssh'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'allow-none-crypto': KeyInfo(default=False), - 'always-allow-password-login': KeyInfo(default=False), - 'forwarding-enabled': KeyInfo(default=False), - 'host-key-size': KeyInfo(default=2048), - 'strong-crypto': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'allow-none-crypto': KeyInfo(default=False), + 'always-allow-password-login': KeyInfo(default=False), + 'forwarding-enabled': KeyInfo(default=False), + 'host-key-size': KeyInfo(default=2048), + 'strong-crypto': KeyInfo(default=False), + }, + ), ), ('ip', 'tftp', 'settings'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'max-block-size': KeyInfo(default=4096), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'max-block-size': KeyInfo(default=4096), + }, + ), ), ('ip', 'traffic-flow'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'active-flow-timeout': KeyInfo(default='30m'), - 'cache-entries': KeyInfo(default='32k'), - 'enabled': KeyInfo(default=False), - 'inactive-flow-timeout': KeyInfo(default='15s'), - 'interfaces': KeyInfo(default='all'), - 'packet-sampling': KeyInfo(default=False), - 'sampling-interval': KeyInfo(default=0), - 'sampling-space': KeyInfo(default=0), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'active-flow-timeout': KeyInfo(default='30m'), + 'cache-entries': KeyInfo(default='32k'), + 'enabled': KeyInfo(default=False), + 'inactive-flow-timeout': KeyInfo(default='15s'), + 'interfaces': KeyInfo(default='all'), + 'packet-sampling': KeyInfo(default=False), + 'sampling-interval': KeyInfo(default=0), + 'sampling-space': KeyInfo(default=0), + }, + ), ), ('ip', 'traffic-flow', 'ipfix'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'bytes': KeyInfo(default=True), - 'dst-address': KeyInfo(default=True), - 'dst-address-mask': KeyInfo(default=True), - 'dst-mac-address': KeyInfo(default=True), - 'dst-port': KeyInfo(default=True), - 'first-forwarded': KeyInfo(default=True), - 'gateway': KeyInfo(default=True), - 'icmp-code': KeyInfo(default=True), - 'icmp-type': KeyInfo(default=True), - 'igmp-type': KeyInfo(default=True), - 'in-interface': KeyInfo(default=True), - 'ip-header-length': KeyInfo(default=True), - 'ip-total-length': KeyInfo(default=True), - 'ipv6-flow-label': KeyInfo(default=True), - 'is-multicast': KeyInfo(default=True), - 'last-forwarded': KeyInfo(default=True), - 'nat-dst-address': KeyInfo(default=True), - 'nat-dst-port': KeyInfo(default=True), - 'nat-events': KeyInfo(default=False), - 'nat-src-address': KeyInfo(default=True), - 'nat-src-port': KeyInfo(default=True), - 'out-interface': KeyInfo(default=True), - 'packets': KeyInfo(default=True), - 'protocol': KeyInfo(default=True), - 'src-address': KeyInfo(default=True), - 'src-address-mask': KeyInfo(default=True), - 'src-mac-address': KeyInfo(default=True), - 'src-port': KeyInfo(default=True), - 'sys-init-time': KeyInfo(default=True), - 'tcp-ack-num': KeyInfo(default=True), - 'tcp-flags': KeyInfo(default=True), - 'tcp-seq-num': KeyInfo(default=True), - 'tcp-window-size': KeyInfo(default=True), - 'tos': KeyInfo(default=True), - 'ttl': KeyInfo(default=True), - 'udp-length': KeyInfo(default=True), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'bytes': KeyInfo(default=True), + 'dst-address': KeyInfo(default=True), + 'dst-address-mask': KeyInfo(default=True), + 'dst-mac-address': KeyInfo(default=True), + 'dst-port': KeyInfo(default=True), + 'first-forwarded': KeyInfo(default=True), + 'gateway': KeyInfo(default=True), + 'icmp-code': KeyInfo(default=True), + 'icmp-type': KeyInfo(default=True), + 'igmp-type': KeyInfo(default=True), + 'in-interface': KeyInfo(default=True), + 'ip-header-length': KeyInfo(default=True), + 'ip-total-length': KeyInfo(default=True), + 'ipv6-flow-label': KeyInfo(default=True), + 'is-multicast': KeyInfo(default=True), + 'last-forwarded': KeyInfo(default=True), + 'nat-dst-address': KeyInfo(default=True), + 'nat-dst-port': KeyInfo(default=True), + 'nat-events': KeyInfo(default=False), + 'nat-src-address': KeyInfo(default=True), + 'nat-src-port': KeyInfo(default=True), + 'out-interface': KeyInfo(default=True), + 'packets': KeyInfo(default=True), + 'protocol': KeyInfo(default=True), + 'src-address': KeyInfo(default=True), + 'src-address-mask': KeyInfo(default=True), + 'src-mac-address': KeyInfo(default=True), + 'src-port': KeyInfo(default=True), + 'sys-init-time': KeyInfo(default=True), + 'tcp-ack-num': KeyInfo(default=True), + 'tcp-flags': KeyInfo(default=True), + 'tcp-seq-num': KeyInfo(default=True), + 'tcp-window-size': KeyInfo(default=True), + 'tos': KeyInfo(default=True), + 'ttl': KeyInfo(default=True), + 'udp-length': KeyInfo(default=True), + }, + ), + ), + ('ip', 'traffic-flow', 'target'): APIData( + unversioned=VersionedAPIData( + single_value=False, + fully_understood=True, + fields={ + 'address': KeyInfo(), + 'disabled': KeyInfo(default=False), + 'dst-address': KeyInfo(), + 'port': KeyInfo(default=2055), + 'src-address': KeyInfo(), + 'v9-template-refresh': KeyInfo(default=20), + 'v9-template-timeout': KeyInfo(), + 'version': KeyInfo(), + }, + ), ), ('ip', 'upnp'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'allow-disable-external-interface': KeyInfo(default=False), - 'enabled': KeyInfo(default=False), - 'show-dummy-rule': KeyInfo(default=True), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'allow-disable-external-interface': KeyInfo(default=False), + 'enabled': KeyInfo(default=False), + 'show-dummy-rule': KeyInfo(default=True), + }, + ), + ), + ('ip', 'upnp', 'interfaces'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('interface', 'type'), + fields={ + 'disabled': KeyInfo(default=False), + 'interface': KeyInfo(), + 'type': KeyInfo(), + 'forced-ip': KeyInfo(can_disable=True), + }, + ), ), ('ipv6', 'dhcp-client'): APIData( - fully_understood=True, - primary_keys=('interface', 'request'), - fields={ - 'add-default-route': KeyInfo(default=False), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'default-route-distance': KeyInfo(default=1), - 'dhcp-options': KeyInfo(default=''), - 'disabled': KeyInfo(default=False), - 'interface': KeyInfo(), - 'pool-name': KeyInfo(required=True), - 'pool-prefix-length': KeyInfo(default=64), - 'prefix-hint': KeyInfo(default='::/0'), - 'request': KeyInfo(), - 'use-peer-dns': KeyInfo(default=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('interface', 'request'), + fields={ + 'add-default-route': KeyInfo(default=False), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'default-route-distance': KeyInfo(default=1), + 'dhcp-options': KeyInfo(default=''), + 'disabled': KeyInfo(default=False), + 'interface': KeyInfo(), + 'pool-name': KeyInfo(required=True), + 'pool-prefix-length': KeyInfo(default=64), + 'prefix-hint': KeyInfo(default='::/0'), + 'request': KeyInfo(), + 'use-peer-dns': KeyInfo(default=True), + }, + ), ), ('ipv6', 'dhcp-server'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'address-pool': KeyInfo(required=True), - 'allow-dual-stack-queue': KeyInfo(can_disable=True, remove_value=True), - 'binding-script': KeyInfo(can_disable=True, remove_value=''), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'dhcp-option': KeyInfo(default=''), - 'disabled': KeyInfo(default=False), - 'insert-queue-before': KeyInfo(can_disable=True, remove_value='first'), - 'interface': KeyInfo(required=True), - 'lease-time': KeyInfo(default='3d'), - 'name': KeyInfo(), - 'parent-queue': KeyInfo(can_disable=True, remove_value='none'), - 'preference': KeyInfo(default=255), - 'rapid-commit': KeyInfo(default=True), - 'route-distance': KeyInfo(default=1), - 'use-radius': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'address-pool': KeyInfo(required=True), + 'allow-dual-stack-queue': KeyInfo(can_disable=True, remove_value=True), + 'binding-script': KeyInfo(can_disable=True, remove_value=''), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'dhcp-option': KeyInfo(default=''), + 'disabled': KeyInfo(default=False), + 'insert-queue-before': KeyInfo(can_disable=True, remove_value='first'), + 'interface': KeyInfo(required=True), + 'lease-time': KeyInfo(default='3d'), + 'name': KeyInfo(), + 'parent-queue': KeyInfo(can_disable=True, remove_value='none'), + 'preference': KeyInfo(default=255), + 'rapid-commit': KeyInfo(default=True), + 'route-distance': KeyInfo(default=1), + 'use-radius': KeyInfo(default=False), + }, + ), ), ('ipv6', 'dhcp-server', 'option'): APIData( - fully_understood=True, - primary_keys=('name',), - fields={ - 'code': KeyInfo(required=True), - 'name': KeyInfo(), - 'value': KeyInfo(default=''), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name',), + fields={ + 'code': KeyInfo(required=True), + 'name': KeyInfo(), + 'value': KeyInfo(default=''), + }, + ), ), ('ipv6', 'firewall', 'address-list'): APIData( - fully_understood=True, - primary_keys=('address', 'list', ), - fields={ - 'address': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'list': KeyInfo(), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('address', 'list', ), + fields={ + 'address': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'list': KeyInfo(), + }, + ), ), ('ipv6', 'firewall', 'filter'): APIData( - fully_understood=True, - stratify_keys=('chain', ), - fields={ - 'action': KeyInfo(), - 'chain': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'connection-bytes': KeyInfo(can_disable=True), - 'connection-limit': KeyInfo(can_disable=True), - 'connection-mark': KeyInfo(can_disable=True), - 'connection-rate': KeyInfo(can_disable=True), - 'connection-state': KeyInfo(can_disable=True), - 'connection-type': KeyInfo(can_disable=True), - 'content': KeyInfo(can_disable=True), - 'disabled': KeyInfo(), - 'dscp': KeyInfo(can_disable=True), - 'dst-address': KeyInfo(can_disable=True), - 'dst-address-list': KeyInfo(can_disable=True), - 'dst-address-type': KeyInfo(can_disable=True), - 'dst-limit': KeyInfo(can_disable=True), - 'dst-port': KeyInfo(can_disable=True), - 'headers': KeyInfo(can_disable=True), - 'hop-limit': KeyInfo(can_disable=True), - 'icmp-options': KeyInfo(can_disable=True), - 'in-bridge-port': KeyInfo(can_disable=True), - 'in-bridge-port-list': KeyInfo(can_disable=True), - 'in-interface': KeyInfo(can_disable=True), - 'in-interface-list': KeyInfo(can_disable=True), - 'ingress-priority': KeyInfo(can_disable=True), - 'ipsec-policy': KeyInfo(can_disable=True), - 'jump-target': KeyInfo(), - 'limit': KeyInfo(can_disable=True), - 'log': KeyInfo(), - 'log-prefix': KeyInfo(), - 'nth': KeyInfo(can_disable=True), - 'out-bridge-port': KeyInfo(can_disable=True), - 'out-bridge-port-list': KeyInfo(can_disable=True), - 'out-interface': KeyInfo(can_disable=True), - 'out-interface-list': KeyInfo(can_disable=True), - 'packet-mark': KeyInfo(can_disable=True), - 'packet-size': KeyInfo(can_disable=True), - 'per-connection-classifier': KeyInfo(can_disable=True), - 'port': KeyInfo(can_disable=True), - 'priority': KeyInfo(can_disable=True), - 'protocol': KeyInfo(can_disable=True), - 'random': KeyInfo(can_disable=True), - 'reject-with': KeyInfo(), - 'src-address': KeyInfo(can_disable=True), - 'src-address-list': KeyInfo(can_disable=True), - 'src-address-type': KeyInfo(can_disable=True), - 'src-mac-address': KeyInfo(can_disable=True), - 'src-port': KeyInfo(can_disable=True), - 'tcp-flags': KeyInfo(can_disable=True), - 'tcp-mss': KeyInfo(can_disable=True), - 'time': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + stratify_keys=('chain', ), + fields={ + 'action': KeyInfo(), + 'address-list': KeyInfo(can_disable=True), + 'address-list-timeout': KeyInfo(can_disable=True), + 'chain': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'connection-bytes': KeyInfo(can_disable=True), + 'connection-limit': KeyInfo(can_disable=True), + 'connection-mark': KeyInfo(can_disable=True), + 'connection-rate': KeyInfo(can_disable=True), + 'connection-state': KeyInfo(can_disable=True), + 'connection-type': KeyInfo(can_disable=True), + 'content': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'dscp': KeyInfo(can_disable=True), + 'dst-address': KeyInfo(can_disable=True), + 'dst-address-list': KeyInfo(can_disable=True), + 'dst-address-type': KeyInfo(can_disable=True), + 'dst-limit': KeyInfo(can_disable=True), + 'dst-port': KeyInfo(can_disable=True), + 'headers': KeyInfo(can_disable=True), + 'hop-limit': KeyInfo(can_disable=True), + 'icmp-options': KeyInfo(can_disable=True), + 'in-bridge-port': KeyInfo(can_disable=True), + 'in-bridge-port-list': KeyInfo(can_disable=True), + 'in-interface': KeyInfo(can_disable=True), + 'in-interface-list': KeyInfo(can_disable=True), + 'ingress-priority': KeyInfo(can_disable=True), + 'ipsec-policy': KeyInfo(can_disable=True), + 'jump-target': KeyInfo(can_disable=True), + 'limit': KeyInfo(can_disable=True), + 'log': KeyInfo(can_disable=False), + 'log-prefix': KeyInfo(can_disable=False), + 'nth': KeyInfo(can_disable=True), + 'out-bridge-port': KeyInfo(can_disable=True), + 'out-bridge-port-list': KeyInfo(can_disable=True), + 'out-interface': KeyInfo(can_disable=True), + 'out-interface-list': KeyInfo(can_disable=True), + 'packet-mark': KeyInfo(can_disable=True), + 'packet-size': KeyInfo(can_disable=True), + 'per-connection-classifier': KeyInfo(can_disable=True), + 'port': KeyInfo(can_disable=True), + 'priority': KeyInfo(can_disable=True), + 'protocol': KeyInfo(can_disable=True), + 'random': KeyInfo(can_disable=True), + 'reject-with': KeyInfo(), + 'src-address': KeyInfo(can_disable=True), + 'src-address-list': KeyInfo(can_disable=True), + 'src-address-type': KeyInfo(can_disable=True), + 'src-mac-address': KeyInfo(can_disable=True), + 'src-port': KeyInfo(can_disable=True), + 'tcp-flags': KeyInfo(can_disable=True), + 'tcp-mss': KeyInfo(can_disable=True), + 'time': KeyInfo(can_disable=True), + }, + ), ), ('ipv6', 'firewall', 'mangle'): APIData( - fully_understood=True, - stratify_keys=('chain', ), - fields={ - 'action': KeyInfo(), - 'address-list': KeyInfo(), - 'address-list-timeout': KeyInfo(), - 'chain': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'connection-bytes': KeyInfo(can_disable=True), - 'connection-limit': KeyInfo(can_disable=True), - 'connection-mark': KeyInfo(can_disable=True), - 'connection-rate': KeyInfo(can_disable=True), - 'connection-state': KeyInfo(can_disable=True), - 'connection-type': KeyInfo(can_disable=True), - 'content': KeyInfo(can_disable=True), - 'disabled': KeyInfo(), - 'dscp': KeyInfo(can_disable=True), - 'dst-address': KeyInfo(can_disable=True), - 'dst-address-list': KeyInfo(can_disable=True), - 'dst-address-type': KeyInfo(can_disable=True), - 'dst-limit': KeyInfo(can_disable=True), - 'dst-port': KeyInfo(can_disable=True), - 'dst-prefix': KeyInfo(), - 'headers': KeyInfo(can_disable=True), - 'hop-limit': KeyInfo(can_disable=True), - 'icmp-options': KeyInfo(can_disable=True), - 'in-bridge-port': KeyInfo(can_disable=True), - 'in-bridge-port-list': KeyInfo(can_disable=True), - 'in-interface': KeyInfo(can_disable=True), - 'in-interface-list': KeyInfo(can_disable=True), - 'ingress-priority': KeyInfo(can_disable=True), - 'ipsec-policy': KeyInfo(can_disable=True), - 'jump-target': KeyInfo(), - 'limit': KeyInfo(can_disable=True), - 'log': KeyInfo(), - 'log-prefix': KeyInfo(), - 'new-connection-mark': KeyInfo(), - 'new-dscp': KeyInfo(), - 'new-hop-limit': KeyInfo(), - 'new-mss': KeyInfo(), - 'new-packet-mark': KeyInfo(), - 'new-routing-mark': KeyInfo(), - 'nth': KeyInfo(can_disable=True), - 'out-bridge-port': KeyInfo(can_disable=True), - 'out-bridge-port-list': KeyInfo(can_disable=True), - 'out-interface': KeyInfo(can_disable=True), - 'out-interface-list': KeyInfo(can_disable=True), - 'packet-mark': KeyInfo(can_disable=True), - 'packet-size': KeyInfo(can_disable=True), - 'passthrough': KeyInfo(), - 'per-connection-classifier': KeyInfo(can_disable=True), - 'port': KeyInfo(can_disable=True), - 'priority': KeyInfo(can_disable=True), - 'protocol': KeyInfo(can_disable=True), - 'random': KeyInfo(can_disable=True), - 'routing-mark': KeyInfo(can_disable=True), - 'sniff-id': KeyInfo(), - 'sniff-target': KeyInfo(), - 'sniff-target-port': KeyInfo(), - 'src-address': KeyInfo(can_disable=True), - 'src-address-list': KeyInfo(can_disable=True), - 'src-address-type': KeyInfo(can_disable=True), - 'src-mac-address': KeyInfo(can_disable=True), - 'src-port': KeyInfo(can_disable=True), - 'src-prefix': KeyInfo(), - 'tcp-flags': KeyInfo(can_disable=True), - 'tcp-mss': KeyInfo(can_disable=True), - 'time': KeyInfo(can_disable=True), - 'tls-host': KeyInfo(can_disable=True), - } + unversioned=VersionedAPIData( + fully_understood=True, + stratify_keys=('chain', ), + fields={ + 'action': KeyInfo(), + 'address-list': KeyInfo(), + 'address-list-timeout': KeyInfo(), + 'chain': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'connection-bytes': KeyInfo(can_disable=True), + 'connection-limit': KeyInfo(can_disable=True), + 'connection-mark': KeyInfo(can_disable=True), + 'connection-rate': KeyInfo(can_disable=True), + 'connection-state': KeyInfo(can_disable=True), + 'connection-type': KeyInfo(can_disable=True), + 'content': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'dscp': KeyInfo(can_disable=True), + 'dst-address': KeyInfo(can_disable=True), + 'dst-address-list': KeyInfo(can_disable=True), + 'dst-address-type': KeyInfo(can_disable=True), + 'dst-limit': KeyInfo(can_disable=True), + 'dst-port': KeyInfo(can_disable=True), + 'dst-prefix': KeyInfo(), + 'headers': KeyInfo(can_disable=True), + 'hop-limit': KeyInfo(can_disable=True), + 'icmp-options': KeyInfo(can_disable=True), + 'in-bridge-port': KeyInfo(can_disable=True), + 'in-bridge-port-list': KeyInfo(can_disable=True), + 'in-interface': KeyInfo(can_disable=True), + 'in-interface-list': KeyInfo(can_disable=True), + 'ingress-priority': KeyInfo(can_disable=True), + 'ipsec-policy': KeyInfo(can_disable=True), + 'jump-target': KeyInfo(), + 'limit': KeyInfo(can_disable=True), + 'log': KeyInfo(), + 'log-prefix': KeyInfo(), + 'new-connection-mark': KeyInfo(), + 'new-dscp': KeyInfo(), + 'new-hop-limit': KeyInfo(), + 'new-mss': KeyInfo(), + 'new-packet-mark': KeyInfo(), + 'new-routing-mark': KeyInfo(), + 'nth': KeyInfo(can_disable=True), + 'out-bridge-port': KeyInfo(can_disable=True), + 'out-bridge-port-list': KeyInfo(can_disable=True), + 'out-interface': KeyInfo(can_disable=True), + 'out-interface-list': KeyInfo(can_disable=True), + 'packet-mark': KeyInfo(can_disable=True), + 'packet-size': KeyInfo(can_disable=True), + 'passthrough': KeyInfo(), + 'per-connection-classifier': KeyInfo(can_disable=True), + 'port': KeyInfo(can_disable=True), + 'priority': KeyInfo(can_disable=True), + 'protocol': KeyInfo(can_disable=True), + 'random': KeyInfo(can_disable=True), + 'routing-mark': KeyInfo(can_disable=True), + 'sniff-id': KeyInfo(), + 'sniff-target': KeyInfo(), + 'sniff-target-port': KeyInfo(), + 'src-address': KeyInfo(can_disable=True), + 'src-address-list': KeyInfo(can_disable=True), + 'src-address-type': KeyInfo(can_disable=True), + 'src-mac-address': KeyInfo(can_disable=True), + 'src-port': KeyInfo(can_disable=True), + 'src-prefix': KeyInfo(), + 'tcp-flags': KeyInfo(can_disable=True), + 'tcp-mss': KeyInfo(can_disable=True), + 'time': KeyInfo(can_disable=True), + 'tls-host': KeyInfo(can_disable=True), + } + ), + ), + ('ipv6', 'firewall', 'nat'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + stratify_keys=('chain', ), + fields={ + 'action': KeyInfo(), + 'address-list': KeyInfo(), + 'address-list-timeout': KeyInfo(), + 'chain': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'connection-bytes': KeyInfo(can_disable=True), + 'connection-limit': KeyInfo(can_disable=True), + 'connection-mark': KeyInfo(can_disable=True), + 'connection-rate': KeyInfo(can_disable=True), + 'connection-state': KeyInfo(can_disable=True), + 'connection-type': KeyInfo(can_disable=True), + 'content': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'dscp': KeyInfo(can_disable=True), + 'dst-address': KeyInfo(can_disable=True), + 'dst-address-list': KeyInfo(can_disable=True), + 'dst-address-type': KeyInfo(can_disable=True), + 'dst-limit': KeyInfo(can_disable=True), + 'dst-port': KeyInfo(can_disable=True), + 'icmp-options': KeyInfo(can_disable=True), + 'in-bridge-port': KeyInfo(can_disable=True), + 'in-bridge-port-list': KeyInfo(can_disable=True), + 'in-interface': KeyInfo(can_disable=True), + 'in-interface-list': KeyInfo(can_disable=True), + 'ingress-priority': KeyInfo(can_disable=True), + 'ipsec-policy': KeyInfo(can_disable=True), + 'jump-target': KeyInfo(), + 'layer7-protocol': KeyInfo(can_disable=True), + 'limit': KeyInfo(can_disable=True), + 'log': KeyInfo(), + 'log-prefix': KeyInfo(), + 'out-bridge-port': KeyInfo(can_disable=True), + 'out-bridge-port-list': KeyInfo(can_disable=True), + 'out-interface': KeyInfo(can_disable=True), + 'out-interface-list': KeyInfo(can_disable=True), + 'packet-mark': KeyInfo(can_disable=True), + 'packet-size': KeyInfo(can_disable=True), + 'per-connection-classifier': KeyInfo(can_disable=True), + 'port': KeyInfo(can_disable=True), + 'priority': KeyInfo(can_disable=True), + 'protocol': KeyInfo(can_disable=True), + 'random': KeyInfo(can_disable=True), + 'routing-mark': KeyInfo(can_disable=True), + 'src-address': KeyInfo(can_disable=True), + 'src-address-list': KeyInfo(can_disable=True), + 'src-address-type': KeyInfo(can_disable=True), + 'src-mac-address': KeyInfo(can_disable=True), + 'src-port': KeyInfo(can_disable=True), + 'tcp-flags': KeyInfo(can_disable=True), + 'tcp-mss': KeyInfo(can_disable=True), + 'time': KeyInfo(can_disable=True), + 'tls-host': KeyInfo(can_disable=True), + 'to-addresses': KeyInfo(can_disable=True), + 'to-ports': KeyInfo(can_disable=True), + }, + ), ), ('ipv6', 'firewall', 'raw'): APIData( - fully_understood=True, - stratify_keys=('chain',), - fields={ - 'action': KeyInfo(), - 'address-list': KeyInfo(), - 'address-list-timeout': KeyInfo(), - 'chain': KeyInfo(), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'content': KeyInfo(can_disable=True), - 'disabled': KeyInfo(), - 'dscp': KeyInfo(can_disable=True), - 'dst-address': KeyInfo(can_disable=True), - 'dst-address-list': KeyInfo(can_disable=True), - 'dst-address-type': KeyInfo(can_disable=True), - 'dst-limit': KeyInfo(can_disable=True), - 'dst-port': KeyInfo(can_disable=True), - 'headers': KeyInfo(can_disable=True), - 'hop-limit': KeyInfo(can_disable=True), - 'icmp-options': KeyInfo(can_disable=True), - 'in-bridge-port': KeyInfo(can_disable=True), - 'in-bridge-port-list': KeyInfo(can_disable=True), - 'in-interface': KeyInfo(can_disable=True), - 'in-interface-list': KeyInfo(can_disable=True), - 'ingress-priority': KeyInfo(can_disable=True), - 'ipsec-policy': KeyInfo(can_disable=True), - 'jump-target': KeyInfo(), - 'limit': KeyInfo(can_disable=True), - 'log': KeyInfo(), - 'log-prefix': KeyInfo(), - 'nth': KeyInfo(can_disable=True), - 'out-bridge-port': KeyInfo(can_disable=True), - 'out-bridge-port-list': KeyInfo(can_disable=True), - 'out-interface': KeyInfo(can_disable=True), - 'out-interface-list': KeyInfo(can_disable=True), - 'packet-mark': KeyInfo(can_disable=True), - 'packet-size': KeyInfo(can_disable=True), - 'per-connection-classifier': KeyInfo(can_disable=True), - 'port': KeyInfo(can_disable=True), - 'priority': KeyInfo(can_disable=True), - 'protocol': KeyInfo(can_disable=True), - 'random': KeyInfo(can_disable=True), - 'src-address': KeyInfo(can_disable=True), - 'src-address-list': KeyInfo(can_disable=True), - 'src-address-type': KeyInfo(can_disable=True), - 'src-mac-address': KeyInfo(can_disable=True), - 'src-port': KeyInfo(can_disable=True), - 'tcp-flags': KeyInfo(can_disable=True), - 'tcp-mss': KeyInfo(can_disable=True), - 'time': KeyInfo(can_disable=True), - 'tls-host': KeyInfo(can_disable=True), - } + unversioned=VersionedAPIData( + fully_understood=True, + stratify_keys=('chain',), + fields={ + 'action': KeyInfo(), + 'address-list': KeyInfo(), + 'address-list-timeout': KeyInfo(), + 'chain': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'content': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'dscp': KeyInfo(can_disable=True), + 'dst-address': KeyInfo(can_disable=True), + 'dst-address-list': KeyInfo(can_disable=True), + 'dst-address-type': KeyInfo(can_disable=True), + 'dst-limit': KeyInfo(can_disable=True), + 'dst-port': KeyInfo(can_disable=True), + 'headers': KeyInfo(can_disable=True), + 'hop-limit': KeyInfo(can_disable=True), + 'icmp-options': KeyInfo(can_disable=True), + 'in-bridge-port': KeyInfo(can_disable=True), + 'in-bridge-port-list': KeyInfo(can_disable=True), + 'in-interface': KeyInfo(can_disable=True), + 'in-interface-list': KeyInfo(can_disable=True), + 'ingress-priority': KeyInfo(can_disable=True), + 'ipsec-policy': KeyInfo(can_disable=True), + 'jump-target': KeyInfo(), + 'limit': KeyInfo(can_disable=True), + 'log': KeyInfo(), + 'log-prefix': KeyInfo(), + 'nth': KeyInfo(can_disable=True), + 'out-bridge-port': KeyInfo(can_disable=True), + 'out-bridge-port-list': KeyInfo(can_disable=True), + 'out-interface': KeyInfo(can_disable=True), + 'out-interface-list': KeyInfo(can_disable=True), + 'packet-mark': KeyInfo(can_disable=True), + 'packet-size': KeyInfo(can_disable=True), + 'per-connection-classifier': KeyInfo(can_disable=True), + 'port': KeyInfo(can_disable=True), + 'priority': KeyInfo(can_disable=True), + 'protocol': KeyInfo(can_disable=True), + 'random': KeyInfo(can_disable=True), + 'src-address': KeyInfo(can_disable=True), + 'src-address-list': KeyInfo(can_disable=True), + 'src-address-type': KeyInfo(can_disable=True), + 'src-mac-address': KeyInfo(can_disable=True), + 'src-port': KeyInfo(can_disable=True), + 'tcp-flags': KeyInfo(can_disable=True), + 'tcp-mss': KeyInfo(can_disable=True), + 'time': KeyInfo(can_disable=True), + 'tls-host': KeyInfo(can_disable=True), + } + ), ), ('ipv6', 'nd'): APIData( - fully_understood=True, - primary_keys=('interface', ), - fields={ - 'advertise-dns': KeyInfo(default=True), - 'advertise-mac-address': KeyInfo(default=True), - 'disabled': KeyInfo(default=False), - 'dns': KeyInfo(default=''), - 'hop-limit': KeyInfo(default='unspecified'), - 'interface': KeyInfo(), - 'managed-address-configuration': KeyInfo(default=False), - 'mtu': KeyInfo(default='unspecified'), - 'other-configuration': KeyInfo(default=False), - 'ra-delay': KeyInfo(default='3s'), - 'ra-interval': KeyInfo(default='3m20s-10m'), - 'ra-lifetime': KeyInfo(default='30m'), - 'ra-preference': KeyInfo(default='medium'), - 'reachable-time': KeyInfo(default='unspecified'), - 'retransmit-interval': KeyInfo(default='unspecified'), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('interface', ), + fields={ + 'advertise-dns': KeyInfo(default=True), + 'advertise-mac-address': KeyInfo(default=True), + 'disabled': KeyInfo(default=False), + 'dns': KeyInfo(default=''), + 'hop-limit': KeyInfo(default='unspecified'), + 'interface': KeyInfo(), + 'managed-address-configuration': KeyInfo(default=False), + 'mtu': KeyInfo(default='unspecified'), + 'other-configuration': KeyInfo(default=False), + 'ra-delay': KeyInfo(default='3s'), + 'ra-interval': KeyInfo(default='3m20s-10m'), + 'ra-lifetime': KeyInfo(default='30m'), + 'ra-preference': KeyInfo(default='medium'), + 'reachable-time': KeyInfo(default='unspecified'), + 'retransmit-interval': KeyInfo(default='unspecified'), + }, + ), ), ('ipv6', 'nd', 'prefix', 'default'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'autonomous': KeyInfo(default=True), - 'preferred-lifetime': KeyInfo(default='1w'), - 'valid-lifetime': KeyInfo(default='4w2d'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'autonomous': KeyInfo(default=True), + 'preferred-lifetime': KeyInfo(default='1w'), + 'valid-lifetime': KeyInfo(default='4w2d'), + }, + ), ), ('ipv6', 'route'): APIData( - fully_understood=True, - fields={ - 'bgp-as-path': KeyInfo(can_disable=True), - 'bgp-atomic-aggregate': KeyInfo(can_disable=True), - 'bgp-communities': KeyInfo(can_disable=True), - 'bgp-local-pref': KeyInfo(can_disable=True), - 'bgp-med': KeyInfo(can_disable=True), - 'bgp-origin': KeyInfo(can_disable=True), - 'bgp-prepend': KeyInfo(can_disable=True), - 'type': KeyInfo(can_disable=True, remove_value='unicast'), - 'blackhole': KeyInfo(can_disable=True), - 'check-gateway': KeyInfo(can_disable=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(), - 'distance': KeyInfo(default=1), - 'dst-address': KeyInfo(), - 'gateway': KeyInfo(), - 'route-tag': KeyInfo(can_disable=True), - 'routing-table': KeyInfo(default='main'), - 'scope': KeyInfo(default=30), - 'target-scope': KeyInfo(default=10), - 'vrf-interface': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'bgp-as-path': KeyInfo(can_disable=True), + 'bgp-atomic-aggregate': KeyInfo(can_disable=True), + 'bgp-communities': KeyInfo(can_disable=True), + 'bgp-local-pref': KeyInfo(can_disable=True), + 'bgp-med': KeyInfo(can_disable=True), + 'bgp-origin': KeyInfo(can_disable=True), + 'bgp-prepend': KeyInfo(can_disable=True), + 'type': KeyInfo(can_disable=True, remove_value='unicast'), + 'blackhole': KeyInfo(can_disable=True), + 'check-gateway': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'distance': KeyInfo(default=1), + 'dst-address': KeyInfo(), + 'gateway': KeyInfo(), + 'route-tag': KeyInfo(can_disable=True), + 'routing-table': KeyInfo(default='main'), + 'scope': KeyInfo(default=30), + 'target-scope': KeyInfo(default=10), + 'vrf-interface': KeyInfo(can_disable=True), + }, + ), ), ('mpls', ): APIData( - single_value=True, - fully_understood=True, - fields={ - 'allow-fast-path': KeyInfo(default=True), - 'dynamic-label-range': KeyInfo(default='16-1048575'), - 'propagate-ttl': KeyInfo(default=True), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'allow-fast-path': KeyInfo(default=True), + 'dynamic-label-range': KeyInfo(default='16-1048575'), + 'propagate-ttl': KeyInfo(default=True), + }, + ), ), ('mpls', 'interface'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'disabled': KeyInfo(), - 'interface': KeyInfo(), - 'mpls-mtu': KeyInfo(), - }, + unversioned=VersionedAPIData( + unknown_mechanism=True, + # primary_keys=('default', ), + fields={ + 'default': KeyInfo(), + 'disabled': KeyInfo(), + 'interface': KeyInfo(), + 'mpls-mtu': KeyInfo(), + }, + ), ), ('mpls', 'ldp'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'distribute-for-default-route': KeyInfo(default=False), - 'enabled': KeyInfo(default=False), - 'hop-limit': KeyInfo(default=255), - 'loop-detect': KeyInfo(default=False), - 'lsr-id': KeyInfo(default='0.0.0.0'), - 'path-vector-limit': KeyInfo(default=255), - 'transport-address': KeyInfo(default='0.0.0.0'), - 'use-explicit-null': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'distribute-for-default-route': KeyInfo(default=False), + 'enabled': KeyInfo(default=False), + 'hop-limit': KeyInfo(default=255), + 'loop-detect': KeyInfo(default=False), + 'lsr-id': KeyInfo(default='0.0.0.0'), + 'path-vector-limit': KeyInfo(default=255), + 'transport-address': KeyInfo(default='0.0.0.0'), + 'use-explicit-null': KeyInfo(default=False), + }, + ), ), ('port', 'firmware'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'directory': KeyInfo(default='firmware'), - 'ignore-directip-modem': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'directory': KeyInfo(default='firmware'), + 'ignore-directip-modem': KeyInfo(default=False), + }, + ), + ), + ('port', 'remote-access'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'allowed-addresses': KeyInfo(default='0.0.0.0/0'), + 'channel': KeyInfo(default=0), + 'disabled': KeyInfo(default=False), + 'log-file': KeyInfo(default=""), + 'port': KeyInfo(required=True), + 'protocol': KeyInfo(default='rfc2217'), + 'tcp-port': KeyInfo(default=0), + }, + ), ), ('ppp', 'aaa'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'accounting': KeyInfo(default=True), - 'interim-update': KeyInfo(default='0s'), - 'use-circuit-id-in-nas-port-id': KeyInfo(default=False), - 'use-radius': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'accounting': KeyInfo(default=True), + 'interim-update': KeyInfo(default='0s'), + 'use-circuit-id-in-nas-port-id': KeyInfo(default=False), + 'use-radius': KeyInfo(default=False), + }, + ), + ), + ('radius', ): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'accounting-backup': KeyInfo(default=False), + 'accounting-port': KeyInfo(default=1813), + 'address': KeyInfo(default='0.0.0.0'), + 'authentication-port': KeyInfo(default=1812), + 'called-id': KeyInfo(), + 'certificate': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'domain': KeyInfo(), + 'protocol': KeyInfo(default='udp'), + 'realm': KeyInfo(), + 'secret': KeyInfo(), + 'service': KeyInfo(), + 'src-address': KeyInfo(default='0.0.0.0'), + 'timeout': KeyInfo(default='300ms'), + }, + ), ), ('radius', 'incoming'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'accept': KeyInfo(default=False), - 'port': KeyInfo(default=3799), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'accept': KeyInfo(default=False), + 'port': KeyInfo(default=3799), + }, + ), + ), + ('routing', 'id'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'id': KeyInfo(), + 'name': KeyInfo(), + 'select-dynamic-id': KeyInfo(), + 'select-from-vrf': KeyInfo(), + }, + ), ), ('routing', 'bfd', 'interface'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), - fields={ - 'default': KeyInfo(), - 'disabled': KeyInfo(), - 'interface': KeyInfo(), - 'interval': KeyInfo(), - 'min-rx': KeyInfo(), - 'multiplier': KeyInfo(), - }, + unversioned=VersionedAPIData( + unknown_mechanism=True, + # primary_keys=('default', ), + fields={ + 'default': KeyInfo(), + 'disabled': KeyInfo(), + 'interface': KeyInfo(), + 'interval': KeyInfo(), + 'min-rx': KeyInfo(), + 'multiplier': KeyInfo(), + }, + ), ), ('routing', 'mme'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'bidirectional-timeout': KeyInfo(default=2), - 'gateway-class': KeyInfo(default='none'), - 'gateway-keepalive': KeyInfo(default='1m'), - 'gateway-selection': KeyInfo(default='no-gateway'), - 'origination-interval': KeyInfo(default='5s'), - 'preferred-gateway': KeyInfo(default='0.0.0.0'), - 'timeout': KeyInfo(default='1m'), - 'ttl': KeyInfo(default=50), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'bidirectional-timeout': KeyInfo(default=2), + 'gateway-class': KeyInfo(default='none'), + 'gateway-keepalive': KeyInfo(default='1m'), + 'gateway-selection': KeyInfo(default='no-gateway'), + 'origination-interval': KeyInfo(default='5s'), + 'preferred-gateway': KeyInfo(default='0.0.0.0'), + 'timeout': KeyInfo(default='1m'), + 'ttl': KeyInfo(default=50), + }, + ), ), ('routing', 'rip'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'distribute-default': KeyInfo(default='never'), - 'garbage-timer': KeyInfo(default='2m'), - 'metric-bgp': KeyInfo(default=1), - 'metric-connected': KeyInfo(default=1), - 'metric-default': KeyInfo(default=1), - 'metric-ospf': KeyInfo(default=1), - 'metric-static': KeyInfo(default=1), - 'redistribute-bgp': KeyInfo(default=False), - 'redistribute-connected': KeyInfo(default=False), - 'redistribute-ospf': KeyInfo(default=False), - 'redistribute-static': KeyInfo(default=False), - 'routing-table': KeyInfo(default='main'), - 'timeout-timer': KeyInfo(default='3m'), - 'update-timer': KeyInfo(default='30s'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'distribute-default': KeyInfo(default='never'), + 'garbage-timer': KeyInfo(default='2m'), + 'metric-bgp': KeyInfo(default=1), + 'metric-connected': KeyInfo(default=1), + 'metric-default': KeyInfo(default=1), + 'metric-ospf': KeyInfo(default=1), + 'metric-static': KeyInfo(default=1), + 'redistribute-bgp': KeyInfo(default=False), + 'redistribute-connected': KeyInfo(default=False), + 'redistribute-ospf': KeyInfo(default=False), + 'redistribute-static': KeyInfo(default=False), + 'routing-table': KeyInfo(default='main'), + 'timeout-timer': KeyInfo(default='3m'), + 'update-timer': KeyInfo(default='30s'), + }, + ), ), ('routing', 'ripng'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'distribute-default': KeyInfo(default='never'), - 'garbage-timer': KeyInfo(default='2m'), - 'metric-bgp': KeyInfo(default=1), - 'metric-connected': KeyInfo(default=1), - 'metric-default': KeyInfo(default=1), - 'metric-ospf': KeyInfo(default=1), - 'metric-static': KeyInfo(default=1), - 'redistribute-bgp': KeyInfo(default=False), - 'redistribute-connected': KeyInfo(default=False), - 'redistribute-ospf': KeyInfo(default=False), - 'redistribute-static': KeyInfo(default=False), - 'timeout-timer': KeyInfo(default='3m'), - 'update-timer': KeyInfo(default='30s'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'distribute-default': KeyInfo(default='never'), + 'garbage-timer': KeyInfo(default='2m'), + 'metric-bgp': KeyInfo(default=1), + 'metric-connected': KeyInfo(default=1), + 'metric-default': KeyInfo(default=1), + 'metric-ospf': KeyInfo(default=1), + 'metric-static': KeyInfo(default=1), + 'redistribute-bgp': KeyInfo(default=False), + 'redistribute-connected': KeyInfo(default=False), + 'redistribute-ospf': KeyInfo(default=False), + 'redistribute-static': KeyInfo(default=False), + 'timeout-timer': KeyInfo(default='3m'), + 'update-timer': KeyInfo(default='30s'), + }, + ), ), ('snmp', ): APIData( - single_value=True, - fully_understood=True, - fields={ - 'contact': KeyInfo(default=''), - 'enabled': KeyInfo(default=False), - 'engine-id': KeyInfo(default=''), - 'location': KeyInfo(default=''), - 'src-address': KeyInfo(default='::'), - 'trap-community': KeyInfo(default='public'), - 'trap-generators': KeyInfo(default='temp-exception'), - 'trap-target': KeyInfo(default=''), - 'trap-version': KeyInfo(default=1), - 'trap-interfaces': KeyInfo(default=''), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'contact': KeyInfo(default=''), + 'enabled': KeyInfo(default=False), + 'location': KeyInfo(default=''), + 'src-address': KeyInfo(default='::'), + 'trap-community': KeyInfo(default='public'), + 'trap-generators': KeyInfo(default='temp-exception'), + 'trap-target': KeyInfo(default=''), + 'trap-version': KeyInfo(default=1), + 'trap-interfaces': KeyInfo(default=''), + }, + versioned_fields=[ + ([('7.10', '<')], 'engine-id', KeyInfo(default='')), + ([('7.10', '>=')], 'engine-id', KeyInfo(read_only=True)), + ([('7.10', '>=')], 'engine-id-suffix', KeyInfo(default='')), + ], + ), ), ('system', 'clock'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'time-zone-autodetect': KeyInfo(default=True), - 'time-zone-name': KeyInfo(default='manual'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'date': KeyInfo(), + 'gmt-offset': KeyInfo(), + 'time': KeyInfo(), + 'time-zone-autodetect': KeyInfo(default=True), + 'time-zone-name': KeyInfo(default='manual'), + }, + ), ), ('system', 'clock', 'manual'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'dst-delta': KeyInfo(default='00:00'), - 'dst-end': KeyInfo(default='jan/01/1970 00:00:00'), - 'dst-start': KeyInfo(default='jan/01/1970 00:00:00'), - 'time-zone': KeyInfo(default='+00:00'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'dst-delta': KeyInfo(default='00:00'), + 'dst-end': KeyInfo(default='jan/01/1970 00:00:00'), + 'dst-start': KeyInfo(default='jan/01/1970 00:00:00'), + 'time-zone': KeyInfo(default='+00:00'), + }, + ), ), ('system', 'identity'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'name': KeyInfo(default='Mikrotik'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'name': KeyInfo(default='Mikrotik'), + }, + ), ), ('system', 'leds', 'settings'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'all-leds-off': KeyInfo(default='never'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'all-leds-off': KeyInfo(default='never'), + }, + ), ), ('system', 'note'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'note': KeyInfo(default=''), - 'show-at-login': KeyInfo(default=True), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'note': KeyInfo(default=''), + 'show-at-login': KeyInfo(default=True), + }, + ), ), ('system', 'ntp', 'client'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'enabled': KeyInfo(default=False), - 'primary-ntp': KeyInfo(default='0.0.0.0'), - 'secondary-ntp': KeyInfo(default='0.0.0.0'), - 'server-dns-names': KeyInfo(default=''), - 'servers': KeyInfo(default=''), - 'mode': KeyInfo(default='unicast'), - 'vrf': KeyInfo(default='main'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'enabled': KeyInfo(default=False), + 'primary-ntp': KeyInfo(default='0.0.0.0'), + 'secondary-ntp': KeyInfo(default='0.0.0.0'), + 'server-dns-names': KeyInfo(default=''), + 'servers': KeyInfo(default=''), + 'mode': KeyInfo(default='unicast'), + 'vrf': KeyInfo(default='main'), + }, + ), ), ('system', 'ntp', 'client', 'servers'): APIData( - primary_keys=('address', ), - fully_understood=True, - fields={ - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'address': KeyInfo(), - 'auth-key': KeyInfo(default='none'), - 'iburst': KeyInfo(default=True), - 'max-poll': KeyInfo(default=10), - 'min-poll': KeyInfo(default=6), - }, + unversioned=VersionedAPIData( + primary_keys=('address', ), + fully_understood=True, + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'address': KeyInfo(), + 'auth-key': KeyInfo(default='none'), + 'iburst': KeyInfo(default=True), + 'max-poll': KeyInfo(default=10), + 'min-poll': KeyInfo(default=6), + }, + ), ), ('system', 'ntp', 'server'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'auth-key': KeyInfo(default='none'), - 'broadcast': KeyInfo(default=False), - 'broadcast-addresses': KeyInfo(default=''), - 'enabled': KeyInfo(default=False), - 'local-clock-stratum': KeyInfo(default=5), - 'manycast': KeyInfo(default=False), - 'multicast': KeyInfo(default=False), - 'use-local-clock': KeyInfo(default=False), - 'vrf': KeyInfo(default='main'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'auth-key': KeyInfo(default='none'), + 'broadcast': KeyInfo(default=False), + 'broadcast-addresses': KeyInfo(default=''), + 'enabled': KeyInfo(default=False), + 'local-clock-stratum': KeyInfo(default=5), + 'manycast': KeyInfo(default=False), + 'multicast': KeyInfo(default=False), + 'use-local-clock': KeyInfo(default=False), + 'vrf': KeyInfo(default='main'), + }, + ), ), ('system', 'package', 'update'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'channel': KeyInfo(default='stable'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'channel': KeyInfo(default='stable'), + 'installed-version': KeyInfo(read_only=True), + 'latest-version': KeyInfo(read_only=True), + 'status': KeyInfo(read_only=True), + }, + ), ), ('system', 'routerboard', 'settings'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'auto-upgrade': KeyInfo(default=False), - 'baud-rate': KeyInfo(default=115200), - 'boot-delay': KeyInfo(default='2s'), - 'boot-device': KeyInfo(default='nand-if-fail-then-ethernet'), - 'boot-protocol': KeyInfo(default='bootp'), - 'enable-jumper-reset': KeyInfo(default=True), - 'enter-setup-on': KeyInfo(default='any-key'), - 'force-backup-booter': KeyInfo(default=False), - 'protected-routerboot': KeyInfo(default='disabled'), - 'reformat-hold-button': KeyInfo(default='20s'), - 'reformat-hold-button-max': KeyInfo(default='10m'), - 'silent-boot': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'auto-upgrade': KeyInfo(default=False), + 'baud-rate': KeyInfo(default=115200), + 'boot-delay': KeyInfo(default='2s'), + 'boot-device': KeyInfo(default='nand-if-fail-then-ethernet'), + 'boot-protocol': KeyInfo(default='bootp'), + 'enable-jumper-reset': KeyInfo(default=True), + 'enter-setup-on': KeyInfo(default='any-key'), + 'force-backup-booter': KeyInfo(default=False), + 'protected-routerboot': KeyInfo(default='disabled'), + 'reformat-hold-button': KeyInfo(default='20s'), + 'reformat-hold-button-max': KeyInfo(default='10m'), + 'silent-boot': KeyInfo(default=False), + }, + ), ), ('system', 'upgrade', 'mirror'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'check-interval': KeyInfo(default='1d'), - 'enabled': KeyInfo(default=False), - 'primary-server': KeyInfo(default='0.0.0.0'), - 'secondary-server': KeyInfo(default='0.0.0.0'), - 'user': KeyInfo(default=''), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'check-interval': KeyInfo(default='1d'), + 'enabled': KeyInfo(default=False), + 'primary-server': KeyInfo(default='0.0.0.0'), + 'secondary-server': KeyInfo(default='0.0.0.0'), + 'user': KeyInfo(default=''), + }, + ), ), ('system', 'ups'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'alarm-setting': KeyInfo(default='immediate'), - 'check-capabilities': KeyInfo(can_disable=True, remove_value=True), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=True), - 'min-runtime': KeyInfo(default='never'), - 'name': KeyInfo(), - 'offline-time': KeyInfo(default='0s'), - 'port': KeyInfo(required=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'alarm-setting': KeyInfo(default='immediate'), + 'check-capabilities': KeyInfo(can_disable=True, remove_value=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=True), + 'min-runtime': KeyInfo(default='never'), + 'name': KeyInfo(), + 'offline-time': KeyInfo(default='0s'), + 'port': KeyInfo(required=True), + }, + ), ), ('system', 'watchdog'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'auto-send-supout': KeyInfo(default=False), - 'automatic-supout': KeyInfo(default=True), - 'ping-start-after-boot': KeyInfo(default='5m'), - 'ping-timeout': KeyInfo(default='1m'), - 'watch-address': KeyInfo(default='none'), - 'watchdog-timer': KeyInfo(default=True), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'auto-send-supout': KeyInfo(default=False), + 'automatic-supout': KeyInfo(default=True), + 'ping-start-after-boot': KeyInfo(default='5m'), + 'ping-timeout': KeyInfo(default='1m'), + 'watch-address': KeyInfo(default='none'), + 'watchdog-timer': KeyInfo(default=True), + }, + ), ), ('tool', 'bandwidth-server'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'allocate-udp-ports-from': KeyInfo(default=2000), - 'authenticate': KeyInfo(default=True), - 'enabled': KeyInfo(default=True), - 'max-sessions': KeyInfo(default=100), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'allocate-udp-ports-from': KeyInfo(default=2000), + 'authenticate': KeyInfo(default=True), + 'enabled': KeyInfo(default=True), + 'max-sessions': KeyInfo(default=100), + }, + ), ), ('tool', 'e-mail'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'address': KeyInfo(default='0.0.0.0'), - 'from': KeyInfo(default='<>'), - 'password': KeyInfo(default=''), - 'port': KeyInfo(default=25), - 'start-tls': KeyInfo(default=False), - 'tls': KeyInfo(default=False), - 'user': KeyInfo(default=''), - }, + versioned=[ + ('7.12', '>=', VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'from': KeyInfo(default='<>'), + 'password': KeyInfo(default=''), + 'port': KeyInfo(default=25), + 'server': KeyInfo(default='0.0.0.0'), + 'start-tls': KeyInfo(default=False), + 'tls': KeyInfo(default=False), + 'user': KeyInfo(default=''), + 'vfr': KeyInfo(default=''), + }, + )), + ('7.12', '<', VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'address': KeyInfo(default='0.0.0.0'), + 'from': KeyInfo(default='<>'), + 'password': KeyInfo(default=''), + 'port': KeyInfo(default=25), + 'start-tls': KeyInfo(default=False), + 'tls': KeyInfo(default=False), + 'user': KeyInfo(default=''), + 'vfr': KeyInfo(default=''), + }, + )), + ], ), ('tool', 'graphing'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'page-refresh': KeyInfo(default=300), - 'store-every': KeyInfo(default='5min'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'page-refresh': KeyInfo(default=300), + 'store-every': KeyInfo(default='5min'), + }, + ), + ), + ('tool', 'graphing', 'interface'): APIData( + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'allow-address': KeyInfo(default='0.0.0.0/0'), + 'interface': KeyInfo(default='all'), + 'store-on-disk': KeyInfo(default=True), + }, + )), + ], + ), + ('tool', 'graphing', 'resource'): APIData( + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'allow-address': KeyInfo(default='0.0.0.0/0'), + 'store-on-disk': KeyInfo(default=True), + }, + )), + ], ), ('tool', 'mac-server'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'allowed-interface-list': KeyInfo(), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'allowed-interface-list': KeyInfo(), + }, + ), ), ('tool', 'mac-server', 'mac-winbox'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'allowed-interface-list': KeyInfo(), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'allowed-interface-list': KeyInfo(), + }, + ), ), ('tool', 'mac-server', 'ping'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'enabled': KeyInfo(default=True), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'enabled': KeyInfo(default=True), + }, + ), + ), + ('tool', 'netwatch'): APIData( + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'certificate': KeyInfo(), + 'check-certificate': KeyInfo(), + 'comment': KeyInfo(), + 'disabled': KeyInfo(default=False), + 'down-script': KeyInfo(), + 'host': KeyInfo(required=True), + 'http-codes': KeyInfo(), + 'interval': KeyInfo(), + 'name': KeyInfo(), + 'packet-count': KeyInfo(), + 'packet-interval': KeyInfo(), + 'packet-size': KeyInfo(), + 'port': KeyInfo(), + 'src-address': KeyInfo(), + 'start-delay': KeyInfo(), + 'startup-delay': KeyInfo(), + 'test-script': KeyInfo(), + 'thr-avg': KeyInfo(), + 'thr-http-time': KeyInfo(), + 'thr-jitter': KeyInfo(), + 'thr-loss-count': KeyInfo(), + 'thr-loss-percent': KeyInfo(), + 'thr-max': KeyInfo(), + 'thr-stdev': KeyInfo(), + 'thr-tcp-conn-time': KeyInfo(), + 'timeout': KeyInfo(), + 'type': KeyInfo(default='simple'), + 'up-script': KeyInfo(), + }, + )), + ], ), ('tool', 'romon'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'enabled': KeyInfo(default=False), - 'id': KeyInfo(default='00:00:00:00:00:00'), - 'secrets': KeyInfo(default=''), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'enabled': KeyInfo(default=False), + 'id': KeyInfo(default='00:00:00:00:00:00'), + 'secrets': KeyInfo(default=''), + }, + ), ), ('tool', 'romon', 'port'): APIData( - fields={ - 'cost': KeyInfo(), - 'disabled': KeyInfo(), - 'forbid': KeyInfo(), - 'interface': KeyInfo(), - 'secrets': KeyInfo(), - }, + unversioned=VersionedAPIData( + fields={ + 'cost': KeyInfo(), + 'disabled': KeyInfo(), + 'forbid': KeyInfo(), + 'interface': KeyInfo(), + 'secrets': KeyInfo(), + }, + ), ), ('tool', 'sms'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'allowed-number': KeyInfo(default=''), - 'auto-erase': KeyInfo(default=False), - 'channel': KeyInfo(default=0), - 'port': KeyInfo(default='none'), - 'receive-enabled': KeyInfo(default=False), - 'secret': KeyInfo(default=''), - 'sim-pin': KeyInfo(default=''), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'allowed-number': KeyInfo(default=''), + 'auto-erase': KeyInfo(default=False), + 'channel': KeyInfo(default=0), + 'port': KeyInfo(default='none'), + 'receive-enabled': KeyInfo(default=False), + 'secret': KeyInfo(default=''), + 'sim-pin': KeyInfo(default=''), + }, + ), ), ('tool', 'sniffer'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'file-limit': KeyInfo(default='1000KiB'), - 'file-name': KeyInfo(default=''), - 'filter-cpu': KeyInfo(default=''), - 'filter-direction': KeyInfo(default='any'), - 'filter-interface': KeyInfo(default=''), - 'filter-ip-address': KeyInfo(default=''), - 'filter-ip-protocol': KeyInfo(default=''), - 'filter-ipv6-address': KeyInfo(default=''), - 'filter-mac-address': KeyInfo(default=''), - 'filter-mac-protocol': KeyInfo(default=''), - 'filter-operator-between-entries': KeyInfo(default='or'), - 'filter-port': KeyInfo(default=''), - 'filter-size': KeyInfo(default=''), - 'filter-stream': KeyInfo(default=False), - 'memory-limit': KeyInfo(default='100KiB'), - 'memory-scroll': KeyInfo(default=True), - 'only-headers': KeyInfo(default=False), - 'streaming-enabled': KeyInfo(default=False), - 'streaming-server': KeyInfo(default='0.0.0.0:37008'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'file-limit': KeyInfo(default='1000KiB'), + 'file-name': KeyInfo(default=''), + 'filter-cpu': KeyInfo(default=''), + 'filter-direction': KeyInfo(default='any'), + 'filter-interface': KeyInfo(default=''), + 'filter-ip-address': KeyInfo(default=''), + 'filter-ip-protocol': KeyInfo(default=''), + 'filter-ipv6-address': KeyInfo(default=''), + 'filter-mac-address': KeyInfo(default=''), + 'filter-mac-protocol': KeyInfo(default=''), + 'filter-operator-between-entries': KeyInfo(default='or'), + 'filter-port': KeyInfo(default=''), + 'filter-size': KeyInfo(default=''), + 'filter-stream': KeyInfo(default=False), + 'memory-limit': KeyInfo(default='100KiB'), + 'memory-scroll': KeyInfo(default=True), + 'only-headers': KeyInfo(default=False), + 'streaming-enabled': KeyInfo(default=False), + 'streaming-server': KeyInfo(default='0.0.0.0:37008'), + }, + ), ), ('tool', 'traffic-generator'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'latency-distribution-max': KeyInfo(default='100us'), - 'measure-out-of-order': KeyInfo(default=True), - 'stats-samples-to-keep': KeyInfo(default=100), - 'test-id': KeyInfo(default=0), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'latency-distribution-max': KeyInfo(default='100us'), + 'measure-out-of-order': KeyInfo(default=True), + 'stats-samples-to-keep': KeyInfo(default=100), + 'test-id': KeyInfo(default=0), + }, + ), + ), + ('user',): APIData( + unversioned=VersionedAPIData( + primary_keys=('name', ), + fully_understood=True, + fields={ + 'address': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'expired': KeyInfo(read_only=True), + 'group': KeyInfo(), + 'last-logged-in': KeyInfo(read_only=True), + 'name': KeyInfo(), + 'password': KeyInfo(write_only=True), + }, + ), ), ('user', 'aaa'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'accounting': KeyInfo(default=True), - 'default-group': KeyInfo(default='read'), - 'exclude-groups': KeyInfo(default=''), - 'interim-update': KeyInfo(default='0s'), - 'use-radius': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'accounting': KeyInfo(default=True), + 'default-group': KeyInfo(default='read'), + 'exclude-groups': KeyInfo(default=''), + 'interim-update': KeyInfo(default='0s'), + 'use-radius': KeyInfo(default=False), + }, + ), + ), + ('user', 'settings'): APIData( + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'minimum-categories': KeyInfo(), + 'minimum-password-length': KeyInfo(), + }, + ), ), ('queue', 'interface'): APIData( - primary_keys=('interface', ), - fully_understood=True, - fixed_entries=True, - fields={ - 'interface': KeyInfo(required=True), - 'queue': KeyInfo(required=True), - }, + unversioned=VersionedAPIData( + primary_keys=('interface', ), + fully_understood=True, + fixed_entries=True, + fields={ + 'interface': KeyInfo(required=True), + 'queue': KeyInfo(required=True), + }, + ), ), ('queue', 'tree'): APIData( - primary_keys=('name', ), - fully_understood=True, - fields={ - 'bucket-size': KeyInfo(default='0.1'), - 'burst-limit': KeyInfo(default=0), - 'burst-threshold': KeyInfo(default=0), - 'burst-time': KeyInfo(default='0s'), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'limit-at': KeyInfo(default=0), - 'max-limit': KeyInfo(default=0), - 'name': KeyInfo(), - 'packet-mark': KeyInfo(default=''), - 'parent': KeyInfo(required=True), - 'priority': KeyInfo(default=8), - 'queue': KeyInfo(default='default-small'), - }, + unversioned=VersionedAPIData( + primary_keys=('name', ), + fully_understood=True, + fields={ + 'bucket-size': KeyInfo(default='0.1'), + 'burst-limit': KeyInfo(default=0), + 'burst-threshold': KeyInfo(default=0), + 'burst-time': KeyInfo(default='0s'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'limit-at': KeyInfo(default=0), + 'max-limit': KeyInfo(default=0), + 'name': KeyInfo(), + 'packet-mark': KeyInfo(default=''), + 'parent': KeyInfo(required=True), + 'priority': KeyInfo(default=8), + 'queue': KeyInfo(default='default-small'), + }, + ), ), ('interface', 'ethernet', 'switch'): APIData( - fixed_entries=True, - primary_keys=('name', ), - fully_understood=True, - fields={ - 'cpu-flow-control': KeyInfo(default=True), - 'mirror-source': KeyInfo(default='none'), - 'mirror-target': KeyInfo(default='none'), - 'name': KeyInfo(), - }, + unversioned=VersionedAPIData( + fixed_entries=True, + primary_keys=('name', ), + fully_understood=True, + fields={ + 'cpu-flow-control': KeyInfo(default=True), + 'mirror-source': KeyInfo(default='none'), + 'mirror-target': KeyInfo(default='none'), + 'name': KeyInfo(), + }, + ), ), ('interface', 'ethernet', 'switch', 'port'): APIData( - fixed_entries=True, - primary_keys=('name', ), - fully_understood=True, - fields={ - 'default-vlan-id': KeyInfo(), - 'name': KeyInfo(), - 'vlan-header': KeyInfo(default='leave-as-is'), - 'vlan-mode': KeyInfo(default='disabled'), - }, + unversioned=VersionedAPIData( + fixed_entries=True, + primary_keys=('name', ), + fully_understood=True, + fields={ + 'default-vlan-id': KeyInfo(), + 'name': KeyInfo(), + 'vlan-header': KeyInfo(default='leave-as-is'), + 'vlan-mode': KeyInfo(default='disabled'), + }, + ), ), ('ip', 'dhcp-client', 'option'): APIData( - fixed_entries=True, - primary_keys=('name', ), - fully_understood=True, - fields={ - 'code': KeyInfo(), - 'name': KeyInfo(), - 'value': KeyInfo(), - }, + unversioned=VersionedAPIData( + fixed_entries=True, + primary_keys=('name', ), + fully_understood=True, + fields={ + 'code': KeyInfo(), + 'name': KeyInfo(), + 'value': KeyInfo(), + }, + ), ), ('ppp', 'profile'): APIData( - has_identifier=True, - fields={ - 'address-list': KeyInfo(), - 'bridge': KeyInfo(can_disable=True), - 'bridge-horizon': KeyInfo(can_disable=True), - 'bridge-learning': KeyInfo(), - 'bridge-path-cost': KeyInfo(can_disable=True), - 'bridge-port-priority': KeyInfo(can_disable=True), - 'change-tcp-mss': KeyInfo(), - 'dns-server': KeyInfo(can_disable=True), - 'idle-timeout': KeyInfo(can_disable=True), - 'incoming-filter': KeyInfo(can_disable=True), - 'insert-queue-before': KeyInfo(can_disable=True), - 'interface-list': KeyInfo(can_disable=True), - 'local-address': KeyInfo(can_disable=True), - 'name': KeyInfo(), - 'on-down': KeyInfo(), - 'on-up': KeyInfo(), - 'only-one': KeyInfo(), - 'outgoing-filter': KeyInfo(can_disable=True), - 'parent-queue': KeyInfo(can_disable=True), - 'queue-type': KeyInfo(can_disable=True), - 'rate-limit': KeyInfo(can_disable=True), - 'remote-address': KeyInfo(can_disable=True), - 'session-timeout': KeyInfo(can_disable=True), - 'use-compression': KeyInfo(), - 'use-encryption': KeyInfo(), - 'use-ipv6': KeyInfo(), - 'use-mpls': KeyInfo(), - 'use-upnp': KeyInfo(), - 'wins-server': KeyInfo(can_disable=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'address-list': KeyInfo(default=''), + 'bridge': KeyInfo(can_disable=True), + 'bridge-horizon': KeyInfo(can_disable=True), + 'bridge-learning': KeyInfo(default='default'), + 'bridge-path-cost': KeyInfo(can_disable=True), + 'bridge-port-priority': KeyInfo(can_disable=True), + 'change-tcp-mss': KeyInfo(default=True), + 'dns-server': KeyInfo(can_disable=True), + 'idle-timeout': KeyInfo(can_disable=True), + 'incoming-filter': KeyInfo(can_disable=True), + 'insert-queue-before': KeyInfo(can_disable=True), + 'interface-list': KeyInfo(can_disable=True), + 'local-address': KeyInfo(can_disable=True), + 'name': KeyInfo(required=True), + 'on-down': KeyInfo(default=''), + 'on-up': KeyInfo(default=''), + 'only-one': KeyInfo(default='default'), + 'outgoing-filter': KeyInfo(can_disable=True), + 'parent-queue': KeyInfo(can_disable=True), + 'queue-type': KeyInfo(can_disable=True), + 'rate-limit': KeyInfo(can_disable=True), + 'remote-address': KeyInfo(can_disable=True), + 'session-timeout': KeyInfo(can_disable=True), + 'use-compression': KeyInfo(default='default'), + 'use-encryption': KeyInfo(default='default'), + 'use-ipv6': KeyInfo(default=True), + 'use-mpls': KeyInfo(default='default'), + 'use-upnp': KeyInfo(default='default'), + 'wins-server': KeyInfo(can_disable=True), + }, + ), ), ('queue', 'type'): APIData( - has_identifier=True, - fields={ - 'kind': KeyInfo(), - 'mq-pfifo-limit': KeyInfo(), - 'name': KeyInfo(), - 'pcq-burst-rate': KeyInfo(), - 'pcq-burst-threshold': KeyInfo(), - 'pcq-burst-time': KeyInfo(), - 'pcq-classifier': KeyInfo(), - 'pcq-dst-address-mask': KeyInfo(), - 'pcq-dst-address6-mask': KeyInfo(), - 'pcq-limit': KeyInfo(), - 'pcq-rate': KeyInfo(), - 'pcq-src-address-mask': KeyInfo(), - 'pcq-src-address6-mask': KeyInfo(), - 'pcq-total-limit': KeyInfo(), - 'pfifo-limit': KeyInfo(), - 'red-avg-packet': KeyInfo(), - 'red-burst': KeyInfo(), - 'red-limit': KeyInfo(), - 'red-max-threshold': KeyInfo(), - 'red-min-threshold': KeyInfo(), - 'sfq-allot': KeyInfo(), - 'sfq-perturb': KeyInfo(), - }, + unversioned=VersionedAPIData( + has_identifier=True, + fields={ + 'kind': KeyInfo(), + 'mq-pfifo-limit': KeyInfo(), + 'name': KeyInfo(), + 'pcq-burst-rate': KeyInfo(), + 'pcq-burst-threshold': KeyInfo(), + 'pcq-burst-time': KeyInfo(), + 'pcq-classifier': KeyInfo(), + 'pcq-dst-address-mask': KeyInfo(), + 'pcq-dst-address6-mask': KeyInfo(), + 'pcq-limit': KeyInfo(), + 'pcq-rate': KeyInfo(), + 'pcq-src-address-mask': KeyInfo(), + 'pcq-src-address6-mask': KeyInfo(), + 'pcq-total-limit': KeyInfo(), + 'pfifo-limit': KeyInfo(), + 'red-avg-packet': KeyInfo(), + 'red-burst': KeyInfo(), + 'red-limit': KeyInfo(), + 'red-max-threshold': KeyInfo(), + 'red-min-threshold': KeyInfo(), + 'sfq-allot': KeyInfo(), + 'sfq-perturb': KeyInfo(), + }, + ), + ), + ('routing', 'bgp', 'connection'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'as': KeyInfo(), + 'add-path-out': KeyInfo(), + 'address-families': KeyInfo(), + 'cisco-vpls-nlri-len-fmt': KeyInfo(), + 'cluster-id': KeyInfo(), + 'comment': KeyInfo(), + 'connect': KeyInfo(default=True), + 'disabled': KeyInfo(default=False), + 'hold-time': KeyInfo(), + 'input.accept-communities': KeyInfo(), + 'input.accept-ext-communities': KeyInfo(), + 'input.accept-large-communities': KeyInfo(), + 'input.accpet-nlri': KeyInfo(), + 'input.accept-unknown': KeyInfo(), + 'input.affinity': KeyInfo(), + 'input.allow-as': KeyInfo(), + 'input.filter': KeyInfo(), + 'input.ignore-as-path-len': KeyInfo(), + 'input.limit-process-routes-ipv4': KeyInfo(), + 'input.limit-process-routes-ipv6': KeyInfo(), + 'keepalive-time': KeyInfo(), + 'listen': KeyInfo(default=True), + 'local.address': KeyInfo(), + 'local.port': KeyInfo(), + 'local.role': KeyInfo(required=True), + 'local.ttl': KeyInfo(), + 'multihop': KeyInfo(), + 'name': KeyInfo(required=True), + 'nexthop-choice': KeyInfo(), + 'output.affinity': KeyInfo(), + 'output.as-override': KeyInfo(), + 'output.default-originate': KeyInfo(), + 'output.default-prepend': KeyInfo(), + 'output.filter-chain': KeyInfo(), + 'output.filter-select': KeyInfo(), + 'output.keep-sent-attributes': KeyInfo(), + 'output.network': KeyInfo(), + 'output.no-client-to-client-reflection': KeyInfo(), + 'output.no-early-cut': KeyInfo(), + 'output.redistribute': KeyInfo(), + 'output.remote-private-as': KeyInfo(), + 'remote.address': KeyInfo(required=True), + 'remote.port': KeyInfo(), + 'remote.as': KeyInfo(), + 'remote.allowed-as': KeyInfo(), + 'remote.ttl': KeyInfo(), + 'router-id': KeyInfo(), + 'routing-table': KeyInfo(), + 'save-to': KeyInfo(), + 'tcp-md5-key': KeyInfo(), + 'templates': KeyInfo(), + 'use-bfd': KeyInfo(), + 'vrf': KeyInfo(), + }, + ), ), ('routing', 'bgp', 'instance'): APIData( - fixed_entries=True, - primary_keys=('name', ), - fully_understood=True, - fields={ - 'as': KeyInfo(), - 'client-to-client-reflection': KeyInfo(), - 'cluster-id': KeyInfo(can_disable=True), - 'confederation': KeyInfo(can_disable=True), - 'disabled': KeyInfo(), - 'ignore-as-path-len': KeyInfo(), - 'name': KeyInfo(), - 'out-filter': KeyInfo(), - 'redistribute-connected': KeyInfo(), - 'redistribute-ospf': KeyInfo(), - 'redistribute-other-bgp': KeyInfo(), - 'redistribute-rip': KeyInfo(), - 'redistribute-static': KeyInfo(), - 'router-id': KeyInfo(), - 'routing-table': KeyInfo(), - }, + unversioned=VersionedAPIData( + fixed_entries=True, + primary_keys=('name', ), + fully_understood=True, + fields={ + 'as': KeyInfo(), + 'client-to-client-reflection': KeyInfo(), + 'cluster-id': KeyInfo(can_disable=True), + 'confederation': KeyInfo(can_disable=True), + 'disabled': KeyInfo(default=False), + 'ignore-as-path-len': KeyInfo(), + 'name': KeyInfo(), + 'out-filter': KeyInfo(), + 'redistribute-connected': KeyInfo(), + 'redistribute-ospf': KeyInfo(), + 'redistribute-other-bgp': KeyInfo(), + 'redistribute-rip': KeyInfo(), + 'redistribute-static': KeyInfo(), + 'router-id': KeyInfo(), + 'routing-table': KeyInfo(), + }, + ), + ), + ('routing', 'bgp', 'template'): APIData( + unversioned=VersionedAPIData( + primary_keys=('name', ), + fully_understood=True, + fields={ + 'add-path-out': KeyInfo(), + 'address-families': KeyInfo(default='ip'), + 'as': KeyInfo(), + 'as-override': KeyInfo(default=False), + 'cisco-vpls-nlri-len-fmt': KeyInfo(), + 'cluster-id': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'hold-time': KeyInfo(default='3m'), + 'input.accept-communities': KeyInfo(), + 'input.accept-ext-communities': KeyInfo(), + 'input.accept-large-communities': KeyInfo(), + 'input.accept-unknown': KeyInfo(), + 'input.accept-nlri': KeyInfo(), + 'input.affinity': KeyInfo(), + 'input.allow-as': KeyInfo(), + 'input.filter': KeyInfo(), + 'input.ignore-as-path-len': KeyInfo(default=False), + 'input.limit-nlri-diversity': KeyInfo(), + 'input.limit-process-routes-ipv4': KeyInfo(), + 'input.limit-process-routes-ipv6': KeyInfo(), + 'keepalive-time': KeyInfo(default='3m'), + 'multihop': KeyInfo(default=False), + 'name': KeyInfo(), + 'nexthop-choice': KeyInfo(default='default'), + 'output.affinity': KeyInfo(), + 'output.default-originate': KeyInfo(default='never'), + 'output.default-prepent': KeyInfo(), + 'output.filter-chain': KeyInfo(), + 'output.filter-select': KeyInfo(), + 'output.keep-sent-attributes': KeyInfo(default=False), + 'output.network': KeyInfo(), + 'output.no-client-to-client-reflection': KeyInfo(), + 'output.no-early-cut': KeyInfo(), + 'output.redistribute': KeyInfo(), + 'remove-private-as': KeyInfo(default=False), + 'router-id': KeyInfo(default='main'), + 'routing-table': KeyInfo(default='main'), + 'save-to': KeyInfo(), + 'templates': KeyInfo(), + 'use-bfd': KeyInfo(default=False), + 'vrf': KeyInfo(default='main'), + }, + ), ), ('system', 'logging', 'action'): APIData( - fully_understood=True, - primary_keys=('name',), - fields={ - 'bsd-syslog': KeyInfo(default=False), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disk-file-count': KeyInfo(default=2), - 'disk-file-name': KeyInfo(default='log'), - 'disk-lines-per-file': KeyInfo(default=1000), - 'disk-stop-on-full': KeyInfo(default=False), - 'email-start-tls': KeyInfo(default=False), - 'email-to': KeyInfo(default=''), - 'memory-lines': KeyInfo(default=1000), - 'memory-stop-on-full': KeyInfo(default=False), - 'name': KeyInfo(), - 'remember': KeyInfo(default=True), - 'remote': KeyInfo(default='0.0.0.0'), - 'remote-port': KeyInfo(default=514), - 'src-address': KeyInfo(default='0.0.0.0'), - 'syslog-facility': KeyInfo(default='daemon'), - 'syslog-severity': KeyInfo(default='auto'), - 'syslog-time-format': KeyInfo(default='bsd-syslog'), - 'target': KeyInfo(required=True), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name',), + fields={ + 'bsd-syslog': KeyInfo(default=False), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disk-file-count': KeyInfo(default=2), + 'disk-file-name': KeyInfo(default='log'), + 'disk-lines-per-file': KeyInfo(default=1000), + 'disk-stop-on-full': KeyInfo(default=False), + 'email-start-tls': KeyInfo(default=False), + 'email-to': KeyInfo(default=''), + 'memory-lines': KeyInfo(default=1000), + 'memory-stop-on-full': KeyInfo(default=False), + 'name': KeyInfo(), + 'remember': KeyInfo(default=True), + 'remote': KeyInfo(default='0.0.0.0'), + 'remote-port': KeyInfo(default=514), + 'src-address': KeyInfo(default='0.0.0.0'), + 'syslog-facility': KeyInfo(default='daemon'), + 'syslog-severity': KeyInfo(default='auto'), + 'syslog-time-format': KeyInfo(default='bsd-syslog'), + 'target': KeyInfo(required=True), + }, + ), ), ('user', 'group'): APIData( - fixed_entries=True, - primary_keys=('name', ), - fully_understood=True, - fields={ - 'name': KeyInfo(), - 'policy': KeyInfo(), - 'skin': KeyInfo(default='default'), - }, + unversioned=VersionedAPIData( + primary_keys=('name', ), + fully_understood=True, + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'name': KeyInfo(), + 'policy': KeyInfo(), + 'skin': KeyInfo(default='default'), + }, + ), ), ('caps-man', 'manager'): APIData( - single_value=True, - fully_understood=True, - fields={ - 'ca-certificate': KeyInfo(default='none'), - 'certificate': KeyInfo(default='none'), - 'enabled': KeyInfo(default=False), - 'package-path': KeyInfo(default=''), - 'require-peer-certificate': KeyInfo(default=False), - 'upgrade-policy': KeyInfo(default='none'), - }, + unversioned=VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'ca-certificate': KeyInfo(default='none'), + 'certificate': KeyInfo(default='none'), + 'enabled': KeyInfo(default=False), + 'package-path': KeyInfo(default=''), + 'require-peer-certificate': KeyInfo(default=False), + 'upgrade-policy': KeyInfo(default='none'), + }, + ), ), ('ip', 'firewall', 'service-port'): APIData( - primary_keys=('name', ), - fully_understood=True, - fields={ - 'disabled': KeyInfo(default=False), - 'name': KeyInfo(), - 'ports': KeyInfo(), - 'sip-direct-media': KeyInfo(), - 'sip-timeout': KeyInfo(), - }, + unversioned=VersionedAPIData( + primary_keys=('name', ), + fully_understood=True, + fields={ + 'disabled': KeyInfo(default=False), + 'name': KeyInfo(), + 'ports': KeyInfo(), + 'sip-direct-media': KeyInfo(), + 'sip-timeout': KeyInfo(), + }, + ), ), ('ip', 'firewall', 'layer7-protocol'): APIData( - primary_keys=('name', ), - fully_understood=True, - fields={ - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'name': KeyInfo(), - 'regexp': KeyInfo(), - }, + unversioned=VersionedAPIData( + primary_keys=('name', ), + fully_understood=True, + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'name': KeyInfo(), + 'regexp': KeyInfo(), + }, + ), ), ('ip', 'hotspot', 'service-port'): APIData( - fixed_entries=True, - primary_keys=('name', ), - fully_understood=True, - fields={ - 'disabled': KeyInfo(default=False), - 'name': KeyInfo(), - 'ports': KeyInfo(), - }, + unversioned=VersionedAPIData( + fixed_entries=True, + primary_keys=('name', ), + fully_understood=True, + fields={ + 'disabled': KeyInfo(default=False), + 'name': KeyInfo(), + 'ports': KeyInfo(), + }, + ), ), ('ip', 'ipsec', 'policy'): APIData( - fully_understood=True, - fields={ - 'action': KeyInfo(default='encrypt'), - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'dst-address': KeyInfo(), - 'dst-port': KeyInfo(default='any'), - 'group': KeyInfo(can_disable=True, remove_value='default'), - 'ipsec-protocols': KeyInfo(default='esp'), - 'level': KeyInfo(default='require'), - 'peer': KeyInfo(), - 'proposal': KeyInfo(default='default'), - 'protocol': KeyInfo(default='all'), - 'src-address': KeyInfo(), - 'src-port': KeyInfo(default='any'), - 'template': KeyInfo(can_disable=True, remove_value=False), - # the tepmlate field can't really be changed once the item is created. This config captures the behavior best as it can - # i.e. tepmplate=yes is shown, tepmlate=no is hidden - 'tunnel': KeyInfo(default=False), - }, + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'action': KeyInfo(default='encrypt'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'dst-address': KeyInfo(), + 'dst-port': KeyInfo(default='any'), + 'group': KeyInfo(can_disable=True, remove_value='default'), + 'ipsec-protocols': KeyInfo(default='esp'), + 'level': KeyInfo(default='require'), + 'peer': KeyInfo(), + 'proposal': KeyInfo(default='default'), + 'protocol': KeyInfo(default='all'), + 'src-address': KeyInfo(), + 'src-port': KeyInfo(default='any'), + 'template': KeyInfo(can_disable=True, remove_value=False), + # the tepmlate field can't really be changed once the item is created. This config captures the behavior best as it can + # i.e. tepmplate=yes is shown, tepmlate=no is hidden + 'tunnel': KeyInfo(default=False), + }, + ), ), ('ip', 'service'): APIData( - fixed_entries=True, - primary_keys=('name', ), - fully_understood=True, - fields={ - 'address': KeyInfo(), - 'certificate': KeyInfo(), - 'disabled': KeyInfo(default=False), - 'name': KeyInfo(), - 'port': KeyInfo(), - 'tls-version': KeyInfo(), - }, + unversioned=VersionedAPIData( + fixed_entries=True, + primary_keys=('name', ), + fully_understood=True, + fields={ + 'address': KeyInfo(), + 'certificate': KeyInfo(), + 'disabled': KeyInfo(default=False), + 'name': KeyInfo(), + 'port': KeyInfo(), + 'tls-version': KeyInfo(), + }, + ), ), ('system', 'logging'): APIData( - fully_understood=True, - fields={ - 'action': KeyInfo(default='memory'), - 'disabled': KeyInfo(default=False), - 'prefix': KeyInfo(default=''), - 'topics': KeyInfo(default=''), - }, + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'action': KeyInfo(default='memory'), + 'disabled': KeyInfo(default=False), + 'prefix': KeyInfo(default=''), + 'topics': KeyInfo(default=''), + }, + ), ), ('system', 'resource', 'irq'): APIData( - has_identifier=True, - fields={ - 'cpu': KeyInfo(), - }, + unversioned=VersionedAPIData( + has_identifier=True, + fields={ + 'cpu': KeyInfo(), + }, + ), ), ('system', 'scheduler'): APIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'interval': KeyInfo(default='0s'), - 'name': KeyInfo(), - 'on-event': KeyInfo(default=''), - 'policy': KeyInfo(default='ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon'), - 'start-date': KeyInfo(), - 'start-time': KeyInfo(), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interval': KeyInfo(default='0s'), + 'name': KeyInfo(), + 'on-event': KeyInfo(default=''), + 'policy': KeyInfo(default='ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon'), + 'start-date': KeyInfo(), + 'start-time': KeyInfo(), + }, + ), ), ('system', 'script'): APIData( - fully_understood=True, - primary_keys=('name',), - fields={ - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'dont-require-permissions': KeyInfo(default=False), - 'name': KeyInfo(), - 'owner': KeyInfo(), - 'policy': KeyInfo(default='ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon'), - 'source': KeyInfo(default=''), - }, + unversioned=VersionedAPIData( + fully_understood=True, + primary_keys=('name',), + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'dont-require-permissions': KeyInfo(default=False), + 'name': KeyInfo(), + 'owner': KeyInfo(), + 'policy': KeyInfo(default='ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon'), + 'source': KeyInfo(default=''), + }, + ), ), } diff --git a/ansible_collections/community/routeros/plugins/module_utils/api.py b/ansible_collections/community/routeros/plugins/module_utils/api.py index 5c598f3eb..6c276d730 100644 --- a/ansible_collections/community/routeros/plugins/module_utils/api.py +++ b/ansible_collections/community/routeros/plugins/module_utils/api.py @@ -97,6 +97,7 @@ def _ros_api_connect(module, username, password, host, port, use_tls, force_no_c def create_api(module): + """Create an API object.""" return _ros_api_connect( module, module.params['username'], @@ -111,3 +112,9 @@ def create_api(module): module.params['encoding'], module.params['timeout'], ) + + +def get_api_version(api): + """Given an API object, query the system's version.""" + system_info = list(api.path().join('system', 'resource'))[0] + return system_info['version'].split(' ', 1)[0] diff --git a/ansible_collections/community/routeros/plugins/modules/api.py b/ansible_collections/community/routeros/plugins/modules/api.py index f9c619fc1..4857a3cd9 100644 --- a/ansible_collections/community/routeros/plugins/modules/api.py +++ b/ansible_collections/community/routeros/plugins/modules/api.py @@ -17,7 +17,7 @@ description: - Ansible module for RouterOS API with the Python C(librouteros) library. - This module can add, remove, update, query and execute arbitrary command in RouterOS via API. notes: - - I(add), I(remove), I(update), I(cmd) and I(query) are mutually exclusive. + - O(add), O(remove), O(update), O(cmd), and O(query) are mutually exclusive. - Use the M(community.routeros.api_modify) and M(community.routeros.api_find_and_modify) modules for more specific modifications, and the M(community.routeros.api_info) module for a more controlled way of returning all entries for a path. @@ -40,26 +40,26 @@ options: description: - Main path for all other arguments. - If other arguments are not set, api will return all items in selected path. - - Example C(ip address). Equivalent of RouterOS CLI C(/ip address print). + - Example V(ip address). Equivalent of RouterOS CLI C(/ip address print). required: true type: str add: description: - Will add selected arguments in selected path to RouterOS config. - - Example C(address=1.1.1.1/32 interface=ether1). + - Example V(address=1.1.1.1/32 interface=ether1). - Equivalent in RouterOS CLI C(/ip address add address=1.1.1.1/32 interface=ether1). type: str remove: description: - Remove config/value from RouterOS by '.id'. - - Example C(*03) will remove config/value with C(id=*03) in selected path. + - Example V(*03) will remove config/value with C(id=*03) in selected path. - Equivalent in RouterOS CLI C(/ip address remove numbers=1). - Note C(number) in RouterOS CLI is different from C(.id). type: str update: description: - Update config/value in RouterOS by '.id' in selected path. - - Example C(.id=*03 address=1.1.1.3/32) and path C(ip address) will replace existing ip address with C(.id=*03). + - Example V(.id=*03 address=1.1.1.3/32) and path V(ip address) will replace existing ip address with C(.id=*03). - Equivalent in RouterOS CLI C(/ip address set address=1.1.1.3/32 numbers=1). - Note C(number) in RouterOS CLI is different from C(.id). type: str @@ -67,11 +67,11 @@ options: description: - Query given path for selected query attributes from RouterOS aip. - WHERE is key word which extend query. WHERE format is key operator value - with spaces. - - WHERE valid operators are C(==) or C(eq), C(!=) or C(not), C(>) or C(more), C(<) or C(less). - - Example path C(ip address) and query C(.id address) will return only C(.id) and C(address) for all items in C(ip address) path. - - Example path C(ip address) and query C(.id address WHERE address == 1.1.1.3/32). - will return only C(.id) and C(address) for items in C(ip address) path, where address is eq to 1.1.1.3/32. - - Example path C(interface) and query C(mtu name WHERE mut > 1400) will + - WHERE valid operators are V(==) or V(eq), V(!=) or V(not), V(>) or V(more), V(<) or V(less). + - Example path V(ip address) and query V(.id address) will return only C(.id) and C(address) for all items in V(ip address) path. + - Example path V(ip address) and query V(.id address WHERE address == 1.1.1.3/32). + will return only C(.id) and C(address) for items in V(ip address) path, where address is eq to 1.1.1.3/32. + - Example path V(interface) and query V(mtu name WHERE mut > 1400) will return only interfaces C(mtu,name) where mtu is bigger than 1400. - Equivalent in RouterOS CLI C(/interface print where mtu > 1400). type: str @@ -84,65 +84,69 @@ options: attributes: description: - The list of attributes to return. - - Every attribute used in a I(where) clause need to be listed here. + - Every attribute used in a O(extended_query.where[]) clause need to be listed here. type: list elements: str required: true where: description: - Allows to restrict the objects returned. - - The conditions here must all match. An I(or) condition needs at least one of its conditions to match. + - The conditions here must all match. An O(extended_query.where[].or) condition needs at least one of its conditions to match. type: list elements: dict suboptions: attribute: description: - - The attribute to match. Must be part of I(attributes). - - Either I(or) or all of I(attribute), I(is), and I(value) have to be specified. + - The attribute to match. Must be part of O(extended_query.attributes). + - Either O(extended_query.where[].or) or all of O(extended_query.where[].attribute), O(extended_query.where[].is), + and O(extended_query.where[].value) have to be specified. type: str is: description: - The operator to use for matching. - - For equality use C(==) or C(eq). For less use C(<) or C(less). For more use C(>) or C(more). - - Use C(in) to check whether the value is part of a list. In that case, I(value) must be a list. - - Either I(or) or all of I(attribute), I(is), and I(value) have to be specified. + - For equality use V(==) or V(eq). For less use V(<) or V(less). For more use V(>) or V(more). + - Use V(in) to check whether the value is part of a list. In that case, O(extended_query.where[].value) must be a list. + - Either O(extended_query.where[].or) or all of O(extended_query.where[].attribute), O(extended_query.where[].is), + and O(extended_query.where[].value) have to be specified. type: str choices: ["==", "!=", ">", "<", "in", "eq", "not", "more", "less"] value: description: - - The value to compare to. Must be a list for I(is=in). - - Either I(or) or all of I(attribute), I(is), and I(value) have to be specified. + - The value to compare to. Must be a list for O(extended_query.where[].is=in). + - Either O(extended_query.where[].or) or all of O(extended_query.where[].attribute), O(extended_query.where[].is), + and O(extended_query.where[].value) have to be specified. type: raw or: description: - A list of conditions so that at least one of them has to match. - - Either I(or) or all of I(attribute), I(is), and I(value) have to be specified. + - Either O(extended_query.where[].or) or all of O(extended_query.where[].attribute), O(extended_query.where[].is), + and O(extended_query.where[].value) have to be specified. type: list elements: dict suboptions: attribute: description: - - The attribute to match. Must be part of I(attributes). + - The attribute to match. Must be part of O(extended_query.attributes). type: str required: true is: description: - The operator to use for matching. - - For equality use C(==) or C(eq). For less use C(<) or C(less). For more use C(>) or C(more). - - Use C(in) to check whether the value is part of a list. In that case, I(value) must be a list. + - For equality use V(==) or V(eq). For less use V(<) or V(less). For more use V(>) or V(more). + - Use V(in) to check whether the value is part of a list. In that case, O(extended_query.where[].or[].value) must be a list. type: str choices: ["==", "!=", ">", "<", "in", "eq", "not", "more", "less"] required: true value: description: - - The value to compare to. Must be a list for I(is=in). + - The value to compare to. Must be a list for O(extended_query.where[].or[].is=in). type: raw required: true cmd: description: - Execute any/arbitrary command in selected path, after the command we can add C(.id). - - Example path C(system script) and cmd C(run .id=*03) is equivalent in RouterOS CLI C(/system script run number=0). - - Example path C(ip address) and cmd C(print) is equivalent in RouterOS CLI C(/ip address print). + - Example path V(system script) and cmd V(run .id=*03) is equivalent in RouterOS CLI C(/system script run number=0). + - Example path V(ip address) and cmd V(print) is equivalent in RouterOS CLI C(/ip address print). type: str seealso: - ref: ansible_collections.community.routeros.docsite.quoting @@ -220,7 +224,7 @@ EXAMPLES = ''' ansible.builtin.debug: msg: '{{ extended_queryout }}' -- name: Update example - ether2 ip addres with ".id = *14" +- name: Update example - ether2 ip address with ".id = *14" community.routeros.api: hostname: "{{ hostname }}" password: "{{ password }}" diff --git a/ansible_collections/community/routeros/plugins/modules/api_facts.py b/ansible_collections/community/routeros/plugins/modules/api_facts.py index f29723667..296621ea6 100644 --- a/ansible_collections/community/routeros/plugins/modules/api_facts.py +++ b/ansible_collections/community/routeros/plugins/modules/api_facts.py @@ -41,9 +41,9 @@ options: description: - When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include - C(all), C(hardware), C(interfaces), and C(routing). + V(all), V(hardware), V(interfaces), and V(routing). - Can specify a list of values to include a larger subset. - Values can also be used with an initial C(!) to specify that a + Values can also be used with an initial V(!) to specify that a specific subset should not be collected. required: false default: @@ -89,93 +89,93 @@ ansible_facts: # default ansible_net_model: description: The model name returned from the device. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str ansible_net_serialnum: description: The serial number of the remote device. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str ansible_net_version: description: The operating system version running on the remote device. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str ansible_net_hostname: description: The configured hostname of the device. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str ansible_net_arch: description: The CPU architecture of the device. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str ansible_net_uptime: description: The uptime of the device. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str ansible_net_cpu_load: description: Current CPU load. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str # hardware ansible_net_spacefree_mb: description: The available disk space on the remote device in MiB. - returned: I(gather_subset) contains C(hardware) + returned: O(gather_subset) contains V(hardware) type: dict ansible_net_spacetotal_mb: description: The total disk space on the remote device in MiB. - returned: I(gather_subset) contains C(hardware) + returned: O(gather_subset) contains V(hardware) type: dict ansible_net_memfree_mb: description: The available free memory on the remote device in MiB. - returned: I(gather_subset) contains C(hardware) + returned: O(gather_subset) contains V(hardware) type: int ansible_net_memtotal_mb: description: The total memory on the remote device in MiB. - returned: I(gather_subset) contains C(hardware) + returned: O(gather_subset) contains V(hardware) type: int # interfaces ansible_net_all_ipv4_addresses: description: All IPv4 addresses configured on the device. - returned: I(gather_subset) contains C(interfaces) + returned: O(gather_subset) contains V(interfaces) type: list ansible_net_all_ipv6_addresses: description: All IPv6 addresses configured on the device. - returned: I(gather_subset) contains C(interfaces) + returned: O(gather_subset) contains V(interfaces) type: list ansible_net_interfaces: description: A hash of all interfaces running on the system. - returned: I(gather_subset) contains C(interfaces) + returned: O(gather_subset) contains V(interfaces) type: dict ansible_net_neighbors: description: The list of neighbors from the remote device. - returned: I(gather_subset) contains C(interfaces) + returned: O(gather_subset) contains V(interfaces) type: dict # routing ansible_net_bgp_peer: description: A dictionary with BGP peer information. - returned: I(gather_subset) contains C(routing) + returned: O(gather_subset) contains V(routing) type: dict ansible_net_bgp_vpnv4_route: description: A dictionary with BGP vpnv4 route information. - returned: I(gather_subset) contains C(routing) + returned: O(gather_subset) contains V(routing) type: dict ansible_net_bgp_instance: description: A dictionary with BGP instance information. - returned: I(gather_subset) contains C(routing) + returned: O(gather_subset) contains V(routing) type: dict ansible_net_route: description: A dictionary for routes in all routing tables. - returned: I(gather_subset) contains C(routing) + returned: O(gather_subset) contains V(routing) type: dict ansible_net_ospf_instance: description: A dictionary with OSPF instances. - returned: I(gather_subset) contains C(routing) + returned: O(gather_subset) contains V(routing) type: dict ansible_net_ospf_neighbor: description: A dictionary with OSPF neighbors. - returned: I(gather_subset) contains C(routing) + returned: O(gather_subset) contains V(routing) type: dict """ diff --git a/ansible_collections/community/routeros/plugins/modules/api_find_and_modify.py b/ansible_collections/community/routeros/plugins/modules/api_find_and_modify.py index 0be3f7039..176c9437f 100644 --- a/ansible_collections/community/routeros/plugins/modules/api_find_and_modify.py +++ b/ansible_collections/community/routeros/plugins/modules/api_find_and_modify.py @@ -21,7 +21,7 @@ description: or change multiple entries in different ways in one step. notes: - "If you want to change values based on their old values (like change all comments 'foo' to 'bar') and make sure that - there are at least N such values, you can use I(require_matches_min=N) together with I(allow_no_matches=true). + there are at least N such values, you can use O(require_matches_min=N) together with O(allow_no_matches=true). This will make the module fail if there are less than N such entries, but not if there is no match. The latter case is needed for idempotency of the task: once the values have been changed, there should be no further match." extends_documentation_fragment: @@ -40,21 +40,21 @@ options: path: description: - Path to query. - - An example value is C(ip address). This is equivalent to running C(/ip address) in the RouterOS CLI. + - An example value is V(ip address). This is equivalent to running C(/ip address) in the RouterOS CLI. required: true type: str find: description: - Fields to search for. - - The module will only consider entries in the given I(path) that match all fields provided here. - - Use YAML C(~), or prepend keys with C(!), to specify an unset value. + - The module will only consider entries in the given O(path) that match all fields provided here. + - Use YAML V(~), or prepend keys with V(!), to specify an unset value. - Note that if the dictionary specified here is empty, every entry in the path will be matched. required: true type: dict values: description: - - On all entries matching the conditions in I(find), set the keys of this option to the values specified here. - - Use YAML C(~), or prepend keys with C(!), to specify to unset a value. + - On all entries matching the conditions in O(find), set the keys of this option to the values specified here. + - Use YAML V(~), or prepend keys with V(!), to specify to unset a value. required: true type: dict require_matches_min: @@ -72,7 +72,7 @@ options: allow_no_matches: description: - Whether to allow that no match is found. - - If not specified, this value is induced from whether I(require_matches_min) is 0 or larger. + - If not specified, this value is induced from whether O(require_matches_min) is 0 or larger. type: bool seealso: - module: community.routeros.api @@ -146,7 +146,7 @@ new_data: returned: success match_count: description: - - The number of entries that matched the criteria in I(find). + - The number of entries that matched the criteria in O(find). sample: 1 type: int returned: success diff --git a/ansible_collections/community/routeros/plugins/modules/api_info.py b/ansible_collections/community/routeros/plugins/modules/api_info.py index 50228c063..f9a39464f 100644 --- a/ansible_collections/community/routeros/plugins/modules/api_info.py +++ b/ansible_collections/community/routeros/plugins/modules/api_info.py @@ -18,9 +18,9 @@ version_added: 2.2.0 description: - Allows to retrieve information for a path using the API. - This can be used to backup a path to restore it with the M(community.routeros.api_modify) module. - - Entries are normalized, dynamic and builtin entries are not returned. Use the I(handle_disabled) and - I(hide_defaults) options to control normalization, the I(include_dynamic) and I(include_builtin) options to also return - dynamic resp. builtin entries, and use I(unfiltered) to return all fields including counters. + - Entries are normalized, dynamic and builtin entries are not returned. Use the O(handle_disabled) and + O(hide_defaults) options to control normalization, the O(include_dynamic) and O(include_builtin) options to also return + dynamic resp. builtin entries, and use O(unfiltered) to return all fields including counters. - B(Note) that this module is still heavily in development, and only supports B(some) paths. If you want to support new paths, or think you found problems with existing paths, please first L(create an issue in the community.routeros Issue Tracker,https://github.com/ansible-collections/community.routeros/issues/). @@ -37,16 +37,18 @@ options: path: description: - Path to query. - - An example value is C(ip address). This is equivalent to running C(/ip address print) in the RouterOS CLI. + - An example value is V(ip address). This is equivalent to running C(/ip address print) in the RouterOS CLI. required: true type: str choices: # BEGIN PATH LIST - caps-man aaa - caps-man access-list + - caps-man channel - caps-man configuration - caps-man datapath - caps-man manager + - caps-man manager interface - caps-man provisioning - caps-man security - certificate settings @@ -69,18 +71,47 @@ options: - interface l2tp-server server - interface list - interface list member + - interface ovpn-client - interface ovpn-server server + - interface ppp-client - interface pppoe-client - interface pptp-server server - interface sstp-server server - interface vlan - interface vrrp + - interface wifi + - interface wifi aaa + - interface wifi access-list + - interface wifi cap + - interface wifi capsman + - interface wifi channel + - interface wifi configuration + - interface wifi datapath + - interface wifi interworking + - interface wifi provisioning + - interface wifi security + - interface wifi steering + - interface wifiwave2 + - interface wifiwave2 aaa + - interface wifiwave2 access-list + - interface wifiwave2 cap + - interface wifiwave2 capsman + - interface wifiwave2 channel + - interface wifiwave2 configuration + - interface wifiwave2 datapath + - interface wifiwave2 interworking + - interface wifiwave2 provisioning + - interface wifiwave2 security + - interface wifiwave2 steering - interface wireguard - interface wireguard peers + - interface wireless - interface wireless align - interface wireless cap + - interface wireless security-profiles - interface wireless sniffer - interface wireless snooper + - iot modbus - ip accounting - ip accounting web-access - ip address @@ -93,6 +124,8 @@ options: - ip dhcp-server config - ip dhcp-server lease - ip dhcp-server network + - ip dhcp-server option + - ip dhcp-server option sets - ip dns - ip dns static - ip firewall address-list @@ -123,7 +156,10 @@ options: - ip tftp settings - ip traffic-flow - ip traffic-flow ipfix + - ip traffic-flow target - ip upnp + - ip upnp interfaces + - ip vrf - ipv6 address - ipv6 dhcp-client - ipv6 dhcp-server @@ -131,6 +167,7 @@ options: - ipv6 firewall address-list - ipv6 firewall filter - ipv6 firewall mangle + - ipv6 firewall nat - ipv6 firewall raw - ipv6 nd - ipv6 nd prefix default @@ -139,11 +176,19 @@ options: - mpls - mpls ldp - port firmware + - port remote-access - ppp aaa + - ppp profile - queue interface - queue tree + - radius - radius incoming + - routing bgp connection - routing bgp instance + - routing bgp template + - routing filter rule + - routing filter select-rule + - routing id - routing mme - routing ospf area - routing ospf area range @@ -153,6 +198,8 @@ options: - routing pimsm interface-template - routing rip - routing ripng + - routing rule + - routing table - snmp - snmp community - system clock @@ -175,15 +222,20 @@ options: - tool bandwidth-server - tool e-mail - tool graphing + - tool graphing interface + - tool graphing resource - tool mac-server - tool mac-server mac-winbox - tool mac-server ping + - tool netwatch - tool romon - tool sms - tool sniffer - tool traffic-generator + - user - user aaa - user group + - user settings # END PATH LIST unfiltered: description: @@ -194,9 +246,9 @@ options: handle_disabled: description: - How to handle unset values. - - C(exclamation) prepends the keys with C(!) in the output with value C(null). - - C(null-value) uses the regular key with value C(null). - - C(omit) omits these values from the result. + - V(exclamation) prepends the keys with V(!) in the output with value V(null). + - V(null-value) uses the regular key with value V(null). + - V(omit) omits these values from the result. type: str choices: - exclamation @@ -212,17 +264,24 @@ options: description: - Whether to include dynamic values. - By default, they are not returned, and the C(dynamic) keys are omitted. - - If set to C(true), they are returned as well, and the C(dynamic) keys are returned as well. + - If set to V(true), they are returned as well, and the C(dynamic) keys are returned as well. type: bool default: false include_builtin: description: - Whether to include builtin values. - By default, they are not returned, and the C(builtin) keys are omitted. - - If set to C(true), they are returned as well, and the C(builtin) keys are returned as well. + - If set to V(true), they are returned as well, and the C(builtin) keys are returned as well. type: bool default: false version_added: 2.4.0 + include_read_only: + description: + - Whether to include read-only fields. + - By default, they are not returned. + type: bool + default: false + version_added: 2.10.0 seealso: - module: community.routeros.api - module: community.routeros.api_facts @@ -271,6 +330,7 @@ from ansible_collections.community.routeros.plugins.module_utils.api import ( api_argument_spec, check_has_library, create_api, + get_api_version, ) from ansible_collections.community.routeros.plugins.module_utils._api_data import ( @@ -301,6 +361,7 @@ def main(): hide_defaults=dict(type='bool', default=True), include_dynamic=dict(type='bool', default=False), include_builtin=dict(type='bool', default=False), + include_read_only=dict(type='bool', default=False), ) module_args.update(api_argument_spec()) @@ -313,14 +374,24 @@ def main(): api = create_api(module) path = split_path(module.params['path']) - path_info = PATHS.get(tuple(path)) - if path_info is None: + versioned_path_info = PATHS.get(tuple(path)) + if versioned_path_info is None: module.fail_json(msg='Path /{path} is not yet supported'.format(path='/'.join(path))) + if versioned_path_info.needs_version: + api_version = get_api_version(api) + supported, not_supported_msg = versioned_path_info.provide_version(api_version) + if not supported: + msg = 'Path /{path} is not supported for API version {api_version}'.format(path='/'.join(path), api_version=api_version) + if not_supported_msg: + msg = '{0}: {1}'.format(msg, not_supported_msg) + module.fail_json(msg=msg) + path_info = versioned_path_info.get_data() handle_disabled = module.params['handle_disabled'] hide_defaults = module.params['hide_defaults'] include_dynamic = module.params['include_dynamic'] include_builtin = module.params['include_builtin'] + include_read_only = module.params['include_read_only'] try: api_path = compose_api_path(api, path) @@ -344,7 +415,10 @@ def main(): if k not in path_info.fields: entry.pop(k) if handle_disabled != 'omit': - for k in path_info.fields: + for k, field_info in path_info.fields.items(): + if field_info.write_only: + entry.pop(k, None) + continue if k not in entry: if handle_disabled == 'exclamation': k = '!%s' % k @@ -355,6 +429,8 @@ def main(): entry.pop(k) if field_info.absent_value and k not in entry: entry[k] = field_info.absent_value + if not include_read_only and k in entry and field_info.read_only: + entry.pop(k) result.append(entry) module.exit_json(result=result) diff --git a/ansible_collections/community/routeros/plugins/modules/api_modify.py b/ansible_collections/community/routeros/plugins/modules/api_modify.py index 5d410e9fb..d71750073 100644 --- a/ansible_collections/community/routeros/plugins/modules/api_modify.py +++ b/ansible_collections/community/routeros/plugins/modules/api_modify.py @@ -24,6 +24,10 @@ description: - B(Note) that this module is still heavily in development, and only supports B(some) paths. If you want to support new paths, or think you found problems with existing paths, please first L(create an issue in the community.routeros Issue Tracker,https://github.com/ansible-collections/community.routeros/issues/). +notes: + - If write-only fields are present in the path, the module is B(not idempotent) in a strict sense, + since it is not able to verify the current value of these fields. The behavior the module should + assume can be controlled with the O(handle_write_only) option. requirements: - Needs L(ordereddict,https://pypi.org/project/ordereddict) for Python 2.6 extends_documentation_fragment: @@ -42,16 +46,18 @@ options: path: description: - Path to query. - - An example value is C(ip address). This is equivalent to running modification commands in C(/ip address) in the RouterOS CLI. + - An example value is V(ip address). This is equivalent to running modification commands in C(/ip address) in the RouterOS CLI. required: true type: str choices: # BEGIN PATH LIST - caps-man aaa - caps-man access-list + - caps-man channel - caps-man configuration - caps-man datapath - caps-man manager + - caps-man manager interface - caps-man provisioning - caps-man security - certificate settings @@ -74,18 +80,47 @@ options: - interface l2tp-server server - interface list - interface list member + - interface ovpn-client - interface ovpn-server server + - interface ppp-client - interface pppoe-client - interface pptp-server server - interface sstp-server server - interface vlan - interface vrrp + - interface wifi + - interface wifi aaa + - interface wifi access-list + - interface wifi cap + - interface wifi capsman + - interface wifi channel + - interface wifi configuration + - interface wifi datapath + - interface wifi interworking + - interface wifi provisioning + - interface wifi security + - interface wifi steering + - interface wifiwave2 + - interface wifiwave2 aaa + - interface wifiwave2 access-list + - interface wifiwave2 cap + - interface wifiwave2 capsman + - interface wifiwave2 channel + - interface wifiwave2 configuration + - interface wifiwave2 datapath + - interface wifiwave2 interworking + - interface wifiwave2 provisioning + - interface wifiwave2 security + - interface wifiwave2 steering - interface wireguard - interface wireguard peers + - interface wireless - interface wireless align - interface wireless cap + - interface wireless security-profiles - interface wireless sniffer - interface wireless snooper + - iot modbus - ip accounting - ip accounting web-access - ip address @@ -98,6 +133,8 @@ options: - ip dhcp-server config - ip dhcp-server lease - ip dhcp-server network + - ip dhcp-server option + - ip dhcp-server option sets - ip dns - ip dns static - ip firewall address-list @@ -128,7 +165,10 @@ options: - ip tftp settings - ip traffic-flow - ip traffic-flow ipfix + - ip traffic-flow target - ip upnp + - ip upnp interfaces + - ip vrf - ipv6 address - ipv6 dhcp-client - ipv6 dhcp-server @@ -136,6 +176,7 @@ options: - ipv6 firewall address-list - ipv6 firewall filter - ipv6 firewall mangle + - ipv6 firewall nat - ipv6 firewall raw - ipv6 nd - ipv6 nd prefix default @@ -144,11 +185,19 @@ options: - mpls - mpls ldp - port firmware + - port remote-access - ppp aaa + - ppp profile - queue interface - queue tree + - radius - radius incoming + - routing bgp connection - routing bgp instance + - routing bgp template + - routing filter rule + - routing filter select-rule + - routing id - routing mme - routing ospf area - routing ospf area range @@ -158,6 +207,8 @@ options: - routing pimsm interface-template - routing rip - routing ripng + - routing rule + - routing table - snmp - snmp community - system clock @@ -180,15 +231,20 @@ options: - tool bandwidth-server - tool e-mail - tool graphing + - tool graphing interface + - tool graphing resource - tool mac-server - tool mac-server mac-winbox - tool mac-server ping + - tool netwatch - tool romon - tool sms - tool sniffer - tool traffic-generator + - user - user aaa - user group + - user settings # END PATH LIST data: description: @@ -200,15 +256,15 @@ options: elements: dict ensure_order: description: - - Whether to ensure the same order of the config as present in I(data). - - Requires I(handle_absent_entries=remove). + - Whether to ensure the same order of the config as present in O(data). + - Requires O(handle_absent_entries=remove). type: bool default: false handle_absent_entries: description: - - How to handle entries that are present in the current config, but not in I(data). - - C(ignore) ignores them. - - C(remove) removes them. + - How to handle entries that are present in the current config, but not in O(data). + - V(ignore) ignores them. + - V(remove) removes them. type: str choices: - ignore @@ -216,18 +272,48 @@ options: default: ignore handle_entries_content: description: - - For a single entry in I(data), this describes how to handle fields that are not mentioned + - For a single entry in O(data), this describes how to handle fields that are not mentioned in that entry, but appear in the actual config. - - If C(ignore), they are not modified. - - If C(remove), they are removed. If at least one cannot be removed, the module will fail. - - If C(remove_as_much_as_possible), all that can be removed will be removed. The ones that + - If V(ignore), they are not modified. + - If V(remove), they are removed. If at least one cannot be removed, the module will fail. + - If V(remove_as_much_as_possible), all that can be removed will be removed. The ones that cannot be removed will be kept. + - Note that V(remove) and V(remove_as_much_as_possible) do not apply to write-only fields. type: str choices: - ignore - remove - remove_as_much_as_possible default: ignore + handle_read_only: + description: + - How to handle values passed in for read-only fields. + - If V(ignore), they are not passed to the API. + - If V(validate), the values are not passed for creation, and for updating they are compared to the value returned for the object. + If they differ, the module fails. + - If V(error), the module will fail if read-only fields are provided. + type: str + choices: + - ignore + - validate + - error + default: error + version_added: 2.10.0 + handle_write_only: + description: + - How to handle values passed in for write-only fields. + - If V(create_only), they are passed on creation, and ignored for updating. + - If V(always_update), they are always passed to the API. This means that if such a value is present, + the module will always result in C(changed) since there is no way to validate whether the value + actually changed. + - If V(error), the module will fail if write-only fields are provided. + type: str + choices: + - create_only + - always_update + - error + default: create_only + version_added: 2.10.0 seealso: - module: community.routeros.api - module: community.routeros.api_facts @@ -320,6 +406,7 @@ from ansible_collections.community.routeros.plugins.module_utils.api import ( api_argument_spec, check_has_library, create_api, + get_api_version, ) from ansible_collections.community.routeros.plugins.module_utils._api_data import ( @@ -373,6 +460,18 @@ def find_modifications(old_entry, new_entry, path_info, module, for_text='', ret continue if k not in old_entry and path_info.fields[k].default == v and not path_info.fields[k].can_disable: continue + key_info = path_info.fields[k] + if key_info.read_only: + # handle_read_only must be 'validate' + if old_entry.get(k) != v: + module.fail_json( + msg='Read-only key "{key}" has value "{old_value}", but should have new value "{new_value}"{for_text}.'.format( + key=k, old_value=old_entry.get(k), new_value=v, for_text=for_text)) + continue + if key_info.write_only: + if module.params['handle_write_only'] == 'create_only': + # do not update this value + continue if k not in old_entry or old_entry[k] != v: modifications[k] = v updated_entry[k] = v @@ -441,6 +540,18 @@ def essentially_same_weight(old_entry, new_entry, path_info, module): return weight +def remove_read_only(entry, path_info): + to_remove = [] + for real_k, v in entry.items(): + k = real_k + if k.startswith('!'): + k = k[1:] + if path_info.fields[k].read_only: + to_remove.append(real_k) + for k in to_remove: + entry.pop(k) + + def format_pk(primary_keys, values): return ', '.join('{pk}="{value}"'.format(pk=pk, value=value) for pk, value in zip(primary_keys, values)) @@ -448,6 +559,7 @@ def format_pk(primary_keys, values): def polish_entry(entry, path_info, module, for_text): if '.id' in entry: entry.pop('.id') + to_remove = [] for key, value in entry.items(): real_key = key disabled_key = False @@ -467,6 +579,16 @@ def polish_entry(entry, path_info, module, for_text): elif value is None: if not key_info.can_disable: module.fail_json(msg='Key "{key}" must not be disabled (value null/~/None){for_text}.'.format(key=key, for_text=for_text)) + if key_info.read_only: + if module.params['handle_read_only'] == 'error': + module.fail_json(msg='Key "{key}" is read-only{for_text}, and handle_read_only=error.'.format(key=key, for_text=for_text)) + if module.params['handle_read_only'] == 'ignore': + to_remove.append(real_key) + if key_info.write_only: + if module.params['handle_write_only'] == 'error': + module.fail_json(msg='Key "{key}" is write-only{for_text}, and handle_write_only=error.'.format(key=key, for_text=for_text)) + for key in to_remove: + entry.pop(key) for key, field_info in path_info.fields.items(): if field_info.required and key not in entry: module.fail_json(msg='Key "{key}" must be present{for_text}.'.format(key=key, for_text=for_text)) @@ -622,6 +744,7 @@ def sync_list(module, api, path, path_info): new_data.append((old_index, updated_entry)) new_entry['.id'] = old_entry['.id'] else: + remove_read_only(new_entry, path_info) create_list.append(new_entry) if handle_absent_entries == 'remove': @@ -814,6 +937,7 @@ def sync_with_primary_keys(module, api, path, path_info): for primary_key in primary_keys ]), )) + remove_read_only(new_entry, path_info) create_list.append(new_entry) new_entry = new_entry.copy() for key in list(new_entry): @@ -992,14 +1116,31 @@ def get_backend(path_info): return None +def has_backend(versioned_path_info): + if not versioned_path_info.fully_understood: + return False + + if versioned_path_info.unversioned is not None: + return get_backend(versioned_path_info.unversioned) is not None + + if versioned_path_info.versioned is not None: + for dummy, dummy, unversioned in versioned_path_info.versioned: + if unversioned and not isinstance(unversioned, str) and get_backend(unversioned) is not None: + return True + + return False + + def main(): - path_choices = sorted([join_path(path) for path, path_info in PATHS.items() if get_backend(path_info) is not None]) + path_choices = sorted([join_path(path) for path, versioned_path_info in PATHS.items() if has_backend(versioned_path_info)]) module_args = dict( path=dict(type='str', required=True, choices=path_choices), data=dict(type='list', elements='dict', required=True), handle_absent_entries=dict(type='str', choices=['ignore', 'remove'], default='ignore'), handle_entries_content=dict(type='str', choices=['ignore', 'remove', 'remove_as_much_as_possible'], default='ignore'), ensure_order=dict(type='bool', default=False), + handle_read_only=dict(type='str', default='error', choices=['ignore', 'validate', 'error']), + handle_write_only=dict(type='str', default='create_only', choices=['create_only', 'always_update', 'error']), ) module_args.update(api_argument_spec()) @@ -1018,7 +1159,17 @@ def main(): api = create_api(module) path = split_path(module.params['path']) - path_info = PATHS.get(tuple(path)) + versioned_path_info = PATHS.get(tuple(path)) + if versioned_path_info.needs_version: + api_version = get_api_version(api) + supported, not_supported_msg = versioned_path_info.provide_version(api_version) + if not supported: + msg = 'Path /{path} is not supported for API version {api_version}'.format(path='/'.join(path), api_version=api_version) + if not_supported_msg: + msg = '{0}: {1}'.format(msg, not_supported_msg) + module.fail_json(msg=msg) + path_info = versioned_path_info.get_data() + backend = get_backend(path_info) if path_info is None or backend is None: module.fail_json(msg='Path /{path} is not yet supported'.format(path='/'.join(path))) diff --git a/ansible_collections/community/routeros/plugins/modules/command.py b/ansible_collections/community/routeros/plugins/modules/command.py index 84426025c..52b916ba2 100644 --- a/ansible_collections/community/routeros/plugins/modules/command.py +++ b/ansible_collections/community/routeros/plugins/modules/command.py @@ -40,7 +40,7 @@ options: description: - List of commands to send to the remote RouterOS device over the configured provider. The resulting output from the command - is returned. If the I(wait_for) argument is provided, the + is returned. If the O(wait_for) argument is provided, the module is not returned until the condition is satisfied or the number of retries has expired. required: true @@ -57,11 +57,11 @@ options: elements: str match: description: - - The I(match) argument is used in conjunction with the - I(wait_for) argument to specify the match policy. Valid - values are C(all) or C(any). If the value is set to C(all) + - The O(match) argument is used in conjunction with the + O(wait_for) argument to specify the match policy. Valid + values are V(all) or V(any). If the value is set to V(all) then all conditionals in the wait_for must be satisfied. If - the value is set to C(any) then only one of the values must be + the value is set to V(any) then only one of the values must be satisfied. default: all choices: ['any', 'all'] @@ -71,7 +71,7 @@ options: - Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the - I(wait_for) conditions. + O(wait_for) conditions. default: 10 type: int interval: diff --git a/ansible_collections/community/routeros/plugins/modules/facts.py b/ansible_collections/community/routeros/plugins/modules/facts.py index 85c0b37c4..50f9a21fc 100644 --- a/ansible_collections/community/routeros/plugins/modules/facts.py +++ b/ansible_collections/community/routeros/plugins/modules/facts.py @@ -31,9 +31,9 @@ options: description: - When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include - C(all), C(hardware), C(config), C(interfaces), and C(routing). + V(all), V(hardware), V(config), V(interfaces), and V(routing). - Can specify a list of values to include a larger subset. - Values can also be used with an initial C(!) to specify that a + Values can also be used with an initial V(!) to specify that a specific subset should not be collected. required: false default: @@ -75,55 +75,55 @@ ansible_facts: # default ansible_net_model: description: The model name returned from the device. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str ansible_net_serialnum: description: The serial number of the remote device. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str ansible_net_version: description: The operating system version running on the remote device. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str ansible_net_hostname: description: The configured hostname of the device. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str ansible_net_arch: description: The CPU architecture of the device. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str ansible_net_uptime: description: The uptime of the device. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str ansible_net_cpu_load: description: Current CPU load. - returned: I(gather_subset) contains C(default) + returned: O(gather_subset) contains V(default) type: str # hardware ansible_net_spacefree_mb: description: The available disk space on the remote device in MiB. - returned: I(gather_subset) contains C(hardware) + returned: O(gather_subset) contains V(hardware) type: dict ansible_net_spacetotal_mb: description: The total disk space on the remote device in MiB. - returned: I(gather_subset) contains C(hardware) + returned: O(gather_subset) contains V(hardware) type: dict ansible_net_memfree_mb: description: The available free memory on the remote device in MiB. - returned: I(gather_subset) contains C(hardware) + returned: O(gather_subset) contains V(hardware) type: int ansible_net_memtotal_mb: description: The total memory on the remote device in MiB. - returned: I(gather_subset) contains C(hardware) + returned: O(gather_subset) contains V(hardware) type: int # config ansible_net_config: description: The current active config from the device. - returned: I(gather_subset) contains C(config) + returned: O(gather_subset) contains V(config) type: str ansible_net_config_nonverbose: @@ -132,52 +132,52 @@ ansible_facts: - This value is idempotent in the sense that if the facts module is run twice and the device's config was not changed between the runs, the value is identical. This is achieved by running C(/export) and stripping the timestamp from the comment in the first line. - returned: I(gather_subset) contains C(config) + returned: O(gather_subset) contains V(config) type: str version_added: 1.2.0 # interfaces ansible_net_all_ipv4_addresses: description: All IPv4 addresses configured on the device. - returned: I(gather_subset) contains C(interfaces) + returned: O(gather_subset) contains V(interfaces) type: list ansible_net_all_ipv6_addresses: description: All IPv6 addresses configured on the device. - returned: I(gather_subset) contains C(interfaces) + returned: O(gather_subset) contains V(interfaces) type: list ansible_net_interfaces: description: A hash of all interfaces running on the system. - returned: I(gather_subset) contains C(interfaces) + returned: O(gather_subset) contains V(interfaces) type: dict ansible_net_neighbors: description: The list of neighbors from the remote device. - returned: I(gather_subset) contains C(interfaces) + returned: O(gather_subset) contains V(interfaces) type: dict # routing ansible_net_bgp_peer: description: A dictionary with BGP peer information. - returned: I(gather_subset) contains C(routing) + returned: O(gather_subset) contains V(routing) type: dict ansible_net_bgp_vpnv4_route: description: A dictionary with BGP vpnv4 route information. - returned: I(gather_subset) contains C(routing) + returned: O(gather_subset) contains V(routing) type: dict ansible_net_bgp_instance: description: A dictionary with BGP instance information. - returned: I(gather_subset) contains C(routing) + returned: O(gather_subset) contains V(routing) type: dict ansible_net_route: description: A dictionary for routes in all routing tables. - returned: I(gather_subset) contains C(routing) + returned: O(gather_subset) contains V(routing) type: dict ansible_net_ospf_instance: description: A dictionary with OSPF instances. - returned: I(gather_subset) contains C(routing) + returned: O(gather_subset) contains V(routing) type: dict ansible_net_ospf_neighbor: description: A dictionary with OSPF neighbors. - returned: I(gather_subset) contains C(routing) + returned: O(gather_subset) contains V(routing) type: dict """ import re @@ -311,7 +311,7 @@ class Config(FactsBase): '/export', ] - RM_DATE_RE = re.compile(r'^# [a-z0-9/][a-z0-9/]* [0-9:]* by RouterOS') + RM_DATE_RE = re.compile(r'^# [a-z0-9/-][a-z0-9/-]* [0-9:]* by RouterOS') def populate(self): super(Config, self).populate() diff --git a/ansible_collections/community/routeros/tests/sanity/extra/extra-docs.py b/ansible_collections/community/routeros/tests/sanity/extra/extra-docs.py index c636beb08..251e6d70f 100755 --- a/ansible_collections/community/routeros/tests/sanity/extra/extra-docs.py +++ b/ansible_collections/community/routeros/tests/sanity/extra/extra-docs.py @@ -17,7 +17,7 @@ def main(): suffix = ':{env}'.format(env=env["ANSIBLE_COLLECTIONS_PATH"]) if 'ANSIBLE_COLLECTIONS_PATH' in env else '' env['ANSIBLE_COLLECTIONS_PATH'] = '{root}{suffix}'.format(root=os.path.dirname(os.path.dirname(os.path.dirname(os.getcwd()))), suffix=suffix) p = subprocess.run( - ['antsibull-docs', 'lint-collection-docs', '--plugin-docs', '--disallow-semantic-markup', '--skip-rstcheck', '.'], + ['antsibull-docs', 'lint-collection-docs', '--plugin-docs', '--skip-rstcheck', '.'], env=env, check=False, ) diff --git a/ansible_collections/community/routeros/tests/sanity/ignore-2.10.txt b/ansible_collections/community/routeros/tests/sanity/ignore-2.10.txt index 876765a85..ece5b2977 100644 --- a/ansible_collections/community/routeros/tests/sanity/ignore-2.10.txt +++ b/ansible_collections/community/routeros/tests/sanity/ignore-2.10.txt @@ -1,3 +1,6 @@ +docs/docsite/rst/api-guide.rst rstcheck +docs/docsite/rst/quoting.rst rstcheck +docs/docsite/rst/ssh-guide.rst rstcheck update-docs.py compile-2.6 update-docs.py compile-2.7 update-docs.py compile-3.5 diff --git a/ansible_collections/community/routeros/tests/sanity/ignore-2.17.txt b/ansible_collections/community/routeros/tests/sanity/ignore-2.17.txt new file mode 100644 index 000000000..0a5234bdb --- /dev/null +++ b/ansible_collections/community/routeros/tests/sanity/ignore-2.17.txt @@ -0,0 +1,2 @@ +update-docs.py shebang +tests/unit/compat/mock.py pylint:use-yield-from # suggested construct does not work with Python 2 diff --git a/ansible_collections/community/routeros/tests/sanity/ignore-2.17.txt.license b/ansible_collections/community/routeros/tests/sanity/ignore-2.17.txt.license new file mode 100644 index 000000000..edff8c768 --- /dev/null +++ b/ansible_collections/community/routeros/tests/sanity/ignore-2.17.txt.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/ansible_collections/community/routeros/tests/sanity/ignore-2.9.txt b/ansible_collections/community/routeros/tests/sanity/ignore-2.9.txt index 876765a85..ece5b2977 100644 --- a/ansible_collections/community/routeros/tests/sanity/ignore-2.9.txt +++ b/ansible_collections/community/routeros/tests/sanity/ignore-2.9.txt @@ -1,3 +1,6 @@ +docs/docsite/rst/api-guide.rst rstcheck +docs/docsite/rst/quoting.rst rstcheck +docs/docsite/rst/ssh-guide.rst rstcheck update-docs.py compile-2.6 update-docs.py compile-2.7 update-docs.py compile-3.5 diff --git a/ansible_collections/community/routeros/tests/unit/plugins/module_utils/test__api_data.py b/ansible_collections/community/routeros/tests/unit/plugins/module_utils/test__api_data.py index 1250fdaa5..4c0267e96 100644 --- a/ansible_collections/community/routeros/tests/unit/plugins/module_utils/test__api_data.py +++ b/ansible_collections/community/routeros/tests/unit/plugins/module_utils/test__api_data.py @@ -10,7 +10,7 @@ __metaclass__ = type import pytest from ansible_collections.community.routeros.plugins.module_utils._api_data import ( - APIData, + VersionedAPIData, KeyInfo, split_path, join_path, @@ -19,7 +19,7 @@ from ansible_collections.community.routeros.plugins.module_utils._api_data impor def test_api_data_errors(): with pytest.raises(ValueError) as exc: - APIData() + VersionedAPIData() assert exc.value.args[0] == 'fields must be provided' values = [ @@ -33,39 +33,39 @@ def test_api_data_errors(): for index, (param, param_value) in enumerate(values): for param2, param2_value in values[index + 1:]: with pytest.raises(ValueError) as exc: - APIData(**{param: param_value, param2: param2_value}) + VersionedAPIData(**{param: param_value, param2: param2_value}) assert exc.value.args[0] == 'primary_keys, stratify_keys, has_identifier, single_value, and unknown_mechanism are mutually exclusive' with pytest.raises(ValueError) as exc: - APIData(unknown_mechanism=True, fully_understood=True) + VersionedAPIData(unknown_mechanism=True, fully_understood=True) assert exc.value.args[0] == 'unknown_mechanism and fully_understood cannot be combined' with pytest.raises(ValueError) as exc: - APIData(unknown_mechanism=True, fixed_entries=True) + VersionedAPIData(unknown_mechanism=True, fixed_entries=True) assert exc.value.args[0] == 'fixed_entries can only be used with primary_keys' with pytest.raises(ValueError) as exc: - APIData(primary_keys=['foo'], fields={}) + VersionedAPIData(primary_keys=['foo'], fields={}) assert exc.value.args[0] == 'Primary key foo must be in fields!' with pytest.raises(ValueError) as exc: - APIData(stratify_keys=['foo'], fields={}) + VersionedAPIData(stratify_keys=['foo'], fields={}) assert exc.value.args[0] == 'Stratify key foo must be in fields!' with pytest.raises(ValueError) as exc: - APIData(required_one_of=['foo'], fields={}) + VersionedAPIData(required_one_of=['foo'], fields={}) assert exc.value.args[0] == 'Require one of element at index #1 must be a list!' with pytest.raises(ValueError) as exc: - APIData(required_one_of=[['foo']], fields={}) + VersionedAPIData(required_one_of=[['foo']], fields={}) assert exc.value.args[0] == 'Require one of key foo must be in fields!' with pytest.raises(ValueError) as exc: - APIData(mutually_exclusive=['foo'], fields={}) + VersionedAPIData(mutually_exclusive=['foo'], fields={}) assert exc.value.args[0] == 'Mutually exclusive element at index #1 must be a list!' with pytest.raises(ValueError) as exc: - APIData(mutually_exclusive=[['foo']], fields={}) + VersionedAPIData(mutually_exclusive=[['foo']], fields={}) assert exc.value.args[0] == 'Mutually exclusive key foo must be in fields!' @@ -99,8 +99,16 @@ def test_key_info_errors(): KeyInfo(remove_value='') assert exc.value.args[0] == 'remove_value can only be specified if can_disable=True' + with pytest.raises(ValueError) as exc: + KeyInfo(read_only=True, write_only=True) + assert exc.value.args[0] == 'read_only and write_only cannot be used at the same time' + + with pytest.raises(ValueError) as exc: + KeyInfo(read_only=True, default=0) + assert exc.value.args[0] == 'read_only can not be combined with can_disable, remove_value, absent_value, default, or required' + -SPLITTED_PATHS = [ +SPLIT_PATHS = [ ('', [], ''), (' ip ', ['ip'], 'ip'), ('ip', ['ip'], 'ip'), @@ -108,7 +116,7 @@ SPLITTED_PATHS = [ ] -@pytest.mark.parametrize("joined_input, splitted, joined_output", SPLITTED_PATHS) -def test_join_split_path(joined_input, splitted, joined_output): - assert split_path(joined_input) == splitted - assert join_path(splitted) == joined_output +@pytest.mark.parametrize("joined_input, split, joined_output", SPLIT_PATHS) +def test_join_split_path(joined_input, split, joined_output): + assert split_path(joined_input) == split + assert join_path(split) == joined_output diff --git a/ansible_collections/community/routeros/tests/unit/plugins/modules/fake_api.py b/ansible_collections/community/routeros/tests/unit/plugins/modules/fake_api.py index a5ddb3180..cbcd2371c 100644 --- a/ansible_collections/community/routeros/tests/unit/plugins/modules/fake_api.py +++ b/ansible_collections/community/routeros/tests/unit/plugins/modules/fake_api.py @@ -9,6 +9,9 @@ __metaclass__ = type from ansible_collections.community.routeros.plugins.module_utils._api_data import PATHS +FAKE_ROS_VERSION = '7.5.0' + + class FakeLibRouterosError(Exception): def __init__(self, message): self.message = message @@ -16,7 +19,7 @@ class FakeLibRouterosError(Exception): class TrapError(FakeLibRouterosError): - def __init__(self, message="failure: already have interface with such name"): + def __init__(self, message='failure: already have interface with such name'): super(TrapError, self).__init__(message) @@ -133,7 +136,9 @@ def _normalize_entry(entry, path_info, on_create=False): def massage_expected_result_data(values, path, keep_all=False, remove_dynamic=False, remove_builtin=False): - path_info = PATHS[path] + versioned_path_info = PATHS[path] + versioned_path_info.provide_version(FAKE_ROS_VERSION) + path_info = versioned_path_info.get_data() if remove_dynamic: values = [entry for entry in values if not entry.get('dynamic', False)] if remove_builtin: @@ -155,15 +160,25 @@ def massage_expected_result_data(values, path, keep_all=False, remove_dynamic=Fa class Path(object): def __init__(self, path, initial_values, read_only=False): self._path = path - self._path_info = PATHS[path] + versioned_path_info = PATHS[path] + versioned_path_info.provide_version(FAKE_ROS_VERSION) + self._path_info = versioned_path_info.get_data() self._values = [entry.copy() for entry in initial_values] for entry in self._values: _normalize_entry(entry, self._path_info) self._new_id_counter = 0 self._read_only = read_only + def _sanitize(self, entry): + entry = entry.copy() + for field, field_info in self._path_info.fields.items(): + if field in entry: + if field_info.write_only: + del entry[field] + return entry + def __iter__(self): - return [entry.copy() for entry in self._values].__iter__() + return [self._sanitize(entry) for entry in self._values].__iter__() def _find_id(self, id, required=False): for index, entry in enumerate(self._values): @@ -187,7 +202,15 @@ class Path(object): entry = { '.id': id, } - entry.update(kwargs) + for field, value in kwargs.items(): + if field.startswith('!'): + field = field[1:] + if field not in self._path_info.fields: + raise ValueError('Trying to set unknown field "{field}"'.format(field=field)) + field_info = self._path_info.fields[field] + if field_info.read_only: + raise ValueError('Trying to set read-only field "{field}"'.format(field=field)) + entry[field] = value _normalize_entry(entry, self._path_info, on_create=True) self._values.append(entry) return id @@ -216,6 +239,16 @@ class Path(object): entry = self._values[index] if entry.get('dynamic', False) or entry.get('builtin', False): raise Exception('Trying to update a dynamic or builtin entry') + for field in kwargs: + if field == '.id': + continue + if field.startswith('!'): + field = field[1:] + if field not in self._path_info.fields: + raise ValueError('Trying to update unknown field "{field}"'.format(field=field)) + field_info = self._path_info.fields[field] + if field_info.read_only: + raise ValueError('Trying to update read-only field "{field}"'.format(field=field)) entry.update(kwargs) _normalize_entry(entry, self._path_info) diff --git a/ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_find_and_modify.py b/ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_find_and_modify.py index 384bc8885..2f47af4f6 100644 --- a/ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_find_and_modify.py +++ b/ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_find_and_modify.py @@ -389,6 +389,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, { '.id': '*A', @@ -397,6 +398,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -406,6 +408,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, ]) self.assertEqual(result['diff']['before']['values'], [ @@ -416,6 +419,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, ]) self.assertEqual(result['diff']['after']['values'], [ @@ -427,6 +431,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, ]) self.assertEqual(result['match_count'], 1) @@ -459,6 +464,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, { '.id': '*A', @@ -467,6 +473,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -475,6 +482,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, ]) self.assertEqual('diff' in result, False) @@ -508,6 +516,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, { '.id': '*A', @@ -516,6 +525,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -524,6 +534,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, ]) self.assertEqual(result['match_count'], 3) @@ -556,6 +567,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, { '.id': '*A', @@ -564,6 +576,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -572,6 +585,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'ttl': '1d', 'disabled': False, 'dynamic': False, + 'match-subdomain': False, }, ]) self.assertEqual(result['match_count'], 3) @@ -605,24 +619,28 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'chain': 'input', 'comment': 'defconf', 'protocol': 'icmp', + 'disabled': False, }, { '.id': '*3', 'action': 'accept', 'chain': 'input', 'comment': 'defconf', + 'disabled': False, }, { '.id': '*4', 'action': 'accept', 'chain': 'input', 'comment': 'defconf', + 'disabled': False, }, { '.id': '*7', 'action': 'drop', 'chain': 'input', 'comment': 'defconf', + 'disabled': False, 'in-interface': 'wan', }, { @@ -631,6 +649,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'chain': 'forward', 'comment': 'defconf', 'connection-state': 'established', + 'disabled': False, }, { '.id': '*9', @@ -638,6 +657,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'chain': 'forward', 'comment': 'defconf', 'connection-state': 'related', + 'disabled': False, }, { '.id': '*A', @@ -645,6 +665,7 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase): 'chain': 'forward', 'comment': 'defconf', 'connection-status': 'invalid', + 'disabled': False, }, ]) self.assertEqual(result['match_count'], 3) diff --git a/ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_info.py b/ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_info.py index 2dabc36ef..3564668e7 100644 --- a/ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_info.py +++ b/ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_info.py @@ -7,7 +7,9 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.routeros.tests.unit.compat.mock import patch, MagicMock -from ansible_collections.community.routeros.tests.unit.plugins.modules.fake_api import FakeLibRouterosError, Key, fake_ros_api +from ansible_collections.community.routeros.tests.unit.plugins.modules.fake_api import ( + FAKE_ROS_VERSION, FakeLibRouterosError, Key, fake_ros_api, +) from ansible_collections.community.routeros.tests.unit.plugins.modules.utils import set_module_args, AnsibleExitJson, AnsibleFailJson, ModuleTestCase from ansible_collections.community.routeros.plugins.modules import api_info @@ -22,6 +24,10 @@ class TestRouterosApiInfoModule(ModuleTestCase): self.module.check_has_library = MagicMock() self.patch_create_api = patch('ansible_collections.community.routeros.plugins.modules.api_info.create_api', MagicMock(new=fake_ros_api)) self.patch_create_api.start() + self.patch_get_api_version = patch( + 'ansible_collections.community.routeros.plugins.modules.api_info.get_api_version', + MagicMock(return_value=FAKE_ROS_VERSION)) + self.patch_get_api_version.start() self.module.Key = MagicMock(new=Key) self.config_module_args = { 'username': 'admin', @@ -30,6 +36,7 @@ class TestRouterosApiInfoModule(ModuleTestCase): } def tearDown(self): + self.patch_get_api_version.stop() self.patch_create_api.stop() def test_module_fail_when_required_args_missing(self): @@ -191,6 +198,8 @@ class TestRouterosApiInfoModule(ModuleTestCase): 'chain': 'input', 'in-interface-list': 'LAN', '!action': None, + '!address-list': None, + '!address-list-timeout': None, '!comment': None, '!connection-bytes': None, '!connection-limit': None, @@ -236,6 +245,7 @@ class TestRouterosApiInfoModule(ModuleTestCase): '!protocol': None, '!psd': None, '!random': None, + '!realm': None, '!reject-with': None, '!routing-mark': None, '!routing-table': None, @@ -277,6 +287,8 @@ class TestRouterosApiInfoModule(ModuleTestCase): 'chain': 'input', 'in-interface-list': 'LAN', 'action': None, + 'address-list': None, + 'address-list-timeout': None, 'comment': None, 'connection-bytes': None, 'connection-limit': None, @@ -322,6 +334,7 @@ class TestRouterosApiInfoModule(ModuleTestCase): 'protocol': None, 'psd': None, 'random': None, + 'realm': None, 'reject-with': None, 'routing-mark': None, 'routing-table': None, diff --git a/ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_modify.py b/ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_modify.py index 78979733d..f4aa77742 100644 --- a/ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_modify.py +++ b/ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_modify.py @@ -8,7 +8,7 @@ __metaclass__ = type from ansible_collections.community.routeros.tests.unit.compat.mock import patch, MagicMock from ansible_collections.community.routeros.tests.unit.plugins.modules.fake_api import ( - FakeLibRouterosError, fake_ros_api, massage_expected_result_data, create_fake_path, + FAKE_ROS_VERSION, FakeLibRouterosError, fake_ros_api, massage_expected_result_data, create_fake_path, ) from ansible_collections.community.routeros.tests.unit.plugins.modules.utils import set_module_args, AnsibleExitJson, AnsibleFailJson, ModuleTestCase from ansible_collections.community.routeros.plugins.modules import api_modify @@ -302,6 +302,10 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'ansible_collections.community.routeros.plugins.modules.api_modify.create_api', MagicMock(new=fake_ros_api)) self.patch_create_api.start() + self.patch_get_api_version = patch( + 'ansible_collections.community.routeros.plugins.modules.api_modify.get_api_version', + MagicMock(return_value=FAKE_ROS_VERSION)) + self.patch_get_api_version.start() self.config_module_args = { 'username': 'admin', 'password': 'pаss', @@ -309,6 +313,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): } def tearDown(self): + self.patch_get_api_version.stop() self.patch_create_api.stop() def test_module_fail_when_required_args_missing(self): @@ -600,6 +605,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*A', @@ -607,6 +613,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'text': 'Router Text Entry', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -614,6 +621,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*NEW1', @@ -621,6 +629,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'text': 'Router Text Entry 2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, ]) @@ -661,6 +670,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*A', @@ -668,6 +678,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'text': 'Router Text Entry', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -675,6 +686,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*NEW1', @@ -682,6 +694,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'text': 'Router Text Entry 2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, ]) @@ -723,6 +736,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*A', @@ -730,6 +744,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'text': 'Router Text Entry', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -737,6 +752,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { 'name': 'router', @@ -782,6 +798,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*A', @@ -789,6 +806,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'text': 'Router Text Entry 2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -796,6 +814,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, ]) @@ -838,6 +857,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*A', @@ -845,6 +865,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'text': 'Router Text Entry 2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -852,6 +873,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, ]) @@ -894,6 +916,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -901,6 +924,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*NEW1', @@ -908,6 +932,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'cname': 'router.com.', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, ]) @@ -951,6 +976,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -958,6 +984,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { 'name': 'router', @@ -1003,6 +1030,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*A', @@ -1011,6 +1039,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'text': 'Router Text Entry 2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -1018,6 +1047,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, ]) @@ -1060,6 +1090,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*A', @@ -1068,6 +1099,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'text': 'Router Text Entry 2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*7', @@ -1075,6 +1107,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, ]) @@ -1109,6 +1142,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, ]) @@ -1144,6 +1178,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, ]) @@ -1190,6 +1225,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*NEW1', @@ -1197,6 +1233,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'text': 'bar', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*A', @@ -1204,6 +1241,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'text': 'Router Text Entry', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*1', @@ -1212,6 +1250,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, ]) @@ -1259,6 +1298,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.2', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { 'name': 'foo', @@ -1270,6 +1310,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'text': 'Router Text Entry', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, { '.id': '*1', @@ -1278,6 +1319,7 @@ class TestRouterosApiModifyModule(ModuleTestCase): 'address': '192.168.88.1', 'ttl': '1d', 'disabled': False, + 'match-subdomain': False, }, ]) diff --git a/ansible_collections/community/routeros/update-docs.py b/ansible_collections/community/routeros/update-docs.py index 17a431b05..05a9ee743 100755 --- a/ansible_collections/community/routeros/update-docs.py +++ b/ansible_collections/community/routeros/update-docs.py @@ -9,7 +9,12 @@ Updates DOCUMENTATION of modules using module_utils._api_data with the correct list of supported paths. ''' -from plugins.module_utils._api_data import ( +import sys + +# Ensure that we can import things from ansible_collections +sys.path.append('../../..') + +from ansible_collections.community.routeros.plugins.module_utils._api_data import ( PATHS, join_path, ) |