git commit: CLOUDSTACK-5292 moniroting services in VR

2014-01-06 Thread radhika
Updated Branches:
  refs/heads/master 83acdf500 -> 1ae8b3ea8


CLOUDSTACK-5292 moniroting services in VR


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

Branch: refs/heads/master
Commit: 1ae8b3ea8440911bd2a769ecd48d4da4a82853e7
Parents: 83acdf5
Author: radhikap 
Authored: Mon Jan 6 13:48:54 2014 +0530
Committer: radhikap 
Committed: Mon Jan 6 13:48:54 2014 +0530

--
 en-US/virtual-router.xml |  22 +---
 en-US/vr-monitor.xml | 115 ++
 2 files changed, 130 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/1ae8b3ea/en-US/virtual-router.xml
--
diff --git a/en-US/virtual-router.xml b/en-US/virtual-router.xml
index c9b403b..501157f 100644
--- a/en-US/virtual-router.xml
+++ b/en-US/virtual-router.xml
@@ -21,12 +21,20 @@
 specific language governing permissions and limitations
 under the License.
 -->
-
 
-Virtual Router
-The virtual router is a type of System Virtual Machine. The virtual 
router is one of the most frequently used service providers in &PRODUCT;. The 
end user has no direct access to the virtual router. Users can ping the virtual 
router and take actions that affect it (such as setting up port forwarding), 
but users do not have SSH access into the virtual router.
-There is no mechanism for the administrator to log in to the virtual 
router. Virtual routers can be restarted by administrators, but this will 
interrupt public network access and other services for end users. A basic test 
in debugging networking issues is to attempt to ping the virtual router from a 
guest VM. Some of the characteristics of the virtual router are determined by 
its associated system service offering..
-http://www.w3.org/2001/XInclude"; />
-http://www.w3.org/2001/XInclude"; />
-http://www.w3.org/2001/XInclude"; />  
+  Virtual Router
+  The virtual router is a type of System Virtual Machine. The virtual 
router is one of the
+most frequently used service providers in &PRODUCT;. The end user has no 
direct access to the
+virtual router. Users can ping the virtual router and take actions that 
affect it (such as
+setting up port forwarding), but users do not have SSH access into the 
virtual router.
+  There is no mechanism for the administrator to log in to the virtual 
router. Virtual routers
+can be restarted by administrators, but this will interrupt public network 
access and other
+services for end users. A basic test in debugging networking issues is to 
attempt to ping the
+virtual router from a guest VM. Some of the characteristics of the virtual 
router are determined
+by its associated system service offering.
+  http://www.w3.org/2001/XInclude"/>
+  http://www.w3.org/2001/XInclude"/>
+  http://www.w3.org/2001/XInclude"/>
+  http://www.w3.org/2001/XInclude"/>
 

http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/1ae8b3ea/en-US/vr-monitor.xml
--
diff --git a/en-US/vr-monitor.xml b/en-US/vr-monitor.xml
new file mode 100644
index 000..6444185
--- /dev/null
+++ b/en-US/vr-monitor.xml
@@ -0,0 +1,115 @@
+
+http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
+
+%BOOK_ENTITIES;
+]>
+
+
+
+  Service Monitoring Tool for Virtual Router
+  Various services running on the &PRODUCT; virtual routers can be 
monitored by using a
+Service Monitoring tool. The tool ensures that services are successfully 
running until &PRODUCT;
+deliberately disables them. If a service goes down, the tool automatically 
restarts the VR, and
+if that does not bring up the VR, an alert as well as an event is 
generated indicating the
+failure.
+  Monitoring tool can help to start a VR service, which is crashed due 
to an unexpected
+reason. For example:
+  
+
+  The services crashed due to defects in the source code.
+
+
+  The services that are terminated by the OS when memory or CPU is 
not sufficiently
+available for the service.
+
+  
+  
+Only those services with daemons are monitored. The services that 
are failed due to errors in the service/daemon configuration file cannot
+  be restarted by the Monitoring tool.
+  
+  The following services are monitored in a VR:
+  
+
+  DNS
+
+
+  HA Proxy
+
+
+  SSH
+
+
+  Apache Web Server
+
+  
+  The following networks are supported:
+  
+
+  Isolated Networks
+
+
+  Shared Networks in bo

git commit: CLOUDSTACK-5292 moniroting services in VR

2014-01-06 Thread radhika
Updated Branches:
  refs/heads/4.3 661c770a9 -> 1066d4e27


CLOUDSTACK-5292 moniroting services in VR


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

Branch: refs/heads/4.3
Commit: 1066d4e27cd44f940f05a37252a4909c0bc76832
Parents: 661c770
Author: radhikap 
Authored: Mon Jan 6 13:48:54 2014 +0530
Committer: radhikap 
Committed: Mon Jan 6 13:51:05 2014 +0530

--
 en-US/virtual-router.xml |  22 +---
 en-US/vr-monitor.xml | 115 ++
 2 files changed, 130 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/1066d4e2/en-US/virtual-router.xml
--
diff --git a/en-US/virtual-router.xml b/en-US/virtual-router.xml
index c9b403b..501157f 100644
--- a/en-US/virtual-router.xml
+++ b/en-US/virtual-router.xml
@@ -21,12 +21,20 @@
 specific language governing permissions and limitations
 under the License.
 -->
-
 
-Virtual Router
-The virtual router is a type of System Virtual Machine. The virtual 
router is one of the most frequently used service providers in &PRODUCT;. The 
end user has no direct access to the virtual router. Users can ping the virtual 
router and take actions that affect it (such as setting up port forwarding), 
but users do not have SSH access into the virtual router.
-There is no mechanism for the administrator to log in to the virtual 
router. Virtual routers can be restarted by administrators, but this will 
interrupt public network access and other services for end users. A basic test 
in debugging networking issues is to attempt to ping the virtual router from a 
guest VM. Some of the characteristics of the virtual router are determined by 
its associated system service offering..
-http://www.w3.org/2001/XInclude"; />
-http://www.w3.org/2001/XInclude"; />
-http://www.w3.org/2001/XInclude"; />  
+  Virtual Router
+  The virtual router is a type of System Virtual Machine. The virtual 
router is one of the
+most frequently used service providers in &PRODUCT;. The end user has no 
direct access to the
+virtual router. Users can ping the virtual router and take actions that 
affect it (such as
+setting up port forwarding), but users do not have SSH access into the 
virtual router.
+  There is no mechanism for the administrator to log in to the virtual 
router. Virtual routers
+can be restarted by administrators, but this will interrupt public network 
access and other
+services for end users. A basic test in debugging networking issues is to 
attempt to ping the
+virtual router from a guest VM. Some of the characteristics of the virtual 
router are determined
+by its associated system service offering.
+  http://www.w3.org/2001/XInclude"/>
+  http://www.w3.org/2001/XInclude"/>
+  http://www.w3.org/2001/XInclude"/>
+  http://www.w3.org/2001/XInclude"/>
 

http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/1066d4e2/en-US/vr-monitor.xml
--
diff --git a/en-US/vr-monitor.xml b/en-US/vr-monitor.xml
new file mode 100644
index 000..6444185
--- /dev/null
+++ b/en-US/vr-monitor.xml
@@ -0,0 +1,115 @@
+
+http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
+
+%BOOK_ENTITIES;
+]>
+
+
+
+  Service Monitoring Tool for Virtual Router
+  Various services running on the &PRODUCT; virtual routers can be 
monitored by using a
+Service Monitoring tool. The tool ensures that services are successfully 
running until &PRODUCT;
+deliberately disables them. If a service goes down, the tool automatically 
restarts the VR, and
+if that does not bring up the VR, an alert as well as an event is 
generated indicating the
+failure.
+  Monitoring tool can help to start a VR service, which is crashed due 
to an unexpected
+reason. For example:
+  
+
+  The services crashed due to defects in the source code.
+
+
+  The services that are terminated by the OS when memory or CPU is 
not sufficiently
+available for the service.
+
+  
+  
+Only those services with daemons are monitored. The services that 
are failed due to errors in the service/daemon configuration file cannot
+  be restarted by the Monitoring tool.
+  
+  The following services are monitored in a VR:
+  
+
+  DNS
+
+
+  HA Proxy
+
+
+  SSH
+
+
+  Apache Web Server
+
+  
+  The following networks are supported:
+  
+
+  Isolated Networks
+
+
+  Shared Networks in both Adv

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

2014-01-06 Thread muralireddy
Updated Branches:
  refs/heads/master 3ad0e8fb4 -> 3a6fcaf1f


CLOUDSTACK-5787:  support in-memroy eventbus

this checkin adds support for plug-in that provides an in memory event
bus which could be used as alternative to RabbitMQ based event bus. Both
publisher are subscriber should be running with management server to use
in-memroy event bus.


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

Branch: refs/heads/master
Commit: 3a6fcaf1fc4132a59b5260b1854fcbe7390d848c
Parents: 3ad0e8f
Author: Murali Reddy 
Authored: Mon Jan 6 13:21:49 2014 +0530
Committer: Murali Reddy 
Committed: Mon Jan 6 13:24:36 2014 +0530

--
 client/pom.xml  |   5 +
 plugins/event-bus/inmemory/pom.xml  |  40 +
 .../mom/inmemory/InMemoryEventBus.java  | 163 +++
 plugins/pom.xml |   1 +
 4 files changed, 209 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3a6fcaf1/client/pom.xml
--
diff --git a/client/pom.xml b/client/pom.xml
index 75b5504..33d3f1e 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -207,6 +207,11 @@
   ${project.version}
 
 
+  org.apache.cloudstack
+  cloud-mom-inmemory
+  ${project.version}
+
+
   mysql
   mysql-connector-java
   runtime

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3a6fcaf1/plugins/event-bus/inmemory/pom.xml
--
diff --git a/plugins/event-bus/inmemory/pom.xml 
b/plugins/event-bus/inmemory/pom.xml
new file mode 100644
index 000..1bde8b8
--- /dev/null
+++ b/plugins/event-bus/inmemory/pom.xml
@@ -0,0 +1,40 @@
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  4.0.0
+  cloud-mom-inmemory
+  Apache CloudStack Plugin - In Memory Event Bus
+  
+org.apache.cloudstack
+cloudstack-plugins
+4.4.0-SNAPSHOT
+../../pom.xml
+  
+  
+
+org.apache.cloudstack
+  cloud-framework-events
+  ${project.version}
+
+  
+  
+install
+  
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3a6fcaf1/plugins/event-bus/inmemory/src/org/apache/cloudstack/mom/inmemory/InMemoryEventBus.java
--
diff --git 
a/plugins/event-bus/inmemory/src/org/apache/cloudstack/mom/inmemory/InMemoryEventBus.java
 
