A Python3 OVSDB API
Project description
Ovsdb Manager
Ovsdb Manager is an OVSDB Python Client developed by the i2CAT Foundation (Barcelona). It implements the basic functionalities to interact with OpenVSwitch switches (add port, delete port , add bridge, delete bridge, etc).
Author: Ferran Cañellas ferran.canellas@i2cat.net
Requirements
- Python 3.5 or grater
Installation
pip install ovsdb-manager
Usage
To start using Ovsdb Manager simply do
from ovsdbmanager import OvsdbManager
ovs = OvsdbManager(ip="X.X.X.X", port="Y")
If you are running the OVSDB server locally you can ommit the IP address. The default port is 6640.
Examples of use:
from ovsdbmanager import OvsdbManager
ovs = OvsdbManager(ip="X.X.X.X", port="Y")
# Create a bridge
br1 = ovs.add_bridge("br1")
# Add a port
p1 = br1.add_port("p1")
# Delete a port
br1.del_port(p1)
# Set controller
br1.set_controller("tcp:10.0.10.1:6653")
# Set fail mode as secure
br1.set_fail_mode("secure")
# Enable RSTP
br1.set_rstp(True)
# Add a patch port
br1.add_port("p2", patch_peer="p3")
# Delete a bridge
ovs.del_bridge(br1)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ovsdbmanager-0.1.3.tar.gz
(9.2 kB
view hashes)
Built Distribution
Close
Hashes for ovsdbmanager-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7045f97a2fe666876be05846a5bb76b5191758d06ab2717fbb993c44d2cf9cac |
|
MD5 | 48069d4c40c329a82f414a326c958a0e |
|
BLAKE2b-256 | cc93544399f914c8bc1d9e696bceab45d292f8a4ddfe5058faf843413eca44e8 |