Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

0

how to modify helium's source code?

asked 2015-03-27 01:15:33 -0800

anonymous user

Anonymous

updated 2015-03-31 03:35:32 -0800

How can I add a module in opendaylight, similar to VTN, but the implementation to divide table 0 in multi-level flow table of openflow1.3 not using the VLAN ID. so I need to modify the source code of openflow-plugins and so on to add a match field and to divide multi-level tables; could please provide a method to modify the code of Helium's source code?thanks

edit retag flag offensive close merge delete

7 answers

Sort by » oldest newest most voted
1

answered 2015-03-30 02:43:53 -0800

leclem gravatar image

updated 2015-03-30 04:38:09 -0800

I had the same problem, and I agree there should be some "step by step" introduction in the wiki.

What worked for me is :

  1. Download the projects you need, in your case I think :

    git clone -b release/helium-sr3 https://git.opendaylight.org/gerrit/controller

    git clone -b release/helium-sr3 https://git.opendaylight.org/gerrit/openflowjava

    git clone -b release/helium-sr3 https://git.opendaylight.org/gerrit/openflowplugin

  2. Set up your the file settings.xml like specified here

  3. Modify what you need to modify (some of the logs for the first time, just in order to see if it worked) and compile the projects you modified with mvn clean install. The files will be stored in ~/.m2/repository/

  4. download and compile :

    git clone -b release/helium-sr3 https://git.opendaylight.org/gerrit/integration

    cd integration

    mvn clean install

  5. Execute the files in distributions/extra/karaf/target/assembly/bin like specified here : https://wiki.opendaylight.org/view/Getting_started

Normally the changes you did in step 3 will be taken into account when you execute. Hope it works for you too !

edit flag offensive delete publish link more

Comments

Thank you very much ,I will try it ,if I meet questions ,I will feedback to you .

wangruxun ( 2015-03-30 18:24:11 -0800 )edit

Could you give me an example?such as you modify the code .

wangruxun ( 2015-03-30 20:07:48 -0800 )edit

Of course, for example on controller/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java Method start(), after startUp(); , write : log.info("MODIFICATIONTEST : SwitchManagerStart");

leclem ( 2015-03-31 00:55:26 -0800 )edit

(without tabulations/trailing spaces because it raises a checkstyle exception) Compile conctroller and integration, launch integration karaf and mininet and check for the string "MODIFICATIONTEST : SwitchManagerStart" in file integration/distributions/extra/karaf/target/assembly/data/log/karaf.log

leclem ( 2015-03-31 00:57:57 -0800 )edit

thanks for you help ,I have already understand it .you mean add a log to the source code ,compile controller to make change.Then launch integration to check the karaf.log

wangruxun ( 2015-03-31 01:41:24 -0800 )edit
0

answered 2015-03-27 01:42:09 -0800

Dana gravatar image

updated 2015-03-27 01:42:34 -0800

try wiki

edit flag offensive delete publish link more

Comments

But your example is too simple;could give me an complex example to let me see it .such as modify a sub-item of opendaylight;for example modify the openflow plugins,to make it take effect in controller .or ,add a mach filed in openflow 1.3 protocol.thanks

wangruxun ( 2015-03-31 01:47:24 -0800 )edit
0

answered 2015-03-27 02:23:18 -0800

wangruxun gravatar image

I think you misunderstand my question .I want to modify source code of Helium .not to submit it.

edit flag offensive delete publish link more

Comments

I didn't. Submitting the code is the last phase, that you can skip. The wiki is about getting the source code to your local machine, so that you can see it and modify it.

Dana ( 2015-03-27 02:41:12 -0800 )edit

I have already downed the source code,how to modify,can you provide some example?

wangruxun ( 2015-03-27 03:49:52 -0800 )edit

I'm not sure what are you asking. You can try import it into eclipse: https://wiki.opendaylight.org/view/Eclipse_Setup#Importing_the_Source_Into_Eclipse

Dana ( 2015-03-27 03:58:29 -0800 )edit

I think it is too complex .It is easy to go wrong,I have modified code in hydrogen release ;but I donnot how to modify in helium release.Offical website not provide examples about modify code and add module.I think it is very pity.

