Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-15 Thread agutierr
Hi Megh, Thanks for the support. I'll take a look at the diff and at this mock_generator. I have to apologize for the replies that my mail client is sending to the list (the same message repeated). I'll fix it soon. Quoting Megh Bhatt : Hi Alberto, You can take a look at https://gith

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-14 Thread Megh Bhatt
Hi Alberto, You can take a look at https://github.com/Juniper/contrail-controller/blob/master/src/vnsw/agent/uve/mock_generator.cc which is an example generator that sends some UVEs and flow messages. It has bunch of command line options. It can be compiled by running scons vrouter:mock_gen at

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-14 Thread Megh Bhatt
Hi Alberto, Can you please share the diffs you made to the test? That will help. I tried with the following changes and it worked fine diff --git a/library/cpp/test/sandesh_message_test.cc b/library/cpp/test/sandesh_message_test.cc index f27a0c1..4aab1b6 100644 --- a/library/cpp/test/sandesh_mes

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-14 Thread agutierr
Hi, I have established 2 loops after connectToCollector. One that waits the sm to change to state 2 (Connected) and one that waits for state 4 (Established). Just after connectToCollector the status is 0. Then, eventually, it changes to 1 (Disconnected). Then to 2 and stays there. An extr

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-13 Thread Megh Bhatt
Hi Alberto, Please see inline … On Apr 13, 2015, at 2:03 PM, wrote: > Hi Megh, > > Thank you for the reply. I already went thru client_sm module but didn't get > any clue about when does the state change, thanks. > > You are correct, TASK_UTIL_EXPECT_TRUE is just a conditional print. I tried

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-13 Thread agutierr
Hi Megh, Thank you for the reply. I already went thru client_sm module but didn't get any clue about when does the state change, thanks. You are correct, TASK_UTIL_EXPECT_TRUE is just a conditional print. I tried to make a loop with that condition (negated) but it seems to stay forever th

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-13 Thread agutierr
Hi Megh, Thank you for the reply. I already went thru client_sm module but didn't get any clue about when does the state change, thanks. You are correct, TASK_UTIL_EXPECT_TRUE is just a conditional print. I tried to make a loop with that condition (negated) but it seems to stay forever th

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-13 Thread Megh Bhatt
Hi Alberto, Sorry for the delay. Please see inline … On Apr 13, 2015, at 3:14 AM, wrote: > Hi, > > I got the following code modifying the test suite available in the Sandesh > C++ library folder: > >int port = 8086; >ASSERT_LT(0, port); >std::cout << "Initializing Generator" << s

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-13 Thread agutierr
Hi, I got the following code modifying the test suite available in the Sandesh C++ library folder: int port = 8086; ASSERT_LT(0, port); std::cout << "Initializing Generator" << std::endl; Sandesh::InitGenerator("SandeshUVEAlarmTest-Client", "192.168.100.1", "Test", "0", evm_

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-09 Thread agutierr
Hi Megh, Thanks for your help. With that I think I got the compilation at hand. Now I'm trying to do a small application to send one message and die. I defined the following toy sandesh for testing: struct UveVirtualNetworkAgent { 1: string name(key="ObjectVNTable") 2: optional i32 cpu

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-08 Thread Megh Bhatt
Hi Alberto, Please see inline …. On Apr 8, 2015, at 1:54 AM, aguti...@ac.upc.edu wrote: Dear all, I'm trying to create a new message to send with Sandesh protocol, however I don't know how to compile the generated code. Just a high level overview which you might al

[opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-08 Thread agutierr
Dear all, I'm trying to create a new message to send with Sandesh protocol, however I don't know how to compile the generated code. We intend to use this messaging for testing purposes (at the moment) by means of an extra application which will send Sandesh messages each second. I have f