Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6407c0dfc2 | ||
|
|
c66e0c483a | ||
|
|
e5b45cffe0 | ||
|
|
529c78fb34 | ||
|
|
bdcb3dc338 | ||
|
|
7b53176371 | ||
|
|
b453a640dd | ||
|
|
c544c59f2c | ||
|
|
b8ac2c49c6 | ||
|
|
3f8a79459e | ||
|
|
e79fa6f501 | ||
|
|
ec445bc44b | ||
|
|
05573195db | ||
|
|
85612c49fc | ||
|
|
7888ad9e0b | ||
|
|
7cb0723b07 | ||
|
|
77f0c5e42f | ||
|
|
88fdbffa44 | ||
|
|
2fa9c589f6 | ||
|
|
5616a1f7ae | ||
|
|
0a0b87d4f4 | ||
|
|
4b78a4d731 | ||
|
|
60a5cc5764 | ||
|
|
fbe3c04cbb | ||
|
|
73afe433cc | ||
|
|
2ccad9982f | ||
|
|
b0308075f4 | ||
|
|
13a82b7e81 | ||
|
|
62299ccf28 | ||
|
|
f9d7bd0aa9 | ||
|
|
8a1779b10a | ||
|
|
60ccca9441 | ||
|
|
3af1c05fb2 | ||
|
|
67a2d4c97e | ||
|
|
b6026ad12c | ||
|
|
3055c79c02 | ||
|
|
b9a7d3e992 | ||
|
|
f0ac70d2af | ||
|
|
8456b5271a | ||
|
|
f1fa04bb9b | ||
|
|
95cc99cc58 | ||
|
|
f4b4df9ac9 | ||
|
|
e68a906578 | ||
|
|
1a46347610 | ||
|
|
788c7b46ef | ||
|
|
1b7bd07ddc | ||
|
|
ee28aa8807 | ||
|
|
fc7579f1b4 | ||
|
|
e2eeda8b9f | ||
|
|
91e179c659 | ||
|
|
ac46128168 | ||
|
|
2c29dcca1f | ||
|
|
791992e12d | ||
|
|
fa29ff1e3a | ||
|
|
34eaef53e0 | ||
|
|
bda95eb668 | ||
|
|
ddd45df13c | ||
|
|
8183a4e151 | ||
|
|
4d0325eb97 | ||
|
|
f5edd34d8b | ||
|
|
3f7f7cb83a | ||
|
|
539a5d77ff |
No files matched your search
@@ -60,3 +60,4 @@ env
|
|||||||
|
|
||||||
test/unit/test_devices.py
|
test/unit/test_devices.py
|
||||||
|
|
||||||
|
report.json
|
||||||
+9
-14
@@ -1,10 +1,11 @@
|
|||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- 2.7
|
- 2.7
|
||||||
|
- 3.4
|
||||||
|
- 3.5
|
||||||
install:
|
install:
|
||||||
- pip install -r requirements.txt
|
- pip install tox-travis
|
||||||
- pip install .
|
- pip install coveralls
|
||||||
- pip install coveralls
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: pypi
|
provider: pypi
|
||||||
user: dbarroso
|
user: dbarroso
|
||||||
@@ -14,13 +15,7 @@ deploy:
|
|||||||
tags: true
|
tags: true
|
||||||
branch: master
|
branch: master
|
||||||
script:
|
script:
|
||||||
- cd test/unit
|
- tox
|
||||||
- nosetests --with-coverage --cover-package napalm_fortios -v TestFortiOSDriver:TestGetterFortiOSDriver.test_get_bgp_neighbors
|
after_success:
|
||||||
- nosetests --with-coverage --cover-package napalm_fortios -v TestFortiOSDriver:TestGetterFortiOSDriver.test_get_environment
|
- coveralls
|
||||||
- nosetests --with-coverage --cover-package napalm_fortios -v TestFortiOSDriver:TestGetterFortiOSDriver.test_get_facts
|
- if [ $TRAVIS_TAG ]; then curl -X POST https://readthedocs.org/build/napalm; fi
|
||||||
- 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
|
|
||||||
+194
-107
@@ -11,12 +11,16 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations under
|
# License for the specific language governing permissions and limitations under
|
||||||
# the License.
|
# the License.
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from pyFG.fortios import FortiOS, FortiConfig, logger
|
from pyFG.fortios import FortiOS, FortiConfig, logger
|
||||||
from pyFG.exceptions import FailedCommit, CommandExecutionException
|
from pyFG.exceptions import FailedCommit, CommandExecutionException
|
||||||
from napalm_base.base import NetworkDriver
|
from napalm.base.exceptions import ReplaceConfigException, MergeConfigException
|
||||||
from napalm_base.exceptions import ReplaceConfigException, MergeConfigException
|
from napalm.base.utils.string_parsers import colon_separated_string_to_dict,\
|
||||||
from napalm_base.utils.string_parsers import colon_separated_string_to_dict, convert_uptime_string_seconds
|
convert_uptime_string_seconds
|
||||||
|
import napalm.base.helpers
|
||||||
|
from napalm.base.base import NetworkDriver
|
||||||
|
|
||||||
|
|
||||||
class FortiOSDriver(NetworkDriver):
|
class FortiOSDriver(NetworkDriver):
|
||||||
@@ -30,7 +34,8 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
else:
|
else:
|
||||||
self.vdom = None
|
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
|
self.config_replace = False
|
||||||
|
|
||||||
def open(self):
|
def open(self):
|
||||||
@@ -39,19 +44,27 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
def close(self):
|
def close(self):
|
||||||
self.device.close()
|
self.device.close()
|
||||||
|
|
||||||
def execute_command_with_vdom(self, command, vdom=None):
|
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.
|
# If the user doesn't specify a particular vdom we use the default vdom for the object.
|
||||||
vdom = vdom or self.vdom
|
vdom = vdom or self.vdom
|
||||||
|
|
||||||
if vdom == 'global' and self.vdom is not None:
|
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.
|
# If vdom is global we go to the global vdom, execute the commands
|
||||||
# There is a catch, if the device doesn't have vdoms enabled we have to execute the command in the root
|
# 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)
|
command = 'conf global\n{command}\nend'.format(command=command)
|
||||||
|
|
||||||
# We skip the lines telling us that we changed vdom
|
# We skip the lines telling us that we changed vdom
|
||||||
return self.device.execute_command(command)[1:-2]
|
return self.device.execute_command(command)[1:-2]
|
||||||
elif vdom not in ['global', None]:
|
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)
|
command = 'conf vdom\nedit {vdom}\n{command}\nend'.format(vdom=vdom, command=command)
|
||||||
|
|
||||||
# We skip the lines telling us that we changed vdom
|
# We skip the lines telling us that we changed vdom
|
||||||
@@ -60,8 +73,8 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
# If there is no vdom we just execute the command
|
# If there is no vdom we just execute the command
|
||||||
return self.device.execute_command(command)
|
return self.device.execute_command(command)
|
||||||
|
|
||||||
def get_command_with_vdom(self, cmd, separator=':', auto=False, vdom=None):
|
def _get_command_with_vdom(self, cmd, separator=':', auto=False, vdom=None):
|
||||||
output = self.execute_command_with_vdom(cmd, vdom)
|
output = self._execute_command_with_vdom(cmd, vdom)
|
||||||
|
|
||||||
if auto:
|
if auto:
|
||||||
if ':' in output[0]:
|
if ':' in output[0]:
|
||||||
@@ -111,7 +124,7 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
|
|
||||||
def commit_config(self):
|
def commit_config(self):
|
||||||
try:
|
try:
|
||||||
self.execute_command_with_vdom('execute backup config flash commit_with_napalm')
|
self._execute_command_with_vdom('execute backup config flash commit_with_napalm')
|
||||||
self.device.commit()
|
self.device.commit()
|
||||||
self.discard_config()
|
self.discard_config()
|
||||||
except FailedCommit as e:
|
except FailedCommit as e:
|
||||||
@@ -125,17 +138,21 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
self.device.load_config(in_candidate=True)
|
self.device.load_config(in_candidate=True)
|
||||||
|
|
||||||
def rollback(self):
|
def rollback(self):
|
||||||
output = self.execute_command_with_vdom('fnsysctl ls -l data2/config', vdom=None)
|
output = self._execute_command_with_vdom('fnsysctl ls -l data2/config', vdom=None)
|
||||||
rollback_file = output[-2].split()[-1]
|
rollback_file = output[-2].split()[-1]
|
||||||
rollback_config = self.execute_command_with_vdom(
|
rollback_config = self._execute_command_with_vdom(
|
||||||
'fnsysctl cat data2/config/{rollback_file}'.format(rollback_file))
|
'fnsysctl cat data2/config/{rollback_file}'.format(rollback_file))
|
||||||
|
|
||||||
self.device.load_config(empty_candidate=True)
|
self.device.load_config(empty_candidate=True)
|
||||||
self.load_replace_candidate(config=rollback_config)
|
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'].\
|
||||||
self.device.candidate_config['vpn certificate local']['Fortinet_CA_SSLProxy'].del_param('certificate')
|
del_param('private-key')
|
||||||
self.device.candidate_config['vpn certificate local']['Fortinet_SSLProxy'].del_param('private-key')
|
self.device.candidate_config['vpn certificate local']['Fortinet_CA_SSLProxy'].\
|
||||||
self.device.candidate_config['vpn certificate local']['Fortinet_SSLProxy'].del_param('certificate')
|
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()
|
self.device.commit()
|
||||||
|
|
||||||
def get_config(self, retrieve="all"):
|
def get_config(self, retrieve="all"):
|
||||||
@@ -145,12 +162,12 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
get_candidate = retrieve == "all" or retrieve == "candidate"
|
get_candidate = retrieve == "all" or retrieve == "candidate"
|
||||||
|
|
||||||
if retrieve == "all" or get_running:
|
if retrieve == "all" or get_running:
|
||||||
result = self.execute_command_with_vdom('show')
|
result = self._execute_command_with_vdom('show')
|
||||||
text_result = '\n'.join(result)
|
text_result = '\n'.join(result)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'startup': u"",
|
'startup': u"",
|
||||||
'running': unicode(text_result),
|
'running': str(text_result),
|
||||||
'candidate': u"",
|
'candidate': u"",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,21 +179,24 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def get_facts(self):
|
def get_facts(self):
|
||||||
system_status = self.get_command_with_vdom('get system status', vdom='global')
|
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')
|
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 '']
|
interface_list = [x.split()[2] for x in interfaces if x.strip() is not '']
|
||||||
|
|
||||||
domain = self.get_command_with_vdom('get system dns | grep domain', vdom='global')['domain']
|
domain = self._get_command_with_vdom('get system dns | grep domain',
|
||||||
|
vdom='global')['domain']
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'vendor': unicode('Fortigate'),
|
'vendor': str('Fortigate'),
|
||||||
'os_version': unicode(system_status['Version'].split(',')[0].split()[1]),
|
'os_version': str(system_status['Version'].split(',')[0].split()[1]),
|
||||||
'uptime': convert_uptime_string_seconds(performance_status['Uptime']),
|
'uptime': convert_uptime_string_seconds(performance_status['Uptime']),
|
||||||
'serial_number': unicode(system_status['Serial-Number']),
|
'serial_number': str(system_status['Serial-Number']),
|
||||||
'model': unicode(system_status['Version'].split(',')[0].split()[0]),
|
'model': str(system_status['Version'].split(',')[0].split()[0]),
|
||||||
'hostname': unicode(system_status['Hostname']),
|
'hostname': str(system_status['Hostname']),
|
||||||
'fqdn': u'{}.{}'.format(system_status['Hostname'], domain),
|
'fqdn': u'{}.{}'.format(system_status['Hostname'], domain),
|
||||||
'interface_list': interface_list
|
'interface_list': interface_list
|
||||||
}
|
}
|
||||||
@@ -203,12 +223,13 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def get_interfaces(self):
|
def get_interfaces(self):
|
||||||
cmd_data = self.execute_command_with_vdom('diagnose hardware deviceinfo nic', vdom='global')
|
cmd_data = self._execute_command_with_vdom('diagnose hardware deviceinfo nic',
|
||||||
|
vdom='global')
|
||||||
|
|
||||||
interface_list = [x.replace('\t', '') for x in cmd_data if x.startswith('\t')]
|
interface_list = [x.replace('\t', '') for x in cmd_data if x.startswith('\t')]
|
||||||
interface_statistics = {}
|
interface_statistics = {}
|
||||||
for interface in interface_list:
|
for interface in interface_list:
|
||||||
if_data = self.execute_command_with_vdom(
|
if_data = self._execute_command_with_vdom(
|
||||||
'diagnose hardware deviceinfo nic {}'.format(interface), vdom='global')
|
'diagnose hardware deviceinfo nic {}'.format(interface), vdom='global')
|
||||||
parsed_data = {}
|
parsed_data = {}
|
||||||
if interface.startswith('mgmt'):
|
if interface.startswith('mgmt'):
|
||||||
@@ -221,7 +242,7 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
elif line.startswith('Link'):
|
elif line.startswith('Link'):
|
||||||
parsed_data['is_up'] = line.split('\t')[-1] is 'up'
|
parsed_data['is_up'] = line.split('\t')[-1] is 'up'
|
||||||
elif line.startswith('Current_HWaddr'):
|
elif line.startswith('Current_HWaddr'):
|
||||||
parsed_data['mac_address'] = unicode(line.split('\t')[-1])
|
parsed_data['mac_address'] = str(line.split('\t')[-1])
|
||||||
parsed_data['is_enabled'] = True
|
parsed_data['is_enabled'] = True
|
||||||
parsed_data['description'] = u''
|
parsed_data['description'] = u''
|
||||||
parsed_data['last_flapped'] = -1.0
|
parsed_data['last_flapped'] = -1.0
|
||||||
@@ -234,18 +255,84 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
elif line.startswith('PHY Speed'):
|
elif line.startswith('PHY Speed'):
|
||||||
parsed_data['speed'] = int(line.split(':')[-1])
|
parsed_data['speed'] = int(line.split(':')[-1])
|
||||||
elif line.startswith('Current_HWaddr'):
|
elif line.startswith('Current_HWaddr'):
|
||||||
parsed_data['mac_address'] = unicode(line.split(' ')[-1])
|
parsed_data['mac_address'] = str(line.split(' ')[-1])
|
||||||
parsed_data['description'] = u''
|
parsed_data['description'] = u''
|
||||||
parsed_data['last_flapped'] = -1.0
|
parsed_data['last_flapped'] = -1.0
|
||||||
interface_statistics[interface] = parsed_data
|
interface_statistics[interface] = parsed_data
|
||||||
return interface_statistics
|
return interface_statistics
|
||||||
|
|
||||||
|
def get_interfaces_ip(self):
|
||||||
|
cmd = self._execute_command_with_vdom('get system interface physical', vdom='global')
|
||||||
|
interface_ip_dictionary = {}
|
||||||
|
if_name = None
|
||||||
|
for line in cmd:
|
||||||
|
interface_data = line.strip().split()
|
||||||
|
if len(interface_data)==0:
|
||||||
|
continue
|
||||||
|
if interface_data[0].startswith('==['):
|
||||||
|
m = re.search("==\[(.+)\]", interface_data[0])
|
||||||
|
if_name = m.group(1)
|
||||||
|
if if_name and interface_data[0]=="ip:" and interface_data[1][0]!='0':
|
||||||
|
interface_ip_dictionary[if_name]={}
|
||||||
|
interface_ip_dictionary[if_name]["ipv4"]={interface_data[1]: {'prefix_length': sum(bin(int(x)).count('1') for x in interface_data[2].split('.'))}}
|
||||||
|
if if_name and interface_data[0]=="ipv6:" and interface_data[1][0]!=':':
|
||||||
|
try:
|
||||||
|
interface_ip_dictionary[if_name]["ipv6"]={interface_data[1].split('/')[0]: {'prefix_length': interface_data[1].split('/')[1]}}
|
||||||
|
except:
|
||||||
|
interface_ip_dictionary[if_name]={"ipv6": {interface_data[1].split('/')[0]: {'prefix_length': interface_data[1].split('/')[1]}}}
|
||||||
|
return interface_ip_dictionary
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _search_line_in_lines(search, lines):
|
def _search_line_in_lines(search, lines):
|
||||||
for l in lines:
|
for l in lines:
|
||||||
if search in l:
|
if search in l:
|
||||||
return 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'] = str(key)
|
||||||
|
policy_item['enabled'] = enabled
|
||||||
|
policy_item['schedule'] = str(policy[key]['schedule'])
|
||||||
|
policy_item['log'] = str(logtraffic)
|
||||||
|
policy_item['l3_src'] = str(policy[key]['srcaddr'])
|
||||||
|
policy_item['l3_dst'] = str(policy[key]['dstaddr'])
|
||||||
|
policy_item['service'] = str(policy[key]['service'])
|
||||||
|
policy_item['src_zone'] = str(policy[key]['srcintf'])
|
||||||
|
policy_item['dst_zone'] = str(policy[key]['dstintf'])
|
||||||
|
policy_item['action'] = str(action)
|
||||||
|
default_policy[key].append(policy_item)
|
||||||
|
|
||||||
|
position = position + 1
|
||||||
|
return default_policy
|
||||||
|
|
||||||
def get_bgp_neighbors(self):
|
def get_bgp_neighbors(self):
|
||||||
|
|
||||||
families = ['ipv4', 'ipv6']
|
families = ['ipv4', 'ipv6']
|
||||||
@@ -255,14 +342,14 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
command_received = 'get router info bgp neighbors {} received-routes | grep prefixes '
|
command_received = 'get router info bgp neighbors {} received-routes | grep prefixes '
|
||||||
peers = dict()
|
peers = dict()
|
||||||
|
|
||||||
bgp_sum = self.execute_command_with_vdom(command_sum)
|
bgp_sum = self._execute_command_with_vdom(command_sum)
|
||||||
|
|
||||||
re_neigh = re.compile("^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")
|
re_neigh = re.compile("^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")
|
||||||
neighbors = {n.split()[0]: n.split()[1:] for n in bgp_sum if re.match(re_neigh, n)}
|
neighbors = {n.split()[0]: n.split()[1:] for n in bgp_sum if re.match(re_neigh, n)}
|
||||||
|
|
||||||
self.device.load_config('router bgp')
|
self.device.load_config('router bgp')
|
||||||
|
|
||||||
for neighbor, parameters in neighbors.iteritems():
|
for neighbor, parameters in neighbors.items():
|
||||||
logger.debug('NEW PEER')
|
logger.debug('NEW PEER')
|
||||||
neigh_conf = self.device.running_config['router bgp']['neighbor']['{}'.format(neighbor)]
|
neigh_conf = self.device.running_config['router bgp']['neighbor']['{}'.format(neighbor)]
|
||||||
|
|
||||||
@@ -279,10 +366,11 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
neighbor_dict['address_family']['ipv4'] = dict()
|
neighbor_dict['address_family']['ipv4'] = dict()
|
||||||
neighbor_dict['address_family']['ipv6'] = 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))
|
m = re.search('remote router id (.+?)\n', '\n'.join(detail_output))
|
||||||
if m:
|
if m:
|
||||||
neighbor_dict['remote_id'] = unicode(m.group(1))
|
neighbor_dict['remote_id'] = str(m.group(1))
|
||||||
else:
|
else:
|
||||||
raise Exception('cannot find remote router id for %s' % neighbor)
|
raise Exception('cannot find remote router id for %s' % neighbor)
|
||||||
|
|
||||||
@@ -291,12 +379,12 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
x = detail_output.index(' for address family: {} unicast'.format(family))
|
x = detail_output.index(' for address family: {} unicast'.format(family))
|
||||||
block = detail_output[x:]
|
block = detail_output[x:]
|
||||||
|
|
||||||
for term, fortiname in terms.iteritems():
|
for term, fortiname in terms.items():
|
||||||
text = self._search_line_in_lines('%s prefixes' % fortiname, block)
|
text = self._search_line_in_lines('%s prefixes' % fortiname, block)
|
||||||
t = [int(s) for s in text.split() if s.isdigit()][0]
|
t = [int(s) for s in text.split() if s.isdigit()][0]
|
||||||
neighbor_dict['address_family'][family][term] = t
|
neighbor_dict['address_family'][family][term] = t
|
||||||
|
|
||||||
received = self.execute_command_with_vdom(
|
received = self._execute_command_with_vdom(
|
||||||
command_received.format(neighbor))[0].split()
|
command_received.format(neighbor))[0].split()
|
||||||
if len(received) > 0:
|
if len(received) > 0:
|
||||||
neighbor_dict['address_family'][family]['received_prefixes'] = received[-1]
|
neighbor_dict['address_family'][family]['received_prefixes'] = received[-1]
|
||||||
@@ -307,13 +395,13 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
'global': {
|
'global': {
|
||||||
'router_id': unicode(bgp_sum[0].split()[3]),
|
'router_id': str(bgp_sum[0].split()[3]),
|
||||||
'peers': peers
|
'peers': peers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_interfaces_counters(self):
|
def get_interfaces_counters(self):
|
||||||
cmd = self.execute_command_with_vdom('fnsysctl ifconfig', vdom=None)
|
cmd = self._execute_command_with_vdom('fnsysctl ifconfig', vdom=None)
|
||||||
if_name = None
|
if_name = None
|
||||||
interface_counters = dict()
|
interface_counters = dict()
|
||||||
for line in cmd:
|
for line in cmd:
|
||||||
@@ -326,7 +414,8 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
elif (data[1].startswith('RX packets') or data[1].startswith('TX packets')) and if_name:
|
elif (data[1].startswith('RX packets') or data[1].startswith('TX packets')) and if_name:
|
||||||
if_data = data[1].split(' ')
|
if_data = data[1].split(' ')
|
||||||
direction = if_data[0].lower()
|
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 + '_errors'] = int(if_data[2].split(':')[1])
|
||||||
interface_counters[if_name][direction + '_discards'] = 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
|
interface_counters[if_name][direction + '_multicast_packets'] = -1
|
||||||
@@ -340,34 +429,8 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
interface_counters[if_name]['tx_octets'] = int(if_data[7].split(':')[1])
|
interface_counters[if_name]['tx_octets'] = int(if_data[7].split(':')[1])
|
||||||
return interface_counters
|
return interface_counters
|
||||||
|
|
||||||
def get_lldp_neighbors(self):
|
|
||||||
return {}
|
|
||||||
|
|
||||||
def get_environment(self):
|
def get_environment(self):
|
||||||
|
|
||||||
def parse_string(line):
|
|
||||||
return re.sub(' +', ' ', line.lower())
|
|
||||||
|
|
||||||
def search_disabled(line):
|
|
||||||
m = re.search("(.+?) (.+?) alarm=(.+?) \(scanning disabled\)", line)
|
|
||||||
return m.group(2)
|
|
||||||
|
|
||||||
def search_normal(line):
|
|
||||||
m = re.search("(.+?) (.+?) alarm=(.+?) value=(.+?) threshold_status=(.+?)", line)
|
|
||||||
return m
|
|
||||||
|
|
||||||
def get_fans(fan_lines):
|
|
||||||
output = dict()
|
|
||||||
for fan_line in fan_lines:
|
|
||||||
if 'disabled' in fan_line:
|
|
||||||
name = search_disabled(fan_line)
|
|
||||||
output[name] = dict(status=False)
|
|
||||||
continue
|
|
||||||
|
|
||||||
m = search_normal(fan_line)
|
|
||||||
output[m.group(2)] = dict(status=True)
|
|
||||||
return output
|
|
||||||
|
|
||||||
def get_cpu(cpu_lines):
|
def get_cpu(cpu_lines):
|
||||||
output = dict()
|
output = dict()
|
||||||
for l in cpu_lines:
|
for l in cpu_lines:
|
||||||
@@ -380,56 +443,80 @@ class FortiOSDriver(NetworkDriver):
|
|||||||
return output
|
return output
|
||||||
|
|
||||||
def get_memory(memory_line):
|
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)
|
return dict(available_ram=total, used_ram=used)
|
||||||
|
|
||||||
def get_temperature(temperature_lines, detail_block):
|
|
||||||
output = dict()
|
|
||||||
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}
|
|
||||||
continue
|
|
||||||
|
|
||||||
m = search_normal(temp_line)
|
|
||||||
sensor_name, temp_value, status = m.group(2), m.group(4), int(m.group(5))
|
|
||||||
is_alert = True if status == 1 else False
|
|
||||||
|
|
||||||
# find block
|
|
||||||
fullline = self._search_line_in_lines(sensor_name, detail_block)
|
|
||||||
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])
|
|
||||||
|
|
||||||
output[sensor_name] = dict(temperature=float(temp_value), is_alert=is_alert,
|
|
||||||
is_critical=True if v > temp_value else False)
|
|
||||||
|
|
||||||
return output
|
|
||||||
|
|
||||||
out = dict()
|
out = dict()
|
||||||
|
|
||||||
sensors_block = [parse_string(x) for x in self.execute_command_with_vdom('execute sensor detail', vdom='global') if x]
|
#execute sensor detail is not available
|
||||||
|
sensors_block = self._execute_command_with_vdom('execute sensor list', vdom='global')
|
||||||
|
|
||||||
# temp
|
temperatures=dict()
|
||||||
temp_lines = [x for x in sensors_block if any([True for y in ['dts', 'temp', 'adt7490'] if y in x])]
|
fans=dict()
|
||||||
out['temperature'] = get_temperature(temp_lines, sensors_block)
|
powers = dict()
|
||||||
|
|
||||||
# fans
|
for line in sensors_block:
|
||||||
out['fans'] = get_fans([x for x in sensors_block if 'fan' in x and 'temp' not in x])
|
m = re.search("([0-9]+?) (.+\s[0-9]+?) (.+?) value=([0-9\.]+)", line)
|
||||||
|
if m:
|
||||||
|
if "TMP" in m.group(2).strip():
|
||||||
|
sensor_name, temp_value=m.group(3).strip(), m.group(4)
|
||||||
|
temp_value=float(temp_value)
|
||||||
|
temperatures[sensor_name] = dict(temperature=temp_value, is_alert=False, is_critical=False)
|
||||||
|
elif "FAN" in m.group(2):
|
||||||
|
fans[m.group(2)+" - "+m.group(3).strip()] = dict(status=True)
|
||||||
|
else:
|
||||||
|
m = re.search("([0-9]+?)\s(.+?)\s+alarm=([0-9]+)\s+value=([0-9\.]+)\s+threshold_status=([0-9]+)", line)
|
||||||
|
if m:
|
||||||
|
if "TMP" in m.group(2) or "Temp" in m.group(2):
|
||||||
|
sensor_name, temp_value=m.group(2).strip(), m.group(4)
|
||||||
|
temp_value=float(temp_value)
|
||||||
|
temperatures[sensor_name] = dict(temperature=temp_value, is_alert=int(m.group(5)), is_critical=int(m.group(3)))
|
||||||
|
elif "FAN" in m.group(2).upper():
|
||||||
|
fans[m.group(2).strip()] = dict(status=(not bool(int(m.group(3)))))
|
||||||
|
elif m.group(2)[0]=="+":
|
||||||
|
powers[ m.group(2).strip()] = dict(status=(not bool(int(m.group(3)))), capacity=-1.0, output=-1.0)
|
||||||
|
|
||||||
|
out['fans'] = fans
|
||||||
|
out['temperature'] = temperatures
|
||||||
|
out['power'] = powers
|
||||||
|
|
||||||
# cpu
|
# cpu
|
||||||
out['cpu'] = get_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
|
||||||
memory_command = 'diag hard sys mem | grep Mem:'
|
memory_block = self._execute_command_with_vdom('diag hard sys mem | grep Mem', vdom='global')
|
||||||
t = [x for x in re.split('\s+', self.execute_command_with_vdom(memory_command, vdom='global')[0]) if x]
|
out['memory'] = dict(available_ram=-1, used_ram=-1)
|
||||||
out['memory'] = get_memory(t)
|
for line in memory_block:
|
||||||
|
if line.strip().startswith("MemTotal:"):
|
||||||
# power, not implemented
|
out['memory']["available_ram"]=(int(line.split()[1])>>10)
|
||||||
sensors = [x.split()[1] for x in sensors_block if x.split()[0].isdigit()]
|
if line.strip().startswith("MemFree:"):
|
||||||
psus = {x for x in sensors if x.startswith('ps')}
|
out['memory']["used_ram"]=(int(line.split()[1])>>10)
|
||||||
out['power'] = {t: {'status': True, 'capacity': -1.0, 'output': -1.0} for t in psus}
|
if line.strip().startswith("Mem:"):
|
||||||
|
out['memory']=get_memory(line.split())
|
||||||
|
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
def get_arp_table(self):
|
||||||
|
|
||||||
|
arp_table = []
|
||||||
|
command = "get sys arp"
|
||||||
|
output = self._execute_command_with_vdom(command)
|
||||||
|
|
||||||
|
# Skip the first line which is a header
|
||||||
|
output = output[1:]
|
||||||
|
|
||||||
|
for line in output:
|
||||||
|
if len(line) > 0:
|
||||||
|
address, age, mac, interface = line.split()
|
||||||
|
entry = {
|
||||||
|
"interface": interface,
|
||||||
|
"mac": napalm.base.helpers.mac(mac).rstrip(),
|
||||||
|
"ip": address,
|
||||||
|
"age": age.replace("-", "-1"),
|
||||||
|
}
|
||||||
|
arp_table.append(entry)
|
||||||
|
return arp_table
|
||||||
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
coveralls
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
pytest-json
|
pytest-json
|
||||||
|
|||||||
+4
-2
@@ -1,2 +1,4 @@
|
|||||||
napalm-base>=0.18.0
|
napalm
|
||||||
pyFG
|
pyFG>=0.49_1
|
||||||
|
future
|
||||||
|
ncclient==0.6.9
|
||||||
@@ -1,6 +1,15 @@
|
|||||||
[pylama]
|
[pylama]
|
||||||
linters = mccabe,pep8,pyflakes
|
linters = mccabe,pep8,pyflakes
|
||||||
ignore = D203,C901
|
ignore = D203,C901
|
||||||
|
skip = build/*,.tox/*
|
||||||
|
|
||||||
[pylama:pep8]
|
[pylama:pep8]
|
||||||
max_line_length = 100
|
max_line_length = 100
|
||||||
|
|
||||||
|
[pytest]
|
||||||
|
addopts = --cov=napalm_fortios --cov-report term-missing -vs --pylama
|
||||||
|
json_report = report.json
|
||||||
|
jsonapi = true
|
||||||
|
|
||||||
|
[coverage:run]
|
||||||
|
source = napalm_fortios
|
||||||
@@ -3,16 +3,21 @@
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
from pip.req import parse_requirements
|
try:
|
||||||
|
from pip._internal.req import parse_requirements
|
||||||
|
except ImportError:
|
||||||
|
from pip.req import parse_requirements
|
||||||
__author__ = 'David Barroso <dbarrosop@dravetech.com>'
|
__author__ = 'David Barroso <dbarrosop@dravetech.com>'
|
||||||
|
|
||||||
install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
|
install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
|
||||||
reqs = [str(ir.req) for ir in install_reqs]
|
try:
|
||||||
|
reqs = [str(ir.req) for ir in install_reqs]
|
||||||
|
except:
|
||||||
|
reqs = [str(ir.requirement) for ir in install_reqs]
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="napalm-fortios",
|
name="napalm-fortios",
|
||||||
version="0.2.1",
|
version="0.4.1",
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
author="David Barroso",
|
author="David Barroso",
|
||||||
author_email="dbarrosop@dravetech.com",
|
author_email="dbarrosop@dravetech.com",
|
||||||
|
|||||||
@@ -15,8 +15,7 @@
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from napalm_fortios.fortios import FortiOSDriver
|
from napalm_fortios.fortios import FortiOSDriver
|
||||||
from napalm_base.test.base import TestConfigNetworkDriver, TestGettersNetworkDriver
|
from napalm_base.test.base import TestConfigNetworkDriver
|
||||||
from pyFG.fortios import FortiConfig
|
|
||||||
|
|
||||||
|
|
||||||
class TestConfigFortiOSDriver(unittest.TestCase, 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 = FortiOSDriver(hostname, username, password, timeout=60)
|
||||||
cls.device.open()
|
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(' ', '_'))))
|
|
||||||
@@ -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,255 +0,0 @@
|
|||||||
1 P1V8_SFR_V alarm=0 value=1.8135 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=1.9801
|
|
||||||
upper_critical=1.9507
|
|
||||||
upper_non_critical=1.8919
|
|
||||||
lower_non_critical=1.7155
|
|
||||||
lower_critical=1.6567
|
|
||||||
lower_non_recoverable=1.6273
|
|
||||||
2 AD_1.2VA alarm=0 value=1.2059 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=1.3235
|
|
||||||
upper_critical=1.3039
|
|
||||||
upper_non_critical=1.2647
|
|
||||||
lower_non_critical=1.1373
|
|
||||||
lower_critical=1.1079
|
|
||||||
lower_non_recoverable=1.0883
|
|
||||||
3 AD_+12V alarm=0 value=12.1065 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=13.7585
|
|
||||||
upper_critical=13.1685
|
|
||||||
upper_non_critical=12.6375
|
|
||||||
lower_non_critical=11.3985
|
|
||||||
lower_critical=10.8085
|
|
||||||
lower_non_recoverable=10.2185
|
|
||||||
4 AD_1V_10G alarm=0 value=1.0099 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=1.1079
|
|
||||||
upper_critical=1.0883
|
|
||||||
upper_non_critical=1.0589
|
|
||||||
lower_non_critical=0.9511
|
|
||||||
lower_critical=0.9217
|
|
||||||
lower_non_recoverable=0.9021
|
|
||||||
5 AD_1.5VA alarm=0 value=1.4999 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=1.6567
|
|
||||||
upper_critical=1.6273
|
|
||||||
upper_non_critical=1.5783
|
|
||||||
lower_non_critical=1.4313
|
|
||||||
lower_critical=1.3823
|
|
||||||
lower_non_recoverable=1.3529
|
|
||||||
6 AD_1P05_PCH alarm=0 value=1.0491 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=1.1569
|
|
||||||
upper_critical=1.1373
|
|
||||||
upper_non_critical=1.1079
|
|
||||||
lower_non_critical=0.9903
|
|
||||||
lower_critical=0.9707
|
|
||||||
lower_non_recoverable=0.9511
|
|
||||||
7 AD_1.2VSW alarm=0 value=1.2157 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=1.3235
|
|
||||||
upper_critical=1.3039
|
|
||||||
upper_non_critical=1.2843
|
|
||||||
lower_non_critical=1.1373
|
|
||||||
lower_critical=1.1079
|
|
||||||
lower_non_recoverable=1.0883
|
|
||||||
8 VCCP alarm=0 value=1.0788 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=1.5117
|
|
||||||
upper_critical=1.4649
|
|
||||||
upper_non_critical=1.4064
|
|
||||||
lower_non_critical=0.6459
|
|
||||||
lower_critical=0.6225
|
|
||||||
lower_non_recoverable=0.5991
|
|
||||||
9 P1V1_VTT alarm=0 value=1.1118 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=1.2086
|
|
||||||
upper_critical=1.1822
|
|
||||||
upper_non_critical=1.1558
|
|
||||||
lower_non_critical=1.0502
|
|
||||||
lower_critical=1.015
|
|
||||||
lower_non_recoverable=0.9886
|
|
||||||
10 +12V alarm=0 value=12.089762 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=13.825762
|
|
||||||
upper_critical=13.205762
|
|
||||||
upper_non_critical=12.647762
|
|
||||||
lower_non_critical=11.469762
|
|
||||||
lower_critical=10.911762
|
|
||||||
lower_non_recoverable=10.291762
|
|
||||||
11 +5V alarm=0 value=5.05405 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=5.52565
|
|
||||||
upper_critical=5.44705
|
|
||||||
upper_non_critical=5.42085
|
|
||||||
lower_non_critical=4.79205
|
|
||||||
lower_critical=4.63485
|
|
||||||
lower_non_recoverable=4.53005
|
|
||||||
12 P3V3_STBY alarm=0 value=3.33765 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=3.63005
|
|
||||||
upper_critical=3.56125
|
|
||||||
upper_non_critical=3.47525
|
|
||||||
lower_non_critical=3.13125
|
|
||||||
lower_critical=3.02805
|
|
||||||
lower_non_recoverable=2.95925
|
|
||||||
13 DTS CPU alarm=0 value=54 threshold_status=0
|
|
||||||
type=1/1
|
|
||||||
upper_non_recoverable=85
|
|
||||||
upper_critical=80
|
|
||||||
upper_non_critical=75
|
|
||||||
14 ADT7490 Local alarm=0 value=48 threshold_status=0
|
|
||||||
type=1/1
|
|
||||||
upper_non_recoverable=80
|
|
||||||
upper_critical=75
|
|
||||||
upper_non_critical=70
|
|
||||||
15 ADT7490 Rem1 alarm=0 value=58 threshold_status=0
|
|
||||||
type=1/1
|
|
||||||
upper_non_recoverable=85
|
|
||||||
upper_critical=80
|
|
||||||
upper_non_critical=75
|
|
||||||
16 ADT7490 Rem2 alarm=0 value=56 threshold_status=0
|
|
||||||
type=1/1
|
|
||||||
upper_non_recoverable=82
|
|
||||||
upper_critical=77
|
|
||||||
upper_non_critical=72
|
|
||||||
17 LM75 alarm=0 value=47 threshold_status=0
|
|
||||||
type=1/1
|
|
||||||
upper_non_recoverable=83
|
|
||||||
upper_critical=78
|
|
||||||
upper_non_critical=73
|
|
||||||
18 Fan 1 alarm=0 value=6700 threshold_status=0
|
|
||||||
type=4/1
|
|
||||||
upper_non_recoverable=25000
|
|
||||||
upper_critical=24000
|
|
||||||
upper_non_critical=22000
|
|
||||||
lower_non_critical=4000
|
|
||||||
lower_critical=3000
|
|
||||||
lower_non_recoverable=2000
|
|
||||||
19 Fan 2 alarm=0 value=6700 threshold_status=0
|
|
||||||
type=4/1
|
|
||||||
upper_non_recoverable=25000
|
|
||||||
upper_critical=24000
|
|
||||||
upper_non_critical=22000
|
|
||||||
lower_non_critical=4000
|
|
||||||
lower_critical=3000
|
|
||||||
lower_non_recoverable=2000
|
|
||||||
20 Fan 3 alarm=0 value=6900 threshold_status=0
|
|
||||||
type=4/1
|
|
||||||
upper_non_recoverable=25000
|
|
||||||
upper_critical=24000
|
|
||||||
upper_non_critical=22000
|
|
||||||
lower_non_critical=4000
|
|
||||||
lower_critical=3000
|
|
||||||
lower_non_recoverable=2000
|
|
||||||
21 Fan 4 alarm=0 value=6900 threshold_status=0
|
|
||||||
type=4/1
|
|
||||||
upper_non_recoverable=25000
|
|
||||||
upper_critical=24000
|
|
||||||
upper_non_critical=22000
|
|
||||||
lower_non_critical=4000
|
|
||||||
lower_critical=3000
|
|
||||||
lower_non_recoverable=2000
|
|
||||||
22 Fan 5 alarm=0 value=6200 threshold_status=0
|
|
||||||
type=4/1
|
|
||||||
upper_non_recoverable=25000
|
|
||||||
upper_critical=24000
|
|
||||||
upper_non_critical=22000
|
|
||||||
lower_non_critical=4000
|
|
||||||
lower_critical=3000
|
|
||||||
lower_non_recoverable=2000
|
|
||||||
23 PS1 Temp alarm=0 value=41 threshold_status=0
|
|
||||||
type=1/1
|
|
||||||
upper_non_recoverable=78
|
|
||||||
upper_critical=73
|
|
||||||
upper_non_critical=68
|
|
||||||
24 PS1 Fan 1 alarm=0 value=6784 threshold_status=0
|
|
||||||
type=4/1
|
|
||||||
upper_non_recoverable=32000
|
|
||||||
upper_critical=29056
|
|
||||||
upper_non_critical=26112
|
|
||||||
lower_non_critical=1024
|
|
||||||
lower_critical=768
|
|
||||||
lower_non_recoverable=512
|
|
||||||
25 PS1 VIN alarm=0 value=230 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=255
|
|
||||||
upper_critical=254
|
|
||||||
upper_non_critical=250
|
|
||||||
lower_non_critical=38
|
|
||||||
lower_critical=36
|
|
||||||
lower_non_recoverable=34
|
|
||||||
26 PS1 VOUT alarm=0 value=12.032 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=13.229
|
|
||||||
upper_critical=12.977
|
|
||||||
upper_non_critical=12.662
|
|
||||||
lower_non_critical=11.528
|
|
||||||
lower_critical=11.15
|
|
||||||
lower_non_recoverable=10.898
|
|
||||||
27 PS1 Status alarm=0
|
|
||||||
type=8/111
|
|
||||||
upper_non_recoverable=0
|
|
||||||
upper_critical=0
|
|
||||||
upper_non_critical=0
|
|
||||||
28 PS2 Temp alarm=0 (scanning disabled)
|
|
||||||
type=1/1
|
|
||||||
upper_non_recoverable=78
|
|
||||||
upper_critical=73
|
|
||||||
upper_non_critical=68
|
|
||||||
29 PS2 Fan 1 alarm=0 (scanning disabled)
|
|
||||||
type=4/1
|
|
||||||
upper_non_recoverable=32000
|
|
||||||
upper_critical=29056
|
|
||||||
upper_non_critical=26112
|
|
||||||
lower_non_critical=1024
|
|
||||||
lower_critical=768
|
|
||||||
lower_non_recoverable=512
|
|
||||||
30 PS2 VIN alarm=0 (scanning disabled)
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=255
|
|
||||||
upper_critical=254
|
|
||||||
upper_non_critical=250
|
|
||||||
lower_non_critical=38
|
|
||||||
lower_critical=36
|
|
||||||
lower_non_recoverable=34
|
|
||||||
31 PS2 VOUT alarm=0 (scanning disabled)
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=13.229
|
|
||||||
upper_critical=12.977
|
|
||||||
upper_non_critical=12.662
|
|
||||||
lower_non_critical=11.528
|
|
||||||
lower_critical=11.15
|
|
||||||
lower_non_recoverable=10.898
|
|
||||||
32 PS2 Status alarm=0 (not detected)
|
|
||||||
type=8/111
|
|
||||||
upper_non_recoverable=0
|
|
||||||
upper_critical=0
|
|
||||||
upper_non_critical=0
|
|
||||||
33 INA219 PS1 Vsht alarm=0 value=0.00832 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=0.03232
|
|
||||||
upper_critical=0.03104
|
|
||||||
upper_non_critical=0.03008
|
|
||||||
34 INA219 PS1 Vbus alarm=0 value=12.032 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=13.312
|
|
||||||
upper_critical=13.056
|
|
||||||
upper_non_critical=12.672
|
|
||||||
lower_non_critical=11.392
|
|
||||||
lower_critical=11.136
|
|
||||||
lower_non_recoverable=10.88
|
|
||||||
35 INA219 PS2 Vsht alarm=0 value=0.00032 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=0.03232
|
|
||||||
upper_critical=0.03104
|
|
||||||
upper_non_critical=0.03008
|
|
||||||
36 INA219 PS2 Vbus alarm=0 value=12.032 threshold_status=0
|
|
||||||
type=2/1
|
|
||||||
upper_non_recoverable=13.312
|
|
||||||
upper_critical=13.056
|
|
||||||
upper_non_critical=12.672
|
|
||||||
lower_non_critical=11.392
|
|
||||||
lower_critical=11.136
|
|
||||||
lower_non_recoverable=10.88
|
|
||||||
@@ -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,38 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"interface": "vlan99",
|
||||||
|
"ip": "192.168.199.43",
|
||||||
|
"mac": "EC:F4:BB:D6:4B:C8",
|
||||||
|
"age": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"interface": "vlan99",
|
||||||
|
"ip": "192.168.199.90",
|
||||||
|
"mac": "00:50:56:88:95:25",
|
||||||
|
"age": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"interface": "vlan99",
|
||||||
|
"ip": "192.168.199.75",
|
||||||
|
"mac": "00:0C:29:F0:B6:54",
|
||||||
|
"age": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"interface": "vlan99",
|
||||||
|
"ip": "192.168.199.44",
|
||||||
|
"mac": "00:10:18:E6:8F:A7",
|
||||||
|
"age": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"interface": "port4",
|
||||||
|
"ip": "169.254.0.1",
|
||||||
|
"mac": "00:50:56:88:B9:98",
|
||||||
|
"age": -1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"interface": "vlan99",
|
||||||
|
"ip": "192.168.199.60",
|
||||||
|
"mac": "00:50:CC:7E:26:40",
|
||||||
|
"age": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
Address Age(min) Hardware Addr Interface
|
||||||
|
192.168.199.43 0 ec:f4:bb:d6:4b:c8 vlan99
|
||||||
|
192.168.199.90 0 00:50:56:88:95:25 vlan99
|
||||||
|
192.168.199.75 0 00:0c:29:f0:b6:54 vlan99
|
||||||
|
192.168.199.44 0 00:10:18:e6:8f:a7 vlan99
|
||||||
|
169.254.0.1 - 00:50:56:88:b9:98 port4
|
||||||
|
192.168.199.60 0 00:50:cc:7e:26:40 vlan99
|
||||||
|
|
||||||
@@ -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}}}}}}
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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
|
||||||
File renamed without changes.
@@ -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
|
||||||
File renamed without changes.
@@ -0,0 +1,30 @@
|
|||||||
|
1 +3.3V alarm=0 value=3.2856 threshold_status=0
|
||||||
|
2 +5V alarm=0 value=5.0235 threshold_status=0
|
||||||
|
3 +12V alarm=0 value=12.136 threshold_status=0
|
||||||
|
4 CPU VCCP alarm=0 value=0.9609 threshold_status=0
|
||||||
|
5 CPU VTT alarm=0 value=1.0589 threshold_status=0
|
||||||
|
6 CPU PVSA alarm=0 value=0.9315 threshold_status=0
|
||||||
|
7 P1V8 alarm=0 value=1.7841 threshold_status=0
|
||||||
|
8 P1V5 alarm=0 value=1.4999 threshold_status=0
|
||||||
|
9 PCH +1.05V alarm=0 value=1.04 threshold_status=0
|
||||||
|
10 VCC 2V5 alarm=0 value=2.432 threshold_status=0
|
||||||
|
11 MAIN 12V alarm=0 value=11.904 threshold_status=0
|
||||||
|
12 VCC 1V15 alarm=0 value=1.136 threshold_status=0
|
||||||
|
13 DDR3 VTT alarm=0 value=0.736 threshold_status=0
|
||||||
|
14 RPS 12V alarm=1 value=0 threshold_status=0x7
|
||||||
|
15 NCT +3.3V alarm=0 value=3.216 threshold_status=0
|
||||||
|
16 NCT VBAT alarm=0 value=3.264 threshold_status=0
|
||||||
|
17 NCT +3.3VSB alarm=0 value=3.216 threshold_status=0
|
||||||
|
18 NCT VTT alarm=0 value=1.04 threshold_status=0
|
||||||
|
19 DTS CPU alarm=0 value=50 threshold_status=0
|
||||||
|
20 CPU Core 0 alarm=0 value=49 threshold_status=0
|
||||||
|
21 CPU Core 1 alarm=0 value=50 threshold_status=0
|
||||||
|
22 TD1 alarm=0 value=37 threshold_status=0
|
||||||
|
23 TD2 alarm=0 value=25 threshold_status=0
|
||||||
|
24 FAN_TMP_3 alarm=0 value=35 threshold_status=0
|
||||||
|
25 LM75 U72 alarm=0 value=28 threshold_status=0
|
||||||
|
26 LM75 U65 alarm=0 value=31 threshold_status=0
|
||||||
|
27 LM75 U62 alarm=0 value=32 threshold_status=0
|
||||||
|
28 FAN1 alarm=0 value=4900 threshold_status=0
|
||||||
|
29 FAN2 alarm=0 value=5000 threshold_status=0
|
||||||
|
30 FAN3 alarm=0 value=4700 threshold_status=0
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{'fans': {'FAN1': {'status': true}, 'FAN2': {'status': true}, 'FAN3': {'status': true}}, 'temperature': {'FAN_TMP_3': {'temperature': 35.0, 'is_alert': 0, 'is_critical': 0}}, 'power': {'+3.3V': {'status': true, 'capacity': -1.0, 'output': -1.0}, '+5V': {'status': true, 'capacity': -1.0, 'output': -1.0}, '+12V': {'status': true, 'capacity': -1.0, 'output': -1.0}}, 'cpu': {'CPU0': {'%usage': 5.0}, 'CPU1': {'%usage': 2.0}, 'CPU2': {'%usage': 11.0}, 'CPU3': {'%usage': 2.0}}, 'memory': {'available_ram': 3039, 'used_ram': 1661}}
|
||||||
File renamed without changes.
@@ -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"]}
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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"}] }
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
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
|
||||||
|
end
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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
|
||||||
File renamed without changes.
@@ -0,0 +1 @@
|
|||||||
|
{'mgmt': {'ipv4': {'192.168.1.99': {'prefix_length': 24}}}, 'port1': {'ipv4': {'10.0.96.152': {'prefix_length': 19}}, 'ipv6': {'fd00:d051::10:0:96:152': {'prefix_length': '64'}}}}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
== [onboard]
|
||||||
|
==[mgmt]
|
||||||
|
mode: static
|
||||||
|
ip: 192.168.1.99 255.255.255.0
|
||||||
|
ipv6: ::/0
|
||||||
|
status: down
|
||||||
|
speed: n/a
|
||||||
|
==[port1]
|
||||||
|
mode: static
|
||||||
|
ip: 10.0.96.152 255.255.224.0
|
||||||
|
ipv6: fd00:d051::10:0:96:152/64
|
||||||
|
status: up
|
||||||
|
speed: 1000Mbps (Duplex: full)
|
||||||
|
==[port2]
|
||||||
|
mode: static
|
||||||
|
ip: 0.0.0.0 0.0.0.0
|
||||||
|
ipv6: ::/0
|
||||||
|
status: up
|
||||||
|
speed: 1000Mbps (Duplex: full)
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"is_alive": true}
|
||||||
@@ -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."""
|
||||||
Reference in new issue
Block a user