wangruxun ( 2015-03-27 05:19:36 -0800 )edit

There are examples, but within specific projects. As I don't know what your module does, I don't know where to point you. Have you tried toaster example? https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Toaster_Step-By-Step

Dana ( 2015-03-27 05:26:55 -0800 )edit
0

answered 2015-03-28 06:36:39 -0800

gyanesh gravatar image

The best examples i found are available at: https://wiki.opendaylight.org/view/ControllerCoreFunctionalityTutorials:Tutorials:StartingA Project https://wiki.opendaylight.org/view/OpenDaylightController:MD-SAL:StartupProjectArchetype These tutorials provide the option to use "archetype" to create a new project in Helium from scratch.

edit flag offensive delete publish link more

Comments

But your example is too simple;could give me an complex example to let me see it .such as modify a sub-item of opendaylight;for example modify the openflow plugins,to make it take effect in controller .or ,add a mach filed in openflow 1.3 protocol.thanks

wangruxun ( 2015-03-31 01:47:18 -0800 )edit

@wangruxun , Follow Leclem suggestion. In that steps are you facing any issue ? Or need any clarification ?

faizan ( 2015-03-31 02:11:56 -0800 )edit

I have already understanded Leclem's suggestion ;but his modification is too simple ;I donnot know how to modify controller 's protocol plugin ;which is related to openflow plugin and openflow java project.

wangruxun ( 2015-03-31 02:54:47 -0800 )edit
0

answered 2015-03-28 09:53:46 -0800

faizan gravatar image

updated 2015-03-28 09:55:09 -0800

Hi Wangruxun,

What you need to do is download the souce code,For example Helium Controller SR. Made you changes into any module you wish,build that module and start you controller i.e in karaf. The changes will reflect (You can use Logger to verify it too ).

Regards, Faizan

edit flag offensive delete publish link more

Comments

how to bulid sub model of the controller, I have never do it ,Can you give an example, thank you

wangruxun ( 2015-03-29 18:53:09 -0800 )edit

But your example is too simple;could give me an complex example to let me see it .such as modify a sub-item of opendaylight;for example modify the openflow plugins,to make it take effect in controller .or ,add a mach filed in openflow 1.3 protocol.thanks

wangruxun ( 2015-03-31 01:47:08 -0800 )edit

Is Openflow plugin module is in Controller ? If yes just make your changes in the code, and build it with mvn clean install. If not then make your changes in project Openflow plugin and build it, then build integration project which will pick up the already build Openflowplugin with changes. run it

faizan ( 2015-03-31 07:06:53 -0800 )edit

I think your answer is right,I will try it

wangruxun ( 2015-04-06 18:46:37 -0800 )edit
0

answered 2015-03-30 18:37:00 -0800

wangruxun gravatar image

Could you give me an example?such as you modify the code .

edit flag offensive delete publish link more

Comments

There are a lot of different projects. There is no 'general' way how to modify code. If you want to specifically modify openflow I suggest you contact OF devs: openflowplugin-dev@lists.opendaylight.org

Dana ( 2015-03-31 05:44:53 -0800 )edit
0

answered 2015-05-13 04:55:56 -0800

dhn.irshad gravatar image

steps to download the helium stable branch and compile-

  1. project# sudo apt-get install git
  2. create ODL account from the path mentioned below, if you have not already registered- https://identity.opendaylight.org/carbon/user-registration/user-registration.jsp

  3. execute the below code at terminal where you want to download the code- project# git clone -b stable/helium https://username@git.opendaylight.org/gerrit/controller In this example git will download the Helium stable code.

  4. Now you have the stable helium code. Modify the code as per your requirement. I suggest you to first change the logs at initial level to verify the code change. Next you have to verify whether your build procedure going to SUCCESS or not before changing the original code.

  5. go to the below mentioned path and execute the command- project/controller/opendaylight/distribution/opendaylight# mvn clean install

  6. At the end you will get "BUILD SUCCESS".

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
3 followers

Stats

Asked: 2015-03-27 01:15:33 -0800

Seen: 1,183 times

Last updated: May 13 '15