· 8 years ago · Jul 26, 2018, 03:20 AM
1[root@localhost tca]# /opt/traffic_ops/install/bin/postinstall
2Carton is up to date. (v1.0.34)
3Installing modules using /opt/traffic_ops/app/cpanfile
4Complete! Modules were installed into /opt/traffic_ops/app/local
5Now installing goose
6Successfully installed goose to /opt/traffic_ops/go/bin/goose
7unzipping log
8Starting postinstall
9Debug is on
10Log file '/var/log/traffic_ops/cpan.log' does not exist - not rotating log
11No input file given - using defaults
12Kept /opt/traffic_ops/app/public/js/jquery.dataTables.min.js
13Kept /opt/traffic_ops/app/public/js/fancybox/jquery.fancybox-buttons.js
14Kept /opt/traffic_ops/app/public/js/fancybox/fancybox_loading@2x.gif
15Kept /opt/traffic_ops/app/public/js/fancybox/fancybox_loading.gif
16Kept /opt/traffic_ops/app/public/js/fancybox/fancybox_buttons.png
17Kept /opt/traffic_ops/app/public/js/fancybox/jquery.fancybox-thumbs.js
18Kept /opt/traffic_ops/app/public/js/fancybox/jquery.fancybox-buttons.css
19Kept /opt/traffic_ops/app/public/js/fancybox/jquery.fancybox-thumbs.css
20Kept /opt/traffic_ops/app/public/js/fancybox/fancybox_sprite@2x.png
21Kept /opt/traffic_ops/app/public/js/fancybox/jquery.fancybox.css
22Kept /opt/traffic_ops/app/public/js/fancybox/jquery.fancybox-media.js
23Kept /opt/traffic_ops/app/public/js/fancybox/fancybox_overlay.png
24Kept /opt/traffic_ops/app/public/js/fancybox/fancybox_sprite.png
25Kept /opt/traffic_ops/app/public/js/fancybox/jquery.fancybox.js
26Kept /opt/traffic_ops/app/public/js/jquery-1.11.2.min.js
27Kept /opt/traffic_ops/app/public/js/jquery-ui.min.js
28Kept /opt/traffic_ops/app/public/css/jquery-ui.css
29Kept /opt/traffic_ops/app/public/css/images/ui-bg_flat_30_cccccc_40x100.png
30Kept /opt/traffic_ops/app/public/css/images/ui-bg_flat_50_5c5c5c_40x100.png
31Kept /opt/traffic_ops/app/public/css/images/ui-bg_glass_40_ffc73d_1x400.png
32Kept /opt/traffic_ops/app/public/css/images/ui-bg_highlight-hard_20_0972a5_1x100.png
33Kept /opt/traffic_ops/app/public/css/images/ui-bg_highlight-soft_33_003147_1x100.png
34Kept /opt/traffic_ops/app/public/css/images/ui-bg_highlight-soft_35_222222_1x100.png
35Kept /opt/traffic_ops/app/public/css/images/ui-bg_highlight-soft_44_444444_1x100.png
36Kept /opt/traffic_ops/app/public/css/images/ui-bg_highlight-soft_80_eeeeee_1x100.png
37Kept /opt/traffic_ops/app/public/css/images/ui-bg_loop_25_000000_21x21.png
38Kept /opt/traffic_ops/app/public/css/images/ui-icons_222222_256x240.png
39Kept /opt/traffic_ops/app/public/css/images/ui-icons_4b8e0b_256x240.png
40Kept /opt/traffic_ops/app/public/css/images/ui-icons_a83300_256x240.png
41Kept /opt/traffic_ops/app/public/css/images/ui-icons_cccccc_256x240.png
42Kept /opt/traffic_ops/app/public/css/images/ui-icons_ffffff_256x240.png
43Kept /opt/traffic_ops/app/public/js/bootstrap.min.js
44Kept /opt/traffic_ops/app/public/js/jqtree/tree.jquery.js
45===========/opt/traffic_ops/app/conf/production/database.conf===========
46Database type [Pg]:
47Database type: Pg
48Database name [traffic_ops]:
49Database name: traffic_ops
50Database server hostname IP or FQDN [localhost]: 192.168.40.10
51Database server hostname IP or FQDN: 192.168.40.10
52Database port number [5432]:
53Database port number: 5432
54Traffic Ops database user [traffic_ops]:
55Traffic Ops database user: traffic_ops
56Password for Traffic Ops database user:
57Re-Enter Password for Traffic Ops database user:
58Writing json to /opt/traffic_ops/app/conf/production/database.conf
59Database configuration has been saved
60===========/opt/traffic_ops/app/db/dbconf.yml===========
61Database server root (admin) user [postgres]:
62Database server root (admin) user: postgres
63Password for database server admin:
64Re-Enter Password for database server admin:
65Download Maxmind Database? [yes]: yes
66Download Maxmind Database?: yes
67Not setting up ldap
68===========/opt/traffic_ops/install/data/json/users.json===========
69Administration username for Traffic Ops [admin]:
70Administration username for Traffic Ops: admin
71Password for the admin user:
72Re-Enter Password for the admin user:
73Writing json to /opt/traffic_ops/install/data/json/users.json
74===========/opt/traffic_ops/install/data/json/openssl_configuration.json===========
75Do you want to generate a certificate? [yes]:
76Do you want to generate a certificate?: yes
77Country Name (2 letter code): VN
78Country Name (2 letter code): VN
79State or Province Name (full name): CC
80State or Province Name (full name): CC
81Locality Name (eg, city): HCMC
82Locality Name (eg, city): HCMC
83Organization Name (eg, company): CC
84Organization Name (eg, company): CC
85Organizational Unit Name (eg, section):
86Organizational Unit Name (eg, section):
87Common Name (eg, your name or your server's hostname): tca1.coc.lab
88Common Name (eg, your name or your server's hostname): tca1.coc.lab
89RSA Passphrase:
90Re-Enter RSA Passphrase:
91===========/opt/traffic_ops/install/data/json/profiles.json===========
92Traffic Ops url [https://localhost]: https://tca1.coc.lab
93Traffic Ops url: https://tca1.coc.lab
94Human-readable CDN Name. (No whitespace, please) [kabletown_cdn]: COC_CDN
95Human-readable CDN Name. (No whitespace, please): COC_CDN
96DNS sub-domain for which your CDN is authoritative [cdn1.kabletown.net]: cdn.coc.lab
97DNS sub-domain for which your CDN is authoritative: cdn.coc.lab
98Writing json to /opt/traffic_ops/install/data/json/profiles.json
99Downloading Maxmind data
100--2018-07-26 17:11:17-- http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
101Resolving geolite.maxmind.com (geolite.maxmind.com)... 104.16.38.47, 104.16.37.47, 2400:cb00:2048:1::6810:252f, ...
102Connecting to geolite.maxmind.com (geolite.maxmind.com)|104.16.38.47|:80... connected.
103HTTP request sent, awaiting response... 200 OK
104Length: 26585953 (25M) [application/octet-stream]
105Saving to: ‘GeoLite2-City.mmdb.gz.2’
106
107100%[==============================================================================================================================>] 26,585,953 7.84MB/s in 3.7s
108
1092018-07-26 17:11:21 (6.86 MB/s) - ‘GeoLite2-City.mmdb.gz.2’ saved [26585953/26585953]
110
111--2018-07-26 17:11:21-- http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
112Resolving geolite.maxmind.com (geolite.maxmind.com)... 104.16.38.47, 104.16.37.47, 2400:cb00:2048:1::6810:252f, ...
113Connecting to geolite.maxmind.com (geolite.maxmind.com)|104.16.38.47|:80... connected.
114HTTP request sent, awaiting response... 200 OK
115Length: 13889585 (13M) [application/octet-stream]
116Saving to: ‘GeoLiteCityv6.dat.gz.2’
117
118100%[==============================================================================================================================>] 13,889,585 5.92MB/s in 2.2s
119
1202018-07-26 17:11:23 (5.92 MB/s) - ‘GeoLiteCityv6.dat.gz.2’ saved [13889585/13889585]
121
122Installing SSL Certificates
123
124 We're now running a script to generate a self signed X509 SSL certificate.
125
126Postinstall SSL Certificate Creation
127The server key has been generated
128Generating an RSA Private Server Key
129Generating RSA private key, 1024 bit long modulus
130.......................++++++
131....................................++++++
132e is 65537 (0x10001)
133Creating a Certificate Signing Request (CSR)
134No value provided for Subject Attribute OU, skipped
135The Certificate Signing Request has been generated
136Removing the pass phrase from the server key
137writing RSA key
138The pass phrase has been removed from the server key
139Generating a Self-signed certificate
140Signature ok
141subject=/C=VN/ST=CC/L=HCMC/O=CC/CN=tca1.coc.lab
142Getting Private key
143A server key and self signed certificate has been generated
144Installing the server key and server certificate
145The private key has been installed
146Installing the self signed certificate
147Saving the self signed csr
148
149 The self signed certificate has now been installed.
150
151 You may obtain a certificate signed by a Certificate Authority using the
152 server.csr file saved in the current directory. Once you have obtained
153 a signed certificate, copy it to /etc/pki/tls/certs/localhost.crt and
154 restart Traffic Ops.
155
156SSL Certificates have been installed
157===========/opt/traffic_ops/app/conf/cdn.conf===========
158Generate a new secret? [yes]:
159Generate a new secret?: yes
160Number of secrets to keep? [1]:
161Number of secrets to keep?: 1
162Port to serve on? [443]:
163Port to serve on?: 443
164Number of workers? [12]:
165Number of workers?: 12
166Traffic Ops url? [http://localhost:3000]: http://tca1.coc.lab:3000
167Traffic Ops url?: http://tca1.coc.lab:3000
168ldap.conf location? (default is /opt/traffic_ops/app/conf/ldap.conf):
169ldap.conf location? (default is /opt/traffic_ops/app/conf/ldap.conf):
170Secrets found in cdn.conf file
171Writing json to /opt/traffic_ops/app/conf/cdn.conf
172CDN configuration has been saved
173Database connection succeeded
174paramconf $VAR1 = {
175 'tm.url' => 'https://tca1.coc.lab',
176 'dns_subdomain' => 'cdn.coc.lab',
177 'cdn_name' => 'COC_CDN'
178 };
179Setting up the database data
180Found existing tables skipping table creation
181Migrating database...
182goose: no migrations to run. current version: 20180627000000
183Database migrate succeeded
184Seeding database w/ required data.
185/*
186
187 Licensed under the Apache License, Version 2.0 (the "License");
188 you may not use this file except in compliance with the License.
189 You may obtain a copy of the License at
190
191 http://www.apache.org/licenses/LICENSE-2.0
192
193 Unless required by applicable law or agreed to in writing, software
194 distributed under the License is distributed on an "AS IS" BASIS,
195 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
196 See the License for the specific language governing permissions and
197 limitations under the License.
198*/
199
200
201insert into cdn (name, dnssec_enabled, domain_name) values ('ALL', false, '-') ON CONFLICT (name) DO NOTHING;
202INSERT 0 0
203insert into job_agent (name, description, active) values ('dummy', 'Description of Purge Agent', 1) ON CONFLICT (name) DO NOTHING;
204INSERT 0 0
205insert into job_status (name, description) values ('PENDING', 'Job is queued, but has not been picked up by any agents yet') ON CONFLICT (name) DO NOTHING;
206INSERT 0 0
207insert into profile (name, description, type) values ('GLOBAL', 'Global Traffic Ops profile, DO NOT DELETE', 'UNK_PROFILE') ON CONFLICT (name) DO NOTHING;
208INSERT 0 0
209DO
210$do$
211BEGIN
212 IF NOT EXISTS (SELECT id FROM PARAMETER WHERE name = 'tm.instance_name' AND config_file = 'global') THEN
213 insert into parameter (name, config_file, value) values ('tm.instance_name', 'global', 'Traffic Ops CDN');
214 insert into profile_parameter (profile, parameter) values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'tm.instance_name' and config_file = 'global' and value = 'Traffic Ops CDN') ) ON CONFLICT (profile, parameter) DO NOTHING;
215 END IF;
216 IF NOT EXISTS (SELECT id FROM PARAMETER WHERE name = 'tm.toolname' AND config_file = 'global') THEN
217 insert into parameter (name, config_file, value) values ('tm.toolname', 'global', 'Traffic Ops');
218 insert into profile_parameter (profile, parameter) values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'tm.toolname' and config_file = 'global' and value = 'Traffic Ops') ) ON CONFLICT (profile, parameter) DO NOTHING;
219 END IF;
220 IF NOT EXISTS (SELECT id FROM PARAMETER WHERE name = 'use_tenancy' AND config_file = 'global') THEN
221 insert into parameter (name, config_file, value) values ('use_tenancy', 'global', '0');
222 insert into profile_parameter (profile, parameter) values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'use_tenancy' and config_file = 'global' and value = '0') ) ON CONFLICT (profile, parameter) DO NOTHING;
223 END IF;
224END
225$do$;
226DO
227insert into profile (name, description, type) values ('TRAFFIC_ANALYTICS', 'Traffic Analytics profile', 'UNK_PROFILE') ON CONFLICT (name) DO NOTHING;
228INSERT 0 0
229insert into profile (name, description, type) values ('TRAFFIC_OPS', 'Traffic Ops profile', 'UNK_PROFILE') ON CONFLICT (name) DO NOTHING;
230INSERT 0 0
231insert into profile (name, description, type) values ('TRAFFIC_OPS_DB', 'Traffic Ops DB profile', 'UNK_PROFILE') ON CONFLICT (name) DO NOTHING;
232INSERT 0 0
233insert into profile (name, description, type) values ('TRAFFIC_PORTAL', 'Traffic Portal profile', 'TP_PROFILE') ON CONFLICT (name) DO NOTHING;
234INSERT 0 0
235insert into profile (name, description, type) values ('TRAFFIC_STATS', 'Traffic Stats profile', 'TS_PROFILE') ON CONFLICT (name) DO NOTHING;
236INSERT 0 0
237insert into profile (name, description, type) values ('INFLUXDB', 'InfluxDb profile', 'INFLUXDB_PROFILE') ON CONFLICT (name) DO NOTHING;
238INSERT 0 0
239insert into profile (name, description, type) values ('RIAK_ALL', 'Riak profile for all CDNs', 'RIAK_PROFILE') ON CONFLICT (name) DO NOTHING;
240INSERT 0 0
241insert into status (name, description) values ('OFFLINE', 'Server is Offline. Not active in any configuration.') ON CONFLICT (name) DO NOTHING;
242INSERT 0 0
243insert into status (name, description) values ('ONLINE', 'Server is online.') ON CONFLICT (name) DO NOTHING;
244INSERT 0 0
245insert into status (name, description) values ('REPORTED', 'Server is online and reported in the health protocol.') ON CONFLICT (name) DO NOTHING;
246INSERT 0 0
247insert into status (name, description) values ('ADMIN_DOWN', 'Sever is administrative down and does not receive traffic.') ON CONFLICT (name) DO NOTHING;
248INSERT 0 0
249insert into status (name, description) values ('CCR_IGNORE', 'Server is ignored by traffic router.') ON CONFLICT (name) DO NOTHING;
250INSERT 0 0
251insert into status (name, description) values ('PRE_PROD', 'Pre Production. Not active in any configuration.') ON CONFLICT (name) DO NOTHING;
252INSERT 0 0
253insert into role (name, description, priv_level) values ('admin', 'super-user', 30) ON CONFLICT (name) DO NOTHING;
254INSERT 0 0
255insert into role (name, description, priv_level) values ('operations', 'Operations user', 20) ON CONFLICT (name) DO NOTHING;
256INSERT 0 0
257insert into role (name, description, priv_level) values ('federation', 'Role for Secondary CZF', 15) ON CONFLICT (name) DO NOTHING;
258INSERT 0 0
259insert into role (name, description, priv_level) values ('steering', 'Role for Steering Delivery Services', 15) ON CONFLICT (name) DO NOTHING;
260INSERT 0 0
261insert into role (name, description, priv_level) values ('portal', 'Portal User', 15) ON CONFLICT (name) DO NOTHING;
262INSERT 0 0
263insert into role (name, description, priv_level) values ('ort', 'ORT User', 11) ON CONFLICT (name) DO NOTHING;
264INSERT 0 0
265insert into role (name, description, priv_level) values ('read-only', 'Read-Only user', 10) ON CONFLICT (name) DO NOTHING;
266INSERT 0 0
267insert into role (name, description, priv_level) values ('disallowed', 'Block all access', 0) ON CONFLICT (name) DO NOTHING;
268INSERT 0 0
269insert into tenant (name, active, parent_id) values ('root', true, null) ON CONFLICT DO NOTHING;
270INSERT 0 0
271insert into tenant (name, active, parent_id) values ('unassigned', true, (select id from tenant where name='root')) ON CONFLICT DO NOTHING;
272INSERT 0 0
273insert into capability (name, description) values ('all-read', 'Full read access') ON CONFLICT (name) DO NOTHING;
274INSERT 0 0
275insert into capability (name, description) values ('all-write', 'Full write access') ON CONFLICT (name) DO NOTHING;
276INSERT 0 0
277insert into capability (name, description) values ('asn-read', 'View ASN configuration') ON CONFLICT (name) DO NOTHING;
278INSERT 0 0
279insert into capability (name, description) values ('asn-write', 'Create, edit or delete ASN configuration') ON CONFLICT (name) DO NOTHING;
280INSERT 0 0
281insert into capability (name, description) values ('basic-read', 'Basic read operations. Every user should have this capability') ON CONFLICT (name) DO NOTHING;
282INSERT 0 0
283insert into capability (name, description) values ('basic-write', 'Basic write operations. Every user should have this capability') ON CONFLICT (name) DO NOTHING;
284INSERT 0 0
285insert into capability (name, description) values ('cache-config-files-read', 'View the generated cache configuration files') ON CONFLICT (name) DO NOTHING;
286INSERT 0 0
287insert into capability (name, description) values ('cache-group-read', 'View cache-group configuration') ON CONFLICT (name) DO NOTHING;
288INSERT 0 0
289insert into capability (name, description) values ('cache-group-write', 'Create, edit or delete cache-group configuration') ON CONFLICT (name) DO NOTHING;
290INSERT 0 0
291insert into capability (name, description) values ('cache-stats-read', 'View Cache statistics read access') ON CONFLICT (name) DO NOTHING;
292INSERT 0 0
293insert into capability (name, description) values ('cdn-config-snapshot-read', 'View config snapshot at CDN level') ON CONFLICT (name) DO NOTHING;
294INSERT 0 0
295insert into capability (name, description) values ('cdn-config-snapshot-write', 'Config snapshot write access at CDN level') ON CONFLICT (name) DO NOTHING;
296INSERT 0 0
297insert into capability (name, description) values ('cdn-health-read', 'View CDN health') ON CONFLICT (name) DO NOTHING;
298INSERT 0 0
299insert into capability (name, description) values ('cdn-read', 'View CDN configuration') ON CONFLICT (name) DO NOTHING;
300INSERT 0 0
301insert into capability (name, description) values ('cdn-write', 'Create, edit or delete CDN configuration') ON CONFLICT (name) DO NOTHING;
302INSERT 0 0
303insert into capability (name, description) values ('cdn-security-keys-read', 'View CDN DNSSEC keys') ON CONFLICT (name) DO NOTHING;
304INSERT 0 0
305insert into capability (name, description) values ('cdn-security-keys-write', 'Create, edit or delete CDN DNSSEC keys') ON CONFLICT (name) DO NOTHING;
306INSERT 0 0
307insert into capability (name, description) values ('cdn-stats-read', 'View CDN statistics') ON CONFLICT (name) DO NOTHING;
308INSERT 0 0
309insert into capability (name, description) values ('cdn-stats-write', 'Create, edit or delete CDN statistics') ON CONFLICT (name) DO NOTHING;
310INSERT 0 0
311insert into capability (name, description) values ('change-log-read', 'View change-log') ON CONFLICT (name) DO NOTHING;
312INSERT 0 0
313insert into capability (name, description) values ('change-log-write', 'Create change-log entries') ON CONFLICT (name) DO NOTHING;
314INSERT 0 0
315insert into capability (name, description) values ('division-read', 'View division configuration') ON CONFLICT (name) DO NOTHING;
316INSERT 0 0
317insert into capability (name, description) values ('division-write', 'Create, edit or delete division configuration') ON CONFLICT (name) DO NOTHING;
318INSERT 0 0
319insert into capability (name, description) values ('ds-cache-read', 'View delivery-service cache assignment') ON CONFLICT (name) DO NOTHING;
320INSERT 0 0
321insert into capability (name, description) values ('ds-cache-write', 'Create, edit or delete delivery-service cache assignment') ON CONFLICT (name) DO NOTHING;
322INSERT 0 0
323insert into capability (name, description) values ('ds-health-read', 'View delivery-service health') ON CONFLICT (name) DO NOTHING;
324INSERT 0 0
325insert into capability (name, description) values ('ds-read', 'View delivery-service configuration') ON CONFLICT (name) DO NOTHING;
326INSERT 0 0
327insert into capability (name, description) values ('ds-write', 'Create, edit or delete delivery-service configuration') ON CONFLICT (name) DO NOTHING;
328INSERT 0 0
329insert into capability (name, description) values ('ds-security-keys-read', 'View delivery-service security keys') ON CONFLICT (name) DO NOTHING;
330INSERT 0 0
331insert into capability (name, description) values ('ds-security-keys-write', 'Create, edit or delete delivery-service security keys') ON CONFLICT (name) DO NOTHING;
332INSERT 0 0
333insert into capability (name, description) values ('ds-stats-read', 'View delivery-service statistics') ON CONFLICT (name) DO NOTHING;
334INSERT 0 0
335insert into capability (name, description) values ('ds-steering-read', 'View delivery-service steering configuration') ON CONFLICT (name) DO NOTHING;
336INSERT 0 0
337insert into capability (name, description) values ('ds-steering-write', 'Create, edit or delete delivery-service steering configuration') ON CONFLICT (name) DO NOTHING;
338INSERT 0 0
339insert into capability (name, description) values ('ds-steering-target-read', 'View delivery-service steering targets') ON CONFLICT (name) DO NOTHING;
340INSERT 0 0
341insert into capability (name, description) values ('ds-steering-target-write', 'Create, edit or delete delivery-service steering targets') ON CONFLICT (name) DO NOTHING;
342INSERT 0 0
343insert into capability (name, description) values ('federation-routing-read', 'View federation routing') ON CONFLICT (name) DO NOTHING;
344INSERT 0 0
345insert into capability (name, description) values ('federation-routing-write', 'Create, edit or delete federation routing') ON CONFLICT (name) DO NOTHING;
346INSERT 0 0
347insert into capability (name, description) values ('iso-generate', 'Generate ISOs') ON CONFLICT (name) DO NOTHING;
348INSERT 0 0
349insert into capability (name, description) values ('job-read', 'View jobs') ON CONFLICT (name) DO NOTHING;
350INSERT 0 0
351insert into capability (name, description) values ('job-write', 'Create, edit or delete jobs') ON CONFLICT (name) DO NOTHING;
352INSERT 0 0
353insert into capability (name, description) values ('params-read', 'View parameters') ON CONFLICT (name) DO NOTHING;
354INSERT 0 0
355insert into capability (name, description) values ('params-write', 'Create, edit or delete parameters') ON CONFLICT (name) DO NOTHING;
356INSERT 0 0
357insert into capability (name, description) values ('phys-location-read', 'View physical location configuration') ON CONFLICT (name) DO NOTHING;
358INSERT 0 0
359insert into capability (name, description) values ('phys-location-write', 'Create, edit or delete physical location configuration') ON CONFLICT (name) DO NOTHING;
360INSERT 0 0
361insert into capability (name, description) values ('profile-read', 'View profiles') ON CONFLICT (name) DO NOTHING;
362INSERT 0 0
363insert into capability (name, description) values ('profile-write', 'Create, edit or delete profiles') ON CONFLICT (name) DO NOTHING;
364INSERT 0 0
365insert into capability (name, description) values ('queue-updates-write', 'Queue updates to caches') ON CONFLICT (name) DO NOTHING;
366INSERT 0 0
367insert into capability (name, description) values ('region-read', 'View region configuration') ON CONFLICT (name) DO NOTHING;
368INSERT 0 0
369insert into capability (name, description) values ('region-write', 'Create, edit or delete region configuration') ON CONFLICT (name) DO NOTHING;
370INSERT 0 0
371insert into capability (name, description) values ('role-read', 'View role configuration') ON CONFLICT (name) DO NOTHING;
372INSERT 0 0
373insert into capability (name, description) values ('role-write', 'Create, edit or delete role configuration') ON CONFLICT (name) DO NOTHING;
374INSERT 0 0
375insert into capability (name, description) values ('security-keys-read', 'View security keys') ON CONFLICT (name) DO NOTHING;
376INSERT 0 0
377insert into capability (name, description) values ('security-keys-write', 'Create, edit or delete security keys') ON CONFLICT (name) DO NOTHING;
378INSERT 0 0
379insert into capability (name, description) values ('server-pull-updates-read', 'Read server update indication') ON CONFLICT (name) DO NOTHING;
380INSERT 0 0
381insert into capability (name, description) values ('server-pull-updates-write', 'Write server update indication') ON CONFLICT (name) DO NOTHING;
382INSERT 0 0
383insert into capability (name, description) values ('server-read', 'View server configuration') ON CONFLICT (name) DO NOTHING;
384INSERT 0 0
385insert into capability (name, description) values ('server-write', 'Create, edit or delete server configuration') ON CONFLICT (name) DO NOTHING;
386INSERT 0 0
387insert into capability (name, description) values ('static-dns-read', 'View static DNS configuration') ON CONFLICT (name) DO NOTHING;
388INSERT 0 0
389insert into capability (name, description) values ('static-dns-write', 'Create, edit or delete static DNS configuration') ON CONFLICT (name) DO NOTHING;
390INSERT 0 0
391insert into capability (name, description) values ('status-read', 'View the list of defined statuses') ON CONFLICT (name) DO NOTHING;
392INSERT 0 0
393insert into capability (name, description) values ('to-extension-read', 'View Traffic Ops extensions') ON CONFLICT (name) DO NOTHING;
394INSERT 0 0
395insert into capability (name, description) values ('to-extension-write', 'Create, edit or delete Traffic Ops extensions') ON CONFLICT (name) DO NOTHING;
396INSERT 0 0
397insert into capability (name, description) values ('type-read', 'View types configuration') ON CONFLICT (name) DO NOTHING;
398INSERT 0 0
399insert into capability (name, description) values ('type-write', 'Create, edit or delete type configuration') ON CONFLICT (name) DO NOTHING;
400INSERT 0 0
401insert into capability (name, description) values ('user-read', 'View user configuration') ON CONFLICT (name) DO NOTHING;
402INSERT 0 0
403insert into capability (name, description) values ('user-write', 'Create, edit or delete user configuration') ON CONFLICT (name) DO NOTHING;
404INSERT 0 0
405insert into role_capability (role_id, cap_name) values ((select id from role where name='admin'), 'all-read') ON CONFLICT (role_id, cap_name) DO NOTHING;
406INSERT 0 0
407insert into role_capability (role_id, cap_name) values ((select id from role where name='admin'), 'all-write') ON CONFLICT (role_id, cap_name) DO NOTHING;
408INSERT 0 0
409insert into api_capability (http_method, route, capability) values ('GET', '/', 'all-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
410INSERT 0 0
411insert into api_capability (http_method, route, capability) values ('POST', '/', 'all-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
412INSERT 0 0
413insert into api_capability (http_method, route, capability) values ('PUT', '/', 'all-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
414INSERT 0 0
415insert into api_capability (http_method, route, capability) values ('PATCH', '/', 'all-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
416INSERT 0 0
417insert into api_capability (http_method, route, capability) values ('DELETE', '/', 'all-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
418INSERT 0 0
419insert into api_capability (http_method, route, capability) values ('GET', '/api/*/asns', 'asn-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
420INSERT 0 0
421insert into api_capability (http_method, route, capability) values ('GET', '/api/*/asns/*', 'asn-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
422INSERT 0 0
423insert into api_capability (http_method, route, capability) values ('POST', '/api/*/asns', 'asn-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
424INSERT 0 0
425insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/asns/*', 'asn-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
426INSERT 0 0
427insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/asns/*', 'asn-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
428INSERT 0 0
429insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cache_stats', 'cache-stats-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
430INSERT 0 0
431insert into api_capability (http_method, route, capability) values ('GET', '/internal/api/*/daily_summary', 'cache-stats-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
432INSERT 0 0
433insert into api_capability (http_method, route, capability) values ('GET', '/internal/api/*/current_stats', 'cache-stats-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
434INSERT 0 0
435insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cachegroups', 'cache-group-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
436INSERT 0 0
437insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cachegroups/list', 'cache-group-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
438INSERT 0 0
439insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cachegroups/trimmed', 'cache-group-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
440INSERT 0 0
441insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cachegroups/*', 'cache-group-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
442INSERT 0 0
443insert into api_capability (http_method, route, capability) values ('POST', '/api/*/cachegroups', 'cache-group-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
444INSERT 0 0
445insert into api_capability (http_method, route, capability) values ('POST', '/api/*/cachegroups/create', 'cache-group-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
446INSERT 0 0
447insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/cachegroups/*', 'cache-group-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
448INSERT 0 0
449insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/cachegroups/*/update', 'cache-group-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
450INSERT 0 0
451insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/cachegroups/*', 'cache-group-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
452INSERT 0 0
453insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/cachegroups/*/delete', 'cache-group-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
454INSERT 0 0
455insert into api_capability (http_method, route, capability) values ('POST', '/api/*/cachegroups/*/queue_update', 'queue-updates-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
456INSERT 0 0
457insert into api_capability (http_method, route, capability) values ('POST', '/api/*/cachegroups/*/queue_update', 'queue-updates-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
458INSERT 0 0
459insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cachegroups/*/parameters', 'params-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
460INSERT 0 0
461insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns', 'cdn-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
462INSERT 0 0
463insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/*', 'cdn-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
464INSERT 0 0
465insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/name/*', 'cdn-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
466INSERT 0 0
467insert into api_capability (http_method, route, capability) values ('POST', '/api/*/cdns', 'cdn-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
468INSERT 0 0
469insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/cdns/*', 'cdn-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
470INSERT 0 0
471insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/cdns/*', 'cdn-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
472INSERT 0 0
473insert into api_capability (http_method, route, capability) values ('POST', '/api/*/cdns/*/queue_update', 'queue-updates-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
474INSERT 0 0
475insert into api_capability (http_method, route, capability) values ('POST', '/api/*/cdns/*/queue_update', 'queue-updates-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
476INSERT 0 0
477insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/cdns/*/snapshot', 'cdn-config-snapshot-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
478INSERT 0 0
479insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/snapshot/*', 'cdn-config-snapshot-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
480INSERT 0 0
481insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/snapshot/*', 'cdn-config-snapshot-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
482INSERT 0 0
483insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/configs', 'cdn-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
484INSERT 0 0
485insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/*/configs/routing', 'cdn-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
486INSERT 0 0
487insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/*/configs/monitoring', 'cdn-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
488INSERT 0 0
489insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/domains', 'cdn-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
490INSERT 0 0
491insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/health', 'cdn-health-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
492INSERT 0 0
493insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/*/health', 'cdn-health-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
494INSERT 0 0
495insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/capacity', 'cdn-health-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
496INSERT 0 0
497insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/routing', 'cdn-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
498INSERT 0 0
499insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/name/*/sslkeys', 'cdn-security-keys-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
500INSERT 0 0
501insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/usage/overview', 'cdn-stats-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
502INSERT 0 0
503insert into api_capability (http_method, route, capability) values ('GET', '/api/*/logs', 'change-log-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
504INSERT 0 0
505insert into api_capability (http_method, route, capability) values ('GET', '/api/*/logs/*/days', 'change-log-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
506INSERT 0 0
507insert into api_capability (http_method, route, capability) values ('GET', '/api/*/logs/newcount', 'change-log-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
508INSERT 0 0
509insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices', 'ds-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
510INSERT 0 0
511insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/list', 'ds-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
512INSERT 0 0
513insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/*', 'ds-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
514INSERT 0 0
515insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/*/get', 'ds-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
516INSERT 0 0
517insert into api_capability (http_method, route, capability) values ('POST', '/api/*/deliveryservices', 'ds-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
518INSERT 0 0
519insert into api_capability (http_method, route, capability) values ('POST', '/api/*/*/deliveryservices/create', 'ds-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
520INSERT 0 0
521insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/deliveryservices/*', 'ds-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
522INSERT 0 0
523insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/deliveryservices/*/safe', 'ds-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
524INSERT 0 0
525insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/*/deliveryservices/*/update', 'ds-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
526INSERT 0 0
527insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/deliveryservices/*', 'ds-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
528INSERT 0 0
529insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/*/health', 'ds-health-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
530INSERT 0 0
531insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/*/capacity', 'ds-health-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
532INSERT 0 0
533insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/*/routing', 'ds-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
534INSERT 0 0
535insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/*/state', 'ds-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
536INSERT 0 0
537insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservice_stats', 'ds-stats-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
538INSERT 0 0
539insert into api_capability (http_method, route, capability) values ('POST', '/api/*/deliveryservices/request', 'ds-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
540INSERT 0 0
541insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/xmlId/*/sslkeys', 'ds-security-keys-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
542INSERT 0 0
543insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/hostname/*/sslkeys', 'ds-security-keys-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
544INSERT 0 0
545insert into api_capability (http_method, route, capability) values ('POST', '/api/*/deliveryservices/sslkeys/generate', 'ds-security-keys-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
546INSERT 0 0
547insert into api_capability (http_method, route, capability) values ('POST', '/api/*/deliveryservices/sslkeys/add', 'ds-security-keys-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
548INSERT 0 0
549insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/xmlId/*/sslkeys/delete', 'ds-security-keys-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
550INSERT 0 0
551insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/xmlId/*/urlkeys', 'ds-security-keys-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
552INSERT 0 0
553insert into api_capability (http_method, route, capability) values ('POST', '/api/*/deliveryservices/xmlId/*/urlkeys/generate', 'ds-security-keys-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
554INSERT 0 0
555insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/*/regexes', 'ds-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
556INSERT 0 0
557insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservice_matches', 'ds-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
558INSERT 0 0
559insert into api_capability (http_method, route, capability) values ('GET', '/internal/api/*/steering', 'ds-steering-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
560INSERT 0 0
561insert into api_capability (http_method, route, capability) values ('GET', '/internal/api/*/steering/*', 'ds-steering-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
562INSERT 0 0
563insert into api_capability (http_method, route, capability) values ('PUT', '/internal/api/*/steering/*', 'ds-steering-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
564INSERT 0 0
565insert into api_capability (http_method, route, capability) values ('GET', '/api/*/steering/*/targets', 'ds-steering-target-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
566INSERT 0 0
567insert into api_capability (http_method, route, capability) values ('GET', '/api/*/steering/*/targets/*', 'ds-steering-target-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
568INSERT 0 0
569insert into api_capability (http_method, route, capability) values ('POST', '/api/*/steering/*/targets', 'ds-steering-target-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
570INSERT 0 0
571insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/steering/*/targets/*', 'ds-steering-target-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
572INSERT 0 0
573insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/steering/*/targets/*', 'ds-steering-target-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
574INSERT 0 0
575insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryserviceserver', 'ds-cache-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
576INSERT 0 0
577insert into api_capability (http_method, route, capability) values ('POST', '/api/*/deliveryservices/*/servers', 'ds-cache-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
578INSERT 0 0
579insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices_regexes', 'ds-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
580INSERT 0 0
581insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/*/regexes', 'ds-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
582INSERT 0 0
583insert into api_capability (http_method, route, capability) values ('GET', '/api/*/deliveryservices/*/regexes/*', 'ds-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
584INSERT 0 0
585insert into api_capability (http_method, route, capability) values ('POST', '/api/*/deliveryservices/*/regexes', 'ds-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
586INSERT 0 0
587insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/deliveryservices/*/regexes/*', 'ds-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
588INSERT 0 0
589insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/deliveryservices/*/regexes/*', 'ds-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
590INSERT 0 0
591insert into api_capability (http_method, route, capability) values ('GET', '/api/*/divisions', 'division-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
592INSERT 0 0
593insert into api_capability (http_method, route, capability) values ('GET', '/api/*/divisions/*', 'division-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
594INSERT 0 0
595insert into api_capability (http_method, route, capability) values ('POST', '/api/*/divisions', 'division-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
596INSERT 0 0
597insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/divisions/*', 'division-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
598INSERT 0 0
599insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/divisions/*', 'division-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
600INSERT 0 0
601insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/name/*/dnsseckeys', 'cdn-security-keys-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
602INSERT 0 0
603insert into api_capability (http_method, route, capability) values ('POST', '/api/*/cdns/dnsseckeys/generate', 'cdn-security-keys-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
604INSERT 0 0
605insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cdns/name/*/dnsseckeys/delete', 'cdn-security-keys-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
606INSERT 0 0
607insert into api_capability (http_method, route, capability) values ('GET', '/internal/api/*/cdns/dnsseckeys/refresh', 'cdn-security-keys-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
608INSERT 0 0
609insert into api_capability (http_method, route, capability) values ('GET', '/api/*/to_extensions', 'to-extension-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
610INSERT 0 0
611insert into api_capability (http_method, route, capability) values ('POST', '/api/*/to_extensions', 'to-extension-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
612INSERT 0 0
613insert into api_capability (http_method, route, capability) values ('POST', '/api/*/to_extensions/*/delete', 'to-extension-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
614INSERT 0 0
615insert into api_capability (http_method, route, capability) values ('GET', '/api/*/federations', 'federation-routing-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
616INSERT 0 0
617insert into api_capability (http_method, route, capability) values ('GET', '/internal/api/*/federations', 'federation-routing-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
618INSERT 0 0
619insert into api_capability (http_method, route, capability) values ('POST', '/api/*/federations', 'federation-routing-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
620INSERT 0 0
621insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/federations', 'federation-routing-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
622INSERT 0 0
623insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/federations', 'federation-routing-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
624INSERT 0 0
625insert into api_capability (http_method, route, capability) values ('GET', '/api/*/hwinfo', 'all-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
626INSERT 0 0
627insert into api_capability (http_method, route, capability) values ('GET', '/api/*/osversions', 'iso-generate') ON CONFLICT (http_method, route, capability) DO NOTHING;
628INSERT 0 0
629insert into api_capability (http_method, route, capability) values ('POST', '/api/*/isos', 'iso-generate') ON CONFLICT (http_method, route, capability) DO NOTHING;
630INSERT 0 0
631insert into api_capability (http_method, route, capability) values ('GET', '/api/*/parameters', 'params-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
632INSERT 0 0
633insert into api_capability (http_method, route, capability) values ('GET', '/api/*/parameters/*', 'params-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
634INSERT 0 0
635insert into api_capability (http_method, route, capability) values ('POST', '/api/*/parameters', 'params-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
636INSERT 0 0
637insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/parameters/*', 'params-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
638INSERT 0 0
639insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/parameters/*', 'params-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
640INSERT 0 0
641insert into api_capability (http_method, route, capability) values ('POST', '/api/*/parameters/*/validate', 'params-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
642INSERT 0 0
643insert into api_capability (http_method, route, capability) values ('GET', '/api/*/profiles/*/parameters', 'params-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
644INSERT 0 0
645insert into api_capability (http_method, route, capability) values ('GET', '/api/*/profiles/name/*/parameters', 'params-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
646INSERT 0 0
647insert into api_capability (http_method, route, capability) values ('GET', '/api/*/parameters/profile', 'params-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
648INSERT 0 0
649insert into api_capability (http_method, route, capability) values ('POST', '/api/*/profiles/name/*/parameters', 'params-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
650INSERT 0 0
651insert into api_capability (http_method, route, capability) values ('POST', '/api/*/profiles/*/parameters', 'params-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
652INSERT 0 0
653insert into api_capability (http_method, route, capability) values ('GET', '/api/*/profileparameters', 'params-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
654INSERT 0 0
655insert into api_capability (http_method, route, capability) values ('POST', '/api/*/profileparameters', 'params-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
656INSERT 0 0
657insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/profileparameters/*/*', 'params-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
658INSERT 0 0
659insert into api_capability (http_method, route, capability) values ('GET', '/api/*/cachegroupparameters', 'params-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
660INSERT 0 0
661insert into api_capability (http_method, route, capability) values ('GET', '/api/*/phys_locations', 'phys-location-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
662INSERT 0 0
663insert into api_capability (http_method, route, capability) values ('GET', '/api/*/phys_locations/trimmed', 'phys-location-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
664INSERT 0 0
665insert into api_capability (http_method, route, capability) values ('GET', '/api/*/phys_locations/*', 'phys-location-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
666INSERT 0 0
667insert into api_capability (http_method, route, capability) values ('POST', '/api/*/phys_locations', 'phys-location-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
668INSERT 0 0
669insert into api_capability (http_method, route, capability) values ('POST', '/api/*/regions/*/phys_locations', 'phys-location-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
670INSERT 0 0
671insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/phys_locations/*', 'phys-location-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
672INSERT 0 0
673insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/phys_locations/*', 'phys-location-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
674INSERT 0 0
675insert into api_capability (http_method, route, capability) values ('GET', '/api/*/profiles', 'profile-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
676INSERT 0 0
677insert into api_capability (http_method, route, capability) values ('GET', '/api/*/profiles/trimmed', 'profile-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
678INSERT 0 0
679insert into api_capability (http_method, route, capability) values ('GET', '/api/*/profiles/*', 'profile-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
680INSERT 0 0
681insert into api_capability (http_method, route, capability) values ('POST', '/api/*/profiles', 'profile-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
682INSERT 0 0
683insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/profiles/*', 'profile-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
684INSERT 0 0
685insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/profiles/*', 'profile-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
686INSERT 0 0
687insert into api_capability (http_method, route, capability) values ('POST', '/api/*/profiles/name/*/copy/*', 'profile-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
688INSERT 0 0
689insert into api_capability (http_method, route, capability) values ('GET', '/api/*/regions', 'region-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
690INSERT 0 0
691insert into api_capability (http_method, route, capability) values ('GET', '/api/*/regions/*', 'region-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
692INSERT 0 0
693insert into api_capability (http_method, route, capability) values ('POST', '/api/*/regions', 'region-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
694INSERT 0 0
695insert into api_capability (http_method, route, capability) values ('POST', '/api/*/divisions/*/regions', 'region-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
696INSERT 0 0
697insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/regions/*', 'region-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
698INSERT 0 0
699insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/regions/*', 'region-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
700INSERT 0 0
701insert into api_capability (http_method, route, capability) values ('GET', '/api/*/riak/ping', 'cdn-security-keys-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
702INSERT 0 0
703insert into api_capability (http_method, route, capability) values ('GET', '/api/*/keys/ping', 'security-keys-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
704INSERT 0 0
705insert into api_capability (http_method, route, capability) values ('GET', '/api/*/riak/bucket/#bucket/key/#key/values', 'security-keys-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
706INSERT 0 0
707insert into api_capability (http_method, route, capability) values ('GET', '/api/*/riak/stats', 'security-keys-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
708INSERT 0 0
709insert into api_capability (http_method, route, capability) values ('GET', '/api/*/roles', 'role-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
710INSERT 0 0
711insert into api_capability (http_method, route, capability) values ('GET', '/api/*/servers', 'server-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
712INSERT 0 0
713insert into api_capability (http_method, route, capability) values ('GET', '/api/*/servers?dsId=*', 'server-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
714INSERT 0 0
715insert into api_capability (http_method, route, capability) values ('GET', '/api/*/servers?type=*', 'server-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
716INSERT 0 0
717insert into api_capability (http_method, route, capability) values ('GET', '/api/*/servers?status=*', 'server-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
718INSERT 0 0
719insert into api_capability (http_method, route, capability) values ('GET', '/api/*/servers?profileId=*', 'server-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
720INSERT 0 0
721insert into api_capability (http_method, route, capability) values ('GET', '/api/*/servers/*', 'server-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
722INSERT 0 0
723insert into api_capability (http_method, route, capability) values ('POST', '/api/*/servers', 'server-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
724INSERT 0 0
725insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/servers/*', 'server-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
726INSERT 0 0
727insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/servers/*', 'server-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
728INSERT 0 0
729insert into api_capability (http_method, route, capability) values ('GET', '/api/*/servers/details', 'server-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
730INSERT 0 0
731insert into api_capability (http_method, route, capability) values ('GET', '/api/*/servers/totals', 'server-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
732INSERT 0 0
733insert into api_capability (http_method, route, capability) values ('GET', '/api/*/servers/checks', 'server-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
734INSERT 0 0
735insert into api_capability (http_method, route, capability) values ('GET', '/api/*/servercheck/aadata', 'server-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
736INSERT 0 0
737insert into api_capability (http_method, route, capability) values ('POST', '/api/*/servercheck', 'server-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
738INSERT 0 0
739insert into api_capability (http_method, route, capability) values ('POST', '/api/*/servers/*/queue_update', 'queue-updates-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
740INSERT 0 0
741insert into api_capability (http_method, route, capability) values ('POST', '/api/*/servers/*/queue_update', 'queue-updates-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
742INSERT 0 0
743insert into api_capability (http_method, route, capability) values ('GET', '/api/*/*/stats_summary', 'cdn-stats-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
744INSERT 0 0
745insert into api_capability (http_method, route, capability) values ('GET', '/api/*/*/stats_summary?lastSummaryDate=true', 'cdn-stats-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
746INSERT 0 0
747insert into api_capability (http_method, route, capability) values ('POST', '/api/*/*/stats_summary/create', 'cdn-stats-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
748INSERT 0 0
749insert into api_capability (http_method, route, capability) values ('GET', '/api/*/statuses', 'status-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
750INSERT 0 0
751insert into api_capability (http_method, route, capability) values ('GET', '/api/*/statuses/*', 'status-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
752INSERT 0 0
753insert into api_capability (http_method, route, capability) values ('GET', '/api/*/staticdnsentries', 'static-dns-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
754INSERT 0 0
755insert into api_capability (http_method, route, capability) values ('GET', '/api/*/system/info', 'basic-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
756INSERT 0 0
757insert into api_capability (http_method, route, capability) values ('GET', '/api/*/types', 'type-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
758INSERT 0 0
759insert into api_capability (http_method, route, capability) values ('GET', '/api/*/types/trimmed', 'type-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
760INSERT 0 0
761insert into api_capability (http_method, route, capability) values ('GET', '/api/*/types/*', 'type-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
762INSERT 0 0
763insert into api_capability (http_method, route, capability) values ('POST', '/api/*/types', 'type-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
764INSERT 0 0
765insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/types/*', 'type-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
766INSERT 0 0
767insert into api_capability (http_method, route, capability) values ('DELETE', '/api/*/types/*', 'type-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
768INSERT 0 0
769insert into api_capability (http_method, route, capability) values ('GET', '/api/*/users', 'user-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
770INSERT 0 0
771insert into api_capability (http_method, route, capability) values ('GET', '/api/*/users/*', 'user-read') ON CONFLICT (http_method, route, capability) DO NOTHING;
772INSERT 0 0
773insert into api_capability (http_method, route, capability) values ('PUT', '/api/*/users/*', 'user-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
774INSERT 0 0
775insert into api_capability (http_method, route, capability) values ('POST', '/api/*/users', 'user-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
776INSERT 0 0
777insert into api_capability (http_method, route, capability) values ('POST', '/api/*/users/register', 'user-write') ON CONFLICT (http_method, route, capability) DO NOTHING;
778INSERT 0 0
779insert into type (name, description, use_in_table) values ('HTTP', 'HTTP Content Routing', 'deliveryservice') ON CONFLICT (name) DO NOTHING;
780INSERT 0 0
781insert into type (name, description, use_in_table) values ('HTTP_NO_CACHE', 'HTTP Content Routing, no caching', 'deliveryservice') ON CONFLICT (name) DO NOTHING;
782INSERT 0 0
783insert into type (name, description, use_in_table) values ('HTTP_LIVE', 'HTTP Content routing cache in RAM', 'deliveryservice') ON CONFLICT (name) DO NOTHING;
784INSERT 0 0
785insert into type (name, description, use_in_table) values ('HTTP_LIVE_NATNL', 'HTTP Content routing, RAM cache, National', 'deliveryservice') ON CONFLICT (name) DO NOTHING;
786INSERT 0 0
787insert into type (name, description, use_in_table) values ('DNS', 'DNS Content Routing', 'deliveryservice') ON CONFLICT (name) DO NOTHING;
788INSERT 0 0
789insert into type (name, description, use_in_table) values ('DNS_LIVE', 'DNS Content routing, RAM cache, Local', 'deliveryservice') ON CONFLICT (name) DO NOTHING;
790INSERT 0 0
791insert into type (name, description, use_in_table) values ('DNS_LIVE_NATNL', 'DNS Content routing, RAM cache, National', 'deliveryservice') ON CONFLICT (name) DO NOTHING;
792INSERT 0 0
793insert into type (name, description, use_in_table) values ('ANY_MAP', 'No Content Routing - arbitrary remap at the edge, no Traffic Router config', 'deliveryservice') ON CONFLICT (name) DO NOTHING;
794INSERT 0 0
795insert into type (name, description, use_in_table) values ('STEERING', 'Steering Delivery Service', 'deliveryservice') ON CONFLICT (name) DO NOTHING;
796INSERT 0 0
797insert into type (name, description, use_in_table) values ('CLIENT_STEERING', 'Client-Controlled Steering Delivery Service', 'deliveryservice') ON CONFLICT (name) DO NOTHING;
798INSERT 0 0
799insert into type (name, description, use_in_table) values ('EDGE', 'Edge Cache', 'server') ON CONFLICT (name) DO NOTHING;
800INSERT 0 0
801insert into type (name, description, use_in_table) values ('MID', 'Mid Tier Cache', 'server') ON CONFLICT (name) DO NOTHING;
802INSERT 0 0
803insert into type (name, description, use_in_table) values ('ORG', 'Origin', 'server') ON CONFLICT (name) DO NOTHING;
804INSERT 0 0
805insert into type (name, description, use_in_table) values ('CCR', 'Traffic Router', 'server') ON CONFLICT (name) DO NOTHING;
806INSERT 0 0
807insert into type (name, description, use_in_table) values ('RASCAL', 'Traffic Monitor', 'server') ON CONFLICT (name) DO NOTHING;
808INSERT 0 0
809insert into type (name, description, use_in_table) values ('RIAK', 'Riak keystore', 'server') ON CONFLICT (name) DO NOTHING;
810INSERT 0 0
811insert into type (name, description, use_in_table) values ('INFLUXDB', 'influxDb server', 'server') ON CONFLICT (name) DO NOTHING;
812INSERT 0 0
813insert into type (name, description, use_in_table) values ('TRAFFIC_ANALYTICS', 'traffic analytics server', 'server') ON CONFLICT (name) DO NOTHING;
814INSERT 0 0
815insert into type (name, description, use_in_table) values ('TRAFFIC_OPS', 'traffic ops server', 'server') ON CONFLICT (name) DO NOTHING;
816INSERT 0 0
817insert into type (name, description, use_in_table) values ('TRAFFIC_OPS_DB', 'traffic ops DB server', 'server') ON CONFLICT (name) DO NOTHING;
818INSERT 0 0
819insert into type (name, description, use_in_table) values ('TRAFFIC_PORTAL', 'traffic portal server', 'server') ON CONFLICT (name) DO NOTHING;
820INSERT 0 0
821insert into type (name, description, use_in_table) values ('TRAFFIC_STATS', 'traffic stats server', 'server') ON CONFLICT (name) DO NOTHING;
822INSERT 0 0
823insert into type (name, description, use_in_table) values ('EDGE_LOC', 'Edge Logical Location', 'cachegroup') ON CONFLICT (name) DO NOTHING;
824INSERT 0 0
825insert into type (name, description, use_in_table) values ('MID_LOC', 'Mid Logical Location', 'cachegroup') ON CONFLICT (name) DO NOTHING;
826INSERT 0 0
827insert into type (name, description, use_in_table) values ('ORG_LOC', 'Origin Logical Site', 'cachegroup') ON CONFLICT (name) DO NOTHING;
828INSERT 0 0
829insert into type (name, description, use_in_table) values ('CHECK_EXTENSION_BOOL', 'Extension for checkmark in Server Check', 'to_extension') ON CONFLICT (name) DO NOTHING;
830INSERT 0 0
831insert into type (name, description, use_in_table) values ('CHECK_EXTENSION_NUM', 'Extension for int value in Server Check', 'to_extension') ON CONFLICT (name) DO NOTHING;
832INSERT 0 0
833insert into type (name, description, use_in_table) values ('CHECK_EXTENSION_OPEN_SLOT', 'Open slot for check in Server Status', 'to_extension') ON CONFLICT (name) DO NOTHING;
834INSERT 0 0
835insert into type (name, description, use_in_table) values ('CONFIG_EXTENSION', 'Extension for additional configuration file', 'to_extension') ON CONFLICT (name) DO NOTHING;
836INSERT 0 0
837insert into type (name, description, use_in_table) values ('STATISTIC_EXTENSION', 'Extension source for 12M graphs', 'to_extension') ON CONFLICT (name) DO NOTHING;
838INSERT 0 0
839insert into type (name, description, use_in_table) values ('HOST_REGEXP', 'Host header regular expression', 'regex') ON CONFLICT (name) DO NOTHING;
840INSERT 0 0
841insert into type (name, description, use_in_table) values ('HEADER_REGEXP', 'HTTP header regular expression', 'regex') ON CONFLICT (name) DO NOTHING;
842INSERT 0 0
843insert into type (name, description, use_in_table) values ('PATH_REGEXP', 'URL path regular expression', 'regex') ON CONFLICT (name) DO NOTHING;
844INSERT 0 0
845insert into type (name, description, use_in_table) values ('STEERING_REGEXP', 'Steering target filter regular expression', 'regex') ON CONFLICT (name) DO NOTHING;
846INSERT 0 0
847insert into type (name, description, use_in_table) values ('RESOLVE4', 'federation type resolve4', 'federation') ON CONFLICT (name) DO NOTHING;
848INSERT 0 0
849insert into type (name, description, use_in_table) values ('RESOLVE6', 'federation type resolve6', 'federation') ON CONFLICT (name) DO NOTHING;
850INSERT 0 0
851insert into type (name, description, use_in_table) values ('A_RECORD', 'Static DNS A entry', 'staticdnsentry') ON CONFLICT (name) DO NOTHING;
852INSERT 0 0
853insert into type (name, description, use_in_table) values ('AAAA_RECORD', 'Static DNS AAAA entry', 'staticdnsentry') ON CONFLICT (name) DO NOTHING;
854INSERT 0 0
855insert into type (name, description, use_in_table) values ('CNAME_RECORD', 'Static DNS CNAME entry', 'staticdnsentry') ON CONFLICT (name) DO NOTHING;
856INSERT 0 0
857insert into type (name, description, use_in_table) values ('TXT_RECORD', 'Static DNS TXT entry', 'staticdnsentry') ON CONFLICT (name) DO NOTHING;
858INSERT 0 0
859insert into type (name, description, use_in_table) values ('STEERING_WEIGHT', 'Weighted steering target', 'steering_target') ON CONFLICT (name) DO NOTHING;
860INSERT 0 0
861insert into type (name, description, use_in_table) values ('STEERING_ORDER', 'Ordered steering target', 'steering_target') ON CONFLICT (name) DO NOTHING;
862INSERT 0 0
863insert into type (name, description, use_in_table) values ('STEERING_GEO_ORDER', 'Geo-ordered steering target', 'steering_target') ON CONFLICT (name) DO NOTHING;
864INSERT 0 0
865insert into type (name, description, use_in_table) values ('STEERING_GEO_WEIGHT', 'Geo-weighted steering target', 'steering_target') ON CONFLICT (name) DO NOTHING;
866INSERT 0 0
867insert into tm_user (username, role, full_name, token, tenant_id) values ('extension',
868 (select id from role where name = 'operations'), 'Extension User, DO NOT DELETE', '91504CE6-8E4A-46B2-9F9F-FE7C15228498',
869 (select id from tenant where name = 'root')) ON CONFLICT DO NOTHING;
870INSERT 0 0
871insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
872values (1, 'ILO_PING', 'ILO', 'aa', '1.0.0', '-', 'ToPingCheck.pl', '1', '{ check_name: "ILO", "base_url": "https://localhost", "select": "ilo_ip_address", "cron": "9 * * * *" }',
873 (select id from type where name='CHECK_EXTENSION_BOOL') ) ON CONFLICT DO NOTHING;
874INSERT 0 0
875insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
876values (2, '10G_PING', '10G', 'ab', '1.0.0', '-', 'ToPingCheck.pl', '1', '{ check_name: "10G", "base_url": "https://localhost", "select": "ip_address", "cron": "18 * * * *" }',
877 (select id from type where name='CHECK_EXTENSION_BOOL') ) ON CONFLICT DO NOTHING;
878INSERT 0 0
879insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
880values (3, 'FQDN_PING', 'FQDN', 'ac', '1.0.0', '-', 'ToPingCheck.pl', '1', '{ check_name: "FQDN", "base_url": "https://localhost", "select": "host_name", "cron": "27 * * * *" }',
881 (select id from type where name='CHECK_EXTENSION_BOOL') ) ON CONFLICT DO NOTHING;
882INSERT 0 0
883insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
884values (4, 'CHECK_DSCP', 'DSCP', 'ad', '1.0.0', '-', 'ToDSCPCheck.pl', '1', '{ "check_name": "DSCP", "base_url": "https://localhost", "cron": "36 * * * *" }',
885 (select id from type where name='CHECK_EXTENSION_BOOL') ) ON CONFLICT DO NOTHING;
886INSERT 0 0
887insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
888values (5, 'OPEN', '', 'ae', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
889INSERT 0 0
890insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
891values (6, 'OPEN', '', 'af', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
892INSERT 0 0
893insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
894values (7, 'IPV6_PING', '10G6', 'ag', '1.0.0', '-', 'ToPingCheck.pl', '1', '{ "select": "ip6_address", "cron": "0 * * * *" }',
895 (select id from type where name='CHECK_EXTENSION_BOOL') ) ON CONFLICT DO NOTHING;
896INSERT 0 0
897insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
898values (8, 'OPEN', '', 'ah', '1.0.0', '', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
899INSERT 0 0
900insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
901values (9, 'OPEN', '', 'ai', '1.0.0', '', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
902INSERT 0 0
903insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
904values (10, 'OPEN', '', 'aj', '1.0.0', '', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
905INSERT 0 0
906insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
907values (11, 'CHECK_MTU', 'MTU', 'ak', '1.0.0', '-', 'ToMtuCheck.pl', '1', '{ "check_name": "MTU", "base_url": "https://localhost", "cron": "45 * * * *" }',
908 (select id from type where name='CHECK_EXTENSION_BOOL') ) ON CONFLICT DO NOTHING;
909INSERT 0 0
910insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
911values (12, 'CHECK_TRAFFIC_ROUTER_STATUS', 'RTR', 'al', '1.0.0', '-', 'ToRTRCheck.pl', '1', '{ "check_name": "RTR", "base_url": "https://localhost", "cron": "10 * * * *" }',
912 (select id from type where name='CHECK_EXTENSION_BOOL') ) ON CONFLICT DO NOTHING;
913INSERT 0 0
914insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
915values (13, 'OPEN', '', 'am', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
916INSERT 0 0
917insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
918values (14, 'CACHE_HIT_RATIO_LAST_15', 'CHR', 'an', '1.0.0', '-', 'ToCHRCheck.pl', '1', '{ check_name: "CHR", "base_url": "https://localhost", cron": "0,15,30,45 * * * *" }',
919 (select id from type where name='CHECK_EXTENSION_NUM') ) ON CONFLICT DO NOTHING;
920INSERT 0 0
921insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
922values (15, 'DISK_UTILIZATION', 'CDU', 'ao', '1.0.0', '-', 'ToCDUCheck.pl', '1', '{ check_name: "CDU", "base_url": "https://localhost", cron": "20 * * * *" }',
923 (select id from type where name='CHECK_EXTENSION_NUM') ) ON CONFLICT DO NOTHING;
924INSERT 0 0
925insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
926values (16, 'ORT_ERROR_COUNT', 'ORT', 'ap', '1.0.0', '-', 'ToORTCheck.pl', '1', '{ check_name: "ORT", "base_url": "https://localhost", "cron": "40 * * * *" }',
927 (select id from type where name='CHECK_EXTENSION_NUM') ) ON CONFLICT DO NOTHING;
928INSERT 0 0
929insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
930values (17, 'OPEN', '', 'aq', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
931INSERT 0 0
932insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
933values (18, 'OPEN', '', 'ar', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
934INSERT 0 0
935insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
936values (19, 'OPEN', '', 'bf', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
937INSERT 0 0
938insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
939values (20, 'OPEN', '', 'at', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
940INSERT 0 0
941insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
942values (21, 'OPEN', '', 'au', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
943INSERT 0 0
944insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
945values (22, 'OPEN', '', 'av', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
946INSERT 0 0
947insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
948values (23, 'OPEN', '', 'aw', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
949INSERT 0 0
950insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
951values (24, 'OPEN', '', 'ax', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
952INSERT 0 0
953insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
954values (25, 'OPEN', '', 'ay', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
955INSERT 0 0
956insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
957values (26, 'OPEN', '', 'az', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
958INSERT 0 0
959insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
960values (27, 'OPEN', '', 'ba', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
961INSERT 0 0
962insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
963values (28, 'OPEN', '', 'bb', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
964INSERT 0 0
965insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
966values (29, 'OPEN', '', 'bc', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
967INSERT 0 0
968insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
969values (30, 'OPEN', '', 'bd', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
970INSERT 0 0
971insert into to_extension (id, name, servercheck_short_name, servercheck_column_name, version, info_url, script_file, isactive, additional_config_json, type)
972values (31, 'OPEN', '', 'be', '1.0.0', '-', '', '0', '', (select id from type where name='CHECK_EXTENSION_OPEN_SLOT')) ON CONFLICT DO NOTHING;
973INSERT 0 0
974Database seed succeeded
975Patching database with required data fixes.
976/*
977
978 Licensed under the Apache License, Version 2.0 (the "License");
979 you may not use this file except in compliance with the License.
980 You may obtain a copy of the License at
981
982 http://www.apache.org/licenses/LICENSE-2.0
983
984 Unless required by applicable law or agreed to in writing, software
985 distributed under the License is distributed on an "AS IS" BASIS,
986 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
987 See the License for the specific language governing permissions and
988 limitations under the License.
989*/
990
991UPDATE steering_target SET "type" = (SELECT id FROM type WHERE name = 'STEERING_WEIGHT') where "type" is NULL;
992UPDATE 0
993;
994ALTER TABLE steering_target ALTER COLUMN type SET NOT NULL;
995ALTER TABLE
996UPDATE deliveryservice SET routing_name = 'edge' WHERE routing_name IS NULL AND type IN (SELECT id FROM type WHERE name like 'DNS%');
997UPDATE 0
998UPDATE deliveryservice ds
999SET routing_name = (
1000 SELECT p.value
1001 FROM parameter p
1002 JOIN profile_parameter pp ON p.id = pp.parameter
1003 JOIN profile pro ON pp.profile = pro.id
1004 JOIN cdn ON pro.cdn = cdn.id
1005 WHERE p.name = 'upgrade_http_routing_name'
1006 AND cdn.id = ds.cdn_id)
1007WHERE routing_name IS NULL;
1008UPDATE 0
1009UPDATE deliveryservice SET routing_name = 'tr' WHERE routing_name IS NULL;
1010UPDATE 0
1011ALTER TABLE deliveryservice ALTER COLUMN routing_name SET NOT NULL;
1012ALTER TABLE
1013ALTER TABLE deliveryservice ALTER COLUMN routing_name SET DEFAULT 'cdn';
1014ALTER TABLE
1015ALTER TABLE deliveryservice DROP CONSTRAINT IF EXISTS routing_name_not_empty;
1016ALTER TABLE
1017ALTER TABLE deliveryservice ADD CONSTRAINT routing_name_not_empty CHECK (length(routing_name) > 0);
1018ALTER TABLE
1019ALTER TYPE profile_type ADD VALUE IF NOT EXISTS 'GROVE_PROFILE';
1020NOTICE: enum label "GROVE_PROFILE" already exists, skipping
1021ALTER TYPE
1022DO
1023$tenantnotnull$
1024BEGIN
1025 IF EXISTS (SELECT value FROM parameter WHERE name = 'use_tenancy' AND config_file = 'global' AND value = '1') THEN
1026 -- tenancy turned ON -- anything without a tenant gets the "unassigned" tenant
1027 UPDATE tm_user SET tenant_id = (SELECT id FROM tenant WHERE name = 'unassigned')
1028 WHERE tenant_id IS NULL;
1029 UPDATE deliveryservice SET tenant_id = (SELECT id FROM tenant WHERE name = 'unassigned')
1030 WHERE tenant_id IS NULL;
1031 UPDATE origin SET tenant = (SELECT id FROM tenant WHERE name = 'unassigned')
1032 WHERE tenant IS NULL;
1033 ELSE
1034 -- tenancy turned OFF -- anything without a tenant gets the "root" tenant
1035 UPDATE tm_user SET tenant_id = (SELECT id FROM tenant WHERE name = 'root')
1036 WHERE tenant_id IS NULL;
1037 UPDATE deliveryservice SET tenant_id = (SELECT id FROM tenant WHERE name = 'root')
1038 WHERE tenant_id IS NULL;
1039 UPDATE origin SET tenant = (SELECT id FROM tenant WHERE name = 'root')
1040 WHERE tenant IS NULL;
1041 END IF;
1042END
1043$tenantnotnull$;
1044DO
1045ALTER TABLE tm_user ALTER COLUMN tenant_id SET NOT NULL;
1046ALTER TABLE
1047ALTER TABLE deliveryservice ALTER COLUMN tenant_id SET NOT NULL;
1048ALTER TABLE
1049ALTER TABLE origin ALTER COLUMN tenant SET NOT NULL;
1050ALTER TABLE
1051DELETE FROM parameter WHERE name = 'use_tenancy' AND config_file = 'global';
1052DELETE 1
1053Database patch succeeded
1054DBD::Pg::db do failed: ERROR: null value in column "tenant_id" violates not-null constraint
1055DETAIL: Failing row contains (6, admin, null, 1, null, null, SCRYPT:16384:8:1:wo6T3xLKskDlavSuH+cwbsVIG8xuaUEK2iRHEBAWf/0ELYB..., SCRYPT:16384:8:1:wo6T3xLKskDlavSuH+cwbsVIG8xuaUEK2iRHEBAWf/0ELYB..., 2018-07-26 17:11:47.307519+07, null, null, null, f, null, null, null, null, null, null, null, null, null, null). at /opt/traffic_ops/install/bin/_postinstall line 627.
1056=========== Setting up cdn
1057
1058
1059 -- global parameters
1060 insert into cdn (name, domain_name, dnssec_enabled)
1061 values ('COC_CDN', 'cdn.coc.lab', false)
1062 ON CONFLICT (name) DO NOTHING;
1063
1064=========== Setting up parameters
1065
1066 -- global parameters
1067 insert into parameter (name, config_file, value)
1068 values ('tm.url', 'global', 'https://tca1.coc.lab')
1069 ON CONFLICT (name, config_file, value) DO NOTHING;
1070
1071 insert into parameter (name, config_file, value)
1072 values ('tm.infourl', 'global', 'https://tca1.coc.lab/doc')
1073 ON CONFLICT (name, config_file, value) DO NOTHING;
1074
1075 -- CRConfig.json parameters
1076 insert into parameter (name, config_file, value)
1077 values ('geolocation.polling.url', 'CRConfig.json', 'https://tca1.coc.lab/routing/GeoLite2-City.mmdb.gz')
1078 ON CONFLICT (name, config_file, value) DO NOTHING;
1079
1080 insert into parameter (name, config_file, value)
1081 values ('geolocation6.polling.url', 'CRConfig.json', 'https://tca1.coc.lab/routing/GeoLiteCityv6.dat.gz')
1082 ON CONFLICT (name, config_file, value) DO NOTHING;
1083
1084
1085=========== Setting up profiles
1086
1087 -- global parameters
1088 insert into profile (name, description, type)
1089 values ('GLOBAL', 'Global Traffic Ops profile, DO NOT DELETE', 'UNK_PROFILE')
1090 ON CONFLICT (name) DO NOTHING;
1091
1092 insert into profile_parameter (profile, parameter)
1093 values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'tm.url' and config_file = 'global' and value = 'https://tca1.coc.lab') )
1094 ON CONFLICT (profile, parameter) DO NOTHING;
1095
1096 insert into profile_parameter (profile, parameter)
1097 values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'tm.infourl' and config_file = 'global' and value = 'https://tca1.coc.lab/doc') )
1098 ON CONFLICT (profile, parameter) DO NOTHING;
1099
1100 insert into profile_parameter (profile, parameter)
1101 values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'geolocation.polling.url' and config_file = 'CRConfig.json' and value = 'https://tca1.coc.lab/routing/GeoLite2-City.mmdb.gz') )
1102 ON CONFLICT (profile, parameter) DO NOTHING;
1103
1104 insert into profile_parameter (profile, parameter)
1105 values ( (select id from profile where name = 'GLOBAL'), (select id from parameter where name = 'geolocation6.polling.url' and config_file = 'CRConfig.json' and value = 'https://tca1.coc.lab/routing/GeoLiteCityv6.dat.gz') )
1106 ON CONFLICT (profile, parameter) DO NOTHING;
1107
1108Starting Traffic Ops
1109Restarting traffic_ops (via systemctl): /opt/traffic_ops/etc/init.d/traffic_ops: line 66: 77690 Terminated $TO_DIR/bin/traffic_ops_golang -cfg $TO_DIR/conf/cdn.conf -dbcfg $TO_DIR/conf/production/database.conf -riakcfg $TO_DIR/conf/production/riak.conf
1110 [ OK ]
1111Waiting for Traffic Ops to restart
1112Success! Postinstall complete.