Closed kpetremann closed 5 years ago
get_bgp_config is getting the configuration from the candidate configuration (not committed) instead of the real configuration on JunOS.
(Paste verbatim output from pip freeze | grep napalm between quotes below)
pip freeze | grep napalm
napalm==2.4.0
(Paste verbatim output from show version - or equivalent - between quotes below)
show version
Model: qfx5100-48s-6q Junos: 17.4R1-S3.3 JUNOS Base OS boot [17.4R1-S3.3] JUNOS Base OS Software Suite [17.4R1-S3.3] JUNOS Crypto Software Suite [17.4R1-S3.3] JUNOS Online Documentation [17.4R1-S3.3] JUNOS Crypto Software Suite [17.4R1-S3.3] JUNOS Kernel Software Suite [17.4R1-S3.3] JUNOS Packet Forwarding Engine Support (qfx-ex-x86-32) [17.4R1-S3.3] JUNOS Routing Software Suite [17.4R1-S3.3] JUNOS jsd [i386-17.4R1-S3.3-jet-1] JUNOS SDN Software Suite [17.4R1-S3.3] JUNOS Enterprise Software Suite [17.4R1-S3.3] JUNOS py-base-i386 [17.4R1-S3.3] JUNOS py-extensions-i386 [17.4R1-S3.3] JUNOS Host Software [17.4R1-S3.3] Junos for Automation Enhancement
Script:
import napalm driver = napalm.get_network_driver('junos') device1 = driver(hostname="", username="", password="") device1.open() device1.get_bgp_config()
Execution:
> empty
Script output is ok:
$ python test.py {}
We load configuration in the Juniper device without committing it:
# load patch terminal [Type ^D at a new line to end input] [edit protocols] + bgp { + group TOTO { + neighbor 169.254.254.169; + } + } ctrl+D
[edit protocols]
empty
$ python test.py {'TOTO': {'type': '', 'apply_groups': [], 'remove_private_as': False, 'multipath': False, 'multihop_ttl': 0, 'description': '', 'local_address': '', 'local_as': 0, 'remote_as': 0, 'import_policy': '', 'export_policy': '', 'prefix_limit': {}, 'neighbors': {'169.254.254.169': {'authentication_key': '', 'route_reflector_client': False, 'nhs': False, 'description': '', 'local_address': '', 'local_as': 0, 'remote_as': 0, 'import_policy': '', 'export_policy': '', 'prefix_limit': {}}}}}
Solved via https://github.com/napalm-automation/napalm/pull/1035.
Description of Issue/Question
get_bgp_config is getting the configuration from the candidate configuration (not committed) instead of the real configuration on JunOS.
Did you follow the steps from https://github.com/napalm-automation/napalm#faq
Setup
napalm version
(Paste verbatim output from
pip freeze | grep napalm
between quotes below)Network operating system version
(Paste verbatim output from
show version
- or equivalent - between quotes below)Steps to Reproduce the Issue
Script:
Execution:
Script output is ok:
We load configuration in the Juniper device without committing it:
show | compare
[edit protocols]
run show configuration protocols bgp