Skip to content

Commit

Permalink
fix for issue #1, instead of INT need to to use DIGIT
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulyalin committed May 27, 2022
1 parent 1d6bc94 commit fdcdc9e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ Expected output:
ip nat {{ location }} source static {{ inside_ip | IP }} {{ global_ip | IP }} extendable
ip nat {{ location }} source static {{ inside_ip | IP }} interface {{ interface }}
ip nat {{ location }} source static {{ inside_ip | IP }} {{ global_ip | IP }} vrf {{ vrf }} extendable
ip nat {{ location }} source static {{ protocol }} {{ inside_ip | IP }} {{ inside_port | INT | to_int }} interface {{ interface }} {{ global_port | INT | to_int }}
ip nat {{ location }} source static {{ protocol }} {{ inside_ip | IP }} {{ inside_port | INT | to_int }} {{ global_ip | IP }} {{ global_port | INT | to_int }} extendable
ip nat {{ location }} source static {{ protocol }} {{ inside_ip | IP }} {{ inside_port | INT | to_int }} {{ global_ip | IP }} {{ global_port | INT | to_int }} vrf {{ vrf }} extendable
ip nat {{ location }} source static {{ protocol }} {{ inside_ip | IP }} {{ inside_port | DIGIT | to_int }} interface {{ interface }} {{ global_port | DIGIT | to_int }}
ip nat {{ location }} source static {{ protocol }} {{ inside_ip | IP }} {{ inside_port | DIGIT | to_int }} {{ global_ip | IP }} {{ global_port | DIGIT | to_int }} extendable
ip nat {{ location }} source static {{ protocol }} {{ inside_ip | IP }} {{ inside_port | DIGIT | to_int }} {{ global_ip | IP }} {{ global_port | DIGIT | to_int }} vrf {{ vrf }} extendable
</group>
```
</details>
12 changes: 6 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ site_name: TTP Templates Collection
site_url: https://ttp_templates.github.io/
theme:
custom_dir: docs/overrides
features:
- navigation.tabs
- navigation.tabs.sticky
- navigation.sections
- navigation.top
- toc.follow
icon:
repo: fontawesome/brands/github-alt
name: material
palette:
accent: teal
primary: blue
features:
- navigation.tabs
- navigation.tabs.sticky
- navigation.sections
- navigation.top
- toc.follow
3 changes: 3 additions & 0 deletions test/test_platform_cisco_ios.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import sys
import pprint
import logging

sys.path.insert(0, "..")

from ttp_templates import get_template
from ttp import ttp

logging.basicConfig(level=logging.INFO)

def test_cisco_ios_show_ip_ospf_database_router():
with open(
Expand Down Expand Up @@ -389,3 +391,4 @@ def test_cisco_ios_cisco_ios_show_running_config_pipe_include_source_static():
'location': 'inside',
'protocol': 'tcp'}]}}]]

# test_cisco_ios_cisco_ios_show_running_config_pipe_include_source_static()
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Expected output:
ip nat {{ location }} source static {{ inside_ip | IP }} {{ global_ip | IP }} extendable
ip nat {{ location }} source static {{ inside_ip | IP }} interface {{ interface }}
ip nat {{ location }} source static {{ inside_ip | IP }} {{ global_ip | IP }} vrf {{ vrf }} extendable
ip nat {{ location }} source static {{ protocol }} {{ inside_ip | IP }} {{ inside_port | INT | to_int }} interface {{ interface }} {{ global_port | INT | to_int }}
ip nat {{ location }} source static {{ protocol }} {{ inside_ip | IP }} {{ inside_port | INT | to_int }} {{ global_ip | IP }} {{ global_port | INT | to_int }} extendable
ip nat {{ location }} source static {{ protocol }} {{ inside_ip | IP }} {{ inside_port | INT | to_int }} {{ global_ip | IP }} {{ global_port | INT | to_int }} vrf {{ vrf }} extendable
ip nat {{ location }} source static {{ protocol }} {{ inside_ip | IP }} {{ inside_port | DIGIT | to_int }} interface {{ interface }} {{ global_port | DIGIT | to_int }}
ip nat {{ location }} source static {{ protocol }} {{ inside_ip | IP }} {{ inside_port | DIGIT | to_int }} {{ global_ip | IP }} {{ global_port | DIGIT | to_int }} extendable
ip nat {{ location }} source static {{ protocol }} {{ inside_ip | IP }} {{ inside_port | DIGIT | to_int }} {{ global_ip | IP }} {{ global_port | DIGIT | to_int }} vrf {{ vrf }} extendable
</group>

0 comments on commit fdcdc9e

Please sign in to comment.