Change the destination batfish server of pybatfish

Introduction

When developing a python program that uses batfish on windows

Server: Start container with Docker image batfish / batfish Local PC: Use batfish on the server with batfish / pybatfish

Realization method

** Change the host listed in pybatfish / client / options.py ** only!

(If you have pybatfish installed on windows venv) venv directory /Lib/site-packages/pybatfish/client/options.py

(In the case of linux venv) venv directory /lib/python3.6/site-packages/pybatfish/client/options.py

options.py


class Options(object):
     
    # coordinatior_host = "localhost"  # type: str
    coordinatior_host = "<IP address of the server>"  # type: str

Changed like.

With this, for example

python


from pybatfish.client.commands import *
from pybatfish.question.question import load_questions, list_questions
from pybatfish.question import bfq

load_questions()
bf_init_snapshot(<zip file or directory>) 

Will create a snapshot file on the server docker when you run on windows.

Recommended Posts

Change the destination batfish server of pybatfish
Change the theme of Jupyter
Change the background of Ubuntu (GNOME)
Change the Python version of Homebrew
Change the suffix of django-filter / DateFromToRangeFilter
Change the length of Python csv strings
I tried the asynchronous server of Django 3.0
Let's summarize the construction of NFS server
Change the order of PostgreSQL on Heroku
Edit the file of the SSH connection destination server on the server with VS Code
Change the font size of the legend in df.plot
Regularly monitor the HTTP response of the web server
Change the color of Fabric errors and warnings
Change the resolution of Ubuntu running on VirtualBox
The story of launching a Minecraft server from Discord
[Touch Designer] Change the appearance color of Button COMP
[Django] Change the Default IP address of the runserver command
Visualization of the connection between malware and the callback server
[Django 2.2] Sort and get the value of the relation destination
[Python] Let's change the URL of the Django administrator site
The beginning of cif2cell
I want to change the symbolic link destination of / lib64 from / usr / lib64 to / my-lib64 on CentOS
The meaning of self
the zen of Python
The story of sys.path.append ()
Revenge of the Types: Revenge of types
[Python] Change the Cache-Control of the object uploaded to Cloud Storage
About the camera change event of Google Maps Android API
Change the standard output destination to a file in Python
Check the memory status of the server with the Linux free command
Check the operating status of the server with the Linux top command
I found the cause of mysterious communication of Minecraft server (Spigot)
Change the log retention period of CloudWatch Logs in Lambda
Debug by attaching to the Python process of the SSH destination
Change the volume of Pepper according to the surrounding environment (sound)
Change the installation destination when --user is added to pip
Install the latest version of Git on your Linux server