forked from CDOT-CV/jpo-cvmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCVManager_SampleData.sql
More file actions
71 lines (57 loc) · 2.87 KB
/
Copy pathCVManager_SampleData.sql
File metadata and controls
71 lines (57 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
-- Sample data to test CV Manager locally or in a new deployment
-- This is only recommended to be used for testing, do not use in a deployed environment
INSERT INTO public.manufacturers(name)
VALUES ('Commsignia'), ('Yunex');
INSERT INTO public.rsu_models(
name, supported_radio, manufacturer)
VALUES ('ITS-RS4-M', 'DSRC,C-V2X', 1), ('RSU2X US', 'DSRC,C-V2X', 2);
INSERT INTO public.firmware_images(
name, model, install_package, version)
VALUES ('y20.0.0', 1, 'install_y20_0_0.tar', 'y20.0.0'), ('y20.1.0', 1, 'install_y20_1_0.tar', 'y20.1.0');
INSERT INTO public.firmware_upgrade_rules(
from_id, to_id)
VALUES (1, 2);
INSERT INTO public.rsu_credentials(
username, password, nickname)
VALUES ('username', 'password', 'cred1');
INSERT INTO public.snmp_credentials(
username, password, encrypt_password, nickname)
VALUES ('username', 'password', 'encryption-pw', 'snmp1');
INSERT INTO public.snmp_versions(
version_code, nickname)
VALUES ('41', 'RSU 4.1');
INSERT INTO public.snmp_versions(
version_code, nickname)
VALUES ('1218', 'NTCIP 1218');
INSERT INTO public.rsus(
geography, milepost, ipv4_address, serial_number, iss_scms_id, primary_route, model, credential_id, snmp_credential_id, snmp_version_id, firmware_version, target_firmware_version)
VALUES (ST_GeomFromText('POINT(-105.014182 39.740422)'), 1, '10.0.0.180', 'E5672', 'E5672', 'I999', 1, 1, 1, 1, 1, 1),
(ST_GeomFromText('POINT(-104.967723 39.918758)'), 2, '10.0.0.78', 'E5321', 'E5321', 'I999', 1, 1, 1, 2, 2, 2);
INSERT INTO public.organizations(
name)
VALUES ('Test Org');
INSERT INTO public.roles(
name)
VALUES ('admin'), ('operator'), ('user');
INSERT INTO public.rsu_organization(
rsu_id, organization_id)
VALUES (1, 1), (2, 1);
-- Replace user with a real gmail to test GCP OAuth2.0 support
INSERT INTO public.users(
email, first_name, last_name, super_user, receive_error_emails)
VALUES ('test@gmail.com', 'Test', 'User', '1', '1');
INSERT INTO public.user_organization(
user_id, organization_id, role_id)
VALUES (1, 1, 1);
INSERT INTO public.snmp_msgfwd_type(
name)
VALUES ('rsuDsrcFwd'), ('rsuReceivedMsg'), ('rsuXmitMsgFwding');
INSERT INTO public.snmp_msgfwd_config(
rsu_id, msgfwd_type, snmp_index, message_type, dest_ipv4, dest_port, start_datetime, end_datetime, active)
VALUES (1, 1, 1, 'BSM', '10.0.0.80', 46800, '2024/04/01T00:00:00', '2034/04/01T00:00:00', '1'),
(1, 1, 2, 'BSM', '10.0.0.81', 46800, '2024/04/01T00:00:00', '2034/04/01T00:00:00', '1'),
(1, 1, 3, 'BSM', '10.0.0.82', 46800, '2024/04/01T00:00:00', '2034/04/01T00:00:00', '1'),
(2, 2, 1, 'BSM', '10.0.0.80', 46800, '2024/04/01T00:00:00', '2034/04/01T00:00:00', '1'),
(2, 2, 2, 'BSM', '10.0.0.81', 46800, '2024/04/01T00:00:00', '2034/04/01T00:00:00', '1'),
(2, 3, 1, 'MAP', '10.0.0.80', 44920, '2024/04/01T00:00:00', '2034/04/01T00:00:00', '1'),
(2, 3, 2, 'SPAT', '10.0.0.80', 44910, '2024/04/01T00:00:00', '2034/04/01T00:00:00', '1');