For the unsuccessful case, did you check the database log? It may
contain a log message pointing to the mistake.
On Mon, Nov 13, 2017 at 07:26:48PM -0300, Edison Albuquerque wrote:
> Thank you Ben.
> There's a lot of information.
> I'll have to dissect it.
> I tried this before:
>
> "
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
>
> import socket
> import json
>
> OVSDB_IP = '127.0.0.1'
> OVSDB_PORT = 6640
>
> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> s.connect((OVSDB_IP, OVSDB_PORT))
>
> # INSERT NA INTERFACE TABLE, PORT TABLE e BRIDGE TABLE
> list_dbs_query = {"method":"transact", "params": ["Open_vSwitch",
> {"uuid-name": "if3d", "op": "insert", "row": {"name": "s1-eth3", "type":
> "system"}, "table": "Interface"},
> {"uuid-name": "port3d", "op": "insert", "row": {"name": "s1-eth3",
> "interfaces": ["named-uuid", "if3d"]}, "table": "Port"},
> {"op":"insert","row":{"ports":["named-uuid","port3d"],"name":"s1"},"table":"Bridge"},
>
> {"op":"mutate","table":"Open_vSwitch","where":[],"mutations":[["next_cfg","+=",1]]},{"op":"commit","durable":True}],"id":0}
>
>
> s.send(json.dumps(list_dbs_query))
> response = s.recv(4000)
> print response
> "
> I receive a response. But when I run Select no interface has been added.
> I'm sure this time it will work.
>
> 2017-11-13 19:00 GMT-03:00 Ben Pfaff <[email protected]>:
>
> > On Mon, Nov 13, 2017 at 06:47:05PM -0300, Edison Albuquerque wrote:
> > > Sorry if this has been asked before.
> > > There's few examples on how to use jsonrpc to insert an interface, for
> > > example.
> > > For us, newbies, examples are extremely valuable, more than a thousand
> > > words.
> > > If some kind soul has an example on how to insert a new interface
> > (s1-eth3)
> > > in a single switch (s1) with two interfaces (s1-eth2 and s1-eth3) please
> > > share with me.
> > > That would be a complete example, including Port and Bridge
> > atualizations.
> >
> > If you run something like this:
> > ovs-vsctl -vjsonrpc -- add-bond s1 s1-eth3 s1-eth2 s1-eth3
> > then you will see what ovs-vsctl does to insert such a bond, logged as
> > the jsonrpc module.
> >
>
>
>
> --
>
> *He ain't heavy. He's my brother.*
>
> Prof. Edison de Queiroz Albuquerque, BSc, Msc, Dr.
> Adjunto da Escola Politécnica de Pernambuco, Universidade de Pernambuco
> (POLI/UPE)
> Professor do Curso de Engenharia de Computação
> Líder do Grupo de Pesquisa em Protocolos de Redes de Computadores
> Membro do IEEE (ComSoc), do SBrT, do IECOM e da APEET
>
> Universidade de Pernambuco/Escola Politécnica de Pernambuco
> Rua Benfica, 455 (Bl. 'C' 2. andar) - Bairro: Madalena
> CEP 50720-001 - Recife, Pernambuco - Brasil
> Fone: +55 81 3184-7542 - Fax: +55 81 3184-7581
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss