Fix license headers
[ccsdk/sli/adaptors.git] / resource-assignment / provider / src / test / resources / sql / data.sql
1 ---
2 -- ============LICENSE_START=======================================================
3 -- openECOMP : SDN-C
4 -- ================================================================================
5 -- Copyright (C) 2017 AT&T Intellectual Property. All rights
6 --                      reserved.
7 -- ================================================================================
8 -- Licensed under the Apache License, Version 2.0 (the "License");
9 -- you may not use this file except in compliance with the License.
10 -- You may obtain a copy of the License at
11 -- 
12 --      http://www.apache.org/licenses/LICENSE-2.0
13 -- 
14 -- Unless required by applicable law or agreed to in writing, software
15 -- distributed under the License is distributed on an "AS IS" BASIS,
16 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 -- See the License for the specific language governing permissions and
18 -- limitations under the License.
19 -- ============LICENSE_END=========================================================
20 ---
21
22 INSERT INTO RESOURCE_RULE (
23     resource_name, service_model, end_point_position, service_expression, equipment_level, equipment_expression,
24     allocation_expression, soft_limit_expression, hard_limit_expression)
25 VALUES (
26     'Bandwidth', 'L3SDN', 'IPAG-TOA', 'true', 'Port', 'true',
27     'service-speed-kbps', '0.5 * max-port-speed', '0.9 * max-port-speed');
28
29 INSERT INTO RESOURCE_RULE (
30     resource_name, service_model, end_point_position, service_expression, equipment_level, equipment_expression,
31     allocation_expression, soft_limit_expression, hard_limit_expression)
32 VALUES (
33     'Bandwidth', 'L3SDN', 'VCE-Cust', 'true', 'Server', 'true',
34     'service-speed-kbps', '0.6 * max-server-speed * number-primary-servers', 'max-server-speed * number-primary-servers');
35
36 INSERT INTO RESOURCE_RULE (
37   resource_name, service_model, end_point_position, service_expression, equipment_level,
38     equipment_expression, allocation_expression, soft_limit_expression, hard_limit_expression)
39 VALUES (
40   'Connection', 'L3SDN', 'VCE-Cust', 'true', 'Server',
41     'true', '1', '40', '40');
42
43 INSERT INTO RESOURCE_RULE (
44      resource_name, service_model, end_point_position, service_expression, equipment_level, equipment_expression,
45     allocation_expression, soft_limit_expression, hard_limit_expression)
46 VALUES (
47      'Bandwidth', 'L3SDN', 'VPE-Cust', 'true', 'Port', 'true',
48     'service-speed-kbps', '0.5 * max-port-speed', '0.9 * max-port-speed');
49
50 INSERT INTO RESOURCE_RULE (
51   resource_name, service_model, end_point_position, service_expression,
52     equipment_level, equipment_expression, allocation_expression, soft_limit_expression, hard_limit_expression)
53 VALUES (
54   'Bandwidth', 'L3AVPN-EVC', 'VPE-Cust', 'true', 'Port', 'true', 'service-speed-kbps', '8000000', '8000000');
55
56 INSERT INTO RESOURCE_RULE (
57   resource_name, service_model, end_point_position, service_expression,
58     equipment_level, equipment_expression, allocation_expression, soft_limit_expression, hard_limit_expression)
59 VALUES (
60   'Connection', 'L3AVPN-EVC', 'VPE-Cust', 'true', 'Port', 'true', '1', '200', '200');
61
62 INSERT INTO RESOURCE_RULE (
63   resource_name, service_model, end_point_position, service_expression,
64     equipment_level, equipment_expression, allocation_expression, soft_limit_expression, hard_limit_expression)
65 VALUES (
66   'Bandwidth', 'L3AVPN-PORT', 'VPE-Cust', 'true', 'Port', 'true', 'service-speed-kbps', '8000000', '8000000');
67
68 insert into RESOURCE_THRESHOLD (
69   resource_rule_id, threshold_expression, threshold_message)
70 values (
71   (select resource_rule_id from RESOURCE_RULE where resource_name = 'Bandwidth' and equipment_level = 'Server'),
72     '0.5 * max-server-speed * number-primary-servers',
73     'The provisioned access bandwidth is at or exceeds 50% of the total server capacity.');
74
75 insert into RESOURCE_THRESHOLD (
76   resource_rule_id, threshold_expression, threshold_message)
77 values (
78   (select resource_rule_id from RESOURCE_RULE where resource_name = 'Bandwidth' and equipment_level = 'Server'),
79     '0.7 * max-server-speed * number-primary-servers',
80     'The provisioned access bandwidth is at or exceeds 70% of the total server capacity.');
81
82 INSERT INTO RANGE_RULE (
83   range_name, service_model, end_point_position, equipment_level, min_value, max_value)
84 VALUES (
85   'subinterface-id', 'L3AVPN-EVC', 'VPE-Cust', 'Port', 100, 3999);
86
87 INSERT INTO RANGE_RULE (
88   range_name, service_model, end_point_position, equipment_level, min_value, max_value)
89 VALUES (
90   'vlan-id-inner', 'L3AVPN-EVC', 'VPE-Cust', 'Port', 2, 4091);
91
92 INSERT INTO RANGE_RULE (
93   range_name, service_model, end_point_position, equipment_level, min_value, max_value)
94 VALUES (
95   'bundle-id', 'L3AVPN-PORT', 'VPE-Cust', 'Port', 1, 99999);
96
97 INSERT INTO MAX_PORT_SPEED (
98      image_file_name, end_point_position, interface_name, max_speed, unit)
99 VALUES (
100      'JUNIPER_VPE_IMAGE_FILENAME', 'VPE-Cust', 'ae0', 5000, 'Mpbs');
101
102 INSERT INTO MAX_SERVER_SPEED (server_model, evc_count, max_speed, unit, description)
103 VALUES ('ALL', 5, 1600, 'Mbps', 'Max speed, when there are <=5 EVC on server');
104
105 INSERT INTO MAX_SERVER_SPEED (server_model, evc_count, max_speed, unit, description)
106 VALUES ('ALL', 10, 1400, 'Mbps', 'Max speed, when there are 6 to 10 (including 10) EVC on server');
107
108 INSERT INTO MAX_SERVER_SPEED (server_model, evc_count, max_speed, unit, description)
109 VALUES ('ALL', 15, 1000, 'Mbps', 'Max speed, when there are 11 to 15 (including 15) EVC on server');
110
111 INSERT INTO MAX_SERVER_SPEED (server_model, evc_count, max_speed, unit, description)
112 VALUES ('ALL', 20, 700, 'Mbps', 'Max speed, when there are 16 to 20 (including 20) EVC on server');
113
114 INSERT INTO MAX_SERVER_SPEED (server_model, evc_count, max_speed, unit, description)
115 VALUES ('ALL', 10000, 500, 'Mbps', 'Max speed, when there are 21 or more EVC on server');
116
117 INSERT INTO PARAMETERS (name, value, category, memo)
118 VALUES ('homing.pserver.sparing.ratio', '1:1', 'homing',
119   'Ratio of primary to backup servers within any of the AIC sites. Used in RA to calculate the max allowed bw in an AIC site.');
120