Commit 616ce003 authored by ETSI CTI's avatar ETSI CTI

Merge branch '2.6.1-dev' into 'master'

merge 2.6.1 dev

See merge request !9
parents 220ce824 deaf0253
......@@ -14,9 +14,7 @@ cd docker
./build-container.sh
./run-container.sh "${run_dir}" "$1"
OUTCOME=$?
cd ..
exit $OUTCOME
python ./scripts/add_change_comment.py
exit $?
"""
Add comments on gerrit
"""
import os
import sys
import jnk_grt_comment as jgc
import glob
CHANGE = os.environ.get('GERRIT_CHANGE_NUMBER') or None
PATCH = os.environ.get('GERRIT_PATCHSET_NUMBER') or None
URL = os.environ.get('BUILD_URL') or None
# print glob.glob("**/*-API.yaml")
if not (CHANGE and PATCH and URL):
print "No Gerrit change information found. Exiting"
sys.exit()
print "START Comment on Gerrit change ---"
jgc.comment_openapis_artifacts(CHANGE, PATCH, URL)
print "DONE Comment on Gerrit change ---\n"
#!/env/python2.7
"""
Comments on gerrit
"""
import os.path
import subprocess
import glob
def mk_swg_ui_link(artifact, build_uri):
"""
creates the link to the swagger ui
"""
swg_ui = "https://forge.etsi.org/swagger/ui"
return swg_ui + "/?url=" + build_uri + "/artifact/"+ artifact +"/*view*/"
def mk_swg_ui_comment(files, bu):
"""
creates the link to the swagger ui
"""
msg = "Review links for the built OpenAPIS:"
for artifact in glob.glob(files):
msg += "\n * " + os.path.basename(artifact) + ": " + mk_swg_ui_link(artifact, bu)
return msg
def mk_grt_comment_cmd(change, payload):
"""
creates the link to the swagger ui
"""
command = "ssh -p 29418 forge.etsi.org \"gerrit review --message '"+payload+"' "+change + "\""
print command
return command
def send_gerrit_comment(change, patchset):
"""
creates the link to the swagger ui
"""
cmd = mk_grt_comment_cmd(change, patchset)
print "Executing: " + cmd
subprocess.call(cmd, shell=True)
def jenkins_gerrit_comment(change_num, patch_num, comment):
send_gerrit_comment(change_num+","+patch_num, comment)
def comment_openapis_artifacts(cn, pn, bu):
comment = mk_swg_ui_comment("build/*-API.yaml", bu)
# print "comment: "+comment
jenkins_gerrit_comment(str(cn), str(pn), comment)
\ No newline at end of file
......@@ -394,76 +394,6 @@ paths:
504:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/504"
/indicators/{indicatorId}:
parameters:
- name: indicatorId
in: path
description: >
Identifier of the VNF indicator.
type: string
required: true
- name: Version
description: >
Version of the API requested to use when responding to this request.
in: header
required: true
type: string
- name: Authorization
description: >
The authorization token for the request.
Reference: IETF RFC 7235
in: header
required: false
type: string
get:
summary: Read an inidividual VNF indicator related to a VNF instance.
description: >
Reads a VNF indicator.
responses:
200:
description: >
200 OK
Shall be returned when the VNF indicator has been read successfully.
The response body shall contain the representation of the VNF indicator.
headers:
Content-Type:
description: The MIME type of the body of the response.
type: string
maximum: 1
minimum: 1
Version:
description: The used API version.
type: string
maximum: 1
minimum: 1
schema:
$ref: '../../definitions/SOL002SOL003VNFIndicator_def.yaml#/definitions/VnfIndicator'
400:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
401:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
403:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
404:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
405:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/405"
406:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
416:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/416"
422:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/422"
429:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/429"
500:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500"
503:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503"
504:
$ref: "../../responses/SOL002SOL003_resp.yaml#/responses/504"
###############################################################################
# Subscriptions #
###############################################################################
......
......@@ -1559,7 +1559,6 @@ paths:
type: string
maximum: 1
minimum: 0
schema:
schema:
$ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/VnfLcmOpOcc"
400:
......@@ -1924,7 +1923,6 @@ paths:
type: string
maximum: 1
minimum: 1
schema:
schema:
$ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/VnfLcmOpOcc"
400:
......
......@@ -36,6 +36,8 @@ responses:
$ref: "../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"
303:
description: >
303 See Other
headers:
Content-Type:
description: The MIME type of the body of the response.
......@@ -236,6 +238,12 @@ responses:
$ref: "../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"
406:
description: >
406 NOT ACCEPTABLE
If the "Accept" HTTP header does not contain at least one name of a content type
that is acceptable to the API producer, the API producer shall respond with this
response code. The "ProblemDetails" structure may be omitted.
headers:
Content-Type:
description: The MIME type of the body of the response.
......@@ -260,6 +268,8 @@ responses:
$ref: "../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"
409:
description: >
409 CONFLICT
headers:
Content-Type:
description: The MIME type of the body of the response.
......@@ -375,6 +385,8 @@ responses:
$ref: "../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"
416:
description: >
416 Range Not Satisfiable
headers:
Content-Type:
description: The MIME type of the body of the response.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment