summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/routeros/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:27 +0000
commit3b0807ad7b283c46c21862eb826dcbb4ad04e5e2 (patch)
tree6461ea75f03eca87a5a90c86c3c9a787a6ad037e /ansible_collections/community/routeros/tests
parentAdding debian version 7.7.0+dfsg-3. (diff)
downloadansible-3b0807ad7b283c46c21862eb826dcbb4ad04e5e2.tar.xz
ansible-3b0807ad7b283c46c21862eb826dcbb4ad04e5e2.zip
Merging upstream version 9.4.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community/routeros/tests')
-rwxr-xr-xansible_collections/community/routeros/tests/sanity/extra/extra-docs.py2
-rw-r--r--ansible_collections/community/routeros/tests/sanity/ignore-2.10.txt3
-rw-r--r--ansible_collections/community/routeros/tests/sanity/ignore-2.17.txt2
-rw-r--r--ansible_collections/community/routeros/tests/sanity/ignore-2.17.txt.license3
-rw-r--r--ansible_collections/community/routeros/tests/sanity/ignore-2.9.txt3
-rw-r--r--ansible_collections/community/routeros/tests/unit/plugins/module_utils/test__api_data.py40
-rw-r--r--ansible_collections/community/routeros/tests/unit/plugins/modules/fake_api.py43
-rw-r--r--ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_find_and_modify.py21
-rw-r--r--ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_info.py15
-rw-r--r--ansible_collections/community/routeros/tests/unit/plugins/modules/test_api_modify.py44
10 files changed, 152 insertions, 24 deletions
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,
},
])