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

v0.8.0 unexpected parsing results #57

Open
iskobkarev opened this issue Sep 15, 2021 · 28 comments
Open

v0.8.0 unexpected parsing results #57

iskobkarev opened this issue Sep 15, 2021 · 28 comments

Comments

@iskobkarev
Copy link

Hello
I'm new to ttp and I find it extremely useful for managing network equipment.

I've hit a few bumps and I wonder if that is an issue or I'm missing something

I'm using http://textfsm.nornir.tech/ to develop/troubleshoot templates and the templates work flawlessly there.
When used on my ubuntu (Linux mgmtuntu 5.4.0-80-generic) I'm getting lots of issues with parsing.
root@mgmtuntu:/home/admin1/ttp/portint# python3 --version
Python 3.8.10

A simple example with HPE Compare switch output (disp int brief, truncated to include just a few interfaces ):

device output:
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
InLoop0 UP UP(s) --
REG0 UP -- --
Vlan401 UP UP 10.251.147.36 HSSBC_to_inband_mgmt_r4

Brief information on interfaces in bridge mode:
Link: ADM - administratively down; Stby - standby
Speed: (a) - auto
Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface Link Speed Duplex Type PVID Description
BAGG1 UP 20G(a) F(a) T 1 to-KDC-R4.10-Core-1
BAGG14 UP 10G(a) F(a) T 1 KDC-R429-E1 BackUp Chassis
BAGG22 UP 20G(a) F(a) T 1 HSSBC-NS-01
FGE1/0/49 DOWN auto A A 1
XGE1/0/1 UP 10G(a) F(a) T 1 KDC-R402-E1 Backup Chassis

Template:


Brief information on interfaces in route mode: {{ start }}

Interface Link Protocol Primary_IP Description {{ headers }}
{{ end}}

Brief information on interfaces in bridge mode: {{ _start_}} Interface Link Speed Duplex Type PVID Description {{ _headers_}} {{ _end_}}

Result with the nornir.tech ( works as expected)
[
{
"interfaces": {
"bridged": {
"BAGG1": {
"Description": "to-KDC-R4.10-Core-1",
"Duplex": "F(a)",
"Link": "UP",
"PVID": "1",
"Speed": "20G(a)",
"Type": "T"
},
"BAGG14": {
"Description": "KDC-R429-E1 BackUp Chassis",
"Duplex": "F(a)",
"Link": "UP",
"PVID": "1",
"Speed": "10G(a)",
"Type": "T"
},
"BAGG22": {
"Description": "HSSBC-NS-01",
"Duplex": "F(a)",
"Link": "UP",
"PVID": "1",
"Speed": "20G(a)",
"Type": "T"
},
"FGE1/0/49": {
"Description": "",
"Duplex": "A",
"Link": "DOWN",
"PVID": "1",
"Speed": "auto",
"Type": "A"
},
"XGE1/0/1": {
"Description": "KDC-R402-E1 Backup Chassis",
"Duplex": "F(a)",
"Link": "UP",
"PVID": "1",
"Speed": "10G(a)",
"Type": "T"
}
},
"routed": {
"InLoop0": {
"Description": "",
"Link": "UP",
"Primary_IP": "--",
"Protocol": "UP(s)"
},
"REG0": {
"Description": "",
"Link": "UP",
"Primary_IP": "--",
"Protocol": "--"
},
"Vlan401": {
"Description": "HSSBC_to_inband_mgmt_r4",
"Link": "UP",
"Primary_IP": "10.251.147.36",
"Protocol": "UP"
}
}
}
}
]

Cli tool / ttp 0.5-0.6-0.7-0.8 produces mixed up output

