Matteo Scandolo | fb46ae6 | 2017-08-08 09:10:50 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-present Open Networking Foundation |
| 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 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 17 | interface Id3Element { |
Matteo Scandolo | 8cf33a3 | 2017-11-14 15:52:29 -0800 | [diff] [blame] | 18 | x: number; |
| 19 | y: number; |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 20 | fixed?: boolean; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 21 | } |
| 22 | |
Matteo Scandolo | 8cf33a3 | 2017-11-14 15:52:29 -0800 | [diff] [blame] | 23 | export interface IXosSgNode extends Id3Element { |
Matteo Scandolo | 0e8a842 | 2017-03-25 14:55:40 -0700 | [diff] [blame] | 24 | id: string; |
Matteo Scandolo | 35fdf24 | 2017-11-30 12:29:45 -0800 | [diff] [blame] | 25 | data: IXosBaseModel; // this can be a Service, ServiceInstance or Instance |
Matteo Scandolo | 8cf33a3 | 2017-11-14 15:52:29 -0800 | [diff] [blame] | 26 | |
| 27 | // do we need those? |
| 28 | type: string; |
| 29 | d3Class?: string; |
| 30 | } |
| 31 | |
| 32 | export interface IXosSgLink { |
| 33 | id: string; |
| 34 | type: string; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 35 | source: number; |
| 36 | target: number; |
Matteo Scandolo | 8cf33a3 | 2017-11-14 15:52:29 -0800 | [diff] [blame] | 37 | data: any; // this can be a ServiceDependency, ServiceInstanceLink or a representation of ServiceInstance.owner_id |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 38 | } |
| 39 | |
Matteo Scandolo | 8cf33a3 | 2017-11-14 15:52:29 -0800 | [diff] [blame] | 40 | export interface IXosSgConfig { |
| 41 | labels: boolean; |
| 42 | } |
| 43 | |
| 44 | export interface IXosBaseModel { |
| 45 | id: number; |
| 46 | class_names: string; |
| 47 | name?: string; |
| 48 | [x: string]: any; // allow extra properties |
| 49 | } |
| 50 | |
| 51 | export interface IXosOwnershipLink { |
| 52 | service: number; |
| 53 | service_instance: number; |
| 54 | type: 'ownership'; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 55 | } |