cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [3/9] git commit: updated refs/heads/master to ccfe557
Date Tue, 10 Dec 2013 04:52:10 GMT
remove private changes


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fca6d566
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fca6d566
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fca6d566

Branch: refs/heads/master
Commit: fca6d566811c3593e6db0e1a839e49717d1641fd
Parents: dc15111
Author: tuna <ng.tuna@gmail.com>
Authored: Mon Oct 14 10:51:24 2013 +0700
Committer: tuna <ng.tuna@gmail.com>
Committed: Tue Dec 10 10:36:30 2013 +0700

----------------------------------------------------------------------
 scripts/vm/hypervisor/xenserver/perfmon.py              | 10 ++++++++--
 scripts/vm/hypervisor/xenserver/vmopspremium            |  4 ++--
 .../cloud/network/lb/LoadBalancingRulesManagerImpl.java |  2 +-
 setup/db/db/schema-40to410.sql                          | 12 ++++++------
 utils/conf/db.properties                                |  2 +-
 5 files changed, 18 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fca6d566/scripts/vm/hypervisor/xenserver/perfmon.py
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/perfmon.py b/scripts/vm/hypervisor/xenserver/perfmon.py
old mode 100644
new mode 100755
index c8514b4..8513c96
--- a/scripts/vm/hypervisor/xenserver/perfmon.py
+++ b/scripts/vm/hypervisor/xenserver/perfmon.py
@@ -5,7 +5,7 @@ import XenAPI
 import urllib
 from xml.dom import minidom
 import time
-
+import commands
 
 # Per VM dictionary (used by RRDUpdates to look up column numbers by variable names)
 class VMReport(dict):
@@ -179,6 +179,11 @@ class RRDUpdates:
         else:
             raise PerfMonException("Invalid string in <legend>: %s" % col_meta_data)
 
+def getuuid(vm_name):
+    status, output = commands.getstatusoutput("xe vm-list | grep "+vm_name+" -B 1 | head
-n 1 | awk -F':' '{print $2}' | tr -d ' '")
+    if (status != 0):
+	raise PerfMonException("Invalid vm name: %s" % vm_name)
+    return output
 
 def get_vm_group_perfmon(args={}):
     #Release code
@@ -213,7 +218,8 @@ def get_vm_group_perfmon(args={}):
 
     #for uuid in rrd_updates.get_vm_list():
     for vm_count in xrange(1, total_vm + 1):
-        vm_uuid = args['vmuuid' + str(vm_count)]
+	vm_name = args['vmname' + str(vm_count)]
+        vm_uuid = getuuid(vm_name)
         #print "Got values for VM: " + str(vm_count) + " " + vm_uuid
         for counter_count in xrange(1, total_counter + 1):
             counter = args['counter' + str(counter_count)]

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fca6d566/scripts/vm/hypervisor/xenserver/vmopspremium
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/vmopspremium b/scripts/vm/hypervisor/xenserver/vmopspremium
index 348dfa4..49349dd 100755
--- a/scripts/vm/hypervisor/xenserver/vmopspremium
+++ b/scripts/vm/hypervisor/xenserver/vmopspremium
@@ -145,8 +145,8 @@ def heartbeat(session, args):
 
 @echo
 def asmonitor(session, args):
-	result = perfmon.get_vm_group_perfmon(args)
-	return result
+    result = perfmon.get_vm_group_perfmon(args)
+    return result
 
 if __name__ == "__main__":
     XenAPIPlugin.dispatch({"forceShutdownVM":forceShutdownVM, "upgrade_snapshot":upgrade_snapshot,
"create_privatetemplate_from_snapshot":create_privatetemplate_from_snapshot, "copy_vhd_to_secondarystorage":copy_vhd_to_secondarystorage,
"copy_vhd_from_secondarystorage":copy_vhd_from_secondarystorage, "setup_heartbeat_sr":setup_heartbeat_sr,
"setup_heartbeat_file":setup_heartbeat_file, "check_heartbeat":check_heartbeat, "heartbeat":
heartbeat, "asmonitor": asmonitor})

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fca6d566/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
index 262d341..aab4c6b 100755
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -916,7 +916,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase
implements
             return false;
         }
         if (provider.get(0) == Provider.Netscaler || provider.get(0) == Provider.F5BigIp
|| 
-        		provider.get(0) == Provider.VirtualRouter || provider.get(0) == Provider.VPCVirtualRouter)
{
+        		provider.get(0) == Provider.VirtualRouter) {
             return true;
         }
         return false;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fca6d566/setup/db/db/schema-40to410.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-40to410.sql b/setup/db/db/schema-40to410.sql