root@mgmtuntu:/home/admin1/ttp/portint# ttp --data "cmw7-disp-int-brief.txt" --template "../templates/hp_cmw7_display_interface_brief.ttp" -l ERROR -o yaml

    • interfaces:
      routed:
      BAGG1:
      Description: to-KDC-R4.10-Core-1
      Link: UP
      Primary_IP: (a) T 1
      Protocol: 20G(a) F
      BAGG14:
      Description: KDC-R429-E1 BackUp Chassis
      Link: UP
      Primary_IP: (a) T 1
      Protocol: 10G(a) F
      BAGG22:
      Description: HSSBC-NS-01
      Link: UP
      Primary_IP: (a) T 1
      Protocol: 20G(a) F
      Brief information on:
      - Description: ''
      Link: inter
      Primary_IP: 'route mode:'
      Protocol: faces in
      - Description: ''
      Link: inter
      Primary_IP: 'bridge mode:'
      Protocol: faces in
      'Duplex: (a)/A - auto;':
      Description: ''
      Link: H -
      Primary_IP: full
      Protocol: half; F -
      FGE1/0/49:
      Description: ''
      Link: DOWN
      Primary_IP: A 1
      Protocol: auto A
      InLoop0:
      Description: ''
      Link: UP
      Primary_IP: --
      Protocol: UP(s)
      'Link: ADM - administr':
      - Description: ''
      Link: ative
      Primary_IP: Stby - standby
      Protocol: ly down;
      - Description: ''
      Link: ative
      Primary_IP: Stby - standby
      Protocol: ly down;
      REG0:
      Description: ''
      Link: UP
      Primary_IP: --
      Protocol: --
      'Type: A - access; T -':
      Description: ''
      Link: trun
      Primary_IP: brid
      Protocol: k; H - hy
      Vlan401:
      Description: HSSBC_to_inband_mgmt_r4
      Link: UP
      Primary_IP: 10.251.147.36
      Protocol: UP
      XGE1/0/1:
      Description: KDC-R402-E1 Backup Chassis
      Link: UP
      Primary_IP: (a) T 1
      Protocol: 10G(a) F
@iskobkarev
Copy link
Author

some tags were removed when the template was posted. Attaching as a file.
hp_cmw7_display_interface_brief.txt

@iskobkarev
Copy link
Author

more testing done. 0.4.0 is the last one to parse this template "correctly". 0.5 and above seem to not do it

0.4 debug :

                        'REGEX': re.compile('\\nBrief\\ +information\\ +on\\ +interfaces\\ +in\\ +route\\ +mode:[\\t ]*(?=\\n)'),

0.8 debug:

                        'REGEX': re.compile('\\nBrief[ \\t]+information[ \\t]+on[ \\t]+interfaces[ \\t]+in[ \\t]+route[ \\t]+mode:[\\t ]*(?=\\n|\\r\\n)'),

@dmulyalin
Copy link
Owner

@iskobkarev thank you for raising this issue, could you share sample data in a form of text file similar to how you did with ttp template, sample data you provided above did not preserve spacing between words.

@iskobkarev
Copy link
Author

Please see attached
src_short.txt

@dmulyalin
Copy link
Owner

Introduced fix in internal logic in commit a228209, this should not scramble results that much as it was before, however, still need to think about how to handle headers indicator, as in current state it will match some undesired results which can be removed using group macro with some filtering. This is the results produced after this fix:

