| Mark Beierl | b808fea | 2023-03-22 10:32:45 -0400 | [diff] [blame] | 1 | ####################################################################################### |
| 2 | # Copyright ETSI Contributors and Others. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 13 | # implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | ####################################################################################### |
| 17 | |
| 18 | from dataclasses import dataclass |
| Mark Beierl | fd2324b | 2023-03-29 17:28:49 +0000 | [diff] [blame] | 19 | from enum import auto, IntEnum |
| Daniel Arndt | 58076ca | 2023-04-19 14:43:26 -0300 | [diff] [blame] | 20 | from typing import List |
| Mark Beierl | b808fea | 2023-03-22 10:32:45 -0400 | [diff] [blame] | 21 | |
| Gulsum Atici | 2f081e4 | 2023-04-06 13:41:36 +0300 | [diff] [blame] | 22 | |
| 23 | ####################################################################################### |
| 24 | # Defining States |
| 25 | class VimState(IntEnum): |
| 26 | PROCESSING = auto() |
| 27 | ENABLED = auto() |
| 28 | ERROR = auto() |
| 29 | |
| 30 | |
| 31 | class VimOperationState(IntEnum): |
| 32 | COMPLETED = auto() |
| 33 | FAILED = auto() |
| 34 | |
| 35 | |
| 36 | class NsState(IntEnum): |
| 37 | PROCESSING = auto() |
| 38 | INSTANTIATED = auto() |
| 39 | ERROR = auto() |
| 40 | |
| 41 | |
| 42 | class VnfLcmOperationState(IntEnum): |
| 43 | PROCESSING = auto() |
| 44 | COMPLETED = auto() |
| 45 | FAILED = auto() |
| 46 | |
| 47 | |
| 48 | class VnfInstantiationState(IntEnum): |
| 49 | NOT_INSTANTIATED = auto() |
| 50 | INSTANTIATED = auto() |
| 51 | |
| 52 | |
| 53 | class VnfState(IntEnum): |
| 54 | STOPPED = auto() |
| 55 | STARTED = auto() |
| 56 | |
| 57 | |
| 58 | class LcmOperationState(IntEnum): |
| 59 | PROCESSING = auto() |
| 60 | COMPLETED = auto() |
| 61 | FAILED = auto() |
| 62 | |
| 63 | |
| Mark Beierl | fd2324b | 2023-03-29 17:28:49 +0000 | [diff] [blame] | 64 | ####################################################################################### |
| Mark Beierl | a8d016d | 2023-03-23 10:24:59 +0000 | [diff] [blame] | 65 | # Workflow Dataclasses |
| 66 | |
| 67 | |
| 68 | @dataclass |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame] | 69 | class VimOperationInput: |
| 70 | """ |
| 71 | Input dataclass for workflows that perform operations |
| 72 | (create, update, delete) on VIMs. |
| 73 | |
| 74 | Attributes: |
| 75 | ----------- |
| 76 | vim_uuid : str |
| 77 | The UUID of the VIM account as stored in the OSM vim |
| 78 | collection in Mongo |
| 79 | |
| 80 | op_id: str |
| 81 | The operation (task) id for this workflow. This is used |
| 82 | by the workflow at the end to update the status of the |
| 83 | operation in Mongo vim collection. |
| 84 | """ |
| Mark Beierl | 30e0507 | 2023-03-28 18:04:47 +0000 | [diff] [blame] | 85 | |
| Mark Beierl | a8d016d | 2023-03-23 10:24:59 +0000 | [diff] [blame] | 86 | vim_uuid: str |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame] | 87 | op_id: str |
| Mark Beierl | a8d016d | 2023-03-23 10:24:59 +0000 | [diff] [blame] | 88 | |
| 89 | |
| Mark Beierl | 248cb40 | 2023-04-05 20:01:05 +0000 | [diff] [blame] | 90 | @dataclass |
| 91 | class NsLcmOperationInput: |
| 92 | """ |
| 93 | Input dataclass for workflows that run as LCM operations. |
| 94 | |
| 95 | Attributes: |
| 96 | ----------- |
| 97 | |
| 98 | nslcmop: dict |
| 99 | A dictionary representing the nslcmop record from the |
| 100 | database. |
| 101 | """ |
| 102 | |
| 103 | nslcmop: dict |
| 104 | |
| 105 | |
| Patricia Reinoso | 36a62b8 | 2023-03-31 11:22:42 +0000 | [diff] [blame] | 106 | @dataclass |
| Patricia Reinoso | 36a62b8 | 2023-03-31 11:22:42 +0000 | [diff] [blame] | 107 | class CharmInfo: |
| 108 | """ |
| 109 | Input dataclass for |
| 110 | |
| 111 | Attributes: |
| 112 | ----------- |
| 113 | app_name : str |
| 114 | |
| 115 | channel: str |
| 116 | |
| 117 | entity_url: str |
| 118 | """ |
| 119 | |
| 120 | app_name: str |
| 121 | channel: str |
| 122 | entity_url: str |
| 123 | |
| 124 | |
| 125 | @dataclass |
| Gulsum Atici | 0d5d9aa | 2023-04-25 14:56:49 +0300 | [diff] [blame] | 126 | class GetVimCloudInput: |
| 127 | """ |
| 128 | Input dataclass for get vim cloud activity. |
| 129 | |
| 130 | Attributes: |
| 131 | ----------- |
| 132 | vnfr_uuid : str |
| 133 | The UUID of the VNF which is stored in the OSM vnfrs |
| 134 | collection in Mongo. |
| 135 | |
| 136 | """ |
| 137 | |
| 138 | vnfr_uuid: str |
| 139 | |
| 140 | |
| 141 | @dataclass |
| 142 | class GetVimCloudOutput: |
| 143 | """ |
| 144 | Output dataclass for get vim cloud activity. |
| 145 | |
| 146 | Attributes: |
| 147 | ----------- |
| 148 | cloud : str |
| 149 | Type of the cloud which is used to Deploy VNF. |
| 150 | """ |
| 151 | |
| 152 | cloud: str |
| 153 | |
| 154 | |
| 155 | @dataclass |
| 156 | class VduComputeConstraints: |
| 157 | """ |
| 158 | Input dataclass for VDU constraints |
| 159 | |
| 160 | Attributes: |
| 161 | ----------- |
| 162 | cores : int (Number of virtual CPUs) |
| 163 | |
| 164 | mem: int (GB) |
| Gulsum Atici | 0d5d9aa | 2023-04-25 14:56:49 +0300 | [diff] [blame] | 165 | """ |
| 166 | |
| 167 | cores: int |
| 168 | mem: int |
| Gulsum Atici | 0d5d9aa | 2023-04-25 14:56:49 +0300 | [diff] [blame] | 169 | |
| 170 | |
| 171 | @dataclass |
| Patricia Reinoso | 36a62b8 | 2023-03-31 11:22:42 +0000 | [diff] [blame] | 172 | class VduInstantiateInput: |
| 173 | """ |
| 174 | Input dataclass for workflow that instantiates a VDU. |
| 175 | |
| 176 | vim_uuid: str |
| 177 | |
| 178 | model_name: str |
| 179 | |
| 180 | charm_info : CharmInfo |
| 181 | |
| Gulsum Atici | 0d5d9aa | 2023-04-25 14:56:49 +0300 | [diff] [blame] | 182 | constraints: VduComputeConstraints |
| Gulsum Atici | 8e8a21c | 2023-04-27 00:44:26 +0300 | [diff] [blame^] | 183 | |
| 184 | cloud: VIM cloud type |
| Patricia Reinoso | 36a62b8 | 2023-03-31 11:22:42 +0000 | [diff] [blame] | 185 | """ |
| 186 | |
| 187 | vim_uuid: str |
| 188 | model_name: str |
| 189 | charm_info: CharmInfo |
| Gulsum Atici | 0d5d9aa | 2023-04-25 14:56:49 +0300 | [diff] [blame] | 190 | constraints: VduComputeConstraints |
| Gulsum Atici | 8e8a21c | 2023-04-27 00:44:26 +0300 | [diff] [blame^] | 191 | cloud: str |
| Patricia Reinoso | 36a62b8 | 2023-03-31 11:22:42 +0000 | [diff] [blame] | 192 | |
| 193 | |
| Gulsum Atici | 2f081e4 | 2023-04-06 13:41:36 +0300 | [diff] [blame] | 194 | @dataclass |
| 195 | class VnfInstantiateInput: |
| 196 | """ |
| 197 | Input dataclass for workflow that instantiates a VNF. |
| 198 | |
| 199 | Attributes: |
| 200 | ----------- |
| 201 | vnfr_uuid : str |
| 202 | The UUID of the VNF which is stored in the OSM vnfrs |
| 203 | collection in Mongo. |
| 204 | |
| Dario Faccin | aad0f78 | 2023-04-17 16:57:48 +0200 | [diff] [blame] | 205 | model_name: str |
| Gulsum Atici | 2f081e4 | 2023-04-06 13:41:36 +0300 | [diff] [blame] | 206 | |
| 207 | """ |
| 208 | |
| 209 | vnfr_uuid: str |
| Dario Faccin | aad0f78 | 2023-04-17 16:57:48 +0200 | [diff] [blame] | 210 | model_name: str |
| Gulsum Atici | 2f081e4 | 2023-04-06 13:41:36 +0300 | [diff] [blame] | 211 | |
| 212 | |
| Mark Beierl | fd2324b | 2023-03-29 17:28:49 +0000 | [diff] [blame] | 213 | ####################################################################################### |
| Mark Beierl | a8d016d | 2023-03-23 10:24:59 +0000 | [diff] [blame] | 214 | # Activity Dataclasses |
| 215 | |
| Mark Beierl | b808fea | 2023-03-22 10:32:45 -0400 | [diff] [blame] | 216 | |
| Mark Beierl | 248cb40 | 2023-04-05 20:01:05 +0000 | [diff] [blame] | 217 | @dataclass |
| 218 | class UpdateLcmOperationStateInput: |
| 219 | """ |
| 220 | Input dataclass for updating LCM Operations in the Mongo nslcmops |
| 221 | collection. The following attributes will be updated automatically |
| 222 | - statusEnteredTime |
| 223 | - _admin.modified |
| 224 | |
| 225 | Attributes: |
| 226 | ----------- |
| 227 | op_id: str |
| 228 | The operation (task) id for this activity. This is the key |
| 229 | to the record in nslcmops collection that will be updated. |
| 230 | |
| 231 | op_state : LcmOperationState |
| 232 | A representation of the state of the specified operation id, |
| 233 | such as PROCESSING, COMPLETED, or FAILED. |
| 234 | |
| 235 | stage: str |
| 236 | Human readable checkpoint message, intended only to give the |
| 237 | user feedback. |
| 238 | |
| 239 | error_message: str |
| 240 | Human readable error message if any failure occurred. |
| 241 | |
| 242 | detailed_status : str |
| 243 | Human readable message providing additional details to the |
| 244 | operation state, such as the error message explaining why |
| 245 | the operation failed. |
| 246 | """ |
| 247 | |
| 248 | op_id: str |
| 249 | op_state: LcmOperationState |
| 250 | stage: str |
| 251 | error_message: str |
| 252 | detailed_status: str |
| 253 | |
| 254 | |
| Mark Beierl | b808fea | 2023-03-22 10:32:45 -0400 | [diff] [blame] | 255 | @dataclass |
| 256 | class TestVimConnectivityInput: |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame] | 257 | """ |
| 258 | Input dataclass for the Test Vim Connectivity Ativity |
| Mark Beierl | b808fea | 2023-03-22 10:32:45 -0400 | [diff] [blame] | 259 | |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame] | 260 | Attributes: |
| 261 | ----------- |
| 262 | vim_uuid : str |
| 263 | The UUID of the VIM account as stored in the OSM vim |
| 264 | collection in Mongo |
| 265 | """ |
| Mark Beierl | 30e0507 | 2023-03-28 18:04:47 +0000 | [diff] [blame] | 266 | |
| Mark Beierl | b808fea | 2023-03-22 10:32:45 -0400 | [diff] [blame] | 267 | vim_uuid: str |
| 268 | |
| Mark Beierl | a8d016d | 2023-03-23 10:24:59 +0000 | [diff] [blame] | 269 | |
| 270 | @dataclass |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame] | 271 | class UpdateVimStateInput: |
| 272 | """ |
| 273 | Input dataclass for updating VIM state in the DB |
| 274 | |
| 275 | Attributes: |
| 276 | ----------- |
| 277 | vim_uuid : str |
| 278 | The UUID of the VIM account as stored in the OSM vim |
| 279 | collection in Mongo |
| 280 | |
| Mark Beierl | fd2324b | 2023-03-29 17:28:49 +0000 | [diff] [blame] | 281 | operational_state : VimState |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame] | 282 | A representation of the operational state (ENABLED or ERROR) |
| 283 | of the VIM. |
| 284 | |
| 285 | message : str |
| 286 | Human readable message providing additional details to the |
| 287 | operational state, such as the error message associated |
| 288 | with the ERROR operational_state. |
| 289 | """ |
| Mark Beierl | 30e0507 | 2023-03-28 18:04:47 +0000 | [diff] [blame] | 290 | |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame] | 291 | vim_uuid: str |
| Mark Beierl | fd2324b | 2023-03-29 17:28:49 +0000 | [diff] [blame] | 292 | operational_state: VimState |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame] | 293 | message: str |
| 294 | |
| 295 | |
| 296 | @dataclass |
| 297 | class UpdateVimOperationStateInput: |
| 298 | """ |
| 299 | Input dataclass for updating VIM Operations in the Mongo VIM |
| 300 | collection. |
| 301 | |
| 302 | Attributes: |
| 303 | ----------- |
| 304 | vim_uuid : str |
| 305 | The UUID of the VIM account as stored in the OSM vim |
| 306 | collection in Mongo |
| 307 | |
| 308 | op_id: str |
| 309 | The operation (task) id for this workflow. This is used |
| 310 | to update the status of the operation in Mongo vim collection. |
| 311 | |
| Mark Beierl | fd2324b | 2023-03-29 17:28:49 +0000 | [diff] [blame] | 312 | op_state : VimOperationState |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame] | 313 | A representation of the state of the specified operation id, |
| 314 | such as COMPLETED, or FAILED. |
| 315 | |
| 316 | message : str |
| 317 | Human readable message providing additional details to the |
| 318 | operation state, such as the error message explaining why |
| 319 | the operation failed. |
| 320 | """ |
| Mark Beierl | 30e0507 | 2023-03-28 18:04:47 +0000 | [diff] [blame] | 321 | |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame] | 322 | vim_uuid: str |
| 323 | op_id: str |
| Mark Beierl | fd2324b | 2023-03-29 17:28:49 +0000 | [diff] [blame] | 324 | op_state: VimOperationState |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame] | 325 | message: str |
| Mark Beierl | 30e0507 | 2023-03-28 18:04:47 +0000 | [diff] [blame] | 326 | |
| 327 | |
| 328 | @dataclass |
| 329 | class DeleteVimInput: |
| 330 | """ |
| 331 | Input dataclass for deleting vim record from the database |
| 332 | |
| 333 | Attributes: |
| 334 | ----------- |
| 335 | vim_uuid : str |
| 336 | The UUID of the VIM account as stored in the OSM vim |
| 337 | collection in Mongo |
| 338 | |
| 339 | """ |
| 340 | |
| 341 | vim_uuid: str |
| Patricia Reinoso | 36a62b8 | 2023-03-31 11:22:42 +0000 | [diff] [blame] | 342 | |
| 343 | |
| 344 | @dataclass |
| 345 | class DeployNsInput: |
| 346 | """ |
| 347 | Input dataclass for |
| 348 | |
| 349 | Attributes: |
| 350 | ----------- |
| 351 | ns_uuid : str |
| 352 | The UUID of the NS as stored in the OSM nsr |
| 353 | collection in Mongo |
| 354 | """ |
| 355 | |
| 356 | ns_uuid: str |
| 357 | |
| 358 | |
| Patricia Reinoso | 36a62b8 | 2023-03-31 11:22:42 +0000 | [diff] [blame] | 359 | @dataclass |
| 360 | class UpdateNsStateInput: |
| 361 | """ |
| 362 | Input dataclass for updating NS state in the DB |
| 363 | |
| 364 | Attributes: |
| 365 | ----------- |
| 366 | ns_uuid : str |
| 367 | The UUID of the NS as stored in the OSM ns |
| 368 | collection in Mongo |
| 369 | |
| 370 | operational_state : NsState |
| 371 | A representation of the operational state (ENABLED or ERROR) |
| 372 | of the NS. |
| 373 | |
| 374 | message : str |
| 375 | Human readable message providing additional details to the |
| 376 | operational state, such as the error message associated |
| 377 | with the ERROR operational_state. |
| 378 | """ |
| 379 | |
| 380 | ns_uuid: str |
| 381 | state: NsState |
| 382 | message: str |
| 383 | |
| 384 | |
| 385 | @dataclass |
| Patricia Reinoso | 4ddf2c7 | 2023-04-12 15:57:25 +0000 | [diff] [blame] | 386 | class ModelInfo: |
| Patricia Reinoso | 36a62b8 | 2023-03-31 11:22:42 +0000 | [diff] [blame] | 387 | """ |
| Patricia Reinoso | 4ddf2c7 | 2023-04-12 15:57:25 +0000 | [diff] [blame] | 388 | Contains the information related to a model. |
| Patricia Reinoso | 36a62b8 | 2023-03-31 11:22:42 +0000 | [diff] [blame] | 389 | |
| 390 | Attributes: |
| 391 | ----------- |
| 392 | vim_uuid : str |
| 393 | The UUID of the VIM as stored in the OSM vim_accounts |
| 394 | collection in Mongo. |
| 395 | |
| 396 | model_name : str |
| Patricia Reinoso | 4ddf2c7 | 2023-04-12 15:57:25 +0000 | [diff] [blame] | 397 | Name of the Juju model used to deploy charms. |
| Patricia Reinoso | 36a62b8 | 2023-03-31 11:22:42 +0000 | [diff] [blame] | 398 | """ |
| 399 | |
| 400 | vim_uuid: str |
| 401 | model_name: str |
| Gulsum Atici | 2f081e4 | 2023-04-06 13:41:36 +0300 | [diff] [blame] | 402 | |
| 403 | |
| 404 | @dataclass |
| Mark Beierl | eebe8f5 | 2023-04-11 21:01:22 +0000 | [diff] [blame] | 405 | class CheckCharmStatusInput: |
| 406 | """ |
| 407 | Input dataclass for checking on a specific charm's deployment |
| 408 | status |
| 409 | |
| 410 | Attributes: |
| 411 | ----------- |
| 412 | vim_uuid : str |
| 413 | The UUID of the VIM as stored in the OSM vim_accounts |
| 414 | collection in Mongo. |
| 415 | |
| 416 | model_name : str |
| 417 | Name of the model to create in Juju. |
| 418 | |
| 419 | application_name : str |
| 420 | Name of the application that the state is going to be |
| 421 | awaited. |
| 422 | |
| 423 | poll_interval : int (optional) |
| 424 | Time, in seconds, to wait between status checks. |
| 425 | """ |
| 426 | |
| 427 | vim_uuid: str |
| 428 | model_name: str |
| 429 | application_name: str |
| 430 | poll_interval: int = 1 |
| 431 | |
| 432 | |
| 433 | @dataclass |
| Mark Beierl | e65a9db | 2023-04-18 14:33:05 +0000 | [diff] [blame] | 434 | class ChangeVnfStateInput: |
| Gulsum Atici | 2f081e4 | 2023-04-06 13:41:36 +0300 | [diff] [blame] | 435 | """ |
| Gulsum Atici | 56e41a5 | 2023-04-07 00:04:28 +0300 | [diff] [blame] | 436 | Input dataclass for changing VNF State. |
| Gulsum Atici | 2f081e4 | 2023-04-06 13:41:36 +0300 | [diff] [blame] | 437 | |
| 438 | Attributes: |
| 439 | ----------- |
| 440 | vnfr_uuid : str |
| 441 | The UUID of the VNF which is stored in the OSM vnfrs |
| 442 | collection in Mongo. |
| 443 | |
| Dario Faccin | 42c4ba2 | 2023-04-14 10:24:38 +0200 | [diff] [blame] | 444 | state : VnfState |
| Gulsum Atici | 2f081e4 | 2023-04-06 13:41:36 +0300 | [diff] [blame] | 445 | A representation of the VNF state (STOPPED or STARTED). |
| 446 | """ |
| 447 | |
| 448 | vnfr_uuid: str |
| 449 | state: VnfState |
| 450 | |
| 451 | |
| 452 | @dataclass |
| Dario Faccin | 42c4ba2 | 2023-04-14 10:24:38 +0200 | [diff] [blame] | 453 | class ChangeVnfInstantiationStateInput: |
| Gulsum Atici | 2f081e4 | 2023-04-06 13:41:36 +0300 | [diff] [blame] | 454 | """ |
| Gulsum Atici | 56e41a5 | 2023-04-07 00:04:28 +0300 | [diff] [blame] | 455 | Input dataclass for changing VNF Instantiation State. |
| Gulsum Atici | 2f081e4 | 2023-04-06 13:41:36 +0300 | [diff] [blame] | 456 | |
| 457 | Attributes: |
| 458 | ----------- |
| 459 | vnfr_uuid : str |
| 460 | The UUID of the VNF which is stored in the OSM vnfrs |
| 461 | collection in Mongo. |
| 462 | |
| Dario Faccin | 42c4ba2 | 2023-04-14 10:24:38 +0200 | [diff] [blame] | 463 | state : VnfInstantiationState |
| Gulsum Atici | 2f081e4 | 2023-04-06 13:41:36 +0300 | [diff] [blame] | 464 | A representation of the VNF instantiation state (NOT_INSTANTIATED or INSTANTIATED). |
| 465 | |
| 466 | """ |
| 467 | |
| 468 | vnfr_uuid: str |
| 469 | state: VnfInstantiationState |
| 470 | |
| 471 | |
| 472 | @dataclass |
| 473 | class GetTaskQueueInput: |
| 474 | """ |
| Gulsum Atici | 56e41a5 | 2023-04-07 00:04:28 +0300 | [diff] [blame] | 475 | Input dataclass for get task queue activity. |
| Gulsum Atici | 2f081e4 | 2023-04-06 13:41:36 +0300 | [diff] [blame] | 476 | |
| 477 | Attributes: |
| 478 | ----------- |
| 479 | vnfr_uuid : str |
| 480 | The UUID of the VNF which is stored in the OSM vnfrs |
| 481 | collection in Mongo. |
| 482 | |
| 483 | """ |
| 484 | |
| 485 | vnfr_uuid: str |
| 486 | |
| 487 | |
| 488 | @dataclass |
| 489 | class GetTaskQueueOutput: |
| 490 | """ |
| 491 | Output dataclass for get task queue activity. |
| 492 | |
| 493 | Attributes: |
| 494 | ----------- |
| 495 | task_queue : str |
| 496 | Name of the queue which is used to Deploy VNF. |
| 497 | """ |
| 498 | |
| 499 | task_queue: str |
| Gulsum Atici | 56e41a5 | 2023-04-07 00:04:28 +0300 | [diff] [blame] | 500 | |
| 501 | |
| 502 | @dataclass |
| 503 | class GetVnfDetailsInput: |
| 504 | """ |
| 505 | Input dataclass for get vnf details activity. |
| 506 | |
| 507 | Attributes: |
| 508 | ----------- |
| 509 | vnfr_uuid : str |
| 510 | The UUID of the VNF which is stored in the OSM vnfrs |
| 511 | collection in Mongo. |
| 512 | """ |
| 513 | |
| 514 | vnfr_uuid: str |
| 515 | |
| 516 | |
| 517 | @dataclass |
| 518 | class GetVnfDetailsOutput: |
| 519 | """ |
| 520 | Output dataclass for get vnf details activity. |
| 521 | |
| 522 | Attributes: |
| 523 | ----------- |
| 524 | vnfr : dict |
| 525 | VNF record retrieved from Database. |
| 526 | |
| 527 | vnfd : dict |
| 528 | VNF descriptor retrieved from Database. |
| 529 | """ |
| 530 | |
| 531 | vnfr: dict |
| 532 | vnfd: dict |
| Daniel Arndt | 58076ca | 2023-04-19 14:43:26 -0300 | [diff] [blame] | 533 | |
| 534 | |
| 535 | @dataclass |
| 536 | class GetVnfRecordIdsInput: |
| 537 | """ |
| 538 | Attributes: |
| 539 | ----------- |
| 540 | ns_uuid : str |
| 541 | The UUID of the NS from which to retrieve the VNF records. |
| 542 | """ |
| 543 | |
| 544 | ns_uuid: str |
| 545 | |
| 546 | |
| 547 | @dataclass |
| 548 | class GetVnfRecordIdsOutput: |
| 549 | """ |
| 550 | Attributes: |
| 551 | ----------- |
| 552 | vnfr_ids : list[str] |
| 553 | List of the VNF record IDs associated with the NS. |
| 554 | """ |
| 555 | |
| 556 | vnfr_ids: List[str] |