...
- Linux Foundation ID: You will need this to access JIRA and Gerrit. You can register for an ID here.
Knowledge of reStructuredText (RST): All documentation at ONAP is authored in RST. For the most part you can follow the style of other requirements and content without being an RST expert, but understanding basics may be useful. The ONAP Documentation project has some useful guides and tutorials here.
Python 2.7, 3.6+: You will not need to write any Python code, but it is required to generate the documentation from reStructuredText. If needed, you can find installation instructions for your system here.
- Git: This is the version control tool used by ONAP. If not present on your system, then refer to Git's Getting Started - Installation Guide for more information
- Git Review: This is the command line extension to Git to enable changes to be submitted to review to Geritt. This needs to be installed after you have installed Git and Python.
Tox: This is a tool to run the build. It must be installed after you install Python. Install it using pip.
Code Block > pip install tox
VNF Requirements Standards:
FamiliarizeFamiliarize yourself with the VNFRQTS Requirement and Documentation Standards
Setup
Before submitting your first change, you will need to configure Git and Gerrit to work together. That is outside the scope of this guide, but you can find more information here.
...
- Before submitting a change, open a JIRA ticket to introduce the change.
- Project: VNF Requirements
- Issue Type: Story for changes that can be incorporated via a single change, Epic if the updates will require multiple commits. If you need an Epic, then you will need a story for each set of changes you wish to make. If the changes you are proposing are substantial, then you may need to create an entry in VNF Requirements Proposals for discussion before proceeding with your requirement changes.
- Summary: Descriptive summary of the changes to be made
- Fix Version: Target ONAP release for your changes
- Clone the appropriate repository for your content (see VNFRQTS Requirement and Documentation Standards for guidance and links).
- Example: git clone ssh://git@gerrit.onap.org:29418/vnfrqts/epics
- Navigate to the directory you cloned the repository into
Run the following command to generate the documentation and verify everything works properly
Code Block language bash title build docs <project-dir> tox -e docs
- If everything works properly, this will generate the HTML documentation in the
docs\_build\html
directory
Editing the Documents
- The first order of business will be determining if this requirement should be contributed to the latest version of the requirements, or if it is intended for a prior release. If you simply, just need to make a change to the latest content then jump to step 3
- If you wish to change content in a prior release, then you must checkout that branch. For example, if the master branch is now associated with Dublin, but the change you need to make is for Casablanca, then you will need to do the following:
Fetch the remote branches and checkout the appropriate release branch
Code Block > git fetch > get checkout casablanca (Or whatever the appropriate release branch name is)
- If you will be adding requirements (NOTE: this is only applicable when working on the
vnfrqts/requirements
repository), then you will need a block of requirement IDs to use. Determine the number of requirements you intend to add and use the make_ids.py to generate the requirement IDs (don't worry you can always generate more)The following command will generate 5 random, unique requirement IDs for your use. The requirement IDs you generate will not conflict with any requirement already in the document, but they are not strictly reserved. The build process will throw an error if your requirement ID is a duplicate.
Code Block language bash title Generate Requirement IDs <project-dir> python make_ids.py 5 R-##### R-##### R-##### R-##### R-#####
Edit the RST documents in the docs folder. Be sure to format any requirements according using the
.. req::
directive as defined in the standards.Code Block language text title Example Requirement .. req:: :id: R-12345 :keyword: MUST :target: VNF PACKAGE :introduced: casablanca :impacts: sdc :validation_mode: static The VNF Package **MUST** include element XYZ as part of the CSAR package in the ABC directory
- After you have made your changes, rebuild the documentation using the
tox -e docs
command, and view the changes in browser to ensure they are formatted correctly. This will also regenerate the JSON version of the requirements that are located in docs/data/needs.json. This is the filemake_ids.py
uses to ensure new requirement IDs do not conflict and the JSON version is also downloadable via the Requirements List chapter of the Requirements document. - Once you are satisfied with your change, then it will be time to commit and submit your changes for review
...
Initialize your repository to work with Gerrit
Code Block > git review -s
Add your changes to git
Code Block > git add --all
Commit your changes
Code Block > git commit -s
- Your default, configured editor will open to provide a commit message. Please ensure that your commit message adheres to the ONAP Commit Messages standards or your submission will be automatically rejected by Gerrit.
- NOTE: At the bottom of your commit message be sure to include the line Issue-ID: VNFRQTS-#### that corresponds to the JIRA ticket you opened for this change.
- Now you are ready to push your changes to Gerrit using git review
Code Block > git review {branch name} where {branch name} is the name of your target branch (ex: casablanca)
Once you have successfully pushed the change up, please log into Gerrit and add reviewers
- Log into your dashboard
- See your Outgoing Reviews and click on the link corresponding to your review
- Click Add to add reviewers
- Add the following reviewers to your review
- Steven Wright
- Hagop Bozawglanian
- Any additional reviewers you feel would add value
- Please pay attention to your inbox following the creation of your review. The ONAP Jobbuilder will attempt to build your documentation and may reject the change if there are problems. Please see review it's messages and resolve any issues that it raises.
...
4. Finally resubmit your change via git review and your change will be updated
Code Block |
---|
> git review {branch name} where {branch name} is the name of your target branch (ex: casablanca |
After Your Changes Are Accepted and Merged
...