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