assert res == [[{'interfaces': {'bridged': {'BAGG1': {'Description': 'to-KDC-R4.10-Core-1',

The reason why it was working in TTP 0.4.0 is due to the diffeence in how heders indicator regex formed:

0.4.0
'REGEX': re.compile('\\n(?P<Interface>.{21})(?P<Link>.{5})(?P<Protocol>.{9})(?P<Primary_IP>.{16})(?P<Description>.{11,})(?=\\n)')
'REGEX': re.compile('\\n(?P<Interface>.{21})(?P<Link>.{5})(?P<Speed>.{8})(?P<Duplex>.{7})(?P<Type>.{5})(?P<PVID>.{5})(?P<Description>.{11,})(?=\\n)') 

0.8.0
'REGEX': re.compile('\\n(?P<Interface>.{21})(?P<Link>.{5})(?P<Protocol>.{9})(?P<Primary_IP>.{1,16})(?P<Description>.*)(?=\\n|\\r\\n)'),
'REGEX': re.compile('\\n(?P<Interface>.{21})(?P<Link>.{5})(?P<Speed>.{8})(?P<Duplex>.{7})(?P<Type>.{5})(?P<PVID>.{1,5})(?P<Description>.*)(?=\\n|\\r\\n)'),

probably will add some variable for headers, something like {{ _headers_ | strict }} to introduce same behaviour as in TTP 0.4.0.

In a meantime feel free to install TTP from master - python3 -m pip install git+https://github.com/dmulyalin/ttp - and give it a go

But try this template:

<group name = "interfaces">
<group name="routed">
Brief information on interfaces in route mode: {{ _start_ }}
<group name = "{{Interface}}">
Interface            Link Protocol Primary_IP      Description {{ _headers_ }}
</group>
{{ _end_ }}
</group>

<group name="bridged">
Brief information on interfaces in bridge mode: {{ _start_ }}
<group name = "{{Interface}}">
Interface            Link Speed   Duplex Type PVID Description {{ _headers_ }}
</group>
{{ _end_ }}
</group>
</group>

As it has different position for {{ _end_ }} as compared to your original template essentially indicating that <group name="routed"> or <group name="bridged"> ended

@iskobkarev
Copy link
Author

iskobkarev commented Sep 16, 2021 via email

@dmulyalin
Copy link
Owner

You need to do post processing filtering of matched results using group macro referring to custom python function, have a look at this comment for the idea - #15 (comment)

However, now another option available, added headers new feature - columns variable, that allows to turn on behaviour similar to TTP 0.4.0 headers implementation, commit - b6d1953, have a look at this testcase for sample usage:

def test_issue_57_headers_parsing_using_columns():

@iskobkarev
Copy link
Author

iskobkarev commented Oct 15, 2021 via email

@dmulyalin
Copy link
Owner

Glad to hear that TTP helps out.

Would this work better for you:

<group name = "local_members*">
Local: {{ _start_ }}
  {{ interface }} {{ status }} {{ priority }} {{ oper_key }} {{ flag }}
</group>

What method="table" doing it is implicitly adding {{ _start_ }} to each line in the group, not sure but looks like this is not what you need.

Also no need to add {{ ignore }} for each line you want to ignore, if line not matched by any of regexes, TTP ignores it anyway.

@iskobkarev
Copy link
Author

iskobkarev commented Oct 15, 2021 via email

@dmulyalin
Copy link
Owner

dmulyalin commented Oct 15, 2021

Try to remove ignore statements and use exclude to filter results.

<group name = "portchannel.{{channel_number}}">
Aggregate Interface: Bridge-Aggregation{{ channel_number}}

<group name = "local_members*">
Local: {{_start_}}
  <group>
  {{interface}} {{status}} {{priority}} {{oper_key}} {{flag}}
  </group>
</group>

<group name = "remote_members*">
Remote: {{ _start_ }}
 <group>
  {{ interface | exclude("Port") | exclude("--") }} {{status}} {{priority}} {{oper_key}} {{sys_id}}, {{ mac }} {{flag}}
 </group>
</group>

</group>

May as well use other filter functions to filter results - https://ttp.readthedocs.io/en/latest/Match%20Variables/Functions.html#id3

Will try to test above template as well later on.

@iskobkarev
Copy link
Author

iskobkarev commented Oct 16, 2021 via email

@iskobkarev
Copy link
Author

iskobkarev commented Oct 16, 2021 via email

@dmulyalin
Copy link
Owner

Try this template:

<group name = "portchannel.{{channel_number}}">
Aggregate Interface: Bridge-Aggregation{{ channel_number}}

<group name = "local_members*">
  {{interface}} {{status}} {{priority | DIGIT}} {{oper_key | DIGIT}} {{flag}}
</group>

<group name = "remote_members*">
  {{interface}} {{status}} {{priority | DIGIT}} {{oper_key | DIGIT}} {{sys_id}}, {{ mac | MAC }} {{flag}}
</group>

</group>

For this data:

Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected,
             I -- Individual, * -- Management port
Flags:  A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
        D -- Synchronization, E -- Collecting, F -- Distributing,
        G -- Defaulted, H -- Expired

Aggregate Interface: Bridge-Aggregation1
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLAN : None
System ID: 0x8000, d07e-28b5-a200
Local:
  Port             Status  Priority Oper-Key  Flag
--------------------------------------------------------------------------------
  GE6/0/1          U       32768    1         {ACG}
  GE6/0/2          U       32768    1         {ACG}
Remote:
  Actor            Partner Priority Oper-Key  SystemID               Flag
--------------------------------------------------------------------------------
  GE6/0/1          0       32768    0         0x8000, 0000-0000-0000 {EF}
  GE6/0/2          0       32768    0         0x8000, 0000-0000-0000 {EF}

Aggregate Interface: Bridge-Aggregation2
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLAN : None
System ID: 0x8000, d07e-28b5-a200
Local:
  Port             Status  Priority Oper-Key  Flag
--------------------------------------------------------------------------------
  GE6/0/3          U       32768    2         {ACG}
  GE6/0/4          U       32768    2         {ACG}
Remote:
  Actor            Partner Priority Oper-Key  SystemID               Flag
--------------------------------------------------------------------------------
  GE6/0/3          0       32768    0         0x8000, 0000-0000-0000 {EF}
  GE6/0/4          0       32768    0         0x8000, 0000-0000-0000 {EF}

It gives these results:

[[{'portchannel': {'1': {'local_members': [{'flag': '{ACG}',
                                            'interface': 'GE6/0/1',
                                            'oper_key': '1',
                                            'priority': '32768',
                                            'status': 'U'},
                                           {'flag': '{ACG}',
                                            'interface': 'GE6/0/2',
                                            'oper_key': '1',
                                            'priority': '32768',
                                            'status': 'U'}],
                         'remote_members': [{'flag': '{EF}',
                                             'interface': 'GE6/0/1',
                                             'mac': '0000-0000-0000',
                                             'oper_key': '0',
                                             'priority': '32768',
                                             'status': '0',
                                             'sys_id': '0x8000'},
                                            {'flag': '{EF}',
                                             'interface': 'GE6/0/2',
                                             'mac': '0000-0000-0000',
                                             'oper_key': '0',
                                             'priority': '32768',
                                             'status': '0',
                                             'sys_id': '0x8000'}]},
                   '2': {'local_members': [{'flag': '{ACG}',
                                            'interface': 'GE6/0/3',
                                            'oper_key': '2',
                                            'priority': '32768',
                                            'status': 'U'},
                                           {'flag': '{ACG}',
                                            'interface': 'GE6/0/4',
                                            'oper_key': '2',
                                            'priority': '32768',
                                            'status': 'U'}],
                         'remote_members': [{'flag': '{EF}',
                                             'interface': 'GE6/0/3',
                                             'mac': '0000-0000-0000',
                                             'oper_key': '0',
                                             'priority': '32768',
                                             'status': '0',
                                             'sys_id': '0x8000'},
                                            {'flag': '{EF}',
                                             'interface': 'GE6/0/4',
                                             'mac': '0000-0000-0000',
                                             'oper_key': '0',
                                             'priority': '32768',
                                             'status': '0',
                                             'sys_id': '0x8000'}]}}}]]

If your regexes are specific enough, no need to indicate start or stop of the group using Local: {{_start_}} or Remote: {{ _start_ }}, regex formatters DIGIT and MAC allows tells TTP to use more specific regexes filtering unwanted matches.

If you need to use Local: {{_start_}} and Remote: {{ _start_ }} to indicate start of the group, consider this template:

<group name = "portchannel.{{channel_number}}">
Aggregate Interface: Bridge-Aggregation{{ channel_number}}

<group name = "local_members*" void="">
Local: {{_start_}}
  <group>
  {{interface  }} {{status}} {{priority | DIGIT }} {{oper_key | DIGIT }} {{flag}}
  </group>
</group>

<group name = "remote_members*">
Remote: {{ _start_ }}
  <group>
  {{interface }} {{status}} {{priority}} {{oper_key}} {{sys_id}}, {{ mac | MAC }} {{flag}}
  </group>
</group>

</group>

it should give same results, using void="" allows to filter get rid of empty matches {} which appear due to bug in results saving logic for ...* list path formatter - void tells to delete results for parent group which were empty anyway,
fixed that behaviour in commit dc58fd4 and latest code does not require to use void=""

@iskobkarev
Copy link
Author

iskobkarev commented Oct 17, 2021 via email

@dmulyalin
Copy link
Owner

Released 0.8.1 yesterday, it includes fix for the bug I described above, its on PyPI, feel free to give it go.

ttp version - you mean something like this

<vars>
ttp_version="getttpversion"
</vars>

<group name="interfaces">
interface {{ interface }}
 description {{ description }}
 {{ ttpversion | set("ttp_version") }}
</group>

wonder, what would be the use cases for that?

If you need to do it now, you can get version of ttp using setuptools (pip install setuptools)

from pkg_resources import working_set

for pkg in working_set:
    if pkg.project_name.lower() == "ttp":
        ttp_version = pkg.version
        break

@iskobkarev
Copy link
Author

iskobkarev commented Oct 28, 2021 via email

@dmulyalin
Copy link
Owner

Hi,

Yeah, there is a restriction - https://ttp.readthedocs.io/en/latest/Match%20Variables/Functions.html#joinmatches
image

Workaround could be to post-process your results to form a structure you need.

@iskobkarev
Copy link
Author

iskobkarev commented Oct 28, 2021 via email

@iskobkarev
Copy link
Author

iskobkarev commented Oct 29, 2021 via email

@dmulyalin
Copy link
Owner

@iskobkarev

Sorry for long no reply, for HPE like cases usually quiet helpful to use dictionary structure where peer IP addresses uses as keys, in that case TTP will merge all configuration for certain peer based on its IP address, but looks like you already figured out that trick by yourself.

However, your template need to be adjusted slightly to achieve what you need:

<group name= "bgp_af.{{vpn_instance}}.{{address_family}}">
 {{address_family}}-family vpn-instance {{vpn_instance}}
  router-id {{router_id}}
  preference {{pref_internal}} {{pref_external}} {{pref_local}}

 <group name= "bgp_peer.{{peer_id}}**" method="table">
  peer {{peer_id}} as-number {{peer_as_number}}
  peer {{peer_id}} group {{peer_group_id }}
  peer {{peer_id}} label_route_capability {{label_router_capability | re("label-route-capability")}}
  peer {{peer_id}} {{bfd | re("bfd") | let("enabled") }}
  peer {{peer_id}} route-policy {{peer_import_policy}} import
  peer {{peer_id}} route-policy {{peer_export_policy}} export
  peer {{peer_id}} ebgp-max-hop {{ebgp_max_hop}}
  peer {{peer_id}} timer keepalive {{timet_keepalive}} hold {{timer_hold}}
  peer {{peer_id}} route-update-interval {{timer_route_update}}
  peer {{peer_id}} connect-interface {{source_interface}}
  peer {{peer_id}} fake-as {{local_as}}
 </group>

<group name="aggregate">
  aggregate {{network}} {{mask}} {{detail_suppressed }} attribute-policy {{attribute_policy}}
</group>
  
<group name="networks">
  network {{network}} {{mask}} route-policy {{route_policy}}
</group>  

</group>

Where key change is - group name= "bgp_peer.{{peer_id}}**" method="table" - method table tells that each line is a start line in the group, meaning results for each line must be save merged to overall results, {{peer_id}}** tells to use dictionary as a leaf under peer_id.

Above template produces this result:

[[{'bgp_af': {'FHA': {'ipv4': {'aggregate': [{'attribute_policy': 'IGP_into_FHA',
                                              'detail_suppressed': 'detail-suppressed',
                                              'mask': '255.255.248.0',
                                              'network': '10.251.64.0'},
                                             {'attribute_policy': 'IGP_into_FHA',
                                              'detail_suppressed': 'detail-suppressed',
                                              'mask': '255.255.248.0',
                                              'network': '10.251.160.0'}],
                               'bgp_peer': {'10.251.64.113': {'ebgp_max_hop': '5',
                                                              'local_as': '64881',
                                                              'peer_as_number': '64991',
                                                              'peer_export_policy': 'fha_to_fhaimz',
                                                              'peer_import_policy': 'fhaimz_to_fha',
                                                              'source_interface': 'LoopBack101',
                                                              'timer_hold': '5',
                                                              'timer_route_update': '1',
                                                              'timet_keepalive': '1'},
                                            '10.251.64.97': {'ebgp_max_hop': '5',
                                                             'local_as': '64881',
                                                             'peer_as_number': '64991',
                                                             'peer_import_policy': 'fhadmz_to_fha',
                                                             'source_interface': 'LoopBack101',
                                                             'timer_hold': '5',
                                                             'timer_route_update': '1',
                                                             'timet_keepalive': '1'}},
                               'networks': [{'mask': '255.255.255.0',
                                             'network': '10.248.128.0',
                                             'route_policy': 'IGP_into_FHA'},
                                            {'mask': '255.255.255.224',
                                             'network': '10.248.137.160',
                                             'route_policy': 'IGP_into_FHA'}],
                               'pref_external': '80',
                               'pref_internal': '75',
                               'pref_local': '90',
                               'router_id': '10.251.0.15'}}}}]]

Regarding - I would like to support this project in some way but I could not find "donate" button anywhere... - there is sponsor button at the top right of the repo.

@iskobkarev
Copy link
Author

iskobkarev commented Dec 29, 2021 via email

@dmulyalin
Copy link
Owner

Thanks for raising this issue, should be fixed in 0.8.3 details of the problem described in #66.

@iskobkarev
Copy link
Author

iskobkarev commented Feb 10, 2022 via email

@dmulyalin
Copy link
Owner

Hi, in relation to the latest comment, could you share sample data and template together with results you getting and expected results, will try to investigate and see what TTP can do.

@iskobkarev
Copy link
Author

iskobkarev commented Feb 22, 2022 via email

@dmulyalin
Copy link
Owner

Maybe this template will do the trick.

Data:

Route-policy : IGP_into_HSSBC
  deny   : 5
        if-match tag 102
        if-match community commlist
  permit : 10
        if-match community permitcom
        apply community 64800:1001 64800:7 additive
        apply as-path 1 2 3 4 5
        apply cost + 10
        apply cost-type type-1
  permit : 20
        apply community 64800:1001 64800:7 additive
        apply as-path 1 2 3 4 5
        apply cost + 10
        apply cost-type type-1

Template:

<vars>
ACTION = "Permit|Deny|permit|deny"
</vars>

<group name="{{rp_name}}">
Route-policy : {{rp_name | _start_}}

<group name="{{node}}" expand="">
  {{filterType | re("ACTION") }}  : {{node}}

        if-match tag {{matchRules.tag | default("") }}
        if-match community {{ matchRules.community | default("") }}
        if-match interface {{ matchRules.interface | default("") }}
        if-match ip-prefix {{ matchRules.ipPrefix | default("")  }}
        if-match route-type {{ matchRules.routeType | default("")  }}
        if-match acl {{ matchRules.ipAcl | default("") }}
        if-match cost {{ matchRules.cost | default("") }}
        if-match extcommunity {{ matchRules.extCommunity | default("") }}

        apply as-path {{ setRules.setAsPathReplace | ORPHRASE | default("") }} replace
        apply as-path {{ setRules.setAsPath | ROW | default("") }}
        apply community {{ setRules.setCommunityAdditive | default("") }} additive
        apply community {{ setRules.setCommunity | ORPHRASE | default("") }}
        apply cost {{ setRules.cost | ORPHRASE | default("") }}
        apply cost-type {{ setRules.costType | ORPHRASE | default("") }}
        apply tag {{ setRules.tag | ORPHRASE | default("") }}

</group>
</group>

Gives this result:

[
	{
		"IGP_into_HSSBC": {
			"5": {
				"filterType": "deny",
				"matchRules": {
					"community": "commlist",
					"cost": "",
					"extCommunity": "",
					"interface": "",
					"ipAcl": "",
					"ipPrefix": "",
					"routeType": "",
					"tag": "102"
				},
				"setRules": {
					"cost": "",
					"costType": "",
					"setAsPath": "",
					"setAsPathReplace": "",
					"setCommunity": "",
					"setCommunityAdditive": "",
					"tag": ""
				}
			},
			"10": {
				"filterType": "permit",
				"matchRules": {
					"community": "permitcom",
					"cost": "",
					"extCommunity": "",
					"interface": "",
					"ipAcl": "",
					"ipPrefix": "",
					"routeType": "",
					"tag": ""
				},
				"setRules": {
					"cost": "+ 10",
					"costType": "type-1",
					"setAsPath": "1 2 3 4 5",
					"setAsPathReplace": "",
					"setCommunity": "64800:1001 64800:7 additive",
					"setCommunityAdditive": "",
					"tag": ""
				}
			},
			"20": {
				"filterType": "permit",
				"matchRules": {
					"community": "",
					"cost": "",
					"extCommunity": "",
					"interface": "",
					"ipAcl": "",
					"ipPrefix": "",
					"routeType": "",
					"tag": ""
				},
				"setRules": {
					"cost": "+ 10",
					"costType": "type-1",
					"setAsPath": "1 2 3 4 5",
					"setAsPathReplace": "",
					"setCommunity": "64800:1001 64800:7 additive",
					"setCommunityAdditive": "",
					"tag": ""
				}
			}
		}
	}
]

@JoanDuclos
Copy link

Hi, sorry to bother you but this is the only way to send you a message on GitHub...

I would like to discuss with you @iskobkarev about your templates because I'm thinking about doing a similar project and it would help me a lot to move forward.

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

3 participants