Usage _ YAML Manifest Input
- As an alternative to write Python code, you can use a Yaml manifest file as input
- This is a simple appreach and does NOT require coding
the steps are simple:
- Import
Flexible-Network
library in your Python script - Write your Yaml manifest
- Run your script !
Getting started Example
vi /etc/flexible_network/hosts
[switches]
192.168.1.12
192.168.1.13
192.168.1.11
vi my_script.py
vi test.yaml
python3 my_script.py --file test.yaml
List the tasks, you’ll find your task at the end
python3 my_script.py --task --list
python3 my_script.py --task --get-log <TASK-ID>
If’ve taken backups, you can list them as well
python3 my_script.py --backup --list
python3 my_script.py --backup --get-backup <BACKUP-ID>