Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue running netcopa with my own configs #14

Open
owensj8 opened this issue Feb 8, 2019 · 3 comments
Open

Issue running netcopa with my own configs #14

owensj8 opened this issue Feb 8, 2019 · 3 comments

Comments

@owensj8
Copy link

owensj8 commented Feb 8, 2019

I am having trouble running the parser with my own configs. The sample ones run just fine but when I add a fairly generic xe config it doesn't like it. Am I missing something simple?

'''* Loading configurations
cisco_xe-OFFICE_IDF1 [ok]
***** Copy host_vars entry to temp directory
cisco_xe-OFFICE_IDF1 [ok]
***** Retrieving OS
cisco_xe-OFFICE_IDF1 [ok]
***** Loading OS removers
cisco_xe-OFFICE_IDF1: cisco_xe [ok]
***** Loading OS parsers
cisco_xe-OFFICE_IDF1: cisco_xe [ok]
***** Run pre-parse removers
cisco_xe-OFFICE_IDF1 [ok]
***** Running parsers and comparing template output to actual
cisco_xe-OFFICE_IDF1: cisco_xe/aaa accounting [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/aaa authentication [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/aaa authorization [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/aaa groups [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/aaa [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/access-list extended [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/access-list standard [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/alias [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/banner [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/boot [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/class-map [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/clock [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/control-plane [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/enable secret [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/hostname [ok]
cisco_xe-OFFICE_IDF1: cisco_xe/interface [fail] Failed to extract jinja output from configuration.
' '
'######## EXTRACTIONS'
{'class_maps': {'non-client-nrt-class': {'match_type': 'match-any',
'name': 'non-client-nrt-class'}},
'hostname': 'OFFICE_IDF1.1',
'interfaces': {'GigabitEthernet0/0': {'ip': {'address': {'negate': True}},
'name': 'GigabitEthernet0/0',
'negotiation': {'negate': False,
'type': 'auto'},
'vrf': 'Mgmt-vrf'},
'GigabitEthernet1/0/1': {'name': 'GigabitEthernet1/0/1',
'switchport': {'access': {'vlan': 201},
'mode': ['access']}},
'GigabitEthernet1/0/10': {'name': 'GigabitEthernet1/0/10',
'switchport': {'access': {'vlan': 201},
'mode': ['access']}},
'GigabitEthernet1/0/11': {'name': 'GigabitEthernet1/0/11',
'switchport': {'access': {'vlan': 201},
'mode': ['access']}},
'GigabitEthernet1/0/12': {'name': 'GigabitEthernet1/0/12',
'switchport': {'access': {'vlan': 201},
'mode': ['access']}},
'''

@mchlrv
Copy link

mchlrv commented Mar 13, 2019

I'm having similar issues too on the interfaces and other parts.
I've tried to narrow it down to only the BGP config and it outputs the following (output limited).
The error is: [fail] Jinja result does not match actual (router bgp)
But when I try to do the interfaces the error is: [fail] Jinja result does not match actual (interfaces)

***** Loading configurations
config-bgp [ok]
***** Copy host_vars entry to temp directory
config-bgp [ok]
***** Retrieving OS
config-bgp [ok]
***** Loading OS removers
config-bgp: cisco_xe [ok]
***** Loading OS parsers
config-bgp: cisco_xe [ok]
***** Run pre-parse removers
config-bgp [ok]
***** Running parsers and comparing template output to actual
config-bgp: cisco_xe/access-list standard [ok]
config-bgp: cisco_xe/access-list extended [ok]
config-bgp: cisco_xe/interface [ok]
config-bgp: cisco_xe/hostname [ok]
config-bgp: cisco_xe/tacacs-server [ok]
config-bgp: cisco_xe/router ospf [ok]
config-bgp: cisco_xe/router bgp [fail] Jinja result does not match actual (router bgp).
'######## EXTRACTIONS'
{'router': {'bgp': {65512: {'address_families': {'ipv4': {'ip_version': 'ipv4',

@mchlrv
Copy link

mchlrv commented Mar 18, 2019

My issue seems to be related to multiple "address-family ipv4 vrf" sections in my BGP config. Not sure how to fix this yet.

[edit]
Narrowed it down to " !" after "exit-address-family". If is remove the space in front of the "!" it works.
[/edit]

@mchlrv
Copy link

mchlrv commented Mar 19, 2019

Today I found that the order of the input config matters.

For example the following works for XE

interface Port-channel1
description test
switchport trunk native vlan 2
switchport trunk allowed vlan 2,3
switchport mode trunk

However the config below doesn't

interface Port-channel1
description test
switchport trunk allowed vlan 2,3
switchport mode trunk
switchport trunk native vlan 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants