How to Submit a Patch

Congratulations and many thanks!  Getting to this page means that you have helped Floodlight advance by fixing a bug, creating a new module, or adding supporting contents that will help the Floodlight community in general!  As you prepare to submit your contribution, we would like to remind you following a few very important steps:

  1. Make sure you have completed unit tests and integration tests for your code.
  2. Make sure you have created documentation of your module, including purpose, brief design description, and usage notes.
  3. Make sure you have discussed your work with the community. Write to our email list.
  4. Make necessary changes/fixes to your code as the community and the committers' suggestions for assuring integrity of Floodlight
  5. Make sure you have added Apache license header to all your files, and submit your code to github based on instructions below.

Some useful information is summarized in the check list below.

Check list:

  1. Coding Style
    1. Make your code as readable as possible, please. Please match the existing style.
  2. Testing
    1. Unit Tests
      1. If you have added new functionality please make sure that appropriate unit tests have been added.
      2. If you have modified existing functionality please make sure the existing tests pass.
      3. If you have fixed a bug please make sure to write a unit test so it doesn't happen in regression.
      4. All tests must be passing before we can accept the code.
    2. Integration Tests
      1. For any medium to large size project an integration test is required.
      2. Integration tests must be written using the Floodlight-Test framework.
      3. If you modify functionality that affects existing tests those must be modified to match the new functionality.
  3. Submitting the code
    1. Update your git repository to the latest floodlight master branch:
      1. under your floodlight source diretory, do 'git pull upstream master' (assuming you have configured upstream to be the floodlight/floodlight repo)
      2. If applicable, resolve any merge conflicts.
      3. Create a pull request to the floodlight/floodlight project on GitHub.
        1. If you're code needs extra integration, an administrator of the Floodlight project may ask you to submit a pull request to their private fork instead.
        2. If you would like community feedback on your patch, email the Floodlight mailing list with a link to the pull request and ask for feedback.
    2. Intellectual Property
      1. Review the Developer Grant and Certificate of Origin.
      2. In your pull request you must include the text "Floodlight-DCO-1.0-Signed-off-by: Joe Smith <your@email.com>" with your real name and email.