...
Project Name | Project Description | has code |
---|---|---|
ccsdk/dashboard | Opeations Manager Dashboard | |
ccsdk/distribution | CCSDK distribution packaging (e.g. docker containers) | |
ccsdk/parent | Parent POMs to be used by CCSDK clients | |
ccsdk/platform/blueprints | Blueprints. not in Amesterdam release | |
ccsdk/platform/nbapi | Northbound API | |
ccsdk/platform/plugins | Platform plugins | |
ccsdk/sli/adaptors | Common adaptors for use by directed graphs | |
ccsdk/sli/core | Core Service Logic Interpreter classes | |
ccsdk/sli/northbound | Common northbound APIS related to service logic interpreter | |
ccsdk/sli/plugins | Common plugins used by direcged graphs | python |
ccsdk/storage/esaas | Elastic Storage as a Service. not in Amesterdam release | |
ccsdk/storage/pgaas | PGAAS (PostgreSQL as a Service) | java, python, bash |
ccsdk/utils | Utilities | bash, yaml |
Anchor | ||
---|---|---|
|
...
|
...
|
...
Command From ONAP gerrit
Use your linux foundation account to login onto ONAP projects.
...
coming soon
How to Commit Code
Install git-review
To commit code to ONAP, you must have git-review installed.
The steps in this section only need to be done one time, except the Tips
On Linux
run the following command to check if git-review is installed as part of your OS image.
git-review
If not the following command to install the git-review.
sudo apt install git-review
here's an example:
Info | ||||
---|---|---|---|---|
| ||||
ubuntu@beili-ws-01:~/Videos$ git-review The program 'git-review' is currently not installed. You can install it by typing: sudo apt install git-review ubuntu@beili-ws-01:~/Videos$ sudo apt install git-review |
On Windows
must have git installed
If you do not have git installed, following Install Git on Windows at atlassian's tutorials for installing git to
- download the Git for Windows installer
- start installer and follow Git Setup wizard screen Next until Finish prompts to complete the installation.
must have python installed
If you do not have python installed, following Python & pip Windows installation to
- download Python window installer
- start installer and select Add Python to PATH option
install git-review using pip
Open a git bash terminal by
- going to the bin directory under your git installed directory (for example, C:\Program Files\Git\bin directory ),
- run bash.exe
In the git bash terminal, run the following command to install git-review
c:/Python27/Scripts/pip2.7 install git_review --proxy <your proxy>
Set Git Remote Gerrit
Check your git remote setting, use the following command
git remote -v
Here's an example of output:
Info | ||||
---|---|---|---|---|
| ||||
C:\workspace\onap_sdnc\northbound>git remote -v |
If the gerrit does not exist, you need to set it up with the following command:
git remote add gerrit <the link of the origin>
Note: the remote origin is added automatically after git clone of the repo. The gerrit link is the same as the origin's, hence, we just directly use it.
Set Git Config
Use the following command to check your git config:
git config -l
Ensure that you have the following configuraiton set properly:
GIT Config Key | Expected Value | Setting Command |
---|---|---|
core.eol | lf | git config --global core.eol lf |
core.autocrlf | true | git config --global core.autocrlf true |
user.name | your name | git config --global user.name <your name> |
user.email | your email address | git config --global user.email <your email address> |
Anchor | ||||
---|---|---|---|---|
|
Checkout the master branch, work on your changes, once you are ready for submission, do the following to create a review.
- Ensure your workspace is clean and up-to-date
Use the following command to check all the changes in the master branch
git status
Ensure
- your branch is up-to-date with the origin/master
- do a git pull to get the latest master code
- all the changed files are the ones you wanted to submit.
- remove any un-wanted files
- your branch is up-to-date with the origin/master
2. Run the following commands in the listed order to create a review
Steps | Command | Notes | |||||||
---|---|---|---|---|---|---|---|---|---|
1 | git commit -sam <comment summary> | Commit summary should not exceed 50 char. See ONAP Commit Messages for more details. | |||||||
2 | git log --shortstat | To ensure change lines are properly done and your commit has the following:
Here's an example:
If the Change-Id does not exist, do not proceed. You need to following SDNC - Development Environment Setup to fix it before proceeding further. | |||||||
3 | git commit --amend | Use this command to do the following:
| |||||||
4 | git review | This command will create the review at Gerrit. Once this command is completed, your newly created review can be found from Outgoing reviews in Gerrit self dashboard . |
3. Update the Gerrit Review to get ready
From Gerrit self dashboard, click your newly created review, it will bring up the review details.
Click the Add button in the Reviewers section, to add reviewers (who is going to review your code) and committers (who is going to review your code as well as approve and commit your code).
Note:
- The ONAP Jobbuilder will be added automatically within one or two minutes after the review created, and a verfiy build will also be automatically triggered for your review in ONAP jenkins server.
- The committer can be found from Software Defined Newtork Controller secion in Resources and Repositories page.
By now, you will just wait and check your email for information of
- If the verify jenkins build is passed for your review
- If it is passed, ONAP Jobbuilder will add a +1 to the Verified field in your review.
- If there's any comments in your review
- the comments details can be view from the History section by clicking on the description or Expand All button
- If your review has been merged
- If your review is merged or in process to be merged, you will see in the Code-Review field, you have a +2 from one of the committer you have added in your Reviewers.
Tips
How to Change the Comments in A Review
Oops, I made a mistake in my review comments. It cannot be changed in the gerrit review.
Go back to your workspace, and do the following to change the comments of your existing review.
Steps | Command | Notes |
---|---|---|
1 | git commit --amend | update the comment as desired |
2 | git log --shortstat | validate your commit now has the updated comments, as well as the Change-Id as the one in the gerrit review |
3 | git review | push the changed comment to the review again. Once the command is completed, go to your review, you will see
|
How to Update the Code in A Review
Now, I got comments in my view, and I have made the code adjustment in my workspace and tested.
Follow the steps to push your new code changes to the your existing reiew.
Steps | command | notes |
---|---|---|
1 | git commit -sam "my updated code" | To create a new commit with your updated code |
2 | git log --shortstat | you will see the most 2 recent commits are from
|
3 | git rebase -i HEAD~2 | To run rebase interactively for the most recent 2 commits In the interactive mode, it will bring up the text which contains pick for your last 2 commits along with the following content: Do the following:
Once this command is completed, 2 commits will be merged into 1 commit. |
4 | git log --shortstat | you will see there's only 1 commit which replaces the 2 commit you have seen in step 2. validate your commit has the Change-Id as the one in the gerrit review |
5 | git review | push the changed comment to the review again. Once the command is completed, go to your review, you will see
|
Anchor | ||||
---|---|---|---|---|
|
The would only happen when you are creating your very first review in a repo. It mainly because your workspace might have some mis-config which lead your repo clone was not done properly with the Clone with commit-msg hook option.
Follow the steps below to do the correction.
Steps | Command | Notes |
---|---|---|
1 | git reset HEAD~1 | to undo the commit |
2 | from github helper page, download commit-msg, and place it under your <repo>/.git/hook directory | set the proper commit-msg hook this will set the Change-Id properly in your commit |
3 | Use your previous command to create the commit again | |
4 | git log --shortstat | to check the existence of Change-Id |
How to Find All of My Merged Changes
You can find your recent merged changes from Gerrit self dashboard, however, it only works for Recent changes.
To find all of your changes, you can type in "is:closed(owner:self)" in the Search field at Gerrit self dashboard, then click on the Search button.
coming soon
How to Deploy a minimal ONAP sdnc environment
...