Chris Donley | 107e10b | 2018-02-01 16:01:47 -0800 | [diff] [blame] | 1 | swagger: "2.0" |
| 2 | info: |
| 3 | description: "These are the APIs for the ONAP VNFSDK Marketplace. VNFSDK helps to package and validate VNFs for onboarding into ONAP. You can find out more about VNFSDK at [http://onap.readthedocs.io](http://onap.readthedocs.io/en/latest/submodules/vnfsdk/model.git/docs/files/vnfsdk-apis.html)." |
| 4 | version: "1.0.0" |
| 5 | title: "ONAP VNFSDK" |
| 6 | contact: |
| 7 | email: "onap-discuss@lists.onap.org" |
| 8 | license: |
| 9 | name: "Apache 2.0" |
| 10 | url: "http://www.apache.org/licenses/LICENSE-2.0.html" |
| 11 | host: "onap.readthedocs.io" |
| 12 | basePath: "/onapapi/marketplace/v1" |
| 13 | tags: |
| 14 | - name: "csars" |
| 15 | description: "VNF CSAR information" |
| 16 | externalDocs: |
| 17 | description: "Find out more" |
| 18 | url: "http://wiki.onap.org" |
kanagaraj Manickam k00365106 | 776c60c | 2019-05-06 14:25:19 +0530 | [diff] [blame^] | 19 | - name: VTP Scenario |
| 20 | - name: VTP Execution |
Chris Donley | 107e10b | 2018-02-01 16:01:47 -0800 | [diff] [blame] | 21 | schemes: |
| 22 | - "http" |
| 23 | paths: |
| 24 | /csars: |
| 25 | get: |
| 26 | summary: "Query VNF Package by conditions" |
| 27 | description: "Query VNF package" |
| 28 | operationId: "queryVnf" |
| 29 | produces: |
| 30 | - "application/json" |
| 31 | tags: |
| 32 | - "VNF package" |
| 33 | parameters: |
| 34 | - name: "conditions" |
| 35 | in: "query" |
| 36 | description: "Conditions that need to be considered for filter" |
| 37 | required: true |
| 38 | type: "array" |
| 39 | items: |
| 40 | type: "string" |
| 41 | collectionFormat: "multi" |
| 42 | responses: |
| 43 | 200: |
| 44 | description: "successful operation" |
| 45 | schema: |
| 46 | type: "array" |
| 47 | items: |
| 48 | $ref: "#/definitions/Csars" |
| 49 | 400: |
| 50 | description: "Invalid status value" |
| 51 | post: |
| 52 | summary: "Upload/Re-Upload VNF Package" |
| 53 | description: "" |
| 54 | operationId: "addVnf" |
| 55 | consumes: |
| 56 | - "multipart/form-data" |
| 57 | produces: |
| 58 | - "application/json" |
| 59 | tags: |
| 60 | - "VNF package" |
| 61 | parameters: |
| 62 | - in: "body" |
| 63 | name: "body" |
| 64 | description: "VNF objects to add to the Marketplace" |
| 65 | required: true |
| 66 | schema: |
| 67 | $ref: "#/definitions/Csars" |
| 68 | responses: |
| 69 | 200: |
| 70 | description: "successful operation" |
| 71 | schema: |
| 72 | $ref: "#/definitions/ApiResponse" |
| 73 | /csars/{csarId}: |
| 74 | get: |
| 75 | tags: |
| 76 | - "csarId" |
| 77 | summary: "Find vnf by CSAR ID" |
| 78 | description: "Returns a single vnf" |
| 79 | operationId: "getVnfByCsarId" |
| 80 | produces: |
| 81 | - "application/xml" |
| 82 | - "application/json" |
| 83 | parameters: |
| 84 | - name: "csarId" |
| 85 | in: "path" |
| 86 | description: "CSAR ID of VNF to return" |
| 87 | required: true |
| 88 | type: "string" |
| 89 | responses: |
| 90 | 200: |
| 91 | description: "successful operation" |
| 92 | schema: |
| 93 | $ref: "#/definitions/Csars" |
| 94 | 400: |
| 95 | description: "Invalid ID supplied" |
| 96 | 404: |
| 97 | description: "VNF not found" |
| 98 | post: |
| 99 | tags: |
| 100 | - "csarId" |
| 101 | summary: "Updates a VNF in the Marketplace with form data" |
| 102 | description: "" |
| 103 | operationId: "updateCsar" |
| 104 | consumes: |
| 105 | - "application/x-www-form-urlencoded" |
| 106 | produces: |
| 107 | - "application/xml" |
| 108 | - "application/json" |
| 109 | parameters: |
| 110 | - name: "csarId" |
| 111 | in: "path" |
| 112 | description: "CSAR ID of VNF that needs to be updated" |
| 113 | required: true |
| 114 | type: "string" |
| 115 | - name: "name" |
| 116 | in: "formData" |
| 117 | description: "Updated name of the VNF" |
| 118 | required: false |
| 119 | type: "string" |
| 120 | - name: "fileNamee" |
| 121 | in: "formData" |
| 122 | description: "Updated filename of the csar" |
| 123 | required: false |
| 124 | type: "string" |
| 125 | responses: |
| 126 | 405: |
| 127 | description: "Invalid input" |
| 128 | delete: |
| 129 | tags: |
| 130 | - "csarId" |
| 131 | summary: "Deletes a VNF" |
| 132 | description: "" |
| 133 | operationId: "deleteVnf" |
| 134 | produces: |
| 135 | - "application/xml" |
| 136 | - "application/json" |
| 137 | parameters: |
| 138 | - name: "csarId" |
| 139 | in: "path" |
| 140 | description: "VNF CSAR ID to delete" |
| 141 | required: true |
| 142 | type: "string" |
| 143 | responses: |
| 144 | 400: |
| 145 | description: "Invalid ID supplied" |
| 146 | /csars/{csarId}/files: |
| 147 | get: |
| 148 | tags: |
| 149 | - "csarId" |
| 150 | summary: "Download vnf" |
| 151 | description: "Download a single vnf" |
| 152 | operationId: "downloadVnf" |
| 153 | produces: |
| 154 | - "application/xml" |
| 155 | - "application/json" |
| 156 | parameters: |
| 157 | - name: "csarId" |
| 158 | in: "path" |
| 159 | description: "CSAR ID of VNF to return" |
| 160 | required: true |
| 161 | type: "string" |
| 162 | responses: |
| 163 | 200: |
| 164 | description: "successful operation" |
| 165 | schema: |
| 166 | $ref: "#/definitions/Csars" |
| 167 | 400: |
| 168 | description: "Invalid ID supplied" |
| 169 | 404: |
| 170 | description: "VNF not found" |
kanagaraj Manickam k00365106 | 776c60c | 2019-05-06 14:25:19 +0530 | [diff] [blame^] | 171 | '/vtp/scenarios/{scenario}/testsuites': |
| 172 | get: |
| 173 | tags: |
| 174 | - VTP Scenario |
| 175 | summary: ' List available test suties in given scenario' |
| 176 | description: '' |
| 177 | operationId: listTestSuties |
| 178 | produces: |
| 179 | - application/json |
| 180 | parameters: |
| 181 | - name: scenario |
| 182 | in: path |
| 183 | description: Test scenario name |
| 184 | required: true |
| 185 | type: string |
| 186 | responses: |
| 187 | '200': |
| 188 | description: successful operation |
| 189 | schema: |
| 190 | type: array |
| 191 | items: |
| 192 | $ref: '#/definitions/VTPTestSuite' |
| 193 | '500': |
| 194 | description: Failed to perform the operation |
| 195 | schema: |
| 196 | $ref: '#/definitions/VTPError' |
| 197 | |
| 198 | '/vtp/scenarios/{scenario}/testcases': |
| 199 | get: |
| 200 | tags: |
| 201 | - VTP Scenario |
| 202 | summary: ' List available test cases' |
| 203 | description: '' |
| 204 | operationId: listTestcases |
| 205 | produces: |
| 206 | - application/json |
| 207 | parameters: |
| 208 | - name: scenario |
| 209 | in: path |
| 210 | description: Test scenario name |
| 211 | required: true |
| 212 | type: string |
| 213 | - name: testSuiteName |
| 214 | in: query |
| 215 | description: Test suite name |
| 216 | required: false |
| 217 | type: string |
| 218 | responses: |
| 219 | '200': |
| 220 | description: successful operation |
| 221 | schema: |
| 222 | type: array |
| 223 | items: |
| 224 | $ref: '#/definitions/VTPTestCase' |
| 225 | '500': |
| 226 | description: Failed to perform the operation |
| 227 | schema: |
| 228 | $ref: '#/definitions/VTPError' |
| 229 | '/vtp/scenarios/{scenario}/testsuites/{testSuiteName}/testcases/{testCaseName}': |
| 230 | get: |
| 231 | tags: |
| 232 | - VTP Scenario |
| 233 | summary: Retrieve test cases details like inputs outputs and test suite name |
| 234 | description: '' |
| 235 | operationId: getTestcase |
| 236 | produces: |
| 237 | - application/json |
| 238 | parameters: |
| 239 | - name: scenario |
| 240 | in: path |
| 241 | description: Test scenario name |
| 242 | required: true |
| 243 | type: string |
| 244 | - name: testSuiteName |
| 245 | in: path |
| 246 | description: Test case name |
| 247 | required: true |
| 248 | type: string |
| 249 | - name: testCaseName |
| 250 | in: path |
| 251 | description: Test case name |
| 252 | required: true |
| 253 | type: string |
| 254 | responses: |
| 255 | '200': |
| 256 | description: successful operation |
| 257 | schema: |
| 258 | $ref: '#/definitions/VTPTestCase' |
| 259 | '404': |
| 260 | description: Test case does not exist |
| 261 | schema: |
| 262 | $ref: '#/definitions/VTPError' |
| 263 | '500': |
| 264 | description: Failed to perform the operation |
| 265 | schema: |
| 266 | $ref: '#/definitions/VTPError' |
| 267 | '/vtp/executions/{executionId}': |
| 268 | get: |
| 269 | tags: |
| 270 | - VTP Execution |
| 271 | summary: ' Retrieve test execution complete details' |
| 272 | description: '' |
| 273 | operationId: getTestExecution |
| 274 | produces: |
| 275 | - application/json |
| 276 | parameters: |
| 277 | - name: executionId |
| 278 | in: path |
| 279 | description: Test execution Id |
| 280 | required: true |
| 281 | type: string |
| 282 | responses: |
| 283 | '200': |
| 284 | description: successful operation |
| 285 | schema: |
| 286 | $ref: '#/definitions/VTPTestExecution' |
| 287 | '500': |
| 288 | description: Failed to perform the operation |
| 289 | schema: |
| 290 | $ref: '#/definitions/VTPError' |
| 291 | /vtp/scenarios: |
| 292 | get: |
| 293 | tags: |
| 294 | - VTP Scenario |
| 295 | summary: ' List available test scenarios' |
| 296 | description: '' |
| 297 | operationId: listTestScenarios |
| 298 | produces: |
| 299 | - application/json |
| 300 | parameters: [] |
| 301 | responses: |
| 302 | '200': |
| 303 | description: successful operation |
| 304 | schema: |
| 305 | type: array |
| 306 | items: |
| 307 | $ref: '#/definitions/VTPTestScenario' |
| 308 | '500': |
| 309 | description: Failed to perform the operation |
| 310 | schema: |
| 311 | $ref: '#/definitions/VTPError' |
| 312 | /vtp/executions: |
| 313 | get: |
| 314 | tags: |
| 315 | - VTP Execution |
| 316 | summary: ' List test executions' |
| 317 | description: '' |
| 318 | operationId: listTestExecutions |
| 319 | produces: |
| 320 | - application/json |
| 321 | parameters: |
| 322 | - name: requestId |
| 323 | in: query |
| 324 | description: Test request Id |
| 325 | required: false |
| 326 | type: string |
| 327 | - name: scenario |
| 328 | in: query |
| 329 | description: Test scenario name |
| 330 | required: false |
| 331 | type: string |
| 332 | - name: testsuiteName |
| 333 | in: query |
| 334 | description: Test suite name |
| 335 | required: false |
| 336 | type: string |
| 337 | - name: testcaseName |
| 338 | in: query |
| 339 | description: Test case name |
| 340 | required: false |
| 341 | type: string |
| 342 | - name: profileName |
| 343 | in: query |
| 344 | description: Test profile name |
| 345 | required: false |
| 346 | type: string |
| 347 | - name: startTime |
| 348 | in: query |
| 349 | description: Test execution start time |
| 350 | required: false |
| 351 | type: string |
| 352 | - name: endTime |
| 353 | in: query |
| 354 | description: Test execution end time |
| 355 | required: false |
| 356 | type: string |
| 357 | responses: |
| 358 | '200': |
| 359 | description: successful operation |
| 360 | schema: |
| 361 | type: array |
| 362 | items: |
| 363 | $ref: '#/definitions/VTPTestExecution' |
| 364 | '500': |
| 365 | description: Failed to perform the operation |
| 366 | schema: |
| 367 | $ref: '#/definitions/VTPError' |
| 368 | post: |
| 369 | tags: |
| 370 | - VTP Execution |
| 371 | summary: 'Execute the test case with given inputs in ''executions'' form-data as key-value pair of parameter''s name vs parameter''s value. If parameter is binary type thenmulti-part form-data ''file'' should be used to feed the binary file content and it can be more than once. To use the given file as input parameter, prefix the value with file://<filename>.' |
| 372 | description: '' |
| 373 | operationId: executeTestcases1 |
| 374 | consumes: |
| 375 | - multipart/form-data |
| 376 | produces: |
| 377 | - application/json |
| 378 | parameters: |
| 379 | - name: requestId |
| 380 | in: query |
| 381 | description: Request Id |
| 382 | required: false |
| 383 | type: string |
| 384 | - name: file |
| 385 | in: formData |
| 386 | description: Testcase File arguments |
| 387 | required: false |
| 388 | type: array |
| 389 | items: |
| 390 | $ref: '#/definitions/FormDataBodyPart' |
| 391 | collectionFormat: multi |
| 392 | - name: executions |
| 393 | in: formData |
| 394 | required: false |
| 395 | type: string |
| 396 | responses: |
| 397 | '200': |
| 398 | description: successful operation |
| 399 | schema: |
| 400 | type: array |
| 401 | items: |
| 402 | $ref: '#/definitions/VTPTestExecution' |
| 403 | '500': |
| 404 | description: Failed to perform the operation |
| 405 | schema: |
| 406 | $ref: '#/definitions/VTPError' |
Chris Donley | 107e10b | 2018-02-01 16:01:47 -0800 | [diff] [blame] | 407 | definitions: |
| 408 | Csars: |
| 409 | type: "object" |
| 410 | required: |
| 411 | - "csarId" |
| 412 | properties: |
| 413 | type: |
| 414 | type: "string" |
| 415 | example: "CSAR" |
| 416 | name: |
| 417 | type: "string" |
| 418 | example: "NanocellGateway" |
| 419 | fileName: |
| 420 | type: "string" |
| 421 | creationDate: |
| 422 | type: "string" |
| 423 | modificationDate: |
| 424 | type: "string" |
| 425 | readDate: |
| 426 | type: "string" |
| 427 | size: |
| 428 | type: "string" |
| 429 | example: "37 MB" |
| 430 | provider: |
| 431 | type: "string" |
| 432 | example: "XYZ" |
| 433 | version: |
| 434 | type: "string" |
| 435 | example: "v1.0.0" |
| 436 | createTime: |
| 437 | type: "string" |
| 438 | modifyTime: |
| 439 | type: "string" |
| 440 | downloadUri: |
| 441 | type: "string" |
| 442 | example: "http://msb_ip:msb_port/files/marketplace/CSAR/XYZ/NanocellGW/v1.0" |
| 443 | shortdesc: |
| 444 | type: "string" |
| 445 | example: "XYZ Nanocell Gateway VNF" |
| 446 | details: |
| 447 | type: "string" |
| 448 | csarId: |
| 449 | type: "string" |
| 450 | example: "78ede6f3-66cc-46ab-b748-38a6c010d272" |
| 451 | parameters: |
| 452 | type: "array" |
| 453 | xml: |
| 454 | name: "parameters" |
| 455 | wrapped: true |
| 456 | items: |
| 457 | type: "string" |
| 458 | xml: |
| 459 | name: "Csars" |
| 460 | ApiResponse: |
| 461 | type: "object" |
| 462 | properties: |
| 463 | code: |
| 464 | type: "integer" |
| 465 | format: "int32" |
| 466 | type: |
| 467 | type: "string" |
| 468 | message: |
| 469 | type: "string" |
kanagaraj Manickam k00365106 | 776c60c | 2019-05-06 14:25:19 +0530 | [diff] [blame^] | 470 | VTPTestSuite: |
| 471 | type: object |
| 472 | properties: |
| 473 | name: |
| 474 | type: string |
| 475 | VTPError: |
| 476 | type: object |
| 477 | properties: |
| 478 | code: |
| 479 | type: string |
| 480 | message: |
| 481 | type: string |
| 482 | httpStatus: |
| 483 | type: integer |
| 484 | format: int32 |
| 485 | VTPTestCase: |
| 486 | type: object |
| 487 | properties: |
| 488 | scenario: |
| 489 | type: string |
| 490 | testCaseName: |
| 491 | type: string |
| 492 | testSuiteName: |
| 493 | type: string |
| 494 | descripton: |
| 495 | type: string |
| 496 | author: |
| 497 | type: string |
| 498 | inputs: |
| 499 | type: array |
| 500 | items: |
| 501 | $ref: '#/definitions/VTPTestCaseInput' |
| 502 | outputs: |
| 503 | type: array |
| 504 | items: |
| 505 | $ref: '#/definitions/VTPTestCaseOutput' |
| 506 | VTPTestCaseInput: |
| 507 | type: object |
| 508 | properties: |
| 509 | name: |
| 510 | type: string |
| 511 | description: |
| 512 | type: string |
| 513 | type: |
| 514 | type: string |
| 515 | defaultValue: |
| 516 | type: string |
| 517 | isOptional: |
| 518 | type: boolean |
| 519 | metadata: |
| 520 | type:object |
| 521 | VTPTestCaseOutput: |
| 522 | type: object |
| 523 | properties: |
| 524 | name: |
| 525 | type: string |
| 526 | description: |
| 527 | type: string |
| 528 | type: |
| 529 | type: string |
| 530 | |
| 531 | VTPTestExecution: |
| 532 | type: object |
| 533 | properties: |
| 534 | scenario: |
| 535 | type: string |
| 536 | testCaseName: |
| 537 | type: string |
| 538 | testSuiteName: |
| 539 | type: string |
| 540 | executionId: |
| 541 | type: string |
| 542 | requestId: |
| 543 | type: string |
| 544 | profile: |
| 545 | type: string |
| 546 | parameters: |
| 547 | $ref: '#/definitions/JsonNode' |
| 548 | results: |
| 549 | $ref: '#/definitions/JsonNode' |
| 550 | status: |
| 551 | type: string |
| 552 | startTime: |
| 553 | type: string |
| 554 | endTime: |
| 555 | type: string |
| 556 | VTPTestScenario: |
| 557 | type: object |
| 558 | properties: |
| 559 | name: |
| 560 | type: string |
| 561 | |
| 562 | |
Chris Donley | 107e10b | 2018-02-01 16:01:47 -0800 | [diff] [blame] | 563 | externalDocs: |
| 564 | description: "Find out more about VNFSDK" |
| 565 | url: "https://onap.readthedocs.io/en/latest/submodules/vnfsdk/model.git/docs/index.html" |