Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 75CBA10553 for ; Wed, 31 Jul 2013 22:28:34 +0000 (UTC) Received: (qmail 71152 invoked by uid 500); 31 Jul 2013 22:28:34 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 71129 invoked by uid 500); 31 Jul 2013 22:28:34 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 71122 invoked by uid 99); 31 Jul 2013 22:28:34 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Jul 2013 22:28:34 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 093B2831F66; Wed, 31 Jul 2013 22:28:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: alena1108@apache.org To: commits@cloudstack.apache.org Message-Id: <7ec866832cda4e1580f0dccd0e1a9255@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/4.2 to f9faf1a Date: Wed, 31 Jul 2013 22:28:34 +0000 (UTC) Updated Branches: refs/heads/4.2 4f111d284 -> f9faf1aea CLOUDSTACK-3982: listAccounts - count only UserVms when calculate total number of Running vms per account Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f9faf1ae Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f9faf1ae Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f9faf1ae Branch: refs/heads/4.2 Commit: f9faf1aea2f3dbb47c60eaefcd999290dff837e7 Parents: 4f111d2 Author: Alena Prokharchyk Authored: Wed Jul 31 15:18:22 2013 -0700 Committer: Alena Prokharchyk Committed: Wed Jul 31 15:18:59 2013 -0700 ---------------------------------------------------------------------- setup/db/db/schema-410to420.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9faf1ae/setup/db/db/schema-410to420.sql ---------------------------------------------------------------------- diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql index 1650e2f..3f25c3b 100644 --- a/setup/db/db/schema-410to420.sql +++ b/setup/db/db/schema-410to420.sql @@ -2211,3 +2211,14 @@ CREATE TABLE `cloud_usage`.`usage_vmsnapshot` ( ALTER TABLE volumes ADD COLUMN vm_snapshot_chain_size bigint(20) 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; \ No newline at end of file