[3/4] git commit: updated refs/heads/4.0 to a572399

2013-05-27 Thread weizhou
remove duplicated Vpc routers in return of listByStateAndNetworkType


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

Branch: refs/heads/4.0
Commit: 6fa9527353facb90f55950f44ad74e3e2aa19ec9
Parents: 98a9edf
Author: Wei Zhou 
Authored: Mon May 27 21:30:37 2013 +0200
Committer: Wei Zhou 
Committed: Mon May 27 21:30:37 2013 +0200

--
 .../src/com/cloud/vm/dao/DomainRouterDaoImpl.java  |   10 +-
 1 files changed, 9 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6fa95273/server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java
--
diff --git a/server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java 
b/server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java
index 175d3f2..44dcf1a 100755
--- a/server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java
+++ b/server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java
@@ -16,6 +16,7 @@
 // under the License.
 package com.cloud.vm.dao;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import javax.ejb.Local;
@@ -37,6 +38,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.JoinBuilder.JoinType;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.SearchCriteria.Func;
 import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.db.UpdateBuilder;
@@ -97,6 +99,7 @@ public class DomainRouterDaoImpl extends 
GenericDaoBase im
 HostUpSearch.done();
   
 StateNetworkTypeSearch = createSearchBuilder();
+StateNetworkTypeSearch.select(null, Func.DISTINCT, 
StateNetworkTypeSearch.entity().getId());
 StateNetworkTypeSearch.and("state", 
StateNetworkTypeSearch.entity().getState(), Op.EQ);
 SearchBuilder joinRouterNetwork4 = 
_routerNetworkDao.createSearchBuilder();
 joinRouterNetwork4.and("networkId", 
joinRouterNetwork4.entity().getNetworkId(), Op.EQ);
@@ -223,7 +226,12 @@ public class DomainRouterDaoImpl extends 
GenericDaoBase im
 sc.setParameters("state", state);
 sc.setJoinParameters("networkRouter", "type", type);
 sc.setJoinParameters("host", "mgmtServerId", mgmtSrvrId);
-return listBy(sc);
+List routerIds = listBy(sc);
+List routers = new ArrayList();
+for (DomainRouterVO router : routerIds) {
+routers.add(findById(router.getId()));
+}
+return routers;
 }
 
 @Override



[4/4] git commit: updated refs/heads/4.0 to a572399

2013-05-27 Thread weizhou
CLOUDSTACK-1325: add password in response of RestoreVM


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

Branch: refs/heads/4.0
Commit: a5723992a0eeea9fc383c656b0d61dfc9e541ff9
Parents: 6fa9527
Author: Wei Zhou 
Authored: Mon May 27 21:32:56 2013 +0200
Committer: Wei Zhou 
Committed: Mon May 27 21:32:56 2013 +0200

--
 api/src/com/cloud/vm/UserVmService.java|2 +-
 server/src/com/cloud/vm/UserVmManagerImpl.java |   59 ++
 2 files changed, 34 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a5723992/api/src/com/cloud/vm/UserVmService.java
--
diff --git a/api/src/com/cloud/vm/UserVmService.java 
b/api/src/com/cloud/vm/UserVmService.java
index 6635657..804d223 100755
--- a/api/src/com/cloud/vm/UserVmService.java
+++ b/api/src/com/cloud/vm/UserVmService.java
@@ -416,5 +416,5 @@ public interface UserVmService {
 
 VirtualMachine vmStorageMigration(Long vmId, StoragePool destPool);
 
-UserVm restoreVM(RestoreVMCmd cmd);
+UserVm restoreVM(RestoreVMCmd cmd) throws ResourceUnavailableException, 
InsufficientCapacityException;
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a5723992/server/src/com/cloud/vm/UserVmManagerImpl.java
--
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java 
b/server/src/com/cloud/vm/UserVmManagerImpl.java
index dbcbeb8..b5ac80d 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -409,22 +409,11 @@ public class UserVmManagerImpl implements UserVmManager, 
UserVmService, Manager
 
 _accountMgr.checkAccess(caller, null, true, userVm);
 
-boolean result = resetVMPasswordInternal(cmd, password);
+boolean result = resetVMPasswordInternal(vmId, password);
 
 if (result) {
 userVm.setPassword(password);
-//update the password in vm_details table too 
-// Check if an SSH key pair was selected for the instance and if 
so use it to encrypt & save the vm password
-String sshPublicKey = userVm.getDetail("SSH.PublicKey");
-if (sshPublicKey != null && !sshPublicKey.equals("") && password 
!= null && !password.equals("saved_password")) {
-String encryptedPasswd = 
RSAHelper.encryptWithSSHPublicKey(sshPublicKey, password);
-if (encryptedPasswd == null) {
-throw new CloudRuntimeException("Error encrypting 
password");
-}
-
-userVm.setDetail("Encrypted.Password", encryptedPasswd);
-_vmDao.saveDetails(userVm);
-}
+savePasswordToDB(userVm, password);
 } else {
 throw new CloudRuntimeException("Failed to reset password for the 
virtual machine ");
 }
@@ -432,8 +421,22 @@ public class UserVmManagerImpl implements UserVmManager, 
UserVmService, Manager
 return userVm;
 }
 
-private boolean resetVMPasswordInternal(ResetVMPasswordCmd cmd, String 
password) throws ResourceUnavailableException, InsufficientCapacityException {
-Long vmId = cmd.getId();
+private void savePasswordToDB(UserVmVO vm, String password) {
+// update the password in vm_details table too
+// Check if an SSH key pair was selected for the instance and if so 
use it to encrypt & save the vm password
+String sshPublicKey = vm.getDetail("SSH.PublicKey");
+if (sshPublicKey != null && !sshPublicKey.equals("") && password != 
null && !password.equals("saved_password")) {
+String encryptedPasswd = 
RSAHelper.encryptWithSSHPublicKey(sshPublicKey, password);
+if (encryptedPasswd == null) {
+throw new CloudRuntimeException("Error encrypting password");
+}
+
+vm.setDetail("Encrypted.Password", encryptedPasswd);
+_vmDao.saveDetails(vm);
+}
+}
+
+private boolean resetVMPasswordInternal(Long vmId, String password) throws 
ResourceUnavailableException, InsufficientCapacityException {
 Long userId = UserContext.current().getCallerUserId();
 VMInstanceVO vmInstance = _vmDao.findById(vmId);
 
@@ -2908,16 +2911,7 @@ public class UserVmManagerImpl implements UserVmManager, 
UserVmService, Manager
 }
 
 // Check if an SSH key pair was selected for the instance and if 
so use it to encrypt & save the vm password
-String sshPublicKey = vm.getDetail("SSH.PublicKey");
-

[1/4] git commit: updated refs/heads/4.0 to a572399

2013-05-27 Thread weizhou
Updated Branches:
  refs/heads/4.0 48e7eadb8 -> a5723992a


CLOUDSTACK-512: add space before


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

Branch: refs/heads/4.0
Commit: cf47a72142ad2458d292ec8d16017d0722049fb4
Parents: 48e7ead
Author: Wei Zhou 
Authored: Mon May 27 21:29:01 2013 +0200
Committer: Wei Zhou 
Committed: Mon May 27 21:29:01 2013 +0200

--
 patches/systemvm/debian/config/root/edithosts.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cf47a721/patches/systemvm/debian/config/root/edithosts.sh
--
diff --git a/patches/systemvm/debian/config/root/edithosts.sh 
b/patches/systemvm/debian/config/root/edithosts.sh
index b71089d..5481ea4 100755
--- a/patches/systemvm/debian/config/root/edithosts.sh
+++ b/patches/systemvm/debian/config/root/edithosts.sh
@@ -88,7 +88,7 @@ echo "0 $mac $ip $host *" >> $DHCP_LEASES
 
 #edit hosts file as well
 sed -i  /"$ip "/d $HOSTS
-sed -i  /"$host "/d $HOSTS
+sed -i  /" $host "/d $HOSTS
 echo "$ip $host " >> $HOSTS
 
 if [ "$dflt" != "" ]



[2/4] git commit: updated refs/heads/4.0 to a572399

2013-05-27 Thread weizhou
remove duplicated ExpungeTask from BareMetalVmManagerImpl


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

Branch: refs/heads/4.0
Commit: 98a9edfaaf5e944af24c8dc3b240dbd25109564d
Parents: cf47a72
Author: Wei Zhou 
Authored: Mon May 27 21:29:43 2013 +0200
Committer: Wei Zhou 
Committed: Mon May 27 21:29:43 2013 +0200

--
 .../cloud/baremetal/BareMetalVmManagerImpl.java|   28 ++
 1 files changed, 12 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/98a9edfa/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java
--
diff --git a/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java 
b/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java
index 3972728..0797711 100755
--- a/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java
+++ b/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java
@@ -20,7 +20,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.Executors;
 
 import javax.ejb.Local;
 import javax.naming.ConfigurationException;
@@ -77,13 +76,11 @@ import com.cloud.user.SSHKeyPair;
 import com.cloud.user.User;
 import com.cloud.user.UserContext;
 import com.cloud.uservm.UserVm;
-import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.Pair;
 import com.cloud.utils.component.Adapters;
 import com.cloud.utils.component.ComponentLocator;
 import com.cloud.utils.component.Inject;
 import com.cloud.utils.component.Manager;
-import com.cloud.utils.concurrency.NamedThreadFactory;
 import com.cloud.utils.db.DB;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.fsm.StateListener;
@@ -448,25 +445,24 @@ public class BareMetalVmManagerImpl extends 
UserVmManagerImpl implements BareMet
_instance = "DEFAULT";
}
 
-   String workers = configs.get("expunge.workers");
-   int wrks = NumbersUtil.parseInt(workers, 10);
-
-   String time = configs.get("expunge.interval");
-   _expungeInterval = NumbersUtil.parseInt(time, 86400);
-
-   time = configs.get("expunge.delay");
-   _expungeDelay = NumbersUtil.parseInt(time, _expungeInterval);
-
-   _executor = Executors.newScheduledThreadPool(wrks, new 
NamedThreadFactory("UserVm-Scavenger"));
-
_itMgr.registerGuru(Type.UserBareMetal, this);
VirtualMachine.State.getStateMachine().registerListener(this);
 
-   s_logger.info("User VM Manager is configured.");
+   s_logger.info("Bare Metal VM Manager is configured.");
 
return true;
}
-   
+
+@Override
+public boolean start() {
+return true;
+}
+
+@Override
+public boolean stop() {
+return true;
+}
+
@Override
public boolean 
finalizeVirtualMachineProfile(VirtualMachineProfile profile, 
DeployDestination dest, ReservationContext context) {
 UserVmVO vm = profile.getVirtualMachine();



git commit: updated refs/heads/master to 2e8d126

2013-05-28 Thread weizhou
Updated Branches:
  refs/heads/master 8fd476e2f -> 2e8d1264a


CLOUDSTACK-2707: use executeBatch instead of persist when Usage Server 
createNetworkHelperEntry


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

Branch: refs/heads/master
Commit: 2e8d1264a247772b5dfda5bcab26fa5ed384a6d9
Parents: 8fd476e
Author: Wei Zhou 
Authored: Tue May 28 09:43:23 2013 +0200
Committer: Wei Zhou 
Committed: Tue May 28 09:43:23 2013 +0200

--
 .../src/com/cloud/usage/dao/UsageNetworkDao.java   |2 +
 .../com/cloud/usage/dao/UsageNetworkDaoImpl.java   |   34 +++
 usage/src/com/cloud/usage/UsageManagerImpl.java|   12 +++--
 3 files changed, 44 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e8d1264/engine/schema/src/com/cloud/usage/dao/UsageNetworkDao.java
--
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageNetworkDao.java 
b/engine/schema/src/com/cloud/usage/dao/UsageNetworkDao.java
index 0f7c771..aa43eab 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageNetworkDao.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageNetworkDao.java
@@ -16,6 +16,7 @@
 // under the License.
 package com.cloud.usage.dao;
 
+import java.util.List;
 import java.util.Map;
 
 import com.cloud.usage.UsageNetworkVO;
@@ -24,4 +25,5 @@ import com.cloud.utils.db.GenericDao;
 public interface UsageNetworkDao extends GenericDao {
 Map getRecentNetworkStats();
 void deleteOldStats(long maxEventTime);
+void saveUsageNetworks(List usageNetworks);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e8d1264/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java
--
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java 
b/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java
index d64fd80..af8083a 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageNetworkDaoImpl.java
@@ -19,6 +19,7 @@ package com.cloud.usage.dao;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import javax.ejb.Local;
@@ -29,6 +30,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.usage.UsageNetworkVO;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
 @Local(value={UsageNetworkDao.class})
@@ -41,6 +43,8 @@ public class UsageNetworkDaoImpl extends 
GenericDaoBase im

 ") joinnet on u.account_id = joinnet.acct_id and 
u.zone_id = joinnet.z_id and u.event_time_millis = joinnet.max_date";
private static final String DELETE_OLD_STATS = "DELETE FROM 
cloud_usage.usage_network WHERE event_time_millis < ?";
 
+   private static final String INSERT_USAGE_NETWORK = "INSERT INTO 
cloud_usage.usage_network (account_id, zone_id, host_id, host_type, network_id, 
bytes_sent, bytes_received, agg_bytes_received, agg_bytes_sent, 
event_time_millis) VALUES (?,?,?,?,?,?,?,?,?,?)";
+
public UsageNetworkDaoImpl() {
}
 
@@ -95,4 +99,34 @@ public class UsageNetworkDaoImpl extends 
GenericDaoBase im
 s_logger.error("error deleting old usage network stats", ex);
 }
}
+
+@Override
+public void saveUsageNetworks (List usageNetworks) {
+Transaction txn = Transaction.currentTxn();
+try {
+txn.start();
+String sql = INSERT_USAGE_NETWORK;
+PreparedStatement pstmt = null;
+pstmt = txn.prepareAutoCloseStatement(sql); // in reality I just 
want CLOUD_USAGE dataSource connection
+for (UsageNetworkVO usageNetwork : usageNetworks) {
+pstmt.setLong(1, usageNetwork.getAccountId());
+pstmt.setLong(2, usageNetwork.getZoneId());
+pstmt.setLong(3, usageNetwork.getHostId());
+pstmt.setString(4, usageNetwork.getHostType());
+pstmt.setLong(5, usageNetwork.getNetworkId());
+pstmt.setLong(6, usageNetwork.getBytesSent());
+pstmt.setLong(7, usageNetwork.getBytesReceived());
+pstmt.setLong(8, usageNetwork.getAggBytesReceived());
+pstmt.setLong(9, usageNetwork.getAggBytesSent());
+pstmt.setLong(10, usageNetwork.getEventTimeMillis());
+

git commit: updated refs/heads/disk_io_throttling to f2e5591

2013-05-29 Thread weizhou
Updated Branches:
  refs/heads/disk_io_throttling 4c04bc7b9 -> f2e5591b7


CLOUDSTACK-1301: disk I/O throttling minor change


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

Branch: refs/heads/disk_io_throttling
Commit: f2e5591b710d04cc86815044f5823e73a4a58944
Parents: 4c04bc7
Author: Wei Zhou 
Authored: Wed May 29 18:12:46 2013 +0200
Committer: Wei Zhou 
Committed: Wed May 29 18:12:46 2013 +0200

--
 setup/db/db/schema-410to420.sql |7 ---
 ui/scripts/instances.js |4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f2e5591b/setup/db/db/schema-410to420.sql
--
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index 7684a7c..4805c46 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -263,6 +263,10 @@ ALTER TABLE `cloud`.`nics` ADD COLUMN `display_nic` 
tinyint(1) NOT NULL DEFAULT
 
 ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `display_offering` tinyint(1) 
NOT NULL DEFAULT 1 COMMENT 'Should disk offering be displayed to the end user';
 
+ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `bytes_rate` bigint(20) 
unsigned DEFAULT 0;
+
+ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `iops_rate` bigint(20) unsigned 
DEFAULT 0;
+
 CREATE TABLE `cloud`.`volume_details` (
   `id` bigint unsigned NOT NULL auto_increment,
   `volume_id` bigint unsigned NOT NULL COMMENT 'volume id',
@@ -1795,11 +1799,8 @@ CREATE TABLE `cloud_usage`.`usage_vm_disk` (
 ) ENGINE=InnoDB CHARSET=utf8;
 
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 
'management-server', 'vm.disk.stats.interval', 0, 'Interval (in seconds) to 
report vm disk statistics.');
-
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 
'management-server', 'vm.disk.throttling.iops_rate', 0, 'Default disk I/O rate 
in requests per second allowed in User vm\'s disk. ');
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 
'management-server', 'vm.disk.throttling.bytes_rate', 0, 'Default disk I/O rate 
in bytes per second allowed in User vm\'s disk. ');
-ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `bytes_rate` bigint(20) 
unsigned DEFAULT 0;
-ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `iops_rate` bigint(20) unsigned 
DEFAULT 0;
 
 -- Re-enable foreign key checking, at the end of the upgrade path
 SET foreign_key_checks = 1;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f2e5591b/ui/scripts/instances.js
--
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 6a589ba..99b1a0f 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1669,8 +1669,8 @@
   networkkbswrite: (jsonObj.networkkbswrite == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.networkkbswrite * 1024),
   diskkbsread: (jsonObj.diskkbsread == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskkbsread * 1024),
   diskkbswrite: (jsonObj.diskkbswrite == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskkbswrite * 1024),
-  diskioread: (jsonObj.diskioread == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskioread * 1024),
-  diskiowrite: (jsonObj.diskiowrite == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskiowrite * 1024)
+  diskioread: (jsonObj.diskioread == null)? "N/A": 
jsonObj.diskioread,
+  diskiowrite: (jsonObj.diskiowrite == null)? "N/A": 
jsonObj.diskiowrite
   }
 });
   }



git commit: updated refs/heads/disk_io_stat to 385ca81

2013-05-31 Thread weizhou
Updated Branches:
  refs/heads/disk_io_stat c30057635 -> 385ca81e0


CLOUDSTACK-1192: add RBD support


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

Branch: refs/heads/disk_io_stat
Commit: 385ca81e01754f0f65c18d32f0d35b41616498ac
Parents: c300576
Author: Wei Zhou 
Authored: Fri May 31 10:49:35 2013 +0200
Committer: Wei Zhou 
Committed: Fri May 31 10:49:35 2013 +0200

--
 .../kvm/resource/LibvirtComputingResource.java |   23 +--
 1 files changed, 14 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/385ca81e/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
--
diff --git 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 46fce24..d402c61 100755
--- 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -189,6 +189,7 @@ import 
com.cloud.hypervisor.kvm.resource.LibvirtVMDef.ConsoleDef;
 import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.CpuTuneDef;
 import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DevicesDef;
 import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef;
+import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.deviceType;
 import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.diskProtocol;
 import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.FeaturesDef;
 import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.FilesystemDef;
