Group Based Policy (GBP)/Contribution Guidelines
This document describes setting of development environment for contribution to Group Based Policy project.
For pushing changes to Gerrit, SSH keys need to be installed on your environment and on server side as well. The following Gerrit setup guide will walk you through all the necessary steps.
To download source code, visit Opendaylight Gerrit web. Sign in and navigate to Projects -> List -> groupbasedpolicy . Copy the download link to clone the project into your local environment. In your terminal window navigate to directory where you prefer to download the project and paste the copied link. The code will be pulled from master branch.
Pulling code from specific branch to new local branch might be done by using git commands:
git branch -f remote_branch_name origin/remote_branch_name git checkout remote_branch_name git remote show origin
Set your username and email, when using Git for the first time.
git config --global user.name "Tomas Cechvala" git config --global user.email firstname.lastname@example.org git config --list
Setting Formatter in Eclipse
Open Eclipse and navigate to Window > Preferences > Java > Code Stype > Formatter. Import file groupbasedpolicy/eclipse-java-clean-code-style.xml and save.
To push changes for review, you need to stage them for commit and push them to remote branch.
git status git add <file-path> git status git commit -s git push origin HEAD:refs/for/<remote-branch-name>
In commit message, you should see your account settings.
- If you would like to push changes that could be later published for merging or discarded, use drafts on Gerrit. Here is a simple example of creating a draft submission.
git status git add <file-path> git status git commit -s git push origin HEAD:refs/drafts/stable/lithium
If you need to resubmit your changes, copy the Checkout link from the review screen at Gerrit. Navigate the terminal window into your local repository and paste the copied command. You will be switched to detached branch. Switch to a new one, edit what you need and commit your changes with --amend option to load your previous commit message.
git checkout -b <new-branch-name> git status git add <file-path> git status git commit -s --amend
When patching your previous commit, you need to have Change-Id in the commit message. If it is missing, you have to copy it from Gerrit review window. Otherwise Gerrit will consider this change as a new commit. When merging your modifications with the code base, changes and commit message of the last patch set will be used. There is no need to modify commit message when publishing new patch set.
Running Sample Integration Application
GBP-SFC Ingerration Demo wraps integration efforts of Group Based Policy and Service Function Chaining.
GBP-Devstack Ingegration Demo wraps networking mapping from Devstack to Group Based Policy.
Information about third party software used for integrated demo applications: