blob: 4f2e4706534cab4d486fec8a7d3b415f6d193a80 [file] [log] [blame]
Matteo Scandolofb46ae62017-08-08 09:10:50 -07001/*
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 Scandolo7629cc42017-03-13 14:12:15 -070017interface Id3Element {
Matteo Scandolo8cf33a32017-11-14 15:52:29 -080018 x: number;
19 y: number;
Matteo Scandolo7629cc42017-03-13 14:12:15 -070020 fixed?: boolean;
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080021}
22
Matteo Scandolo8cf33a32017-11-14 15:52:29 -080023export interface IXosSgNode extends Id3Element {
Matteo Scandolo0e8a8422017-03-25 14:55:40 -070024 id: string;
Matteo Scandolo35fdf242017-11-30 12:29:45 -080025 data: IXosBaseModel; // this can be a Service, ServiceInstance or Instance
Matteo Scandolo8cf33a32017-11-14 15:52:29 -080026
27 // do we need those?
28 type: string;
29 d3Class?: string;
30}
31
32export interface IXosSgLink {
33 id: string;
34 type: string;
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080035 source: number;
36 target: number;
Matteo Scandolo8cf33a32017-11-14 15:52:29 -080037 data: any; // this can be a ServiceDependency, ServiceInstanceLink or a representation of ServiceInstance.owner_id
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080038}
39
Matteo Scandolo8cf33a32017-11-14 15:52:29 -080040export interface IXosSgConfig {
41 labels: boolean;
42}
43
44export interface IXosBaseModel {
45 id: number;
46 class_names: string;
47 name?: string;
48 [x: string]: any; // allow extra properties
49}
50
51export interface IXosOwnershipLink {
52 service: number;
53 service_instance: number;
54 type: 'ownership';
Matteo Scandoloa62adbc2017-03-02 15:37:34 -080055}