@@ -138,75 +138,6 @@ CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.network_offerings','nsx_mode', 'varc
138138CALL ` cloud` .` IDEMPOTENT_ADD_COLUMN` (' cloud.vpc_offerings' ,' for_nsx' , ' int(1) unsigned DEFAULT "0" COMMENT "is nsx enabled for the resource"' );
139139CALL ` cloud` .` IDEMPOTENT_ADD_COLUMN` (' cloud.vpc_offerings' ,' nsx_mode' , ' varchar(32) COMMENT "mode in which the network would route traffic"' );
140140
141- -- Network offering with NSX related columns
142- DROP VIEW IF EXISTS ` cloud` .` network_offering_view` ;
143- CREATE VIEW `cloud `.` network_offering_view` AS
144- SELECT
145- ` network_offerings` .` id` AS ` id` ,
146- ` network_offerings` .` uuid` AS ` uuid` ,
147- ` network_offerings` .` name` AS ` name` ,
148- ` network_offerings` .` unique_name` AS ` unique_name` ,
149- ` network_offerings` .` display_text` AS ` display_text` ,
150- ` network_offerings` .` nw_rate` AS ` nw_rate` ,
151- ` network_offerings` .` mc_rate` AS ` mc_rate` ,
152- ` network_offerings` .` traffic_type` AS ` traffic_type` ,
153- ` network_offerings` .` tags` AS ` tags` ,
154- ` network_offerings` .` system_only` AS ` system_only` ,
155- ` network_offerings` .` specify_vlan` AS ` specify_vlan` ,
156- ` network_offerings` .` service_offering_id` AS ` service_offering_id` ,
157- ` network_offerings` .` conserve_mode` AS ` conserve_mode` ,
158- ` network_offerings` .` created` AS ` created` ,
159- ` network_offerings` .` removed` AS ` removed` ,
160- ` network_offerings` .` default` AS ` default` ,
161- ` network_offerings` .` availability` AS ` availability` ,
162- ` network_offerings` .` dedicated_lb_service` AS ` dedicated_lb_service` ,
163- ` network_offerings` .` shared_source_nat_service` AS ` shared_source_nat_service` ,
164- ` network_offerings` .` sort_key` AS ` sort_key` ,
165- ` network_offerings` .` redundant_router_service` AS ` redundant_router_service` ,
166- ` network_offerings` .` state` AS ` state` ,
167- ` network_offerings` .` guest_type` AS ` guest_type` ,
168- ` network_offerings` .` elastic_ip_service` AS ` elastic_ip_service` ,
169- ` network_offerings` .` eip_associate_public_ip` AS ` eip_associate_public_ip` ,
170- ` network_offerings` .` elastic_lb_service` AS ` elastic_lb_service` ,
171- ` network_offerings` .` specify_ip_ranges` AS ` specify_ip_ranges` ,
172- ` network_offerings` .` inline` AS ` inline` ,
173- ` network_offerings` .` is_persistent` AS ` is_persistent` ,
174- ` network_offerings` .` internal_lb` AS ` internal_lb` ,
175- ` network_offerings` .` public_lb` AS ` public_lb` ,
176- ` network_offerings` .` egress_default_policy` AS ` egress_default_policy` ,
177- ` network_offerings` .` concurrent_connections` AS ` concurrent_connections` ,
178- ` network_offerings` .` keep_alive_enabled` AS ` keep_alive_enabled` ,
179- ` network_offerings` .` supports_streched_l2` AS ` supports_streched_l2` ,
180- ` network_offerings` .` supports_public_access` AS ` supports_public_access` ,
181- ` network_offerings` .` supports_vm_autoscaling` AS ` supports_vm_autoscaling` ,
182- ` network_offerings` .` for_vpc` AS ` for_vpc` ,
183- ` network_offerings` .` for_tungsten` AS ` for_tungsten` ,
184- ` network_offerings` .` for_nsx` AS ` for_nsx` ,
185- ` network_offerings` .` nsx_mode` AS ` nsx_mode` ,
186- ` network_offerings` .` service_package_id` AS ` service_package_id` ,
187- GROUP_CONCAT(DISTINCT(domain .id )) AS domain_id,
188- GROUP_CONCAT(DISTINCT(domain .uuid )) AS domain_uuid,
189- GROUP_CONCAT(DISTINCT(domain .name )) AS domain_name,
190- GROUP_CONCAT(DISTINCT(domain .path )) AS domain_path,
191- GROUP_CONCAT(DISTINCT(zone .id )) AS zone_id,
192- GROUP_CONCAT(DISTINCT(zone .uuid )) AS zone_uuid,
193- GROUP_CONCAT(DISTINCT(zone .name )) AS zone_name,
194- ` offering_details` .value AS internet_protocol
195- FROM
196- ` cloud` .` network_offerings`
197- LEFT JOIN
198- ` cloud` .` network_offering_details` AS ` domain_details` ON ` domain_details` .` network_offering_id` = ` network_offerings` .` id` AND ` domain_details` .` name` = ' domainid'
199- LEFT JOIN
200- ` cloud` .` domain` AS ` domain` ON FIND_IN_SET(` domain` .` id` , ` domain_details` .` value` )
201- LEFT JOIN
202- ` cloud` .` network_offering_details` AS ` zone_details` ON ` zone_details` .` network_offering_id` = ` network_offerings` .` id` AND ` zone_details` .` name` = ' zoneid'
203- LEFT JOIN
204- ` cloud` .` data_center` AS ` zone` ON FIND_IN_SET(` zone` .` id` , ` zone_details` .` value` )
205- LEFT JOIN
206- ` cloud` .` network_offering_details` AS ` offering_details` ON ` offering_details` .` network_offering_id` = ` network_offerings` .` id` AND ` offering_details` .` name` = ' internetProtocol'
207- GROUP BY
208- ` network_offerings` .` id` ;
209-
210141-- Add indexes for data store browser
211142ALTER TABLE ` cloud` .` template_spool_ref` ADD INDEX ` i_template_spool_ref__install_path` (` install_path` );
212143ALTER TABLE ` cloud` .` volumes` ADD INDEX ` i_volumes__path` (` path` );
@@ -318,138 +249,6 @@ ALTER TABLE `cloud`.`snapshot_store_ref`
318249 ADD COLUMN ` local_path` varchar (255 ) DEFAULT NULL COMMENT ' the path of the snapshot download' AFTER ` error_str` ,
319250 ADD COLUMN ` display` tinyint (1 ) unsigned NOT NULL DEFAULT 1 COMMENT ' 1 implies store reference is available for listing' AFTER ` error_str` ;
320251
321- -- Create snapshot_view
322- DROP VIEW IF EXISTS ` cloud` .` snapshot_view` ;
323- CREATE VIEW `cloud `.` snapshot_view` AS
324- SELECT
325- ` snapshots` .` id` AS ` id` ,
326- ` snapshots` .` uuid` AS ` uuid` ,
327- ` snapshots` .` name` AS ` name` ,
328- ` snapshots` .` status` AS ` status` ,
329- ` snapshots` .` disk_offering_id` AS ` disk_offering_id` ,
330- ` snapshots` .` snapshot_type` AS ` snapshot_type` ,
331- ` snapshots` .` type_description` AS ` type_description` ,
332- ` snapshots` .` size` AS ` size` ,
333- ` snapshots` .` created` AS ` created` ,
334- ` snapshots` .` removed` AS ` removed` ,
335- ` snapshots` .` location_type` AS ` location_type` ,
336- ` snapshots` .` hypervisor_type` AS ` hypervisor_type` ,
337- ` account` .` id` AS ` account_id` ,
338- ` account` .` uuid` AS ` account_uuid` ,
339- ` account` .` account_name` AS ` account_name` ,
340- ` account` .` type` AS ` account_type` ,
341- ` domain` .` id` AS ` domain_id` ,
342- ` domain` .` uuid` AS ` domain_uuid` ,
343- ` domain` .` name` AS ` domain_name` ,
344- ` domain` .` path` AS ` domain_path` ,
345- ` projects` .` id` AS ` project_id` ,
346- ` projects` .` uuid` AS ` project_uuid` ,
347- ` projects` .` name` AS ` project_name` ,
348- ` volumes` .` id` AS ` volume_id` ,
349- ` volumes` .` uuid` AS ` volume_uuid` ,
350- ` volumes` .` name` AS ` volume_name` ,
351- ` volumes` .` volume_type` AS ` volume_type` ,
352- ` volumes` .` size` AS ` volume_size` ,
353- ` data_center` .` id` AS ` data_center_id` ,
354- ` data_center` .` uuid` AS ` data_center_uuid` ,
355- ` data_center` .` name` AS ` data_center_name` ,
356- ` snapshot_store_ref` .` store_id` AS ` store_id` ,
357- IFNULL(` image_store` .` uuid` , ` storage_pool` .` uuid` ) AS ` store_uuid` ,
358- IFNULL(` image_store` .` name` , ` storage_pool` .` name` ) AS ` store_name` ,
359- ` snapshot_store_ref` .` store_role` AS ` store_role` ,
360- ` snapshot_store_ref` .` state` AS ` store_state` ,
361- ` snapshot_store_ref` .` download_state` AS ` download_state` ,
362- ` snapshot_store_ref` .` download_pct` AS ` download_pct` ,
363- ` snapshot_store_ref` .` error_str` AS ` error_str` ,
364- ` snapshot_store_ref` .` size` AS ` store_size` ,
365- ` snapshot_store_ref` .` created` AS ` created_on_store` ,
366- ` resource_tags` .` id` AS ` tag_id` ,
367- ` resource_tags` .` uuid` AS ` tag_uuid` ,
368- ` resource_tags` .` key` AS ` tag_key` ,
369- ` resource_tags` .` value` AS ` tag_value` ,
370- ` resource_tags` .` domain_id` AS ` tag_domain_id` ,
371- ` domain` .` uuid` AS ` tag_domain_uuid` ,
372- ` domain` .` name` AS ` tag_domain_name` ,
373- ` resource_tags` .` account_id` AS ` tag_account_id` ,
374- ` account` .` account_name` AS ` tag_account_name` ,
375- ` resource_tags` .` resource_id` AS ` tag_resource_id` ,
376- ` resource_tags` .` resource_uuid` AS ` tag_resource_uuid` ,
377- ` resource_tags` .` resource_type` AS ` tag_resource_type` ,
378- ` resource_tags` .` customer` AS ` tag_customer` ,
379- CONCAT(` snapshots` .` id` ,
380- ' _' ,
381- IFNULL(` snapshot_store_ref` .` store_role` , ' UNKNOWN' ),
382- ' _' ,
383- IFNULL(` snapshot_store_ref` .` store_id` , 0 )) AS ` snapshot_store_pair`
384- FROM
385- ((((((((((` snapshots`
386- JOIN ` account` ON ((` account` .` id` = ` snapshots` .` account_id` )))
387- JOIN ` domain` ON ((` domain` .` id` = ` account` .` domain_id` )))
388- LEFT JOIN ` projects` ON ((` projects` .` project_account_id` = ` account` .` id` )))
389- LEFT JOIN ` volumes` ON ((` volumes` .` id` = ` snapshots` .` volume_id` )))
390- LEFT JOIN ` snapshot_store_ref` ON (((` snapshot_store_ref` .` snapshot_id` = ` snapshots` .` id` )
391- AND (` snapshot_store_ref` .` state` != ' Destroyed' )
392- AND (` snapshot_store_ref` .` display` = 1 ))))
393- LEFT JOIN ` image_store` ON ((ISNULL(` image_store` .` removed` )
394- AND (` snapshot_store_ref` .` store_role` = ' Image' )
395- AND (` snapshot_store_ref` .` store_id` IS NOT NULL )
396- AND (` image_store` .` id` = ` snapshot_store_ref` .` store_id` ))))
397- LEFT JOIN ` storage_pool` ON ((ISNULL(` storage_pool` .` removed` )
398- AND (` snapshot_store_ref` .` store_role` = ' Primary' )
399- AND (` snapshot_store_ref` .` store_id` IS NOT NULL )
400- AND (` storage_pool` .` id` = ` snapshot_store_ref` .` store_id` ))))
401- LEFT JOIN ` snapshot_zone_ref` ON (((` snapshot_zone_ref` .` snapshot_id` = ` snapshots` .` id` )
402- AND ISNULL(` snapshot_store_ref` .` store_id` )
403- AND ISNULL(` snapshot_zone_ref` .` removed` ))))
404- LEFT JOIN ` data_center` ON (((` image_store` .` data_center_id` = ` data_center` .` id` )
405- OR (` storage_pool` .` data_center_id` = ` data_center` .` id` )
406- OR (` snapshot_zone_ref` .` zone_id` = ` data_center` .` id` ))))
407- LEFT JOIN ` resource_tags` ON ((` resource_tags` .` resource_id` = ` snapshots` .` id` )
408- AND (` resource_tags` .` resource_type` = ' Snapshot' )));
409-
410- -- VPC offering with NSX related columns
411- DROP VIEW IF EXISTS ` cloud` .` vpc_offering_view` ;
412- CREATE VIEW `cloud `.` vpc_offering_view` AS
413- SELECT
414- ` vpc_offerings` .` id` AS ` id` ,
415- ` vpc_offerings` .` uuid` AS ` uuid` ,
416- ` vpc_offerings` .` name` AS ` name` ,
417- ` vpc_offerings` .` unique_name` AS ` unique_name` ,
418- ` vpc_offerings` .` display_text` AS ` display_text` ,
419- ` vpc_offerings` .` state` AS ` state` ,
420- ` vpc_offerings` .` default` AS ` default` ,
421- ` vpc_offerings` .` for_nsx` AS ` for_nsx` ,
422- ` vpc_offerings` .` nsx_mode` AS ` nsx_mode` ,
423- ` vpc_offerings` .` created` AS ` created` ,
424- ` vpc_offerings` .` removed` AS ` removed` ,
425- ` vpc_offerings` .` service_offering_id` AS ` service_offering_id` ,
426- ` vpc_offerings` .` supports_distributed_router` AS ` supports_distributed_router` ,
427- ` vpc_offerings` .` supports_region_level_vpc` AS ` supports_region_level_vpc` ,
428- ` vpc_offerings` .` redundant_router_service` AS ` redundant_router_service` ,
429- ` vpc_offerings` .` sort_key` AS ` sort_key` ,
430- GROUP_CONCAT(DISTINCT(domain .id )) AS domain_id,
431- GROUP_CONCAT(DISTINCT(domain .uuid )) AS domain_uuid,
432- GROUP_CONCAT(DISTINCT(domain .name )) AS domain_name,
433- GROUP_CONCAT(DISTINCT(domain .path )) AS domain_path,
434- GROUP_CONCAT(DISTINCT(zone .id )) AS zone_id,
435- GROUP_CONCAT(DISTINCT(zone .uuid )) AS zone_uuid,
436- GROUP_CONCAT(DISTINCT(zone .name )) AS zone_name,
437- ` offering_details` .value AS internet_protocol
438- FROM
439- ` cloud` .` vpc_offerings`
440- LEFT JOIN
441- ` cloud` .` vpc_offering_details` AS ` domain_details` ON ` domain_details` .` offering_id` = ` vpc_offerings` .` id` AND ` domain_details` .` name` = ' domainid'
442- LEFT JOIN
443- ` cloud` .` domain` AS ` domain` ON FIND_IN_SET(` domain` .` id` , ` domain_details` .` value` )
444- LEFT JOIN
445- ` cloud` .` vpc_offering_details` AS ` zone_details` ON ` zone_details` .` offering_id` = ` vpc_offerings` .` id` AND ` zone_details` .` name` = ' zoneid'
446- LEFT JOIN
447- ` cloud` .` data_center` AS ` zone` ON FIND_IN_SET(` zone` .` id` , ` zone_details` .` value` )
448- LEFT JOIN
449- ` cloud` .` vpc_offering_details` AS ` offering_details` ON ` offering_details` .` offering_id` = ` vpc_offerings` .` id` AND ` offering_details` .` name` = ' internetprotocol'
450- GROUP BY
451- ` vpc_offerings` .` id` ;
452-
453252UPDATE ` cloud` .` configuration` SET
454253 ` options` = concat(` options` , ' ,OAUTH2' ),
455254 ` default_value` = concat(` default_value` , ' ,OAUTH2' ),
0 commit comments