13:37:56 <devinavery> #startmeeting jquery_xpath_for_md_sal_intern
13:37:56 <odl_meetbot> Meeting started Mon Aug 18 13:37:56 2014 UTC.  The chair is devinavery. Information about MeetBot at http://ci.openstack.org/meetbot.html.
13:37:56 <odl_meetbot> Useful Commands: #action #agreed #help #info #idea #link #topic #startvote.
13:37:56 <odl_meetbot> The meeting name has been set to 'jquery_xpath_for_md_sal_intern'
13:38:19 <devinavery> #topic Status Update
13:38:30 <Neel_B> the compiled code has errors
13:38:40 <devinavery> #info Neel has modified yang file. Seems to be hanging test trouble after having modified the yang file
13:38:49 <devinavery> Ok. So there is something likely wrong in your .yang file.
13:38:49 <Neel_B> so i made 2 classes childtoaster and childtoaster builder
13:39:04 <devinavery> Those will be automatically generated for you.
13:39:08 <devinavery> You only need to modify the .yang file
13:39:25 <Neel_B> they weren't
13:39:42 <devinavery> Ok. Moving the toaster yang to the toaster bundle to se what is going on
13:39:53 <devinavery> That is actually a good first question. Where did you modify the toaster.yang file?
13:40:01 <devinavery> What bundle did you modify it under? The original toaster.yang file?
13:41:24 <Neel_B> yeah the original toaster.yang file
13:42:03 <devinavery> OK. Can you send me your build error? Because I am not seeing any'
13:42:16 <Neel_B> and i added a container child toaster..
13:42:19 <devinavery> That is, you modified the.yang file, then rebuilt that bundle
13:43:35 <Neel_B> yeah
13:43:57 <Neel_B> build has no error
13:44:00 <devinavery> Ok. So that worked for me
13:44:03 <Neel_B> buid is fine
13:44:07 <devinavery> And it created a Childtoaster and ChildtoasterBuilder
13:44:41 <Neel_B> i don't know when i tried i created both of them .. :\
13:44:48 <Neel_B> build was fine
13:45:02 <Neel_B> but when i updated maven repo in exlipse
13:45:32 <Neel_B> there were redmarks in toaster and toasterbuilder ...
13:46:29 <devinavery> Ok. I would suggest trying to these steps again. Reset the toaster bundle. Then copy in just your toaster.yang changes.
13:46:43 <devinavery> Rebuild that one bundle and make sure that it compiles
13:46:55 <Neel_B> toaster bundle right ?
13:47:04 <devinavery> Yes. The existing toaster bundle
13:47:29 <devinavery> Verify that under yang-gen-sal the child toaster and child toaster builder classes were created under a new package
13:47:55 <devinavery> Once that is done, go to your xpath toaster-it project and try to bring in the ChildtoasterBuilder class. It is possible that we need to modify the pom.xml file of the toaster it project to import the new package
13:48:04 <devinavery> I need to step away for a few minutes
13:48:09 <devinavery> back in 5 minutes at most
13:48:11 <Neel_B> okay
13:48:18 <Neel_B> i will try it in mean while
13:53:49 <devinavery> I am back
13:57:38 <Neel_B> some issue with my eclipse
13:57:47 <Neel_B> i nedd 2mins
13:57:54 <devinavery> ok
14:01:08 <regXboi> hey... sorry I'm late - I got to spend the last 90 minutes hacking a door lock
14:03:14 <devinavery> regXboi.. No problem. :)
14:03:30 <devinavery> You haven't missed much. Neel tried changing the yang file and ended up getting a bunch of compile errors
14:03:58 <devinavery> Actually not compile errors, but rather run time errors when running the unit tests
14:04:16 <devinavery> I am seeing runtime error issues as well)
14:04:16 <regXboi> I saw the email - haven't had a chance to look at the code *yet*
14:07:18 <regXboi> do we have a paste bin?
14:07:34 <regXboi> and is the error code *in* github?
14:08:10 <devinavery> The error code is in git hub, but you need to manually copy the updated .yang file to the samples/toaster project and recompile it
14:11:37 <regXboi> what's the diff between the updated toaster.yang and the original?
14:11:56 <devinavery> look for the embedded "childToaster" container
14:14:00 <devinavery> This is the error I am getting when running the test right now: http://pastebin.com/KDDCbmNe
14:14:19 <regXboi> oh right
14:14:37 <regXboi> I can't run the Junit test, I'm still fighting with a broken TestHelper
14:14:54 <devinavery> Ok. You can see this error even with the original Toaster-it test
14:14:59 <devinavery> Not sure if that one runs for you or not
14:16:41 <regXboi> ugh
14:18:53 <Neel_B> sorry got disconnected
14:19:12 <devinavery> Neel_B: no problem. I am seeing an error now when running the test
14:19:13 <Neel_B> devinavery: i don't see any childtoaster or childtoasterbuilder
14:19:29 <devinavery> How are you looking for those classes Neel?
14:19:30 <Neel_B> when i am rebuilt it
14:19:37 <Neel_B> in the code ?
14:20:08 <devinavery> Look for them using the command line. Depending on your eclipse set up you may not see those classes get imported automatically
14:21:32 <Neel_B> yeah i saw them
14:21:40 <regXboi> so
14:21:48 <Neel_B> so i set the .yang file correct ?
14:21:52 <regXboi> so I'm not seeing the errors
14:21:58 <Neel_B> with proper nesting right ?
14:23:05 <Neel_B> i did not change pom.xml to include the module
14:23:12 <Neel_B> what should i include
14:23:34 <devinavery> regXboi: So update yang file. Rebuild the toaster project. Now go to either Neels toaster test OR the existing toaster test and run it.
14:23:50 <devinavery> You should see a bunch of errors.'
14:23:52 <regXboi> I did, I did, I didn't
14:24:19 <devinavery> Really... hmm..
14:24:41 <regXboi> hmm
14:24:55 <devinavery> regXboi: can you reference the ChildtoasterBuilder from inside the test and running it again?
14:25:09 <regXboi> shouldn't need to
14:25:21 <regXboi> the doc dump should trip it and it didn't
14:25:40 <devinavery> doc dump?
14:25:40 <regXboi> so I'm not seeing the updated yang
14:26:04 <regXboi> the test I was looking at dumped an MD-SAL node as a doc
14:26:11 <devinavery> Ahh. Understood.
14:26:32 <devinavery> regXboi: Ok - so you don't see the new classes getting created under yang-gen-sal?
14:26:36 <devinavery> in the toaster bundle?
14:26:42 <Neel_B> self test passed
14:27:00 <regXboi> no, I suspect I'm change the wrong toaster.yang - I was hitting the one in the samples
14:28:08 <regXboi> but there are a whole bunch of other yang files that aren't getting updated
14:29:03 <devinavery> We should in theory only have to change the toaster.yang in the md-sal/samples/toaster ... in theory...
14:29:38 <regXboi> I have toaster yangs in md-sal/sal-rest-docgen and sal-rest-connector as well
14:29:41 <regXboi> they are targets
14:29:43 <regXboi> but...
14:29:51 <devinavery> those should just be in the "Test" directories...
14:30:16 <regXboi> and there is a toaster.yang in samples/toaster/bin/target/classes/META-INF/yang/toaster.yang that isn't changing either
14:31:37 <regXboi> and I'm still looking at the original yang (I think)
14:33:29 <Neel_B> opendaylight/md-sal/samples/toaster/src/main/yang/toaster.yang
14:33:34 <Neel_B> is the file i changed
14:35:18 <regXboi> nope, still not getting it
14:36:10 <Neel_B> opendaylight/md-sal/samples/toaster/src/main/yang-gen-sal/org/opendaylight/yang/gen/v1/http/netconfcentral/org/ns/toaster/rev091120/toaster
14:36:31 <Neel_B> this is where you should find childtoaster and childtoasterbuilder
14:39:36 <regXboi> so I'm cleaning out my .m2 and trying again
14:52:12 <Neel_B> devinavery: regXboi  what i see is
14:52:20 <Neel_B> child node not added
14:52:40 <Neel_B> and test are passing
14:53:00 <devinavery> Can you copy/paste your test output?
14:53:18 <devinavery> I see the test passing from the command line, but failing from within eclipse now
14:53:20 <Neel_B> all tests passed
14:53:44 <Neel_B> 1 quick quertion
14:54:02 <Neel_B> we are fetching the toaster from server right
14:54:12 <devinavery> Yup
14:54:13 <Neel_B> how do we fetch from local copy ?
14:54:28 <devinavery> Ok.. I guess I don't understand your question
14:54:30 <Neel_B> beacouse the server is not updated with childToaster
14:55:02 <Neel_B> but our local controller/toaster has child toaster
14:55:08 <devinavery> Ahh... I think you are saying in the pax-exam test we read from the toaster and it is already populated, but not with the child
14:55:20 <Neel_B> yeah
14:55:34 <devinavery> So, what happens is in the toaster-provider, on start up, they write to the toaster operational datastore some default values
14:56:16 <devinavery> Check out this class:
14:56:17 <devinavery> org.opendaylight.controller.sample.toaster.provider.OpendaylightToaster
14:56:20 <Neel_B> but  it has no idea about child toaster right  ?
14:56:24 <devinavery> Specifically, the "setDataProvider"
14:56:26 <devinavery> Correct.
14:56:43 <devinavery> So what I would do, is in your integration test, modify it to write to the toaster and update
14:56:56 <devinavery> which includes the child information
14:57:11 <Neel_B> can you be more eloborate ?
14:57:23 <devinavery> Check out the OpendaylightToaster class
14:57:37 <devinavery> specifically the setTioasterStatusUp() method
14:58:19 <devinavery> What that method does is starts a write transaction, builds a "toaster" dataObject (which does NOT include the child) and then writes it to the operational datastore.
14:58:41 <devinavery> You wan to do the same thing in your test, EXCEPT when you write to the operational datastore, you ALSO want to INCLUDE the child toaster object in your data object
14:58:46 <devinavery> Does that make sense?
14:59:32 <devinavery> Unfortunetly I am heading into another meeting. So I may be slow to respond for the next hour
14:59:36 <devinavery> #chair regXboi
14:59:36 <odl_meetbot> Current chairs: devinavery regXboi
14:59:44 <Neel_B> okay i will try that
14:59:54 <devinavery> #info Neel is now able to run the tests
15:00:08 <devinavery> (Neel - can you comment [#info] what steps you took to get there so we can record them)
15:00:31 <Neel_B> from the start ?
15:00:41 <Neel_B> what i did in the weeked ?
15:00:47 <regXboi> yes please
15:01:13 <devinavery> Yeah. I want to try and get my system running with those tests as well, so I want to know what you changed so I can do the same. :)
15:01:34 <Neel_B> #info Neel_B pulled the code devinavery sent through mail
15:02:46 <Neel_B> #info Neel_B changed the test   evaluate(".", "toaster"); to evaluate("name(.)", "toaster"); and all the tests are passing on toaster
15:03:57 <Neel_B> #info adding text nodes as children passed the tests
15:04:54 <Neel_B> #info Neel_B changed the toaster.yang to add a child container to make the toaster a nested node
15:05:16 <Neel_B> #info code updated in github
15:06:09 <Neel_B> #info Built the toaster and found the childtoaster and childtoasterbuilder generated.
15:08:06 <Neel_B> #info But the operational datastore has no entry of childtoaster so next steps would be to do a write transaction with childtoaster data in it and test it with our tests
15:08:36 <devinavery> Awesome
15:08:39 <devinavery> Thank you for the summary.
15:09:08 <devinavery> #info After testing with the child container and getting that to work, we will also need to test with child lists.
15:09:36 <devinavery> Neel - one thing. In order to get the XML for your child container you may actually want to modify the OpendaylightToaster class directly
15:09:56 <devinavery> I say that because then you could start up the real controller and through restconf get the XML out.
15:10:14 <devinavery> That way we are not guessing as to what the xpath statements for getting those children will look like
15:10:26 <devinavery> I don't know of an easier way to do that via the unit tests which is why I am suggesting it
15:14:49 <Neel_B> devinavery: i will try to change i will ask for help
15:15:00 <devinavery> Sounds good.
15:15:03 <devinavery> Ok. I think we have the next steps for now
15:15:11 <devinavery> Anything else regXboi? Neel_B?
15:20:16 <Neel_B> not for now
15:20:33 <devinavery> Ok. Will look for your e-mails :) And we will meet tomorrow sometime.
15:20:36 <devinavery> #endmeeting