mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
CLOUDSTACK-3982: listAccounts - count only UserVms when calculate total number of Running vms per account
This commit is contained in:
parent
536c377752
commit
29ec4dc323
@ -2191,3 +2191,14 @@ ALTER TABLE `cloud_usage`.`usage_storage` ADD COLUMN `virtual_size` bigint unsig
|
||||
ALTER TABLE `cloud_usage`.`cloud_usage` ADD COLUMN `virtual_size` bigint unsigned;
|
||||
|
||||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'kvm.ssh.to.agent', 'true', 'Specify whether or not the management server is allowed to SSH into KVM Agents');
|
||||
|
||||
#update the account_vmstats_view - count only user vms
|
||||
DROP VIEW IF EXISTS `cloud`.`account_vmstats_view`;
|
||||
CREATE VIEW `cloud`.`account_vmstats_view` AS
|
||||
SELECT
|
||||
account_id, state, count(*) as vmcount
|
||||
from
|
||||
`cloud`.`vm_instance`
|
||||
where
|
||||
vm_type = 'User'
|
||||
group by account_id , state;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user