├── .github ├── ISSUE_TEMPLATE └── PULL_REQUEST_TEMPLATE ├── .gitignore ├── .travis.yml ├── AUTHORS ├── LICENSE ├── MANIFEST.in ├── README.md ├── napalm_ios ├── __init__.py ├── ios.py └── templates │ ├── delete_ntp_peers.j2 │ ├── delete_ntp_servers.j2 │ ├── delete_snmp_config.j2 │ ├── set_hostname.j2 │ ├── set_ntp_peers.j2 │ ├── set_ntp_servers.j2 │ └── snmp_config.j2 ├── requirements-dev.txt ├── requirements.txt ├── setup.cfg ├── setup.py ├── test └── unit │ ├── TestIOSDriver.py │ ├── conftest.py │ ├── ios │ ├── initial.conf │ ├── merge_good.conf │ ├── merge_good.diff │ ├── merge_typo.conf │ ├── mock_data │ │ ├── ping_8.8.8.8_timeout_2_size_100_repeat_5.txt │ │ ├── show_arp___exclude_Incomplete.txt │ │ ├── show_hosts.txt │ │ ├── show_int_Gi1.txt │ │ ├── show_int_Gi2.txt │ │ ├── show_interface_GigabitEthernet1.txt │ │ ├── show_interface_GigabitEthernet1___in_Internet_address_is.txt │ │ ├── show_interface_GigabitEthernet2.txt │ │ ├── show_interface_GigabitEthernet2___in_Internet_address_is.txt │ │ ├── show_interface_GigabitEthernet3.txt │ │ ├── show_interface_GigabitEthernet3___in_Internet_address_is.txt │ │ ├── show_interfaces.txt │ │ ├── show_interfaces_description.txt │ │ ├── show_ip_bgp_neighbors_192.168.0.2___inc_Prefixes_Current.txt │ │ ├── show_ip_bgp_neighbors_192.168.0.2___inc_router_ID.txt │ │ ├── show_ip_bgp_neighbors_192.168.0.2___section_Local_Policy.txt │ │ ├── show_ip_bgp_summary.txt │ │ ├── show_ip_bgp_summary___begin_Neighbor.txt │ │ ├── show_ip_interface_brief.txt │ │ ├── show_lldp_neighbors.txt │ │ ├── show_lldp_neighbors_GigabitEthernet1_detail.txt │ │ ├── show_lldp_neighbors_GigabitEthernet2_detail.txt │ │ ├── show_mac-address-table.txt │ │ ├── show_memory_statistics.txt │ │ ├── show_ntp_associations.txt │ │ ├── show_proc_cpu.txt │ │ ├── show_run___include_ntp_server.txt │ │ ├── show_run___include_snmp-server.txt │ │ ├── show_run_interface_GigabitEthernet1.txt │ │ ├── show_run_interface_GigabitEthernet2.txt │ │ ├── show_run_interface_GigabitEthernet3.txt │ │ ├── show_running-config.txt │ │ ├── show_startup-config.txt │ │ ├── show_version.txt │ │ └── traceroute_8.8.8.8.txt │ ├── new_good.conf │ ├── new_good.diff │ └── new_typo.conf │ ├── mocked_data │ ├── test_get_arp_table │ │ ├── normal │ │ │ ├── expected_result.json │ │ │ └── show_arp___exclude_Incomplete.txt │ │ └── static_arp_entry │ │ │ ├── expected_result.json │ │ │ └── show_arp___exclude_Incomplete.txt │ ├── test_get_bgp_neighbors │ │ ├── normal │ │ │ ├── expected_result.json │ │ │ ├── show_bgp_all_summary.txt │ │ │ ├── show_bgp_ipv4_unicast_neighbors.txt │ │ │ └── show_bgp_ipv6_unicast_neighbors.txt │ │ ├── real_life │ │ │ ├── expected_result.json │ │ │ ├── show_bgp_all_summary.txt │ │ │ ├── show_bgp_ipv4_unicast_neighbors.txt │ │ │ └── show_bgp_ipv6_unicast_neighbors.txt │ │ └── regex_strip │ │ │ ├── expected_result.json │ │ │ ├── show_bgp_all_summary.txt │ │ │ ├── show_bgp_ipv4_unicast_neighbors.txt │ │ │ └── show_bgp_ipv6_unicast_neighbors.txt │ ├── test_get_config │ │ └── normal │ │ │ ├── expected_result.json │ │ │ ├── show_running_config.txt │ │ │ └── show_startup_config.txt │ ├── test_get_config_filtered │ │ └── normal │ │ │ ├── expected_result.json │ │ │ ├── show_running_config.txt │ │ │ └── show_startup_config.txt │ ├── test_get_environment │ │ ├── normal │ │ │ ├── expected_result.json │ │ │ ├── show_env_temperature_status.txt │ │ │ ├── show_memory_statistics.txt │ │ │ └── show_proc_cpu.txt │ │ └── temp_cmd_fail │ │ │ ├── expected_result.json │ │ │ ├── show_env_temperature_status.txt │ │ │ ├── show_memory_statistics.txt │ │ │ └── show_proc_cpu.txt │ ├── test_get_facts │ │ ├── empty_show_hosts │ │ │ ├── expected_result.json │ │ │ ├── show_hosts.txt │ │ │ ├── show_ip_interface_brief.txt │ │ │ └── show_version.txt │ │ └── normal │ │ │ ├── expected_result.json │ │ │ ├── show_hosts.txt │ │ │ ├── show_ip_interface_brief.txt │ │ │ └── show_version.txt │ ├── test_get_interfaces │ │ ├── alternate │ │ │ ├── expected_result.json │ │ │ └── show_interfaces.txt │ │ ├── alternate2 │ │ │ ├── expected_result.json │ │ │ └── show_interfaces.txt │ │ ├── normal │ │ │ ├── expected_result.json │ │ │ └── show_interfaces.txt │ │ └── pseudowire │ │ │ ├── expected_result.json │ │ │ └── show_interfaces.txt │ ├── test_get_interfaces_counters │ │ └── normal │ │ │ ├── expected_result.json │ │ │ ├── show_interface_summary.txt │ │ │ └── show_interfaces.txt │ ├── test_get_interfaces_ip │ │ └── normal │ │ │ ├── expected_result.json │ │ │ ├── show_ip_interface.txt │ │ │ └── show_ipv6_interface.txt │ ├── test_get_lldp_neighbors │ │ ├── alternate │ │ │ ├── expected_result.json │ │ │ ├── show_int_Gi1.txt │ │ │ ├── show_int_Gi2.txt │ │ │ └── show_lldp_neighbors.txt │ │ ├── long_names │ │ │ ├── expected_result.json │ │ │ ├── show_int_Gi1.txt │ │ │ ├── show_int_Gi2.txt │ │ │ ├── show_lldp_neighbors.txt │ │ │ └── show_lldp_neighbors_Gi1_detail.txt │ │ ├── missing_capability │ │ │ ├── expected_result.json │ │ │ ├── show_int_Gi1.txt │ │ │ ├── show_int_Gi2.txt │ │ │ ├── show_lldp_neighbors.txt │ │ │ └── show_lldp_neighbors_Gi1_detail.txt │ │ └── normal │ │ │ ├── expected_result.json │ │ │ ├── show_int_Gi1.txt │ │ │ ├── show_int_Gi2.txt │ │ │ └── show_lldp_neighbors.txt │ ├── test_get_lldp_neighbors_detail │ │ ├── alternate │ │ │ ├── expected_result.json │ │ │ ├── show_int_Gi1.txt │ │ │ ├── show_lldp_neighbors.txt │ │ │ └── show_lldp_neighbors_GigabitEthernet1_detail.txt │ │ ├── alternate2 │ │ │ ├── expected_result.json │ │ │ ├── show_int_Gi1.txt │ │ │ ├── show_lldp_neighbors.txt │ │ │ ├── show_lldp_neighbors_Gi1_detail.txt │ │ │ └── show_lldp_neighbors_GigabitEthernet1_detail.txt │ │ ├── alternate3 │ │ │ ├── expected_result.json │ │ │ ├── show_int_Gi1.txt │ │ │ ├── show_lldp_neighbors.txt │ │ │ ├── show_lldp_neighbors_Gi1_detail.txt │ │ │ └── show_lldp_neighbors_GigabitEthernet1_detail.txt │ │ └── normal │ │ │ ├── expected_result.json │ │ │ ├── show_int_Gi1.txt │ │ │ ├── show_int_Gi2.txt │ │ │ ├── show_lldp_neighbors.txt │ │ │ ├── show_lldp_neighbors_GigabitEthernet1_detail.txt │ │ │ └── show_lldp_neighbors_GigabitEthernet2_detail.txt │ ├── test_get_mac_address_table │ │ ├── 2960_format │ │ │ ├── expected_result.json │ │ │ └── show_mac_address_table.txt │ │ ├── 3560_format │ │ │ ├── expected_result.json │ │ │ └── show_mac_address_table.txt │ │ ├── 4500_format │ │ │ ├── expected_result.json │ │ │ └── show_mac_address_table.txt │ │ ├── 4500_format2 │ │ │ ├── expected_result.json │ │ │ └── show_mac_address_table.txt │ │ ├── 4948_format │ │ │ ├── expected_result.json │ │ │ └── show_mac_address_table.txt │ │ ├── 6500_format │ │ │ ├── expected_result.json │ │ │ └── show_mac_address_table.txt │ │ ├── 6500_format2 │ │ │ ├── expected_result.json │ │ │ └── show_mac_address_table.txt │ │ ├── 6500_format3 │ │ │ ├── expected_result.json │ │ │ └── show_mac_address_table.txt │ │ ├── alt_show_cmd │ │ │ ├── expected_result.json │ │ │ └── show_mac_address_table.txt │ │ └── normal │ │ │ ├── expected_result.json │ │ │ └── show_mac_address_table.txt │ ├── test_get_ntp_servers │ │ └── normal │ │ │ ├── expected_result.json │ │ │ └── show_run___include_ntp_server.txt │ ├── test_get_ntp_stats │ │ └── normal │ │ │ ├── expected_result.json │ │ │ └── show_ntp_associations.txt │ ├── test_get_optics │ │ ├── interface_shutdown │ │ │ ├── expected_result.json │ │ │ ├── show_int_Te1_0_1.txt │ │ │ ├── show_int_Te2_0_1.txt │ │ │ └── show_interfaces_transceiver.txt │ │ ├── low_rx_power │ │ │ ├── expected_result.json │ │ │ ├── show_int_Gi0_11.txt │ │ │ └── show_interfaces_transceiver.txt │ │ └── normal │ │ │ ├── expected_result.json │ │ │ ├── show_int_Te1_0_1.txt │ │ │ ├── show_int_Te2_0_1.txt │ │ │ └── show_interfaces_transceiver.txt │ ├── test_get_snmp_information │ │ └── normal │ │ │ ├── expected_result.json │ │ │ └── show_run___include_snmp_server.txt │ ├── test_is_alive │ │ └── normal │ │ │ └── expected_result.json │ ├── test_ping │ │ └── normal │ │ │ ├── expected_result.json │ │ │ └── ping_8_8_8_8_timeout_2_size_100_repeat_5.txt │ └── test_traceroute │ │ └── normal │ │ ├── expected_result.json │ │ └── traceroute_8_8_8_8_ttl_0_255_timeout_2.txt │ └── test_getters.py └── tox.ini /.github/ISSUE_TEMPLATE: -------------------------------------------------------------------------------- 1 | ### The NAPALM Project has reunified! 2 | 3 | Please submit all NAPALM issues to: 4 | https://github.com/napalm-automation/napalm/issues 5 | 6 | 7 | ### DO NOT submit any issues to this repository. 8 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE: -------------------------------------------------------------------------------- 1 | ### The NAPALM Project has reunified! 2 | 3 | Please submit all NAPALM pull requests to: 4 | https://github.com/napalm-automation/napalm/pulls 5 | 6 | 7 | ### DO NOT submit any pull requests to this repository. 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | bin/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | eggs/ 16 | lib/ 17 | lib64/ 18 | parts/ 19 | sdist/ 20 | var/ 21 | *.egg-info/ 22 | .installed.cfg 23 | *.egg 24 | 25 | # Installer logs 26 | pip-log.txt 27 | pip-delete-this-directory.txt 28 | 29 | # Unit test / coverage reports 30 | htmlcov/ 31 | .tox/ 32 | .coverage 33 | .cache 34 | nosetests.xml 35 | coverage.xml 36 | 37 | # Translations 38 | *.mo 39 | 40 | # Mr Developer 41 | .mr.developer.cfg 42 | .project 43 | .pydevproject 44 | 45 | # Rope 46 | .ropeproject 47 | 48 | # Django stuff: 49 | *.log 50 | *.pot 51 | 52 | # Sphinx documentation 53 | docs/_build/ 54 | 55 | .idea 56 | .DS_Store 57 | 58 | env 59 | *.swp 60 | 61 | test/unit/test_devices.py 62 | test/unit/TestIOSDriverKB.py 63 | test/unit/TestIOSDriverKB.py_safe 64 | #test/unit/ios/*.conf 65 | #test/unit/ios/*.diff 66 | test/unit/ios/cleanup.sh 67 | test/unit/ios/prep_test.sh 68 | 69 | report.json 70 | tags 71 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - 2.7 4 | - 3.4 5 | - 3.5 6 | install: 7 | - pip install tox-travis 8 | - pip install coveralls 9 | deploy: 10 | provider: pypi 11 | user: dbarroso 12 | password: 13 | secure: d9XnLqr0mmLiMONfoiSqShwQ761pD3THIwsEtllm1/1KknoFyOtyqYOfPvUIvy2wg7JGDYyRCfyj1j3SiYz1whmmtAmtOZYYB14wk3eftNBVHDERc1ROOVO2u3ahL6WwdZBhxjpuz6lXX0sSJtDxY2IBFGDy2cj2VzWyuiWKoS2YrQoLTLBt/FWPbHvVIIeUkQ1wZnZ/G0H45ZAntd9v9BCFkjKc2wEagPYv5Li+54Tet8nFiNFC/m+UBbcgtITFp5xNz0nbjMDTxKwIEgRNqXig/P/OOeh3aNtjPZtwLdeuJw/p4QBZ+eCnqD9paGcOdkCpK6b4i+8RV8n3/Dpz3qbyYBxpMqAn+JnOpVpWWnoARI3Kc+hHMpuT9fPLt+J5iqU/YZQhDRavmrggYWlnqWk67udFxDBec6BidQuZfksVhdT6CcD5cATRDrV0m7CchAQa0RDJ9NRUFu3L6h3vP5F49xzFPa87fG1s9l/Qccby5/rR3cryyHcnxsw1F1kPD1cpWbHwmkPnWYAqzYIso8rhJ8XjNj4Cw5/S4E1ri4e7fKRmYKYgB7Eq1QkefODAoDu6LBOkf2JtGOrSEa+bwLx2nnoGWfs6KkkRKzJNuNwBVYQYhfSRXLsXzWwfpYwqCuuEt/p4scgkqLtm5cGqZ5EG15g52N9gnQzpK8MK+uw= 14 | on: 15 | tags: true 16 | branch: master 17 | script: 18 | - tox 19 | 20 | after_success: 21 | - coveralls 22 | - if [ $TRAVIS_TAG ]; then curl -X POST https://readthedocs.org/build/napalm; fi 23 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | David Barroso 2 | Elisa Jasinska 3 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include requirements.txt 2 | include napalm_ios/templates/*.j2 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![PyPI](https://img.shields.io/pypi/v/napalm-ios.svg)](https://pypi.python.org/pypi/napalm-ios) 2 | [![Build Status](https://travis-ci.org/napalm-automation/napalm-ios.svg?branch=master)](https://travis-ci.org/napalm-automation/napalm-ios) 3 | [![Coverage Status](https://coveralls.io/repos/github/napalm-automation/napalm-ios/badge.svg?branch=master)](https://coveralls.io/github/napalm-automation/napalm-ios) 4 | 5 | # napalm-ios 6 | -------------------------------------------------------------------------------- /napalm_ios/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Dravetech AB. All rights reserved. 2 | # 3 | # The contents of this file are licensed under the Apache License, Version 2.0 4 | # (the "License"); you may not use this file except in compliance with the 5 | # License. You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations under 13 | # the License. 14 | 15 | """napalm_ios package.""" 16 | import pkg_resources 17 | from napalm_ios.ios import IOSDriver 18 | 19 | try: 20 | __version__ = pkg_resources.get_distribution('napalm-ios').version 21 | except pkg_resources.DistributionNotFound: 22 | __version__ = "Not installed" 23 | 24 | __all__ = ['IOSDriver'] 25 | -------------------------------------------------------------------------------- /napalm_ios/templates/delete_ntp_peers.j2: -------------------------------------------------------------------------------- 1 | {% for peer in peers %} 2 | no ntp peer {{peer}} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /napalm_ios/templates/delete_ntp_servers.j2: -------------------------------------------------------------------------------- 1 | {% for server in servers %} 2 | no ntp server {{server}} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /napalm_ios/templates/delete_snmp_config.j2: -------------------------------------------------------------------------------- 1 | {% if (location is defined) and location %} 2 | no snmp-server location 3 | {% endif %} 4 | {% if (contact is defined) and contact %} 5 | no snmp-server contact 6 | {% endif %} 7 | {% if (chassis_id is defined) and chassis_id %} 8 | no snmp-server chassis-id 9 | {% endif %} 10 | {% if (community is defined) and community %} 11 | {% for comm_name, comm_details in community.iteritems() %} 12 | no snmp-server community {{comm_name}} 13 | {% endfor %} 14 | {% endif %} 15 | -------------------------------------------------------------------------------- /napalm_ios/templates/set_hostname.j2: -------------------------------------------------------------------------------- 1 | hostname {{hostname}} 2 | -------------------------------------------------------------------------------- /napalm_ios/templates/set_ntp_peers.j2: -------------------------------------------------------------------------------- 1 | {% for peer in peers %} 2 | ntp peer {{peer}} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /napalm_ios/templates/set_ntp_servers.j2: -------------------------------------------------------------------------------- 1 | {% for server in servers %} 2 | ntp server {{server}} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /napalm_ios/templates/snmp_config.j2: -------------------------------------------------------------------------------- 1 | {% if (location is defined) and location %} 2 | snmp-server location "{{location}}" 3 | {% endif %} 4 | {% if (contact is defined) and contact %} 5 | snmp-server contact "{{contact}}" 6 | {% endif %} 7 | {% if (chassis_id is defined) and chassis_id %} 8 | snmp-server chassis-id "{{chassis_id}}" 9 | {% endif %} 10 | {% if (community is defined) and community %} 11 | {% for comm_name, comm_details in community.iteritems() %} 12 | {% if (comm_details is defined) and comm_details %} 13 | {% if (comm_details.get('mode') is defined) and comm_details.get('mode') == 'rw' %} 14 | community {{comm_name}} RW 15 | {% else %} 16 | community {{comm_name}} RO 17 | {% endif %} 18 | {% else %} 19 | community {{comm_name}} RO 20 | {% endif %} 21 | {% endfor %} 22 | {% endif %} 23 | -------------------------------------------------------------------------------- /requirements-dev.txt: -------------------------------------------------------------------------------- 1 | future 2 | coveralls 3 | pytest 4 | pytest-cov 5 | pytest-json 6 | pytest-pythonpath 7 | pylama 8 | flake8-import-order 9 | -r requirements.txt 10 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | napalm_base>=0.25.0 2 | netmiko>=1.4.3 3 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [pylama] 2 | linters = mccabe,pep8,pyflakes 3 | ignore = D203,C901 4 | skip = build/*,.tox/* 5 | 6 | [pylama:pep8] 7 | max_line_length = 100 8 | 9 | [tool:pytest] 10 | addopts = --cov=napalm_ios --cov-report term-missing -vs --pylama 11 | json_report = report.json 12 | jsonapi = true 13 | 14 | [coverage:run] 15 | source = napalm_ios 16 | 17 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | """setup.py file.""" 2 | import uuid 3 | 4 | from setuptools import setup, find_packages 5 | from pip.req import parse_requirements 6 | 7 | __author__ = 'Kirk Byers ' 8 | 9 | install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1()) 10 | reqs = [str(ir.req) for ir in install_reqs] 11 | 12 | setup( 13 | name="napalm-ios", 14 | version="0.8.1", 15 | packages=find_packages(), 16 | author="Kirk Byers", 17 | author_email="ktbyers@twb-tech.com", 18 | description="Network Automation and Programmability Abstraction Layer with Multivendor support", 19 | classifiers=[ 20 | 'Topic :: Utilities', 21 | 'Programming Language :: Python', 22 | 'Operating System :: POSIX :: Linux', 23 | 'Operating System :: MacOS', 24 | ], 25 | url="https://github.com/napalm-automation/napalm-ios", 26 | include_package_data=True, 27 | zip_safe=False, 28 | install_requires=reqs, 29 | ) 30 | -------------------------------------------------------------------------------- /test/unit/conftest.py: -------------------------------------------------------------------------------- 1 | """Test fixtures.""" 2 | from __future__ import print_function 3 | from __future__ import unicode_literals 4 | 5 | from builtins import super 6 | 7 | import pytest 8 | from napalm_base.test import conftest as parent_conftest 9 | 10 | from napalm_base.test.double import BaseTestDouble 11 | from napalm_base.utils import py23_compat 12 | 13 | from napalm_ios import ios 14 | 15 | 16 | @pytest.fixture(scope='class') 17 | def set_device_parameters(request): 18 | """Set up the class.""" 19 | def fin(): 20 | request.cls.device.close() 21 | request.addfinalizer(fin) 22 | 23 | request.cls.driver = ios.IOSDriver 24 | request.cls.patched_driver = PatchedIOSDriver 25 | request.cls.vendor = 'ios' 26 | parent_conftest.set_device_parameters(request) 27 | 28 | 29 | def pytest_generate_tests(metafunc): 30 | """Generate test cases dynamically.""" 31 | parent_conftest.pytest_generate_tests(metafunc, __file__) 32 | 33 | 34 | class PatchedIOSDriver(ios.IOSDriver): 35 | """Patched IOS Driver.""" 36 | 37 | def __init__(self, hostname, username, password, timeout=60, optional_args=None): 38 | 39 | super().__init__(hostname, username, password, timeout, optional_args) 40 | 41 | self.patched_attrs = ['device'] 42 | self.device = FakeIOSDevice() 43 | 44 | def disconnect(self): 45 | pass 46 | 47 | def is_alive(self): 48 | return { 49 | 'is_alive': True # In testing everything works.. 50 | } 51 | 52 | def open(self): 53 | pass 54 | 55 | 56 | class FakeIOSDevice(BaseTestDouble): 57 | """IOS device test double.""" 58 | 59 | def send_command(self, command, **kwargs): 60 | filename = '{}.txt'.format(self.sanitize_text(command)) 61 | full_path = self.find_file(filename) 62 | result = self.read_txt_file(full_path) 63 | return py23_compat.text_type(result) 64 | 65 | def disconnect(self): 66 | pass 67 | -------------------------------------------------------------------------------- /test/unit/ios/initial.conf: -------------------------------------------------------------------------------- 1 | version 15.4 2 | service timestamps debug datetime msec 3 | service timestamps log datetime msec 4 | no platform punt-keepalive disable-kernel-core 5 | platform console virtual 6 | ! 7 | hostname vagrant_box 8 | ! 9 | boot-start-marker 10 | boot-end-marker 11 | ! 12 | ! 13 | enable secret 5 $1$nc08$bizeEFbgCBKjZP4nurNCd. 14 | enable password vagrant 15 | ! 16 | aaa new-model 17 | ! 18 | ! 19 | aaa authorization exec default local 20 | ! 21 | ! 22 | ! 23 | ! 24 | ! 25 | aaa session-id common 26 | ! 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | 36 | 37 | ip domain name acme.com 38 | 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ! 48 | ! 49 | subscriber templating 50 | ! 51 | multilink bundle-name authenticated 52 | ! 53 | ! 54 | ! 55 | license udi pid CSR1000V sn 9EKBH55S58T 56 | archive 57 | path bootflash:archive 58 | write-memory 59 | spanning-tree extend system-id 60 | ! 61 | username vagrant privilege 15 password 0 vagrant 62 | ! 63 | redundancy 64 | mode none 65 | ! 66 | ! 67 | ! 68 | ! 69 | ! 70 | ! 71 | ! 72 | ! 73 | ! 74 | ! 75 | ! 76 | ! 77 | ! 78 | ! 79 | ! 80 | ! 81 | ! 82 | ! 83 | ! 84 | ! 85 | ! 86 | ! 87 | interface GigabitEthernet1 88 | ip address dhcp 89 | negotiation auto 90 | no mop enabled 91 | ! 92 | interface GigabitEthernet2 93 | no ip address 94 | shutdown 95 | negotiation auto 96 | ! 97 | interface GigabitEthernet3 98 | no ip address 99 | shutdown 100 | negotiation auto 101 | ! 102 | ! 103 | virtual-service csr_mgmt 104 | ! 105 | ip forward-protocol nd 106 | ! 107 | no ip http server 108 | no ip http secure-server 109 | ip ssh version 2 110 | ip scp server enable 111 | ! 112 | ! 113 | ! 114 | ! 115 | ! 116 | ! 117 | control-plane 118 | ! 119 | ! 120 | line con 0 121 | stopbits 1 122 | line vty 0 4 123 | password vagrant 124 | ! 125 | ! 126 | end 127 | -------------------------------------------------------------------------------- /test/unit/ios/merge_good.conf: -------------------------------------------------------------------------------- 1 | logging buffered 9000 2 | -------------------------------------------------------------------------------- /test/unit/ios/merge_good.diff: -------------------------------------------------------------------------------- 1 | -logging buffered 9000 2 | 3 | -------------------------------------------------------------------------------- /test/unit/ios/merge_typo.conf: -------------------------------------------------------------------------------- 1 | logging buffered 9000 2 | asdasda 3 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/ping_8.8.8.8_timeout_2_size_100_repeat_5.txt: -------------------------------------------------------------------------------- 1 | 2 | Type escape sequence to abort. 3 | Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds: 4 | !!!!! 5 | Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms 6 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_arp___exclude_Incomplete.txt: -------------------------------------------------------------------------------- 1 | Protocol Address Age (min) Hardware Addr Type Interface 2 | Internet 10.10.10.1 8 001f.9002.16fb ARPA FastEthernet4 3 | Internet 10.10.10.20 - c89c.100a.0eb6 ARPA FastEthernet4 4 | Internet 10.10.10.22 122 0024.900e.8577 ARPA FastEthernet4 5 | Internet 10.10.10.28 130 5254.000e.446c ARPA FastEthernet4 6 | Internet 10.10.10.29 71 5254.0008.69b6 ARPA FastEthernet4 7 | Internet 10.10.10.30 144 5254.0002.13bb ARPA FastEthernet4 8 | Internet 10.10.10.31 191 5254.0000.3737 ARPA FastEthernet4 9 | Internet 10.10.10.38 9 0001.000f.0001 ARPA FastEthernet4 10 | Internet 10.10.10.100 101 f0ad.4001.d933 ARPA FastEthernet4 11 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_hosts.txt: -------------------------------------------------------------------------------- 1 | Name lookup view: Global 2 | Default domain is acme.com 3 | Name/address lookup uses domain service 4 | Name servers are 10.0.2.3 5 | 6 | Codes: UN - unknown, EX - expired, OK - OK, ?? - revalidate 7 | temp - temporary, perm - permanent 8 | NA - Not Applicable None - Not defined 9 | 10 | Host Port Flags Age Type Address(es) 11 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_int_Gi1.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet1 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.27f8.e842 (bia 0800.27f8.e842) 3 | Internet address is 10.0.2.15/24 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive set (10 sec) 8 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 9 | output flow-control is unsupported, input flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:42:01, output 00:00:05, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 1000 bits/sec, 1 packets/sec 17 | 5 minute output rate 1000 bits/sec, 1 packets/sec 18 | 14028 packets input, 1766902 bytes, 0 no buffer 19 | Received 0 broadcasts (0 IP multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 0 multicast, 0 pause input 23 | 9446 packets output, 1379617 bytes, 0 underruns 24 | 0 output errors, 0 collisions, 0 interface resets 25 | 0 unknown protocol drops 26 | 0 babbles, 0 late collision, 0 deferred 27 | 0 lost carrier, 0 no carrier, 0 pause output 28 | 0 output buffer failures, 0 output buffers swapped out 29 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_int_Gi2.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet2 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.2779.e896 (bia 0800.2779.e896) 3 | Description: blah bleh 4 | Internet address is 192.168.0.1/24 5 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 6 | reliability 255/255, txload 1/255, rxload 1/255 7 | Encapsulation ARPA, loopback not set 8 | Keepalive set (10 sec) 9 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 10 | output flow-control is unsupported, input flow-control is unsupported 11 | ARP type: ARPA, ARP Timeout 04:00:00 12 | Last input 00:00:04, output 00:00:05, output hang never 13 | Last clearing of "show interface" counters never 14 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 15 | Queueing strategy: fifo 16 | Output queue: 0/40 (size/max) 17 | 5 minute input rate 0 bits/sec, 0 packets/sec 18 | 5 minute output rate 0 bits/sec, 0 packets/sec 19 | 118 packets input, 11502 bytes, 0 no buffer 20 | Received 0 broadcasts (0 IP multicasts) 21 | 0 runts, 0 giants, 0 throttles 22 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 23 | 0 watchdog, 0 multicast, 0 pause input 24 | 177 packets output, 19267 bytes, 0 underruns 25 | 0 output errors, 0 collisions, 1 interface resets 26 | 0 unknown protocol drops 27 | 0 babbles, 0 late collision, 0 deferred 28 | 0 lost carrier, 0 no carrier, 0 pause output 29 | 0 output buffer failures, 0 output buffers swapped out 30 | 31 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_interface_GigabitEthernet1.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet1 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.27f8.e842 (bia 0800.27f8.e842) 3 | Internet address is 10.0.2.15/24 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive set (10 sec) 8 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 9 | output flow-control is unsupported, input flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:42:01, output 00:00:05, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 1000 bits/sec, 1 packets/sec 17 | 5 minute output rate 1000 bits/sec, 1 packets/sec 18 | 14028 packets input, 1766902 bytes, 0 no buffer 19 | Received 0 broadcasts (0 IP multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 0 multicast, 0 pause input 23 | 9446 packets output, 1379617 bytes, 0 underruns 24 | 0 output errors, 0 collisions, 0 interface resets 25 | 0 unknown protocol drops 26 | 0 babbles, 0 late collision, 0 deferred 27 | 0 lost carrier, 0 no carrier, 0 pause output 28 | 0 output buffer failures, 0 output buffers swapped out 29 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_interface_GigabitEthernet1___in_Internet_address_is.txt: -------------------------------------------------------------------------------- 1 | Internet address is 10.0.2.15/24 2 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_interface_GigabitEthernet2.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet2 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.2779.e896 (bia 0800.2779.e896) 3 | Description: blah bleh 4 | Internet address is 192.168.0.1/24 5 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 6 | reliability 255/255, txload 1/255, rxload 1/255 7 | Encapsulation ARPA, loopback not set 8 | Keepalive set (10 sec) 9 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 10 | output flow-control is unsupported, input flow-control is unsupported 11 | ARP type: ARPA, ARP Timeout 04:00:00 12 | Last input 00:00:04, output 00:00:05, output hang never 13 | Last clearing of "show interface" counters never 14 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 15 | Queueing strategy: fifo 16 | Output queue: 0/40 (size/max) 17 | 5 minute input rate 0 bits/sec, 0 packets/sec 18 | 5 minute output rate 0 bits/sec, 0 packets/sec 19 | 118 packets input, 11502 bytes, 0 no buffer 20 | Received 0 broadcasts (0 IP multicasts) 21 | 0 runts, 0 giants, 0 throttles 22 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 23 | 0 watchdog, 0 multicast, 0 pause input 24 | 177 packets output, 19267 bytes, 0 underruns 25 | 0 output errors, 0 collisions, 1 interface resets 26 | 0 unknown protocol drops 27 | 0 babbles, 0 late collision, 0 deferred 28 | 0 lost carrier, 0 no carrier, 0 pause output 29 | 0 output buffer failures, 0 output buffers swapped out 30 | 31 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_interface_GigabitEthernet2___in_Internet_address_is.txt: -------------------------------------------------------------------------------- 1 | Internet address is 192.168.0.1/24 2 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_interface_GigabitEthernet3.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet3 is administratively down, line protocol is down 2 | Hardware is CSR vNIC, address is 0800.2782.516b (bia 0800.2782.516b) 3 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 4 | reliability 255/255, txload 1/255, rxload 1/255 5 | Encapsulation ARPA, loopback not set 6 | Keepalive set (10 sec) 7 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 8 | output flow-control is unsupported, input flow-control is unsupported 9 | ARP type: ARPA, ARP Timeout 04:00:00 10 | Last input never, output never, output hang never 11 | Last clearing of "show interface" counters never 12 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 13 | Queueing strategy: fifo 14 | Output queue: 0/40 (size/max) 15 | 5 minute input rate 0 bits/sec, 0 packets/sec 16 | 5 minute output rate 0 bits/sec, 0 packets/sec 17 | 0 packets input, 0 bytes, 0 no buffer 18 | Received 0 broadcasts (0 IP multicasts) 19 | 0 runts, 0 giants, 0 throttles 20 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 21 | 0 watchdog, 0 multicast, 0 pause input 22 | 3 packets output, 258 bytes, 0 underruns 23 | 0 output errors, 0 collisions, 0 interface resets 24 | 0 unknown protocol drops 25 | 0 babbles, 0 late collision, 0 deferred 26 | 0 lost carrier, 0 no carrier, 0 pause output 27 | 0 output buffer failures, 0 output buffers swapped out 28 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_interface_GigabitEthernet3___in_Internet_address_is.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/napalm-automation/napalm-ios/7bbbc6a4d9f70a5b8cf32b7c7072a7ab437ddb81/test/unit/ios/mock_data/show_interface_GigabitEthernet3___in_Internet_address_is.txt -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_interfaces.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet1 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.27f8.e842 (bia 0800.27f8.e842) 3 | Internet address is 10.0.2.15/24 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive set (10 sec) 8 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 9 | output flow-control is unsupported, input flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:39:57, output 00:00:00, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 1000 bits/sec, 1 packets/sec 17 | 5 minute output rate 1000 bits/sec, 1 packets/sec 18 | 13799 packets input, 1748592 bytes, 0 no buffer 19 | Received 0 broadcasts (0 IP multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 0 multicast, 0 pause input 23 | 9297 packets output, 1355261 bytes, 0 underruns 24 | 0 output errors, 0 collisions, 0 interface resets 25 | 0 unknown protocol drops 26 | 0 babbles, 0 late collision, 0 deferred 27 | 0 lost carrier, 0 no carrier, 0 pause output 28 | 0 output buffer failures, 0 output buffers swapped out 29 | GigabitEthernet2 is up, line protocol is up 30 | Hardware is CSR vNIC, address is 0800.2779.e896 (bia 0800.2779.e896) 31 | Internet address is 192.168.0.1/24 32 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 33 | reliability 255/255, txload 1/255, rxload 1/255 34 | Encapsulation ARPA, loopback not set 35 | Keepalive set (10 sec) 36 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 37 | output flow-control is unsupported, input flow-control is unsupported 38 | ARP type: ARPA, ARP Timeout 04:00:00 39 | Last input 00:00:25, output 00:00:04, output hang never 40 | Last clearing of "show interface" counters never 41 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 42 | Queueing strategy: fifo 43 | Output queue: 0/40 (size/max) 44 | 5 minute input rate 0 bits/sec, 0 packets/sec 45 | 5 minute output rate 0 bits/sec, 0 packets/sec 46 | 105 packets input, 10383 bytes, 0 no buffer 47 | Received 0 broadcasts (0 IP multicasts) 48 | 0 runts, 0 giants, 0 throttles 49 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 50 | 0 watchdog, 0 multicast, 0 pause input 51 | 154 packets output, 16467 bytes, 0 underruns 52 | 0 output errors, 0 collisions, 1 interface resets 53 | 0 unknown protocol drops 54 | 0 babbles, 0 late collision, 0 deferred 55 | 0 lost carrier, 0 no carrier, 0 pause output 56 | 0 output buffer failures, 0 output buffers swapped out 57 | GigabitEthernet3 is administratively down, line protocol is down 58 | Hardware is CSR vNIC, address is 0800.2782.516b (bia 0800.2782.516b) 59 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 60 | reliability 255/255, txload 1/255, rxload 1/255 61 | Encapsulation ARPA, loopback not set 62 | Keepalive set (10 sec) 63 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 64 | output flow-control is unsupported, input flow-control is unsupported 65 | ARP type: ARPA, ARP Timeout 04:00:00 66 | Last input never, output never, output hang never 67 | Last clearing of "show interface" counters never 68 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 69 | Queueing strategy: fifo 70 | Output queue: 0/40 (size/max) 71 | 5 minute input rate 0 bits/sec, 0 packets/sec 72 | 5 minute output rate 0 bits/sec, 0 packets/sec 73 | 0 packets input, 0 bytes, 0 no buffer 74 | Received 0 broadcasts (0 IP multicasts) 75 | 0 runts, 0 giants, 0 throttles 76 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 77 | 0 watchdog, 0 multicast, 0 pause input 78 | 3 packets output, 258 bytes, 0 underruns 79 | 0 output errors, 0 collisions, 0 interface resets 80 | 0 unknown protocol drops 81 | 0 babbles, 0 late collision, 0 deferred 82 | 0 lost carrier, 0 no carrier, 0 pause output 83 | 0 output buffer failures, 0 output buffers swapped out 84 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_interfaces_description.txt: -------------------------------------------------------------------------------- 1 | Interface Status Protocol Description 2 | Gi1 up up 3 | Gi2 up up blah bleh 4 | Gi3 admin down down 5 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_ip_bgp_neighbors_192.168.0.2___inc_Prefixes_Current.txt: -------------------------------------------------------------------------------- 1 | Prefixes Current: 0 0 2 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_ip_bgp_neighbors_192.168.0.2___inc_router_ID.txt: -------------------------------------------------------------------------------- 1 | BGP version 4, remote router ID 0.0.0.0 2 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_ip_bgp_neighbors_192.168.0.2___section_Local_Policy.txt: -------------------------------------------------------------------------------- 1 | Local Policy Denied Prefixes: -------- ------- 2 | Total: 0 0 3 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_ip_bgp_summary.txt: -------------------------------------------------------------------------------- 1 | BGP router identifier 192.168.0.1, local AS number 65000 2 | BGP table version is 1, main routing table version 1 3 | 4 | Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 5 | 192.168.0.2 4 65001 0 0 1 0 0 never Idle 6 | 192.168.0.3 4 65010 0 0 1 0 0 never Active 7 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_ip_bgp_summary___begin_Neighbor.txt: -------------------------------------------------------------------------------- 1 | Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2 | 192.168.0.2 4 65001 0 0 1 0 0 never Idle 3 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_ip_interface_brief.txt: -------------------------------------------------------------------------------- 1 | Interface IP-Address OK? Method Status Protocol 2 | GigabitEthernet1 10.0.2.15 YES DHCP up up 3 | GigabitEthernet2 192.168.0.1 YES manual up up 4 | GigabitEthernet3 unassigned YES unset administratively down down 5 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_lldp_neighbors.txt: -------------------------------------------------------------------------------- 1 | Capability codes: 2 | (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device 3 | (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other 4 | 5 | Device ID Local Intf Hold-time Capability Port ID 6 | twb-sf-hpsw1 Gi1 120 B 17 7 | twb-sf-hpsw2 Gi2 120 B 18 8 | 9 | Total entries displayed: 2 10 | 11 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_lldp_neighbors_GigabitEthernet1_detail.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------ 2 | Chassis id: 0018.fe1e.b020 3 | Port id: 17 4 | Port Description: 17 5 | System Name: twb-sf-hpsw1 6 | 7 | System Description: 8 | ProCurve J9019A Switch 2510-24, revision Q.10.01, ROM Q.10.02 (/sw/code/build/harp(harp)) 9 | 10 | Time remaining: 93 seconds 11 | System Capabilities: B 12 | Enabled Capabilities: B 13 | Management Addresses: 14 | IP: 10.220.88.10 15 | Auto Negotiation - not supported 16 | Physical media capabilities - not advertised 17 | Media Attachment Unit type - not advertised 18 | Vlan ID: - not advertised 19 | 20 | 21 | Total entries displayed: 1 22 | 23 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_lldp_neighbors_GigabitEthernet2_detail.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------ 2 | Chassis id: 0018.fe1e.b020 3 | Port id: 18 4 | Port Description: 18 5 | System Name: twb-sf-hpsw2 6 | 7 | System Description: 8 | ProCurve J9019A Switch 2510-24, revision Q.10.01, ROM Q.10.02 (/sw/code/build/harp(harp)) 9 | 10 | Time remaining: 93 seconds 11 | System Capabilities: B 12 | Enabled Capabilities: B 13 | Management Addresses: 14 | IP: 10.220.88.11 15 | Auto Negotiation - not supported 16 | Physical media capabilities - not advertised 17 | Media Attachment Unit type - not advertised 18 | Vlan ID: - not advertised 19 | 20 | 21 | Total entries displayed: 1 22 | 23 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_mac-address-table.txt: -------------------------------------------------------------------------------- 1 | Destination Address Address Type VLAN Destination Port 2 | ------------------- ------------ ---- -------------------- 3 | 6400.f1cf.2cc6 Dynamic 1 Wlan-GigabitEthernet0 4 | a493.4cc1.67a7 Self 1 Vlan1 5 | 000c.2906.17d6 Dynamic 100 FastEthernet7 6 | 000c.2913.421b Dynamic 100 FastEthernet7 7 | 0018.0ab3.59f1 Dynamic 100 FastEthernet7 8 | 0018.dd32.1f7c Dynamic 100 FastEthernet6 9 | 0025.64f5.d352 Dynamic 100 FastEthernet7 10 | 0026.abb9.a503 Dynamic 100 FastEthernet4 11 | a493.4cc1.67a7 Self 100 Vlan100 12 | ac3a.7a1a.ba4b Dynamic 100 Wlan-GigabitEthernet0 13 | b0a7.376f.b3b4 Dynamic 100 FastEthernet7 14 | bc5f.f435.fa0e Dynamic 100 FastEthernet7 15 | dc3a.5e67.1a98 Dynamic 100 FastEthernet7 16 | dc3a.5ee2.6a95 Dynamic 100 Wlan-GigabitEthernet0 17 | f04f.7c92.5a45 Dynamic 100 Wlan-GigabitEthernet0 18 | 0009.b754.1a88 Dynamic 200 FastEthernet7 19 | 10bd.1801.a0b4 Dynamic 200 FastEthernet3 20 | 204c.9ed7.cb80 Dynamic 200 FastEthernet2 21 | a493.4cc1.67a7 Self 200 Vlan200 22 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_memory_statistics.txt: -------------------------------------------------------------------------------- 1 | Head Total(b) Used(b) Free(b) Lowest(b) Largest(b) 2 | Processor 7FFB80463010 2211712416 236260608 1975451808 1974933520 1312659580 3 | lsmpi_io 7FFB2C7611A8 6295128 6294304 824 824 412 4 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_ntp_associations.txt: -------------------------------------------------------------------------------- 1 | 2 | address ref clock st when poll reach delay offset disp 3 | +~129.6.15.28 .ACTS. 1 10 64 3 103.59 3.391 937.90 4 | *~24.56.178.140 .ACTS. 1 6 64 3 35.535 -26.338 63.457 5 | +~128.138.140.44 .NIST. 1 67 128 1 37.997 -23.927 187.58 6 | * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_proc_cpu.txt: -------------------------------------------------------------------------------- 1 | CPU utilization for five seconds: 0%/0%; one minute: 0%; five minutes: 0% 2 | PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process 3 | 1 1 10 100 0.00% 0.00% 0.00% 0 Chunk Manager 4 | 2 1 152 6 0.00% 0.00% 0.00% 0 Load Meter 5 | 3 0 1 0 0.00% 0.00% 0.00% 0 XOS async sync X 6 | 4 1 12 83 0.00% 0.00% 0.00% 0 RF Slave Main Th 7 | 5 0 1 0 0.00% 0.00% 0.00% 0 Retransmission o 8 | 6 0 1 0 0.00% 0.00% 0.00% 0 IPC ISSU Dispatc 9 | 7 0 1 0 0.00% 0.00% 0.00% 0 RO Notify Timers 10 | 8 75 100 750 0.00% 0.00% 0.00% 0 Check heaps 11 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_run___include_ntp_server.txt: -------------------------------------------------------------------------------- 1 | ntp server 192.168.0.1 prefer 2 | ntp server 17.72.148.53 3 | ntp server vrf NAPALM 37.187.56.220 4 | ntp server 2001:DB8:0:0:8:800:200C:417A version 4 5 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_run___include_snmp-server.txt: -------------------------------------------------------------------------------- 1 | snmp-server community public RO 11 2 | snmp-server community private RW 12 3 | snmp-server community public_no_acl RO 4 | snmp-server community public_named_acl RO ALLOW-SNMP-ACL 5 | snmp-server location 123 Anytown USA Rack 404 6 | snmp-server contact Config rev 028 7 | snmp-server chassis-id Asset Tag 54670 -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_run_interface_GigabitEthernet1.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 85 bytes 4 | ! 5 | interface GigabitEthernet1 6 | ip address dhcp 7 | negotiation auto 8 | no mop enabled 9 | end 10 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_run_interface_GigabitEthernet2.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 90 bytes 4 | ! 5 | interface GigabitEthernet2 6 | ip address 192.168.0.1 255.255.255.0 7 | negotiation auto 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_run_interface_GigabitEthernet3.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 77 bytes 4 | ! 5 | interface GigabitEthernet3 6 | no ip address 7 | shutdown 8 | negotiation auto 9 | end 10 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_running-config.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 1366 bytes 4 | ! 5 | ! Last configuration change at 18:41:02 UTC Thu Nov 24 2016 6 | ! 7 | version 15.5 8 | service timestamps debug datetime msec 9 | service timestamps log datetime msec 10 | no platform punt-keepalive disable-kernel-core 11 | platform console auto 12 | ! 13 | hostname CSR1 14 | ! 15 | boot-start-marker 16 | boot-end-marker 17 | ! 18 | ! 19 | enable password cisco 20 | ! 21 | aaa new-model 22 | ! 23 | ! 24 | aaa authentication login default local 25 | aaa authorization exec default local 26 | ! 27 | ! 28 | ! 29 | ! 30 | ! 31 | aaa session-id common 32 | ! 33 | ip vrf MGMT 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | 44 | 45 | ip domain name example.local 46 | 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | ! 54 | ! 55 | ! 56 | ! 57 | subscriber templating 58 | ! 59 | multilink bundle-name authenticated 60 | ! 61 | ! 62 | ! 63 | ! 64 | ! 65 | ! 66 | ! 67 | ! 68 | ! 69 | ! 70 | ! 71 | ! 72 | ! 73 | license udi pid CSR1000V sn 9OSEGKJXRHE 74 | spanning-tree extend system-id 75 | ! 76 | username cisco privilege 15 password 0 cisco 77 | ! 78 | redundancy 79 | ! 80 | ! 81 | ! 82 | ! 83 | ! 84 | ! 85 | ! 86 | ! 87 | ! 88 | ! 89 | ! 90 | ! 91 | ! 92 | ! 93 | ! 94 | ! 95 | ! 96 | ! 97 | ! 98 | ! 99 | ! 100 | ! 101 | ! 102 | interface Loopback0 103 | ip address 1.1.1.1 255.255.255.255 104 | ! 105 | interface GigabitEthernet1 106 | ip vrf forwarding MGMT 107 | ip address 192.168.35.121 255.255.255.0 108 | negotiation auto 109 | ! 110 | interface GigabitEthernet2 111 | ip address 10.1.1.1 255.255.255.0 112 | negotiation auto 113 | ! 114 | interface GigabitEthernet3 115 | no ip address 116 | shutdown 117 | negotiation auto 118 | ! 119 | router ospf 1 120 | redistribute connected subnets 121 | network 10.1.1.0 0.0.0.255 area 0 122 | ! 123 | ! 124 | virtual-service csr_mgmt 125 | ! 126 | ip forward-protocol nd 127 | ! 128 | no ip http server 129 | no ip http secure-server 130 | ! 131 | ! 132 | ! 133 | ! 134 | ! 135 | ! 136 | control-plane 137 | ! 138 | ! 139 | ! 140 | ! 141 | ! 142 | ! 143 | ! 144 | ! 145 | ! 146 | ! 147 | line con 0 148 | line vty 0 4 149 | ! 150 | ! 151 | end -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_startup-config.txt: -------------------------------------------------------------------------------- 1 | ! 2 | ! Last configuration change at 18:41:02 UTC Thu Nov 24 2016 3 | ! 4 | version 15.5 5 | service timestamps debug datetime msec 6 | service timestamps log datetime msec 7 | no platform punt-keepalive disable-kernel-core 8 | platform console auto 9 | ! 10 | hostname CSR1 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | enable password cisco 17 | ! 18 | aaa new-model 19 | ! 20 | ! 21 | aaa authentication login default local 22 | aaa authorization exec default local 23 | ! 24 | ! 25 | ! 26 | ! 27 | ! 28 | aaa session-id common 29 | ! 30 | ip vrf MGMT 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | 41 | 42 | ip domain name example.local 43 | 44 | ! 45 | ! 46 | ! 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | ! 54 | subscriber templating 55 | ! 56 | multilink bundle-name authenticated 57 | ! 58 | ! 59 | ! 60 | ! 61 | ! 62 | ! 63 | ! 64 | ! 65 | ! 66 | ! 67 | ! 68 | ! 69 | ! 70 | license udi pid CSR1000V sn 9OSEGKJXRHE 71 | spanning-tree extend system-id 72 | ! 73 | username cisco privilege 15 password 0 cisco 74 | ! 75 | redundancy 76 | ! 77 | ! 78 | ! 79 | ! 80 | ! 81 | ! 82 | ! 83 | ! 84 | ! 85 | ! 86 | ! 87 | ! 88 | ! 89 | ! 90 | ! 91 | ! 92 | ! 93 | ! 94 | ! 95 | ! 96 | ! 97 | ! 98 | ! 99 | interface Loopback0 100 | ip address 1.1.1.1 255.255.255.255 101 | ! 102 | interface GigabitEthernet1 103 | ip vrf forwarding MGMT 104 | ip address 192.168.35.121 255.255.255.0 105 | negotiation auto 106 | ! 107 | interface GigabitEthernet2 108 | ip address 10.1.1.1 255.255.255.0 109 | negotiation auto 110 | ! 111 | interface GigabitEthernet3 112 | no ip address 113 | shutdown 114 | negotiation auto 115 | ! 116 | router ospf 1 117 | redistribute connected subnets 118 | network 10.1.1.0 0.0.0.255 area 0 119 | ! 120 | ! 121 | virtual-service csr_mgmt 122 | ! 123 | ip forward-protocol nd 124 | ! 125 | no ip http server 126 | no ip http secure-server 127 | ! 128 | ! 129 | ! 130 | ! 131 | ! 132 | ! 133 | control-plane 134 | ! 135 | ! 136 | ! 137 | ! 138 | ! 139 | ! 140 | ! 141 | ! 142 | ! 143 | ! 144 | line con 0 145 | line vty 0 4 146 | ! 147 | ! 148 | end -------------------------------------------------------------------------------- /test/unit/ios/mock_data/show_version.txt: -------------------------------------------------------------------------------- 1 | Cisco IOS XE Software, Version 03.13.04.S - Extended Support Release 2 | Cisco IOS Software, CSR1000V Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.4(3)S4, RELEASE SOFTWARE (fc3) 3 | Technical Support: http://www.cisco.com/techsupport 4 | Copyright (c) 1986-2015 by Cisco Systems, Inc. 5 | Compiled Mon 05-Oct-15 08:35 by mcpre 6 | 7 | 8 | Cisco IOS-XE software, Copyright (c) 2005-2015 by cisco Systems, Inc. 9 | All rights reserved. Certain components of Cisco IOS-XE software are 10 | licensed under the GNU General Public License ("GPL") Version 2.0. The 11 | software code licensed under GPL Version 2.0 is free software that comes 12 | with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such 13 | GPL code under the terms of GPL Version 2.0. For more details, see the 14 | documentation or "License Notice" file accompanying the IOS-XE software, 15 | or the applicable URL provided on the flyer accompanying the IOS-XE 16 | software. 17 | 18 | 19 | ROM: IOS-XE ROMMON 20 | 21 | vagrant_box uptime is 44 minutes 22 | Uptime for this control processor is 45 minutes 23 | System returned to ROM by reload 24 | System image file is "bootflash:packages.conf" 25 | Last reload reason: 26 | 27 | 28 | 29 | This product contains cryptographic features and is subject to United 30 | States and local country laws governing import, export, transfer and 31 | use. Delivery of Cisco cryptographic products does not imply 32 | third-party authority to import, export, distribute or use encryption. 33 | Importers, exporters, distributors and users are responsible for 34 | compliance with U.S. and local country laws. By using this product you 35 | agree to comply with applicable laws and regulations. If you are unable 36 | to comply with U.S. and local laws, return this product immediately. 37 | 38 | A summary of U.S. laws governing Cisco cryptographic products may be found at: 39 | http://www.cisco.com/wwl/export/crypto/tool/stqrg.html 40 | 41 | If you require further assistance please contact us by sending email to 42 | export@cisco.com. 43 | 44 | License Level: ax 45 | License Type: Default. No valid license found. 46 | Next reload license Level: ax 47 | 48 | cisco CSR1000V (VXE) processor (revision VXE) with 2160071K/6147K bytes of memory. 49 | Processor board ID 9F61EQ6Z828 50 | 3 Gigabit Ethernet interfaces 51 | 32768K bytes of non-volatile configuration memory. 52 | 3988440K bytes of physical memory. 53 | 7774207K bytes of virtual hard disk at bootflash:. 54 | 55 | Configuration register is 0x2102 56 | 57 | -------------------------------------------------------------------------------- /test/unit/ios/mock_data/traceroute_8.8.8.8.txt: -------------------------------------------------------------------------------- 1 | Type escape sequence to abort. 2 | Tracing the route to google-public-dns-a.google.com (8.8.8.8) 3 | VRF info: (vrf in name/id, vrf out name/id) 4 | 1 10.0.4.2 14 msec 11 msec 11 msec 5 | 2 BSN-access.dynamic.siol.net (213.250.19.90) 175 msec 157 msec 157 msec 6 | 3 95.176.241.222 178 msec 266 msec 208 msec 7 | 4 BSN-250-1-130.static.siol.net (213.250.1.130) 320 msec 300 msec 138 msec 8 | 5 BSN-209.85.248.115.static.siol.net (209.85.248.115) 122 msec 9 | 209.85.248.217 157 msec 10 | 72.14.237.184 195 msec 11 | 6 BSN-0.static.siol.net (209.85.248.1) 122 msec 12 | 209.85.248.217 157 msec 195 msec 13 | 7 * 14 | 209.85.1.1 157 msec 195 msec 15 | 8 * * * 16 | 9 google-public-dns-a.google.com (8.8.8.8) 213 msec 210 msec 197 msec -------------------------------------------------------------------------------- /test/unit/ios/new_good.conf: -------------------------------------------------------------------------------- 1 | version 15.4 2 | service timestamps debug datetime msec 3 | service timestamps log datetime msec 4 | no platform punt-keepalive disable-kernel-core 5 | platform console virtual 6 | ! 7 | hostname vagrant_box 8 | ! 9 | boot-start-marker 10 | boot-end-marker 11 | ! 12 | ! 13 | enable secret 5 $1$nc08$bizeEFbgCBKjZP4nurNCd. 14 | enable password vagrant 15 | ! 16 | aaa new-model 17 | ! 18 | ! 19 | aaa authorization exec default local 20 | ! 21 | ! 22 | ! 23 | ! 24 | ! 25 | aaa session-id common 26 | ! 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | 36 | 37 | ip domain name acme.com 38 | 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ! 48 | ! 49 | subscriber templating 50 | ! 51 | multilink bundle-name authenticated 52 | ! 53 | ! 54 | ! 55 | license udi pid CSR1000V sn 9EKBH55S58T 56 | archive 57 | path bootflash:archive 58 | write-memory 59 | spanning-tree extend system-id 60 | ! 61 | username vagrant privilege 15 password 0 vagrant 62 | ! 63 | redundancy 64 | mode none 65 | ! 66 | ! 67 | ! 68 | ! 69 | ! 70 | ! 71 | ! 72 | ! 73 | ! 74 | ! 75 | ! 76 | ! 77 | ! 78 | ! 79 | ! 80 | ! 81 | ! 82 | ! 83 | ! 84 | ! 85 | ! 86 | ! 87 | interface GigabitEthernet1 88 | ip address dhcp 89 | negotiation auto 90 | no mop enabled 91 | ! 92 | interface GigabitEthernet2 93 | ip address 172.20.0.1 255.255.255.0 94 | shutdown 95 | negotiation auto 96 | ! 97 | interface GigabitEthernet3 98 | no ip address 99 | shutdown 100 | negotiation auto 101 | ! 102 | router bgp 65000 103 | bgp log-neighbor-changes 104 | neighbor 1.1.1.1 remote-as 12345 105 | ! 106 | ! 107 | virtual-service csr_mgmt 108 | ! 109 | ip forward-protocol nd 110 | ! 111 | no ip http server 112 | no ip http secure-server 113 | ip ssh version 2 114 | ip scp server enable 115 | ! 116 | ! 117 | ! 118 | ! 119 | ! 120 | ! 121 | control-plane 122 | ! 123 | ! 124 | line con 0 125 | stopbits 1 126 | line vty 0 4 127 | password vagrant 128 | ! 129 | ! 130 | end 131 | -------------------------------------------------------------------------------- /test/unit/ios/new_good.diff: -------------------------------------------------------------------------------- 1 | interface GigabitEthernet2 2 | +ip address 172.20.0.1 255.255.255.0 3 | +router bgp 65000 4 | +bgp log-neighbor-changes 5 | +neighbor 1.1.1.1 remote-as 12345 6 | interface GigabitEthernet2 7 | -no ip address 8 | 9 | -------------------------------------------------------------------------------- /test/unit/ios/new_typo.conf: -------------------------------------------------------------------------------- 1 | version 15.4 2 | service timestamps debug datetime msec 3 | service timestamps log datetime msec 4 | no platform punt-keepalive disable-kernel-core 5 | platform console virtual 6 | ! 7 | hostname vagrant_box 8 | ! 9 | boot-start-marker 10 | boot-end-marker 11 | ! 12 | ! 13 | enable secret 5 $1$nc08$bizeEFbgCBKjZP4nurNCd. 14 | enable password vagrant 15 | ! 16 | aaa new-model 17 | ! 18 | ! 19 | aaa authorization exec default local 20 | ! 21 | ! 22 | ! 23 | ! 24 | ! 25 | aaa session-id common 26 | ! 27 | ! 28 | ! 29 | ! 30 | ! 31 | ! 32 | ! 33 | ! 34 | ! 35 | 36 | 37 | ip domain name acme.com 38 | 39 | ! 40 | ! 41 | ! 42 | ! 43 | asdasdasdasd 44 | ! 45 | ! 46 | ! 47 | ! 48 | ! 49 | subscriber templating 50 | ! 51 | multilink bundle-name authenticated 52 | ! 53 | ! 54 | ! 55 | license udi pid CSR1000V sn 9EKBH55S58T 56 | archive 57 | path bootflash:archive 58 | write-memory 59 | spanning-tree extend system-id 60 | ! 61 | username vagrant privilege 15 password 0 vagrant 62 | ! 63 | redundancy 64 | mode none 65 | ! 66 | ! 67 | ! 68 | ! 69 | ! 70 | ! 71 | ! 72 | ! 73 | ! 74 | ! 75 | ! 76 | ! 77 | ! 78 | ! 79 | ! 80 | ! 81 | ! 82 | ! 83 | ! 84 | ! 85 | ! 86 | ! 87 | interface GigabitEthernet1 88 | ip address dhcp 89 | negotiation auto 90 | no mop enabled 91 | ! 92 | interface GigabitEthernet2 93 | ip address 172.20.0.1 255.255.255.0 94 | shutdown 95 | negotiation auto 96 | ! 97 | interface GigabitEthernet3 98 | no ip address 99 | shutdown 100 | negotiation auto 101 | ! 102 | router bgp 65000 103 | bgp log-neighbor-changes 104 | neighbor 1.1.1.1 remote-as 12345 105 | ! 106 | ! 107 | virtual-service csr_mgmt 108 | ! 109 | ip forward-protocol nd 110 | ! 111 | no ip http server 112 | no ip http secure-server 113 | ip ssh version 2 114 | ip scp server enable 115 | ! 116 | ! 117 | ! 118 | ! 119 | ! 120 | ! 121 | control-plane 122 | ! 123 | ! 124 | line con 0 125 | stopbits 1 126 | line vty 0 4 127 | password vagrant 128 | ! 129 | ! 130 | end 131 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_arp_table/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "interface": "Vlan20", 3 | "ip": "172.29.50.1", 4 | "mac": "84:B8:02:76:AC:0E", 5 | "age": 8.0 6 | }, { 7 | "interface": "Vlan20", 8 | "ip": "172.29.50.2", 9 | "mac": "00:19:07:25:34:4A", 10 | "age": 221.0 11 | }, { 12 | "interface": "Vlan20", 13 | "ip": "172.29.50.3", 14 | "mac": "00:24:F7:DD:77:41", 15 | "age": 0.0 16 | }, { 17 | "interface": "Vlan20", 18 | "ip": "172.29.50.10", 19 | "mac": "68:05:CA:12:71:C2", 20 | "age": 37.0 21 | }, { 22 | "interface": "Vlan41", 23 | "ip": "172.29.52.33", 24 | "mac": "84:B8:02:76:AC:0E", 25 | "age": 61.0 26 | }, { 27 | "interface": "Vlan41", 28 | "ip": "172.29.52.34", 29 | "mac": "00:24:F7:DD:77:43", 30 | "age": 0.0 31 | }, { 32 | "interface": "Vlan41", 33 | "ip": "172.29.52.40", 34 | "mac": "A0:99:9B:1C:DF:A7", 35 | "age": 3.0 36 | }, { 37 | "interface": "Vlan41", 38 | "ip": "192.168.81.34", 39 | "mac": "00:24:F7:DD:77:43", 40 | "age": 0.0 41 | }] 42 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_arp_table/normal/show_arp___exclude_Incomplete.txt: -------------------------------------------------------------------------------- 1 | Protocol Address Age (min) Hardware Addr Type Interface 2 | Internet 172.29.50.1 8 84b8.0276.ac0e ARPA Vlan20 3 | Internet 172.29.50.2 221 0019.0725.344a ARPA Vlan20 4 | Internet 172.29.50.3 - 0024.f7dd.7741 ARPA Vlan20 5 | Internet 172.29.50.10 37 6805.ca12.71c2 ARPA Vlan20 6 | Internet 172.29.52.33 61 84b8.0276.ac0e ARPA Vlan41 7 | Internet 172.29.52.34 - 0024.f7dd.7743 ARPA Vlan41 8 | Internet 172.29.52.40 3 a099.9b1c.dfa7 ARPA Vlan41 9 | Internet 192.168.81.34 - 0024.f7dd.7743 ARPA Vlan41 10 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_arp_table/static_arp_entry/expected_result.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "interface": "", 3 | "ip": "172.29.50.1", 4 | "mac": "84:B8:02:76:AC:0E", 5 | "age": 8.0 6 | }, { 7 | "interface": "Vlan20", 8 | "ip": "172.29.50.2", 9 | "mac": "00:19:07:25:34:4A", 10 | "age": 221.0 11 | }, { 12 | "interface": "Vlan20", 13 | "ip": "172.29.50.3", 14 | "mac": "00:24:F7:DD:77:41", 15 | "age": 0.0 16 | }, { 17 | "interface": "Vlan20", 18 | "ip": "172.29.50.10", 19 | "mac": "68:05:CA:12:71:C2", 20 | "age": 37.0 21 | }, { 22 | "interface": "Vlan41", 23 | "ip": "172.29.52.33", 24 | "mac": "84:B8:02:76:AC:0E", 25 | "age": 61.0 26 | }, { 27 | "interface": "Vlan41", 28 | "ip": "172.29.52.34", 29 | "mac": "00:24:F7:DD:77:43", 30 | "age": 0.0 31 | }, { 32 | "interface": "Vlan41", 33 | "ip": "172.29.52.40", 34 | "mac": "A0:99:9B:1C:DF:A7", 35 | "age": 3.0 36 | }, { 37 | "interface": "Vlan41", 38 | "ip": "192.168.81.34", 39 | "mac": "00:24:F7:DD:77:43", 40 | "age": 0.0 41 | }] 42 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_arp_table/static_arp_entry/show_arp___exclude_Incomplete.txt: -------------------------------------------------------------------------------- 1 | Protocol Address Age (min) Hardware Addr Type Interface 2 | Internet 172.29.50.1 8 84b8.0276.ac0e ARPA 3 | Internet 172.29.50.2 221 0019.0725.344a ARPA Vlan20 4 | Internet 172.29.50.3 - 0024.f7dd.7741 ARPA Vlan20 5 | Internet 172.29.50.10 37 6805.ca12.71c2 ARPA Vlan20 6 | Internet 172.29.52.33 61 84b8.0276.ac0e ARPA Vlan41 7 | Internet 172.29.52.34 - 0024.f7dd.7743 ARPA Vlan41 8 | Internet 172.29.52.40 3 a099.9b1c.dfa7 ARPA Vlan41 9 | Internet 192.168.81.34 - 0024.f7dd.7743 ARPA Vlan41 10 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_bgp_neighbors/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "global": { 3 | "router_id": "192.168.0.1", 4 | "peers": { 5 | "192.168.0.2": { 6 | "is_enabled": true, 7 | "uptime": -1, 8 | "remote_as": 65001, 9 | "description": "", 10 | "remote_id": "0.0.0.0", 11 | "local_as": 65000, 12 | "is_up": false, 13 | "address_family": { 14 | "ipv4": { 15 | "sent_prefixes": -1, 16 | "accepted_prefixes": -1, 17 | "received_prefixes": -1 18 | } 19 | } 20 | }, 21 | "192.168.0.3": { 22 | "is_enabled": true, 23 | "uptime": -1, 24 | "remote_as": 65010, 25 | "description": "", 26 | "remote_id": "192.168.0.3", 27 | "local_as": 65000, 28 | "is_up": false, 29 | "address_family": { 30 | "ipv4": { 31 | "sent_prefixes": -1, 32 | "accepted_prefixes": -1, 33 | "received_prefixes": -1 34 | } 35 | } 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_bgp_neighbors/normal/show_bgp_all_summary.txt: -------------------------------------------------------------------------------- 1 | For address family: IPv4 Unicast 2 | BGP router identifier 192.168.0.1, local AS number 65000 3 | BGP table version is 1, main routing table version 1 4 | 5 | Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 6 | 192.168.0.2 4 65001 0 0 1 0 0 never Idle 7 | 192.168.0.3 4 65010 0 0 1 0 0 never Active 8 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv4_unicast_neighbors.txt: -------------------------------------------------------------------------------- 1 | BGP neighbor is 192.168.0.2, remote AS 65001, internal link 2 | Inherits from template iBGP for session parameters 3 | BGP version 4, remote router ID 0.0.0.0 4 | 5 | For address family: IPv4 Unicast 6 | Sent Rcvd 7 | Prefix activity: ---- ---- 8 | Prefixes Current: 0 0 9 | 10 | Outbound Inbound 11 | Local Policy Denied Prefixes: -------- ------- 12 | Total: 0 0 13 | 14 | BGP neighbor is 192.168.0.3, remote AS 65010, internal link 15 | Inherits from template iBGP for session parameters 16 | BGP version 4, remote router ID 192.168.0.3 17 | 18 | For address family: IPv4 Unicast 19 | Sent Rcvd 20 | Prefix activity: ---- ---- 21 | Prefixes Current: 0 0 22 | 23 | Outbound Inbound 24 | Local Policy Denied Prefixes: -------- ------- 25 | Total: 0 0 26 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv6_unicast_neighbors.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/napalm-automation/napalm-ios/7bbbc6a4d9f70a5b8cf32b7c7072a7ab437ddb81/test/unit/mocked_data/test_get_bgp_neighbors/normal/show_bgp_ipv6_unicast_neighbors.txt -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_bgp_neighbors/real_life/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "global": { 3 | "router_id": "10.0.1.1", 4 | "peers": { 5 | "10.0.0.2": { 6 | "is_enabled": true, 7 | "uptime": 4838400, 8 | "remote_as": 65000, 9 | "description": "internal-2", 10 | "remote_id": "10.0.1.2", 11 | "local_as": 65000, 12 | "is_up": true, 13 | "address_family": { 14 | "ipv4": { 15 | "sent_prefixes": 637213, 16 | "accepted_prefixes": 3142, 17 | "received_prefixes": 3142 18 | }, 19 | "ipv6": { 20 | "sent_prefixes": 36714, 21 | "accepted_prefixes": 148, 22 | "received_prefixes": 148 23 | } 24 | } 25 | }, 26 | "10.0.0.3": { 27 | "is_enabled": true, 28 | "uptime": 133200, 29 | "remote_as": 65000, 30 | "description": "internal-3", 31 | "remote_id": "10.0.1.3", 32 | "local_as": 65000, 33 | "is_up": true, 34 | "address_family": { 35 | "ipv4": { 36 | "sent_prefixes": 966, 37 | "accepted_prefixes": 1, 38 | "received_prefixes": 1 39 | }, 40 | "ipv6": { 41 | "sent_prefixes": 105, 42 | "accepted_prefixes": 2, 43 | "received_prefixes": 2 44 | } 45 | } 46 | }, 47 | "192.168.0.1": { 48 | "is_enabled": true, 49 | "uptime": 3888000, 50 | "remote_as": 65001, 51 | "description": "external-1", 52 | "remote_id": "192.168.1.1", 53 | "local_as": 65000, 54 | "is_up": true, 55 | "address_family": { 56 | "ipv4": { 57 | "sent_prefixes": 709, 58 | "accepted_prefixes": 0, 59 | "received_prefixes": 0 60 | } 61 | } 62 | }, 63 | "192.168.0.2": { 64 | "is_enabled": true, 65 | "uptime": -1, 66 | "remote_as": 65002, 67 | "description": "external-2", 68 | "remote_id": "0.0.0.0", 69 | "local_as": 65000, 70 | "is_up": false, 71 | "address_family": { 72 | "ipv4": { 73 | "sent_prefixes": -1, 74 | "accepted_prefixes": -1, 75 | "received_prefixes": -1 76 | } 77 | } 78 | }, 79 | "192.168.0.3": { 80 | "is_enabled": false, 81 | "uptime": -1, 82 | "remote_as": 65003, 83 | "description": "external-3", 84 | "remote_id": "0.0.0.0", 85 | "local_as": 65000, 86 | "is_up": false, 87 | "address_family": { 88 | "ipv4": { 89 | "sent_prefixes": -1, 90 | "accepted_prefixes": -1, 91 | "received_prefixes": -1 92 | } 93 | } 94 | }, 95 | "192.168.0.4": { 96 | "is_enabled": true, 97 | "uptime": 16243200, 98 | "remote_as": 65004, 99 | "description": "external-4", 100 | "remote_id": "192.168.1.4", 101 | "local_as": 65000, 102 | "is_up": true, 103 | "address_family": { 104 | "ipv4": { 105 | "sent_prefixes": 213, 106 | "accepted_prefixes": 629700, 107 | "received_prefixes": 629700 108 | } 109 | } 110 | }, 111 | "2001:db8::1": { 112 | "is_enabled": true, 113 | "uptime": 3456000, 114 | "remote_as": 65001, 115 | "description": "external-1", 116 | "remote_id": "192.168.1.1", 117 | "local_as": 65000, 118 | "is_up": true, 119 | "address_family": { 120 | "ipv6": { 121 | "sent_prefixes": 35, 122 | "accepted_prefixes": 0, 123 | "received_prefixes": 0 124 | } 125 | } 126 | }, 127 | "2001:db8::2": { 128 | "is_enabled": true, 129 | "uptime": 10713600, 130 | "remote_as": 65002, 131 | "description": "external-2", 132 | "remote_id": "192.168.1.2", 133 | "local_as": 65000, 134 | "is_up": true, 135 | "address_family": { 136 | "ipv6": { 137 | "sent_prefixes": 36, 138 | "accepted_prefixes": 1, 139 | "received_prefixes": 1 140 | } 141 | } 142 | }, 143 | "2001:db8::3": { 144 | "is_enabled": false, 145 | "uptime": -1, 146 | "remote_as": 65003, 147 | "description": "external-3", 148 | "remote_id": "0.0.0.0", 149 | "local_as": 65000, 150 | "is_up": false, 151 | "address_family": { 152 | "ipv6": { 153 | "sent_prefixes": -1, 154 | "accepted_prefixes": -1, 155 | "received_prefixes": -1 156 | } 157 | } 158 | }, 159 | "2001:db8::4": { 160 | "is_enabled": true, 161 | "uptime": 16243200, 162 | "remote_as": 65004, 163 | "description": "external-4", 164 | "remote_id": "192.168.1.4", 165 | "local_as": 65000, 166 | "is_up": true, 167 | "address_family": { 168 | "ipv6": { 169 | "sent_prefixes": 29, 170 | "accepted_prefixes": 36387, 171 | "received_prefixes": 36387 172 | } 173 | } 174 | } 175 | } 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_bgp_neighbors/real_life/show_bgp_all_summary.txt: -------------------------------------------------------------------------------- 1 | For address family: IPv4 Unicast 2 | BGP router identifier 10.0.1.1, local AS number 65000 3 | BGP table version is 1011343585, main routing table version 1011343585 4 | 647707 network entries using 160631336 bytes of memory 5 | 5657305 path entries using 678876600 bytes of memory 6 | 80471 multipath network entries and 160942 multipath paths 7 | 1000955/108586 BGP path/bestpath attribute entries using 248236840 bytes of memory 8 | 70 BGP rrinfo entries using 2800 bytes of memory 9 | 699319 BGP AS-PATH entries using 33422320 bytes of memory 10 | 53834 BGP community entries using 10873404 bytes of memory 11 | 212 BGP extended community entries using 7834 bytes of memory 12 | 6267 BGP route-map cache entries using 401088 bytes of memory 13 | 236 BGP filter-list cache entries using 7552 bytes of memory 14 | BGP using 1132459774 total bytes of memory 15 | 13548 received paths for inbound soft reconfiguration 16 | BGP activity 8526435/7841854 prefixes, 408323088/402326018 paths, scan interval 60 secs 17 | 18 | Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 19 | 10.0.0.2 4 65000 1336020 64337701 1011343614 0 0 8w0d 3143 20 | 192.168.0.1 4 65001 71798 138808 1011343239 0 0 6w3d 0 21 | 192.168.0.2 4 65002 0 0 1 0 0 never Active 22 | 192.168.0.3 4 65003 0 0 1 0 0 never Idle (Admin) 23 | 10.0.0.3 4 65000 2497 4399 1011343631 0 0 1d13h 1 24 | 192.168.0.4 4 65004 46122421 675536 1011343239 0 0 26w6d 629783 25 | 26 | For address family: IPv6 Unicast 27 | BGP router identifier 10.0.1.1, local AS number 65000 28 | BGP table version is 155362951, main routing table version 155362951 29 | 36697 network entries using 9981584 bytes of memory 30 | 339404 path entries using 48874176 bytes of memory 31 | 17496 multipath network entries and 34992 multipath paths 32 | 150389/17120 BGP path/bestpath attribute entries using 37296472 bytes of memory 33 | 70 BGP rrinfo entries using 2800 bytes of memory 34 | 699320 BGP AS-PATH entries using 33422380 bytes of memory 35 | 53834 BGP community entries using 10873404 bytes of memory 36 | 212 BGP extended community entries using 7834 bytes of memory 37 | 6274 BGP route-map cache entries using 401536 bytes of memory 38 | 236 BGP filter-list cache entries using 7552 bytes of memory 39 | BGP using 140867738 total bytes of memory 40 | 718 received paths for inbound soft reconfiguration 41 | BGP activity 8526435/7841854 prefixes, 408323098/402326025 paths, scan interval 60 secs 42 | 43 | Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 44 | 2001:DB8::4 45 | 4 65004 9900690 612449 155362939 0 0 26w6d 36391 46 | 2001:DB8::1 47 | 4 65001 63768 71032 155362939 0 0 5w5d 0 48 | 2001:DB8::2 49 | 4 65002 197924 214323 155362939 0 0 17w5d 1 50 | 2001:DB8::3 51 | 4 65003 0 0 1 0 0 never Idle (Admin) 52 | 10.0.0.2 4 65000 1336020 64337708 155362951 0 0 8w0d 148 53 | 10.0.0.3 4 65000 2497 4399 155362952 0 0 1d13h 2 54 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_bgp_neighbors/regex_strip/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "global": { 3 | "router_id": "192.168.0.1", 4 | "peers": { 5 | "192.168.0.2": { 6 | "is_enabled": true, 7 | "uptime": -1, 8 | "remote_as": 65001, 9 | "description": "", 10 | "remote_id": "0.0.0.0", 11 | "local_as": 65000, 12 | "is_up": false, 13 | "address_family": { 14 | "ipv4": { 15 | "sent_prefixes": -1, 16 | "accepted_prefixes": -1, 17 | "received_prefixes": -1 18 | } 19 | } 20 | }, 21 | "192.168.0.3": { 22 | "is_enabled": true, 23 | "uptime": -1, 24 | "remote_as": 65010, 25 | "description": "", 26 | "remote_id": "192.168.0.3", 27 | "local_as": 65000, 28 | "is_up": false, 29 | "address_family": { 30 | "ipv4": { 31 | "sent_prefixes": -1, 32 | "accepted_prefixes": -1, 33 | "received_prefixes": -1 34 | } 35 | } 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_bgp_neighbors/regex_strip/show_bgp_all_summary.txt: -------------------------------------------------------------------------------- 1 | For address family: IPv4 Unicast 2 | BGP router identifier 192.168.0.1, local AS number 65000 3 | BGP table version is 1, main routing table version 1 4 | 5 | Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 6 | *192.168.0.2 7 | 4 65001 0 0 1 0 0 never Idle 8 | 192.168.0.3 4 65010 0 0 1 0 0 never Active 9 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_bgp_neighbors/regex_strip/show_bgp_ipv4_unicast_neighbors.txt: -------------------------------------------------------------------------------- 1 | BGP neighbor is 192.168.0.2, remote AS 65001, internal link 2 | Inherits from template iBGP for session parameters 3 | BGP version 4, remote router ID 0.0.0.0 4 | 5 | For address family: IPv4 Unicast 6 | Sent Rcvd 7 | Prefix activity: ---- ---- 8 | Prefixes Current: 0 0 9 | 10 | Outbound Inbound 11 | Local Policy Denied Prefixes: -------- ------- 12 | Total: 0 0 13 | 14 | BGP neighbor is 192.168.0.3, remote AS 65010, internal link 15 | Inherits from template iBGP for session parameters 16 | BGP version 4, remote router ID 192.168.0.3 17 | 18 | For address family: IPv4 Unicast 19 | Sent Rcvd 20 | Prefix activity: ---- ---- 21 | Prefixes Current: 0 0 22 | 23 | Outbound Inbound 24 | Local Policy Denied Prefixes: -------- ------- 25 | Total: 0 0 26 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_bgp_neighbors/regex_strip/show_bgp_ipv6_unicast_neighbors.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/napalm-automation/napalm-ios/7bbbc6a4d9f70a5b8cf32b7c7072a7ab437ddb81/test/unit/mocked_data/test_get_bgp_neighbors/regex_strip/show_bgp_ipv6_unicast_neighbors.txt -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_config/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "startup": "!\n! Last configuration change at 18:41:02 UTC Thu Nov 24 2016\n!\nversion 15.5\nservice timestamps debug datetime msec\nservice timestamps log datetime msec\nno platform punt-keepalive disable-kernel-core\nplatform console auto\n!\nhostname CSR1\n!\nboot-start-marker\nboot-end-marker\n!\n!\nenable password cisco\n!\naaa new-model\n!\n!\naaa authentication login default local\naaa authorization exec default local\n!\n!\n!\n!\n!\naaa session-id common\n!\nip vrf MGMT\n!\n!\n!\n!\n!\n!\n!\n!\n!\n\n\nip domain name example.local\n\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\nsubscriber templating\n!\nmultilink bundle-name authenticated\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\nlicense udi pid CSR1000V sn 9OSEGKJXRHE\nspanning-tree extend system-id\n!\nusername cisco privilege 15 password 0 cisco\n!\nredundancy\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\ninterface Loopback0\n ip address 1.1.1.1 255.255.255.255\n!\ninterface GigabitEthernet1\n ip vrf forwarding MGMT\n ip address 192.168.35.121 255.255.255.0\n negotiation auto\n!\ninterface GigabitEthernet2\n ip address 10.1.1.1 255.255.255.0\n negotiation auto\n!\ninterface GigabitEthernet3\n no ip address\n shutdown\n negotiation auto\n!\nrouter ospf 1\n redistribute connected subnets\n network 10.1.1.0 0.0.0.255 area 0\n!\n!\nvirtual-service csr_mgmt\n!\nip forward-protocol nd\n!\nno ip http server\nno ip http secure-server\n!\n!\n!\n!\n!\n!\ncontrol-plane\n!\n !\n !\n !\n !\n!\n!\n!\n!\n!\nline con 0\nline vty 0 4\n!\n!\nend", 3 | "running": "Building configuration...\n\nCurrent configuration : 1366 bytes\n!\n! Last configuration change at 18:41:02 UTC Thu Nov 24 2016\n!\nversion 15.5\nservice timestamps debug datetime msec\nservice timestamps log datetime msec\nno platform punt-keepalive disable-kernel-core\nplatform console auto\n!\nhostname CSR1\n!\nboot-start-marker\nboot-end-marker\n!\n!\nenable password cisco\n!\naaa new-model\n!\n!\naaa authentication login default local\naaa authorization exec default local\n!\n!\n!\n!\n!\naaa session-id common\n!\nip vrf MGMT\n!\n!\n!\n!\n!\n!\n!\n!\n!\n\n\nip domain name example.local\n\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\nsubscriber templating\n!\nmultilink bundle-name authenticated\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\nlicense udi pid CSR1000V sn 9OSEGKJXRHE\nspanning-tree extend system-id\n!\nusername cisco privilege 15 password 0 cisco\n!\nredundancy\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\n!\ninterface Loopback0\n ip address 1.1.1.1 255.255.255.255\n!\ninterface GigabitEthernet1\n ip vrf forwarding MGMT\n ip address 192.168.35.121 255.255.255.0\n negotiation auto\n!\ninterface GigabitEthernet2\n ip address 10.1.1.1 255.255.255.0\n negotiation auto\n!\ninterface GigabitEthernet3\n no ip address\n shutdown\n negotiation auto\n!\nrouter ospf 1\n redistribute connected subnets\n network 10.1.1.0 0.0.0.255 area 0\n!\n!\nvirtual-service csr_mgmt\n!\nip forward-protocol nd\n!\nno ip http server\nno ip http secure-server\n!\n!\n!\n!\n!\n!\ncontrol-plane\n!\n !\n !\n !\n !\n!\n!\n!\n!\n!\nline con 0\nline vty 0 4\n!\n!\nend", 4 | "candidate": "" 5 | } 6 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_config/normal/show_running_config.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 1366 bytes 4 | ! 5 | ! Last configuration change at 18:41:02 UTC Thu Nov 24 2016 6 | ! 7 | version 15.5 8 | service timestamps debug datetime msec 9 | service timestamps log datetime msec 10 | no platform punt-keepalive disable-kernel-core 11 | platform console auto 12 | ! 13 | hostname CSR1 14 | ! 15 | boot-start-marker 16 | boot-end-marker 17 | ! 18 | ! 19 | enable password cisco 20 | ! 21 | aaa new-model 22 | ! 23 | ! 24 | aaa authentication login default local 25 | aaa authorization exec default local 26 | ! 27 | ! 28 | ! 29 | ! 30 | ! 31 | aaa session-id common 32 | ! 33 | ip vrf MGMT 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | 44 | 45 | ip domain name example.local 46 | 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | ! 54 | ! 55 | ! 56 | ! 57 | subscriber templating 58 | ! 59 | multilink bundle-name authenticated 60 | ! 61 | ! 62 | ! 63 | ! 64 | ! 65 | ! 66 | ! 67 | ! 68 | ! 69 | ! 70 | ! 71 | ! 72 | ! 73 | license udi pid CSR1000V sn 9OSEGKJXRHE 74 | spanning-tree extend system-id 75 | ! 76 | username cisco privilege 15 password 0 cisco 77 | ! 78 | redundancy 79 | ! 80 | ! 81 | ! 82 | ! 83 | ! 84 | ! 85 | ! 86 | ! 87 | ! 88 | ! 89 | ! 90 | ! 91 | ! 92 | ! 93 | ! 94 | ! 95 | ! 96 | ! 97 | ! 98 | ! 99 | ! 100 | ! 101 | ! 102 | interface Loopback0 103 | ip address 1.1.1.1 255.255.255.255 104 | ! 105 | interface GigabitEthernet1 106 | ip vrf forwarding MGMT 107 | ip address 192.168.35.121 255.255.255.0 108 | negotiation auto 109 | ! 110 | interface GigabitEthernet2 111 | ip address 10.1.1.1 255.255.255.0 112 | negotiation auto 113 | ! 114 | interface GigabitEthernet3 115 | no ip address 116 | shutdown 117 | negotiation auto 118 | ! 119 | router ospf 1 120 | redistribute connected subnets 121 | network 10.1.1.0 0.0.0.255 area 0 122 | ! 123 | ! 124 | virtual-service csr_mgmt 125 | ! 126 | ip forward-protocol nd 127 | ! 128 | no ip http server 129 | no ip http secure-server 130 | ! 131 | ! 132 | ! 133 | ! 134 | ! 135 | ! 136 | control-plane 137 | ! 138 | ! 139 | ! 140 | ! 141 | ! 142 | ! 143 | ! 144 | ! 145 | ! 146 | ! 147 | line con 0 148 | line vty 0 4 149 | ! 150 | ! 151 | end -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_config/normal/show_startup_config.txt: -------------------------------------------------------------------------------- 1 | ! 2 | ! Last configuration change at 18:41:02 UTC Thu Nov 24 2016 3 | ! 4 | version 15.5 5 | service timestamps debug datetime msec 6 | service timestamps log datetime msec 7 | no platform punt-keepalive disable-kernel-core 8 | platform console auto 9 | ! 10 | hostname CSR1 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | enable password cisco 17 | ! 18 | aaa new-model 19 | ! 20 | ! 21 | aaa authentication login default local 22 | aaa authorization exec default local 23 | ! 24 | ! 25 | ! 26 | ! 27 | ! 28 | aaa session-id common 29 | ! 30 | ip vrf MGMT 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | 41 | 42 | ip domain name example.local 43 | 44 | ! 45 | ! 46 | ! 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | ! 54 | subscriber templating 55 | ! 56 | multilink bundle-name authenticated 57 | ! 58 | ! 59 | ! 60 | ! 61 | ! 62 | ! 63 | ! 64 | ! 65 | ! 66 | ! 67 | ! 68 | ! 69 | ! 70 | license udi pid CSR1000V sn 9OSEGKJXRHE 71 | spanning-tree extend system-id 72 | ! 73 | username cisco privilege 15 password 0 cisco 74 | ! 75 | redundancy 76 | ! 77 | ! 78 | ! 79 | ! 80 | ! 81 | ! 82 | ! 83 | ! 84 | ! 85 | ! 86 | ! 87 | ! 88 | ! 89 | ! 90 | ! 91 | ! 92 | ! 93 | ! 94 | ! 95 | ! 96 | ! 97 | ! 98 | ! 99 | interface Loopback0 100 | ip address 1.1.1.1 255.255.255.255 101 | ! 102 | interface GigabitEthernet1 103 | ip vrf forwarding MGMT 104 | ip address 192.168.35.121 255.255.255.0 105 | negotiation auto 106 | ! 107 | interface GigabitEthernet2 108 | ip address 10.1.1.1 255.255.255.0 109 | negotiation auto 110 | ! 111 | interface GigabitEthernet3 112 | no ip address 113 | shutdown 114 | negotiation auto 115 | ! 116 | router ospf 1 117 | redistribute connected subnets 118 | network 10.1.1.0 0.0.0.255 area 0 119 | ! 120 | ! 121 | virtual-service csr_mgmt 122 | ! 123 | ip forward-protocol nd 124 | ! 125 | no ip http server 126 | no ip http secure-server 127 | ! 128 | ! 129 | ! 130 | ! 131 | ! 132 | ! 133 | control-plane 134 | ! 135 | ! 136 | ! 137 | ! 138 | ! 139 | ! 140 | ! 141 | ! 142 | ! 143 | ! 144 | line con 0 145 | line vty 0 4 146 | ! 147 | ! 148 | end -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_config_filtered/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "startup": "", 3 | "running": "", 4 | "candidate": "" 5 | } 6 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_config_filtered/normal/show_running_config.txt: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 1366 bytes 4 | ! 5 | ! Last configuration change at 18:41:02 UTC Thu Nov 24 2016 6 | ! 7 | version 15.5 8 | service timestamps debug datetime msec 9 | service timestamps log datetime msec 10 | no platform punt-keepalive disable-kernel-core 11 | platform console auto 12 | ! 13 | hostname CSR1 14 | ! 15 | boot-start-marker 16 | boot-end-marker 17 | ! 18 | ! 19 | enable password cisco 20 | ! 21 | aaa new-model 22 | ! 23 | ! 24 | aaa authentication login default local 25 | aaa authorization exec default local 26 | ! 27 | ! 28 | ! 29 | ! 30 | ! 31 | aaa session-id common 32 | ! 33 | ip vrf MGMT 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | 44 | 45 | ip domain name example.local 46 | 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | ! 54 | ! 55 | ! 56 | ! 57 | subscriber templating 58 | ! 59 | multilink bundle-name authenticated 60 | ! 61 | ! 62 | ! 63 | ! 64 | ! 65 | ! 66 | ! 67 | ! 68 | ! 69 | ! 70 | ! 71 | ! 72 | ! 73 | license udi pid CSR1000V sn 9OSEGKJXRHE 74 | spanning-tree extend system-id 75 | ! 76 | username cisco privilege 15 password 0 cisco 77 | ! 78 | redundancy 79 | ! 80 | ! 81 | ! 82 | ! 83 | ! 84 | ! 85 | ! 86 | ! 87 | ! 88 | ! 89 | ! 90 | ! 91 | ! 92 | ! 93 | ! 94 | ! 95 | ! 96 | ! 97 | ! 98 | ! 99 | ! 100 | ! 101 | ! 102 | interface Loopback0 103 | ip address 1.1.1.1 255.255.255.255 104 | ! 105 | interface GigabitEthernet1 106 | ip vrf forwarding MGMT 107 | ip address 192.168.35.121 255.255.255.0 108 | negotiation auto 109 | ! 110 | interface GigabitEthernet2 111 | ip address 10.1.1.1 255.255.255.0 112 | negotiation auto 113 | ! 114 | interface GigabitEthernet3 115 | no ip address 116 | shutdown 117 | negotiation auto 118 | ! 119 | router ospf 1 120 | redistribute connected subnets 121 | network 10.1.1.0 0.0.0.255 area 0 122 | ! 123 | ! 124 | virtual-service csr_mgmt 125 | ! 126 | ip forward-protocol nd 127 | ! 128 | no ip http server 129 | no ip http secure-server 130 | ! 131 | ! 132 | ! 133 | ! 134 | ! 135 | ! 136 | control-plane 137 | ! 138 | ! 139 | ! 140 | ! 141 | ! 142 | ! 143 | ! 144 | ! 145 | ! 146 | ! 147 | line con 0 148 | line vty 0 4 149 | ! 150 | ! 151 | end -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_config_filtered/normal/show_startup_config.txt: -------------------------------------------------------------------------------- 1 | ! 2 | ! Last configuration change at 18:41:02 UTC Thu Nov 24 2016 3 | ! 4 | version 15.5 5 | service timestamps debug datetime msec 6 | service timestamps log datetime msec 7 | no platform punt-keepalive disable-kernel-core 8 | platform console auto 9 | ! 10 | hostname CSR1 11 | ! 12 | boot-start-marker 13 | boot-end-marker 14 | ! 15 | ! 16 | enable password cisco 17 | ! 18 | aaa new-model 19 | ! 20 | ! 21 | aaa authentication login default local 22 | aaa authorization exec default local 23 | ! 24 | ! 25 | ! 26 | ! 27 | ! 28 | aaa session-id common 29 | ! 30 | ip vrf MGMT 31 | ! 32 | ! 33 | ! 34 | ! 35 | ! 36 | ! 37 | ! 38 | ! 39 | ! 40 | 41 | 42 | ip domain name example.local 43 | 44 | ! 45 | ! 46 | ! 47 | ! 48 | ! 49 | ! 50 | ! 51 | ! 52 | ! 53 | ! 54 | subscriber templating 55 | ! 56 | multilink bundle-name authenticated 57 | ! 58 | ! 59 | ! 60 | ! 61 | ! 62 | ! 63 | ! 64 | ! 65 | ! 66 | ! 67 | ! 68 | ! 69 | ! 70 | license udi pid CSR1000V sn 9OSEGKJXRHE 71 | spanning-tree extend system-id 72 | ! 73 | username cisco privilege 15 password 0 cisco 74 | ! 75 | redundancy 76 | ! 77 | ! 78 | ! 79 | ! 80 | ! 81 | ! 82 | ! 83 | ! 84 | ! 85 | ! 86 | ! 87 | ! 88 | ! 89 | ! 90 | ! 91 | ! 92 | ! 93 | ! 94 | ! 95 | ! 96 | ! 97 | ! 98 | ! 99 | interface Loopback0 100 | ip address 1.1.1.1 255.255.255.255 101 | ! 102 | interface GigabitEthernet1 103 | ip vrf forwarding MGMT 104 | ip address 192.168.35.121 255.255.255.0 105 | negotiation auto 106 | ! 107 | interface GigabitEthernet2 108 | ip address 10.1.1.1 255.255.255.0 109 | negotiation auto 110 | ! 111 | interface GigabitEthernet3 112 | no ip address 113 | shutdown 114 | negotiation auto 115 | ! 116 | router ospf 1 117 | redistribute connected subnets 118 | network 10.1.1.0 0.0.0.255 area 0 119 | ! 120 | ! 121 | virtual-service csr_mgmt 122 | ! 123 | ip forward-protocol nd 124 | ! 125 | no ip http server 126 | no ip http secure-server 127 | ! 128 | ! 129 | ! 130 | ! 131 | ! 132 | ! 133 | control-plane 134 | ! 135 | ! 136 | ! 137 | ! 138 | ! 139 | ! 140 | ! 141 | ! 142 | ! 143 | ! 144 | line con 0 145 | line vty 0 4 146 | ! 147 | ! 148 | end -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_environment/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "fans": { 3 | "invalid": { 4 | "status": true 5 | } 6 | }, 7 | "temperature": { 8 | "system": { 9 | "is_alert": false, 10 | "temperature": 42, 11 | "is_critical": false 12 | } 13 | }, 14 | "cpu": { 15 | "0": { 16 | "%usage": 6.0 17 | } 18 | }, 19 | "power": { 20 | "invalid": { 21 | "status": true, 22 | "output": -1.0, 23 | "capacity": -1.0 24 | } 25 | }, 26 | "memory": { 27 | "available_ram": 4826256, 28 | "used_ram": 20873476 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_environment/normal/show_env_temperature_status.txt: -------------------------------------------------------------------------------- 1 | System Temperature Value: 42 Degree Celsius 2 | System Temperature State: GREEN 3 | Yellow Threshold : 88 Degree Celsius 4 | Red Threshold : 93 Degree Celsius -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_environment/normal/show_memory_statistics.txt: -------------------------------------------------------------------------------- 1 | Head Total(b) Used(b) Free(b) Lowest(b) Largest(b) 2 | Processor 277B88C 21505428 18498044 3007384 2136352 2061756 3 | I/O 2C00000 4194304 2375432 1818872 1581372 1817552 4 | Driver te 18C0000 1048576 44 1048532 1048532 1048532 5 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_environment/temp_cmd_fail/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "fans": { 3 | "invalid": { 4 | "status": true 5 | } 6 | }, 7 | "temperature": { 8 | "invalid": { 9 | "is_alert": false, 10 | "temperature": -1.0, 11 | "is_critical": false 12 | } 13 | }, 14 | "cpu": { 15 | "0": { 16 | "%usage": 6.0 17 | } 18 | }, 19 | "power": { 20 | "invalid": { 21 | "status": true, 22 | "output": -1.0, 23 | "capacity": -1.0 24 | } 25 | }, 26 | "memory": { 27 | "available_ram": 4826256, 28 | "used_ram": 20873476 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_environment/temp_cmd_fail/show_env_temperature_status.txt: -------------------------------------------------------------------------------- 1 | ^ 2 | % Invalid input detected at '^' marker. 3 | 4 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_environment/temp_cmd_fail/show_memory_statistics.txt: -------------------------------------------------------------------------------- 1 | Head Total(b) Used(b) Free(b) Lowest(b) Largest(b) 2 | Processor 277B88C 21505428 18498044 3007384 2136352 2061756 3 | I/O 2C00000 4194304 2375432 1818872 1581372 1817552 4 | Driver te 18C0000 1048576 44 1048532 1048532 1048532 5 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_facts/empty_show_hosts/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "os_version": "C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE4, RELEASE SOFTWARE (fc1)", 3 | "uptime": 16676160, 4 | "interface_list": ["Vlan1", "Vlan20", "Vlan40", "Vlan41", "GigabitEthernet0/1", "GigabitEthernet0/2", "GigabitEthernet0/3", "GigabitEthernet0/4", "GigabitEthernet0/5", "GigabitEthernet0/6", "GigabitEthernet0/7", "GigabitEthernet0/8", "Port-channel1"], 5 | "vendor": "Cisco", 6 | "serial_number": "FOC1308V5NB", 7 | "model": "WS-C2960G-8TC-L", 8 | "hostname": "NS2903-ASW-01", 9 | "fqdn": "Unknown" 10 | } 11 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_facts/empty_show_hosts/show_hosts.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/napalm-automation/napalm-ios/7bbbc6a4d9f70a5b8cf32b7c7072a7ab437ddb81/test/unit/mocked_data/test_get_facts/empty_show_hosts/show_hosts.txt -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_facts/empty_show_hosts/show_ip_interface_brief.txt: -------------------------------------------------------------------------------- 1 | Interface IP-Address OK? Method Status Protocol 2 | Vlan1 unassigned YES NVRAM administratively down down 3 | Vlan20 172.29.50.3 YES NVRAM up up 4 | Vlan40 unassigned YES unset up up 5 | Vlan41 172.29.52.34 YES NVRAM up up 6 | GigabitEthernet0/1 unassigned YES unset up up 7 | GigabitEthernet0/2 unassigned YES unset up up 8 | GigabitEthernet0/3 unassigned YES unset up up 9 | GigabitEthernet0/4 unassigned YES unset down down 10 | GigabitEthernet0/5 unassigned YES unset up up 11 | GigabitEthernet0/6 unassigned YES unset up up 12 | GigabitEthernet0/7 unassigned YES unset up up 13 | GigabitEthernet0/8 unassigned YES unset up up 14 | Port-channel1 unassigned YES unset administratively down down 15 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_facts/empty_show_hosts/show_version.txt: -------------------------------------------------------------------------------- 1 | Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE4, RELEASE SOFTWARE (fc1) 2 | Technical Support: http://www.cisco.com/techsupport 3 | Copyright (c) 1986-2013 by Cisco Systems, Inc. 4 | Compiled Wed 26-Jun-13 02:49 by prod_rel_team 5 | 6 | ROM: Bootstrap program is C2960 boot loader 7 | BOOTLDR: C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(35r)SE2, RELEASE SOFTWARE (fc1) 8 | 9 | NS2903-ASW-01 uptime is 27 weeks, 4 days, 16 minutes 10 | System returned to ROM by power-on 11 | System restarted at 15:46:58 UTC Sun May 22 2016 12 | System image file is "flash:/c2960-lanbasek9-mz.150-2.SE4.bin" 13 | 14 | 15 | This product contains cryptographic features and is subject to United 16 | States and local country laws governing import, export, transfer and 17 | use. Delivery of Cisco cryptographic products does not imply 18 | third-party authority to import, export, distribute or use encryption. 19 | Importers, exporters, distributors and users are responsible for 20 | compliance with U.S. and local country laws. By using this product you 21 | agree to comply with applicable laws and regulations. If you are unable 22 | to comply with U.S. and local laws, return this product immediately. 23 | 24 | A summary of U.S. laws governing Cisco cryptographic products may be found at: 25 | http://www.cisco.com/wwl/export/crypto/tool/stqrg.html 26 | 27 | If you require further assistance please contact us by sending email to 28 | export@cisco.com. 29 | 30 | cisco WS-C2960G-8TC-L (PowerPC405) processor (revision A0) with 65536K bytes of memory. 31 | Processor board ID FOC1308V5NB 32 | Last reset from power-on 33 | 4 Virtual Ethernet interfaces 34 | 8 Gigabit Ethernet interfaces 35 | The password-recovery mechanism is enabled. 36 | 37 | 64K bytes of flash-simulated non-volatile configuration memory. 38 | Base ethernet MAC Address : 00:24:F7:DD:77:00 39 | Motherboard assembly number : 73-10613-08 40 | Power supply part number : 341-0208-01 41 | Motherboard serial number : FOC13083EGE 42 | Power supply serial number : LIT1250099N 43 | Model revision number : A0 44 | Motherboard revision number : B0 45 | Model number : WS-C2960G-8TC-L 46 | System serial number : FOC1308V5NB 47 | Top Assembly Part Number : 800-28133-01 48 | Top Assembly Revision Number : E0 49 | Version ID : V01 50 | CLEI Code Number : COM7S00ARA 51 | Hardware Board Revision Number : 0x01 52 | 53 | 54 | Switch Ports Model SW Version SW Image 55 | ------ ----- ----- ---------- ---------- 56 | * 1 8 WS-C2960G-8TC-L 15.0(2)SE4 C2960-LANBASEK9-M 57 | 58 | 59 | Configuration register is 0xF 60 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_facts/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "os_version": "C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE4, RELEASE SOFTWARE (fc1)", 3 | "uptime": 16676160, 4 | "interface_list": ["Vlan1", "Vlan20", "Vlan40", "Vlan41", "GigabitEthernet0/1", "GigabitEthernet0/2", "GigabitEthernet0/3", "GigabitEthernet0/4", "GigabitEthernet0/5", "GigabitEthernet0/6", "GigabitEthernet0/7", "GigabitEthernet0/8", "Port-channel1"], 5 | "vendor": "Cisco", 6 | "serial_number": "FOC1308V5NB", 7 | "model": "WS-C2960G-8TC-L", 8 | "hostname": "NS2903-ASW-01", 9 | "fqdn": "NS2903-ASW-01.int.ogenstad.com" 10 | } 11 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_facts/normal/show_hosts.txt: -------------------------------------------------------------------------------- 1 | Default domain is int.ogenstad.com 2 | Name/address lookup uses static mappings 3 | 4 | Codes: u - unknown, e - expired, * - OK, ? - revalidate 5 | t - temporary, p - permanent 6 | 7 | Host Port Flags Age Type Address(es) 8 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_facts/normal/show_ip_interface_brief.txt: -------------------------------------------------------------------------------- 1 | Interface IP-Address OK? Method Status Protocol 2 | Vlan1 unassigned YES NVRAM administratively down down 3 | Vlan20 172.29.50.3 YES NVRAM up up 4 | Vlan40 unassigned YES unset up up 5 | Vlan41 172.29.52.34 YES NVRAM up up 6 | GigabitEthernet0/1 unassigned YES unset up up 7 | GigabitEthernet0/2 unassigned YES unset up up 8 | GigabitEthernet0/3 unassigned YES unset up up 9 | GigabitEthernet0/4 unassigned YES unset down down 10 | GigabitEthernet0/5 unassigned YES unset up up 11 | GigabitEthernet0/6 unassigned YES unset up up 12 | GigabitEthernet0/7 unassigned YES unset up up 13 | GigabitEthernet0/8 unassigned YES unset up up 14 | Port-channel1 unassigned YES unset administratively down down 15 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_facts/normal/show_version.txt: -------------------------------------------------------------------------------- 1 | Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE4, RELEASE SOFTWARE (fc1) 2 | Technical Support: http://www.cisco.com/techsupport 3 | Copyright (c) 1986-2013 by Cisco Systems, Inc. 4 | Compiled Wed 26-Jun-13 02:49 by prod_rel_team 5 | 6 | ROM: Bootstrap program is C2960 boot loader 7 | BOOTLDR: C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(35r)SE2, RELEASE SOFTWARE (fc1) 8 | 9 | NS2903-ASW-01 uptime is 27 weeks, 4 days, 16 minutes 10 | System returned to ROM by power-on 11 | System restarted at 15:46:58 UTC Sun May 22 2016 12 | System image file is "flash:/c2960-lanbasek9-mz.150-2.SE4.bin" 13 | 14 | 15 | This product contains cryptographic features and is subject to United 16 | States and local country laws governing import, export, transfer and 17 | use. Delivery of Cisco cryptographic products does not imply 18 | third-party authority to import, export, distribute or use encryption. 19 | Importers, exporters, distributors and users are responsible for 20 | compliance with U.S. and local country laws. By using this product you 21 | agree to comply with applicable laws and regulations. If you are unable 22 | to comply with U.S. and local laws, return this product immediately. 23 | 24 | A summary of U.S. laws governing Cisco cryptographic products may be found at: 25 | http://www.cisco.com/wwl/export/crypto/tool/stqrg.html 26 | 27 | If you require further assistance please contact us by sending email to 28 | export@cisco.com. 29 | 30 | cisco WS-C2960G-8TC-L (PowerPC405) processor (revision A0) with 65536K bytes of memory. 31 | Processor board ID FOC1308V5NB 32 | Last reset from power-on 33 | 4 Virtual Ethernet interfaces 34 | 8 Gigabit Ethernet interfaces 35 | The password-recovery mechanism is enabled. 36 | 37 | 64K bytes of flash-simulated non-volatile configuration memory. 38 | Base ethernet MAC Address : 00:24:F7:DD:77:00 39 | Motherboard assembly number : 73-10613-08 40 | Power supply part number : 341-0208-01 41 | Motherboard serial number : FOC13083EGE 42 | Power supply serial number : LIT1250099N 43 | Model revision number : A0 44 | Motherboard revision number : B0 45 | Model number : WS-C2960G-8TC-L 46 | System serial number : FOC1308V5NB 47 | Top Assembly Part Number : 800-28133-01 48 | Top Assembly Revision Number : E0 49 | Version ID : V01 50 | CLEI Code Number : COM7S00ARA 51 | Hardware Board Revision Number : 0x01 52 | 53 | 54 | Switch Ports Model SW Version SW Image 55 | ------ ----- ----- ---------- ---------- 56 | * 1 8 WS-C2960G-8TC-L 15.0(2)SE4 C2960-LANBASEK9-M 57 | 58 | 59 | Configuration register is 0xF 60 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_interfaces/alternate/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "GigabitEthernet0/0": { 3 | "last_flapped": -1, 4 | "is_enabled": true, 5 | "is_up": false, 6 | "speed": 1000, 7 | "mac_address": "FA:16:3E:57:33:6F", 8 | "description": "" 9 | }, 10 | "GigabitEthernet0/1": { 11 | "last_flapped": -1, 12 | "is_enabled": true, 13 | "is_up": true, 14 | "speed": 1000, 15 | "mac_address": "FA:16:3E:4F:41:CC", 16 | "description": "to iosvl2-2" 17 | }, 18 | "Port-channel1": { 19 | "last_flapped": -1, 20 | "is_enabled": true, 21 | "is_up": false, 22 | "speed": 100, 23 | "mac_address": "FA:16:3E:4F:41:CC", 24 | "description": "" 25 | }, 26 | "GigabitEthernet0/3": { 27 | "last_flapped": -1, 28 | "is_enabled": true, 29 | "is_up": true, 30 | "speed": 1000, 31 | "mac_address": "FA:16:3E:31:2C:47", 32 | "description": "to iosvl2-3" 33 | }, 34 | "Loopback0": { 35 | "last_flapped": -1, 36 | "is_enabled": true, 37 | "is_up": true, 38 | "speed": 8000, 39 | "mac_address": "", 40 | "description": "Loopback" 41 | }, 42 | "GigabitEthernet1/0": { 43 | "last_flapped": -1, 44 | "is_enabled": true, 45 | "is_up": true, 46 | "speed": 1000, 47 | "mac_address": "FA:16:3E:C8:50:AB", 48 | "description": "to iosvl2-3" 49 | }, 50 | "Vlan1": { 51 | "last_flapped": -1, 52 | "is_enabled": true, 53 | "is_up": true, 54 | "speed": 1000, 55 | "mac_address": "FA:16:3E:57:80:01", 56 | "description": "OOB Management" 57 | }, 58 | "GigabitEthernet0/2": { 59 | "last_flapped": -1, 60 | "is_enabled": true, 61 | "is_up": true, 62 | "speed": 1000, 63 | "mac_address": "FA:16:3E:A3:3E:49", 64 | "description": "to iosvl2-4" 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_interfaces/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "GigabitEthernet3": { 3 | "speed": 1000, 4 | "mac_address": "08:00:27:82:51:6B", 5 | "is_up": false, 6 | "last_flapped": -1.0, 7 | "description": "", 8 | "is_enabled": false 9 | }, 10 | "GigabitEthernet2": { 11 | "speed": 1000, 12 | "mac_address": "08:00:27:79:E8:96", 13 | "is_up": true, 14 | "last_flapped": -1.0, 15 | "description": "blah bleh", 16 | "is_enabled": true 17 | }, 18 | "GigabitEthernet1": { 19 | "speed": 1000, 20 | "mac_address": "08:00:27:F8:E8:42", 21 | "is_up": true, 22 | "last_flapped": -1.0, 23 | "description": "", 24 | "is_enabled": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_interfaces/normal/show_interfaces.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet1 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.27f8.e842 (bia 0800.27f8.e842) 3 | Internet address is 10.0.2.15/24 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive set (10 sec) 8 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 9 | output flow-control is unsupported, input flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:42:01, output 00:00:05, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 1000 bits/sec, 1 packets/sec 17 | 5 minute output rate 1000 bits/sec, 1 packets/sec 18 | 14028 packets input, 1766902 bytes, 0 no buffer 19 | Received 0 broadcasts (0 IP multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 0 multicast, 0 pause input 23 | 9446 packets output, 1379617 bytes, 0 underruns 24 | 0 output errors, 0 collisions, 0 interface resets 25 | 0 unknown protocol drops 26 | 0 babbles, 0 late collision, 0 deferred 27 | 0 lost carrier, 0 no carrier, 0 pause output 28 | 0 output buffer failures, 0 output buffers swapped out 29 | GigabitEthernet2 is up, line protocol is up 30 | Hardware is CSR vNIC, address is 0800.2779.e896 (bia 0800.2779.e896) 31 | Description: blah bleh 32 | Internet address is 192.168.0.1/24 33 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 34 | reliability 255/255, txload 1/255, rxload 1/255 35 | Encapsulation ARPA, loopback not set 36 | Keepalive set (10 sec) 37 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 38 | output flow-control is unsupported, input flow-control is unsupported 39 | ARP type: ARPA, ARP Timeout 04:00:00 40 | Last input 00:00:04, output 00:00:05, output hang never 41 | Last clearing of "show interface" counters never 42 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 43 | Queueing strategy: fifo 44 | Output queue: 0/40 (size/max) 45 | 5 minute input rate 0 bits/sec, 0 packets/sec 46 | 5 minute output rate 0 bits/sec, 0 packets/sec 47 | 118 packets input, 11502 bytes, 0 no buffer 48 | Received 0 broadcasts (0 IP multicasts) 49 | 0 runts, 0 giants, 0 throttles 50 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 51 | 0 watchdog, 0 multicast, 0 pause input 52 | 177 packets output, 19267 bytes, 0 underruns 53 | 0 output errors, 0 collisions, 1 interface resets 54 | 0 unknown protocol drops 55 | 0 babbles, 0 late collision, 0 deferred 56 | 0 lost carrier, 0 no carrier, 0 pause output 57 | 0 output buffer failures, 0 output buffers swapped out 58 | GigabitEthernet3 is administratively down, line protocol is down 59 | Hardware is CSR vNIC, address is 0800.2782.516b (bia 0800.2782.516b) 60 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 61 | reliability 255/255, txload 1/255, rxload 1/255 62 | Encapsulation ARPA, loopback not set 63 | Keepalive set (10 sec) 64 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 65 | output flow-control is unsupported, input flow-control is unsupported 66 | ARP type: ARPA, ARP Timeout 04:00:00 67 | Last input never, output never, output hang never 68 | Last clearing of "show interface" counters never 69 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 70 | Queueing strategy: fifo 71 | Output queue: 0/40 (size/max) 72 | 5 minute input rate 0 bits/sec, 0 packets/sec 73 | 5 minute output rate 0 bits/sec, 0 packets/sec 74 | 0 packets input, 0 bytes, 0 no buffer 75 | Received 0 broadcasts (0 IP multicasts) 76 | 0 runts, 0 giants, 0 throttles 77 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 78 | 0 watchdog, 0 multicast, 0 pause input 79 | 3 packets output, 258 bytes, 0 underruns 80 | 0 output errors, 0 collisions, 0 interface resets 81 | 0 unknown protocol drops 82 | 0 babbles, 0 late collision, 0 deferred 83 | 0 lost carrier, 0 no carrier, 0 pause output 84 | 0 output buffer failures, 0 output buffers swapped out 85 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_interfaces/pseudowire/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "pseudowire100006": { 3 | "speed": 10000, 4 | "mac_address": "", 5 | "is_up": true, 6 | "last_flapped": -1.0, 7 | "description": "", 8 | "is_enabled": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_interfaces/pseudowire/show_interfaces.txt: -------------------------------------------------------------------------------- 1 | pseudowire100006 is up 2 | MTU 1500 bytes, BW 10000000 Kbit 3 | Encapsulation mpls 4 | Peer IP x.x.x.x, VC ID xx 5 | RX 6 | 34216908 packets 6774108588 bytes 0 drops 7 | TX 8 | 79234824 packets 23633885654 bytes 0 drops 9 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_interfaces_counters/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "GigabitEthernet1": { 3 | "rx_unicast_packets": 297, 4 | "rx_octets": 25963, 5 | "rx_broadcast_packets": 0, 6 | "rx_multicast_packets": 0, 7 | "rx_errors": 0, 8 | "rx_discards": 0, 9 | "tx_unicast_packets": 160, 10 | "tx_octets": 26812, 11 | "tx_broadcast_packets": -1, 12 | "tx_multicast_packets": -1, 13 | "tx_errors": 0, 14 | "tx_discards": 0 15 | }, 16 | "GigabitEthernet2": { 17 | "rx_unicast_packets": 0, 18 | "rx_octets": 0, 19 | "rx_broadcast_packets": 0, 20 | "rx_multicast_packets": 0, 21 | "rx_errors": 0, 22 | "rx_discards": 0, 23 | "tx_unicast_packets": 0, 24 | "tx_octets": 0, 25 | "tx_broadcast_packets": -1, 26 | "tx_multicast_packets": -1, 27 | "tx_errors": 0, 28 | "tx_discards": 0 29 | }, 30 | "GigabitEthernet3": { 31 | "rx_unicast_packets": 0, 32 | "rx_octets": 0, 33 | "rx_broadcast_packets": 0, 34 | "rx_multicast_packets": 0, 35 | "rx_errors": 0, 36 | "rx_discards": 0, 37 | "tx_unicast_packets": 0, 38 | "tx_octets": 0, 39 | "tx_broadcast_packets": -1, 40 | "tx_multicast_packets": -1, 41 | "tx_errors": 0, 42 | "tx_discards": 0 43 | }, 44 | "GigabitEthernet4": { 45 | "rx_unicast_packets": 0, 46 | "rx_octets": 0, 47 | "rx_broadcast_packets": 0, 48 | "rx_multicast_packets": 0, 49 | "rx_errors": 0, 50 | "rx_discards": 0, 51 | "tx_unicast_packets": 0, 52 | "tx_octets": 0, 53 | "tx_broadcast_packets": -1, 54 | "tx_multicast_packets": -1, 55 | "tx_errors": 0, 56 | "tx_discards": 0 57 | } 58 | } -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_interfaces_counters/normal/show_interface_summary.txt: -------------------------------------------------------------------------------- 1 | 2 | *: interface is up 3 | IHQ: pkts in input hold queue IQD: pkts dropped from input queue 4 | OHQ: pkts in output hold queue OQD: pkts dropped from output queue 5 | RXBS: rx rate (bits/sec) RXPS: rx rate (pkts/sec) 6 | TXBS: tx rate (bits/sec) TXPS: tx rate (pkts/sec) 7 | TRTL: throttle count 8 | 9 | Interface IHQ IQD OHQ OQD RXBS RXPS TXBS TXPS TRTL 10 | ----------------------------------------------------------------------------------------------------------------- 11 | * GigabitEthernet1 0 0 0 0 0 0 0 0 0 12 | GigabitEthernet2 0 0 0 0 0 0 0 0 0 13 | GigabitEthernet3 0 0 0 0 0 0 0 0 0 14 | GigabitEthernet4 0 0 0 0 0 0 0 0 0 -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_interfaces_ip/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "Vlan20": { 3 | "ipv4": { 4 | "172.29.50.3": { 5 | "prefix_length": 27 6 | } 7 | }, 8 | "ipv6": { 9 | "FE80::C009:24FF:FEAC:0": { 10 | "prefix_length": 10 11 | }, 12 | "2002::1": { 13 | "prefix_length": 64 14 | } 15 | } 16 | }, 17 | "Vlan41": { 18 | "ipv4": { 19 | "172.29.52.34": { 20 | "prefix_length": 27 21 | }, 22 | "192.168.81.34": { 23 | "prefix_length": 24 24 | } 25 | } 26 | }, 27 | "Loopback0": { 28 | "ipv6": { 29 | "FE80::C009:24FF:FEAC:0": {"prefix_length": 10}, 30 | "2001::1": {"prefix_length": 128}, 31 | "2001::2": {"prefix_length": 128} 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_interfaces_ip/normal/show_ip_interface.txt: -------------------------------------------------------------------------------- 1 | Vlan20 is up, line protocol is up 2 | Internet address is 172.29.50.3/27 3 | Broadcast address is 255.255.255.255 4 | Address determined by non-volatile memory 5 | MTU is 1500 bytes 6 | Helper addresses are 172.16.0.1 7 | 192.168.1.1 8 | Directed broadcast forwarding is enabled 9 | Multicast reserved groups joined: 224.0.0.102 224.0.0.5 224.0.0.6 10 | Outgoing access list is not set 11 | Inbound access list is not set 12 | Proxy ARP is disabled 13 | Local Proxy ARP is disabled 14 | Security level is default 15 | Split horizon is enabled 16 | ICMP redirects are never sent 17 | ICMP unreachables are never sent 18 | ICMP mask replies are never sent 19 | IP fast switching is enabled 20 | IP Flow switching is disabled 21 | IP CEF switching is enabled 22 | IP CEF switching turbo vector 23 | IP Null turbo vector 24 | Associated unicast routing topologies: 25 | Topology "base", operation state is UP 26 | IP multicast fast switching is enabled 27 | IP multicast distributed fast switching is disabled 28 | IP route-cache flags are Fast, CEF 29 | Router Discovery is disabled 30 | IP output packet accounting is disabled 31 | IP access violation accounting is disabled 32 | TCP/IP header compression is disabled 33 | RTP/IP header compression is disabled 34 | Probe proxy name replies are disabled 35 | Policy routing is disabled 36 | Network address translation is disabled 37 | BGP Policy Mapping is disabled 38 | Input features: MCI Check 39 | Output features: IP Post Routing Processing, HW Shortcut Installation 40 | Post encapsulation features: MTU Processing, IP Protocol Output Counter, IP Sendself Check, HW Shortcut Installation 41 | Sampled Netflow is disabled 42 | IP Routed Flow creation is disabled in netflow table 43 | IP Bridged Flow creation is disabled in netflow table 44 | IPv4 WCCP Redirect outbound is disabled 45 | IPv4 WCCP Redirect inbound is disabled 46 | IPv4 WCCP Redirect exclude is disabled 47 | IP multicast multilayer switching is disabled 48 | GigabitEthernet1/1 is down, line protocol is down 49 | GigabitEthernet1/2 is down, line protocol is down 50 | GigabitEthernet1/3 is administratively down, line protocol is down 51 | Internet protocol processing disabled 52 | Vlan41 is up, line protocol is up 53 | Internet address is 172.29.52.34/27 54 | Broadcast address is 255.255.255.255 55 | Address determined by non-volatile memory 56 | MTU is 1514 bytes 57 | Helper address is not set 58 | Directed broadcast forwarding is disabled 59 | Secondary address 192.168.81.34/24 60 | Outgoing access list is not set 61 | Inbound access list is not set 62 | Proxy ARP is enabled 63 | Local Proxy ARP is disabled 64 | Security level is default 65 | Split horizon is enabled 66 | ICMP redirects are always sent 67 | ICMP unreachables are always sent 68 | ICMP mask replies are never sent 69 | IP fast switching is enabled 70 | IP fast switching on the same interface is disabled 71 | IP Flow switching is disabled 72 | IP CEF switching is enabled 73 | IP CEF Fast switching turbo vector 74 | IP multicast fast switching is enabled 75 | IP multicast distributed fast switching is disabled 76 | IP route-cache flags are Fast, CEF 77 | Router Discovery is disabled 78 | IP output packet accounting is disabled 79 | IP access violation accounting is disabled 80 | TCP/IP header compression is disabled 81 | RTP/IP header compression is disabled 82 | Policy routing is disabled 83 | Network address translation is disabled 84 | BGP Policy Mapping is disabled 85 | WCCP Redirect outbound is disabled 86 | WCCP Redirect inbound is disabled 87 | WCCP Redirect exclude is disabled 88 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_interfaces_ip/normal/show_ipv6_interface.txt: -------------------------------------------------------------------------------- 1 | Vlan20 is administratively down, line protocol is down 2 | IPv6 is enabled, link-local address is FE80::C009:24FF:FEAC:0 [TEN] 3 | Global unicast address(es): 4 | 2002::1, subnet is 2002::/64 [TEN] 5 | Joined group address(es): 6 | FF02::1 7 | FF02::1:FF00:1 8 | FF02::1:FFAC:0 9 | MTU is 1500 bytes 10 | ICMP error messages limited to one every 100 milliseconds 11 | ICMP redirects are enabled 12 | ND DAD is enabled, number of DAD attempts: 1 13 | ND reachable time is 30000 milliseconds 14 | Loopback0 is up, line protocol is up 15 | IPv6 is enabled, link-local address is FE80::C009:24FF:FEAC:0 16 | Global unicast address(es): 17 | 2001::1, subnet is 2001::1/128 18 | 2001::2, subnet is 2001::2/128 19 | Joined group address(es): 20 | FF02::1 21 | FF02::2 22 | FF02::1:FF00:1 23 | FF02::1:FF00:2 24 | FF02::1:FFAC:0 25 | MTU is 1514 bytes 26 | ICMP error messages limited to one every 100 milliseconds 27 | ICMP redirects are enabled 28 | ND DAD is not supported 29 | ND reachable time is 30000 milliseconds 30 | 31 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/alternate/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "GigabitEthernet1": [{ 3 | "port": "Gi2/0", 4 | "hostname": "SW2.cisco.com" 5 | }], 6 | "GigabitEthernet2": [{ 7 | "port": "0050.56c0.0001", 8 | "hostname": "0050.56c0.0001" 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/alternate/show_int_Gi1.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet1 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.27f8.e842 (bia 0800.27f8.e842) 3 | Internet address is 10.0.2.15/24 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive set (10 sec) 8 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 9 | output flow-control is unsupported, input flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:42:01, output 00:00:05, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 1000 bits/sec, 1 packets/sec 17 | 5 minute output rate 1000 bits/sec, 1 packets/sec 18 | 14028 packets input, 1766902 bytes, 0 no buffer 19 | Received 0 broadcasts (0 IP multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 0 multicast, 0 pause input 23 | 9446 packets output, 1379617 bytes, 0 underruns 24 | 0 output errors, 0 collisions, 0 interface resets 25 | 0 unknown protocol drops 26 | 0 babbles, 0 late collision, 0 deferred 27 | 0 lost carrier, 0 no carrier, 0 pause output 28 | 0 output buffer failures, 0 output buffers swapped out 29 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/alternate/show_int_Gi2.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet2 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.2779.e896 (bia 0800.2779.e896) 3 | Description: blah bleh 4 | Internet address is 192.168.0.1/24 5 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 6 | reliability 255/255, txload 1/255, rxload 1/255 7 | Encapsulation ARPA, loopback not set 8 | Keepalive set (10 sec) 9 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 10 | output flow-control is unsupported, input flow-control is unsupported 11 | ARP type: ARPA, ARP Timeout 04:00:00 12 | Last input 00:00:04, output 00:00:05, output hang never 13 | Last clearing of "show interface" counters never 14 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 15 | Queueing strategy: fifo 16 | Output queue: 0/40 (size/max) 17 | 5 minute input rate 0 bits/sec, 0 packets/sec 18 | 5 minute output rate 0 bits/sec, 0 packets/sec 19 | 118 packets input, 11502 bytes, 0 no buffer 20 | Received 0 broadcasts (0 IP multicasts) 21 | 0 runts, 0 giants, 0 throttles 22 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 23 | 0 watchdog, 0 multicast, 0 pause input 24 | 177 packets output, 19267 bytes, 0 underruns 25 | 0 output errors, 0 collisions, 1 interface resets 26 | 0 unknown protocol drops 27 | 0 babbles, 0 late collision, 0 deferred 28 | 0 lost carrier, 0 no carrier, 0 pause output 29 | 0 output buffer failures, 0 output buffers swapped out 30 | 31 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/alternate/show_lldp_neighbors.txt: -------------------------------------------------------------------------------- 1 | Capability codes: 2 | (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device 3 | (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other 4 | 5 | Device ID Local Intf Hold-time Capability Port ID 6 | SW2.cisco.com Gi1 120 R Gi2/0 7 | 0050.56c0.0001 Gi2 3601 0050.56c0.0001 8 | 9 | Total entries displayed: 2 10 | 11 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/long_names/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "GigabitEthernet1": [{ 3 | "port": "17", 4 | "hostname": "twb-sf-hpsw1.local.domain" 5 | }], 6 | "GigabitEthernet2": [{ 7 | "port": "18", 8 | "hostname": "twb-sf-hpsw2" 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/long_names/show_int_Gi1.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet1 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.27f8.e842 (bia 0800.27f8.e842) 3 | Internet address is 10.0.2.15/24 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive set (10 sec) 8 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 9 | output flow-control is unsupported, input flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:42:01, output 00:00:05, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 1000 bits/sec, 1 packets/sec 17 | 5 minute output rate 1000 bits/sec, 1 packets/sec 18 | 14028 packets input, 1766902 bytes, 0 no buffer 19 | Received 0 broadcasts (0 IP multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 0 multicast, 0 pause input 23 | 9446 packets output, 1379617 bytes, 0 underruns 24 | 0 output errors, 0 collisions, 0 interface resets 25 | 0 unknown protocol drops 26 | 0 babbles, 0 late collision, 0 deferred 27 | 0 lost carrier, 0 no carrier, 0 pause output 28 | 0 output buffer failures, 0 output buffers swapped out 29 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/long_names/show_int_Gi2.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet2 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.2779.e896 (bia 0800.2779.e896) 3 | Description: blah bleh 4 | Internet address is 192.168.0.1/24 5 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 6 | reliability 255/255, txload 1/255, rxload 1/255 7 | Encapsulation ARPA, loopback not set 8 | Keepalive set (10 sec) 9 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 10 | output flow-control is unsupported, input flow-control is unsupported 11 | ARP type: ARPA, ARP Timeout 04:00:00 12 | Last input 00:00:04, output 00:00:05, output hang never 13 | Last clearing of "show interface" counters never 14 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 15 | Queueing strategy: fifo 16 | Output queue: 0/40 (size/max) 17 | 5 minute input rate 0 bits/sec, 0 packets/sec 18 | 5 minute output rate 0 bits/sec, 0 packets/sec 19 | 118 packets input, 11502 bytes, 0 no buffer 20 | Received 0 broadcasts (0 IP multicasts) 21 | 0 runts, 0 giants, 0 throttles 22 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 23 | 0 watchdog, 0 multicast, 0 pause input 24 | 177 packets output, 19267 bytes, 0 underruns 25 | 0 output errors, 0 collisions, 1 interface resets 26 | 0 unknown protocol drops 27 | 0 babbles, 0 late collision, 0 deferred 28 | 0 lost carrier, 0 no carrier, 0 pause output 29 | 0 output buffer failures, 0 output buffers swapped out 30 | 31 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/long_names/show_lldp_neighbors.txt: -------------------------------------------------------------------------------- 1 | Capability codes: 2 | (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device 3 | (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other 4 | 5 | Device ID Local Intf Hold-time Capability Port ID 6 | twb-sf-hpsw1.local.dGi1 120 B 17 7 | twb-sf-hpsw2 Gi2 120 B 18 8 | 9 | Total entries displayed: 2 10 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/long_names/show_lldp_neighbors_Gi1_detail.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------ 2 | Chassis id: 0018.fe1e.b020 3 | Port id: 17 4 | Port Description: 17 5 | System Name: twb-sf-hpsw1.local.domain 6 | 7 | System Description: 8 | ProCurve J9019A Switch 2510-24, revision Q.10.01, ROM Q.10.02 (/sw/code/build/harp(harp)) 9 | 10 | Time remaining: 93 seconds 11 | System Capabilities: B 12 | Enabled Capabilities: B 13 | Management Addresses: 14 | IP: 10.220.88.10 15 | Auto Negotiation - not supported 16 | Physical media capabilities - not advertised 17 | Media Attachment Unit type - not advertised 18 | Vlan ID: - not advertised 19 | 20 | 21 | Total entries displayed: 1 22 | 23 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/missing_capability/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "GigabitEthernet1": [{ 3 | "port": "17", 4 | "hostname": "twb-sf-hpsw1" 5 | }], 6 | "GigabitEthernet2": [{ 7 | "port": "18", 8 | "hostname": "twb-sf-hpsw2" 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/missing_capability/show_int_Gi1.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet1 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.27f8.e842 (bia 0800.27f8.e842) 3 | Internet address is 10.0.2.15/24 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive set (10 sec) 8 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 9 | output flow-control is unsupported, input flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:42:01, output 00:00:05, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 1000 bits/sec, 1 packets/sec 17 | 5 minute output rate 1000 bits/sec, 1 packets/sec 18 | 14028 packets input, 1766902 bytes, 0 no buffer 19 | Received 0 broadcasts (0 IP multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 0 multicast, 0 pause input 23 | 9446 packets output, 1379617 bytes, 0 underruns 24 | 0 output errors, 0 collisions, 0 interface resets 25 | 0 unknown protocol drops 26 | 0 babbles, 0 late collision, 0 deferred 27 | 0 lost carrier, 0 no carrier, 0 pause output 28 | 0 output buffer failures, 0 output buffers swapped out 29 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/missing_capability/show_int_Gi2.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet2 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.2779.e896 (bia 0800.2779.e896) 3 | Description: blah bleh 4 | Internet address is 192.168.0.1/24 5 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 6 | reliability 255/255, txload 1/255, rxload 1/255 7 | Encapsulation ARPA, loopback not set 8 | Keepalive set (10 sec) 9 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 10 | output flow-control is unsupported, input flow-control is unsupported 11 | ARP type: ARPA, ARP Timeout 04:00:00 12 | Last input 00:00:04, output 00:00:05, output hang never 13 | Last clearing of "show interface" counters never 14 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 15 | Queueing strategy: fifo 16 | Output queue: 0/40 (size/max) 17 | 5 minute input rate 0 bits/sec, 0 packets/sec 18 | 5 minute output rate 0 bits/sec, 0 packets/sec 19 | 118 packets input, 11502 bytes, 0 no buffer 20 | Received 0 broadcasts (0 IP multicasts) 21 | 0 runts, 0 giants, 0 throttles 22 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 23 | 0 watchdog, 0 multicast, 0 pause input 24 | 177 packets output, 19267 bytes, 0 underruns 25 | 0 output errors, 0 collisions, 1 interface resets 26 | 0 unknown protocol drops 27 | 0 babbles, 0 late collision, 0 deferred 28 | 0 lost carrier, 0 no carrier, 0 pause output 29 | 0 output buffer failures, 0 output buffers swapped out 30 | 31 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/missing_capability/show_lldp_neighbors.txt: -------------------------------------------------------------------------------- 1 | Capability codes: 2 | (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device 3 | (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other 4 | 5 | Device ID Local Intf Hold-time Capability Port ID 6 | twb-sf-hpsw1 Gi1 120 17 7 | twb-sf-hpsw2 Gi2 120 B 18 8 | 9 | Total entries displayed: 2 10 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/missing_capability/show_lldp_neighbors_Gi1_detail.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------ 2 | Chassis id: 0018.fe1e.b020 3 | Port id: 17 4 | Port Description: 17 5 | System Name: twb-sf-hpsw1.local.domain 6 | 7 | System Description: 8 | ProCurve J9019A Switch 2510-24, revision Q.10.01, ROM Q.10.02 (/sw/code/build/harp(harp)) 9 | 10 | Time remaining: 93 seconds 11 | System Capabilities: B 12 | Enabled Capabilities: B 13 | Management Addresses: 14 | IP: 10.220.88.10 15 | Auto Negotiation - not supported 16 | Physical media capabilities - not advertised 17 | Media Attachment Unit type - not advertised 18 | Vlan ID: - not advertised 19 | 20 | 21 | Total entries displayed: 1 22 | 23 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "GigabitEthernet1": [{ 3 | "port": "17", 4 | "hostname": "twb-sf-hpsw1" 5 | }], 6 | "GigabitEthernet2": [{ 7 | "port": "18", 8 | "hostname": "twb-sf-hpsw2" 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/normal/show_int_Gi1.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet1 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.27f8.e842 (bia 0800.27f8.e842) 3 | Internet address is 10.0.2.15/24 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive set (10 sec) 8 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 9 | output flow-control is unsupported, input flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:42:01, output 00:00:05, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 1000 bits/sec, 1 packets/sec 17 | 5 minute output rate 1000 bits/sec, 1 packets/sec 18 | 14028 packets input, 1766902 bytes, 0 no buffer 19 | Received 0 broadcasts (0 IP multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 0 multicast, 0 pause input 23 | 9446 packets output, 1379617 bytes, 0 underruns 24 | 0 output errors, 0 collisions, 0 interface resets 25 | 0 unknown protocol drops 26 | 0 babbles, 0 late collision, 0 deferred 27 | 0 lost carrier, 0 no carrier, 0 pause output 28 | 0 output buffer failures, 0 output buffers swapped out 29 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/normal/show_int_Gi2.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet2 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.2779.e896 (bia 0800.2779.e896) 3 | Description: blah bleh 4 | Internet address is 192.168.0.1/24 5 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 6 | reliability 255/255, txload 1/255, rxload 1/255 7 | Encapsulation ARPA, loopback not set 8 | Keepalive set (10 sec) 9 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 10 | output flow-control is unsupported, input flow-control is unsupported 11 | ARP type: ARPA, ARP Timeout 04:00:00 12 | Last input 00:00:04, output 00:00:05, output hang never 13 | Last clearing of "show interface" counters never 14 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 15 | Queueing strategy: fifo 16 | Output queue: 0/40 (size/max) 17 | 5 minute input rate 0 bits/sec, 0 packets/sec 18 | 5 minute output rate 0 bits/sec, 0 packets/sec 19 | 118 packets input, 11502 bytes, 0 no buffer 20 | Received 0 broadcasts (0 IP multicasts) 21 | 0 runts, 0 giants, 0 throttles 22 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 23 | 0 watchdog, 0 multicast, 0 pause input 24 | 177 packets output, 19267 bytes, 0 underruns 25 | 0 output errors, 0 collisions, 1 interface resets 26 | 0 unknown protocol drops 27 | 0 babbles, 0 late collision, 0 deferred 28 | 0 lost carrier, 0 no carrier, 0 pause output 29 | 0 output buffer failures, 0 output buffers swapped out 30 | 31 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors/normal/show_lldp_neighbors.txt: -------------------------------------------------------------------------------- 1 | Capability codes: 2 | (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device 3 | (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other 4 | 5 | Device ID Local Intf Hold-time Capability Port ID 6 | twb-sf-hpsw1 Gi1 120 B 17 7 | twb-sf-hpsw2 Gi2 120 B 18 8 | 9 | Total entries displayed: 2 10 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/alternate/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "GigabitEthernet1": [ 3 | { 4 | "parent_interface": "N/A", 5 | "remote_chassis_id": "2cc2.603e.363b", 6 | "remote_port": "Management1", 7 | "remote_port_description": "N/A", 8 | "remote_system_capab": "B,R", 9 | "remote_system_description": "Arista Networks EOS version 4.15.2F running on an Arista Networks vEOS", 10 | "remote_system_enable_capab": "B,R", 11 | "remote_system_name": "eos-spine1.ntc.com" 12 | }, 13 | { 14 | "parent_interface": "N/A", 15 | "remote_chassis_id": "0005.8671.58c0", 16 | "remote_port": "fxp0", 17 | "remote_port_description": "fxp0", 18 | "remote_system_capab": "B,R", 19 | "remote_system_description": "Juniper Networks, Inc. vmx internet router, kernel JUNOS 15.1F4.15, Build date: 2015-12-23 19:22:55 UTC Copyright (c) 1996-2015 Juniper Networks, Inc.", 20 | "remote_system_enable_capab": "B,R", 21 | "remote_system_name": "vmx1" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/alternate/show_int_Gi1.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet1 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 2cc2.603f.437a (bia 2cc2.603f.437a) 3 | Internet address is 10.0.0.51/24 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 198/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive set (10 sec) 8 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 9 | output flow-control is unsupported, input flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:00:07, output 00:00:18, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 1000 bits/sec, 1 packets/sec 17 | 5 minute output rate 0 bits/sec, 0 packets/sec 18 | 3815699 packets input, 275467675 bytes, 0 no buffer 19 | Received 0 broadcasts (0 IP multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 2610907 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 0 multicast, 0 pause input 23 | 5249863 packets output, 384472234 bytes, 0 underruns 24 | 0 output errors, 0 collisions, 0 interface resets 25 | 11192 unknown protocol drops 26 | 0 babbles, 0 late collision, 0 deferred 27 | 0 lost carrier, 0 no carrier, 0 pause output 28 | 0 output buffer failures, 0 output buffers swapped out 29 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/alternate/show_lldp_neighbors.txt: -------------------------------------------------------------------------------- 1 | Capability codes: 2 | (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device 3 | (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other 4 | 5 | Device ID Local Intf Hold-time Capability Port ID 6 | eos-spine1.ntc.com Gi1 120 B,R Management1 7 | vmx1 Gi1 120 B,R fxp0 8 | 9 | Total entries displayed: 2 10 | 11 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/alternate/show_lldp_neighbors_GigabitEthernet1_detail.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------ 2 | Local Intf: Gi1 3 | Chassis id: 2cc2.603e.363b 4 | Port id: Management1 5 | Port Description - not advertised 6 | System Name: eos-spine1.ntc.com 7 | 8 | System Description: 9 | Arista Networks EOS version 4.15.2F running on an Arista Networks vEOS 10 | 11 | Time remaining: 95 seconds 12 | System Capabilities: B,R 13 | Enabled Capabilities: B,R 14 | Management Addresses: 15 | Other: 2C FF 60 3E 36 3B 00 16 | Auto Negotiation - not supported 17 | Physical media capabilities - not advertised 18 | Media Attachment Unit type - not advertised 19 | Vlan ID: - not advertised 20 | 21 | ------------------------------------------------ 22 | Local Intf: Gi1 23 | Chassis id: 0005.8671.58c0 24 | Port id: fxp0 25 | Port Description: fxp0 26 | System Name: vmx1 27 | 28 | System Description: 29 | Juniper Networks, Inc. vmx internet router, kernel JUNOS 15.1F4.15, Build date: 2015-12-23 19:22:55 UTC Copyright (c) 1996-2015 Juniper Networks, Inc. 30 | 31 | Time remaining: 116 seconds 32 | System Capabilities: B,R 33 | Enabled Capabilities: B,R 34 | Management Addresses: 35 | IP: 10.0.0.31 36 | OID: 37 | 0.1.3.6.1.2.1.31.1.1.1.1.1. 38 | Auto Negotiation - supported, disabled 39 | Physical media capabilities: 40 | 1000baseT(FD) 41 | 1000baseX(FD) 42 | 1000baseX(HD) 43 | Symm, Asym Pause(FD) 44 | 100base-TX(FD) 45 | 100base-TX(HD) 46 | 10base-T(FD) 47 | 10base-T(HD) 48 | Media Attachment Unit type - not advertised 49 | Vlan ID: - not advertised 50 | 51 | 52 | Total entries displayed: 2 53 | 54 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/alternate2/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "GigabitEthernet1": [ 3 | { 4 | "parent_interface": "N/A", 5 | "remote_chassis_id": "0102.e2ff.fdb0", 6 | "remote_port": "Te2/1/14", 7 | "remote_port_description": "ABCD-U1AC04-SW1", 8 | "remote_system_capab": "B,R", 9 | "remote_system_description": "Cisco IOS Software, IOS-XE Software, Catalyst 4500 L3 Switch Software (cat4500e-UNIVERSALK9-M), Version 03.06.05.E RELEASE SOFTWARE (fc2)", 10 | "remote_system_enable_capab": "B", 11 | "remote_system_name": "ABCD-U-DSW1.wan.acme.com" 12 | }, 13 | { 14 | "parent_interface": "N/A", 15 | "remote_chassis_id": "0102.e2ff.fdb0", 16 | "remote_port": "Te1/1/14", 17 | "remote_port_description": "ABCD-U1AC04-SW1", 18 | "remote_system_capab": "B,R", 19 | "remote_system_description": "Cisco IOS Software, IOS-XE Software, Catalyst 4500 L3 Switch Software (cat4500e-UNIVERSALK9-M), Version 03.06.05.E RELEASE SOFTWARE (fc2)", 20 | "remote_system_enable_capab": "B", 21 | "remote_system_name": "ABCD-U-DSW1.wan.acme.com" 22 | }, 23 | { 24 | "parent_interface": "N/A", 25 | "remote_chassis_id": "hmbbkku-la", 26 | "remote_port": "port-001", 27 | "remote_port_description": "N/A", 28 | "remote_system_capab": "S", 29 | "remote_system_description": "Hewlett-Packard HP ProBook 650 G1,A3112DD10303,5CG4543H13 + engineering", 30 | "remote_system_enable_capab": "S", 31 | "remote_system_name": "HMBBKKU-LA" 32 | }, 33 | { 34 | "parent_interface": "N/A", 35 | "remote_chassis_id": "jniceel-la", 36 | "remote_port": "port-001", 37 | "remote_port_description": "N/A", 38 | "remote_system_capab": "S", 39 | "remote_system_description": "HP HP ProBook 650 G2,,5CG64565JFL + engineering", 40 | "remote_system_enable_capab": "S", 41 | "remote_system_name": "JNICEEL-LA" 42 | }, 43 | { 44 | "parent_interface": "N/A", 45 | "remote_chassis_id": "swaaaer-lta", 46 | "remote_port": "port-001", 47 | "remote_port_description": "N/A", 48 | "remote_system_capab": "S", 49 | "remote_system_description": "Hewlett-Packard HP ProBook 6570b,A10112D102,5CB40117ZP + engineering", 50 | "remote_system_enable_capab": "S", 51 | "remote_system_name": "SWAAAER-LTA" 52 | }, 53 | { 54 | "parent_interface": "N/A", 55 | "remote_chassis_id": "rberrrann-lta", 56 | "remote_port": "port-001", 57 | "remote_port_description": "N/A", 58 | "remote_system_capab": "S", 59 | "remote_system_description": "Hewlett-Packard HP ProBook 650 G1,A3112DD11203,CNU444BMZ0 + engineering", 60 | "remote_system_enable_capab": "S", 61 | "remote_system_name": "RBERRRANN-LTA" 62 | }, 63 | { 64 | "parent_interface": "N/A", 65 | "remote_chassis_id": "cr-443-2", 66 | "remote_port": "port-001", 67 | "remote_port_description": "Siemens, SIMATIC NET, CP 343-1, 6GK7 443-1EX50-0XE0 , HW: 7, FW: V3.0.23, Ethernet Port, X1 P1", 68 | "remote_system_capab": "S", 69 | "remote_system_description": "Siemens, SIMATIC NET, CP 443-1, 6GK7 443-1EX50-0XE0, HW: Version 7, FW: Version V3.0.23, VPH6201262", 70 | "remote_system_enable_capab": "S", 71 | "remote_system_name": "N/A" 72 | } 73 | ] 74 | } 75 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/alternate2/show_int_Gi1.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet1 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 2cc2.603f.437a (bia 2cc2.603f.437a) 3 | Internet address is 10.0.0.51/24 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 198/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive set (10 sec) 8 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 9 | output flow-control is unsupported, input flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:00:07, output 00:00:18, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 1000 bits/sec, 1 packets/sec 17 | 5 minute output rate 0 bits/sec, 0 packets/sec 18 | 3815699 packets input, 275467675 bytes, 0 no buffer 19 | Received 0 broadcasts (0 IP multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 2610907 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 0 multicast, 0 pause input 23 | 5249863 packets output, 384472234 bytes, 0 underruns 24 | 0 output errors, 0 collisions, 0 interface resets 25 | 11192 unknown protocol drops 26 | 0 babbles, 0 late collision, 0 deferred 27 | 0 lost carrier, 0 no carrier, 0 pause output 28 | 0 output buffer failures, 0 output buffers swapped out 29 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/alternate2/show_lldp_neighbors.txt: -------------------------------------------------------------------------------- 1 | Capability codes: 2 | (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device 3 | (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other 4 | 5 | Device ID Local Intf Hold-time Capability Port ID 6 | ABCD-U-DSW1.wan.acmeGi1 120 B,R Te2/1/14 7 | ABCD-U-DSW1.wan.acmeGi1 120 B,R Te1/1/14 8 | HMBBKKU-LA Gi1 120 S port-001 9 | JNICEEL-LA Gi1 120 S port-001 10 | SWAAAER-LTA Gi1 120 S port-001 11 | RBERRRANN-LTA Gi1 120 S port-001 12 | not advertised Gi1 120 S port-001 13 | 14 | Total entries displayed: 7 15 | 16 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/alternate3/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "GigabitEthernet1": [ 3 | { 4 | "parent_interface": "N/A", 5 | "remote_chassis_id": "00ae.3b11.1d00", 6 | "remote_port": "Gi2/0", 7 | "remote_port_description": "GigabitEthernet2/0", 8 | "remote_system_capab": "B,R", 9 | "remote_system_description": "Cisco IOS Software, vios_l2 Software (vios_l2-ADVENTERPRISEK9-M), Version 15.2(4.0.55)E, TEST ENGINEERING ESTG_WEEKLY BUILD, synced to END_OF_FLO_ISP", 10 | "remote_system_enable_capab": "R", 11 | "remote_system_name": "SW2.cisco.com" 12 | }, 13 | { 14 | "parent_interface": "N/A", 15 | "remote_chassis_id": "0050.56c0.0001", 16 | "remote_port": "0050.56c0.0001", 17 | "remote_port_description": "N/A", 18 | "remote_system_capab": "N/A", 19 | "remote_system_description": "N/A", 20 | "remote_system_enable_capab": "N/A", 21 | "remote_system_name": "N/A" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/alternate3/show_int_Gi1.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet1 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 2cc2.603f.437a (bia 2cc2.603f.437a) 3 | Internet address is 10.0.0.51/24 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 198/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive set (10 sec) 8 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 9 | output flow-control is unsupported, input flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:00:07, output 00:00:18, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 1000 bits/sec, 1 packets/sec 17 | 5 minute output rate 0 bits/sec, 0 packets/sec 18 | 3815699 packets input, 275467675 bytes, 0 no buffer 19 | Received 0 broadcasts (0 IP multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 2610907 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 0 multicast, 0 pause input 23 | 5249863 packets output, 384472234 bytes, 0 underruns 24 | 0 output errors, 0 collisions, 0 interface resets 25 | 11192 unknown protocol drops 26 | 0 babbles, 0 late collision, 0 deferred 27 | 0 lost carrier, 0 no carrier, 0 pause output 28 | 0 output buffer failures, 0 output buffers swapped out 29 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/alternate3/show_lldp_neighbors.txt: -------------------------------------------------------------------------------- 1 | Capability codes: 2 | (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device 3 | (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other 4 | 5 | Device ID Local Intf Hold-time Capability Port ID 6 | SW2.cisco.com Gi1 120 R Gi2/0 7 | 0050.56c0.0001 Gi1 3601 0050.56c0.0001 8 | 9 | Total entries displayed: 2 10 | 11 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/alternate3/show_lldp_neighbors_Gi1_detail.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------ 2 | Local Intf: Gi1 3 | Chassis id: 00ae.3b11.1d00 4 | Port id: Gi2/0 5 | Port Description: GigabitEthernet2/0 6 | System Name: SW2.cisco.com 7 | 8 | System Description: 9 | Cisco IOS Software, vios_l2 Software (vios_l2-ADVENTERPRISEK9-M), Version 15.2(4.0.55)E, TEST ENGINEERING ESTG_WEEKLY BUILD, synced to END_OF_FLO_ISP 10 | Technical Support: http://www.cisco.com/techsupport 11 | Copyright (c) 1986-2015 by Cisco Systems, Inc. 12 | Compi 13 | 14 | Time remaining: 108 seconds 15 | System Capabilities: B,R 16 | Enabled Capabilities: R 17 | Management Addresses: 18 | IP: 192.168.61.122 19 | Auto Negotiation - not supported 20 | Physical media capabilities - not advertised 21 | Media Attachment Unit type - not advertised 22 | Vlan ID: - not advertised 23 | 24 | ------------------------------------------------ 25 | Local Intf: Gi1 26 | Chassis id: 0050.56c0.0001 27 | Port id: 0050.56c0.0001 28 | Port Description - not advertised 29 | System Name - not advertised 30 | System Description - not advertised 31 | 32 | Time remaining: 3514 seconds 33 | System Capabilities - not advertised 34 | Enabled Capabilities - not advertised 35 | Management Addresses - not advertised 36 | Auto Negotiation - supported, enabled 37 | Physical media capabilities: 38 | 1000baseT(FD) 39 | Media Attachment Unit type - not advertised 40 | Vlan ID: - not advertised 41 | 42 | MED Information: 43 | 44 | MED Codes: 45 | (NP) Network Policy, (LI) Location Identification 46 | (PS) Power Source Entity, (PD) Power Device 47 | (IN) Inventory 48 | 49 | Inventory information - not advertised 50 | Capabilities: 51 | Device type: Endpoint Class I 52 | Network Policies - not advertised 53 | Power requirements - not advertised 54 | Location - not advertised 55 | 56 | 57 | Total entries displayed: 2 58 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/alternate3/show_lldp_neighbors_GigabitEthernet1_detail.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------ 2 | Local Intf: Gi1 3 | Chassis id: 00ae.3b11.1d00 4 | Port id: Gi2/0 5 | Port Description: GigabitEthernet2/0 6 | System Name: SW2.cisco.com 7 | 8 | System Description: 9 | Cisco IOS Software, vios_l2 Software (vios_l2-ADVENTERPRISEK9-M), Version 15.2(4.0.55)E, TEST ENGINEERING ESTG_WEEKLY BUILD, synced to END_OF_FLO_ISP 10 | Technical Support: http://www.cisco.com/techsupport 11 | Copyright (c) 1986-2015 by Cisco Systems, Inc. 12 | Compi 13 | 14 | Time remaining: 108 seconds 15 | System Capabilities: B,R 16 | Enabled Capabilities: R 17 | Management Addresses: 18 | IP: 192.168.61.122 19 | Auto Negotiation - not supported 20 | Physical media capabilities - not advertised 21 | Media Attachment Unit type - not advertised 22 | Vlan ID: - not advertised 23 | 24 | ------------------------------------------------ 25 | Local Intf: Gi1 26 | Chassis id: 0050.56c0.0001 27 | Port id: 0050.56c0.0001 28 | Port Description - not advertised 29 | System Name - not advertised 30 | System Description - not advertised 31 | 32 | Time remaining: 3514 seconds 33 | System Capabilities - not advertised 34 | Enabled Capabilities - not advertised 35 | Management Addresses - not advertised 36 | Auto Negotiation - supported, enabled 37 | Physical media capabilities: 38 | 1000baseT(FD) 39 | Media Attachment Unit type - not advertised 40 | Vlan ID: - not advertised 41 | 42 | MED Information: 43 | 44 | MED Codes: 45 | (NP) Network Policy, (LI) Location Identification 46 | (PS) Power Source Entity, (PD) Power Device 47 | (IN) Inventory 48 | 49 | Inventory information - not advertised 50 | Capabilities: 51 | Device type: Endpoint Class I 52 | Network Policies - not advertised 53 | Power requirements - not advertised 54 | Location - not advertised 55 | 56 | 57 | Total entries displayed: 2 58 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "GigabitEthernet2": [{ 3 | "parent_interface": "N/A", 4 | "remote_system_capab": "B", 5 | "remote_system_description": "ProCurve J9019A Switch 2510-24, revision Q.10.01, ROM Q.10.02 (/sw/code/build/harp(harp))", 6 | "remote_port": "18", 7 | "remote_chassis_id": "0018.fe1e.b020", 8 | "remote_system_name": "twb-sf-hpsw2", 9 | "remote_system_enable_capab": "B", 10 | "remote_port_description": "18" 11 | }], 12 | "GigabitEthernet1": [{ 13 | "parent_interface": "N/A", 14 | "remote_system_capab": "B", 15 | "remote_system_description": "ProCurve J9019A Switch 2510-24, revision Q.10.01, ROM Q.10.02 (/sw/code/build/harp(harp))", 16 | "remote_port": "17", 17 | "remote_chassis_id": "0018.fe1e.b020", 18 | "remote_system_name": "twb-sf-hpsw1", 19 | "remote_system_enable_capab": "B", 20 | "remote_port_description": "17" 21 | }] 22 | } 23 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/normal/show_int_Gi1.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet1 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.27f8.e842 (bia 0800.27f8.e842) 3 | Internet address is 10.0.2.15/24 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive set (10 sec) 8 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 9 | output flow-control is unsupported, input flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:42:01, output 00:00:05, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 1000 bits/sec, 1 packets/sec 17 | 5 minute output rate 1000 bits/sec, 1 packets/sec 18 | 14028 packets input, 1766902 bytes, 0 no buffer 19 | Received 0 broadcasts (0 IP multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 0 multicast, 0 pause input 23 | 9446 packets output, 1379617 bytes, 0 underruns 24 | 0 output errors, 0 collisions, 0 interface resets 25 | 0 unknown protocol drops 26 | 0 babbles, 0 late collision, 0 deferred 27 | 0 lost carrier, 0 no carrier, 0 pause output 28 | 0 output buffer failures, 0 output buffers swapped out 29 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/normal/show_int_Gi2.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet2 is up, line protocol is up 2 | Hardware is CSR vNIC, address is 0800.2779.e896 (bia 0800.2779.e896) 3 | Description: blah bleh 4 | Internet address is 192.168.0.1/24 5 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 6 | reliability 255/255, txload 1/255, rxload 1/255 7 | Encapsulation ARPA, loopback not set 8 | Keepalive set (10 sec) 9 | Full Duplex, 1000Mbps, link type is auto, media type is RJ45 10 | output flow-control is unsupported, input flow-control is unsupported 11 | ARP type: ARPA, ARP Timeout 04:00:00 12 | Last input 00:00:04, output 00:00:05, output hang never 13 | Last clearing of "show interface" counters never 14 | Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0 15 | Queueing strategy: fifo 16 | Output queue: 0/40 (size/max) 17 | 5 minute input rate 0 bits/sec, 0 packets/sec 18 | 5 minute output rate 0 bits/sec, 0 packets/sec 19 | 118 packets input, 11502 bytes, 0 no buffer 20 | Received 0 broadcasts (0 IP multicasts) 21 | 0 runts, 0 giants, 0 throttles 22 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 23 | 0 watchdog, 0 multicast, 0 pause input 24 | 177 packets output, 19267 bytes, 0 underruns 25 | 0 output errors, 0 collisions, 1 interface resets 26 | 0 unknown protocol drops 27 | 0 babbles, 0 late collision, 0 deferred 28 | 0 lost carrier, 0 no carrier, 0 pause output 29 | 0 output buffer failures, 0 output buffers swapped out 30 | 31 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/normal/show_lldp_neighbors.txt: -------------------------------------------------------------------------------- 1 | Capability codes: 2 | (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device 3 | (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other 4 | 5 | Device ID Local Intf Hold-time Capability Port ID 6 | twb-sf-hpsw1 Gi1 120 B 17 7 | twb-sf-hpsw2 Gi2 120 B 18 8 | 9 | Total entries displayed: 2 10 | 11 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/normal/show_lldp_neighbors_GigabitEthernet1_detail.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------ 2 | Chassis id: 0018.fe1e.b020 3 | Port id: 17 4 | Port Description: 17 5 | System Name: twb-sf-hpsw1 6 | 7 | System Description: 8 | ProCurve J9019A Switch 2510-24, revision Q.10.01, ROM Q.10.02 (/sw/code/build/harp(harp)) 9 | 10 | Time remaining: 93 seconds 11 | System Capabilities: B 12 | Enabled Capabilities: B 13 | Management Addresses: 14 | IP: 10.220.88.10 15 | Auto Negotiation - not supported 16 | Physical media capabilities - not advertised 17 | Media Attachment Unit type - not advertised 18 | Vlan ID: - not advertised 19 | 20 | 21 | Total entries displayed: 1 22 | 23 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_lldp_neighbors_detail/normal/show_lldp_neighbors_GigabitEthernet2_detail.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------ 2 | Chassis id: 0018.fe1e.b020 3 | Port id: 18 4 | Port Description: 18 5 | System Name: twb-sf-hpsw2 6 | 7 | System Description: 8 | ProCurve J9019A Switch 2510-24, revision Q.10.01, ROM Q.10.02 (/sw/code/build/harp(harp)) 9 | 10 | Time remaining: 93 seconds 11 | System Capabilities: B 12 | Enabled Capabilities: B 13 | Management Addresses: 14 | IP: 10.220.88.11 15 | Auto Negotiation - not supported 16 | Physical media capabilities - not advertised 17 | Media Attachment Unit type - not advertised 18 | Vlan ID: - not advertised 19 | 20 | 21 | Total entries displayed: 1 22 | 23 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/2960_format/expected_result.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "static": true, 3 | "active": false, 4 | "vlan": 0, 5 | "mac": "11:11:22:22:33:33", 6 | "interface": "", 7 | "moves": -1, 8 | "last_move": -1.0 9 | }, 10 | { 11 | "static": false, 12 | "active": true, 13 | "vlan": 6, 14 | "mac": "00:18:B9:74:52:8F", 15 | "interface": "Fa0/16", 16 | "moves": -1, 17 | "last_move": -1.0 18 | }] 19 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/2960_format/show_mac_address_table.txt: -------------------------------------------------------------------------------- 1 | Mac Address Table 2 | ------------------------------------------- 3 | 4 | Vlan Mac Address Type Ports 5 | ---- ----------- -------- ----- 6 | All 1111.2222.3333 STATIC CPU 7 | 6 0018.b974.528f DYNAMIC Fa0/16 8 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/3560_format/expected_result.json: -------------------------------------------------------------------------------- 1 | [{"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:00:0C:CC:CC:CC", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:00:0C:CC:CC:CD", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:00", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:01", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:02", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:03", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:04", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:05", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:06", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:07", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:08", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:09", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:0A", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:0B", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:0C", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:0D", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:0E", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:0F", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "01:80:C2:00:00:10", "moves": -1}, {"vlan": 0, "static": true, "interface": "", "last_move": -1.0, "active": false, "mac": "FF:FF:FF:FF:FF:FF", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "00:0A:B8:2D:10:E0", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/3", "last_move": -1.0, "active": true, "mac": "00:12:80:B6:4C:D8", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "00:12:80:B6:4C:D9", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "00:14:69:15:41:00", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "00:18:B9:21:92:00", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/1", "last_move": -1.0, "active": true, "mac": "00:18:B9:21:92:78", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "00:18:B9:74:52:8F", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/13", "last_move": -1.0, "active": true, "mac": "00:19:06:17:66:0F", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/14", "last_move": -1.0, "active": true, "mac": "00:19:06:17:66:10", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/15", "last_move": -1.0, "active": true, "mac": "00:19:06:17:66:11", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/19", "last_move": -1.0, "active": true, "mac": "00:1B:D4:50:97:0F", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/20", "last_move": -1.0, "active": true, "mac": "00:1B:D4:50:97:10", "moves": -1}, {"vlan": 1, "static": false, "interface": "Fa0/21", "last_move": -1.0, "active": true, "mac": "00:1B:D4:50:97:11", "moves": -1}, {"vlan": 4, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "00:18:B9:74:52:8F", "moves": -1}, {"vlan": 45, "static": false, "interface": "Fa0/19", "last_move": -1.0, "active": true, "mac": "00:18:B9:45:D5:A9", "moves": -1}, {"vlan": 45, "static": false, "interface": "Fa0/5", "last_move": -1.0, "active": true, "mac": "00:18:B9:45:F7:80", "moves": -1}, {"vlan": 45, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "00:18:B9:74:52:8F", "moves": -1}, {"vlan": 56, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "00:18:B9:45:F7:81", "moves": -1}, {"vlan": 56, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "00:18:B9:74:52:8F", "moves": -1}, {"vlan": 56, "static": false, "interface": "Fa0/19", "last_move": -1.0, "active": true, "mac": "00:19:06:9C:80:E1", "moves": -1}, {"vlan": 6, "static": false, "interface": "Fa0/16", "last_move": -1.0, "active": true, "mac": "00:18:B9:74:52:8F", "moves": -1}, {"vlan": 6, "static": false, "interface": "Fa0/13", "last_move": -1.0, "active": true, "mac": "00:19:06:9C:80:E0", "moves": -1}] 2 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/3560_format/show_mac_address_table.txt: -------------------------------------------------------------------------------- 1 | Mac Address Table 2 | ------------------------------------------- 3 | 4 | Vlan Mac Address Type Ports 5 | ---- ----------- -------- ----- 6 | All 0100.0ccc.cccc STATIC CPU 7 | All 0100.0ccc.cccd STATIC CPU 8 | All 0180.c200.0000 STATIC CPU 9 | All 0180.c200.0001 STATIC CPU 10 | All 0180.c200.0002 STATIC CPU 11 | All 0180.c200.0003 STATIC CPU 12 | All 0180.c200.0004 STATIC CPU 13 | All 0180.c200.0005 STATIC CPU 14 | All 0180.c200.0006 STATIC CPU 15 | All 0180.c200.0007 STATIC CPU 16 | All 0180.c200.0008 STATIC CPU 17 | All 0180.c200.0009 STATIC CPU 18 | All 0180.c200.000a STATIC CPU 19 | All 0180.c200.000b STATIC CPU 20 | All 0180.c200.000c STATIC CPU 21 | All 0180.c200.000d STATIC CPU 22 | All 0180.c200.000e STATIC CPU 23 | All 0180.c200.000f STATIC CPU 24 | All 0180.c200.0010 STATIC CPU 25 | All ffff.ffff.ffff STATIC CPU 26 | 1 000a.b82d.10e0 DYNAMIC Fa0/16 27 | 1 0012.80b6.4cd8 DYNAMIC Fa0/3 28 | 1 0012.80b6.4cd9 DYNAMIC Fa0/16 29 | 1 0014.6915.4100 DYNAMIC Fa0/16 30 | 1 0018.b921.9200 DYNAMIC Fa0/16 31 | 1 0018.b921.9278 DYNAMIC Fa0/1 32 | 1 0018.b974.528f DYNAMIC Fa0/16 33 | 1 0019.0617.660f DYNAMIC Fa0/13 34 | 1 0019.0617.6610 DYNAMIC Fa0/14 35 | 1 0019.0617.6611 DYNAMIC Fa0/15 36 | 1 001b.d450.970f DYNAMIC Fa0/19 37 | 1 001b.d450.9710 DYNAMIC Fa0/20 38 | 1 001b.d450.9711 DYNAMIC Fa0/21 39 | 4 0018.b974.528f DYNAMIC Fa0/16 40 | 45 0018.b945.d5a9 DYNAMIC Fa0/19 41 | 45 0018.b945.f780 DYNAMIC Fa0/5 42 | 45 0018.b974.528f DYNAMIC Fa0/16 43 | 56 0018.b945.f781 DYNAMIC Fa0/16 44 | 56 0018.b974.528f DYNAMIC Fa0/16 45 | 56 0019.069c.80e1 DYNAMIC Fa0/19 46 | 6 0018.b974.528f DYNAMIC Fa0/16 47 | 6 0019.069c.80e0 DYNAMIC Fa0/13 48 | Total Mac Addresses for this criterion: 42 49 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/4500_format/expected_result.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "moves": -1, 4 | "interface": "Port-channel1", 5 | "vlan": 1, 6 | "static": false, 7 | "mac": "30:A3:30:A3:A1:C3", 8 | "active": true, 9 | "last_move": -1 10 | }, 11 | { 12 | "moves": -1, 13 | "interface": "Port-channel1", 14 | "vlan": 99, 15 | "static": false, 16 | "mac": "30:A3:30:A3:A1:C4", 17 | "active": true, 18 | "last_move": -1 19 | }, 20 | { 21 | "moves": -1, 22 | "interface": "Port-channel1", 23 | "vlan": 99, 24 | "static": false, 25 | "mac": "30:A3:30:A3:A1:C5", 26 | "active": true, 27 | "last_move": -1 28 | }, 29 | { 30 | "moves": -1, 31 | "interface": "Port-channel1", 32 | "vlan": 99, 33 | "static": false, 34 | "mac": "30:A3:30:A3:A1:C6", 35 | "active": true, 36 | "last_move": -1 37 | }, 38 | { 39 | "moves": -1, 40 | "interface": "Port-channel1", 41 | "vlan": 99, 42 | "static": false, 43 | "mac": "30:A3:30:A3:A1:C7", 44 | "active": true, 45 | "last_move": -1 46 | }, 47 | { 48 | "moves": -1, 49 | "interface": "Port-channel1", 50 | "vlan": 99, 51 | "static": false, 52 | "mac": "30:A3:30:A3:A1:C8", 53 | "active": true, 54 | "last_move": -1 55 | }, 56 | { 57 | "moves": -1, 58 | "interface": "Port-channel1", 59 | "vlan": 99, 60 | "static": false, 61 | "mac": "30:A3:30:A3:A1:C9", 62 | "active": true, 63 | "last_move": -1 64 | }, 65 | { 66 | "moves": -1, 67 | "interface": "Port-channel1", 68 | "vlan": 99, 69 | "static": false, 70 | "mac": "30:A3:30:A3:A1:CA", 71 | "active": true, 72 | "last_move": -1 73 | }, 74 | { 75 | "moves": -1, 76 | "interface": "Po1", 77 | "vlan": 1, 78 | "static": true, 79 | "mac": "01:00:0C:CC:CC:CE", 80 | "active": false, 81 | "last_move": -1 82 | }, 83 | { 84 | "moves": -1, 85 | "interface": "Po1", 86 | "vlan": 1, 87 | "static": true, 88 | "mac": "FF:FF:FF:FF:FF:FF", 89 | "active": false, 90 | "last_move": -1 91 | }, 92 | { 93 | "moves": -1, 94 | "interface": "Gi10/31", 95 | "vlan": 39, 96 | "static": true, 97 | "mac": "FF:FF:FF:FF:FF:FF", 98 | "active": false, 99 | "last_move": -1 100 | }, 101 | { 102 | "moves": -1, 103 | "interface": "Gi10/32", 104 | "vlan": 39, 105 | "static": true, 106 | "mac": "FF:FF:FF:FF:FF:FF", 107 | "active": false, 108 | "last_move": -1 109 | }, 110 | { 111 | "moves": -1, 112 | "interface": "", 113 | "vlan": 39, 114 | "static": true, 115 | "mac": "FF:FF:FF:FF:FF:FF", 116 | "active": false, 117 | "last_move": -1 118 | }, 119 | { 120 | "moves": -1, 121 | "interface": "Po1", 122 | "vlan": 39, 123 | "static": true, 124 | "mac": "FF:FF:FF:FF:FF:FF", 125 | "active": false, 126 | "last_move": -1 127 | } 128 | ] 129 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/4500_format/show_mac_address_table.txt: -------------------------------------------------------------------------------- 1 | Unicast Entries 2 | vlan mac address type protocols port 3 | ---------+---------------+--------+---------------------+------------------------- 4 | 1 30a3.30a3.a1c3 dynamic ip,ipx,assigned,other Port-channel1 5 | 99 30a3.30a3.a1c4 dynamic ip,ipx,assigned,other Port-channel1 6 | 99 30a3.30a3.a1c5 dynamic ip,ipx,assigned,other Port-channel1 7 | 99 30a3.30a3.a1c6 dynamic ip,ipx,assigned,other Port-channel1 8 | 99 30a3.30a3.a1c7 dynamic ip,ipx,assigned,other Port-channel1 9 | 99 30a3.30a3.a1c8 dynamic ip,ipx,assigned,other Port-channel1 10 | 99 30a3.30a3.a1c9 dynamic ip,ipx,assigned,other Port-channel1 11 | 99 30a3.30a3.a1ca dynamic ip,ipx,assigned,other Port-channel1 12 | 13 | Multicast Entries 14 | vlan mac address type ports 15 | ---------+---------------+-------+-------------------------------------------- 16 | 1 0100.0ccc.ccce system Po1 17 | 1 ffff.ffff.ffff system Po1 18 | 39 ffff.ffff.ffff system Gi10/31,Gi10/32,Switch,Po1 19 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/4500_format2/expected_result.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "vlan": 1, 4 | "interface": "Port-channel21", 5 | "static": false, 6 | "mac": "00:11:21:E4:87:10", 7 | "moves": -1, 8 | "active": true, 9 | "last_move": -1 10 | }, 11 | { 12 | "vlan": 1, 13 | "interface": "", 14 | "static": true, 15 | "mac": "00:12:DA:F7:0C:FF", 16 | "moves": -1, 17 | "active": false, 18 | "last_move": -1 19 | }, 20 | { 21 | "vlan": 1, 22 | "interface": "Port-channel21", 23 | "static": false, 24 | "mac": "00:17:94:15:EE:C0", 25 | "moves": -1, 26 | "active": true, 27 | "last_move": -1 28 | }, 29 | { 30 | "vlan": 11, 31 | "interface": "GigabitEthernet3/15", 32 | "static": true, 33 | "mac": "00:04:F2:FE:7F:95", 34 | "moves": -1, 35 | "active": false, 36 | "last_move": -1 37 | }, 38 | { 39 | "vlan": 11, 40 | "interface": "GigabitEthernet2/47", 41 | "static": true, 42 | "mac": "00:04:F2:FE:82:DA", 43 | "moves": -1, 44 | "active": false, 45 | "last_move": -1 46 | }, 47 | { 48 | "vlan": 1, 49 | "interface": "Po21", 50 | "static": true, 51 | "mac": "01:00:0C:CC:CC:CE", 52 | "moves": -1, 53 | "active": false, 54 | "last_move": -1 55 | }, 56 | { 57 | "vlan": 1, 58 | "interface": "", 59 | "static": true, 60 | "mac": "FF:FF:FF:FF:FF:FF", 61 | "moves": -1, 62 | "active": false, 63 | "last_move": -1 64 | }, 65 | { 66 | "vlan": 1, 67 | "interface": "Po21", 68 | "static": true, 69 | "mac": "FF:FF:FF:FF:FF:FF", 70 | "moves": -1, 71 | "active": false, 72 | "last_move": -1 73 | }, 74 | { 75 | "vlan": 11, 76 | "interface": "Gi2/4", 77 | "static": true, 78 | "mac": "FF:FF:FF:FF:FF:FF", 79 | "moves": -1, 80 | "active": false, 81 | "last_move": -1 82 | }, 83 | { 84 | "vlan": 11, 85 | "interface": "Gi2/5", 86 | "static": true, 87 | "mac": "FF:FF:FF:FF:FF:FF", 88 | "moves": -1, 89 | "active": false, 90 | "last_move": -1 91 | }, 92 | { 93 | "vlan": 11, 94 | "interface": "Gi2/8", 95 | "static": true, 96 | "mac": "FF:FF:FF:FF:FF:FF", 97 | "moves": -1, 98 | "active": false, 99 | "last_move": -1 100 | }, 101 | { 102 | "vlan": 11, 103 | "interface": "Gi2/11", 104 | "static": true, 105 | "mac": "FF:FF:FF:FF:FF:FF", 106 | "moves": -1, 107 | "active": false, 108 | "last_move": -1 109 | }, 110 | { 111 | "vlan": 11, 112 | "interface": "Gi2/12", 113 | "static": true, 114 | "mac": "FF:FF:FF:FF:FF:FF", 115 | "moves": -1, 116 | "active": false, 117 | "last_move": -1 118 | }, 119 | { 120 | "vlan": 11, 121 | "interface": "Gi2/13", 122 | "static": true, 123 | "mac": "FF:FF:FF:FF:FF:FF", 124 | "moves": -1, 125 | "active": false, 126 | "last_move": -1 127 | }, 128 | { 129 | "vlan": 11, 130 | "interface": "Gi2/19", 131 | "static": true, 132 | "mac": "FF:FF:FF:FF:FF:FF", 133 | "moves": -1, 134 | "active": false, 135 | "last_move": -1 136 | }, 137 | { 138 | "vlan": 11, 139 | "interface": "Gi2/41", 140 | "static": true, 141 | "mac": "FF:FF:FF:FF:FF:FF", 142 | "moves": -1, 143 | "active": false, 144 | "last_move": -1 145 | }, 146 | { 147 | "vlan": 11, 148 | "interface": "Gi2/42", 149 | "static": true, 150 | "mac": "FF:FF:FF:FF:FF:FF", 151 | "moves": -1, 152 | "active": false, 153 | "last_move": -1 154 | }, 155 | { 156 | "vlan": 11, 157 | "interface": "Gi2/43", 158 | "static": true, 159 | "mac": "FF:FF:FF:FF:FF:FF", 160 | "moves": -1, 161 | "active": false, 162 | "last_move": -1 163 | }, 164 | { 165 | "vlan": 11, 166 | "interface": "Gi2/47", 167 | "static": true, 168 | "mac": "FF:FF:FF:FF:FF:FF", 169 | "moves": -1, 170 | "active": false, 171 | "last_move": -1 172 | }, 173 | { 174 | "vlan": 11, 175 | "interface": "Gi3/10", 176 | "static": true, 177 | "mac": "FF:FF:FF:FF:FF:FF", 178 | "moves": -1, 179 | "active": false, 180 | "last_move": -1 181 | }, 182 | { 183 | "vlan": 11, 184 | "interface": "Gi3/15", 185 | "static": true, 186 | "mac": "FF:FF:FF:FF:FF:FF", 187 | "moves": -1, 188 | "active": false, 189 | "last_move": -1 190 | }, 191 | { 192 | "vlan": 11, 193 | "interface": "Gi3/16", 194 | "static": true, 195 | "mac": "FF:FF:FF:FF:FF:FF", 196 | "moves": -1, 197 | "active": false, 198 | "last_move": -1 199 | }, 200 | { 201 | "vlan": 24, 202 | "interface": "Po21", 203 | "static": true, 204 | "mac": "FF:FF:FF:FF:FF:FF", 205 | "moves": -1, 206 | "active": false, 207 | "last_move": -1 208 | }, 209 | { 210 | "vlan": 27, 211 | "interface": "Gi3/30", 212 | "static": true, 213 | "mac": "FF:FF:FF:FF:FF:FF", 214 | "moves": -1, 215 | "active": false, 216 | "last_move": -1 217 | }, 218 | { 219 | "vlan": 27, 220 | "interface": "Po21", 221 | "static": true, 222 | "mac": "FF:FF:FF:FF:FF:FF", 223 | "moves": -1, 224 | "active": false, 225 | "last_move": -1 226 | } 227 | ] 228 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/4500_format2/show_mac_address_table.txt: -------------------------------------------------------------------------------- 1 | Unicast Entries 2 | vlan mac address type protocols port 3 | -------+---------------+--------+---------------------+-------------------- 4 | 1 0011.21e4.8710 dynamic ip,assigned,other Port-channel21 5 | 1 0012.daf7.0cff static ip,ipx,assigned,other Switch 6 | 1 0017.9415.eec0 dynamic ip,assigned Port-channel21 7 | 11 0004.f2fe.7f95 static ip,ipx,assigned,other GigabitEthernet3/15 8 | 11 0004.f2fe.82da static ip,ipx,assigned,other GigabitEthernet2/47 9 | 10 | Multicast Entries 11 | vlan mac address type ports 12 | -------+---------------+-------+-------------------------------------------- 13 | 1 0100.0ccc.ccce system Po21 14 | 1 ffff.ffff.ffff system Switch,Po21 15 | 11 ffff.ffff.ffff system Gi2/4,Gi2/5,Gi2/8,Gi2/11,Gi2/12,Gi2/13,Gi2/19 16 | Gi2/41,Gi2/42,Gi2/43,Gi2/47,Gi3/10,Gi3/15 17 | Gi3/16 18 | 24 ffff.ffff.ffff system Po21 19 | 27 ffff.ffff.ffff system Gi3/30,Po21 20 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/4948_format/expected_result.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "static": false, 3 | "active": true, 4 | "vlan": 999, 5 | "mac": "11:11:22:22:33:33", 6 | "interface": "Port-channel1", 7 | "moves": -1, 8 | "last_move": -1.0 9 | }] 10 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/4948_format/show_mac_address_table.txt: -------------------------------------------------------------------------------- 1 | Unicast Entries 2 | vlan mac address type protocols port 3 | -------+---------------+--------+---------------------+-------------------- 4 | 999 1111.2222.3333 dynamic ip Port-channel1 5 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/6500_format/expected_result.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "static": false, 3 | "active": true, 4 | "vlan": 999, 5 | "mac": "11:11:22:22:33:33", 6 | "interface": "Port-channel1", 7 | "moves": -1, 8 | "last_move": -1.0 9 | }, 10 | { 11 | "static": false, 12 | "active": true, 13 | "vlan": 999, 14 | "mac": "11:11:22:22:33:33", 15 | "interface": "Port-channel2", 16 | "moves": -1, 17 | "last_move": -1.0 18 | }] 19 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/6500_format/show_mac_address_table.txt: -------------------------------------------------------------------------------- 1 | Legend: * - primary entry 2 | age - seconds since last seen 3 | n/a - not available 4 | 5 | vlan mac address type learn age ports 6 | ------+----------------+--------+-----+----------+-------------------------- 7 | * 999 1111.2222.3333 dynamic Yes 0 Port-channel1 8 | 999 1111.2222.3333 dynamic Yes 0 Port-channel2 9 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/6500_format2/expected_result.json: -------------------------------------------------------------------------------- 1 | [{"last_move": -1.0, "vlan": 666, "moves": -1, "mac": "30:A3:30:A3:A1:C3", "static": false, "interface": "Te1/30", "active": true}, {"last_move": -1.0, "vlan": 666, "moves": -1, "mac": "30:A3:30:A3:5A:B8", "static": false, "interface": "Po3", "active": true}, {"last_move": -1.0, "vlan": 60, "moves": -1, "mac": "30:A3:30:A3:4D:54", "static": false, "interface": "Te1/21", "active": true}, {"last_move": -1.0, "vlan": 777, "moves": -1, "mac": "00:00:30:A3:01:67", "static": true, "interface": "", "active": false}, {"last_move": -1.0, "vlan": 664, "moves": -1, "mac": "30:A3:30:A3:58:B5", "static": false, "interface": "Po6", "active": true}, {"last_move": -1.0, "vlan": 667, "moves": -1, "mac": "30:A3:30:A3:DA:F5", "static": false, "interface": "Te3/20", "active": true}, {"last_move": -1.0, "vlan": 668, "moves": -1, "mac": "30:A3:30:A3:E4:01", "static": false, "interface": "Po6", "active": true}, {"last_move": -1.0, "vlan": 669, "moves": -1, "mac": "30:A3:30:A3:5A:22", "static": false, "interface": "Te3/20", "active": true}, {"last_move": -1.0, "vlan": 0, "moves": -1, "mac": "00:00:00:00:00:00", "static": true, "interface": "", "active": false}] 2 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/6500_format2/show_mac_address_table.txt: -------------------------------------------------------------------------------- 1 | Legend: * - primary entry 2 | age - seconds since last seen 3 | n/a - not available 4 | 5 | vlan mac address type learn age ports 6 | ------+----------------+--------+-----+----------+-------------------------- 7 | 666 30a3.30a3.a1c3 dynamic Yes 1200 Te1/30 8 | 666 30a3.30a3.5ab8 dynamic Yes 0 Po3 9 | 60 30a3.30a3.4d54 dynamic Yes 3600 Te1/21 10 | * 777 0000.30a3.0167 static No - Router 11 | 664 30a3.30a3.58b5 dynamic Yes 180 Po6 12 | 667 30a3.30a3.daf5 dynamic Yes 0 Te3/20 13 | 668 30a3.30a3.e401 dynamic Yes 600 Po6 14 | 669 30a3.30a3.5a22 dynamic Yes 300 Te3/20 15 | * --- 0000.0000.0000 static No - Router 16 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/6500_format3/expected_result.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "vlan": 19, 4 | "active": true, 5 | "last_move": -1, 6 | "static": false, 7 | "mac": "00:FF:9A:B4:03:AD", 8 | "moves": -1, 9 | "interface": "Te7/1" 10 | }, 11 | { 12 | "vlan": 197, 13 | "active": false, 14 | "last_move": -1, 15 | "static": true, 16 | "mac": "C0:FF:BC:1F:72:F2", 17 | "moves": -1, 18 | "interface": "Gi4/28" 19 | }, 20 | { 21 | "vlan": 197, 22 | "active": false, 23 | "last_move": -1, 24 | "static": true, 25 | "mac": "10:FF:AE:63:7A:9E", 26 | "moves": -1, 27 | "interface": "Gi1/14" 28 | }, 29 | { 30 | "vlan": 197, 31 | "active": false, 32 | "last_move": -1, 33 | "static": true, 34 | "mac": "D4:FF:56:B2:95:27", 35 | "moves": -1, 36 | "interface": "Gi2/1" 37 | }, 38 | { 39 | "vlan": 100, 40 | "active": false, 41 | "last_move": -1, 42 | "static": true, 43 | "mac": "1C:FF:0F:C9:11:80", 44 | "moves": -1, 45 | "interface": "" 46 | }, 47 | { 48 | "vlan": 0, 49 | "active": false, 50 | "last_move": -1, 51 | "static": true, 52 | "mac": "00:FF:00:00:00:00", 53 | "moves": -1, 54 | "interface": "" 55 | }, 56 | { 57 | "vlan": 118, 58 | "active": false, 59 | "last_move": -1, 60 | "static": true, 61 | "mac": "50:FF:9D:CC:18:2B", 62 | "moves": -1, 63 | "interface": "Gi2/16" 64 | }, 65 | { 66 | "vlan": 118, 67 | "active": false, 68 | "last_move": -1, 69 | "static": true, 70 | "mac": "50:FF:9D:CC:16:67", 71 | "moves": -1, 72 | "interface": "Gi3/29" 73 | }, 74 | { 75 | "vlan": 197, 76 | "active": false, 77 | "last_move": -1, 78 | "static": true, 79 | "mac": "10:FF:AE:63:9F:FE", 80 | "moves": -1, 81 | "interface": "Gi4/18" 82 | }, 83 | { 84 | "vlan": 197, 85 | "active": false, 86 | "last_move": -1, 87 | "static": true, 88 | "mac": "33:33:00:00:00:FF", 89 | "moves": -1, 90 | "interface": "Gi1/1" 91 | }, 92 | { 93 | "vlan": 197, 94 | "active": false, 95 | "last_move": -1, 96 | "static": true, 97 | "mac": "33:33:00:00:00:FF", 98 | "moves": -1, 99 | "interface": "Gi1/2" 100 | }, 101 | { 102 | "vlan": 197, 103 | "active": false, 104 | "last_move": -1, 105 | "static": true, 106 | "mac": "33:33:00:00:00:FF", 107 | "moves": -1, 108 | "interface": "Gi1/3" 109 | }, 110 | { 111 | "vlan": 197, 112 | "active": false, 113 | "last_move": -1, 114 | "static": true, 115 | "mac": "33:33:00:00:00:FF", 116 | "moves": -1, 117 | "interface": "Gi1/4" 118 | }, 119 | { 120 | "vlan": 197, 121 | "active": false, 122 | "last_move": -1, 123 | "static": true, 124 | "mac": "33:33:00:00:00:FF", 125 | "moves": -1, 126 | "interface": "Gi1/6" 127 | }, 128 | { 129 | "vlan": 197, 130 | "active": false, 131 | "last_move": -1, 132 | "static": true, 133 | "mac": "33:33:00:00:00:FF", 134 | "moves": -1, 135 | "interface": "Gi1/7" 136 | }, 137 | { 138 | "vlan": 197, 139 | "active": false, 140 | "last_move": -1, 141 | "static": true, 142 | "mac": "33:33:00:00:00:FF", 143 | "moves": -1, 144 | "interface": "Gi1/8" 145 | }, 146 | { 147 | "vlan": 197, 148 | "active": false, 149 | "last_move": -1, 150 | "static": true, 151 | "mac": "33:33:00:00:00:FF", 152 | "moves": -1, 153 | "interface": "Gi1/9" 154 | }, 155 | { 156 | "vlan": 197, 157 | "active": false, 158 | "last_move": -1, 159 | "static": true, 160 | "mac": "33:33:00:00:00:FF", 161 | "moves": -1, 162 | "interface": "Gi10/44" 163 | }, 164 | { 165 | "vlan": 197, 166 | "active": false, 167 | "last_move": -1, 168 | "static": true, 169 | "mac": "33:33:00:00:00:FF", 170 | "moves": -1, 171 | "interface": "Gi10/45" 172 | }, 173 | { 174 | "vlan": 197, 175 | "active": false, 176 | "last_move": -1, 177 | "static": true, 178 | "mac": "33:33:00:00:00:FF", 179 | "moves": -1, 180 | "interface": "Gi10/46" 181 | }, 182 | { 183 | "vlan": 197, 184 | "active": false, 185 | "last_move": -1, 186 | "static": true, 187 | "mac": "33:33:00:00:00:FF", 188 | "moves": -1, 189 | "interface": "Gi10/48" 190 | }, 191 | { 192 | "vlan": 197, 193 | "active": false, 194 | "last_move": -1, 195 | "static": true, 196 | "mac": "33:33:00:00:00:FF", 197 | "moves": -1, 198 | "interface": "" 199 | }, 200 | { 201 | "vlan": 197, 202 | "active": false, 203 | "last_move": -1, 204 | "static": true, 205 | "mac": "33:33:00:00:00:FF", 206 | "moves": -1, 207 | "interface": "" 208 | }, 209 | { 210 | "vlan": 197, 211 | "active": false, 212 | "last_move": -1, 213 | "static": true, 214 | "mac": "33:33:00:00:00:FF", 215 | "moves": -1, 216 | "interface": "" 217 | }, 218 | { 219 | "vlan": 197, 220 | "active": false, 221 | "last_move": -1, 222 | "static": true, 223 | "mac": "33:33:00:00:00:FF", 224 | "moves": -1, 225 | "interface": "Gi10/43" 226 | }, 227 | { 228 | "vlan": 197, 229 | "active": false, 230 | "last_move": -1, 231 | "static": true, 232 | "mac": "C0:FF:BC:1F:71:B7", 233 | "moves": -1, 234 | "interface": "Gi5/8" 235 | }, 236 | { 237 | "vlan": 118, 238 | "active": false, 239 | "last_move": -1, 240 | "static": true, 241 | "mac": "3C:FF:0E:D0:0F:7B", 242 | "moves": -1, 243 | "interface": "Gi4/16" 244 | } 245 | ] 246 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/6500_format3/show_mac_address_table.txt: -------------------------------------------------------------------------------- 1 | Legend: * - primary entry 2 | age - seconds since last seen 3 | n/a - not available 4 | 5 | vlan mac address type learn age ports 6 | ------+----------------+--------+-----+----------+-------------------------- 7 | * 19 00ff.9ab4.03ad dynamic Yes 25 Te7/1 8 | 197 c0ff.bc1f.72f2 static Yes - Gi4/28 9 | 197 10ff.ae63.7a9e static Yes - Gi1/14 10 | 197 d4ff.56b2.9527 static Yes - Gi2/1 11 | * 100 1cff.0fc9.1180 static No - Router 12 | * --- 00ff.0000.0000 static No - Router 13 | 118 50ff.9dcc.182b static Yes - Gi2/16 14 | 118 50ff.9dcc.1667 static Yes - Gi3/29 15 | 197 10ff.ae63.9ffe static Yes - Gi4/18 16 | * 197 3333.0000.00ff static Yes - Gi1/1,Gi1/2,Gi1/3,Gi1/4 17 | Gi1/6,Gi1/7,Gi1/8,Gi1/9 18 | Gi10/44,Gi10/45,Gi10/46 19 | Gi10/48,Router,Switch,Stby-Switch 20 | Gi10/43 21 | 197 c0ff.bc1f.71b7 static Yes - Gi5/8 22 | 118 3cff.0ed0.0f7b static Yes - Gi4/16 23 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/alt_show_cmd/expected_result.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "static": false, 3 | "active": true, 4 | "vlan": 1, 5 | "mac": "64:00:F1:CF:2C:C6", 6 | "interface": "Wlan-GigabitEthernet0", 7 | "moves": -1, 8 | "last_move": -1.0 9 | }, { 10 | "static": true, 11 | "active": false, 12 | "vlan": 1, 13 | "mac": "A4:93:4C:C1:67:A7", 14 | "interface": "Vlan1", 15 | "moves": -1, 16 | "last_move": -1.0 17 | }, { 18 | "static": false, 19 | "active": true, 20 | "vlan": 100, 21 | "mac": "00:0C:29:06:17:D6", 22 | "interface": "FastEthernet7", 23 | "moves": -1, 24 | "last_move": -1.0 25 | }, { 26 | "static": false, 27 | "active": true, 28 | "vlan": 100, 29 | "mac": "00:0C:29:13:42:1B", 30 | "interface": "FastEthernet7", 31 | "moves": -1, 32 | "last_move": -1.0 33 | }, { 34 | "static": false, 35 | "active": true, 36 | "vlan": 100, 37 | "mac": "00:18:0A:B3:59:F1", 38 | "interface": "FastEthernet7", 39 | "moves": -1, 40 | "last_move": -1.0 41 | }, { 42 | "static": false, 43 | "active": true, 44 | "vlan": 100, 45 | "mac": "00:18:DD:32:1F:7C", 46 | "interface": "FastEthernet6", 47 | "moves": -1, 48 | "last_move": -1.0 49 | }, { 50 | "static": false, 51 | "active": true, 52 | "vlan": 100, 53 | "mac": "00:25:64:F5:D3:52", 54 | "interface": "FastEthernet7", 55 | "moves": -1, 56 | "last_move": -1.0 57 | }, { 58 | "static": false, 59 | "active": true, 60 | "vlan": 100, 61 | "mac": "00:26:AB:B9:A5:03", 62 | "interface": "FastEthernet4", 63 | "moves": -1, 64 | "last_move": -1.0 65 | }, { 66 | "static": true, 67 | "active": false, 68 | "vlan": 100, 69 | "mac": "A4:93:4C:C1:67:A7", 70 | "interface": "Vlan100", 71 | "moves": -1, 72 | "last_move": -1.0 73 | }, { 74 | "static": false, 75 | "active": true, 76 | "vlan": 100, 77 | "mac": "AC:3A:7A:1A:BA:4B", 78 | "interface": "Wlan-GigabitEthernet0", 79 | "moves": -1, 80 | "last_move": -1.0 81 | }, { 82 | "static": false, 83 | "active": true, 84 | "vlan": 100, 85 | "mac": "B0:A7:37:6F:B3:B4", 86 | "interface": "FastEthernet7", 87 | "moves": -1, 88 | "last_move": -1.0 89 | }, { 90 | "static": false, 91 | "active": true, 92 | "vlan": 100, 93 | "mac": "BC:5F:F4:35:FA:0E", 94 | "interface": "FastEthernet7", 95 | "moves": -1, 96 | "last_move": -1.0 97 | }, { 98 | "static": false, 99 | "active": true, 100 | "vlan": 100, 101 | "mac": "DC:3A:5E:67:1A:98", 102 | "interface": "FastEthernet7", 103 | "moves": -1, 104 | "last_move": -1.0 105 | }, { 106 | "static": false, 107 | "active": true, 108 | "vlan": 100, 109 | "mac": "DC:3A:5E:E2:6A:95", 110 | "interface": "Wlan-GigabitEthernet0", 111 | "moves": -1, 112 | "last_move": -1.0 113 | }, { 114 | "static": false, 115 | "active": true, 116 | "vlan": 100, 117 | "mac": "F0:4F:7C:92:5A:45", 118 | "interface": "Wlan-GigabitEthernet0", 119 | "moves": -1, 120 | "last_move": -1.0 121 | }, { 122 | "static": false, 123 | "active": true, 124 | "vlan": 200, 125 | "mac": "00:09:B7:54:1A:88", 126 | "interface": "FastEthernet7", 127 | "moves": -1, 128 | "last_move": -1.0 129 | }, { 130 | "static": false, 131 | "active": true, 132 | "vlan": 200, 133 | "mac": "10:BD:18:01:A0:B4", 134 | "interface": "FastEthernet3", 135 | "moves": -1, 136 | "last_move": -1.0 137 | }, { 138 | "static": false, 139 | "active": true, 140 | "vlan": 200, 141 | "mac": "20:4C:9E:D7:CB:80", 142 | "interface": "FastEthernet2", 143 | "moves": -1, 144 | "last_move": -1.0 145 | }, { 146 | "static": true, 147 | "active": false, 148 | "vlan": 200, 149 | "mac": "A4:93:4C:C1:67:A7", 150 | "interface": "Vlan200", 151 | "moves": -1, 152 | "last_move": -1.0 153 | }] 154 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/alt_show_cmd/show_mac_address_table.txt: -------------------------------------------------------------------------------- 1 | Destination Address Address Type VLAN Destination Port 2 | ------------------- ------------ ---- -------------------- 3 | 6400.f1cf.2cc6 Dynamic 1 Wlan-GigabitEthernet0 4 | a493.4cc1.67a7 Self 1 Vlan1 5 | 000c.2906.17d6 Dynamic 100 FastEthernet7 6 | 000c.2913.421b Dynamic 100 FastEthernet7 7 | 0018.0ab3.59f1 Dynamic 100 FastEthernet7 8 | 0018.dd32.1f7c Dynamic 100 FastEthernet6 9 | 0025.64f5.d352 Dynamic 100 FastEthernet7 10 | 0026.abb9.a503 Dynamic 100 FastEthernet4 11 | a493.4cc1.67a7 Self 100 Vlan100 12 | ac3a.7a1a.ba4b Dynamic 100 Wlan-GigabitEthernet0 13 | b0a7.376f.b3b4 Dynamic 100 FastEthernet7 14 | bc5f.f435.fa0e Dynamic 100 FastEthernet7 15 | dc3a.5e67.1a98 Dynamic 100 FastEthernet7 16 | dc3a.5ee2.6a95 Dynamic 100 Wlan-GigabitEthernet0 17 | f04f.7c92.5a45 Dynamic 100 Wlan-GigabitEthernet0 18 | 0009.b754.1a88 Dynamic 200 FastEthernet7 19 | 10bd.1801.a0b4 Dynamic 200 FastEthernet3 20 | 204c.9ed7.cb80 Dynamic 200 FastEthernet2 21 | a493.4cc1.67a7 Self 200 Vlan200 22 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "static": false, 3 | "active": true, 4 | "vlan": 1, 5 | "mac": "64:00:F1:CF:2C:C6", 6 | "interface": "Wlan-GigabitEthernet0", 7 | "moves": -1, 8 | "last_move": -1.0 9 | }, { 10 | "static": true, 11 | "active": false, 12 | "vlan": 1, 13 | "mac": "A4:93:4C:C1:67:A7", 14 | "interface": "Vlan1", 15 | "moves": -1, 16 | "last_move": -1.0 17 | }, { 18 | "static": false, 19 | "active": true, 20 | "vlan": 100, 21 | "mac": "00:0C:29:06:17:D6", 22 | "interface": "FastEthernet7", 23 | "moves": -1, 24 | "last_move": -1.0 25 | }, { 26 | "static": false, 27 | "active": true, 28 | "vlan": 100, 29 | "mac": "00:0C:29:13:42:1B", 30 | "interface": "FastEthernet7", 31 | "moves": -1, 32 | "last_move": -1.0 33 | }, { 34 | "static": false, 35 | "active": true, 36 | "vlan": 100, 37 | "mac": "00:18:0A:B3:59:F1", 38 | "interface": "FastEthernet7", 39 | "moves": -1, 40 | "last_move": -1.0 41 | }, { 42 | "static": false, 43 | "active": true, 44 | "vlan": 100, 45 | "mac": "00:18:DD:32:1F:7C", 46 | "interface": "FastEthernet6", 47 | "moves": -1, 48 | "last_move": -1.0 49 | }, { 50 | "static": false, 51 | "active": true, 52 | "vlan": 100, 53 | "mac": "00:25:64:F5:D3:52", 54 | "interface": "FastEthernet7", 55 | "moves": -1, 56 | "last_move": -1.0 57 | }, { 58 | "static": false, 59 | "active": true, 60 | "vlan": 100, 61 | "mac": "00:26:AB:B9:A5:03", 62 | "interface": "FastEthernet4", 63 | "moves": -1, 64 | "last_move": -1.0 65 | }, { 66 | "static": true, 67 | "active": false, 68 | "vlan": 100, 69 | "mac": "A4:93:4C:C1:67:A7", 70 | "interface": "Vlan100", 71 | "moves": -1, 72 | "last_move": -1.0 73 | }, { 74 | "static": false, 75 | "active": true, 76 | "vlan": 100, 77 | "mac": "AC:3A:7A:1A:BA:4B", 78 | "interface": "Wlan-GigabitEthernet0", 79 | "moves": -1, 80 | "last_move": -1.0 81 | }, { 82 | "static": false, 83 | "active": true, 84 | "vlan": 100, 85 | "mac": "B0:A7:37:6F:B3:B4", 86 | "interface": "FastEthernet7", 87 | "moves": -1, 88 | "last_move": -1.0 89 | }, { 90 | "static": false, 91 | "active": true, 92 | "vlan": 100, 93 | "mac": "BC:5F:F4:35:FA:0E", 94 | "interface": "FastEthernet7", 95 | "moves": -1, 96 | "last_move": -1.0 97 | }, { 98 | "static": false, 99 | "active": true, 100 | "vlan": 100, 101 | "mac": "DC:3A:5E:67:1A:98", 102 | "interface": "FastEthernet7", 103 | "moves": -1, 104 | "last_move": -1.0 105 | }, { 106 | "static": false, 107 | "active": true, 108 | "vlan": 100, 109 | "mac": "DC:3A:5E:E2:6A:95", 110 | "interface": "Wlan-GigabitEthernet0", 111 | "moves": -1, 112 | "last_move": -1.0 113 | }, { 114 | "static": false, 115 | "active": true, 116 | "vlan": 100, 117 | "mac": "F0:4F:7C:92:5A:45", 118 | "interface": "Wlan-GigabitEthernet0", 119 | "moves": -1, 120 | "last_move": -1.0 121 | }, { 122 | "static": false, 123 | "active": true, 124 | "vlan": 200, 125 | "mac": "00:09:B7:54:1A:88", 126 | "interface": "FastEthernet7", 127 | "moves": -1, 128 | "last_move": -1.0 129 | }, { 130 | "static": false, 131 | "active": true, 132 | "vlan": 200, 133 | "mac": "10:BD:18:01:A0:B4", 134 | "interface": "FastEthernet3", 135 | "moves": -1, 136 | "last_move": -1.0 137 | }, { 138 | "static": false, 139 | "active": true, 140 | "vlan": 200, 141 | "mac": "20:4C:9E:D7:CB:80", 142 | "interface": "FastEthernet2", 143 | "moves": -1, 144 | "last_move": -1.0 145 | }, { 146 | "static": true, 147 | "active": false, 148 | "vlan": 200, 149 | "mac": "A4:93:4C:C1:67:A7", 150 | "interface": "Vlan200", 151 | "moves": -1, 152 | "last_move": -1.0 153 | }] 154 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_mac_address_table/normal/show_mac_address_table.txt: -------------------------------------------------------------------------------- 1 | Destination Address Address Type VLAN Destination Port 2 | ------------------- ------------ ---- -------------------- 3 | 6400.f1cf.2cc6 Dynamic 1 Wlan-GigabitEthernet0 4 | a493.4cc1.67a7 Self 1 Vlan1 5 | 000c.2906.17d6 Dynamic 100 FastEthernet7 6 | 000c.2913.421b Dynamic 100 FastEthernet7 7 | 0018.0ab3.59f1 Dynamic 100 FastEthernet7 8 | 0018.dd32.1f7c Dynamic 100 FastEthernet6 9 | 0025.64f5.d352 Dynamic 100 FastEthernet7 10 | 0026.abb9.a503 Dynamic 100 FastEthernet4 11 | a493.4cc1.67a7 Self 100 Vlan100 12 | ac3a.7a1a.ba4b Dynamic 100 Wlan-GigabitEthernet0 13 | b0a7.376f.b3b4 Dynamic 100 FastEthernet7 14 | bc5f.f435.fa0e Dynamic 100 FastEthernet7 15 | dc3a.5e67.1a98 Dynamic 100 FastEthernet7 16 | dc3a.5ee2.6a95 Dynamic 100 Wlan-GigabitEthernet0 17 | f04f.7c92.5a45 Dynamic 100 Wlan-GigabitEthernet0 18 | 0009.b754.1a88 Dynamic 200 FastEthernet7 19 | 10bd.1801.a0b4 Dynamic 200 FastEthernet3 20 | 204c.9ed7.cb80 Dynamic 200 FastEthernet2 21 | a493.4cc1.67a7 Self 200 Vlan200 22 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_ntp_servers/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "2001:DB8:0:0:8:800:200C:417A": {}, 3 | "17.72.148.53": {}, 4 | "192.168.0.1": {}, 5 | "37.187.56.220": {} 6 | } 7 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_ntp_servers/normal/show_run___include_ntp_server.txt: -------------------------------------------------------------------------------- 1 | ntp server 192.168.0.1 prefer 2 | ntp server 17.72.148.53 3 | ntp server vrf NAPALM 37.187.56.220 4 | ntp server 2001:DB8:0:0:8:800:200C:417A version 4 5 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_ntp_stats/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "jitter": 18.659, 3 | "synchronized": true, 4 | "offset": 0.122, 5 | "referenceid": "83.168.200.199", 6 | "remote": "172.29.50.34", 7 | "reachability": 377, 8 | "when": "54", 9 | "delay": 1.186, 10 | "hostpoll": 1024, 11 | "stratum": 3, 12 | "type": "-" 13 | }] 14 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_ntp_stats/normal/show_ntp_associations.txt: -------------------------------------------------------------------------------- 1 | 2 | address ref clock st when poll reach delay offset disp 3 | *~172.29.50.34 83.168.200.199 3 54 1024 377 1.186 0.122 18.659 4 | * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured 5 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_optics/interface_shutdown/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "TenGigabitEthernet1/0/1": { 3 | "physical_channels": { 4 | "channel": [{ 5 | "index": 0, 6 | "state": { 7 | "output_power": { 8 | "max": -100.0, 9 | "avg": -100.0, 10 | "instant": -2.0, 11 | "min": -100.0 12 | }, 13 | "laser_bias_current": { 14 | "max": 0.0, 15 | "avg": 0.0, 16 | "instant": 0.0, 17 | "min": 0.0 18 | }, 19 | "input_power": { 20 | "max": -100.0, 21 | "avg": -100.0, 22 | "instant": -3.5, 23 | "min": -100.0 24 | } 25 | } 26 | }] 27 | } 28 | }, 29 | "TenGigabitEthernet2/0/1": { 30 | "physical_channels": { 31 | "channel": [{ 32 | "index": 0, 33 | "state": { 34 | "output_power": { 35 | "max": -100.0, 36 | "avg": -100.0, 37 | "instant": -100.0, 38 | "min": -100.0 39 | }, 40 | "laser_bias_current": { 41 | "max": 0.0, 42 | "avg": 0.0, 43 | "instant": 0.0, 44 | "min": 0.0 45 | }, 46 | "input_power": { 47 | "max": -100.0, 48 | "avg": -100.0, 49 | "instant": -40.0, 50 | "min": -100.0 51 | } 52 | } 53 | }] 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_optics/interface_shutdown/show_int_Te1_0_1.txt: -------------------------------------------------------------------------------- 1 | TenGigabitEthernet1/0/1 is up, line protocol is up (connected) 2 | Hardware is Ten Gigabit Ethernet, address is 0042.5a67.0e9b (bia 0042.5a67.0e9b) 3 | Description: Uplink-to-DSW1 4 | MTU 1500 bytes, BW 10000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive not set 8 | Full-duplex, 10Gb/s, link type is auto, media type is SFP-10GBase-LRM 9 | input flow-control is off, output flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:00:02, output 00:00:04, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 61000 bits/sec, 52 packets/sec 17 | 5 minute output rate 59000 bits/sec, 63 packets/sec 18 | 13525429 packets input, 1636789604 bytes, 0 no buffer 19 | Received 2388654 broadcasts (578107 multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 578107 multicast, 0 pause input 23 | 0 input packets with dribble condition detected 24 | 7831375 packets output, 870124569 bytes, 0 underruns 25 | 0 output errors, 0 collisions, 1 interface resets 26 | 0 unknown protocol drops 27 | 0 babbles, 0 late collision, 0 deferred 28 | 0 lost carrier, 0 no carrier, 0 pause output 29 | 0 output buffer failures, 0 output buffers swapped out -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_optics/interface_shutdown/show_int_Te2_0_1.txt: -------------------------------------------------------------------------------- 1 | TenGigabitEthernet2/0/1 is up, line protocol is up (connected) 2 | Hardware is Ten Gigabit Ethernet, address is 0042.5a8d.d91b (bia 0042.5a8d.d91b) 3 | Description: Uplink-to-DSW2 4 | MTU 1500 bytes, BW 10000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive not set 8 | Full-duplex, 10Gb/s, link type is auto, media type is SFP-10GBase-LRM 9 | input flow-control is off, output flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:00:29, output 00:00:01, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 187000 bits/sec, 135 packets/sec 17 | 5 minute output rate 181000 bits/sec, 113 packets/sec 18 | 21192627 packets input, 4732793131 bytes, 0 no buffer 19 | Received 1625861 broadcasts (279957 multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 279957 multicast, 0 pause input 23 | 0 input packets with dribble condition detected 24 | 27963853 packets output, 3954071411 bytes, 0 underruns 25 | 0 output errors, 0 collisions, 1 interface resets 26 | 0 unknown protocol drops 27 | 0 babbles, 0 late collision, 0 deferred 28 | 0 lost carrier, 0 no carrier, 0 pause output 29 | 0 output buffer failures, 0 output buffers swapped out -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_optics/interface_shutdown/show_interfaces_transceiver.txt: -------------------------------------------------------------------------------- 1 | If device is externally calibrated, only calibrated values are printed. 2 | ++ : high alarm, + : high warning, - : low warning, -- : low alarm. 3 | NA or N/A: not applicable, Tx: transmit, Rx: receive. 4 | mA: milliamperes, dBm: decibels (milliwatts). 5 | 6 | Optical Optical 7 | Temperature Voltage Tx Power Rx Power 8 | Port (Celsius) (Volts) (dBm) (dBm) 9 | --------- ----------- ------- -------- -------- 10 | Te1/0/1 34.6 3.29 -2.0 -3.5 11 | Te2/0/1 34.3 3.28 N/A -40.0 -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_optics/low_rx_power/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "GigabitEthernet0/11": { 3 | "physical_channels": { 4 | "channel": [{ 5 | "index": 0, 6 | "state": { 7 | "output_power": { 8 | "max": -100.0, 9 | "avg": -100.0, 10 | "instant": -6.8, 11 | "min": -100.0 12 | }, 13 | "laser_bias_current": { 14 | "max": 0.0, 15 | "avg": 0.0, 16 | "instant": 0.0, 17 | "min": 0.0 18 | }, 19 | "input_power": { 20 | "max": -100.0, 21 | "avg": -100.0, 22 | "instant": -27.4, 23 | "min": -100.0 24 | } 25 | } 26 | }] 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_optics/low_rx_power/show_int_Gi0_11.txt: -------------------------------------------------------------------------------- 1 | GigabitEthernet0/11 is up, line protocol is up (connected) 2 | Hardware is Gigabit Ethernet, address is 00da.5567.3e8b (bia 00da.5567.3e8b) 3 | Description: Uplink 4 | MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive not set 8 | Full-duplex, 1000Mb/s, link type is auto, media type is 1000BaseLX SFP 9 | input flow-control is off, output flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:00:01, output 00:00:26, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 41000 bits/sec, 68 packets/sec 17 | 5 minute output rate 40000 bits/sec, 66 packets/sec 18 | 285486634 packets input, 21249719318 bytes, 0 no buffer 19 | Received 5577815 broadcasts (2476464 multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 2896 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 2476464 multicast, 0 pause input 23 | 0 input packets with dribble condition detected 24 | 298435968 packets output, 78061625290 bytes, 0 underruns 25 | 0 output errors, 0 collisions, 1 interface resets 26 | 0 unknown protocol drops 27 | 0 babbles, 0 late collision, 0 deferred 28 | 0 lost carrier, 0 no carrier, 0 pause output 29 | 0 output buffer failures, 0 output buffers swapped out -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_optics/low_rx_power/show_interfaces_transceiver.txt: -------------------------------------------------------------------------------- 1 | If device is externally calibrated, only calibrated values are printed. 2 | ++ : high alarm, + : high warning, - : low warning, -- : low alarm. 3 | NA or N/A: not applicable, Tx: transmit, Rx: receive. 4 | mA: milliamperes, dBm: decibels (milliwatts). 5 | 6 | Optical Optical 7 | Temperature Voltage Tx Power Rx Power 8 | Port (Celsius) (Volts) (dBm) (dBm) 9 | --------- ----------- ------- -------- -------- 10 | Gi0/11 24.0 3.22 -6.8 -27.4 -- -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_optics/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "TenGigabitEthernet1/0/1": { 3 | "physical_channels": { 4 | "channel": [{ 5 | "index": 0, 6 | "state": { 7 | "output_power": { 8 | "max": -100.0, 9 | "avg": -100.0, 10 | "instant": -2.0, 11 | "min": -100.0 12 | }, 13 | "laser_bias_current": { 14 | "max": 0.0, 15 | "avg": 0.0, 16 | "instant": 0.0, 17 | "min": 0.0 18 | }, 19 | "input_power": { 20 | "max": -100.0, 21 | "avg": -100.0, 22 | "instant": -3.5, 23 | "min": -100.0 24 | } 25 | } 26 | }] 27 | } 28 | }, 29 | "TenGigabitEthernet2/0/1": { 30 | "physical_channels": { 31 | "channel": [{ 32 | "index": 0, 33 | "state": { 34 | "output_power": { 35 | "max": -100.0, 36 | "avg": -100.0, 37 | "instant": -2.0, 38 | "min": -100.0 39 | }, 40 | "laser_bias_current": { 41 | "max": 0.0, 42 | "avg": 0.0, 43 | "instant": 0.0, 44 | "min": 0.0 45 | }, 46 | "input_power": { 47 | "max": -100.0, 48 | "avg": -100.0, 49 | "instant": -2.5, 50 | "min": -100.0 51 | } 52 | } 53 | }] 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_optics/normal/show_int_Te1_0_1.txt: -------------------------------------------------------------------------------- 1 | TenGigabitEthernet1/0/1 is up, line protocol is up (connected) 2 | Hardware is Ten Gigabit Ethernet, address is 0042.5a67.0e9b (bia 0042.5a67.0e9b) 3 | Description: Uplink-to-DSW1 4 | MTU 1500 bytes, BW 10000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive not set 8 | Full-duplex, 10Gb/s, link type is auto, media type is SFP-10GBase-LRM 9 | input flow-control is off, output flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:00:02, output 00:00:04, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 61000 bits/sec, 52 packets/sec 17 | 5 minute output rate 59000 bits/sec, 63 packets/sec 18 | 13525429 packets input, 1636789604 bytes, 0 no buffer 19 | Received 2388654 broadcasts (578107 multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 578107 multicast, 0 pause input 23 | 0 input packets with dribble condition detected 24 | 7831375 packets output, 870124569 bytes, 0 underruns 25 | 0 output errors, 0 collisions, 1 interface resets 26 | 0 unknown protocol drops 27 | 0 babbles, 0 late collision, 0 deferred 28 | 0 lost carrier, 0 no carrier, 0 pause output 29 | 0 output buffer failures, 0 output buffers swapped out -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_optics/normal/show_int_Te2_0_1.txt: -------------------------------------------------------------------------------- 1 | TenGigabitEthernet2/0/1 is up, line protocol is up (connected) 2 | Hardware is Ten Gigabit Ethernet, address is 0042.5a8d.d91b (bia 0042.5a8d.d91b) 3 | Description: Uplink-to-DSW2 4 | MTU 1500 bytes, BW 10000000 Kbit/sec, DLY 10 usec, 5 | reliability 255/255, txload 1/255, rxload 1/255 6 | Encapsulation ARPA, loopback not set 7 | Keepalive not set 8 | Full-duplex, 10Gb/s, link type is auto, media type is SFP-10GBase-LRM 9 | input flow-control is off, output flow-control is unsupported 10 | ARP type: ARPA, ARP Timeout 04:00:00 11 | Last input 00:00:29, output 00:00:01, output hang never 12 | Last clearing of "show interface" counters never 13 | Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 14 | Queueing strategy: fifo 15 | Output queue: 0/40 (size/max) 16 | 5 minute input rate 187000 bits/sec, 135 packets/sec 17 | 5 minute output rate 181000 bits/sec, 113 packets/sec 18 | 21192627 packets input, 4732793131 bytes, 0 no buffer 19 | Received 1625861 broadcasts (279957 multicasts) 20 | 0 runts, 0 giants, 0 throttles 21 | 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 22 | 0 watchdog, 279957 multicast, 0 pause input 23 | 0 input packets with dribble condition detected 24 | 27963853 packets output, 3954071411 bytes, 0 underruns 25 | 0 output errors, 0 collisions, 1 interface resets 26 | 0 unknown protocol drops 27 | 0 babbles, 0 late collision, 0 deferred 28 | 0 lost carrier, 0 no carrier, 0 pause output 29 | 0 output buffer failures, 0 output buffers swapped out -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_optics/normal/show_interfaces_transceiver.txt: -------------------------------------------------------------------------------- 1 | If device is externally calibrated, only calibrated values are printed. 2 | ++ : high alarm, + : high warning, - : low warning, -- : low alarm. 3 | NA or N/A: not applicable, Tx: transmit, Rx: receive. 4 | mA: milliamperes, dBm: decibels (milliwatts). 5 | 6 | Optical Optical 7 | Temperature Voltage Tx Power Rx Power 8 | Port (Celsius) (Volts) (dBm) (dBm) 9 | --------- ----------- ------- -------- -------- 10 | Te1/0/1 34.6 3.29 -2.0 -3.5 11 | Te2/0/1 34.3 3.28 -2.0 -2.5 -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_snmp_information/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "location": "123 Anytown USA Rack 404", 3 | "community": { 4 | "public": { 5 | "acl": "11", 6 | "mode": "ro" 7 | }, 8 | "private": { 9 | "acl": "12", 10 | "mode": "rw" 11 | }, 12 | "public_named_acl": { 13 | "acl": "ALLOW-SNMP-ACL", 14 | "mode": "ro" 15 | }, 16 | "public_no_acl": { 17 | "acl": "N/A", 18 | "mode": "ro" 19 | } 20 | }, 21 | "chassis_id": "Asset Tag 54670", 22 | "contact": "Config rev 028" 23 | } 24 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_get_snmp_information/normal/show_run___include_snmp_server.txt: -------------------------------------------------------------------------------- 1 | snmp-server community public RO 11 2 | snmp-server community private RW 12 3 | snmp-server community public_no_acl RO 4 | snmp-server community public_named_acl RO ALLOW-SNMP-ACL 5 | snmp-server location 123 Anytown USA Rack 404 6 | snmp-server contact Config rev 028 7 | snmp-server chassis-id Asset Tag 54670 -------------------------------------------------------------------------------- /test/unit/mocked_data/test_is_alive/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "is_alive": true 3 | } 4 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_ping/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | { 2 | "success": { 3 | "results": [{ 4 | "ip_address": "8.8.8.8", 5 | "rtt": 0.0 6 | }, { 7 | "ip_address": "8.8.8.8", 8 | "rtt": 0.0 9 | }, { 10 | "ip_address": "8.8.8.8", 11 | "rtt": 0.0 12 | }, { 13 | "ip_address": "8.8.8.8", 14 | "rtt": 0.0 15 | }, { 16 | "ip_address": "8.8.8.8", 17 | "rtt": 0.0 18 | }], 19 | "rtt_avg": 1.0, 20 | "packet_loss": 0, 21 | "rtt_min": 1.0, 22 | "rtt_max": 4.0, 23 | "rtt_stddev": 0.0, 24 | "probes_sent": 5 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_ping/normal/ping_8_8_8_8_timeout_2_size_100_repeat_5.txt: -------------------------------------------------------------------------------- 1 | 2 | Type escape sequence to abort. 3 | Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds: 4 | !!!!! 5 | Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms 6 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_traceroute/normal/expected_result.json: -------------------------------------------------------------------------------- 1 | {"success": {"1": {"probes": {"1": {"ip_address": "10.0.4.2", "rtt": 14.0, "host_name": "10.0.4.2"}, "2": {"ip_address": "10.0.4.2", "rtt": 11.0, "host_name": "10.0.4.2"}, "3": {"ip_address": "10.0.4.2", "rtt": 11.0, "host_name": "10.0.4.2"}}}, "2": {"probes": {"1": {"ip_address": "213.250.19.90", "rtt": 175.0, "host_name": "BSN-access.dynamic.siol.net"}, "2": {"ip_address": "213.250.19.90", "rtt": 157.0, "host_name": "BSN-access.dynamic.siol.net"}, "3": {"ip_address": "213.250.19.90", "rtt": 157.0, "host_name": "BSN-access.dynamic.siol.net"}}}, "3": {"probes": {"1": {"ip_address": "95.176.241.222", "rtt": 178.0, "host_name": "95.176.241.222"}, "2": {"ip_address": "95.176.241.222", "rtt": 266.0, "host_name": "95.176.241.222"}, "3": {"ip_address": "95.176.241.222", "rtt": 208.0, "host_name": "95.176.241.222"}}}, "4": {"probes": {"1": {"ip_address": "213.250.1.130", "rtt": 320.0, "host_name": "BSN-250-1-130.static.siol.net"}, "2": {"ip_address": "213.250.1.130", "rtt": 300.0, "host_name": "BSN-250-1-130.static.siol.net"}, "3": {"ip_address": "213.250.1.130", "rtt": 138.0, "host_name": "BSN-250-1-130.static.siol.net"}}}, "5": {"probes": {"1": {"ip_address": "209.85.248.115", "rtt": 122.0, "host_name": "BSN-209.85.248.115.static.siol.net"}, "2": {"ip_address": "209.85.248.217", "rtt": 157.0, "host_name": "209.85.248.217"}, "3": {"ip_address": "72.14.237.184", "rtt": 195.0, "host_name": "72.14.237.184"}}}, "6": {"probes": {"1": {"ip_address": "209.85.248.1", "rtt": 122.0, "host_name": "BSN-0.static.siol.net"}, "2": {"ip_address": "209.85.248.217", "rtt": 157.0, "host_name": "209.85.248.217"}, "3": {"ip_address": "209.85.248.217", "rtt": 195.0, "host_name": "209.85.248.217"}}}, "7": {"probes": {"1": {"ip_address": "", "rtt": 0.0, "host_name": ""}, "2": {"ip_address": "209.85.1.1", "rtt": 157.0, "host_name": "209.85.1.1"}, "3": {"ip_address": "209.85.1.1", "rtt": 195.0, "host_name": "209.85.1.1"}}}, "8": {"probes": {"1": {"ip_address": "", "rtt": 0.0, "host_name": ""}, "2": {"ip_address": "", "rtt": 0.0, "host_name": ""}, "3": {"ip_address": "", "rtt": 0.0, "host_name": ""}}}, "9": {"probes": {"1": {"ip_address": "8.8.8.8", "rtt": 213.0, "host_name": "google-public-dns-a.google.com"}, "2": {"ip_address": "8.8.8.8", "rtt": 210.0, "host_name": "google-public-dns-a.google.com"}, "3": {"ip_address": "8.8.8.8", "rtt": 197.0, "host_name": "google-public-dns-a.google.com"}}}}} 2 | -------------------------------------------------------------------------------- /test/unit/mocked_data/test_traceroute/normal/traceroute_8_8_8_8_ttl_0_255_timeout_2.txt: -------------------------------------------------------------------------------- 1 | Type escape sequence to abort. 2 | Tracing the route to google-public-dns-a.google.com (8.8.8.8) 3 | VRF info: (vrf in name/id, vrf out name/id) 4 | 1 10.0.4.2 14 msec 11 msec 11 msec 5 | 2 BSN-access.dynamic.siol.net (213.250.19.90) 175 msec 157 msec 157 msec 6 | 3 95.176.241.222 178 msec 266 msec 208 msec 7 | 4 BSN-250-1-130.static.siol.net (213.250.1.130) 320 msec 300 msec 138 msec 8 | 5 BSN-209.85.248.115.static.siol.net (209.85.248.115) 122 msec 9 | 209.85.248.217 157 msec 10 | 72.14.237.184 195 msec 11 | 6 BSN-0.static.siol.net (209.85.248.1) 122 msec 12 | 209.85.248.217 157 msec 195 msec 13 | 7 * 14 | 209.85.1.1 157 msec 195 msec 15 | 8 * * * 16 | 9 google-public-dns-a.google.com (8.8.8.8) 213 msec 210 msec 197 msec -------------------------------------------------------------------------------- /test/unit/test_getters.py: -------------------------------------------------------------------------------- 1 | """Tests for getters.""" 2 | from __future__ import print_function 3 | from __future__ import unicode_literals 4 | 5 | from napalm_base.test.getters import BaseTestGetters 6 | 7 | 8 | import pytest 9 | 10 | 11 | @pytest.mark.usefixtures("set_device_parameters") 12 | class TestGetter(BaseTestGetters): 13 | """Test get_* methods.""" 14 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py27,py34,py35 3 | 4 | [testenv] 5 | deps = 6 | -rrequirements-dev.txt 7 | 8 | commands= 9 | py.test 10 | --------------------------------------------------------------------------------