Follow OpenStack Coding Style and OpenStack Coding Standard as much as possible.
- 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]
- 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.
- Get the patch reviewed internally.
- Make sure PEP8 and other tests are not failing.
- 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:
- Perform stack process again. This process takes quite a bit of time but is guranteed to give a clean environment.
- Run screen -c $DEVSTACK_PATH/stack-screenrc. Most of the time this will work properly otherwise fallback to previous method.
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