| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2020 TATA ELXSI |
| 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 implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) |
| 17 | */ |
| 18 | /** |
| 19 | * @file Model for NS Instance related information. |
| 20 | */ |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 21 | /* eslint-disable */ |
| Barath Kumar R | 07698ab | 2021-03-30 11:50:42 +0530 | [diff] [blame] | 22 | import { DF, VLD } from 'NSDModel'; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 23 | import { VNFDAdminDetails } from 'VNFDModel'; |
| 24 | |
| 25 | /** Interface for NSInstanceDetails */ |
| 26 | export interface NSInstanceDetails { |
| 27 | 'orchestration-progress': JSON; |
| 28 | 'constituent-vnfr-ref': string[]; |
| 29 | 'operational-events': string[]; |
| 30 | admin: Admin; |
| 31 | 'ssh-authorized-key': string; |
| 32 | _admin: _Admin; |
| 33 | 'admin-status': string; |
| 34 | 'operational-status': string; |
| 35 | 'datacenter': string; |
| 36 | nsd: NSD; |
| Barath Kumar R | 07698ab | 2021-03-30 11:50:42 +0530 | [diff] [blame] | 37 | 'nsd-id': string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 38 | name: string; |
| 39 | 'name-ref': string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 40 | id: string; |
| 41 | 'nsd-name-ref': string; |
| 42 | description: string; |
| 43 | 'detailed-status': string; |
| 44 | 'config-status': string; |
| 45 | 'resource-orchestrator': string; |
| 46 | 'nsd-ref': string; |
| 47 | vld: VLD[]; |
| 48 | instantiate_params: InstantiateParam; |
| 49 | additionalParamsForNs: AdditionalParamForN; |
| 50 | _id?: string; |
| Barath Kumar R | f2ae546 | 2021-03-01 12:52:33 +0530 | [diff] [blame] | 51 | vcaStatus?: object; |
| SANDHYA.JS | 5f8c802 | 2023-10-13 11:45:25 +0530 | [diff] [blame] | 52 | startTime?: string; |
| 53 | 'create-time'?: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | /** Interface for Admin */ |
| 57 | interface Admin { |
| 58 | deployed: DeployedAdmin; |
| 59 | } |
| 60 | |
| 61 | /** Interface for DeployedAdmin */ |
| 62 | interface DeployedAdmin { |
| 63 | RO: ROAdmin; |
| 64 | } |
| 65 | |
| 66 | /** Interface for ROAdmin */ |
| 67 | interface ROAdmin { |
| 68 | 'nsr_status': string; |
| 69 | } |
| 70 | |
| 71 | /** Interface for _Admin */ |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 72 | interface _Admin { |
| 73 | 'projects_write': string[]; |
| 74 | deployed: DeployedAdmin; |
| 75 | nslcmop: string; |
| 76 | nsState: string; |
| 77 | modified: number; |
| 78 | projects_read: string[]; |
| 79 | created: string; |
| 80 | } |
| 81 | |
| 82 | /** Interface for Deployed_Admin */ |
| 83 | interface DeployedAdmin { |
| 84 | VCA: string[]; |
| 85 | RO: ROAdmin; |
| 86 | } |
| 87 | |
| 88 | /** Interface for RO_Admin */ |
| 89 | interface ROAdmin { |
| 90 | 'nsr_status': string; |
| 91 | 'nsr_id': string; |
| 92 | 'nsd_id': string; |
| 93 | vnfd: VNFD[]; |
| 94 | } |
| 95 | |
| 96 | /** Interface for VNFD */ |
| 97 | interface VNFD { |
| 98 | 'member-vnf-index': number; |
| 99 | id: string; |
| 100 | } |
| 101 | |
| 102 | /** Interface for NSD */ |
| 103 | export interface NSD { |
| 104 | description: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 105 | _admin: VNFDAdminDetails; |
| 106 | name: string; |
| 107 | version: string; |
| 108 | _id: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 109 | id: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 110 | vendor: string; |
| 111 | vdur: string[]; |
| 112 | 'connection-point': CONNECTIONPOINT[]; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 113 | 'virtual-link-desc': NSDVLD[]; |
| 114 | df: DF[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 115 | } |
| 116 | |
| 117 | /** Interface for _AdminDetails */ |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 118 | export interface _AdminDetails { |
| 119 | usageState: string; |
| 120 | projects_write: string[]; |
| 121 | projects_read: string[]; |
| 122 | operationalState: string; |
| 123 | modified: string; |
| 124 | storage: Storage; |
| 125 | onboardingState: string; |
| 126 | userDefinedData: JSON; |
| 127 | created: number; |
| 128 | } |
| 129 | |
| 130 | /** Interface for Storage */ |
| 131 | interface Storage { |
| 132 | path: string; |
| 133 | 'pkg-dir': string; |
| 134 | zipfile: string; |
| 135 | folder: string; |
| 136 | descriptor: string; |
| 137 | fs: string; |
| 138 | } |
| 139 | |
| 140 | /** Interface for NSDVLD */ |
| 141 | export interface NSDVLD { |
| 142 | 'vim-id': string; |
| 143 | 'status-detailed': string; |
| 144 | name: string; |
| 145 | status: string; |
| 146 | 'vim-network-name': string; |
| 147 | id: string; |
| 148 | 'type': string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 149 | df: DF[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 150 | } |
| 151 | |
| SANDHYA.JS | fced3d4 | 2022-04-28 20:28:17 +0530 | [diff] [blame] | 152 | /** Interface for Vm Migration */ |
| 153 | export interface VMMIGRATION { |
| 154 | lcmOperationType: string; |
| 155 | vnfInstanceId: string; |
| 156 | migrateToHost?: string; |
| 157 | vdu?: VDUPARAM; |
| 158 | } |
| 159 | |
| 160 | /** Interface for vdu for Vm Migration */ |
| 161 | export interface VDUPARAM { |
| 162 | vduId?: string; |
| 163 | vduCountIndex?: string; |
| 164 | } |
| 165 | |
| SANDHYA.JS | 9914458 | 2022-04-27 17:22:35 +0530 | [diff] [blame] | 166 | /** Interface for Ns Update */ |
| 167 | export interface NSUPDATE { |
| 168 | lcmOperationType: string; |
| 169 | updateType: string; |
| 170 | nsInstanceId: string; |
| SANDHYA.JS | e478d7e | 2024-06-10 20:58:04 +0530 | [diff] [blame] | 171 | changeVnfPackageData?: CHANGEVNFDATA; |
| 172 | verticalScaleVnf?: VERTICALSCALEDATA; |
| SANDHYA.JS | 9914458 | 2022-04-27 17:22:35 +0530 | [diff] [blame] | 173 | } |
| 174 | |
| 175 | /** Interface for changeVnfPackageData in Ns Update */ |
| 176 | export interface CHANGEVNFDATA { |
| 177 | vnfdId: string; |
| 178 | vnfInstanceId: string; |
| 179 | } |
| 180 | |
| SANDHYA.JS | e478d7e | 2024-06-10 20:58:04 +0530 | [diff] [blame] | 181 | /** Interface for vertical scaling */ |
| 182 | export interface VERTICALSCALEDATA { |
| 183 | vnfdId: string; |
| 184 | vnfInstanceId: string; |
| 185 | vduId: string; |
| 186 | countIndex: number; |
| 187 | } |
| SANDHYA.JS | 9914458 | 2022-04-27 17:22:35 +0530 | [diff] [blame] | 188 | /** Interface for terminate vnf in Ns Update */ |
| 189 | export interface TERMINATEVNF { |
| 190 | lcmOperationType: string; |
| 191 | updateType: string; |
| 192 | nsInstanceId: string; |
| 193 | removeVnfInstanceId: string; |
| 194 | } |
| 195 | |
| SANDHYA.JS | 3d81a28 | 2022-05-02 08:25:39 +0530 | [diff] [blame] | 196 | /** Interface for Start, Stop & Rebuild */ |
| 197 | export interface StartStopRebuild { |
| 198 | updateType: string; |
| 199 | operateVnfData: OPERATEVNFDATA; |
| 200 | } |
| 201 | |
| Isabel Lloret | 523d675 | 2025-04-29 08:06:54 +0000 | [diff] [blame^] | 202 | /** Interface for Show Vdu Console */ |
| 203 | export interface ShowVduConsole { |
| 204 | updateType: string; |
| 205 | operateVnfData: OPERATEVNFDATA; |
| 206 | } |
| 207 | |
| SANDHYA.JS | 3d81a28 | 2022-05-02 08:25:39 +0530 | [diff] [blame] | 208 | /** Interface for operateVnfData in Start, Stop and Rebuild */ |
| 209 | export interface OPERATEVNFDATA { |
| 210 | additionalParam: ADDITIONALPARAMS; |
| 211 | vnfInstanceId: string; |
| 212 | changeStateTo: string; |
| 213 | } |
| 214 | |
| 215 | /** Interface for additionalParam in Start, Stop and Rebuild */ |
| 216 | export interface ADDITIONALPARAMS { |
| 217 | 'run-day1': boolean; |
| 218 | 'vdu_id': string; |
| 219 | 'count-index': string; |
| 220 | } |
| 221 | |
| Isabel Lloret | 523d675 | 2025-04-29 08:06:54 +0000 | [diff] [blame^] | 222 | /** Interface for the result of an operate vnf operation */ |
| 223 | export interface OperateVnfResult { |
| 224 | id: string, |
| 225 | nsName: string |
| 226 | } |
| 227 | |
| SANDHYA.JS | 017df36 | 2022-05-02 06:57:11 +0530 | [diff] [blame] | 228 | /** Interface for VerticalScaling */ |
| 229 | export interface VerticalScaling { |
| 230 | lcmOperationType: string; |
| 231 | verticalScale: string; |
| 232 | nsInstanceId: string; |
| 233 | changeVnfFlavorData: CHANGEVNFFLAVORDATAPARAM; |
| 234 | } |
| 235 | |
| 236 | /** Interface for changeVnfFlavorData in Vertical Scaling */ |
| 237 | export interface CHANGEVNFFLAVORDATAPARAM { |
| 238 | vnfInstanceId: string; |
| 239 | additionalParams: ADDITIONALPARAM; |
| 240 | |
| 241 | } |
| 242 | |
| 243 | /** Interface for additionalParam in Vertical Scaling */ |
| 244 | export interface ADDITIONALPARAM { |
| 245 | vduid: string; |
| 246 | vduCountIndex: string; |
| 247 | virtualMemory: number; |
| 248 | sizeOfStorage: number; |
| 249 | numVirtualCpu: number; |
| 250 | |
| 251 | } |
| 252 | |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 253 | /** Interface for InstantiateParam */ |
| 254 | interface InstantiateParam { |
| 255 | nsdId: string; |
| 256 | nsName: string; |
| 257 | nsDescription: string; |
| 258 | vimAccountId: string; |
| 259 | } |
| 260 | |
| 261 | /** Interface for AdditionalParamForN */ |
| 262 | interface AdditionalParamForN { |
| 263 | _id: string; |
| 264 | 'ns-instance-config-ref': string; |
| 265 | 'crete-time': string; |
| 266 | } |
| 267 | |
| 268 | /** interface for the History nsdInstanceData */ |
| 269 | export interface NSDInstanceData { |
| 270 | id?: string; |
| 271 | lcmOperationType?: string; |
| 272 | operationState?: string; |
| 273 | startTime?: number; |
| 274 | statusEnteredTime?: number; |
| 275 | identifier: string; |
| 276 | name: string; |
| 277 | NsdName: string; |
| 278 | OperationalStatus: string; |
| 279 | ConfigStatus: string; |
| 280 | DetailedStatus: string; |
| 281 | state?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 282 | memberIndex?: DF[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 283 | nsConfig?: object; |
| Barath Kumar R | f2ae546 | 2021-03-01 12:52:33 +0530 | [diff] [blame] | 284 | vcaStatus?: object; |
| Barath Kumar R | 07698ab | 2021-03-30 11:50:42 +0530 | [diff] [blame] | 285 | adminDetails?: object; |
| 286 | vnfID?: string[]; |
| 287 | nsd?: NSD; |
| 288 | operationParams?: OPERATIONPARAMS; |
| 289 | 'nsd-id': string; |
| SANDHYA.JS | 1584e3e | 2022-10-31 20:11:50 +0530 | [diff] [blame] | 290 | constituent: string[]; |
| SANDHYA.JS | 5f8c802 | 2023-10-13 11:45:25 +0530 | [diff] [blame] | 291 | 'create-time'?: string; |
| Isabel Lloret | 523d675 | 2025-04-29 08:06:54 +0000 | [diff] [blame^] | 292 | vimType?: string; |
| Barath Kumar R | 07698ab | 2021-03-30 11:50:42 +0530 | [diff] [blame] | 293 | } |
| 294 | |
| 295 | /** Interface for the operationparams */ |
| SANDHYA.JS | fced3d4 | 2022-04-28 20:28:17 +0530 | [diff] [blame] | 296 | export interface OPERATIONPARAMS { |
| Barath Kumar R | 07698ab | 2021-03-30 11:50:42 +0530 | [diff] [blame] | 297 | scaleType?: string; |
| 298 | scaleVnfData?: SCALEVNFDATA; |
| 299 | } |
| 300 | |
| 301 | /** Interface for the scaleVnfData */ |
| SANDHYA.JS | fced3d4 | 2022-04-28 20:28:17 +0530 | [diff] [blame] | 302 | export interface SCALEVNFDATA { |
| Barath Kumar R | 07698ab | 2021-03-30 11:50:42 +0530 | [diff] [blame] | 303 | scaleVnfType?: string; |
| 304 | scaleByStepData?: SCALEBYSTEPDATA; |
| 305 | } |
| 306 | |
| 307 | /** Interface for the scaleByStepData */ |
| SANDHYA.JS | fced3d4 | 2022-04-28 20:28:17 +0530 | [diff] [blame] | 308 | export interface SCALEBYSTEPDATA { |
| Barath Kumar R | 07698ab | 2021-03-30 11:50:42 +0530 | [diff] [blame] | 309 | 'scaling-group-descriptor'?: string; |
| 310 | 'member-vnf-index'?: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 311 | } |
| 312 | |
| 313 | /** Interface for the nsInfo */ |
| 314 | export interface NSINFO { |
| 315 | nsInstanceID: string; |
| 316 | nsName: string; |
| 317 | nsOperationalStatus: string; |
| 318 | nsConfigStatus: string; |
| 319 | nsDetailedStatus: string; |
| 320 | nsResourceOrchestrator: string; |
| 321 | } |
| 322 | |
| 323 | /** Interface for the NSINSTANCENODES */ |
| 324 | export interface NSINSTANCENODES { |
| 325 | id?: string; |
| 326 | nodeTypeRef?: string; |
| 327 | name?: string; |
| 328 | 'type'?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 329 | vnfdCP?: DF[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 330 | vimNetworkName?: string; |
| 331 | shortName?: string; |
| 332 | cp?: CONNECTIONPOINT[]; |
| 333 | vdur?: string[]; |
| 334 | vld?: NSDVLD[]; |
| 335 | nsID?: string; |
| 336 | vnfdID?: string; |
| 337 | vimID?: string; |
| 338 | vndfrID?: string; |
| 339 | ipAddress?: string; |
| 340 | memberIndex?: string; |
| 341 | vnfdRef?: string; |
| 342 | vndfCPRef?: string; |
| 343 | selectorId?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 344 | reflexive?: Boolean; |
| 345 | nodeIndex?: number; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 346 | } |
| 347 | |
| 348 | /** Interface for the connection-point */ |
| 349 | export interface CONNECTIONPOINT { |
| 350 | 'connection-point-id': string; |
| 351 | name: string; |
| 352 | id: string; |
| 353 | } |
| 354 | |
| 355 | /** Interface for Exec NS Primitive */ |
| 356 | export interface NSPrimitive { |
| 357 | 'primitive': string; |
| 358 | 'primitive_params': NSPrimitiveParams[]; |
| 359 | 'member_vnf_index': string; |
| 360 | } |
| 361 | |
| 362 | /** Interface for Exec NS Primitive Params */ |
| 363 | export interface NSPrimitiveParams { |
| 364 | primitive_params_name: string; |
| 365 | primitive_params_value: string; |
| 366 | } |
| 367 | |
| 368 | /** Interface Nodes Creation */ |
| 369 | export interface COMPOSERNODES { |
| 370 | id: string; |
| 371 | reflexive: Boolean; |
| 372 | nodeTypeRef: string; |
| 373 | name?: string; |
| 374 | nodeIndex?: number; |
| 375 | selectorId?: string; |
| 376 | x?: number; |
| 377 | y?: number; |
| 378 | fx?: number; |
| 379 | fy?: number; |
| 380 | shortName?: string; |
| 381 | vimNetworkName?: string; |
| 382 | 'type'?: string; |
| 383 | vnfdRef?: string; |
| 384 | memberIndex?: string; |
| 385 | vimID?: string; |
| 386 | vndfrID?: string; |
| 387 | ipAddress?: string; |
| 388 | nsID?: string; |
| 389 | vnfdID?: string; |
| 390 | } |
| 391 | |
| 392 | /** Interface for the Virtual Link Info */ |
| 393 | export interface VLINFO { |
| 394 | id: string; |
| 395 | name: string; |
| 396 | 'type': string; |
| 397 | shortName: string; |
| 398 | vimNetworkName: string; |
| 399 | } |
| 400 | |
| 401 | /** Interface for the VNFR Info */ |
| SANDHYA.JS | fced3d4 | 2022-04-28 20:28:17 +0530 | [diff] [blame] | 402 | export interface VNFRINFO { |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 403 | vimID: string; |
| 404 | _id: string; |
| 405 | ip: string; |
| 406 | nsrID: string; |
| 407 | id: string; |
| 408 | vnfdRef: string; |
| 409 | vnfdId: string; |
| 410 | memberIndex: string; |
| 411 | } |
| SANDHYA.JS | 219fe61 | 2024-01-23 15:52:43 +0530 | [diff] [blame] | 412 | |
| 413 | /** Interface for vdu mappings */ |
| 414 | export interface VDUMAP { |
| 415 | vdu_mappings?: VDUMAPPINGS[]; |
| 416 | } |
| 417 | |
| 418 | /** Interface for vdu Mappings */ |
| 419 | export interface VDUMAPPINGS { |
| 420 | vduId?: string; |
| 421 | 'vdu-id'?: string; |
| 422 | countIndex?: string; |
| 423 | 'count-index'?: string; |
| 424 | runDay1?: Boolean; |
| 425 | 'run-day1'?: Boolean; |
| 426 | } |