| 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 | */ |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 21 | // tslint:disable: completed-docs |
| 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; |
| 51 | } |
| 52 | |
| 53 | /** Interface for Admin */ |
| 54 | interface Admin { |
| 55 | deployed: DeployedAdmin; |
| 56 | } |
| 57 | |
| 58 | /** Interface for DeployedAdmin */ |
| 59 | interface DeployedAdmin { |
| 60 | RO: ROAdmin; |
| 61 | } |
| 62 | |
| 63 | /** Interface for ROAdmin */ |
| 64 | interface ROAdmin { |
| 65 | 'nsr_status': string; |
| 66 | } |
| 67 | |
| 68 | /** Interface for _Admin */ |
| 69 | // tslint:disable-next-line:class-name |
| 70 | interface _Admin { |
| 71 | 'projects_write': string[]; |
| 72 | deployed: DeployedAdmin; |
| 73 | nslcmop: string; |
| 74 | nsState: string; |
| 75 | modified: number; |
| 76 | projects_read: string[]; |
| 77 | created: string; |
| 78 | } |
| 79 | |
| 80 | /** Interface for Deployed_Admin */ |
| 81 | interface DeployedAdmin { |
| 82 | VCA: string[]; |
| 83 | RO: ROAdmin; |
| 84 | } |
| 85 | |
| 86 | /** Interface for RO_Admin */ |
| 87 | interface ROAdmin { |
| 88 | 'nsr_status': string; |
| 89 | 'nsr_id': string; |
| 90 | 'nsd_id': string; |
| 91 | vnfd: VNFD[]; |
| 92 | } |
| 93 | |
| 94 | /** Interface for VNFD */ |
| 95 | interface VNFD { |
| 96 | 'member-vnf-index': number; |
| 97 | id: string; |
| 98 | } |
| 99 | |
| 100 | /** Interface for NSD */ |
| 101 | export interface NSD { |
| 102 | description: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 103 | _admin: VNFDAdminDetails; |
| 104 | name: string; |
| 105 | version: string; |
| 106 | _id: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 107 | id: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 108 | vendor: string; |
| 109 | vdur: string[]; |
| 110 | 'connection-point': CONNECTIONPOINT[]; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 111 | 'virtual-link-desc': NSDVLD[]; |
| 112 | df: DF[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | /** Interface for _AdminDetails */ |
| 116 | // tslint:disable-next-line:class-name |
| 117 | export interface _AdminDetails { |
| 118 | usageState: string; |
| 119 | projects_write: string[]; |
| 120 | projects_read: string[]; |
| 121 | operationalState: string; |
| 122 | modified: string; |
| 123 | storage: Storage; |
| 124 | onboardingState: string; |
| 125 | userDefinedData: JSON; |
| 126 | created: number; |
| 127 | } |
| 128 | |
| 129 | /** Interface for Storage */ |
| 130 | interface Storage { |
| 131 | path: string; |
| 132 | 'pkg-dir': string; |
| 133 | zipfile: string; |
| 134 | folder: string; |
| 135 | descriptor: string; |
| 136 | fs: string; |
| 137 | } |
| 138 | |
| 139 | /** Interface for NSDVLD */ |
| 140 | export interface NSDVLD { |
| 141 | 'vim-id': string; |
| 142 | 'status-detailed': string; |
| 143 | name: string; |
| 144 | status: string; |
| 145 | 'vim-network-name': string; |
| 146 | id: string; |
| 147 | 'type': string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 148 | df: DF[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 149 | } |
| 150 | |
| 151 | /** Interface for InstantiateParam */ |
| 152 | interface InstantiateParam { |
| 153 | nsdId: string; |
| 154 | nsName: string; |
| 155 | nsDescription: string; |
| 156 | vimAccountId: string; |
| 157 | } |
| 158 | |
| 159 | /** Interface for AdditionalParamForN */ |
| 160 | interface AdditionalParamForN { |
| 161 | _id: string; |
| 162 | 'ns-instance-config-ref': string; |
| 163 | 'crete-time': string; |
| 164 | } |
| 165 | |
| 166 | /** interface for the History nsdInstanceData */ |
| 167 | export interface NSDInstanceData { |
| 168 | id?: string; |
| 169 | lcmOperationType?: string; |
| 170 | operationState?: string; |
| 171 | startTime?: number; |
| 172 | statusEnteredTime?: number; |
| 173 | identifier: string; |
| 174 | name: string; |
| 175 | NsdName: string; |
| 176 | OperationalStatus: string; |
| 177 | ConfigStatus: string; |
| 178 | DetailedStatus: string; |
| 179 | state?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 180 | memberIndex?: DF[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 181 | nsConfig?: object; |
| Barath Kumar R | 07698ab | 2021-03-30 11:50:42 +0530 | [diff] [blame^] | 182 | adminDetails?: object; |
| 183 | vnfID?: string[]; |
| 184 | nsd?: NSD; |
| 185 | operationParams?: OPERATIONPARAMS; |
| 186 | 'nsd-id': string; |
| 187 | } |
| 188 | |
| 189 | /** Interface for the operationparams */ |
| 190 | export interface OPERATIONPARAMS{ |
| 191 | scaleType?: string; |
| 192 | scaleVnfData?: SCALEVNFDATA; |
| 193 | } |
| 194 | |
| 195 | /** Interface for the scaleVnfData */ |
| 196 | export interface SCALEVNFDATA{ |
| 197 | scaleVnfType?: string; |
| 198 | scaleByStepData?: SCALEBYSTEPDATA; |
| 199 | } |
| 200 | |
| 201 | /** Interface for the scaleByStepData */ |
| 202 | export interface SCALEBYSTEPDATA{ |
| 203 | 'scaling-group-descriptor'?: string; |
| 204 | 'member-vnf-index'?: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 205 | } |
| 206 | |
| 207 | /** Interface for the nsInfo */ |
| 208 | export interface NSINFO { |
| 209 | nsInstanceID: string; |
| 210 | nsName: string; |
| 211 | nsOperationalStatus: string; |
| 212 | nsConfigStatus: string; |
| 213 | nsDetailedStatus: string; |
| 214 | nsResourceOrchestrator: string; |
| 215 | } |
| 216 | |
| 217 | /** Interface for the NSINSTANCENODES */ |
| 218 | export interface NSINSTANCENODES { |
| 219 | id?: string; |
| 220 | nodeTypeRef?: string; |
| 221 | name?: string; |
| 222 | 'type'?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 223 | vnfdCP?: DF[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 224 | vimNetworkName?: string; |
| 225 | shortName?: string; |
| 226 | cp?: CONNECTIONPOINT[]; |
| 227 | vdur?: string[]; |
| 228 | vld?: NSDVLD[]; |
| 229 | nsID?: string; |
| 230 | vnfdID?: string; |
| 231 | vimID?: string; |
| 232 | vndfrID?: string; |
| 233 | ipAddress?: string; |
| 234 | memberIndex?: string; |
| 235 | vnfdRef?: string; |
| 236 | vndfCPRef?: string; |
| 237 | selectorId?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 238 | reflexive?: Boolean; |
| 239 | nodeIndex?: number; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 240 | } |
| 241 | |
| 242 | /** Interface for the connection-point */ |
| 243 | export interface CONNECTIONPOINT { |
| 244 | 'connection-point-id': string; |
| 245 | name: string; |
| 246 | id: string; |
| 247 | } |
| 248 | |
| 249 | /** Interface for Exec NS Primitive */ |
| 250 | export interface NSPrimitive { |
| 251 | 'primitive': string; |
| 252 | 'primitive_params': NSPrimitiveParams[]; |
| 253 | 'member_vnf_index': string; |
| 254 | } |
| 255 | |
| 256 | /** Interface for Exec NS Primitive Params */ |
| 257 | export interface NSPrimitiveParams { |
| 258 | primitive_params_name: string; |
| 259 | primitive_params_value: string; |
| 260 | } |
| 261 | |
| 262 | /** Interface Nodes Creation */ |
| 263 | export interface COMPOSERNODES { |
| 264 | id: string; |
| 265 | reflexive: Boolean; |
| 266 | nodeTypeRef: string; |
| 267 | name?: string; |
| 268 | nodeIndex?: number; |
| 269 | selectorId?: string; |
| 270 | x?: number; |
| 271 | y?: number; |
| 272 | fx?: number; |
| 273 | fy?: number; |
| 274 | shortName?: string; |
| 275 | vimNetworkName?: string; |
| 276 | 'type'?: string; |
| 277 | vnfdRef?: string; |
| 278 | memberIndex?: string; |
| 279 | vimID?: string; |
| 280 | vndfrID?: string; |
| 281 | ipAddress?: string; |
| 282 | nsID?: string; |
| 283 | vnfdID?: string; |
| 284 | } |
| 285 | |
| 286 | /** Interface for the Virtual Link Info */ |
| 287 | export interface VLINFO { |
| 288 | id: string; |
| 289 | name: string; |
| 290 | 'type': string; |
| 291 | shortName: string; |
| 292 | vimNetworkName: string; |
| 293 | } |
| 294 | |
| 295 | /** Interface for the VNFR Info */ |
| 296 | export interface VNFRINFO{ |
| 297 | vimID: string; |
| 298 | _id: string; |
| 299 | ip: string; |
| 300 | nsrID: string; |
| 301 | id: string; |
| 302 | vnfdRef: string; |
| 303 | vnfdId: string; |
| 304 | memberIndex: string; |
| 305 | } |