This is a simple Flask web application that demonstrates the usage of the Nmstate library to interact with network state in Python.
- Clone the repository:
git clone https://github.com/jona42-ui/nlpdemo.git
cd nlpdemo/webapp
- Install the required dependencies:
pip install -r requirements.txt
- Run the Flask application:
python app.py
or
flask --app app.py run
-
Open your web browser and go to http://localhost:5000.
-
Enter natural language commands related to network configuration in the input field and click "Submit" to see the generated network state.
-
Click on "Show Image" to visualize the network topology image.
This demo application also integrates with NetVisor for network topology visualization. NetVisor is a host network topology visualization tool that generates images representing the network topology.
To use NetVisor with this application:
-
Ensure you have NetVisor installed and available in your environment. see: https://github.com/ffmancera/NetVisor
-
After submitting a network configuration command in the input field, click "Show Image" to generate and display the network topology image using NetVisor.
-
If you encounter any issues with NetVisor integration, ensure that NetVisor is correctly installed and accessible from your environment.
.
├── app.py
├── __init__.py
├── output.png
├── __pycache__
│ ├── app.cpython-310.pyc
│ └── __init__.cpython-310.pyc
├── README.md
├── requirements.txt
├── static
└── templates
└── index.html
Screencast.from.04-17-2024.07.18.05.PM.webm
Screencast.from.04-22-2024.07.33.07.AM.webm
This project is licensed under the MIT License - see the LICENSE file for details.
- Developed by thembo jonathan
- Nmstate library: Nmstate
- NetVisor tool: NetVisor