diff --git a/.github/workflows/napalm-sros-ci.yml b/.github/workflows/napalm-sros-ci.yml new file mode 100644 index 0000000..21bdc6f --- /dev/null +++ b/.github/workflows/napalm-sros-ci.yml @@ -0,0 +1,31 @@ +name: napalm-sros + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.6 + uses: actions/setup-python@v2 + with: + python-version: "3.6" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest + diff --git a/Install.md b/INSTALL.md similarity index 100% rename from Install.md rename to INSTALL.md diff --git a/README_TEST.md b/README_TEST.md index ce955a5..1851437 100644 --- a/README_TEST.md +++ b/README_TEST.md @@ -1,16 +1,11 @@ ## **Testing for NAPALM with Nokia SR OS** 1) To run the test framework, first install pytest: ```pip install pytest``` -2) Locate the file: \"test/unit/sros/test_getters.py\" and run the class to test the getter methods -3) Locate the file \"test/unit/TestDriver.py\" and run \"Class TestConfigNokiaSROSDriver\" to test all the config methods of NAPALM - + Location of files required by this test: - - `napalm_sros/templates/set_hostname.j2` - - `test/unit/sros/initial.conf` - Initial configuration sample - - `test/unit/sros/merge_good.conf` - Merge config example - - `test/unit/sros/merge_good.diff` - Compare output for merge - - `test/unit/sros/merge_typo.conf` - Merege config example with error - - `test/unit/sros/new_good.conf` - Replace config example - - `test/unit/sros/new_good.diff` - Compare output for replace - - `test/unit/sros/new_typo.conf` - Replace config example with error -4) Location of mocked output files used for these tests is : `test/unit/mocked_data` +2) You can run the test two ways: + 1) Run command `python -m pytest` + 2) Locate and run the file `test/test_getters.py` + +Note: The test "test_get_interfaces" passes for CI/CD on Github, but it does not pass on individual local system due to +computational difference on different Operating Systems of date and time. + We welcome suggestions and contributions of additional tests for the framework. Please contact the Nokia owners of this repository for how to contribute. diff --git a/example_script.py b/example_script.py index e3424ab..e6905ee 100644 --- a/example_script.py +++ b/example_script.py @@ -2,8 +2,10 @@ driver = get_network_driver("sros") optional_args = {'port': 830} -device = driver("127.0.0.1", "vagrant", "vagrant", 60, optional_args) +device = driver("127.0.0.1", "admin", "admin", 60, optional_args) device.open() print(device.get_facts()) print(device.get_optics()) device.close() + + diff --git a/napalm_sros/sros.py b/napalm_sros/sros.py index 4b297fe..1fa411b 100644 --- a/napalm_sros/sros.py +++ b/napalm_sros/sros.py @@ -98,6 +98,7 @@ def __init__(self, hostname, username, password, timeout=60, optional_args=None) "state_ns": "urn:nokia.com:sros:ns:yang:sr:state", "configure_ns": "urn:nokia.com:sros:ns:yang:sr:conf", } + self.optional_args = None def open(self): """Implement the NAPALM method open (mandatory)""" @@ -307,7 +308,7 @@ def discard_config(self): if not self.lock_disable and not self.session_config_lock: self._unlock_config() - def commit_config(self, message=""): + def commit_config(self, message="", revert_in=None): """ Commits the changes requested by the method load_replace_candidate or load_merge_candidate. """ @@ -350,15 +351,15 @@ def rollback(self): print("Error while rollback: ", error) break - def compare_config(self, optional_args=None): + def compare_config(self): """ :return: A string showing the difference between the running configuration and the candidate configuration. The running_config is loaded automatically just before doing the comparison so there is no need for you to do it. """ - if optional_args is None: - optional_args = {"json_format": False} + if self.optional_args is None: + self.optional_args = {"json_format": False} buff = "" if self.fmt == "text": @@ -373,16 +374,16 @@ def compare_config(self, optional_args=None): running_dict = xmltodict.parse( self.get_config(retrieve="running")["running"], - process_namespaces=not optional_args["json_format"], + process_namespaces=not self.optional_args["json_format"], ) # candidate_dict = xmltodict.parse(candidate_config, process_namespaces=True) candidate_dict = xmltodict.parse( self.get_config(retrieve="candidate")["candidate"], - process_namespaces=not optional_args["json_format"], + process_namespaces=not self.optional_args["json_format"], ) new_buff = "" result = diff(running_dict, candidate_dict) - if optional_args["json_format"]: + if self.optional_args["json_format"]: new_buff += "\n".join( [json.dumps(e, sort_keys=True, indent=4) for e in result] ) @@ -798,7 +799,7 @@ def get_interfaces(self): ) interfaces[if_name] = ifd - return + return interfaces except Exception as e: print("Error in method get interfaces : {}".format(e)) log.error("Error in method get interfaces : %s" % traceback.format_exc()) @@ -1089,7 +1090,6 @@ def get_config( retrieve="all", full=False, sanitized=False, - optional_args={"format": "xml"}, ): """ Return the configuration of a device. @@ -1113,7 +1113,9 @@ def get_config( """ try: configuration = {"running": "", "candidate": "", "startup": ""} - if optional_args is not None and optional_args["format"] == "cli": + if self.optional_args is None: + self.optional_args = {"format": "xml"} + if self.optional_args["format"] == "cli" and (sanitized is True or sanitized is False): # Getting output in MD-CLI format # retrieving config using md-cli cmd_running = "admin show configuration | no-more" @@ -1176,7 +1178,8 @@ def _update_buff(buff): return configuration # returning the config in xml format - else: + elif self.optional_args["format"] == "xml" and (sanitized is True or sanitized is False): + config_data_running_xml = "" if retrieve == "running" or retrieve == "all": config_data_running = to_ele( self.conn.get_config(source="running").data_xml @@ -1191,8 +1194,9 @@ def _update_buff(buff): "<\?xml.*\?>", "", config_data_running_xml ) configuration["running"] = config_data_running_xml - if retrieve == "all": - configuration["startup"] = config_data_running_xml + + if retrieve == "startup" or retrieve == "all": + configuration["startup"] = config_data_running_xml if retrieve == "candidate" or retrieve == "all": config_data_candidate = to_ele( @@ -2441,8 +2445,8 @@ def get_mac_address_table(self): cmd = "show service fdb-mac" buff = self._perform_cli_commands(["environment more false", cmd], True) - # template = "textfsm_templates//nokia_sros_show_service_fdb_mac.tpl" - template = "textfsm_templates\\nokia_sros_show_service_fdb_mac.tpl" + template = "textfsm_templates//nokia_sros_show_service_fdb_mac.tpl" + # template = "textfsm_templates\\nokia_sros_show_service_fdb_mac.tpl" output_list = parse_with_textfsm(template, buff) new_records = [] for record in output_list: @@ -3857,8 +3861,9 @@ def _build_temperature_dict(instance, choice=1): total_power_modules = total_power_modules + 1 if "Current Util." in item: row = item.strip() - row_list = re.split(": | W", row) - output = float(row_list[1]) + watts = re.match("^.*:\s*(\d+[.]\d+) Watts.*$", item) + if watts: + output = float(watts.groups()[0]) for power_module in result.xpath( "state_ns:state/state_ns:chassis/state_ns:power-shelf/state_ns:power-module", @@ -3888,7 +3893,7 @@ def _build_temperature_dict(instance, choice=1): ) environment_data["power"].update( { - power_module_id: { + str(power_module_id): { "status": oper_state, "capacity": capacity, "output": output / total_power_modules, @@ -3942,10 +3947,10 @@ def _build_temperature_dict(instance, choice=1): ), default=-1, ) - environment_data["cpu"].update({sample_period: {"%usage": cpu_usage}}) + environment_data["cpu"].update({str(sample_period): {"%usage": cpu_usage}}) environment_data["memory"].update( - {"available_ram": available_ram, "used_ram": used_ram} + {"available_ram": available_ram + used_ram, "used_ram": used_ram} ) return environment_data except Exception as e: @@ -4032,14 +4037,20 @@ def ping( self, destination, source=C.PING_SOURCE, - ttl=128, # ttl should be in the range 1..128 + ttl=C.PING_TTL, timeout=C.PING_TIMEOUT, size=C.PING_SIZE, count=C.PING_COUNT, vrf=C.PING_VRF, + source_interface=C.PING_SOURCE_INTERFACE, ): + """ + ttl should be in the range 1..128 + """ try: ping = {} + if ttl > 128: + ttl = 128 results = [] command = "" if source and vrf: @@ -4111,17 +4122,21 @@ def ping( log.error("Error in method ping : %s" % traceback.format_exc()) - def traceroute( self, destination, source=C.TRACEROUTE_SOURCE, ttl=C.TRACEROUTE_TTL, - timeout=10, # timeout should be between 10 and 60000 + timeout=C.TRACEROUTE_TIMEOUT, vrf=C.TRACEROUTE_VRF, ): + """ + timeout should be in the range 10..60000 + """ try: traceroute = {} + if timeout < 10 : + timeout = 10 cmd = "" if source and vrf: cmd = "traceroute {d1} wait {d2} ttl {d3} source-address {d4} router-instance {d5}" diff --git a/requirements.txt b/requirements.txt index a4fc768..a611de8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,11 @@ napalm>=3.3.1 - pytest>=5.4.3 setuptools>=47.3.1 pip>=20.1.1 textfsm>=1.1.0 paramiko>=2.7.1 -lxml>=4.6.2 +lxml==4.6.2 ncclient>=0.6.7 - xmltodict>=0.12.0 -dictdiffer>=0.9.0 \ No newline at end of file +dictdiffer>=0.9.0 +datetime>=4.3 \ No newline at end of file diff --git a/setup.py b/setup.py index 643a738..d525384 100644 --- a/setup.py +++ b/setup.py @@ -1,24 +1,35 @@ -"""setup.py file.""" - from setuptools import setup, find_packages -with open("requirements.txt", "r") as file: - reqs = [req for req in file.read().splitlines() if (len(req) > 0 and not req.startswith("#"))] -__author__ = 'Ashna Shah ' + +with open("README.md", "r", encoding="utf-8") as f: + long_description = f.read() setup( name="napalm-sros", - version="0.1.0", + version="1.0.0", packages=find_packages(), - author="Ashna Shah", - author_email="ashna.shah@nokia.com", + author="Nokia", + author_email="", description="Network Automation and Programmability Abstraction Layer with Multivendor support", classifiers=[ - 'Topic :: Utilities', - 'Programming Language :: Python :: 3.6', - 'Operating System :: POSIX :: Linux', - 'Operating System :: MacOS', + "Topic :: Internet", + "Programming Language :: Python :: 3.6", + "Natural Language :: English", + "Development Status :: 4 - Beta", ], url="https://github.com/napalm-automation/napalm-sros", include_package_data=True, - install_requires=reqs, -) + install_requires=[ + "napalm>=3.3.1", + "pytest>=5.4.3", + "textfsm>=1.1.0", + "paramiko>=2.7.1", + "lxml>=4.6.2", + "ncclient>=0.6.7", + "xmltodict>=0.12.0", + "dictdiffer>=0.9.0", + "datetime>=4.3", + ], + python_requires=">=3.6", + long_description=long_description, + long_description_content_type="text/markdown", +) \ No newline at end of file diff --git a/test/unit/TestDriver.py b/test/unit/TestDriver.py deleted file mode 100644 index 6fe2e26..0000000 --- a/test/unit/TestDriver.py +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright 2015 Spotify AB. All rights reserved. -# -# The contents of this file are licensed under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. - -import unittest - -from lxml import etree -from napalm_sros.sros import NokiaSROSDriver -from napalm.base.test.base import TestConfigNetworkDriver, TestGettersNetworkDriver - - -class TestConfigNokiaSROSDriver(unittest.TestCase, TestConfigNetworkDriver): - @classmethod - def setUpClass(cls): - hostname = "127.0.0.1" - username = "vagrant" - password = "vagrant" - cls.vendor = "sros" - - optional_args = {"port": 830} - cls.device = NokiaSROSDriver( - hostname, username, password, timeout=60, optional_args=optional_args - ) - cls.device.open() - - -method_name = None - - -class TestGetterNokiaSROSDriver(unittest.TestCase, TestGettersNetworkDriver): - def setUp(self): - global method_name - method_name = self._testMethodName - - @classmethod - def setUpClass(cls) -> None: - cls.mock = True - hostname = "192.168.56.203" - username = "vagrant" - password = "vagrant123" - cls.vendor = "sros" - optional_args = {} - cls.device = NokiaSROSDriver( - hostname, username, password, timeout=60, optional_args=optional_args - ) - - if cls.mock: - cls.device.conn_ssh = FakeSSHConnection() - cls.device.ssh_channel = FakeSSHConnectionChannel() - cls.device.conn = FakeNokiaSROSDevice() - else: - cls.device.open() - - @staticmethod - def read_txt_file(filename): - with open(filename) as data_file: - return data_file.read() - - -class FakeSSHConnection: - def __init__(self): - self.get_transport = FakeGetTransport - - -class FakeGetTransport: - @staticmethod - def is_active(): - return True - - -class FakeSSHConnectionChannel: - def __init__(self): - self.command = "" - self.buff = "" - - def send(self, c=""): - self.command = c - - def recv(self, byte): - command_list = self.command.split("\n") - command = command_list[0].replace(" ", "_") - if "." in command: - command = command.replace(".", "_") - if "|" in command: - command = command.replace("|", "_") - if "/" in command: - command = command.replace("/", "_") - response_string = TestGetterNokiaSROSDriver.read_txt_file( - "sros/mock_data/{}.txt".format(command) - ) - response_string = response_string.ljust(len(response_string) + 1, " ") - return str.encode(response_string) - - -class FakeNokiaSROSDevice: - def __init__(self): - self.get = FakeGetMethod() - self.get_config = FakeGetConfigMethod() - - def open(self): - pass - - def close(self): - pass - - -class FakeGetConfigMethod: - """ - Fake Get config method for XML output - """ - - def response(self, source=""): - file_name = method_name - file_name = file_name.split("_", 1)[1] - - if file_name == "get_config_filtered": - file_name = file_name.rsplit("_", 1)[0] + "_" + source - else: - file_name = file_name + "_" + source - - response_string = TestGetterNokiaSROSDriver.read_txt_file( - "sros/mock_data/{}.txt".format(file_name) - ) - return FakeGetReply(data=response_string) - __call__ = response - - -class FakeGetMethod: - """ - Fake Get Method. - """ - - def response(self, filter="", with_defaults="", source=""): - file_name = method_name - file_name = file_name.split("_", 1)[1] - - response_string = TestGetterNokiaSROSDriver.read_txt_file( - "sros/mock_data/{}.txt".format(file_name) - ) - - return FakeGetReply(data=response_string) - __call__ = response - - -class FakeGetReply: - """ - Will fake the GetReply class of ncclient - """ - - def __init__(self, data): - self._data = data - - @property - def data_xml(self): - return to_ele(etree.fromstring(self._data.encode("UTF-8"))) - - -def to_ele(x): - return x if etree.iselement(x) else etree.fromstring(x.encode("UTF-8")) diff --git a/test/unit/conftest.py b/test/unit/conftest.py index ee2bb68..01cd609 100644 --- a/test/unit/conftest.py +++ b/test/unit/conftest.py @@ -38,7 +38,7 @@ def __init__(self, hostname, username, password, timeout=60, optional_args=None) super(self.__class__, self).__init__( hostname, username, password, timeout, optional_args=optional_args ) - + self.platform = "sros" self.patched_attrs = ["conn", "ssh_channel"] self.conn = FakeNokiaSROSDevice() self.ssh_channel = FakeSSHConnectionChannel() @@ -49,10 +49,17 @@ def is_alive(self): return {"is_alive": True} - class FakeNokiaSROSDevice(BaseTestDouble): + def __init__(self): self.get = FakeGetMethod(self) + self.get_config = FakeGetConfigMethod(self) + + def open(self): + pass + + def close(self): + pass def close_session(self): pass @@ -88,6 +95,30 @@ def response(self, filter="", with_defaults=""): __call__ = response +class FakeGetConfigMethod: + """ + Fake Get config method for XML output + """ + def __init__(self, device): + self._device = device + + def response(self, source=""): + test_name = self._device.current_test + + file_name = test_name.split("_", 1)[1] + + if file_name == "get_config_filtered" or file_name == "get_config_sanitized": + file_name = file_name.rsplit("_", 1)[0] + "_" + source + else: + file_name = file_name + "_" + source + filename = "{}.xml".format(file_name) + filepath = self._device.find_file(filename) + response_string = self._device.read_txt_file(filepath) + + return FakeGetReply(data=response_string) + __call__ = response + + class FakeGetReply: """ Will fake the GetReply class of ncclient @@ -109,6 +140,8 @@ class FakeSSHConnection: def __init__(self): self.get_transport = FakeGetTransport + def close(self): + pass class FakeGetTransport: @staticmethod diff --git a/test/unit/mocked_data/test_get_config/normal/expected_result.json b/test/unit/mocked_data/test_get_config/normal/expected_result.json index 900046c..a7eaaa2 100644 --- a/test/unit/mocked_data/test_get_config/normal/expected_result.json +++ b/test/unit/mocked_data/test_get_config/normal/expected_result.json @@ -1 +1,3 @@ -{"running": "configure { card 1 { card-type iom-v mda 1 { mda-type m20-v } } log { filter 1001 { entry 10 { description \"Collect only events of major severity or higher\" action forward match { severity { gte major } } } } log-id 50 { admin-state enable source { debug true } destination { console } } log-id 99 { description \"Default System Log\" source { main true } destination { memory { max-entries 500 } } } log-id 100 { description \"Default Serious Errors Log\" filter 1001 source { main true } destination { memory { max-entries 500 } } } log-id 101 { destination { netconf { } } } } multicast-management { chassis-level { per-mcast-plane-capacity { total-capacity dynamic mcast-capacity { primary-percentage 87.5 secondary-percentage 87.5 } redundant-mcast-capacity { primary-percentage 87.5 secondary-percentage 87.5 } } } } port 1/1/1 { admin-state enable } port 1/1/2 { admin-state enable description \"port 1/1/c1/1\" } router \"Base\" { interface \"system\" { ipv4 { primary { address 192.168.0.1 prefix-length 32 } } } interface \"toR2\" { admin-state enable port 1/1/1 ipv4 { primary { address 10.0.12.1 prefix-length 24 } } } ospf 0 { admin-state enable area 0.0.0.0 { interface \"system\" { admin-state enable } interface \"toR2\" { admin-state enable interface-type point-to-point } } } } service { vprn \"napalm\" { admin-state enable service-id 432 customer \"1\" autonomous-system 65432 route-distinguisher \"65501:12\" bgp { admin-state enable } } } system { name \"vSR-AUTO-01\" management-interface { configuration-mode model-driven cli { md-cli { auto-config-save true } } netconf { admin-state enable auto-config-save true capabilities { writable-running false } } yang-modules { base-r13-modules false nokia-modules false nokia-combined-modules true } } login-control { idle-timeout 30 } security { ftp-server true aaa { local-profiles { profile \"Level-1\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-2\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-3\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-4\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-5\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-6\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-7\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"administrative\" { default-action permit-all netconf { base-op-authorization { kill-session true lock true } } entry 10 { action permit match \"configure system security\" } entry 20 { action permit match \"show system security\" } entry 30 { action permit match \"tools perform security\" } entry 40 { action permit match \"tools dump security\" } entry 50 { action permit match \"admin system security\" } entry 100 { action deny match \"configure li\" } entry 110 { action deny match \"show li\" } entry 111 { action deny match \"clear li\" } entry 112 { action deny match \"tools dump li\" } } profile \"default\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } entry 50 { action permit match \"password\" } entry 60 { action deny match \"show config\" } entry 65 { action deny match \"show li\" } entry 66 { action deny match \"clear li\" } entry 67 { action deny match \"tools dump li\" } entry 70 { action permit match \"show\" } entry 80 { action permit match \"enable-admin\" } entry 100 { action deny match \"configure li\" } } } } ssh { server-cipher-list-v1 { cipher 200 { name 3des } cipher 205 { name blowfish } } server-cipher-list-v2 { cipher 190 { name aes256-ctr } cipher 192 { name aes192-ctr } cipher 194 { name aes128-ctr } cipher 200 { name aes128-cbc } cipher 205 { name 3des-cbc } cipher 210 { name blowfish-cbc } cipher 215 { name cast128-cbc } cipher 220 { name arcfour } cipher 225 { name aes192-cbc } cipher 230 { name aes256-cbc } cipher 235 { name rijndael-cbc } } client-cipher-list-v1 { cipher 200 { name 3des } cipher 205 { name blowfish } cipher 210 { name des } } client-cipher-list-v2 { cipher 190 { name aes256-ctr } cipher 192 { name aes192-ctr } cipher 194 { name aes128-ctr } cipher 200 { name aes128-cbc } cipher 205 { name 3des-cbc } cipher 210 { name blowfish-cbc } cipher 215 { name cast128-cbc } cipher 220 { name arcfour } cipher 225 { name aes192-cbc } cipher 230 { name aes256-cbc } cipher 235 { name rijndael-cbc } } server-mac-list-v2 { mac 200 { name hmac-sha2-512 } mac 210 { name hmac-sha2-256 } mac 215 { name hmac-sha1 } mac 220 { name hmac-sha1-96 } mac 225 { name hmac-md5 } mac 230 { name hmac-ripemd160 } mac 235 { name hmac-ripemd160-openssh-com } mac 240 { name hmac-md5-96 } } client-mac-list-v2 { mac 200 { name hmac-sha2-512 } mac 210 { name hmac-sha2-256 } mac 215 { name hmac-sha1 } mac 220 { name hmac-sha1-96 } mac 225 { name hmac-md5 } mac 230 { name hmac-ripemd160 } mac 235 { name hmac-ripemd160-openssh-com } mac 240 { name hmac-md5-96 } } } user-params { local-user { user \"admin\" { password \"$2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6\" access { console true netconf true grpc true } console { member [\"administrative\"] } } user \"linux\" { password \"$2y$10$xkqn46jNHBUJWit446j2o.Yu3E9zWOg44yRGjRK2YjRZE4p5xFjmG\" access { console true } console { member [\"default\"] } } user \"netconf\" { password \"$2y$10$.pTeMylttsq5ZMOnGDaag.uebq7NpYKo9Cgwi/O5covuBNyvSDHSW\" access { console true netconf true } console { member [\"administrative\"] } } user \"ubuntu\" { password \"$2y$10$/VLdxC3N0KZcmfdsivx6o.CjuELMgByxGrx79y9MQlLLXpS2QI/7i\" access { console true } console { member [\"administrative\"] } public-keys { rsa { rsa-key 1 { key-value \"AAAAB3NzaC1yc2EAAAADAQABAAABAQDH4eHQGPa9IGfJzp0O+czMlOE8jEVM/R65eOwIQRZutzfKY5BrAlZbiaY0WBJhQ5TP68KuKKWJyQoiSPJfy3/QyDkh5ONgc6xNgO6cltBasHFRTo45aK2zCbubaEB+SgBcAEh0tJ0zIZ84xkuVQYk6UDPQTE4cXu93u9uPaEZcYZYdyiP3Couxj8kF+4L8JF4ScuPqpZ2aCDW2JjDP++Dj7iuuhIJXdw/zHX8PKFFQq7qydmsiKKoV4nXEFcUYp5AtKWEphMz6blMrV/6CXotbINWSTsLiWppq1ZQ8iz7oWR3elHJZnTVUGOk5jwn2toi4sqSLuIYGJOlW9JfpKxvz\" } } } } user \"user-7\" { password \"$2y$10$vYx34MIaB2KOgxGH1LXP..W8Gxa6B3tLhQIiKFMtyCtgTmZxotkuW\" access { console true } console { member [\"Level-7\"] } } } } } }}persistent-indices { description \"Persistent system indices are loaded at boot time and cannot be modified.\" vrtr-id { router-name \"napalm\" vrtr-id 2 } vrtr-if-id { router-name \"Base\" interface-name \"toR2\" vrtr-id 1 if-index 6 }}", "candidate": " card-type iom-v mda 1 { mda-type m20-v }}log { filter 1001 { entry 10 { description \"Collect only events of major severity or higher\" action forward match { severity { gte major } } } } log-id 50 { admin-state enable source { debug true } destination { console } } log-id 99 { description \"Default System Log\" source { main true } destination { memory { max-entries 500 } } } log-id 100 { description \"Default Serious Errors Log\" filter 1001 source { main true } destination { memory { max-entries 500 } } } log-id 101 { destination { netconf { } } }}multicast-management { chassis-level { per-mcast-plane-capacity { total-capacity dynamic mcast-capacity { primary-percentage 87.5 secondary-percentage 87.5 } redundant-mcast-capacity { primary-percentage 87.5 secondary-percentage 87.5 } } }}port 1/1/1 { admin-state enable}port 1/1/2 { admin-state enable description \"port 1/1/c1/1\"}router \"Base\" { interface \"system\" { ipv4 { primary { address 192.168.0.1 prefix-length 32 } } } interface \"toR2\" { admin-state enable port 1/1/1 ipv4 { primary { address 10.0.12.1 prefix-length 24 } } } ospf 0 { admin-state enable area 0.0.0.0 { interface \"system\" { admin-state enable } interface \"toR2\" { admin-state enable interface-type point-to-point } } }}service { vprn \"napalm\" { admin-state enable service-id 432 customer \"1\" autonomous-system 65432 route-distinguisher \"65501:12\" bgp { admin-state enable } }}system { name \"vSR-AUTO-01\" management-interface { configuration-mode model-driven cli { md-cli { auto-config-save true } } netconf { admin-state enable auto-config-save true capabilities { writable-running false } } yang-modules { base-r13-modules false nokia-modules false nokia-combined-modules true } } login-control { idle-timeout 30 } security { ftp-server true aaa { local-profiles { profile \"Level-1\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-2\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-3\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-4\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-5\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-6\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-7\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"administrative\" { default-action permit-all netconf { base-op-authorization { kill-session true lock true } } entry 10 { action permit match \"configure system security\" } entry 20 { action permit match \"show system security\" } entry 30 { action permit match \"tools perform security\" } entry 40 { action permit match \"tools dump security\" } entry 50 { action permit match \"admin system security\" } entry 100 { action deny match \"configure li\" } entry 110 { action deny match \"show li\" } entry 111 { action deny match \"clear li\" } entry 112 { action deny match \"tools dump li\" } } profile \"default\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } entry 50 { action permit match \"password\" } entry 60 { action deny match \"show config\" } entry 65 { action deny match \"show li\" } entry 66 { action deny match \"clear li\" } entry 67 { action deny match \"tools dump li\" } entry 70 { action permit match \"show\" } entry 80 { action permit match \"enable-admin\" } entry 100 { action deny match \"configure li\" } } } } ssh { server-cipher-list-v1 { cipher 200 { name 3des } cipher 205 { name blowfish } } server-cipher-list-v2 { cipher 190 { name aes256-ctr } cipher 192 { name aes192-ctr } cipher 194 { name aes128-ctr } cipher 200 { name aes128-cbc } cipher 205 { name 3des-cbc } cipher 210 { name blowfish-cbc } cipher 215 { name cast128-cbc } cipher 220 { name arcfour } cipher 225 { name aes192-cbc } cipher 230 { name aes256-cbc } cipher 235 { name rijndael-cbc } } client-cipher-list-v1 { cipher 200 { name 3des } cipher 205 { name blowfish } cipher 210 { name des } } client-cipher-list-v2 { cipher 190 { name aes256-ctr } cipher 192 { name aes192-ctr } cipher 194 { name aes128-ctr } cipher 200 { name aes128-cbc } cipher 205 { name 3des-cbc } cipher 210 { name blowfish-cbc } cipher 215 { name cast128-cbc } cipher 220 { name arcfour } cipher 225 { name aes192-cbc } cipher 230 { name aes256-cbc } cipher 235 { name rijndael-cbc } } server-mac-list-v2 { mac 200 { name hmac-sha2-512 } mac 210 { name hmac-sha2-256 } mac 215 { name hmac-sha1 } mac 220 { name hmac-sha1-96 } mac 225 { name hmac-md5 } mac 230 { name hmac-ripemd160 } mac 235 { name hmac-ripemd160-openssh-com } mac 240 { name hmac-md5-96 } } client-mac-list-v2 { mac 200 { name hmac-sha2-512 } mac 210 { name hmac-sha2-256 } mac 215 { name hmac-sha1 } mac 220 { name hmac-sha1-96 } mac 225 { name hmac-md5 } mac 230 { name hmac-ripemd160 } mac 235 { name hmac-ripemd160-openssh-com } mac 240 { name hmac-md5-96 } } } user-params { local-user { user \"admin\" { password \"$2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6\" access { console true netconf true grpc true } console { member [\"administrative\"] } } user \"linux\" { password \"$2y$10$xkqn46jNHBUJWit446j2o.Yu3E9zWOg44yRGjRK2YjRZE4p5xFjmG\" access { console true } console { member [\"default\"] } } user \"netconf\" { password \"$2y$10$.pTeMylttsq5ZMOnGDaag.uebq7NpYKo9Cgwi/O5covuBNyvSDHSW\" access { console true netconf true } console { member [\"administrative\"] } } user \"ubuntu\" { password \"$2y$10$/VLdxC3N0KZcmfdsivx6o.CjuELMgByxGrx79y9MQlLLXpS2QI/7i\" access { console true } console { member [\"administrative\"] } public-keys { rsa { rsa-key 1 { key-value \"AAAAB3NzaC1yc2EAAAADAQABAAABAQDH4eHQGPa9IGfJzp0O+czMlOE8jEVM/R65eOwIQRZutzfKY5BrAlZbiaY0WBJhQ5TP68KuKKWJyQoiSPJfy3/QyDkh5ONgc6xNgO6cltBasHFRTo45aK2zCbubaEB+SgBcAEh0tJ0zIZ84xkuVQYk6UDPQTE4cXu93u9uPaEZcYZYdyiP3Couxj8kF+4L8JF4ScuPqpZ2aCDW2JjDP++Dj7iuuhIJXdw/zHX8PKFFQq7qydmsiKKoV4nXEFcUYp5AtKWEphMz6blMrV/6CXotbINWSTsLiWppq1ZQ8iz7oWR3elHJZnTVUGOk5jwn2toi4sqSLuIYGJOlW9JfpKxvz\" } } } } user \"user-7\" { password \"$2y$10$vYx34MIaB2KOgxGH1LXP..W8Gxa6B3tLhQIiKFMtyCtgTmZxotkuW\" access { console true } console { member [\"Level-7\"] } } } } }}", "startup": "configure { card 1 { card-type iom-v mda 1 { mda-type m20-v } } log { filter 1001 { entry 10 { description \"Collect only events of major severity or higher\" action forward match { severity { gte major } } } } log-id 50 { admin-state enable source { debug true } destination { console } } log-id 99 { description \"Default System Log\" source { main true } destination { memory { max-entries 500 } } } log-id 100 { description \"Default Serious Errors Log\" filter 1001 source { main true } destination { memory { max-entries 500 } } } log-id 101 { destination { netconf { } } } } multicast-management { chassis-level { per-mcast-plane-capacity { total-capacity dynamic mcast-capacity { primary-percentage 87.5 secondary-percentage 87.5 } redundant-mcast-capacity { primary-percentage 87.5 secondary-percentage 87.5 } } } } port 1/1/1 { admin-state enable } port 1/1/2 { admin-state enable description \"port 1/1/c1/1\" } router \"Base\" { interface \"system\" { ipv4 { primary { address 192.168.0.1 prefix-length 32 } } } interface \"toR2\" { admin-state enable port 1/1/1 ipv4 { primary { address 10.0.12.1 prefix-length 24 } } } ospf 0 { admin-state enable area 0.0.0.0 { interface \"system\" { admin-state enable } interface \"toR2\" { admin-state enable interface-type point-to-point } } } } service { vprn \"napalm\" { admin-state enable service-id 432 customer \"1\" autonomous-system 65432 route-distinguisher \"65501:12\" bgp { admin-state enable } } } system { name \"vSR-AUTO-01\" management-interface { configuration-mode model-driven cli { md-cli { auto-config-save true } } netconf { admin-state enable auto-config-save true capabilities { writable-running false } } yang-modules { base-r13-modules false nokia-modules false nokia-combined-modules true } } login-control { idle-timeout 30 } security { ftp-server true aaa { local-profiles { profile \"Level-1\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-2\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-3\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-4\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-5\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-6\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-7\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"administrative\" { default-action permit-all netconf { base-op-authorization { kill-session true lock true } } entry 10 { action permit match \"configure system security\" } entry 20 { action permit match \"show system security\" } entry 30 { action permit match \"tools perform security\" } entry 40 { action permit match \"tools dump security\" } entry 50 { action permit match \"admin system security\" } entry 100 { action deny match \"configure li\" } entry 110 { action deny match \"show li\" } entry 111 { action deny match \"clear li\" } entry 112 { action deny match \"tools dump li\" } } profile \"default\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } entry 50 { action permit match \"password\" } entry 60 { action deny match \"show config\" } entry 65 { action deny match \"show li\" } entry 66 { action deny match \"clear li\" } entry 67 { action deny match \"tools dump li\" } entry 70 { action permit match \"show\" } entry 80 { action permit match \"enable-admin\" } entry 100 { action deny match \"configure li\" } } } } ssh { server-cipher-list-v1 { cipher 200 { name 3des } cipher 205 { name blowfish } } server-cipher-list-v2 { cipher 190 { name aes256-ctr } cipher 192 { name aes192-ctr } cipher 194 { name aes128-ctr } cipher 200 { name aes128-cbc } cipher 205 { name 3des-cbc } cipher 210 { name blowfish-cbc } cipher 215 { name cast128-cbc } cipher 220 { name arcfour } cipher 225 { name aes192-cbc } cipher 230 { name aes256-cbc } cipher 235 { name rijndael-cbc } } client-cipher-list-v1 { cipher 200 { name 3des } cipher 205 { name blowfish } cipher 210 { name des } } client-cipher-list-v2 { cipher 190 { name aes256-ctr } cipher 192 { name aes192-ctr } cipher 194 { name aes128-ctr } cipher 200 { name aes128-cbc } cipher 205 { name 3des-cbc } cipher 210 { name blowfish-cbc } cipher 215 { name cast128-cbc } cipher 220 { name arcfour } cipher 225 { name aes192-cbc } cipher 230 { name aes256-cbc } cipher 235 { name rijndael-cbc } } server-mac-list-v2 { mac 200 { name hmac-sha2-512 } mac 210 { name hmac-sha2-256 } mac 215 { name hmac-sha1 } mac 220 { name hmac-sha1-96 } mac 225 { name hmac-md5 } mac 230 { name hmac-ripemd160 } mac 235 { name hmac-ripemd160-openssh-com } mac 240 { name hmac-md5-96 } } client-mac-list-v2 { mac 200 { name hmac-sha2-512 } mac 210 { name hmac-sha2-256 } mac 215 { name hmac-sha1 } mac 220 { name hmac-sha1-96 } mac 225 { name hmac-md5 } mac 230 { name hmac-ripemd160 } mac 235 { name hmac-ripemd160-openssh-com } mac 240 { name hmac-md5-96 } } } user-params { local-user { user \"admin\" { password \"$2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6\" access { console true netconf true grpc true } console { member [\"administrative\"] } } user \"linux\" { password \"$2y$10$xkqn46jNHBUJWit446j2o.Yu3E9zWOg44yRGjRK2YjRZE4p5xFjmG\" access { console true } console { member [\"default\"] } } user \"netconf\" { password \"$2y$10$.pTeMylttsq5ZMOnGDaag.uebq7NpYKo9Cgwi/O5covuBNyvSDHSW\" access { console true netconf true } console { member [\"administrative\"] } } user \"ubuntu\" { password \"$2y$10$/VLdxC3N0KZcmfdsivx6o.CjuELMgByxGrx79y9MQlLLXpS2QI/7i\" access { console true } console { member [\"administrative\"] } public-keys { rsa { rsa-key 1 { key-value \"AAAAB3NzaC1yc2EAAAADAQABAAABAQDH4eHQGPa9IGfJzp0O+czMlOE8jEVM/R65eOwIQRZutzfKY5BrAlZbiaY0WBJhQ5TP68KuKKWJyQoiSPJfy3/QyDkh5ONgc6xNgO6cltBasHFRTo45aK2zCbubaEB+SgBcAEh0tJ0zIZ84xkuVQYk6UDPQTE4cXu93u9uPaEZcYZYdyiP3Couxj8kF+4L8JF4ScuPqpZ2aCDW2JjDP++Dj7iuuhIJXdw/zHX8PKFFQq7qydmsiKKoV4nXEFcUYp5AtKWEphMz6blMrV/6CXotbINWSTsLiWppq1ZQ8iz7oWR3elHJZnTVUGOk5jwn2toi4sqSLuIYGJOlW9JfpKxvz\" } } } } user \"user-7\" { password \"$2y$10$vYx34MIaB2KOgxGH1LXP..W8Gxa6B3tLhQIiKFMtyCtgTmZxotkuW\" access { console true } console { member [\"Level-7\"] } } } } } }}persistent-indices { description \"Persistent system indices are loaded at boot time and cannot be modified.\" vrtr-id { router-name \"napalm\" vrtr-id 2 } vrtr-if-id { router-name \"Base\" interface-name \"toR2\" vrtr-id 1 if-index 6 }}"} \ No newline at end of file +{"running": "\n \n 1\n iom-1\n \n 1\n me12-100gb-qsfp28\n \n \n 2\n \n \n 1\n \n \n \n \n 1001\n \n 10\n Collect only events of major severity or higher\n forward\n \n \n major\n \n \n \n \n \n 99\n Default System Log\n \n
true
\n \n \n \n 500\n \n \n
\n \n 100\n Default Serious Errors Log\n 1001\n \n
true
\n \n \n \n 500\n \n \n
\n
\n \n 1/1/c1\n \n \n 1/1/c2\n \n \n 1/1/c3\n \n \n 1/1/c4\n \n \n 1/1/c5\n \n \n 1/1/c6\n \n \n 1/1/c7\n \n \n 1/1/c8\n \n \n 1/1/c9\n \n \n 1/1/c10\n \n \n 1/1/c11\n \n \n 1/1/c12\n \n \n sros-test\n \n enable\n \n \n true\n \n \n enable\n \n \n \n model-driven\n \n enable\n true\n \n \n false\n true\n \n \n 9216\n \n enable\n \n \n \n \n 30\n \n \n \n 30\n \n \n \n \n \n \n administrative\n permit-all\n \n \n true\n true\n \n \n \n 10\n permit\n configure system security\n \n \n 20\n permit\n show system security\n \n \n 30\n permit\n tools perform security\n \n \n 40\n permit\n tools dump security\n \n \n 50\n permit\n admin system security\n \n \n 100\n deny\n configure li\n \n \n 110\n deny\n show li\n \n \n 111\n deny\n clear li\n \n \n 112\n deny\n tools dump li\n \n \n \n default\n \n 10\n permit\n exec\n \n \n 20\n permit\n exit\n \n \n 30\n permit\n help\n \n \n 40\n permit\n logout\n \n \n 50\n permit\n password\n \n \n 60\n deny\n show config\n \n \n 65\n deny\n show li\n \n \n 66\n deny\n clear li\n \n \n 67\n deny\n tools dump li\n \n \n 68\n deny\n state li\n \n \n 70\n permit\n show\n \n \n 75\n permit\n state\n \n \n 80\n permit\n enable-admin\n \n \n 90\n permit\n enable\n \n \n 100\n deny\n configure li\n \n \n \n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n 210\n des\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n \n \n admin\n $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6\n \n true\n true\n true\n true\n true\n \n \n administrative\n \n \n \n vrnetlab\n $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm\n \n true\n true\n \n \n administrative\n default\n \n \n \n \n \n \n
\n", + "candidate": "\n \n 1\n iom-1\n \n 1\n me12-100gb-qsfp28\n \n \n 2\n \n \n 1\n \n \n \n \n 1001\n \n 10\n Collect only events of major severity or higher\n forward\n \n \n major\n \n \n \n \n \n 99\n Default System Log\n \n
true
\n \n \n \n 500\n \n \n
\n \n 100\n Default Serious Errors Log\n 1001\n \n
true
\n \n \n \n 500\n \n \n
\n
\n \n 1/1/c1\n \n \n 1/1/c2\n \n \n 1/1/c3\n \n \n 1/1/c4\n \n \n 1/1/c5\n \n \n 1/1/c6\n \n \n 1/1/c7\n \n \n 1/1/c8\n \n \n 1/1/c9\n \n \n 1/1/c10\n \n \n 1/1/c11\n \n \n 1/1/c12\n \n \n sros-test\n \n enable\n \n \n true\n \n \n enable\n \n \n \n model-driven\n \n enable\n true\n \n \n false\n true\n \n \n 9216\n \n enable\n \n \n \n \n 30\n \n \n \n 30\n \n \n \n \n \n \n administrative\n permit-all\n \n \n true\n true\n \n \n \n 10\n permit\n configure system security\n \n \n 20\n permit\n show system security\n \n \n 30\n permit\n tools perform security\n \n \n 40\n permit\n tools dump security\n \n \n 50\n permit\n admin system security\n \n \n 100\n deny\n configure li\n \n \n 110\n deny\n show li\n \n \n 111\n deny\n clear li\n \n \n 112\n deny\n tools dump li\n \n \n \n default\n \n 10\n permit\n exec\n \n \n 20\n permit\n exit\n \n \n 30\n permit\n help\n \n \n 40\n permit\n logout\n \n \n 50\n permit\n password\n \n \n 60\n deny\n show config\n \n \n 65\n deny\n show li\n \n \n 66\n deny\n clear li\n \n \n 67\n deny\n tools dump li\n \n \n 68\n deny\n state li\n \n \n 70\n permit\n show\n \n \n 75\n permit\n state\n \n \n 80\n permit\n enable-admin\n \n \n 90\n permit\n enable\n \n \n 100\n deny\n configure li\n \n \n \n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n 210\n des\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n \n \n admin\n $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6\n \n true\n true\n true\n true\n true\n \n \n administrative\n \n \n \n vrnetlab\n $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm\n \n true\n true\n \n \n administrative\n default\n \n \n \n \n \n \n
\n", + "startup": "\n \n 1\n iom-1\n \n 1\n me12-100gb-qsfp28\n \n \n 2\n \n \n 1\n \n \n \n \n 1001\n \n 10\n Collect only events of major severity or higher\n forward\n \n \n major\n \n \n \n \n \n 99\n Default System Log\n \n
true
\n \n \n \n 500\n \n \n
\n \n 100\n Default Serious Errors Log\n 1001\n \n
true
\n \n \n \n 500\n \n \n
\n
\n \n 1/1/c1\n \n \n 1/1/c2\n \n \n 1/1/c3\n \n \n 1/1/c4\n \n \n 1/1/c5\n \n \n 1/1/c6\n \n \n 1/1/c7\n \n \n 1/1/c8\n \n \n 1/1/c9\n \n \n 1/1/c10\n \n \n 1/1/c11\n \n \n 1/1/c12\n \n \n sros-test\n \n enable\n \n \n true\n \n \n enable\n \n \n \n model-driven\n \n enable\n true\n \n \n false\n true\n \n \n 9216\n \n enable\n \n \n \n \n 30\n \n \n \n 30\n \n \n \n \n \n \n administrative\n permit-all\n \n \n true\n true\n \n \n \n 10\n permit\n configure system security\n \n \n 20\n permit\n show system security\n \n \n 30\n permit\n tools perform security\n \n \n 40\n permit\n tools dump security\n \n \n 50\n permit\n admin system security\n \n \n 100\n deny\n configure li\n \n \n 110\n deny\n show li\n \n \n 111\n deny\n clear li\n \n \n 112\n deny\n tools dump li\n \n \n \n default\n \n 10\n permit\n exec\n \n \n 20\n permit\n exit\n \n \n 30\n permit\n help\n \n \n 40\n permit\n logout\n \n \n 50\n permit\n password\n \n \n 60\n deny\n show config\n \n \n 65\n deny\n show li\n \n \n 66\n deny\n clear li\n \n \n 67\n deny\n tools dump li\n \n \n 68\n deny\n state li\n \n \n 70\n permit\n show\n \n \n 75\n permit\n state\n \n \n 80\n permit\n enable-admin\n \n \n 90\n permit\n enable\n \n \n 100\n deny\n configure li\n \n \n \n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n 210\n des\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n \n \n admin\n $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6\n \n true\n true\n true\n true\n true\n \n \n administrative\n \n \n \n vrnetlab\n $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm\n \n true\n true\n \n \n administrative\n default\n \n \n \n \n \n \n
\n"} \ No newline at end of file diff --git a/test/unit/mocked_data/test_get_config/normal/get_config_candidate.xml b/test/unit/mocked_data/test_get_config/normal/get_config_candidate.xml new file mode 100644 index 0000000..6cece67 --- /dev/null +++ b/test/unit/mocked_data/test_get_config/normal/get_config_candidate.xml @@ -0,0 +1,487 @@ + + + + 1 + iom-1 + + 1 + me12-100gb-qsfp28 + + + 2 + + + 1 + + + + + 1001 + + 10 + Collect only events of major severity or higher + forward + + + major + + + + + + 99 + Default System Log + +
true
+ + + + 500 + + +
+ + 100 + Default Serious Errors Log + 1001 + +
true
+ + + + 500 + + +
+
+ + 1/1/c1 + + + 1/1/c2 + + + 1/1/c3 + + + 1/1/c4 + + + 1/1/c5 + + + 1/1/c6 + + + 1/1/c7 + + + 1/1/c8 + + + 1/1/c9 + + + 1/1/c10 + + + 1/1/c11 + + + 1/1/c12 + + + sros-test + + enable + + + true + + + enable + + + + model-driven + + enable + true + + + false + true + + + 9216 + + enable + + + + + 30 + + + + 30 + + + + + + + administrative + permit-all + + + true + true + + + + 10 + permit + configure system security + + + 20 + permit + show system security + + + 30 + permit + tools perform security + + + 40 + permit + tools dump security + + + 50 + permit + admin system security + + + 100 + deny + configure li + + + 110 + deny + show li + + + 111 + deny + clear li + + + 112 + deny + tools dump li + + + + default + + 10 + permit + exec + + + 20 + permit + exit + + + 30 + permit + help + + + 40 + permit + logout + + + 50 + permit + password + + + 60 + deny + show config + + + 65 + deny + show li + + + 66 + deny + clear li + + + 67 + deny + tools dump li + + + 68 + deny + state li + + + 70 + permit + show + + + 75 + permit + state + + + 80 + permit + enable-admin + + + 90 + permit + enable + + + 100 + deny + configure li + + + + + + + + 200 + 3des + + + 205 + blowfish + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + 3des + + + 205 + blowfish + + + 210 + des + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + + + admin + $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6 + + true + true + true + true + true + + + administrative + + + + vrnetlab + $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm + + true + true + + + administrative + default + + + + + + +
+
diff --git a/test/unit/mocked_data/test_get_config/normal/get_config_running.xml b/test/unit/mocked_data/test_get_config/normal/get_config_running.xml new file mode 100644 index 0000000..6cece67 --- /dev/null +++ b/test/unit/mocked_data/test_get_config/normal/get_config_running.xml @@ -0,0 +1,487 @@ + + + + 1 + iom-1 + + 1 + me12-100gb-qsfp28 + + + 2 + + + 1 + + + + + 1001 + + 10 + Collect only events of major severity or higher + forward + + + major + + + + + + 99 + Default System Log + +
true
+ + + + 500 + + +
+ + 100 + Default Serious Errors Log + 1001 + +
true
+ + + + 500 + + +
+
+ + 1/1/c1 + + + 1/1/c2 + + + 1/1/c3 + + + 1/1/c4 + + + 1/1/c5 + + + 1/1/c6 + + + 1/1/c7 + + + 1/1/c8 + + + 1/1/c9 + + + 1/1/c10 + + + 1/1/c11 + + + 1/1/c12 + + + sros-test + + enable + + + true + + + enable + + + + model-driven + + enable + true + + + false + true + + + 9216 + + enable + + + + + 30 + + + + 30 + + + + + + + administrative + permit-all + + + true + true + + + + 10 + permit + configure system security + + + 20 + permit + show system security + + + 30 + permit + tools perform security + + + 40 + permit + tools dump security + + + 50 + permit + admin system security + + + 100 + deny + configure li + + + 110 + deny + show li + + + 111 + deny + clear li + + + 112 + deny + tools dump li + + + + default + + 10 + permit + exec + + + 20 + permit + exit + + + 30 + permit + help + + + 40 + permit + logout + + + 50 + permit + password + + + 60 + deny + show config + + + 65 + deny + show li + + + 66 + deny + clear li + + + 67 + deny + tools dump li + + + 68 + deny + state li + + + 70 + permit + show + + + 75 + permit + state + + + 80 + permit + enable-admin + + + 90 + permit + enable + + + 100 + deny + configure li + + + + + + + + 200 + 3des + + + 205 + blowfish + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + 3des + + + 205 + blowfish + + + 210 + des + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + + + admin + $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6 + + true + true + true + true + true + + + administrative + + + + vrnetlab + $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm + + true + true + + + administrative + default + + + + + + +
+
diff --git a/test/unit/mocked_data/test_get_config/normal/get_config_startup.xml b/test/unit/mocked_data/test_get_config/normal/get_config_startup.xml new file mode 100644 index 0000000..6cece67 --- /dev/null +++ b/test/unit/mocked_data/test_get_config/normal/get_config_startup.xml @@ -0,0 +1,487 @@ + + + + 1 + iom-1 + + 1 + me12-100gb-qsfp28 + + + 2 + + + 1 + + + + + 1001 + + 10 + Collect only events of major severity or higher + forward + + + major + + + + + + 99 + Default System Log + +
true
+ + + + 500 + + +
+ + 100 + Default Serious Errors Log + 1001 + +
true
+ + + + 500 + + +
+
+ + 1/1/c1 + + + 1/1/c2 + + + 1/1/c3 + + + 1/1/c4 + + + 1/1/c5 + + + 1/1/c6 + + + 1/1/c7 + + + 1/1/c8 + + + 1/1/c9 + + + 1/1/c10 + + + 1/1/c11 + + + 1/1/c12 + + + sros-test + + enable + + + true + + + enable + + + + model-driven + + enable + true + + + false + true + + + 9216 + + enable + + + + + 30 + + + + 30 + + + + + + + administrative + permit-all + + + true + true + + + + 10 + permit + configure system security + + + 20 + permit + show system security + + + 30 + permit + tools perform security + + + 40 + permit + tools dump security + + + 50 + permit + admin system security + + + 100 + deny + configure li + + + 110 + deny + show li + + + 111 + deny + clear li + + + 112 + deny + tools dump li + + + + default + + 10 + permit + exec + + + 20 + permit + exit + + + 30 + permit + help + + + 40 + permit + logout + + + 50 + permit + password + + + 60 + deny + show config + + + 65 + deny + show li + + + 66 + deny + clear li + + + 67 + deny + tools dump li + + + 68 + deny + state li + + + 70 + permit + show + + + 75 + permit + state + + + 80 + permit + enable-admin + + + 90 + permit + enable + + + 100 + deny + configure li + + + + + + + + 200 + 3des + + + 205 + blowfish + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + 3des + + + 205 + blowfish + + + 210 + des + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + + + admin + $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6 + + true + true + true + true + true + + + administrative + + + + vrnetlab + $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm + + true + true + + + administrative + default + + + + + + +
+
diff --git a/test/unit/mocked_data/test_get_config_filtered/normal/expected_result.json b/test/unit/mocked_data/test_get_config_filtered/normal/expected_result.json index be68788..1fd948a 100644 --- a/test/unit/mocked_data/test_get_config_filtered/normal/expected_result.json +++ b/test/unit/mocked_data/test_get_config_filtered/normal/expected_result.json @@ -1,3 +1,3 @@ {"running": "", - "candidate": " card-type iom-v mda 1 { mda-type m20-v }}log { filter 1001 { entry 10 { description \"Collect only events of major severity or higher\" action forward match { severity { gte major } } } } log-id 50 { admin-state enable source { debug true } destination { console } } log-id 99 { description \"Default System Log\" source { main true } destination { memory { max-entries 500 } } } log-id 100 { description \"Default Serious Errors Log\" filter 1001 source { main true } destination { memory { max-entries 500 } } } log-id 101 { destination { netconf { } } }}multicast-management { chassis-level { per-mcast-plane-capacity { total-capacity dynamic mcast-capacity { primary-percentage 87.5 secondary-percentage 87.5 } redundant-mcast-capacity { primary-percentage 87.5 secondary-percentage 87.5 } } }}port 1/1/1 { admin-state enable}port 1/1/2 { admin-state enable description \"port 1/1/c1/1\"}router \"Base\" { interface \"system\" { ipv4 { primary { address 192.168.0.1 prefix-length 32 } } } interface \"toR2\" { admin-state enable port 1/1/1 ipv4 { primary { address 10.0.12.1 prefix-length 24 } } } ospf 0 { admin-state enable area 0.0.0.0 { interface \"system\" { admin-state enable } interface \"toR2\" { admin-state enable interface-type point-to-point } } }}service { vprn \"napalm\" { admin-state enable service-id 432 customer \"1\" autonomous-system 65432 route-distinguisher \"65501:12\" bgp { admin-state enable } }}system { name \"vSR-AUTO-01\" management-interface { configuration-mode model-driven cli { md-cli { auto-config-save true } } netconf { admin-state enable auto-config-save true capabilities { writable-running false } } yang-modules { base-r13-modules false nokia-modules false nokia-combined-modules true } } login-control { idle-timeout 30 } security { ftp-server true aaa { local-profiles { profile \"Level-1\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-2\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-3\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-4\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-5\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-6\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"Level-7\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } } profile \"administrative\" { default-action permit-all netconf { base-op-authorization { kill-session true lock true } } entry 10 { action permit match \"configure system security\" } entry 20 { action permit match \"show system security\" } entry 30 { action permit match \"tools perform security\" } entry 40 { action permit match \"tools dump security\" } entry 50 { action permit match \"admin system security\" } entry 100 { action deny match \"configure li\" } entry 110 { action deny match \"show li\" } entry 111 { action deny match \"clear li\" } entry 112 { action deny match \"tools dump li\" } } profile \"default\" { entry 10 { action permit match \"exec\" } entry 20 { action permit match \"exit\" } entry 30 { action permit match \"help\" } entry 40 { action permit match \"logout\" } entry 50 { action permit match \"password\" } entry 60 { action deny match \"show config\" } entry 65 { action deny match \"show li\" } entry 66 { action deny match \"clear li\" } entry 67 { action deny match \"tools dump li\" } entry 70 { action permit match \"show\" } entry 80 { action permit match \"enable-admin\" } entry 100 { action deny match \"configure li\" } } } } ssh { server-cipher-list-v1 { cipher 200 { name 3des } cipher 205 { name blowfish } } server-cipher-list-v2 { cipher 190 { name aes256-ctr } cipher 192 { name aes192-ctr } cipher 194 { name aes128-ctr } cipher 200 { name aes128-cbc } cipher 205 { name 3des-cbc } cipher 210 { name blowfish-cbc } cipher 215 { name cast128-cbc } cipher 220 { name arcfour } cipher 225 { name aes192-cbc } cipher 230 { name aes256-cbc } cipher 235 { name rijndael-cbc } } client-cipher-list-v1 { cipher 200 { name 3des } cipher 205 { name blowfish } cipher 210 { name des } } client-cipher-list-v2 { cipher 190 { name aes256-ctr } cipher 192 { name aes192-ctr } cipher 194 { name aes128-ctr } cipher 200 { name aes128-cbc } cipher 205 { name 3des-cbc } cipher 210 { name blowfish-cbc } cipher 215 { name cast128-cbc } cipher 220 { name arcfour } cipher 225 { name aes192-cbc } cipher 230 { name aes256-cbc } cipher 235 { name rijndael-cbc } } server-mac-list-v2 { mac 200 { name hmac-sha2-512 } mac 210 { name hmac-sha2-256 } mac 215 { name hmac-sha1 } mac 220 { name hmac-sha1-96 } mac 225 { name hmac-md5 } mac 230 { name hmac-ripemd160 } mac 235 { name hmac-ripemd160-openssh-com } mac 240 { name hmac-md5-96 } } client-mac-list-v2 { mac 200 { name hmac-sha2-512 } mac 210 { name hmac-sha2-256 } mac 215 { name hmac-sha1 } mac 220 { name hmac-sha1-96 } mac 225 { name hmac-md5 } mac 230 { name hmac-ripemd160 } mac 235 { name hmac-ripemd160-openssh-com } mac 240 { name hmac-md5-96 } } } user-params { local-user { user \"admin\" { password \"$2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6\" access { console true netconf true grpc true } console { member [\"administrative\"] } } user \"linux\" { password \"$2y$10$xkqn46jNHBUJWit446j2o.Yu3E9zWOg44yRGjRK2YjRZE4p5xFjmG\" access { console true } console { member [\"default\"] } } user \"netconf\" { password \"$2y$10$.pTeMylttsq5ZMOnGDaag.uebq7NpYKo9Cgwi/O5covuBNyvSDHSW\" access { console true netconf true } console { member [\"administrative\"] } } user \"ubuntu\" { password \"$2y$10$/VLdxC3N0KZcmfdsivx6o.CjuELMgByxGrx79y9MQlLLXpS2QI/7i\" access { console true } console { member [\"administrative\"] } public-keys { rsa { rsa-key 1 { key-value \"AAAAB3NzaC1yc2EAAAADAQABAAABAQDH4eHQGPa9IGfJzp0O+czMlOE8jEVM/R65eOwIQRZutzfKY5BrAlZbiaY0WBJhQ5TP68KuKKWJyQoiSPJfy3/QyDkh5ONgc6xNgO6cltBasHFRTo45aK2zCbubaEB+SgBcAEh0tJ0zIZ84xkuVQYk6UDPQTE4cXu93u9uPaEZcYZYdyiP3Couxj8kF+4L8JF4ScuPqpZ2aCDW2JjDP++Dj7iuuhIJXdw/zHX8PKFFQq7qydmsiKKoV4nXEFcUYp5AtKWEphMz6blMrV/6CXotbINWSTsLiWppq1ZQ8iz7oWR3elHJZnTVUGOk5jwn2toi4sqSLuIYGJOlW9JfpKxvz\" } } } } user \"user-7\" { password \"$2y$10$vYx34MIaB2KOgxGH1LXP..W8Gxa6B3tLhQIiKFMtyCtgTmZxotkuW\" access { console true } console { member [\"Level-7\"] } } } } }}", + "candidate": "\n \n 1\n iom-1\n \n 1\n me12-100gb-qsfp28\n \n \n 2\n \n \n 1\n \n \n \n \n 1001\n \n 10\n Collect only events of major severity or higher\n forward\n \n \n major\n \n \n \n \n \n 99\n Default System Log\n \n
true
\n \n \n \n 500\n \n \n
\n \n 100\n Default Serious Errors Log\n 1001\n \n
true
\n \n \n \n 500\n \n \n
\n
\n \n 1/1/c1\n \n \n 1/1/c2\n \n \n 1/1/c3\n \n \n 1/1/c4\n \n \n 1/1/c5\n \n \n 1/1/c6\n \n \n 1/1/c7\n \n \n 1/1/c8\n \n \n 1/1/c9\n \n \n 1/1/c10\n \n \n 1/1/c11\n \n \n 1/1/c12\n \n \n sros-test\n \n enable\n \n \n true\n \n \n enable\n \n \n \n model-driven\n \n enable\n true\n \n \n false\n true\n \n \n 9216\n \n enable\n \n \n \n \n 30\n \n \n \n 30\n \n \n \n \n \n \n administrative\n permit-all\n \n \n true\n true\n \n \n \n 10\n permit\n configure system security\n \n \n 20\n permit\n show system security\n \n \n 30\n permit\n tools perform security\n \n \n 40\n permit\n tools dump security\n \n \n 50\n permit\n admin system security\n \n \n 100\n deny\n configure li\n \n \n 110\n deny\n show li\n \n \n 111\n deny\n clear li\n \n \n 112\n deny\n tools dump li\n \n \n \n default\n \n 10\n permit\n exec\n \n \n 20\n permit\n exit\n \n \n 30\n permit\n help\n \n \n 40\n permit\n logout\n \n \n 50\n permit\n password\n \n \n 60\n deny\n show config\n \n \n 65\n deny\n show li\n \n \n 66\n deny\n clear li\n \n \n 67\n deny\n tools dump li\n \n \n 68\n deny\n state li\n \n \n 70\n permit\n show\n \n \n 75\n permit\n state\n \n \n 80\n permit\n enable-admin\n \n \n 90\n permit\n enable\n \n \n 100\n deny\n configure li\n \n \n \n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n 210\n des\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n \n \n admin\n $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6\n \n true\n true\n true\n true\n true\n \n \n administrative\n \n \n \n vrnetlab\n $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm\n \n true\n true\n \n \n administrative\n default\n \n \n \n \n \n \n
\n", "startup": ""} \ No newline at end of file diff --git a/test/unit/mocked_data/test_get_config_filtered/normal/get_config_candidate.xml b/test/unit/mocked_data/test_get_config_filtered/normal/get_config_candidate.xml new file mode 100644 index 0000000..6cece67 --- /dev/null +++ b/test/unit/mocked_data/test_get_config_filtered/normal/get_config_candidate.xml @@ -0,0 +1,487 @@ + + + + 1 + iom-1 + + 1 + me12-100gb-qsfp28 + + + 2 + + + 1 + + + + + 1001 + + 10 + Collect only events of major severity or higher + forward + + + major + + + + + + 99 + Default System Log + +
true
+ + + + 500 + + +
+ + 100 + Default Serious Errors Log + 1001 + +
true
+ + + + 500 + + +
+
+ + 1/1/c1 + + + 1/1/c2 + + + 1/1/c3 + + + 1/1/c4 + + + 1/1/c5 + + + 1/1/c6 + + + 1/1/c7 + + + 1/1/c8 + + + 1/1/c9 + + + 1/1/c10 + + + 1/1/c11 + + + 1/1/c12 + + + sros-test + + enable + + + true + + + enable + + + + model-driven + + enable + true + + + false + true + + + 9216 + + enable + + + + + 30 + + + + 30 + + + + + + + administrative + permit-all + + + true + true + + + + 10 + permit + configure system security + + + 20 + permit + show system security + + + 30 + permit + tools perform security + + + 40 + permit + tools dump security + + + 50 + permit + admin system security + + + 100 + deny + configure li + + + 110 + deny + show li + + + 111 + deny + clear li + + + 112 + deny + tools dump li + + + + default + + 10 + permit + exec + + + 20 + permit + exit + + + 30 + permit + help + + + 40 + permit + logout + + + 50 + permit + password + + + 60 + deny + show config + + + 65 + deny + show li + + + 66 + deny + clear li + + + 67 + deny + tools dump li + + + 68 + deny + state li + + + 70 + permit + show + + + 75 + permit + state + + + 80 + permit + enable-admin + + + 90 + permit + enable + + + 100 + deny + configure li + + + + + + + + 200 + 3des + + + 205 + blowfish + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + 3des + + + 205 + blowfish + + + 210 + des + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + + + admin + $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6 + + true + true + true + true + true + + + administrative + + + + vrnetlab + $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm + + true + true + + + administrative + default + + + + + + +
+
diff --git a/test/unit/mocked_data/test_get_config_filtered/normal/get_config_running.xml b/test/unit/mocked_data/test_get_config_filtered/normal/get_config_running.xml new file mode 100644 index 0000000..6cece67 --- /dev/null +++ b/test/unit/mocked_data/test_get_config_filtered/normal/get_config_running.xml @@ -0,0 +1,487 @@ + + + + 1 + iom-1 + + 1 + me12-100gb-qsfp28 + + + 2 + + + 1 + + + + + 1001 + + 10 + Collect only events of major severity or higher + forward + + + major + + + + + + 99 + Default System Log + +
true
+ + + + 500 + + +
+ + 100 + Default Serious Errors Log + 1001 + +
true
+ + + + 500 + + +
+
+ + 1/1/c1 + + + 1/1/c2 + + + 1/1/c3 + + + 1/1/c4 + + + 1/1/c5 + + + 1/1/c6 + + + 1/1/c7 + + + 1/1/c8 + + + 1/1/c9 + + + 1/1/c10 + + + 1/1/c11 + + + 1/1/c12 + + + sros-test + + enable + + + true + + + enable + + + + model-driven + + enable + true + + + false + true + + + 9216 + + enable + + + + + 30 + + + + 30 + + + + + + + administrative + permit-all + + + true + true + + + + 10 + permit + configure system security + + + 20 + permit + show system security + + + 30 + permit + tools perform security + + + 40 + permit + tools dump security + + + 50 + permit + admin system security + + + 100 + deny + configure li + + + 110 + deny + show li + + + 111 + deny + clear li + + + 112 + deny + tools dump li + + + + default + + 10 + permit + exec + + + 20 + permit + exit + + + 30 + permit + help + + + 40 + permit + logout + + + 50 + permit + password + + + 60 + deny + show config + + + 65 + deny + show li + + + 66 + deny + clear li + + + 67 + deny + tools dump li + + + 68 + deny + state li + + + 70 + permit + show + + + 75 + permit + state + + + 80 + permit + enable-admin + + + 90 + permit + enable + + + 100 + deny + configure li + + + + + + + + 200 + 3des + + + 205 + blowfish + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + 3des + + + 205 + blowfish + + + 210 + des + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + + + admin + $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6 + + true + true + true + true + true + + + administrative + + + + vrnetlab + $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm + + true + true + + + administrative + default + + + + + + +
+
diff --git a/test/unit/mocked_data/test_get_config_filtered/normal/get_config_startup.xml b/test/unit/mocked_data/test_get_config_filtered/normal/get_config_startup.xml new file mode 100644 index 0000000..6cece67 --- /dev/null +++ b/test/unit/mocked_data/test_get_config_filtered/normal/get_config_startup.xml @@ -0,0 +1,487 @@ + + + + 1 + iom-1 + + 1 + me12-100gb-qsfp28 + + + 2 + + + 1 + + + + + 1001 + + 10 + Collect only events of major severity or higher + forward + + + major + + + + + + 99 + Default System Log + +
true
+ + + + 500 + + +
+ + 100 + Default Serious Errors Log + 1001 + +
true
+ + + + 500 + + +
+
+ + 1/1/c1 + + + 1/1/c2 + + + 1/1/c3 + + + 1/1/c4 + + + 1/1/c5 + + + 1/1/c6 + + + 1/1/c7 + + + 1/1/c8 + + + 1/1/c9 + + + 1/1/c10 + + + 1/1/c11 + + + 1/1/c12 + + + sros-test + + enable + + + true + + + enable + + + + model-driven + + enable + true + + + false + true + + + 9216 + + enable + + + + + 30 + + + + 30 + + + + + + + administrative + permit-all + + + true + true + + + + 10 + permit + configure system security + + + 20 + permit + show system security + + + 30 + permit + tools perform security + + + 40 + permit + tools dump security + + + 50 + permit + admin system security + + + 100 + deny + configure li + + + 110 + deny + show li + + + 111 + deny + clear li + + + 112 + deny + tools dump li + + + + default + + 10 + permit + exec + + + 20 + permit + exit + + + 30 + permit + help + + + 40 + permit + logout + + + 50 + permit + password + + + 60 + deny + show config + + + 65 + deny + show li + + + 66 + deny + clear li + + + 67 + deny + tools dump li + + + 68 + deny + state li + + + 70 + permit + show + + + 75 + permit + state + + + 80 + permit + enable-admin + + + 90 + permit + enable + + + 100 + deny + configure li + + + + + + + + 200 + 3des + + + 205 + blowfish + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + 3des + + + 205 + blowfish + + + 210 + des + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + + + admin + $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6 + + true + true + true + true + true + + + administrative + + + + vrnetlab + $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm + + true + true + + + administrative + default + + + + + + +
+
diff --git a/test/unit/mocked_data/test_get_config_sanitized/normal/expected_result.json b/test/unit/mocked_data/test_get_config_sanitized/normal/expected_result.json new file mode 100644 index 0000000..a7eaaa2 --- /dev/null +++ b/test/unit/mocked_data/test_get_config_sanitized/normal/expected_result.json @@ -0,0 +1,3 @@ +{"running": "\n \n 1\n iom-1\n \n 1\n me12-100gb-qsfp28\n \n \n 2\n \n \n 1\n \n \n \n \n 1001\n \n 10\n Collect only events of major severity or higher\n forward\n \n \n major\n \n \n \n \n \n 99\n Default System Log\n \n
true
\n \n \n \n 500\n \n \n
\n \n 100\n Default Serious Errors Log\n 1001\n \n
true
\n \n \n \n 500\n \n \n
\n
\n \n 1/1/c1\n \n \n 1/1/c2\n \n \n 1/1/c3\n \n \n 1/1/c4\n \n \n 1/1/c5\n \n \n 1/1/c6\n \n \n 1/1/c7\n \n \n 1/1/c8\n \n \n 1/1/c9\n \n \n 1/1/c10\n \n \n 1/1/c11\n \n \n 1/1/c12\n \n \n sros-test\n \n enable\n \n \n true\n \n \n enable\n \n \n \n model-driven\n \n enable\n true\n \n \n false\n true\n \n \n 9216\n \n enable\n \n \n \n \n 30\n \n \n \n 30\n \n \n \n \n \n \n administrative\n permit-all\n \n \n true\n true\n \n \n \n 10\n permit\n configure system security\n \n \n 20\n permit\n show system security\n \n \n 30\n permit\n tools perform security\n \n \n 40\n permit\n tools dump security\n \n \n 50\n permit\n admin system security\n \n \n 100\n deny\n configure li\n \n \n 110\n deny\n show li\n \n \n 111\n deny\n clear li\n \n \n 112\n deny\n tools dump li\n \n \n \n default\n \n 10\n permit\n exec\n \n \n 20\n permit\n exit\n \n \n 30\n permit\n help\n \n \n 40\n permit\n logout\n \n \n 50\n permit\n password\n \n \n 60\n deny\n show config\n \n \n 65\n deny\n show li\n \n \n 66\n deny\n clear li\n \n \n 67\n deny\n tools dump li\n \n \n 68\n deny\n state li\n \n \n 70\n permit\n show\n \n \n 75\n permit\n state\n \n \n 80\n permit\n enable-admin\n \n \n 90\n permit\n enable\n \n \n 100\n deny\n configure li\n \n \n \n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n 210\n des\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n \n \n admin\n $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6\n \n true\n true\n true\n true\n true\n \n \n administrative\n \n \n \n vrnetlab\n $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm\n \n true\n true\n \n \n administrative\n default\n \n \n \n \n \n \n
\n", + "candidate": "\n \n 1\n iom-1\n \n 1\n me12-100gb-qsfp28\n \n \n 2\n \n \n 1\n \n \n \n \n 1001\n \n 10\n Collect only events of major severity or higher\n forward\n \n \n major\n \n \n \n \n \n 99\n Default System Log\n \n
true
\n \n \n \n 500\n \n \n
\n \n 100\n Default Serious Errors Log\n 1001\n \n
true
\n \n \n \n 500\n \n \n
\n
\n \n 1/1/c1\n \n \n 1/1/c2\n \n \n 1/1/c3\n \n \n 1/1/c4\n \n \n 1/1/c5\n \n \n 1/1/c6\n \n \n 1/1/c7\n \n \n 1/1/c8\n \n \n 1/1/c9\n \n \n 1/1/c10\n \n \n 1/1/c11\n \n \n 1/1/c12\n \n \n sros-test\n \n enable\n \n \n true\n \n \n enable\n \n \n \n model-driven\n \n enable\n true\n \n \n false\n true\n \n \n 9216\n \n enable\n \n \n \n \n 30\n \n \n \n 30\n \n \n \n \n \n \n administrative\n permit-all\n \n \n true\n true\n \n \n \n 10\n permit\n configure system security\n \n \n 20\n permit\n show system security\n \n \n 30\n permit\n tools perform security\n \n \n 40\n permit\n tools dump security\n \n \n 50\n permit\n admin system security\n \n \n 100\n deny\n configure li\n \n \n 110\n deny\n show li\n \n \n 111\n deny\n clear li\n \n \n 112\n deny\n tools dump li\n \n \n \n default\n \n 10\n permit\n exec\n \n \n 20\n permit\n exit\n \n \n 30\n permit\n help\n \n \n 40\n permit\n logout\n \n \n 50\n permit\n password\n \n \n 60\n deny\n show config\n \n \n 65\n deny\n show li\n \n \n 66\n deny\n clear li\n \n \n 67\n deny\n tools dump li\n \n \n 68\n deny\n state li\n \n \n 70\n permit\n show\n \n \n 75\n permit\n state\n \n \n 80\n permit\n enable-admin\n \n \n 90\n permit\n enable\n \n \n 100\n deny\n configure li\n \n \n \n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n 210\n des\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n \n \n admin\n $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6\n \n true\n true\n true\n true\n true\n \n \n administrative\n \n \n \n vrnetlab\n $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm\n \n true\n true\n \n \n administrative\n default\n \n \n \n \n \n \n
\n", + "startup": "\n \n 1\n iom-1\n \n 1\n me12-100gb-qsfp28\n \n \n 2\n \n \n 1\n \n \n \n \n 1001\n \n 10\n Collect only events of major severity or higher\n forward\n \n \n major\n \n \n \n \n \n 99\n Default System Log\n \n
true
\n \n \n \n 500\n \n \n
\n \n 100\n Default Serious Errors Log\n 1001\n \n
true
\n \n \n \n 500\n \n \n
\n
\n \n 1/1/c1\n \n \n 1/1/c2\n \n \n 1/1/c3\n \n \n 1/1/c4\n \n \n 1/1/c5\n \n \n 1/1/c6\n \n \n 1/1/c7\n \n \n 1/1/c8\n \n \n 1/1/c9\n \n \n 1/1/c10\n \n \n 1/1/c11\n \n \n 1/1/c12\n \n \n sros-test\n \n enable\n \n \n true\n \n \n enable\n \n \n \n model-driven\n \n enable\n true\n \n \n false\n true\n \n \n 9216\n \n enable\n \n \n \n \n 30\n \n \n \n 30\n \n \n \n \n \n \n administrative\n permit-all\n \n \n true\n true\n \n \n \n 10\n permit\n configure system security\n \n \n 20\n permit\n show system security\n \n \n 30\n permit\n tools perform security\n \n \n 40\n permit\n tools dump security\n \n \n 50\n permit\n admin system security\n \n \n 100\n deny\n configure li\n \n \n 110\n deny\n show li\n \n \n 111\n deny\n clear li\n \n \n 112\n deny\n tools dump li\n \n \n \n default\n \n 10\n permit\n exec\n \n \n 20\n permit\n exit\n \n \n 30\n permit\n help\n \n \n 40\n permit\n logout\n \n \n 50\n permit\n password\n \n \n 60\n deny\n show config\n \n \n 65\n deny\n show li\n \n \n 66\n deny\n clear li\n \n \n 67\n deny\n tools dump li\n \n \n 68\n deny\n state li\n \n \n 70\n permit\n show\n \n \n 75\n permit\n state\n \n \n 80\n permit\n enable-admin\n \n \n 90\n permit\n enable\n \n \n 100\n deny\n configure li\n \n \n \n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n 3des\n \n \n 205\n blowfish\n \n \n 210\n des\n \n \n \n \n 190\n aes256-ctr\n \n \n 192\n aes192-ctr\n \n \n 194\n aes128-ctr\n \n \n 200\n aes128-cbc\n \n \n 205\n 3des-cbc\n \n \n 210\n blowfish-cbc\n \n \n 215\n cast128-cbc\n \n \n 220\n arcfour\n \n \n 225\n aes192-cbc\n \n \n 230\n aes256-cbc\n \n \n 235\n rijndael-cbc\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n 200\n hmac-sha2-512\n \n \n 210\n hmac-sha2-256\n \n \n 215\n hmac-sha1\n \n \n 220\n hmac-sha1-96\n \n \n 225\n hmac-md5\n \n \n 230\n hmac-ripemd160\n \n \n 235\n hmac-ripemd160-openssh-com\n \n \n 240\n hmac-md5-96\n \n \n \n \n \n \n admin\n $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6\n \n true\n true\n true\n true\n true\n \n \n administrative\n \n \n \n vrnetlab\n $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm\n \n true\n true\n \n \n administrative\n default\n \n \n \n \n \n \n
\n"} \ No newline at end of file diff --git a/test/unit/mocked_data/test_get_config_sanitized/normal/get_config_candidate.xml b/test/unit/mocked_data/test_get_config_sanitized/normal/get_config_candidate.xml new file mode 100644 index 0000000..6cece67 --- /dev/null +++ b/test/unit/mocked_data/test_get_config_sanitized/normal/get_config_candidate.xml @@ -0,0 +1,487 @@ + + + + 1 + iom-1 + + 1 + me12-100gb-qsfp28 + + + 2 + + + 1 + + + + + 1001 + + 10 + Collect only events of major severity or higher + forward + + + major + + + + + + 99 + Default System Log + +
true
+ + + + 500 + + +
+ + 100 + Default Serious Errors Log + 1001 + +
true
+ + + + 500 + + +
+
+ + 1/1/c1 + + + 1/1/c2 + + + 1/1/c3 + + + 1/1/c4 + + + 1/1/c5 + + + 1/1/c6 + + + 1/1/c7 + + + 1/1/c8 + + + 1/1/c9 + + + 1/1/c10 + + + 1/1/c11 + + + 1/1/c12 + + + sros-test + + enable + + + true + + + enable + + + + model-driven + + enable + true + + + false + true + + + 9216 + + enable + + + + + 30 + + + + 30 + + + + + + + administrative + permit-all + + + true + true + + + + 10 + permit + configure system security + + + 20 + permit + show system security + + + 30 + permit + tools perform security + + + 40 + permit + tools dump security + + + 50 + permit + admin system security + + + 100 + deny + configure li + + + 110 + deny + show li + + + 111 + deny + clear li + + + 112 + deny + tools dump li + + + + default + + 10 + permit + exec + + + 20 + permit + exit + + + 30 + permit + help + + + 40 + permit + logout + + + 50 + permit + password + + + 60 + deny + show config + + + 65 + deny + show li + + + 66 + deny + clear li + + + 67 + deny + tools dump li + + + 68 + deny + state li + + + 70 + permit + show + + + 75 + permit + state + + + 80 + permit + enable-admin + + + 90 + permit + enable + + + 100 + deny + configure li + + + + + + + + 200 + 3des + + + 205 + blowfish + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + 3des + + + 205 + blowfish + + + 210 + des + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + + + admin + $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6 + + true + true + true + true + true + + + administrative + + + + vrnetlab + $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm + + true + true + + + administrative + default + + + + + + +
+
diff --git a/test/unit/mocked_data/test_get_config_sanitized/normal/get_config_running.xml b/test/unit/mocked_data/test_get_config_sanitized/normal/get_config_running.xml new file mode 100644 index 0000000..6cece67 --- /dev/null +++ b/test/unit/mocked_data/test_get_config_sanitized/normal/get_config_running.xml @@ -0,0 +1,487 @@ + + + + 1 + iom-1 + + 1 + me12-100gb-qsfp28 + + + 2 + + + 1 + + + + + 1001 + + 10 + Collect only events of major severity or higher + forward + + + major + + + + + + 99 + Default System Log + +
true
+ + + + 500 + + +
+ + 100 + Default Serious Errors Log + 1001 + +
true
+ + + + 500 + + +
+
+ + 1/1/c1 + + + 1/1/c2 + + + 1/1/c3 + + + 1/1/c4 + + + 1/1/c5 + + + 1/1/c6 + + + 1/1/c7 + + + 1/1/c8 + + + 1/1/c9 + + + 1/1/c10 + + + 1/1/c11 + + + 1/1/c12 + + + sros-test + + enable + + + true + + + enable + + + + model-driven + + enable + true + + + false + true + + + 9216 + + enable + + + + + 30 + + + + 30 + + + + + + + administrative + permit-all + + + true + true + + + + 10 + permit + configure system security + + + 20 + permit + show system security + + + 30 + permit + tools perform security + + + 40 + permit + tools dump security + + + 50 + permit + admin system security + + + 100 + deny + configure li + + + 110 + deny + show li + + + 111 + deny + clear li + + + 112 + deny + tools dump li + + + + default + + 10 + permit + exec + + + 20 + permit + exit + + + 30 + permit + help + + + 40 + permit + logout + + + 50 + permit + password + + + 60 + deny + show config + + + 65 + deny + show li + + + 66 + deny + clear li + + + 67 + deny + tools dump li + + + 68 + deny + state li + + + 70 + permit + show + + + 75 + permit + state + + + 80 + permit + enable-admin + + + 90 + permit + enable + + + 100 + deny + configure li + + + + + + + + 200 + 3des + + + 205 + blowfish + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + 3des + + + 205 + blowfish + + + 210 + des + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + + + admin + $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6 + + true + true + true + true + true + + + administrative + + + + vrnetlab + $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm + + true + true + + + administrative + default + + + + + + +
+
diff --git a/test/unit/mocked_data/test_get_config_sanitized/normal/get_config_startup.xml b/test/unit/mocked_data/test_get_config_sanitized/normal/get_config_startup.xml new file mode 100644 index 0000000..6cece67 --- /dev/null +++ b/test/unit/mocked_data/test_get_config_sanitized/normal/get_config_startup.xml @@ -0,0 +1,487 @@ + + + + 1 + iom-1 + + 1 + me12-100gb-qsfp28 + + + 2 + + + 1 + + + + + 1001 + + 10 + Collect only events of major severity or higher + forward + + + major + + + + + + 99 + Default System Log + +
true
+ + + + 500 + + +
+ + 100 + Default Serious Errors Log + 1001 + +
true
+ + + + 500 + + +
+
+ + 1/1/c1 + + + 1/1/c2 + + + 1/1/c3 + + + 1/1/c4 + + + 1/1/c5 + + + 1/1/c6 + + + 1/1/c7 + + + 1/1/c8 + + + 1/1/c9 + + + 1/1/c10 + + + 1/1/c11 + + + 1/1/c12 + + + sros-test + + enable + + + true + + + enable + + + + model-driven + + enable + true + + + false + true + + + 9216 + + enable + + + + + 30 + + + + 30 + + + + + + + administrative + permit-all + + + true + true + + + + 10 + permit + configure system security + + + 20 + permit + show system security + + + 30 + permit + tools perform security + + + 40 + permit + tools dump security + + + 50 + permit + admin system security + + + 100 + deny + configure li + + + 110 + deny + show li + + + 111 + deny + clear li + + + 112 + deny + tools dump li + + + + default + + 10 + permit + exec + + + 20 + permit + exit + + + 30 + permit + help + + + 40 + permit + logout + + + 50 + permit + password + + + 60 + deny + show config + + + 65 + deny + show li + + + 66 + deny + clear li + + + 67 + deny + tools dump li + + + 68 + deny + state li + + + 70 + permit + show + + + 75 + permit + state + + + 80 + permit + enable-admin + + + 90 + permit + enable + + + 100 + deny + configure li + + + + + + + + 200 + 3des + + + 205 + blowfish + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + 3des + + + 205 + blowfish + + + 210 + des + + + + + 190 + aes256-ctr + + + 192 + aes192-ctr + + + 194 + aes128-ctr + + + 200 + aes128-cbc + + + 205 + 3des-cbc + + + 210 + blowfish-cbc + + + 215 + cast128-cbc + + + 220 + arcfour + + + 225 + aes192-cbc + + + 230 + aes256-cbc + + + 235 + rijndael-cbc + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + 200 + hmac-sha2-512 + + + 210 + hmac-sha2-256 + + + 215 + hmac-sha1 + + + 220 + hmac-sha1-96 + + + 225 + hmac-md5 + + + 230 + hmac-ripemd160 + + + 235 + hmac-ripemd160-openssh-com + + + 240 + hmac-md5-96 + + + + + + + admin + $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6 + + true + true + true + true + true + + + administrative + + + + vrnetlab + $2y$10$zRgRY2H2fQGwkBkOkD5cc.42/VUMei3AvX.VyrWiHhaq.oA3jPPXm + + true + true + + + administrative + default + + + + + + +
+
diff --git a/test/unit/mocked_data/test_get_environment/normal/expected_result.json b/test/unit/mocked_data/test_get_environment/normal/expected_result.json index 597dead..4c90f28 100644 --- a/test/unit/mocked_data/test_get_environment/normal/expected_result.json +++ b/test/unit/mocked_data/test_get_environment/normal/expected_result.json @@ -42,7 +42,7 @@ } }, "memory": { - "available_ram": 29158801408, + "available_ram": 33015245200, "used_ram": 3856443792 }, "cpu": { diff --git a/test/unit/mocked_data/test_get_interfaces/normal/expected_result.json b/test/unit/mocked_data/test_get_interfaces/normal/expected_result.json index e7b4873..565f04b 100644 --- a/test/unit/mocked_data/test_get_interfaces/normal/expected_result.json +++ b/test/unit/mocked_data/test_get_interfaces/normal/expected_result.json @@ -11,7 +11,7 @@ "system": { "mac_address": "a4:92:cb:aa:0e:69", "is_up": true, - "last_flapped": 1586818407.0, + "last_flapped": 1586793207.0, "mtu": 1500, "description": "", "is_enabled": true, diff --git a/test/unit/mocked_data/test_get_network_instances/normal/expected_result.json b/test/unit/mocked_data/test_get_network_instances/normal/expected_result.json index 83c4df2..0b12d86 100644 --- a/test/unit/mocked_data/test_get_network_instances/normal/expected_result.json +++ b/test/unit/mocked_data/test_get_network_instances/normal/expected_result.json @@ -12,6 +12,16 @@ } } }, + "100": { + "type": "VPLS", + "name": "100", + "state": { + "route_distinguisher": "" + }, + "interfaces": { + "interface": {} + } + }, "2100": { "type": "L3VRF", "name": "2100", diff --git a/test/unit/sros/mock_data/.placeholder b/test/unit/sros/mock_data/.placeholder deleted file mode 100644 index e69de29..0000000 diff --git a/test/unit/sros/mock_data/admin_show_configuration___no-more.txt b/test/unit/sros/mock_data/admin_show_configuration___no-more.txt deleted file mode 100644 index da88f26..0000000 --- a/test/unit/sros/mock_data/admin_show_configuration___no-more.txt +++ /dev/null @@ -1,596 +0,0 @@ -configure { - card 1 { - card-type iom-v - mda 1 { - mda-type m20-v - } - } - log { - filter 1001 { - entry 10 { - description "Collect only events of major severity or higher" - action forward - match { - severity { - gte major - } - } - } - } - log-id 50 { - admin-state enable - source { - debug true - } - destination { - console - } - } - log-id 99 { - description "Default System Log" - source { - main true - } - destination { - memory { - max-entries 500 - } - } - } - log-id 100 { - description "Default Serious Errors Log" - filter 1001 - source { - main true - } - destination { - memory { - max-entries 500 - } - } - } - log-id 101 { - destination { - netconf { - } - } - } - } - multicast-management { - chassis-level { - per-mcast-plane-capacity { - total-capacity dynamic - mcast-capacity { - primary-percentage 87.5 - secondary-percentage 87.5 - } - redundant-mcast-capacity { - primary-percentage 87.5 - secondary-percentage 87.5 - } - } - } - } - port 1/1/1 { - admin-state enable - } - port 1/1/2 { - admin-state enable - description "port 1/1/c1/1" - } - router "Base" { - interface "system" { - ipv4 { - primary { - address 192.168.0.1 - prefix-length 32 - } - } - } - interface "toR2" { - admin-state enable - port 1/1/1 - ipv4 { - primary { - address 10.0.12.1 - prefix-length 24 - } - } - } - ospf 0 { - admin-state enable - area 0.0.0.0 { - interface "system" { - admin-state enable - } - interface "toR2" { - admin-state enable - interface-type point-to-point - } - } - } - } - service { - vprn "napalm" { - admin-state enable - service-id 432 - customer "1" - autonomous-system 65432 - route-distinguisher "65501:12" - bgp { - admin-state enable - } - } - } - system { - name "vSR-AUTO-01" - management-interface { - configuration-mode model-driven - cli { - md-cli { - auto-config-save true - } - } - netconf { - admin-state enable - auto-config-save true - capabilities { - writable-running false - } - } - yang-modules { - base-r13-modules false - nokia-modules false - nokia-combined-modules true - } - } - login-control { - idle-timeout 30 - } - security { - ftp-server true - aaa { - local-profiles { - profile "Level-1" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "Level-2" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "Level-3" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "Level-4" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "Level-5" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "Level-6" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "Level-7" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "administrative" { - default-action permit-all - netconf { - base-op-authorization { - kill-session true - lock true - } - } - entry 10 { - action permit - match "configure system security" - } - entry 20 { - action permit - match "show system security" - } - entry 30 { - action permit - match "tools perform security" - } - entry 40 { - action permit - match "tools dump security" - } - entry 50 { - action permit - match "admin system security" - } - entry 100 { - action deny - match "configure li" - } - entry 110 { - action deny - match "show li" - } - entry 111 { - action deny - match "clear li" - } - entry 112 { - action deny - match "tools dump li" - } - } - profile "default" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - entry 50 { - action permit - match "password" - } - entry 60 { - action deny - match "show config" - } - entry 65 { - action deny - match "show li" - } - entry 66 { - action deny - match "clear li" - } - entry 67 { - action deny - match "tools dump li" - } - entry 70 { - action permit - match "show" - } - entry 80 { - action permit - match "enable-admin" - } - entry 100 { - action deny - match "configure li" - } - } - } - } - ssh { - server-cipher-list-v1 { - cipher 200 { - name 3des - } - cipher 205 { - name blowfish - } - } - server-cipher-list-v2 { - cipher 190 { - name aes256-ctr - } - cipher 192 { - name aes192-ctr - } - cipher 194 { - name aes128-ctr - } - cipher 200 { - name aes128-cbc - } - cipher 205 { - name 3des-cbc - } - cipher 210 { - name blowfish-cbc - } - cipher 215 { - name cast128-cbc - } - cipher 220 { - name arcfour - } - cipher 225 { - name aes192-cbc - } - cipher 230 { - name aes256-cbc - } - cipher 235 { - name rijndael-cbc - } - } - client-cipher-list-v1 { - cipher 200 { - name 3des - } - cipher 205 { - name blowfish - } - cipher 210 { - name des - } - } - client-cipher-list-v2 { - cipher 190 { - name aes256-ctr - } - cipher 192 { - name aes192-ctr - } - cipher 194 { - name aes128-ctr - } - cipher 200 { - name aes128-cbc - } - cipher 205 { - name 3des-cbc - } - cipher 210 { - name blowfish-cbc - } - cipher 215 { - name cast128-cbc - } - cipher 220 { - name arcfour - } - cipher 225 { - name aes192-cbc - } - cipher 230 { - name aes256-cbc - } - cipher 235 { - name rijndael-cbc - } - } - server-mac-list-v2 { - mac 200 { - name hmac-sha2-512 - } - mac 210 { - name hmac-sha2-256 - } - mac 215 { - name hmac-sha1 - } - mac 220 { - name hmac-sha1-96 - } - mac 225 { - name hmac-md5 - } - mac 230 { - name hmac-ripemd160 - } - mac 235 { - name hmac-ripemd160-openssh-com - } - mac 240 { - name hmac-md5-96 - } - } - client-mac-list-v2 { - mac 200 { - name hmac-sha2-512 - } - mac 210 { - name hmac-sha2-256 - } - mac 215 { - name hmac-sha1 - } - mac 220 { - name hmac-sha1-96 - } - mac 225 { - name hmac-md5 - } - mac 230 { - name hmac-ripemd160 - } - mac 235 { - name hmac-ripemd160-openssh-com - } - mac 240 { - name hmac-md5-96 - } - } - } - user-params { - local-user { - user "admin" { - password "$2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6" - access { - console true - netconf true - grpc true - } - console { - member ["administrative"] - } - } - user "linux" { - password "$2y$10$xkqn46jNHBUJWit446j2o.Yu3E9zWOg44yRGjRK2YjRZE4p5xFjmG" - access { - console true - } - console { - member ["default"] - } - } - user "netconf" { - password "$2y$10$.pTeMylttsq5ZMOnGDaag.uebq7NpYKo9Cgwi/O5covuBNyvSDHSW" - access { - console true - netconf true - } - console { - member ["administrative"] - } - } - user "ubuntu" { - password "$2y$10$/VLdxC3N0KZcmfdsivx6o.CjuELMgByxGrx79y9MQlLLXpS2QI/7i" - access { - console true - } - console { - member ["administrative"] - } - public-keys { - rsa { - rsa-key 1 { - key-value "AAAAB3NzaC1yc2EAAAADAQABAAABAQDH4eHQGPa9IGfJzp0O+czMlOE8jEVM/R65eOwIQRZutzfKY5BrAlZbiaY0WBJhQ5TP68KuKKWJyQoiSPJfy3/QyDkh5ONgc6xNgO6cltBasHFRTo45aK2zCbubaEB+SgBcAEh0tJ0zIZ84xkuVQYk6UDPQTE4cXu93u9uPaEZcYZYdyiP3Couxj8kF+4L8JF4ScuPqpZ2aCDW2JjDP++Dj7iuuhIJXdw/zHX8PKFFQq7qydmsiKKoV4nXEFcUYp5AtKWEphMz6blMrV/6CXotbINWSTsLiWppq1ZQ8iz7oWR3elHJZnTVUGOk5jwn2toi4sqSLuIYGJOlW9JfpKxvz" - } - } - } - } - user "user-7" { - password "$2y$10$vYx34MIaB2KOgxGH1LXP..W8Gxa6B3tLhQIiKFMtyCtgTmZxotkuW" - access { - console true - } - console { - member ["Level-7"] - } - } - } - } - } - } -} - -persistent-indices { - description "Persistent system indices are loaded at boot time and cannot be modified." - vrtr-id { - router-name "napalm" vrtr-id 2 - } - vrtr-if-id { - router-name "Base" interface-name "toR2" vrtr-id 1 if-index 6 - } -} - -# Finished MON JUL 06 23:25:17 2020 UTC - -[] -A:netconf@vSR-AUTO-01# \ No newline at end of file diff --git a/test/unit/sros/mock_data/configure_global.txt b/test/unit/sros/mock_data/configure_global.txt deleted file mode 100644 index 68bf418..0000000 --- a/test/unit/sros/mock_data/configure_global.txt +++ /dev/null @@ -1,6 +0,0 @@ -[] -A:netconf@vSR-AUTO-01# configure global -INFO: CLI #2054: Entering global configuration mode - -[gl:configure] -A:netconf@vSR-AUTO-01# \ No newline at end of file diff --git a/test/unit/sros/mock_data/environment_more_false.txt b/test/unit/sros/mock_data/environment_more_false.txt deleted file mode 100644 index 5491a9b..0000000 --- a/test/unit/sros/mock_data/environment_more_false.txt +++ /dev/null @@ -1,5 +0,0 @@ -[] -A:netconf@nokia01.sfo07# environment more false - -[] -A:netconf@nokia01.sfo07# \ No newline at end of file diff --git a/test/unit/sros/mock_data/environment_progress-indicator_admin-state_disable.txt b/test/unit/sros/mock_data/environment_progress-indicator_admin-state_disable.txt deleted file mode 100644 index bddb04f..0000000 --- a/test/unit/sros/mock_data/environment_progress-indicator_admin-state_disable.txt +++ /dev/null @@ -1,5 +0,0 @@ -[] -A:netconf@nokia01.sfo07# environment progress-indicator admin-state disable - -[] -A:netconf@nokia01.sfo07# \ No newline at end of file diff --git a/test/unit/sros/mock_data/get_arp_table.txt b/test/unit/sros/mock_data/get_arp_table.txt deleted file mode 100644 index d3dac53..0000000 --- a/test/unit/sros/mock_data/get_arp_table.txt +++ /dev/null @@ -1,40 +0,0 @@ - - - - management - - management - - - - 10.10.10.1 - up - 00:00:5e:00:01:2a - dynamic - 613 - - - 10.10.10.2 - up - 00:e0:b1:83:32:98 - dynamic - 1199 - - - - - - - - 2100 - - to_VPLS-2000 - - - - - - - - - diff --git a/test/unit/sros/mock_data/get_arp_table_with_vrf.txt b/test/unit/sros/mock_data/get_arp_table_with_vrf.txt deleted file mode 100644 index a4d0901..0000000 --- a/test/unit/sros/mock_data/get_arp_table_with_vrf.txt +++ /dev/null @@ -1,28 +0,0 @@ - - - - Management - - management - - - - 138.120.180.1 - up - 00:00:5e:00:01:2a - dynamic - 613 - - - 138.120.180.2 - up - 00:e0:b1:83:32:98 - dynamic - 1199 - - - - - - - diff --git a/test/unit/sros/mock_data/get_bgp_config.txt b/test/unit/sros/mock_data/get_bgp_config.txt deleted file mode 100644 index 0d84c0f..0000000 --- a/test/unit/sros/mock_data/get_bgp_config.txt +++ /dev/null @@ -1,36 +0,0 @@ - - - - Base - 65000 - - - eBGP-Peers - external - - eBGP-import - - - - iBGP-Peers - internal - - 10.1.1.1 - - - add-comm-ibgp - - - - 1.1.0.1 - eBGP-Peers - 65101 - - - 2.1.0.1 - iBGP-Peers - - - - - diff --git a/test/unit/sros/mock_data/get_bgp_neighbors.txt b/test/unit/sros/mock_data/get_bgp_neighbors.txt deleted file mode 100644 index 53181c2..0000000 --- a/test/unit/sros/mock_data/get_bgp_neighbors.txt +++ /dev/null @@ -1,56 +0,0 @@ - - - - Base - 65000 - - - 1.1.0.1 - enable - 65101 - - - - - - - - - - - Base - 1.1.1.1 - - - 1.1.0.1 - - Connect - 0.0.0.0 - 2020-06-22T01:47:35.0Z - - - 0 - 0 - 0 - - - 0 - 0 - 0 - - - - - - - - - 2100 - 1.1.1.1 - - - - 2020-07-05T23:04:31.4Z - - - diff --git a/test/unit/sros/mock_data/get_bgp_neighbors_detail.txt b/test/unit/sros/mock_data/get_bgp_neighbors_detail.txt deleted file mode 100644 index 2ff9304..0000000 --- a/test/unit/sros/mock_data/get_bgp_neighbors_detail.txt +++ /dev/null @@ -1,75 +0,0 @@ - - - - Base - 65000 - - - 1.1.0.1 - 65101 - - 0 - - - true - - - - - - - 2100 - - - - - - Base - 1.1.1.1 - - - 1.1.0.1 - - 179 - 50171 - Connect - Active - openFail - 0.0.0.0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - - - - 0 - 28827 - 0 - - - 0 - 0 - - - - - - - - 2100 - 1.1.1.1 - - - - diff --git a/test/unit/sros/mock_data/get_config_candidate.txt b/test/unit/sros/mock_data/get_config_candidate.txt deleted file mode 100644 index 84e90df..0000000 --- a/test/unit/sros/mock_data/get_config_candidate.txt +++ /dev/null @@ -1,1198 +0,0 @@ - - - - 1 - xcm-1s - - 1 - s36-400gb-qsfpdd - he3600g - - - 1 - - - disable - - - - - 2 - - - disable - - - - - 3 - - - disable - - - - - 4 - - - disable - - - - - - enable - - 1 - 10000 - - - 2a06:98c0:3600::85 - 4739 - enable - Base - 10 - - - - router - 1 - - 1 - ps-a4-shelf-dc - - 1 - ps-a-dc-6000 - - - 2 - ps-a-dc-6000 - - - 3 - ps-a-dc-6000 - - - 4 - ps-a-dc-6000 - - - - - - - md_cli_io - true - - - cli_user_io - true - - - - - md_cli_io - enable - - - - 10 - default-log-messages - 10 - 24 - - - 40 - commands - 10 - 40 - - - 10 - drop - - 10 - forward - - - port - - - - - 20 - forward - - - chassis - - - - - 30 - forward - - - system - - - - - 40 - forward - - - user - - - - - - 20 - drop - - 10 - forward - - - user - - - - - - 1001 - - 10 - Collect only events of major severity or higher - forward - - - major - - - - - - 10 - -default-log-messages - 10 - -
true
- true - true - - - 1 - -
- - 11 - default-log-messages_local_store - 10 - -
true
- - - 10 - -
- - 20 - enable - messages - - - - - - - 30 - messages-archive - - 2 - - - - 40 - commnds - 20 - - true - - - 1 - - - - 41 - commands_local_store - 20 - - true - - - 40 - - - - 99 - Default System Log - -
true
- - - - 500 - - -
- - 100 - Default Serious Errors Log - 1001 - -
true
- - - - 500 - - -
- - 101 - - - - - - - 1 -
192.168.249.50
- local2 -
- - 2 -
192.168.249.50
- local2 - notice -
- - 3 -
192.168.249.50
- local2 - emergency -
-
- - - COMM-000001 - - 1:9999 - - - - - 1/1/c1 - enable - - c1-100g - - - - 1/1/c1/1 - enable - - hybrid - - true - - - - - 1/1/c2 - enable - - c1-100g - - - - 1/1/c2/1 - enable - This a replace test - - hybrid - - true - - - - - 1/1/c4 - enable - - c1-100g - - - - 1/1/c4/1 - enable - - access - cl91-514-528 - - - - 1/1/c5 - enable - - c1-100g - - - - 1/1/c5/1 - enable - - hybrid - cl91-514-528 - - true - - - - - 1/1/c6 - enable - - c1-100g - - - - 1/1/c6/1 - enable - - hybrid - cl91-514-528 - - true - - - - - 1/1/c7 - enable - - c1-100g - - - - 1/1/c7/1 - enable - - access - cl91-514-528 - - - - 1/1/c8 - enable - - c1-100g - - - - 1/1/c8/1 - enable - - access - cl91-514-528 - - - - 1/1/c9 - enable - - c1-100g - - - - 1/1/c9/1 - enable - - hybrid - cl91-514-528 - - - - 1/1/c10 - enable - - c1-100g - - - - 1/1/c10/1 - enable - - hybrid - - - - 1/1/c11 - enable - - c1-100g - - - - 1/1/c11/1 - Description - - access - - - - 1/1/c12 - - c10-10g - - - - 1/1/c13 - enable - - c1-100g - - - - 1/1/c13/1 - enable - - access - cl91-514-528 - - - - 1/1/c14 - enable - - c1-100g - - - - 1/1/c14/1 - enable - - access - cl91-514-528 - - - - 1/1/c15 - enable - - c1-100g - - - - 1/1/c15/1 - enable - - access - cl91-514-528 - - - - 1/1/c16 - enable - - c1-100g - - - - 1/1/c16/1 - enable - - access - - - - 1/1/c17 - enable - - - 1/1/c36 - enable - - c4-10g - - - - 1/1/c36/1 - enable - - - - nearest-bridge - true - true - true - - true - true - true - true - - - - - - - 1/1/c36/2 - enable - - - 1/1/c36/3 - enable - - - 1/1/c36/4 - enable - - - - 100 - - be - 10 - - - 10 - - max - - - - - 150 - - be - 1 - - - 1 - 15625000 - - 27500000 - - - - - SERVICE-POLICER-INGRESS-EMEA-IPERF-5G - 98 - - 1 - - 5G-RATE - 20 - - - - 11 - true - - 5G-RATE - 80 - - - - be - 1 - - - - 200 - - be - 2 - - - 2 - 15625000 - - 27500000 - - - - - SERVICE-POLICER-EGRESS-EMEA-IPERF-5G - 100 - - be - 1 - - - 1 - - 5G-RATE - 20 - - - - - SERVICE-SCHEDULER-INGRESS-5G - - 1 - - 2 - - - 3 - - - 4 - - - 5 - - - 5G-RATE - - 5250000 - 5250000 - - - - 6 - - - - - - Base - - to_RTR-1 - - -
10.0.1.1
- 24 -
-
-
- - to_RTR-2 - - -
10.0.2.1
- 24 -
-
-
- - to_RTR-3 - - -
10.0.3.1
- 24 -
-
-
- - to_RTR-4 - - -
10.0.4.1
- 24 -
-
-
-
- - - TiMOS CLI - MYPROBE - enable - - - 62.115.50.51 - 15 - 198.41.132.35 - 3 - - - - - - nokia01.sfo07 - - enable - - - - model-driven - - md-cli - classic-cli - - true - - - - enable - 830 - true - - false - - - - false - false - true - - - disable - - - - SAS-MXP-10.0R10 - 7210-SAS-Sx-Release-10.0R10-Images - cf3:\7210-SAS-MXP-10.0R10 - - - 30 - - - 60 - true - - Access restricted to LINX for napalam! - - - - true - true - - - - 5 - - - - 1 -
192.168.1.50
- 48 - jGl25bVBBBW96Qi9Te4V35u0Eg/M hash2 -
- - 2 -
192.68.1.17
- 48 - jGl25bVBBBW96Qi9Te4V3wRxg6Oi hash2 -
-
-
- - - administrative - permit-all - - - true - true - - - - 10 - permit - configure system security - - - 20 - permit - show system security - - - 30 - permit - tools perform security - - - 40 - permit - tools dump security - - - 50 - permit - admin system security - - - 100 - deny - configure li - - - 110 - deny - show li - - - 111 - deny - clear li - - - 112 - deny - tools dump li - - - - class-automation-ro - permit-all - - 10 - deny - commit - - - - class-automation-rw - permit-all - - - class-engineer - permit-all - - - class-rancid - deny-all - - 10 - permit - admin show configuration - - - 20 - permit - show - - - - default - - 10 - permit - exec - - - 20 - permit - exit - - - 30 - permit - help - - - 40 - permit - logout - - - 50 - permit - password - - - 60 - deny - show config - - - 65 - deny - show li - - - 66 - deny - clear li - - - 67 - deny - tools dump li - - - 70 - permit - show - - - 80 - permit - enable-admin - - - 90 - - - 100 - deny - configure li - - - - - tacplus-default - - true - - -
- - - t6/LPkztudutkSkE2LRfZFgXVpppJU1B hash2 - r - v2c - - - cV3ISTw2V5pbEWmVEA9jXgB/1EERXQA= hash2 - rwa - both - snmp-acc - - - 76HzdddhlPpRo1Vql+ZB5spLqccgYQ== hash2 - r - both - - - snmp-acc - - - - - - 200 - 3des - - - 205 - blowfish - - - - - 190 - aes256-ctr - - - 192 - aes192-ctr - - - 194 - aes128-ctr - - - 200 - aes128-cbc - - - 205 - 3des-cbc - - - 210 - blowfish-cbc - - - 215 - cast128-cbc - - - 220 - arcfour - - - 225 - aes192-cbc - - - 230 - aes256-cbc - - - 235 - rijndael-cbc - - - - - 200 - 3des - - - 205 - blowfish - - - 210 - des - - - - - 190 - aes256-ctr - - - 192 - aes192-ctr - - - 194 - aes128-ctr - - - 200 - aes128-cbc - - - 205 - 3des-cbc - - - 210 - blowfish-cbc - - - 215 - cast128-cbc - - - 220 - arcfour - - - 225 - aes192-cbc - - - 230 - aes256-cbc - - - 235 - rijndael-cbc - - - - - 200 - hmac-sha2-512 - - - 210 - hmac-sha2-256 - - - 215 - hmac-sha1 - - - 220 - hmac-sha1-96 - - - 225 - hmac-md5 - - - 230 - hmac-ripemd160 - - - 235 - hmac-ripemd160-openssh-com - - - 240 - hmac-md5-96 - - - - - 200 - hmac-sha2-512 - - - 210 - hmac-sha2-256 - - - 215 - hmac-sha1 - - - 220 - hmac-sha1-96 - - - 225 - hmac-md5 - - - 230 - hmac-ripemd160 - - - 235 - hmac-ripemd160-openssh-com - - - 240 - hmac-md5-96 - - - - - - local - - - - admin - $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6 - - true - true - true - - - administrative - - - - netconf123 - $2y$10$.pTeMylttsq5ZMOnGDaag.uebq7NpYKo9Cgwi/O5covuBNyvSDHSW - - true - true - - - administrative - - - - -
-
-
-
diff --git a/test/unit/sros/mock_data/get_config_running.txt b/test/unit/sros/mock_data/get_config_running.txt deleted file mode 100644 index 84e90df..0000000 --- a/test/unit/sros/mock_data/get_config_running.txt +++ /dev/null @@ -1,1198 +0,0 @@ - - - - 1 - xcm-1s - - 1 - s36-400gb-qsfpdd - he3600g - - - 1 - - - disable - - - - - 2 - - - disable - - - - - 3 - - - disable - - - - - 4 - - - disable - - - - - - enable - - 1 - 10000 - - - 2a06:98c0:3600::85 - 4739 - enable - Base - 10 - - - - router - 1 - - 1 - ps-a4-shelf-dc - - 1 - ps-a-dc-6000 - - - 2 - ps-a-dc-6000 - - - 3 - ps-a-dc-6000 - - - 4 - ps-a-dc-6000 - - - - - - - md_cli_io - true - - - cli_user_io - true - - - - - md_cli_io - enable - - - - 10 - default-log-messages - 10 - 24 - - - 40 - commands - 10 - 40 - - - 10 - drop - - 10 - forward - - - port - - - - - 20 - forward - - - chassis - - - - - 30 - forward - - - system - - - - - 40 - forward - - - user - - - - - - 20 - drop - - 10 - forward - - - user - - - - - - 1001 - - 10 - Collect only events of major severity or higher - forward - - - major - - - - - - 10 - -default-log-messages - 10 - -
true
- true - true - - - 1 - -
- - 11 - default-log-messages_local_store - 10 - -
true
- - - 10 - -
- - 20 - enable - messages - - - - - - - 30 - messages-archive - - 2 - - - - 40 - commnds - 20 - - true - - - 1 - - - - 41 - commands_local_store - 20 - - true - - - 40 - - - - 99 - Default System Log - -
true
- - - - 500 - - -
- - 100 - Default Serious Errors Log - 1001 - -
true
- - - - 500 - - -
- - 101 - - - - - - - 1 -
192.168.249.50
- local2 -
- - 2 -
192.168.249.50
- local2 - notice -
- - 3 -
192.168.249.50
- local2 - emergency -
-
- - - COMM-000001 - - 1:9999 - - - - - 1/1/c1 - enable - - c1-100g - - - - 1/1/c1/1 - enable - - hybrid - - true - - - - - 1/1/c2 - enable - - c1-100g - - - - 1/1/c2/1 - enable - This a replace test - - hybrid - - true - - - - - 1/1/c4 - enable - - c1-100g - - - - 1/1/c4/1 - enable - - access - cl91-514-528 - - - - 1/1/c5 - enable - - c1-100g - - - - 1/1/c5/1 - enable - - hybrid - cl91-514-528 - - true - - - - - 1/1/c6 - enable - - c1-100g - - - - 1/1/c6/1 - enable - - hybrid - cl91-514-528 - - true - - - - - 1/1/c7 - enable - - c1-100g - - - - 1/1/c7/1 - enable - - access - cl91-514-528 - - - - 1/1/c8 - enable - - c1-100g - - - - 1/1/c8/1 - enable - - access - cl91-514-528 - - - - 1/1/c9 - enable - - c1-100g - - - - 1/1/c9/1 - enable - - hybrid - cl91-514-528 - - - - 1/1/c10 - enable - - c1-100g - - - - 1/1/c10/1 - enable - - hybrid - - - - 1/1/c11 - enable - - c1-100g - - - - 1/1/c11/1 - Description - - access - - - - 1/1/c12 - - c10-10g - - - - 1/1/c13 - enable - - c1-100g - - - - 1/1/c13/1 - enable - - access - cl91-514-528 - - - - 1/1/c14 - enable - - c1-100g - - - - 1/1/c14/1 - enable - - access - cl91-514-528 - - - - 1/1/c15 - enable - - c1-100g - - - - 1/1/c15/1 - enable - - access - cl91-514-528 - - - - 1/1/c16 - enable - - c1-100g - - - - 1/1/c16/1 - enable - - access - - - - 1/1/c17 - enable - - - 1/1/c36 - enable - - c4-10g - - - - 1/1/c36/1 - enable - - - - nearest-bridge - true - true - true - - true - true - true - true - - - - - - - 1/1/c36/2 - enable - - - 1/1/c36/3 - enable - - - 1/1/c36/4 - enable - - - - 100 - - be - 10 - - - 10 - - max - - - - - 150 - - be - 1 - - - 1 - 15625000 - - 27500000 - - - - - SERVICE-POLICER-INGRESS-EMEA-IPERF-5G - 98 - - 1 - - 5G-RATE - 20 - - - - 11 - true - - 5G-RATE - 80 - - - - be - 1 - - - - 200 - - be - 2 - - - 2 - 15625000 - - 27500000 - - - - - SERVICE-POLICER-EGRESS-EMEA-IPERF-5G - 100 - - be - 1 - - - 1 - - 5G-RATE - 20 - - - - - SERVICE-SCHEDULER-INGRESS-5G - - 1 - - 2 - - - 3 - - - 4 - - - 5 - - - 5G-RATE - - 5250000 - 5250000 - - - - 6 - - - - - - Base - - to_RTR-1 - - -
10.0.1.1
- 24 -
-
-
- - to_RTR-2 - - -
10.0.2.1
- 24 -
-
-
- - to_RTR-3 - - -
10.0.3.1
- 24 -
-
-
- - to_RTR-4 - - -
10.0.4.1
- 24 -
-
-
-
- - - TiMOS CLI - MYPROBE - enable - - - 62.115.50.51 - 15 - 198.41.132.35 - 3 - - - - - - nokia01.sfo07 - - enable - - - - model-driven - - md-cli - classic-cli - - true - - - - enable - 830 - true - - false - - - - false - false - true - - - disable - - - - SAS-MXP-10.0R10 - 7210-SAS-Sx-Release-10.0R10-Images - cf3:\7210-SAS-MXP-10.0R10 - - - 30 - - - 60 - true - - Access restricted to LINX for napalam! - - - - true - true - - - - 5 - - - - 1 -
192.168.1.50
- 48 - jGl25bVBBBW96Qi9Te4V35u0Eg/M hash2 -
- - 2 -
192.68.1.17
- 48 - jGl25bVBBBW96Qi9Te4V3wRxg6Oi hash2 -
-
-
- - - administrative - permit-all - - - true - true - - - - 10 - permit - configure system security - - - 20 - permit - show system security - - - 30 - permit - tools perform security - - - 40 - permit - tools dump security - - - 50 - permit - admin system security - - - 100 - deny - configure li - - - 110 - deny - show li - - - 111 - deny - clear li - - - 112 - deny - tools dump li - - - - class-automation-ro - permit-all - - 10 - deny - commit - - - - class-automation-rw - permit-all - - - class-engineer - permit-all - - - class-rancid - deny-all - - 10 - permit - admin show configuration - - - 20 - permit - show - - - - default - - 10 - permit - exec - - - 20 - permit - exit - - - 30 - permit - help - - - 40 - permit - logout - - - 50 - permit - password - - - 60 - deny - show config - - - 65 - deny - show li - - - 66 - deny - clear li - - - 67 - deny - tools dump li - - - 70 - permit - show - - - 80 - permit - enable-admin - - - 90 - - - 100 - deny - configure li - - - - - tacplus-default - - true - - -
- - - t6/LPkztudutkSkE2LRfZFgXVpppJU1B hash2 - r - v2c - - - cV3ISTw2V5pbEWmVEA9jXgB/1EERXQA= hash2 - rwa - both - snmp-acc - - - 76HzdddhlPpRo1Vql+ZB5spLqccgYQ== hash2 - r - both - - - snmp-acc - - - - - - 200 - 3des - - - 205 - blowfish - - - - - 190 - aes256-ctr - - - 192 - aes192-ctr - - - 194 - aes128-ctr - - - 200 - aes128-cbc - - - 205 - 3des-cbc - - - 210 - blowfish-cbc - - - 215 - cast128-cbc - - - 220 - arcfour - - - 225 - aes192-cbc - - - 230 - aes256-cbc - - - 235 - rijndael-cbc - - - - - 200 - 3des - - - 205 - blowfish - - - 210 - des - - - - - 190 - aes256-ctr - - - 192 - aes192-ctr - - - 194 - aes128-ctr - - - 200 - aes128-cbc - - - 205 - 3des-cbc - - - 210 - blowfish-cbc - - - 215 - cast128-cbc - - - 220 - arcfour - - - 225 - aes192-cbc - - - 230 - aes256-cbc - - - 235 - rijndael-cbc - - - - - 200 - hmac-sha2-512 - - - 210 - hmac-sha2-256 - - - 215 - hmac-sha1 - - - 220 - hmac-sha1-96 - - - 225 - hmac-md5 - - - 230 - hmac-ripemd160 - - - 235 - hmac-ripemd160-openssh-com - - - 240 - hmac-md5-96 - - - - - 200 - hmac-sha2-512 - - - 210 - hmac-sha2-256 - - - 215 - hmac-sha1 - - - 220 - hmac-sha1-96 - - - 225 - hmac-md5 - - - 230 - hmac-ripemd160 - - - 235 - hmac-ripemd160-openssh-com - - - 240 - hmac-md5-96 - - - - - - local - - - - admin - $2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6 - - true - true - true - - - administrative - - - - netconf123 - $2y$10$.pTeMylttsq5ZMOnGDaag.uebq7NpYKo9Cgwi/O5covuBNyvSDHSW - - true - true - - - administrative - - - - -
-
-
-
diff --git a/test/unit/sros/mock_data/get_environment.txt b/test/unit/sros/mock_data/get_environment.txt deleted file mode 100644 index 074a11c..0000000 --- a/test/unit/sros/mock_data/get_environment.txt +++ /dev/null @@ -1,97 +0,0 @@ - - - - 1 - - 62 - 80 - - - 1 - - 49 - 80 - - - - - router - 1 - - 1 - - in-service - - - - 2 - - in-service - - - - 1 - - 1 - 4400 - - in-service - - - - 3 - 0 - - out-of-service - - - - 4 - 0 - - unprovisioned - - - - - - A - - 62 - 80 - - - - - 1 - - - 9.45 - - - - - 60 - - - 9.22 - - - - - 300 - - - 9.21 - - - - - - 3856443792 - 29158801408 - - - - - diff --git a/test/unit/sros/mock_data/get_facts.txt b/test/unit/sros/mock_data/get_facts.txt deleted file mode 100644 index 2f0e48a..0000000 --- a/test/unit/sros/mock_data/get_facts.txt +++ /dev/null @@ -1,50 +0,0 @@ - - - - router - 1 - - NS1921F1814 - - - - Base - - system - - - to_RTR-01 - - - to_RTR-02 - - - Test-01 - - - test-02 - - - to_IXIA - - - vlan901 - - - - management - - management - - - - nokia01.sfo07 - 7750 SR-1s - 3801916410 - - B-19.10.R4 - - - - - diff --git a/test/unit/sros/mock_data/get_interfaces.txt b/test/unit/sros/mock_data/get_interfaces.txt deleted file mode 100644 index c09a2f5..0000000 --- a/test/unit/sros/mock_data/get_interfaces.txt +++ /dev/null @@ -1,45 +0,0 @@ - - - - esat-1/1/1 - enable - 1-Gig/10-Gig Ethernet - - 9208 - - - - Base - - system - enable - - - - - - router - 1 - - a4:92:cb:aa:0e:69 - - - - esat-1/1/1 - d0:99:d5:d8:50:43 - up - - 10000 - - - - Base - - system - 1500 - up - 2020-04-13T15:53:27.0Z - - - - diff --git a/test/unit/sros/mock_data/get_interfaces_counters.txt b/test/unit/sros/mock_data/get_interfaces_counters.txt deleted file mode 100644 index 2bd092a..0000000 --- a/test/unit/sros/mock_data/get_interfaces_counters.txt +++ /dev/null @@ -1,34 +0,0 @@ - - - - esat-1/1/1 - - 0 - 0 - 26992652217760 - 161 - 0 - 17852283270 - 0 - 0 - 277514919156 - 255 - 7 - 183541701 - - - - Base - - system - - - 0 - 0 - 0 - - - - - - diff --git a/test/unit/sros/mock_data/get_interfaces_ip.txt b/test/unit/sros/mock_data/get_interfaces_ip.txt deleted file mode 100644 index 3243a22..0000000 --- a/test/unit/sros/mock_data/get_interfaces_ip.txt +++ /dev/null @@ -1,39 +0,0 @@ - - - - Base - - system - - -
1.1.1.1
- 32 -
-
-
- - vlan901 - -
- 2400:cb00:133:900::1 - 64 -
-
-
-
- - - 2100 - - to_Network - - -
172.16.1.1
- 24 -
-
-
-
-
-
-
diff --git a/test/unit/sros/mock_data/get_ipv6_neighbors_table.txt b/test/unit/sros/mock_data/get_ipv6_neighbors_table.txt deleted file mode 100644 index 5b9f911..0000000 --- a/test/unit/sros/mock_data/get_ipv6_neighbors_table.txt +++ /dev/null @@ -1,7 +0,0 @@ - - - - Base - - - diff --git a/test/unit/sros/mock_data/get_lldp_neighbors.txt b/test/unit/sros/mock_data/get_lldp_neighbors.txt deleted file mode 100644 index 5118cc1..0000000 --- a/test/unit/sros/mock_data/get_lldp_neighbors.txt +++ /dev/null @@ -1,51 +0,0 @@ - - - - esat-1/1/1 - up - - - esat-1/1/2 - down - - - 1/1/c1/1 - up - - - - nearest-bridge - - 71339 - 3 - D0:99:D5:D8:50:41 - 35700737 - 1/1/c1/1, 100-Gig Ethernet - esat-1 - - - - - - - 1/1/c5/1 - up - - - - nearest-bridge - - 70779 - 1 - D0:99:D5:D8:48:41 - 35700737 - 1/1/c1/1, 100-Gig Ethernet - esat-2 - - - - - - - - diff --git a/test/unit/sros/mock_data/get_lldp_neighbors_detail.txt b/test/unit/sros/mock_data/get_lldp_neighbors_detail.txt deleted file mode 100644 index 4efd573..0000000 --- a/test/unit/sros/mock_data/get_lldp_neighbors_detail.txt +++ /dev/null @@ -1,50 +0,0 @@ - - - - esat-1/1/1 - up - - - esat-1/1/2 - down - - - 1/1/c1/1 - up - - - - nearest-bridge - - 71339 - 3 - D0:99:D5:D8:50:41 - 35700737 - 1/1/c1/1, 100-Gig Ethernet - esat-1 - - - - - - - 1/1/c5/1 - up - - - - nearest-bridge - - 70779 - 1 - D0:99:D5:D8:48:41 - 35700737 - 1/1/c1/1, 100-Gig Ethernet - esat-2 - - - - - - - diff --git a/test/unit/sros/mock_data/get_network_instances.txt b/test/unit/sros/mock_data/get_network_instances.txt deleted file mode 100644 index 14c881a..0000000 --- a/test/unit/sros/mock_data/get_network_instances.txt +++ /dev/null @@ -1,28 +0,0 @@ - - - - Base - - system - - - to_RTR-01 - - - - - 100 - - - 2100 - 65000:2100 - - to_VPLS-2000 - - - to_Network - - - - - diff --git a/test/unit/sros/mock_data/get_ntp_peers.txt b/test/unit/sros/mock_data/get_ntp_peers.txt deleted file mode 100644 index 8f2b0d8..0000000 --- a/test/unit/sros/mock_data/get_ntp_peers.txt +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/test/unit/sros/mock_data/get_ntp_servers.txt b/test/unit/sros/mock_data/get_ntp_servers.txt deleted file mode 100644 index 7bcc6c9..0000000 --- a/test/unit/sros/mock_data/get_ntp_servers.txt +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/test/unit/sros/mock_data/get_optics.txt b/test/unit/sros/mock_data/get_optics.txt deleted file mode 100644 index 85c1c71..0000000 --- a/test/unit/sros/mock_data/get_optics.txt +++ /dev/null @@ -1,26 +0,0 @@ - - - - esat-1/1/1 - - - 1/1/c1 - - - - 1 - - 38.5 - - - 2.72 - - - -0.04 - - - - - - - diff --git a/test/unit/sros/mock_data/get_probes_config.txt b/test/unit/sros/mock_data/get_probes_config.txt deleted file mode 100644 index 2d67311..0000000 --- a/test/unit/sros/mock_data/get_probes_config.txt +++ /dev/null @@ -1,17 +0,0 @@ - - - - - TiMOS CLI - MYPROBE - - - 62.115.50.51 - 15 - 198.41.132.35 - - - - - - diff --git a/test/unit/sros/mock_data/get_probes_results.txt b/test/unit/sros/mock_data/get_probes_results.txt deleted file mode 100644 index 441829d..0000000 --- a/test/unit/sros/mock_data/get_probes_results.txt +++ /dev/null @@ -1,17 +0,0 @@ - - - - - TiMOS CLI - 2 - - - 192.168.2.1 - 10 - 1 - - - - - - diff --git a/test/unit/sros/mock_data/get_route_to.txt b/test/unit/sros/mock_data/get_route_to.txt deleted file mode 100644 index bf066a0..0000000 --- a/test/unit/sros/mock_data/get_route_to.txt +++ /dev/null @@ -1,256 +0,0 @@ - - - - Base - - - 1.0.4.0/24 - - 0 - 0 - Active - Connect - openFail - Unrecognized Error - 0.0.0.0 - 0 - 2020-06-22T01:50:12.5Z - 1283798 - 0 - 0 - 0 - 0 - 0 - 0 - false - unknown - - - - 4byte_asn - mpbgp - rt_refresh - - - - - - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - 0 - 0 - - - 0 - 0 - 0 - 0 - 0 - - - - false - 0 - 360 - Not currently being helped - 0 - - - - - - - - - - - - - - - - - - - - diff --git a/test/unit/sros/mock_data/get_snmp_information.txt b/test/unit/sros/mock_data/get_snmp_information.txt deleted file mode 100644 index 43cd97b..0000000 --- a/test/unit/sros/mock_data/get_snmp_information.txt +++ /dev/null @@ -1,20 +0,0 @@ - - - - nokia01.sfo07 - - - - cV3ISTw2V5pbEWmVEA9jXgB/1EERXQA= hash2 - rwa - snmp-acc - - - 76HzdddhlPpRo1Vql+ZB5spLqccgYQ== hash2 - r - - - - - - diff --git a/test/unit/sros/mock_data/get_users.txt b/test/unit/sros/mock_data/get_users.txt deleted file mode 100644 index 12cbdd6..0000000 --- a/test/unit/sros/mock_data/get_users.txt +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - Level-1 - - - Level-2 - - - Level-3 - - - Level-4 - - - Level-5 - - - Level-6 - - - Level-7 - - - - - - - netconf - $2y$10$.pTeMylttsq5ZMOnGDaag.uebq7NpYKo9Cgwi/O5covuBNyvSDHSW - - Level-7 - - - - ubuntu - $2y$10$/VLdxC3N0KZcmfdsivx6o.CjuELMgByxGrx79y9MQlLLXpS2QI/7i - - Level-1 - - - - - 1 - AAAAB3NzaC1yc2EAAAADAQABAAABAQDH4eHQGPa9IGfJzp0O+czMlOE8jEVM/R65eOwIQRZutzfKY5BrAlZbiaY0WBJhQ5TP68KuKKWJyQoiSPJfy3/QyDkh5ONgc6xNgO6cltBasHFRTo45aK2zCbubaEB+SgBcAEh0tJ0zIZ84xkuVQYk6UDPQTE4cXu93u9uPaEZcYZYdyiP3Couxj8kF+4L8JF4ScuPqpZ2aCDW2JjDP++Dj7iuuhIJXdw/zHX8PKFFQq7qydmsiKKoV4nXEFcUYp5AtKWEphMz6blMrV/6CXotbINWSTsLiWppq1ZQ8iz7oWR3elHJZnTVUGOk5jwn2toi4sqSLuIYGJOlW9JfpKxvz - - - - - - - - - - diff --git a/test/unit/sros/mock_data/info___no-more.txt b/test/unit/sros/mock_data/info___no-more.txt deleted file mode 100644 index 997fb32..0000000 --- a/test/unit/sros/mock_data/info___no-more.txt +++ /dev/null @@ -1,582 +0,0 @@ -card 1 { - card-type iom-v - mda 1 { - mda-type m20-v - } -} -log { - filter 1001 { - entry 10 { - description "Collect only events of major severity or higher" - action forward - match { - severity { - gte major - } - } - } - } - log-id 50 { - admin-state enable - source { - debug true - } - destination { - console - } - } - log-id 99 { - description "Default System Log" - source { - main true - } - destination { - memory { - max-entries 500 - } - } - } - log-id 100 { - description "Default Serious Errors Log" - filter 1001 - source { - main true - } - destination { - memory { - max-entries 500 - } - } - } - log-id 101 { - destination { - netconf { - } - } - } -} -multicast-management { - chassis-level { - per-mcast-plane-capacity { - total-capacity dynamic - mcast-capacity { - primary-percentage 87.5 - secondary-percentage 87.5 - } - redundant-mcast-capacity { - primary-percentage 87.5 - secondary-percentage 87.5 - } - } - } -} -port 1/1/1 { - admin-state enable -} -port 1/1/2 { - admin-state enable - description "port 1/1/c1/1" -} -router "Base" { - interface "system" { - ipv4 { - primary { - address 192.168.0.1 - prefix-length 32 - } - } - } - interface "toR2" { - admin-state enable - port 1/1/1 - ipv4 { - primary { - address 10.0.12.1 - prefix-length 24 - } - } - } - ospf 0 { - admin-state enable - area 0.0.0.0 { - interface "system" { - admin-state enable - } - interface "toR2" { - admin-state enable - interface-type point-to-point - } - } - } -} -service { - vprn "napalm" { - admin-state enable - service-id 432 - customer "1" - autonomous-system 65432 - route-distinguisher "65501:12" - bgp { - admin-state enable - } - } -} -system { - name "vSR-AUTO-01" - management-interface { - configuration-mode model-driven - cli { - md-cli { - auto-config-save true - } - } - netconf { - admin-state enable - auto-config-save true - capabilities { - writable-running false - } - } - yang-modules { - base-r13-modules false - nokia-modules false - nokia-combined-modules true - } - } - login-control { - idle-timeout 30 - } - security { - ftp-server true - aaa { - local-profiles { - profile "Level-1" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "Level-2" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "Level-3" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "Level-4" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "Level-5" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "Level-6" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "Level-7" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - } - profile "administrative" { - default-action permit-all - netconf { - base-op-authorization { - kill-session true - lock true - } - } - entry 10 { - action permit - match "configure system security" - } - entry 20 { - action permit - match "show system security" - } - entry 30 { - action permit - match "tools perform security" - } - entry 40 { - action permit - match "tools dump security" - } - entry 50 { - action permit - match "admin system security" - } - entry 100 { - action deny - match "configure li" - } - entry 110 { - action deny - match "show li" - } - entry 111 { - action deny - match "clear li" - } - entry 112 { - action deny - match "tools dump li" - } - } - profile "default" { - entry 10 { - action permit - match "exec" - } - entry 20 { - action permit - match "exit" - } - entry 30 { - action permit - match "help" - } - entry 40 { - action permit - match "logout" - } - entry 50 { - action permit - match "password" - } - entry 60 { - action deny - match "show config" - } - entry 65 { - action deny - match "show li" - } - entry 66 { - action deny - match "clear li" - } - entry 67 { - action deny - match "tools dump li" - } - entry 70 { - action permit - match "show" - } - entry 80 { - action permit - match "enable-admin" - } - entry 100 { - action deny - match "configure li" - } - } - } - } - ssh { - server-cipher-list-v1 { - cipher 200 { - name 3des - } - cipher 205 { - name blowfish - } - } - server-cipher-list-v2 { - cipher 190 { - name aes256-ctr - } - cipher 192 { - name aes192-ctr - } - cipher 194 { - name aes128-ctr - } - cipher 200 { - name aes128-cbc - } - cipher 205 { - name 3des-cbc - } - cipher 210 { - name blowfish-cbc - } - cipher 215 { - name cast128-cbc - } - cipher 220 { - name arcfour - } - cipher 225 { - name aes192-cbc - } - cipher 230 { - name aes256-cbc - } - cipher 235 { - name rijndael-cbc - } - } - client-cipher-list-v1 { - cipher 200 { - name 3des - } - cipher 205 { - name blowfish - } - cipher 210 { - name des - } - } - client-cipher-list-v2 { - cipher 190 { - name aes256-ctr - } - cipher 192 { - name aes192-ctr - } - cipher 194 { - name aes128-ctr - } - cipher 200 { - name aes128-cbc - } - cipher 205 { - name 3des-cbc - } - cipher 210 { - name blowfish-cbc - } - cipher 215 { - name cast128-cbc - } - cipher 220 { - name arcfour - } - cipher 225 { - name aes192-cbc - } - cipher 230 { - name aes256-cbc - } - cipher 235 { - name rijndael-cbc - } - } - server-mac-list-v2 { - mac 200 { - name hmac-sha2-512 - } - mac 210 { - name hmac-sha2-256 - } - mac 215 { - name hmac-sha1 - } - mac 220 { - name hmac-sha1-96 - } - mac 225 { - name hmac-md5 - } - mac 230 { - name hmac-ripemd160 - } - mac 235 { - name hmac-ripemd160-openssh-com - } - mac 240 { - name hmac-md5-96 - } - } - client-mac-list-v2 { - mac 200 { - name hmac-sha2-512 - } - mac 210 { - name hmac-sha2-256 - } - mac 215 { - name hmac-sha1 - } - mac 220 { - name hmac-sha1-96 - } - mac 225 { - name hmac-md5 - } - mac 230 { - name hmac-ripemd160 - } - mac 235 { - name hmac-ripemd160-openssh-com - } - mac 240 { - name hmac-md5-96 - } - } - } - user-params { - local-user { - user "admin" { - password "$2y$10$TQrZlpBDra86.qoexZUzQeBXDY1FcdDhGWdD9lLxMuFyPVSm0OGy6" - access { - console true - netconf true - grpc true - } - console { - member ["administrative"] - } - } - user "linux" { - password "$2y$10$xkqn46jNHBUJWit446j2o.Yu3E9zWOg44yRGjRK2YjRZE4p5xFjmG" - access { - console true - } - console { - member ["default"] - } - } - user "netconf" { - password "$2y$10$.pTeMylttsq5ZMOnGDaag.uebq7NpYKo9Cgwi/O5covuBNyvSDHSW" - access { - console true - netconf true - } - console { - member ["administrative"] - } - } - user "ubuntu" { - password "$2y$10$/VLdxC3N0KZcmfdsivx6o.CjuELMgByxGrx79y9MQlLLXpS2QI/7i" - access { - console true - } - console { - member ["administrative"] - } - public-keys { - rsa { - rsa-key 1 { - key-value "AAAAB3NzaC1yc2EAAAADAQABAAABAQDH4eHQGPa9IGfJzp0O+czMlOE8jEVM/R65eOwIQRZutzfKY5BrAlZbiaY0WBJhQ5TP68KuKKWJyQoiSPJfy3/QyDkh5ONgc6xNgO6cltBasHFRTo45aK2zCbubaEB+SgBcAEh0tJ0zIZ84xkuVQYk6UDPQTE4cXu93u9uPaEZcYZYdyiP3Couxj8kF+4L8JF4ScuPqpZ2aCDW2JjDP++Dj7iuuhIJXdw/zHX8PKFFQq7qydmsiKKoV4nXEFcUYp5AtKWEphMz6blMrV/6CXotbINWSTsLiWppq1ZQ8iz7oWR3elHJZnTVUGOk5jwn2toi4sqSLuIYGJOlW9JfpKxvz" - } - } - } - } - user "user-7" { - password "$2y$10$vYx34MIaB2KOgxGH1LXP..W8Gxa6B3tLhQIiKFMtyCtgTmZxotkuW" - access { - console true - } - console { - member ["Level-7"] - } - } - } - } - } -} - -[gl:configure] -A:netconf@vSR-AUTO-01# \ No newline at end of file diff --git a/test/unit/sros/mock_data/ping_8_8_8_8_timeout_2_ttl_128_size_100_count_5.txt b/test/unit/sros/mock_data/ping_8_8_8_8_timeout_2_ttl_128_size_100_count_5.txt deleted file mode 100644 index 84bbaaa..0000000 --- a/test/unit/sros/mock_data/ping_8_8_8_8_timeout_2_ttl_128_size_100_count_5.txt +++ /dev/null @@ -1,13 +0,0 @@ -PING 8.8.8.8 100 data bytes -108 bytes from 8.8.8.8: icmp_seq=1 ttl=64 time=0.124ms. -108 bytes from 8.8.8.8: icmp_seq=2 ttl=64 time=0.112ms. -108 bytes from 8.8.8.8: icmp_seq=3 ttl=64 time=0.100ms. -108 bytes from 8.8.8.8: icmp_seq=4 ttl=64 time=0.112ms. -108 bytes from 8.8.8.8: icmp_seq=5 ttl=64 time=0.116ms. - ----- 8.8.8.8 PING Statistics ---- -5 packets transmitted, 5 packets received, 0.00% packet loss -round-trip min = 0.100ms, avg = 0.112ms, max = 0.124ms, stddev = 0.007ms - -[] -A:netconf@nokia01.sfo07# \ No newline at end of file diff --git a/test/unit/sros/mock_data/show_chassis_power-management_utilization_detail.txt b/test/unit/sros/mock_data/show_chassis_power-management_utilization_detail.txt deleted file mode 100644 index 59a4e98..0000000 --- a/test/unit/sros/mock_data/show_chassis_power-management_utilization_detail.txt +++ /dev/null @@ -1,21 +0,0 @@ -=============================================================================== -Chassis Power Zone 1 Utilization (detail) -=============================================================================== - SUPPLY PEAK DEMAND -Power Capacity : 8800.00 Watts Chassis/Fan -Power Module 1/1 : 4400.00 Watts 1/1 : 14.51 Watts ( 0%) -Power Module 1/2 : 4400.00 Watts 1/2 : 15.52 Watts ( 0%) -Power Module 1/3 : 0.00 Watts 1/3 : 16.30 Watts ( 0%) -Power Module 1/4 : 0.00 Watts 1/4 : 14.62 Watts ( 0%) -Safety Level : 2998.00 Watts (100%) 1/5 : 15.06 Watts ( 0%) -Alert Level : 0.00 Watts IO Module - Slot 1 : 377.96 Watts ( 4%) - MDA Module - MDA 1/1 : 892.99 Watts ( 10%) - Peak Util. : 1346.96 Watts ( 15%) - CURRENT DEMAND - Current Util. : 1319.34 Watts ( 15%) -=============================================================================== - -[] -A:netconf@nokia01.sfo07# \ No newline at end of file diff --git a/test/unit/sros/mock_data/show_router_Base_bgp_routes_1_0_4_0_24_detail.txt b/test/unit/sros/mock_data/show_router_Base_bgp_routes_1_0_4_0_24_detail.txt deleted file mode 100644 index dc419f2..0000000 --- a/test/unit/sros/mock_data/show_router_Base_bgp_routes_1_0_4_0_24_detail.txt +++ /dev/null @@ -1,128 +0,0 @@ -=============================================================================== - BGP Router ID:1.1.1.1 AS:65000 Local AS:65000 -=============================================================================== - Legend - - Status codes : u - used, s - suppressed, h - history, d - decayed, * - valid - l - leaked, x - stale, > - best, b - backup, p - purge - Origin codes : i - IGP, e - EGP, ? - incomplete - -=============================================================================== -BGP IPv4 Routes -=============================================================================== -Original Attributes - -Network : 2.100.0.0/30 -Nexthop : 2.1.0.1 -Path Id : None -From : 2.1.0.1 -Res. Protocol : LOCAL Res. Metric : 0 -Res. Nexthop : 2.1.0.1 -Local Pref. : 0 Interface Name : to_RTR-01 -Aggregator AS : None Aggregator : None -Atomic Aggr. : Not Atomic MED : None -AIGP Metric : None IGP Cost : 0 -Connector : None -Community : No Community Members -Cluster : No Cluster Members -Originator Id : None Peer Router Id : 2.1.0.1 -Fwd Class : None Priority : None -Flags : Used Valid Best IGP -Route Source : Internal -AS-Path : No As-Path -Route Tag : 0 -Neighbor-AS : n/a -Orig Validation: NotFound -Source Class : 0 Dest Class : 0 -Add Paths Send : Default -Last Modified : 00h15m18s - -Modified Attributes - -Network : 2.100.0.0/30 -Nexthop : 2.1.0.1 -Path Id : None -From : 2.1.0.1 -Res. Protocol : LOCAL Res. Metric : 0 -Res. Nexthop : 2.1.0.1 -Local Pref. : 0 Interface Name : to_RTR-01 -Aggregator AS : None Aggregator : None -Atomic Aggr. : Not Atomic MED : None -AIGP Metric : None IGP Cost : 0 -Connector : None -Community : 65101:1001 65101:1002 -Cluster : No Cluster Members -Originator Id : None Peer Router Id : 2.1.0.1 -Fwd Class : None Priority : None -Flags : Used Valid Best IGP -Route Source : Internal -AS-Path : No As-Path -Route Tag : 0 -Neighbor-AS : n/a -Orig Validation: NotFound -Source Class : 0 Dest Class : 0 -Add Paths Send : Default -Last Modified : 00h15m18s - -------------------------------------------------------------------------------- -Original Attributes - -Network : 2.100.0.0/30 -Nexthop : 2.2.0.1 -Path Id : None -From : 2.2.0.1 -Res. Protocol : LOCAL Res. Metric : 0 -Res. Nexthop : 2.2.0.1 -Local Pref. : 0 Interface Name : to_RTR-02 -Aggregator AS : None Aggregator : None -Atomic Aggr. : Not Atomic MED : None -AIGP Metric : None IGP Cost : 0 -Connector : None -Community : No Community Members -Cluster : No Cluster Members -Originator Id : None Peer Router Id : 2.2.0.1 -Fwd Class : None Priority : None -Flags : Used Valid Best IGP -TieBreakReason : OriginatorID -Route Source : Internal -AS-Path : No As-Path -Route Tag : 0 -Neighbor-AS : n/a -Orig Validation: NotFound -Source Class : 0 Dest Class : 0 -Add Paths Send : Default -Last Modified : 00h15m32s - -Modified Attributes - -Network : 2.100.0.0/30 -Nexthop : 2.2.0.1 -Path Id : None -From : 2.2.0.1 -Res. Protocol : LOCAL Res. Metric : 0 -Res. Nexthop : 2.2.0.1 -Local Pref. : 0 Interface Name : to_RTR-02 -Aggregator AS : None Aggregator : None -Atomic Aggr. : Not Atomic MED : None -AIGP Metric : None IGP Cost : 0 -Connector : None -Community : 65101:1001 65101:1002 -Cluster : No Cluster Members -Originator Id : None Peer Router Id : 2.2.0.1 -Fwd Class : None Priority : None -Flags : Used Valid Best IGP -TieBreakReason : OriginatorID -Route Source : Internal -AS-Path : No As-Path -Route Tag : 0 -Neighbor-AS : n/a -Orig Validation: NotFound -Source Class : 0 Dest Class : 0 -Add Paths Send : Default -Last Modified : 00h15m32s - -------------------------------------------------------------------------------- -Routes : 2 -=============================================================================== - -[] -A:netconf@nokia01.sfo07# \ No newline at end of file diff --git a/test/unit/sros/mock_data/show_router_Base_neighbor.txt b/test/unit/sros/mock_data/show_router_Base_neighbor.txt deleted file mode 100644 index 0e480af..0000000 --- a/test/unit/sros/mock_data/show_router_Base_neighbor.txt +++ /dev/null @@ -1,14 +0,0 @@ -=============================================================================== -Neighbor Table (Router: Base) -=============================================================================== -IPv6 Address Interface - MAC Address State Expiry Type RTR -------------------------------------------------------------------------------- -::ac10:1702 to_vSR-AUTO-02-V6 - 52:54:00:fe:b8:f0 REACHABLE 00h00m03s Dynamic Yes -------------------------------------------------------------------------------- -No. of Neighbor Entries: 1 -=============================================================================== - -[] -A:netconf@nokia01.sfo07# \ No newline at end of file diff --git a/test/unit/sros/mock_data/show_router_Base_route-table_1_0_4_0_24_.txt b/test/unit/sros/mock_data/show_router_Base_route-table_1_0_4_0_24_.txt deleted file mode 100644 index ce267f6..0000000 --- a/test/unit/sros/mock_data/show_router_Base_route-table_1_0_4_0_24_.txt +++ /dev/null @@ -1,20 +0,0 @@ -=============================================================================== -Route Table (Router: Base) -=============================================================================== -Dest Prefix[Flags] Type Proto Age Pref - Next Hop[Interface Name] Metric -------------------------------------------------------------------------------- -1.0.4.0/24 Remote BGP 00h08m49s 170 - 2.1.0.1 0 -1.0.4.0/24 Remote BGP 00h08m49s 170 - 2.2.0.1 0 -------------------------------------------------------------------------------- -No. of Routes: 2 -Flags: n = Number of times nexthop is repeated - B = BGP backup route available - L = LFA nexthop available - S = Sticky ECMP requested -=============================================================================== - -[] -A:netconf@nokia01.sfo07# \ No newline at end of file diff --git a/test/unit/sros/mock_data/show_router_Base_route-table_1_0_4_0_24_protocol_bgp_extensive_all.txt b/test/unit/sros/mock_data/show_router_Base_route-table_1_0_4_0_24_protocol_bgp_extensive_all.txt deleted file mode 100644 index 0f9faac..0000000 --- a/test/unit/sros/mock_data/show_router_Base_route-table_1_0_4_0_24_protocol_bgp_extensive_all.txt +++ /dev/null @@ -1,33 +0,0 @@ -=============================================================================== -Route Table (Router: Base) -=============================================================================== -Dest Prefix : 1.0.4.0/24 - Protocol : BGP - Age : 00h12m32s - Preference : 170 - Indirect Next-Hop : 2.1.0.1 - Active : Yes - QoS : Priority=n/c, FC=n/c - Source-Class : 0 - Dest-Class : 0 - ECMP-Weight : N/A - Resolving Next-Hop : 2.1.0.1 - Interface : to_RTR-01 - Metric : 0 - ECMP-Weight : N/A - Indirect Next-Hop : 2.2.0.1 - Active : Yes - QoS : Priority=n/c, FC=n/c - Source-Class : 0 - Dest-Class : 0 - ECMP-Weight : N/A - Resolving Next-Hop : 2.2.0.1 - Interface : to_RTR-02 - Metric : 0 - ECMP-Weight : N/A -------------------------------------------------------------------------------- -No. of Destinations: 1 -=============================================================================== - -[] -A:netconf@nokia01.sfo07# \ No newline at end of file diff --git a/test/unit/sros/mock_data/show_saa_2.txt b/test/unit/sros/mock_data/show_saa_2.txt deleted file mode 100644 index b519f72..0000000 --- a/test/unit/sros/mock_data/show_saa_2.txt +++ /dev/null @@ -1,102 +0,0 @@ -=============================================================================== -SAA Test Information -=============================================================================== -Test name : 2 -Owner name : TiMOS CLI -Description : N/A -Accounting policy : None -Continuous : Yes -Administrative status : Enabled -Test type : icmp-ping 192.168.1.1 count 10 router-instance - "Base" -Trap generation : None -Probe History : auto (keep) -Test runs since last clear : 102062 -Number of failed test runs : 102061 -Last test result : Failed -------------------------------------------------------------------------------- -Threshold -Type Direction Threshold Value Last Event Run # -------------------------------------------------------------------------------- -Jitter-in Rising None None Never None - Falling None None Never None -Jitter-out Rising None None Never None - Falling None None Never None -Jitter-rt Rising None None Never None - Falling None None Never None -Latency-in Rising None None Never None - Falling None None Never None -Latency-out Rising None None Never None - Falling None None Never None -Latency-rt Rising 2.00 None Never None - Falling 1.00 0.000 06/22/2020 01:50:27 1 -Loss-in Rising None None Never None - Falling None None Never None -Loss-out Rising None None Never None - Falling None None Never None -Loss-rt Rising 10 10 06/22/2020 01:50:27 1 - Falling 5 None Never None - -=============================================================================== -Test Run: 102060 -Total number of attempts: 10 -Number of requests that failed to be sent out: 0 -Number of responses that were received: 0 -Number of requests that did not receive any response: 10 -Total number of failures: 10, Percentage: 100 - (in ms) Min Max Average Jitter -Outbound : 0.000 0.000 0.000 0.000 -Inbound : 0.000 0.000 0.000 0.000 -Roundtrip : 0.000 0.000 0.000 0.000 -Per test packet: - Sequence Outbound Inbound RoundTrip Result - 1 0.000 0.000 0.000 Request Timed Out - 2 0.000 0.000 0.000 Request Timed Out - 3 0.000 0.000 0.000 Request Timed Out - 4 0.000 0.000 0.000 Request Timed Out - 5 0.000 0.000 0.000 Request Timed Out - 6 0.000 0.000 0.000 Request Timed Out - 7 0.000 0.000 0.000 Request Timed Out - 8 0.000 0.000 0.000 Request Timed Out - 9 0.000 0.000 0.000 Request Timed Out - 10 0.000 0.000 0.000 Request Timed Out - -Test Run: 102061 -Total number of attempts: 10 -Number of requests that failed to be sent out: 0 -Number of responses that were received: 0 -Number of requests that did not receive any response: 10 -Total number of failures: 10, Percentage: 100 - (in ms) Min Max Average Jitter -Outbound : 0.000 0.000 0.000 0.000 -Inbound : 0.000 0.000 0.000 0.000 -Roundtrip : 0.000 0.000 0.000 0.000 -Per test packet: - Sequence Outbound Inbound RoundTrip Result - 1 0.000 0.000 0.000 Host unreachable - 2 0.000 0.000 0.000 Host unreachable - 3 0.000 0.000 0.000 Host unreachable - 4 0.000 0.000 0.000 Host unreachable - 5 0.000 0.000 0.000 Host unreachable - 6 0.000 0.000 0.000 Host unreachable - 7 0.000 0.000 0.000 Host unreachable - 8 0.000 0.000 0.000 Host unreachable - 9 0.000 0.000 0.000 Host unreachable - 10 0.000 0.000 0.000 Host unreachable - -Test Run: 102062 -Total number of attempts: 6 -Number of requests that failed to be sent out: 0 -Number of responses that were received: 0 -Number of requests that did not receive any response: 0 -Total number of failures: 0, Percentage: 0 - (in ms) Min Max Average Jitter -Outbound : 0.000 0.000 0.000 0.000 -Inbound : 0.000 0.000 0.000 0.000 -Roundtrip : 0.000 0.000 0.000 0.000 -Per test packet: - -=============================================================================== - -[] -A:netconf@vSR-AUTO-01# \ No newline at end of file diff --git a/test/unit/sros/mock_data/show_service_fdb-mac.txt b/test/unit/sros/mock_data/show_service_fdb-mac.txt deleted file mode 100644 index 106b644..0000000 --- a/test/unit/sros/mock_data/show_service_fdb-mac.txt +++ /dev/null @@ -1,18 +0,0 @@ -=============================================================================== -Service Forwarding Database -=============================================================================== -ServId MAC Source-Identifier Type Last Change - Transport:Tnl-Id Age -------------------------------------------------------------------------------- -2000 a4:92:cb:aa:15:76 cpm Intf 06/22/20 01:47:35 -2148007979 a4:92:cb:b2:0d:d1 cpm Intf 06/22/20 01:47:42 -2148007979 d0:99:d5:d8:48:41 sap:1/1/c5/1:0 L/0 06/22/20 01:59:12 -2148007979 d0:99:d5:d8:50:41 sap:1/1/c1/1:0 L/0 06/22/20 01:59:10 -------------------------------------------------------------------------------- -No. of Entries: 4 -------------------------------------------------------------------------------- -Legend: L=Learned O=Oam P=Protected-MAC C=Conditional S=Static Lf=Leaf -=============================================================================== - -[] -A:netconf@nokia01.sfo07# \ No newline at end of file diff --git a/test/unit/sros/mock_data/show_system_ntp_peers.txt b/test/unit/sros/mock_data/show_system_ntp_peers.txt deleted file mode 100644 index c91b8c1..0000000 --- a/test/unit/sros/mock_data/show_system_ntp_peers.txt +++ /dev/null @@ -1,24 +0,0 @@ -=============================================================================== -NTP Active Associations -=============================================================================== -State Reference ID St Type A Poll Reach Offset(ms) - Router Remote -------------------------------------------------------------------------------- -reject 138.120.181.55 3 actpr - 64 YYYYYYYY 0.070 - management 135.121.242.172 -=============================================================================== - -=============================================================================== -NTP Clients -=============================================================================== -vRouter Time Last Request Rx - Address -------------------------------------------------------------------------------- -management - 135.121.242.172 07/05/2020 20:24:55 - 135.121.242.174 07/05/2020 20:24:42 - 135.121.242.175 07/05/2020 20:24:35 -=============================================================================== - -[] -A:netconf@nokia01.sfo07# \ No newline at end of file diff --git a/test/unit/sros/mock_data/show_system_ntp_servers.txt b/test/unit/sros/mock_data/show_system_ntp_servers.txt deleted file mode 100644 index 43f310f..0000000 --- a/test/unit/sros/mock_data/show_system_ntp_servers.txt +++ /dev/null @@ -1,24 +0,0 @@ -=============================================================================== -NTP Active Associations -=============================================================================== -State Reference ID St Type A Poll Reach Offset(ms) - Router Remote -------------------------------------------------------------------------------- -chosen GPS 1 srvr - 64 YYYYYYYY 0.024 - management 135.3.26.240 -=============================================================================== - -=============================================================================== -NTP Clients -=============================================================================== -vRouter Time Last Request Rx - Address -------------------------------------------------------------------------------- -management - 135.121.242.172 07/05/2020 20:22:42 - 135.121.242.174 07/05/2020 20:23:35 - 135.121.242.175 07/05/2020 20:23:31 -=============================================================================== - -[] -A:netconf@nokia01.sfo07# \ No newline at end of file diff --git a/test/unit/sros/mock_data/traceroute_8_8_8_8_wait_10_ttl_255.txt b/test/unit/sros/mock_data/traceroute_8_8_8_8_wait_10_ttl_255.txt deleted file mode 100644 index d11a61e..0000000 --- a/test/unit/sros/mock_data/traceroute_8_8_8_8_wait_10_ttl_255.txt +++ /dev/null @@ -1,5 +0,0 @@ -traceroute to 8.8.8.8, 255 hops max, 40 byte packets - 1 ca0071r-cb-lab-1-vlan1105.ca.alcatel-lucent.com (8.8.8.7) 2.28 ms 1.18 ms 1.20 ms - -[] -A:netconf@nokia01.sfo07# \ No newline at end of file