Author SHA1 Message Date
David Barroso fef224775e Merge pull request #28 from napalm-automation/develop
Release 0.3.0
2016-12-01 14:14:29 +01:00
David Barroso f1fa04bb9b Merge pull request #27 from napalm-automation/rel-0.3.0
Version bump to 0.3.0
2016-12-01 14:12:43 +01:00
Mircea Ulinic 95cc99cc58 Merge pull request #29 from awlx/fix_tests
Fixed expected results according to PR #26

Thanks @awlx
2016-12-01 14:08:20 +02:00
awlx f4b4df9ac9 Fixed problem with "log" attribute 2016-12-01 12:57:17 +01:00
awlx e68a906578 Fixed typo 2016-12-01 12:53:31 +01:00
awlx 1a46347610 Fixed expected results according to PR #26 2016-12-01 12:51:08 +01:00
Mircea Ulinic 788c7b46ef Version bump to 0.3.0 2016-12-01 10:42:34 +00:00
Mircea Ulinic 1b7bd07ddc Merge pull request #26 from awlx/feature_get_firewall_policies
New method get_firewall_policies
2016-12-01 12:41:20 +02:00
awlx ee28aa8807 Whitespace fix on line 285 in fortios.py 2016-11-29 10:26:51 +01:00
awlx fc7579f1b4 Added mockdata 2016-11-29 10:24:29 +01:00
awlx e2eeda8b9f is_alive return {'is_alive': True} 2016-11-29 10:20:09 +01:00
awlx 91e179c659 Patched is_alive test failing 2016-11-29 10:07:50 +01:00
awlx ac46128168 Initial commit 2016-11-29 09:56:23 +01:00
David Barroso 2c29dcca1f Merge pull request #24 from napalm-automation/dbarrosop/new_testing_framework
Dbarrosop/new testing framework
2016-11-29 09:12:56 +01:00
David Barroso 791992e12d Merge pull request #25 from awlx/feature_is_alive
Added method is_alive()
2016-11-29 09:01:31 +01:00
awlx fa29ff1e3a Added method is_alive() 2016-11-28 11:52:53 +01:00
David Barroso 34eaef53e0 Fixing travis 2016-11-27 15:14:23 +01:00
David Barroso bda95eb668 Added future to requirements 2016-11-27 15:11:44 +01:00
David Barroso ddd45df13c Added new code for testing framework 2016-11-27 15:00:33 +01:00
David Barroso 8183a4e151 All test migrated 2016-11-27 14:59:03 +01:00
David Barroso 4d0325eb97 Make pylama happy 2016-11-27 14:19:12 +01:00
David Barroso f5edd34d8b Bump version 2016-11-27 14:11:18 +01:00
David Barroso 3f7f7cb83a Minor administrative fixes 2016-11-27 14:10:59 +01:00
David Barroso 539a5d77ff Adapting travis and setup.cfg 2016-11-27 12:32:15 +01:00
David Barroso 562529ac7a Merge pull request #21 from napalm-automation/develop
Release 0.2.1
2016-11-01 20:57:27 +01:00
David Barroso fff7931e97 Merge pull request #20 from napalm-automation/dbarrosop/napalm_base_0.18.0
Adding support for napalm-base 0.18.0
2016-11-01 20:54:28 +01:00
David Barroso fcea9076d8 We have to return unicode, not strings 2016-11-01 20:20:59 +01:00
David Barroso 7a724f9eb8 Adding support to napalm-base 0.18.0 2016-11-01 19:17:43 +01:00
David Barroso ad1a10f08b Merge pull request #19 from napalm-automation/develop
Release 0.2.0
2016-10-25 11:11:07 +02:00
David Barroso 794b90638d Merge pull request #18 from napalm-automation/bump-version-0.2.0
bump version 0.2.0
2016-10-25 11:02:36 +02:00
42 changed files with 634 additions and 202 deletions

No files matched your search

