Module providing APIs in lines similar to that of ovs-vsctl utility.
Authors: Vasu Dasari.
table_key() = all | unicode:chardata() | {unicode:chardata(), unicode:chardata()}
table_name() = unicode:chardata()
table_params() = map()
tunnel_type() = gre | vxlan
vsctl_returns() = ok | error | {ok, term()} | {error, term()}
set/4 | Set table entries in ovsdb. |
get/4 | Get table entries in ovsdb. |
set_controller/3 | Set Openflow Controller to Bridge. |
del_controller/2 | Delete Openflow Controller from Bridge. |
add_br/3 | Add/Modify a bridge to switch. |
set_br/3 | Set bridge options. |
get_br/2 | Get bridge info from switch. |
get_br/3 | |
del_br/2 | Deletes a bridge to switch. |
add_port/3 | Add/modify port to a bridge. |
set_port/3 | Set port parameters. |
set_iface/3 | Set other interface parameters. |
get_port/2 | Get port information. |
get_port/3 | |
get_iface/2 | Get interface information. |
get_iface/3 | |
get_ifaces_on_bridge/3 | Get all interfacdes on a bridge. |
del_port/3 | Delete port from a bridge. |
add_bond/4 | Create or modify bond interface. |
set_bond/3 | Modify interface level parameters of a a bond port. |
add_bond_iface/4 | Add an interface to a bond. |
del_bond_iface/4 | Delete an interface to a bond. |
del_bond/3 | Delete a bond port. |
add_tunnel_port/5 | Add/Modify OVS Tunnel port. |
del_tunnel_port/3 | Delete a tunnel port. |
vsctl/2 | |
trace/1 |
set(Table::table_name(), Key::table_key(), Params::table_params(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Set table entries in ovsdb
This API is equivalent to executing command of form ovs-vsctl set Table Table Id Config Tuples ovs-vsctl set int vxlan1 type=vxlan
get(Table::table_name(), Key::table_key(), Columns::list(), Opts::ovsdb_client:opts()) -> vsctl_returns() | list() | map()
Get table entries in ovsdb
This API is equivalent to executing command of form ovs-vsctl --columns Columns list Table Table-Id
set_controller(BrName::unicode:chardata(), Controller::unicode:chardata(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Set Openflow Controller to Bridge
This is equivalant to $ ovs-vsctl set-controller br0 tcp:10.1.1.1:6653
del_controller(BrName::unicode:chardata(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Delete Openflow Controller from Bridge
This is equivalant to $ ovs-vsctl del-controller br0
add_br(BrName::unicode:chardata(), BrOptions::map(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Add/Modify a bridge to switch
For the API to return ok, when the entry is already present, set may_exist option to true This is quivalent to $ ovs-vsctl --may-exist add-br br1 ...
set_br(BrName::table_key(), BrOptions::table_params(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Set bridge options
This function will return error if bridge does not exist
get_br(BrName::table_key(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Get bridge info from switch
This is quivalent to $ ovs-vsctl del-br br1 ...
get_br(BrName, Columns, Opts) -> any()
del_br(BrName::unicode:chardata(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Deletes a bridge to switch
This is quivalent to $ ovs-vsctl del-br br1 ...
add_port(BrName::unicode:chardata(), PortName::unicode:chardata(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Add/modify port to a bridge
This is quivalent to $ ovs-vsctl add-port br1 br1-eth1 Options supported: Interface options: admin_state, ofport_request
set_port(PortName::table_key(), Params::table_params(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Set port parameters
This function will return error if port does not exist
set_iface(IfName::table_key(), Params::table_params(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Set other interface parameters
This function will return error if interface does not exist
get_port(PortName::table_key(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Get port information
Gets port information for PortName. To get information of all ports available use all option.
get_port(PortName, Columns, Opts) -> any()
get_iface(IfName, Opts) -> any()
Get interface information
Gets interface information for IfName. To get information of all interfaces available use all option.
get_iface(IfName, Columns, Opts) -> any()
get_ifaces_on_bridge(BrName::table_key(), Columns::list(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Get all interfacdes on a bridge
del_port(BrName::unicode:chardata(), PortName::unicode:chardata(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Delete port from a bridge
This is quivalent to $ ovs-vsctl del-port br1 br1-eth1
add_bond(BrName::unicode:chardata(), BondName::unicode:chardata(), IfaceList::list(), Opts::ovsdb_client:opts()) -> ovsdb_client:rpc_return()
Create or modify bond interface
This is quivalent to $ ovs-vsctl --may-exist add-bond br1 br1-bond1 bond1-eth1 bond2-eth2... Options Supported: lacp bond_mode
set_bond(BondName::table_key(), Params::table_params(), Opts::ovsdb_client:opts()) -> vsctl_returns()
Modify interface level parameters of a a bond port
This function fetches member links of the specified port and then applies the params on all those interfaces
add_bond_iface(BrName::unicode:chardata(), BondName::unicode:chardata(), Iface::list() | unicode:chardata(), Opts::ovsdb_client:opts()) -> ovsdb_client:rpc_return()
Add an interface to a bond
This is equivalent to: $ ovs-vsctl add-bond-iface br1 br1-eth1
del_bond_iface(BrName::unicode:chardata(), BondName::unicode:chardata(), Iface::list() | unicode:chardata(), Opts::ovsdb_client:opts()) -> ovsdb_client:rpc_return()
Delete an interface to a bond
This is equivalent to: $ ovs-vsctl del-bond-iface br1 br1-eth1
del_bond(BrName::unicode:chardata(), BondName::unicode:chardata(), Opts::ovsdb_client:opts()) -> ovsdb_client:rpc_return()
Delete a bond port
This is equivalent to: $ ovs-vsctl del-bond br1 br1-bond1
add_tunnel_port(BrName::table_key(), Name::unicode:chardata(), TunnelType::tunnel_type(), Params::table_params(), Opts::ovsdb_client:opts()) -> ovsdb_client:rpc_return()
Add/Modify OVS Tunnel port
This comand is equivalent to:
$ ovs-vsctl add-port br0 a1_b1 --
set interface a1_b1 type=vxlan options:key=1 options:remote_ip=172.31.1.1
Options supported are:
key, remote_ip, local_ip, dst_mac, src_mac, vlan_id, out_port
del_tunnel_port(BrName::unicode:chardata(), Name::unicode:chardata(), Opts::ovsdb_client:opts()) -> ovsdb_client:rpc_return()
Delete a tunnel port
vsctl(Op, Opts) -> any()
trace(X1) -> any()