| 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; |
| Barath Kumar R | 218e881 | 2020-09-02 16:43:05 +0530 | [diff] [blame] | 52 | _links?: string; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 53 | 'constituent-vnfr-ref': string[]; |
| 54 | } |
| 55 | |
| 56 | /** Interface for the connection-point */ |
| 57 | export interface CONNECTIONPOINT { |
| 58 | name: string; |
| 59 | 'vld-id-ref': string; |
| 60 | } |
| 61 | |
| 62 | /** Interface for the constituent-vnfd */ |
| 63 | export interface CONSTITUENTVNFD { |
| 64 | 'member-vnf-index': number; |
| 65 | 'vnfd-id-ref': string; |
| 66 | } |
| 67 | |
| 68 | /** Interface for the vld */ |
| 69 | export interface VLD { |
| 70 | id: string; |
| 71 | 'mgmt-network': boolean; |
| 72 | name: string; |
| 73 | 'short-name'?: string; |
| 74 | 'type': string; |
| 75 | 'vnfd-connection-point-ref'?: VNFDCONNECTIONPOINTREF[]; |
| 76 | 'vim-network-name': string; |
| 77 | } |
| 78 | |
| 79 | /** Interface for VNFDCONNECTIONPOINTREF */ |
| 80 | export interface VNFDCONNECTIONPOINTREF { |
| 81 | 'member-vnf-index-ref': number; |
| 82 | 'vnfd-connection-point-ref': string; |
| 83 | 'vnfd-id-ref': string; |
| 84 | } |
| 85 | /** Interface Nodes Creation */ |
| 86 | export interface COMPOSERNODES { |
| 87 | id: string; |
| 88 | reflexive: Boolean; |
| 89 | 'type': string; |
| 90 | name?: string; |
| 91 | nodeIndex?: number; |
| 92 | selectorId?: string; |
| 93 | x?: number; |
| 94 | y?: number; |
| 95 | fx?: number; |
| 96 | fy?: number; |
| 97 | } |
| 98 | |
| 99 | /** Interface for the Tick */ |
| 100 | export interface Tick { |
| 101 | target: TickPath; |
| 102 | source: TickPath; |
| 103 | left: boolean; |
| 104 | right: boolean; |
| 105 | } |
| 106 | |
| 107 | /** Interface for the Path */ |
| 108 | export interface TickPath { |
| 109 | x: number; |
| 110 | y: number; |
| 111 | id: string; |
| 112 | 'type'?: string; |
| 113 | } |
| 114 | |
| 115 | /** Interface for the NSD */ |
| 116 | interface NSD { |
| 117 | 'constituent-vnfd': CONSTITUENTVNFD[]; |
| 118 | description: string; |
| 119 | id: string; |
| 120 | name: string; |
| 121 | 'short-name': string; |
| 122 | vendor: string; |
| 123 | version: string; |
| 124 | vld: VLD[]; |
| 125 | _admin: VNFDAdminDetails; |
| 126 | _id: string; |
| 127 | } |
| 128 | /** Interface for the GRAPHDETAILS */ |
| 129 | export interface GRAPHDETAILS { |
| 130 | width: number; |
| 131 | height: number; |
| 132 | nodeHeight: number; |
| 133 | nodeWidth: number; |
| 134 | textX: number; |
| 135 | textY: number; |
| 136 | radius: number; |
| 137 | distance: number; |
| 138 | strength: number; |
| 139 | forcex: number; |
| 140 | forcey: number; |
| 141 | sourcePaddingYes: number; |
| 142 | sourcePaddingNo: number; |
| 143 | targetPaddingYes: number; |
| 144 | targetPaddingNo: number; |
| 145 | alphaTarget: number; |
| 146 | imageX: number; |
| 147 | imageY: number; |
| 148 | shiftKeyCode: number; |
| 149 | } |
| 150 | |
| 151 | /** Interface for the NS Create params */ |
| 152 | export interface NSCREATEPARAMS { |
| 153 | nsName: string; |
| 154 | nsDescription: string; |
| 155 | nsdId: string; |
| 156 | vimAccountId: string; |
| 157 | vld: string; |
| 158 | ssh_keys: string[]; |
| 159 | } |
| 160 | |
| 161 | /** Interface for the NSI Create params */ |
| 162 | export interface NSICREATEPARAMS { |
| 163 | nsName: string; |
| 164 | nsDescription: string; |
| 165 | nstId: string; |
| 166 | vimAccountId: string; |
| 167 | 'netslice-vld': string; |
| 168 | ssh_keys: string[]; |
| 169 | } |
| Barath Kumar R | 6e96d1b | 2020-07-10 12:10:15 +0530 | [diff] [blame] | 170 | |
| 171 | /** Interface for the VDU Primitive Levels */ |
| 172 | export interface VDUPRIMITIVELEVEL { |
| 173 | id: string; |
| 174 | name: string; |
| 175 | 'vdu-configuration': {}; |
| 176 | } |
| Barath Kumar R | 5d75d51 | 2020-09-02 17:00:07 +0530 | [diff] [blame] | 177 | |
| 178 | /** Interface for the KDU Primitive Levels */ |
| 179 | export interface KDUPRIMITIVELEVEL { |
| 180 | name: string; |
| 181 | 'juju-bundle': string; |
| 182 | 'kdu-configuration': {}; |
| 183 | } |