Skip to content

Instantly share code, notes, and snippets.

@rsjethani
Last active October 13, 2016 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rsjethani/83c217ba4104508bddd9e8aab9020843 to your computer and use it in GitHub Desktop.
Save rsjethani/83c217ba4104508bddd9e8aab9020843 to your computer and use it in GitHub Desktop.
General Contribution Guidelines for an OpenStack Developer

OpenStack Contributor Guidelines

Writing Code

Follow OpenStack Coding Style and OpenStack Coding Standard as much as possible.

Commit Messages

Commit messages should follow these guidelines. If a patch is a work in progress then the commit message may start with 'WIP:' for example:

WIP: This is a work in progress

[More details about this commit]

Testing your Code

  • Use mocks and data fixtures as much as possible but be careful not to overuse them.
  • Keep in mind that 100% or exhaustive testing is waste but still test cases should cover majority of the code.
  • Before writing new tests search in existing code(same project or other) to see whether similar tests have already been written.
  • Sometimes changes made in code would require you to write both functional and unit test cases.

Before Submitting Patch to Community

  • Get the patch reviewed internally.
  • Make sure PEP8 and other tests are not failing.

Before Submitting Patch for Internal Review

  • PEP8 tests should not be failing.
  • Unit/functional test cases should not be failing.
  • Commit message should be as discussed earlier
  • Understand devstack at
  • Use LOG_DAYS in local.conf to limit the size of log data from services otherwise a lot of disk space will be usd up by service log data
  • If the devstack VM crashes or we may have to restart it for some reason then we have to maually get the services runnning. There are two ways to restart the services:
    1. Perform stack process again. This process takes quite a bit of time but is guranteed to give a clean environment.
    2. Run screen -c $DEVSTACK_PATH/stack-screenrc. Most of the time this will work properly otherwise fallback to previous method.

Using the Screen

The screen tool is used to check logs of various openstack services. Although the tool has many commands/functions here we have listed out commands for the common use cases:

ctrl + a then 'n':

Move to next service screen

ctrl + a then 'p':

Move to previous service screen

ctrl + a then "(double quotes):

See the list of all services running. Here you can select a service using up/down arrow keys then press enter to jump to that service

ctrl + a then 'd':

Exit/detach screen tool without killing the services

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment