Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Make sure to fill in your ONAP Gerrit password. This should be the same as for logging in to Linux Foundation. Once the screen is filled in, select "Next".
  • It will then prompt you for the branches to select. Click "Deselect All", then choose just "master" and click "Next". The popup should looks like this:
    Image Added
  • You will then be prompted to select create a local directory on your machine into which the model should be loaded by Git.
    • It can be any location you want, and not necessarily the workspace you are using for Eclipse/Papyrus projects.
    • Check the box "Import all existing Eclipse projects
    ...
    • after clone finishes".  Your screen at this point should look something like this:
      Image Modified
  • Select "Finish".
    • For a first-time setup, you may get the following message. Select "Yes".
  • The cloning process should complete, and the repository should be created on your local machine.
  • The view below shows an example of the newly created repository which has been opened up down to the level of the "Local" folder. Only the "master" branch should show up as your "Local".

...

  • Go to the Papyrus perspective by selecting  , for example by selecting the menu item "Window"→"Perspective"→"Open Perspective"→"Other..." on the top of your screen and then select selecting "Papyrus".
  • This perspective should show a "Project Explorer" on the left side of the screen that looks something like this:


  • You should see your newly created Eclipse/Papyrus project in the "Project Explorer" on the left side of the screen. (ignore the question mark, it shouldn't be there)


  • The text in light brown is telling you that your project is in the modelspec repository you just created, in the branch "master". Note that all model work is being performed in the "master" branch.
    • If you do not see the project in the "Project Explorer", probably you forget to check the box to import all existing Eclipse projects when cloning the model. To fix this, switch to the Git perspective, select the repository name or the Working Tree, then right-click and select "Import projects...".
  • If you click on the ">" to open/explore the ONAP Information Model folder, you will see something like:

...

Updating the Model in Gerrit

Only approved model editors can update the working branch in Gerrit. To be a model editor you must undergo Papyrus training.

  • Current model editors for each submodel are specified here.

Before making changes, always ensure that you have the latest version of the model from the ONAP Gerrit repository.

  • If you have not yet cloned the model, the clone process will provide you with the latest version.
  • If you have already cloned the model into your workspace, make sure to "Fetch" the latest updates from Gerrit before making any changes.

Once you have finished making your model changes, select "File"→"Save" or click the Save icon.

Staging changes

Only changes that have been staged will be included in the Push to Gerrit.

  • If this is a first-time that you're updating the model, make sure that you first have set up the user information for Gerrit properly.
  • Next, go to the Git perspective, for example by selecting "Window"→"Perspective"→"Open Perspective"→"Other..." on the top of your screen and then select selecting "Git".
  • Once in the Git Perspective, select the repository where you have changed the files:
  • Select the "Git Staging" tab in the lower right hand portion of your screen (it It might also be on the right-hand side of your screen based depending on your layout.)
    • It looks like this
    : Image Removed
    • , with a little green down-arrow:
      Image Added
  • The Git Staging window looks like this:
  • You will see all of the files that you have changed in the "Unstaged changes".
    • Note: If there is a file in the list that you did not intend to change, you can revert the unwanted changes by right-clicking on that file and selecting "Replace with HEAD revision".
  • For each changed file that you want to stage, right-click and select "Add to index". Once they have been added, the files will move to "Staged Changes".
    • As a shortcut, you can select the little green "++" sign that will add all the files for you:
    • After you hit the green "++" it should look something like this:

...

  • Position your cursor in the "Commit Message" window.
  • Add a commit message indicating the change you have done, i.e. "Added new diagram to service model".
  • Then press carriage return twice so that you have a blank line after your message.
    • You can then optionally add a more detailed message about the change.
  • Next, you will have to associate the change to a JIRA ticket. Add on the line after the blank line:  Issue-ID: MODELING-xxx
  • Git should generate a "Change-Id" for you, so you don't need to manually add one.
    • If there is no "Change-Id" line in the "Commit Message" window, click the "Add Change-ID" icon to the right on the same line as the "Commit Message" title.
  • Then "Sign-off" on the change by clicking the "Add Signed-off-by" icon that looks like a pen and is on the same line as the "Commit Message" title:

                   

...

Commiting to your local repository and

...

pushing to remote Gerrit

  • Now you are ready to select "Commit and Push". This commits your local changes and pushes them to the remote Gerrit repository (which should be the working branch).


    • Note that the "Committer" must correspond to the user name and email you have associated to your Gerrit account. If they don't, follow the instructions here: ONAP Gerrit user setup in Eclipse
  • After you press "Commit and Push...", you will see this popup:
  • Click "Finish".

...

  • If your commit and push fails for any reason, once you have fixed the problem, you can try to resend the request by selecting the "Amend (Edit previous commit)" icon in the Commit Message bar:
  • If you want to roll back your failed commits:
    • Go to the Git Perspective by selecting "Window"→"Perspective"→"Open Perspective"→"Other..." on the top of your screen and then select "Git".
    • Right-click on the "modelspec" repository and select "Reset...".:
    • Select "Remote Tracking"→"origin"→"master", then "Mixed", and then click "Reset".
    • This operation will let your local back to keep aligned with the remote merged changes, then you can do a new commit.

...

Exporting the ONAP Model

...

Exporting to a Word Document

GenDoc is a plugin to Eclipse/Papyrus that enables you to output the model to a Word document. (See installation instructions for the GenDoc plug-in above.)

...

  • Once you have updated the GenDoc template, right-click on the template file and select "Generate documentation using Gendoc"
  • The GenDoc utility is invoked and the template is run.
  • By default, the template creates a directory "GenDoc_output" in your workspace, if it doesn't already exist.
  • It then creates a Word doc that contains the model name and the current date-time in its name.
  • To see the newly directory and file, select "File"→"Refresh".

  • As an alternative:
    • Create your own private folder for the Gendoc template by selecting  "File"→"New"→"Folder". Give the folder a name.
    • Then select "File"→"Import"→"File System" and import the Gendoc template from your "ONAP Information Model"/Gendoc directory .
    • This imported file is now your own private copy. You can run the template using the same procedure described above.

...

Exporting to an Excel File

Papyrus provides the capability to export fragments of the model to tables.

...