git commit: updated refs/heads/4.3 to 8b0a465

2013-11-25 Thread likithas
Updated Branches:
  refs/heads/4.3 6558ceea7 -> 8b0a46502


CLOUDSTACK-5122. [VMware] During upgrade from 4.1 system vms don't come up with 
'ROOT-x-y VMDK file not found' exception.
During VM start, if VM already exists and CS finds a matching disk in storage 
for each of the existing disk then the VM is reconfigured with VM's existing 
disk information. This existing disk information for a VM is got from vCenter.
CS checks if a matching disk exists in storage by checking if there is a disk 
in storage whose name atleast partially matches with the name of the existing 
disk.
Post 4.1, Volume path has been changed to ROOT- from 
ROOT--. Hence in case of an upgraded setup (pre 4.1 to 
4.2) during search for an existing disk in storage even though 
ROOT-- has been deleted, CS does a postive match of the 
old existing disk because of the partial match with the new disk 
ROOT- that exists in storage. And so when VM is being powered on by 
vCenter it looks for ROOT-- and fails to power on.
Solution - While looking for a VM's matching disk in storage, instead of 
checking if a disk with a partial match exists check if a disk with the exact 
name exists.


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

Branch: refs/heads/4.3
Commit: 8b0a46502a749f1665a76c0b0de2c2595f09eff0
Parents: 6558cee
Author: Likitha Shetty 
Authored: Fri Nov 22 16:43:17 2013 +0530
Committer: Likitha Shetty 
Committed: Mon Nov 25 14:47:13 2013 +0530

--
 .../cloud/hypervisor/vmware/mo/VirtualMachineDiskInfoBuilder.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8b0a4650/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineDiskInfoBuilder.java
--
diff --git 
a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineDiskInfoBuilder.java
 