b/plugins/event-bus/inmemory/src/org/apache/cloudstack/mom/inmemory/InMemoryEventBus.java
new file mode 100644
index 000..7c282d7
--- /dev/null
+++ 
b/plugins/event-bus/inmemory/src/org/apache/cloudstack/mom/inmemory/InMemoryEventBus.java
@@ -0,0 +1,163 @@
+/*
+ * 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.mom.inmemory;
+
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.ejb.Local;
+import javax.naming.ConfigurationException;
+
+import com.cloud.utils.Pair;
+import com.cloud.utils.Ternary;
+import org.apache.log4j.Logger;
+
+import org.apache.cloudstack.framework.events.Event;
+import org.apache.cloudstack.framework.events.EventBus;
+import org.apache.cloudstack.framework.events.EventBusException;
+import org.apache.cloudstack.framework.events.EventSubscriber;
+import org.apache.cloudstack.framework.events.EventTopic;
+
+import com.cloud.utils.component.ManagerBase;
+
+@Local(value = EventBus.class)
+public class InMemoryEventBus extends ManagerBase implements EventBus {
+
+private String name;
+private static final Logger s_logger = 
Logger.getLogger(InMemoryEventBus.class);
+private static ConcurrentHashMap> 
s_subscribers;
+
+@Override
+public 

git commit: updated refs/heads/4.3 to ef51def

2014-01-06 Thread devdeep
Updated Branches:
  refs/heads/4.3 811b0856d -> ef51def9f


CLOUDSTACK-5716: fixed can't type special character in console view


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

Branch: refs/heads/4.3
Commit: ef51def9fff3610b13f50be39c7610262d4a1c04
Parents: 811b085
Author: Anshul Gangwar 
Authored: Fri Jan 3 17:03:36 2014 +0530
Committer: Devdeep Singh 
Committed: Mon Jan 6 14:12:27 2014 +0530

--
 .../adapter/AwtRdpKeyboardAdapter.java  |  3 +-
 .../consoleproxy/ConsoleProxyRdpClient.java | 29 +++-
 .../cloud/consoleproxy/rdp/KeysymToKeycode.java | 27 --
 3 files changed, 36 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef51def9/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/adapter/AwtRdpKeyboardAdapter.java
--
diff --git 
a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/adapter/AwtRdpKeyboardAdapter.java
 
b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/adapter/AwtRdpKeyboardAdapter.java
index 36da0a3..2d1e8fc 100755
--- 
a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/adapter/AwtRdpKeyboardAdapter.java
+++ 
b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/adapter/AwtRdpKeyboardAdapter.java
@@ -21,7 +21,6 @@ import java.awt.event.KeyEvent;
 import streamer.BaseElement;
 import streamer.ByteBuffer;
 import streamer.Link;
-
 import common.KeyOrder;
 
 public class AwtRdpKeyboardAdapter extends BaseElement {
@@ -344,7 +343,7 @@ public class AwtRdpKeyboardAdapter extends BaseElement {
 
 default:
 System.err.println("Key is not mapped: " + event + ".");
-return 57; // Space
+return event.getKeyCode();
 }
 }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef51def9/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyRdpClient.java
--
diff --git 
a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyRdpClient.java
 
b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyRdpClient.java
index 6b317ff..d5a3fcd 100644
--- 
a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyRdpClient.java
+++ 
b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyRdpClient.java
@@ -57,8 +57,6 @@ public class ConsoleProxyRdpClient extends 
ConsoleProxyClientBase {
 private Thread _worker;
 private volatile boolean _workerDone = false;
 
-private int _lastModifierStates = 0;
-
 private AwtMouseEventSource _mouseEventSource = null;
 private AwtKeyEventSource _keyEventSource = null;
 
@@ -203,26 +201,19 @@ public class ConsoleProxyRdpClient extends 
ConsoleProxyClientBase {
 
 private int mapModifier(int modifiers) {
 int mod = 0;
-if ((modifiers & SHIFT_KEY_MASK) != (_lastModifierStates & 
SHIFT_KEY_MASK)) {
-if ((modifiers & SHIFT_KEY_MASK) != 0)
-mod = mod | InputEvent.SHIFT_DOWN_MASK;
-}
 
-if ((modifiers & CTRL_KEY_MASK) != (_lastModifierStates & 
CTRL_KEY_MASK)) {
-if ((modifiers & CTRL_KEY_MASK) != 0)
-mod = mod | InputEvent.CTRL_DOWN_MASK;
-}
+if ((modifiers & SHIFT_KEY_MASK) != 0)
+mod = mod | InputEvent.SHIFT_DOWN_MASK;
 
-if ((modifiers & META_KEY_MASK) != (_lastModifierStates & 
META_KEY_MASK)) {
-if ((modifiers & META_KEY_MASK) != 0)
-mod = mod | InputEvent.META_DOWN_MASK;
-}
+if ((modifiers & CTRL_KEY_MASK) != 0)
+mod = mod | InputEvent.CTRL_DOWN_MASK;
+
+if ((modifiers & META_KEY_MASK) != 0)
+mod = mod | InputEvent.META_DOWN_MASK;
+
+if ((modifiers & ALT_KEY_MASK) != 0)
+mod = mod | InputEvent.ALT_DOWN_MASK;
 
-if ((modifiers & ALT_KEY_MASK) != (_lastModifierStates & 
ALT_KEY_MASK)) {
-if ((modifiers & ALT_KEY_MASK) != 0)
-mod = mod | InputEvent.ALT_DOWN_MASK;
-}
-_lastModifierStates = mod;
 return mod;
 }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef51def9/services/console-proxy/server/src/com/cloud/consoleproxy/rdp/KeysymToKeycode.java
--
diff --git 
a/services/console-proxy/server/src/com/cloud/consoleproxy/rdp/KeysymToKeycode.java
 
b/services/console-proxy/server/src/com/cloud/consoleproxy/rdp/KeysymToKeycode.java
index 10282

git commit: updated refs/heads/master to bb7fc3c

2014-01-06 Thread muralireddy
Updated Branches:
  refs/heads/master 3a6fcaf1f -> bb7fc3c21


fixing build break due to checkstyle


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

Branch: refs/heads/master
Commit: bb7fc3c219790afafc5ed2dcf117a2476726f907
Parents: 3a6fcaf
Author: Murali Reddy 
Authored: Mon Jan 6 14:33:09 2014 +0530
Committer: Murali Reddy 
Committed: Mon Jan 6 14:33:09 2014 +0530

--
 .../src/org/apache/cloudstack/mom/inmemory/InMemoryEventBus.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bb7fc3c2/plugins/event-bus/inmemory/src/org/apache/cloudstack/mom/inmemory/InMemoryEventBus.java
--
diff --git 
a/plugins/event-bus/inmemory/src/org/apache/cloudstack/mom/inmemory/InMemoryEventBus.java
 
b/plugins/event-bus/inmemory/src/org/apache/cloudstack/mom/inmemory/InMemoryEventBus.java
index 7c282d7..99d0a12 100644
--- 
a/plugins/event-bus/inmemory/src/org/apache/cloudstack/mom/inmemory/InMemoryEventBus.java
+++ 
b/plugins/event-bus/inmemory/src/org/apache/cloudstack/mom/inmemory/InMemoryEventBus.java
@@ -19,14 +19,14 @@
 
 package org.apache.cloudstack.mom.inmemory;
 
-import java.util.*;
+import java.util.Map;
+import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 
 import javax.ejb.Local;
 import javax.naming.ConfigurationException;
 
 import com.cloud.utils.Pair;
-import com.cloud.utils.Ternary;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.framework.events.Event;



git commit: updated refs/heads/4.3 to 665d036

2014-01-06 Thread likithas
Updated Branches:
  refs/heads/4.3 ef51def9f -> 665d036e8


CLOUDSTACK-5782. [VMware] Snapshot creation on a detached volume failes with 
NPE.
For a detached volume, don't try to find the associated VM on the 
hypervisor/peer hypervisor host.
By default create a worker VM to perform snapshot operations.


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

Branch: refs/heads/4.3
Commit: 665d036e8bdbe97b5bbf3d2d7c64f2bd891d8e1a
Parents: ef51def
Author: Likitha Shetty 
Authored: Mon Jan 6 14:19:31 2014 +0530
Committer: Likitha Shetty 
Committed: Mon Jan 6 14:24:07 2014 +0530

--
 .../resource/VmwareStorageProcessor.java| 42 +---
 1 file changed, 18 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/665d036e/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
--
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
 
b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
index 07b8db0..0d97709 100644
--- 
a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
@@ -1030,32 +1030,26 @@ public class VmwareStorageProcessor implements 
StorageProcessor {
 CopyCmdAnswer answer = null;
 
 try {
-vmMo = hyperHost.findVmOnHyperHost(vmName);
-if (vmMo == null) {
-if(s_logger.isDebugEnabled()) {
-s_logger.debug("Unable to find owner VM for 
BackupSnapshotCommand on host " + hyperHost.getHyperHostName() + ", will try 
within datacenter");
-}
-
-vmMo = hyperHost.findVmOnPeerHyperHost(vmName);
-if(vmMo == null) {
-dsMo = new DatastoreMO(hyperHost.getContext(), morDs);
-
-workerVMName = hostService.getWorkerName(context, cmd, 
0);
-
-vmMo = HypervisorHostHelper.createWorkerVM(hyperHost, 
dsMo, workerVMName);
-
-if (vmMo == null) {
-throw new Exception("Failed to find the newly 
create or relocated VM. vmName: " + workerVMName);
+if(vmName != null) {
+vmMo = hyperHost.findVmOnHyperHost(vmName);
+if (vmMo == null) {
+if(s_logger.isDebugEnabled()) {
+s_logger.debug("Unable to find owner VM for 
BackupSnapshotCommand on host " + hyperHost.getHyperHostName() + ", will try 
within datacenter");
 }
-workerVm = vmMo;
-
-// attach volume to worker VM
-String datastoreVolumePath = 
dsMo.getDatastorePath(volumePath + ".vmdk");
-vmMo.attachDisk(new String[] { datastoreVolumePath }, 
morDs);
-} else {
-s_logger.info("Using owner VM " + vmName + " for 
snapshot operation");
-hasOwnerVm = true;
+vmMo = hyperHost.findVmOnPeerHyperHost(vmName);
+}
+}
+if(vmMo == null) {
+dsMo = new DatastoreMO(hyperHost.getContext(), morDs);
+workerVMName = hostService.getWorkerName(context, cmd, 0);
+vmMo = HypervisorHostHelper.createWorkerVM(hyperHost, 
dsMo, workerVMName);
+if (vmMo == null) {
+throw new Exception("Failed to find the newly create 
or relocated VM. vmName: " + workerVMName);
 }
+workerVm = vmMo;
+// attach volume to worker VM
+String datastoreVolumePath = 
dsMo.getDatastorePath(volumePath + ".vmdk");
+vmMo.attachDisk(new String[] { datastoreVolumePath }, 
morDs);
 } else {
 s_logger.info("Using owner VM " + vmName + " for snapshot 
operation");
 hasOwnerVm = true;



git commit: updated refs/heads/master to bc677e2

2014-01-06 Thread likithas
Updated Branches:
  refs/heads/master bb7fc3c21 -> bc677e2a9


CLOUDSTACK-5782. [VMware] Snapshot creation on a detached volume failes with 
NPE.
For a detached volume, don't try to find the associated VM on the 
hypervisor/peer hypervisor host.
By default create a worker VM to perform snapshot operations.

Conflicts:


plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java


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

Branch: refs/heads/master
Commit: bc677e2a999f7c44b3cb3353fb0a63d02eba3e7f
Parents: bb7fc3c
Author: Likitha Shetty 
Authored: Mon Jan 6 14:19:31 2014 +0530
Committer: Likitha Shetty 
Committed: Mon Jan 6 14:34:15 2014 +0530

--
 .../resource/VmwareStorageProcessor.java| 40 +---
 1 file changed, 17 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc677e2a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
--
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
 
b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
index a6d065f..70c8c88 100644
--- 
a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
@@ -1000,32 +1000,26 @@ public class VmwareStorageProcessor implements 
StorageProcessor {
 CopyCmdAnswer answer = null;
 
 try {
-vmMo = hyperHost.findVmOnHyperHost(vmName);
-if (vmMo == null) {
-if (s_logger.isDebugEnabled()) {
-s_logger.debug("Unable to find owner VM for 
BackupSnapshotCommand on host " + hyperHost.getHyperHostName() + ", will try 
within datacenter");
-}
-
-vmMo = hyperHost.findVmOnPeerHyperHost(vmName);
+if(vmName != null) {
+vmMo = hyperHost.findVmOnHyperHost(vmName);
 if (vmMo == null) {
-dsMo = new DatastoreMO(hyperHost.getContext(), morDs);
-
-workerVMName = hostService.getWorkerName(context, cmd, 
0);
-
-vmMo = HypervisorHostHelper.createWorkerVM(hyperHost, 
dsMo, workerVMName);
-
-if (vmMo == null) {
-throw new Exception("Failed to find the newly 
create or relocated VM. vmName: " + workerVMName);
+if(s_logger.isDebugEnabled()) {
+s_logger.debug("Unable to find owner VM for 
BackupSnapshotCommand on host " + hyperHost.getHyperHostName() + ", will try 
within datacenter");
 }
-workerVm = vmMo;
-
-// attach volume to worker VM
-String datastoreVolumePath = 
dsMo.getDatastorePath(volumePath + ".vmdk");
-vmMo.attachDisk(new String[] {datastoreVolumePath}, 
morDs);
-} else {
-s_logger.info("Using owner VM " + vmName + " for 
snapshot operation");
-hasOwnerVm = true;
+vmMo = hyperHost.findVmOnPeerHyperHost(vmName);
+}
+}
+if(vmMo == null) {
+dsMo = new DatastoreMO(hyperHost.getContext(), morDs);
+workerVMName = hostService.getWorkerName(context, cmd, 0);
+vmMo = HypervisorHostHelper.createWorkerVM(hyperHost, 
dsMo, workerVMName);
+if (vmMo == null) {
+throw new Exception("Failed to find the newly create 
or relocated VM. vmName: " + workerVMName);
 }
+workerVm = vmMo;
+// attach volume to worker VM
+String datastoreVolumePath = 
dsMo.getDatastorePath(volumePath + ".vmdk");
+vmMo.attachDisk(new String[] { datastoreVolumePath }, 
morDs);
 } else {
 s_logger.info("Using owner VM " + vmName + " for snapshot 
operation");
 hasOwnerVm = true;



git commit: updated refs/heads/4.3 to 69cb7de

2014-01-06 Thread talluri
Updated Branches:
  refs/heads/4.3 665d036e8 -> 69cb7de34


CLOUDSTACK-5625: removed unnecessary global setting 'ldap.realname.attribute'


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

Branch: refs/heads/4.3
Commit: 69cb7de34d9a0d87bf61a753dee05c6f5a798fcb
Parents: 665d036
Author: SrikanteswaraRao Talluri 
Authored: Mon Jan 6 14:50:46 2014 +0530
Committer: SrikanteswaraRao Talluri 
Committed: Mon Jan 6 14:51:33 2014 +0530

--
 test/integration/component/test_ldap.py | 9 -
 1 file changed, 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/69cb7de3/test/integration/component/test_ldap.py
--
diff --git a/test/integration/component/test_ldap.py 
b/test/integration/component/test_ldap.py
index 83f970b..d9e7c35 100644
--- a/test/integration/component/test_ldap.py
+++ b/test/integration/component/test_ldap.py
@@ -54,7 +54,6 @@ class Services:
 {
 "basedn": "dc=cloudstack,dc=org",
 "emailAttribute": "mail",
-"realnameAttribute": "cn",
 "userObject": "inetOrgPerson",
 "usernameAttribute": "uid",
 "hostname": "localhost",
@@ -179,14 +178,6 @@ class TestLdap(cloudstackTestCase):
 updateConfigurationResponse = 
self.apiClient.updateConfiguration(updateConfigurationCmd)
 self.debug("updated the parameter %s with value 
%s"%(updateConfigurationResponse.name, updateConfigurationResponse.value))
 
-
-updateConfigurationCmd = updateConfiguration.updateConfigurationCmd()
-updateConfigurationCmd.name = "ldap.realname.attribute"
-updateConfigurationCmd.value = ldapConfiguration['realnameAttribute']
-updateConfigurationResponse = 
self.apiClient.updateConfiguration(updateConfigurationCmd)
-self.debug("updated the parameter %s with value 
%s"%(updateConfigurationResponse.name, updateConfigurationResponse.value))
-
-
 updateConfigurationCmd = updateConfiguration.updateConfigurationCmd()
 updateConfigurationCmd.name = "ldap.user.object"
 updateConfigurationCmd.value = ldapConfiguration['userObject']



git commit: updated refs/heads/master to c2b5add

2014-01-06 Thread talluri
Updated Branches:
  refs/heads/master bc677e2a9 -> c2b5addae


CLOUDSTACK-5625: removed unnecessary global setting 'ldap.realname.attribute'


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

Branch: refs/heads/master
Commit: c2b5addaedc47b3715b408a6d5a2aa356e7fcd1b
Parents: bc677e2
Author: SrikanteswaraRao Talluri 
Authored: Mon Jan 6 14:50:46 2014 +0530
Committer: SrikanteswaraRao Talluri 
Committed: Mon Jan 6 14:52:26 2014 +0530

--
 test/integration/component/test_ldap.py | 9 -
 1 file changed, 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2b5adda/test/integration/component/test_ldap.py
--
diff --git a/test/integration/component/test_ldap.py 
b/test/integration/component/test_ldap.py
index 83f970b..d9e7c35 100644
--- a/test/integration/component/test_ldap.py
+++ b/test/integration/component/test_ldap.py
@@ -54,7 +54,6 @@ class Services:
 {
 "basedn": "dc=cloudstack,dc=org",
 "emailAttribute": "mail",
-"realnameAttribute": "cn",
 "userObject": "inetOrgPerson",
 "usernameAttribute": "uid",
 "hostname": "localhost",
@@ -179,14 +178,6 @@ class TestLdap(cloudstackTestCase):
 updateConfigurationResponse = 
self.apiClient.updateConfiguration(updateConfigurationCmd)
 self.debug("updated the parameter %s with value 
%s"%(updateConfigurationResponse.name, updateConfigurationResponse.value))
 
-
-updateConfigurationCmd = updateConfiguration.updateConfigurationCmd()
-updateConfigurationCmd.name = "ldap.realname.attribute"
-updateConfigurationCmd.value = ldapConfiguration['realnameAttribute']
-updateConfigurationResponse = 
self.apiClient.updateConfiguration(updateConfigurationCmd)
-self.debug("updated the parameter %s with value 
%s"%(updateConfigurationResponse.name, updateConfigurationResponse.value))
-
-
 updateConfigurationCmd = updateConfiguration.updateConfigurationCmd()
 updateConfigurationCmd.name = "ldap.user.object"
 updateConfigurationCmd.value = ldapConfiguration['userObject']



git commit: updated refs/heads/4.3 to 96823d3

2014-01-06 Thread sanjaytripathi
Updated Branches:
  refs/heads/4.3 69cb7de34 -> 96823d3a6


CLOUDSTACK-5406: Not able to take snapshot becasue of secondary_storage limit 
of 400 gb exceeded even though we have not really consumed this limit in 
secondary store.


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

Branch: refs/heads/4.3
Commit: 96823d3a629bdb8318072b2932c3a74824f54fac
Parents: 69cb7de
Author: Sanjay Tripathi 
Authored: Mon Jan 6 15:39:06 2014 +0530
Committer: Sanjay Tripathi 
Committed: Mon Jan 6 15:48:23 2014 +0530

--
 .../storage/snapshot/SnapshotManagerImpl.java   | 41 +---
 1 file changed, 10 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/96823d3a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
--
diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java 
b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
index 70fca7b..40ae606 100755
--- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
+++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
@@ -317,18 +317,10 @@ public class SnapshotManagerImpl extends ManagerBase 
implements SnapshotManager,
 snapshot.getDataCenterId(), snapshotId, 
snapshot.getName(), null, null,
 volume.getSize(), snapshot.getClass().getName(), 
snapshot.getUuid());
 }
-
 _resourceLimitMgr.incrementResourceCount(snapshotOwner.getId(), 
ResourceType.snapshot);
 
 } catch(Exception e) {
 s_logger.debug("Failed to create snapshot", e);
-if (backup) {
-
_resourceLimitMgr.decrementResourceCount(snapshotOwner.getId(), 
ResourceType.secondary_storage,
-new Long(volume.getSize()));
-} else {
-
_resourceLimitMgr.decrementResourceCount(snapshotOwner.getId(), 
ResourceType.primary_storage,
-new Long(volume.getSize()));
-}
 throw new CloudRuntimeException("Failed to create snapshot", e);
 }
 
@@ -423,6 +415,7 @@ public class SnapshotManagerImpl extends ManagerBase 
implements SnapshotManager,
 s_logger.error("Unable to find snaphot strategy to handle snapshot 
with id '"+snapshotId+"'");
 return false;
 }
+SnapshotDataStoreVO snapshotStoreRef = 
_snapshotStoreDao.findBySnapshot(snapshotId, DataStoreRole.Image);
 
 try {
 boolean result = snapshotStrategy.deleteSnapshot(snapshotId);
@@ -433,8 +426,7 @@ public class SnapshotManagerImpl extends ManagerBase 
implements SnapshotManager,
 snapshotCheck.getClass().getName(), 
snapshotCheck.getUuid());
 }
 
_resourceLimitMgr.decrementResourceCount(snapshotCheck.getAccountId(), 
ResourceType.snapshot);
-
_resourceLimitMgr.decrementResourceCount(snapshotCheck.getAccountId(), 
ResourceType.secondary_storage,
-new Long(snapshotCheck.getSize()));
+
_resourceLimitMgr.decrementResourceCount(snapshotCheck.getAccountId(), 
ResourceType.secondary_storage, new Long(snapshotStoreRef.getSize()));
 }
 return result;
 } catch (Exception e) {
@@ -618,12 +610,12 @@ public class SnapshotManagerImpl extends ManagerBase 
implements SnapshotManager,
 s_logger.error("Unable to find snaphot strategy to handle 
snapshot with id '"+snapshot.getId()+"'");
 continue;
 }
+SnapshotDataStoreVO snapshotStoreRef = 
_snapshotStoreDao.findBySnapshot(snapshot.getId(), DataStoreRole.Image);
 
 if (snapshotStrategy.deleteSnapshot(snapshot.getId())) {
 if (snapshot.getRecurringType() == Type.MANUAL) {
 _resourceLimitMgr.decrementResourceCount(accountId, 
ResourceType.snapshot);
-_resourceLimitMgr.decrementResourceCount(accountId, 
ResourceType.secondary_storage,
-new Long(snapshot.getSize()));
+_resourceLimitMgr.decrementResourceCount(accountId, 
ResourceType.secondary_storage, new Long(snapshotStoreRef.getSize()));
 }
 
 // Log event after successful deletion
@@ -957,18 +949,15 @@ public class SnapshotManagerImpl extends ManagerBase 
implements SnapshotManager,
 snapshot.getDataCenterId(), snapshotId, 
snapshot.getName(), null, null,
 

git commit: updated refs/heads/master to 62c9343

2014-01-06 Thread dahn
Updated Branches:
  refs/heads/master c2b5addae -> 62c934365


compare null to non-null or not-empty-string


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

Branch: refs/heads/master
Commit: 62c9343658cec3ec36d326e7a03e0107e3e87bd3
Parents: c2b5add
Author: Daan Hoogland 
Authored: Mon Jan 6 11:28:50 2014 +0100
Committer: Daan Hoogland 
Committed: Mon Jan 6 11:28:50 2014 +0100

--
 utils/src/com/cloud/utils/net/NetUtils.java  | 6 ++
 utils/test/com/cloud/utils/net/NetUtilsTest.java | 1 +
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/62c93436/utils/src/com/cloud/utils/net/NetUtils.java
--
diff --git a/utils/src/com/cloud/utils/net/NetUtils.java 
b/utils/src/com/cloud/utils/net/NetUtils.java
index 905e518..becca37 100755
--- a/utils/src/com/cloud/utils/net/NetUtils.java
+++ b/utils/src/com/cloud/utils/net/NetUtils.java
@@ -1398,6 +1398,12 @@ public class NetUtils {
 {
 return true;
 }
+if ((one == null || other == null)
+&&
+!(one == null && other == null))
+{
+return false;
+}
 // check 'untagged'
 if (VLAN_UNTAGGED.equalsIgnoreCase(one) && 
VLAN_UNTAGGED.equalsIgnoreCase(other))
 {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/62c93436/utils/test/com/cloud/utils/net/NetUtilsTest.java
--
diff --git a/utils/test/com/cloud/utils/net/NetUtilsTest.java 
b/utils/test/com/cloud/utils/net/NetUtilsTest.java
index 6d14593..600b69e 100644
--- a/utils/test/com/cloud/utils/net/NetUtilsTest.java
+++ b/utils/test/com/cloud/utils/net/NetUtilsTest.java
@@ -182,5 +182,6 @@ public class NetUtilsTest extends TestCase {
 assertTrue(NetUtils.isSameIsolationId("UnTagged", "vlan://uNtAGGED"));
 assertFalse(NetUtils.isSameIsolationId("2", "vlan://uNtAGGED"));
 assertFalse(NetUtils.isSameIsolationId("2", "vlan://3"));
+assertFalse(NetUtils.isSameIsolationId("bla", null));
 }
 }



git commit: updated refs/heads/master to 1069f56

2014-01-06 Thread sanjaytripathi
Updated Branches:
  refs/heads/master 62c934365 -> 1069f56f8


CLOUDSTACK-5406: Not able to take snapshot becasue of secondary_storage limit 
of 400 gb exceeded even though we have not really consumed this limit in 
secondary store.


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

Branch: refs/heads/master
Commit: 1069f56f8e6ab22f1dd63f00e7cfe7c7d71be8bf
Parents: 62c9343
Author: Sanjay Tripathi 
Authored: Mon Jan 6 15:39:06 2014 +0530
Committer: Sanjay Tripathi 
Committed: Mon Jan 6 16:09:09 2014 +0530

--
 .../storage/snapshot/SnapshotManagerImpl.java   | 33 ++--
 1 file changed, 10 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1069f56f/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
--
diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java 
b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
index c19e3ec..998a941 100755
--- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
+++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
@@ -322,16 +322,10 @@ public class SnapshotManagerImpl extends ManagerBase 
implements SnapshotManager,
 
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_SNAPSHOT_CREATE, 
snapshot.getAccountId(), snapshot.getDataCenterId(), snapshotId, 
snapshot.getName(),
 null, null, volume.getSize(), 
snapshot.getClass().getName(), snapshot.getUuid());
 }
-
 _resourceLimitMgr.incrementResourceCount(snapshotOwner.getId(), 
ResourceType.snapshot);
 
 } catch (Exception e) {
 s_logger.debug("Failed to create snapshot", e);
-if (backup) {
-
_resourceLimitMgr.decrementResourceCount(snapshotOwner.getId(), 
ResourceType.secondary_storage, new Long(volume.getSize()));
-} else {
-
_resourceLimitMgr.decrementResourceCount(snapshotOwner.getId(), 
ResourceType.primary_storage, new Long(volume.getSize()));
-}
 throw new CloudRuntimeException("Failed to create snapshot", e);
 }
 
@@ -427,6 +421,7 @@ public class SnapshotManagerImpl extends ManagerBase 
implements SnapshotManager,
 s_logger.error("Unable to find snaphot strategy to handle snapshot 
with id '" + snapshotId + "'");
 return false;
 }
+SnapshotDataStoreVO snapshotStoreRef = 
_snapshotStoreDao.findBySnapshot(snapshotId, DataStoreRole.Image);
 
 try {
 boolean result = snapshotStrategy.deleteSnapshot(snapshotId);
@@ -436,7 +431,7 @@ public class SnapshotManagerImpl extends ManagerBase 
implements SnapshotManager,
 snapshotCheck.getName(), null, null, 0L, 
snapshotCheck.getClass().getName(), snapshotCheck.getUuid());
 }
 
_resourceLimitMgr.decrementResourceCount(snapshotCheck.getAccountId(), 
ResourceType.snapshot);
-
_resourceLimitMgr.decrementResourceCount(snapshotCheck.getAccountId(), 
ResourceType.secondary_storage, new Long(snapshotCheck.getSize()));
+
_resourceLimitMgr.decrementResourceCount(snapshotCheck.getAccountId(), 
ResourceType.secondary_storage, new Long(snapshotStoreRef.getSize()));
 }
 return result;
 } catch (Exception e) {
@@ -621,11 +616,12 @@ public class SnapshotManagerImpl extends ManagerBase 
implements SnapshotManager,
 s_logger.error("Unable to find snaphot strategy to handle 
snapshot with id '" + snapshot.getId() + "'");
 continue;
 }
+SnapshotDataStoreVO snapshotStoreRef = 
_snapshotStoreDao.findBySnapshot(snapshot.getId(), DataStoreRole.Image);
 
 if (snapshotStrategy.deleteSnapshot(snapshot.getId())) {
 if (snapshot.getRecurringType() == Type.MANUAL) {
 _resourceLimitMgr.decrementResourceCount(accountId, 
ResourceType.snapshot);
-_resourceLimitMgr.decrementResourceCount(accountId, 
ResourceType.secondary_storage, new Long(snapshot.getSize()));
+_resourceLimitMgr.decrementResourceCount(accountId, 
ResourceType.secondary_storage, new Long(snapshotStoreRef.getSize()));
 }
 
 // Log event after successful deletion
@@ -954,16 +950,15 @@ public class SnapshotManagerImpl extends ManagerBase 
implements SnapshotManager,
 
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_SNAPSHOT_CREATE

git commit: updated refs/heads/4.3 to 7fc3c4f

2014-01-06 Thread devdeep
Updated Branches:
  refs/heads/4.3 96823d3a6 -> 7fc3c4fd1


CLOUDSTACK-5788, CLOUDSTACK-5789: Attaching upload volume and download
volume was failing for hyper-v. Copy command answer was failing while
creating the answer object. Fixing the issue.


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

Branch: refs/heads/4.3
Commit: 7fc3c4fd1531e9399031d71010fcc1a097aa2e02
Parents: 96823d3
Author: Devdeep Singh 
Authored: Mon Jan 6 23:33:55 2014 +0530
Committer: Devdeep Singh 
Committed: Mon Jan 6 16:34:46 2014 +0530

--
 .../ServerResource/HypervResource/CloudStackTypes.cs  |  2 +-
 .../HypervResource/HypervResourceController.cs| 14 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7fc3c4fd/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
--
diff --git 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
index 314c26b..226610b 100644
--- 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
+++ 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
@@ -187,7 +187,7 @@ namespace HypervResource
 throw new InvalidDataException(errMsg);
 }
 
-if (!Path.HasExtension(fileName) && this.format != null)
+if (fileName != null && !Path.HasExtension(fileName) && 
this.format != null)
 {
 fileName = fileName + "." + this.format.ToLowerInvariant();
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7fc3c4fd/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 c5545e2..c678c01 100644
--- 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
+++ 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
@@ -1321,14 +1321,16 @@ namespace HypervResource
 object newData = null;
 TemplateObjectTO destTemplateObjectTO = null;
 VolumeObjectTO destVolumeObjectTO = null;
+VolumeObjectTO srcVolumeObjectTO = null;
+TemplateObjectTO srcTemplateObjectTO = null;
 
 try
 {
 dynamic timeout = cmd.wait;  // TODO: Useful?
 
-TemplateObjectTO srcTemplateObjectTO = 
TemplateObjectTO.ParseJson(cmd.srcTO);
+srcTemplateObjectTO = 
TemplateObjectTO.ParseJson(cmd.srcTO);
 destTemplateObjectTO = 
TemplateObjectTO.ParseJson(cmd.destTO);
-VolumeObjectTO srcVolumeObjectTO = 
VolumeObjectTO.ParseJson(cmd.srcTO);
+srcVolumeObjectTO = VolumeObjectTO.ParseJson(cmd.srcTO);
 destVolumeObjectTO = VolumeObjectTO.ParseJson(cmd.destTO);
 
 string destFile = null;
@@ -1512,11 +1514,9 @@ namespace HypervResource
 // doesn't do anything if the directory is 
already present.
 
Directory.CreateDirectory(Path.GetDirectoryName(destFile));
 File.Copy(srcFile, destFile);
-// create volumeto object deserialize and send 
it 
-VolumeObjectTO volume = new VolumeObjectTO();
-volume.path = destFile;
-volume.size = 
ulong.Parse(destVolumeObjectTO.size.ToString());
-JObject ansObj = 
Utils.CreateCloudStackObject(CloudStackTypes.VolumeObjectTO, volume);
+// Create volumeto object deserialize and send 
it
+destVolumeObjectTO.path = destFile;
+JObject ansObj = 
Utils.CreateCloudStackObject(CloudStackTypes.VolumeObjectTO, 
destVolumeObjectTO);
 newData = ansObj;
 result = true;
 }



[1/2] git commit: book info updated

2014-01-06 Thread radhika
Updated Branches:
  refs/heads/4.3 1066d4e27 -> 7b7730ef9


book info updated


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

Branch: refs/heads/4.3
Commit: 8fda87b9926ba16e3ea31867ff430522478f065a
Parents: 1066d4e
Author: Radhika PC 
Authored: Mon Jan 6 15:08:21 2014 +0530
Committer: Radhika PC 
Committed: Mon Jan 6 15:08:21 2014 +0530

--
 en-US/Book_Info.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/8fda87b9/en-US/Book_Info.xml
--
diff --git a/en-US/Book_Info.xml b/en-US/Book_Info.xml
index 327668d..75a1827 100644
--- a/en-US/Book_Info.xml
+++ b/en-US/Book_Info.xml
@@ -27,7 +27,7 @@
 &PRODUCT; Guide
 Revised August 9, 2012 10:48 pm Pacific
 Apache CloudStack
-4.2.0
+4.3.0
 1
 
 



[2/2] git commit: CLOUDSTACK-5288 system vm upgrade

2014-01-06 Thread radhika
CLOUDSTACK-5288 system vm upgrade


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

Branch: refs/heads/4.3
Commit: 7b7730ef998e09e12412a941040050dc60960e7a
Parents: 8fda87b
Author: Radhika PC 
Authored: Mon Jan 6 16:38:29 2014 +0530
Committer: Radhika PC 
Committed: Mon Jan 6 16:38:29 2014 +0530

--
 en-US/vr-upgrade.xml | 34 ++
 1 file changed, 34 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/7b7730ef/en-US/vr-upgrade.xml
--
diff --git a/en-US/vr-upgrade.xml b/en-US/vr-upgrade.xml
new file mode 100644
index 000..bfe1e71
--- /dev/null
+++ b/en-US/vr-upgrade.xml
@@ -0,0 +1,34 @@
+
+http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
+
+%BOOK_ENTITIES;
+]>
+
+
+
+  Rolling Upgrade for System VMs
+  Upgrading System VMs is made flexible. The &PRODUCT; administrators 
will be able to control
+the sequence of the System VM upgrades. The sequencing is based on 
Infrastructure hierarchy,
+such as by Cluster, Pod, or Zone, and Administrative hierarchy, such as by 
Tenant or Domain. As
+an administrator, you can also determine when a particular customer 
service, such as VR, is
+upgraded within a specified upgrade interval. During the entire duration 
of the upgrade, users
+can launch new services or make changes to an existing service. 
Additionally, upgrade operation
+is enhanced to increase the upgrade speed by allowing as many upgrade 
operations in parallel as
+possible.
+



git commit: CLOUDSTACK-5288 system vm upgrade

2014-01-06 Thread radhika
Updated Branches:
  refs/heads/master 1ae8b3ea8 -> 36524fcda


CLOUDSTACK-5288 system vm upgrade


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

Branch: refs/heads/master
Commit: 36524fcda7780a46ec45a430fe45e28096db8063
Parents: 1ae8b3e
Author: Radhika PC 
Authored: Mon Jan 6 16:38:29 2014 +0530
Committer: Radhika PC 
Committed: Mon Jan 6 16:39:25 2014 +0530

--
 en-US/vr-upgrade.xml | 34 ++
 1 file changed, 34 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/36524fcd/en-US/vr-upgrade.xml
--
diff --git a/en-US/vr-upgrade.xml b/en-US/vr-upgrade.xml
new file mode 100644
index 000..bfe1e71
--- /dev/null
+++ b/en-US/vr-upgrade.xml
@@ -0,0 +1,34 @@
+
+http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
+
+%BOOK_ENTITIES;
+]>
+
+
+
+  Rolling Upgrade for System VMs
+  Upgrading System VMs is made flexible. The &PRODUCT; administrators 
will be able to control
+the sequence of the System VM upgrades. The sequencing is based on 
Infrastructure hierarchy,
+such as by Cluster, Pod, or Zone, and Administrative hierarchy, such as by 
Tenant or Domain. As
+an administrator, you can also determine when a particular customer 
service, such as VR, is
+upgraded within a specified upgrade interval. During the entire duration 
of the upgrade, users
+can launch new services or make changes to an existing service. 
Additionally, upgrade operation
+is enhanced to increase the upgrade speed by allowing as many upgrade 
operations in parallel as
+possible.
+



git commit: book info updated to reflect 4.3

2014-01-06 Thread radhika
Updated Branches:
  refs/heads/master 36524fcda -> a2605a1b5


book info updated to reflect 4.3


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

Branch: refs/heads/master
Commit: a2605a1b53fa12907e82e6760adb5b0a1841a39f
Parents: 36524fc
Author: Radhika PC 
Authored: Mon Jan 6 16:41:07 2014 +0530
Committer: Radhika PC 
Committed: Mon Jan 6 16:41:07 2014 +0530

--
 en-US/Book_Info.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack-docs/blob/a2605a1b/en-US/Book_Info.xml
--
diff --git a/en-US/Book_Info.xml b/en-US/Book_Info.xml
index 327668d..d340ac9 100644
--- a/en-US/Book_Info.xml
+++ b/en-US/Book_Info.xml
@@ -25,9 +25,9 @@
 
 
 &PRODUCT; Guide
-Revised August 9, 2012 10:48 pm Pacific
+Revised January 6, 2014 10:48 pm Pacific
 Apache CloudStack
-4.2.0
+4.3.0
 1
 
 



git commit: updated refs/heads/master to 3116f51

2014-01-06 Thread devdeep
Updated Branches:
  refs/heads/master 1069f56f8 -> 3116f51a2


CLOUDSTACK-5788, CLOUDSTACK-5789: Attaching upload volume and download
volume was failing for hyper-v. Copy command answer was failing while
creating the answer object. Fixing the issue.


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

Branch: refs/heads/master
Commit: 3116f51a26e1673715e678ec327ba5089ff76c6d
Parents: 1069f56
Author: Devdeep Singh 
Authored: Mon Jan 6 23:33:55 2014 +0530
Committer: Devdeep Singh 
Committed: Mon Jan 6 16:36:03 2014 +0530

--
 .../ServerResource/HypervResource/CloudStackTypes.cs  |  2 +-
 .../HypervResource/HypervResourceController.cs| 14 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3116f51a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
--
diff --git 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
index 314c26b..226610b 100644
--- 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
+++ 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/CloudStackTypes.cs
@@ -187,7 +187,7 @@ namespace HypervResource
 throw new InvalidDataException(errMsg);
 }
 
-if (!Path.HasExtension(fileName) && this.format != null)
+if (fileName != null && !Path.HasExtension(fileName) && 
this.format != null)
 {
 fileName = fileName + "." + this.format.ToLowerInvariant();
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3116f51a/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 1725169..7f3befa 100644
--- 
a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
+++ 
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
@@ -1321,14 +1321,16 @@ namespace HypervResource
 object newData = null;
 TemplateObjectTO destTemplateObjectTO = null;
 VolumeObjectTO destVolumeObjectTO = null;
+VolumeObjectTO srcVolumeObjectTO = null;
+TemplateObjectTO srcTemplateObjectTO = null;
 
 try
 {
 dynamic timeout = cmd.wait;  // TODO: Useful?
 
-TemplateObjectTO srcTemplateObjectTO = 
TemplateObjectTO.ParseJson(cmd.srcTO);
+srcTemplateObjectTO = 
TemplateObjectTO.ParseJson(cmd.srcTO);
 destTemplateObjectTO = 
TemplateObjectTO.ParseJson(cmd.destTO);
-VolumeObjectTO srcVolumeObjectTO = 
VolumeObjectTO.ParseJson(cmd.srcTO);
+srcVolumeObjectTO = VolumeObjectTO.ParseJson(cmd.srcTO);
 destVolumeObjectTO = VolumeObjectTO.ParseJson(cmd.destTO);
 
 string destFile = null;
@@ -1512,11 +1514,9 @@ namespace HypervResource
 // doesn't do anything if the directory is 
already present.
 
Directory.CreateDirectory(Path.GetDirectoryName(destFile));
 File.Copy(srcFile, destFile);
-// create volumeto object deserialize and send 
it 
-VolumeObjectTO volume = new VolumeObjectTO();
-volume.path = destFile;
-volume.size = 
ulong.Parse(destVolumeObjectTO.size.ToString());
-JObject ansObj = 
Utils.CreateCloudStackObject(CloudStackTypes.VolumeObjectTO, volume);
+// Create volumeto object deserialize and send 
it
+destVolumeObjectTO.path = destFile;
+JObject ansObj = 
Utils.CreateCloudStackObject(CloudStackTypes.VolumeObjectTO, 
destVolumeObjectTO);
 newData = ansObj;
 result = true;
 }



git commit: updated refs/heads/4.3 to 2b2d599

2014-01-06 Thread koushik
Updated Branches:
  refs/heads/4.3 7fc3c4fd1 -> 2b2d5998d


CLOUDSTACK-5002: unable to destroy vm ;VM destroy failed in Stop i-2-59-VM 
Command due to You gave an invalid object reference. The object may have 
recently been deleted.

This is happening as concurrent operations are happening on the same VM. 
Earlier this was not seen as all vm operations were synchronized at agent 
layer. By making execute.in.sequence
global config to false this restriction is no longer there. In the latest code 
operations to a single vm are synchronized by maintaining a job queue. In some 
scenarios the destroy vm operation
was not going through this job queue mechanism and so was resulting in failures 
due to simultaneous operations.


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

Branch: refs/heads/4.3
Commit: 2b2d5998d7735d8c01ba015629e56a2034673c87
Parents: 7fc3c4f
Author: Koushik Das 
Authored: Mon Jan 6 18:19:06 2014 +0530
Committer: Koushik Das 
Committed: Mon Jan 6 18:19:06 2014 +0530

--
 .../src/com/cloud/vm/VirtualMachineManagerImpl.java | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2b2d5998/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
--
diff --git 
a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java 
b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 9ac549c..d069c01 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -456,7 +456,7 @@ public class VirtualMachineManagerImpl extends ManagerBase 
implements VirtualMac
 return;
 }
 
-advanceStop(vm, false);
+advanceStop(vm.getUuid(), false);
 
 try {
 if (!stateTransitTo(vm, VirtualMachine.Event.ExpungeOperation, 
vm.getHostId())) {
@@ -1525,13 +1525,15 @@ public class VirtualMachineManagerImpl extends 
ManagerBase implements VirtualMac
 s_logger.debug("Destroying vm " + vm);
 }
 
-advanceStop(vm, VmDestroyForcestop.value());
+advanceStop(vmUuid, VmDestroyForcestop.value());
 
 if (!_vmSnapshotMgr.deleteAllVMSnapshots(vm.getId(), null)) {
 s_logger.debug("Unable to delete all snapshots for " + vm);
 throw new CloudRuntimeException("Unable to delete vm snapshots for 
" + vm);
 }
 
+// reload the vm object from db
+vm = _vmDao.findByUuid(vmUuid);
 try {
 if (!stateTransitTo(vm, VirtualMachine.Event.DestroyRequested, 
vm.getHostId())) {
 s_logger.debug("Unable to destroy the vm because it is not in 
the correct state: " + vm);
@@ -2132,7 +2134,7 @@ public class VirtualMachineManagerImpl extends 
ManagerBase implements VirtualMac
 }
 
 try {
-advanceStop(vm, true);
+advanceStop(vmUuid, true);
 throw new CloudRuntimeException("Unable to migrate " + vm);
 } catch (ResourceUnavailableException e) {
 s_logger.debug("Unable to stop VM due to " + e.getMessage());
@@ -2693,7 +2695,7 @@ public class VirtualMachineManagerImpl extends 
ManagerBase implements VirtualMac
 if (agentState == State.Shutdowned) {
 if (serverState == State.Running || serverState == State.Starting 
|| serverState == State.Stopping) {
 try {
-advanceStop(vm, true);
+advanceStop(vm.getUuid(), true);
 } catch (AgentUnavailableException e) {
 assert (false) : "How do we hit this with forced on?";
 return null;
@@ -4207,7 +4209,7 @@ public class VirtualMachineManagerImpl extends 
ManagerBase implements VirtualMac
_vmDao.lockRow(vm.getId(), true);
 
List pendingWorkJobs = 
_workJobDao.listPendingWorkJobs(
-   VirtualMachine.Type.Instance, vm.getId(),
+   vm.getType(), vm.getId(),
VmWorkStop.class.getName());
 
VmWorkJobVO workJob = null;



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

2014-01-06 Thread kishan
Updated Branches:
  refs/heads/4.3 2b2d5998d -> 4dd38a9fb


CLOUDSTACK-5472 fixed the listvirtualmachines API to show cpu, memory and 
cpucores when using custom compute offering


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

Branch: refs/heads/4.3
Commit: 4dd38a9fb09d13df6fd58bfc7ab19d37c0508308
Parents: 3a2cf48
Author: Bharat Kumar 
Authored: Thu Dec 26 14:28:31 2013 +0530
Committer: Kishan Kavala 
Committed: Mon Jan 6 18:40:39 2014 +0530

--
 setup/db/db/schema-420to421.sql | 23 +++
 1 file changed, 19 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4dd38a9f/setup/db/db/schema-420to421.sql
--
diff --git a/setup/db/db/schema-420to421.sql b/setup/db/db/schema-420to421.sql
index c09a1bb..78687f2 100644
--- a/setup/db/db/schema-420to421.sql
+++ b/setup/db/db/schema-420to421.sql
@@ -92,9 +92,18 @@ CREATE VIEW `cloud`.`user_vm_view` AS
 iso.display_text iso_display_text,
 service_offering.id service_offering_id,
 disk_offering.uuid service_offering_uuid,
-service_offering.cpu cpu,
-service_offering.speed speed,
-service_offering.ram_size ram_size,
+Case
+ When (`cloud`.`service_offering`.`cpu` is null) then 
(`custom_cpu`.`value`)
+ Else ( `cloud`.`service_offering`.`cpu`)
+End as `cpu`,
+Case
+When (`cloud`.`service_offering`.`speed` is null) then 
(`custom_speed`.`value`)
+Else ( `cloud`.`service_offering`.`speed`)
+End as `speed`,
+Case
+When (`cloud`.`service_offering`.`ram_size` is null) then 
(`custom_ram_size`.`value`)
+Else ( `cloud`.`service_offering`.`ram_size`)
+END as `ram_size`,
 disk_offering.name service_offering_name,
 storage_pool.id pool_id,
 storage_pool.uuid pool_uuid,
@@ -216,7 +225,13 @@ CREATE VIEW `cloud`.`user_vm_view` AS
 left join
 `cloud`.`affinity_group` ON affinity_group_vm_map.affinity_group_id = 
affinity_group.id
 left join
-`cloud`.`user_vm_details` as all_details ON all_details.vm_id = 
vm_instance.id;
+`cloud`.`user_vm_details` as all_details ON all_details.vm_id = 
vm_instance.id
+left join
+`cloud`.`user_vm_details` `custom_cpu`  ON (((`custom_cpu`.`vm_id` = 
`cloud`.`vm_instance`.`id`) and (`custom_cpu`.`name` = 'CpuNumber')))
+left join
+`cloud`.`user_vm_details` `custom_speed`  ON (((`custom_speed`.`vm_id` 
= `cloud`.`vm_instance`.`id`) and (`custom_speed`.`name` = 'CpuSpeed')))
+   left join
+`cloud`.`user_vm_details` `custom_ram_size`  ON 
(((`custom_ram_size`.`vm_id` = `cloud`.`vm_instance`.`id`) and 
(`custom_ram_size`.`name` = 'memory')));
 
 --Add the format for volumes table for uploaded volumes (CLOUDSTACK-5013)
 update  `cloud`.`volumes` v,  `cloud`.`volume_host_ref` vhr  set 
v.format=vhr.format where v.id=vhr.volume_id and v.format is null;



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

2014-01-06 Thread kishan
CLOUDSTACK-5750 Make default value of execute.in.sequence.hypervisor.commands 
false.


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

Branch: refs/heads/4.3
Commit: 3a2cf48d92af2566271359b1b8bfa3b335cf54ce
Parents: 2b2d599
Author: Bharat Kumar 
Authored: Fri Jan 3 12:59:07 2014 +0530
Committer: Kishan Kavala 
Committed: Mon Jan 6 18:40:39 2014 +0530

--
 engine/api/src/com/cloud/vm/VirtualMachineManager.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3a2cf48d/engine/api/src/com/cloud/vm/VirtualMachineManager.java
--
diff --git a/engine/api/src/com/cloud/vm/VirtualMachineManager.java 
b/engine/api/src/com/cloud/vm/VirtualMachineManager.java
index d182126..203a4ac 100644
--- a/engine/api/src/com/cloud/vm/VirtualMachineManager.java
+++ b/engine/api/src/com/cloud/vm/VirtualMachineManager.java
@@ -48,9 +48,9 @@ import org.apache.cloudstack.framework.config.ConfigKey;
  */
 public interface VirtualMachineManager extends Manager {
 
-static final ConfigKey ExecuteInSequence = new 
ConfigKey("Advanced", Boolean.class, 
"execute.in.sequence.hypervisor.commands", "true",
+static final ConfigKey ExecuteInSequence = new 
ConfigKey("Advanced", Boolean.class, 
"execute.in.sequence.hypervisor.commands", "false",
 "If set to true, StartCommand, StopCommand, CopyCommand, 
MigrateCommand will be synchronized on the agent side."
-+ " If set to false, these commands become asynchronous. 
Default value is true.", true);
++ " If set to false, these commands become asynchronous. 
Default value is false.", false);
 
 
 public interface Topics {



[1/2] git commit: updated refs/heads/master to 91181a3

2014-01-06 Thread kishan
Updated Branches:
  refs/heads/master 3116f51a2 -> 91181a3b2


CLOUDSTACK-5750 Make default value of execute.in.sequence.hypervisor.commands 
false.

Conflicts:
engine/api/src/com/cloud/vm/VirtualMachineManager.java


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

Branch: refs/heads/master
Commit: 17023c0d60e99fe78f641531b899aebf2b5e2d50
Parents: 3116f51
Author: Bharat Kumar 
Authored: Fri Jan 3 12:59:07 2014 +0530
Committer: Kishan Kavala 
Committed: Mon Jan 6 18:43:23 2014 +0530

--
 engine/api/src/com/cloud/vm/VirtualMachineManager.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/17023c0d/engine/api/src/com/cloud/vm/VirtualMachineManager.java
--
diff --git a/engine/api/src/com/cloud/vm/VirtualMachineManager.java 
b/engine/api/src/com/cloud/vm/VirtualMachineManager.java
index 4f4a652..0de5156 100644
--- a/engine/api/src/com/cloud/vm/VirtualMachineManager.java
+++ b/engine/api/src/com/cloud/vm/VirtualMachineManager.java
@@ -48,9 +48,10 @@ import com.cloud.utils.fsm.NoTransitionException;
  * Manages allocating resources to vms.
  */
 public interface VirtualMachineManager extends Manager {
+
 static final ConfigKey ExecuteInSequence = new 
ConfigKey("Advanced", Boolean.class, 
"execute.in.sequence.hypervisor.commands", "false",
-"If set to true, StartCommand, StopCommand, CopyCommand, 
MigrateCommand will be synchronized on the agent side."
-+ " If set to false, these commands become asynchronous. Default 
value is false.", true);
+"If set to true, StartCommand, StopCommand, CopyCommand, 
MigrateCommand will be synchronized on the agent side."
++ " If set to false, these commands become asynchronous. 
Default value is false.", false);
 
 public interface Topics {
 public static final String VM_POWER_STATE = "vm.powerstate";



[2/2] git commit: updated refs/heads/master to 91181a3

2014-01-06 Thread kishan
CLOUDSTACK-5472 fixed the listvirtualmachines API to show cpu, memory and 
cpucores when using custom compute offering


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

Branch: refs/heads/master
Commit: 91181a3b216357f09d69a50409ff0a505513239b
Parents: 17023c0
Author: Bharat Kumar 
Authored: Thu Dec 26 14:28:31 2013 +0530
Committer: Kishan Kavala 
Committed: Mon Jan 6 18:43:40 2014 +0530

--
 setup/db/db/schema-420to421.sql | 25 -
 1 file changed, 20 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91181a3b/setup/db/db/schema-420to421.sql
--
diff --git a/setup/db/db/schema-420to421.sql b/setup/db/db/schema-420to421.sql
index fe1e0d4..42e9c1e 100644
--- a/setup/db/db/schema-420to421.sql
+++ b/setup/db/db/schema-420to421.sql
@@ -91,9 +91,18 @@ CREATE VIEW `cloud`.`user_vm_view` AS
 iso.display_text iso_display_text,
 service_offering.id service_offering_id,
 disk_offering.uuid service_offering_uuid,
-service_offering.cpu cpu,
-service_offering.speed speed,
-service_offering.ram_size ram_size,
+Case
+ When (`cloud`.`service_offering`.`cpu` is null) then 
(`custom_cpu`.`value`)
+ Else ( `cloud`.`service_offering`.`cpu`)
+End as `cpu`,
+Case
+When (`cloud`.`service_offering`.`speed` is null) then 
(`custom_speed`.`value`)
+Else ( `cloud`.`service_offering`.`speed`)
+End as `speed`,
+Case
+When (`cloud`.`service_offering`.`ram_size` is null) then 
(`custom_ram_size`.`value`)
+Else ( `cloud`.`service_offering`.`ram_size`)
+END as `ram_size`,
 disk_offering.name service_offering_name,
 storage_pool.id pool_id,
 storage_pool.uuid pool_uuid,
@@ -215,7 +224,13 @@ CREATE VIEW `cloud`.`user_vm_view` AS
 left join
 `cloud`.`affinity_group` ON affinity_group_vm_map.affinity_group_id = 
affinity_group.id
 left join
-`cloud`.`user_vm_details` as all_details ON all_details.vm_id = 
vm_instance.id;
+`cloud`.`user_vm_details` as all_details ON all_details.vm_id = 
vm_instance.id
+left join
+`cloud`.`user_vm_details` `custom_cpu`  ON (((`custom_cpu`.`vm_id` = 
`cloud`.`vm_instance`.`id`) and (`custom_cpu`.`name` = 'CpuNumber')))
+left join
+`cloud`.`user_vm_details` `custom_speed`  ON (((`custom_speed`.`vm_id` 
= `cloud`.`vm_instance`.`id`) and (`custom_speed`.`name` = 'CpuSpeed')))
+   left join
+`cloud`.`user_vm_details` `custom_ram_size`  ON 
(((`custom_ram_size`.`vm_id` = `cloud`.`vm_instance`.`id`) and 
(`custom_ram_size`.`name` = 'memory')));
 
 --Add the format for volumes table for uploaded volumes (CLOUDSTACK-5013)
 update  `cloud`.`volumes` v,  `cloud`.`volume_host_ref` vhr  set 
v.format=vhr.format where v.id=vhr.volume_id and v.format is null;
@@ -225,4 +240,4 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES 
('Advanced', 'DEFAULT', 'manag
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 
'management-server', 'baremetal.ipmi.fail.retry', 'default', "ipmi interface 
will be temporary out of order after power opertions(e.g. cycle, on), it leads 
following commands fail immediately. The value specifies retry times before 
accounting it as real failure");
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 
'management-server', 'vmware.hung.wokervm.timeout', '7200', 'Worker VM timeout 
in seconds');
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Alert", 'DEFAULT', 
'management-server', "alert.smtp.connectiontimeout", "3", "Socket 
connection timeout value in milliseconds. -1 for infinite timeout.");
-INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Alert", 'DEFAULT', 
'management-server', "alert.smtp.timeout", "3", "Socket I/O timeout value 
in milliseconds. -1 for infinite timeout.");
\ No newline at end of file
+INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Alert", 'DEFAULT', 
'management-server', "alert.smtp.timeout", "3", "Socket I/O timeout value 
in milliseconds. -1 for infinite timeout.");



git commit: updated refs/heads/master to b1eb866

2014-01-06 Thread dahn
Updated Branches:
  refs/heads/master 91181a3b2 -> b1eb8665b


add column is_exclusive_gslb_provider is duplicated causing schema-421to430.sql 
to fail during install or upgrade


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

Branch: refs/heads/master
Commit: b1eb8665b7be7f27c52a9ee04498a3b475ef9b62
Parents: 91181a3
Author: Ian Southam 
Authored: Mon Jan 6 13:57:41 2014 +0100
Committer: Daan Hoogland 
Committed: Mon Jan 6 14:29:27 2014 +0100

--
 setup/db/db/schema-421to430.sql | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b1eb8665/setup/db/db/schema-421to430.sql
--
diff --git a/setup/db/db/schema-421to430.sql b/setup/db/db/schema-421to430.sql
index b7b1b2b..007d9f9 100644
--- a/setup/db/db/schema-421to430.sql
+++ b/setup/db/db/schema-421to430.sql
@@ -872,8 +872,6 @@ INSERT IGNORE INTO `cloud`.`vm_template` (id, uuid, 
unique_name, name, public, c
 
 UPDATE `cloud`.`configuration` SET `component` = 'VMSnapshotManager' WHERE 
`name` IN ("vmsnapshot.create.wait", "vmsnapshot.max");
 
-ALTER TABLE `cloud`.`external_load_balancer_devices` ADD COLUMN 
`is_exclusive_gslb_provider` int(1) unsigned NOT NULL DEFAULT 0 COMMENT '1 if 
load balancer appliance is acting exclusively as gslb service provider in the 
zone and can not be used for LB';
-
 CREATE TABLE `cloud`.`s2s_customer_gateway_details` (
   `id` bigint unsigned NOT NULL auto_increment,
   `s2s_customer_gateway_id` bigint unsigned NOT NULL COMMENT 'VPC gateway id',



git commit: updated refs/heads/4.3 to 531433c

2014-01-06 Thread talluri
Updated Branches:
  refs/heads/4.3 4dd38a9fb -> 531433c9d


CLOUDSTACK-5797: Fixed integration test for test_03_restore_vm_with_new_template


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

Branch: refs/heads/4.3
Commit: 531433c9d6b80aff6c7968cf4cb5ea67e770d303
Parents: 4dd38a9
Author: SrikanteswaraRao Talluri 
Authored: Mon Jan 6 19:44:20 2014 +0530
Committer: SrikanteswaraRao Talluri 
Committed: Mon Jan 6 19:44:20 2014 +0530

--
 test/integration/component/test_base_image_updation.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/531433c9/test/integration/component/test_base_image_updation.py
--
diff --git a/test/integration/component/test_base_image_updation.py 
b/test/integration/component/test_base_image_updation.py
index 762016f..af968cc 100644
--- a/test/integration/component/test_base_image_updation.py
+++ b/test/integration/component/test_base_image_updation.py
@@ -100,7 +100,7 @@ class Services:
 "name": "Public template - Xen",
 "ostype": "CentOS 5.3 (64-bit)",
 "url": 
"http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2";,
-"hypervisor": "XenServer",
+"hypervisor": "xenserver",
 "format": "VHD",
 "isfeatured": True,
 "ispublic": True,
@@ -111,7 +111,7 @@ class Services:
 "name": "Public template -KVM",
 "ostype": "CentOS 5.3 (64-bit)",
 "url": 
"http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.qcow2.bz2";,
-"hypervisor": "KVM",
+"hypervisor": "kvm",
 "format": "qcow2",
 "isfeatured": True,
 "ispublic": True,
@@ -409,7 +409,7 @@ class TestBaseImageUpdate(cloudstackTestCase):
 hypervisor = host_list_validation_result[1].hypervisor
 
 for k, v in self.services["templates"].items():
-if k == hypervisor:
+if k.lower() == hypervisor.lower():
 # Register new template
 template = Template.register(
 self.apiclient,



git commit: updated refs/heads/master to 75ebc03

2014-01-06 Thread talluri
Updated Branches:
  refs/heads/master b1eb8665b -> 75ebc0369


CLOUDSTACK-5797: Fixed integration test for test_03_restore_vm_with_new_template


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

Branch: refs/heads/master
Commit: 75ebc03693fc85c182b6819c43243aa5b56c7f51
Parents: b1eb866
Author: SrikanteswaraRao Talluri 
Authored: Mon Jan 6 19:44:20 2014 +0530
Committer: SrikanteswaraRao Talluri 
Committed: Mon Jan 6 19:46:05 2014 +0530

--
 test/integration/component/test_base_image_updation.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/75ebc036/test/integration/component/test_base_image_updation.py
--
diff --git a/test/integration/component/test_base_image_updation.py 
b/test/integration/component/test_base_image_updation.py
index 762016f..af968cc 100644
--- a/test/integration/component/test_base_image_updation.py
+++ b/test/integration/component/test_base_image_updation.py
@@ -100,7 +100,7 @@ class Services:
 "name": "Public template - Xen",
 "ostype": "CentOS 5.3 (64-bit)",
 "url": 
"http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2";,
-"hypervisor": "XenServer",
+"hypervisor": "xenserver",
 "format": "VHD",
 "isfeatured": True,
 "ispublic": True,
@@ -111,7 +111,7 @@ class Services:
 "name": "Public template -KVM",
 "ostype": "CentOS 5.3 (64-bit)",
 "url": 
"http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.qcow2.bz2";,
-"hypervisor": "KVM",
+"hypervisor": "kvm",
 "format": "qcow2",
 "isfeatured": True,
 "ispublic": True,
@@ -409,7 +409,7 @@ class TestBaseImageUpdate(cloudstackTestCase):
 hypervisor = host_list_validation_result[1].hypervisor
 
 for k, v in self.services["templates"].items():
-if k == hypervisor:
+if k.lower() == hypervisor.lower():
 # Register new template
 template = Template.register(
 self.apiclient,



git commit: updated refs/heads/master to d69a350

2014-01-06 Thread dahn
Updated Branches:
  refs/heads/master 75ebc0369 -> d69a35086


another issue with vlan-number vs vlan-uri

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

Branch: refs/heads/master
Commit: d69a35086f81589c7f86b37cfbed892c821d84b9
Parents: 75ebc03
Author: Daan Hoogland 
Authored: Mon Jan 6 15:25:35 2014 +0100
Committer: Daan Hoogland 
Committed: Mon Jan 6 15:25:35 2014 +0100

--
 .../src/com/cloud/network/element/NiciraNvpElement.java   | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d69a3508/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
--
diff --git 
a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
 
b/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
index 9671290..aa469cf 100644
--- 
a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
+++ 
b/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
@@ -245,7 +245,15 @@ public class NiciraNvpElement extends AdapterBase 
implements ConnectivityProvide
 PublicIp sourceNatIp = 
ipAddrMgr.assignSourceNatIpAddressToGuestNetwork(owner, network);
 String publicCidr = sourceNatIp.getAddress().addr() + "/" + 
NetUtils.getCidrSize(sourceNatIp.getVlanNetmask());
 String internalCidr = network.getGateway() + "/" + 
network.getCidr().split("/")[1];
-long vlanid = (Vlan.UNTAGGED.equals(sourceNatIp.getVlanTag())) ? 0 
: Long.parseLong(sourceNatIp.getVlanTag());
+// assuming a vlan:
+String vtag = sourceNatIp.getVlanTag();
+BroadcastDomainType tiep = BroadcastDomainType.toEnumValue(vtag);
+if (tiep == BroadcastDomainType.Vlan) {
+vtag = 
BroadcastDomainType.Vlan.getValueFrom(BroadcastDomainType.fromString(vtag));
+} else if (tiep != BroadcastDomainType.UnDecided) {
+throw new CloudRuntimeException("only vlans are supported for 
sourceNatIp, at this moment: " + vtag);
+}
+long vlanid = (Vlan.UNTAGGED.equals(sourceNatIp.getVlanTag())) ? 0 
: Long.parseLong(vtag);
 
 CreateLogicalRouterCommand cmd =
 new 
CreateLogicalRouterCommand(niciraNvpHost.getDetail("l3gatewayserviceuuid"), 
vlanid, BroadcastDomainType.getValue(network.getBroadcastUri()),



git commit: updated refs/heads/4.3 to f10bd71

2014-01-06 Thread likithas
Updated Branches:
  refs/heads/4.3 531433c9d -> f10bd7115


CLOUDSTACK-5780. [VMware] ESXi 5.5 - During live volume migration of ROOT and 
DATA volumes, suitable storage list is always empty
Update hypervisor_capabilities to include capabilities for ESXi host 5.5


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

Branch: refs/heads/4.3
Commit: f10bd711590500da14612b9ac7d88197dfe3b2b8
Parents: 531433c
Author: Likitha Shetty 
Authored: Mon Jan 6 19:54:24 2014 +0530
Committer: Likitha Shetty 
Committed: Mon Jan 6 20:04:06 2014 +0530

--
 setup/db/db/schema-421to430.sql | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f10bd711/setup/db/db/schema-421to430.sql
--
diff --git a/setup/db/db/schema-421to430.sql b/setup/db/db/schema-421to430.sql
index 284fb17..0ee97de 100644
--- a/setup/db/db/schema-421to430.sql
+++ b/setup/db/db/schema-421to430.sql
@@ -890,3 +890,5 @@ ALTER TABLE `cloud`.`vm_instance` DROP COLUMN `cpu`;
 ALTER TABLE `cloud`.`vm_instance` DROP COLUMN `ram`;
 ALTER TABLE `cloud`.`vm_instance` DROP COLUMN `speed`;
 
+INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(uuid, hypervisor_type, 
hypervisor_version, max_guests_limit, security_group_enabled, 
max_data_volumes_limit, max_hosts_per_cluster, storage_motion_supported, 
vm_snapshot_enabled) VALUES (UUID(), 'VMware', '5.5', 128, 0, 13, 32, 1, 1);
+



git commit: updated refs/heads/master to 617a71b

2014-01-06 Thread likithas
Updated Branches:
  refs/heads/master d69a35086 -> 617a71b45


CLOUDSTACK-5780. [VMware] ESXi 5.5 - During live volume migration of ROOT and 
DATA volumes, suitable storage list is always empty
Update hypervisor_capabilities to include capabilities for ESXi host 5.5


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

Branch: refs/heads/master
Commit: 617a71b450195d9dc5713ba2826f9d42a025a5cd
Parents: d69a350
Author: Likitha Shetty 
Authored: Mon Jan 6 19:54:24 2014 +0530
Committer: Likitha Shetty 
Committed: Mon Jan 6 20:07:29 2014 +0530

--
 setup/db/db/schema-421to430.sql | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/617a71b4/setup/db/db/schema-421to430.sql
--
diff --git a/setup/db/db/schema-421to430.sql b/setup/db/db/schema-421to430.sql
index 007d9f9..8d8343c 100644
--- a/setup/db/db/schema-421to430.sql
+++ b/setup/db/db/schema-421to430.sql
@@ -897,3 +897,5 @@ ALTER TABLE `cloud`.`vm_instance` DROP COLUMN `cpu`;
 ALTER TABLE `cloud`.`vm_instance` DROP COLUMN `ram`;
 ALTER TABLE `cloud`.`vm_instance` DROP COLUMN `speed`;
 
+INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(uuid, hypervisor_type, 
hypervisor_version, max_guests_limit, security_group_enabled, 
max_data_volumes_limit, max_hosts_per_cluster, storage_motion_supported, 
vm_snapshot_enabled) VALUES (UUID(), 'VMware', '5.5', 128, 0, 13, 32, 1, 1);
+



git commit: updated refs/heads/4.2 to 55a38ee

2014-01-06 Thread jessicawang
Updated Branches:
  refs/heads/4.2 79f609ca1 -> 55a38ee8f


CLOUDSTACK-5771: UI > Infrastructure > 
SystemVMs/PrimaryStorage/SecondaryStorage/Pod/Cluster/Hosts/CacheStorage page - 
pass keyword parameter instead of name parameter to listXXX API.


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

Branch: refs/heads/4.2
Commit: 55a38ee8ff0caa34a5b03ec9a189adbec4c58fd5
Parents: 79f609c
Author: Jessica Wang 
Authored: Fri Jan 3 14:23:44 2014 -0800
Committer: Jessica Wang 
Committed: Mon Jan 6 10:41:46 2014 -0800

--
 ui/scripts/system.js | 107 --
 1 file changed, 37 insertions(+), 70 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/55a38ee8/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index f632887..a66 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -6689,17 +6689,13 @@
 },
 pods: function() {
 var listView = $.extend(true, {}, 
cloudStack.sections.system.subsections.pods.listView, {
-dataProvider: function(args) {
-var searchByArgs = 
args.filterBy.search.value.length ?
-'&name=' + args.filterBy.search.value 
: '';
-
+dataProvider: function(args) { 

+var data = {};
+listViewDataProvider(args, data);
+   
 $.ajax({
-url: createURL('listPods' + 
searchByArgs),
-data: {
-page: args.page,
-pageSize: pageSize,
-listAll: true
-},
+url: createURL('listPods'),
+data: data,
 success: function(json) {
 args.response.success({
 data: json.listpodsresponse.pod
@@ -6739,17 +6735,13 @@
 },
 clusters: function() {
 var listView = $.extend(true, {}, 
cloudStack.sections.system.subsections.clusters.listView, {
-dataProvider: function(args) {
-var searchByArgs = 
args.filterBy.search.value.length ?
-'&name=' + args.filterBy.search.value 
: '';
-
+dataProvider: function(args) { 

+var data = {};
+listViewDataProvider(args, data);
+   
 $.ajax({
-url: createURL('listClusters' + 
searchByArgs),
-data: {
-page: args.page,
-pageSize: pageSize,
-listAll: true
-},
+url: createURL('listClusters'),
+data: data,
 success: function(json) {
 args.response.success({
 data: 
json.listclustersresponse.cluster
@@ -6789,19 +6781,14 @@
 },
 hosts: function() {
 var listView = $.extend(true, {}, 
cloudStack.sections.system.subsections.hosts.listView, {
-dataProvider: function(args) {
-var searchByArgs = 
args.filterBy.search.value.length ?
-'&name=' + args.filterBy.search.value 
: '';
-
+dataProvider: function(args) { 

 var data = {
-page: args.page,
-

git commit: updated refs/heads/4.2 to 1870124

2014-01-06 Thread jessicawang
Updated Branches:
  refs/heads/4.2 55a38ee8f -> 1870124c4


CLOUDSTACK-5771: UI > Infrastructure > SystemVMs page > listView Search > fix a 
bug that UI kept spinning when there was no matching result.


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

Branch: refs/heads/4.2
Commit: 1870124c430d10527d9bd2e122c6d3d5d0a9240b
Parents: 55a38ee
Author: Jessica Wang 
Authored: Fri Jan 3 14:55:53 2014 -0800
Committer: Jessica Wang 
Committed: Mon Jan 6 10:42:11 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1870124c/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index a66..fdaa239 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -6965,7 +6965,7 @@
 data: data,
 success: function(json) {
 var systemvmObjs = 
json.listsystemvmsresponse.systemvm;
-if (systemvmObjs != null) {
+if (systemvmObjs != undefined) {
 $.ajax({
 url: 
createURL("listHosts&listAll=true"),

 success: function(json) {
@@ -6981,15 +6981,13 @@
 args.response.success({
 data: systemvmObjs
 });
-},
-error: function(json) {
-
args.response.error(parseXMLHttpResponse(json));
 }
 });
+} else {
+   args.response.success({
+data: []
+});
 }
-},
-error: function(json) {
-
args.response.error(parseXMLHttpResponse(json));
 }
 });
 },



git commit: updated refs/heads/rbac to e02e19a

2014-01-06 Thread mchen
Updated Branches:
  refs/heads/rbac 28b81e423 -> e02e19a6f


Make AclApiServiceTest pass without changing ApiServerService signature.

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

Branch: refs/heads/rbac
Commit: e02e19a6f15808e81d302fb62dd54d6849c5460b
Parents: 28b81e4
Author: Min Chen 
Authored: Mon Jan 6 10:43:01 2014 -0800
Committer: Min Chen 
Committed: Mon Jan 6 10:43:01 2014 -0800

--
 server/src/com/cloud/api/ApiServerService.java| 2 +-
 .../plugin/test/org/apache/cloudstack/acl/AclApiServiceTest.java  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e02e19a6/server/src/com/cloud/api/ApiServerService.java
--
diff --git a/server/src/com/cloud/api/ApiServerService.java 
b/server/src/com/cloud/api/ApiServerService.java
index 2d6eba5..4a4ae1e 100644
--- a/server/src/com/cloud/api/ApiServerService.java
+++ b/server/src/com/cloud/api/ApiServerService.java
@@ -36,5 +36,5 @@ public interface ApiServerService {
 
 public String handleRequest(Map params, String responseType, StringBuffer 
auditTrailSb) throws ServerApiException;
 
-public Class getCmdClass(String cmdName);
+public Class getCmdClass(String cmdName);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e02e19a6/services/iam/plugin/test/org/apache/cloudstack/acl/AclApiServiceTest.java
--
diff --git 
a/services/iam/plugin/test/org/apache/cloudstack/acl/AclApiServiceTest.java 
b/services/iam/plugin/test/org/apache/cloudstack/acl/AclApiServiceTest.java
index 9604e01..11515ad 100644
--- a/services/iam/plugin/test/org/apache/cloudstack/acl/AclApiServiceTest.java
+++ b/services/iam/plugin/test/org/apache/cloudstack/acl/AclApiServiceTest.java
@@ -268,7 +268,8 @@ public class AclApiServiceTest {
 policies.add(policy);
 Long policyId = policy.getId();
 Long resId = 200L;
-
when(_apiServer.getCmdClass("listVirtualMachines")).thenReturn(ListVMsCmd.class);
+Class clz = ListVMsCmd.class;
+when(_apiServer.getCmdClass("listVirtualMachines")).thenReturn(clz);
 when(
 _iamSrv.addAclPermissionToAclPolicy(policyId, 
AclEntityType.VirtualMachine.toString(), PermissionScope.RESOURCE.toString(), 
resId, "listVirtualMachines",
 AccessType.ListEntry.toString(), 
Permission.Allow)).thenReturn(policy);



git commit: updated refs/heads/4.3 to 8619394

2014-01-06 Thread jessicawang
Updated Branches:
  refs/heads/4.3 f10bd7115 -> 8619394ab


CLOUDSTACK-5527: UI > accounts page > Add LDAP Account action > use plus(+) 
icon like Add Account action does.


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

Branch: refs/heads/4.3
Commit: 8619394ab4190949517a7fe16ee1c2886ad27298
Parents: f10bd71
Author: Jessica Wang 
Authored: Mon Jan 6 11:39:05 2014 -0800
Committer: Jessica Wang 
Committed: Mon Jan 6 11:39:15 2014 -0800

--
 ui/css/cloudstack3.css | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8619394a/ui/css/cloudstack3.css
--
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index a82298c..1338f38 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -12051,6 +12051,7 @@ div.ui-dialog div.autoscaler div.field-group 
div.form-container form div.form-it
 
 .add .icon,
 .addNew .icon,
+.addLdapAccount .icon,
 .assignVm .icon,
 .rootAdminAddGuestNetwork .icon {
   background-position: -37px -61px;
@@ -12058,6 +12059,7 @@ div.ui-dialog div.autoscaler div.field-group 
div.form-container form div.form-it
 
 .add:hover .icon,
 .addNew:hover .icon,
+.addLdapAccount:hover .icon,
 .assignVm:hover .icon,
 .rootAdminAddGuestNetwork:hover .icon {
   background-position: -37px -643px;



git commit: updated refs/heads/4.3 to e542aef

2014-01-06 Thread edison
Updated Branches:
  refs/heads/4.3 8619394ab -> e542aefdc


CLOUDSTACK-5573: bump gson version to 1.7.2, fix 
https://code.google.com/p/google-gson/issues/detail?id=354


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

Branch: refs/heads/4.3
Commit: e542aefdc8a532f44638069b56e0613e54dd0945
Parents: 8619394
Author: edison 
Authored: Mon Jan 6 11:41:18 2014 -0800
Committer: edison 
Committed: Mon Jan 6 11:42:26 2014 -0800

--
 .../datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java | 2 --
 pom.xml| 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e542aefd/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java
--
diff --git 
a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java
 
b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java
index f1690fd..b4d24d8 100644
--- 
a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java
+++ 
b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java
@@ -77,8 +77,6 @@ public class CloudStackPrimaryDataStoreDriverImpl implements 
PrimaryDataStoreDri
 @Inject
 StorageManager storageMgr;
 @Inject
-VolumeOrchestrationService volumeMgr;
-@Inject
 VMInstanceDao vmDao;
 @Inject
 SnapshotDao snapshotDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e542aefd/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 31946d8..940eee3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,7 @@
 1.9.0
 build213-svnkit-1.3-patch
 2.6.6
-1.7.1
+1.7.2
 14.0-rc1
 5.6.100-1-SNAPSHOT
 3.1



git commit: updated refs/heads/master to beb9f2d

2014-01-06 Thread jessicawang
Updated Branches:
  refs/heads/master 617a71b45 -> beb9f2d9b


CLOUDSTACK-5527: UI > accounts page > Add LDAP Account action > use plus(+) 
icon like Add Account action does.


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

Branch: refs/heads/master
Commit: beb9f2d9b314499c99fc48147378c7be24798c0c
Parents: 617a71b
Author: Jessica Wang 
Authored: Mon Jan 6 11:39:05 2014 -0800
Committer: Jessica Wang 
Committed: Mon Jan 6 11:40:03 2014 -0800

--
 ui/css/cloudstack3.css | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/beb9f2d9/ui/css/cloudstack3.css
--
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index a82298c..1338f38 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -12051,6 +12051,7 @@ div.ui-dialog div.autoscaler div.field-group 
div.form-container form div.form-it
 
 .add .icon,
 .addNew .icon,
+.addLdapAccount .icon,
 .assignVm .icon,
 .rootAdminAddGuestNetwork .icon {
   background-position: -37px -61px;
@@ -12058,6 +12059,7 @@ div.ui-dialog div.autoscaler div.field-group 
div.form-container form div.form-it
 
 .add:hover .icon,
 .addNew:hover .icon,
+.addLdapAccount:hover .icon,
 .assignVm:hover .icon,
 .rootAdminAddGuestNetwork:hover .icon {
   background-position: -37px -643px;



git commit: updated refs/heads/master to 6d0dbf5

2014-01-06 Thread dahn
Updated Branches:
  refs/heads/master beb9f2d9b -> 6d0dbf596


check for BroadcastDomainTypes on sourceNatIp

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

Branch: refs/heads/master
Commit: 6d0dbf59683e1878533c8c985f26f18a1d69e1c1
Parents: beb9f2d
Author: Daan Hoogland 
Authored: Mon Jan 6 22:13:51 2014 +0100
Committer: Daan Hoogland 
Committed: Mon Jan 6 22:13:51 2014 +0100

--
 api/test/com/cloud/network/NetworksTest.java | 15 +++
 .../com/cloud/network/element/NiciraNvpElement.java  | 12 +---
 2 files changed, 24 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6d0dbf59/api/test/com/cloud/network/NetworksTest.java
--
diff --git a/api/test/com/cloud/network/NetworksTest.java 
b/api/test/com/cloud/network/NetworksTest.java
index 849b1b4..c9102d3 100644
--- a/api/test/com/cloud/network/NetworksTest.java
+++ b/api/test/com/cloud/network/NetworksTest.java
@@ -22,6 +22,7 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
+import com.cloud.dc.Vlan;
 import com.cloud.network.Networks.BroadcastDomainType;
 import com.cloud.network.Networks.IsolationType;
 import com.cloud.utils.exception.CloudRuntimeException;
@@ -56,6 +57,20 @@ public class NetworksTest {
 }
 
 @Test
+public void vlanValueTest() throws URISyntaxException {
+String uri1 = "vlan://1";
+String uri2 = "1";
+String vtag = 
BroadcastDomainType.Vlan.getValueFrom(BroadcastDomainType.fromString(uri1));
+Assert.assertEquals("vtag should be \"1\"", "1", vtag);
+BroadcastDomainType tiep1 = BroadcastDomainType.getTypeOf(uri1);
+Assert.assertEquals("the type of uri1 should be 'Vlan'", 
BroadcastDomainType.Vlan, tiep1);
+BroadcastDomainType tiep2 = BroadcastDomainType.getTypeOf(uri2);
+Assert.assertEquals("the type of uri1 should be 'Undecided'", 
BroadcastDomainType.UnDecided, tiep2);
+BroadcastDomainType tiep3 = 
BroadcastDomainType.getTypeOf(Vlan.UNTAGGED);
+Assert.assertEquals("the type of uri1 should be 'vlan'", 
BroadcastDomainType.Native, tiep3);
+}
+
+@Test
 public void vlanIsolationTypeTest() throws URISyntaxException {
 String uri1 = "vlan://1";
 Long value2 = 2L;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6d0dbf59/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
--
diff --git 
a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
 
b/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
index aa469cf..b200457 100644
--- 
a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
+++ 
b/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
@@ -16,6 +16,7 @@
 // under the License.
 package com.cloud.network.element;
 
+import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -247,13 +248,18 @@ public class NiciraNvpElement extends AdapterBase 
implements ConnectivityProvide
 String internalCidr = network.getGateway() + "/" + 
network.getCidr().split("/")[1];
 // assuming a vlan:
 String vtag = sourceNatIp.getVlanTag();
-BroadcastDomainType tiep = BroadcastDomainType.toEnumValue(vtag);
+BroadcastDomainType tiep = null;
+try {
+tiep = BroadcastDomainType.getTypeOf(vtag);
+} catch (URISyntaxException use) {
+throw new CloudRuntimeException("vlantag for sourceNatIp is 
not valid: " + vtag, use);
+}
 if (tiep == BroadcastDomainType.Vlan) {
 vtag = 
BroadcastDomainType.Vlan.getValueFrom(BroadcastDomainType.fromString(vtag));
-} else if (tiep != BroadcastDomainType.UnDecided) {
+} else if (!(tiep == BroadcastDomainType.UnDecided || tiep == 
BroadcastDomainType.Native)) {
 throw new CloudRuntimeException("only vlans are supported for 
sourceNatIp, at this moment: " + vtag);
 }
-long vlanid = (Vlan.UNTAGGED.equals(sourceNatIp.getVlanTag())) ? 0 
: Long.parseLong(vtag);
+long vlanid = (Vlan.UNTAGGED.equals(vtag)) ? 0 : 
Long.parseLong(vtag);
 
 CreateLogicalRouterCommand cmd =
 new 
CreateLogicalRouterCommand(niciraNvpHost.getDetail("l3gatewayse

git commit: updated refs/heads/rbac to 7114d49

2014-01-06 Thread mchen
Updated Branches:
  refs/heads/rbac e02e19a6f -> 7114d49c1


Some cleanup on AclApiService and remove array copy in some
implementations of IAMServiceImpl

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

Branch: refs/heads/rbac
Commit: 7114d49c14989b82ad2232adc3e9c38806d5706a
Parents: e02e19a
Author: Min Chen 
Authored: Mon Jan 6 13:27:29 2014 -0800
Committer: Min Chen 
Committed: Mon Jan 6 13:27:29 2014 -0800

--
 .../acl/RoleBasedEntityAccessChecker.java   | 19 +--
 .../cloudstack/acl/api/AclApiService.java   |  3 --
 .../cloudstack/acl/api/AclApiServiceImpl.java   | 16 --
 .../cloudstack/iam/server/IAMServiceImpl.java   | 56 +++-
 4 files changed, 47 insertions(+), 47 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7114d49c/services/iam/plugin/src/org/apache/cloudstack/acl/RoleBasedEntityAccessChecker.java
--
diff --git 
a/services/iam/plugin/src/org/apache/cloudstack/acl/RoleBasedEntityAccessChecker.java
 
b/services/iam/plugin/src/org/apache/cloudstack/acl/RoleBasedEntityAccessChecker.java
index e18..040a3e5 100644
--- 
a/services/iam/plugin/src/org/apache/cloudstack/acl/RoleBasedEntityAccessChecker.java
+++ 
b/services/iam/plugin/src/org/apache/cloudstack/acl/RoleBasedEntityAccessChecker.java
@@ -24,7 +24,6 @@ import javax.inject.Inject;
 
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.acl.api.AclApiService;
 import org.apache.cloudstack.iam.api.AclPolicy;
 import org.apache.cloudstack.iam.api.AclPolicyPermission;
 import org.apache.cloudstack.iam.api.IAMService;
@@ -41,8 +40,6 @@ public class RoleBasedEntityAccessChecker extends 
DomainChecker implements Secur
 
 @Inject
 AccountService _accountService;
-@Inject
-AclApiService _aclService;
 
 @Inject DomainDao _domainDao;
 
@@ -67,7 +64,7 @@ public class RoleBasedEntityAccessChecker extends 
DomainChecker implements Secur
 }
 
 // get all Policies of this caller w.r.t the entity
-List policies = _aclService.getEffectivePolicies(caller, 
entity);
+List policies = getEffectivePolicies(caller, entity);
 HashMap policyPermissionMap = new 
HashMap();
 
 for (AclPolicy policy : policies) {
@@ -120,4 +117,18 @@ public class RoleBasedEntityAccessChecker extends 
DomainChecker implements Secur
 
 return false;
 }
+
+private List getEffectivePolicies(Account caller, 
ControlledEntity entity) {
+
+// Get the static Policies of the Caller
+List policies = _iamSrv.listAclPolicies(caller.getId());
+
+// add any dynamic policies w.r.t the entity
+if (caller.getId() == entity.getAccountId()) {
+// The caller owns the entity
+policies.add(_iamSrv.getResourceOwnerPolicy());
+}
+
+return policies;
+}
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7114d49c/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiService.java
--
diff --git 
a/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiService.java 
b/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiService.java
index 12ecf8b..3d7bb3c 100644
--- a/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiService.java
+++ b/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiService.java
@@ -18,7 +18,6 @@ package org.apache.cloudstack.acl.api;
 
 import java.util.List;
 
-import org.apache.cloudstack.acl.ControlledEntity;
 import org.apache.cloudstack.acl.PermissionScope;
 import org.apache.cloudstack.acl.api.response.AclGroupResponse;
 import org.apache.cloudstack.acl.api.response.AclPolicyResponse;
@@ -60,8 +59,6 @@ public interface AclApiService {
 
 AclPolicyPermission getAclPolicyPermission(long accountId, String 
entityType, String action);
 
-List getEffectivePolicies(Account caller, ControlledEntity 
entity);
-
 /* Response Generation */
 AclPolicyResponse createAclPolicyResponse(AclPolicy policy);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7114d49c/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java
--
diff --git 
a/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java 
b/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java
index b117d0c..3fca5d5 100644
--- 
a/services/iam/plugin/src/org/apache/cloudstack/acl/api/AclApiServiceImpl.java
+++ 
b/services/ia

git commit: updated refs/heads/rbac to 2ee1ad1

2014-01-06 Thread prachidamle
Updated Branches:
  refs/heads/rbac 7114d49c1 -> 2ee1ad16e


Fixing unit tests for cloud-iam


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

Branch: refs/heads/rbac
Commit: 2ee1ad16e966c926d4370ff4370b30c2fe5abc23
Parents: 7114d49
Author: Prachi Damle 
Authored: Mon Jan 6 14:17:28 2014 -0800
Committer: Prachi Damle 
Committed: Mon Jan 6 14:18:05 2014 -0800

--
 services/iam/server/pom.xml |  4 ++
 .../iam/server/test/resources/db.properties | 75 
 2 files changed, 79 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ee1ad16/services/iam/server/pom.xml
--
diff --git a/services/iam/server/pom.xml b/services/iam/server/pom.xml
index bc3a698..8157cc0 100644
--- a/services/iam/server/pom.xml
+++ b/services/iam/server/pom.xml
@@ -27,6 +27,10 @@
 ../pom.xml
   
   
+   
+  commons-io
+  commons-io
+
 
   org.apache.cloudstack
   cloud-utils

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ee1ad16/services/iam/server/test/resources/db.properties
--
diff --git a/services/iam/server/test/resources/db.properties 
b/services/iam/server/test/resources/db.properties
new file mode 100644
index 000..e1b5fe9
--- /dev/null
+++ b/services/iam/server/test/resources/db.properties
@@ -0,0 +1,75 @@
+# 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.
+
+
+# management server clustering parameters, change cluster.node.IP to the 
machine IP address
+# in which the management server(Tomcat) is running
+cluster.node.IP=127.0.0.1
+cluster.servlet.port=9090
+region.id=1
+
+# CloudStack database settings
+db.cloud.username=cloud
+db.cloud.password=cloud
+db.root.password=
+db.cloud.host=localhost
+db.cloud.port=3306
+db.cloud.name=cloud
+
+# CloudStack database tuning parameters
+db.cloud.maxActive=250
+db.cloud.maxIdle=30
+db.cloud.maxWait=1
+db.cloud.autoReconnect=true
+db.cloud.validationQuery=SELECT 1
+db.cloud.testOnBorrow=true
+db.cloud.testWhileIdle=true
+db.cloud.timeBetweenEvictionRunsMillis=4
+db.cloud.minEvictableIdleTimeMillis=24
+db.cloud.poolPreparedStatements=false
+db.cloud.url.params=prepStmtCacheSize=517&cachePrepStmts=true&prepStmtCacheSqlLimit=4096
+
+# usage database settings
+db.usage.username=cloud
+db.usage.password=cloud
+db.usage.host=localhost
+db.usage.port=3306
+db.usage.name=cloud_usage
+
+# usage database tuning parameters
+db.usage.maxActive=100
+db.usage.maxIdle=30
+db.usage.maxWait=1
+db.usage.autoReconnect=true
+
+# awsapi database settings
+db.awsapi.username=cloud
+db.awsapi.password=cloud
+db.awsapi.host=localhost
+db.awsapi.port=3306
+db.awsapi.name=cloudbridge
+
+# Simulator database settings
+db.simulator.username=cloud
+db.simulator.password=cloud
+db.simulator.host=localhost
+db.simulator.port=3306
+db.simulator.name=simulator
+db.simulator.maxActive=250
+db.simulator.maxIdle=30
+db.simulator.maxWait=1
+db.simulator.autoReconnect=true



git commit: updated refs/heads/4.3 to 1425041

2014-01-06 Thread jessicawang
Updated Branches:
  refs/heads/4.3 e542aefdc -> 14250413b


CLOUDSTACK-5808: UI > SystemVMs page > pass details=min to listHosts API to 
reduce response time.


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

Branch: refs/heads/4.3
Commit: 14250413baf8116c3a4f3248bed2fb5d8fe327a9
Parents: e542aef
Author: Jessica Wang 
Authored: Mon Jan 6 14:21:09 2014 -0800
Committer: Jessica Wang 
Committed: Mon Jan 6 14:22:00 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14250413/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index bf34742..d3dbfd7 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7316,7 +7316,11 @@
 var systemvmObjs = 
json.listsystemvmsresponse.systemvm;
 if (systemvmObjs != undefined) {
 $.ajax({
-url: 
createURL("listHosts&listAll=true"),
+url: 
createURL('listHosts'),
+data: {
+listAll: true,
+details: 'min'
+},
 success: function(json) {
 var hostObjs = 
json.listhostsresponse.host;
 for (var i = 0; i < 
systemvmObjs.length; i++) {



git commit: updated refs/heads/master to 4528a0c

2014-01-06 Thread jessicawang
Updated Branches:
  refs/heads/master 6d0dbf596 -> 4528a0c0a


CLOUDSTACK-5808: UI > SystemVMs page > pass details=min to listHosts API to 
reduce response time.


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

Branch: refs/heads/master
Commit: 4528a0c0ae82d264482de99a00931de6655abb7e
Parents: 6d0dbf5
Author: Jessica Wang 
Authored: Mon Jan 6 14:21:09 2014 -0800
Committer: Jessica Wang 
Committed: Mon Jan 6 14:22:42 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4528a0c0/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 1313859..403fce0 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7875,7 +7875,11 @@
 var systemvmObjs = 
json.listsystemvmsresponse.systemvm;
 if (systemvmObjs != undefined) {
 $.ajax({
-url: 
createURL("listHosts&listAll=true"),
+url: 
createURL('listHosts'),
+data: {
+listAll: true,
+details: 'min'
+},
 success: function(json) {
 var hostObjs = 
json.listhostsresponse.host;
 for (var i = 0; i < 
systemvmObjs.length; i++) {



git commit: updated refs/heads/4.2 to 5e615f7

2014-01-06 Thread mchen
Updated Branches:
  refs/heads/4.2 1870124c4 -> 5e615f74b


CLOUDSTACK-5771:listImageStores returns error in keyword search.


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

Branch: refs/heads/4.2
Commit: 5e615f74b680916d4a9da2722012266e1e69e558
Parents: 1870124
Author: Min Chen 
Authored: Fri Jan 3 14:33:44 2014 -0800
Committer: Min Chen 
Committed: Mon Jan 6 14:29:17 2014 -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/5e615f74/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 66104b6..8032edb 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -2077,7 +2077,7 @@ public class QueryManagerImpl extends ManagerBase 
implements QueryService {
 if (keyword != null) {
 SearchCriteria ssc = 
_imageStoreJoinDao.createSearchCriteria();
 ssc.addOr("name", SearchCriteria.Op.LIKE, "%" + keyword + "%");
-ssc.addOr("provider", SearchCriteria.Op.LIKE, "%" + keyword + "%");
+ssc.addOr("providerName", SearchCriteria.Op.LIKE, "%" + keyword + 
"%");
 sc.addAnd("name", SearchCriteria.Op.SC, ssc);
 }
 



git commit: updated refs/heads/master to 89a20d3

2014-01-06 Thread mchen
Updated Branches:
  refs/heads/master 4528a0c0a -> 89a20d3ee


CLOUDSTACK-5771:listImageStores returns error in keyword search.


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

Branch: refs/heads/master
Commit: 89a20d3eed49ae4a37ad2a141e4d498b6677f0d2
Parents: 4528a0c
Author: Min Chen 
Authored: Fri Jan 3 14:33:44 2014 -0800
Committer: Min Chen 
Committed: Mon Jan 6 14:50:10 2014 -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/89a20d3e/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 8ae5159..89e911a 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -2083,7 +2083,7 @@ public class QueryManagerImpl extends ManagerBase 
implements QueryService {
 if (keyword != null) {
 SearchCriteria ssc = 
_imageStoreJoinDao.createSearchCriteria();
 ssc.addOr("name", SearchCriteria.Op.LIKE, "%" + keyword + "%");
-ssc.addOr("provider", SearchCriteria.Op.LIKE, "%" + keyword + "%");
+ssc.addOr("providerName", SearchCriteria.Op.LIKE, "%" + keyword + 
"%");
 sc.addAnd("name", SearchCriteria.Op.SC, ssc);
 }
 



[3/3] git commit: updated refs/heads/master to 4dcc567

2014-01-06 Thread alena1108
CLOUDSTACK-5812: pass podId information when request for secondary ip address 
in Basic zone guest network


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

Branch: refs/heads/master
Commit: 4dcc5671d17bd96feacda0c1999bf1e9a64f530e
Parents: b15431e
Author: Alena Prokharchyk 
Authored: Mon Jan 6 17:22:17 2014 -0800
Committer: Alena Prokharchyk 
Committed: Mon Jan 6 17:22:17 2014 -0800

--
 .../src/com/cloud/network/IpAddressManager.java   |  2 +-
 .../src/com/cloud/network/IpAddressManagerImpl.java   |  4 ++--
 server/src/com/cloud/network/NetworkServiceImpl.java  | 14 +-
 3 files changed, 16 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4dcc5671/engine/components-api/src/com/cloud/network/IpAddressManager.java
--
diff --git a/engine/components-api/src/com/cloud/network/IpAddressManager.java 
b/engine/components-api/src/com/cloud/network/IpAddressManager.java
index dc72ab5..9ccc946 100644
--- a/engine/components-api/src/com/cloud/network/IpAddressManager.java
+++ b/engine/components-api/src/com/cloud/network/IpAddressManager.java
@@ -170,6 +170,6 @@ public interface IpAddressManager {
 
 public String allocateGuestIP(Network network, String requestedIp) throws 
InsufficientAddressCapacityException;
 
-String allocatePublicIpForGuestNic(Network network, Account ipOwner, 
String requestedIp) throws InsufficientAddressCapacityException;
+String allocatePublicIpForGuestNic(Network network, Long podId, Account 
ipOwner, String requestedIp) throws InsufficientAddressCapacityException;
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4dcc5671/server/src/com/cloud/network/IpAddressManagerImpl.java
--
diff --git a/server/src/com/cloud/network/IpAddressManagerImpl.java 
b/server/src/com/cloud/network/IpAddressManagerImpl.java
index 5910196..6596074 100644
--- a/server/src/com/cloud/network/IpAddressManagerImpl.java
+++ b/server/src/com/cloud/network/IpAddressManagerImpl.java
@@ -1888,8 +1888,8 @@ public class IpAddressManagerImpl extends ManagerBase 
implements IpAddressManage
 }
 
 @Override
-public String allocatePublicIpForGuestNic(Network network, Account owner, 
String requestedIp) throws InsufficientAddressCapacityException {
-PublicIp ip = assignPublicIpAddress(network.getDataCenterId(), null, 
owner, VlanType.DirectAttached, network.getId(), requestedIp, false);
+public String allocatePublicIpForGuestNic(Network network, Long podId, 
Account owner, String requestedIp) throws InsufficientAddressCapacityException {
+PublicIp ip = assignPublicIpAddress(network.getDataCenterId(), podId, 
owner, VlanType.DirectAttached, network.getId(), requestedIp, false);
 if (ip == null) {
 s_logger.debug("There is no free public ip address");
 return null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4dcc5671/server/src/com/cloud/network/NetworkServiceImpl.java
--
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java 
b/server/src/com/cloud/network/NetworkServiceImpl.java
index aeb058c..fb6f3fd 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -679,8 +679,20 @@ public class NetworkServiceImpl extends ManagerBase 
implements NetworkService {
 throw new InvalidParameterValueException("Allocating guest ip 
for nic failed");
 }
 } else if (network.getGuestType() == Network.GuestType.Shared) {
+//for basic zone, need to provide the podId to ensure proper ip 
alloation
+Long podId = null;
+DataCenter dc = _dcDao.findById(network.getDataCenterId());
+
+if (dc.getNetworkType() == NetworkType.Basic) {
+VMInstanceVO vmi = (VMInstanceVO)vm;
+podId = vmi.getPodIdToDeployIn();
+if (podId == null) {
+throw new InvalidParameterValueException("vm pod id is 
null in Basic zone; can't decide the range for ip allocation");
+}
+}
+
 try {
-ipaddr = _ipAddrMgr.allocatePublicIpForGuestNic(network, 
ipOwner, requestedIp);
+ipaddr = _ipAddrMgr.allocatePublicIpForGuestNic(network, 
podId, ipOwner, requestedIp);
 if (ipaddr == null) {
 throw new InvalidParameterValueException("Allocating ip to

git commit: updated refs/heads/4.3 to f04da19

2014-01-06 Thread girish
Updated Branches:
  refs/heads/4.3 14250413b -> f04da1978


Revert "CLOUDSTACK-5637: Detach volume before migrating"

Volume need not be detached before being migrated.
This reverts commit 3b3adbf71268fea526e91a94e7d64fe511daf840.


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

Branch: refs/heads/4.3
Commit: f04da1978f5ef6a5da4e5b50d6ad6c0f341dc02e
Parents: 1425041
Author: Girish Shilamkar 
Authored: Tue Jan 7 12:34:17 2014 +0530
Committer: Girish Shilamkar 
Committed: Tue Jan 7 12:34:17 2014 +0530

--
 test/integration/component/test_stopped_vm.py | 15 ---
 1 file changed, 4 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f04da197/test/integration/component/test_stopped_vm.py
--
diff --git a/test/integration/component/test_stopped_vm.py 
b/test/integration/component/test_stopped_vm.py
index e8a90b7..e700c46 100644
--- a/test/integration/component/test_stopped_vm.py
+++ b/test/integration/component/test_stopped_vm.py
@@ -891,8 +891,6 @@ class TestDeployVM(cloudstackTestCase):
 "Running",
 "VM should be in Running state after deployment"
 )
-
-
 self.debug("Stopping instance: %s" % self.virtual_machine.name)
 self.virtual_machine.stop(self.apiclient)
 self.debug("Instance is stopped!")
@@ -941,11 +939,6 @@ class TestDeployVM(cloudstackTestCase):
 self.storage_id = spool.id
 self.storage_name = spool.name
 break
-
-self.debug("Detaching volume %s from vm %s" % (vol_response.id, 
self.virtual_machine.id))
-
-self.virtual_machine.detach_volume(self.apiclient, vol_response)
-
 self.debug("Migrating volume to storage pool: %s" % self.storage_name)
 Volume.migrate(
self.apiclient,
@@ -954,14 +947,14 @@ class TestDeployVM(cloudstackTestCase):
)
 volume = Volume.list(
   self.apiclient,
-  virtualmachineid=self.virtual_machine.id,
  
-  type="ROOT",
-  listall=True,
+  virtualmachineid=self.virtual_machine.id,
+  type='ROOT',
+  listall=True
   )
 self.assertEqual(
  volume[0].storage,
  self.storage_name,
- "Check volume migration response vol.storage %s 
self.storage_name %s" % (volume[0].storage, self.storage_name))
+ "Check volume migration response")
 
 return
 



git commit: updated refs/heads/master to 05df0cb

2014-01-06 Thread girish
Updated Branches:
  refs/heads/master 4dcc5671d -> 05df0cb82


Revert "CLOUDSTACK-5637: Detach volume before migrating"

This reverts commit 6c9b517929b0be7a44eae830b9b7b6823850c638.


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

Branch: refs/heads/master
Commit: 05df0cb823bf42173963ddd00e8476a4a0e587f9
Parents: 4dcc567
Author: Girish Shilamkar 
Authored: Tue Jan 7 12:37:18 2014 +0530
Committer: Girish Shilamkar 
Committed: Tue Jan 7 12:37:18 2014 +0530

--
 test/integration/component/test_stopped_vm.py | 16 
 1 file changed, 4 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/05df0cb8/test/integration/component/test_stopped_vm.py
--
diff --git a/test/integration/component/test_stopped_vm.py 
b/test/integration/component/test_stopped_vm.py
index e8a90b7..4ba94bf 100644
--- a/test/integration/component/test_stopped_vm.py
+++ b/test/integration/component/test_stopped_vm.py
@@ -22,7 +22,6 @@ import marvin
 from nose.plugins.attrib import attr
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
-from marvin.sshClient import SshClient
 from marvin.integration.lib.utils import *
 from marvin.integration.lib.base import *
 from marvin.integration.lib.common import *
@@ -891,8 +890,6 @@ class TestDeployVM(cloudstackTestCase):
 "Running",
 "VM should be in Running state after deployment"
 )
-
-
 self.debug("Stopping instance: %s" % self.virtual_machine.name)
 self.virtual_machine.stop(self.apiclient)
 self.debug("Instance is stopped!")
@@ -941,11 +938,6 @@ class TestDeployVM(cloudstackTestCase):
 self.storage_id = spool.id
 self.storage_name = spool.name
 break
-
-self.debug("Detaching volume %s from vm %s" % (vol_response.id, 
self.virtual_machine.id))
-
-self.virtual_machine.detach_volume(self.apiclient, vol_response)
-
 self.debug("Migrating volume to storage pool: %s" % self.storage_name)
 Volume.migrate(
self.apiclient,
@@ -954,14 +946,14 @@ class TestDeployVM(cloudstackTestCase):
)
 volume = Volume.list(
   self.apiclient,
-  virtualmachineid=self.virtual_machine.id,
  
-  type="ROOT",
-  listall=True,
+  virtualmachineid=self.virtual_machine.id,
+  type='ROOT',
+  listall=True
   )
 self.assertEqual(
  volume[0].storage,
  self.storage_name,
- "Check volume migration response vol.storage %s 
self.storage_name %s" % (volume[0].storage, self.storage_name))
+ "Check volume migration response")
 
 return