Skip to content

Commit 5cd6d69

Browse files
committed
CLOUDSTACK-3015: VPC virtual router lists deleted nics
1 parent 11b9d5f commit 5cd6d69

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

setup/db/db/schema-410to420.sql

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -974,15 +974,11 @@ CREATE VIEW `cloud`.`domain_router_view` AS
974974
left join
975975
`cloud`.`disk_offering` ON vm_instance.service_offering_id = disk_offering.id
976976
left join
977-
`cloud`.`volumes` ON vm_instance.id = volumes.instance_id
978-
left join
979-
`cloud`.`storage_pool` ON volumes.pool_id = storage_pool.id
980-
left join
981-
`cloud`.`nics` ON vm_instance.id = nics.instance_id
977+
`cloud`.`nics` ON vm_instance.id = nics.instance_id and nics.removed is null
982978
left join
983979
`cloud`.`networks` ON nics.network_id = networks.id
984980
left join
985-
`cloud`.`vpc` ON domain_router.vpc_id = vpc.id
981+
`cloud`.`vpc` ON domain_router.vpc_id = vpc.id and vpc.removed is null
986982
left join
987983
`cloud`.`async_job` ON async_job.instance_id = vm_instance.id
988984
and async_job.instance_type = 'DomainRouter'
@@ -1452,7 +1448,7 @@ CREATE VIEW `cloud`.`user_vm_view` AS
14521448
data_center.uuid data_center_uuid,
14531449
data_center.name data_center_name,
14541450
data_center.is_security_group_enabled security_group_enabled,
1455-
data_center.networktype data_center_type,
1451+
data_center.networktype data_center_type,
14561452
host.id host_id,
14571453
host.uuid host_uuid,
14581454
host.name host_name,
@@ -1564,11 +1560,11 @@ CREATE VIEW `cloud`.`user_vm_view` AS
15641560
left join
15651561
`cloud`.`security_group` ON security_group_vm_map.security_group_id = security_group.id
15661562
left join
1567-
`cloud`.`nics` ON vm_instance.id = nics.instance_id
1563+
`cloud`.`nics` ON vm_instance.id = nics.instance_id and nics.removed is null
15681564
left join
15691565
`cloud`.`networks` ON nics.network_id = networks.id
15701566
left join
1571-
`cloud`.`vpc` ON networks.vpc_id = vpc.id
1567+
`cloud`.`vpc` ON networks.vpc_id = vpc.id and vpc.removed is null
15721568
left join
15731569
`cloud`.`user_ip_address` ON user_ip_address.vm_id = vm_instance.id
15741570
left join

0 commit comments

Comments
 (0)