| 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 VNFD related information. |
| 20 | */ |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 21 | /** Interface for Project */ |
| 22 | export interface ProjectModel { |
| 23 | project_id: string; |
| 24 | project?: string; |
| 25 | project_name?: string; |
| 26 | expires: number; |
| 27 | _id: string; |
| 28 | id: string; |
| 29 | issued_at: number; |
| 30 | remote_port: number; |
| 31 | username: string; |
| 32 | remote_host: string; |
| 33 | admin: boolean; |
| SANDHYA.JS | a981655 | 2022-04-12 09:07:08 +0530 | [diff] [blame] | 34 | message?: string; |
| 35 | user_id?: string; |
| SANDHYA.JS | 1b17c43 | 2023-04-26 17:54:57 +0530 | [diff] [blame] | 36 | roles?: RolesData[]; |
| 37 | last_login?: number; |
| 38 | login_count?: string; |
| 39 | user_show?: boolean; |
| 40 | admin_show?: boolean; |
| SANDHYA.JS | 52474e7 | 2024-06-10 21:47:25 +0530 | [diff] [blame] | 41 | timeout?: string; |
| SANDHYA.JS | 1b17c43 | 2023-04-26 17:54:57 +0530 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | /** Interface for Roles */ |
| 45 | export interface RolesData { |
| 46 | name?: string; |
| 47 | id?: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | /** Interface for ProjectDetails */ |
| 51 | export interface ProjectDetails { |
| 52 | _admin: AdminDetails; |
| 53 | name: string; |
| 54 | _id: string; |
| 55 | } |
| 56 | |
| 57 | /** Interface for AdminDetails */ |
| 58 | interface AdminDetails { |
| 59 | modified: string; |
| 60 | created: string; |
| 61 | } |
| 62 | |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 63 | /** Interface for VNFD Details */ |
| 64 | export interface VNFD { |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 65 | description?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 66 | df?: DF[]; |
| 67 | 'ext-cpd'?: EXTCPD[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 68 | id: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 69 | 'int-virtual-link-desc'?: IVLD[]; |
| 70 | 'mgmt-cp'?: string; |
| 71 | onboardingState?: string; |
| 72 | operationalState?: string; |
| Barath Kumar R | 79971eb | 2020-12-21 15:42:23 +0530 | [diff] [blame] | 73 | 'product-name'?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 74 | provider?: string; |
| 75 | 'sw-image-desc'?: SWIMAGEDESCRIPTION[]; |
| 76 | usageState?: string; |
| 77 | vdu?: VDU[]; |
| 78 | version?: string; |
| SANDHYA.JS | 9914458 | 2022-04-27 17:22:35 +0530 | [diff] [blame] | 79 | 'software-version'?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 80 | 'virtual-compute-desc'?: string; |
| 81 | 'virtual-storage-desc'?: string[]; |
| 82 | _admin?: VNFDAdminDetails; |
| 83 | _id?: string; |
| 84 | _links?: string; |
| 85 | 'vnf-configuration'?: VNFCONFIG[]; |
| 86 | kdu?: []; |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 87 | name?: string; |
| 88 | state?: string; |
| SANDHYA.JS | a3ff32a | 2025-02-13 16:24:46 +0530 | [diff] [blame] | 89 | profile_type?: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 90 | } |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 91 | /** Interface for DF */ |
| 92 | export interface VNFCONFIG { |
| 93 | id: string; |
| 94 | 'config-primitive'?: CONFIGPRIMITIVE[]; |
| 95 | 'initial-config-primitive'?: INITIALCONFIGPRIMITIVE[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 96 | } |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 97 | /** Interface for DF */ |
| 98 | export interface DF { |
| 99 | id: string; |
| 100 | 'instantiation-level'?: INSTANTIATIONLEVEL[]; |
| 101 | 'vdu-profile'?: VDUPROFILE[]; |
| 102 | 'vnf-configuration-id'?: string; |
| Barath Kumar R | 07698ab | 2021-03-30 11:50:42 +0530 | [diff] [blame] | 103 | 'scaling-aspect'?: SCALING[]; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 104 | } |
| 105 | /** Interface for INSTANTIATIONLEVEL */ |
| 106 | export interface INSTANTIATIONLEVEL { |
| 107 | id: string; |
| 108 | 'vdu-level': VDULEVEL[]; |
| 109 | } |
| 110 | /** Interface for VDULEVEL */ |
| 111 | export interface VDULEVEL { |
| 112 | 'number-of-instances': number; |
| 113 | 'vdu-id': string; |
| 114 | } |
| 115 | /** Interface for VDULEVEL */ |
| 116 | export interface VDUPROFILE { |
| 117 | id: string; |
| 118 | name?: string; |
| 119 | 'min-number-of-instances'?: number; |
| 120 | 'max-number-of-instances'?: number; |
| 121 | 'vdu-configuration-id'?: string; |
| 122 | 'vdu-configuration'?: VDUCONFIG; |
| 123 | } |
| Barath Kumar R | 07698ab | 2021-03-30 11:50:42 +0530 | [diff] [blame] | 124 | /** Interface for SCALING */ |
| 125 | export interface SCALING { |
| 126 | 'aspect-delta-details'?: object; |
| 127 | id: string; |
| 128 | name?: string; |
| 129 | 'max-scale-level'?: number; |
| 130 | 'scaling-policy'?: SCALINGPOLICY[]; |
| 131 | } |
| 132 | /** Interface for SCALINGPOLICY */ |
| 133 | export interface SCALINGPOLICY { |
| 134 | 'cooldown-time': number; |
| 135 | name?: string; |
| 136 | 'scaling-criteria': SCALINGCRITERIA[]; |
| 137 | 'scaling-type'?: string; |
| 138 | 'threshold-time'?: number; |
| 139 | } |
| 140 | /** Interface for SCALINGCRITERIA */ |
| 141 | export interface SCALINGCRITERIA { |
| 142 | name?: string; |
| 143 | 'scale-in-relational-operation': string; |
| 144 | 'scale-in-threshold'?: string; |
| 145 | 'scale-out-relational-operation'?: string; |
| 146 | 'scale-out-threshold'?: string; |
| 147 | 'vnf-monitoring-param-ref'?: string; |
| 148 | } |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 149 | /** Interface for VDUCONFIG */ |
| 150 | export interface VDUCONFIG { |
| 151 | id: string; |
| 152 | 'config-primitive': CONFIGPRIMITIVE[]; |
| 153 | 'initial-config-primitive': INITIALCONFIGPRIMITIVE[]; |
| 154 | } |
| 155 | /** Interface for CONFIGPRIMITIVE */ |
| 156 | export interface CONFIGPRIMITIVE { |
| 157 | name: string; |
| 158 | } |
| 159 | /** Interface for INITIALCONFIGPRIMITIVE */ |
| 160 | export interface INITIALCONFIGPRIMITIVE { |
| 161 | seq: string; |
| 162 | name: string; |
| 163 | } |
| 164 | /** Interface for the ext-cpd */ |
| 165 | export interface EXTCPD { |
| 166 | id?: string; |
| 167 | 'int-cpd'?: INTCPD; |
| 168 | } |
| 169 | /** Interface for the int-cpd */ |
| 170 | export interface INTCPD { |
| 171 | cpd?: string; |
| 172 | 'vdu-id'?: string; |
| 173 | } |
| 174 | /** Interface for IVLD */ |
| 175 | export interface IVLD { |
| 176 | id?: string; |
| 177 | description?: string; |
| 178 | } |
| 179 | /** Interface for SWIMAGEDESCRIPTION */ |
| 180 | export interface SWIMAGEDESCRIPTION { |
| 181 | id: string; |
| 182 | name: string; |
| 183 | version: string; |
| 184 | } |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 185 | /** Interface for VDU */ |
| 186 | export interface VDU { |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 187 | 'cloud-init-file'?: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 188 | description?: string; |
| 189 | id?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 190 | 'int-cpd'?: VDUINTCPD[]; |
| 191 | 'monitoring-parameter'?: MonitoringParam[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 192 | name?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 193 | 'sw-image-desc'?: string; |
| 194 | 'virtual-compute-desc'?: string; |
| 195 | 'virtual-storage-desc'?: string[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 196 | } |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 197 | /** Interface for the vdu int-cpd */ |
| 198 | export interface VDUINTCPD { |
| 199 | id: string; |
| 200 | 'int-virtual-link-desc'?: string; |
| 201 | 'virtual-network-interface-requirement': VNIR[]; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 202 | } |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 203 | /** Interface for the vdu int-cpd => VNIR */ |
| 204 | export interface VNIR { |
| 205 | name: string; |
| 206 | position: number; |
| 207 | 'virtual-interface': VIRTUALINTERFACE; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 208 | } |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 209 | /** Interface for the VIRTUALINTERFACE */ |
| 210 | export interface VIRTUALINTERFACE { |
| 211 | 'type': string; |
| 212 | } |
| 213 | /** Interface for monitoring params */ |
| 214 | export interface MonitoringParam { |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 215 | id: string; |
| 216 | name?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 217 | 'performance-metric'?: string; |
| 218 | 'collection-period'?: number; |
| 219 | } |
| 220 | /** Interface for VNFDATA */ |
| 221 | export interface VNFDATA { |
| 222 | vnfd?: VNFD; |
| 223 | } |
| 224 | |
| 225 | /** Interface for VDU InternalCPD */ |
| 226 | export interface InternalCPD { |
| 227 | id: string; |
| 228 | 'int-virtual-link-desc'?: string; |
| 229 | 'virtual-network-interface-requirement'?: VIRTUALNETWORKINTERFACEREQUIREMENT; |
| 230 | } |
| 231 | |
| 232 | /** Interface for VIRTUALNETWORKINTERFACEREQUIREMENT */ |
| 233 | export interface VIRTUALNETWORKINTERFACEREQUIREMENT { |
| 234 | name: string; |
| 235 | position?: number; |
| 236 | 'virtual-interface'?: VirtualInterface; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 237 | } |
| 238 | |
| 239 | /** Interface for VirutalInterface */ |
| 240 | interface VirtualInterface { |
| 241 | 'type': string; |
| 242 | } |
| 243 | |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 244 | /** Interface for _AdminDetails */ |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 245 | export interface VNFDAdminDetails { |
| 246 | created: number; |
| 247 | modified: string; |
| 248 | onboardingState: string; |
| 249 | operationalState: string; |
| 250 | projects_read: string[]; |
| 251 | projects_write: string[]; |
| 252 | storage: Storage; |
| 253 | 'type': string; |
| 254 | usageState: string; |
| 255 | userDefinedData: JSON; |
| 256 | } |
| 257 | |
| 258 | /** Interface for Storage */ |
| 259 | interface Storage { |
| 260 | descriptor: string; |
| 261 | folder: string; |
| 262 | fs: string; |
| 263 | path: string; |
| 264 | 'pkg-dir': string; |
| 265 | zipfile: string; |
| 266 | } |
| 267 | |
| 268 | /** Interface for VNFData */ |
| 269 | export interface VNFData { |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 270 | identifier?: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 271 | id?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 272 | name?: string; |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 273 | description?: string; |
| 274 | version?: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 275 | 'type'?: string; |
| Barath Kumar R | 79971eb | 2020-12-21 15:42:23 +0530 | [diff] [blame] | 276 | productName?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 277 | provider?: string; |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 278 | onboardingState?: string; |
| 279 | usageState?: string; |
| 280 | created?: string; |
| 281 | state?: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 282 | } |
| 283 | |
| 284 | /** Interface for the Tick */ |
| 285 | export interface Tick { |
| 286 | target: TickPath; |
| 287 | source: TickPath; |
| 288 | left: boolean; |
| 289 | right: boolean; |
| 290 | } |
| 291 | |
| 292 | /** Interface for the Path */ |
| 293 | export interface TickPath { |
| 294 | x: number; |
| 295 | y: number; |
| 296 | id: string; |
| 297 | 'type'?: string; |
| 298 | } |
| 299 | |
| 300 | /** Interface Nodes Creation */ |
| 301 | export interface COMPOSERNODES { |
| 302 | id: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 303 | reflexive: Boolean; |
| 304 | 'type': string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 305 | name?: string; |
| Barath Kumar R | 063a3f1 | 2020-12-29 16:35:09 +0530 | [diff] [blame] | 306 | nodeIndex?: number; |
| 307 | selectorId?: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 308 | x?: number; |
| 309 | y?: number; |
| 310 | fx?: number; |
| 311 | fy?: number; |
| 312 | } |
| 313 | |
| 314 | /** Interface for the GRAPHDETAILS */ |
| 315 | export interface GRAPHDETAILS { |
| 316 | width: number; |
| 317 | height: number; |
| 318 | nodeHeight: number; |
| 319 | nodeWidth: number; |
| 320 | textX: number; |
| 321 | textY: number; |
| 322 | radius: number; |
| 323 | distance: number; |
| 324 | strength: number; |
| 325 | forcex: number; |
| 326 | forcey: number; |
| 327 | sourcePaddingYes: number; |
| 328 | sourcePaddingNo: number; |
| 329 | targetPaddingYes: number; |
| 330 | targetPaddingNo: number; |
| 331 | alphaTarget: number; |
| 332 | imageX: number; |
| 333 | imageY: number; |
| 334 | shiftKeyCode: number; |
| 335 | } |