Skip to content

Commit

Permalink
crpd model to be checked for on-box junos
Browse files Browse the repository at this point in the history
  • Loading branch information
rahkumar651991 committed Oct 13, 2020
1 parent 4af50ba commit 7584dc2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/jnpr/junos/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,18 @@ class _Connection(object):
or platform.release().startswith("JNPR")
or os.path.isfile("/usr/share/cevo/cevo_version")
)

if ON_JUNOS is False:
if os.path.isfile("/etc/product.conf") is True:
model_dict = {}
with open("/etc/product.conf") as f:
for line in f:
(key, val) = line.rstrip().split('=')
model_dict[key] = val

if 'model' in model_dict and model_dict['model'] in ['crpd', 'cbng', 'cmgd']:
ON_JUNOS = True

auto_probe = 0 # default is no auto-probe

# ------------------------------------------------------------------------
Expand Down

0 comments on commit 7584dc2

Please sign in to comment.