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