- Control ovn by restful api.
- go to
handler/ovn/
see test file to know schema of data. - Edit
conf/config.yaml
for db info. if not need to login for edit ovn , go torouter/router.go
to delete allmiddleware.AuthMiddleware()
. - Base on ebay/go-ovn , use fork JackyCZJ/go-ovn
cd $GOPATH
git clone http://git.esix.com/jackyczj/go-restfulovn.git
make ca
go install
go build .
ovn-nbctl set-connection ptcp:PORT[:IP] //for remote connection
ovn-nbctl set-connection pssl:PORT[:IP] //for remote secure connection
./admin.sh start
./admin.sh status
./admin.sh stop
./admin.sh restart
- ls Add
- ls del
- ls get
- ls list
- lsp add
- lsp del
- lsp List
- ext id add
- ext id del
- LSP set Address
- LSP Set Port Security
- ACL add
- ACL del
- ACL List
- AS get
- AS update
- AS list
- AS add
- AS del
- lr add
- lr get
- lr del
- lr list
- lrp list
- lrp add
- lrp del
lrp-set-enabled PORT STATE
set administrative state PORT
('enabled' or 'disabled')
lrp-get-enabled PORT get administrative state PORT
('enabled' or 'disabled')
- lb add
- lb del
- lb get
- lb updates
- ls Load balance add
- ls lb del
- ls lb list
- lr lb add
- lr lb del
- lr lb list
- QoS Add
- QoS Del
- Qos List
- DHCPOptions Add
- DHCPOptions Del
- DHCPOptions Set
- DHCPOptions List
- LSPv4Options Get
- LSPv4Options Set
- LSPv6Options Get (not work)
- LSPv6Options Set (?)
- LR NAT OPTION
meter-add NAME ACTION RATE UNIT [BURST] #add a meter
meter-del [NAME] #remove meters
meter-list #print meters
- meter add
- meter del
- meter list
lrp-set-gateway-chassis PORT CHASSIS [PRIORITY]
set gateway chassis for port PORT
lrp-del-gateway-chassis PORT CHASSIS
delete gateway chassis from port PORT
lrp-get-gateway-chassis PORT
- LRP SET gateway chassis
- LRP del ⬆️
- LRP get ⬆️
#Connection commands:
get-connection #print the connections
del-connection #delete the connections
[--inactivity-probe=MSECS]
set-connection TARGET... #set the list of connections to TARGET...
#SSL commands:
get-ssl #print the SSL configuration
del-ssl #delete the SSL configuration
set-ssl PRIV-KEY CERT CA-CERT [SSL-PROTOS [SSL-CIPHERS]] #set the SSL configuration
#Port group commands:
pg-add PG [PORTS] #Create port group PG with optional PORTS
pg-set-ports PG PORTS #Set PORTS on port group PG
pg-del PG #Delete port group PG
#HA chassis group commands:
ha-chassis-group-add GRP #Create an HA chassis group GRP
ha-chassis-group-del GRP #Delete the HA chassis group GRP
ha-chassis-group-list #List the HA chassis groups
ha-chassis-group-add-chassis #GRP CHASSIS [PRIORITY] Adds an HAchassis with optional PRIORITY to the HA chassis group GRP
ha-chassis-group-del-chassis #GRP CHASSIS Deletes the HA chassisCHASSIS from the HA chassis group GRP