index 6c5529a..a3a8ef7 100644
--- a/setup/db/db/schema-40to410.sql
+++ b/setup/db/db/schema-40to410.sql
@@ -413,12 +413,12 @@ CREATE TABLE `cloud`.`autoscale_vmgroup_vm_map` (
   INDEX `i_autoscale_vmgroup_vm_map__vmgroup_id`(`vmgroup_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
---INSERT INTO `cloud`.`counter` (id, uuid, source, name, value,created) VALUES (1, UUID(),
'snmp','Linux User CPU - percentage', '1.3.6.1.4.1.2021.11.9.0', now());
---INSERT INTO `cloud`.`counter` (id, uuid, source, name, value,created) VALUES (2, UUID(),
'snmp','Linux System CPU - percentage', '1.3.6.1.4.1.2021.11.10.0', now());
---INSERT INTO `cloud`.`counter` (id, uuid, source, name, value,created) VALUES (3, UUID(),
'snmp','Linux CPU Idle - percentage', '1.3.6.1.4.1.2021.11.11.0', now());
---INSERT INTO `cloud`.`counter` (id, uuid, source, name, value,created) VALUES (100, UUID(),
'netscaler','Response Time - microseconds', 'RESPTIME', now());
-INSERT INTO `cloud`.`counter` (id, uuid, source, name, value,created) VALUES (1, UUID(),
'cpu','Linux User CPU - percentage', '1.3.6.1.4.1.2021.11.9.0', now());
-INSERT INTO `cloud`.`counter` (id, uuid, source, name, value,created) VALUES (2, UUID(),
'memory','Linux User RAM - percentage', '1.3.6.1.4.1.2021.11.10.0', now());
+INSERT INTO `cloud`.`counter` (id, uuid, source, name, value,created) VALUES (1, UUID(),
'snmp','Linux User CPU - percentage', '1.3.6.1.4.1.2021.11.9.0', now());
+INSERT INTO `cloud`.`counter` (id, uuid, source, name, value,created) VALUES (2, UUID(),
'snmp','Linux System CPU - percentage', '1.3.6.1.4.1.2021.11.10.0', now());
+INSERT INTO `cloud`.`counter` (id, uuid, source, name, value,created) VALUES (3, UUID(),
'snmp','Linux CPU Idle - percentage', '1.3.6.1.4.1.2021.11.11.0', now());
+INSERT INTO `cloud`.`counter` (id, uuid, source, name, value,created) VALUES (100, UUID(),
'netscaler','Response Time - microseconds', 'RESPTIME', now());
+INSERT INTO `cloud`.`counter` (id, uuid, source, name, value,created) VALUES (1, UUID(),
'cpu','Linux User CPU - percentage', '1.3.6.1.4.1.2021.11.9.1', now());
+INSERT INTO `cloud`.`counter` (id, uuid, source, name, value,created) VALUES (2, UUID(),
'memory','Linux User RAM - percentage', '1.3.6.1.4.1.2021.11.10.1', now());
 
 CREATE TABLE  `cloud`.`user_ipv6_address` (
   `id` bigint unsigned NOT NULL UNIQUE auto_increment,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fca6d566/utils/conf/db.properties
----------------------------------------------------------------------
diff --git a/utils/conf/db.properties b/utils/conf/db.properties
index 709d79e..e1b5fe9 100644
--- a/utils/conf/db.properties
+++ b/utils/conf/db.properties
@@ -25,7 +25,7 @@ region.id=1
 # CloudStack database settings
 db.cloud.username=cloud
 db.cloud.password=cloud
-db.root.password=123
+db.root.password=
 db.cloud.host=localhost
 db.cloud.port=3306
 db.cloud.name=cloud


Mime
View raw message