/usr/lib/python2.7/dist-packages/jnpr/junos/facts/switch_style.py is in python-junos-eznc 2.0.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import re
def facts_switch_style(junos, facts):
persona = facts['personality']
if persona in ['MX', 'SRX_HIGHEND']:
style = 'BRIDGE_DOMAIN'
elif persona in ['SWITCH', 'SRX_BRANCH']:
model = facts['model']
if re.match('firefly', model, re.IGNORECASE):
style = 'NONE'
elif re.match('^(EX9)|(EX43)', model):
style = 'VLAN_L2NG'
else:
style = 'VLAN'
else:
style = 'NONE'
facts['switch_style'] = style
|