MichaelMorris | 90a9136 | 2019-03-13 21:32:25 +0000 | [diff] [blame] | 1 | swagger: '2.0' |
| 2 | info: |
| 3 | version: 1.0.0 |
| 4 | title: ONAP SO VNFM Adapter API |
| 5 | description: >- |
| 6 | Describes the API between SO (Service Orchestrator) and the adapter for VNFM |
| 7 | (Virtual Network Function Manager) |
| 8 | basePath: /so/vnfm-adapter/v1 |
| 9 | schemes: |
| 10 | - http |
| 11 | - https |
| 12 | consumes: |
| 13 | - application/json |
| 14 | produces: |
| 15 | - application/json |
| 16 | paths: |
| 17 | '/vnfs/{vnfId}': |
| 18 | post: |
| 19 | tags: |
| 20 | - SO VNFM Adapter |
| 21 | summary: VNF create |
| 22 | description: Create a VNF instance using a VNFM. |
| 23 | operationId: vnf_create |
| 24 | consumes: |
| 25 | - application/json |
| 26 | parameters: |
| 27 | - required: true |
| 28 | type: string |
| 29 | description: >- |
| 30 | The identifier of the VNF. This must be the vnf-id of an existing |
| 31 | generic-vnf in AAI. |
| 32 | name: vnfId |
| 33 | in: path |
| 34 | - in: body |
| 35 | name: body |
| 36 | description: VNF creation parameters |
| 37 | required: true |
| 38 | schema: |
| 39 | $ref: '#/definitions/CreateVnfRequest' |
| 40 | - name: X-ONAP-RequestID |
| 41 | description: >- |
| 42 | Used to track REST requests for logging purposes. Identifies a |
| 43 | single top level invocation of ONAP |
| 44 | in: header |
| 45 | required: true |
| 46 | type: string |
| 47 | - name: X-InvocationID |
| 48 | description: >- |
| 49 | Used to track REST requests for logging purposes. Identifies a |
| 50 | single invocation of a single component |
| 51 | in: header |
| 52 | required: true |
| 53 | type: string |
| 54 | responses: |
| 55 | '202': |
| 56 | description: >- |
| 57 | The request was accepted for processing, but the processing has not |
| 58 | been completed. |
| 59 | schema: |
| 60 | $ref: '#/definitions/CreateVnfResponse' |
| 61 | '400': |
| 62 | description: >- |
| 63 | An error occurred in the VNFM adapter relating to the given input, |
| 64 | for example, if the definition of the given VNF in AAI does not |
| 65 | included required information. |
| 66 | '404': |
| 67 | description: A VNF with the specified ID was not found in AAI. |
| 68 | '500': |
| 69 | description: >- |
| 70 | An error occurred in the VNFM adapter not relating to the given |
| 71 | input, or an error is received from the VNFM. |
| 72 | delete: |
| 73 | tags: |
| 74 | - SO VNFM Adapter |
| 75 | summary: VNF delete |
| 76 | description: Delete an instance of a VNF using a VNFM. |
| 77 | operationId: vnf_delete |
| 78 | consumes: |
| 79 | - application/json |
| 80 | parameters: |
| 81 | - required: true |
| 82 | type: string |
| 83 | description: >- |
| 84 | The identifier of the VNF. This must be the vnf-id of an existing |
| 85 | generic-vnf in AAI |
| 86 | name: vnfId |
| 87 | in: path |
| 88 | - name: X-ONAP-RequestID |
| 89 | description: >- |
| 90 | Used to track REST requests for logging purposes. Identifies a |
| 91 | single top level invocation of ONAP |
| 92 | in: header |
| 93 | required: true |
| 94 | type: string |
| 95 | - name: X-InvocationID |
| 96 | description: >- |
| 97 | Used to track REST requests for logging purposes. Identifies a |
| 98 | single invocation of a single component |
| 99 | in: header |
| 100 | required: true |
| 101 | type: string |
| 102 | responses: |
| 103 | '202': |
| 104 | description: >- |
| 105 | The request was accepted for processing, but the processing has not |
| 106 | been completed. |
| 107 | schema: |
| 108 | $ref: '#/definitions/DeleteVnfResponse' |
| 109 | '400': |
| 110 | description: >- |
| 111 | An error occurred in the VNFM adapter relating to the given input, |
| 112 | for example, if the definition of the given VNF in AAI does not |
| 113 | included required information. |
| 114 | '404': |
| 115 | description: A VNF with the specified ID was not found in AAI. |
| 116 | '500': |
| 117 | description: >- |
| 118 | An error occurred in the VNFM adapter not relating to the given |
| 119 | input, or an error is received from the VNFM. |
| 120 | '/jobs/{jobId}': |
| 121 | get: |
| 122 | tags: |
| 123 | - SO VNFM Adapter |
| 124 | summary: Job query |
| 125 | description: Query the status of a job. |
| 126 | operationId: job_query |
| 127 | consumes: |
| 128 | - application/json |
| 129 | produces: |
| 130 | - application/json |
| 131 | parameters: |
| 132 | - required: true |
| 133 | type: string |
| 134 | description: The identifier of the Job. |
| 135 | name: jobId |
| 136 | in: path |
| 137 | - name: X-ONAP-RequestID |
| 138 | description: >- |
| 139 | Used to track REST requests for logging purposes. Identifies a |
| 140 | single top level invocation of ONAP |
| 141 | in: header |
| 142 | required: true |
| 143 | type: string |
| 144 | - name: X-InvocationID |
| 145 | description: >- |
| 146 | Used to track REST requests for logging purposes. Identifies a |
| 147 | single invocation of a single component |
| 148 | in: header |
| 149 | required: true |
| 150 | type: string |
| 151 | responses: |
| 152 | '200': |
| 153 | description: '' |
| 154 | schema: |
| 155 | $ref: '#/definitions/QueryJobResponse' |
| 156 | '404': |
| 157 | description: A job with the specified ID was not found. |
| 158 | '500': |
| 159 | description: >- |
| 160 | An error occurred in the VNFM adapter not relating to the given |
| 161 | input, or an error is received from the VNFM. |
| 162 | definitions: |
| 163 | CreateVnfRequest: |
| 164 | type: object |
| 165 | properties: |
| 166 | name: |
| 167 | type: string |
| 168 | description: The name to be applied to the VNF. |
| 169 | tenant: |
| 170 | $ref: '#/definitions/Tenant' |
| 171 | additionalParams: |
| 172 | type: object |
| 173 | description: >- |
| 174 | Additional input parameters for the instantiation process, specific to |
| 175 | the VNF being instantiated, as declared in the VNFD as part of |
| 176 | "InstantiateVnfOpConfig". |
| 177 | additionalProperties: |
| 178 | type: string |
| 179 | externalVirtualLinks: |
| 180 | type: array |
| 181 | description: Information about external VLs to connect the VNF to. |
| 182 | items: |
| 183 | $ref: '#/definitions/ExternalVirtualLink' |
| 184 | required: |
| 185 | - name |
| 186 | - tenant |
| 187 | Tenant: |
| 188 | type: object |
| 189 | description: Details of the tenant that VNFs can be deployed into |
| 190 | properties: |
| 191 | cloudOwner: |
| 192 | type: string |
| 193 | description: The owner in AAI of the cloud to which the tenant belongs. |
| 194 | regionName: |
| 195 | type: string |
| 196 | description: The regionName in AAI of the cloud to which the tenant belongs. |
| 197 | tenantId: |
| 198 | type: string |
| 199 | description: The identifier of the tenant in the VIM. |
| 200 | required: |
| 201 | - cloudOwner |
| 202 | - regionName |
| 203 | - tenantId |
| 204 | CreateVnfResponse: |
| 205 | type: object |
| 206 | properties: |
| 207 | jobId: |
| 208 | description: The ID of the job which can be used to query the status of the job |
| 209 | type: string |
| 210 | required: |
| 211 | - jobId |
| 212 | DeleteVnfResponse: |
| 213 | type: object |
| 214 | properties: |
| 215 | jobId: |
| 216 | description: >- |
| 217 | The ID of the job which can be used to query the status of the delete |
| 218 | job |
| 219 | type: string |
| 220 | required: |
| 221 | - jobId |
| 222 | QueryJobResponse: |
| 223 | type: object |
| 224 | properties: |
| 225 | operationStatusRetrievalStatus: |
| 226 | $ref: '#/definitions/OperationStatusRetrievalStatusEnum' |
| 227 | id: |
| 228 | type: string |
| 229 | operation: |
| 230 | $ref: '#/definitions/OperationEnum' |
| 231 | operationState: |
| 232 | $ref: '#/definitions/OperationStateEnum' |
| 233 | startTime: |
| 234 | type: string |
| 235 | format: date-time |
| 236 | stateEnteredTime: |
| 237 | type: string |
| 238 | format: date-time |
| 239 | vnfInstanceId: |
| 240 | type: string |
| 241 | required: |
| 242 | - operationStatusRetrievalStatus |
| 243 | OperationStatusRetrievalStatusEnum: |
MichaelMorris | 173664d | 2019-04-02 17:14:42 +0000 | [diff] [blame] | 244 | description: The status of the attempt to retrieve the operation from the VNFM |
MichaelMorris | 90a9136 | 2019-03-13 21:32:25 +0000 | [diff] [blame] | 245 | type: string |
| 246 | enum: |
| 247 | - STATUS_FOUND |
| 248 | - WAITING_FOR_STATUS |
| 249 | - OPERATION_NOT_FOUND |
| 250 | - CANNOT_RETRIEVE_STATUS |
| 251 | OperationEnum: |
| 252 | description: The operation |
| 253 | type: string |
| 254 | enum: |
| 255 | - INSTANTIATE |
| 256 | - SCALE |
| 257 | - SCALE_TO_LEVEL |
| 258 | - CHANGE_FLAVOUR |
| 259 | - TERMINATE |
| 260 | - HEAL |
| 261 | - OPERATE |
| 262 | - CHANGE_EXT_CONN |
| 263 | - MODIFY_INFO |
| 264 | OperationStateEnum: |
| 265 | description: The status of the operation |
| 266 | type: string |
| 267 | enum: |
| 268 | - STARTING |
| 269 | - PROCESSING |
| 270 | - COMPLETED |
| 271 | - FAILED_TEMP |
| 272 | - FAILED |
| 273 | - ROLLING_BACK |
| 274 | - ROLLED_BACK |
| 275 | ExternalVirtualLink: |
| 276 | description: | |
| 277 | This type represents an external VL. |
| 278 | type: object |
| 279 | required: |
| 280 | - id |
| 281 | - resourceId |
| 282 | - extCps |
| 283 | properties: |
| 284 | id: |
| 285 | description: | |
| 286 | An identifier with the intention of being globally unique. |
| 287 | type: string |
| 288 | tenant: |
| 289 | $ref: '#/definitions/Tenant' |
| 290 | resourceId: |
| 291 | description: | |
| 292 | An identifier maintained by the VIM. |
| 293 | type: string |
| 294 | extCps: |
| 295 | description: | |
| 296 | External CPs of the VNF to be connected to this external VL. |
| 297 | type: array |
| 298 | items: |
| 299 | description: > |
| 300 | This type represents configuration information for external CPs |
| 301 | created from a CPD. |
| 302 | type: object |
| 303 | required: |
| 304 | - cpdId |
| 305 | properties: |
| 306 | cpdId: |
| 307 | description: | |
| 308 | An identifier that is unique within a VNF descriptor. |
| 309 | type: string |
| 310 | cpConfig: |
| 311 | description: > |
| 312 | List of instance data that need to be configured on the CP |
| 313 | instances created from the respective CPD. |
| 314 | type: array |
| 315 | items: |
| 316 | description: > |
| 317 | This type represents an externally provided link port or |
| 318 | network address information per instance of an external |
| 319 | connection point. In case a link port is provided, the VNFM |
| 320 | shall use that link port when connecting the external CP to |
| 321 | the external VL. In a link port is not provided, the VNFM |
| 322 | shall create a link port on the external VL, and use that link |
| 323 | port to connect the external CP to the external VL. |
| 324 | type: object |
| 325 | properties: |
| 326 | cpInstanceId: |
| 327 | description: > |
| 328 | An identifier that is unique for the respective type |
| 329 | within a VNF instance, but may not be globally unique. |
| 330 | type: string |
| 331 | linkPortId: |
| 332 | description: | |
| 333 | An identifier with the intention of being globally unique. |
| 334 | type: string |
| 335 | cpProtocolData: |
| 336 | description: > |
| 337 | Parameters for configuring the network protocols on the |
| 338 | link port that connects the CP to a VL. The following |
| 339 | conditions apply to the attributes "linkPortId" and |
| 340 | "cpProtocolData": * The "linkPortId" and "cpProtocolData" |
| 341 | attributes shall both be absent for the deletion of an |
| 342 | existing external CP instance |
| 343 | addressed by cpInstanceId. |
| 344 | * At least one of these attributes shall be present for a |
| 345 | to-be-created external CP instance or an existing external |
| 346 | CP instance. |
| 347 | * If the "linkPortId" attribute is absent, the VNFM shall |
| 348 | create a link port. |
| 349 | |
| 350 | * If the "cpProtocolData" attribute is absent, the |
| 351 | "linkPortId" attribute shall be provided referencing a |
| 352 | pre-created link port, |
| 353 | and the VNFM can use means outside the scope of the present |
| 354 | document to obtain the pre-configured address information for the |
| 355 | connection point from the resource representing the link port. |
| 356 | * If both "cpProtocolData" and "linkportId" are provided, |
| 357 | the API consumer shall ensure that the cpProtocolData can |
| 358 | be used with the |
| 359 | pre-created link port referenced by "linkPortId". |
| 360 | type: array |
| 361 | items: |
| 362 | description: | |
| 363 | This type represents network protocol data. |
| 364 | type: object |
| 365 | required: |
| 366 | - layerProtocol |
| 367 | properties: |
| 368 | layerProtocol: |
| 369 | description: > |
| 370 | Identifier of layer(s) and protocol(s). This |
| 371 | attribute allows to signal the addition of further |
| 372 | types of layer and protocol in future versions of |
| 373 | the present document in a backwards-compatible way. |
| 374 | In the current version of the present document, only |
| 375 | IP over Ethernet is supported. |
| 376 | type: string |
| 377 | enum: |
| 378 | - IP_OVER_ETHERNET |
| 379 | ipOverEthernet: |
| 380 | description: > |
| 381 | This type represents network address data for IP |
| 382 | over Ethernet. |
| 383 | type: object |
| 384 | properties: |
| 385 | macAddress: |
| 386 | description: > |
| 387 | A MAC address. Representation: string that |
| 388 | consists of groups of two hexadecimal digits, |
| 389 | separated by hyphens or colons. |
| 390 | type: string |
| 391 | format: MAC |
| 392 | ipAddresses: |
| 393 | description: > |
| 394 | List of IP addresses to assign to the CP |
| 395 | instance. Each entry represents IP address data |
| 396 | for fixed or dynamic IP address assignment per |
| 397 | subnet. If this attribute is not present, no IP |
| 398 | address shall be assigned. |
| 399 | type: array |
| 400 | items: |
| 401 | type: object |
| 402 | required: |
| 403 | - type |
| 404 | properties: |
| 405 | type: |
| 406 | description: > |
| 407 | The type of the IP addresses. Permitted |
| 408 | values: IPV4, IPV6. |
| 409 | type: string |
| 410 | enum: |
| 411 | - IPV4 |
| 412 | - IPV6 |
| 413 | fixedAddresses: |
| 414 | description: > |
| 415 | Fixed addresses to assign (from the subnet |
| 416 | defined by "subnetId" if provided). |
| 417 | Exactly one of "fixedAddresses", |
| 418 | "numDynamicAddresses" or "ipAddressRange" |
| 419 | shall be present. |
| 420 | type: array |
| 421 | items: |
| 422 | description: > |
| 423 | An IPV4 or IPV6 address. Representation: |
| 424 | In case of an IPV4 address, string that |
| 425 | consists of four decimal integers |
| 426 | separated by dots, each integer ranging |
| 427 | from 0 to 255. In case of an IPV6 |
| 428 | address, string that consists of groups |
| 429 | of zero to four hexadecimal digits, |
| 430 | separated by colons. |
| 431 | type: string |
| 432 | format: IP |
| 433 | numDynamicAddresses: |
| 434 | description: > |
| 435 | Number of dynamic addresses to assign |
| 436 | (from the subnet defined by "subnetId" if |
| 437 | provided). Exactly one of |
| 438 | "fixedAddresses", "numDynamicAddresses" or |
| 439 | "ipAddressRange" shall be present. |
| 440 | type: integer |
| 441 | addressRange: |
| 442 | description: > |
| 443 | An IP address range to be used, e.g. in |
| 444 | case of egress connections. In case this |
| 445 | attribute is present, IP addresses from |
| 446 | the range will be used. |
| 447 | type: object |
| 448 | required: |
| 449 | - minAddress |
| 450 | - maxAddress |
| 451 | properties: |
| 452 | minAddress: |
| 453 | description: > |
| 454 | An IPV4 or IPV6 address. Representation: |
| 455 | In case of an IPV4 address, string that |
| 456 | consists of four decimal integers |
| 457 | separated by dots, each integer ranging |
| 458 | from 0 to 255. In case of an IPV6 |
| 459 | address, string that consists of groups |
| 460 | of zero to four hexadecimal digits, |
| 461 | separated by colons. |
| 462 | type: string |
| 463 | format: IP |
| 464 | maxAddress: |
| 465 | description: > |
| 466 | An IPV4 or IPV6 address. Representation: |
| 467 | In case of an IPV4 address, string that |
| 468 | consists of four decimal integers |
| 469 | separated by dots, each integer ranging |
| 470 | from 0 to 255. In case of an IPV6 |
| 471 | address, string that consists of groups |
| 472 | of zero to four hexadecimal digits, |
| 473 | separated by colons. |
| 474 | type: string |
| 475 | format: IP |
| 476 | subnetId: |
| 477 | description: > |
| 478 | An identifier maintained by the VIM or |
| 479 | other resource provider. It is expected to |
| 480 | be unique within the VIM instance. |
| 481 | type: string |
| 482 | extLinkPorts: |
| 483 | description: > |
| 484 | Externally provided link ports to be used to connect external |
| 485 | connection points to this external VL. If this attribute is not |
| 486 | present, the VNFM shall create the link ports on the external VL. |
| 487 | type: array |
| 488 | items: |
| 489 | description: > |
| 490 | This type represents an externally provided link port to be used to |
| 491 | connect an external connection point to an external VL. |
| 492 | type: object |
| 493 | required: |
| 494 | - id |
| 495 | - resourceHandle |
| 496 | properties: |
| 497 | id: |
| 498 | description: | |
| 499 | An identifier with the intention of being globally unique. |
| 500 | type: string |
| 501 | resourceHandle: |
| 502 | required: |
| 503 | - tenant |
| 504 | - resourceId |
| 505 | type: object |
| 506 | description: > |
| 507 | This type represents the information that allows addressing a |
| 508 | virtualised resource that is used by a VNF instance. |
| 509 | properties: |
| 510 | tenant: |
| 511 | $ref: '#/definitions/Tenant' |
| 512 | resourceId: |
| 513 | description: > |
| 514 | An identifier maintained by the VIM or other resource |
| 515 | provider. It is expected to be unique within the VIM |
| 516 | instance. |
| 517 | type: string |
| 518 | vimLevelResourceType: |
| 519 | description: > |
| 520 | Type of the resource in the scope of the VIM or the resource |
| 521 | provider. |
| 522 | type: string |