| 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 NSD related information. |
| 20 | */ |
| 21 | |
| 22 | import { VNFDAdminDetails } from './VNFDModel'; |
| 23 | |
| 24 | /** Interface for NSData */ |
| 25 | export interface NSData { |
| 26 | shortName: string; |
| 27 | identifier: string; |
| 28 | description: string; |
| 29 | vendor: string; |
| 30 | version: string; |
| 31 | page?: string; |
| 32 | name?: string; |
| 33 | projectName?: string; |
| 34 | userName?: string; |
| 35 | username?: string; |
| 36 | } |
| 37 | |
| 38 | /** Interface for the nscompose descriptors content */ |
| 39 | export interface NSDDetails { |
| 40 | 'connection-point': CONNECTIONPOINT[]; |
| 41 | 'constituent-vnfd': CONSTITUENTVNFD[]; |
| 42 | description: string; |
| 43 | id: string; |
| 44 | logo: string; |
| 45 | name: string; |
| 46 | 'short-name': string; |
| 47 | vendor: string; |
| 48 | version: string; |
| 49 | vld: VLD[]; |
| 50 | _admin: VNFDAdminDetails; |
| 51 | _id: string; |
| 52 | 'constituent-vnfr-ref': string[]; |
| 53 | } |
| 54 | |
| 55 | /** Interface for the connection-point */ |
| 56 | export interface CONNECTIONPOINT { |
| 57 | name: string; |
| 58 | 'vld-id-ref': string; |
| 59 | } |
| 60 | |
| 61 | /** Interface for the constituent-vnfd */ |
| 62 | export interface CONSTITUENTVNFD { |
| 63 | 'member-vnf-index': number; |
| 64 | 'vnfd-id-ref': string; |
| 65 | } |
| 66 | |
| 67 | /** Interface for the vld */ |
| 68 | export interface VLD { |
| 69 | id: string; |
| 70 | 'mgmt-network': boolean; |
| 71 | name: string; |
| 72 | 'short-name'?: string; |
| 73 | 'type': string; |
| 74 | 'vnfd-connection-point-ref'?: VNFDCONNECTIONPOINTREF[]; |
| 75 | 'vim-network-name': string; |
| 76 | } |
| 77 | |
| 78 | /** Interface for VNFDCONNECTIONPOINTREF */ |
| 79 | export interface VNFDCONNECTIONPOINTREF { |
| 80 | 'member-vnf-index-ref': number; |
| 81 | 'vnfd-connection-point-ref': string; |
| 82 | 'vnfd-id-ref': string; |
| 83 | } |
| 84 | /** Interface Nodes Creation */ |
| 85 | export interface COMPOSERNODES { |
| 86 | id: string; |
| 87 | reflexive: Boolean; |
| 88 | 'type': string; |
| 89 | name?: string; |
| 90 | nodeIndex?: number; |
| 91 | selectorId?: string; |
| 92 | x?: number; |
| 93 | y?: number; |
| 94 | fx?: number; |
| 95 | fy?: number; |
| 96 | } |
| 97 | |
| 98 | /** Interface for the Tick */ |
| 99 | export interface Tick { |
| 100 | target: TickPath; |
| 101 | source: TickPath; |
| 102 | left: boolean; |
| 103 | right: boolean; |
| 104 | } |
| 105 | |
| 106 | /** Interface for the Path */ |
| 107 | export interface TickPath { |
| 108 | x: number; |
| 109 | y: number; |
| 110 | id: string; |
| 111 | 'type'?: string; |
| 112 | } |
| 113 | |
| 114 | /** Interface for the NSD */ |
| 115 | interface NSD { |
| 116 | 'constituent-vnfd': CONSTITUENTVNFD[]; |
| 117 | description: string; |
| 118 | id: string; |
| 119 | name: string; |
| 120 | 'short-name': string; |
| 121 | vendor: string; |
| 122 | version: string; |
| 123 | vld: VLD[]; |
| 124 | _admin: VNFDAdminDetails; |
| 125 | _id: string; |
| 126 | } |
| 127 | /** Interface for the GRAPHDETAILS */ |
| 128 | export interface GRAPHDETAILS { |
| 129 | width: number; |
| 130 | height: number; |
| 131 | nodeHeight: number; |
| 132 | nodeWidth: number; |
| 133 | textX: number; |
| 134 | textY: number; |
| 135 | radius: number; |
| 136 | distance: number; |
| 137 | strength: number; |
| 138 | forcex: number; |
| 139 | forcey: number; |
| 140 | sourcePaddingYes: number; |
| 141 | sourcePaddingNo: number; |
| 142 | targetPaddingYes: number; |
| 143 | targetPaddingNo: number; |
| 144 | alphaTarget: number; |
| 145 | imageX: number; |
| 146 | imageY: number; |
| 147 | shiftKeyCode: number; |
| 148 | } |
| 149 | |
| 150 | /** Interface for the NS Create params */ |
| 151 | export interface NSCREATEPARAMS { |
| 152 | nsName: string; |
| 153 | nsDescription: string; |
| 154 | nsdId: string; |
| 155 | vimAccountId: string; |
| 156 | vld: string; |
| 157 | ssh_keys: string[]; |
| 158 | } |
| 159 | |
| 160 | /** Interface for the NSI Create params */ |
| 161 | export interface NSICREATEPARAMS { |
| 162 | nsName: string; |
| 163 | nsDescription: string; |
| 164 | nstId: string; |
| 165 | vimAccountId: string; |
| 166 | 'netslice-vld': string; |
| 167 | ssh_keys: string[]; |
| 168 | } |