Difference between revisions of "NFV SpecFest Wiki"
(→In case of SUCCESS) |
(Redirected page to NFV Specfest Wiki) |
||
(14 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | #REDIRECT [[NFV Specfest Wiki]] | |
− | = | + | {| class="wikitable" |
+ | |- | ||
+ | | ''Dear reader, in case of missing or incorrect information on this wiki page you are welcome to contact us at cti_support@etsi.org''. | ||
+ | |} | ||
− | + | == Contribute an OpenAPI<sup>TM</sup> specification to the ETSI Forge! == | |
− | + | Welcome to the Wiki page of the NFV Specfest event. | |
− | The specification used for the task will be ETSI NFV GS SOL 002 [https://portal.etsi.org/webapp/WorkProgram/Report_WorkItem.asp?WKI_ID=49492] and for the sake of brevity we will use a greatly simplified extract which describes the operation and data structures to be used in the | + | The goal of the present tutorial is to create a collaborative OpenAPI<sup>TM</sup><ref>OpenAPI<sup>TM</sup> is a Trade Mark of the Linux Foundation. Find more info at [https://www.openapis.org www.openapis.org].</ref> specification on the ETSI Forge. The proposed activity aims at '''translating an extract of an [http://www.etsi.org/technologies-clusters/technologies/nfv ETSI NFV] specification into a machine readable API description, formatted in the OpenAPI<sup>TM</sup> language'''. |
+ | |||
+ | [[File:NFV Specfest.png|500px|frameless|center]] | ||
+ | |||
+ | The specification used for the task will be ETSI NFV GS SOL 002 [https://portal.etsi.org/webapp/WorkProgram/Report_WorkItem.asp?WKI_ID=49492] and for the sake of brevity, we will use an example document (a greatly simplified extract of the original specification) which describes the operation and data structures to be used in the activity. | ||
<div class="center ext" style="width:auto; margin-left:auto; margin-right:auto;"> | <div class="center ext" style="width:auto; margin-left:auto; margin-right:auto;"> | ||
− | <div style="font-size: 16pt">--> [https://forge.etsi.org/wiki/images/a/ac/Nfv-specfest-sol002-extract.pdf Download | + | <div style="font-size: 16pt">--> [https://forge.etsi.org/wiki/images/a/ac/Nfv-specfest-sol002-extract.pdf Download SOL002 example here] <--</div> |
(The link will automatically open in a new tab) | (The link will automatically open in a new tab) | ||
</div> | </div> | ||
− | |||
What you need: | What you need: | ||
− | * A laptop (all operating system supported) | + | * A laptop (all operating system supported) with [https://www.google.com/chrome/index.html Google Chrome browser] or [https://www.opera.com/ Opera browser] installed. |
− | + | * The SOL002 example linked above. | |
− | * The SOL002 | ||
* This wiki page. | * This wiki page. | ||
Line 33: | Line 38: | ||
== Step 1: Edit the template == | == Step 1: Edit the template == | ||
− | <div class="center" style="width: 83%;margin-left:auto;margin-right:auto;border: 1px solid black;margin-bottom: 20px;margin-top: 20px;"> | + | <div class="center" style="color:red;width: 83%;margin-left:auto;margin-right:auto;border: 1px solid black;margin-bottom: 20px;margin-top: 20px;"> |
Make sure you are using Google Chrome or Opera as your browser from this point on. | Make sure you are using Google Chrome or Opera as your browser from this point on. | ||
</div> | </div> | ||
− | + | <big> | |
You are now ready to edit the OpenApi specification online. Below you will find the link to the online editor which will contain a template with comments and instruction on how to fill in the required information. Please note: | You are now ready to edit the OpenApi specification online. Below you will find the link to the online editor which will contain a template with comments and instruction on how to fill in the required information. Please note: | ||
− | + | # If you close the Editor page, you will '''loose your work'''. | |
− | + | # Do not worry if you see some errors on the right part of the window: '''keep following the instructions''' in the comments and the errors will disappear. | |
− | + | # The template is divided in two parts: '''Part 1: Resource paths and operations''' and ''' Part 2: Data types definitions''' which refer respectively to pages 1 and 2 of the SOL002 Example given. Part 2 is optional and you can decide whether to tackle it. You will find instructions in the appropriate part of the template. | |
− | + | # Once you are done editing, '''do not close the editor page''' and come back to this wiki page for the next step: '''Contribute the specification to the ETSI Forge'''. | |
− | + | # If you are in doubt, check the '''expected result''' at <span class="ext">[https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/rep/gitweb.cgi/nfv-specfest.git/blob_plain/HEAD:/sol002-example.yaml Solution]</span> (The link will automatically open in a new tab); | |
− | + | </big> | |
<div class="ext center" style="width:auto; margin-left:auto; margin-right:auto"> | <div class="ext center" style="width:auto; margin-left:auto; margin-right:auto"> | ||
<div style="font-size: 16pt">--> [https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/rep/gitweb.cgi/nfv-specfest.git/blob_plain/HEAD:/sol002-template.yaml Template to edit] <--</div> | <div style="font-size: 16pt">--> [https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/rep/gitweb.cgi/nfv-specfest.git/blob_plain/HEAD:/sol002-template.yaml Template to edit] <--</div> | ||
Line 97: | Line 102: | ||
=== In case of FAILURE === | === In case of FAILURE === | ||
− | If the validation job fails you are still able to modify your contribution until it gets valid. Each time you modify the content of the contributed file, the automatic validation will be again activated and will | + | If the validation job fails you are still able to modify your contribution until it gets valid. Each time you modify the content of the contributed file, the automatic validation will be again activated and will yield a new result. |
To edit the contributed file, simply click on the file name in the '''Files''' box within the page to open the editing page again. | To edit the contributed file, simply click on the file name in the '''Files''' box within the page to open the editing page again. | ||
Line 106: | Line 111: | ||
=== In case of SUCCESS === | === In case of SUCCESS === | ||
− | # If there is no feedback from Jenkins, it will | + | # If there is no feedback from Jenkins, it will add a label <code>verified +1</code> to the contribution. This means that the contribution can be merged. |
# You reached the end of the tutorial! Just wait for ETSI CTI to merge your contribution. | # You reached the end of the tutorial! Just wait for ETSI CTI to merge your contribution. | ||
Line 114: | Line 119: | ||
<div class="center ext" style="width:auto; margin-left:auto; margin-right:auto;"> | <div class="center ext" style="width:auto; margin-left:auto; margin-right:auto;"> | ||
− | <div style="font-size: 16pt">--> [https://forge.etsi.org/rep/gitweb.cgi/nfv-specfest.git/tree/HEAD:/upload the NFV | + | <div style="font-size: 16pt">--> [https://forge.etsi.org/rep/gitweb.cgi/nfv-specfest.git/tree/HEAD:/upload the NFV Specfest repository] <--</div> |
(The link will automatically open in a new tab) | (The link will automatically open in a new tab) | ||
</div> | </div> | ||
Line 121: | Line 126: | ||
Find more on developing and contributing OpenAPI specifications at [[Describing APIs]] | Find more on developing and contributing OpenAPI specifications at [[Describing APIs]] | ||
+ | |||
+ | = References = |
Latest revision as of 16:26, 20 September 2017
Redirect to:
Dear reader, in case of missing or incorrect information on this wiki page you are welcome to contact us at cti_support@etsi.org. |
Contribute an OpenAPITM specification to the ETSI Forge!
Welcome to the Wiki page of the NFV Specfest event.
The goal of the present tutorial is to create a collaborative OpenAPITM<ref>OpenAPITM is a Trade Mark of the Linux Foundation. Find more info at www.openapis.org.</ref> specification on the ETSI Forge. The proposed activity aims at translating an extract of an ETSI NFV specification into a machine readable API description, formatted in the OpenAPITM language.
The specification used for the task will be ETSI NFV GS SOL 002 [1] and for the sake of brevity, we will use an example document (a greatly simplified extract of the original specification) which describes the operation and data structures to be used in the activity.
(The link will automatically open in a new tab)
What you need:
- A laptop (all operating system supported) with Google Chrome browser or Opera browser installed.
- The SOL002 example linked above.
- This wiki page.
Let's get started!
Contents
Step 0: Set up
- Log in at ETSI Forge using your EOL account information.
- If you do not have an account yet, you can register for a Forge account here.
Step 1: Edit the template
Make sure you are using Google Chrome or Opera as your browser from this point on.
You are now ready to edit the OpenApi specification online. Below you will find the link to the online editor which will contain a template with comments and instruction on how to fill in the required information. Please note:
- If you close the Editor page, you will loose your work.
- Do not worry if you see some errors on the right part of the window: keep following the instructions in the comments and the errors will disappear.
- The template is divided in two parts: Part 1: Resource paths and operations and Part 2: Data types definitions which refer respectively to pages 1 and 2 of the SOL002 Example given. Part 2 is optional and you can decide whether to tackle it. You will find instructions in the appropriate part of the template.
- Once you are done editing, do not close the editor page and come back to this wiki page for the next step: Contribute the specification to the ETSI Forge.
- If you are in doubt, check the expected result at Solution (The link will automatically open in a new tab);
(The link will automatically open in a new tab)
Step 2: Contribute the specification to the ETSI Forge
After you complete editing the OpenAPI file (Step 1), your next step will be contributing it on the ETSI Forge. You will be using a web interface powered by Gerrit, an open source collaboration tool. Proceed withe the points below:
- Navigate to the project page of nfv-specfest
- If required, click on the
Sign in
link on the top right and the page to log in with your EOL or Forge credentials.
- If required, click on the
- Click
Create Change
button- Enter Branch: master
- Enter Change topic: "specfest"
- Enter Change description
- Click on
Create
- Click
Edit
in the File list at the bottom of the page - Now click
Add
to insert a new modification in a file- Now type "upload/[your_name].yaml" (e.g. "upload/jon_snow.yaml") and click
Open
button.
- Now type "upload/[your_name].yaml" (e.g. "upload/jon_snow.yaml") and click
- Copy the whole text from the Swagger Editor tab and paste the content in the newly created file.
- Click
Save
and then clickClose
- Now click the blue
Publish edit
button and then thePublish
button on the top right of the page.
Step 3: Verify
Once you publish your contribution, an automatic validator will be triggered. Wait few minutes and you will see a yellow notification at the bottom right corner of the page (you will also receive notification via email). Click on it to upload the page
The automatic checker (under the name jenkins) will publish the result in the History Check box in the page. The entry will look like (in case of failure):
Patch Set 2: Build Failed https://forge.etsi.org/jenkins/job/nfv-specfest-merge-and-validate/18/ : FAILURE
or (in case of success)
Patch Set 3: Verified+1 Build Successful https://forge.etsi.org/jenkins/job/nfv-specfest-merge-and-validate/19/ : SUCCESS
In case of FAILURE
If the validation job fails you are still able to modify your contribution until it gets valid. Each time you modify the content of the contributed file, the automatic validation will be again activated and will yield a new result.
To edit the contributed file, simply click on the file name in the Files box within the page to open the editing page again. Do not forget to save after you complete modify the text!
In case of SUCCESS
- If there is no feedback from Jenkins, it will add a label
verified +1
to the contribution. This means that the contribution can be merged. - You reached the end of the tutorial! Just wait for ETSI CTI to merge your contribution.
Congratulations
You can navigate now and see your contribution at
(The link will automatically open in a new tab)
Further readings
Find more on developing and contributing OpenAPI specifications at Describing APIs