+12 -13
View File
@@ -1,10 +1,20 @@
language: python
python:
- 2.7
install:
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- pip install .
- pip install coveralls
script:
- py.test
- pylama .
after_success:
- coveralls
- if [ $TRAVIS_TAG ]; then curl -X POST https://readthedocs.org/build/napalm; fi
deploy:
provider: pypi
user: dbarroso
@@ -13,14 +23,3 @@ deploy:
on:
tags: true
branch: master
script:
- cd test/unit
- nosetests --with-coverage --cover-package napalm_fortios -v TestFortiOSDriver:TestGetterFortiOSDriver.test_get_bgp_neighbors
- nosetests --with-coverage --cover-package napalm_fortios -v TestFortiOSDriver:TestGetterFortiOSDriver.test_get_environment
- nosetests --with-coverage --cover-package napalm_fortios -v TestFortiOSDriver:TestGetterFortiOSDriver.test_get_facts
- nosetests --with-coverage --cover-package napalm_fortios -v TestFortiOSDriver:TestGetterFortiOSDriver.test_get_interfaces
- nosetests --with-coverage --cover-package napalm_fortios -v TestFortiOSDriver:TestGetterFortiOSDriver.test_get_interfaces_counters
- nosetests --with-coverage --cover-package napalm_fortios -v TestFortiOSDriver:TestGetterFortiOSDriver.test_get_config
- cd ../..
- coverage combine test/unit/.coverage
after_success: coveralls
+96 -28
View File
@@ -16,7 +16,8 @@ from pyFG.fortios import FortiOS, FortiConfig, logger
from pyFG.exceptions import FailedCommit, CommandExecutionException
from napalm_base.base import NetworkDriver
from napalm_base.exceptions import ReplaceConfigException, MergeConfigException
from napalm_base.utils.string_parsers import colon_separated_string_to_dict, convert_uptime_string_seconds
from napalm_base.utils.string_parsers import colon_separated_string_to_dict,\
convert_uptime_string_seconds
class FortiOSDriver(NetworkDriver):
@@ -30,7 +31,8 @@ class FortiOSDriver(NetworkDriver):
else:
self.vdom = None
self.device = FortiOS(hostname, username=username, password=password, timeout=timeout, vdom=self.vdom)
self.device = FortiOS(hostname, username=username, password=password,
timeout=timeout, vdom=self.vdom)
self.config_replace = False
def open(self):
@@ -39,19 +41,27 @@ class FortiOSDriver(NetworkDriver):
def close(self):
self.device.close()
def is_alive(self):
"""Returns a flag with the state of the SSH connection."""
return {
'is_alive': self.device.ssh.get_transport().is_active()
}
def execute_command_with_vdom(self, command, vdom=None):
# If the user doesn't specify a particular vdom we use the default vdom for the object.
vdom = vdom or self.vdom
if vdom == 'global' and self.vdom is not None:
# If vdom is global we go to the global vdom, execute the commands and then back to the root.
# There is a catch, if the device doesn't have vdoms enabled we have to execute the command in the root
# If vdom is global we go to the global vdom, execute the commands
# and then back to the root. There is a catch, if the device doesn't
# have vdoms enabled we have to execute the command in the root
command = 'conf global\n{command}\nend'.format(command=command)
# We skip the lines telling us that we changed vdom
return self.device.execute_command(command)[1:-2]
elif vdom not in ['global', None]:
# If we have a vdom we change to the vdom, execute the commands and then exit back to the root
# If we have a vdom we change to the vdom, execute
# the commands and then exit back to the root
command = 'conf vdom\nedit {vdom}\n{command}\nend'.format(vdom=vdom, command=command)
# We skip the lines telling us that we changed vdom
@@ -132,10 +142,14 @@ class FortiOSDriver(NetworkDriver):
self.device.load_config(empty_candidate=True)
self.load_replace_candidate(config=rollback_config)
self.device.candidate_config['vpn certificate local']['Fortinet_CA_SSLProxy'].del_param('private-key')
self.device.candidate_config['vpn certificate local']['Fortinet_CA_SSLProxy'].del_param('certificate')
self.device.candidate_config['vpn certificate local']['Fortinet_SSLProxy'].del_param('private-key')
self.device.candidate_config['vpn certificate local']['Fortinet_SSLProxy'].del_param('certificate')
self.device.candidate_config['vpn certificate local']['Fortinet_CA_SSLProxy'].\
del_param('private-key')
self.device.candidate_config['vpn certificate local']['Fortinet_CA_SSLProxy'].\
del_param('certificate')
self.device.candidate_config['vpn certificate local']['Fortinet_SSLProxy'].\
del_param('private-key')
self.device.candidate_config['vpn certificate local']['Fortinet_SSLProxy'].\
del_param('certificate')
self.device.commit()
def get_config(self, retrieve="all"):
@@ -149,21 +163,22 @@ class FortiOSDriver(NetworkDriver):
text_result = '\n'.join(result)
return {
'startup': "",
'running': text_result,
'candidate': "",
'startup': u"",
'running': unicode(text_result),
'candidate': u"",
}
elif get_startup or get_candidate:
return {
'startup': "",
'running': "",
'candidate': "",
'startup': u"",
'running': u"",
'candidate': u"",
}
def get_facts(self):
system_status = self.get_command_with_vdom('get system status', vdom='global')
performance_status = self.get_command_with_vdom('get system performance status', vdom='global')
performance_status = self.get_command_with_vdom('get system performance status',
vdom='global')
interfaces = self.execute_command_with_vdom('get system interface | grep ==', vdom='global')
interface_list = [x.split()[2] for x in interfaces if x.strip() is not '']
@@ -246,6 +261,51 @@ class FortiOSDriver(NetworkDriver):
if search in l:
return l
def get_firewall_policies(self):
cmd = self.execute_command_with_vdom('show firewall policy')
policy = dict()
policy_id = None
default_policy = dict()
position = 1
for line in cmd:
policy_data = line.strip()
if policy_data.find("edit") == 0:
policy_id = policy_data.split()[1]
policy[policy_id] = dict()
if policy_id is not None:
if len(policy_data.split()) > 2:
policy_setting = policy_data.split()[1]
policy[policy_id][policy_setting] = policy_data.split()[2].replace("\"", "")
for key in policy:
enabled = 'status' in policy[key]
logtraffic = policy[key]['logtraffic'] if 'logtraffic' in policy[key] else False
action = 'permit' if 'action' in policy[key] else 'reject'
policy_item = dict()
default_policy[key] = list()
policy_item['position'] = position
policy_item['packet_hits'] = -1
policy_item['byte_hits'] = -1
policy_item['id'] = unicode(key)
policy_item['enabled'] = enabled
policy_item['schedule'] = unicode(policy[key]['schedule'])
policy_item['log'] = unicode(logtraffic)
policy_item['l3_src'] = unicode(policy[key]['srcaddr'])
policy_item['l3_dst'] = unicode(policy[key]['dstaddr'])
policy_item['service'] = unicode(policy[key]['service'])
policy_item['src_zone'] = unicode(policy[key]['srcintf'])
policy_item['dst_zone'] = unicode(policy[key]['dstintf'])
policy_item['action'] = unicode(action)
default_policy[key].append(policy_item)
position = position + 1
return default_policy
def get_bgp_neighbors(self):
families = ['ipv4', 'ipv6']
@@ -279,7 +339,8 @@ class FortiOSDriver(NetworkDriver):
neighbor_dict['address_family']['ipv4'] = dict()
neighbor_dict['address_family']['ipv6'] = dict()
detail_output = [x.lower() for x in self.execute_command_with_vdom(command_detail.format(neighbor))]
detail_output = [x.lower() for x in
self.execute_command_with_vdom(command_detail.format(neighbor))]
m = re.search('remote router id (.+?)\n', '\n'.join(detail_output))
if m:
neighbor_dict['remote_id'] = unicode(m.group(1))
@@ -326,7 +387,8 @@ class FortiOSDriver(NetworkDriver):
elif (data[1].startswith('RX packets') or data[1].startswith('TX packets')) and if_name:
if_data = data[1].split(' ')
direction = if_data[0].lower()
interface_counters[if_name][direction + '_unicast_packets'] = int(if_data[1].split(':')[1])
interface_counters[if_name][direction + '_unicast_packets'] = \
int(if_data[1].split(':')[1])
interface_counters[if_name][direction + '_errors'] = int(if_data[2].split(':')[1])
interface_counters[if_name][direction + '_discards'] = int(if_data[2].split(':')[1])
interface_counters[if_name][direction + '_multicast_packets'] = -1
@@ -340,9 +402,6 @@ class FortiOSDriver(NetworkDriver):
interface_counters[if_name]['tx_octets'] = int(if_data[7].split(':')[1])
return interface_counters
def get_lldp_neighbors(self):
return {}
def get_environment(self):
def parse_string(line):
@@ -380,7 +439,7 @@ class FortiOSDriver(NetworkDriver):
return output
def get_memory(memory_line):
total, used = int(memory_line[1]) >> 20, int(memory_line[2]) >> 20 # convert from byte to MB
total, used = int(memory_line[1]) >> 20, int(memory_line[2]) >> 20 # byte to MB
return dict(available_ram=total, used_ram=used)
def get_temperature(temperature_lines, detail_block):
@@ -388,7 +447,8 @@ class FortiOSDriver(NetworkDriver):
for temp_line in temperature_lines:
if 'disabled' in temp_line:
sensor_name = search_disabled(temp_line)
output[sensor_name] = {'is_alert': False, 'is_critical': False, 'temperature': 0.0}
output[sensor_name] = {'is_alert': False, 'is_critical': False,
'temperature': 0.0}
continue
m = search_normal(temp_line)
@@ -400,7 +460,8 @@ class FortiOSDriver(NetworkDriver):
index_line = detail_block.index(fullline)
sensor_block = detail_block[index_line:]
v = int(self._search_line_in_lines('upper_non_recoverable', sensor_block).split('=')[1])
v = int(self._search_line_in_lines('upper_non_recoverable',
sensor_block).split('=')[1])
output[sensor_name] = dict(temperature=float(temp_value), is_alert=is_alert,
is_critical=True if v > temp_value else False)
@@ -409,10 +470,13 @@ class FortiOSDriver(NetworkDriver):
out = dict()
sensors_block = [parse_string(x) for x in self.execute_command_with_vdom('execute sensor detail', vdom='global') if x]
sensors_block = [parse_string(x) for x in
self.execute_command_with_vdom('execute sensor detail', vdom='global')
if x]
# temp
temp_lines = [x for x in sensors_block if any([True for y in ['dts', 'temp', 'adt7490'] if y in x])]
temp_lines = [x for x in sensors_block
if any([True for y in ['dts', 'temp', 'adt7490'] if y in x])]
out['temperature'] = get_temperature(temp_lines, sensors_block)
# fans
@@ -420,11 +484,15 @@ class FortiOSDriver(NetworkDriver):
# cpu
out['cpu'] = get_cpu(
[x for x in self.execute_command_with_vdom('get system performance status | grep CPU', vdom='global')[1:] if x])
[x for x in
self.execute_command_with_vdom('get system performance status | grep CPU',
vdom='global')[1:] if x])
# memory
memory_command = 'diag hard sys mem | grep Mem:'
t = [x for x in re.split('\s+', self.execute_command_with_vdom(memory_command, vdom='global')[0]) if x]
t = [x for x in
re.split('\s+', self.execute_command_with_vdom(memory_command,
vdom='global')[0]) if x]
out['memory'] = get_memory(t)
# power, not implemented
+1
View File
@@ -0,0 +1 @@
{"included": [{"attributes": {"name": "test/unit/test_getters.py::TestGetter::()::test_get_bgp_neighbors[normal]", "teardown": {"duration": 7.700920104980469e-05, "outcome": "passed", "name": "teardown"}, "setup": {"duration": 0.0003800392150878906, "outcome": "passed", "name": "setup"}, "run_index": 11, "call": {"duration": 0.004490852355957031, "outcome": "passed", "name": "call"}, "duration": 0.005327939987182617, "outcome": "passed"}, "type": "test", "id": 1}, {"attributes": {"name": "test/unit/test_getters.py::TestGetter::()::test_get_route_to[no_test_case_found]", "teardown": {"duration": 6.389617919921875e-05, "outcome": "passed", "name": "teardown"}, "setup": {"duration": 0.0003459453582763672, "outcome": "passed", "name": "setup"}, "run_index": 13, "call": {"duration": 0.00012302398681640625, "outcome": "skipped", "name": "call", "longrepr": "('/Users/dbarroso/.virtualenvs/napalm/lib/python2.7/site-packages/napalm_base/test/getters.py', 78, u'Skipped: Method not implemented')"}, "duration": 0.0008788108825683594, "outcome": "skipped"}, "type": "test", "id": 2}, {"attributes": {"name": "test/unit/test_getters.py::TestGetter::()::test_get_arp_table[no_test_case_found]", "teardown": {"duration": 6.914138793945312e-05, "outcome": "passed", "name": "teardown"}, "setup": {"duration": 0.000370025634765625, "outcome": "passed", "name": "setup"}, "run_index": 1, "call": {"duration": 0.00012612342834472656, "outcome": "skipped", "name": "call", "longrepr": "('/Users/dbarroso/.virtualenvs/napalm/lib/python2.7/site-packages/napalm_base/test/getters.py', 78, u'Skipped: Method not implemented')"}, "duration": 0.0009353160858154297, "outcome": "skipped"}, "type": "test", "id": 3}, {"attributes": {"name": "test/unit/test_getters.py::TestGetter::()::test_get_network_instances[no_test_case_found]", "teardown": {"duration": 7.104873657226562e-05, "outcome": "passed", "name": "teardown"}, "setup": {"duration": 0.0004589557647705078, "outcome": "passed", "name": "setup"}, "run_index": 8, "call": {"duration": 0.000125885009765625, "outcome": "skipped", "name": "call", "longrepr": "('/Users/dbarroso/.virtualenvs/napalm/lib/python2.7/site-packages/napalm_base/test/getters.py', 78, u'Skipped: Method not implemented')"}, "duration": 0.0011148452758789062, "outcome": "skipped"}, "type": "test", "id": 4}, {"attributes": {"name": "test/unit/test_getters.py::TestGetter::()::test_get_probes_config[no_test_case_found]", "teardown": {"duration": 7.009506225585938e-05, "outcome": "passed", "name": "teardown"}, "setup": {"duration": 0.0003409385681152344, "outcome": "passed", "name": "setup"}, "run_index": 3, "call": {"duration": 0.00026488304138183594, "outcome": "skipped", "name": "call", "longrepr": "('/Users/dbarroso/.virtualenvs/napalm/lib/python2.7/site-packages/napalm_base/test/getters.py', 78, u'Skipped: Method not implemented')"}, "duration": 0.001016855239868164, "outcome": "skipped"}, "type": "test", "id": 5}, {"attributes": {"name": "test/unit/test_getters.py::TestGetter::()::test_get_ntp_servers[no_test_case_found]", "teardown": {"duration": 0.00011706352233886719, "outcome": "passed", "name": "teardown"}, "setup": {"duration": 0.007989168167114258, "outcome": "passed", "name": "setup"}, "run_index": 0, "call": {"duration": 0.00020694732666015625, "outcome": "skipped", "name": "call", "longrepr": "('/Users/dbarroso/.virtualenvs/napalm/lib/python2.7/site-packages/napalm_base/test/getters.py', 78, u'Skipped: Method not implemented')"}, "duration": 0.01630234718322754, "outcome": "skipped"}, "type": "test", "id": 6}, {"attributes": {"name": "test/unit/test_getters.py::TestGetter::()::test_get_users[no_test_case_found]", "teardown": {"duration": 6.29425048828125e-05, "outcome": "passed", "name": "teardown"}, "setup": {"duration": 0.00034308433532714844, "outcome": "passed", "name": "setup"}, "run_index": 18, "call": {"duration": 0.00011801719665527344, "outcome": "skipped", "name": "call", "longrepr": "('/Users/dbarroso/.virtualenvs/napalm/lib/python2.7/site-packages/napalm_base/test/getters.py', 78, u'Skipped: Method not implemented')"}, "duration": 0.0008671283721923828, "outcome": "skipped"}, "type": "test", "id": 7}, {"attributes": {"name": "test/unit/test_getters.py::TestGetter::()::test_get_interfaces_counters[normal]", "teardown": {"duration": 7.891654968261719e-05, "outcome": "passed", "name": "teardown"}, "setup": {"duration": 0.0003077983856201172, "outcome": "passed", "name": "setup"}, "run_index": 10, "call": {"duration": 0.007678031921386719, "outcome": "passed", "name": "call"}, "duration": 0.00837254524230957, "outcome": "passed"}, "type": "test", "id": 8}, {"attributes": {"name": "test/unit/test_getters.py::TestGetter::()::test_get_config[normal]", "teardown": {"duration": 6.29425048828125e-05, "outcome": "passed", "name": "teardown"}, "setup": {"duration": 0.00037789344787597656, "outcome": "passed", "name": "setup"}, "run_index": 25, "call": {"duration": 0.0005838871002197266, "outcome": "passed", "name":Line truncated
+1
View File
@@ -4,4 +4,5 @@ pytest-json
pytest-pythonpath
pylama
flake8-import-order
coveralls
-r requirements.txt
+2 -1
View File
@@ -1,2 +1,3 @@
napalm-base==0.17.0
napalm-base>=0.18.0
pyFG
future
+9
View File
@@ -4,3 +4,12 @@ ignore = D203,C901
[pylama:pep8]
max_line_length = 100
[tool:pytest]
addopts = --cov=./ -vs
json_report = report.json
jsonapi = true
[coverage:run]
include =
napalm_fortios/*
+1 -1
View File
@@ -12,7 +12,7 @@ reqs = [str(ir.req) for ir in install_reqs]
setup(
name="napalm-fortios",
version="0.2.0",
version="0.3.0",
packages=find_packages(),
author="David Barroso",
author_email="dbarrosop@dravetech.com",
+1 -38
View File
@@ -15,8 +15,7 @@
import unittest
from napalm_fortios.fortios import FortiOSDriver
from napalm_base.test.base import TestConfigNetworkDriver, TestGettersNetworkDriver
from pyFG.fortios import FortiConfig
from napalm_base.test.base import TestConfigNetworkDriver
class TestConfigFortiOSDriver(unittest.TestCase, TestConfigNetworkDriver):
@@ -30,39 +29,3 @@ class TestConfigFortiOSDriver(unittest.TestCase, TestConfigNetworkDriver):
cls.device = FortiOSDriver(hostname, username, password, timeout=60)
cls.device.open()
class TestGetterFortiOSDriver(unittest.TestCase, TestGettersNetworkDriver):
@classmethod
def setUpClass(cls):
cls.mock = True
hostname = '192.168.56.201'
username = 'vagrant'
password = 'vagrant'
cls.vendor = 'eos'
cls.device = FortiOSDriver(hostname, username, password, timeout=60)
if cls.mock:
cls.device.device = FakeFortiOSDevice()
else:
cls.device.open()
class FakeFortiOSDevice:
@staticmethod
def read_txt_file(filename):
with open(filename.lower()) as data_file:
return data_file.read().splitlines()
def execute_command(self, command):
return self.read_txt_file(
'fortios/mock_data/{}.txt'.format(command.replace(' ', '_').replace('|', '').replace(':', '')))
def load_config(self, config_block):
self.running_config = FortiConfig('running')
self.running_config.parse_config_output(self.read_txt_file('fortios/mock_data/{}.txt'.format(
config_block.replace(' ', '_'))))
+66
View File
@@ -0,0 +1,66 @@
"""Test fixtures."""
from builtins import super
import pytest
from napalm_base.test import conftest as parent_conftest
from napalm_base.test.double import BaseTestDouble
from napalm_fortios import FortiOSDriver as OriginalDriver
from pyFG.fortios import FortiConfig
@pytest.fixture(scope='class')
def set_device_parameters(request):
"""Set up the class."""
def fin():
request.cls.device.close()
request.addfinalizer(fin)
request.cls.driver = OriginalDriver
request.cls.patched_driver = PatchedDriver
request.cls.vendor = 'fortios'
parent_conftest.set_device_parameters(request)
def pytest_generate_tests(metafunc):
"""Generate test cases dynamically."""
parent_conftest.pytest_generate_tests(metafunc, __file__)
class PatchedDriver(OriginalDriver):
"""Patched Driver."""
def __init__(self, hostname, username, password, timeout=60, optional_args=None):
super().__init__(hostname, username, password, timeout, optional_args)
self.patched_attrs = ['device']
self.device = FakeDevice()
def open(self):
pass
def close(self):
pass
def is_alive(self):
return({'is_alive': True})
class FakeDevice(BaseTestDouble):
"""Device test double."""
def open(self):
pass
def close(self):
pass
def execute_command(self, command):
filename = '{}.txt'.format(self.sanitize_text(command))
full_path = self.find_file(filename)
return self.read_txt_file(full_path).splitlines()
def load_config(self, config_block):
filename = '{}.txt'.format(self.sanitize_text(config_block))
full_path = self.find_file(filename)
self.running_config = FortiConfig('running')
self.running_config.parse_config_output(self.read_txt_file(full_path))
@@ -1,121 +0,0 @@
config system interface
edit "mgmt1"
set ip 10.209.32.126 255.255.240.0
set allowaccess ping https ssh snmp
set vlanforward enable
set type physical
set dedicated-to management
set snmp-index 2
set defaultgw disable
next
edit "mgmt2"
set vdom "root"
set vlanforward enable
set type physical
set snmp-index 4
next
edit "wan1"
set vdom "root"
set vlanforward enable
set type physical
set snmp-index 5
next
edit "wan2"
set vdom "root"
set vlanforward enable
set type physical
set snmp-index 6
next
edit "port1"
set vdom "root"
set allowaccess ping https
set vlanforward enable
set type physical
set snmp-index 1
next
edit "port2"
set vdom "root"
set vlanforward enable
set type physical
set snmp-index 7
next
edit "modem"
set vdom "root"
set mode pppoe
set vlanforward enable
set type physical
set snmp-index 3
next
edit "ssl.root"
set vdom "root"
set vlanforward enable
set status down
set type tunnel
set alias "sslvpn tunnel interface"
set snmp-index 30
next
edit "npu0-vlink0"
set vdom "root"
set vlanforward enable
set status down
set type physical
set snmp-index 32
next
edit "npu0-vlink1"
set vdom "root"
set vlanforward enable
set status down
set type physical
set snmp-index 33
next
edit "pub0"
set vdom "root"
set ip 192.168.181.235 255.255.255.248
set allowaccess ping
set vlanforward enable
set snmp-index 31
set interface "port1"
set vlanid 22
next
edit "svc0"
set vdom "root"
set ip 192.168.169.235 255.255.255.248
set allowaccess ping
set vlanforward enable
set snmp-index 34
set interface "port11"
set vlanid 32
next
edit "forticlient"
set vdom "root"
set ip 10.210.0.1 255.255.255.255
set allowaccess ping ssh
set vlanforward enable
set type tunnel
set remote-ip 10.210.0.1
set listen-forticlient-connection enable
set snmp-index 39
set interface "pub0"
next
edit "native"
set vdom "root"
set ip 10.210.1.1 255.255.255.255
set allowaccess ping ssh
set vlanforward enable
set type tunnel
set remote-ip 10.210.1.1
set snmp-index 40
set interface "pub0"
next
edit "MY_VPN"
set vdom "root"
set ip 10.15.2.160 255.255.255.255
set allowaccess ping ssh
set vlanforward enable
set type tunnel
set remote-ip 10.15.2.161
set snmp-index 41
set interface "pub0"
next
end
@@ -0,0 +1 @@
{"global": {"router_id": "193.235.32.243,", "peers": {"10.15.2.101": {"is_enabled": true, "uptime": 50292, "remote_as": 65208, "description": "", "remote_id": "74.201.254.126", "local_as": 65432, "is_up": true, "address_family": {"ipv4": {"sent_prefixes": 666, "accepted_prefixes": 1, "received_prefixes": 0}, "ipv6": {"sent_prefixes": 0, "accepted_prefixes": 0, "received_prefixes": 0}}}, "10.15.2.105": {"is_enabled": true, "uptime": 864000, "remote_as": 65209, "description": "", "remote_id": "209.92.66.34", "local_as": 65432, "is_up": true, "address_family": {"ipv4": {"sent_prefixes": 668, "accepted_prefixes": 1, "received_prefixes": 0}, "ipv6": {"sent_prefixes": 3, "accepted_prefixes": 0, "received_prefixes": 0}}}, "10.15.2.99": {"is_enabled": false, "uptime": 0, "remote_as": 65307, "description": "", "remote_id": "0.0.0.0", "local_as": 65432, "is_up": false, "address_family": {"ipv4": {"sent_prefixes": 0, "accepted_prefixes": 0, "received_prefixes": 0}, "ipv6": {"sent_prefixes": 0, "accepted_prefixes": 0, "received_prefixes": 0}}}}}}
@@ -0,0 +1 @@
{"running": "#config-version=FWF60D-5.00-FW-build271-140124:opmode=1:vdom=0:user=admin\n#conf_file_ver=9284291339995375843\n#buildno=0271\n#global_vdom=1\nconfig system global\n set admintimeout 15\n set fgd-alert-subscription advisory latest-threat\n set gui-certificates enable\n set gui-dynamic-routing enable\n set gui-ipv6 enable\n set gui-local-in-policy enable\n set gui-nat46-64 enable\n set gui-policy-based-ipsec enable\n set hostname \"FORTINET\"\n set service-expire-notification disable\n set timezone 08\nend\nconfig system accprofile\n edit \"prof_admin\"\n set admingrp read-write\n set authgrp read-write\n set endpoint-control-grp read-write\n set fwgrp read-write\n set loggrp read-write\n set mntgrp read-write\n set netgrp read-write\n set routegrp read-write\n set sysgrp read-write\n set updategrp read-write\n set utmgrp read-write\n set vpngrp read-write\n set wanoptgrp read-write\n set wifi read-write\n next\nend\nconfig system interface\n edit \"dmz\"\n set vdom \"root\"\n set ip 10.10.10.1 255.255.255.0\n set allowaccess ping https fgfm capwap\n set type physical\n set snmp-index 5\n next\n edit \"wan1\"\n set vdom \"root\"\n set mode dhcp\n set allowaccess ping https ssh snmp\n set type physical\n set snmp-index 3\n config ipv6\n set ip6-allowaccess ping https ssh\n end\n set defaultgw enable\n next\n edit \"wan2\"\n set vdom \"root\"\n set ip 192.168.101.99 255.255.255.0\n set allowaccess ping fgfm auto-ipsec\n set type physical\n set snmp-index 4\n next\n edit \"modem\"\n set vdom \"root\"\n set mode pppoe\n set type physical\n set snmp-index 6\n set defaultgw enable\n next\n edit \"ssl.root\"\n set vdom \"root\"\n set type tunnel\n set alias \"sslvpn tunnel interface\"\n set snmp-index 7\n next\n edit \"mesh.root\"\n set vdom \"root\"\n set type vap-switch\n set snmp-index 9\n next\n edit \"internal\"\n set vdom \"root\"\n set ip 10.10.90.1 255.255.255.0\n set allowaccess ping https ssh snmp http fgfm capwap\n set status down\n set type physical\n set snmp-index 2\n next\n edit \"wifi\"\n set vdom \"root\"\n set ip 10.10.80.1 255.255.255.0\n set allowaccess ping https ssh fgfm\n set status down\n set type vap-switch\n set snmp-index 1\n next\nend\nconfig system admin\n edit \"admin\"\n set accprofile \"super_admin\"\n set vdom \"root\"\n config dashboard-tabs\n edit 1\n set name \"Status\"\n next\n edit 2\n set columns 1\n set name \"Top Sources\"\n next\n edit 3\n set columns 1\n set name \"Top Destinations\"\n next\n edit 4\n set columns 1\n set name \"Top Applications\"\n next\n end\n config dashboard\n edit 1\n set tab-id 1\n set column 1\n next\n edit 2\n set widget-type licinfo\n set tab-id 1\n set column 1\n next\n edit 3\n set widget-type jsconsole\n set tab-id 1\n set column 1\n next\n edit 4\n set widget-type sysres\n set tab-id 1\n set column 2\n next\n edit 5\n set widget-type gui-features\n set tab-id 1\n set column 2\n next\n edit 6\n set widget-type alert\n set tab-id 1\n set column 2\n set top-n 10\n next\n edit 21\n set widget-type sessions\n set tab-id 2\n set column 1\n set top-n 25\n set sort-by msg-counts\n next\n edit 31\n set widget-type sessions\n set tab-id 3\n set column 1\n set top-n 25\n set sort-by msg-counts\n set report-by destination\n next\n edit 41\n set widget-type sessions\n set tab-id 4\n set column 1\n Line truncated
@@ -0,0 +1 @@
{"running": "", "startup": "", "candidate": ""}
@@ -0,0 +1,402 @@
#config-version=FWF60D-5.00-FW-build271-140124:opmode=1:vdom=0:user=admin
#conf_file_ver=9284291339995375843
#buildno=0271
#global_vdom=1
config system global
set admintimeout 15
set fgd-alert-subscription advisory latest-threat
set gui-certificates enable
set gui-dynamic-routing enable
set gui-ipv6 enable
set gui-local-in-policy enable
set gui-nat46-64 enable
set gui-policy-based-ipsec enable
set hostname "FORTINET"
set service-expire-notification disable
set timezone 08
end
config system accprofile
edit "prof_admin"
set admingrp read-write
set authgrp read-write
set endpoint-control-grp read-write
set fwgrp read-write
set loggrp read-write
set mntgrp read-write
set netgrp read-write
set routegrp read-write
set sysgrp read-write
set updategrp read-write
set utmgrp read-write
set vpngrp read-write
set wanoptgrp read-write
set wifi read-write
next
end
config system interface
edit "dmz"
set vdom "root"
set ip 10.10.10.1 255.255.255.0
set allowaccess ping https fgfm capwap
set type physical
set snmp-index 5
next
edit "wan1"
set vdom "root"
set mode dhcp
set allowaccess ping https ssh snmp
set type physical
set snmp-index 3
config ipv6
set ip6-allowaccess ping https ssh
end
set defaultgw enable
next
edit "wan2"
set vdom "root"
set ip 192.168.101.99 255.255.255.0
set allowaccess ping fgfm auto-ipsec
set type physical
set snmp-index 4
next
edit "modem"
set vdom "root"
set mode pppoe
set type physical
set snmp-index 6
set defaultgw enable
next
edit "ssl.root"
set vdom "root"
set type tunnel
set alias "sslvpn tunnel interface"
set snmp-index 7
next
edit "mesh.root"
set vdom "root"
set type vap-switch
set snmp-index 9
next
edit "internal"
set vdom "root"
set ip 10.10.90.1 255.255.255.0
set allowaccess ping https ssh snmp http fgfm capwap
set status down
set type physical
set snmp-index 2
next
edit "wifi"
set vdom "root"
set ip 10.10.80.1 255.255.255.0
set allowaccess ping https ssh fgfm
set status down
set type vap-switch
set snmp-index 1
next
end
config system admin
edit "admin"
set accprofile "super_admin"
set vdom "root"
config dashboard-tabs
edit 1
set name "Status"
next
edit 2
set columns 1
set name "Top Sources"
next
edit 3
set columns 1
set name "Top Destinations"
next
edit 4
set columns 1
set name "Top Applications"
next
end
config dashboard
edit 1
set tab-id 1
set column 1
next
edit 2
set widget-type licinfo
set tab-id 1
set column 1
next
edit 3
set widget-type jsconsole
set tab-id 1
set column 1
next
edit 4
set widget-type sysres
set tab-id 1
set column 2
next
edit 5
set widget-type gui-features
set tab-id 1
set column 2
next
edit 6
set widget-type alert
set tab-id 1
set column 2
set top-n 10
next
edit 21
set widget-type sessions
set tab-id 2
set column 1
set top-n 25
set sort-by msg-counts
next
edit 31
set widget-type sessions
set tab-id 3
set column 1
set top-n 25
set sort-by msg-counts
set report-by destination
next
edit 41
set widget-type sessions
set tab-id 4
set column 1
set top-n 25
set sort-by msg-counts
set report-by application
next
end
config login-time
edit "admin"
set last-login 2014-03-05 20:18:42
next
end
set password ENC AK1mbPadQmYqP8Q4f7ClXXWGrgEMVWbGGwf6IgRwHQduoc=
next
end
config system ha
set override disable
end
config system storage
edit "FLASH1"
set media-type "scsi"
set partition "4E6CD8C90723C14B"
next
end
config system replacemsg-image
edit "logo_fnet"
set image-base64 ''
set image-type gif
next
edit "logo_fguard_wf"
set image-base64 ''
set image-type gif
next
edit "logo_fw_auth"
set image-base64 ''
set image-type png
next
edit "logo_v2_fnet"
set image-base64 ''
set image-type png
next
edit "logo_v2_fguard_wf"
set image-base64 ''
set image-type png
next
end
config system snmp sysinfo
set status enable
end
config vpn certificate ca
end
config vpn certificate local
end
config wanopt storage
edit "FLASH1"
set size 4563
next
end
config system session-sync
end
config ips global
set default-app-cat-mask 18446744073474670591
end
config ips dbinfo
set version 1
end
config gui console
unset preferences
end
config system auto-install
set auto-install-config enable
set auto-install-image enable
end
config system console
set output standard
end
config system ntp
set ntpsync enable
set syncinterval 60
end
config system settings
set sip-tcp-port 5060
set sip-udp-port 5060
end
config firewall service group
edit "Email Access"
set member "DNS" "IMAP" "IMAPS" "POP3" "POP3S" "SMTP" "SMTPS"
next
edit "Web Access"
set member "DNS" "HTTP" "HTTPS"
next
edit "Windows AD"
set member "DCE-RPC" "DNS" "KERBEROS" "LDAP" "LDAP_UDP" "SAMBA" "SMB"
next
edit "Exchange Server"
set member "DCE-RPC" "DNS" "HTTPS"
next
end
config webfilter ftgd-local-cat
edit "custom1"
set id 140
next
edit "custom2"
set id 141
next
end
config user fortitoken
edit "FTKMOB4302463E0E"
set license "FTMTRIAL00138836"
next
edit "FTKMOB433B7004CF"
set license "FTMTRIAL00138836"
next
end
config user local
edit "guest"
set type password
set passwd ENC SWv0LitZXJWqXLGveoEXgcboipAFM2wg7Np0oxyQpRubIce9royFr2/bxJ2nzvoPR0CN3p1/2+VWuPJlLTDGuYX0ojfBAbWkgLXI2AxwB3jpUp7PMWMyyfn4aT2Y35HnSP5mP87q2d1lMYJkBttbceEmZsDgkmeRyLPDNdtSCFvZ7pKm0gNDILk7sLPyJT7k5ZXxtw==
next
end
config user group
edit "FSSO_Guest_Users"
set group-type fsso-service
next
edit "Guest-group"
set member "guest"
next
end
config spamfilter profile
edit "default"
set comment "malware and phishing URL filtering"
next
end
config wanopt settings
set host-id "default-id"
end
config wanopt profile
edit "default"
set comments "default WANopt profile"
next
end
config web-proxy global
set proxy-fqdn "default.fqdn"
end
config firewall schedule recurring
edit "always"
set day sunday monday tuesday wednesday thursday friday saturday
next
end
config firewall profile-protocol-options
edit "default"
set comment "all default services"
config http
set ports 80
set options clientcomfort no-content-summary
unset post-lang
end
config ftp
set ports 21
set options clientcomfort no-content-summary splice
end
config imap
set ports 143
set options fragmail no-content-summary
end
config mapi
set ports 135
set options fragmail no-content-summary
end
config pop3
set ports 110
set options fragmail no-content-summary
end
config smtp
set ports 25
set options fragmail no-content-summary splice
end
config nntp
set ports 119
set options no-content-summary splice
end
config im
unset options
end
config dns
set ports 53
end
next
end
config firewall deep-inspection-options
edit "default"
set comment "all default services"
config https
set ports 443
end
config ftps
set ports 990
end
config imaps
set ports 993
end
config pop3s
set ports 995
end
config smtps
set ports 465
end
next
end
config firewall identity-based-route
end
config firewall policy
edit 5
set srcintf "internal"
set dstintf "wifi"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
end
config wireless-controller wtp
edit "FWF60D-WIFI0"
next
end
config log disk setting
set status enable
set storage "FLASH1"
end
config log eventfilter
set user disable
set wan-opt disable
end
config log setting
set gui-location disk
end
@@ -0,0 +1 @@
{"fans": {"ps2 fan 1": {"status": false}, "ps1 fan 1": {"status": true}, "fan 2": {"status": true}, "fan 3": {"status": true}, "fan 1": {"status": true}, "fan 4": {"status": true}, "fan 5": {"status": true}}, "cpu": {"CPU2": {"%usage": 4.0}, "CPU3": {"%usage": 4.0}, "CPU0": {"%usage": 8.0}, "CPU1": {"%usage": 4.0}}, "temperature": {"adt7490 rem1": {"is_critical": false, "temperature": 58.0, "is_alert": false}, "adt7490 rem2": {"is_critical": false, "temperature": 56.0, "is_alert": false}, "dts cpu": {"is_critical": false, "temperature": 54.0, "is_alert": false}, "ps2 temp": {"is_alert": false, "temperature": 0.0, "is_critical": false}, "ps1 temp": {"is_critical": false, "temperature": 41.0, "is_alert": false}, "adt7490 local": {"is_critical": false, "temperature": 48.0, "is_alert": false}}, "power": {"ps2": {"status": true, "output": -1.0, "capacity": -1.0}, "ps1": {"status": true, "output": -1.0, "capacity": -1.0}}, "memory": {"available_ram": 7962, "used_ram": 1148}}
@@ -0,0 +1 @@
{"uptime": 23679660, "vendor": "Fortigate", "hostname": "vpn-sto3-z8r307-2", "fqdn": "vpn-sto3-z8r307-2.spotify.net", "os_version": "v5.2.2", "serial_number": "FG800C3914800949", "model": "FortiGate-800C", "interface_list": ["mgmt1", "mgmt2", "wan1", "wan2", "port1", "port2", "modem", "ssl.root", "npu0-vlink0", "npu0-vlink1", "pub0", "svc0", "forticlient", "native", "MY_VPN"]}
@@ -0,0 +1 @@
{"1": [{"src_zone": "any", "log": "False", "service": "ALL", "schedule": "always", "l3_src": "all", "enabled": false, "packet_hits": -1, "l3_dst": "all", "dst_zone": "any", "action": "permit", "position": 1, "byte_hits": -1, "id": "1"}], "2": [{"src_zone": "port3", "log": "all", "service": "ALL", "schedule": "always", "l3_src": "all", "enabled": false, "packet_hits": -1, "l3_dst": "all", "dst_zone": "port2", "action": "reject", "position": 2, "byte_hits": -1, "id": "2"}]}
@@ -0,0 +1,23 @@
config firewall policy
edit 1
set uuid 9d747de8-dad4-51e5-7a7e-d078aa77140a
set srcintf "any"
set dstintf "any"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set name "bla"
set uuid de597b64-aca8-51e6-5d00-b7874e6b72b8
set srcintf "port3"
set dstintf "port2"
set srcaddr "all"
set dstaddr "all"
set schedule "always"
set service "ALL"
set logtraffic all
next
end
@@ -0,0 +1 @@
{"mgmt2": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "00:09:0f:09:00:01", "speed": -1}, "port1": {"is_enabled": false, "description": "", "last_flapped": -1.0, "is_up": false, "mac_address": "00:09:0f:09:00:02", "speed": 1000}}
@@ -0,0 +1 @@
{"forticlient_0": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 10488565, "tx_errors": 0, "rx_octets": 2884770, "tx_unicast_packets": 13820, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 13702}, "vsys_hamgmt": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 11717, "tx_errors": 0, "rx_octets": 11717, "tx_unicast_packets": 45, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 45}, "port21": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 0, "tx_errors": 0, "rx_octets": 0, "tx_unicast_packets": 0, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 0}, "forticlient_4": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 1311111, "tx_errors": 0, "rx_octets": 1179812, "tx_unicast_packets": 2047, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 2561}, "mgmt1": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 2343371965, "tx_errors": 0, "rx_octets": 100706484996, "tx_unicast_packets": 9523098, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 779899549}, "mgmt2": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 0, "tx_errors": 0, "rx_octets": 0, "tx_unicast_packets": 0, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 0}, "port18": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 0, "tx_errors": 0, "rx_octets": 0, "tx_unicast_packets": 0, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 0}, "port19": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 0, "tx_errors": 0, "rx_octets": 0, "tx_unicast_packets": 0, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 0}, "pub0": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 18790279964525, "tx_errors": 0, "rx_octets": 11620407995936, "tx_unicast_packets": 41279349776, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 45948704676}, "native_17": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 853214, "tx_errors": 0, "rx_octets": 394172, "tx_unicast_packets": 1534, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 1668}, "port10": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 0, "tx_errors": 0, "rx_octets": 0, "tx_unicast_packets": 0, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 0}, "port11": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 0, "tx_errors": 0, "rx_octets": 0, "tx_unicast_packets": 0, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 0}, "port12": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 0, "tx_errors": 0, "rx_octets": 0, "tx_unicast_packets": 0, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 0}, "native_15": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 918582, "tx_errors": 0, "rx_octets": 526560, "tx_unicast_packets": 1413, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 3214}, "port14": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 0, "tx_errors": 0, "rx_octets": 0, "tx_unicast_packets": 0, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 0}, "port15": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 0, "tx_errors": 0, "rx_octets": 0, "tx_unicast_packets": 0, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 0}, "port16": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 0, "tx_errors": 0, "rx_octets": 0, "tx_unicast_packets": 0, "rx_errors": 0, "tx_broadcast_packets": -1, "rx_multicast_packets": -1, "rx_broadcast_packets": -1, "rx_discards": 0, "rx_unicast_packets": 0}, "port17": {"tx_multicast_packets": -1, "tx_discards": 0, "tx_octets": 0, "tx_errors": 0, "rx_octets": 0, "tx_unicast_packets": 0, "rx_errors": 0, "tx_broadcasLine truncated
@@ -0,0 +1 @@
{"is_alive": true}
+11
View File
@@ -0,0 +1,11 @@
"""Tests for getters."""
from napalm_base.test.getters import BaseTestGetters
import pytest
@pytest.mark.usefixtures("set_device_parameters")
class TestGetter(BaseTestGetters):
"""Test get_* methods."""