Giter VIP home page Giter VIP logo

pyfg's Introduction

FortiAPI

API for FortiOS or how to turn FortiOS into JunOS

Introduction

This API allows you to interact with a device runnine FortiOS in a sane way. With this API you can:

  • Connect to the device, retrieve the running config (the entire config or some blocks, whatever you want) and build a model
  • Build the same model from a file
  • Do changes in the candidate configuration locally
  • Create a candidate configuration from a file
  • Do a diff between the running config and the local candidate config
  • Generate the necessary commands to go from the running configuration to the candidate configuration

Documentation

You can find the documentation on Read the Docs.

Installation

To install the library execute:

pip install pyfg

Examples

In the examples directory you will find different file with examples on how to use the API:

  • example1 - How to retrieve the configuration of a VDOM
  • example2 - How to get BGP information and navigate through it
  • example3 - How to load BGP configuration from a file (running.conf is emulating this step), load the candidate configuration from a file and then check the differences and show to get to the candidate configuration from the running one.
  • example4 - Similar as example3 but this time the changes are done programmatically instead of using a text file.
  • example5 - This example will do some changes, will try to commit them, will detect that something went wrong and it will finally rollback the changes.

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.