@@ -4549,15 +4550,19 @@ ServerResource {
 List disks = getDisks(conn, vmName);
 
 for (DiskDef disk : disks) {
-DomainBlockStats blockStats = 
dm.blockStats(disk.getDiskLabel());
-String path = disk.getDiskPath(); // for example, path = 
/mnt/pool_uuid/disk_path/
-String diskPath = null;
-if (path != null) {
-String[] token = path.split("/");
-if (token.length > 3) {
-diskPath = token[3];
-VmDiskStatsEntry stat = new VmDiskStatsEntry(vmName, 
diskPath, blockStats.wr_req, blockStats.rd_req, blockStats.wr_bytes, 
blockStats.rd_bytes);
-stats.add(stat);
+if (disk.getDeviceType().equals(deviceType.DISK)) {
+DomainBlockStats blockStats = 
dm.blockStats(disk.getDiskLabel());
+String path = disk.getDiskPath();
+String diskPath = null;
+if (path != null) {
+if (path.startsWith("rbd:"))// path = 
rbd:/mnt/pool_uuid/disk_path/
+path = path.replace("rbd:", "");
+String[] token = path.split("/"); // path = 
/mnt/pool_uuid/disk_path/
+if (token.length > 3) {
+diskPath = token[3];
+VmDiskStatsEntry stat = new 
VmDiskStatsEntry(vmName, diskPath, blockStats.wr_req, blockStats.rd_req, 
blockStats.wr_bytes, blockStats.rd_bytes);
+stats.add(stat);
+}
 }
 }
 }



[1/4] git commit: updated refs/heads/disk_io_stat to 65a886d

2013-05-31 Thread weizhou
Updated Branches:
  refs/heads/disk_io_stat 385ca81e0 -> 65a886de5
  refs/heads/master 8deeb90a6 -> 6dad8adf8


Revert "CLOUDSTACK-1192: add RBD support"

This reverts commit 385ca81e01754f0f65c18d32f0d35b41616498ac.


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

Branch: refs/heads/disk_io_stat
Commit: 65a886de5d45bb6df806ad59de618b586aaba4c5
Parents: 385ca81
Author: Wei Zhou 
Authored: Fri May 31 11:18:48 2013 +0200
Committer: Wei Zhou 
Committed: Fri May 31 11:18:48 2013 +0200

--
 .../kvm/resource/LibvirtComputingResource.java |   23 ++-
 1 files changed, 9 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/65a886de/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
--
diff --git 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index d402c61..46fce24 100755
--- 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -189,7 +189,6 @@ import 
com.cloud.hypervisor.kvm.resource.LibvirtVMDef.ConsoleDef;
 import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.CpuTuneDef;
 import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DevicesDef;
 import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef;
-import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.deviceType;
 import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.diskProtocol;
 import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.FeaturesDef;
 import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.FilesystemDef;
@@ -4550,19 +4549,15 @@ ServerResource {
 List disks = getDisks(conn, vmName);
 
 for (DiskDef disk : disks) {
-if (disk.getDeviceType().equals(deviceType.DISK)) {
-DomainBlockStats blockStats = 
dm.blockStats(disk.getDiskLabel());
-String path = disk.getDiskPath();
-String diskPath = null;
-if (path != null) {
-if (path.startsWith("rbd:"))// path = 
rbd:/mnt/pool_uuid/disk_path/
-path = path.replace("rbd:", "");
-String[] token = path.split("/"); // path = 
/mnt/pool_uuid/disk_path/
-if (token.length > 3) {
-diskPath = token[3];
-VmDiskStatsEntry stat = new 
VmDiskStatsEntry(vmName, diskPath, blockStats.wr_req, blockStats.rd_req, 
blockStats.wr_bytes, blockStats.rd_bytes);
-stats.add(stat);
-}
+DomainBlockStats blockStats = 
dm.blockStats(disk.getDiskLabel());
+String path = disk.getDiskPath(); // for example, path = 
/mnt/pool_uuid/disk_path/
+String diskPath = null;
+if (path != null) {
+String[] token = path.split("/");
+if (token.length > 3) {
+diskPath = token[3];
+VmDiskStatsEntry stat = new VmDiskStatsEntry(vmName, 
diskPath, blockStats.wr_req, blockStats.rd_req, blockStats.wr_bytes, 
blockStats.rd_bytes);
+stats.add(stat);
 }
 }
 }



[1/2] git commit: updated refs/heads/master to 1696e8c

2013-06-05 Thread weizhou
Updated Branches:
  refs/heads/master 202da411f -> 1696e8cb1


CLOUDSTACK-2856: collectVmDiskStatistics before reboot/stop/migrate


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

Branch: refs/heads/master
Commit: 15265479f644f2745804af456eef9767a7297f01
Parents: f321acd
Author: Wei Zhou 
Authored: Wed Jun 5 14:28:43 2013 +0200
Committer: Wei Zhou 
Committed: Wed Jun 5 14:28:43 2013 +0200

--
 server/src/com/cloud/vm/UserVmManagerImpl.java |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15265479/server/src/com/cloud/vm/UserVmManagerImpl.java
--
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java 
b/server/src/com/cloud/vm/UserVmManagerImpl.java
index 8cf05aa..d8a064f 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -755,6 +755,7 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Use
 }
 
 if (vm.getState() == State.Running && vm.getHostId() != null) {
+collectVmDiskStatistics(vm);
 return _itMgr.reboot(vm, null, caller, owner);
 } else {
 s_logger.error("Vm id=" + vmId
@@ -3379,9 +3380,6 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Use
 boolean status;
 State vmState = vm.getState();
 
-// Collect vm disk statistics from host before stopping Vm
- collectVmDiskStatistics(vm);
-
 try {
 VirtualMachineEntity vmEntity = 
_orchSrvc.getVirtualMachine(vm.getUuid());
 status = vmEntity.destroy(new Long(userId).toString());
@@ -3830,7 +3828,7 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Use
 "No permission to migrate VM, Only Root Admin can migrate 
a VM!");
 }
 
-VMInstanceVO vm = _vmInstanceDao.findById(vmId);
+UserVmVO vm = _vmDao.findById(vmId);
 if (vm == null) {
 throw new InvalidParameterValueException(
 "Unable to find the VM by id=" + vmId);
@@ -3921,6 +3919,7 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Use
 + " already has max Running VMs(count includes 
system VMs), cannot migrate to this host");
 }
 
+collectVmDiskStatistics(vm);
 VMInstanceVO migratedVm = _itMgr.migrate(vm, srcHostId, dest);
 return migratedVm;
 }
@@ -4710,6 +4709,9 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Use
 
 @Override
 public void prepareStop(VirtualMachineProfile profile) {
+UserVmVO vm = profile.getVirtualMachine();
+if (vm.getState() == State.Running)
+collectVmDiskStatistics(vm);
 }
 
 }



[2/2] git commit: updated refs/heads/master to 1696e8c

2013-06-05 Thread weizhou
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack


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

Branch: refs/heads/master
Commit: 1696e8cb161376651d0276c05d655215c55a1067
Parents: 1526547 202da41
Author: Wei Zhou 
Authored: Wed Jun 5 14:29:06 2013 +0200
Committer: Wei Zhou 
Committed: Wed Jun 5 14:29:06 2013 +0200

--
 .../org/apache/cloudstack/api/ApiConstants.java|3 +
 .../response/HypervisorCapabilitiesResponse.java   |   32 ++
 client/tomcatconf/classpath.conf.in|8 -
 .../src/com/cloud/alert/dao/AlertDaoImpl.java  |2 +-
 .../src/com/cloud/upgrade/dao/Upgrade410to420.java |  209 +-
 packaging/centos63/cloud.spec  |3 +
 .../network/cisco/CiscoVnmcConnectionImpl.java |2 +-
 .../cloud/network/element/CiscoVnmcElement.java|2 +-
 .../cloud/network/resource/CiscoVnmcResource.java  |2 +-
 server/src/com/cloud/api/ApiResponseHelper.java|3 +
 .../src/com/cloud/server/ManagementServerImpl.java |   15 +-
 .../gslb/GlobalLoadBalancingRulesServiceImpl.java  |8 +-
 test/integration/smoke/test_internal_lb.py |  351 ++-
 tools/marvin/marvin/integration/lib/base.py|   98 -
 ui/scripts/projects.js |3 +
 ui/scripts/ui-custom/projects.js   |   25 +
 ui/scripts/vpc.js  |   31 ++-
 17 files changed, 549 insertions(+), 248 deletions(-)
--




git commit: updated refs/heads/master to d2e6bf5

2013-06-05 Thread weizhou
Updated Branches:
  refs/heads/master c05c1052f -> d2e6bf5fa


CLOUDSTACK-2865: fix error in prepareStop


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

Branch: refs/heads/master
Commit: d2e6bf5fa4c424c02c39155ba41f893e2e66b617
Parents: c05c105
Author: Wei Zhou 
Authored: Wed Jun 5 16:43:31 2013 +0200
Committer: Wei Zhou 
Committed: Wed Jun 5 16:43:31 2013 +0200

--
 server/src/com/cloud/vm/UserVmManagerImpl.java |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d2e6bf5f/server/src/com/cloud/vm/UserVmManagerImpl.java
--
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java 
b/server/src/com/cloud/vm/UserVmManagerImpl.java
index d8a064f..b919f12 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -4709,7 +4709,7 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Use
 
 @Override
 public void prepareStop(VirtualMachineProfile profile) {
-UserVmVO vm = profile.getVirtualMachine();
+UserVmVO vm = _vmDao.findById(profile.getId());
 if (vm.getState() == State.Running)
 collectVmDiskStatistics(vm);
 }



git commit: updated refs/heads/master to f61d61d

2013-06-06 Thread weizhou
Updated Branches:
  refs/heads/master f4a1a2ff3 -> f61d61db9


CLOUDSTACK-2875: allow port 8080 on virtual router so that vm can get password 
from virtual router


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

Branch: refs/heads/master
Commit: f61d61db9490eb28d2feedbef0d329479a66aede
Parents: f4a1a2f
Author: Wei Zhou 
Authored: Thu Jun 6 23:05:12 2013 +0200
Committer: Wei Zhou 
Committed: Thu Jun 6 23:05:12 2013 +0200

--
 .../debian/config/etc/iptables/iptables-router |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f61d61db/patches/systemvm/debian/config/etc/iptables/iptables-router
--
diff --git a/patches/systemvm/debian/config/etc/iptables/iptables-router 
b/patches/systemvm/debian/config/etc/iptables/iptables-router
index 3f5bc5f..b214e40 100644
--- a/patches/systemvm/debian/config/etc/iptables/iptables-router
+++ b/patches/systemvm/debian/config/etc/iptables/iptables-router
@@ -37,6 +37,7 @@ COMMIT
 -A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT
 -A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT
 -A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT
+-A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT
 -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
 -A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
 -A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT



[1/4] git commit: updated refs/heads/master to 50dc67b

2013-06-10 Thread weizhou
Updated Branches:
  refs/heads/master 840e14de0 -> 50dc67bc2


destroy vm after test in test_advancedsg_networks.py


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

Branch: refs/heads/master
Commit: 8220b9867c70166705fc4ed6373ea8266e754678
Parents: 03e283c
Author: Wei Zhou 
Authored: Mon Jun 10 14:00:05 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 14:00:05 2013 +0200

--
 test/integration/component/test_advancedsg_networks.py | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8220b986/test/integration/component/test_advancedsg_networks.py
--
diff --git a/test/integration/component/test_advancedsg_networks.py 
b/test/integration/component/test_advancedsg_networks.py
index e24254d..229cfd6 100644
--- a/test/integration/component/test_advancedsg_networks.py
+++ b/test/integration/component/test_advancedsg_networks.py
@@ -730,6 +730,7 @@ class TestNetworksInAdvancedSG(cloudstackTestCase):
  
networkids=self.shared_network_sg.id,
 
serviceofferingid=self.service_offering.id
  )
+
self.cleanup_vms.append(self.shared_network_admin_account_virtual_machine)
 vms = VirtualMachine.list(
 self.api_client,
 
id=self.shared_network_admin_account_virtual_machine.id,



[4/4] git commit: updated refs/heads/master to 50dc67b

2013-06-10 Thread weizhou
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack


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

Branch: refs/heads/master
Commit: 50dc67bc2e5e15522f299c05e2923b34bbdd1081
Parents: 76ce304 840e14d
Author: Wei Zhou 
Authored: Mon Jun 10 15:01:08 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 15:01:08 2013 +0200

--
 docs/en-US/pvlan.xml | 118 +++---
 1 file changed, 112 insertions(+), 6 deletions(-)
--




[2/4] git commit: updated refs/heads/master to 50dc67b

2013-06-10 Thread weizhou
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack


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

Branch: refs/heads/master
Commit: c2b20a455c9e16838abf1f4fb426e1f12f6b294c
Parents: 8220b98 d8a235e
Author: Wei Zhou 
Authored: Mon Jun 10 14:15:52 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 14:15:52 2013 +0200

--
 .../consoleproxy/ConsoleProxyManagerImpl.java   |   7 +
 .../component/test_vpc_network_pfrules.py   | 487 +--
 2 files changed, 244 insertions(+), 250 deletions(-)
--




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

2013-06-10 Thread weizhou
CLOUDSTACK-2707: use executeBatch instead of persist in Usage Server


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

Branch: refs/heads/master
Commit: 76ce304411259dc4a29e0e070de829b79b46efe2
Parents: c2b20a4
Author: Wei Zhou 
Authored: Mon Jun 10 15:00:08 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 15:00:08 2013 +0200

--
 .../src/com/cloud/usage/dao/UsageDao.java   |  5 +-
 .../src/com/cloud/usage/dao/UsageDaoImpl.java   | 64 
 server/src/com/cloud/api/ApiResponseHelper.java |  4 +-
 .../cloud/usage/parser/NetworkUsageParser.java  | 11 +++-
 .../cloud/usage/parser/VmDiskUsageParser.java   | 43 +++--
 5 files changed, 104 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76ce3044/engine/schema/src/com/cloud/usage/dao/UsageDao.java
--
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageDao.java 
b/engine/schema/src/com/cloud/usage/dao/UsageDao.java
index 8a80655..f571b63 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageDao.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageDao.java
@@ -38,6 +38,7 @@ public interface UsageDao extends GenericDao {
 Long getLastUserStatsId();
 List listPublicTemplatesByAccount(long accountId);
 Long getLastVmDiskStatsId();
-void updateVmDiskStats(List vmNetStats);
-void saveVmDiskStats(List vmNetStats);
+void updateVmDiskStats(List vmDiskStats);
+void saveVmDiskStats(List vmDiskStats);
+void saveUsageRecords(List usageRecords);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76ce3044/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
--
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java 
b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
index f7d5069..2237d56 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
@@ -18,6 +18,7 @@ package com.cloud.usage.dao;
 
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
+import java.sql.Timestamp;
 import java.sql.Types;
 import java.util.ArrayList;
 import java.util.Date;
@@ -63,6 +64,8 @@ public class UsageDaoImpl extends GenericDaoBase implements Usage
" VALUES (?,?,?,?,?,?,?,?,?,?, ?, ?, ?, ?,?, ?, ?)";
 private static final String UPDATE_VM_DISK_STATS = "UPDATE 
cloud_usage.vm_disk_statistics SET net_io_read=?, net_io_write=?, 
current_io_read=?, current_io_write=?, agg_io_read=?, agg_io_write=?, " +
"net_bytes_read=?, net_bytes_write=?, current_bytes_read=?, 
current_bytes_write=?, agg_bytes_read=?, agg_bytes_write=?  WHERE id=?";
+private static final String INSERT_USGAE_RECORDS = "INSERT INTO 
cloud_usage.cloud_usage (zone_id, account_id, domain_id, description, 
usage_display, usage_type, raw_usage, vm_instance_id, vm_name, offering_id, 
template_id, " +
+   "usage_id, type, size, network_id, start_date, end_date) VALUES 
(?,?,?,?,?,?,?,?,?, ?, ?, ?,?,?,?,?,?)";
 
 protected final static TimeZone s_gmtTimeZone = 
TimeZone.getTimeZone("GMT");
 
@@ -375,4 +378,65 @@ public class UsageDaoImpl extends GenericDaoBase implements Usage
 }
 
}
+
+@Override
+public void saveUsageRecords(List usageRecords) {
+   Transaction txn = Transaction.currentTxn();
+try {
+txn.start();
+String sql = INSERT_USGAE_RECORDS;
+PreparedStatement pstmt = null;
+pstmt = txn.prepareAutoCloseStatement(sql); // in reality I just 
want CLOUD_USAGE dataSource connection
+for (UsageVO usageRecord : usageRecords) {
+pstmt.setLong(1, usageRecord.getZoneId());
+pstmt.setLong(2, usageRecord.getAccountId());
+pstmt.setLong(3, usageRecord.getDomainId());
+pstmt.setString(4, usageRecord.getDescription());
+pstmt.setString(5, usageRecord.getUsageDisplay());
+pstmt.setInt(6, usageRecord.getUsageType());
+pstmt.setDouble(7, usageRecord.getRawUsage());
+if(usageRecord.getVmInstanceId() != null){
+pstmt.setLong(8, usageRecord.getVmInstanceId());
+} else {
+pstmt.setNull(8, Types.BIGINT);
+}
+pstmt.setString(9, usageRecord.getVmName());
+if(usageRecord.getOfferingId() != null){
+pstmt.setLong(10, usageRecord.getOfferi

[02/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2875: allow port 8080 on virtual router so that vm can get password 
from virtual router


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

Branch: refs/heads/disk_io_throttling
Commit: f61d61db9490eb28d2feedbef0d329479a66aede
Parents: f4a1a2f
Author: Wei Zhou 
Authored: Thu Jun 6 23:05:12 2013 +0200
Committer: Wei Zhou 
Committed: Thu Jun 6 23:05:12 2013 +0200

--
 patches/systemvm/debian/config/etc/iptables/iptables-router | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f61d61db/patches/systemvm/debian/config/etc/iptables/iptables-router
--
diff --git a/patches/systemvm/debian/config/etc/iptables/iptables-router 
b/patches/systemvm/debian/config/etc/iptables/iptables-router
index 3f5bc5f..b214e40 100644
--- a/patches/systemvm/debian/config/etc/iptables/iptables-router
+++ b/patches/systemvm/debian/config/etc/iptables/iptables-router
@@ -37,6 +37,7 @@ COMMIT
 -A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT
 -A INPUT -i eth1 -p tcp -m state --state NEW --dport 3922 -j ACCEPT
 -A INPUT -i eth0 -p tcp -m state --state NEW --dport 80 -j ACCEPT
+-A INPUT -i eth0 -p tcp -m state --state NEW --dport 8080 -j ACCEPT
 -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
 -A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
 -A FORWARD -i eth0 -o eth0 -m state --state NEW -j ACCEPT



[12/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Log the actual NAT ip attempting to SSH into

VM IP is the guest IP and it's the NAT ip that is used for ssh.

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 302741d309f335c1f8c3a36286bec513fd9ed2f4
Parents: 1c9cd9d
Author: Prasanna Santhanam 
Authored: Fri Jun 7 15:02:55 2013 +0530
Committer: Prasanna Santhanam 
Committed: Fri Jun 7 15:02:55 2013 +0530

--
 test/integration/smoke/test_network.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/302741d3/test/integration/smoke/test_network.py
--
diff --git a/test/integration/smoke/test_network.py 
b/test/integration/smoke/test_network.py
index eb33c63..a65748d 100644
--- a/test/integration/smoke/test_network.py
+++ b/test/integration/smoke/test_network.py
@@ -1209,7 +1209,7 @@ class TestRebootRouter(cloudstackTestCase):
 except Exception as e:
 self.fail(
   "SSH Access failed for %s: %s" % \
-  (self.vm_1.ipaddress, e))
+  (self.nat_rule.ipaddress.ipaddress, e))
 return
 
 def tearDown(self):



[38/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
destroy vm after test in test_advancedsg_networks.py


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

Branch: refs/heads/disk_io_throttling
Commit: 8220b9867c70166705fc4ed6373ea8266e754678
Parents: 03e283c
Author: Wei Zhou 
Authored: Mon Jun 10 14:00:05 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 14:00:05 2013 +0200

--
 test/integration/component/test_advancedsg_networks.py | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8220b986/test/integration/component/test_advancedsg_networks.py
--
diff --git a/test/integration/component/test_advancedsg_networks.py 
b/test/integration/component/test_advancedsg_networks.py
index e24254d..229cfd6 100644
--- a/test/integration/component/test_advancedsg_networks.py
+++ b/test/integration/component/test_advancedsg_networks.py
@@ -730,6 +730,7 @@ class TestNetworksInAdvancedSG(cloudstackTestCase):
  
networkids=self.shared_network_sg.id,
 
serviceofferingid=self.service_offering.id
  )
+
self.cleanup_vms.append(self.shared_network_admin_account_virtual_machine)
 vms = VirtualMachine.list(
 self.api_client,
 
id=self.shared_network_admin_account_virtual_machine.id,



[06/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Fix DB warnings - txn: Commit called when it is not a transaction: 
-NetworkServiceImpl.dedicateGuestVlanRange:3050


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

Branch: refs/heads/disk_io_throttling
Commit: e7d5ccaada697607260ab5ee8e8ff3b436973f88
Parents: 6208a51
Author: Likitha Shetty 
Authored: Fri Jun 7 12:11:15 2013 +0530
Committer: Likitha Shetty 
Committed: Fri Jun 7 12:12:18 2013 +0530

--
 server/src/com/cloud/network/NetworkServiceImpl.java | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e7d5ccaa/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 2bf9f40..29a36b9 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -3044,6 +3044,7 @@ public class NetworkServiceImpl extends ManagerBase 
implements  NetworkService {
 _accountGuestVlanMapDao.update(guestVlanMapId, 
accountGuestVlanMapVO);
 } else {
 Transaction txn = Transaction.currentTxn();
+txn.start();
 accountGuestVlanMapVO = new 
AccountGuestVlanMapVO(vlanOwner.getAccountId(), physicalNetworkId);
 accountGuestVlanMapVO.setGuestVlanRange(startVlan + "-" +  
endVlan);
 _accountGuestVlanMapDao.persist(accountGuestVlanMapVO);



[08/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
my gsoc proposal document

Signed-off-by: Sebastien Goasguen 


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

Branch: refs/heads/disk_io_throttling
Commit: 1bdb6266c6b263684db229accd4f0a4a330f203a
Parents: cc7e9ee
Author: tuna 
Authored: Thu Jun 6 23:46:18 2013 +0700
Committer: Sebastien Goasguen 
Committed: Fri Jun 7 02:59:17 2013 -0400

--
 docs/en-US/gsoc-tuna.xml | 203 ++
 1 file changed, 203 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1bdb6266/docs/en-US/gsoc-tuna.xml
--
diff --git a/docs/en-US/gsoc-tuna.xml b/docs/en-US/gsoc-tuna.xml
index 68032a8..0988734 100644
--- a/docs/en-US/gsoc-tuna.xml
+++ b/docs/en-US/gsoc-tuna.xml
@@ -25,4 +25,207 @@
 
 Nguyen's 2013 GSoC Proposal
 This chapter describes Nguyen 2013 Google Summer of Code project 
within the &PRODUCT; ASF project. It is a copy paste of the submitted 
proposal.
+   
+   Add Xen/XCP support for GRE SDN controller
+   
+   "This project aims to enhance the current native SDN 
controller in supporting Xen/XCP and integrate successfully the open source SDN 
controller (FloodLight) driving Open vSwitch through its interfaces."
+   
+   
+   
+   Abstract
+   
+   SDN, standing for Software-Defined Networking, is an 
approach to building data network equipments and softwares. It were invented by 
ONRC, Stanford University. SDN basically decouples the control from physical 
networking boxes and given to a software application called a controller. SDN 
has three parts: controller, protocols and switch; In which, OpenFlow is an 
open standard to deploy innovative protocols. Nowaday, more and more 
datacenters use SDN instead of traditional physical networking boxes. For 
example, Google announced that they completely built its own  switches and SDN 
confrollers for use in its internal backbone network.
+   
+   
+   OpenvSwitch, an open source software switch, is widely 
used as a virtual switch in virtualized server environments. It can currently 
run on any Linux-based virtualization platform, such as: KVM, Xen (XenServer, 
XCP, Xen hypervisor), VirtualBox... It also has been ported to a number of 
different operating  systems  and  hardware  platforms:  Linux,  FreeBSD,  
Windows  and  even  non-POSIX embedded systems. In cloud computing IaaS, using 
OpenvSwitch instead of Linux bridge on compute nodes becomes an inevitable 
trend because of its powerful features and the ability of OpenFlow integration 
as well.
+   
+   
+   In CloudStack, we already have a native SDN controller. 
With KVM hypervisor, developers can easily install  OpenvSwitch  module;  
whereas,  Xen  even  has  a  build-in  one.  The  combination  of SDN 
controller and OpenvSwitch gives us many advanced things. For example, creating 
GRE tunnels as an isolation method instead of VLAN is a good try. In this 
project, we are planning to support GRE tunnels in Xen/XCP hypervisor with the 
native SDN controller. When it's done, substituting open-sources SDN 
controllers (floodlight, beacon, pox, nox) for the current one is an amazing 
next step.
+   
+   
+   
+   Design description
+   
+   CloudStack currently has a native SDN Controller that 
is used to build meshes of GRE tunnels between Xen hosts. There consists of 4 
parts: OVS tunnel manager, OVS Dao/VO, Command/Answer and Ovs tunnel plugin. 
The details are as follow:
+   
+   
+   OVS tunnel manager: 
Consist of OvsElement and OvsTunnelManager.
+   
+   
+   OvsElement is used for controlling Ovs tunnel lifecycle 
(prepare, release)
+   
+   
+   
+   prepare(network, nic, vm, dest): create 
tunnel for vm on network to dest
+   
+   
+   release(network, nic, vm): destroy tunnel 
for vm on network
+   
+   
+   
+   OvsTunnelManager  drives  bridge  configuration  and  
tunnel  creation  via  calling  respective commands to Agent. 
+   
+   
+   
+   destroyTunnel(vm, network): call 
OvsDes

[44/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack 
into disk_io_throttling


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

Branch: refs/heads/disk_io_throttling
Commit: 080bb7618733dff5308165439194c9e152897dbc
Parents: 288c5b6 50dc67b
Author: Wei Zhou 
Authored: Mon Jun 10 15:01:53 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 15:01:53 2013 +0200

--
 api/src/com/cloud/network/NetworkModel.java |2 +
 .../affinitygroup/ListAffinityGroupsCmd.java|7 +-
 .../apache/cloudstack/query/QueryService.java   |3 +-
 docs/en-US/CloudStack_GSoC_Guide.xml|3 +-
 docs/en-US/build-rpm.xml|1 +
 docs/en-US/gsoc-dharmesh.xml|  149 +++
 docs/en-US/gsoc-meng.xml|  235 
 docs/en-US/images/mesos-integration-arch.jpg|0
 docs/en-US/pvlan.xml|  118 +-
 .../com/cloud/network/dao/IPAddressDaoImpl.java |1 +
 .../rules/dao/PortForwardingRulesDao.java   |2 +-
 .../rules/dao/PortForwardingRulesDaoImpl.java   |9 +-
 .../src/com/cloud/usage/dao/UsageDao.java   |5 +-
 .../src/com/cloud/usage/dao/UsageDaoImpl.java   |   64 +
 .../storage/volume/VolumeServiceImpl.java   |   79 +-
 .../vmware/resource/VmwareResource.java |   48 +-
 server/src/com/cloud/api/ApiResponseHelper.java |4 +-
 .../com/cloud/api/query/QueryManagerImpl.java   |   33 +-
 .../consoleproxy/ConsoleProxyManagerImpl.java   |7 +
 .../src/com/cloud/network/NetworkModelImpl.java |5 +-
 .../com/cloud/network/NetworkServiceImpl.java   |   48 +-
 .../cloud/network/rules/RulesManagerImpl.java   |2 +-
 .../src/com/cloud/user/AccountManagerImpl.java  |4 +
 .../com/cloud/network/MockNetworkModelImpl.java |5 +
 .../com/cloud/vpc/MockNetworkModelImpl.java |5 +
 test/integration/component/test_accounts.py |4 -
 .../component/test_advancedsg_networks.py   |1 +
 test/integration/component/test_egress_rules.py |1 -
 test/integration/component/test_eip_elb.py  |6 -
 test/integration/component/test_netscaler_lb.py |1 -
 .../component/test_network_offering.py  |1 -
 .../component/test_project_configs.py   |2 -
 .../component/test_project_limits.py|1 -
 test/integration/component/test_projects.py |1 -
 test/integration/component/test_tags.py |2 -
 test/integration/component/test_templates.py|1 -
 .../component/test_vm_passwdenabled.py  |1 -
 test/integration/component/test_vpc.py  |1 -
 test/integration/component/test_vpc_network.py  |  275 ++--
 .../component/test_vpc_network_pfrules.py   |  487 
 .../integration/component/test_vpc_offerings.py |2 -
 test/integration/component/test_vpc_routers.py  |4 -
 .../component/test_vpc_vm_life_cycle.py | 1181 +++---
 .../component/test_vpc_vms_deployment.py|1 -
 test/integration/smoke/test_network.py  |2 +-
 test/integration/smoke/test_routers.py  |1 -
 .../integration/smoke/test_service_offerings.py |4 +-
 test/integration/smoke/test_vm_life_cycle.py|   13 +-
 .../definitions/systemvmtemplate/postinstall.sh |   13 +-
 .../systemvmtemplate64/postinstall.sh   |   15 +-
 ui/scripts/network.js   |   31 +-
 ui/scripts/system.js|4 +-
 .../cloud/usage/parser/NetworkUsageParser.java  |   11 +-
 .../cloud/usage/parser/VmDiskUsageParser.java   |   43 +-
 utils/src/com/cloud/utils/net/NetUtils.java |   28 +
 .../test/com/cloud/utils/net/NetUtilsTest.java  |   19 +
 56 files changed, 1434 insertions(+), 1562 deletions(-)
--




[33/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Adding serviceCapability LB:Public for VPC

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 6607b1e5f1da3e738babcc557f40c30b932ed565
Parents: 20c1f2c
Author: Prasanna Santhanam 
Authored: Mon Jun 10 14:52:47 2013 +0530
Committer: Prasanna Santhanam 
Committed: Mon Jun 10 14:52:47 2013 +0530

--
 .../component/test_vpc_vm_life_cycle.py | 1095 +++---
 1 file changed, 156 insertions(+), 939 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6607b1e5/test/integration/component/test_vpc_vm_life_cycle.py
--
diff --git a/test/integration/component/test_vpc_vm_life_cycle.py 
b/test/integration/component/test_vpc_vm_life_cycle.py
index 44f7288..1fd2724 100644
--- a/test/integration/component/test_vpc_vm_life_cycle.py
+++ b/test/integration/component/test_vpc_vm_life_cycle.py
@@ -26,8 +26,6 @@ from marvin.integration.lib.utils import *
 from marvin.integration.lib.base import *
 from marvin.integration.lib.common import *
 from marvin.remoteSSHClient import remoteSSHClient
-import datetime
-
 
 class Services:
 """Test VM life cycle in VPC network services
@@ -35,155 +33,159 @@ class Services:
 
 def __init__(self):
 self.services = {
- "account": {
-"email": "t...@test.com",
-"firstname": "Test",
-"lastname": "User",
-"username": "test",
-# Random characters are appended for unique
-# username
-"password": "password",
-},
- "service_offering": {
-"name": "Tiny Instance",
-"displaytext": "Tiny Instance",
-"cpunumber": 1,
-"cpuspeed": 100,
-"memory": 128,
-},
-"service_offering_1": {
-"name": "Tiny Instance- tagged host 1",
-"displaytext": "Tiny off-tagged host2",
-"cpunumber": 1,
-"cpuspeed": 100,
-"memory": 128,
-"tags": "HOST_TAGS_HERE"
-},
- "service_offering_2": {
-"name": "Tiny Instance- tagged host 2",
-"displaytext": "Tiny off-tagged host2",
-"cpunumber": 1,
-"cpuspeed": 100,
-"memory": 128,
-"tags": "HOST_TAGS_HERE"
-},
- "network_offering": {
-"name": 'VPC Network offering',
-"displaytext": 'VPC Network off',
-"guestiptype": 'Isolated',
-"supportedservices": 
'Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
-"traffictype": 'GUEST',
-"availability": 'Optional',
-"useVpc": 'on',
-"serviceProviderList": {
-"Dhcp": 'VpcVirtualRouter',
-"Dns": 'VpcVirtualRouter',
-"SourceNat": 'VpcVirtualRouter',
-"PortForwarding": 
'VpcVirtualRouter',
-"Lb": 'VpcVirtualRouter',
-"UserData": 'VpcVirtualRouter',
-"StaticNat": 'VpcVirtualRouter',
-"NetworkACL": 'VpcVirtualRouter'
-},
-},
- "network_offering_no_lb": {
-"name": 'VPC Network offering',
-

[50/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack 
into disk_io_throttling


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

Branch: refs/heads/disk_io_throttling
Commit: 8b8a0d39756027e359386e018e15e15650ff19a0
Parents: 869a6b0 3f3c6aa
Author: Wei Zhou 
Authored: Mon Jun 10 19:25:59 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 19:25:59 2013 +0200

--
 .../storage/dao/SnapshotPolicyDaoImpl.java  |  1 -
 setup/dev/advanced.cfg  | 18 +
 ...deploy_vms_with_varied_deploymentplanners.py | 21 
 3 files changed, 31 insertions(+), 9 deletions(-)
--




[11/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2884: str object interpreted as index

Casting to an int for almostEqual comparison

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 1c9cd9d36077331a7b25d19e18ae73918e5662f6
Parents: 4f07679
Author: Prasanna Santhanam 
Authored: Fri Jun 7 14:49:00 2013 +0530
Committer: Prasanna Santhanam 
Committed: Fri Jun 7 14:49:00 2013 +0530

--
 test/integration/smoke/test_service_offerings.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1c9cd9d3/test/integration/smoke/test_service_offerings.py
--
diff --git a/test/integration/smoke/test_service_offerings.py 
b/test/integration/smoke/test_service_offerings.py
index a56e34d..0213c04 100644
--- a/test/integration/smoke/test_service_offerings.py
+++ b/test/integration/smoke/test_service_offerings.py
@@ -92,7 +92,7 @@ class Services:
 "displaytext": "Small Instance",
 "cpunumber": 1,
 "cpuspeed": 100,
-"memory": 256,
+"memory": 128,
 },
 "medium":
 {
@@ -433,7 +433,7 @@ class TestServiceOfferings(cloudstackTestCase):
 )
 self.assertAlmostEqual(
 int(total_mem) / 1024, # In MBs
-self.small_offering.memory,
+int(self.small_offering.memory),
 "Check Memory(kb) for small offering"
 )
 return



[20/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2811: Default add primary storage dialog to scope=cluster


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

Branch: refs/heads/disk_io_throttling
Commit: ce17f856eacce32e09b43dd955d5e2da2a678766
Parents: da5c461
Author: Brian Federle 
Authored: Fri Jun 7 11:05:01 2013 -0700
Committer: Brian Federle 
Committed: Fri Jun 7 11:05:01 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ce17f856/ui/scripts/system.js
--
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index e3d7b41..f853ed5 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -11425,8 +11425,8 @@
 label: 'label.scope',
 select: function(args) {
   var scope = [
-{ id: 'zone', description: _l('label.zone.wide') },
-{ id: 'cluster', description: _l('label.cluster') }
+{ id: 'cluster', description: _l('label.cluster') },
+{ id: 'zone', description: _l('label.zone.wide') }
// { id: 'host', description: _l('label.host') }
   ];
 



[32/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Improve debug message when failing the test

Added the listVM response as part of debug logging

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 52f9d5efe238c5fe7a36c2d7094f3f73ca9357cd
Parents: 6e24542
Author: Prasanna Santhanam 
Authored: Mon Jun 10 13:36:13 2013 +0530
Committer: Prasanna Santhanam 
Committed: Mon Jun 10 13:38:33 2013 +0530

--
 test/integration/smoke/test_vm_life_cycle.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/52f9d5ef/test/integration/smoke/test_vm_life_cycle.py
--
diff --git a/test/integration/smoke/test_vm_life_cycle.py 
b/test/integration/smoke/test_vm_life_cycle.py
index afe9b8a..9aaa13f 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -687,10 +687,12 @@ class TestVMLifeCycle(cloudstackTestCase):
 else:
 break
 
+self.debug("listVirtualMachines response: %s" % list_vm_response)
+
 self.assertEqual(
 list_vm_response,
 None,
-"Check Expunged virtual machine is listVirtualMachines"
+"Check Expunged virtual machine is in 
listVirtualMachines response"
 )
 return
 



[23/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Remove vm from cleanup list

VM will be cleaned up when the account is cleaned up

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: c30d9be3cea30339cfff40c1002906634291b373
Parents: cb80ae2
Author: Prasanna Santhanam 
Authored: Sat Jun 8 13:27:08 2013 +0530
Committer: Prasanna Santhanam 
Committed: Sat Jun 8 13:27:08 2013 +0530

--
 test/integration/smoke/test_routers.py | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c30d9be3/test/integration/smoke/test_routers.py
--
diff --git a/test/integration/smoke/test_routers.py 
b/test/integration/smoke/test_routers.py
index f6ca279..d89acf9 100644
--- a/test/integration/smoke/test_routers.py
+++ b/test/integration/smoke/test_routers.py
@@ -107,7 +107,6 @@ class TestRouterServices(cloudstackTestCase):
 serviceofferingid=cls.service_offering.id
 )
 cls.cleanup = [
-   cls.vm_1,
cls.account,
cls.service_offering
]



[41/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
pvlan


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

Branch: refs/heads/disk_io_throttling
Commit: 840e14de0b322013a496f62958889383f9ccc1e3
Parents: 78811c5
Author: radhikap 
Authored: Mon Jun 10 17:56:27 2013 +0530
Committer: radhikap 
Committed: Mon Jun 10 17:56:27 2013 +0530

--
 docs/en-US/pvlan.xml | 117 +++---
 1 file changed, 99 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/840e14de/docs/en-US/pvlan.xml
--
diff --git a/docs/en-US/pvlan.xml b/docs/en-US/pvlan.xml
index 5084ec4..e3f2ea3 100644
--- a/docs/en-US/pvlan.xml
+++ b/docs/en-US/pvlan.xml
@@ -21,27 +21,25 @@
 -->
 
   Isolation in Advanced Zone Using Private VLAN
-  
+  Isolation of guest traffic in shared networks can be achieved by using 
Private VLANs
+(PVLAN). PVLANs provide Layer 2 isolation between ports within the same 
VLAN. In a PVLAN-enabled
+shared network, a user VM cannot reach other user VM though they can reach 
the DHCP server and
+gateway, this would in turn allow users to control traffic within a 
network and help them deploy
+multiple applications without communication between application as well as 
prevent communication
+with other users’ VMs.
   
 
-  isolate VMs from other VMs on the same network (Shared Networks 
are the most common use
-case) using PVLANs
+  Isolate VMs in a shared networks by using Private VLANs.
 
 
-  create a Network Offering enabling PVLAN support
+  Supported in both VPC and non-VPC deployments.
 
 
-  create shared networks based on a network offering which has 
PVLANs enabled
+  Supported on all hypervisors.
 
 
-  supported in VPC as well as non-VPC deployments
-
-
-  supported on all Hypervisors
-
-
-  Allow end users to deploy VMs on Isolated Networks or VPC along 
with the Shared Networks
-that have PVLAN support
+  Allow end users to deploy VMs in an isolated networks, or a VPC, 
or a Private
+VLAN-enabled shared network.
 
   
   
@@ -54,7 +52,38 @@
   Secondary VLAN. The original VLAN that is being divided into smaller 
groups is called Primary,
   which implies that all VLAN pairs in a private VLAN share the same 
Primary VLAN. All the
   secondary VLANs exist only inside the Primary. Each Secondary VLAN has a 
specific VLAN ID
-  associated to it, which differentiates one sub-domain from 
another.
+  associated to it, which differentiates one sub-domain from another. 

+Three types of ports exist in a private VLAN domain, which 
essentially determine the
+  behaviour of the participating hosts. Each ports will have its own 
unique set of rules, which
+  regulate a connected host's ability to communicate with other connected 
host within the same
+  private VLAN domain. Configure each host that is part of a PVLAN pair 
can be by using one of
+  these three port designation:
+
+  
+Promiscuous: A promiscuous port 
can communicate with
+  all the interfaces, including the community and isolated host ports 
that belong to the
+  secondary VLANs. In Promiscuous mode, hosts are connected to 
promiscuous ports and are
+  able to communicate directly with resources on both primary and 
secondary VLAN. Routers,
+  DHCP servers, and other trusted devices are typically attached to 
promiscuous
+  ports.
+  
+  
+Isolated VLANs: The ports 
within an isolated VLAN
+  cannot communicate with each other at the layer-2 level. The hosts 
that are connected to
+  Isolated ports can directly communicate only with the Promiscuous 
resources. If your
+  customer device needs to have access only to a gateway router, 
attach it to an isolated
+  port.
+  
+  
+Community VLANs: The ports 
within a community VLAN
+  can communicate with each other and with the promiscuous ports, but 
they cannot
+  communicate with the ports in other communities at the layer-2 
level. In a Community mode,
+  direct communication is permitted only with the hosts in the same 
community and those that
+  are connected to the Primary PVLAN in promiscuous mode. If your 
customer has two devices
+  that need to be isolated from other customers' devices, but to be 
able to communicate
+  among themselves, deploy them in community ports.
+  
+
 For further reading:
 
   

[47/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Test should find Routing hosts not specific hypervisor_type

Bug in listing hosts that can be used for deploying VMs. Use Routing
hosts to identify hosts regardless of hypervisor_type.

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 3f3c6aa35f64c4129c203d54840524e6aa2c4621
Parents: ef0e0f3
Author: Prasanna Santhanam 
Authored: Mon Jun 10 21:05:33 2013 +0530
Committer: Prasanna Santhanam 
Committed: Mon Jun 10 21:05:33 2013 +0530

--
 .../smoke/test_deploy_vms_with_varied_deploymentplanners.py| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3f3c6aa3/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
--
diff --git 
a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py 
b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
index f1b3043..af83299 100644
--- a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
+++ b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
@@ -76,7 +76,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
 domainid=cls.domain.id
 )
 cls.services["account"] = cls.account.name
-cls.hosts = Host.list(cls.apiclient, hypervisortype='Simulator')
+cls.hosts = Host.list(cls.apiclient, type='Routing')
 cls.cleanup = [
 cls.account
 ]



[18/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack


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

Branch: refs/heads/disk_io_throttling
Commit: e218a6dcfd8ce514ff04df0631ea5fa6ac31cf8b
Parents: 5dc7387 195e823
Author: Sateesh Chodapuneedi 
Authored: Fri Jun 7 17:08:23 2013 +0530
Committer: Sateesh Chodapuneedi 
Committed: Fri Jun 7 17:08:23 2013 +0530

--
 test/integration/smoke/test_vm_life_cycle.py | 9 +
 1 file changed, 9 insertions(+)
--




[15/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-869:Netscaler support as an external LB provider


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

Branch: refs/heads/disk_io_throttling
Commit: 5233e3216b11e69c7c7e051f0a6c3d0c6bf98803
Parents: bcc5baa
Author: Pranav Saxena 
Authored: Fri Jun 7 16:53:32 2013 +0530
Committer: Pranav Saxena 
Committed: Fri Jun 7 16:53:32 2013 +0530

--
 ui/scripts/network.js | 25 +
 1 file changed, 17 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5233e321/ui/scripts/network.js
--
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index a3e239b..9e60cbc 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -4536,20 +4536,29 @@
   loadbalancer:{//Support for Netscaler as an external 
device for load balancing
 label:'Load Balancer',
 select:function(args){
+ $.ajax({
+  url:createURL('listVPCOfferings&listall=true'),
+  dataType:'json',
+  success:function(json){
+var items=[];
+var vpcObj = json.listvpcofferingsresponse.vpcoffering;
+$(vpcObj).each(function(){
+  items.push({id:this.id , description:this.name});
+  });
+args.response.success({data:items});
 
-var items = [];
-items.push({id:'vpcvirtualrouter' , description:'VPC 
Virtual Router'});
-items.push({id:'netscaler' , description:'NetScaler'});
+ }
 
-args.response.success({data:items});
-  }
+ });
+
+   }
 
 }
 
 }
   },  
   action: function(args) { 

-   var 
defaultvpcofferingid;
+   /*  var 
defaultvpcofferingid;
$.ajax({
  url: 
createURL("listVPCOfferings"),

dataType: "json",
@@ -4560,14 +4569,14 @@

success: function(json) {
  
defaultvpcofferingid = json.listvpcofferingsresponse.vpcoffering[0].id;
}
-   });
+   });*/

var dataObj = {
name: 
args.data.name,

displaytext: args.data.displaytext,
zoneid: 
args.data.zoneid,
cidr: 
args.data.cidr,
-   
vpcofferingid: defaultvpcofferingid
+   
vpcofferingid: args.data.loadbalancer// Support for external load balancer
};


if(args.data.networkdomain != null && args.data.networkdomain.length > 0)



[43/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack


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

Branch: refs/heads/disk_io_throttling
Commit: 50dc67bc2e5e15522f299c05e2923b34bbdd1081
Parents: 76ce304 840e14d
Author: Wei Zhou 
Authored: Mon Jun 10 15:01:08 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 15:01:08 2013 +0200

--
 docs/en-US/pvlan.xml | 118 +++---
 1 file changed, 112 insertions(+), 6 deletions(-)
--




[31/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2914: lbScheme Public should be specified in NetworkOffering

NetworkOfferings now require a mandatory scheme in the
serviceCapabilityList to create a VPC loadbalancer on the public side.
This commit fixes the test for VPC networks. Additionally there needs to
be a fix for making this the default behaviour so as not to hurt the
backwards compatibility.

test still fails because of CLOUDSTACK-2915 however which is a related
network ACL backwards compat issue. See bug for more details.

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 20c1f2c3466926163ccf0fe1487b3ca61d35da07
Parents: 52f9d5e
Author: Prasanna Santhanam 
Authored: Mon Jun 10 13:36:38 2013 +0530
Committer: Prasanna Santhanam 
Committed: Mon Jun 10 13:38:33 2013 +0530

--
 test/integration/component/test_vpc_network.py | 271 ++--
 1 file changed, 138 insertions(+), 133 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20c1f2c3/test/integration/component/test_vpc_network.py
--
diff --git a/test/integration/component/test_vpc_network.py 
b/test/integration/component/test_vpc_network.py
index c321103..a997f43 100644
--- a/test/integration/component/test_vpc_network.py
+++ b/test/integration/component/test_vpc_network.py
@@ -35,139 +35,144 @@ class Services:
 
 def __init__(self):
 self.services = {
- "account": {
-"email": "t...@test.com",
-"firstname": "Test",
-"lastname": "User",
-"username": "test",
-# Random characters are appended for unique
-# username
-"password": "password",
-},
- "service_offering": {
-"name": "Tiny Instance",
-"displaytext": "Tiny Instance",
-"cpunumber": 1,
-"cpuspeed": 100,
-"memory": 128,
-},
- "network_offering": {
-"name": 'VPC Network offering',
-"displaytext": 'VPC Network off',
-"guestiptype": 'Isolated',
-"supportedservices": 
'Vpn,Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
-"traffictype": 'GUEST',
-"availability": 'Optional',
-"useVpc": 'on',
-"serviceProviderList": {
-"Vpn": 'VpcVirtualRouter',
-"Dhcp": 'VpcVirtualRouter',
-"Dns": 'VpcVirtualRouter',
-"SourceNat": 'VpcVirtualRouter',
-"PortForwarding": 
'VpcVirtualRouter',
-"Lb": 'VpcVirtualRouter',
-"UserData": 'VpcVirtualRouter',
-"StaticNat": 'VpcVirtualRouter',
-"NetworkACL": 'VpcVirtualRouter'
-},
-"servicecapabilitylist": {
-},
-},
- "network_off_netscaler": {
-"name": 'Network offering-netscaler',
-"displaytext": 'Network 
offering-netscaler',
-"guestiptype": 'Isolated',
-"supportedservices": 
'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat',
-"traffictype": 'GUEST',
-"availability": 'Optional',
-"useVpc": 'on',
-"serviceProviderList": {
-"Dhcp": 'VpcVirtualRouter',
-"Dns": 'VpcV

[34/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Fixes to test_vpc_lifecycle

- Removing redundant creation of VPC offerings
- Removing cleanup based on configurations.GC should happen by default
- Speed up the run by not waiting for complete gc.

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 4a99f4758136b2e824cc5e6be4aa0cd74c826d6c
Parents: 6607b1e
Author: Prasanna Santhanam 
Authored: Mon Jun 10 15:40:52 2013 +0530
Committer: Prasanna Santhanam 
Committed: Mon Jun 10 15:41:56 2013 +0530

--
 .../component/test_vpc_vm_life_cycle.py | 80 ++--
 1 file changed, 6 insertions(+), 74 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a99f475/test/integration/component/test_vpc_vm_life_cycle.py
--
diff --git a/test/integration/component/test_vpc_vm_life_cycle.py 
b/test/integration/component/test_vpc_vm_life_cycle.py
index 1fd2724..e198c79 100644
--- a/test/integration/component/test_vpc_vm_life_cycle.py
+++ b/test/integration/component/test_vpc_vm_life_cycle.py
@@ -212,11 +212,6 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
 cls.api_client,
 cls.services["service_offering"]
 )
-cls.vpc_off = VpcOffering.create(
- cls.api_client,
- cls.services["vpc_offering"]
- )
-cls.vpc_off.update(cls.api_client, state='Enabled')
 
 cls.account = Account.create(
  cls.api_client,
@@ -268,18 +263,6 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
 )
 # Enable Network offering
 cls.nw_off_no_lb.update(cls.api_client, state='Enabled')
-
-# Creating network using the network offering created
-cls.network_2 = Network.create(
-cls.api_client,
-cls.services["network"],
-accountid=cls.account.name,
-domainid=cls.account.domainid,
-networkofferingid=cls.nw_off_no_lb.id,
-zoneid=cls.zone.id,
-gateway='10.1.2.1',
-vpcid=cls.vpc.id
-)
 # Spawn an instance in that network
 cls.vm_1 = VirtualMachine.create(
   cls.api_client,
@@ -289,7 +272,6 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
   serviceofferingid=cls.service_offering.id,
   networkids=[str(cls.network_1.id)]
   )
-# Spawn an instance in that network
 cls.vm_2 = VirtualMachine.create(
   cls.api_client,
   cls.services["virtual_machine"],
@@ -298,15 +280,6 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
   serviceofferingid=cls.service_offering.id,
   networkids=[str(cls.network_1.id)]
   )
-cls.vm_3 = VirtualMachine.create(
-  cls.api_client,
-  cls.services["virtual_machine"],
-  accountid=cls.account.name,
-  domainid=cls.account.domainid,
-  serviceofferingid=cls.service_offering.id,
-  networkids=[str(cls.network_2.id)]
-  )
-
 cls.public_ip_1 = PublicIPAddress.create(
 cls.api_client,
 accountid=cls.account.name,
@@ -370,20 +343,15 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
 cls.service_offering,
 cls.nw_off,
 cls.nw_off_no_lb,
+cls.account
 ]
 return
 
 @classmethod
 def tearDownClass(cls):
 try:
-cls.account.delete(cls.api_client)
-wait_for_cleanup(cls.api_client, ["account.cleanup.interval"])
 #Cleanup resources used
 cleanup_resources(cls.api_client, cls._cleanup)
-
-# Waiting for network clea

[01/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Updated Branches:
  refs/heads/disk_io_throttling f2e5591b7 -> 8b8a0d397


Allow account to have multiple networks with customer defined cidrs as we 
already let it happen when the cidr is taken from the physical network config


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

Branch: refs/heads/disk_io_throttling
Commit: f4a1a2ff380478fcd23319f0fd2678c50b971e36
Parents: 9a175f9
Author: Alena Prokharchyk 
Authored: Thu Jun 6 11:52:15 2013 -0700
Committer: Alena Prokharchyk 
Committed: Thu Jun 6 11:52:15 2013 -0700

--
 .../src/com/cloud/network/NetworkManagerImpl.java  | 17 -
 1 file changed, 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f4a1a2ff/server/src/com/cloud/network/NetworkManagerImpl.java
--
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java 
b/server/src/com/cloud/network/NetworkManagerImpl.java
index b92ef4b..cae4e8a 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -1490,23 +1490,6 @@ public class NetworkManagerImpl extends ManagerBase 
implements NetworkManager, L
 return configs;
 }
 }
-} else if (predefined != null && predefined.getCidr() != null && 
predefined.getBroadcastUri() == null && vpcId == null) {
-// don't allow to have 2 networks with the same cidr in the 
same zone for the account
-List configs = _networksDao.listBy(owner.getId(), 
plan.getDataCenterId(), predefined.getCidr(), true);
-if (configs.size() > 0) {
-if (s_logger.isDebugEnabled()) {
-s_logger.debug("Found existing network configuration 
for offering " + offering + ": " + configs.get(0));
-}
-
-if (errorIfAlreadySetup) {
-InvalidParameterValueException ex = new 
InvalidParameterValueException("Found existing network configuration (with 
specified id) for offering (with specified id)");
-ex.addProxyObject(offering.getUuid(), "offeringId");
-ex.addProxyObject(configs.get(0).getUuid(), 
"networkConfigId");
-throw ex;
-} else {
-return configs;
-}
-}
 }
 
 List networks = new ArrayList();



[09/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack


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

Branch: refs/heads/disk_io_throttling
Commit: 4f07679d4966a0e2de97fb0e3a42fb695436e330
Parents: 1bdb626 c2ac409
Author: Sebastien Goasguen 
Authored: Fri Jun 7 02:59:48 2013 -0400
Committer: Sebastien Goasguen 
Committed: Fri Jun 7 02:59:48 2013 -0400

--
 .../debian/config/etc/iptables/iptables-router  |  1 +
 .../ExternalFirewallDeviceManagerImpl.java  |  2 +-
 .../ExternalLoadBalancerDeviceManagerImpl.java  |  4 +-
 .../src/com/cloud/network/NetworkManager.java   |  2 +-
 .../com/cloud/network/NetworkManagerImpl.java   | 20 +
 .../src/com/cloud/network/NetworkModelImpl.java | 17 +---
 .../com/cloud/network/NetworkServiceImpl.java   |  1 +
 .../cloud/network/guru/DirectNetworkGuru.java   |  5 +--
 .../network/guru/DirectPodBasedNetworkGuru.java |  2 +-
 .../VirtualNetworkApplianceManagerImpl.java | 46 +++-
 .../VpcVirtualNetworkApplianceManagerImpl.java  |  6 +--
 .../network/vpc/NetworkACLManagerImpl.java  |  3 ++
 .../network/vpc/NetworkACLServiceImpl.java  | 40 +
 .../cloud/network/MockNetworkManagerImpl.java   |  9 +---
 .../com/cloud/vpc/MockNetworkManagerImpl.java   |  2 +-
 test/integration/smoke/test_volumes.py  |  5 +++
 ui/scripts/system.js| 16 +++
 ui/scripts/vpc.js   | 45 +--
 ui/scripts/zoneWizard.js|  5 ++-
 19 files changed, 122 insertions(+), 109 deletions(-)
--




[26/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2894. Removing all vlan ranges should update the vnet column to NULL.


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

Branch: refs/heads/disk_io_throttling
Commit: 22a850828001b89fd6ac8e3916256bc7e966a1ef
Parents: 8bc72ad
Author: Likitha Shetty 
Authored: Fri Jun 7 19:22:39 2013 +0530
Committer: Likitha Shetty 
Committed: Mon Jun 10 10:39:55 2013 +0530

--
 .../com/cloud/network/NetworkServiceImpl.java   | 20 
 1 file changed, 12 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/22a85082/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 c2af8e8..c7be2c6 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -2680,9 +2680,10 @@ public class NetworkServiceImpl extends ManagerBase 
implements  NetworkService {
 vnetString = 
vnetString+vnetRange.first().toString()+"-"+value.toString()+";";
 }
}
-vnetString = vnetString+"*";
-vnetString = vnetString.replace(";*","");
-network.setVnet(vnetString);
+   if (vnetString.length() > 0 && 
vnetString.charAt(vnetString.length()-1)==';') {
+   vnetString = vnetString.substring(0, vnetString.length()-1);
+   }
+   network.setVnet(vnetString);
 }
 
 for (Pair vnetToAdd : vnetsToAdd) {
@@ -2788,12 +2789,15 @@ public class NetworkServiceImpl extends ManagerBase 
implements  NetworkService {
 _datacneter_vnet.deleteRange(txn, network.getDataCenterId(), 
network.getId(), start, end);
 
 String vnetString="";
-for (Pair vnetRange : existingRanges ){
-
vnetString=vnetString+vnetRange.first().toString()+"-"+vnetRange.second().toString()+";";
+if (existingRanges.isEmpty()) {
+network.setVnet(null);
+} else {
+for (Pair vnetRange : existingRanges ) {
+
vnetString=vnetString+vnetRange.first().toString()+"-"+vnetRange.second().toString()+";";
+}
+vnetString = vnetString.substring(0, vnetString.length()-1);
+network.setVnet(vnetString);
 }
-vnetString = vnetString+"*";
-vnetString = vnetString.replace(";*","");
-network.setVnet(vnetString);
 _physicalNetworkDao.update(network.getId(), network);
 txn.commit();
 _physicalNetworkDao.releaseFromLockTable(network.getId());



[46/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
deployment planners plan per clusters not hosts

Concentration or Dispersion granularity is at the Cluster level and not
at the host level. So correcting the test to ensure

a. concentrated planner puts the VMs in same cluster
b. dispersed planner puts the Vms in diff't clusters

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: ef0e0f36b2e33eb65c2f0a2e99aa02eabf872b85
Parents: 5b48ec2
Author: Prasanna Santhanam 
Authored: Mon Jun 10 20:38:37 2013 +0530
Committer: Prasanna Santhanam 
Committed: Mon Jun 10 20:40:07 2013 +0530

--
 setup/dev/advanced.cfg  | 18 +
 ...deploy_vms_with_varied_deploymentplanners.py | 21 
 2 files changed, 31 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef0e0f36/setup/dev/advanced.cfg
--
diff --git a/setup/dev/advanced.cfg b/setup/dev/advanced.cfg
index 8335786..3020165 100644
--- a/setup/dev/advanced.cfg
+++ b/setup/dev/advanced.cfg
@@ -99,6 +99,24 @@
 "name": "PS1"
 }
 ]
+},
+{
+"clustername": "C1",
+"hypervisor": "simulator",
+"hosts": [
+{
+"username": "root",
+"url": "http://sim/c1/h0";,
+"password": "password"
+}
+],
+"clustertype": "CloudManaged",
+"primaryStorages": [
+{
+"url": 
"nfs://10.147.28.6:/export/home/sandbox/primary2",
+"name": "PS2"
+}
+]
 }
 ],
 "gateway": "172.16.15.1"

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ef0e0f36/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
--
diff --git 
a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py 
b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
index 67532c7..f1b3043 100644
--- a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
+++ b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
@@ -16,7 +16,7 @@
 # under the License.
 
 from marvin.cloudstackTestCase import cloudstackTestCase
-from marvin.integration.lib.base import Account, VirtualMachine, 
ServiceOffering
+from marvin.integration.lib.base import Account, VirtualMachine, 
ServiceOffering, Host
 from marvin.integration.lib.common import get_zone, get_domain, get_template, 
cleanup_resources
 
 from nose.plugins.attrib import attr
@@ -76,6 +76,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
 domainid=cls.domain.id
 )
 cls.services["account"] = cls.account.name
+cls.hosts = Host.list(cls.apiclient, hypervisortype='Simulator')
 cls.cleanup = [
 cls.account
 ]
@@ -177,10 +178,12 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
 "Running",
 msg="VM is not in Running state"
 )
+vm1clusterid = filter(lambda c: c.id == vm1.hostid, 
self.hosts)[0].clusterid
+vm2clusterid = filter(lambda c: c.id == vm2.hostid, 
self.hosts)[0].clusterid
 self.assertNotEqual(
-vm1.hostid,
-vm2.hostid,
-msg="VMs meant to be dispersed are deployed on the same host"
+vm1clusterid,
+vm2clusterid,
+msg="VMs (%s, %s) meant to be dispersed are deployed in the same 
cluster %s" % (vm1.id, vm2.id, vm1clusterid)
 )
 
 @attr(tags=["simulator", "advanced", "basic", "sg"])
@@ -236,10 +239,12 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
 "Running",
 msg="VM is not in Running state"
 )
-self.assertNotEqual(
-vm1.hostid,
-vm2.hostid,
-msg="VMs meant to be concentrated are deployed on the different 
hosts"
+vm1clusterid = filter(lambda c: c.id == vm1.hostid, 
self.hosts)[0].clusteri

[48/50] [abbrv] CLOUDSTACK-1301: VM Disk I/O Throttling on Bps/IOps

2013-06-10 Thread weizhou
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/869a6b0c/ui/scripts/configuration.js
--
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index 33ecdb5..6a9765e 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -109,15 +109,29 @@
   number: true
 }
   },
-  diskBytesRate: {
- label: 'label.disk.bytes.rate',
+  diskBytesReadRate: {
+ label: 'label.disk.bytes.read.rate',
   validation: {
 required: false, //optional
 number: true
   }
   },
-  diskIORate: {
- label: 'label.disk.iops.rate',
+  diskBytesWriteRate: {
+  label: 'label.disk.bytes.write.rate',
+  validation: {
+required: false, //optional
+number: true
+  }
+  },
+  diskIopsReadRate: {
+ label: 'label.disk.iops.read.rate',
+  validation: {
+required: false, //optional
+number: true
+  }
+  },
+  diskIopsWriteRate: {
+  label: 'label.disk.iops.write.rate',
   validation: {
 required: false, //optional
 number: true
@@ -241,17 +255,26 @@
  
networkrate: args.data.networkRate
});
}
-if(args.data.diskBytesRate != null && 
args.data.diskBytesRate.length > 0) {
+if(args.data.diskBytesReadRate != null && 
args.data.diskBytesReadRate.length > 0) {
   
$.extend(data, {
-  
bytesRate: args.data.diskBytesRate
+  
bytesreadrate: args.data.diskBytesReadRate
 });
 }
-if(args.data.diskIORate != null && args.data.diskIORate.length 
> 0) {
+if(args.data.diskBytesWriteRate != null && 
args.data.diskBytesWriteRate.length > 0) {
   
$.extend(data, {
-  
iopsRate: args.data.diskIORate
+  
byteswriterate: args.data.diskBytesWriteRate
+});
+}
+if(args.data.diskIopsReadRate != null && 
args.data.diskIopsReadRate.length > 0) {
+  
$.extend(data, {
+  
iopsreadrate: args.data.diskIopsReadRate
+});
+}
+if(args.data.diskIopsWriteRate != null && 
args.data.diskIopsWriteRate.length > 0) {
+  
$.extend(data, {
+  
iopswriterate: args.data.diskIopsWriteRate
 });
 }
-
 $.extend(data, {
   offerha: (args.data.offerHA == "on")
 });
@@ -420,8 +443,10 @@
   }
 },
 networkrate: { label: 'label.network.rate' },
-diskBytesRate: { label: 'label.disk.bytes.rate' },
-diskIORate: { label: 'label.disk.iops.rate' },
+diskBytesReadRate: { label: 'label.disk.bytes.read.rate' },
+diskBytesWriteRate: { label: 'label.disk.bytes.write.rate' 
},
+diskIopsReadRate: { label: 'label.disk.iops.read.rate' },
+diskIopsWriteRate: { label: 'label.disk.iops.write.rate' },
 offerha: {
   label: 'l

[03/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-747: Internal LB detailView - Assigned VMs tab - Assign VMs action - 
Select VM view - refresh assignedVMs data by API call when popping up Select VM 
view.


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

Branch: refs/heads/disk_io_throttling
Commit: 554178582709e51ef934fa2684b281e83f3a3ed5
Parents: f61d61d
Author: Jessica Wang 
Authored: Thu Jun 6 16:04:31 2013 -0700
Committer: Jessica Wang 
Committed: Thu Jun 6 16:07:49 2013 -0700

--
 ui/scripts/vpc.js | 24 ++--
 1 file changed, 18 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/55417858/ui/scripts/vpc.js
--
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index a087baa..399699d 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -651,7 +651,21 @@
   listView: $.extend(true, {}, 
cloudStack.sections.instances.listView, {
 type: 'checkbox',
 filters: false,
-dataProvider: function(args) { 
+dataProvider: function(args) {   
+  var assignedInstances;
+  $.ajax({
+url: createURL('listLoadBalancers'),
+data: {
+  id: args.context.internalLoadBalancers[0].id
+},
+async: false,
+success: function(json) {
+  assignedInstances = 
json.listloadbalancerssresponse.loadbalancer[0].loadbalancerinstance; 
+  if(assignedInstances == null)
+assignedInstances = []; 
+}
+  }); 
+  
   $.ajax({
 url: createURL('listVirtualMachines'),
 data: {
@@ -663,11 +677,9 @@
 
   // Pre-select existing instances in LB rule
   $(instances).map(function(index, instance) {
-instance._isSelected = $.grep(
-  
args.context.internalLoadBalancers[0].loadbalancerinstance,
-  
-  function(lbInstance) {
-return lbInstance.id == instance.id;
+instance._isSelected = 
$.grep(assignedInstances,  
+  function(assignedInstance) {
+return assignedInstance.id == instance.id;
   }
 ).length ? true : false;
   });



[21/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2350: Anti-Affinity - As admin user, when tryinto update the 
affinity group for a Vm that is deployed by a regular user , he is presented 
with admin's affinity groups.

Changes:
- listAffinityGroups API takes in accountname and domainId parameter
- For admin, listall=true should return all affinity groups of all users


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

Branch: refs/heads/disk_io_throttling
Commit: 8c9f681f9eba377d1eee279329090fbbdc46c5ab
Parents: ce17f85
Author: Prachi Damle 
Authored: Fri Jun 7 15:27:39 2013 -0700
Committer: Prachi Damle 
Committed: Fri Jun 7 15:28:28 2013 -0700

--
 .../affinitygroup/ListAffinityGroupsCmd.java|  7 +++--
 .../apache/cloudstack/query/QueryService.java   |  3 +-
 .../com/cloud/api/query/QueryManagerImpl.java   | 33 +++-
 .../src/com/cloud/user/AccountManagerImpl.java  |  4 +++
 4 files changed, 29 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c9f681f/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
 
b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
index 9310fb9..d966a4c 100644
--- 
a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
@@ -19,7 +19,7 @@ package org.apache.cloudstack.api.command.user.affinitygroup;
 import org.apache.cloudstack.affinity.AffinityGroupResponse;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.BaseListAccountResourcesCmd;
 import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.response.ListResponse;
 import org.apache.cloudstack.api.response.UserVmResponse;
@@ -28,7 +28,7 @@ import org.apache.log4j.Logger;
 import com.cloud.async.AsyncJob;
 
 @APICommand(name = "listAffinityGroups", description = "Lists affinity 
groups", responseObject = AffinityGroupResponse.class)
-public class ListAffinityGroupsCmd extends BaseListCmd {
+public class ListAffinityGroupsCmd extends BaseListAccountResourcesCmd {
 public static final Logger s_logger = 
Logger.getLogger(ListAffinityGroupsCmd.class.getName());
 
 private static final String s_name = "listaffinitygroupsresponse";
@@ -77,7 +77,8 @@ public class ListAffinityGroupsCmd extends BaseListCmd {
 public void execute(){
 
 ListResponse response = 
_queryService.listAffinityGroups(id, affinityGroupName,
-affinityGroupType, virtualMachineId, this.getStartIndex(), 
this.getPageSizeVal());
+affinityGroupType, virtualMachineId, this.getAccountName(), 
this.getDomainId(), this.isRecursive(),
+this.listAll(), this.getStartIndex(), this.getPageSizeVal());
 response.setResponseName(getCommandName());
 this.setResponseObject(response);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c9f681f/api/src/org/apache/cloudstack/query/QueryService.java
--
diff --git a/api/src/org/apache/cloudstack/query/QueryService.java 
b/api/src/org/apache/cloudstack/query/QueryService.java
index 2dfd97c..73e393b 100644
--- a/api/src/org/apache/cloudstack/query/QueryService.java
+++ b/api/src/org/apache/cloudstack/query/QueryService.java
@@ -86,7 +86,8 @@ public interface QueryService {
 public ListResponse  listDataCenters(ListZonesByCmd cmd);
 
 public ListResponse listAffinityGroups(Long 
affinityGroupId, String affinityGroupName,
-String affinityGroupType, Long vmId, Long startIndex, Long 
pageSize);
+String affinityGroupType, Long vmId, String accountName, Long 
domainId, boolean isRecursive,
+boolean listAll, Long startIndex, Long pageSize);
 
 public List listResource(ListResourceDetailsCmd 
cmd);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c9f681f/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 28aecfc..beda75e 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@

[30/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
meng's proposal for GSOC2013


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

Branch: refs/heads/disk_io_throttling
Commit: 6e2454228313c3373bfa96ef623a4b6ceb88d0ee
Parents: c8d607e
Author: kyrameng 
Authored: Sun Jun 9 19:09:20 2013 -0400
Committer: Sebastien Goasguen 
Committed: Mon Jun 10 03:00:30 2013 -0400

--
 docs/en-US/CloudStack_GSoC_Guide.xml |   2 +-
 docs/en-US/gsoc-meng.xml | 235 ++
 2 files changed, 236 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6e245422/docs/en-US/CloudStack_GSoC_Guide.xml
--
diff --git a/docs/en-US/CloudStack_GSoC_Guide.xml 
b/docs/en-US/CloudStack_GSoC_Guide.xml
index 243a0ca..1f43593 100644
--- a/docs/en-US/CloudStack_GSoC_Guide.xml
+++ b/docs/en-US/CloudStack_GSoC_Guide.xml
@@ -49,6 +49,6 @@
 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/blob/6e245422/docs/en-US/gsoc-meng.xml
--
diff --git a/docs/en-US/gsoc-meng.xml b/docs/en-US/gsoc-meng.xml
new file mode 100644
index 000..1de259d
--- /dev/null
+++ b/docs/en-US/gsoc-meng.xml
@@ -0,0 +1,235 @@
+
+http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
+
+%BOOK_ENTITIES;
+]>
+
+
+
+
+Meng's 2013 GSoC Proposal
+This chapter describes Meng's 2013 Google Summer of Code project 
within the &PRODUCT; ASF project. It is a copy paste of the submitted 
proposal.
+   
+   Project Description
+   
+   Getting a hadoop cluster going can be challenging and 
painful due to the tedious configuration phase and the diverse idiosyncrasies 
of each cloud provider. Apache Whirrhttp://whirr.apache.org/ 
">[1] and Provisionr is a set of libraries for 
running cloud services in an automatic or semi-automatic fashion. They take 
advantage of a cloud-neutral library called jcloudshttp://www.jclouds.org/documentation/gettingstarted/what-is-jclouds/";>[2]
 to create one-click, auto-configuring hadoop clusters on multiple clouds. 
Since jclouds supports CloudStack API, most of the services provided by Whirr 
and Provisionr should work out of the box on CloudStack. My first task is to 
test that assumption, make sure everything is well documented, and correct all 
issues with the latest version of CloudStack (4.0 and 4.1).
+   
+   
+
+The biggest challenge for hadoop provisioning is automatically configuring 
each instance at launch time based on what it is supposed to do, a process 
known as contextualizationhttp://dl.acm.org/citation.cfm?id=1488934";>[3]http://www.nimbusproject.org/docs/current/clouds/clusters2.html 
">[4]. It causes last minute changes inside an 
instance to adapt to a cluster environment. Many automated cloud services are 
enabled by contextualization. For example in one-click hadoop clusters, 
contextualization basically amounts to generating and distributing ssh key 
pairs among instances, telling an instance where the master node is and what 
other slave nodes it should be aware of, etc. On EC2 contextualization is done 
via passing information through the EC2_USER_DATA entryhttp://aws.amazon.com/amazon-linux-ami/ 
">[5]https://svn.apache.org/repos/asf/whirr/bra
 
nches/contrib-python/src/py/hadoop/cloud/data/hadoop-ec2-init-remote.sh">[6].
 Whirr and Provisionr embrace this feature to provision hadoop instances on 
EC2. My second task is to test and extend Whirr and Provisionr’s one-click 
solution on EC2 to CloudStack and also improve CloudStack’s support for Whirr 
and Provisionr to enable hadoop provisioning on CloudStack based clouds.
+
+
+My third task is to add a Query API  that is compatible with Amazon Elastic 
MapReduce (EMR) to CloudStack. Through this API, all hadoop provisioning 
functionality will be exposed and users can reuse cloud clients that are 
written for EMR to create and manage hadoop clusters on CloudStack based clouds.
+
+   
+
+   
+   Project Details
+   
+   Whirr defines four roles for the hadoop provisioning 
service: Namenode, JobTracker, Datanode and TaskTraker. With the help of 
CloudInithttps://help.ubuntu.com/community/CloudInit 
">[7] (a popular package for cloud instance 
initialization), each VM instance is configured based on its role and a 
compressed file that is passed in the EC2_U

[14/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-869:Netscaler support as an external LB provider:front end


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

Branch: refs/heads/disk_io_throttling
Commit: bcc5baa1636037baa8c5ffbd3bbf70df8af4d024
Parents: e17a0c2
Author: Pranav Saxena 
Authored: Fri Jun 7 16:23:44 2013 +0530
Committer: Pranav Saxena 
Committed: Fri Jun 7 16:23:44 2013 +0530

--
 ui/scripts/network.js | 14 ++
 1 file changed, 14 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bcc5baa1/ui/scripts/network.js
--
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 050b75c..a3e239b 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -4531,7 +4531,21 @@
   networkdomain: {
 docID: 'helpVPCDomain',
 label: 'label.DNS.domain.for.guest.networks'
+  },
+
+  loadbalancer:{//Support for Netscaler as an external 
device for load balancing
+label:'Load Balancer',
+select:function(args){
+
+var items = [];
+items.push({id:'vpcvirtualrouter' , description:'VPC 
Virtual Router'});
+items.push({id:'netscaler' , description:'NetScaler'});
+
+args.response.success({data:items});
   }
+
+}
+
 }
   },  
   action: function(args) { 




[16/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-1647: IP Reservation should not happen if the guest-vm cidr and 
network cidr is not same but their start ip and end ip are same.

Signed-off-by: Sateesh Chodapuneedi 


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

Branch: refs/heads/disk_io_throttling
Commit: 5dc7387d3b6b1abd841abc92e3c76a3894213d82
Parents: 5233e32
Author: Saksham Srivastava 
Authored: Wed Jun 5 16:28:05 2013 +0530
Committer: Sateesh Chodapuneedi 
Committed: Fri Jun 7 16:54:40 2013 +0530

--
 .../com/cloud/network/NetworkServiceImpl.java   | 15 +++
 utils/src/com/cloud/utils/net/NetUtils.java | 28 
 .../test/com/cloud/utils/net/NetUtilsTest.java  | 19 +
 3 files changed, 62 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5dc7387d/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 29a36b9..c2af8e8 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -2116,6 +2116,21 @@ public class NetworkServiceImpl extends ManagerBase 
implements  NetworkService {
 }
 }
 
+// In some scenarios even though guesVmCidr and network CIDR 
do not appear similar but
+// the IP ranges exactly matches, in these special cases make 
sure no Reservation gets applied
+if (network.getNetworkCidr() == null) {
+if (NetUtils.isSameIpRange(guestVmCidr, network.getCidr()) 
&& !guestVmCidr.equals(network.getCidr())) {
+throw new InvalidParameterValueException("The Start IP 
and End IP of guestvmcidr: "+ guestVmCidr + " and CIDR: " + network.getCidr() + 
" are same, " +
+"even though both the cidrs appear to be 
different. As a precaution no IP Reservation will be applied.");
+}
+} else {
+if(NetUtils.isSameIpRange(guestVmCidr, 
network.getNetworkCidr()) && !guestVmCidr.equals(network.getNetworkCidr())) {
+throw new InvalidParameterValueException("The Start IP 
and End IP of guestvmcidr: "+ guestVmCidr + " and Network CIDR: " + 
network.getNetworkCidr() + " are same, " +
+"even though both the cidrs appear to be 
different. As a precaution IP Reservation will not be affected. If you want to 
reset IP Reservation, " +
+"specify guestVmCidr to be: " + 
network.getNetworkCidr());
+}
+}
+
 // When reservation is applied for the first time, 
network_cidr will be null
 // Populate it with the actual network cidr
 if (network.getNetworkCidr() == null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5dc7387d/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 8c094c8..12ac3e6 100755
--- a/utils/src/com/cloud/utils/net/NetUtils.java
+++ b/utils/src/com/cloud/utils/net/NetUtils.java
@@ -1023,6 +1023,34 @@ public class NetUtils {
 return NetUtils.getIpRangeStartIpFromCidr(splitResult[0], size);
 }
 
+// Check if 2 CIDRs have exactly same IP Range
+public static boolean isSameIpRange (String cidrA, String cidrB) {
+
+if(!NetUtils.isValidCIDR(cidrA)) {
+s_logger.info("Invalid value of cidr " + cidrA);
+return false;
+}
+ if (!NetUtils.isValidCIDR(cidrB)) {
+s_logger.info("Invalid value of cidr " + cidrB);
+return false;
+}
+String[] cidrPairFirst = cidrA.split("\\/");
+String[] cidrPairSecond = cidrB.split("\\/");
+
+Long networkSizeFirst = Long.valueOf(cidrPairFirst[1]);
+Long networkSizeSecond = Long.valueOf(cidrPairSecond[1]);
+String ipRangeFirst [] = NetUtils.getIpRangeFromCidr(cidrPairFirst[0], 
networkSizeFirst);
+String ipRangeSecond [] = 
NetUtils.getIpRangeFromCidr(cidrPairFirst[0], networkSizeSecond);
+
+long startIpFirst = NetUtils.ip2Long(ipRangeFirst[0]);
+long endIpFirst = NetUtils.ip2Long(ipRangeFirst[1]);
+long startIpSecond = NetUtils.ip2Long(ipRangeSecond[0]);
+long endIpSecond = NetUtils.ip2Long(ipRangeSecond[

[37/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2923: Delete Secondary storage of a Zone was giving NPE bcz we were 
still refering to the object. Instead log that the cpvm and ssvm cant be 
created bcz sec storage is not available


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

Branch: refs/heads/disk_io_throttling
Commit: d8a235ee316af7d9b21ea62581c8b5c8925081d8
Parents: 63494f8
Author: Nitin Mehta 
Authored: Fri Nov 23 14:11:51 2012 +0530
Committer: Nitin Mehta 
Committed: Mon Jun 10 16:48:50 2013 +0530

--
 .../src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java   | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8a235ee/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
--
diff --git a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java 
b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
index 421e53f..7362cf1 100755
--- a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
+++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
@@ -945,6 +945,13 @@ public class ConsoleProxyManagerImpl extends ManagerBase 
implements ConsoleProxy
 VMTemplateVO template = 
_templateDao.findSystemVMTemplate(dataCenterId);
 HostVO secondaryStorageHost = 
this.templateMgr.getSecondaryStorageHost(dataCenterId);
 boolean templateReady = false;
+
+if (secondaryStorageHost == null) {
+if (s_logger.isDebugEnabled()) {
+s_logger.debug("No secondary storage available in zone " + 
dataCenterId + ", wait until it is ready to launch secondary storage vm");
+}
+return false;
+}
 
 if (template != null && secondaryStorageHost != null) {
 VMTemplateHostVO templateHostRef = 
_vmTemplateHostDao.findByHostTemplate(secondaryStorageHost.getId(), 
template.getId());



[40/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2404 more conceptual info


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

Branch: refs/heads/disk_io_throttling
Commit: 78811c50021202cb2374ceeb9edf0fdac5c66398
Parents: d8a235e
Author: radhikap 
Authored: Fri Jun 7 16:44:02 2013 +0530
Committer: radhikap 
Committed: Mon Jun 10 17:55:28 2013 +0530

--
 docs/en-US/pvlan.xml | 31 ---
 1 file changed, 28 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/78811c50/docs/en-US/pvlan.xml
--
diff --git a/docs/en-US/pvlan.xml b/docs/en-US/pvlan.xml
index 96c1a78..5084ec4 100644
--- a/docs/en-US/pvlan.xml
+++ b/docs/en-US/pvlan.xml
@@ -22,15 +22,37 @@
 
   Isolation in Advanced Zone Using Private VLAN
   
+  
+
+  isolate VMs from other VMs on the same network (Shared Networks 
are the most common use
+case) using PVLANs
+
+
+  create a Network Offering enabling PVLAN support
+
+
+  create shared networks based on a network offering which has 
PVLANs enabled
+
+
+  supported in VPC as well as non-VPC deployments
+
+
+  supported on all Hypervisors
+
+
+  Allow end users to deploy VMs on Isolated Networks or VPC along 
with the Shared Networks
+that have PVLAN support
+
+  
   
 About Private VLAN
-In an Ethernet switch, a VLAN is a broadcast domain in which hosts 
can establish direct
+In an Ethernet switch, a VLAN is a broadcast domain where hosts can 
establish direct
   communication with each another at Layer 2. Private VLAN is designed as 
an extension of VLAN
   standard to add further segmentation of the logical broadcast domain. A 
regular VLAN is a
   single broadcast domain, whereas a private VLAN partitions a larger VLAN 
broadcast domain into
   smaller sub-domains. A sub-domain is represented by a pair of VLANs: a 
Primary VLAN and a
-  Secondary VLAN.  The original VLAN that is being divided into smaller 
groups is called
-  Primary, That implies all VLAN pairs in a private VLAN share the same 
Primary VLAN. All the
+  Secondary VLAN. The original VLAN that is being divided into smaller 
groups is called Primary,
+  which implies that all VLAN pairs in a private VLAN share the same 
Primary VLAN. All the
   secondary VLANs exist only inside the Primary. Each Secondary VLAN has a 
specific VLAN ID
   associated to it, which differentiates one sub-domain from 
another.
 For further reading:
@@ -50,6 +72,9 @@
   
 
   
+  
+Prerequisites
+  
   
 Prerequisites
 Ensure that you configure private VLAN on your physical switches 
out-of-band.



[13/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
[GSoC]: Proposal from Dharmesh Kakadia


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

Branch: refs/heads/disk_io_throttling
Commit: e17a0c23b8d4d7cbbcbf4a95cf545b0d8ae59aaa
Parents: 302741d
Author: Sebastien Goasguen 
Authored: Fri Jun 7 06:03:42 2013 -0400
Committer: Sebastien Goasguen 
Committed: Fri Jun 7 06:03:42 2013 -0400

--
 docs/en-US/CloudStack_GSoC_Guide.xml |   1 +
 docs/en-US/gsoc-dharmesh.xml | 149 ++
 docs/en-US/images/mesos-integration-arch.jpg |   0
 3 files changed, 150 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e17a0c23/docs/en-US/CloudStack_GSoC_Guide.xml
--
diff --git a/docs/en-US/CloudStack_GSoC_Guide.xml 
b/docs/en-US/CloudStack_GSoC_Guide.xml
index b7ba61f..243a0ca 100644
--- a/docs/en-US/CloudStack_GSoC_Guide.xml
+++ b/docs/en-US/CloudStack_GSoC_Guide.xml
@@ -48,6 +48,7 @@
 
 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/blob/e17a0c23/docs/en-US/gsoc-dharmesh.xml
--
diff --git a/docs/en-US/gsoc-dharmesh.xml b/docs/en-US/gsoc-dharmesh.xml
new file mode 100644
index 000..5e2bf73
--- /dev/null
+++ b/docs/en-US/gsoc-dharmesh.xml
@@ -0,0 +1,149 @@
+
+http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
+
+%BOOK_ENTITIES;
+]>
+
+
+
+
+Dharmesh's 2013 GSoC Proposal
+This chapter describes Dharmrsh's 2013 Google Summer of Code 
project within the &PRODUCT; ASF project. It is a copy paste of the submitted 
proposal.
+   
+   Abstract
+   
+   The project aims to bring http://aws.amazon.com/cloudformation/";>cloudformation
 like service to cloudstack. One of the prime use-case is cluster computing 
frameworks on cloudstack. A cloudformation service will give users and 
administrators of cloudstack ability to manage and control a set of resources 
easily. The cloudformation will allow booting and configuring a set of VMs and 
form a cluster. Simple example would be LAMP stack. More complex clusters such 
as mesos or hadoop cluster requires a little more advanced configuration. There 
is already some work done by Chiradeep Vittal at this front [5]. In this 
project, I will implement server side cloudformation service for cloudstack and 
demonstrate how to run mesos cluster using it.
+   
+   
+
+   
+   Mesos
+   
+   http://incubator.apache.org/mesos/";>Mesos 
is a resource management platform for clusters. It aims to increase resource 
utilization of clusters by sharing cluster resources among multiple processing 
frameworks(like MapReduce, MPI, Graph Processing) or multiple instances of same 
framework. It provides efficient resource isolation through use of containers. 
Uses zookeeper for state maintenance and fault tolerance.
+   
+   
+
+   
+   What can run on mesos ?
+   
+   Spark: A cluster 
computing framework based on the Resilient Distributed Datasets (RDDs) 
abstraction. RDD is more generalized than MapReduce and can support iterative 
and interactive computation while retaining fault tolerance, scalability, data 
locality etc.
+   
+   Hadoop:: Hadoop is fault 
tolerant and scalable distributed computing framework based on MapReduce 
abstraction.
+   
+   Begel:: A graph 
processing framework based on pregel.
+
+   and other frameworks like MPI, Hypertable.
+   
+
+   
+   How to deploy mesos ?
+   
+   Mesos provides cluster installation https://github.com/apache/mesos/blob/trunk/docs/Deploy-Scripts.textile";>scripts
 for cluster deployment. There are also scripts available to deploy a cluster 
on https://github.com/apache/mesos/blob/trunk/docs/EC2-Scripts.textile";>Amazon
 EC2. It would be interesting to see if this scripts can be 
leveraged in anyway.
+   
+
+   
+   Deliverables
+   
+   
+   Deploy CloudStack and understand instance 
configuration/contextualization
+   
+   
+   Test and deploy Mesos on a set of 
CloudStack based VM, manually. Design/propose an automation framework
+   
+  

[05/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2889: Resize volume unsupported on vmware

Skip the tests if the VM deploys on a VmWare host since we do not
support resizing volumes on vmware (yet)

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 6208a51283bfdb401f76f042296c16304ee8f4e4
Parents: 4a14ea8
Author: Prasanna Santhanam 
Authored: Fri Jun 7 11:29:56 2013 +0530
Committer: Prasanna Santhanam 
Committed: Fri Jun 7 11:31:10 2013 +0530

--
 test/integration/smoke/test_volumes.py | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6208a512/test/integration/smoke/test_volumes.py
--
diff --git a/test/integration/smoke/test_volumes.py 
b/test/integration/smoke/test_volumes.py
index d9c808a..7039c6f 100644
--- a/test/integration/smoke/test_volumes.py
+++ b/test/integration/smoke/test_volumes.py
@@ -591,6 +591,8 @@ class TestVolumes(cloudstackTestCase):
 
 if hosts[0].hypervisor == "XenServer":
 self.virtual_machine.stop(self.apiClient)
+elif hosts[0].hypervisor.lower() == "vmware":
+self.skipTest("Resize Volume is unsupported on VmWare")
 
 self.apiClient.resizeVolume(cmd)
 count = 0
@@ -638,6 +640,9 @@ class TestVolumes(cloudstackTestCase):
 
 if hosts[0].hypervisor == "XenServer":
 self.virtual_machine.stop(self.apiClient)
+elif hosts[0].hypervisor.lower() == "vmware":
+self.skipTest("Resize Volume is unsupported on VmWare")
+
 self.debug("Resize Volume ID: %s" % self.volume.id)
 
 cmd= resizeVolume.resizeVolumeCmd()



[25/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Unskip all skipped tests

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 8bc72ad55c76635939f463185291b0c283b57858
Parents: 91edeb4
Author: Prasanna Santhanam 
Authored: Sat Jun 8 20:22:16 2013 +0530
Committer: Prasanna Santhanam 
Committed: Mon Jun 10 10:04:52 2013 +0530

--
 test/integration/component/test_accounts.py   | 4 
 test/integration/component/test_egress_rules.py   | 1 -
 test/integration/component/test_eip_elb.py| 6 --
 test/integration/component/test_netscaler_lb.py   | 1 -
 test/integration/component/test_network_offering.py   | 1 -
 test/integration/component/test_project_configs.py| 2 --
 test/integration/component/test_project_limits.py | 1 -
 test/integration/component/test_projects.py   | 1 -
 test/integration/component/test_tags.py   | 2 --
 test/integration/component/test_templates.py  | 1 -
 test/integration/component/test_vm_passwdenabled.py   | 1 -
 test/integration/component/test_vpc.py| 1 -
 test/integration/component/test_vpc_network.py| 4 
 test/integration/component/test_vpc_offerings.py  | 2 --
 test/integration/component/test_vpc_routers.py| 4 
 test/integration/component/test_vpc_vm_life_cycle.py  | 9 -
 test/integration/component/test_vpc_vms_deployment.py | 1 -
 17 files changed, 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_accounts.py
--
diff --git a/test/integration/component/test_accounts.py 
b/test/integration/component/test_accounts.py
index a25e636..3f106c3 100644
--- a/test/integration/component/test_accounts.py
+++ b/test/integration/component/test_accounts.py
@@ -385,7 +385,6 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
 )
 return
 
-@unittest.skip("Open Questions")
 @attr(tags=["advanced", "basic", "eip", "advancedns", "sg"])
 def test_02_remove_all_users(self):
 """Test Remove both users from the account
@@ -712,7 +711,6 @@ class TestServiceOfferingSiblings(cloudstackTestCase):
 return
 
 
-@unittest.skip("Open Questions")
 class TestServiceOfferingHierarchy(cloudstackTestCase):
 
 @classmethod
@@ -841,7 +839,6 @@ class TestServiceOfferingHierarchy(cloudstackTestCase):
 return
 
 
-@unittest.skip("Open Questions")
 class TesttemplateHierarchy(cloudstackTestCase):
 
 @classmethod
@@ -1441,7 +1438,6 @@ class TestUserDetails(cloudstackTestCase):
  )
 return
 
-@unittest.skip("Login API response returns nothing")
 class TestUserLogin(cloudstackTestCase):
 
 @classmethod

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_egress_rules.py
--
diff --git a/test/integration/component/test_egress_rules.py 
b/test/integration/component/test_egress_rules.py
index 607bac8..c8b3eee 100644
--- a/test/integration/component/test_egress_rules.py
+++ b/test/integration/component/test_egress_rules.py
@@ -1966,7 +1966,6 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase):
 return
 
 
-@unittest.skip("Valid bug- ID: CS-12647")
 class TestInvalidParametersForEgress(cloudstackTestCase):
 
 def setUp(self):

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8bc72ad5/test/integration/component/test_eip_elb.py
--
diff --git a/test/integration/component/test_eip_elb.py 
b/test/integration/component/test_eip_elb.py
index 14af4a3..42a5148 100644
--- a/test/integration/component/test_eip_elb.py
+++ b/test/integration/component/test_eip_elb.py
@@ -182,7 +182,6 @@ class TestEIP(cloudstackTestCase):
 
 
 @attr(tags = ["eip"])
-@unittest.skip("skipped - Framework DB Exception")
 def test_01_eip_by_deploying_instance(self):
 """Test EIP by deploying an instance
 """
@@ -350,7 +349,6 @@ class TestEIP(cloudstackTestCase):
 return
 
 @attr(tags = ["eip"])
-@unittest.skip("skipped - Framework DB Exception")
 def test_02_acquire_ip_enable_static_nat(self):
 """Test associate new IP and enable static NAT for new IP and the VM
 """
@@ -495,7 +493,6 @@ class TestEIP(cloudstackTestCase):
 return
 
 @attr(tags = ["eip"])
-@unittest.skip("skipped - Framework DB Exception")
 def test_03_disable_s

[24/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2912 - adding cd command to rpm build instructions


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

Branch: refs/heads/disk_io_throttling
Commit: 91edeb49dde411d0e0ec2ea0975c4e254b5bab91
Parents: c30d9be
Author: Ron Wheeler 
Authored: Sun Jun 9 19:31:02 2013 -0400
Committer: David Nalley 
Committed: Sun Jun 9 19:33:44 2013 -0400

--
 docs/en-US/build-rpm.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91edeb49/docs/en-US/build-rpm.xml
--
diff --git a/docs/en-US/build-rpm.xml b/docs/en-US/build-rpm.xml
index 7caf924..100a06f 100644
--- a/docs/en-US/build-rpm.xml
+++ b/docs/en-US/build-rpm.xml
@@ -48,6 +48,7 @@ under the License.
 
 Generating RPMS
 Now that we have the prerequisites and source, you will cd to 
the packaging/centos63/ directory.
+$ cd 
packaging/centos63
 Generating RPMs is done using the 
package.sh script: 
 $./package.sh
 



[42/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2707: use executeBatch instead of persist in Usage Server


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

Branch: refs/heads/disk_io_throttling
Commit: 76ce304411259dc4a29e0e070de829b79b46efe2
Parents: c2b20a4
Author: Wei Zhou 
Authored: Mon Jun 10 15:00:08 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 15:00:08 2013 +0200

--
 .../src/com/cloud/usage/dao/UsageDao.java   |  5 +-
 .../src/com/cloud/usage/dao/UsageDaoImpl.java   | 64 
 server/src/com/cloud/api/ApiResponseHelper.java |  4 +-
 .../cloud/usage/parser/NetworkUsageParser.java  | 11 +++-
 .../cloud/usage/parser/VmDiskUsageParser.java   | 43 +++--
 5 files changed, 104 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76ce3044/engine/schema/src/com/cloud/usage/dao/UsageDao.java
--
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageDao.java 
b/engine/schema/src/com/cloud/usage/dao/UsageDao.java
index 8a80655..f571b63 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageDao.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageDao.java
@@ -38,6 +38,7 @@ public interface UsageDao extends GenericDao {
 Long getLastUserStatsId();
 List listPublicTemplatesByAccount(long accountId);
 Long getLastVmDiskStatsId();
-void updateVmDiskStats(List vmNetStats);
-void saveVmDiskStats(List vmNetStats);
+void updateVmDiskStats(List vmDiskStats);
+void saveVmDiskStats(List vmDiskStats);
+void saveUsageRecords(List usageRecords);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76ce3044/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
--
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java 
b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
index f7d5069..2237d56 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
@@ -18,6 +18,7 @@ package com.cloud.usage.dao;
 
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
+import java.sql.Timestamp;
 import java.sql.Types;
 import java.util.ArrayList;
 import java.util.Date;
@@ -63,6 +64,8 @@ public class UsageDaoImpl extends GenericDaoBase implements Usage
" VALUES (?,?,?,?,?,?,?,?,?,?, ?, ?, ?, ?,?, ?, ?)";
 private static final String UPDATE_VM_DISK_STATS = "UPDATE 
cloud_usage.vm_disk_statistics SET net_io_read=?, net_io_write=?, 
current_io_read=?, current_io_write=?, agg_io_read=?, agg_io_write=?, " +
"net_bytes_read=?, net_bytes_write=?, current_bytes_read=?, 
current_bytes_write=?, agg_bytes_read=?, agg_bytes_write=?  WHERE id=?";
+private static final String INSERT_USGAE_RECORDS = "INSERT INTO 
cloud_usage.cloud_usage (zone_id, account_id, domain_id, description, 
usage_display, usage_type, raw_usage, vm_instance_id, vm_name, offering_id, 
template_id, " +
+   "usage_id, type, size, network_id, start_date, end_date) VALUES 
(?,?,?,?,?,?,?,?,?, ?, ?, ?,?,?,?,?,?)";
 
 protected final static TimeZone s_gmtTimeZone = 
TimeZone.getTimeZone("GMT");
 
@@ -375,4 +378,65 @@ public class UsageDaoImpl extends GenericDaoBase implements Usage
 }
 
}
+
+@Override
+public void saveUsageRecords(List usageRecords) {
+   Transaction txn = Transaction.currentTxn();
+try {
+txn.start();
+String sql = INSERT_USGAE_RECORDS;
+PreparedStatement pstmt = null;
+pstmt = txn.prepareAutoCloseStatement(sql); // in reality I just 
want CLOUD_USAGE dataSource connection
+for (UsageVO usageRecord : usageRecords) {
+pstmt.setLong(1, usageRecord.getZoneId());
+pstmt.setLong(2, usageRecord.getAccountId());
+pstmt.setLong(3, usageRecord.getDomainId());
+pstmt.setString(4, usageRecord.getDescription());
+pstmt.setString(5, usageRecord.getUsageDisplay());
+pstmt.setInt(6, usageRecord.getUsageType());
+pstmt.setDouble(7, usageRecord.getRawUsage());
+if(usageRecord.getVmInstanceId() != null){
+pstmt.setLong(8, usageRecord.getVmInstanceId());
+} else {
+pstmt.setNull(8, Types.BIGINT);
+}
+pstmt.setString(9, usageRecord.getVmName());
+if(usageRecord.getOfferingId() != null){
+pstmt.setLong(10, usageReco

[35/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Unskip skipped tests

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 03e283c4b3ed0046a4b9dc1ad4ab948254af
Parents: 4a99f47
Author: Prasanna Santhanam 
Authored: Mon Jun 10 15:50:50 2013 +0530
Committer: Prasanna Santhanam 
Committed: Mon Jun 10 15:50:50 2013 +0530

--
 test/integration/component/test_vpc_vm_life_cycle.py | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03e283c4/test/integration/component/test_vpc_vm_life_cycle.py
--
diff --git a/test/integration/component/test_vpc_vm_life_cycle.py 
b/test/integration/component/test_vpc_vm_life_cycle.py
index e198c79..39fb533 100644
--- a/test/integration/component/test_vpc_vm_life_cycle.py
+++ b/test/integration/component/test_vpc_vm_life_cycle.py
@@ -880,7 +880,6 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
  )
 return
 
-@unittest.skip("debugging")
 class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
 
 @classmethod
@@ -1681,7 +1680,6 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
 return
 
 
-@unittest.skip("debugging")
 class TestVMLifeCycleBothIsolated(cloudstackTestCase):
 
 @classmethod
@@ -2014,7 +2012,6 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase):
 return
 
 
-@unittest.skip("debugging")
 class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
 
 @classmethod



[39/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack


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

Branch: refs/heads/disk_io_throttling
Commit: c2b20a455c9e16838abf1f4fb426e1f12f6b294c
Parents: 8220b98 d8a235e
Author: Wei Zhou 
Authored: Mon Jun 10 14:15:52 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 14:15:52 2013 +0200

--
 .../consoleproxy/ConsoleProxyManagerImpl.java   |   7 +
 .../component/test_vpc_network_pfrules.py   | 487 +--
 2 files changed, 244 insertions(+), 250 deletions(-)
--




[45/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2924
Recurring snapshot schedule not showing up in UI
For some of the volumes Recurring snapshot schedule was not showing up in UI 
because the active column was set to false. Since we dont use this column 
anymore I am removing the active=true check in the listSnapshotPolicies call.


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

Branch: refs/heads/disk_io_throttling
Commit: 5b48ec24d8d0dd5919d80d396d6f1825dfe5373f
Parents: 50dc67b
Author: Nitin Mehta 
Authored: Mon Jun 10 20:00:04 2013 +0530
Committer: Nitin Mehta 
Committed: Mon Jun 10 20:00:16 2013 +0530

--
 engine/schema/src/com/cloud/storage/dao/SnapshotPolicyDaoImpl.java | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5b48ec24/engine/schema/src/com/cloud/storage/dao/SnapshotPolicyDaoImpl.java
--
diff --git a/engine/schema/src/com/cloud/storage/dao/SnapshotPolicyDaoImpl.java 
b/engine/schema/src/com/cloud/storage/dao/SnapshotPolicyDaoImpl.java
index 3f894a2..5394a8f 100644
--- a/engine/schema/src/com/cloud/storage/dao/SnapshotPolicyDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/SnapshotPolicyDaoImpl.java
@@ -63,7 +63,6 @@ public class SnapshotPolicyDaoImpl extends 
GenericDaoBase listByVolumeId(long volumeId, Filter filter) 
{
 SearchCriteria sc = VolumeIdSearch.create();
 sc.setParameters("volumeId", volumeId);
-sc.setParameters("active", true);
 return listBy(sc, filter);
 }




[19/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2286: Volume created from snapshot state is in allocated state 
instead of Ready state which is letting Primary storage not to increment the 
resources.


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

Branch: refs/heads/disk_io_throttling
Commit: da5c4619c394eaedec55c277bc5e71de379d6600
Parents: e218a6d
Author: Sanjay Tripathi 
Authored: Fri Jun 7 17:08:31 2013 +0530
Committer: Devdeep Singh 
Committed: Fri Jun 7 17:17:54 2013 +0530

--
 .../storage/volume/VolumeServiceImpl.java   | 79 ++--
 1 file changed, 40 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/da5c4619/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
--
diff --git 
a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
 
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index 7fdf6bb..54dcbd2 100644
--- 
a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ 
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -428,51 +428,52 @@ public class VolumeServiceImpl implements VolumeService {
 public AsyncCallFuture createVolumeFromSnapshot(
 VolumeInfo volume, DataStore store, SnapshotInfo snapshot) {
 AsyncCallFuture future = new 
AsyncCallFuture();
-
+
 try {
-   DataObject volumeOnStore = store.create(volume);
-   volume.processEvent(Event.CreateOnlyRequested);
-CreateVolumeFromBaseImageContext context = 
new CreateVolumeFromBaseImageContext(null, 
-(VolumeObject)volume, store, volumeOnStore, 
future);
- AsyncCallbackDispatcher 
caller =  AsyncCallbackDispatcher.create(this);
- 
caller.setCallback(caller.getTarget().createVolumeFromSnapshotCallback(null, 
null))
- .setContext(context);
-   this.motionSrv.copyAsync(snapshot, volumeOnStore, caller);
+DataObject volumeOnStore = store.create(volume);
+volume = this.volFactory.getVolume(volume.getId(), store);
+volume.processEvent(Event.CreateOnlyRequested);
+CreateVolumeFromBaseImageContext context = new 
CreateVolumeFromBaseImageContext(null,
+(VolumeObject)volume, store, volumeOnStore, future);
+AsyncCallbackDispatcher 
caller =  AsyncCallbackDispatcher.create(this);
+
caller.setCallback(caller.getTarget().createVolumeFromSnapshotCallback(null, 
null))
+.setContext(context);
+this.motionSrv.copyAsync(snapshot, volumeOnStore, caller);
 } catch (Exception e) {
-   s_logger.debug("create volume from snapshot failed", e);
-   VolumeApiResult result = new VolumeApiResult(volume);
-   result.setResult(e.toString());
-   future.complete(result);
+s_logger.debug("create volume from snapshot failed", e);
+VolumeApiResult result = new VolumeApiResult(volume);
+result.setResult(e.toString());
+future.complete(result);
 }
-
+
 return future;
 }
-
-protected Void 
createVolumeFromSnapshotCallback(AsyncCallbackDispatcher callback, 
-   CreateVolumeFromBaseImageContext context) {
-   CopyCommandResult result = callback.getResult();
-   VolumeInfo volume = context.vo;
-   VolumeApiResult apiResult = new VolumeApiResult(volume);
-   Event event = null;
-   if (result.isFailed()) {
-   apiResult.setResult(result.getResult());
-   event = Event.OperationFailed;
-   } else {
-   event = Event.OperationSuccessed;
-   }
-   
-   try {
-   volume.processEvent(event);
-   } catch (Exception e) {
-   s_logger.debug("create volume from snapshot failed", e);
-   apiResult.setResult(e.toString());
-   }
-   
-   AsyncCallFuture future = context.future;
-   future.complete(apiResult);
-   return null;
+
+protected Void 
createVolumeFromSnapshotCallback(AsyncCallbackDispatcher callback,
+CreateVolumeFromBaseImageContext context) {
+CopyCommandResult result = callback.getResult();
+VolumeInfo volume = context.vo;
+VolumeApiResult apiResult = new VolumeApiResult(volume);
+Event event = null;
+if (result.isFailed()) {
+apiResult.set

[22/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Debian repository (backports) now has latest haproxy, re-introduce into systemvm


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

Branch: refs/heads/disk_io_throttling
Commit: cb80ae2440aec8586cb34834cc3939d93a12beea
Parents: 8c9f681
Author: Chiradeep Vittal 
Authored: Fri Jun 7 17:28:53 2013 -0700
Committer: Chiradeep Vittal 
Committed: Fri Jun 7 17:29:14 2013 -0700

--
 .../definitions/systemvmtemplate/postinstall.sh  | 13 +
 .../definitions/systemvmtemplate64/postinstall.sh| 15 +++
 2 files changed, 20 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb80ae24/tools/appliance/definitions/systemvmtemplate/postinstall.sh
--
diff --git a/tools/appliance/definitions/systemvmtemplate/postinstall.sh 
b/tools/appliance/definitions/systemvmtemplate/postinstall.sh
index e052cf9..203cf54 100644
--- a/tools/appliance/definitions/systemvmtemplate/postinstall.sh
+++ b/tools/appliance/definitions/systemvmtemplate/postinstall.sh
@@ -21,6 +21,12 @@ ROOTPW=password
 HOSTNAME=systemvm
 CLOUDSTACK_RELEASE=4.2.0
 
+add_backports () {
+sed -i '/backports/d' /etc/apt/sources.list
+echo 'deb http://http.us.debian.org/debian wheezy-backports main' >> 
/etc/apt/sources.list
+apt-get update
+}
+
 install_packages() {
   DEBIAN_FRONTEND=noninteractive
   DEBIAN_PRIORITY=critical
@@ -81,10 +87,7 @@ install_packages() {
   # rm -fr /opt/vmware-tools-distrib
   # apt-get -q -y --force-yes purge build-essential
 
-  # haproxy. Wheezy doesn't have haproxy, install from backports
-  #apt-get --no-install-recommends -q -y --force-yes install haproxy
-  wget 
http://ftp.us.debian.org/debian/pool/main/h/haproxy/haproxy_1.4.8-1_i386.deb
-  dpkg -i haproxy_1.4.8-1_i386.deb
+  apt-get --no-install-recommends -q -y --force-yes install haproxy
 }
 
 setup_accounts() {
@@ -223,6 +226,8 @@ do_signature() {
 
 begin=$(date +%s)
 
+echo "*ADDING BACKPORTS"
+add_backports
 echo "*INSTALLING PACKAGES"
 install_packages
 echo "*DONE INSTALLING PACKAGES"

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb80ae24/tools/appliance/definitions/systemvmtemplate64/postinstall.sh
--
diff --git a/tools/appliance/definitions/systemvmtemplate64/postinstall.sh 
b/tools/appliance/definitions/systemvmtemplate64/postinstall.sh
index 786d38d..cbcd282 100644
--- a/tools/appliance/definitions/systemvmtemplate64/postinstall.sh
+++ b/tools/appliance/definitions/systemvmtemplate64/postinstall.sh
@@ -21,6 +21,13 @@ ROOTPW=password
 HOSTNAME=systemvm
 CLOUDSTACK_RELEASE=4.2.0
 
+add_backports () {
+sed -i '/backports/d' /etc/apt/sources.list
+echo 'deb http://http.us.debian.org/debian wheezy-backports main' >> 
/etc/apt/sources.list
+apt-get update
+}
+
+
 install_packages() {
   DEBIAN_FRONTEND=noninteractive
   DEBIAN_PRIORITY=critical
@@ -80,10 +87,8 @@ install_packages() {
   # rm -fr /opt/vmware-tools-distrib
   # apt-get -q -y --force-yes purge build-essential
 
-  # haproxy. Wheezy doesn't have haproxy temporarily, install from backports
-  #apt-get --no-install-recommends -q -y --force-yes install haproxy
-  wget 
http://ftp.us.debian.org/debian/pool/main/h/haproxy/haproxy_1.4.8-1_amd64.deb
-  dpkg -i haproxy_1.4.8-1_amd64.deb
+  apt-get --no-install-recommends -q -y --force-yes install haproxy
+
 }
 
 setup_accounts() {
@@ -222,6 +227,8 @@ do_signature() {
 
 begin=$(date +%s)
 
+echo "*ADDING BACKPORTS"
+add_backports
 echo "*INSTALLING PACKAGES"
 install_packages
 echo "*DONE INSTALLING PACKAGES"



[17/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2882: Fix the diskdevice based on hypervisor

KVM > /dev/vda
Xen > /dev/xvdd

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 195e823b10c5519f90aefa74a0cb104f0ff57b07
Parents: 5233e32
Author: Prasanna Santhanam 
Authored: Fri Jun 7 16:23:06 2013 +0530
Committer: Prasanna Santhanam 
Committed: Fri Jun 7 17:08:19 2013 +0530

--
 test/integration/smoke/test_vm_life_cycle.py | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/195e823b/test/integration/smoke/test_vm_life_cycle.py
--
diff --git a/test/integration/smoke/test_vm_life_cycle.py 
b/test/integration/smoke/test_vm_life_cycle.py
index 8c78149..afe9b8a 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -730,6 +730,15 @@ class TestVMLifeCycle(cloudstackTestCase):
 cmd.virtualmachineid = self.virtual_machine.id
 self.apiclient.attachIso(cmd)
 
+#determine device type from hypervisor
+hosts = Host.list(self.apiclient, id=self.virtual_machine.hostid)
+self.assertTrue(isinstance(hosts, list))
+self.assertTrue(len(hosts) > 0)
+self.debug("Found %s host" % hosts[0].hypervisor)
+
+if hosts[0].hypervisor.lower() == "kvm":
+self.services["diskdevice"] = "/dev/vda"
+
 try:
 ssh_client = self.virtual_machine.get_ssh_client()
 except Exception as e:



[10/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Merge branch 'master' into disk_io_throttling


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

Branch: refs/heads/disk_io_throttling
Commit: 288c5b61c969aa58e86c8c44556d33164abdc2a6
Parents: 0beffe8 4f07679
Author: Wei Zhou 
Authored: Fri Jun 7 09:05:20 2013 +0200
Committer: Wei Zhou 
Committed: Fri Jun 7 09:05:20 2013 +0200

--
 docs/en-US/CloudStack_GSoC_Guide.xml|   1 +
 docs/en-US/gsoc-imduffy15.xml   | 395 +++
 docs/en-US/gsoc-tuna.xml| 203 ++
 .../debian/config/etc/iptables/iptables-router  |   1 +
 .../ExternalFirewallDeviceManagerImpl.java  |   2 +-
 .../ExternalLoadBalancerDeviceManagerImpl.java  |   4 +-
 .../src/com/cloud/network/NetworkManager.java   |   2 +-
 .../com/cloud/network/NetworkManagerImpl.java   |  20 +-
 .../src/com/cloud/network/NetworkModelImpl.java |  17 +-
 .../com/cloud/network/NetworkServiceImpl.java   |   1 +
 .../cloud/network/guru/DirectNetworkGuru.java   |   5 +-
 .../network/guru/DirectPodBasedNetworkGuru.java |   2 +-
 .../VirtualNetworkApplianceManagerImpl.java |  46 ++-
 .../VpcVirtualNetworkApplianceManagerImpl.java  |   6 +-
 .../network/vpc/NetworkACLManagerImpl.java  |   3 +
 .../network/vpc/NetworkACLServiceImpl.java  |  40 +-
 .../cloud/network/MockNetworkManagerImpl.java   |   9 +-
 .../com/cloud/vpc/MockNetworkManagerImpl.java   |   2 +-
 test/integration/smoke/test_volumes.py  |   5 +
 ui/scripts/system.js|  16 +-
 ui/scripts/vpc.js   |  45 ++-
 ui/scripts/zoneWizard.js|   5 +-
 22 files changed, 721 insertions(+), 109 deletions(-)
--




[36/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
rename the test methods to be more pythonic :)

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 63494f8dfd1f1633170262b1c8e14efce5bc3bb2
Parents: 03e283c
Author: Prasanna Santhanam 
Authored: Mon Jun 10 16:37:41 2013 +0530
Committer: Prasanna Santhanam 
Committed: Mon Jun 10 16:37:41 2013 +0530

--
 .../component/test_vpc_network_pfrules.py   | 487 +--
 1 file changed, 237 insertions(+), 250 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/63494f8d/test/integration/component/test_vpc_network_pfrules.py
--
diff --git a/test/integration/component/test_vpc_network_pfrules.py 
b/test/integration/component/test_vpc_network_pfrules.py
index c0c2b86..92b04ad 100644
--- a/test/integration/component/test_vpc_network_pfrules.py
+++ b/test/integration/component/test_vpc_network_pfrules.py
@@ -44,138 +44,139 @@ from marvin.integration.lib.common import (get_domain,
 class Services:
 """Test VPC network services - Port Forwarding Rules Test Data Class.
 """
+
 def __init__(self):
 self.services = {
-"account": {
-"email": "t...@test.com",
-"firstname": "Test",
-"lastname": "User",
-"username": "test",
-# Random characters are 
appended for unique
-# username
-"password": "password",
-},
-"host1":None,
-"host2":None,
-"service_offering": {
-"name": "Tiny Instance",
-"displaytext": "Tiny Instance",
-"cpunumber": 1,
-"cpuspeed": 1000,
-"memory": 512,
-},
-"network_offering": {
-"name": 'VPC Network offering',
-"displaytext": 'VPC Network 
off',
-"guestiptype": 'Isolated',
-"supportedservices": 
'Vpn,Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
-"traffictype": 'GUEST',
-"availability": 'Optional',
-"useVpc": 'on',
-"serviceProviderList": {
-"Vpn": 
'VpcVirtualRouter',
-"Dhcp": 
'VpcVirtualRouter',
-"Dns": 
'VpcVirtualRouter',
-"SourceNat": 
'VpcVirtualRouter',
-"PortForwarding": 
'VpcVirtualRouter',
-"Lb": 
'VpcVirtualRouter',
-"UserData": 
'VpcVirtualRouter',
-"StaticNat": 
'VpcVirtualRouter',
-"NetworkACL": 
'VpcVirtualRouter'
-},
-"servicecapabilitylist": {
-},
-},
-"network_offering_no_lb": {
-"name": 'VPC Network offering',
-"displaytext": 'VPC Network 
off',
-"guestiptype": 'Isolated',
-"supportedservices": 
'Dhcp,Dns,SourceNat,PortForwarding,UserData,StaticNat,NetworkACL',
-"trafficty

[27/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2761 Fixed PF/StaticNAT in vmware vpc

Signed-off-by: Abhinandan Prateek 


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

Branch: refs/heads/disk_io_throttling
Commit: 673b293d75419a4b76379092db2b204cdc6160a4
Parents: 22a8508
Author: Jayapal 
Authored: Wed Jun 5 19:13:03 2013 +0530
Committer: Abhinandan Prateek 
Committed: Mon Jun 10 11:04:01 2013 +0530

--
 .../vmware/resource/VmwareResource.java | 48 +++-
 1 file changed, 47 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/673b293d/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
--
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 5944cc8..46219c3 100755
--- 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -811,7 +811,53 @@ public class VmwareResource implements 
StoragePoolResource, ServerResource, Vmwa
 return new SetFirewallRulesAnswer(cmd, true, results);
 }
 
+protected SetStaticNatRulesAnswer 
SetVPCStaticNatRules(SetStaticNatRulesCommand cmd) {
+if (s_logger.isInfoEnabled()) {
+s_logger.info("Executing resource SetVPCStaticNatRulesCommand: " + 
_gson.toJson(cmd));
+}
+
+String[] results = new String[cmd.getRules().length];
+VmwareManager mgr = 
getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
+String controlIp = getRouterSshControlIp(cmd);
+
+int i = 0;
+boolean endResult = true;
+for (StaticNatRuleTO rule : cmd.getRules()) {
+// Prepare command to be send to VPC VR
+String args = "";
+args += rule.revoked() ? " -D" : " -A";
+args += " -l " + rule.getSrcIp();
+args += " -r " + rule.getDstIp();
+
+// Invoke command on VPC VR.
+try {
+Pair result = SshHelper.sshExecute(controlIp, 
DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, 
"/opt/cloud/bin/vpc_staticnat.sh " + args);
+
+if (s_logger.isDebugEnabled())
+s_logger.debug("Executing script on domain router " + 
controlIp + ": /opt/cloud/bin/vpc_staticnat.sh " + args);
+
+if (!result.first()) {
+s_logger.error("SetVPCStaticNatRulesCommand failure on 
setting one rule. args: " + args);
+results[i++] = "Failed";
+endResult = false;
+} else {
+results[i++] = null;
+}
+} catch (Throwable e) {
+s_logger.error("SetVPCStaticNatRulesCommand (args: " + args + 
") failed on setting one rule due to " + VmwareHelper.getExceptionMessage(e), 
e);
+results[i++] = "Failed";
+endResult = false;
+}
+}
+return new SetStaticNatRulesAnswer(cmd, results, endResult);
+}
+
 protected Answer execute(SetStaticNatRulesCommand cmd) {
+
+if (cmd.getVpcId() != null) {
+return SetVPCStaticNatRules(cmd);
+}
+
 if (s_logger.isInfoEnabled()) {
 s_logger.info("Executing resource SetFirewallRuleCommand: " + 
_gson.toJson(cmd));
 }
@@ -1262,7 +1308,7 @@ public class VmwareResource implements 
StoragePoolResource, ServerResource, Vmwa
 args += rule.revoked() ? " -D" : " -A";
 args += " -P " + rule.getProtocol().toLowerCase();
 args += " -l " + rule.getSrcIp();
-args += " -p " + rule.getStringSrcPortRange().replace(":", "-");
+args += " -p " + rule.getStringSrcPortRange();
 args += " -r " + rule.getDstIp();
 args += " -d " + rule.getStringDstPortRange().replace(":", "-");
 



[29/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2650 setting vm ip null in user_ip_address when static nat ip

Signed-off-by: Abhinandan Prateek 


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

Branch: refs/heads/disk_io_throttling
Commit: c8d607eae5db696b20f797a3297ad5eb5c746115
Parents: c1ad3b7
Author: Jayapal 
Authored: Fri May 24 11:52:25 2013 +0530
Committer: Abhinandan Prateek 
Committed: Mon Jun 10 12:14:34 2013 +0530

--
 engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8d607ea/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
--
diff --git a/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java 
b/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
index 1839ca4..886011e 100755
--- a/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/dao/IPAddressDaoImpl.java
@@ -155,6 +155,7 @@ public class IPAddressDaoImpl extends 
GenericDaoBase implemen
 address.setAssociatedWithNetworkId(null);
 address.setVpcId(null);
 address.setSystem(false);
+address.setVmIp(null);
 update(ipAddressId, address);
 }
 



[07/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
Changing URL to vcenter while adding a VmwareDC


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

Branch: refs/heads/disk_io_throttling
Commit: c2ac4090d947dae21fdab31573b0a369de1fd2a2
Parents: e7d5cca
Author: Pranav Saxena 
Authored: Fri Jun 7 12:22:43 2013 +0530
Committer: Pranav Saxena 
Committed: Fri Jun 7 12:22:43 2013 +0530

--
 ui/scripts/zoneWizard.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2ac4090/ui/scripts/zoneWizard.js
--
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 6631cba..5870a7b 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -3366,10 +3366,11 @@
   zoneId: args.data.returnedZone.id,
   username: args.data.cluster.vCenterUsername,
   password: args.data.cluster.vCenterPassword,
-  name: args.data.cluster.vCenterDatacenter
+  name: args.data.cluster.vCenterDatacenter,
+  vcenter: args.data.cluster.vCenterHost
 };
 $.ajax({
-  url: createURL('addVmwareDc&url=' + todb(url)),
+  url: createURL('addVmwareDc'),
   data: vmwareData,
   success: function(json) {
 var item = json.addvmwaredcresponse.vmwaredc;



[28/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 8b8a0d3

2013-06-10 Thread weizhou
CLOUDSTACK-2604 Fixed deleting secondary ip when no PF rules set

Signed-off-by: Abhinandan Prateek 


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

Branch: refs/heads/disk_io_throttling
Commit: c1ad3b7974449f457a1cc4e50fe7af260d1c5bf6
Parents: 673b293
Author: Jayapal 
Authored: Thu May 23 16:10:44 2013 +0530
Committer: Abhinandan Prateek 
Committed: Mon Jun 10 12:13:08 2013 +0530

--
 api/src/com/cloud/network/NetworkModel.java|  2 ++
 .../network/rules/dao/PortForwardingRulesDao.java  |  2 +-
 .../network/rules/dao/PortForwardingRulesDaoImpl.java  |  9 -
 server/src/com/cloud/network/NetworkModelImpl.java |  5 +++--
 server/src/com/cloud/network/NetworkServiceImpl.java   | 13 +
 .../src/com/cloud/network/rules/RulesManagerImpl.java  |  2 +-
 .../test/com/cloud/network/MockNetworkModelImpl.java   |  5 +
 server/test/com/cloud/vpc/MockNetworkModelImpl.java|  5 +
 8 files changed, 34 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/api/src/com/cloud/network/NetworkModel.java
--
diff --git a/api/src/com/cloud/network/NetworkModel.java 
b/api/src/com/cloud/network/NetworkModel.java
index f84a8b0..05307eb 100644
--- a/api/src/com/cloud/network/NetworkModel.java
+++ b/api/src/com/cloud/network/NetworkModel.java
@@ -272,4 +272,6 @@ public interface NetworkModel {
 Map getNtwkOffDetails(long offId);
 
 Networks.IsolationType[] listNetworkIsolationMethods();
+
+Nic getNicInNetworkIncludingRemoved(long vmId, long networkId);
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDao.java
--
diff --git 
a/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDao.java 
b/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDao.java
index 682a941..9a1d321 100644
--- a/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDao.java
+++ b/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDao.java
@@ -43,5 +43,5 @@ public interface PortForwardingRulesDao extends 
GenericDao listByAccount(long accountId);
 
 List listByDestIpAddr(String ip4Address);
-
+PortForwardingRuleVO findByIdAndIp(long id, String secondaryIp);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDaoImpl.java
--
diff --git 
a/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDaoImpl.java 
b/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDaoImpl.java
index cc780cb..c0db780 100644
--- 
a/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDaoImpl.java
+++ 
b/engine/schema/src/com/cloud/network/rules/dao/PortForwardingRulesDaoImpl.java
@@ -158,5 +158,12 @@ public class PortForwardingRulesDaoImpl extends 
GenericDaoBase sc = AllFieldsSearch.create();
+sc.setParameters("id", id);
+sc.setParameters("dstIp", secondaryIp);
+return findOneBy(sc);
+}
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/server/src/com/cloud/network/NetworkModelImpl.java
--
diff --git a/server/src/com/cloud/network/NetworkModelImpl.java 
b/server/src/com/cloud/network/NetworkModelImpl.java
index 21917f7..fa34d65 100755
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -770,7 +770,7 @@ public class NetworkModelImpl extends ManagerBase 
implements NetworkModel {
 
 @Override
 public Nic getNicInNetwork(long vmId, long networkId) {
-return _nicDao.findByInstanceIdAndNetworkIdIncludingRemoved(networkId, 
vmId);
+return _nicDao.findByNtwkIdAndInstanceId(networkId, vmId);
 }
 
 @Override
@@ -1761,7 +1761,8 @@ public class NetworkModelImpl extends ManagerBase 
implements NetworkModel {
 return true;
 }
 
-Nic getNicInNetworkIncludingRemoved(long vmId, long networkId) {
+@Override
+public Nic getNicInNetworkIncludingRemoved(long vmId, long networkId) {
 return _nicDao.findByInstanceIdAndNetworkIdIncludingRemoved(networkId, 
vmId);
 }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1ad3b79/server/src/com/cloud/network/NetworkServiceImpl.java
--

git commit: updated refs/heads/disk_io_throttling to 02e5cb3

2013-06-10 Thread weizhou
Updated Branches:
  refs/heads/disk_io_throttling 8b8a0d397 -> 02e5cb3e9


checkout UserVmManagerImpl.java and VirtualMachineManagerImpl.java from master 
branch


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

Branch: refs/heads/disk_io_throttling
Commit: 02e5cb3e93bc9f0b4bf238b9e9090796a41798bd
Parents: 8b8a0d3
Author: Wei Zhou 
Authored: Mon Jun 10 19:53:40 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 19:53:40 2013 +0200

--
 server/src/com/cloud/vm/UserVmManagerImpl.java | 3 ---
 server/src/com/cloud/vm/VirtualMachineManagerImpl.java | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02e5cb3e/server/src/com/cloud/vm/UserVmManagerImpl.java
--
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java 
b/server/src/com/cloud/vm/UserVmManagerImpl.java
index ebf8056..b919f12 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -3380,9 +3380,6 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Use
 boolean status;
 State vmState = vm.getState();
 
-// Collect vm disk statistics from host before stopping Vm
- collectVmDiskStatistics(vm);
-
 try {
 VirtualMachineEntity vmEntity = 
_orchSrvc.getVirtualMachine(vm.getUuid());
 status = vmEntity.destroy(new Long(userId).toString());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02e5cb3e/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
--
diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java 
b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 971de56..568fe55 100755
--- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -1328,7 +1328,7 @@ public class VirtualMachineManagerImpl extends 
ManagerBase implements VirtualMac
 throw new CloudRuntimeException("Unable to migrate vm: " + 
e.toString());
 }
 
-VirtualMachineProfile profile = new 
VirtualMachineProfileImpl(vm);
+VirtualMachineProfile profile = new 
VirtualMachineProfileImpl(vm);
 boolean migrationResult = false;
 try {
 migrationResult = this.volumeMgr.storageMigration(profile, 
destPool);



git commit: updated refs/heads/master to ecbce6a

2013-06-10 Thread weizhou
Updated Branches:
  refs/heads/master a59067e94 -> ecbce6a67


fix disk IO requests display error


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

Branch: refs/heads/master
Commit: ecbce6a67f675a0869a62462defed8ee316f139c
Parents: a59067e
Author: Wei Zhou 
Authored: Mon Jun 10 23:11:48 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 23:11:48 2013 +0200

--
 .../cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java   | 2 +-
 ui/scripts/instances.js  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ecbce6a6/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java
--
diff --git 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java
 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java
index 7f9ceeb..92f6e39 100644
--- 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java
+++ 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java
@@ -73,7 +73,7 @@ public class LibvirtStorageVolumeDef {
 storageVolBuilder.append("" + _volName + "\n");
 if (_volSize != null) {
 storageVolBuilder
-.append("" + _volSize + "\n");
+.append("" + _volSize + "\n");
 }
 storageVolBuilder.append("\n");
 storageVolBuilder.append("\n");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ecbce6a6/ui/scripts/instances.js
--
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 7149815..33a5767 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1670,8 +1670,8 @@
   networkkbswrite: (jsonObj.networkkbswrite == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.networkkbswrite * 1024),
   diskkbsread: (jsonObj.diskkbsread == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskkbsread * 1024),
   diskkbswrite: (jsonObj.diskkbswrite == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskkbswrite * 1024),
-  diskioread: (jsonObj.diskioread == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskioread * 1024),
-  diskiowrite: (jsonObj.diskiowrite == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskiowrite * 1024)
+  diskioread: (jsonObj.diskioread == null)? "N/A": 
jsonObj.diskioread,
+  diskiowrite: (jsonObj.diskiowrite == null)? "N/A": 
jsonObj.diskiowrite
   }
 });
   }



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

2013-06-10 Thread weizhou
Updated Branches:
  refs/heads/master ecbce6a67 -> 6de271c75


fix disk I/O description mistake


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

Branch: refs/heads/master
Commit: 6de271c754b86f48bb2fa5ff05e888ab638a53f4
Parents: ecbce6a
Author: Wei Zhou 
Authored: Tue Jun 11 00:03:03 2013 +0200
Committer: Wei Zhou 
Committed: Tue Jun 11 00:03:03 2013 +0200

--
 usage/src/com/cloud/usage/parser/VmDiskUsageParser.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6de271c7/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java
--
diff --git a/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java 
b/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java
index 74fa214..33ba2bb 100644
--- a/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java
+++ b/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java
@@ -132,7 +132,7 @@ public static final Logger s_logger = 
Logger.getLogger(VmDiskUsageParser.class.g
 usageRecords.add(usageRecord);
 
 // Create the usage record for bytes read
-usageDesc = "disk bytes read";
+usageDesc = "disk io requests read";
 if ((vmDiskInfo.getVmId() != 0) && (vmDiskInfo.getVolumeId() 
!= 0)){
 usageDesc += " for Vm: " + vmId + " and Volume: " + 
volumeId;
 }
@@ -141,7 +141,7 @@ public static final Logger s_logger = 
Logger.getLogger(VmDiskUsageParser.class.g
 usageRecords.add(usageRecord);
 
 // Create the usage record for bytes write
-usageDesc = "disk bytes write";
+usageDesc = "disk io requests write";
 if ((vmDiskInfo.getVmId() != 0) && (vmDiskInfo.getVolumeId() 
!= 0)){
 usageDesc += " for Vm: " + vmId + " and Volume: " + 
volumeId;
 }



git commit: updated refs/heads/master to ab6bf0b

2013-06-10 Thread weizhou
Updated Branches:
  refs/heads/master 6de271c75 -> ab6bf0b20


fix disk I/O description mistake


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

Branch: refs/heads/master
Commit: ab6bf0b20975e96696e5541e050e97819e003177
Parents: 6de271c
Author: Wei Zhou 
Authored: Tue Jun 11 00:09:05 2013 +0200
Committer: Wei Zhou 
Committed: Tue Jun 11 00:09:05 2013 +0200

--
 .../com/cloud/usage/parser/VmDiskUsageParser.java   | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ab6bf0b2/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java
--
diff --git a/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java 
b/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java
index 33ba2bb..84bdfd2 100644
--- a/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java
+++ b/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java
@@ -111,8 +111,8 @@ public static final Logger s_logger = 
Logger.getLogger(VmDiskUsageParser.class.g
 Long vmId = null;
 Long volumeId = null;
 
-// Create the usage record for bytes read
-String usageDesc = "disk bytes read";
+// Create the usage record for disk I/O read (io requests)
+String usageDesc = "disk I/O read (io requests)";
 if ((vmDiskInfo.getVmId() != 0) && (vmDiskInfo.getVolumeId() 
!= 0)){
 vmId = vmDiskInfo.getVmId();
 volumeId = vmDiskInfo.getVolumeId();
@@ -122,8 +122,8 @@ public static final Logger s_logger = 
Logger.getLogger(VmDiskUsageParser.class.g
 UsageTypes.VM_DISK_IO_READ, new Double(ioRead), vmId, 
null, null, null, vmDiskInfo.getVolumeId(), startDate, endDate, 
"VirtualMachine");
 usageRecords.add(usageRecord);
 
-// Create the usage record for bytes write
-usageDesc = "disk bytes write";
+// Create the usage record for disk I/O write (io requests)
+usageDesc = "disk I/O write (io requests)";
 if ((vmDiskInfo.getVmId() != 0) && (vmDiskInfo.getVolumeId() 
!= 0)){
 usageDesc += " for Vm: " + vmId + " and Volume: " + 
volumeId;
 }
@@ -131,8 +131,8 @@ public static final Logger s_logger = 
Logger.getLogger(VmDiskUsageParser.class.g
 UsageTypes.VM_DISK_BYTES_WRITE, new Double(ioWrite), 
vmId, null, null, null, vmDiskInfo.getVolumeId(), startDate, endDate, 
"VirtualMachine");
 usageRecords.add(usageRecord);
 
-// Create the usage record for bytes read
-usageDesc = "disk io requests read";
+// Create the usage record for disk I/O read (bytes)
+usageDesc = "disk I/O read (bytes)";
 if ((vmDiskInfo.getVmId() != 0) && (vmDiskInfo.getVolumeId() 
!= 0)){
 usageDesc += " for Vm: " + vmId + " and Volume: " + 
volumeId;
 }
@@ -140,8 +140,8 @@ public static final Logger s_logger = 
Logger.getLogger(VmDiskUsageParser.class.g
 UsageTypes.VM_DISK_BYTES_READ, new Double(bytesRead), 
vmId, null, null, null, vmDiskInfo.getVolumeId(), startDate, endDate, 
"VirtualMachine");
 usageRecords.add(usageRecord);
 
-// Create the usage record for bytes write
-usageDesc = "disk io requests write";
+// Create the usage record for disk I/O write (bytes)
+usageDesc = "disk I/O write (bytes)";
 if ((vmDiskInfo.getVmId() != 0) && (vmDiskInfo.getVolumeId() 
!= 0)){
 usageDesc += " for Vm: " + vmId + " and Volume: " + 
volumeId;
 }



[5/8] git commit: updated refs/heads/disk_io_throttling to 9b88582

2013-06-12 Thread weizhou
fix disk IO requests display error


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

Branch: refs/heads/disk_io_throttling
Commit: ecbce6a67f675a0869a62462defed8ee316f139c
Parents: a59067e
Author: Wei Zhou 
Authored: Mon Jun 10 23:11:48 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 23:11:48 2013 +0200

--
 .../cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java   | 2 +-
 ui/scripts/instances.js  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ecbce6a6/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java
--
diff --git 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java
 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java
index 7f9ceeb..92f6e39 100644
--- 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java
+++ 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java
@@ -73,7 +73,7 @@ public class LibvirtStorageVolumeDef {
 storageVolBuilder.append("" + _volName + "\n");
 if (_volSize != null) {
 storageVolBuilder
-.append("" + _volSize + "\n");
+.append("" + _volSize + "\n");
 }
 storageVolBuilder.append("\n");
 storageVolBuilder.append("\n");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ecbce6a6/ui/scripts/instances.js
--
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 7149815..33a5767 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1670,8 +1670,8 @@
   networkkbswrite: (jsonObj.networkkbswrite == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.networkkbswrite * 1024),
   diskkbsread: (jsonObj.diskkbsread == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskkbsread * 1024),
   diskkbswrite: (jsonObj.diskkbswrite == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskkbswrite * 1024),
-  diskioread: (jsonObj.diskioread == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskioread * 1024),
-  diskiowrite: (jsonObj.diskiowrite == null)? "N/A": 
cloudStack.converters.convertBytes(jsonObj.diskiowrite * 1024)
+  diskioread: (jsonObj.diskioread == null)? "N/A": 
jsonObj.diskioread,
+  diskiowrite: (jsonObj.diskiowrite == null)? "N/A": 
jsonObj.diskiowrite
   }
 });
   }



[4/8] git commit: updated refs/heads/disk_io_throttling to 9b88582

2013-06-12 Thread weizhou
CLOUDSTACK UI - network menu - create guest network dialog - change label.


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

Branch: refs/heads/disk_io_throttling
Commit: a59067e94f7095a2448d342d5eed0ffee5f066c0
Parents: 40982cc
Author: Jessica Wang 
Authored: Mon Jun 10 13:43:07 2013 -0700
Committer: Jessica Wang 
Committed: Mon Jun 10 13:43:07 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a59067e9/ui/scripts/network.js
--
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 9e60cbc..61468fc 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -320,8 +320,8 @@
 title: 'label.guest.networks',
 listView: {
   actions: {
-add: { //add Isolated guest network (can't add Shared guest 
network here)
-  label: 'Add Isolated Guest Network',
+add: { 
+  label: 'Add Isolated Guest Network with SourceNat',
 
   preFilter: function(args) { //Isolated networks is only 
supported in Advanced (SG-disabled) zone 
 if(args.context.zoneType != 'Basic') 
@@ -331,8 +331,7 @@
   },
 
   createForm: {
-title: 'Add Isolated Guest Network',
-desc: 'Add Isolated Guest Network with SourceNat',
+title: 'Add Isolated Guest Network with SourceNat',
   
 fields: {
   name: { label: 'label.name', validation: { required: true }, 
docID: 'helpGuestNetworkName' },
   displayText: { label: 'label.display.text', validation: { 
required: true }, docID: 'helpGuestNetworkDisplayText'},



[6/8] git commit: updated refs/heads/disk_io_throttling to 9b88582

2013-06-12 Thread weizhou
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack 
into disk_io_throttling


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

Branch: refs/heads/disk_io_throttling
Commit: 8da34d296493e9d6be346f9521f392cb09bf9146
Parents: 02e5cb3 ecbce6a
Author: Wei Zhou 
Authored: Mon Jun 10 23:12:45 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 10 23:12:45 2013 +0200

--
 engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java  | 1 +
 .../hypervisor/kvm/resource/LibvirtStorageVolumeDef.java  | 2 +-
 ui/scripts/network.js | 7 +++
 ui/scripts/ui-custom/projectSelect.js | 4 ++--
 ui/scripts/ui-custom/projects.js  | 4 ++--
 ui/scripts/ui/utils.js| 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)
--




[2/8] git commit: updated refs/heads/disk_io_throttling to 9b88582

2013-06-12 Thread weizhou
Update projects UI validation


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

Branch: refs/heads/disk_io_throttling
Commit: 1eab817a964f7cd5adcb748b4a05af096748693f
Parents: f15a7c3
Author: Brian Federle 
Authored: Mon Jun 10 11:02:08 2013 -0700
Committer: Brian Federle 
Committed: Mon Jun 10 11:02:08 2013 -0700

--
 ui/scripts/ui-custom/projects.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1eab817a/ui/scripts/ui-custom/projects.js
--
diff --git a/ui/scripts/ui-custom/projects.js b/ui/scripts/ui-custom/projects.js
index 7824b3d..f1f9eba 100644
--- a/ui/scripts/ui-custom/projects.js
+++ b/ui/scripts/ui-custom/projects.js
@@ -304,14 +304,14 @@
   var $formDesc = $('').addClass('form-desc');
   var $projectName = $('').addClass('field name')
 .append($('').attr('for', 
'project-name').html(_l('label.project.name')))
-.append($('').addClass('required').attr({
+.append($('').addClass('required 
disallowSpecialCharacters').attr({
   type: 'text',
   name: 'project-name',
   id: 'project-name'
 }));
   var $projectDesc = $('').addClass('field desc')
 .append($('').attr('for', 
'project-desc').html(_l('label.display.text')))
-.append($('').attr({
+.append($('').addClass('disallowSpecialCharacters').attr({
   type: 'text',
   name: 'project-display-text',
   id: 'project-desc'



[1/8] git commit: updated refs/heads/disk_io_throttling to 9b88582

2013-06-12 Thread weizhou
Updated Branches:
  refs/heads/disk_io_throttling 02e5cb3e9 -> 9b88582b2


Code cleanup


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

Branch: refs/heads/disk_io_throttling
Commit: f15a7c3f8ef557aff6b98dcdf60cf046cb0844b0
Parents: 3f3c6aa
Author: Brian Federle 
Authored: Mon Jun 10 10:43:31 2013 -0700
Committer: Brian Federle 
Committed: Mon Jun 10 10:43:31 2013 -0700

--
 ui/scripts/ui-custom/projectSelect.js | 4 ++--
 ui/scripts/ui/utils.js| 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f15a7c3f/ui/scripts/ui-custom/projectSelect.js
--
diff --git a/ui/scripts/ui-custom/projectSelect.js 
b/ui/scripts/ui-custom/projectSelect.js
index 82d02c1..aef49ed 100644
--- a/ui/scripts/ui-custom/projectSelect.js
+++ b/ui/scripts/ui-custom/projectSelect.js
@@ -32,9 +32,9 @@
   var projects = args.data;
 
   $(projects).map(function(index, project) {
-var $option = $('').val(project.id);
+var $option = $('').val(_s(project.id));
 
-$option.html(project.displaytext ? project.displaytext : 
project.name);
+$option.html(_s(project.displaytext ? project.displaytext : 
project.name));
 $option.appendTo($projectSelect);
   });
 },

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f15a7c3f/ui/scripts/ui/utils.js
--
diff --git a/ui/scripts/ui/utils.js b/ui/scripts/ui/utils.js
index 7a6fb2f..39ef3e3 100644
--- a/ui/scripts/ui/utils.js
+++ b/ui/scripts/ui/utils.js
@@ -23,7 +23,7 @@
 
 $($form.serializeArray()).each(function() {
   var dataItem = data[this.name];
-  var value = this.value.toString();
+  var value = _s(this.value.toString());
 
   if (options.escapeSlashes) {
 value = value.replace(/\//g, '__forwardSlash__');



[7/8] git commit: updated refs/heads/disk_io_throttling to 9b88582

2013-06-12 Thread weizhou
replace tab with space, remove debugging messages


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

Branch: refs/heads/disk_io_throttling
Commit: 0f2c59ad0ae49dd6262e4f92ac2c1bf8b9c85ad4
Parents: 8da34d2
Author: Wei Zhou 
Authored: Wed Jun 12 09:19:29 2013 +0200
Committer: Wei Zhou 
Committed: Wed Jun 12 09:19:29 2013 +0200

--
 api/src/com/cloud/agent/api/to/VolumeTO.java|  2 +-
 api/src/com/cloud/offering/DiskOffering.java|  2 +-
 .../admin/offering/CreateDiskOfferingCmd.java   |  9 
 .../api/response/DiskOfferingResponse.java  |  4 ++--
 .../api/response/ServiceOfferingResponse.java   |  4 ++--
 .../cloud/agent/api/AttachVolumeCommand.java|  2 +-
 .../src/com/cloud/storage/DiskOfferingVO.java   |  2 +-
 .../kvm/resource/LibvirtComputingResource.java  |  2 +-
 .../kvm/resource/LibvirtDomainXMLParser.java|  2 +-
 .../hypervisor/kvm/resource/LibvirtVMDef.java   |  6 ++---
 .../configuration/ConfigurationManagerImpl.java |  2 --
 .../com/cloud/storage/VolumeManagerImpl.java|  2 +-
 ui/scripts/configuration.js | 24 ++--
 13 files changed, 30 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0f2c59ad/api/src/com/cloud/agent/api/to/VolumeTO.java
--
diff --git a/api/src/com/cloud/agent/api/to/VolumeTO.java 
b/api/src/com/cloud/agent/api/to/VolumeTO.java
index b95aa1d..0f1f9af 100644
--- a/api/src/com/cloud/agent/api/to/VolumeTO.java
+++ b/api/src/com/cloud/agent/api/to/VolumeTO.java
@@ -137,7 +137,7 @@ public class VolumeTO implements InternalIdentity {
 public String toString() {
 return new 
StringBuilder("Vol[").append(id).append("|").append(type).append("|").append(path).append("|").append(size).append("]").toString();
 }
-
+
 public void setBytesReadRate(long bytesReadRate) {
 this.bytesReadRate = bytesReadRate;
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0f2c59ad/api/src/com/cloud/offering/DiskOffering.java
--
diff --git a/api/src/com/cloud/offering/DiskOffering.java 
b/api/src/com/cloud/offering/DiskOffering.java
index 0c119fc..4f87dc5 100644
--- a/api/src/com/cloud/offering/DiskOffering.java
+++ b/api/src/com/cloud/offering/DiskOffering.java
@@ -52,7 +52,7 @@ public interface DiskOffering extends InfrastructureEntity, 
Identity, InternalId
 boolean isCustomized();
 
 void setDiskSize(long diskSize);
-
+ 
 void setBytesReadRate(long bytesReadRate);
 
 long getBytesReadRate();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0f2c59ad/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
 
b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
index 47ec365..8ffc4a7 100644
--- 
a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
@@ -61,7 +61,7 @@ public class CreateDiskOfferingCmd extends BaseCmd {
 
 @Parameter(name=ApiConstants.STORAGE_TYPE, type=CommandType.STRING, 
description="the storage type of the disk offering. Values are local and 
shared.")
 private String storageType = ServiceOffering.StorageType.shared.toString();
-
+
 @Parameter(name=ApiConstants.BYTES_READ_RATE, type=CommandType.LONG, 
required=false, description="bytes read rate of the disk offering")
 private Long bytesReadRate;
 
@@ -104,10 +104,9 @@ public class CreateDiskOfferingCmd extends BaseCmd {
 public Long getDomainId(){
 return domainId;
 }
-
+
 public long getBytesReadRate() {
-return bytesReadRate;
-//return (bytesReadRate == null) || (bytesReadRate < 0) ? 0 : 
bytesReadRate;
+return (bytesReadRate == null) || (bytesReadRate < 0) ? 0 : 
bytesReadRate;
 }
 
 public long getBytesWriteRate() {
@@ -143,7 +142,7 @@ public class CreateDiskOfferingCmd extends BaseCmd {
 public long getEntityOwnerId() {
 return Account.ACCOUNT_ID_SYSTEM;
 }
-
+
 @Override
 public void execute(){
 DiskOffering offering = _configService.createDiskOffering(this);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0f2c59ad/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
-

[3/8] git commit: updated refs/heads/disk_io_throttling to 9b88582

2013-06-12 Thread weizhou
drop all alert indice on column last_sent created up to 4.1 version


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

Branch: refs/heads/disk_io_throttling
Commit: 40982ccef22e2a6f61ae571017d711f60358ede8
Parents: 1eab817
Author: Min Chen 
Authored: Mon Jun 10 11:03:45 2013 -0700
Committer: Min Chen 
Committed: Mon Jun 10 11:04:50 2013 -0700

--
 engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/40982cce/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
--
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java 
b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
index d8f90ad..8378eec 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
@@ -90,6 +90,7 @@ public class Upgrade410to420 implements DbUpgrade {
 //First drop if it exists. (Due to patches shipped to customers some 
will have the index and some wont.)
 List indexList = new ArrayList();
 s_logger.debug("Dropping index i_alert__last_sent if it exists");
+indexList.add("last_sent"); // in 4.1, we created this index that is 
not in convention.
 indexList.add("i_alert__last_sent");
 DbUpgradeUtils.dropKeysIfExist(conn, "alert", indexList, false);
 



[8/8] git commit: updated refs/heads/disk_io_throttling to 9b88582

2013-06-12 Thread weizhou
replace 'virsh version' command with conn.getVersion/getLibvirVersion


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

Branch: refs/heads/disk_io_throttling
Commit: 9b88582b29688bd6fe79e45f7915d5ced5e1f8d1
Parents: 0f2c59a
Author: Wei Zhou 
Authored: Wed Jun 12 11:12:24 2013 +0200
Committer: Wei Zhou 
Committed: Wed Jun 12 11:12:24 2013 +0200

--
 api/src/com/cloud/offering/DiskOffering.java|  2 +-
 api/src/com/cloud/vm/DiskProfile.java   |  2 +-
 .../kvm/resource/LibvirtComputingResource.java  |  6 +++
 .../hypervisor/kvm/resource/LibvirtVMDef.java   | 43 ++--
 4 files changed, 29 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9b88582b/api/src/com/cloud/offering/DiskOffering.java
--
diff --git a/api/src/com/cloud/offering/DiskOffering.java 
b/api/src/com/cloud/offering/DiskOffering.java
index 4f87dc5..f4cd7b7 100644
--- a/api/src/com/cloud/offering/DiskOffering.java
+++ b/api/src/com/cloud/offering/DiskOffering.java
@@ -52,7 +52,7 @@ public interface DiskOffering extends InfrastructureEntity, 
Identity, InternalId
 boolean isCustomized();
 
 void setDiskSize(long diskSize);
- 
+
 void setBytesReadRate(long bytesReadRate);
 
 long getBytesReadRate();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9b88582b/api/src/com/cloud/vm/DiskProfile.java
--
diff --git a/api/src/com/cloud/vm/DiskProfile.java 
b/api/src/com/cloud/vm/DiskProfile.java
index 90fb71e..4e3de7b 100644
--- a/api/src/com/cloud/vm/DiskProfile.java
+++ b/api/src/com/cloud/vm/DiskProfile.java
@@ -158,7 +158,7 @@ public class DiskProfile {
 public void setSize(long size) {
this.size = size;
 }
-
+
 public void setBytesReadRate(long bytesReadRate) {
 this.bytesReadRate = bytesReadRate;
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9b88582b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
--
diff --git 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 02e0a88..6a0032f 100755
--- 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -336,6 +336,8 @@ ServerResource {
 
 protected HypervisorType _hypervisorType;
 protected String _hypervisorURI;
+protected long _hypervisorLibvirtVersion;
+protected long _hypervisorQemuVersion;
 protected String _hypervisorPath;
 protected String _networkDirectSourceMode;
 protected String _networkDirectDevice;
@@ -735,6 +737,8 @@ ServerResource {
 try {
 _hvVersion = conn.getVersion();
 _hvVersion = (_hvVersion % 100) / 1000;
+_hypervisorLibvirtVersion = conn.getLibVirVersion();
+_hypervisorQemuVersion = conn.getVersion();
 } catch (LibvirtException e) {
 s_logger.trace("Ignoring libvirt error.", e);
 }
@@ -3228,6 +3232,8 @@ ServerResource {
 } else {
 guest.setGuestType(GuestDef.guestType.KVM);
 vm.setHvsType(HypervisorType.KVM.toString().toLowerCase());
+vm.setLibvirtVersion(_hypervisorLibvirtVersion);
+vm.setQemuVersion(_hypervisorQemuVersion);
 }
 guest.setGuestArch(vmTO.getArch());
 guest.setMachineType("pc");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9b88582b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
--
diff --git 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
index aee1409..afa183f 100644
--- 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
+++ 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
@@ -26,6 +26,8 @@ import com.cloud.utils.script.Script;
 
 public class LibvirtVMDef {
 private String _hvsType;
+private static long _libvirtVersion;
+private static long _qemuVersion;
 private String _domName;
 private String _domUUID;
 private String _desc;
@@ -650,30 +652,

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

2013-06-12 Thread weizhou
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack


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

Branch: refs/heads/master
Commit: 2ed17c7930e1c35ea79e70a39c86336d554f5218
Parents: 51a3a5a fe506d9
Author: Wei Zhou 
Authored: Wed Jun 12 11:57:37 2013 +0200
Committer: Wei Zhou 
Committed: Wed Jun 12 11:57:37 2013 +0200

--
 .../hypervisor/xen/discoverer/XcpServerDiscoverer.java  | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)
--




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

2013-06-12 Thread weizhou
Updated Branches:
  refs/heads/master fe506d9b6 -> 2ed17c793


CLOUDSTACK-2945: ignore collect disk statistics if vm is not running on KVM or 
XenServer


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

Branch: refs/heads/master
Commit: 51a3a5a9b56426de4b3818b900d493cf9f439779
Parents: a30f9fa
Author: Wei Zhou 
Authored: Wed Jun 12 11:57:17 2013 +0200
Committer: Wei Zhou 
Committed: Wed Jun 12 11:57:17 2013 +0200

--
 server/src/com/cloud/vm/UserVmManagerImpl.java | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/51a3a5a9/server/src/com/cloud/vm/UserVmManagerImpl.java
--
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java 
b/server/src/com/cloud/vm/UserVmManagerImpl.java
index b919f12..1c8ab75 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -3421,6 +3421,10 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Use
 
 @Override
 public void collectVmDiskStatistics (UserVmVO userVm) {
+// support KVM and XenServer only
+if (!userVm.getHypervisorType().equals(HypervisorType.XenServer)
+&& !userVm.getHypervisorType().equals(HypervisorType.KVM))
+return;
// Collect vm disk statistics from host before stopping Vm
long hostId = userVm.getHostId();
List vmNames = new ArrayList();



git commit: updated refs/heads/master to 8b4d853

2013-06-14 Thread weizhou
Updated Branches:
  refs/heads/master 201c0651c -> 8b4d85309


CLOUDSTACK-3005: fix template_spool_ref.local_patch error after upgrade from 
2.2.14 to 3.X


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

Branch: refs/heads/master
Commit: 8b4d85309129f9fade7a34c0be946cfe89bd859b
Parents: 201c065
Author: Wei Zhou 
Authored: Fri Jun 14 10:32:47 2013 +0200
Committer: Wei Zhou 
Committed: Fri Jun 14 10:32:47 2013 +0200

--
 setup/db/db/schema-2214to30.sql | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8b4d8530/setup/db/db/schema-2214to30.sql
--
diff --git a/setup/db/db/schema-2214to30.sql b/setup/db/db/schema-2214to30.sql
index e288b0f..326e9a7 100755
--- a/setup/db/db/schema-2214to30.sql
+++ b/setup/db/db/schema-2214to30.sql
@@ -665,6 +665,7 @@ ALTER TABLE `cloud`.`dc_storage_network_ip_range` ADD 
COLUMN `gateway` varchar(1
 ALTER TABLE `cloud`.`volumes` ADD COLUMN `last_pool_id` bigint unsigned;
 UPDATE `cloud`.`volumes` SET `last_pool_id` = `pool_id`;
 UPDATE `cloud`.`volumes` SET `path` = SUBSTRING_INDEX(`path`, '/', -1);
+UPDATE `cloud`.`template_spool_ref` SET `local_path` = 
SUBSTRING_INDEX(`local_path`, '/', -1);
 
 ALTER TABLE `cloud`.`user_ip_address` ADD COLUMN `is_system` int(1) unsigned 
NOT NULL default '0';
 ALTER TABLE `cloud`.`volumes` ADD COLUMN `update_count` bigint unsigned NOT 
NULL DEFAULT 0;



git commit: updated refs/heads/4.1 to 63c14d6

2013-06-14 Thread weizhou
Updated Branches:
  refs/heads/4.1 4612656de -> 63c14d614


CLOUDSTACK-3005: fix template_spool_ref.local_patch error after upgrade from 
2.2.14 to 3.X


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

Branch: refs/heads/4.1
Commit: 63c14d6142ee1903eb2f55518f79ae4dd0b4d343
Parents: 4612656
Author: Wei Zhou 
Authored: Fri Jun 14 10:32:47 2013 +0200
Committer: Wei Zhou 
Committed: Fri Jun 14 10:33:21 2013 +0200

--
 setup/db/db/schema-2214to30.sql | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/63c14d61/setup/db/db/schema-2214to30.sql
--
diff --git a/setup/db/db/schema-2214to30.sql b/setup/db/db/schema-2214to30.sql
index e288b0f..326e9a7 100755
--- a/setup/db/db/schema-2214to30.sql
+++ b/setup/db/db/schema-2214to30.sql
@@ -665,6 +665,7 @@ ALTER TABLE `cloud`.`dc_storage_network_ip_range` ADD 
COLUMN `gateway` varchar(1
 ALTER TABLE `cloud`.`volumes` ADD COLUMN `last_pool_id` bigint unsigned;
 UPDATE `cloud`.`volumes` SET `last_pool_id` = `pool_id`;
 UPDATE `cloud`.`volumes` SET `path` = SUBSTRING_INDEX(`path`, '/', -1);
+UPDATE `cloud`.`template_spool_ref` SET `local_path` = 
SUBSTRING_INDEX(`local_path`, '/', -1);
 
 ALTER TABLE `cloud`.`user_ip_address` ADD COLUMN `is_system` int(1) unsigned 
NOT NULL default '0';
 ALTER TABLE `cloud`.`volumes` ADD COLUMN `update_count` bigint unsigned NOT 
NULL DEFAULT 0;



git commit: updated refs/heads/master to f4dcca6

2013-06-17 Thread weizhou
Updated Branches:
  refs/heads/master 0587d3a49 -> f4dcca6e4


CLOUDSTACK-3019: add missing tags for test 
integration.component.test_advancedsg_networks.py


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

Branch: refs/heads/master
Commit: f4dcca6e47d77e41e634c5d78fd403e1b4ba4b6d
Parents: 0587d3a
Author: Wei Zhou 
Authored: Mon Jun 17 10:40:40 2013 +0200
Committer: Wei Zhou 
Committed: Mon Jun 17 10:40:40 2013 +0200

--
 test/integration/component/test_advancedsg_networks.py | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f4dcca6e/test/integration/component/test_advancedsg_networks.py
--
diff --git a/test/integration/component/test_advancedsg_networks.py 
b/test/integration/component/test_advancedsg_networks.py
index e1694f1..f8774be 100644
--- a/test/integration/component/test_advancedsg_networks.py
+++ b/test/integration/component/test_advancedsg_networks.py
@@ -246,6 +246,7 @@ class TestNetworksInAdvancedSG(cloudstackTestCase):
 raise Exception("Warning: Exception during network cleanup : %s" % 
e)
 return
 
+@attr(tags = ["advancedsg"])
 def test_createIsolatedNetwork(self):
 """ Test Isolated Network """
 
@@ -423,8 +424,9 @@ class TestNetworksInAdvancedSG(cloudstackTestCase):
 except Exception as e:
 self.debug("Network creation failed because create isolated 
network is invalid in advanced zone with security groups.")
 
+@attr(tags = ["advancedsg"])
 def test_createSharedNetwork_withoutSG(self):
-""" Test Shared Network with used vlan 01 """
+""" Test Shared Network with without SecurityProvider """
 
 # Steps,
 #  1. create an Admin account
@@ -574,6 +576,7 @@ class TestNetworksInAdvancedSG(cloudstackTestCase):
 except Exception as e:
 self.debug("Network creation failed because there is no 
SecurityProvider in the network offering.")
 
+@attr(tags = ["advancedsg"])
 def test_deployVM_SharedwithSG(self):
 """ Test VM deployment in shared networks with SecurityProvider """
 



[48/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-2882: Correct the secondary disk device on KVM

On kvm the disk device serial order is /dev/vda|vdb|vdc and so on.
This also fixes CLOUDSTACK-3018 and removes the redundant test in
blocker bugs. The snapshot related tests are now include in snapshots
suite.

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 8801205fcf5c0fa8553e41d9730828134a16a7fd
Parents: 76520e8
Author: Prasanna Santhanam 
Authored: Tue Jun 18 12:45:39 2013 +0530
Committer: Prasanna Santhanam 
Committed: Tue Jun 18 12:45:39 2013 +0530

--
 test/integration/component/test_blocker_bugs.py | 303 ---
 test/integration/component/test_snapshots.py| 247 +--
 2 files changed, 150 insertions(+), 400 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8801205f/test/integration/component/test_blocker_bugs.py
--
diff --git a/test/integration/component/test_blocker_bugs.py 
b/test/integration/component/test_blocker_bugs.py
index d099bf1..1f7ac97 100644
--- a/test/integration/component/test_blocker_bugs.py
+++ b/test/integration/component/test_blocker_bugs.py
@@ -68,11 +68,6 @@ class Services:
 "publicport": 22,
 "protocol": 'TCP',
 },
-"volume": {
-   "diskname": "APP Data Volume",
-   "size": 1,   # in GBs
-   "diskdevice": "/dev/xvdb",   # Data Disk
-},
 "templates": {
 "displaytext": 'Template from snapshot',
 "name": 'Template from snapshot',
@@ -86,13 +81,6 @@ class Services:
 "isextractable": True,
 "passwordenabled": True,
 },
-"paths": {
-"mount_dir": "/mnt/tmp",
-"sub_dir": "test",
-"sub_lvl_dir1": "test1",
-"sub_lvl_dir2": "test2",
-"random_data": "random.data",
-},
 "static_nat": {
 "startport": 22,
 "endport": 22,
@@ -104,297 +92,6 @@ class Services:
  }
 
 
-class TestSnapshots(cloudstackTestCase):
-
-@classmethod
-def setUpClass(cls):
-cls.api_client = super(TestSnapshots, 
cls).getClsTestClient().getApiClient()
-cls.services = Services().services
-# Get Zone, Domain and templates
-cls.domain = get_domain(cls.api_client, cls.services)
-cls.zone = get_zone(cls.api_client, cls.services)
-cls.services['mode'] = cls.zone.networktype
-cls.disk_offering = DiskOffering.create(
-cls.api_client,
-cls.services["disk_offering"]
-)
-cls.template = get_template(
-cls.api_client,
-cls.zone.id,
-cls.services["ostype"]
-)
-cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-cls.services["volume"]["zoneid"] = cls.zone.id
-
-cls.services["template"] = cls.template.id
-cls.services["zoneid"] = cls.zone.id
-
-# Create VMs, NAT Rules etc
-cls.account = Account.create(
-cls.api_client,
-cls.services["account"],
-domainid=cls.domain.id
-)
-
-cls.services["account"] = cls.account.name
-
-cls.service_offering = ServiceOffering.create(
-cls.api_client,
-cls.services["service_offering"]
-)
-cls.virtual_machine = VirtualMachine.create(
-cls.api_client,
-cls.services["virtual_machine"],
-templateid=cls.template.id,
-accountid=cls.account.name,
-domainid=cls.account.domainid,
- 

[40/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-3016: remove zonetype parameter from listTemplates, listIsos API.


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

Branch: refs/heads/disk_io_throttling
Commit: 880029844b7cd63a59e75e7ce0285716a34f1934
Parents: cb35ec6
Author: Jessica Wang 
Authored: Mon Jun 17 16:08:38 2013 -0700
Committer: Jessica Wang 
Committed: Mon Jun 17 16:08:38 2013 -0700

--
 .../api/command/user/iso/ListIsosCmd.java   |  7 ---
 .../command/user/template/ListTemplatesCmd.java |  8 
 .../com/cloud/storage/dao/VMTemplateDao.java|  2 +-
 .../cloud/storage/dao/VMTemplateDaoImpl.java| 21 ++--
 .../com/cloud/server/ManagementServerImpl.java  | 12 +--
 5 files changed, 13 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88002984/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java 
b/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java
index f872c12..3219601 100644
--- a/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java
@@ -78,9 +78,6 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd {
 description="the ID of the zone")
 private Long zoneId;
 
-@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, 
description="the network type of the zone that the virtual machine belongs to")
-private String zoneType;
-
 /
 /// Accessors ///
 /
@@ -118,10 +115,6 @@ public class ListIsosCmd extends 
BaseListTaggedResourcesCmd {
 return zoneId;
 }
 
-public String getZoneType() {
-return zoneType;
-}
-
 public boolean listInReadyState() {
 Account account = UserContext.current().getCaller();
 // It is account specific if account is admin type and domainId and 
accountName are not null

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88002984/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java 
b/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java
index f0fc241..aeb76f5 100644
--- 
a/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java
@@ -68,10 +68,6 @@ public class ListTemplatesCmd extends 
BaseListTaggedResourcesCmd {
 @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = 
ZoneResponse.class,
 description="list templates by zoneId")
 private Long zoneId;
-
-@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, 
description="the network type of the zone that the virtual machine belongs to")
-private String zoneType;
-
 /
 /// Accessors ///
 /
@@ -96,10 +92,6 @@ public class ListTemplatesCmd extends 
BaseListTaggedResourcesCmd {
 return zoneId;
 }
 
-public String getZoneType() {
-return zoneType;
-}
-
 public boolean listInReadyState() {
 
 Account account = UserContext.current().getCaller();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88002984/engine/schema/src/com/cloud/storage/dao/VMTemplateDao.java
--
diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplateDao.java 
b/engine/schema/src/com/cloud/storage/dao/VMTemplateDao.java
index 8520757..7c66dd4 100755
--- a/engine/schema/src/com/cloud/storage/dao/VMTemplateDao.java
+++ b/engine/schema/src/com/cloud/storage/dao/VMTemplateDao.java
@@ -56,7 +56,7 @@ public interface VMTemplateDao extends 
GenericDao, StateDao<
public Set> searchTemplates(String name, String 
keyword, TemplateFilter templateFilter, boolean isIso,
List hypers, Boolean bootable, DomainVO domain, 
Long pageSize, Long startIndex, Long zoneId,
HypervisorType hyperType, boolean onlyReady, boolean showDomr, 
List permittedAccounts, Account caller,
-   

[44/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-2900: Ubuntu 13.04 - Migrate Virtual Router fail - Unable to find 
the VM by id=

Changes:
- Have to search the vm_instance table to find the instance


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

Branch: refs/heads/disk_io_throttling
Commit: fb31a39efe7d93a67c7b8c141f434b938a491222
Parents: fea9a0e
Author: Prachi Damle 
Authored: Mon Jun 17 16:58:42 2013 -0700
Committer: Prachi Damle 
Committed: Mon Jun 17 16:59:32 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fb31a39e/server/src/com/cloud/vm/UserVmManagerImpl.java
--
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java 
b/server/src/com/cloud/vm/UserVmManagerImpl.java
index 44a7d06..e8ea024 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -3804,7 +3804,7 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Use
 "No permission to migrate VM, Only Root Admin can migrate 
a VM!");
 }
 
-UserVmVO vm = _vmDao.findById(vmId);
+VMInstanceVO vm = _vmInstanceDao.findById(vmId);
 if (vm == null) {
 throw new InvalidParameterValueException(
 "Unable to find the VM by id=" + vmId);
@@ -3895,7 +3895,10 @@ public class UserVmManagerImpl extends ManagerBase 
implements UserVmManager, Use
 + " already has max Running VMs(count includes 
system VMs), cannot migrate to this host");
 }
 
-collectVmDiskStatistics(vm);
+UserVmVO uservm = _vmDao.findById(vmId);
+if (uservm != null) {
+collectVmDiskStatistics(uservm);
+}
 VMInstanceVO migratedVm = _itMgr.migrate(vm, srcHostId, dest);
 return migratedVm;
 }



[42/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-3016: remove zonetype parameter from listNetworks API.


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

Branch: refs/heads/disk_io_throttling
Commit: 3e852cc29b428f3e5454d7d415174758f9da0602
Parents: 5d0a1ce
Author: Jessica Wang 
Authored: Mon Jun 17 16:25:25 2013 -0700
Committer: Jessica Wang 
Committed: Mon Jun 17 16:26:09 2013 -0700

--
 .../command/user/network/ListNetworksCmd.java   |  7 --
 .../com/cloud/network/NetworkServiceImpl.java   | 25 
 2 files changed, 10 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e852cc2/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java 
b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java
index d25e2c0..afce092 100644
--- 
a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java
@@ -48,9 +48,6 @@ public class ListNetworksCmd extends 
BaseListTaggedResourcesCmd {
 description="the Zone ID of the network")
 private Long zoneId;
 
-@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, 
description="the network type of the zone that the virtual machine belongs to")
-private String zoneType;
-
 @Parameter(name=ApiConstants.TYPE, type=CommandType.STRING, 
description="the type of the network. Supported values are: Isolated and 
Shared")
 private String guestIpType;
 
@@ -99,10 +96,6 @@ public class ListNetworksCmd extends 
BaseListTaggedResourcesCmd {
 return zoneId;
 }
 
-public String getZoneType() {
-return zoneType;
-}
-
 public String getGuestIpType() {
 return guestIpType;
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e852cc2/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 f026dbc..aace68d 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -1355,7 +1355,6 @@ public class NetworkServiceImpl extends ManagerBase 
implements  NetworkService {
 Long id = cmd.getId();
 String keyword = cmd.getKeyword();
 Long zoneId = cmd.getZoneId();
-String zoneType = cmd.getZoneType();
 Account caller = UserContext.current().getCaller();
 Long domainId = cmd.getDomainId();
 String accountName = cmd.getAccountName();
@@ -1503,40 +1502,40 @@ public class NetworkServiceImpl extends ManagerBase 
implements  NetworkService {
 if (!permittedAccounts.isEmpty()) {
 //get account level networks
 networksToReturn.addAll(listAccountSpecificNetworks(
-buildNetworkSearchCriteria(sb, keyword, id, isSystem, 
zoneId, guestIpType, trafficType,
-physicalNetworkId, aclType, 
skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags, zoneType), 
searchFilter,
+buildNetworkSearchCriteria(sb, keyword, id, isSystem, 
zoneId, guestIpType, trafficType, 
+physicalNetworkId, aclType, 
skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags), 
searchFilter,
 permittedAccounts));
 //get domain level networks
 if (domainId != null) {
 networksToReturn
 .addAll(listDomainLevelNetworks(
 buildNetworkSearchCriteria(sb, keyword, id, 
isSystem, zoneId, guestIpType, trafficType,
-physicalNetworkId, aclType, true, 
restartRequired, specifyIpRanges, vpcId, tags, zoneType), searchFilter,
+physicalNetworkId, aclType, true, 
restartRequired, specifyIpRanges, vpcId, tags), searchFilter,
 domainId, false));
 }
 } else {
 //add account specific networks
 
networksToReturn.addAll(listAccountSpecificNetworksByDomainPath(
-buildNetworkSearchCriteria(sb, keyword, id, isSystem, 
zoneId, guestIpType, trafficType,
-physicalNetworkId, aclT

[39/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-3016: remove zonetype parameter from listSystemVMs API.


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

Branch: refs/heads/disk_io_throttling
Commit: cb35ec6f4d640d8864c4c0b0e8f52750d7f00ca9
Parents: 4c26dd6
Author: Jessica Wang 
Authored: Mon Jun 17 15:57:20 2013 -0700
Committer: Jessica Wang 
Committed: Mon Jun 17 15:58:33 2013 -0700

--
 .../api/command/admin/systemvm/ListSystemVMsCmd.java |  7 ---
 server/src/com/cloud/server/ManagementServerImpl.java| 11 ---
 2 files changed, 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb35ec6f/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java
 
b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java
index b5a0f3f..f230a20 100644
--- 
a/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java
@@ -74,9 +74,6 @@ public class ListSystemVMsCmd extends BaseListCmd {
 description="the storage ID where vm's volumes belong to", 
since="3.0.1")
 private Long storageId;
 
-@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, 
description="the network type of the zone that the virtual machine belongs to")
-private String zoneType;
-
 /
 /// Accessors ///
 /
@@ -113,10 +110,6 @@ public class ListSystemVMsCmd extends BaseListCmd {
 return storageId;
 }
 
-public String getZoneType() {
-return zoneType;
-}
-
 /
 /// API Implementation///
 /

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb35ec6f/server/src/com/cloud/server/ManagementServerImpl.java
--
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java 
b/server/src/com/cloud/server/ManagementServerImpl.java
index 2099d2f..5a332b4 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -3078,7 +3078,6 @@ public class ManagementServerImpl extends ManagerBase 
implements ManagementServe
 public Pair, Integer> 
searchForSystemVm(ListSystemVMsCmd cmd) {
 String type = cmd.getSystemVmType();
 Long zoneId = 
_accountMgr.checkAccessAndSpecifyAuthority(UserContext.current().getCaller(), 
cmd.getZoneId());
-String zoneType = cmd.getZoneType();
 Long id = cmd.getId();
 String name = cmd.getSystemVmName();
 String state = cmd.getState();
@@ -3105,12 +3104,6 @@ public class ManagementServerImpl extends ManagerBase 
implements ManagementServe
 sb.join("volumeSearch", volumeSearch, sb.entity().getId(), 
volumeSearch.entity().getInstanceId(), JoinBuilder.JoinType.INNER);
 }
 
-if(zoneType != null) {
-SearchBuilder zoneSb = _dcDao.createSearchBuilder();
-zoneSb.and("zoneNetworkType", zoneSb.entity().getNetworkType(), 
SearchCriteria.Op.EQ);
-sb.join("zoneSb", zoneSb, sb.entity().getDataCenterId(), 
zoneSb.entity().getId(), JoinBuilder.JoinType.INNER);
-}
-
 SearchCriteria sc = sb.create();
 
 if (keyword != null) {
@@ -3151,10 +3144,6 @@ public class ManagementServerImpl extends ManagerBase 
implements ManagementServe
 sc.setJoinParameters("volumeSearch", "poolId", storageId);
 }
 
-if(zoneType != null) {
-sc.setJoinParameters("zoneSb", "zoneNetworkType", zoneType);
-}
-
 Pair, Integer> result = 
_vmInstanceDao.searchAndCount(sc, searchFilter);
 return new Pair, 
Integer>(result.first(), result.second());
 }



[24/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-2902: Updating repository refs

Conflicts:

docs/zh-TW/configure-package-repository.po


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

Branch: refs/heads/disk_io_throttling
Commit: 9ef366e4b3d7e237503d7dd6a1f4b7af4b74b445
Parents: 2572627
Author: Chip Childers 
Authored: Mon Jun 17 13:46:30 2013 -0400
Committer: Chip Childers 
Committed: Mon Jun 17 13:49:05 2013 -0400

--
 docs/en-US/configure-package-repository.xml | 4 ++--
 docs/pot/configure-package-repository.pot   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9ef366e4/docs/en-US/configure-package-repository.xml
--
diff --git a/docs/en-US/configure-package-repository.xml 
b/docs/en-US/configure-package-repository.xml
index c8ba48f..cda4677 100644
--- a/docs/en-US/configure-package-repository.xml
+++ b/docs/en-US/configure-package-repository.xml
@@ -44,7 +44,7 @@
 DEB package repository
 You can add a DEB package repository to your apt sources with 
the following commands. Please note that only packages for Ubuntu 12.04 LTS 
(precise) are being built at this time.
 Use your preferred editor and open (or create) 
/etc/apt/sources.list.d/cloudstack.list. Add the community 
provided repository to the file:
-deb http://cloudstack.apt-get.eu/ubuntu precise 
4.0
+deb http://cloudstack.apt-get.eu/ubuntu precise 
4.1
 We now have to add the public key to the trusted keys.
 $ 
wget -O - http://cloudstack.apt-get.eu/release.asc|apt-key 
add -
 Now update your local apt cache.
@@ -60,7 +60,7 @@
 
 [cloudstack]
 name=cloudstack
-baseurl=http://cloudstack.apt-get.eu/rhel/4.0/
+baseurl=http://cloudstack.apt-get.eu/rhel/4.1/
 enabled=1
 gpgcheck=0
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9ef366e4/docs/pot/configure-package-repository.pot
--
diff --git a/docs/pot/configure-package-repository.pot 
b/docs/pot/configure-package-repository.pot
index e915358..c0ee374 100644
--- a/docs/pot/configure-package-repository.pot
+++ b/docs/pot/configure-package-repository.pot
@@ -60,7 +60,7 @@ msgstr ""
 
 #. Tag: programlisting
 #, no-c-format
-msgid "deb http://cloudstack.apt-get.eu/ubuntu precise 4.0"
+msgid "deb http://cloudstack.apt-get.eu/ubuntu precise 4.1"
 msgstr ""
 
 #. Tag: para
@@ -118,7 +118,7 @@ msgstr ""
 msgid "\n"
 "[cloudstack]\n"
 "name=cloudstack\n"
-"baseurl=http://cloudstack.apt-get.eu/rhel/4.0/\n"
+"baseurl=http://cloudstack.apt-get.eu/rhel/4.1/\n"
 "enabled=1\n"
 "gpgcheck=0\n"
 ""



[50/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack 
into disk_io_throttling


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

Branch: refs/heads/disk_io_throttling
Commit: 691bc9d3948c7e921386806b63b2857f8bcb763b
Parents: 3ad2f0f 9e2eeb2
Author: Wei Zhou 
Authored: Tue Jun 18 09:45:03 2013 +0200
Committer: Wei Zhou 
Committed: Tue Jun 18 09:45:03 2013 +0200

--
 api/src/com/cloud/offering/NetworkOffering.java |   4 +-
 .../command/admin/cluster/ListClustersCmd.java  |   8 +-
 .../admin/host/FindHostsForMigrationCmd.java|   3 +-
 .../api/command/admin/host/ListHostsCmd.java|   3 +-
 .../admin/network/CreateNetworkOfferingCmd.java |   2 +-
 .../api/command/admin/pod/ListPodsByCmd.java|   7 -
 .../admin/region/ListPortableIpRangesCmd.java   |   3 +-
 .../admin/systemvm/ListSystemVMsCmd.java|   7 -
 .../api/command/user/iso/ListIsosCmd.java   |  10 +-
 .../command/user/network/ListNetworksCmd.java   |   7 -
 .../command/user/snapshot/ListSnapshotsCmd.java |  12 +-
 .../command/user/template/ListTemplatesCmd.java |  11 +-
 awsapi/web/web.xml  |  11 +-
 .../com/cloud/network/HAProxyConfigurator.java  |  22 +-
 docs/en-US/Release_Notes.xml|   2 +-
 docs/en-US/configure-package-repository.xml |   4 +-
 .../management-server-install-db-local.xml  |   8 +
 docs/pot/configure-package-repository.pot   |   4 +-
 .../src/com/cloud/dc/dao/DataCenterDao.java |   2 +-
 .../src/com/cloud/dc/dao/DataCenterDaoImpl.java |  15 +-
 .../com/cloud/offerings/NetworkOfferingVO.java  |   4 +
 .../com/cloud/storage/dao/VMTemplateDao.java|   2 +-
 .../cloud/storage/dao/VMTemplateDaoImpl.java|  21 +-
 .../HypervisorHostEndPointRpcServer.java|   2 +-
 .../guru/BigSwitchVnsGuestNetworkGuru.java  |   2 +-
 .../cloud/network/guru/OvsGuestNetworkGuru.java |   3 +-
 .../api/query/dao/StoragePoolJoinDaoImpl.java   |  12 +-
 server/src/com/cloud/configuration/Config.java  |   9 +-
 .../configuration/ConfigurationManagerImpl.java |  11 +-
 .../com/cloud/network/NetworkManagerImpl.java   |  70 +++--
 .../com/cloud/network/NetworkServiceImpl.java   |  25 +-
 .../network/guru/ExternalGuestNetworkGuru.java  |   3 +-
 .../cloud/network/guru/GuestNetworkGuru.java|  11 +-
 .../cloud/server/ConfigurationServerImpl.java   |  25 ++
 .../com/cloud/server/ManagementServerImpl.java  | 100 ++
 .../com/cloud/storage/StorageManagerImpl.java   |   3 +
 .../src/com/cloud/storage/s3/S3ManagerImpl.java |  10 +-
 .../storage/snapshot/SnapshotManagerImpl.java   |  34 +--
 server/src/com/cloud/vm/UserVmManagerImpl.java  |  70 ++---
 .../resource/NfsSecondaryStorageResource.java   |  19 +-
 setup/db/db/schema-410to420.sql |   3 +
 setup/dev/advanced.cfg  |   3 +-
 test/integration/component/test_blocker_bugs.py | 303 ---
 .../component/test_explicit_dedication.py   |   3 -
 .../component/test_implicit_planner.py  |   3 -
 test/integration/component/test_netscaler_lb.py |   2 +-
 .../component/test_redundant_router.py  |   7 -
 .../component/test_shared_networks.py   |   1 +
 test/integration/component/test_snapshots.py| 247 +--
 .../component/test_storage_motion.py|   3 -
 test/integration/component/test_volumes.py  |   3 -
 test/integration/component/test_vpc.py  | 170 ---
 .../component/test_vpc_network_lbrules.py   |   2 +-
 .../component/test_vpc_network_pfrules.py   |   2 +-
 ...deploy_vms_with_varied_deploymentplanners.py |  12 +-
 test/integration/smoke/test_nic.py  |   3 -
 .../integration/smoke/test_portable_publicip.py |   1 -
 test/integration/smoke/test_resource_detail.py  |   3 -
 test/integration/smoke/test_scale_vm.py |   3 -
 test/integration/smoke/test_vm_life_cycle.py|   2 +-
 test/integration/smoke/test_volumes.py  |   1 -
 tools/marvin/marvin/cloudstackTestClient.py |   1 +
 ui/scripts/network.js   | 125 
 utils/src/com/cloud/utils/S3Utils.java  |   4 +-
 utils/src/com/cloud/utils/StringUtils.java  |   6 +-
 utils/src/com/cloud/utils/net/NetUtils.java |   2 +-
 .../src/com/cloud/utils/ssh/SSHKeysHelper.java  |   2 +-
 utils/test/com/cloud/utils/StringUtilsTest.java |   5 +
 .../com/cloud/utils/crypto/RSAHelperTest.java   |  50 +++
 .../test/com/cloud/utils/net/NetUtilsTest.java  |   5 +
 .../com/cloud/utils/ssh/SSHKeysHelperTest.java  |  69 +
 71 files changed, 680 insertions(+), 947 deletions(-)
--


http://git-wip-us.apache.o

[23/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-2914: default lb scheme to Public when the service LB is enabled, 
and scheme is not specified explicitly


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

Branch: refs/heads/disk_io_throttling
Commit: fc16e29f992d81156a4e08a77da215f8276f4efe
Parents: b0ea02e
Author: Alena Prokharchyk 
Authored: Mon Jun 17 10:09:52 2013 -0700
Committer: Alena Prokharchyk 
Committed: Mon Jun 17 10:10:43 2013 -0700

--
 .../api/command/admin/network/CreateNetworkOfferingCmd.java  | 2 +-
 .../com/cloud/configuration/ConfigurationManagerImpl.java| 8 +---
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fc16e29f/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java
 
b/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java
index 6410715..febb0c3 100644
--- 
a/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java
@@ -95,7 +95,7 @@ public class CreateNetworkOfferingCmd extends BaseCmd {
 @Parameter(name=ApiConstants.IS_PERSISTENT, type=CommandType.BOOLEAN, 
description="true if network offering supports persistent networks; defaulted 
to false if not specified")
 private Boolean isPersistent;
 
-@Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, since="4.2.0", 
description="Template details in key/value pairs." +
+@Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, since="4.2.0", 
description="Network offering details in key/value pairs." +
" Supported keys are internallbprovider/publiclbprovider with 
service provider as a value")
 protected Map details;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fc16e29f/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
--
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java 
b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 131d340..68745bf 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -3968,9 +3968,6 @@ public class ConfigurationManagerImpl extends ManagerBase 
implements Configurati
 
_networkModel.checkCapabilityForProvider(serviceProviderMap.get(Service.Lb), 
Service.Lb, Capability.LbSchemes, publicLbStr);
 internalLb = publicLbStr.contains("internal");
 publicLb = publicLbStr.contains("public");
-} else {
-//if not specified, default public lb to true
-publicLb = true;
 }
 }
 }
@@ -4009,6 +4006,11 @@ public class ConfigurationManagerImpl extends 
ManagerBase implements Configurati
 }
 }
 }
+
+if (serviceProviderMap.containsKey(Service.Lb) && !internalLb && 
!publicLb) {
+//if not specified, default public lb to true
+publicLb = true;
+}
 
 NetworkOfferingVO offering = new NetworkOfferingVO(name, displayText, 
trafficType, systemOnly, specifyVlan,
 networkRate, multicastRate, isDefault, availability, tags, 
type, conserveMode, dedicatedLb,



[16/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
Global config to disable an account from acquiring public ips and guest vlans 
from the system if the account
has dedicated resources and the dedicated resources have all been consumed - 
use.system.public.ips and use.system.guest.vlans
Both configs are configurable at the account level too.


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

Branch: refs/heads/disk_io_throttling
Commit: 770cf02ccff2e4eac04a332216d1c575f18639be
Parents: 28b598b
Author: Likitha Shetty 
Authored: Fri Jun 14 14:51:08 2013 +0530
Committer: Likitha Shetty 
Committed: Mon Jun 17 17:54:36 2013 +0530

--
 .../schema/src/com/cloud/dc/dao/DataCenterDao.java   |  2 +-
 .../src/com/cloud/dc/dao/DataCenterDaoImpl.java  | 15 ++-
 .../network/guru/BigSwitchVnsGuestNetworkGuru.java   |  2 +-
 .../com/cloud/network/guru/OvsGuestNetworkGuru.java  |  3 ++-
 server/src/com/cloud/configuration/Config.java   |  9 -
 server/src/com/cloud/network/NetworkManagerImpl.java |  5 -
 .../cloud/network/guru/ExternalGuestNetworkGuru.java |  3 ++-
 .../src/com/cloud/network/guru/GuestNetworkGuru.java | 11 ++-
 setup/db/db/schema-410to420.sql  |  3 +++
 9 files changed, 41 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/770cf02c/engine/schema/src/com/cloud/dc/dao/DataCenterDao.java
--
diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterDao.java 
b/engine/schema/src/com/cloud/dc/dao/DataCenterDao.java
index e54b9bb..ed6e696 100755
--- a/engine/schema/src/com/cloud/dc/dao/DataCenterDao.java
+++ b/engine/schema/src/com/cloud/dc/dao/DataCenterDao.java
@@ -36,7 +36,7 @@ public interface DataCenterDao extends 
GenericDao {
 Pair allocatePrivateIpAddress(long id, long podId, long 
instanceId, String reservationId);
 DataCenterIpAddressVO allocatePrivateIpAddress(long id, String 
reservationId);
 String allocateLinkLocalIpAddress(long id, long podId, long instanceId, 
String reservationId);
-String allocateVnet(long dcId, long physicalNetworkId, long accountId, 
String reservationId);
+String allocateVnet(long dcId, long physicalNetworkId, long accountId, 
String reservationId, boolean canUseSystemGuestVlans);
 
 void releaseVnet(String vnet, long dcId, long physicalNetworkId, long 
accountId, String reservationId);
 void releasePrivateIpAddress(String ipAddress, long dcId, Long instanceId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/770cf02c/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
--
diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java 
b/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
index 4d9d010..503306f 100755
--- a/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
@@ -192,22 +192,27 @@ public class DataCenterDaoImpl extends 
GenericDaoBase implem
 }
 
 @Override
-public String allocateVnet(long dataCenterId, long physicalNetworkId, long 
accountId, String reservationId) {
+public String allocateVnet(long dataCenterId, long physicalNetworkId, long 
accountId, String reservationId,
+boolean canUseSystemGuestVlans) {
 ArrayList dedicatedVlanDbIds = new ArrayList();
+boolean useDedicatedGuestVlans = false;
 List maps = 
_accountGuestVlanMapDao.listAccountGuestVlanMapsByAccount(accountId);
 for (AccountGuestVlanMapVO map : maps) {
 dedicatedVlanDbIds.add(map.getId());
 }
 if (dedicatedVlanDbIds != null && !dedicatedVlanDbIds.isEmpty()) {
+useDedicatedGuestVlans = true;
 DataCenterVnetVO vo = _vnetAllocDao.take(physicalNetworkId, 
accountId, reservationId, dedicatedVlanDbIds);
 if (vo != null)
 return vo.getVnet();
 }
-DataCenterVnetVO vo = _vnetAllocDao.take(physicalNetworkId, accountId, 
reservationId, null);
-if (vo == null) {
-return null;
+if (!useDedicatedGuestVlans || (useDedicatedGuestVlans && 
canUseSystemGuestVlans)) {
+DataCenterVnetVO vo = _vnetAllocDao.take(physicalNetworkId, 
accountId, reservationId, null);
+if (vo != null) {
+return vo.getVnet();
+}
 }
-return vo.getVnet();
+return null;
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/770cf02c/plugins/network-elements/bigswitch-vns/src/com/cloud/network

[29/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
Removed String instantiation

String instantiation and redundant method call replaced with a constant.

Signed-off-by: Laszlo Hornyak 


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

Branch: refs/heads/disk_io_throttling
Commit: ce8ada030d3150087357d7135c3877c25a4702c2
Parents: a2c7d3a
Author: Laszlo Hornyak 
Authored: Sat Jun 8 21:46:40 2013 +0200
Committer: Chip Childers 
Committed: Mon Jun 17 19:15:37 2013 +0100

--
 .../com/cloud/network/HAProxyConfigurator.java  | 22 
 1 file changed, 9 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ce8ada03/core/src/com/cloud/network/HAProxyConfigurator.java
--
diff --git a/core/src/com/cloud/network/HAProxyConfigurator.java 
b/core/src/com/cloud/network/HAProxyConfigurator.java
index 29fdf4a..162571f 100644
--- a/core/src/com/cloud/network/HAProxyConfigurator.java
+++ b/core/src/com/cloud/network/HAProxyConfigurator.java
@@ -33,7 +33,6 @@ import com.cloud.agent.api.to.LoadBalancerTO;
 import com.cloud.agent.api.to.PortForwardingRuleTO;
 import com.cloud.agent.api.to.LoadBalancerTO.DestinationTO;
 import com.cloud.agent.api.to.LoadBalancerTO.StickinessPolicyTO;
-import com.cloud.agent.resource.virtualnetwork.VirtualRoutingResource;
 import com.cloud.network.rules.LbStickinessMethod.StickinessMethodType;
 import com.cloud.utils.net.NetUtils;
 
@@ -41,6 +40,7 @@ import com.cloud.utils.net.NetUtils;
 public class HAProxyConfigurator implements LoadBalancerConfigurator {
 
 private static final Logger s_logger = 
Logger.getLogger(HAProxyConfigurator.class);
+private static final String blankLine = "\t ";
 private static String[] globalSection = { "global",
 "\tlog 127.0.0.1:3914   local0 warning", 
 "\tmaxconn 4096",
@@ -86,9 +86,9 @@ public class HAProxyConfigurator implements 
LoadBalancerConfigurator {
 List result = new ArrayList();
 
 result.addAll(Arrays.asList(globalSection));
-result.add(getBlankLine());
+result.add(blankLine);
 result.addAll(Arrays.asList(defaultsSection));
-result.add(getBlankLine());
+result.add(blankLine);
 
 if (pools.isEmpty()) {
 // haproxy cannot handle empty listen / frontend or backend, so add
@@ -96,7 +96,7 @@ public class HAProxyConfigurator implements 
LoadBalancerConfigurator {
 // on port 9
 result.addAll(Arrays.asList(defaultListen));
 }
-result.add(getBlankLine());
+result.add(blankLine);
 
 for (Map.Entry> e : 
pools.entrySet()) {
 List poolRules = getRulesForPool(e.getKey(), e.getValue());
@@ -143,7 +143,7 @@ public class HAProxyConfigurator implements 
LoadBalancerConfigurator {
 .append(rule.getDstPortRange()[0]).append(" check");
 result.add(sb.toString());
 }
-result.add(getBlankLine());
+result.add(blankLine);
 return result;
 }
  
@@ -507,14 +507,10 @@ public class HAProxyConfigurator implements 
LoadBalancerConfigurator {
 result.add(sb.toString());
 }
 
-result.add(getBlankLine());
+result.add(blankLine);
 return result;
 }
 
-private String getBlankLine() {
-return new String("\t ");
-}
-
 private String generateStatsRule(LoadBalancerConfigCommand lbCmd,
 String ruleName, String statsIp) {
 StringBuilder rule = new StringBuilder("\nlisten ").append(ruleName)
@@ -534,7 +530,7 @@ public class HAProxyConfigurator implements 
LoadBalancerConfigurator {
 List result = new ArrayList();
 
 result.addAll(Arrays.asList(globalSection));
-result.add(getBlankLine());
+result.add(blankLine);
 result.addAll(Arrays.asList(defaultsSection));
 if (!lbCmd.lbStatsVisibility.equals("disabled")) {
 /* new rule : listen admin_page guestip/link-local:8081 */
@@ -568,7 +564,7 @@ public class HAProxyConfigurator implements 
LoadBalancerConfigurator {
 }
 
 }
-result.add(getBlankLine());
+result.add(blankLine);
 boolean has_listener = false;
 for (LoadBalancerTO lbTO : lbCmd.getLoadBalancers()) {
 if ( lbTO.isRevoked() ) {
@@ -578,7 +574,7 @@ public class HAProxyConfigurator implements 
LoadBalancerConfigurator {
 result.addAll(poolRules);
 has_listener = true;
 }
-result.add(getBlankLine());
+result.add(blankLine);
 if ( !has_listener) {

[36/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-3016: remove zonetype parameter from listClusters API.


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

Branch: refs/heads/disk_io_throttling
Commit: 9d0d0b4083fe3cb9f5aac9deb5be12bea018
Parents: 9e7356c
Author: Jessica Wang 
Authored: Mon Jun 17 15:28:39 2013 -0700
Committer: Jessica Wang 
Committed: Mon Jun 17 15:28:39 2013 -0700

--
 .../command/admin/cluster/ListClustersCmd.java  |  8 +---
 .../com/cloud/server/ManagementServerImpl.java  | 45 ++--
 2 files changed, 13 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9d0d0222/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java 
b/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java
index f2dd349..0417b18 100644
--- 
a/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java
@@ -70,9 +70,6 @@ public class ListClustersCmd extends BaseListCmd {
 @Parameter(name=ApiConstants.MANAGED_STATE, type=CommandType.STRING, 
description="whether this cluster is managed by cloudstack")
 private String managedState;
 
-@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, 
description="the network type of the zone that the virtual machine belongs to")
-private String zoneType;
-
 @Parameter(name=ApiConstants.SHOW_CAPACITIES, type=CommandType.BOOLEAN, 
description="flag to display the capacity of the clusters")
 private Boolean showCapacities;
 
@@ -117,10 +114,7 @@ public class ListClustersCmd extends BaseListCmd {
 this.managedState = managedstate;
 }
 
-public String getZoneType() {
-return zoneType;
-}
-
+
 public Boolean getShowCapacities() {
 return showCapacities;
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9d0d0222/server/src/com/cloud/server/ManagementServerImpl.java
--
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java 
b/server/src/com/cloud/server/ManagementServerImpl.java
index 96c72e4..f09aa21 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -996,67 +996,46 @@ public class ManagementServerImpl extends ManagerBase 
implements ManagementServe
 
 @Override
 public Pair, Integer> 
searchForClusters(ListClustersCmd cmd) {
-   Object id = cmd.getId();
+Filter searchFilter = new Filter(ClusterVO.class, "id", true, 
cmd.getStartIndex(), cmd.getPageSizeVal());
+SearchCriteria sc = _clusterDao.createSearchCriteria();
+
+Object id = cmd.getId();
 Object name = cmd.getClusterName();
 Object podId = cmd.getPodId();
 Long zoneId = cmd.getZoneId();
 Object hypervisorType = cmd.getHypervisorType();
 Object clusterType = cmd.getClusterType();
 Object allocationState = cmd.getAllocationState();
-String zoneType = cmd.getZoneType();
 String keyword = cmd.getKeyword();
-zoneId = 
_accountMgr.checkAccessAndSpecifyAuthority(UserContext.current().getCaller(), 
zoneId);
-
-
-   Filter searchFilter = new Filter(ClusterVO.class, "id", true, 
cmd.getStartIndex(), cmd.getPageSizeVal());
-
-SearchBuilder sb = _clusterDao.createSearchBuilder();
-sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
-sb.and("name", sb.entity().getName(), SearchCriteria.Op.LIKE);
-sb.and("podId", sb.entity().getPodId(), SearchCriteria.Op.EQ);
-sb.and("dataCenterId", sb.entity().getDataCenterId(), 
SearchCriteria.Op.EQ);
-sb.and("hypervisorType", sb.entity().getHypervisorType(), 
SearchCriteria.Op.EQ);
-sb.and("clusterType", sb.entity().getClusterType(), 
SearchCriteria.Op.EQ);
-sb.and("allocationState", sb.entity().getAllocationState(), 
SearchCriteria.Op.EQ);
-
-if(zoneType != null) {
-SearchBuilder zoneSb = _dcDao.createSearchBuilder();
-zoneSb.and("zoneNetworkType", zoneSb.entity().getNetworkType(), 
SearchCriteria.Op.EQ);
-sb.join("zoneSb", zoneSb, sb.entity().getDataCenterId(), 
zoneSb.entity().getId(), JoinBuilder.JoinType.INNER);
-}
 
+zoneId = 
_accountMgr.checkAccessAndSpecifyAuthority(UserContext.current().getCaller(), 
zoneId);
 
-SearchCriteria sc

[35/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-3016: remove zonetype parameter from listSnapshots API.


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

Branch: refs/heads/disk_io_throttling
Commit: 9e7356c686d098185e2481338e4e4169dcb95813
Parents: d4477ba
Author: Jessica Wang 
Authored: Mon Jun 17 14:58:51 2013 -0700
Committer: Jessica Wang 
Committed: Mon Jun 17 15:00:44 2013 -0700

--
 .../command/user/snapshot/ListSnapshotsCmd.java | 11 ++-
 .../storage/snapshot/SnapshotManagerImpl.java   | 34 +++-
 2 files changed, 13 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9e7356c6/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java
--
diff --git 
a/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java 
b/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java
index e4ae769..611b127 100644
--- 
a/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java
@@ -59,9 +59,6 @@ public class ListSnapshotsCmd extends 
BaseListTaggedResourcesCmd {
 @Parameter(name=ApiConstants.VOLUME_ID, type=CommandType.UUID, entityType 
= VolumeResponse.class,
 description="the ID of the disk volume")
 private Long volumeId;
-
-@Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, 
description="the network type of the zone that the virtual machine belongs to")
-private String zoneType;
 
 @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, 
entityType = ZoneResponse.class, description = "list snapshots by zone id")
 private Long zoneId;
@@ -90,14 +87,10 @@ public class ListSnapshotsCmd extends 
BaseListTaggedResourcesCmd {
 return volumeId;
 }
 
-public String getZoneType() {
-return zoneType;
-}
-
 public Long getZoneId() {
 return zoneId;
-}
-
+}
+
 /
 /// API Implementation///
 /

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9e7356c6/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 02e3428..c720169 100755
--- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
+++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
@@ -58,7 +58,6 @@ import com.cloud.configuration.Resource.ResourceType;
 import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.dc.ClusterVO;
 import com.cloud.dc.DataCenter;
-import com.cloud.dc.DataCenterVO;
 import com.cloud.dc.dao.ClusterDao;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.domain.dao.DomainDao;
@@ -572,7 +571,6 @@ public class SnapshotManagerImpl extends ManagerBase 
implements SnapshotManager,
 String keyword = cmd.getKeyword();
 String snapshotTypeStr = cmd.getSnapshotType();
 String intervalTypeStr = cmd.getIntervalType();
-String zoneType = cmd.getZoneType();
 Map tags = cmd.getTags();
 Long zoneId = cmd.getZoneId();
 
@@ -606,23 +604,17 @@ public class SnapshotManagerImpl extends ManagerBase 
implements SnapshotManager,
 sb.and("dataCenterId", sb.entity().getDataCenterId(), 
SearchCriteria.Op.EQ);
 
 if (tags != null && !tags.isEmpty()) {
-SearchBuilder tagSearch = 
_resourceTagDao.createSearchBuilder();
-for (int count=0; count < tags.size(); count++) {
-tagSearch.or().op("key" + String.valueOf(count), 
tagSearch.entity().getKey(), SearchCriteria.Op.EQ);
-tagSearch.and("value" + String.valueOf(count), 
tagSearch.entity().getValue(), SearchCriteria.Op.EQ);
-tagSearch.cp();
-}
-tagSearch.and("resourceType", 
tagSearch.entity().getResourceType(), SearchCriteria.Op.EQ);
-sb.groupBy(sb.entity().getId());
-sb.join("tagSearch", tagSearch, sb.entity().getId(), 
tagSearch.entity().getResourceId(), JoinBuilder.JoinType.INNER);
-}
+SearchBuilder tagSearch = 
_resourceTagDao.createSearchBuilder();
+for (int count=0; count < tags.size(); count++) {
+tagSearch.or().op("key" + String.valueOf(count), 
t

[04/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-758


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

Branch: refs/heads/disk_io_throttling
Commit: fcafe28d7b9231282161e326e9dfa8528054f5fd
Parents: 2f1ed47
Author: Radhika PC 
Authored: Mon Jun 17 11:41:07 2013 +0530
Committer: Radhika PC 
Committed: Mon Jun 17 11:41:07 2013 +0530

--
 docs/en-US/create-vpn-connection-vpc.xml  | 31 +-
 docs/en-US/create-vpn-gateway-for-vpc.xml | 30 -
 docs/en-US/delete-reset-vpn.xml   | 28 ++-
 3 files changed, 72 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fcafe28d/docs/en-US/create-vpn-connection-vpc.xml
--
diff --git a/docs/en-US/create-vpn-connection-vpc.xml 
b/docs/en-US/create-vpn-connection-vpc.xml
index 1fba09e..88a058c 100644
--- a/docs/en-US/create-vpn-connection-vpc.xml
+++ b/docs/en-US/create-vpn-connection-vpc.xml
@@ -20,6 +20,7 @@
 -->
 
   Creating a VPN Connection
+  &PRODUCT; supports creating up to 8 VPN 
connections.
   
 
   Log in to the &PRODUCT; UI as an administrator or end user.
@@ -38,19 +39,37 @@
 
 
   Click the Settings icon.
-  The following options are displayed.
+  For each tier, the following options are displayed:
   
 
-  IP Addresses
+  Internal LB
 
 
-  Gateways
+  Public LB IP
 
 
-  Site-to-Site VPN
+  Static NAT
 
 
-  Network ASLs
+  Virtual Machines
+
+
+  CIDR
+
+  
+  The following router information is displayed:
+  
+
+  Private Gateways
+
+
+  Public IP Addresses
+
+
+  Site-to-Site VPNs
+
+
+  Network ACL Lists
 
   
 
@@ -100,4 +119,4 @@
   
 
   
-
\ No newline at end of file
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fcafe28d/docs/en-US/create-vpn-gateway-for-vpc.xml
--
diff --git a/docs/en-US/create-vpn-gateway-for-vpc.xml 
b/docs/en-US/create-vpn-gateway-for-vpc.xml
index 396a7d9..0f8a0dc 100644
--- a/docs/en-US/create-vpn-gateway-for-vpc.xml
+++ b/docs/en-US/create-vpn-gateway-for-vpc.xml
@@ -38,19 +38,37 @@
 
 
   Click the Settings icon.
-  The following options are displayed.
+  For each tier, the following options are displayed:
   
 
-  IP Addresses
+  Internal LB
 
 
-  Gateways
+  Public LB IP
 
 
-  Site-to-Site VPN
+  Static NAT
 
 
-  Network ACLs
+  Virtual Machines
+
+
+  CIDR
+
+  
+  The following router information is displayed:
+  
+
+  Private Gateways
+
+
+  Public IP Addresses
+
+
+  Site-to-Site VPNs
+
+
+  Network ACL Lists
 
   
 
@@ -77,4 +95,4 @@
   
 
   
-
\ No newline at end of file
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fcafe28d/docs/en-US/delete-reset-vpn.xml
--
diff --git a/docs/en-US/delete-reset-vpn.xml b/docs/en-US/delete-reset-vpn.xml
index 318e5fe..2fe85d2 100644
--- a/docs/en-US/delete-reset-vpn.xml
+++ b/docs/en-US/delete-reset-vpn.xml
@@ -38,19 +38,37 @@
 
 
   Click the Settings icon.
-  The following options are displayed.
+  For each tier, the following options are displayed:
   
 
-  IP Addresses
+  Internal LB
 
 
-  Gateways
+  Public LB IP
 
 
-  Site-to-Site VPN
+  Static NAT
 
 
-  Network ASLs
+  Virtual Machines
+
+
+  CIDR
+
+  
+  The following router information is displayed:
+  
+
+  Private Gateways
+
+
+  Public IP Addresses
+
+
+  Site-to-Site VPNs
+
+
+  Network ACL Lists
 
   
 



[21/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-2902: Fixing references to 4.1 repository for this release


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

Branch: refs/heads/disk_io_throttling
Commit: 76d3c27bf4c0ab3690840e56ca162935cea91d48
Parents: 363a7b9
Author: Nils 
Authored: Mon Jun 17 15:46:39 2013 +0200
Committer: Chip Childers 
Committed: Mon Jun 17 13:02:48 2013 -0400

--
 docs/en-US/Release_Notes.xml| 8 
 docs/en-US/configure-package-repository.xml | 4 ++--
 docs/pot/configure-package-repository.pot   | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76d3c27b/docs/en-US/Release_Notes.xml
--
diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml
index 2ae8732..b9861ee 100644
--- a/docs/en-US/Release_Notes.xml
+++ b/docs/en-US/Release_Notes.xml
@@ -398,7 +398,7 @@ under the License.
   SSH keypair assigned to a virtual machine.
   
 
-
+
   Issues Fixed in 4.1.0
   Apache CloudStack uses https://issues.apache.org/jira/browse/CLOUDSTACK";
   >Jira to track its issues. All new features and bugs for 
4.1.0 have been tracked
@@ -4775,7 +4775,7 @@ service cloudstack-agent restart
   
 [apache-cloudstack]
 name=Apache CloudStack
-baseurl=http://cloudstack.apt-get.eu/rhel/4.0/
+baseurl=http://cloudstack.apt-get.eu/rhel/4.1/
 enabled=1
 gpgcheck=0
 
@@ -5067,7 +5067,7 @@ service cloudstack-agent restart
   
 [apache-cloudstack]
 name=Apache CloudStack
-baseurl=http://cloudstack.apt-get.eu/rhel/4.0/
+baseurl=http://cloudstack.apt-get.eu/rhel/4.1/
 enabled=1
 gpgcheck=0
 
@@ -5663,7 +5663,7 @@ service cloudstack-agent restart
   
 [apache-cloudstack]
 name=Apache CloudStack
-baseurl=http://cloudstack.apt-get.eu/rhel/4.0/
+baseurl=http://cloudstack.apt-get.eu/rhel/4.1/
 enabled=1
 gpgcheck=0
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76d3c27b/docs/en-US/configure-package-repository.xml
--
diff --git a/docs/en-US/configure-package-repository.xml 
b/docs/en-US/configure-package-repository.xml
index c8ba48f..cda4677 100644
--- a/docs/en-US/configure-package-repository.xml
+++ b/docs/en-US/configure-package-repository.xml
@@ -44,7 +44,7 @@
 DEB package repository
 You can add a DEB package repository to your apt sources with 
the following commands. Please note that only packages for Ubuntu 12.04 LTS 
(precise) are being built at this time.
 Use your preferred editor and open (or create) 
/etc/apt/sources.list.d/cloudstack.list. Add the community 
provided repository to the file:
-deb http://cloudstack.apt-get.eu/ubuntu precise 
4.0
+deb http://cloudstack.apt-get.eu/ubuntu precise 
4.1
 We now have to add the public key to the trusted keys.
 $ 
wget -O - http://cloudstack.apt-get.eu/release.asc|apt-key 
add -
 Now update your local apt cache.
@@ -60,7 +60,7 @@
 
 [cloudstack]
 name=cloudstack
-baseurl=http://cloudstack.apt-get.eu/rhel/4.0/
+baseurl=http://cloudstack.apt-get.eu/rhel/4.1/
 enabled=1
 gpgcheck=0
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/76d3c27b/docs/pot/configure-package-repository.pot
--
diff --git a/docs/pot/configure-package-repository.pot 
b/docs/pot/configure-package-repository.pot
index e915358..c0ee374 100644
--- a/docs/pot/configure-package-repository.pot
+++ b/docs/pot/configure-package-repository.pot
@@ -60,7 +60,7 @@ msgstr ""
 
 #. Tag: programlisting
 #, no-c-format
-msgid "deb http://cloudstack.apt-get.eu/ubuntu precise 4.0"
+msgid "deb http://cloudstack.apt-get.eu/ubuntu precise 4.1"
 msgstr ""
 
 #. Tag: para
@@ -118,7 +118,7 @@ msgstr ""
 msgid "\n"
 "[cloudstack]\n"
 "name=cloudstack\n"
-"baseurl=http://cloudstack.apt-get.eu/rhel/4.0/\n"
+"baseurl=http://cloudstack.apt-get.eu/rhel/4.1/\n"
 "enabled=1\n"
 "gpgcheck=0\n"
 ""



[32/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
NPE fix

- fixes an NPE in case the pool.scope = null
- replaces null checks around toString with ObjectUtils.toString call

Signed-off-by: Laszlo Hornyak 


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

Branch: refs/heads/disk_io_throttling
Commit: 202cd1529054fe60acce0cce54686268797b65bd
Parents: c88d8fb
Author: Laszlo Hornyak 
Authored: Sun Jun 16 10:42:17 2013 +0200
Committer: Chip Childers 
Committed: Mon Jun 17 19:19:43 2013 +0100

--
 .../com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/202cd152/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
--
diff --git a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java 
b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
index 6d0cde1..f2b9525 100644
--- a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
@@ -25,6 +25,7 @@ import javax.inject.Inject;
 import com.cloud.capacity.Capacity;
 import org.apache.cloudstack.api.response.StoragePoolResponse;
 import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType;
+import org.apache.commons.lang.ObjectUtils;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
@@ -79,17 +80,12 @@ public class StoragePoolJoinDaoImpl extends 
GenericDaoBase

[33/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
Small fix to satisfy the xml validation requirements

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

Branch: refs/heads/disk_io_throttling
Commit: 84b92f890ca1647f331da459fe09a28d8a4cecdb
Parents: 202cd15
Author: Hugo Trippaers 
Authored: Mon Jun 17 11:25:22 2013 -0700
Committer: Hugo Trippaers 
Committed: Mon Jun 17 11:26:13 2013 -0700

--
 awsapi/web/web.xml | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/84b92f89/awsapi/web/web.xml
--
diff --git a/awsapi/web/web.xml b/awsapi/web/web.xml
index 7efe43d..5ded12b 100644
--- a/awsapi/web/web.xml
+++ b/awsapi/web/web.xml
@@ -22,16 +22,17 @@
 http://java.sun.com/dtd/web-app_2_3.dtd";>
 
 
-
-   
- 
org.springframework.web.context.ContextLoaderListener
-   
+CloudBridge
+
 
 contextConfigLocation
 classpath:applicationContext.xml
 
 
-CloudBridge
+
+
org.springframework.web.context.ContextLoaderListener
+
+
 
 EC2MainServlet
 EC2 Main Servlet



[18/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-2935: Corrected VPC code related to cleanup

Signed-off-by: Prasanna Santhanam 


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

Branch: refs/heads/disk_io_throttling
Commit: 6a5c9d777f979fe62b0ff45d88f8a44fd4e5057b
Parents: 3a02942
Author: Gaurav Aradhye 
Authored: Mon Jun 17 03:04:23 2013 -0400
Committer: Prasanna Santhanam 
Committed: Mon Jun 17 19:40:03 2013 +0530

--
 test/integration/component/test_vpc_network_lbrules.py | 2 +-
 test/integration/component/test_vpc_network_pfrules.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a5c9d77/test/integration/component/test_vpc_network_lbrules.py
--
diff --git a/test/integration/component/test_vpc_network_lbrules.py 
b/test/integration/component/test_vpc_network_lbrules.py
index 66d6c4d..3461bb4 100644
--- a/test/integration/component/test_vpc_network_lbrules.py
+++ b/test/integration/component/test_vpc_network_lbrules.py
@@ -408,7 +408,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase):
 self.services["vpc_offering"]
 )
 
-self._cleanup.append(self.vpc_off)
+self._cleanup.append(vpc_off)
 self.debug("Enabling the VPC offering created")
 vpc_off.update(self.apiclient, state='Enabled')
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a5c9d77/test/integration/component/test_vpc_network_pfrules.py
--
diff --git a/test/integration/component/test_vpc_network_pfrules.py 
b/test/integration/component/test_vpc_network_pfrules.py
index 92b04ad..8d1d9ec 100644
--- a/test/integration/component/test_vpc_network_pfrules.py
+++ b/test/integration/component/test_vpc_network_pfrules.py
@@ -406,7 +406,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
 self.services["vpc_offering"]
 )
 
-self._cleanup.append(self.vpc_off)
+self._cleanup.append(vpc_off)
 self.debug("Enabling the VPC offering created")
 vpc_off.update(self.apiclient, state='Enabled')
 



[28/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-869: Add VPC dialog - add Public LB Provider dropdown, remove VPC 
Offering dropdown. When Public LB Provider is selected as Netscaler, pass 
"Default VPC offering with Netscaler" to createVPC API. When Public LB Provider 
is selected as VpcVirtualRouter, pass "Default VPC Offering" to createVPC API.


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

Branch: refs/heads/disk_io_throttling
Commit: a2c7d3a8a75b2cec266cef566b8828be7a1ebc72
Parents: 952fa24
Author: Jessica Wang 
Authored: Mon Jun 17 10:55:50 2013 -0700
Committer: Jessica Wang 
Committed: Mon Jun 17 10:58:58 2013 -0700

--
 ui/scripts/network.js | 125 +
 1 file changed, 57 insertions(+), 68 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a2c7d3a8/ui/scripts/network.js
--
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index fb63e4b..ddde9c9 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -4532,78 +4532,67 @@
 docID: 'helpVPCDomain',
 label: 'label.DNS.domain.for.guest.networks'
   },
-
-  loadbalancer:{//Support for Netscaler as an external 
device for load balancing
-label:'Load Balancer',
+  publicLoadBalancerProvider:{
+label:'Public Load Balancer Provider',
 select:function(args){
- $.ajax({
-  url:createURL('listVPCOfferings&listall=true'),
-  dataType:'json',
-  success:function(json){
-var items=[];
-var vpcObj = json.listvpcofferingsresponse.vpcoffering;
-$(vpcObj).each(function(){
-  items.push({id:this.id , description:this.name});
-  });
-args.response.success({data:items});
-
- }
-
- });
-
-   }
-
-}
-
+  var items = [];
+  items.push({id: 'VpcVirtualRouter', description: 
'VpcVirtualRouter'});
+  items.push({id: 'Netscaler', description: 'Netscaler'});
+  args.response.success({data: items});
+}
+  }
 }
   },  
-  action: function(args) { 

-   /*  var 
defaultvpcofferingid;
-   $.ajax({
- url: 
createURL("listVPCOfferings"),
-   
dataType: "json",
-   data: {
- 
isdefault: true
-   },
- async: false,
-   
success: function(json) {
- 
defaultvpcofferingid = json.listvpcofferingsresponse.vpcoffering[0].id;
-   }
-   });*/
-   
-   var dataObj = {
-   name: 
args.data.name,
-   
displaytext: args.data.displaytext,
-   zoneid: 
args.data.zoneid,
-   cidr: 
args.data.cidr,
-   
vpcofferingid: args.data.loadbalancer// Support for external load balancer
-   };
-   
-   
if(args.data.networkdomain

[03/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d

2013-06-18 Thread weizhou
CLOUDSTACK-769 review comments fixed


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

Branch: refs/heads/disk_io_throttling
Commit: 2f1ed47213014f2462d7add0bec6a2437e336899
Parents: 776301c
Author: Radhika PC 
Authored: Mon Jun 17 11:08:59 2013 +0530
Committer: Radhika PC 
Committed: Mon Jun 17 11:08:59 2013 +0530

--
 docs/en-US/add-loadbalancer-rule-vpc.xml | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2f1ed472/docs/en-US/add-loadbalancer-rule-vpc.xml
--
diff --git a/docs/en-US/add-loadbalancer-rule-vpc.xml 
b/docs/en-US/add-loadbalancer-rule-vpc.xml
index b7b9e3e..82e8702 100644
--- a/docs/en-US/add-loadbalancer-rule-vpc.xml
+++ b/docs/en-US/add-loadbalancer-rule-vpc.xml
@@ -25,16 +25,16 @@
 External LB is nothing but a LB rule created to redirect the traffic 
received at a public IP of
 the VPC virtual router. The traffic is load balanced within a tier based 
on your configuration.
 Citrix NetScaler and VPC virtual router are supported for external LB. 
When you use internal LB
-service, traffic received at a tier is load balanced across different 
tiers within the VPC. For
-example, traffic reached at Web tier is redirected to Application tier. 
External load balancing
-devices are not supported for internal LB. The service is provided by a 
internal LB VM
+service, traffic received at a tier is load balanced across different VMs 
within that tier. For
+example, traffic reached at Web tier is redirected to another VM in that 
tier. External load
+balancing devices are not supported for internal LB. The service is 
provided by a internal LB VM
 configured on the target tier.
   
 Load Balancing Within a Tier (External LB)
 A &PRODUCT; user or administrator may create load balancing rules 
that balance traffic
   received at a public IP to one or more VMs that belong to a network tier 
that provides load
   balancing service in a VPC. A user creates a rule, specifies an 
algorithm, and assigns the
-  rule to a set of VMs within a VPC.
+  rule to a set of VMs within a tier.
 
   
 Log in to the &PRODUCT; UI as an administrator or end 
user.



  1   2   3   4   5   6   7   8   9   10   >