MetroAE is built on a community model. The code has been architected to make contribution simple and straightforward. You are welcome to join in the community to help us continuously improve MetroAE.
We Use Github Flow, So All Code Changes Happen Through Pull Requests
Pull requests are the best way to propose changes to the codebase (we use Github Flow). We actively welcome your pull requests:
- Fork the repo and create your branch from
dev
. - If you've added code that should be tested, add tests.
- Make sure your code passes flake8.
- Issue that pull request!
All contributions must be consistent with the design of the existing workflows.
All contrinbutions must be submitted as pull requests to the dev branch, reviewed, updated, and merged into the nuage-metroae repo.
You must have a github.com account and have been added as a collaborator to the nuage-metroae repo.
-
Developing your code.
The manner in which you develop the code contribution depends on the extent of the changes. Are you enhancing an existing playbook or role, or are you adding one or more new roles? Making changes to what already exists is simple. Just make your changes to the files that are already there.
Adding a new component or feature is a bit more involved. For example, if you are adding support for the installation of a new component, the following elements would be expected unless otherwise agreed upon by the repo owners:
- A new user-input schema for the component must be created. See the exitsing files in the
schemas
directory. - A new deployment template must be created. See the existing files in the
src/deployment_templates
directory. - Add to the example data. All deployment templates and examples are auto-generated. The data in
src/raw_example_data
is used by the automatic generation to populate the examples properly. Also see the examples that have been auto-generated in theexamples/
directory. - Add your component and associated file references to
src/workflows.yml
. - Add your schema to
src/roles/common/vars/main.yml
. - Execute
src/generate_all_from_schemas.sh
to create all the required files for your component. - Create the proper roles. The following roles are required unless otherwise agreed to by the repo owners: newcomponent-predeploy, newcomponent-deploy, newcomponent-postdeploy, newcomponent-health, and newcomponent-destroy should be created under
src/roles/
- Create the proper playbooks to execute the roles: newcomponent_predeploy.yml, newcomponent_deploy.yml, newcomponent_postdeploy.yml, newcomponent_health.yml, and newcomponent_destroy.yml should be created under
src/playbooks/with_build
- Test, modify, and retest until your code is working perfectly.
- A new user-input schema for the component must be created. See the exitsing files in the
-
Test all proposed contributions on the appropriate hypervisors in the
metro-fork
directory. If you choose not to provide support for one or more supported hypervisors, you must provide graceful error handling for those types. -
All python files modified or submitted must successfully pass a
flake8 --ignore=E501
test. -
Add a brief description of your bug fix or enhancement to
RELEASE_NOTES.md
.
In short, when you submit code changes, your submissions are understood to be under the same APACHE License 2.0 that covers the project. Feel free to contact the maintainers if that's a concern.
Report bugs using Github's issues
We use GitHub issues to track public bugs.
Great Bug Reports tend to have:
- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can.
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
- 4 spaces for indentation rather than tabs
- 80 character line length
- TODO
By contributing, you agree that your contributions will be licensed under its APACHE 2.0 License.
Ask questions and get support on the MetroAE site.
You may also contact us directly.
Outside Nokia: [email protected].
Internal Nokia: [email protected].
This document was adapted from the open-source contribution guidelines for Facebook's Draft