Giter VIP home page Giter VIP logo

ios-show-run-ttp's Introduction

ios-show-run-ttp

  • TTP template for parsing "show run" for cisco IOS
  • view the example file for a demo of the result payload

forever a WIP, ALL PR's welcome! feel free to log an issue - please include an example of the output

contribute

ios-show-run-ttp's People

Contributors

michael-edobor avatar tbotnz avatar ubaumann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ios-show-run-ttp's Issues

Add support for 'output' service policies

The present template only supports 'service-policy input {{}}'. Proposing to implement 'service-policy output {{}}'

service-policy input {{ input_policy }}
service-policy output {{ output_policy }}

This applies to all types of L3 interfaces

I have already implemented this. Can submit a PR if needed.

Change Parsing format of IP to CIDR format and Add support for secondary IP addresses

Parse all secondary IP addresses found under interface configs into a list and change IP address notation to cidr instead of ip address mask subnet. This can be implemented by introducing a macro to the interfaces group and using the inbuilt to_cidr method to convert the masks.

Use-case:

  1. Makes it easier to create a IPNetwork object from the netaddr library
  2. Easier to represent when comparing IPs with a SoT (e.g Netbox)
  3. Fully account for IP information in the configs
def parse_ip(data):
	if data.get('primary_ip') and data.get('primary_mask'):
		data['primary_ip'] = data['primary_ip'] + '/' + str(data['primary_mask'])
		data.pop('primary_mask')
	if data.get('secondary_ips') and data.get('secondary_masks'):
		data['secondary_ips'] = [f"{ip}/{mask}" for ip, mask in zip(data['secondary_ips'], data['secondary_masks'])]
		data.pop('secondary_masks')
</macro>

I can submit a PR for this also.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.