Loading .jenkins.sh +2 −4 Original line number Diff line number Diff line Loading @@ -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 $? scripts/add_change_comment.pydeleted 100644 → 0 +0 −24 Original line number Diff line number Diff line """ 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" scripts/jnk_grt_comment.pydeleted 100644 → 0 +0 −51 Original line number Diff line number Diff line #!/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 src/SOL002/VNFIndicator/VNFIndicator.yaml +0 −70 Original line number Diff line number Diff line Loading @@ -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 # ############################################################################### Loading src/SOL002/VNFLifecycleManagement/VNFLifecycleManagement.yaml +0 −2 Original line number Diff line number Diff line Loading @@ -1560,7 +1560,6 @@ paths: maximum: 1 minimum: 0 schema: schema: $ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/VnfLcmOpOcc" 400: $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" Loading Loading @@ -1925,7 +1924,6 @@ paths: maximum: 1 minimum: 1 schema: schema: $ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/VnfLcmOpOcc" 400: $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" Loading Loading
.jenkins.sh +2 −4 Original line number Diff line number Diff line Loading @@ -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 $?
scripts/add_change_comment.pydeleted 100644 → 0 +0 −24 Original line number Diff line number Diff line """ 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"
scripts/jnk_grt_comment.pydeleted 100644 → 0 +0 −51 Original line number Diff line number Diff line #!/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
src/SOL002/VNFIndicator/VNFIndicator.yaml +0 −70 Original line number Diff line number Diff line Loading @@ -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 # ############################################################################### Loading
src/SOL002/VNFLifecycleManagement/VNFLifecycleManagement.yaml +0 −2 Original line number Diff line number Diff line Loading @@ -1560,7 +1560,6 @@ paths: maximum: 1 minimum: 0 schema: schema: $ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/VnfLcmOpOcc" 400: $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" Loading Loading @@ -1925,7 +1924,6 @@ paths: maximum: 1 minimum: 1 schema: schema: $ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/VnfLcmOpOcc" 400: $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400" Loading