How to commit code to OpenStack

  sonic0002        2013-08-04 23:04:45       4,418        0    

If you want to make contributions to OpenStack, the best way to start is to help the community with blueprint or submit bug fix. To commit codes, you need to conform to some rules in the community.

Work flow

  1. Register an OpenID
  2. Apply for a CLA certificate
  3. Apply for company CLA certificate
  4. Update contributor list
  5. Join OpenStack Contributors group and OpenStack group
  6. Set up SSH Keys
  7. Get a blueprint/bug
  8. git clone codes to local disk. Configure user name and user email and openid
  9. Modify codes in a limited time and complete all the tests. The codes must conform to PEP8 guideline
  10. If goes over the limited time, need to click "Restored" button
  11. Submit codes for review with git review
  12. Wait for review results
  13. Modify codes as reviewer request if necessary. Use git commit... -amend to submit modifications
  14. git review gain until it's successful

Test requirements

import library should be alphabetic ascending order  
  
pep8 check:  
sudo apt-get install pep8  
~/nova$ pep8 .  
  
nosetest:  
sudo pip install nose  
~/nova$ nosetests .  
  
novatest:  
~/nova$ sudo ./run_tests.sh [api/xxx/xxxx.py]  
For example:./run_tests.sh test_db_api  
  
tempest-devstack:  
cd devstack; source exerciserc; ./exercise.sh  

Comment requirements

The first line should be summary of location modification

Leave an empty line

Then write the detailed description

Leave an empty line again

Write the corresponding bugid and bpid, then followed with changeid. The system will determine which bg it belongs to with the changeid in the comment.

Implement bp:efficient-limiting.  
  
1.add limit param to db.instance_get_all_by_filters()  
2.execute limit before sqlarchmy get_all()  
  
Fixes: bug #1003373  
Implements: blueprint xxxxxxxxxxx  
Change-Id: Iea3eeb7b51194b6017d624506aafc6469d7338e4  

Update requirements

Before execute git review, you should ensure the codes to be reviewed is the latest version.

git fetch origin master  
git rebase FETCH_HEAD  
git add .  
git commit --amend  
git review  

If there is conflict with git rebase, you should manually resolve the conflict and execute git rebase --continue

F.A.Q

Q. The reviewed codes failed the testing due to server issue

A。 Execute review on this patch. If it's SmokeStack, enter reverify, if it's Jenkins, then enter recheck

References

Community : nova bugs | review.openstack.org | blueprint |

Documents : GerritWorkflow | assign-commit-and-review | progit

Source : http://blog.csdn.net/ffb/article/details/9625011

CONTRIBUTION  OPENSTACK 

       

  RELATED


  0 COMMENT


No comment for this article.



  RANDOM FUN

Spurious wakeup without spinlock