b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineDiskInfoBuilder.java
index 41c6db6..8c7db34 100644
--- 
a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineDiskInfoBuilder.java
+++ 
b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineDiskInfoBuilder.java
@@ -88,7 +88,7 @@ public class VirtualMachineDiskInfoBuilder {
for(String backing : chain) {
DatastoreFile file = new DatastoreFile(backing);

-   
if(file.getFileBaseName().contains(diskBackingFileBaseName))
+if(file.getFileBaseName().equals(diskBackingFileBaseName))
return true;
}




git commit: updated refs/heads/master to 0be4a68

2013-11-25 Thread jayapal
Updated Branches:
  refs/heads/master ab2c38c05 -> 0be4a685e


CLOUDSTACK-5164 Unmonit for 30 minutes for a failed process


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

Branch: refs/heads/master
Commit: 0be4a685e8cb0caedf670e45075f1b4e52237f5c
Parents: ab2c38c
Author: Jayapal 
Authored: Mon Nov 25 14:58:12 2013 +0530
Committer: Jayapal 
Committed: Mon Nov 25 15:12:48 2013 +0530

--
 .../config/opt/cloud/bin/monitor_service.sh |   2 +-
 .../debian/config/root/monitorServices.py   | 199 +++
 2 files changed, 161 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0be4a685/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh
--
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh 
b/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh
index c4d99d2..51b6923 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh
@@ -64,7 +64,7 @@ crontab -l | grep -v  monitorServices.py | crontab -
 create_config $config
 
 #add cron job
-(crontab -l ;echo -e 
"SHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n
 */1 * * * * /usr/bin/python /root/monitorServices.py") | crontab -
+(crontab -l ;echo -e 
"SHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n
 */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab -
 
 
 unlock_exit 0 $lock $locked

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0be4a685/systemvm/patches/debian/config/root/monitorServices.py
--
diff --git a/systemvm/patches/debian/config/root/monitorServices.py 
b/systemvm/patches/debian/config/root/monitorServices.py
index 2cec672..4e1b7e0 100755
--- a/systemvm/patches/debian/config/root/monitorServices.py
+++ b/systemvm/patches/debian/config/root/monitorServices.py
@@ -19,14 +19,13 @@
 
 
 
-__author__ = 'jayapalreddy'
 
 from ConfigParser import SafeConfigParser
 from subprocess import *
 from os import path
 import time
+import os
 
-monitor_log='/var/log/monitor.log'
 class StatusCodes:
 SUCCESS  = 0
 FAILED   = 1
@@ -35,42 +34,58 @@ class StatusCodes:
 STOPPED  = 4
 STARTING = 5
 
-class log:
+class Log:
 INFO = 'INFO'
 ALERT = 'ALERT'
 CRIT  = 'CRIT'
 NOTIF = 'NOTIF'
 
-
+class Config:
+MONIT_AFTER_MINS = 30
+SLEEP_SEC = 1
+RETRY_ITERATIONS = 10
+RETRY_FOR_RESTART = 5
+MONITOR_LOG = '/var/log/monitor.log'
+UNMONIT_PS_FILE = '/etc/unmonit_psList.txt'
 
 
 def getConfig( config_file_path = "/etc/monitor.conf" ):
+"""
+Reads the process configuration from the config file.
+Config file contains the processes to be monitored.
+
+"""
 process_dict = {}
 parser = SafeConfigParser()
 parser.read( config_file_path )
 
-#print 'Read values:\n'
 
 for section in parser.sections():
-#   print section
 process_dict[section] = {}
 
 for name, value in parser.items(section):
 process_dict[section][name] = value
-#   print '  %s = %r' % (name, value)
+#   printd (" %s = %r" % (name, value))
 
 return  process_dict
 
 def printd (msg):
+"""
+prints the debug messages
+"""
 
+#for debug
+#print msg
 return 0
 
-f= open(monitor_log,'r+')
+f= open(Config.MONITOR_LOG,'r+')
 f.seek(0, 2)
 f.write(str(msg)+"\n")
 f.close()
 
 def raisealert(severity, msg, process_name=None):
+""" Writes the alert message"""
+
 #timeStr=str(time.ctime())
 if process_name is not None:
 log = '['+severity +']'+" " + '['+process_name+']' + " " + msg +"\n"
@@ -82,9 +97,12 @@ def raisealert(severity, msg, process_name=None):
 
 
 def isPidMatchPidFile(pidfile, pids):
+""" Compares the running process pid with the pid in pid file.
+If a process with multiple pids then it matches with pid file
+"""
 
 if pids is None or isinstance(pids,list) != True or len(pids) == 0:
-print "Invalid Arguments"
+printd ("Invalid Arguments")
 return StatusCodes.FAILED
 if not path.isfile(pidfile):
 #It seems there is no pid file for this service
@@ -100,12 +118,18 @@ def isPidMatchPidFile(pidfile, pids):
 
 
 inp = fd.read()
+
+if not inp:
+fd.close()
+return StatusCodes.FAILED
+
 printd("file content "+str(inp))
 printd(pids)
 toche

git commit: updated refs/heads/4.3 to a62eb0a

2013-11-25 Thread jayapal
Updated Branches:
  refs/heads/4.3 8b0a46502 -> a62eb0a00


CLOUDSTACK-5164 Unmonit for 30 minutes for a failed process


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

Branch: refs/heads/4.3
Commit: a62eb0a00ab17226124fead70f23eb3b18cdba11
Parents: 8b0a465
Author: Jayapal 
Authored: Mon Nov 25 14:58:12 2013 +0530
Committer: Jayapal 
Committed: Mon Nov 25 15:15:06 2013 +0530

--
 .../config/opt/cloud/bin/monitor_service.sh |   2 +-
 .../debian/config/root/monitorServices.py   | 199 +++
 2 files changed, 161 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a62eb0a0/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh
--
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh 
b/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh
index c4d99d2..51b6923 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/monitor_service.sh
@@ -64,7 +64,7 @@ crontab -l | grep -v  monitorServices.py | crontab -
 create_config $config
 
 #add cron job
-(crontab -l ;echo -e 
"SHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n
 */1 * * * * /usr/bin/python /root/monitorServices.py") | crontab -
+(crontab -l ;echo -e 
"SHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n
 */3 * * * * /usr/bin/python /root/monitorServices.py") | crontab -
 
 
 unlock_exit 0 $lock $locked

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a62eb0a0/systemvm/patches/debian/config/root/monitorServices.py
--
diff --git a/systemvm/patches/debian/config/root/monitorServices.py 
b/systemvm/patches/debian/config/root/monitorServices.py
index 2cec672..4e1b7e0 100755
--- a/systemvm/patches/debian/config/root/monitorServices.py
+++ b/systemvm/patches/debian/config/root/monitorServices.py
@@ -19,14 +19,13 @@
 
 
 
-__author__ = 'jayapalreddy'
 
 from ConfigParser import SafeConfigParser
 from subprocess import *
 from os import path
 import time
+import os
 
-monitor_log='/var/log/monitor.log'
 class StatusCodes:
 SUCCESS  = 0
 FAILED   = 1
@@ -35,42 +34,58 @@ class StatusCodes:
 STOPPED  = 4
 STARTING = 5
 
-class log:
+class Log:
 INFO = 'INFO'
 ALERT = 'ALERT'
 CRIT  = 'CRIT'
 NOTIF = 'NOTIF'
 
-
+class Config:
+MONIT_AFTER_MINS = 30
+SLEEP_SEC = 1
+RETRY_ITERATIONS = 10
+RETRY_FOR_RESTART = 5
+MONITOR_LOG = '/var/log/monitor.log'
+UNMONIT_PS_FILE = '/etc/unmonit_psList.txt'
 
 
 def getConfig( config_file_path = "/etc/monitor.conf" ):
+"""
+Reads the process configuration from the config file.
+Config file contains the processes to be monitored.
+
+"""
 process_dict = {}
 parser = SafeConfigParser()
 parser.read( config_file_path )
 
-#print 'Read values:\n'
 
 for section in parser.sections():
-#   print section
 process_dict[section] = {}
 
 for name, value in parser.items(section):
 process_dict[section][name] = value
-#   print '  %s = %r' % (name, value)
+#   printd (" %s = %r" % (name, value))
 
 return  process_dict
 
 def printd (msg):
+"""
+prints the debug messages
+"""
 
+#for debug
+#print msg
 return 0
 
-f= open(monitor_log,'r+')
+f= open(Config.MONITOR_LOG,'r+')
 f.seek(0, 2)
 f.write(str(msg)+"\n")
 f.close()
 
 def raisealert(severity, msg, process_name=None):
+""" Writes the alert message"""
+
 #timeStr=str(time.ctime())
 if process_name is not None:
 log = '['+severity +']'+" " + '['+process_name+']' + " " + msg +"\n"
@@ -82,9 +97,12 @@ def raisealert(severity, msg, process_name=None):
 
 
 def isPidMatchPidFile(pidfile, pids):
+""" Compares the running process pid with the pid in pid file.
+If a process with multiple pids then it matches with pid file
+"""
 
 if pids is None or isinstance(pids,list) != True or len(pids) == 0:
-print "Invalid Arguments"
+printd ("Invalid Arguments")
 return StatusCodes.FAILED
 if not path.isfile(pidfile):
 #It seems there is no pid file for this service
@@ -100,12 +118,18 @@ def isPidMatchPidFile(pidfile, pids):
 
 
 inp = fd.read()
+
+if not inp:
+fd.close()
+return StatusCodes.FAILED
+
 printd("file content "+str(inp))
 printd(pids)
 tocheck_pid

[2/2] git commit: updated refs/heads/master to 102331c

2013-11-25 Thread likithas
CLOUDSTACK-4959: added the connection and socket timeout parameters for SMTP 
and sending message in new thread so that HA doesn't get blocked beacause of 
hang in sending email alert


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

Branch: refs/heads/master
Commit: 102331c62e2efa1cbed34d7ec2c42437ac9515fe
Parents: 29c36b2
Author: Anshul Gangwar 
Authored: Wed Nov 13 17:17:55 2013 +0530
Committer: Likitha Shetty 
Committed: Mon Nov 25 15:52:33 2013 +0530

--
 .../src/com/cloud/alert/AlertManagerImpl.java   | 53 +---
 server/src/com/cloud/configuration/Config.java  |  4 ++
 setup/db/db/schema-420to421.sql |  2 +
 3 files changed, 51 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/102331c6/server/src/com/cloud/alert/AlertManagerImpl.java
--
diff --git a/server/src/com/cloud/alert/AlertManagerImpl.java 
b/server/src/com/cloud/alert/AlertManagerImpl.java
index cdb65e1..05ed03a 100755
--- a/server/src/com/cloud/alert/AlertManagerImpl.java
+++ b/server/src/com/cloud/alert/AlertManagerImpl.java
@@ -25,6 +25,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Timer;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 import javax.ejb.Local;
 import javax.inject.Inject;
@@ -32,6 +34,7 @@ import javax.mail.Authenticator;
 import javax.mail.Message.RecipientType;
 import javax.mail.MessagingException;
 import javax.mail.PasswordAuthentication;
+import javax.mail.SendFailedException;
 import javax.mail.Session;
 import javax.mail.URLName;
 import javax.mail.internet.InternetAddress;
@@ -79,6 +82,7 @@ import com.cloud.resource.ResourceManager;
 import com.cloud.storage.StorageManager;
 import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.concurrency.NamedThreadFactory;
 import com.cloud.utils.db.DB;
 import com.cloud.utils.db.SearchCriteria;
 
@@ -132,6 +136,12 @@ public class AlertManagerImpl extends ManagerBase 
implements AlertManager, Confi
 private double _localStorageCapacityThreshold = 0.75;
 Map _capacityTypeThresholdMap = new HashMap();
 
+private final ExecutorService _executor;
+
+public AlertManagerImpl() {
+_executor = Executors.newCachedThreadPool(new 
NamedThreadFactory("Email-Alerts-Sender"));
+}
+
 @Override
 public boolean configure(String name, Map params) throws 
ConfigurationException {
 Map configs = 
_configDao.getConfiguration("management-server", params);
@@ -151,12 +161,14 @@ public class AlertManagerImpl extends ManagerBase 
implements AlertManager, Confi
 String smtpPassword = configs.get("alert.smtp.password");
 String emailSender = configs.get("alert.email.sender");
 String smtpDebugStr = configs.get("alert.smtp.debug");
+int smtpTimeout = 
NumbersUtil.parseInt(configs.get("alert.smtp.timeout"), 3);
+int smtpConnectionTimeout = 
NumbersUtil.parseInt(configs.get("alert.smtp.connectiontimeout"), 3);
 boolean smtpDebug = false;
 if (smtpDebugStr != null) {
 smtpDebug = Boolean.parseBoolean(smtpDebugStr);
 }
 
-_emailAlert = new EmailAlert(emailAddresses, smtpHost, smtpPort, 
useAuth, smtpUsername, smtpPassword, emailSender, smtpDebug);
+_emailAlert = new EmailAlert(emailAddresses, smtpHost, smtpPort, 
smtpConnectionTimeout, smtpTimeout, useAuth, smtpUsername, smtpPassword, 
emailSender, smtpDebug);
 
 String publicIPCapacityThreshold = 
_configDao.getValue(Config.PublicIpCapacityThreshold.key());
 String privateIPCapacityThreshold = 
_configDao.getValue(Config.PrivateIpCapacityThreshold.key());
@@ -729,9 +741,11 @@ public class AlertManagerImpl extends ManagerBase 
implements AlertManager, Confi
 private final String _smtpUsername;
 private final String _smtpPassword;
 private final String _emailSender;
+private int _smtpTimeout;
+private int _smtpConnectionTimeout;
 
-public EmailAlert(String[] recipientList, String smtpHost, int 
smtpPort, boolean smtpUseAuth, final String smtpUsername, final String 
smtpPassword,
-String emailSender, boolean smtpDebug) {
+public EmailAlert(String[] recipientList, String smtpHost, int 
smtpPort, int smtpConnectionTimeout, int smtpTimeout, boolean smtpUseAuth, 
final String smtpUsername,
+final String smtpPassword, String emailSender, boolean 
smtpDebug) {
 if (recipi

[1/2] git commit: updated refs/heads/master to 102331c

2013-11-25 Thread likithas
Updated Branches:
  refs/heads/master 0be4a685e -> 102331c62


CLOUDSTACK-5122. [VMware] During upgrade from 4.1 system vms don't come up with 
'ROOT-x-y VMDK file not found' exception.
During VM start, if VM already exists and CS finds a matching disk in storage 
for each of the existing disk then the VM is reconfigured with VM's existing 
disk information. This existing disk information for a VM is got from vCenter.
CS checks if a matching disk exists in storage by checking if there is a disk 
in storage whose name atleast partially matches with the name of the existing 
disk.
Post 4.1, Volume path has been changed to ROOT- from 
ROOT--. Hence in case of an upgraded setup (pre 4.1 to 
4.2) during search for an existing disk in storage even though 
ROOT-- has been deleted, CS does a postive match of the 
old existing disk because of the partial match with the new disk 
ROOT- that exists in storage. And so when VM is being powered on by 
vCenter it looks for ROOT-- and fails to power on.
Solution - While looking for a VM's matching disk in storage, instead of 
checking if a disk with a partial match exists check if a disk with the exact 
name exists.


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

Branch: refs/heads/master
Commit: 29c36b2ad20a65085f76f529a0e0007c99310489
Parents: 0be4a68
Author: Likitha Shetty 
Authored: Fri Nov 22 16:43:17 2013 +0530
Committer: Likitha Shetty 
Committed: Mon Nov 25 15:52:24 2013 +0530

--
 .../cloud/hypervisor/vmware/mo/VirtualMachineDiskInfoBuilder.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/29c36b2a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineDiskInfoBuilder.java
--
diff --git 
a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineDiskInfoBuilder.java
 
b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineDiskInfoBuilder.java
index baddfc0..9e9fa89 100644
--- 
a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineDiskInfoBuilder.java
+++ 
b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineDiskInfoBuilder.java
@@ -88,7 +88,7 @@ public class VirtualMachineDiskInfoBuilder {
 for (String backing : chain) {
 DatastoreFile file = new DatastoreFile(backing);
 
-if (file.getFileBaseName().contains(diskBackingFileBaseName))
+if (file.getFileBaseName().equals(diskBackingFileBaseName))
 return true;
 }
 



git commit: updated refs/heads/4.3 to a045d98

2013-11-25 Thread rajeshbattala
Updated Branches:
  refs/heads/4.3 a62eb0a00 -> a045d981c


Added contextMap data to all the command responses in HyperV


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

Branch: refs/heads/4.3
Commit: a045d981ccbf0d675b354cc7e8b8b76fd8fe7997
Parents: a62eb0a
Author: Rajesh Battala 
Authored: Mon Nov 25 18:43:23 2013 +0530
Committer: Rajesh Battala 
Committed: Mon Nov 25 18:43:51 2013 +0530

--
 .../HypervResource/HypervResourceController.cs  | 86 +---
 1 file changed, 58 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a045d981/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
--
diff --git 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
index 0d56fef..ac4bbf4 100644
--- 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
+++ 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
@@ -114,6 +114,7 @@ namespace HypervResource
 
 private static ILog logger = 
LogManager.GetLogger(typeof(HypervResourceController));
 private static string systemVmIso;
+Dictionary contextMap = new Dictionary();
 
 public static void Initialize()
 {
@@ -175,7 +176,8 @@ namespace HypervResource
 {
 result = result,
 details = "success - NOP",
-_reconnect = false
+_reconnect = false,
+contextMap = contextMap
 };
 
 return ReturnCloudStackTypedJArray(ansContent, 
CloudStackTypes.SetupAnswer);
@@ -220,7 +222,8 @@ namespace HypervResource
 object ansContent = new
 {
 result = result,
-details = details
+details = details,
+contextMap = contextMap
 };
 
 return ReturnCloudStackTypedJArray(ansContent, 
CloudStackTypes.AttachAnswer);
@@ -264,7 +267,8 @@ namespace HypervResource
 object ansContent = new
 {
 result = result,
-details = details
+details = details,
+contextMap = contextMap
 };
 
 return ReturnCloudStackTypedJArray(ansContent, 
CloudStackTypes.DettachAnswer);
@@ -307,7 +311,8 @@ namespace HypervResource
 object ansContent = new
 {
 result = result,
-details = details
+details = details,
+contextMap = contextMap
 };
 
 return ReturnCloudStackTypedJArray(ansContent, 
CloudStackTypes.RebootAnswer);
@@ -369,7 +374,8 @@ namespace HypervResource
 object ansContent = new
 {
 result = result,
-details = details
+details = details,
+contextMap = contextMap
 };
 
 return ReturnCloudStackTypedJArray(ansContent, 
CloudStackTypes.Answer);
@@ -484,7 +490,8 @@ namespace HypervResource
 {
 result = result,
 details = details,
-volume = volume
+volume = volume,
+contextMap = contextMap
 };
 return ReturnCloudStackTypedJArray(ansContent, 
CloudStackTypes.CreateAnswer);
 }
@@ -552,7 +559,8 @@ namespace HypervResource
 result = result,
 details = details,
 templateSize = size,
-installPath = newCopyFileName
+installPath = newCopyFileName,
+contextMap = contextMap
 };
 return ReturnCloudStackTypedJArray(ansContent, 
CloudStackTypes.PrimaryStorageDownloadAnswer);
 }
@@ -654,7 +662,8 @@ namespace HypervResource
 object ansContent = new
 {
 result = true,
-details = "resource is alive"
+details = "resource is alive",
+contextMap = contextMap
 };
 return ReturnCloudStackT

git commit: updated refs/heads/master to eb21239

2013-11-25 Thread darren
Updated Branches:
  refs/heads/master 102331c62 -> eb21239e3


CLOUDSTACK-5224: Add missing configuration for Netscaler, F5, SRX, and VNMC


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

Branch: refs/heads/master
Commit: eb21239e3f2fdf9d63def52c42c86169e4e3bde6
Parents: 102331c
Author: Darren Shepherd 
Authored: Mon Nov 25 12:03:49 2013 -0700
Committer: Darren Shepherd 
Committed: Mon Nov 25 12:03:49 2013 -0700

--
 .../cloudstack/cisco-vnmc/module.properties | 18 +
 .../cisco-vnmc/spring-cisco-vnmc-context.xml| 40 
 .../META-INF/cloudstack/f5/module.properties| 18 +
 .../cloudstack/f5/spring-f5-context.xml | 34 +
 .../META-INF/cloudstack/srx/module.properties   | 18 +
 .../cloudstack/srx/spring-srx-context.xml   | 35 +
 .../cloudstack/netscaler/module.properties  | 18 +
 .../netscaler/spring-netscaler-context.xml  | 35 +
 8 files changed, 216 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb21239e/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/module.properties
--
diff --git 
a/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/module.properties
 
b/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/module.properties
new file mode 100644
index 000..69ffb6f
--- /dev/null
+++ 
b/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/module.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+name=cisco-vnmc
+parent=network
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb21239e/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/spring-cisco-vnmc-context.xml
--
diff --git 
a/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/spring-cisco-vnmc-context.xml
 
b/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/spring-cisco-vnmc-context.xml
new file mode 100644
index 000..62e2ef0
--- /dev/null
+++ 
b/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/spring-cisco-vnmc-context.xml
@@ -0,0 +1,40 @@
+
+http://www.springframework.org/schema/beans";
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+   xmlns:context="http://www.springframework.org/schema/context";
+   xmlns:aop="http://www.springframework.org/schema/aop";
+   xsi:schemaLocation="http://www.springframework.org/schema/beans
+  
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+  http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+  http://www.springframework.org/schema/context
+  
http://www.springframework.org/schema/context/spring-context-3.0.xsd";
+  >
+
+
+
+
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb21239e/plugins/network-elements/f5/resources/META-INF/cloudstack/f5/module.properties
--
diff --git 
a/plugins/network-elements/f5/resources/META-INF/cloudstack/f5/module.properties
 
b/plugins/network-elements/f5/resources/META-INF/cloudstack/f5/module.properties
new file mode 100644
index 000..efdb64a
--- /dev/null
+++ 
b/plugins/network-elements/f5/resources/META-INF/cloudstack/f5/module.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work

git commit: updated refs/heads/4.3 to a3db8ea

2013-11-25 Thread darren
Updated Branches:
  refs/heads/4.3 a045d981c -> a3db8ea4c


CLOUDSTACK-5224: Add missing configuration for Netscaler, F5, SRX, and VNMC


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

Branch: refs/heads/4.3
Commit: a3db8ea4c266939cc83bc4ad1cb13efbb74686f1
Parents: a045d98
Author: Darren Shepherd 
Authored: Mon Nov 25 12:03:49 2013 -0700
Committer: Darren Shepherd 
Committed: Mon Nov 25 12:05:01 2013 -0700

--
 .../cloudstack/cisco-vnmc/module.properties | 18 +
 .../cisco-vnmc/spring-cisco-vnmc-context.xml| 40 
 .../META-INF/cloudstack/f5/module.properties| 18 +
 .../cloudstack/f5/spring-f5-context.xml | 34 +
 .../META-INF/cloudstack/srx/module.properties   | 18 +
 .../cloudstack/srx/spring-srx-context.xml   | 35 +
 .../cloudstack/netscaler/module.properties  | 18 +
 .../netscaler/spring-netscaler-context.xml  | 35 +
 8 files changed, 216 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3db8ea4/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/module.properties
--
diff --git 
a/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/module.properties
 
b/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/module.properties
new file mode 100644
index 000..69ffb6f
--- /dev/null
+++ 
b/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/module.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+name=cisco-vnmc
+parent=network
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3db8ea4/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/spring-cisco-vnmc-context.xml
--
diff --git 
a/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/spring-cisco-vnmc-context.xml
 
b/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/spring-cisco-vnmc-context.xml
new file mode 100644
index 000..62e2ef0
--- /dev/null
+++ 
b/plugins/network-elements/cisco-vnmc/resources/META-INF/cloudstack/cisco-vnmc/spring-cisco-vnmc-context.xml
@@ -0,0 +1,40 @@
+
+http://www.springframework.org/schema/beans";
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+   xmlns:context="http://www.springframework.org/schema/context";
+   xmlns:aop="http://www.springframework.org/schema/aop";
+   xsi:schemaLocation="http://www.springframework.org/schema/beans
+  
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+  http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+  http://www.springframework.org/schema/context
+  
http://www.springframework.org/schema/context/spring-context-3.0.xsd";
+  >
+
+
+
+
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a3db8ea4/plugins/network-elements/f5/resources/META-INF/cloudstack/f5/module.properties
--
diff --git 
a/plugins/network-elements/f5/resources/META-INF/cloudstack/f5/module.properties
 
b/plugins/network-elements/f5/resources/META-INF/cloudstack/f5/module.properties
new file mode 100644
index 000..efdb64a
--- /dev/null
+++ 
b/plugins/network-elements/f5/resources/META-INF/cloudstack/f5/module.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for a

git commit: updated refs/heads/4.3 to 3fbddbb

2013-11-25 Thread jessicawang
Updated Branches:
  refs/heads/4.3 a3db8ea4c -> 3fbddbb91


CLOUDSTACK-4793: UI > Virtual Routers > Select View > group by zone > implement 
detailView of Zone, Total of Virtual Routers, Virtual Routers require upgrade.


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

Branch: refs/heads/4.3
Commit: 3fbddbb911011230ca5edc634372502f930ce5c6
Parents: a3db8ea
Author: Jessica Wang 
Authored: Mon Nov 25 12:06:57 2013 -0800
Committer: Jessica Wang 
Committed: Mon Nov 25 12:07:45 2013 -0800

--
 ui/scripts/system.js | 81 ++-
 1 file changed, 80 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3fbddbb9/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index d6ced5b..d748b72 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8735,7 +8735,86 @@
 });
 }
 });
-}
+}, 
  
+detailView: {
+   name: 'Virtual Routers group by zone',
+   tabs: {
+   details: {
+   title: 'Virtual Routers group 
by zone', 
+   fields: [{
+name: {
+label: 'label.zone'
+}
+   }, {
+routerCount: {
+   label: 'Total of Virtual 
Routers'
+},
+routerRequiresUpgrade: {
+   label: 'Virtual Routers require 
upgrade',
+   converter: function(args) { 

+   if (args > 0) {
+   return 'Yes';
+   } else {
+   return 'No';
+   }
+   }
+}
+}],  
+dataProvider: function(args) { 
+   $.ajax({
+   url: 
createURL('listRouters'),
+   data: {
+   zoneid: 
args.context.routerGroupByZone[0].id
+   },
+   async: false,
+   success: function(json) {
+   if 
(json.listroutersresponse.count != undefined) {
+   
args.context.routerGroupByZone[0].routerCount = json.listroutersresponse.count; 
   
+   

+   var 
routerCountFromAllPages = args.context.routerGroupByZone[0].routerCount;

+   var currentPage 
= 1;
+   var 
routerCountFromFirstPageToCurrentPage = 0;  
+   var 
routerRequiresUpgrade = 0;  

+   var 
callListApiWithPage = function() {  

+   $.ajax({
+

git commit: updated refs/heads/master to a5cff1d

2013-11-25 Thread jessicawang
Updated Branches:
  refs/heads/master eb21239e3 -> a5cff1dfd


CLOUDSTACK-4793: UI > Virtual Routers > Select View > group by zone > implement 
detailView of Zone, Total of Virtual Routers, Virtual Routers require upgrade.


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

Branch: refs/heads/master
Commit: a5cff1dfd585f2b1ff2db0cb6818ca73c20bb2f9
Parents: eb21239
Author: Jessica Wang 
Authored: Mon Nov 25 12:06:57 2013 -0800
Committer: Jessica Wang 
Committed: Mon Nov 25 12:08:55 2013 -0800

--
 ui/scripts/system.js | 81 ++-
 1 file changed, 80 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a5cff1df/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index d6ced5b..d748b72 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8735,7 +8735,86 @@
 });
 }
 });
-}
+}, 
  
+detailView: {
+   name: 'Virtual Routers group by zone',
+   tabs: {
+   details: {
+   title: 'Virtual Routers group 
by zone', 
+   fields: [{
+name: {
+label: 'label.zone'
+}
+   }, {
+routerCount: {
+   label: 'Total of Virtual 
Routers'
+},
+routerRequiresUpgrade: {
+   label: 'Virtual Routers require 
upgrade',
+   converter: function(args) { 

+   if (args > 0) {
+   return 'Yes';
+   } else {
+   return 'No';
+   }
+   }
+}
+}],  
+dataProvider: function(args) { 
+   $.ajax({
+   url: 
createURL('listRouters'),
+   data: {
+   zoneid: 
args.context.routerGroupByZone[0].id
+   },
+   async: false,
+   success: function(json) {
+   if 
(json.listroutersresponse.count != undefined) {
+   
args.context.routerGroupByZone[0].routerCount = json.listroutersresponse.count; 
   
+   

+   var 
routerCountFromAllPages = args.context.routerGroupByZone[0].routerCount;

+   var currentPage 
= 1;
+   var 
routerCountFromFirstPageToCurrentPage = 0;  
+   var 
routerRequiresUpgrade = 0;  

+   var 
callListApiWithPage = function() {  

+   $.ajax({
+  

git commit: updated refs/heads/4.3 to 58938d9

2013-11-25 Thread jessicawang
Updated Branches:
  refs/heads/4.3 3fbddbb91 -> 58938d96d


CLOUDSTACK-4793: UI > Virtual Routers > Select View > group by zone > 
detailView > add action "upgrade all routers in this zone to use newer 
template".


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

Branch: refs/heads/4.3
Commit: 58938d96d4fc046fcb9ba20068f7ddfafb8cb530
Parents: 3fbddbb
Author: Jessica Wang 
Authored: Mon Nov 25 13:32:46 2013 -0800
Committer: Jessica Wang 
Committed: Mon Nov 25 13:32:46 2013 -0800

--
 ui/scripts/system.js | 36 +++-
 1 file changed, 35 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/58938d96/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index d748b72..98b5454 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8737,7 +8737,41 @@
 });
 }, 
  
 detailView: {
-   name: 'Virtual Routers group by zone',
+   name: 'Virtual Routers group by zone',  

+   actions: {  
+   upgradeRouterToUseNewerTemplate: {
+label: 'Upgrade Router to Use Newer 
Template',
+messages: {
+confirm: function(args) {
+return 'Please confirm that 
you want to upgrade all routers in this zone to use newer template';
+},
+notification: function (args) {
+return 'Upgrade Router to Use 
Newer Template';
+}
+},
+action: function (args) {  

+$.ajax({
+url: 
createURL('upgradeRouterTemplate'),
+data: {
+   zoneid: 
args.context.routerGroupByZone[0].id
+},
+success: function (json) {
+var jobs = 
json.upgraderoutertemplateresponse.asyncjobs;
+if (jobs != undefined) {
+args.response.success({
+_custom: {
+jobId: 
jobs[0].jobid
+}
+});
+}
+}
+});
+},
+notification: {
+poll: pollAsyncJobResult
+}
+}  
+},   
tabs: {
details: {
title: 'Virtual Routers group 
by zone', 



git commit: updated refs/heads/master to 5a9b4ee

2013-11-25 Thread jessicawang
Updated Branches:
  refs/heads/master a5cff1dfd -> 5a9b4ee84


CLOUDSTACK-4793: UI > Virtual Routers > Select View > group by zone > 
detailView > add action "upgrade all routers in this zone to use newer 
template".


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

Branch: refs/heads/master
Commit: 5a9b4ee843bf44f4d954caaa655bd1d68e61de25
Parents: a5cff1d
Author: Jessica Wang 
Authored: Mon Nov 25 13:32:46 2013 -0800
Committer: Jessica Wang 
Committed: Mon Nov 25 13:33:55 2013 -0800

--
 ui/scripts/system.js | 36 +++-
 1 file changed, 35 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a9b4ee8/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index d748b72..98b5454 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8737,7 +8737,41 @@
 });
 }, 
  
 detailView: {
-   name: 'Virtual Routers group by zone',
+   name: 'Virtual Routers group by zone',  

+   actions: {  
+   upgradeRouterToUseNewerTemplate: {
+label: 'Upgrade Router to Use Newer 
Template',
+messages: {
+confirm: function(args) {
+return 'Please confirm that 
you want to upgrade all routers in this zone to use newer template';
+},
+notification: function (args) {
+return 'Upgrade Router to Use 
Newer Template';
+}
+},
+action: function (args) {  

+$.ajax({
+url: 
createURL('upgradeRouterTemplate'),
+data: {
+   zoneid: 
args.context.routerGroupByZone[0].id
+},
+success: function (json) {
+var jobs = 
json.upgraderoutertemplateresponse.asyncjobs;
+if (jobs != undefined) {
+args.response.success({
+_custom: {
+jobId: 
jobs[0].jobid
+}
+});
+}
+}
+});
+},
+notification: {
+poll: pollAsyncJobResult
+}
+}  
+},   
tabs: {
details: {
title: 'Virtual Routers group 
by zone', 



git commit: updated refs/heads/master to a1ca4f1

2013-11-25 Thread nitin
Updated Branches:
  refs/heads/master 5a9b4ee84 -> a1ca4f1d5


CLOUDSTACK-5221:
In order to keep backward compatibility, listisos should return an empty 
response than an error when id of a removed iso is passed.


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

Branch: refs/heads/master
Commit: a1ca4f1d5669861b938858add4cbf7c6e0fb5a8c
Parents: 5a9b4ee
Author: Nitin Mehta 
Authored: Mon Nov 25 13:47:42 2013 -0800
Committer: Nitin Mehta 
Committed: Mon Nov 25 13:47:42 2013 -0800

--
 server/src/com/cloud/api/query/QueryManagerImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a1ca4f1d/server/src/com/cloud/api/query/QueryManagerImpl.java
--
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java 
b/server/src/com/cloud/api/query/QueryManagerImpl.java
index bda7b4d..9122276 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -2769,7 +2769,7 @@ public class QueryManagerImpl extends ManagerBase 
implements QueryService {
 
 // verify templateId parameter and specially handle it
 if (templateId != null) {
-template = _templateDao.findById(templateId);
+template = _templateDao.findByIdIncludingRemoved(templateId); // 
Done for backward compatibility - Bug-5221
 if (template == null) {
 throw new InvalidParameterValueException("Please specify a 
valid template ID.");
 }// If ISO requested then it should be ISO.



git commit: updated refs/heads/4.3 to 97e47f8

2013-11-25 Thread nitin
Updated Branches:
  refs/heads/4.3 58938d96d -> 97e47f884


CLOUDSTACK-5221:
In order to keep backward compatibility, listisos should return an empty 
response than an error when id of a removed iso is passed.


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

Branch: refs/heads/4.3
Commit: 97e47f88471013a511e42e4d30e70d980134ca87
Parents: 58938d9
Author: Nitin Mehta 
Authored: Mon Nov 25 13:47:42 2013 -0800
Committer: Nitin Mehta 
Committed: Mon Nov 25 13:48:30 2013 -0800

--
 server/src/com/cloud/api/query/QueryManagerImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97e47f88/server/src/com/cloud/api/query/QueryManagerImpl.java
--
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java 
b/server/src/com/cloud/api/query/QueryManagerImpl.java
index 36fab21..58df38c 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -2850,7 +2850,7 @@ public class QueryManagerImpl extends ManagerBase 
implements QueryService {
 
 // verify templateId parameter and specially handle it
 if (templateId != null) {
-template = _templateDao.findById(templateId);
+template = _templateDao.findByIdIncludingRemoved(templateId); // 
Done for backward compatibility - Bug-5221
 if (template == null) {
 throw new InvalidParameterValueException("Please specify a 
valid template ID.");
 }// If ISO requested then it should be ISO.



git commit: updated refs/heads/master to 7819a4b

2013-11-25 Thread jessicawang
Updated Branches:
  refs/heads/master a1ca4f1d5 -> 7819a4b7a


CLOUDSTACK-4793: UI > Virtual Routers > Select View > add "group by pod".


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

Branch: refs/heads/master
Commit: 7819a4b7af28071e048ae6914abfdd6a9f3116e4
Parents: a1ca4f1
Author: Jessica Wang 
Authored: Mon Nov 25 13:50:38 2013 -0800
Committer: Jessica Wang 
Committed: Mon Nov 25 13:51:24 2013 -0800

--
 ui/scripts/system.js | 221 +-
 1 file changed, 220 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7819a4b7/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 98b5454..f385794 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8850,7 +8850,226 @@
}
 }   
 }
-}   
+},  
+routerGroupByPod: {
+id: 'routerGroupByPod',
+type: 'select',
+title: 'group by pod',
+listView: {
+id: 'routerGroupByPod',
+label: 'label.virtual.appliances',
+fields: {
+name: {
+label: 'label.pod'
+},
+routerCount: {
+label: 'Total of Virtual Routers'
+},
+routerRequiresUpgrade: {
+label: 'Virtual Routers require upgrade',
+converter: function (args) {
+if (args > 0) {
+return 'Yes';
+} else {
+return 'No';
+}
+}
+}
+},
+
+dataProvider: function (args) {
+var array1 = [];
+if (args.filterBy != null) {
+if (args.filterBy.search != null && 
args.filterBy.search.by != null && args.filterBy.search.value != null) {
+switch (args.filterBy.search.by) {
+case "name":
+if 
(args.filterBy.search.value.length > 0)
+array1.push("&keyword=" + 
args.filterBy.search.value);
+break;
+}
+}
+}
+$.ajax({
+url: createURL("listPods&page=" + 
args.page + "&pagesize=" + pageSize + array1.join("")),
+dataType: "json",
+async: true,
+success: function (json) {
+var podObjs = 
json.listpodsresponse.pod;
+if (podObjs != null) {
+for (var i = 0; i < 
podObjs.length; i++) {
+$.ajax({
+url: 
createURL('listRouters'),
+data: {
+podid: podObjs[i].id
+},
+async: false,
+success: function (json) {
+if 
(json.listroutersresponse.count != undefined) {
+
podObjs[i].routerCount = json.listroutersresponse.count;
+
+var 
routerCountFromAllPages = podObjs[i].routerCount;
+var currentPage = 
1;
+

git commit: updated refs/heads/4.3 to 4c31aee

2013-11-25 Thread jessicawang
Updated Branches:
  refs/heads/4.3 97e47f884 -> 4c31aee9b


CLOUDSTACK-4793: UI > Virtual Routers > Select View > add "group by pod".


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

Branch: refs/heads/4.3
Commit: 4c31aee9b34f1c3a24cacfab9e1e1c3aa3cd85de
Parents: 97e47f8
Author: Jessica Wang 
Authored: Mon Nov 25 13:50:38 2013 -0800
Committer: Jessica Wang 
Committed: Mon Nov 25 13:50:47 2013 -0800

--
 ui/scripts/system.js | 221 +-
 1 file changed, 220 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4c31aee9/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 98b5454..f385794 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8850,7 +8850,226 @@
}
 }   
 }
-}   
+},  
+routerGroupByPod: {
+id: 'routerGroupByPod',
+type: 'select',
+title: 'group by pod',
+listView: {
+id: 'routerGroupByPod',
+label: 'label.virtual.appliances',
+fields: {
+name: {
+label: 'label.pod'
+},
+routerCount: {
+label: 'Total of Virtual Routers'
+},
+routerRequiresUpgrade: {
+label: 'Virtual Routers require upgrade',
+converter: function (args) {
+if (args > 0) {
+return 'Yes';
+} else {
+return 'No';
+}
+}
+}
+},
+
+dataProvider: function (args) {
+var array1 = [];
+if (args.filterBy != null) {
+if (args.filterBy.search != null && 
args.filterBy.search.by != null && args.filterBy.search.value != null) {
+switch (args.filterBy.search.by) {
+case "name":
+if 
(args.filterBy.search.value.length > 0)
+array1.push("&keyword=" + 
args.filterBy.search.value);
+break;
+}
+}
+}
+$.ajax({
+url: createURL("listPods&page=" + 
args.page + "&pagesize=" + pageSize + array1.join("")),
+dataType: "json",
+async: true,
+success: function (json) {
+var podObjs = 
json.listpodsresponse.pod;
+if (podObjs != null) {
+for (var i = 0; i < 
podObjs.length; i++) {
+$.ajax({
+url: 
createURL('listRouters'),
+data: {
+podid: podObjs[i].id
+},
+async: false,
+success: function (json) {
+if 
(json.listroutersresponse.count != undefined) {
+
podObjs[i].routerCount = json.listroutersresponse.count;
+
+var 
routerCountFromAllPages = podObjs[i].routerCount;
+var currentPage = 
1;
+  

git commit: updated refs/heads/master to 7d4b298

2013-11-25 Thread jessicawang
Updated Branches:
  refs/heads/master 7819a4b7a -> 7d4b298d2


CLOUDSTACK-4793: UI > Virtual Routers > Select View > add "group by cluster".


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

Branch: refs/heads/master
Commit: 7d4b298d2d8d019d341146e2a6f0c58cbce4ddc5
Parents: 7819a4b
Author: Jessica Wang 
Authored: Mon Nov 25 14:26:57 2013 -0800
Committer: Jessica Wang 
Committed: Mon Nov 25 14:27:50 2013 -0800

--
 ui/scripts/system.js | 221 +-
 1 file changed, 220 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7d4b298d/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index f385794..e7c535e 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -9069,7 +9069,226 @@
 }
 }
 }
-}
+},
+
+//???
+routerGroupByCluster: {
+id: 'routerGroupByCluster',
+type: 'select',
+title: 'group by cluster',
+listView: {
+id: 'routerGroupByCluster',
+label: 'label.virtual.appliances',
+fields: {
+name: {
+label: 'label.cluster'
+},
+routerCount: {
+label: 'Total of Virtual Routers'
+},
+routerRequiresUpgrade: {
+label: 'Virtual Routers require upgrade',
+converter: function (args) {
+if (args > 0) {
+return 'Yes';
+} else {
+return 'No';
+}
+}
+}
+},
+
+dataProvider: function (args) {
+var array1 = [];
+if (args.filterBy != null) {
+if (args.filterBy.search != null && 
args.filterBy.search.by != null && args.filterBy.search.value != null) {
+switch (args.filterBy.search.by) {
+case "name":
+if 
(args.filterBy.search.value.length > 0)
+array1.push("&keyword=" + 
args.filterBy.search.value);
+break;
+}
+}
+}
+$.ajax({
+url: createURL("listClusters&page=" + 
args.page + "&pagesize=" + pageSize + array1.join("")),
+dataType: "json",
+async: true,
+success: function (json) {
+var clusterObjs = 
json.listclustersresponse.cluster;
+if (clusterObjs != null) {
+for (var i = 0; i < 
clusterObjs.length; i++) {
+$.ajax({
+url: 
createURL('listRouters'),
+data: {
+clusterid: 
clusterObjs[i].id
+},
+async: false,
+success: function (json) {
+if 
(json.listroutersresponse.count != undefined) {
+
clusterObjs[i].routerCount = json.listroutersresponse.count;
+
+var 
routerCountFromAllPages = clusterObjs[i].routerCount;
+

git commit: updated refs/heads/4.3 to e8e1fd5

2013-11-25 Thread jessicawang
Updated Branches:
  refs/heads/4.3 4c31aee9b -> e8e1fd586


CLOUDSTACK-4793: UI > Virtual Routers > Select View > add "group by cluster".


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

Branch: refs/heads/4.3
Commit: e8e1fd5860a3cb2a8c273973dcce54541a6027b6
Parents: 4c31aee
Author: Jessica Wang 
Authored: Mon Nov 25 14:26:57 2013 -0800
Committer: Jessica Wang 
Committed: Mon Nov 25 14:26:57 2013 -0800

--
 ui/scripts/system.js | 221 +-
 1 file changed, 220 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8e1fd58/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index f385794..e7c535e 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -9069,7 +9069,226 @@
 }
 }
 }
-}
+},
+
+//???
+routerGroupByCluster: {
+id: 'routerGroupByCluster',
+type: 'select',
+title: 'group by cluster',
+listView: {
+id: 'routerGroupByCluster',
+label: 'label.virtual.appliances',
+fields: {
+name: {
+label: 'label.cluster'
+},
+routerCount: {
+label: 'Total of Virtual Routers'
+},
+routerRequiresUpgrade: {
+label: 'Virtual Routers require upgrade',
+converter: function (args) {
+if (args > 0) {
+return 'Yes';
+} else {
+return 'No';
+}
+}
+}
+},
+
+dataProvider: function (args) {
+var array1 = [];
+if (args.filterBy != null) {
+if (args.filterBy.search != null && 
args.filterBy.search.by != null && args.filterBy.search.value != null) {
+switch (args.filterBy.search.by) {
+case "name":
+if 
(args.filterBy.search.value.length > 0)
+array1.push("&keyword=" + 
args.filterBy.search.value);
+break;
+}
+}
+}
+$.ajax({
+url: createURL("listClusters&page=" + 
args.page + "&pagesize=" + pageSize + array1.join("")),
+dataType: "json",
+async: true,
+success: function (json) {
+var clusterObjs = 
json.listclustersresponse.cluster;
+if (clusterObjs != null) {
+for (var i = 0; i < 
clusterObjs.length; i++) {
+$.ajax({
+url: 
createURL('listRouters'),
+data: {
+clusterid: 
clusterObjs[i].id
+},
+async: false,
+success: function (json) {
+if 
(json.listroutersresponse.count != undefined) {
+
clusterObjs[i].routerCount = json.listroutersresponse.count;
+
+var 
routerCountFromAllPages = clusterObjs[i].routerCount;
+  

git commit: updated refs/heads/4.3 to cd5ecfb

2013-11-25 Thread jessicawang
Updated Branches:
  refs/heads/4.3 e8e1fd586 -> cd5ecfb76


CLOUDSTACK-4793: UI > Virtual Routers > Select View > group by cluster > 
detailView > add pod name, zone name.


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

Branch: refs/heads/4.3
Commit: cd5ecfb763b764986656280263a812d5d7b312d4
Parents: e8e1fd5
Author: Jessica Wang 
Authored: Mon Nov 25 14:32:16 2013 -0800
Committer: Jessica Wang 
Committed: Mon Nov 25 14:32:16 2013 -0800

--
 ui/scripts/system.js | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd5ecfb7/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index e7c535e..f0e4cfd 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -9070,8 +9070,6 @@
 }
 }
 },
-
-//???
 routerGroupByCluster: {
 id: 'routerGroupByCluster',
 type: 'select',
@@ -9229,6 +9227,12 @@
 return 'No';
 }
 }
+},
+podname: {
+   label: 'label.pod'
+},
+zonename: {
+   label: 'zone'
 }
 }],
 dataProvider: function (args) {
@@ -9287,8 +9291,7 @@
 }
 }
 }
-}
-//???
+}
 }
 },
 systemVms: {



git commit: updated refs/heads/master to 3d5ff39

2013-11-25 Thread jessicawang
Updated Branches:
  refs/heads/master 7d4b298d2 -> 3d5ff393d


CLOUDSTACK-4793: UI > Virtual Routers > Select View > group by cluster > 
detailView > add pod name, zone name.


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

Branch: refs/heads/master
Commit: 3d5ff393da6bb070aa28680c35210215615c5ea6
Parents: 7d4b298
Author: Jessica Wang 
Authored: Mon Nov 25 14:32:16 2013 -0800
Committer: Jessica Wang 
Committed: Mon Nov 25 14:33:04 2013 -0800

--
 ui/scripts/system.js | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3d5ff393/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index e7c535e..f0e4cfd 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -9070,8 +9070,6 @@
 }
 }
 },
-
-//???
 routerGroupByCluster: {
 id: 'routerGroupByCluster',
 type: 'select',
@@ -9229,6 +9227,12 @@
 return 'No';
 }
 }
+},
+podname: {
+   label: 'label.pod'
+},
+zonename: {
+   label: 'zone'
 }
 }],
 dataProvider: function (args) {
@@ -9287,8 +9291,7 @@
 }
 }
 }
-}
-//???
+}
 }
 },
 systemVms: {



git commit: updated refs/heads/4.3 to 437f49c

2013-11-25 Thread jessicawang
Updated Branches:
  refs/heads/4.3 cd5ecfb76 -> 437f49cf8


CLOUDSTACK-4793: UI > Virtual Routers > remove Advanced Search since we now 
have Select View (group by zone/pod/cluster).


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

Branch: refs/heads/4.3
Commit: 437f49cf8f8b93a0ba8a0c28868ead2919151602
Parents: cd5ecfb
Author: Jessica Wang 
Authored: Mon Nov 25 14:47:01 2013 -0800
Committer: Jessica Wang 
Committed: Mon Nov 25 14:47:01 2013 -0800

--
 ui/scripts/system.js | 463 +-
 1 file changed, 1 insertion(+), 462 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/437f49cf/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index f0e4cfd..8f1572a 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7394,342 +7394,7 @@
 var listView = $.extend(true, {}, 
cloudStack.sections.system.subsections.virtualRouters, {
   
 sections: {
 virtualRouterNoGrouping: {
-listView: {
-actions: {
-
upgradeRouterToUseNewerTemplate: {
-isHeader: true,
-
-label: 'Upgrade Router to 
Use Newer Template',
-
-messages: {
-notification: function 
(args) {
-return 'Upgrade 
Router to Use Newer Template';
-}
-},
-
-createForm: {
-title: 'Upgrade Router 
to Use Newer Template',
-fields: {
-zoneid: {
-label: 
'label.zone',
-select: 
function (args) {
-var items 
= [{
-id: '',
-
description: ''
-}];
-$.ajax({
-url: 
createURL('listZones'),
-data: {
-
listAll: true
-},
-
success: function (json) {
-
var objs = json.listzonesresponse.zone;
-if 
(objs != null) {
-   
 for (var i = 0; i < objs.length; i++) {
-   
 items.push({
-   
 id: objs[i].id,
-   
 description: objs[i].name
-   
 });
-   
 }
-}
-
args.response.success({
-   
 data: items
-});
-}
-});
-   

git commit: updated refs/heads/master to c15ec68

2013-11-25 Thread jessicawang
Updated Branches:
  refs/heads/master 3d5ff393d -> c15ec6821


CLOUDSTACK-4793: UI > Virtual Routers > remove Advanced Search since we now 
have Select View (group by zone/pod/cluster).


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

Branch: refs/heads/master
Commit: c15ec68210f5fed9c05e357dea619240dacdad6c
Parents: 3d5ff39
Author: Jessica Wang 
Authored: Mon Nov 25 14:47:01 2013 -0800
Committer: Jessica Wang 
Committed: Mon Nov 25 14:47:39 2013 -0800

--
 ui/scripts/system.js | 463 +-
 1 file changed, 1 insertion(+), 462 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c15ec682/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index f0e4cfd..8f1572a 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7394,342 +7394,7 @@
 var listView = $.extend(true, {}, 
cloudStack.sections.system.subsections.virtualRouters, {
   
 sections: {
 virtualRouterNoGrouping: {
-listView: {
-actions: {
-
upgradeRouterToUseNewerTemplate: {
-isHeader: true,
-
-label: 'Upgrade Router to 
Use Newer Template',
-
-messages: {
-notification: function 
(args) {
-return 'Upgrade 
Router to Use Newer Template';
-}
-},
-
-createForm: {
-title: 'Upgrade Router 
to Use Newer Template',
-fields: {
-zoneid: {
-label: 
'label.zone',
-select: 
function (args) {
-var items 
= [{
-id: '',
-
description: ''
-}];
-$.ajax({
-url: 
createURL('listZones'),
-data: {
-
listAll: true
-},
-
success: function (json) {
-
var objs = json.listzonesresponse.zone;
-if 
(objs != null) {
-   
 for (var i = 0; i < objs.length; i++) {
-   
 items.push({
-   
 id: objs[i].id,
-   
 description: objs[i].name
-   
 });
-   
 }
-}
-
args.response.success({
-   
 data: items
-});
-}
-});
- 

[2/2] git commit: updated refs/heads/4.3 to abb95c1

2013-11-25 Thread alena1108
ListPortFowardingRules: added networkId to the list of optional parameters to 
list by


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

Branch: refs/heads/4.3
Commit: f5c29c0f1a182e646949a942e93cb0123f109592
Parents: 437f49c
Author: Alena Prokharchyk 
Authored: Mon Nov 11 10:11:13 2013 -0800
Committer: Alena Prokharchyk 
Committed: Mon Nov 25 15:30:55 2013 -0800

--
 .../user/firewall/ListPortForwardingRulesCmd.java   |  9 +
 .../cloudstack/api/response/FirewallRuleResponse.java   |  7 +++
 server/src/com/cloud/api/ApiResponseHelper.java |  3 +++
 .../src/com/cloud/network/rules/RulesManagerImpl.java   | 12 +---
 4 files changed, 28 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5c29c0f/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java
 
b/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java
index 9fd4e45..7e96e0b 100644
--- 
a/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java
@@ -26,6 +26,7 @@ import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.response.FirewallRuleResponse;
 import org.apache.cloudstack.api.response.IPAddressResponse;
 import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.NetworkResponse;
 import org.apache.log4j.Logger;
 
 import com.cloud.network.rules.PortForwardingRule;
@@ -48,6 +49,10 @@ public class ListPortForwardingRulesCmd extends 
BaseListTaggedResourcesCmd {
 @Parameter(name=ApiConstants.IP_ADDRESS_ID, type=CommandType.UUID, 
entityType = IPAddressResponse.class,
 description="the id of IP address of the port forwarding services")
 private Long ipAddressId;
+
+@Parameter(name=ApiConstants.NETWORK_ID, type=CommandType.UUID, entityType 
= NetworkResponse.class,
+description="list port forwarding rules for ceratin network", 
since="4.3")
+private Long networkId;
 
 /
 /// Accessors ///
@@ -60,6 +65,10 @@ public class ListPortForwardingRulesCmd extends 
BaseListTaggedResourcesCmd {
 public Long getId() {
 return id;
 }
+
+public Long getNetworkId() {
+return networkId;
+}
 
 /
 /// API Implementation///

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5c29c0f/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java 
b/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java
index 787410a..20ea407 100644
--- a/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java
@@ -73,6 +73,9 @@ public class FirewallRuleResponse extends BaseResponse {
 
 @SerializedName(ApiConstants.VM_GUEST_IP) @Param(description="the vm ip 
address for the port forwarding rule")
 private String destNatVmIp;
+
+@SerializedName(ApiConstants.NETWORK_ID) @Param(description="the id of the 
guest network the port forwarding rule belongs to")
+private String networkId;
 
 
 public String getDestNatVmIp() {
@@ -196,4 +199,8 @@ public class FirewallRuleResponse extends BaseResponse {
 public void setTags(List tags) {
 this.tags = tags;
 }
+
+public void setNetworkId(String networkId) {
+this.networkId = networkId;
+}
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5c29c0f/server/src/com/cloud/api/ApiResponseHelper.java
--
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java 
b/server/src/com/cloud/api/ApiResponseHelper.java
index 409448d..b74ebf1 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -1024,6 +1024,9 @@ public class ApiResponseHelper implements 
ResponseGenerator {
 response.setPublicEndPort(Integer.toString(fwRule.getSourcePortEnd()));
 List cidrs = 
ApiDBUtils.findFirewallSourc

[1/2] git commit: updated refs/heads/4.3 to abb95c1

2013-11-25 Thread alena1108
Updated Branches:
  refs/heads/4.3 437f49cf8 -> abb95c101


Resource metadata - fixed the bug in removeResourceDetail API - when "key" 
parameter was passed in, used to remove the details matching the key, for all 
the resources, not just the one defined by resource_id


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

Branch: refs/heads/4.3
Commit: abb95c10166dcbc3f842b91a972e3ebb5570ebbc
Parents: f5c29c0
Author: Alena Prokharchyk 
Authored: Mon Nov 25 14:36:02 2013 -0800
Committer: Alena Prokharchyk 
Committed: Mon Nov 25 15:30:55 2013 -0800

--
 .../resourcedetail/ResourceDetailsDaoBase.java  | 26 
 1 file changed, 10 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/abb95c10/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
--
diff --git 
a/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
 
b/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
index 4ecebf8..2d08644 100644
--- 
a/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
+++ 
b/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
@@ -27,10 +27,9 @@ import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.TransactionLegacy;
 
-
-public abstract class ResourceDetailsDaoBase extends 
GenericDaoBase{
+public abstract class ResourceDetailsDaoBase extends 
GenericDaoBase {
 private SearchBuilder AllFieldsSearch;
-
+
 public ResourceDetailsDaoBase() {
 AllFieldsSearch = createSearchBuilder();
 AllFieldsSearch.and("resourceId", 
AllFieldsSearch.entity().getResourceId(), SearchCriteria.Op.EQ);
@@ -43,15 +42,14 @@ public abstract class ResourceDetailsDaoBase extends G
 SearchCriteria sc = AllFieldsSearch.create();
 sc.setParameters("resourceId", resourceId);
 sc.setParameters("name", name);
-
+
 return findOneBy(sc);
 }
 
-
 public Map listDetailsKeyPairs(long resourceId) {
 SearchCriteria sc = AllFieldsSearch.create();
 sc.setParameters("resourceId", resourceId);
-
+
 List results = search(sc, null);
 Map details = new HashMap(results.size());
 for (R result : results) {
@@ -68,23 +66,21 @@ public abstract class ResourceDetailsDaoBase extends G
 return results;
 }
 
-
 public void removeDetails(long resourceId) {
 SearchCriteria sc = AllFieldsSearch.create();
 sc.setParameters("resourceId", resourceId);
 remove(sc);
 }
 
-
 public void removeDetail(long resourceId, String key) {
-if (key != null){
+if (key != null) {
 SearchCriteria sc = AllFieldsSearch.create();
+sc.setParameters("resourceId", resourceId);
 sc.setParameters("name", key);
 remove(sc);
 }
 }
 
-
 public void saveDetails(List details) {
 if (details.isEmpty()) {
 return;
@@ -94,14 +90,13 @@ public abstract class ResourceDetailsDaoBase extends G
 SearchCriteria sc = AllFieldsSearch.create();
 sc.setParameters("resourceId", details.get(0).getResourceId());
 expunge(sc);
-
+
 for (R detail : details) {
 persist(detail);
 }
-
+
 txn.commit();
 }
-
 
 protected void addDetail(R detail) {
 if (detail == null) {
@@ -113,12 +108,12 @@ public abstract class ResourceDetailsDaoBase extends G
 }
 persist(detail);
 }
-
+
 public Map listDetailsKeyPairs(long resourceId, boolean 
forDisplay) {
 SearchCriteria sc = AllFieldsSearch.create();
 sc.setParameters("resourceId", resourceId);
 sc.setParameters("display", forDisplay);
-
+
 List results = search(sc, null);
 Map details = new HashMap(results.size());
 for (R result : results) {
@@ -126,7 +121,6 @@ public abstract class ResourceDetailsDaoBase extends G
 }
 return details;
 }
-
 
 public List listDetails(long resourceId, boolean forDisplay) {
 SearchCriteria sc = AllFieldsSearch.create();



git commit: updated refs/heads/master to c37e8b7

2013-11-25 Thread alena1108
Updated Branches:
  refs/heads/master c15ec6821 -> c37e8b7e8


Resource metadata - fixed the bug in removeResourceDetail API - when "key" 
parameter was passed in, used to remove the details matching the key, for all 
the resources, not just the one defined by resource_id


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

Branch: refs/heads/master
Commit: c37e8b7e8ca8408dc3b1b05f42fe03b0e7ab7260
Parents: c15ec68
Author: Alena Prokharchyk 
Authored: Mon Nov 25 14:36:02 2013 -0800
Committer: Alena Prokharchyk 
Committed: Mon Nov 25 15:32:52 2013 -0800

--
 .../apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java| 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c37e8b7e/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
--
diff --git 
a/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
 
b/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
index 5a94a15..2d08644 100644
--- 
a/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
+++ 
b/engine/schema/src/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java
@@ -75,6 +75,7 @@ public abstract class ResourceDetailsDaoBase extends G
 public void removeDetail(long resourceId, String key) {
 if (key != null) {
 SearchCriteria sc = AllFieldsSearch.create();
+sc.setParameters("resourceId", resourceId);
 sc.setParameters("name", key);
 remove(sc);
 }



git commit: updated refs/heads/master to 9dd650a

2013-11-25 Thread bfederle
Updated Branches:
  refs/heads/master c37e8b7e8 -> 9dd650aca


Disable VR UI quickview, due to technical limitations


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

Branch: refs/heads/master
Commit: 9dd650aca753dc41995ce1ef209371d275bc598b
Parents: c37e8b7
Author: Brian Federle 
Authored: Mon Nov 25 16:03:13 2013 -0800
Committer: Brian Federle 
Committed: Mon Nov 25 16:03:37 2013 -0800

--
 ui/scripts/system.js | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd650ac/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 8f1572a..b9a27be 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7636,6 +7636,7 @@
 });
 },
 detailView: {
+noCompact: true,
 name: 'Virtual applicance details',
 actions: {
 start: {
@@ -8276,7 +8277,8 @@
 });
 }, 
  
 detailView: {
-   name: 'Virtual Routers group by zone',  

+noCompact: true,
+ name: 'Virtual Routers group by zone',

actions: {  
upgradeRouterToUseNewerTemplate: {
 label: 'Upgrade Router to Use Newer 
Template',
@@ -8492,6 +8494,7 @@
 });
 },
 detailView: {
+noCompact: true,
 name: 'Virtual Routers group by pod',
 actions: {
 upgradeRouterToUseNewerTemplate: {
@@ -8711,6 +8714,7 @@
 });
 },
 detailView: {
+noCompact: true,
 name: 'Virtual Routers group by cluster',
 actions: {
 upgradeRouterToUseNewerTemplate: {



git commit: updated refs/heads/4.3 to d13c343

2013-11-25 Thread anthonyxu
Updated Branches:
  refs/heads/4.3 abb95c101 -> d13c343cb


CLOUDSTACK-4913: Don't enable ebtables/iptables for non-security group zone


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

Branch: refs/heads/4.3
Commit: d13c343cbc2eeca4140ea3f0304d4afaf23530e0
Parents: abb95c1
Author: Anthony Xu 
Authored: Mon Nov 25 16:06:00 2013 -0800
Committer: Anthony Xu 
Committed: Mon Nov 25 16:06:00 2013 -0800

--
 .../hypervisor/xen/discoverer/XcpServerDiscoverer.java   | 11 +++
 .../hypervisor/xen/resource/CitrixResourceBase.java  |  1 -
 2 files changed, 11 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d13c343c/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
--
diff --git 
a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
 
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
index 688488d..1333af3 100755
--- 
a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
+++ 
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
@@ -745,6 +745,17 @@ public class XcpServerDiscoverer extends DiscovererBase 
implements Discoverer, L
 }
 
 @Override
+protected HashMap buildConfigParams(HostVO host){
+HashMap params = super.buildConfigParams(host);
+DataCenterVO zone = _dcDao.findById(host.getDataCenterId());
+if ( zone != null ) {
+boolean securityGroupEnabled = zone.isSecurityGroupEnabled();
+params.put("securitygroupenabled", 
Boolean.toString(securityGroupEnabled));
+}
+return params;
+}
+
+@Override
 public boolean stop() {

_resourceMgr.unregisterResourceStateAdapter(this.getClass().getSimpleName());
 return super.stop();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d13c343c/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
--
diff --git 
a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
 
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index aadfc17..f6df605 100644
--- 
a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ 
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -6007,7 +6007,6 @@ public abstract class CitrixResourceBase implements 
ServerResource, HypervisorRe
 details.put("private.network.device", _privateNetworkName);
 }
 
-details.put("can_bridge_firewall", 
Boolean.toString(_canBridgeFirewall));
 cmd.setHostDetails(details);
 cmd.setName(hr.nameLabel);
 cmd.setGuid(_host.uuid);



git commit: updated refs/heads/4.3 to 807fad6

2013-11-25 Thread bfederle
Updated Branches:
  refs/heads/4.3 d13c343cb -> 807fad663


Disable VR UI quickview, due to technical limitations


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

Branch: refs/heads/4.3
Commit: 807fad6634ab616dcd27e51526e564f27e1668a7
Parents: d13c343
Author: Brian Federle 
Authored: Mon Nov 25 16:03:13 2013 -0800
Committer: Brian Federle 
Committed: Mon Nov 25 16:07:09 2013 -0800

--
 ui/scripts/system.js | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/807fad66/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 8f1572a..b9a27be 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7636,6 +7636,7 @@
 });
 },
 detailView: {
+noCompact: true,
 name: 'Virtual applicance details',
 actions: {
 start: {
@@ -8276,7 +8277,8 @@
 });
 }, 
  
 detailView: {
-   name: 'Virtual Routers group by zone',  

+noCompact: true,
+ name: 'Virtual Routers group by zone',

actions: {  
upgradeRouterToUseNewerTemplate: {
 label: 'Upgrade Router to Use Newer 
Template',
@@ -8492,6 +8494,7 @@
 });
 },
 detailView: {
+noCompact: true,
 name: 'Virtual Routers group by pod',
 actions: {
 upgradeRouterToUseNewerTemplate: {
@@ -8711,6 +8714,7 @@
 });
 },
 detailView: {
+noCompact: true,
 name: 'Virtual Routers group by cluster',
 actions: {
 upgradeRouterToUseNewerTemplate: {



git commit: updated refs/heads/master to 84be2ab

2013-11-25 Thread anthonyxu
Updated Branches:
  refs/heads/master 9dd650aca -> 84be2ab3b


CLOUDSTACK-4913: Don't enable ebtables/iptables for non-security group zone


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

Branch: refs/heads/master
Commit: 84be2ab3be8c6496dae7b24bc1fc1a581ec74ae1
Parents: 9dd650a
Author: Anthony Xu 
Authored: Mon Nov 25 16:06:00 2013 -0800
Committer: Anthony Xu 
Committed: Mon Nov 25 16:06:48 2013 -0800

--
 .../hypervisor/xen/discoverer/XcpServerDiscoverer.java   | 11 +++
 .../hypervisor/xen/resource/CitrixResourceBase.java  |  1 -
 2 files changed, 11 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/84be2ab3/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
--
diff --git 
a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
 
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
index 8ca515f..6dfc0d4 100755
--- 
a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
+++ 
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
@@ -749,6 +749,17 @@ public class XcpServerDiscoverer extends DiscovererBase 
implements Discoverer, L
 }
 
 @Override
+protected HashMap buildConfigParams(HostVO host){
+HashMap params = super.buildConfigParams(host);
+DataCenterVO zone = _dcDao.findById(host.getDataCenterId());
+if ( zone != null ) {
+boolean securityGroupEnabled = zone.isSecurityGroupEnabled();
+params.put("securitygroupenabled", 
Boolean.toString(securityGroupEnabled));
+}
+return params;
+}
+
+@Override
 public boolean stop() {
 
_resourceMgr.unregisterResourceStateAdapter(this.getClass().getSimpleName());
 return super.stop();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/84be2ab3/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
--
diff --git 
a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
 
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index 2cc0ec0..a8ab691 100644
--- 
a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ 
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -5987,7 +5987,6 @@ public abstract class CitrixResourceBase implements 
ServerResource, HypervisorRe
 details.put("private.network.device", _privateNetworkName);
 }
 
-details.put("can_bridge_firewall", 
Boolean.toString(_canBridgeFirewall));
 cmd.setHostDetails(details);
 cmd.setName(hr.nameLabel);
 cmd.setGuid(_host.uuid);



git commit: updated refs/heads/master to e559573

2013-11-25 Thread bfederle
Updated Branches:
  refs/heads/master 84be2ab3b -> e55957308


Revert "Disable VR UI quickview, due to technical limitations"

This reverts commit 9dd650aca753dc41995ce1ef209371d275bc598b.


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

Branch: refs/heads/master
Commit: e5595730817c16de581f6775e118456881b41adf
Parents: 84be2ab
Author: Brian Federle 
Authored: Mon Nov 25 16:16:06 2013 -0800
Committer: Brian Federle 
Committed: Mon Nov 25 16:16:19 2013 -0800

--
 ui/scripts/system.js | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e5595730/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index b9a27be..8f1572a 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7636,7 +7636,6 @@
 });
 },
 detailView: {
-noCompact: true,
 name: 'Virtual applicance details',
 actions: {
 start: {
@@ -8277,8 +8276,7 @@
 });
 }, 
  
 detailView: {
-noCompact: true,
- name: 'Virtual Routers group by zone',

+   name: 'Virtual Routers group by zone',  

actions: {  
upgradeRouterToUseNewerTemplate: {
 label: 'Upgrade Router to Use Newer 
Template',
@@ -8494,7 +8492,6 @@
 });
 },
 detailView: {
-noCompact: true,
 name: 'Virtual Routers group by pod',
 actions: {
 upgradeRouterToUseNewerTemplate: {
@@ -8714,7 +8711,6 @@
 });
 },
 detailView: {
-noCompact: true,
 name: 'Virtual Routers group by cluster',
 actions: {
 upgradeRouterToUseNewerTemplate: {



git commit: updated refs/heads/4.3 to 483f304

2013-11-25 Thread bfederle
Updated Branches:
  refs/heads/4.3 807fad663 -> 483f304ef


Revert "Disable VR UI quickview, due to technical limitations"

This reverts commit 807fad6634ab616dcd27e51526e564f27e1668a7.


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

Branch: refs/heads/4.3
Commit: 483f304efdf929efcdc282de3366380cec1d9dca
Parents: 807fad6
Author: Brian Federle 
Authored: Mon Nov 25 16:15:50 2013 -0800
Committer: Brian Federle 
Committed: Mon Nov 25 16:15:50 2013 -0800

--
 ui/scripts/system.js | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/483f304e/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index b9a27be..8f1572a 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7636,7 +7636,6 @@
 });
 },
 detailView: {
-noCompact: true,
 name: 'Virtual applicance details',
 actions: {
 start: {
@@ -8277,8 +8276,7 @@
 });
 }, 
  
 detailView: {
-noCompact: true,
- name: 'Virtual Routers group by zone',

+   name: 'Virtual Routers group by zone',  

actions: {  
upgradeRouterToUseNewerTemplate: {
 label: 'Upgrade Router to Use Newer 
Template',
@@ -8494,7 +8492,6 @@
 });
 },
 detailView: {
-noCompact: true,
 name: 'Virtual Routers group by pod',
 actions: {
 upgradeRouterToUseNewerTemplate: {
@@ -8714,7 +8711,6 @@
 });
 },
 detailView: {
-noCompact: true,
 name: 'Virtual Routers group by cluster',
 actions: {
 upgradeRouterToUseNewerTemplate: {



[1/2] git commit: updated refs/heads/rbac to cf69731

2013-11-25 Thread prachidamle
Updated Branches:
  refs/heads/rbac 015d06e7f -> cf69731a5


Loading api permissions from commands.properties during startup


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

Branch: refs/heads/rbac
Commit: f231cec5b7a5f75d4b74cc04a98db1462f97f548
Parents: 015d06e
Author: Prachi Damle 
Authored: Mon Nov 25 10:58:45 2013 -0800
Committer: Prachi Damle 
Committed: Mon Nov 25 10:59:12 2013 -0800

--
 .../apache/cloudstack/acl/PermissionScope.java  |  2 +-
 .../apache/cloudstack/acl/AclPermissionVO.java  | 10 +++-
 .../cloudstack/acl/dao/AclPermissionDao.java| 24 +
 .../acl/dao/AclPermissionDaoImpl.java   | 41 ++
 .../acl/dao/AclPolicyPermissionMapDao.java  | 25 +
 .../acl/dao/AclPolicyPermissionMapDaoImpl.java  | 43 +++
 server/src/com/cloud/api/ApiServer.java | 57 
 7 files changed, 200 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f231cec5/api/src/org/apache/cloudstack/acl/PermissionScope.java
--
diff --git a/api/src/org/apache/cloudstack/acl/PermissionScope.java 
b/api/src/org/apache/cloudstack/acl/PermissionScope.java
index a895535..03dbc10 100644
--- a/api/src/org/apache/cloudstack/acl/PermissionScope.java
+++ b/api/src/org/apache/cloudstack/acl/PermissionScope.java
@@ -4,7 +4,7 @@ public enum PermissionScope {
 RESOURCE(0),
 ACCOUNT(1),
 DOMAIN(2),
-REGION(3);
+ REGION(3), ALL(4);
 
 private int _scale;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f231cec5/engine/schema/src/org/apache/cloudstack/acl/AclPermissionVO.java
--
diff --git a/engine/schema/src/org/apache/cloudstack/acl/AclPermissionVO.java 
b/engine/schema/src/org/apache/cloudstack/acl/AclPermissionVO.java
index 1bcecab..ef8cfc4 100644
--- a/engine/schema/src/org/apache/cloudstack/acl/AclPermissionVO.java
+++ b/engine/schema/src/org/apache/cloudstack/acl/AclPermissionVO.java
@@ -71,7 +71,15 @@ public class AclPermissionVO implements AclPermission {
 
 }
 
-
+public AclPermissionVO(String action, String entityType, AccessType 
accessType, PermissionScope scope,
+Long scopeId, Permission permission) {
+this.action = action;
+this.entityType = entityType;
+this.accessType = accessType;
+this.scope = scope;
+this.scopeId = scopeId;
+this.permission = permission;
+}
 
 @Override
 public long getId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f231cec5/engine/schema/src/org/apache/cloudstack/acl/dao/AclPermissionDao.java
--
diff --git 
a/engine/schema/src/org/apache/cloudstack/acl/dao/AclPermissionDao.java 
b/engine/schema/src/org/apache/cloudstack/acl/dao/AclPermissionDao.java
new file mode 100644
index 000..d24b044
--- /dev/null
+++ b/engine/schema/src/org/apache/cloudstack/acl/dao/AclPermissionDao.java
@@ -0,0 +1,24 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.acl.dao;
+
+import org.apache.cloudstack.acl.AclPermissionVO;
+import com.cloud.utils.db.GenericDao;
+
+public interface AclPermissionDao extends GenericDao {
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f231cec5/engine/schema/src/org/apache/cloudstack/acl/dao/AclPermissionDaoImpl.java
--
diff --git 
a/engine/schema/src/org/apache/cloudstack/acl/dao/AclPermissionDaoImpl.java 
b/engine/schema/src/org/apache/cloudstack/acl/dao/AclPermissionDaoImpl.java
new file mode 100644
index 000..1b5f63e
--- /dev/null
+++ b/engine/schema/src/org/apache/cloudstack/acl/dao/AclPermissionDaoImpl.java
@@ -0,0 +1,41 @@
+/

[2/2] git commit: updated refs/heads/rbac to cf69731

2013-11-25 Thread prachidamle
Suring startup load the API permissions from commands.properties and 
@APICommand annotations


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

Branch: refs/heads/rbac
Commit: cf69731a5229e0037ef69b59368c2db6417c9896
Parents: f231cec
Author: Prachi Damle 
Authored: Mon Nov 25 17:01:56 2013 -0800
Committer: Prachi Damle 
Committed: Mon Nov 25 17:01:56 2013 -0800

--
 .../apache/cloudstack/acl/AclPermission.java|  41 -
 .../cloudstack/acl/AclPolicyPermission.java |  43 +
 .../api/response/AclPermissionResponse.java |   8 +-
 .../spring-engine-schema-core-daos-context.xml  |   3 +-
 .../apache/cloudstack/acl/AclPermissionVO.java  | 153 
 .../cloudstack/acl/AclPolicyPermissionVO.java   | 163 +
 .../cloudstack/acl/dao/AclPermissionDao.java|  24 ---
 .../acl/dao/AclPermissionDaoImpl.java   |  41 -
 .../acl/dao/AclPolicyPermissionDao.java |  26 +++
 .../acl/dao/AclPolicyPermissionDaoImpl.java |  43 +
 server/src/com/cloud/api/ApiServer.java | 176 ++-
 .../com/cloud/api/query/vo/AclPolicyJoinVO.java |   6 +-
 setup/db/db/schema-421to430.sql |  43 ++---
 13 files changed, 428 insertions(+), 342 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cf69731a/api/src/org/apache/cloudstack/acl/AclPermission.java
--
diff --git a/api/src/org/apache/cloudstack/acl/AclPermission.java 
b/api/src/org/apache/cloudstack/acl/AclPermission.java
deleted file mode 100644
index aff1503..000
--- a/api/src/org/apache/cloudstack/acl/AclPermission.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package org.apache.cloudstack.acl;
-
-import org.apache.cloudstack.acl.SecurityChecker.AccessType;
-import org.apache.cloudstack.api.InternalIdentity;
-
-public interface AclPermission extends InternalIdentity {
-
-String getAction();
-
-String getEntityType();
-
-AccessType getAccessType();
-
-PermissionScope getScope();
-
-Long getScopeId();
-
-Permission getPermission();
-
-public enum Permission {
-Allow,
-Deny
-}
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cf69731a/api/src/org/apache/cloudstack/acl/AclPolicyPermission.java
--
diff --git a/api/src/org/apache/cloudstack/acl/AclPolicyPermission.java 
b/api/src/org/apache/cloudstack/acl/AclPolicyPermission.java
new file mode 100644
index 000..02d557e
--- /dev/null
+++ b/api/src/org/apache/cloudstack/acl/AclPolicyPermission.java
@@ -0,0 +1,43 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.acl;
+
+import org.apache.cloudstack.acl.SecurityChecker.AccessType;
+import org.apache.cloudstack.api.InternalIdentity;
+
+public interface AclPolicyPermission extends InternalIdentity {
+
+String getAction();
+
+long getAclPolicyId();
+
+String getEntityType();
+
+AccessType getAccessType();
+
+PermissionS

git commit: edit changes

2013-11-25 Thread radhika
Updated Branches:
  refs/heads/4.2 cfbe1a0d2 -> 88401d54f


edit changes


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

Branch: refs/heads/4.2
Commit: 88401d54f7e9c7d1159cf0245d9c0022407ceab8
Parents: cfbe1a0
Author: Radhika PC 
Authored: Tue Nov 26 10:01:36 2013 +0530
Committer: Radhika PC 
Committed: Tue Nov 26 10:01:36 2013 +0530

--
 release-notes/en-US/Release_Notes.xml | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/88401d54/release-notes/en-US/Release_Notes.xml
--
diff --git a/release-notes/en-US/Release_Notes.xml 
b/release-notes/en-US/Release_Notes.xml
index c3298cf..5114247 100644
--- a/release-notes/en-US/Release_Notes.xml
+++ b/release-notes/en-US/Release_Notes.xml
@@ -3194,8 +3194,8 @@ Done restarting router(s).
   In the following commands, it is assumed that you have set the 
root password on the
 database, which is a CloudStack recommended best practice. 
Substitute your own MySQL
 root password.
-  # mysqldump -u 
root -pmysql_password cloud > 
cloud-backup.dmp
-# mysqldump -u 
root -pmysql_password cloud_usage > 
cloud-usage-backup.dmp
+  # mysqldump -u 
root -pmysql_password cloud > 
cloud-backup.dmp
+# mysqldump -u 
root -pmysql_password cloud_usage > 
cloud-usage-backup.dmp
 
 
   Either build RPM/DEB packages as detailed in the Installation 
Guide, or use one of
@@ -3840,8 +3840,8 @@ service cloudstack-agent start
   In the following commands, it is assumed that you have set the 
root password on the
 database, which is a CloudStack recommended best practice. 
Substitute your own MySQL
 root password.
-  # mysqldump -u 
root -pmysql_password cloud > 
cloud-backup.dmp
-# mysqldump -u 
root -pmysql_password cloud_usage > 
cloud-usage-backup.dmp
+  # mysqldump -u 
root -pmysql_password cloud > 
cloud-backup.dmp
+# mysqldump -u 
root -pmysql_password cloud_usage > 
cloud-usage-backup.dmp
 
 
 
@@ -4212,7 +4212,7 @@ service cloudstack-agent start
   # ssh -i 
private-key-path 
link-local-ip -p 3922
 # cat /etc/cloudstack-release
   The output should be like the following:
-  Cloudstack Release 4.0.0-incubating Mon Oct 9 
15:10:04 PST 2012
+  Cloudstack Release 4.2.1 Mon Dec 9 15:10:04 PST 
2013
   
 ESXi
 SSH in using the private IP address of the system VM. For 
example, in the command



git commit: updated refs/heads/4.3 to 8a29b70

2013-11-25 Thread jayapal
Updated Branches:
  refs/heads/4.3 483f304ef -> 8a29b7000


Monitoring python script organized into more methods


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

Branch: refs/heads/4.3
Commit: 8a29b7000c01d0516824d33074d1c42f64c78b9e
Parents: 483f304
Author: Jayapal 
Authored: Tue Nov 26 09:49:22 2013 +0530
Committer: Jayapal 
Committed: Tue Nov 26 09:49:22 2013 +0530

--
 .../debian/config/root/monitorServices.py   | 159 ++-
 1 file changed, 81 insertions(+), 78 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8a29b700/systemvm/patches/debian/config/root/monitorServices.py
--
diff --git a/systemvm/patches/debian/config/root/monitorServices.py 
b/systemvm/patches/debian/config/root/monitorServices.py
index 4e1b7e0..3646c81 100755
--- a/systemvm/patches/debian/config/root/monitorServices.py
+++ b/systemvm/patches/debian/config/root/monitorServices.py
@@ -135,6 +135,49 @@ def isPidMatchPidFile(pidfile, pids):
 fd.close()
 return StatusCodes.FAILED
 
+def checkProcessRunningStatus(process_name, pidFile):
+printd("checking the process " + process_name)
+cmd = ''
+pids = []
+cmd = 'pidof ' + process_name
+printd(cmd)
+
+#cmd = 'service ' + process_name + ' status'
+pout = Popen(cmd, shell=True, stdout=PIPE)
+exitStatus = pout.wait()
+temp_out = pout.communicate()[0]
+
+#check there is only one pid or not
+if exitStatus == 0:
+pids = temp_out.split(' ')
+printd("pid(s) of process %s are %s " %(process_name, pids))
+
+#there is more than one process so match the pid file
+#if not matched set pidFileMatched=False
+printd("Checking pid file")
+if isPidMatchPidFile(pidFile, pids) == StatusCodes.SUCCESS:
+return True,pids;
+
+printd("pid of exit status %s" %exitStatus)
+
+return False,pids;
+
+def restartService(service_name):
+
+cmd = 'service ' + service_name + ' restart'
+cout = Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT)
+return_val = cout.wait()
+
+if return_val == 0:
+printd("The service " + service_name +" recovered successfully ")
+msg="The process " +service_name+" is recovered successfully "
+raisealert(Log.INFO,msg,service_name)
+return True
+else:
+printd("process restart failed ")
+
+return False
+
 
 
 def checkProcessStatus( process ):
@@ -152,56 +195,28 @@ def checkProcessStatus( process ):
 if process_name is None:
 printd ("\n Invalid Process Name")
 return StatusCodes.INVALID_INP
-else:
-printd("checking the process " + process_name)
-cmd = 'pidof ' + process_name
-printd(cmd)
-#cmd = 'service ' + process_name + ' status'
-pout = Popen(cmd, shell=True, stdout=PIPE)
-exitStatus = pout.wait()
-temp_out = pout.communicate()[0]
-
-#check there is only one pid or not
-if exitStatus == 0:
-pids = temp_out.split(' ')
-msg="pids: " +temp_out;
-printd(msg)
 
-#there is more than one process so match the pid file
-#if not matched set pidFileMatched=False
-printd("Checking pid file")
-if isPidMatchPidFile(pidfile, pids) == StatusCodes.SUCCESS:
-pidFileMatched = True;
-else:
-pidFileMatched = False;
+status, pids = checkProcessRunningStatus(process_name, pidfile)
 
-if exitStatus == 0 and pidFileMatched == True:
+if status == True:
 printd("The process is running ")
 return  StatusCodes.RUNNING
 else:
-printd('exit status:'+str(exitStatus))
-msg="The process " + process_name +" is not running trying recover "
-printd(msg)
+printd("Process %s is not running trying to recover" %process_name)
 #Retry the process state for few seconds
+
 for i in range(1, Config.RETRY_ITERATIONS):
-pout = Popen(cmd, shell=True, stdout=PIPE)
-exitStatus = pout.wait()
-temp_out = pout.communicate()[0]
+time.sleep(Config.SLEEP_SEC)
 
 if i < Config.RETRY_FOR_RESTART: # this is just for trying few 
more times
-if exitStatus == 0:
-pids = temp_out.split(' ')
-
-if isPidMatchPidFile(pidfile, pids) == StatusCodes.SUCCESS:
-pidFileMatched = True;
-printd("pid file is matched ...")
-raisealert(Log.ALERT, "The process detected as 
running"

git commit: updated refs/heads/master to c1ed540

2013-11-25 Thread jayapal
Updated Branches:
  refs/heads/master e55957308 -> c1ed540af


Monitoring python script organized into more methods


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

Branch: refs/heads/master
Commit: c1ed540af8e714d4ff719b1c441e571baca8bdf3
Parents: e559573
Author: Jayapal 
Authored: Tue Nov 26 09:49:22 2013 +0530
Committer: Jayapal 
Committed: Tue Nov 26 10:07:20 2013 +0530

--
 .../debian/config/root/monitorServices.py   | 159 ++-
 1 file changed, 81 insertions(+), 78 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ed540a/systemvm/patches/debian/config/root/monitorServices.py
--
diff --git a/systemvm/patches/debian/config/root/monitorServices.py 
b/systemvm/patches/debian/config/root/monitorServices.py
index 4e1b7e0..3646c81 100755
--- a/systemvm/patches/debian/config/root/monitorServices.py
+++ b/systemvm/patches/debian/config/root/monitorServices.py
@@ -135,6 +135,49 @@ def isPidMatchPidFile(pidfile, pids):
 fd.close()
 return StatusCodes.FAILED
 
+def checkProcessRunningStatus(process_name, pidFile):
+printd("checking the process " + process_name)
+cmd = ''
+pids = []
+cmd = 'pidof ' + process_name
+printd(cmd)
+
+#cmd = 'service ' + process_name + ' status'
+pout = Popen(cmd, shell=True, stdout=PIPE)
+exitStatus = pout.wait()
+temp_out = pout.communicate()[0]
+
+#check there is only one pid or not
+if exitStatus == 0:
+pids = temp_out.split(' ')
+printd("pid(s) of process %s are %s " %(process_name, pids))
+
+#there is more than one process so match the pid file
+#if not matched set pidFileMatched=False
+printd("Checking pid file")
+if isPidMatchPidFile(pidFile, pids) == StatusCodes.SUCCESS:
+return True,pids;
+
+printd("pid of exit status %s" %exitStatus)
+
+return False,pids;
+
+def restartService(service_name):
+
+cmd = 'service ' + service_name + ' restart'
+cout = Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT)
+return_val = cout.wait()
+
+if return_val == 0:
+printd("The service " + service_name +" recovered successfully ")
+msg="The process " +service_name+" is recovered successfully "
+raisealert(Log.INFO,msg,service_name)
+return True
+else:
+printd("process restart failed ")
+
+return False
+
 
 
 def checkProcessStatus( process ):
@@ -152,56 +195,28 @@ def checkProcessStatus( process ):
 if process_name is None:
 printd ("\n Invalid Process Name")
 return StatusCodes.INVALID_INP
-else:
-printd("checking the process " + process_name)
-cmd = 'pidof ' + process_name
-printd(cmd)
-#cmd = 'service ' + process_name + ' status'
-pout = Popen(cmd, shell=True, stdout=PIPE)
-exitStatus = pout.wait()
-temp_out = pout.communicate()[0]
-
-#check there is only one pid or not
-if exitStatus == 0:
-pids = temp_out.split(' ')
-msg="pids: " +temp_out;
-printd(msg)
 
-#there is more than one process so match the pid file
-#if not matched set pidFileMatched=False
-printd("Checking pid file")
-if isPidMatchPidFile(pidfile, pids) == StatusCodes.SUCCESS:
-pidFileMatched = True;
-else:
-pidFileMatched = False;
+status, pids = checkProcessRunningStatus(process_name, pidfile)
 
-if exitStatus == 0 and pidFileMatched == True:
+if status == True:
 printd("The process is running ")
 return  StatusCodes.RUNNING
 else:
-printd('exit status:'+str(exitStatus))
-msg="The process " + process_name +" is not running trying recover "
-printd(msg)
+printd("Process %s is not running trying to recover" %process_name)
 #Retry the process state for few seconds
+
 for i in range(1, Config.RETRY_ITERATIONS):
-pout = Popen(cmd, shell=True, stdout=PIPE)
-exitStatus = pout.wait()
-temp_out = pout.communicate()[0]
+time.sleep(Config.SLEEP_SEC)
 
 if i < Config.RETRY_FOR_RESTART: # this is just for trying few 
more times
-if exitStatus == 0:
-pids = temp_out.split(' ')
-
-if isPidMatchPidFile(pidfile, pids) == StatusCodes.SUCCESS:
-pidFileMatched = True;
-printd("pid file is matched ...")
-raisealert(Log.ALERT, "The process detected as 
ru

git commit: updated refs/heads/master to 764dec4

2013-11-25 Thread jayapal
Updated Branches:
  refs/heads/master c1ed540af -> 764dec45f


Monitoring python script removed semicolon


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

Branch: refs/heads/master
Commit: 764dec45fd89bb1a2f9d6ca13820f0290f5d3174
Parents: c1ed540
Author: Jayapal 
Authored: Tue Nov 26 11:24:37 2013 +0530
Committer: Jayapal 
Committed: Tue Nov 26 11:24:37 2013 +0530

--
 systemvm/patches/debian/config/root/monitorServices.py | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/764dec45/systemvm/patches/debian/config/root/monitorServices.py
--
diff --git a/systemvm/patches/debian/config/root/monitorServices.py 
b/systemvm/patches/debian/config/root/monitorServices.py
index 3646c81..0319ece 100755
--- a/systemvm/patches/debian/config/root/monitorServices.py
+++ b/systemvm/patches/debian/config/root/monitorServices.py
@@ -156,11 +156,11 @@ def checkProcessRunningStatus(process_name, pidFile):
 #if not matched set pidFileMatched=False
 printd("Checking pid file")
 if isPidMatchPidFile(pidFile, pids) == StatusCodes.SUCCESS:
-return True,pids;
+return True,pids
 
 printd("pid of exit status %s" %exitStatus)
 
-return False,pids;
+return False,pids
 
 def restartService(service_name):
 
@@ -224,7 +224,7 @@ def checkProcessStatus( process ):
 if service_name == 'apache2':
 # Killing apache2 process with this the main service will 
not start
 for pid in pids:
-cmd = 'kill -9 '+pid;
+cmd = 'kill -9 '+pid
 printd(cmd)
 Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT)
 
@@ -331,9 +331,9 @@ def loadPsFromUnMonitFile():
 for i in plist:
 dict_unmonit[i.split(':')[0]] = i.split(':')[1]
 
-fd.close();
+fd.close()
 
-return dict_unmonit;
+return dict_unmonit
 
 
 def writePsListToUnmonitFile(umonit_update):
@@ -348,7 +348,7 @@ def writePsListToUnmonitFile(umonit_update):
 printd("Failed to open file %s " %Config.UNMONIT_PS_FILE)
 return StatusCodes.FAILED
 
-fd.write(line);
+fd.write(line)
 fd.close()
 
 



git commit: updated refs/heads/4.3 to 0d682fb

2013-11-25 Thread jayapal
Updated Branches:
  refs/heads/4.3 8a29b7000 -> 0d682fb2f


Monitoring python script removed semicolon


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

Branch: refs/heads/4.3
Commit: 0d682fb2faec8ba18b6df5ac7f2a32432cc99207
Parents: 8a29b70
Author: Jayapal 
Authored: Tue Nov 26 11:24:37 2013 +0530
Committer: Jayapal 
Committed: Tue Nov 26 11:26:19 2013 +0530

--
 systemvm/patches/debian/config/root/monitorServices.py | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d682fb2/systemvm/patches/debian/config/root/monitorServices.py
--
diff --git a/systemvm/patches/debian/config/root/monitorServices.py 
b/systemvm/patches/debian/config/root/monitorServices.py
index 3646c81..0319ece 100755
--- a/systemvm/patches/debian/config/root/monitorServices.py
+++ b/systemvm/patches/debian/config/root/monitorServices.py
@@ -156,11 +156,11 @@ def checkProcessRunningStatus(process_name, pidFile):
 #if not matched set pidFileMatched=False
 printd("Checking pid file")
 if isPidMatchPidFile(pidFile, pids) == StatusCodes.SUCCESS:
-return True,pids;
+return True,pids
 
 printd("pid of exit status %s" %exitStatus)
 
-return False,pids;
+return False,pids
 
 def restartService(service_name):
 
@@ -224,7 +224,7 @@ def checkProcessStatus( process ):
 if service_name == 'apache2':
 # Killing apache2 process with this the main service will 
not start
 for pid in pids:
-cmd = 'kill -9 '+pid;
+cmd = 'kill -9 '+pid
 printd(cmd)
 Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT)
 
@@ -331,9 +331,9 @@ def loadPsFromUnMonitFile():
 for i in plist:
 dict_unmonit[i.split(':')[0]] = i.split(':')[1]
 
-fd.close();
+fd.close()
 
-return dict_unmonit;
+return dict_unmonit
 
 
 def writePsListToUnmonitFile(umonit_update):
@@ -348,7 +348,7 @@ def writePsListToUnmonitFile(umonit_update):
 printd("Failed to open file %s " %Config.UNMONIT_PS_FILE)
 return StatusCodes.FAILED
 
-fd.write(line);
+fd.write(line)
 fd.close()
 
 



git commit: updated refs/heads/master to d629830

2013-11-25 Thread girish
Updated Branches:
  refs/heads/master 764dec45f -> d6298302a


CLOUDSTACK-5257: Fixed Network ACL issue related to Egress traffic

Signed-off-by: Girish Shilamkar 


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

Branch: refs/heads/master
Commit: d6298302a1872eea1be52ccf5922174e469ed807
Parents: 764dec4
Author: Ashutosh K 
Authored: Tue Nov 26 11:46:56 2013 +0530
Committer: Girish Shilamkar 
Committed: Tue Nov 26 11:46:56 2013 +0530

--
 .../component/test_vpc_vms_deployment.py| 277 +++
 1 file changed, 94 insertions(+), 183 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d6298302/test/integration/component/test_vpc_vms_deployment.py
--
diff --git a/test/integration/component/test_vpc_vms_deployment.py 
b/test/integration/component/test_vpc_vms_deployment.py
index baefa55..0a244ab 100644
--- a/test/integration/component/test_vpc_vms_deployment.py
+++ b/test/integration/component/test_vpc_vms_deployment.py
@@ -18,14 +18,33 @@
 """ Component tests VM deployment in VPC network functionality
 """
 #Import Local Modules
-import marvin
 from nose.plugins.attrib import attr
-from marvin.cloudstackTestCase import *
-from marvin.cloudstackAPI import *
-from marvin.integration.lib.utils import *
-from marvin.integration.lib.base import *
-from marvin.integration.lib.common import *
-import datetime
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.integration.lib.base import (VirtualMachine,
+ NetworkOffering,
+ VpcOffering,
+ VPC,
+ NetworkACL,
+ PrivateGateway,
+ StaticRoute,
+ Router,
+ Network,
+ Account,
+ ServiceOffering,
+ PublicIPAddress,
+ NATRule,
+ StaticNATRule,
+ Configurations)
+
+from marvin.integration.lib.common import (get_domain,
+   get_zone,
+   get_template,
+   wait_for_cleanup,
+   get_free_vlan)
+
+from marvin.integration.lib.utils import cleanup_resources
+from marvin.cloudstackAPI import rebootRouter
+
 
 
 class Services:
@@ -105,18 +124,6 @@ class Services:
   # Max networks allowed as per hypervisor
   # Xenserver -> 5, VMWare -> 9
 },
- "lbrule": {
-"name": "SSH",
-"alg": "leastconn",
-# Algorithm used for load balancing
-"privateport": 22,
-"publicport": ,
-"openfirewall": False,
-"startport": 22,
-"endport": ,
-"protocol": "TCP",
-"cidrlist": '0.0.0.0/0',
-},
  "natrule": {
 "privateport": 22,
 "publicport": 22,
@@ -132,11 +139,9 @@ class Services:
 # Any network (For creating FW rule)
 "protocol": "TCP"
 },
- "http_rule": {
-"startport": 80,
-"endport": 80,
+ "icmp_rule": {
 "cidrlist": '0.0.0.0/0',
-"protocol": "TCP"
+"protocol": "ICMP"
 },
  "virtual_machine": {
 "displayname": "Test VM",
@@ -1893,23 +1898,15 @@ class TestVMDeployVPC(cloudstackTestCase):
 network_1.id
 )

git commit: updated refs/heads/4.3 to 5b37d38

2013-11-25 Thread girish
Updated Branches:
  refs/heads/4.3 0d682fb2f -> 5b37d38ed


CLOUDSTACK-5257: Fixed Network ACL issue related to Egress traffic

Signed-off-by: Girish Shilamkar 

Conflicts:
test/integration/component/test_vpc_vms_deployment.py


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

Branch: refs/heads/4.3
Commit: 5b37d38ed0b156268132ade1856032102723c36e
Parents: 0d682fb
Author: Ashutosh K 
Authored: Tue Nov 26 11:46:56 2013 +0530
Committer: Girish Shilamkar 
Committed: Tue Nov 26 12:09:41 2013 +0530

--
 .../component/test_vpc_vms_deployment.py| 278 +++
 1 file changed, 94 insertions(+), 184 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5b37d38e/test/integration/component/test_vpc_vms_deployment.py
--
diff --git a/test/integration/component/test_vpc_vms_deployment.py 
b/test/integration/component/test_vpc_vms_deployment.py
index af9d310..0a244ab 100644
--- a/test/integration/component/test_vpc_vms_deployment.py
+++ b/test/integration/component/test_vpc_vms_deployment.py
@@ -18,15 +18,33 @@
 """ Component tests VM deployment in VPC network functionality
 """
 #Import Local Modules
-import marvin
 from nose.plugins.attrib import attr
-from marvin.cloudstackTestCase import *
-from marvin.cloudstackAPI import *
-from marvin.integration.lib.utils import *
-from marvin.integration.lib.base import *
-from marvin.integration.lib.common import *
-from marvin.sshClient import SshClient
-import datetime
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.integration.lib.base import (VirtualMachine,
+ NetworkOffering,
+ VpcOffering,
+ VPC,
+ NetworkACL,
+ PrivateGateway,
+ StaticRoute,
+ Router,
+ Network,
+ Account,
+ ServiceOffering,
+ PublicIPAddress,
+ NATRule,
+ StaticNATRule,
+ Configurations)
+
+from marvin.integration.lib.common import (get_domain,
+   get_zone,
+   get_template,
+   wait_for_cleanup,
+   get_free_vlan)
+
+from marvin.integration.lib.utils import cleanup_resources
+from marvin.cloudstackAPI import rebootRouter
+
 
 
 class Services:
@@ -106,18 +124,6 @@ class Services:
   # Max networks allowed as per hypervisor
   # Xenserver -> 5, VMWare -> 9
 },
- "lbrule": {
-"name": "SSH",
-"alg": "leastconn",
-# Algorithm used for load balancing
-"privateport": 22,
-"publicport": ,
-"openfirewall": False,
-"startport": 22,
-"endport": ,
-"protocol": "TCP",
-"cidrlist": '0.0.0.0/0',
-},
  "natrule": {
 "privateport": 22,
 "publicport": 22,
@@ -133,11 +139,9 @@ class Services:
 # Any network (For creating FW rule)
 "protocol": "TCP"
 },
- "http_rule": {
-"startport": 80,
-"endport": 80,
+ "icmp_rule": {
 "cidrlist": '0.0.0.0/0',
-"protocol": "TCP"
+"protocol": "ICMP"
 },
  "virtual_machine": {
 "displayname": "Test VM",
@@ -1894,23 +1898,15 @@ class TestVMDeployVPC(cloudstac

git commit: updated refs/heads/master to 7a6751a

2013-11-25 Thread hugo
Updated Branches:
  refs/heads/master d6298302a -> 7a6751aa7


Make sure that if the file does not exist an Exception is thrown and that once 
it exists it is also closed after the properties are loaded.

Signed-off-by: Hugo Trippaers 


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

Branch: refs/heads/master
Commit: 7a6751aa770eaf8065864f497bff401012f553ae
Parents: d629830
Author: wilderrodrigues 
Authored: Thu Nov 14 08:37:02 2013 +0100
Committer: Hugo Trippaers 
Committed: Tue Nov 26 08:22:29 2013 +0100

--
 .../management/ManagementNetworkGuru.java   | 31 
 1 file changed, 25 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a6751aa/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java
--
diff --git 
a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java
 
b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java
index e86e98a..d3d9366 100644
--- 
a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java
+++ 
b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java
@@ -19,6 +19,8 @@ package org.apache.cloudstack.network.contrail.management;
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.util.Map;
 import java.util.Properties;
 
@@ -60,12 +62,29 @@ public class ManagementNetworkGuru extends ContrailGuru {
 @Override
 public boolean configure(String name, Map params) throws 
ConfigurationException {
 File configFile = PropertiesUtil.findConfigFile(configuration);
+FileInputStream inputFile = null;
+
+try {
+if (null == configFile) {
+throw new FileNotFoundException("Configuration file was not 
found!");
+}
+inputFile = new FileInputStream(configFile);
+} catch (FileNotFoundException e) {
+s_logger.error(e.getMessage());
+throw new ConfigurationException(e.getMessage());
+}
+
 final Properties configProps = new Properties();
 try {
-configProps.load(new FileInputStream(configFile));
-} catch (Exception ex) {
-ex.printStackTrace();
-throw new ConfigurationException(ex.getMessage());
+configProps.load(inputFile);
+} catch (IOException e) {
+s_logger.error(e.getMessage());
+throw new ConfigurationException(e.getMessage());
+} finally {
+try {
+inputFile.close();
+} catch (IOException e) {
+}
 }
 _mgmt_cidr = configProps.getProperty("management.cidr");
 _mgmt_gateway = configProps.getProperty("management.gateway");
@@ -100,8 +119,8 @@ public class ManagementNetworkGuru extends ContrailGuru {
 return null;
 }
 NetworkVO network =
-new NetworkVO(offering.getTrafficType(), Mode.Dhcp, 
BroadcastDomainType.Lswitch, offering.getId(), Network.State.Allocated, 
plan.getDataCenterId(),
-plan.getPhysicalNetworkId());
+new NetworkVO(offering.getTrafficType(), Mode.Dhcp, 
BroadcastDomainType.Lswitch, offering.getId(), Network.State.Allocated, 
plan.getDataCenterId(),
+plan.getPhysicalNetworkId());
 if (_mgmt_cidr != null) {
 network.setCidr(_mgmt_cidr);
 network.setGateway(_mgmt_gateway);



git commit: updated refs/heads/4.2 to b2dc2db

2013-11-25 Thread girish
Updated Branches:
  refs/heads/4.2 b21030b85 -> b2dc2db26


CLOUDSTACK-5257: Fixed Network ACL issue related to Egress traffic

Signed-off-by: Girish Shilamkar 

Conflicts:
test/integration/component/test_vpc_vms_deployment.py

Conflicts:
test/integration/component/test_vpc_vms_deployment.py


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

Branch: refs/heads/4.2
Commit: b2dc2db269c405b6c65b8d00b74e4c84c7abeff2
Parents: b21030b
Author: Ashutosh K 
Authored: Tue Nov 26 11:46:56 2013 +0530
Committer: Girish Shilamkar 
Committed: Tue Nov 26 12:42:25 2013 +0530

--
 .../component/test_vpc_vms_deployment.py| 277 +++
 1 file changed, 94 insertions(+), 183 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b2dc2db2/test/integration/component/test_vpc_vms_deployment.py
--
diff --git a/test/integration/component/test_vpc_vms_deployment.py 
b/test/integration/component/test_vpc_vms_deployment.py
index baefa55..0a244ab 100644
--- a/test/integration/component/test_vpc_vms_deployment.py
+++ b/test/integration/component/test_vpc_vms_deployment.py
@@ -18,14 +18,33 @@
 """ Component tests VM deployment in VPC network functionality
 """
 #Import Local Modules
-import marvin
 from nose.plugins.attrib import attr
-from marvin.cloudstackTestCase import *
-from marvin.cloudstackAPI import *
-from marvin.integration.lib.utils import *
-from marvin.integration.lib.base import *
-from marvin.integration.lib.common import *
-import datetime
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.integration.lib.base import (VirtualMachine,
+ NetworkOffering,
+ VpcOffering,
+ VPC,
+ NetworkACL,
+ PrivateGateway,
+ StaticRoute,
+ Router,
+ Network,
+ Account,
+ ServiceOffering,
+ PublicIPAddress,
+ NATRule,
+ StaticNATRule,
+ Configurations)
+
+from marvin.integration.lib.common import (get_domain,
+   get_zone,
+   get_template,
+   wait_for_cleanup,
+   get_free_vlan)
+
+from marvin.integration.lib.utils import cleanup_resources
+from marvin.cloudstackAPI import rebootRouter
+
 
 
 class Services:
@@ -105,18 +124,6 @@ class Services:
   # Max networks allowed as per hypervisor
   # Xenserver -> 5, VMWare -> 9
 },
- "lbrule": {
-"name": "SSH",
-"alg": "leastconn",
-# Algorithm used for load balancing
-"privateport": 22,
-"publicport": ,
-"openfirewall": False,
-"startport": 22,
-"endport": ,
-"protocol": "TCP",
-"cidrlist": '0.0.0.0/0',
-},
  "natrule": {
 "privateport": 22,
 "publicport": 22,
@@ -132,11 +139,9 @@ class Services:
 # Any network (For creating FW rule)
 "protocol": "TCP"
 },
- "http_rule": {
-"startport": 80,
-"endport": 80,
+ "icmp_rule": {
 "cidrlist": '0.0.0.0/0',
-"protocol": "TCP"
+"protocol": "ICMP"
 },
  "virtual_machine": {
 "displayname": "Test VM",
@@ -1893,23 +1898,15