git commit: updated refs/heads/master to 7fb63be
Updated Branches: refs/heads/master c1a85401a -> 7fb63be6e CLOUDSTACK-1993: fixed the issue of not sending syslog messages for alertType 0 Signed-off-by: Anshul Gangwar 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/7fb63be6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7fb63be6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7fb63be6 Branch: refs/heads/master Commit: 7fb63be6e1c2ed2b6d2de02dae3ec0f77f1748f3 Parents: c1a8540 Author: Anshul Gangwar Authored: Wed Apr 10 14:07:42 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Fri Apr 12 07:15:06 2013 +0530 -- .../cloudstack/syslog/AlertsSyslogAppender.java|4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7fb63be6/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java -- diff --git a/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java b/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java index d2f2565..09563da 100644 --- a/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java +++ b/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java @@ -217,7 +217,7 @@ public class AlertsSyslogAppender extends AppenderSkeleton { message.append("unknown" + MESSAGE_DELIMITER_STRING); } -if (alertType > 0) { +if (alertType >= 0) { message.append("alertType").append(_keyValueDelimiter).append(" ").append(alertsMap.get(alertType)) .append(MESSAGE_DELIMITER_STRING); if (dataCenterId != 0) { @@ -333,4 +333,4 @@ public class AlertsSyslogAppender extends AppenderSkeleton { public void setKeyValueDelimiter(String keyValueDelimiter) { this._keyValueDelimiter = keyValueDelimiter; } -} \ No newline at end of file +}
git commit: updated refs/heads/master to 985b2aa
Updated Branches: refs/heads/master b12905b7a -> 985b2aa88 CLOUDSTACK-2046: Primary Storage & Secondary Storage is max limit is set 0 with listResourceLimits API response as ROOT admin 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/985b2aa8 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/985b2aa8 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/985b2aa8 Branch: refs/heads/master Commit: 985b2aa88d4d02db98a2e9be7ac081e4efbff879 Parents: b12905b Author: Sanjay Tripathi Authored: Wed Apr 17 12:03:47 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Thu Apr 18 05:26:00 2013 +0530 -- server/src/com/cloud/api/ApiResponseHelper.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/985b2aa8/server/src/com/cloud/api/ApiResponseHelper.java -- diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index 819c88b..7629e5e 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -379,7 +379,7 @@ public class ApiResponseHelper implements ResponseGenerator { populateDomain(resourceLimitResponse, accountTemp.getDomainId()); } resourceLimitResponse.setResourceType(Integer.valueOf(limit.getType().getOrdinal()).toString()); -if(limit.getType() == ResourceType.primary_storage || limit.getType() == ResourceType.secondary_storage) { +if((limit.getType() == ResourceType.primary_storage || limit.getType() == ResourceType.secondary_storage) && limit.getMax() >= 0) { resourceLimitResponse.setMax((long) Math.ceil(limit.getMax()/ResourceType.bytesToGiB)); } else { resourceLimitResponse.setMax(limit.getMax());
git commit: updated refs/heads/master to ea893ea
Updated Branches: refs/heads/master 21ce3befc -> ea893eaf3 CLOUDSTACK-1786: While reserving IPs in guest network, if guestvmcidr is a subset of network cidr but not a subset of cidr, exception is thrown. 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/ea893eaf Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ea893eaf Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ea893eaf Branch: refs/heads/master Commit: ea893eaf338bfe914e1cb99517a8429128a64152 Parents: 21ce3be Author: Saksham Srivastava Authored: Fri Mar 22 16:37:44 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Fri Apr 19 14:08:37 2013 +0530 -- .../src/com/cloud/network/NetworkServiceImpl.java |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ea893eaf/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 c4effc9..878d2a8 100755 --- a/server/src/com/cloud/network/NetworkServiceImpl.java +++ b/server/src/com/cloud/network/NetworkServiceImpl.java @@ -1868,11 +1868,13 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { // If networkCidr is null it implies that there was no prior IP reservation, so the network cidr is network.getCidr() // But in case networkCidr is a non null value (IP reservation already exists), it implies network cidr is networkCidr -if (networkCidr != null && ! NetUtils.isNetworkAWithinNetworkB(guestVmCidr, networkCidr)) { +if (networkCidr != null) { +if(! NetUtils.isNetworkAWithinNetworkB(guestVmCidr, networkCidr)) { throw new InvalidParameterValueException ("Invalid value of Guest VM CIDR. For IP Reservation, Guest VM CIDR should be a subset of network CIDR : " + networkCidr); +} } else { if (! NetUtils.isNetworkAWithinNetworkB(guestVmCidr, network.getCidr())) { - throw new InvalidParameterValueException ("Invalid value of Guest VM CIDR. For IP Reservation, Guest VM CIDR should be a subset of network CIDR : " + network.getCidr()); +throw new InvalidParameterValueException ("Invalid value of Guest VM CIDR. For IP Reservation, Guest VM CIDR should be a subset of network CIDR : " + network.getCidr()); } }
Git Push Summary
Updated Branches: refs/heads/vmware-datamodel [created] 33006ff19
git commit: updated refs/heads/vmware-storage-motion to 73f6edd
Updated Branches: refs/heads/vmware-storage-motion 20541641f -> 73f6edd47 CLOUDSTACK-659 Support for storage migration in Cloudstack deployment over VMware Added VmwareStorageMotionStrategy to deal with storage motion tasks. Added target host parameter to MigrateWithStorageCommand. 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/73f6edd4 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/73f6edd4 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/73f6edd4 Branch: refs/heads/vmware-storage-motion Commit: 73f6edd47b341ec6b1ec38fb816b9585cc97d7f1 Parents: 2054164 Author: Sateesh Chodapuneedi Authored: Sat May 18 00:32:07 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Sat May 18 00:38:20 2013 +0530 -- .../cloud/agent/api/MigrateWithStorageCommand.java | 12 + .../motion/VmwareStorageMotionStrategy.java| 212 +++ 2 files changed, 224 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/73f6edd4/core/src/com/cloud/agent/api/MigrateWithStorageCommand.java -- diff --git a/core/src/com/cloud/agent/api/MigrateWithStorageCommand.java b/core/src/com/cloud/agent/api/MigrateWithStorageCommand.java index 058aa15..a108a2a 100644 --- a/core/src/com/cloud/agent/api/MigrateWithStorageCommand.java +++ b/core/src/com/cloud/agent/api/MigrateWithStorageCommand.java @@ -24,10 +24,18 @@ import com.cloud.agent.api.to.StorageFilerTO; public class MigrateWithStorageCommand extends Command { VirtualMachineTO vm; Map volumeToFiler; +String tgtHost; public MigrateWithStorageCommand(VirtualMachineTO vm, Map volumeToFiler) { this.vm = vm; this.volumeToFiler = volumeToFiler; +this.tgtHost = null; +} + +public MigrateWithStorageCommand(VirtualMachineTO vm, Map volumeToFiler, String tgtHost) { +this.vm = vm; +this.volumeToFiler = volumeToFiler; +this.tgtHost = tgtHost; } public VirtualMachineTO getVirtualMachine() { @@ -38,6 +46,10 @@ public class MigrateWithStorageCommand extends Command { return volumeToFiler; } +public String getTargetHost() { +return tgtHost; +} + @Override public boolean executeInSequence() { return true; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/73f6edd4/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java -- diff --git a/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java b/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java new file mode 100644 index 000..1678a04 --- /dev/null +++ b/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java @@ -0,0 +1,212 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.cloudstack.storage.motion; + +import java.util.HashMap; +import java.util.Map; +import java.util.List; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.agent.AgentManager; +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.MigrateWithStorageAnswer; +import com.cloud.agent.api.Mi
git commit: updated refs/heads/vmware-storage-motion to 6bd6cef
Updated Branches: refs/heads/vmware-storage-motion 73f6edd47 -> 6bd6cefd8 CLOUDSTACK-659 Support for storage migration in Cloudstack deployment over VMware Added Resource changes to perform VM live migration along with virtual disks across the clusters in a zone. 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/6bd6cefd Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6bd6cefd Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6bd6cefd Branch: refs/heads/vmware-storage-motion Commit: 6bd6cefd89b6995f339abd58416894f618c5d476 Parents: 73f6edd Author: Sateesh Chodapuneedi Authored: Sat May 18 00:40:52 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Sat May 18 00:40:52 2013 +0530 -- .../hypervisor/vmware/resource/VmwareResource.java | 206 ++- .../hypervisor/vmware/mo/HypervisorHostHelper.java |1 + .../hypervisor/vmware/mo/VirtualDiskManagerMO.java |4 + .../hypervisor/vmware/mo/VirtualMachineMO.java | 26 ++ 4 files changed, 236 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6bd6cefd/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 37ddaa1..a653281 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 @@ -47,6 +47,8 @@ import com.cloud.agent.api.CreateVolumeFromSnapshotCommand; import com.cloud.agent.api.DeleteStoragePoolCommand; import com.cloud.agent.api.DeleteVMSnapshotAnswer; import com.cloud.agent.api.DeleteVMSnapshotCommand; +import com.cloud.agent.api.MigrateWithStorageAnswer; +import com.cloud.agent.api.MigrateWithStorageCommand; import com.cloud.agent.api.UnregisterVMCommand; import com.cloud.agent.api.GetDomRVersionAnswer; import com.cloud.agent.api.GetDomRVersionCmd; @@ -137,6 +139,7 @@ import com.cloud.agent.api.storage.CopyVolumeAnswer; import com.cloud.agent.api.storage.CopyVolumeCommand; import com.cloud.agent.api.storage.CreateVolumeOVACommand; import com.cloud.agent.api.storage.CreateVolumeOVAAnswer; +import com.cloud.agent.api.storage.MigrateVolumeCommand; import com.cloud.agent.api.storage.PrepareOVAPackingAnswer; import com.cloud.agent.api.storage.PrepareOVAPackingCommand; import com.cloud.agent.api.storage.CreateAnswer; @@ -158,6 +161,7 @@ import com.cloud.agent.api.to.VolumeTO; import com.cloud.dc.DataCenter.NetworkType; import com.cloud.dc.Vlan; import com.cloud.exception.InternalErrorException; +import com.cloud.host.Host; import com.cloud.host.Host.Type; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.hypervisor.vmware.manager.VmwareHostService; @@ -168,10 +172,12 @@ import com.cloud.hypervisor.vmware.mo.CustomFieldsManagerMO; import com.cloud.hypervisor.vmware.mo.DatacenterMO; import com.cloud.hypervisor.vmware.mo.DatastoreMO; import com.cloud.hypervisor.vmware.mo.DiskControllerType; +import com.cloud.hypervisor.vmware.mo.HostDatastoreSystemMO; import com.cloud.hypervisor.vmware.mo.HostFirewallSystemMO; import com.cloud.hypervisor.vmware.mo.HostMO; import com.cloud.hypervisor.vmware.mo.HypervisorHostHelper; import com.cloud.hypervisor.vmware.mo.NetworkDetails; +import com.cloud.hypervisor.vmware.mo.VirtualDiskManagerMO; import com.cloud.hypervisor.vmware.mo.VirtualEthernetCardType; import com.cloud.hypervisor.vmware.mo.VirtualMachineMO; import com.cloud.hypervisor.vmware.mo.VirtualSwitchType; @@ -192,6 +198,7 @@ import com.cloud.network.rules.FirewallRule; import com.cloud.resource.ServerResource; import com.cloud.serializer.GsonHelper; import com.cloud.storage.Storage; +import com.cloud.storage.StoragePool; import com.cloud.storage.Storage.StoragePoolType; import com.cloud.storage.Volume; import com.cloud.storage.resource.StoragePoolResource; @@ -223,6 +230,7 @@ import com.vmware.vim25.HostFirewallInfo; import com.vmware.vim25.HostFirewallRuleset; import com.vmware.vim25.HostNetworkTrafficShapingPolicy; import com.vmware.vim25.HostPortGroupSpec; +import com.vmware.vim25.ManagedObjectNotFound; import com.vmware.vim25.ManagedObjectReference; import com.vmware.vim25.ObjectContent; import com.vmware.vim25.OptionValue; @@ -238,9 +246,13 @@ import com.vmware.vim25.RuntimeFaultFaultMsg; import com.vmware.vim25.ToolsUnavailableFaultMsg; import com.vmware.vim25.VimPortType; import com.vmware.vim25.VirtualDevice; +imp
git commit: updated refs/heads/vmware-storage-motion to 5b63a0f
Updated Branches: refs/heads/vmware-storage-motion 6bd6cefd8 -> 5b63a0f78 CLOUDSTACK-659 Support for storage migration in Cloudstack deployment over VMware Added VmwareStorageMotionStrategy to application context. 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/5b63a0f7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5b63a0f7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5b63a0f7 Branch: refs/heads/vmware-storage-motion Commit: 5b63a0f78f1f73d19657ae9f555eafe894c24ff3 Parents: 6bd6cef Author: Sateesh Chodapuneedi Authored: Sat May 18 00:41:35 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Sat May 18 00:42:37 2013 +0530 -- client/tomcatconf/applicationContext.xml.in |1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5b63a0f7/client/tomcatconf/applicationContext.xml.in -- diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in index 6406660..db110af 100644 --- a/client/tomcatconf/applicationContext.xml.in +++ b/client/tomcatconf/applicationContext.xml.in @@ -728,6 +728,7 @@ +
[04/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2456 usage:usage parser throws runtime exception while parsing networkoffering usage Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e7fef86c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e7fef86c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e7fef86c Branch: refs/heads/vmware-datamodel Commit: e7fef86c8086a3bad3a5f3aacaa39dd5ddef3ab4 Parents: e260817 Author: Mice Xia Authored: Thu May 16 15:19:05 2013 +0800 Committer: Mice Xia Committed: Thu May 16 15:19:05 2013 +0800 -- .../usage/dao/UsageNetworkOfferingDaoImpl.java |8 1 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e7fef86c/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java -- diff --git a/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java index c3fc5a6..4ed7c27 100644 --- a/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java +++ b/engine/schema/src/com/cloud/usage/dao/UsageNetworkOfferingDaoImpl.java @@ -118,18 +118,18 @@ public class UsageNetworkOfferingDaoImpl extends GenericDaoBase
[03/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2130: UpdateDefaultNicForVirtualMachine api should also create usage events for updating new default network Signed-off-by: Mice Xia Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e2608173 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e2608173 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e2608173 Branch: refs/heads/vmware-datamodel Commit: e26081731898e2b3de53fdfb9f58d6fdb017f09f Parents: a37fa39 Author: Saksham Srivastava Authored: Tue May 14 10:39:20 2013 +0530 Committer: Mice Xia Committed: Thu May 16 14:22:36 2013 +0800 -- server/src/com/cloud/vm/UserVmManagerImpl.java | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e2608173/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 8b1a9af..f2c44a4 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -1024,6 +1024,13 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use throw new CloudRuntimeException("Failed to find a nic profile for the existing default network. This is bad and probably means some sort of configuration corruption"); } +Network oldDefaultNetwork = null; +oldDefaultNetwork = _networkModel.getDefaultNetworkForVm(vmId); +long oldNetworkOfferingId = -1L; + +if(oldDefaultNetwork!=null) { +oldNetworkOfferingId = oldDefaultNetwork.getNetworkOfferingId(); +} NicVO existingVO = _nicDao.findById(existing.id); Integer chosenID = nic.getDeviceId(); Integer existingID = existing.getDeviceId(); @@ -1055,6 +1062,16 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use throw new CloudRuntimeException("Failed to change default nic to " + nic + " and now we have no default"); } else if (newdefault.getId() == nic.getNetworkId()) { s_logger.debug("successfully set default network to " + network + " for " + vmInstance); +String nicIdString = Long.toString(nic.getId()); +long newNetworkOfferingId = network.getNetworkOfferingId(); + UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NETWORK_OFFERING_REMOVE, vmInstance.getAccountId(), vmInstance.getDataCenterId(), +vmInstance.getId(), nicIdString, oldNetworkOfferingId, null, 1L, VirtualMachine.class.getName(), vmInstance.getUuid()); + UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NETWORK_OFFERING_ASSIGN, vmInstance.getAccountId(), vmInstance.getDataCenterId(), + vmInstance.getId(), nicIdString, newNetworkOfferingId, null, 1L, VirtualMachine.class.getName(), vmInstance.getUuid()); + UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NETWORK_OFFERING_REMOVE, vmInstance.getAccountId(), vmInstance.getDataCenterId(), +vmInstance.getId(), nicIdString, newNetworkOfferingId, null, 0L, VirtualMachine.class.getName(), vmInstance.getUuid()); + UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NETWORK_OFFERING_ASSIGN, vmInstance.getAccountId(), vmInstance.getDataCenterId(), + vmInstance.getId(), nicIdString, oldNetworkOfferingId, null, 0L, VirtualMachine.class.getName(), vmInstance.getUuid()); return _vmDao.findById(vmInstance.getId()); }
[07/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
$PRODUCT; should be &PRODUCT; to represent entity CloudStack Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b4903ebb Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b4903ebb Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b4903ebb Branch: refs/heads/vmware-datamodel Commit: b4903ebbead34d02ba9ee445522473467d295519 Parents: e26442f Author: Gavin Lee Authored: Thu May 16 16:19:11 2013 +0800 Committer: Gavin Lee Committed: Thu May 16 16:19:11 2013 +0800 -- docs/en-US/build-rpm.xml|8 docs/en-US/deployment-architecture-overview.xml |2 +- 2 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b4903ebb/docs/en-US/build-rpm.xml -- diff --git a/docs/en-US/build-rpm.xml b/docs/en-US/build-rpm.xml index 5740658..7caf924 100644 --- a/docs/en-US/build-rpm.xml +++ b/docs/en-US/build-rpm.xml @@ -41,9 +41,9 @@ under the License. You probably want to ensure that your environment variables will survive a logout/reboot. Be sure to update ~/.bashrc with the PATH and JAVA_HOME variables. -Building RPMs for $PRODUCT; is fairly simple. Assuming you already have the source downloaded and have uncompressed the tarball into a local directory, you're going to be able to generate packages in just a few minutes. +Building RPMs for &PRODUCT; is fairly simple. Assuming you already have the source downloaded and have uncompressed the tarball into a local directory, you're going to be able to generate packages in just a few minutes. Packaging has Changed -If you've created packages for $PRODUCT; previously, you should be aware that the process has changed considerably since the project has moved to using Apache Maven. Please be sure to follow the steps in this section closely. +If you've created packages for &PRODUCT; previously, you should be aware that the process has changed considerably since the project has moved to using Apache Maven. Please be sure to follow the steps in this section closely. Generating RPMS @@ -69,7 +69,7 @@ under the License. Configuring your systems to use your new yum repository Now that your yum repository is populated with RPMs and metadata -we need to configure the machines that need to install $PRODUCT;. +we need to configure the machines that need to install &PRODUCT;. Create a file named /etc/yum.repos.d/cloudstack.repo with this information: [apache-cloudstack] @@ -79,7 +79,7 @@ under the License. gpgcheck=0 - Completing this step will allow you to easily install $PRODUCT; on a number of machines across the network. + Completing this step will allow you to easily install &PRODUCT; on a number of machines across the network. http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b4903ebb/docs/en-US/deployment-architecture-overview.xml -- diff --git a/docs/en-US/deployment-architecture-overview.xml b/docs/en-US/deployment-architecture-overview.xml index e3103c5..835898c 100644 --- a/docs/en-US/deployment-architecture-overview.xml +++ b/docs/en-US/deployment-architecture-overview.xml @@ -49,7 +49,7 @@ multi-node Management Server installation and up to tens of thousands of hosts using any of several advanced networking setups. For information about deployment options, see the "Choosing a Deployment Architecture" - section of the $PRODUCT; Installation Guide. + section of the &PRODUCT; Installation Guide. http://www.w3.org/2001/XInclude"; /> http://www.w3.org/2001/XInclude"; />
[09/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2461: createGSLBRule API is failing to pick the default algorithm "round robin" for parameter "gslblbmethod" fix defaults to round robin when parameter not specified Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3c51c4e7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3c51c4e7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3c51c4e7 Branch: refs/heads/vmware-datamodel Commit: 3c51c4e7adb717b5cee3bd01be716d75e288aa0c Parents: 6ae6c2b Author: Murali Reddy Authored: Thu May 16 12:26:23 2013 +0530 Committer: Murali Reddy Committed: Thu May 16 15:19:40 2013 +0530 -- .../ha/gslb/CreateGlobalLoadBalancerRuleCmd.java |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3c51c4e7/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java -- diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java index b08b6ae..07d3274 100644 --- a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java @@ -85,7 +85,11 @@ public class CreateGlobalLoadBalancerRuleCmd extends BaseAsyncCreateCmd { } public String getAlgorithm() { -return algorithm; +if (algorithm != null) { +return algorithm; +} else { +return GlobalLoadBalancerRule.Algorithm.RoundRobin.name(); +} } public String getGslbMethod() {
[08/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
A space char needed after &PRODUCT; entity representation Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6ae6c2b8 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6ae6c2b8 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6ae6c2b8 Branch: refs/heads/vmware-datamodel Commit: 6ae6c2b8b603fc8d44d6bec57caf765d843ca27d Parents: b4903eb Author: Gavin Lee Authored: Thu May 16 17:19:22 2013 +0800 Committer: Gavin Lee Committed: Thu May 16 17:19:22 2013 +0800 -- docs/en-US/event-framework.xml|2 +- docs/en-US/gslb.xml |2 +- docs/en-US/ipv6-support.xml |2 +- docs/en-US/vmware-cluster-config-dvswitch.xml |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ae6c2b8/docs/en-US/event-framework.xml -- diff --git a/docs/en-US/event-framework.xml b/docs/en-US/event-framework.xml index 88c45c9..0f62fac 100644 --- a/docs/en-US/event-framework.xml +++ b/docs/en-US/event-framework.xml @@ -24,7 +24,7 @@ Event notification framework provides a means for the Management Server components to publish and subscribe to &PRODUCT; events. Event notification is achieved by implementing the concept of event bus abstraction in the Management Server. An event bus is introduced in the -Management Server that allows the &PRODUCT;components and extension plug-ins to subscribe to the +Management Server that allows the &PRODUCT; components and extension plug-ins to subscribe to the events by using the Advanced Message Queuing Protocol (AMQP) client. In &PRODUCT;, a default implementation of event bus is provided as a plug-in that uses the RabbitMQ AMQP client. The AMQP client pushes the published events to a compatible AMQP server. Therefore all the &PRODUCT; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ae6c2b8/docs/en-US/gslb.xml -- diff --git a/docs/en-US/gslb.xml b/docs/en-US/gslb.xml index d5d2d20..968e8e2 100644 --- a/docs/en-US/gslb.xml +++ b/docs/en-US/gslb.xml @@ -45,7 +45,7 @@ A typical GSLB environment is comprised of the following components: - GSLB Site: In &PRODUCT;terminology, GSLB sites are + GSLB Site: In &PRODUCT; terminology, GSLB sites are represented by zones that are mapped to data centers, each of which has various network appliances. Each GSLB site is managed by a NetScaler appliance that is local to that site. Each of these appliances treats its own site as the local site and all other http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ae6c2b8/docs/en-US/ipv6-support.xml -- diff --git a/docs/en-US/ipv6-support.xml b/docs/en-US/ipv6-support.xml index c7f7744..bc14c8e 100644 --- a/docs/en-US/ipv6-support.xml +++ b/docs/en-US/ipv6-support.xml @@ -21,7 +21,7 @@ --> IPv6 Support in &PRODUCT; - &PRODUCT;supports Internet Protocol version 6 (IPv6), the recent version of the Internet + &PRODUCT; supports Internet Protocol version 6 (IPv6), the recent version of the Internet Protocol (IP) that defines routing the network traffic. IPv6 uses a 128-bit address that exponentially expands the current address space that is available to the users. IPv6 addresses consist of eight groups of four hexadecimal digits separated by colons, for example, http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ae6c2b8/docs/en-US/vmware-cluster-config-dvswitch.xml -- diff --git a/docs/en-US/vmware-cluster-config-dvswitch.xml b/docs/en-US/vmware-cluster-config-dvswitch.xml index 3468c1b..a3250f4 100644 --- a/docs/en-US/vmware-cluster-config-dvswitch.xml +++ b/docs/en-US/vmware-cluster-config-dvswitch.xml @@ -21,7 +21,7 @@ --> Configuring a vSphere Cluster with VMware Distributed Virtual Switch - &PRODUCT;supports VMware vNetwork Distributed Switch (VDS) for virtual network configuration + &PRODUCT; supports VMware vNetwork Distributed Switch (VDS) for virtual network configuration in a VMware vSphere environment. This section helps you configure VMware VDS in a &PRODUCT; deployment. Each vCenter server instance can support up to 128 VDS instances and each VDS instance can manage up to 500 VMware hosts.
[02/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
multiple fixes to regression tests - remove references to account.account - remove ostypeid references - correct zone.networktype - correct storage_motion assert. skip on invalid environmetn 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/a37fa39f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a37fa39f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a37fa39f Branch: refs/heads/vmware-datamodel Commit: a37fa39fe75925716c2b9998d40d4e95e78bbcdd Parents: 5511eb2 Author: Prasanna Santhanam Authored: Wed May 15 16:45:56 2013 +0530 Committer: Prasanna Santhanam Committed: Thu May 16 10:00:44 2013 +0530 -- test/integration/component/test_accounts.py| 71 test/integration/component/test_resource_limits.py | 154 +++--- test/integration/component/test_storage_motion.py |6 + .../integration/component/test_vm_passwdenabled.py |2 +- 4 files changed, 119 insertions(+), 114 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a37fa39f/test/integration/component/test_accounts.py -- diff --git a/test/integration/component/test_accounts.py b/test/integration/component/test_accounts.py index 9cbefe5..b2038a9 100644 --- a/test/integration/component/test_accounts.py +++ b/test/integration/component/test_accounts.py @@ -78,7 +78,6 @@ class Services: "template": { "displaytext": "Public Template", "name": "Public template", -"ostypeid": 'bc66ada0-99e7-483b-befc-8fb0c2129b70', "url": "http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2";, "hypervisor": 'XenServer', "format": 'VHD', @@ -243,7 +242,7 @@ class TestRemoveUserFromAccount(cloudstackTestCase): cls.template = get_template( cls.api_client, cls.zone.id, -cls.services["ostypeid"] +cls.services["ostype"] ) cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.services["virtual_machine"]["template"] = cls.template.id @@ -568,7 +567,7 @@ class TestNonRootAdminsPrivileges(cloudstackTestCase): self.apiclient, self.services["account"] ) -self.debug("Created account: %s" % account_2.account.name) +self.debug("Created account: %s" % account_2.name) self.cleanup.append(account_2) accounts_response = list_accounts( @@ -886,7 +885,7 @@ class TesttemplateHierarchy(cloudstackTestCase): cls.template = Template.register( cls.api_client, cls.services["template"], -account=cls.account_1.account.name, +account=cls.account_1.name, domainid=cls.domain_1.id ) cls._cleanup = [ @@ -935,7 +934,7 @@ class TesttemplateHierarchy(cloudstackTestCase): templates = list_templates( self.apiclient, templatefilter='self', -account=self.account_1.account.name, +account=self.account_1.name, domainid=self.domain_1.id ) self.assertEqual( @@ -960,7 +959,7 @@ class TesttemplateHierarchy(cloudstackTestCase): templates = list_templates( self.apiclient, templatefilter='self', -account=self.account_2.account.name, +account=self.account_2.name, domainid=self.domain_2.id ) self.assertEqual( @@ -1033,15 +1032,15 @@ class TestAddVmToSubDomain(cloudstackTestCase): cls.template = get_template( cls.api_client, cls.zone.id, -cls.services["ostypeid"] +cls.services["ostype"] ) cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.vm_1 = VirtualMachine.create(
[15/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2545: Change unit of network statistics from 1000 to 1024 for KVM Signed-off-by: Chip Childers Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a29e3936 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a29e3936 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a29e3936 Branch: refs/heads/vmware-datamodel Commit: a29e39365aab0ff4024ff5ff4b04fccb7abc2885 Parents: d078f92 Author: Wei Zhou Authored: Thu May 16 22:07:03 2013 +0100 Committer: Chip Childers Committed: Thu May 16 22:07:50 2013 +0100 -- .../kvm/resource/LibvirtComputingResource.java |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a29e3936/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 f3ae333..c3140d3 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 @@ -2842,7 +2842,7 @@ ServerResource { Pair nicStats = getNicStats(_publicBridgeName); HostStatsEntry hostStats = new HostStatsEntry(cmd.getHostId(), cpuUtil, -nicStats.first() / 1000, nicStats.second() / 1000, "host", +nicStats.first() / 1024, nicStats.second() / 1024, "host", totMem, freeMem, 0, 0); return new GetHostStatsAnswer(cmd, hostStats); } @@ -4561,10 +4561,10 @@ ServerResource { if (oldStats != null) { long deltarx = rx - oldStats._rx; if (deltarx > 0) -stats.setNetworkReadKBs(deltarx / 1000); +stats.setNetworkReadKBs(deltarx / 1024); long deltatx = tx - oldStats._tx; if (deltatx > 0) -stats.setNetworkWriteKBs(deltatx / 1000); +stats.setNetworkWriteKBs(deltatx / 1024); } vmStats newStat = new vmStats();
[05/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
instead of using '==', use equals() to test Long value equality Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6d573936 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6d573936 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6d573936 Branch: refs/heads/vmware-datamodel Commit: 6d57393629bb93fbf0944e462c841f245b40f919 Parents: e7fef86 Author: Mice Xia Authored: Thu May 16 16:00:02 2013 +0800 Committer: Mice Xia Committed: Thu May 16 16:00:02 2013 +0800 -- server/src/com/cloud/api/ApiDispatcher.java|2 +- .../src/com/cloud/api/query/QueryManagerImpl.java |2 +- .../com/cloud/capacity/CapacityManagerImpl.java|2 +- .../AgentBasedStandaloneConsoleProxyManager.java |2 +- .../src/com/cloud/network/NetworkServiceImpl.java |2 +- .../cloud/network/vpc/NetworkACLServiceImpl.java |4 ++-- .../src/com/cloud/server/ManagementServerImpl.java |6 +++--- .../com/cloud/template/TemplateManagerImpl.java|6 +++--- server/src/com/cloud/vm/UserVmManagerImpl.java |2 +- .../com/cloud/vm/VirtualMachineManagerImpl.java|2 +- 10 files changed, 15 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6d573936/server/src/com/cloud/api/ApiDispatcher.java -- diff --git a/server/src/com/cloud/api/ApiDispatcher.java b/server/src/com/cloud/api/ApiDispatcher.java index b4437ce..b7d08e2 100755 --- a/server/src/com/cloud/api/ApiDispatcher.java +++ b/server/src/com/cloud/api/ApiDispatcher.java @@ -168,7 +168,7 @@ public class ApiDispatcher { pageSize = Long.valueOf((String) pageSizeObj); } -if ((unpackedParams.get(ApiConstants.PAGE) == null) && (pageSize != null && pageSize != BaseListCmd.PAGESIZE_UNLIMITED)) { +if ((unpackedParams.get(ApiConstants.PAGE) == null) && (pageSize != null && !pageSize.equals(BaseListCmd.PAGESIZE_UNLIMITED))) { ServerApiException ex = new ServerApiException(ApiErrorCode.PARAM_ERROR, "\"page\" parameter is required when \"pagesize\" is specified"); ex.setCSErrorCode(CSExceptionErrorCode.getCSErrCode(ex.getClass().getName())); throw ex; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6d573936/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 9872c3a..a126925 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -2346,7 +2346,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { // offerings private boolean isPermissible(Long accountDomainId, Long offeringDomainId) { -if (accountDomainId == offeringDomainId) { +if (accountDomainId.equals(offeringDomainId)) { return true; // account and service offering in same domain } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6d573936/server/src/com/cloud/capacity/CapacityManagerImpl.java -- diff --git a/server/src/com/cloud/capacity/CapacityManagerImpl.java b/server/src/com/cloud/capacity/CapacityManagerImpl.java index 1eb2fa5..e7101c6 100755 --- a/server/src/com/cloud/capacity/CapacityManagerImpl.java +++ b/server/src/com/cloud/capacity/CapacityManagerImpl.java @@ -681,7 +681,7 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager, if ((newState == State.Starting || newState == State.Migrating || event == Event.AgentReportMigrated) && vm.getHostId() != null) { boolean fromLastHost = false; -if (vm.getLastHostId() == vm.getHostId()) { +if (vm.getLastHostId().equals(vm.getHostId())) { s_logger.debug("VM starting again on the last host it was stopped on"); fromLastHost = true; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6d573936/server/src/com/cloud/consoleproxy/AgentBasedStandaloneConsoleProxyManager.java -- diff --git a/server/src/com/cloud/consoleproxy/AgentBasedStandaloneConsoleProxyManager.java b/server/src/com/cloud/consoleproxy/AgentBasedStandaloneConsoleProxyManager.java index 3cfdf22..2366333 100644 --- a/server/src/com/cloud/consoleproxy/AgentBasedStandaloneConsoleProxyManager.java +++ b/server/src/com/cloud/consoleproxy/AgentBasedStandaloneConsoleProxyManager.java @@ -57,7 +57,7 @@ AgentBasedC
[13/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2378: assignToGSLBRule or removeFromGlobalLoadBalancerRule APIs are failing when there are multiple physical network in a zone adding support for deployments where multiple physical networks are configured for guest traffic in a zone Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f441582e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f441582e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f441582e Branch: refs/heads/vmware-datamodel Commit: f441582e1b7747bba1385ecb48a7b7b34a9dded1 Parents: 33e6839 Author: Murali Reddy Authored: Thu May 16 18:26:14 2013 +0530 Committer: Murali Reddy Committed: Thu May 16 18:26:14 2013 +0530 -- .../cloud/network/element/NetscalerElement.java| 39 +-- .../gslb/GlobalLoadBalancingRulesServiceImpl.java | 37 -- .../region/gslb/GslbServiceProvider.java |8 ++-- .../GlobalLoadBalancingRulesServiceImplTest.java |3 + 4 files changed, 52 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f441582e/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java -- diff --git a/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java index cc2bcc1..850962d 100644 --- a/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java +++ b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java @@ -923,13 +923,13 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl } @Override -public boolean applyGlobalLoadBalancerRule(long zoneId, GlobalLoadBalancerConfigCommand gslbConfigCmd) +public boolean applyGlobalLoadBalancerRule(long zoneId, long physicalNetworkId, GlobalLoadBalancerConfigCommand gslbConfigCmd) throws ResourceUnavailableException { long zoneGslbProviderHosId = 0; // find the NetScaler device configured as gslb service provider in the zone -ExternalLoadBalancerDeviceVO nsGslbProvider = findGslbProvider(zoneId); +ExternalLoadBalancerDeviceVO nsGslbProvider = findGslbProvider(zoneId, physicalNetworkId); if (nsGslbProvider == null) { String msg = "Unable to find a NetScaler configured as gslb service provider in zone " + zoneId; s_logger.debug(msg); @@ -950,28 +950,37 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl return true; } -private ExternalLoadBalancerDeviceVO findGslbProvider(long zoneId) { +private ExternalLoadBalancerDeviceVO findGslbProvider(long zoneId, long physicalNetworkId) { List pNtwks = _physicalNetworkDao.listByZoneAndTrafficType(zoneId, TrafficType.Guest); -if (pNtwks.isEmpty() || pNtwks.size() > 1) { -throw new InvalidParameterValueException("Unable to get physical network in zone id = " + zoneId); + +if (pNtwks == null || pNtwks.isEmpty()) { +throw new InvalidParameterValueException("Unable to get physical network: " + physicalNetworkId + +" in zone id = " + zoneId); +} else { +for (PhysicalNetwork physicalNetwork : pNtwks) { +if (physicalNetwork.getId() == physicalNetworkId) { +PhysicalNetworkVO physNetwork = pNtwks.get(0); +ExternalLoadBalancerDeviceVO nsGslbProvider = _externalLoadBalancerDeviceDao.findGslbServiceProvider( +physNetwork.getId(), Provider.Netscaler.getName()); +return nsGslbProvider; +} +} } -PhysicalNetworkVO physNetwork = pNtwks.get(0); -ExternalLoadBalancerDeviceVO nsGslbProvider = _externalLoadBalancerDeviceDao.findGslbServiceProvider( -physNetwork.getId(), Provider.Netscaler.getName()); -return nsGslbProvider; + +return null; } @Override -public boolean isServiceEnabledInZone(long zoneId) { +public boolean isServiceEnabledInZone(long zoneId, long physicalNetworkId) { -ExternalLoadBalancerDeviceVO nsGslbProvider = findGslbProvider(zoneId); +ExternalLoadBalancerDeviceVO nsGslbProvider = findGslbProvider(zoneId, physicalNetworkId); //return true if a NetScaler device is configured in the zone return (nsGslbProvider != null); } @Override -public String getZoneGslbProviderPublicIp(long zoneId) { -ExternalLoadBalancerDeviceVO nsGslbProvider = findGslbProvider(zoneI
[28/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2552. Modify AWSAPI to decrypt db values using the decrypted database_key and not management_server_key Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/046580fc Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/046580fc Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/046580fc Branch: refs/heads/vmware-datamodel Commit: 046580fcf117aadf77179011ecfb5dfffdcca65f Parents: adbebc1 Author: Likitha Shetty Authored: Fri May 17 13:12:36 2013 +0530 Committer: Likitha Shetty Committed: Fri May 17 13:16:04 2013 +0530 -- .../bridge/persist/dao/CloudStackUserDaoImpl.java | 12 +++- 1 files changed, 3 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/046580fc/awsapi/src/com/cloud/bridge/persist/dao/CloudStackUserDaoImpl.java -- diff --git a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackUserDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackUserDaoImpl.java index f108a20..5aac396 100644 --- a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackUserDaoImpl.java +++ b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackUserDaoImpl.java @@ -19,15 +19,14 @@ package com.cloud.bridge.persist.dao; import javax.ejb.Local; import org.apache.log4j.Logger; -import org.jasypt.encryption.pbe.StandardPBEStringEncryptor; import org.springframework.stereotype.Component; import com.cloud.bridge.model.CloudStackUserVO; -import com.cloud.bridge.util.EncryptionSecretKeyCheckerUtil; import com.cloud.utils.db.GenericDaoBase; import com.cloud.utils.db.SearchBuilder; import com.cloud.utils.db.SearchCriteria; import com.cloud.utils.db.Transaction; +import com.cloud.utils.crypt.DBEncryptionUtil; @Component @Local(value={CloudStackUserDao.class}) @@ -51,13 +50,8 @@ public class CloudStackUserDaoImpl extends GenericDaoBase
[06/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
instead of '==', use equals() to compare two strings in cloud-server Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e26442f7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e26442f7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e26442f7 Branch: refs/heads/vmware-datamodel Commit: e26442f7d0abd9cf7cfefc85585fdd669af395a6 Parents: 6d57393 Author: Mice Xia Authored: Thu May 16 16:18:53 2013 +0800 Committer: Mice Xia Committed: Thu May 16 16:18:53 2013 +0800 -- .../configuration/ConfigurationManagerImpl.java|2 +- server/src/com/cloud/test/DatabaseConfig.java |4 ++-- server/src/com/cloud/vm/UserVmManagerImpl.java |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e26442f7/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 96145a2..8878782 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -2491,7 +2491,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati if ( vlans != null && vlans.size() > 0 ) { if ( vlanId == null ) { vlanId = vlan.getVlanTag(); -} else if ( vlan.getVlanTag() != vlanId ) { +} else if (!vlan.getVlanTag().equals(vlanId)) { throw new InvalidParameterValueException("there is already one vlan " + vlan.getVlanTag() + " on network :" + + network.getId() + ", only one vlan is allowed on guest network"); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e26442f7/server/src/com/cloud/test/DatabaseConfig.java -- diff --git a/server/src/com/cloud/test/DatabaseConfig.java b/server/src/com/cloud/test/DatabaseConfig.java index 7c10f98..70c8178 100755 --- a/server/src/com/cloud/test/DatabaseConfig.java +++ b/server/src/com/cloud/test/DatabaseConfig.java @@ -792,14 +792,14 @@ public class DatabaseConfig { } // If a netmask was provided, check that the startIP, endIP, and gateway all belong to the same subnet -if (netmask != null && netmask != "") { +if (netmask != null && !netmask.equals("")) { if (endIP != null) { if (!IPRangeConfig.sameSubnet(startIP, endIP, netmask)) { printError("Start and end IPs for the public IP range must be in the same subnet, as per the provided netmask."); } } -if (gateway != null && gateway != "") { +if (gateway != null && !gateway.equals("")) { if (!IPRangeConfig.sameSubnet(startIP, gateway, netmask)) { printError("The start IP for the public IP range must be in the same subnet as the gateway, as per the provided netmask."); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e26442f7/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 fe80d2c..7416cae 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -1673,7 +1673,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use String description = ""; -if (displayName != vmInstance.getDisplayName()) { +if (!displayName.equals(vmInstance.getDisplayName())) { description += "New display name: " + displayName + ". "; }
[26/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
Dedicate Public IP range - If every public ip range in the system is dedicated when an account with no dedicate ranges acquires a new public ip the request should fail Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/caf0dd22 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/caf0dd22 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/caf0dd22 Branch: refs/heads/vmware-datamodel Commit: caf0dd22b7de584f87427d0f3039ce391f2d406b Parents: 973c43a Author: Likitha Shetty Authored: Thu May 16 14:04:20 2013 +0530 Committer: Likitha Shetty Committed: Fri May 17 09:51:10 2013 +0530 -- .../src/com/cloud/network/NetworkManagerImpl.java | 114 --- 1 files changed, 58 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/caf0dd22/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 c58ef22..40fc3d3 100755 --- a/server/src/com/cloud/network/NetworkManagerImpl.java +++ b/server/src/com/cloud/network/NetworkManagerImpl.java @@ -284,6 +284,10 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L Long guestNetworkId, boolean sourceNat, boolean assign, String requestedIp, boolean isSystem, Long vpcId) throws InsufficientAddressCapacityException { StringBuilder errorMessage = new StringBuilder("Unable to get ip adress in "); +boolean fetchFromDedicatedRange = false; +List dedicatedVlanDbIds = new ArrayList(); +List nonDedicatedVlanDbIds = new ArrayList(); + Transaction txn = Transaction.currentTxn(); txn.start(); SearchCriteria sc = null; @@ -296,9 +300,37 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L errorMessage.append(" zone id=" + dcId); } -if ( vlanDbIds != null && !vlanDbIds.isEmpty() ) { -sc.setParameters("vlanId", vlanDbIds.toArray()); -errorMessage.append(", vlanId id=" + vlanDbIds.toArray()); +// If owner has dedicated Public IP ranges, fetch IP from the dedicated range +// Otherwise fetch IP from the system pool +List maps = _accountVlanMapDao.listAccountVlanMapsByAccount(owner.getId()); +for (AccountVlanMapVO map : maps) { +if (vlanDbIds == null || vlanDbIds.contains(map.getVlanDbId())) +dedicatedVlanDbIds.add(map.getVlanDbId()); +} +List nonDedicatedVlans = _vlanDao.listZoneWideNonDedicatedVlans(dcId); +for (VlanVO nonDedicatedVlan : nonDedicatedVlans) { +if (vlanDbIds == null || vlanDbIds.contains(nonDedicatedVlan.getId())) +nonDedicatedVlanDbIds.add(nonDedicatedVlan.getId()); +} +if (dedicatedVlanDbIds != null && !dedicatedVlanDbIds.isEmpty()) { +fetchFromDedicatedRange = true; +sc.setParameters("vlanId", dedicatedVlanDbIds.toArray()); +errorMessage.append(", vlanId id=" + dedicatedVlanDbIds.toArray()); +} else if (nonDedicatedVlanDbIds != null && !nonDedicatedVlanDbIds.isEmpty()) { +sc.setParameters("vlanId", nonDedicatedVlanDbIds.toArray()); +errorMessage.append(", vlanId id=" + nonDedicatedVlanDbIds.toArray()); +} else { +if (podId != null) { +InsufficientAddressCapacityException ex = new InsufficientAddressCapacityException +("Insufficient address capacity", Pod.class, podId); +ex.addProxyObject(ApiDBUtils.findPodById(podId).getUuid()); +throw ex; +} +s_logger.warn(errorMessage.toString()); +InsufficientAddressCapacityException ex = new InsufficientAddressCapacityException +("Insufficient address capacity", DataCenter.class, dcId); +ex.addProxyObject(ApiDBUtils.findZoneById(dcId).getUuid()); +throw ex; } sc.setParameters("dc", dcId); @@ -321,6 +353,16 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L List addrs = _ipAddressDao.lockRows(sc, filter, true); +// If all the dedicated IPs of the owner are in use fetch an IP from the system pool +if (addrs.size() == 0 && fetchFromDedicatedRange) { +if (nonDedicatedVlanDbIds != null && !nonDedicatedVlanDbIds.isEmpty()) { +fetchFromDedicatedRange = false; +sc.setParameters("vlanId", nonDedicatedVlanDbIds.toArray()); +errorMessage.append(", vlanId id=" + nonDe
[33/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
Fixed CLOUDSTACK-2081 Volume which is added thru upload volume is failed to attach to the instance saying Volume state must be in Allocated, Ready or in Uploaded state( Though uploaded Volume state is uploaded) Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/107f4924 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/107f4924 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/107f4924 Branch: refs/heads/vmware-datamodel Commit: 107f4924757d6d59bff4256a56df3c8e81763818 Parents: 28c5fbc Author: Rajesh Battala Authored: Thu May 9 18:02:41 2013 +0530 Committer: Devdeep Singh Committed: Fri May 17 14:58:25 2013 +0530 -- .../storage/volume/VolumeServiceImpl.java |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/107f4924/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 2625354..7fdf6bb 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 @@ -748,11 +748,11 @@ public class VolumeServiceImpl implements VolumeService { protected Void registerVolumeCallback(AsyncCallbackDispatcher callback, CreateVolumeContext context) { CreateCmdResult result = callback.getResult(); VolumeObject vo = (VolumeObject)context.volume; -/*if (result.isFailed()) { +if (result.isFailed()) { vo.stateTransit(Volume.Event.OperationFailed); } else { vo.stateTransit(Volume.Event.OperationSucceeded); -}*/ +} VolumeApiResult res = new VolumeApiResult(vo); context.future.complete(res); return null;
[14/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2544: Fix NPE while comparing lastHostId during capacity calculation Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d078f921 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d078f921 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d078f921 Branch: refs/heads/vmware-datamodel Commit: d078f921671d0f28d9291fa2bffa8a7eab53cda7 Parents: f441582 Author: Kishan Kavala Authored: Thu May 16 19:12:42 2013 +0530 Committer: Kishan Kavala Committed: Thu May 16 19:14:41 2013 +0530 -- .../com/cloud/capacity/CapacityManagerImpl.java|2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d078f921/server/src/com/cloud/capacity/CapacityManagerImpl.java -- diff --git a/server/src/com/cloud/capacity/CapacityManagerImpl.java b/server/src/com/cloud/capacity/CapacityManagerImpl.java index e7101c6..b241989 100755 --- a/server/src/com/cloud/capacity/CapacityManagerImpl.java +++ b/server/src/com/cloud/capacity/CapacityManagerImpl.java @@ -681,7 +681,7 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager, if ((newState == State.Starting || newState == State.Migrating || event == Event.AgentReportMigrated) && vm.getHostId() != null) { boolean fromLastHost = false; -if (vm.getLastHostId().equals(vm.getHostId())) { +if (vm.getHostId().equals(vm.getLastHostId())) { s_logger.debug("VM starting again on the last host it was stopped on"); fromLastHost = true; }
[01/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
Updated Branches: refs/heads/vmware-datamodel 57444fcb6 -> d07f87548 CLOUDSTACK-2509: [Cisco VNMC]No way to block incoming traffic as ACL created with PF/Static Nat is Source is Any No longer creating firewall rule as part of PF/Static NAT rule creation. Now firewall rule needs to be configured separately. Also made some changes to exception handling. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5511eb24 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5511eb24 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5511eb24 Branch: refs/heads/vmware-datamodel Commit: 5511eb241af775efa59d4fdeb597d2b335b50739 Parents: 265acca Author: Koushik Das Authored: Thu May 16 09:20:41 2013 +0530 Committer: Koushik Das Committed: Thu May 16 09:20:41 2013 +0530 -- .../network/cisco/create-egress-acl-rule.xml | 10 +- .../create-generic-egress-acl-no-protocol-rule.xml | 10 +- .../cisco/create-generic-egress-acl-rule.xml | 10 +- .../cloud/network/cisco/CiscoVnmcConnection.java |4 +- .../network/cisco/CiscoVnmcConnectionImpl.java | 12 +- .../cloud/network/resource/CiscoVnmcResource.java | 149 +++ 6 files changed, 88 insertions(+), 107 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5511eb24/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-egress-acl-rule.xml -- diff --git a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-egress-acl-rule.xml b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-egress-acl-rule.xml index 05c066d..f283ffe 100755 --- a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-egress-acl-rule.xml +++ b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-egress-acl-rule.xml @@ -80,7 +80,7 @@ under the License. @@ -93,7 +93,7 @@ under the License. name="" placement="begin" status="created" -value="%deststartip%"/> +value="%sourcestartip%"/> +value="%sourceendip%"/> @@ -161,8 +161,8 @@ under the License. descr=value actiontype="drop" or "permit" protocolvalue = "TCP" or "UDP" -deststartip="destination start ip" -destendip="destination end ip" +sourcestartip="source start ip" +sourceendip="source end ip" deststartport="start port at destination" destendport="end port at destination" --!> http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5511eb24/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-generic-egress-acl-no-protocol-rule.xml -- diff --git a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-generic-egress-acl-no-protocol-rule.xml b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-generic-egress-acl-no-protocol-rule.xml index 17cfa54..e6f4cfb 100755 --- a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-generic-egress-acl-no-protocol-rule.xml +++ b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-generic-egress-acl-no-protocol-rule.xml @@ -54,7 +54,7 @@ under the License. @@ -67,7 +67,7 @@ under the License. name="" placement="begin" status="created" -value="%deststartip%"/> +value="%sourcestartip%"/> +value="%sourceendip%"/> @@ -89,6 +89,6 @@ under the License. aclrulename="dummy" descr=value actiontype="drop" or "permit" -deststartip="destination start ip" -destendip="destination end ip" +sourcestartip="source start ip" +sourceendip="source end ip" --!> http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5511eb24/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-generic-egress-acl-rule.xml -- diff --git a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-generic-egress-acl-rule.xml b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-generic-egress-acl-rule.xml index 436e3ea..55edd1f 100755 --- a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-generic-egress-acl-rule.xml +++ b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-generic-egress-acl-rule.xml @@ -80,7 +80,7 @@ under the License. @@ -93,7 +93,7 @@ under the License. name="" placement="begin" status="created" -value="%deststartip%"/> +value="%sourcestartip%"/> +value="%sourceendip%"/>
[30/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2478: Fix test_volumes.py script for BVT failures removed storage type in compute offering and disk offering 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/55d304a5 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/55d304a5 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/55d304a5 Branch: refs/heads/vmware-datamodel Commit: 55d304a5bbca27994c01c0f7c63b6168d2a90f60 Parents: 4d0cea6 Author: SrikanteswaraRao Talluri Authored: Tue May 14 20:06:47 2013 +0530 Committer: Prasanna Santhanam Committed: Fri May 17 14:05:05 2013 +0530 -- test/integration/smoke/test_volumes.py | 84 -- 1 files changed, 52 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/55d304a5/test/integration/smoke/test_volumes.py -- diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py index 4bf8203..89b013a 100644 --- a/test/integration/smoke/test_volumes.py +++ b/test/integration/smoke/test_volumes.py @@ -53,19 +53,17 @@ class Services: "displaytext": "Tiny Instance", "cpunumber": 1, "cpuspeed": 100,# in MHz -"memory": 128, # In MBs -"storagetype": "local" +"memory": 260 # In MBs + }, "disk_offering": { "displaytext": "Small", "name": "Small", -"storagetype": "local", "disksize": 1 }, 'resized_disk_offering': { "displaytext": "Resized", "name": "Resized", -"storagetype": "local", "disksize": 3 }, "volume_offerings": { @@ -152,7 +150,7 @@ class TestCreateVolume(cloudstackTestCase): self.dbclient = self.testClient.getDbConnection() self.cleanup = [] -@attr(tags = ["advanced", "advancedns", "smoke"]) +@attr(tags = ["advanced", "advancedns", "smoke", "basic"]) def test_01_create_volume(self): """Test Volume creation for all Disk Offerings (incl. custom) """ @@ -346,8 +344,9 @@ class TestVolumes(cloudstackTestCase): cls.custom_resized_disk_offering, cls.service_offering, cls.disk_offering, +cls.volume, cls.account -] +] @classmethod def tearDownClass(cls): @@ -359,14 +358,17 @@ class TestVolumes(cloudstackTestCase): def setUp(self): self.apiClient = self.testClient.getApiClient() self.dbclient = self.testClient.getDbConnection() +self.attached = False self.cleanup = [] def tearDown(self): #Clean up, terminate the created volumes +if self.attached: +self.virtual_machine.detach_volume(self.apiClient, self.volume) cleanup_resources(self.apiClient, self.cleanup) return -@attr(tags = ["advanced", "advancedns", "smoke"]) +@attr(tags = ["advanced", "advancedns", "smoke", "basic"]) def test_02_attach_volume(self): """Attach a created Volume to a Running VM """ @@ -381,7 +383,7 @@ class TestVolumes(cloudstackTestCase): self.virtual_machine.id )) self.virtual_machine.attach_volume(self.apiClient, self.volume) - +self.attached = True list_volume_response = list_volumes( self.apiClient, id=self.volume.id @@ -412,7 +414,7 @@ class TestVolumes(cloudstackTestCase): (self.virtual_machine.ipaddress, e)) return -@attr(tags = ["advanced", "advancedns", "smoke"]) +@attr(tags = ["advanced", "advancedns", "smoke", "basic"]) def test_03_download_attached_volume(self): """Download a Volume attached to a VM """ @@ -423,6 +425,8 @@ class TestVolumes(cloudstackTestCase): self.debug("Extract attached Volume ID: %s" % self.volume.id) +self.virtual_machine.attach_volume(self.apiClient, se
[36/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
portable IP Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b3e9b2a5 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b3e9b2a5 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b3e9b2a5 Branch: refs/heads/vmware-datamodel Commit: b3e9b2a5dc0439cad60058d693cba9d3c714af70 Parents: 4eb310e Author: radhikap Authored: Fri May 17 18:57:59 2013 +0530 Committer: radhikap Committed: Fri May 17 18:58:32 2013 +0530 -- docs/en-US/elastic-ip.xml | 161 +-- 1 files changed, 87 insertions(+), 74 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b3e9b2a5/docs/en-US/elastic-ip.xml -- diff --git a/docs/en-US/elastic-ip.xml b/docs/en-US/elastic-ip.xml index 8ecbd75..672fc5a 100644 --- a/docs/en-US/elastic-ip.xml +++ b/docs/en-US/elastic-ip.xml @@ -26,78 +26,91 @@ choice from the EIP pool of your account. Later if required you can reassign the IP address to a different VM. This feature is extremely helpful during VM failure. Instead of replacing the VM which is down, the IP address can be reassigned to a new VM in your account. - Similar to the public IP address, Elastic IP addresses are mapped to their associated -private IP addresses by using StaticNAT. The EIP service is equipped with StaticNAT (1:1) -service in an EIP-enabled basic zone. The default network offering, -DefaultSharedNetscalerEIPandELBNetworkOffering, provides your network with EIP and ELB network -services if a NetScaler device is deployed in your zone. Consider the following illustration for -more details. - - - - - - eip-ns-basiczone.png: Elastic IP in a NetScaler-enabled Basic Zone. - - - In the illustration, a NetScaler appliance is the default entry or exit point for the -&PRODUCT; instances, and firewall is the default entry or exit point for the rest of the data -center. Netscaler provides LB services and staticNAT service to the guest networks. The guest -traffic in the pods and the Management Server are on different subnets / VLANs. The policy-based -routing in the data center core switch sends the public traffic through the NetScaler, whereas -the rest of the data center goes through the firewall. - The EIP work flow is as follows: - - - When a user VM is deployed, a public IP is automatically acquired from the pool of -public IPs configured in the zone. This IP is owned by the VM's account. - - - Each VM will have its own private IP. When the user VM starts, Static NAT is provisioned -on the NetScaler device by using the Inbound Network Address Translation (INAT) and Reverse -NAT (RNAT) rules between the public IP and the private IP. - -Inbound NAT (INAT) is a type of NAT supported by NetScaler, in which the destination - IP address is replaced in the packets from the public network, such as the Internet, with - the private IP address of a VM in the private network. Reverse NAT (RNAT) is a type of NAT - supported by NetScaler, in which the source IP address is replaced in the packets - generated by a VM in the private network with the public IP address. - - - - This default public IP will be released in two cases: - - - When the VM is stopped. When the VM starts, it again receives a new public IP, not -necessarily the same one allocated initially, from the pool of Public IPs. - - - The user acquires a public IP (Elastic IP). This public IP is associated with the -account, but will not be mapped to any private IP. However, the user can enable Static -NAT to associate this IP to the private IP of a VM in the account. The Static NAT rule -for the public IP can be disabled at any time. When Static NAT is disabled, a new public -IP is allocated from the pool, which is not necessarily be the same one allocated -initially. - - - - - For the deployments where public IPs are limited resources, you have the flexibility to -choose not to allocate a public IP by default. You can use the Associate Public IP option to -turn on or off the automatic public IP assignment in the EIP-enabled Basic zones. If you turn -off the automatic public IP assignment while creating a network offering, only a private IP is -assigned to a VM when the VM is deployed with that network offering. Later, the user can acquire -an IP for the VM and enable static NAT. - For more information on the Associate Public IP opti
[19/50] [abbrv] CLOUDSTACK-2056: DeploymentPlanner choice via ServiceOffering
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a2eb7bab/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java -- diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java index c7162a2..c86d5e1 100644 --- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java +++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java @@ -16,32 +16,107 @@ // under the License. package com.cloud.deploy; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.Timer; +import java.util.TimerTask; +import java.util.TreeSet; import javax.ejb.Local; import javax.inject.Inject; +import javax.naming.ConfigurationException; import org.apache.cloudstack.affinity.AffinityGroupProcessor; -import org.apache.cloudstack.affinity.AffinityGroupVMMapVO; + import org.apache.cloudstack.affinity.dao.AffinityGroupDao; import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator; +import org.apache.cloudstack.framework.messagebus.MessageBus; +import org.apache.cloudstack.framework.messagebus.MessageSubscriber; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.log4j.Logger; + +import com.cloud.capacity.CapacityManager; +import com.cloud.capacity.dao.CapacityDao; +import com.cloud.cluster.ManagementServerNode; +import com.cloud.configuration.Config; +import com.cloud.configuration.dao.ConfigurationDao; +import com.cloud.dc.ClusterDetailsDao; +import com.cloud.dc.ClusterDetailsVO; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.DataCenter; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.Pod; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.dc.dao.HostPodDao; import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.deploy.DeploymentPlanner.PlannerResourceUsage; +import com.cloud.deploy.dao.PlannerHostReservationDao; import com.cloud.exception.AffinityConflictException; +import com.cloud.exception.ConnectionException; import com.cloud.exception.InsufficientServerCapacityException; +import com.cloud.host.Host; +import com.cloud.host.HostVO; +import com.cloud.host.Status; +import com.cloud.host.dao.HostDao; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.offering.ServiceOffering; +import com.cloud.org.Cluster; +import com.cloud.org.Grouping; +import com.cloud.resource.ResourceState; +import com.cloud.storage.DiskOfferingVO; +import com.cloud.storage.StorageManager; +import com.cloud.storage.StoragePool; +import com.cloud.storage.StoragePoolHostVO; +import com.cloud.storage.Volume; +import com.cloud.storage.VolumeVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.dao.GuestOSCategoryDao; +import com.cloud.storage.dao.GuestOSDao; +import com.cloud.storage.dao.StoragePoolHostDao; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.user.AccountManager; +import com.cloud.utils.DateUtil; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.Pair; import com.cloud.utils.component.Manager; import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.Transaction; +import com.cloud.vm.DiskProfile; +import com.cloud.vm.ReservationContext; +import com.cloud.vm.VMInstanceVO; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; +import com.cloud.vm.VirtualMachine.State; import com.cloud.vm.dao.UserVmDao; import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.agent.AgentManager; +import com.cloud.agent.Listener; +import com.cloud.agent.api.AgentControlAnswer; +import com.cloud.agent.api.AgentControlCommand; +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; +import com.cloud.agent.api.StartupCommand; +import com.cloud.agent.api.StartupRoutingCommand; +import com.cloud.agent.manager.allocator.HostAllocator; + @Local(value = { DeploymentPlanningManager.class }) -public class DeploymentPlanningManagerImpl extends ManagerBase implements DeploymentPlanningManager, Manager { +public class DeploymentPlanningManagerImpl extends ManagerBase implements DeploymentPlanningManager, Manager, Listener { private static final Logger s_logger = Logger.getLogger(DeploymentPlanningManagerImpl.class); @Inject +AgentManager _agentMgr; +@Inject protected UserVmDao _vmDao; @Inject protected VMInstanceDao _vmInstanceDao; @@ -49,6 +124,53 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy protected AffinityGroupDao _affi
[16/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
HypervisorType.VMware) { if (nic.getBroadcastUri().getScheme().equals("pvlan")) { if (!setupVmForPvlan(true, hostId, nic)) { return false; @@ -2905,6 +2907,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use } } } +} boolean ipChanged = false; if (originalIp != null && !originalIp.equalsIgnoreCase(returnedIp)) { if (returnedIp != null && guestNic != null) { @@ -4336,7 +4339,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use UserVmVO vmVO = _vmDao.findById(vm.getId()); if (vmVO.getState() == State.Running) { try { -PlugNicCommand plugNicCmd = new PlugNicCommand(nic,vm.getName()); +PlugNicCommand plugNicCmd = new PlugNicCommand(nic,vm.getName(), vm.getType()); Commands cmds = new Commands(OnError.Stop); cmds.addCommand("plugnic",plugNicCmd); _agentMgr.send(dest.getHost().getId(),cmds); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15be9777/vmware-base/src/com/cloud/hypervisor/vmware/mo/DistributedVirtualSwitchMO.java -- diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/DistributedVirtualSwitchMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/DistributedVirtualSwitchMO.java index 247be2a..b00b97c 100644 --- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/DistributedVirtualSwitchMO.java +++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/DistributedVirtualSwitchMO.java @@ -17,13 +17,20 @@ package com.cloud.hypervisor.vmware.mo; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import org.apache.log4j.Logger; import com.cloud.hypervisor.vmware.util.VmwareContext; import com.vmware.vim25.DVPortgroupConfigSpec; +import com.vmware.vim25.DVSConfigInfo; import com.vmware.vim25.ManagedObjectReference; +import com.vmware.vim25.TaskInfo; +import com.vmware.vim25.VMwareDVSConfigInfo; +import com.vmware.vim25.VMwareDVSConfigSpec; +import com.vmware.vim25.VMwareDVSPvlanMapEntry; public class DistributedVirtualSwitchMO extends BaseMO { private static final Logger s_logger = Logger.getLogger(DistributedVirtualSwitchMO.class); @@ -46,4 +53,74 @@ public class DistributedVirtualSwitchMO extends BaseMO { // TODO(sateesh): Update numPorts _context.getService().reconfigureDVPortgroupTask(dvPortGroupMor, dvPortGroupSpec); } + +public void updateVMWareDVSwitch(ManagedObjectReference dvSwitchMor, VMwareDVSConfigSpec dvsSpec) throws Exception { +_context.getService().reconfigureDvsTask(dvSwitchMor, dvsSpec); +} + +public TaskInfo updateVMWareDVSwitchGetTask(ManagedObjectReference dvSwitchMor, VMwareDVSConfigSpec dvsSpec) throws Exception { +ManagedObjectReference task = _context.getService().reconfigureDvsTask(dvSwitchMor, dvsSpec); +TaskInfo info = (TaskInfo) (_context.getVimClient().getDynamicProperty(task, "info")); +boolean waitvalue = _context.getVimClient().waitForTask(task); +return info; +} + +public String getDVSConfigVersion(ManagedObjectReference dvSwitchMor) throws Exception { +assert (dvSwitchMor != null); +DVSConfigInfo dvsConfigInfo = (DVSConfigInfo)_context.getVimClient().getDynamicProperty(dvSwitchMor, "config"); +return dvsConfigInfo.getConfigVersion(); +} + +public Map retrieveVlanPvlan(int vlanid, int secondaryvlanid, ManagedObjectReference dvSwitchMor) throws Exception { +assert (dvSwitchMor != null); + +Map result = new HashMap(); + +VMwareDVSConfigInfo configinfo = (VMwareDVSConfigInfo)_context.getVimClient().getDynamicProperty(dvSwitchMor, "config"); +List pvlanconfig = null; +pvlanconfig = configinfo.getPvlanConfig(); + +if (null == pvlanconfig || 0 == pvlanconfig.size()) { +return result; +} +// Iterate through the pvlanMapList and check if the specified vlan id and pvlan id exist. If they do, set the fields in result accordingly. + +for (VMwareDVSPvlanMapEntry mapEntry : pvlanconfig) { +int entryVlanid = mapEntry.getPrimaryVlanId(); +int entryPvlanid = mapEntry.getSecondaryVlanId(); +if (entryVlanid == entryPvlanid) { +// promiscuous +if (vlanid == entryVlanid) { +// pvlan type will always be promiscuous in this case. +result.put(vlanid, HypervisorHostHelper.PvlanType.valueOf(mapEntry.getPvlanType())); +} else if ((vlanid != secondaryvlanid) && secondaryvlanid == entryVlanid) { +r
[24/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
fix null pointer dereference in cloud-server Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3ed9e42d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3ed9e42d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3ed9e42d Branch: refs/heads/vmware-datamodel Commit: 3ed9e42dd2b000299aeab51681d96eb7c9d74249 Parents: 35de50d Author: Mice Xia Authored: Thu May 16 16:50:29 2013 +0800 Committer: Mice Xia Committed: Fri May 17 09:44:01 2013 +0800 -- .../cloud/network/StorageNetworkManagerImpl.java |5 +++-- .../gslb/GlobalLoadBalancingRulesServiceImpl.java |4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3ed9e42d/server/src/com/cloud/network/StorageNetworkManagerImpl.java -- diff --git a/server/src/com/cloud/network/StorageNetworkManagerImpl.java b/server/src/com/cloud/network/StorageNetworkManagerImpl.java index 9a17382..901e204 100755 --- a/server/src/com/cloud/network/StorageNetworkManagerImpl.java +++ b/server/src/com/cloud/network/StorageNetworkManagerImpl.java @@ -315,9 +315,10 @@ public class StorageNetworkManagerImpl extends ManagerBase implements StorageNet List ranges = _sNwIpRangeDao.listByPodId(podId); for (StorageNetworkIpRangeVO r : ranges) { try { -r = _sNwIpRangeDao.acquireInLockTable(r.getId()); +Long rangeId = r.getId(); +r = _sNwIpRangeDao.acquireInLockTable(rangeId); if (r == null) { -String msg = "Unable to acquire lock on storage network ip range id=" + r.getId() + ", delete failed"; +String msg = "Unable to acquire lock on storage network ip range id=" + rangeId + ", delete failed"; s_logger.warn(msg); throw new CloudRuntimeException(msg); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3ed9e42d/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java -- diff --git a/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java b/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java index 0622f77..a1865c6 100644 --- a/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java +++ b/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java @@ -155,7 +155,7 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR long gslbRuleId = assignToGslbCmd.getGlobalLoadBalancerRuleId(); GlobalLoadBalancerRuleVO gslbRule = _gslbRuleDao.findById(gslbRuleId); if (gslbRule == null) { -throw new InvalidParameterValueException("Invalid global load balancer rule id: " + gslbRule.getUuid()); +throw new InvalidParameterValueException("Invalid global load balancer rule id: " + gslbRuleId); } _accountMgr.checkAccess(caller, SecurityChecker.AccessType.ModifyEntry, true, gslbRule); @@ -282,7 +282,7 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR long gslbRuleId = removeFromGslbCmd.getGlobalLoadBalancerRuleId(); GlobalLoadBalancerRuleVO gslbRule = _gslbRuleDao.findById(gslbRuleId); if (gslbRule == null) { -throw new InvalidParameterValueException("Invalid global load balancer rule id: " + gslbRule.getUuid()); +throw new InvalidParameterValueException("Invalid global load balancer rule id: " + gslbRuleId); } _accountMgr.checkAccess(caller, SecurityChecker.AccessType.ModifyEntry, true, gslbRule);
[22/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
Unit test does not use this file anymore. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/890603be Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/890603be Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/890603be Branch: refs/heads/vmware-datamodel Commit: 890603be37949308c127701765b31438605ab033 Parents: a2eb7ba Author: Prachi Damle Authored: Thu May 16 15:28:02 2013 -0700 Committer: Prachi Damle Committed: Thu May 16 15:28:02 2013 -0700 -- server/test/resources/affinityContext.xml | 42 1 files changed, 0 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/890603be/server/test/resources/affinityContext.xml -- diff --git a/server/test/resources/affinityContext.xml b/server/test/resources/affinityContext.xml deleted file mode 100644 index ed880dd..000 --- a/server/test/resources/affinityContext.xml +++ /dev/null @@ -1,42 +0,0 @@ - -http://www.springframework.org/schema/beans"; - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:context="http://www.springframework.org/schema/context"; - xmlns:tx="http://www.springframework.org/schema/tx"; xmlns:aop="http://www.springframework.org/schema/aop"; - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-3.0.xsd - http://www.springframework.org/schema/tx - http://www.springframework.org/schema/tx/spring-tx-3.0.xsd - http://www.springframework.org/schema/aop - http://www.springframework.org/schema/aop/spring-aop-3.0.xsd - http://www.springframework.org/schema/context - http://www.springframework.org/schema/context/spring-context-3.0.xsd";> - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file
[31/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2542: Fix router test for basic zone 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/2867c6a6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2867c6a6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2867c6a6 Branch: refs/heads/vmware-datamodel Commit: 2867c6a6df6fe552cd8cf1f8bb7447bf8084d859 Parents: 55d304a Author: SrikanteswaraRao Talluri Authored: Thu May 16 17:29:12 2013 +0530 Committer: Prasanna Santhanam Committed: Fri May 17 14:05:58 2013 +0530 -- test/integration/smoke/test_routers.py | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2867c6a6/test/integration/smoke/test_routers.py -- diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py index 9ec2e91..f6ca279 100644 --- a/test/integration/smoke/test_routers.py +++ b/test/integration/smoke/test_routers.py @@ -141,11 +141,17 @@ class TestRouterServices(cloudstackTestCase): #by checking status of dnsmasq process # Find router associated with user account -list_router_response = list_routers( -self.apiclient, -account=self.account.name, -domainid=self.account.domainid -) +if self.zone.networktype == "Basic": +list_router_response = list_routers( +self.apiclient, +listall="true" +) +else: +list_router_response = list_routers( +self.apiclient, +account=self.account.name, +domainid=self.account.domainid +) self.assertEqual( isinstance(list_router_response, list), True,
[34/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2122. Virtual machine id should be a required parameter for findHostsForMigration api. Fixing it. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e520ff45 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e520ff45 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e520ff45 Branch: refs/heads/vmware-datamodel Commit: e520ff456801e9a7b57fe56ee78f4f649675c082 Parents: 107f492 Author: Devdeep Singh Authored: Fri May 17 17:01:17 2013 +0530 Committer: Devdeep Singh Committed: Fri May 17 17:01:17 2013 +0530 -- .../admin/host/FindHostsForMigrationCmd.java |2 +- .../src/com/cloud/server/ManagementServerImpl.java |9 - 2 files changed, 5 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e520ff45/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java -- diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java index e6e45cc..b2d77b8 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java @@ -45,7 +45,7 @@ public class FindHostsForMigrationCmd extends BaseListCmd { / @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType = UserVmResponse.class, -required=false, description="find hosts to which this VM can be migrated and flag the hosts with enough " + +required=true, description="find hosts to which this VM can be migrated and flag the hosts with enough " + "CPU/RAM to host the VM") private Long virtualMachineId; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e520ff45/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 f74b7ad..06c0f96 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -1086,17 +1086,16 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe VMInstanceVO vm = _vmInstanceDao.findById(vmId); if (vm == null) { -InvalidParameterValueException ex = new InvalidParameterValueException("Unable to find the VM with specified id"); -ex.addProxyObject(vm, vmId, "vmId"); +InvalidParameterValueException ex = new InvalidParameterValueException("Unable to find the VM with given id"); throw ex; } if (vm.getState() != State.Running) { if (s_logger.isDebugEnabled()) { -s_logger.debug("VM is not Running, unable to migrate the vm" + vm); +s_logger.debug("VM is not running, cannot migrate the vm" + vm); } -InvalidParameterValueException ex = new InvalidParameterValueException("VM is not Running, unable to" + -" migrate the vm with specified id"); +InvalidParameterValueException ex = new InvalidParameterValueException("VM is not Running, cannot " + +"migrate the vm with specified id"); ex.addProxyObject(vm, vmId, "vmId"); throw ex; }
[38/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2102: Anti-Affinity - Even after reserved capacity has been released for a Vm in "Stopped" state , we are not allowed to deploy new Vms as part of same anti-affinity group in the last_host_id where the stopped Vm was running. Changes: Do not add the last_host_id of a Stopped VM to avoid set, if the VM has been stopped for more that capacity.skip.counting.hours time limit Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/55c1e282 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/55c1e282 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/55c1e282 Branch: refs/heads/vmware-datamodel Commit: 55c1e282e390e95a2639df28e1cfd743772ee001 Parents: 5646f5e Author: Prachi Damle Authored: Fri May 17 11:39:20 2013 -0700 Committer: Prachi Damle Committed: Fri May 17 11:40:00 2013 -0700 -- .../affinity/HostAntiAffinityProcessor.java| 31 --- 1 files changed, 25 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/55c1e282/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java -- diff --git a/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java b/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java index 4c2c7f1..6c3f57f 100644 --- a/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java +++ b/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java @@ -17,17 +17,24 @@ package org.apache.cloudstack.affinity; import java.util.List; +import java.util.Map; import javax.ejb.Local; import javax.inject.Inject; +import javax.naming.ConfigurationException; import org.apache.cloudstack.affinity.dao.AffinityGroupDao; import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao; +import org.apache.cloudstack.framework.messagebus.MessageSubscriber; import org.apache.log4j.Logger; +import com.cloud.configuration.Config; +import com.cloud.configuration.dao.ConfigurationDao; import com.cloud.deploy.DeploymentPlan; import com.cloud.deploy.DeploymentPlanner.ExcludeList; import com.cloud.exception.AffinityConflictException; +import com.cloud.utils.DateUtil; +import com.cloud.utils.NumbersUtil; import com.cloud.vm.VMInstanceVO; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; @@ -46,7 +53,10 @@ public class HostAntiAffinityProcessor extends AffinityProcessorBase implements protected AffinityGroupDao _affinityGroupDao; @Inject protected AffinityGroupVMMapDao _affinityGroupVMMapDao; - +private int _vmCapacityReleaseInterval; +@Inject +protected ConfigurationDao _configDao; + @Override public void process(VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid) @@ -76,12 +86,14 @@ public class HostAntiAffinityProcessor extends AffinityProcessorBase implements } } else if (VirtualMachine.State.Stopped.equals(groupVM.getState()) && groupVM.getLastHostId() != null) { -avoid.addHost(groupVM.getLastHostId()); -if (s_logger.isDebugEnabled()) { -s_logger.debug("Added host " + groupVM.getLastHostId() + " to avoid set, since VM " -+ groupVM.getId() + " is present on the host, in Stopped state"); +long secondsSinceLastUpdate = (DateUtil.currentGMTTime().getTime() - groupVM.getUpdateTime().getTime()) / 1000; +if (secondsSinceLastUpdate < _vmCapacityReleaseInterval) { +avoid.addHost(groupVM.getLastHostId()); +if (s_logger.isDebugEnabled()) { +s_logger.debug("Added host " + groupVM.getLastHostId() + " to avoid set, since VM " ++ groupVM.getId() + " is present on the host, in Stopped state but has reserved capacity"); +} } - } } } @@ -89,5 +101,12 @@ public class HostAntiAffinityProcessor extends AffinityProcessorBase implements } } + +@Override +public boolean configure(final String name, final Map params) throws ConfigurationException { +super.configure(name,
[42/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
Better parse domain XMLs so network devices can be detached as well Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/239bb13d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/239bb13d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/239bb13d Branch: refs/heads/vmware-datamodel Commit: 239bb13dde0d32ca3e05a8ea2b35a8885cb30538 Parents: 1851f7f Author: Wido den Hollander Authored: Sat May 18 10:10:45 2013 +0200 Committer: Wido den Hollander Committed: Sat May 18 10:34:22 2013 +0200 -- .../kvm/resource/LibvirtDomainXMLParser.java | 57 +-- 1 files changed, 36 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/239bb13d/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java -- diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java index ac4baf1..b8645e1 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java @@ -35,6 +35,7 @@ import org.xml.sax.InputSource; import org.xml.sax.SAXException; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef; +import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.diskProtocol; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.InterfaceDef; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.InterfaceDef.nicModel; @@ -64,31 +65,45 @@ public class LibvirtDomainXMLParser { NodeList disks = devices.getElementsByTagName("disk"); for (int i = 0; i < disks.getLength(); i++) { Element disk = (Element) disks.item(i); -String diskFmtType = getAttrValue("driver", "type", disk); -String diskFile = getAttrValue("source", "file", disk); -String diskDev = getAttrValue("source", "dev", disk); - -String diskLabel = getAttrValue("target", "dev", disk); -String bus = getAttrValue("target", "bus", disk); String type = disk.getAttribute("type"); -String device = disk.getAttribute("device"); - DiskDef def = new DiskDef(); -if (type.equalsIgnoreCase("file")) { -if (device.equalsIgnoreCase("disk")) { -DiskDef.diskFmtType fmt = null; -if (diskFmtType != null) { -fmt = DiskDef.diskFmtType.valueOf(diskFmtType -.toUpperCase()); +if (type.equalsIgnoreCase("network")) { +String diskFmtType = getAttrValue("driver", "type", disk); +String diskPath = getAttrValue("source", "name", disk); +String protocol = getAttrValue("source", "protocol", disk); +String authUserName = getAttrValue("auth", "username", disk); +String poolUuid = getAttrValue("secret", "uuid", disk); +String host = getAttrValue("host", "name", disk); +int port = Integer.parseInt(getAttrValue("host", "port", disk)); +String diskLabel = getAttrValue("target", "dev", disk); +String bus = getAttrValue("target", "bus", disk); +def.defNetworkBasedDisk(diskPath, host, port, authUserName, poolUuid, diskLabel, + DiskDef.diskBus.valueOf(bus.toUpperCase()), DiskDef.diskProtocol.valueOf(protocol.toUpperCase())); +} else { +String diskFmtType = getAttrValue("driver", "type", disk); +String diskFile = getAttrValue("source", "file", disk); +String diskDev = getAttrValue("source", "dev", disk); + +String diskLabel = getAttrValue("target", "dev", disk); +String bus = getAttrValue("target", "bus", disk); +String device = disk.getAttribute("device"); + +if (type.equalsIgnoreCase("file")) { +if (device.equalsIgnoreCase("disk")) { +DiskDef.diskFmtType fmt = null; +if (diskFmtType != null) { +fmt = DiskDef.diskFmtType.valueOf(diskFmtType +.toUpperCase()); +} +def.defFileBasedDisk(diskFile, diskLabel, +
[50/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
Merge branch 'vmware-datamodel' of https://git-wip-us.apache.org/repos/asf/cloudstack into vmware-datamodel Conflicts: engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterVO.java plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterZoneMapVO.java plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/VmwareDatacenterDao.java plugins/hypervisors/vmware/src/org/apache/cloudstack/api/command/admin/zone/AddVmwareDcCmd.java plugins/hypervisors/vmware/src/org/apache/cloudstack/api/command/admin/zone/RemoveVmwareDcCmd.java Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d07f8754 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d07f8754 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d07f8754 Branch: refs/heads/vmware-datamodel Commit: d07f8754820967e2a746eb51f40199ce28a37252 Parents: ac848e4 57444fc Author: Sateesh Chodapuneedi Authored: Sun May 19 17:33:56 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Sun May 19 17:33:56 2013 +0530 -- setup/db/db/schema-410to420.sql |1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d07f8754/setup/db/db/schema-410to420.sql --
[44/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
Legacy zone support. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6dcff824 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6dcff824 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6dcff824 Branch: refs/heads/vmware-datamodel Commit: 6dcff8246bb50398bba92ac9a7aad780c033f231 Parents: 8aa4134 Author: Sateesh Chodapuneedi Authored: Sat May 4 23:20:59 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Sun May 19 08:37:16 2013 +0530 -- setup/db/db/schema-410to420.sql |8 1 files changed, 8 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dcff824/setup/db/db/schema-410to420.sql -- diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql index 42815a1..12d50af 100644 --- a/setup/db/db/schema-410to420.sql +++ b/setup/db/db/schema-410to420.sql @@ -998,6 +998,13 @@ CREATE TABLE `cloud`.`vmware_data_center_zone_map` ( CONSTRAINT `fk_vmware_data_center_zone_map__vmware_data_center_id` FOREIGN KEY (`vmware_data_center_id`) REFERENCES `vmware_data_center`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `cloud`.`legacy_zones` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', + `zone_id` bigint unsigned NOT NULL UNIQUE COMMENT 'id of CloudStack zone', + PRIMARY KEY (`id`), + CONSTRAINT `fk_legacy_zones__zone_id` FOREIGN KEY (`zone_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + ALTER TABLE `cloud`.`network_offerings` ADD COLUMN `eip_associate_public_ip` int(1) unsigned NOT NULL DEFAULT 0 COMMENT 'true if public IP is associated with user VM creation by default when EIP service is enabled.' AFTER `elastic_ip_service`; @@ -1110,6 +1117,7 @@ CREATE VIEW `cloud`.`account_view` AS select account.id, account.uuid, +account.uuid, account.account_name, account.type, account.state,
[17/50] [abbrv] CLOUDSTACK-2056: DeploymentPlanner choice via ServiceOffering
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a2eb7bab/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java -- diff --git a/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java b/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java index 6f52397..7ffbe32 100644 --- a/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java +++ b/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java @@ -82,6 +82,7 @@ import com.cloud.offerings.dao.NetworkOfferingDao; import com.cloud.offerings.dao.NetworkOfferingServiceMapDao; import com.cloud.offerings.dao.NetworkOfferingServiceMapDaoImpl; import com.cloud.projects.ProjectManager; +import com.cloud.server.ManagementService; import com.cloud.service.dao.ServiceOfferingDaoImpl; import com.cloud.storage.dao.DiskOfferingDaoImpl; import com.cloud.storage.dao.S3DaoImpl; @@ -155,162 +156,167 @@ useDefaultFilters=false ) public class ChildTestConfiguration { - + +@Bean +public ManagementService managementService() { +return Mockito.mock(ManagementService.class); +} + @Bean public AccountManager acctMgr() { return Mockito.mock(AccountManager.class); } - + @Bean public NetworkService ntwkSvc() { return Mockito.mock(NetworkService.class); } - + @Bean public NetworkModel ntwkMdl() { return Mockito.mock(NetworkModel.class); } - + @Bean public AlertManager alertMgr() { return Mockito.mock(AlertManager.class); } - + @Bean public SecurityChecker securityChkr() { return Mockito.mock(SecurityChecker.class); } - + @Bean public ResourceLimitService resourceSvc() { return Mockito.mock(ResourceLimitService.class); } - + @Bean public ProjectManager projectMgr() { return Mockito.mock(ProjectManager.class); } - + @Bean public SecondaryStorageVmManager ssvmMgr() { return Mockito.mock(SecondaryStorageVmManager.class); } - + @Bean public SwiftManager swiftMgr() { return Mockito.mock(SwiftManager.class); } - + @Bean public S3Manager s3Mgr() { return Mockito.mock(S3Manager.class); } - + @Bean public VpcManager vpcMgr() { return Mockito.mock(VpcManager.class); } - + @Bean public UserVmDao userVMDao() { return Mockito.mock(UserVmDao.class); } - + @Bean public RulesManager rulesMgr() { return Mockito.mock(RulesManager.class); } - + @Bean public LoadBalancingRulesManager lbRulesMgr() { return Mockito.mock(LoadBalancingRulesManager.class); } - + @Bean public RemoteAccessVpnService vpnMgr() { return Mockito.mock(RemoteAccessVpnService.class); } - + @Bean public NetworkGuru ntwkGuru() { return Mockito.mock(NetworkGuru.class); } - + @Bean public NetworkElement ntwkElement() { return Mockito.mock(NetworkElement.class); } - + @Bean public IpDeployer ipDeployer() { return Mockito.mock(IpDeployer.class); } - + @Bean public DhcpServiceProvider dhcpProvider() { return Mockito.mock(DhcpServiceProvider.class); } - + @Bean public FirewallManager firewallMgr() { return Mockito.mock(FirewallManager.class); } - + @Bean public AgentManager agentMgr() { return Mockito.mock(AgentManager.class); } - + @Bean public StorageNetworkManager storageNtwkMgr() { return Mockito.mock(StorageNetworkManager.class); } - + @Bean public NetworkACLManager ntwkAclMgr() { return Mockito.mock(NetworkACLManager.class); } - + @Bean public Ipv6AddressManager ipv6Mgr() { return Mockito.mock(Ipv6AddressManager.class); } - + @Bean public ConfigurationDao configDao() { return Mockito.mock(ConfigurationDao.class); } - + @Bean public UserContext userContext() { return Mockito.mock(UserContext.class); } - + @Bean public UserContextInitializer userContextInitializer() { return Mockito.mock(UserContextInitializer.class); } - + @Bean public NetworkManager networkManager() { return Mockito.mock(NetworkManager.class); } - + @Bean public NetworkOfferingDao networkOfferingDao() { return Mockito.mock(NetworkOfferingDao.class); } - + @Bean public NetworkDao networkDao() { return Mockito.mock(NetworkDao.class); } - + @Bean public NetworkOfferingServiceMapDao networkOfferingServiceMapDao() {
[41/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2365: Anti-Affinity - As admin , we are allowed to deploy a Vm in an affinity group that belongs to different user. CLOUDSTACK-2349: Anti-Affinity - As admin user , using updateVMAffinityGroup() , we are allowed to update the affinity group of a Vm (that belongs to a regular user) to be set to admin's affinity group. Changes: - Even for root-admin make sure that the affinity group and the VM belong to same account Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1851f7f7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1851f7f7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1851f7f7 Branch: refs/heads/vmware-datamodel Commit: 1851f7f7f6bb4bcf3521ea44c51e9506cb86a72d Parents: 7cae8ca Author: Prachi Damle Authored: Fri May 17 15:32:21 2013 -0700 Committer: Prachi Damle Committed: Fri May 17 15:33:01 2013 -0700 -- server/src/com/cloud/vm/UserVmManagerImpl.java |8 .../affinity/AffinityGroupServiceImpl.java |9 + 2 files changed, 17 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1851f7f7/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 860daaf..05ff6aa 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -2366,6 +2366,14 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use } else { // verify permissions _accountMgr.checkAccess(caller, null, true, owner, ag); +// Root admin has access to both VM and AG by default, but +// make sure the owner of these entities is same +if (caller.getId() == Account.ACCOUNT_ID_SYSTEM || _accountMgr.isRootAdmin(caller.getType())) { +if (ag.getAccountId() != owner.getAccountId()) { +throw new PermissionDeniedException("Affinity Group " + ag ++ " does not belong to the VM's account"); +} +} } } } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1851f7f7/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java -- diff --git a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java index fc2cfcf..efe18c3 100644 --- a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java +++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java @@ -36,6 +36,7 @@ import com.cloud.deploy.DeploymentPlanner; import com.cloud.event.ActionEvent; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.PermissionDeniedException; import com.cloud.exception.ResourceInUseException; import com.cloud.network.security.SecurityGroup; import com.cloud.user.Account; @@ -332,6 +333,14 @@ public class AffinityGroupServiceImpl extends ManagerBase implements AffinityGro } else { // verify permissions _accountMgr.checkAccess(caller, null, true, owner, ag); +// Root admin has access to both VM and AG by default, but make sure the +// owner of these entities is same +if (caller.getId() == Account.ACCOUNT_ID_SYSTEM || _accountMgr.isRootAdmin(caller.getType())) { +if (ag.getAccountId() != owner.getAccountId()) { +throw new PermissionDeniedException("Affinity Group " + ag ++ " does not belong to the VM's account"); +} +} } } _affinityGroupVMMapDao.updateMap(vmId, affinityGroupIds);
[48/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter Upgrade changes with legacy zone support DC-Zone mapping constraints should allow multiple hypervisors per zone. Such zones would just be ignored. Looking for only VMware clusters in the zone while associating a VMware DC with a zone. Fixed upgrade path for zones with 1 cluster from 1 DC/vCenter. Auto-associating in this case. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/43850575 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/43850575 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/43850575 Branch: refs/heads/vmware-datamodel Commit: 438505756d00258f211a1c3d986fe37d57290554 Parents: f78c2a3 Author: Sateesh Chodapuneedi Authored: Thu May 9 23:13:28 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Sun May 19 08:52:03 2013 +0530 -- .../src/com/cloud/upgrade/dao/Upgrade410to420.java | 42 ++ .../vmware/manager/VmwareManagerImpl.java | 32 +++- setup/db/db/schema-410to420.sql|1 - 3 files changed, 37 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/43850575/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 7baa1ab..352e54a 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java @@ -269,11 +269,13 @@ public class Upgrade410to420 implements DbUpgrade { String dcOfCurrentCluster = null; String[] tokens; String url; -String user; -String password; +String user = ""; +String password = ""; String vc = ""; String dcName = ""; String guid; +String key; +String value; try { clustersQuery = conn.prepareStatement("select id, hypervisor_type from `cloud`.`cluster` where removed is NULL"); @@ -298,15 +300,16 @@ public class Upgrade410to420 implements DbUpgrade { clusterId = clusters.getLong("id"); if (clusterHypervisorType.equalsIgnoreCase("VMware")) { ignoreZone = false; +clusterDetailsQuery = conn.prepareStatement("select value from `cloud`.`cluster_details` where name='url' and cluster_id=?"); +clusterDetailsQuery.setLong(1, clusterId); +clusterDetails = clusterDetailsQuery.executeQuery(); +clusterDetails.next(); +url = clusterDetails.getString("value"); +tokens = url.split("/"); // url format - http://vcenter/dc/cluster +vc = tokens[2]; +dcName = tokens[3]; if (count > 0) { dcOfPreviousCluster = dcOfCurrentCluster; -clusterDetailsQuery = conn.prepareStatement("select value,username,password from `cloud`.`cluster_details` where name='url' and cluster_id=?"); -clusterDetailsQuery.setLong(1, clusterId); -clusterDetails = clusterDetailsQuery.executeQuery(); -url = clusterDetails.getString("value"); -tokens = url.split("/"); // url format - http://vcenter/dc/cluster -vc = tokens[2]; -dcName = tokens[3]; dcOfCurrentCluster = dcName + "@" + vc; if (!dcOfPreviousCluster.equals(dcOfCurrentCluster)) { legacyZone = true; @@ -326,8 +329,21 @@ public class Upgrade410to420 implements DbUpgrade { if (legacyZone) { listOfLegacyZones.add(zoneId); } else { -user = clusterDetails.getString("username"); -password = clusterDetails.getString("password"); +assert(clusterDetails != null) : "Couldn't retrieve details of cluster!"; +s_logger.debug("Discovered non-legacy zone " + zoneId + ". Processing the zone to associate with VMware data
[29/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2513: VPN tests refer to invalid connection.user in cloudConnection cloudConnection object should always have "user" and "passwd" attributes. And they are "None" while creating userAPIClient. As we already have "user" and "password" for mgmt server. 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/4d0cea66 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4d0cea66 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4d0cea66 Branch: refs/heads/vmware-datamodel Commit: 4d0cea6626923a24a432c25eee8d93da4e4f504b Parents: 046580f Author: Girish Shilamkar Authored: Wed May 15 17:50:43 2013 +0530 Committer: Prasanna Santhanam Committed: Fri May 17 14:05:04 2013 +0530 -- tools/marvin/marvin/cloudstackConnection.py |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4d0cea66/tools/marvin/marvin/cloudstackConnection.py -- diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py index b5ff5bf..e3977dc 100644 --- a/tools/marvin/marvin/cloudstackConnection.py +++ b/tools/marvin/marvin/cloudstackConnection.py @@ -43,10 +43,8 @@ class cloudConnection(object): self.securityKey = securityKey self.mgtSvr = mgtSvr self.port = port -if user: -self.user = user -if passwd: -self.passwd = passwd +self.user = user +self.passwd = passwd self.logging = logging self.path = path self.retries = 5
[40/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-751: 41-42 DB upgrade - insert new global config blacklisted.routes Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7cae8ca2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7cae8ca2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7cae8ca2 Branch: refs/heads/vmware-datamodel Commit: 7cae8ca23102a834509f0277a378e17670992ac6 Parents: 31a6770 Author: Alena Prokharchyk Authored: Fri May 17 15:06:50 2013 -0700 Committer: Alena Prokharchyk Committed: Fri May 17 15:07:21 2013 -0700 -- setup/db/db/schema-410to420.sql |4 1 files changed, 4 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7cae8ca2/setup/db/db/schema-410to420.sql -- diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql index fe66207..c088ac1 100644 --- a/setup/db/db/schema-410to420.sql +++ b/setup/db/db/schema-410to420.sql @@ -1667,6 +1667,10 @@ CREATE TABLE `cloud`.`nic_ip_alias` ( alter table `cloud`.`vpc_gateways` add column network_acl_id bigint unsigned default 1 NOT NULL; update `cloud`.`vpc_gateways` set network_acl_id = 2; + +INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'VpcManager', 'blacklisted.routes', NULL, 'Routes that are blacklisted, can not be used for Static Routes creation for the VPC Private Gateway'); + + -- Re-enable foreign key checking, at the end of the upgrade path SET foreign_key_checks = 1;
[20/50] [abbrv] CLOUDSTACK-2056: DeploymentPlanner choice via ServiceOffering
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a2eb7bab/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java -- diff --git a/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java b/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java index b54b1c1..b6286aa 100755 --- a/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java +++ b/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java @@ -78,7 +78,7 @@ public class FirstFitAllocator extends AdapterBase implements HostAllocator { @Inject ConsoleProxyDao _consoleProxyDao = null; @Inject SecondaryStorageVmDao _secStorgaeVmDao = null; @Inject ConfigurationDao _configDao = null; -@Inject GuestOSDao _guestOSDao = null; +@Inject GuestOSDao _guestOSDao = null; @Inject GuestOSCategoryDao _guestOSCategoryDao = null; @Inject VMInstanceDao _vmInstanceDao = null; @Inject ResourceManager _resourceMgr; @@ -88,17 +88,17 @@ public class FirstFitAllocator extends AdapterBase implements HostAllocator { boolean _checkHvm = true; protected String _allocationAlgorithm = "random"; @Inject CapacityManager _capacityMgr; - - + + @Override public List allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo) { return allocateTo(vmProfile, plan, type, avoid, returnUpTo, true); } - + @Override public List allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo, boolean considerReservedCapacity) { - + long dcId = plan.getDataCenterId(); Long podId = plan.getPodId(); Long clusterId = plan.getClusterId(); @@ -110,19 +110,19 @@ public class FirstFitAllocator extends AdapterBase implements HostAllocator { // FirstFitAllocator should be used for user VMs only since it won't care whether the host is capable of routing or not return new ArrayList(); } - + if(s_logger.isDebugEnabled()){ s_logger.debug("Looking for hosts in dc: " + dcId + " pod:" + podId + " cluster:" + clusterId ); } - + String hostTagOnOffering = offering.getHostTag(); String hostTagOnTemplate = template.getTemplateTag(); - + boolean hasSvcOfferingTag = hostTagOnOffering != null ? true : false; boolean hasTemplateTag = hostTagOnTemplate != null ? true : false; - + List clusterHosts = new ArrayList(); - + String haVmTag = (String)vmProfile.getParameter(VirtualMachineProfile.Param.HaTag); if (haVmTag != null) { clusterHosts = _hostDao.listByHostTag(type, clusterId, podId, dcId, haVmTag); @@ -133,31 +133,31 @@ public class FirstFitAllocator extends AdapterBase implements HostAllocator { List hostsMatchingOfferingTag = new ArrayList(); List hostsMatchingTemplateTag = new ArrayList(); if (hasSvcOfferingTag){ -if (s_logger.isDebugEnabled()){ +if (s_logger.isDebugEnabled()){ s_logger.debug("Looking for hosts having tag specified on SvcOffering:" + hostTagOnOffering); } hostsMatchingOfferingTag = _hostDao.listByHostTag(type, clusterId, podId, dcId, hostTagOnOffering); -if (s_logger.isDebugEnabled()){ +if (s_logger.isDebugEnabled()){ s_logger.debug("Hosts with tag '" + hostTagOnOffering + "' are:" + hostsMatchingOfferingTag); -} +} } if (hasTemplateTag){ -if (s_logger.isDebugEnabled()){ +if (s_logger.isDebugEnabled()){ s_logger.debug("Looking for hosts having tag specified on Template:" + hostTagOnTemplate); } -hostsMatchingTemplateTag = _hostDao.listByHostTag(type, clusterId, podId, dcId, hostTagOnTemplate); -if (s_logger.isDebugEnabled()){ +hostsMatchingTemplateTag = _hostDao.listByHostTag(type, clusterId, podId, dcId, hostTagOnTemplate); +if (s_logger.isDebugEnabled()){ s_logger.debug("Hosts with tag '" + hostTagOnTemplate+"' are:" + hostsMatchingTemplateTag); -} +} } - + if (hasSvcOfferingTag && hasTemplateTag){ hostsMatchingOfferingTag.retainAll(hostsMatchingTemplateTag); -clus
[10/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2529: GlobalLoadBalancerResponse should have the full FQDN for the global load balanced service Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d2d0398e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d2d0398e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d2d0398e Branch: refs/heads/vmware-datamodel Commit: d2d0398e3321b819756a537c0b1fab0491e5a3e6 Parents: 565d829 Author: Murali Reddy Authored: Thu May 16 14:45:49 2013 +0530 Committer: Murali Reddy Committed: Thu May 16 15:19:41 2013 +0530 -- server/src/com/cloud/api/ApiDBUtils.java|5 + server/src/com/cloud/api/ApiResponseHelper.java |3 ++- 2 files changed, 7 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d2d0398e/server/src/com/cloud/api/ApiDBUtils.java -- diff --git a/server/src/com/cloud/api/ApiDBUtils.java b/server/src/com/cloud/api/ApiDBUtils.java index 94c873e..1afedac 100755 --- a/server/src/com/cloud/api/ApiDBUtils.java +++ b/server/src/com/cloud/api/ApiDBUtils.java @@ -1668,4 +1668,9 @@ public class ApiDBUtils { public static List listSiteLoadBalancers(long gslbRuleId) { return _gslbService.listSiteLoadBalancers(gslbRuleId); } + +public static String getDnsNameConfiguredForGslb() { +String providerDnsName = _configDao.getValue(Config.CloudDnsName.key()); +return providerDnsName; +} } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d2d0398e/server/src/com/cloud/api/ApiResponseHelper.java -- diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index 9a70d95..482594d 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -787,7 +787,8 @@ public class ApiResponseHelper implements ResponseGenerator { response.setAlgorithm(globalLoadBalancerRule.getAlgorithm()); response.setStickyMethod(globalLoadBalancerRule.getPersistence()); response.setServiceType(globalLoadBalancerRule.getServiceType()); -response.setServiceDomainName(globalLoadBalancerRule.getGslbDomain()); +response.setServiceDomainName(globalLoadBalancerRule.getGslbDomain() + "." ++ ApiDBUtils.getDnsNameConfiguredForGslb()); response.setName(globalLoadBalancerRule.getName()); response.setDescription(globalLoadBalancerRule.getDescription()); response.setRegionIdId(globalLoadBalancerRule.getRegion());
[45/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter Upgrade changes with legacy zone support Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9424d142 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9424d142 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9424d142 Branch: refs/heads/vmware-datamodel Commit: 9424d142d2b98f5370671d64470e414fa47e2a71 Parents: 6dcff82 Author: Sateesh Chodapuneedi Authored: Mon May 6 15:59:24 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Sun May 19 08:45:49 2013 +0530 -- .../cloud/hypervisor/vmware/VmwareDatacenter.java |4 - .../hypervisor/vmware/VmwareDatacenterVO.java | 12 - .../vmware/manager/VmwareManagerImpl.java |5 +- .../src/com/cloud/upgrade/dao/Upgrade410to420.java | 562 +++ 4 files changed, 565 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9424d142/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenter.java -- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenter.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenter.java index 246b477..b978cd9 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenter.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenter.java @@ -3,14 +3,10 @@ package com.cloud.hypervisor.vmware; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -import com.vmware.vim25.ManagedObjectReference; - public interface VmwareDatacenter extends Identity, InternalIdentity { String getVmwareDatacenterName(); -ManagedObjectReference getVmwareDatacenterMor(); - String getGuid(); String getVcenterHost(); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9424d142/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterVO.java -- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterVO.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterVO.java index aaeccc2..61a531a 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterVO.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterVO.java @@ -11,7 +11,6 @@ import javax.persistence.Table; import com.cloud.utils.NumbersUtil; import com.cloud.utils.db.Encrypt; -import com.vmware.vim25.ManagedObjectReference; /** * VmwareDatacenterVO contains information of Vmware Datacenter associated with a CloudStack zone. @@ -76,17 +75,6 @@ public class VmwareDatacenterVO implements VmwareDatacenter { } @Override -public ManagedObjectReference getVmwareDatacenterMor() { -String morString = guid.split("@")[0]; -ManagedObjectReference mor = new ManagedObjectReference(); - -mor.setType(morString.split(":")[0]); -mor.setValue(morString.split(":")[1]); - -return mor; -} - -@Override public String getVcenterHost() { return vCenterHost; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9424d142/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java -- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java index 3b94537..3e90312 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java @@ -985,8 +985,9 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw // Check if DC is already associated with another cloudstack deployment // Get custom field property cloud.zone over this DC -dcMor = dcMo.getMor(); -guid = dcMor.getType() + ":" + dcMor.getValue() + "@" + vCenterHost; +// dcMor = dcMo.getMor(); +// guid = dcMor.getType() + ":" + dcMor.getValue() + "@" + vCenterHost; +guid = vmwareDcName + "@" + vCenterHost; dcCustomFieldValue = dcMo.getCustomFieldValue(CustomFieldConstants.CLOUD_ZONE); if (dcCustomFieldValue == null) { http://git-wip-us.apache.org/repos/as
[25/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2530: fix npe if no network isolation methods Signed-off-by: Mice Xia Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/973c43a1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/973c43a1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/973c43a1 Branch: refs/heads/vmware-datamodel Commit: 973c43a152d39b85f53428b00f451fba9cb82003 Parents: 3ed9e42 Author: Dave Brosius Authored: Thu May 16 07:16:12 2013 -0500 Committer: Mice Xia Committed: Fri May 17 10:08:07 2013 +0800 -- .../network/ListNetworkIsolationMethodsCmd.java|2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/973c43a1/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkIsolationMethodsCmd.java -- diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkIsolationMethodsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkIsolationMethodsCmd.java index 7eef22a..0d23fd6 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkIsolationMethodsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkIsolationMethodsCmd.java @@ -44,7 +44,7 @@ public class ListNetworkIsolationMethodsCmd extends BaseListCmd{ isolationResponses.add(isolationMethod); } } -response.setResponses(isolationResponses, methods.length); +response.setResponses(isolationResponses, isolationResponses.size()); response.setResponseName(getCommandName()); this.setResponseObject(response);
[12/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2462: Failed to create GSLB rule with "proximity" algorithm add RTT as load balancing method for GSLB vserver Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/33e68391 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/33e68391 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/33e68391 Branch: refs/heads/vmware-datamodel Commit: 33e683915c3083ac60a578fc90a7d90a64cb028e Parents: d2d0398 Author: Murali Reddy Authored: Thu May 16 15:18:02 2013 +0530 Committer: Murali Reddy Committed: Thu May 16 15:19:42 2013 +0530 -- .../cloud/network/resource/NetscalerResource.java | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/33e68391/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java -- diff --git a/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java b/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java index 98e1461..c0d4599 100644 --- a/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java +++ b/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java @@ -1095,7 +1095,15 @@ public class NetscalerResource implements ServerResource { } vserver.set_name(vserverName); -vserver.set_lbmethod(lbMethod); +if ("RoundRobin".equalsIgnoreCase(lbMethod)) { +vserver.set_lbmethod("ROUNDROBIN"); +} else if ("LeastConn".equalsIgnoreCase(lbMethod)) { +vserver.set_lbmethod("LEASTCONNECTION"); +} else if ("Proximity".equalsIgnoreCase(lbMethod)) { +vserver.set_lbmethod("RTT"); +} else { +throw new ExecutionException("Unsupported LB method"); +} vserver.set_persistencetype(persistenceType); if ("SOURCEIP".equalsIgnoreCase(persistenceType)) { vserver.set_persistenceid(persistenceId);
[23/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
cloud-sysvmadm: 1) added -z paramters. If specified, restrict system vm restarts to specific zone. If not specified, the intances will be restarted in all zones. 2) Fixed the help for restartNetwork option. It gets triggered by -n, not -e parameter Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/35de50de Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/35de50de Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/35de50de Branch: refs/heads/vmware-datamodel Commit: 35de50debfadf82dfbec2aab473abeea74fc6248 Parents: 890603b Author: Alena Prokharchyk Authored: Thu May 16 14:26:46 2013 -0700 Committer: Alena Prokharchyk Committed: Thu May 16 17:05:38 2013 -0700 -- setup/bindir/cloud-sysvmadm.in | 50 +++--- 1 files changed, 28 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35de50de/setup/bindir/cloud-sysvmadm.in -- diff --git a/setup/bindir/cloud-sysvmadm.in b/setup/bindir/cloud-sysvmadm.in index 0a7b454..3cb7858 100755 --- a/setup/bindir/cloud-sysvmadm.in +++ b/setup/bindir/cloud-sysvmadm.in @@ -23,7 +23,7 @@ #set -x usage() { - printf "\nThe tool stopping/starting running system vms and domain routers \n\nUsage: %s: [-d] [-u] [-p] [-m] [-s] [-r] [-a] [-t] [-e]\n\n -d - cloud DB server ip address, defaulted to localhost if not specified \n -u - user name to access cloud DB, defaulted to "root" if not specified \n -p - cloud DB user password, defaulted to no password if not specified \n\n -m - the ip address of management server, defaulted to localhost if not specified\n\n -s - stop then start all running SSVMs and Console Proxies \n -r - stop then start all running Virtual Routers\n -a - stop then start all running SSVMs, Console Proxies, and Virtual Routers \n -e - restart all Guest networks \n -t - number of parallel threads used for stopping Domain Routers. Default is 10.\n -l - log file location. Default is cloud.log under current directory.\n\n" $(basename $0) >&2 + printf "\nThe tool stopping/starting running system vms and domain routers \n\nUsage: %s: [-d] [-u] [-p] [-m] [-s] [-r] [-a] [-t] [-n] [-z]\n\n -d - cloud DB server ip address, defaulted to localhost if not specified \n -u - user name to access cloud DB, defaulted to "root" if not specified \n -p - cloud DB user password, defaulted to no password if not specified \n\n -m - the ip address of management server, defaulted to localhost if not specified\n\n -s - stop then start all running SSVMs and Console Proxies \n -r - stop then start all running Virtual Routers\n -a - stop then start all running SSVMs, Console Proxies, and Virtual Routers \n -n - restart all Guest networks \n -t - number of parallel threads used for stopping Domain Routers. Default is 10.\n -l - log file location. Default is cloud.log under current directory.\n -z - do restart only for the instances in the specific zone. If not specified, restart will apply to instances in all zones\n\n" $(basename $0) >&2 } @@ -37,9 +37,12 @@ password= help= maxthreads=10 LOGFILE=cloud.log +zone="" +inzone="" -while getopts 'sarhnd:m:u:p:t:l:' OPTION + +while getopts 'sarhnd:m:u:p:t:l:z:' OPTION do case $OPTION in s)system=1 @@ -63,6 +66,9 @@ do t) maxthreads="$OPTARG" ;; l) LOGFILE="$OPTARG" +;; + z)zone=" AND data_center_id=""$OPTARG" +inzone=" in zone id=""$OPTARG" esac done @@ -70,14 +76,14 @@ done stop_start_system() { -secondary=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select id from vm_instance where state=\"Running\" and type=\"SecondaryStorageVm\""`) -console=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select id from vm_instance where state=\"Running\" and type=\"ConsoleProxy\""`) +secondary=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select id from vm_instance where state=\"Running\" and type=\"SecondaryStorageVm\"$zone"`) +console=(`mysql -h $db --user=$user --password=$password --skip-column-names -U cloud -e "select id from vm_instance where state=\"Running\" and type=\"ConsoleProxy\"$zone"`) length_secondary=(${#secondary[@]}) length_console=(${#console[@]}) -echo -e "\nStopping and starting $length_secondary secondary storage vm(s)..." -echo -e "Stopping and starting $length_secondary secondary storage vm(s)..." >>$LOGFILE +echo -e "\nStopping and starting $length_secondary secondary storage vm(s)$inzone..." +echo -e "Stopping and starting $length_secondary secondary storage vm(s)$inzone..." >>$LOGFILE for d in "${secondary[@]}"; do echo "INFO: S
[11/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2460: fix the event descriptions for create/delete/update/assign global load balancer rule apis Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/565d829c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/565d829c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/565d829c Branch: refs/heads/vmware-datamodel Commit: 565d829c006609251c18883b1007175b6a1d2f79 Parents: 3c51c4e Author: Murali Reddy Authored: Thu May 16 14:25:14 2013 +0530 Committer: Murali Reddy Committed: Thu May 16 15:19:41 2013 +0530 -- api/src/com/cloud/event/EventTypes.java|1 + .../ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java |2 +- .../ha/gslb/CreateGlobalLoadBalancerRuleCmd.java |2 +- .../ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java |4 +- .../ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java | 28 --- 5 files changed, 28 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/565d829c/api/src/com/cloud/event/EventTypes.java -- diff --git a/api/src/com/cloud/event/EventTypes.java b/api/src/com/cloud/event/EventTypes.java index d272c99..e317a8f 100755 --- a/api/src/com/cloud/event/EventTypes.java +++ b/api/src/com/cloud/event/EventTypes.java @@ -134,6 +134,7 @@ public class EventTypes { public static final String EVENT_REMOVE_FROM_GLOBAL_LOAD_BALANCER_RULE = "GLOBAL.LB.REMOVE"; public static final String EVENT_GLOBAL_LOAD_BALANCER_CREATE = "GLOBAL.LB.CREATE"; public static final String EVENT_GLOBAL_LOAD_BALANCER_DELETE = "GLOBAL.LB.DELETE"; +public static final String EVENT_GLOBAL_LOAD_BALANCER_UPDATE = "GLOBAL.LB.UPDATE"; // Account events public static final String EVENT_ACCOUNT_ENABLE = "ACCOUNT.ENABLE"; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/565d829c/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java -- diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java index 1c07a0a..1575cd3 100644 --- a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java @@ -95,7 +95,7 @@ public class AssignToGlobalLoadBalancerRuleCmd extends BaseAsyncCmd { @Override public String getEventDescription() { -return "applying load balancer rules " + StringUtils.join(getLoadBalancerRulesIds(), ",") + +return "assign load balancer rules " + StringUtils.join(getLoadBalancerRulesIds(), ",") + " to global load balancer rule " + getGlobalLoadBalancerRuleId(); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/565d829c/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java -- diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java index 07d3274..ac33495 100644 --- a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java @@ -162,7 +162,7 @@ public class CreateGlobalLoadBalancerRuleCmd extends BaseAsyncCreateCmd { @Override public String getEventDescription() { -return "creating a global load balancer: " + getName() + " for account: " + getAccountName(); +return "creating a global load balancer rule Id: " + getEntityId(); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/565d829c/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java -- diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java index 424b107..fe5decd 100644 --- a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java @@ -77,12 +77,12 @@ public class DeleteGlobalLoadBalancerRuleCmd extends Base
[32/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2483: Fix base.py migrate volume method 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/28c5fbcb Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/28c5fbcb Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/28c5fbcb Branch: refs/heads/vmware-datamodel Commit: 28c5fbcb05750b91a54acfa84f0b59b03c7ce794 Parents: 2867c6a Author: SrikanteswaraRao Talluri Authored: Wed May 15 00:22:32 2013 +0530 Committer: Prasanna Santhanam Committed: Fri May 17 14:24:47 2013 +0530 -- tools/marvin/marvin/integration/lib/base.py |1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/28c5fbcb/tools/marvin/marvin/integration/lib/base.py -- diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py index a811f14..f3a96bd 100755 --- a/tools/marvin/marvin/integration/lib/base.py +++ b/tools/marvin/marvin/integration/lib/base.py @@ -685,6 +685,7 @@ class Volume: timeout = timeout - 1 return +@classmethod def migrate(cls, apiclient, **kwargs): """Migrate a volume""" cmd = migrateVolume.migrateVolumeCmd()
[37/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
rbd: Allow RBD disks to be attached to a Instance Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5646f5e9 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5646f5e9 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5646f5e9 Branch: refs/heads/vmware-datamodel Commit: 5646f5e9772380cc91a8ccb9894c8ed05ffc891f Parents: b3e9b2a Author: Wido den Hollander Authored: Fri May 17 17:03:21 2013 +0200 Committer: Wido den Hollander Committed: Fri May 17 17:34:05 2013 +0200 -- .../kvm/resource/LibvirtComputingResource.java |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5646f5e9/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 c3140d3..b31fb5d 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 @@ -3581,6 +3581,7 @@ ServerResource { List disks = null; Domain dm = null; DiskDef diskdef = null; +KVMStoragePool attachingPool = attachingDisk.getPool(); try { if (!attach) { dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName @@ -3605,7 +3606,12 @@ ServerResource { } } else { diskdef = new DiskDef(); -if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) { +if (attachingPool.getType() == StoragePoolType.RBD) { +diskdef.defNetworkBasedDisk(attachingDisk.getPath(), +attachingPool.getSourceHost(), attachingPool.getSourcePort(), +attachingPool.getAuthUserName(), attachingPool.getUuid(), devId, +DiskDef.diskBus.VIRTIO, diskProtocol.RBD); +} else if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) { diskdef.defFileBasedDisk(attachingDisk.getPath(), devId, DiskDef.diskBus.VIRTIO, DiskDef.diskFmtType.QCOW2); } else if (attachingDisk.getFormat() == PhysicalDiskFormat.RAW) {
[46/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter Plugin, API & DB changes Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fba77137 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fba77137 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fba77137 Branch: refs/heads/vmware-datamodel Commit: fba77137fe5d11175dea37e4cdf9d2917a46a525 Parents: 9424d14 Author: Sateesh Chodapuneedi Authored: Fri May 3 22:38:57 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Sun May 19 08:50:51 2013 +0530 -- .../cloud/hypervisor/vmware/VmwareDatacenter.java |4 .../hypervisor/vmware/VmwareDatacenterVO.java |2 +- 2 files changed, 5 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fba77137/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenter.java -- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenter.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenter.java index b978cd9..246b477 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenter.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenter.java @@ -3,10 +3,14 @@ package com.cloud.hypervisor.vmware; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import com.vmware.vim25.ManagedObjectReference; + public interface VmwareDatacenter extends Identity, InternalIdentity { String getVmwareDatacenterName(); +ManagedObjectReference getVmwareDatacenterMor(); + String getGuid(); String getVcenterHost(); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fba77137/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterVO.java -- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterVO.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterVO.java index 61a531a..9d8fb7d 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterVO.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterVO.java @@ -140,4 +140,4 @@ public class VmwareDatacenterVO implements VmwareDatacenter { this.uuid = UUID.randomUUID().toString(); } -} \ No newline at end of file +}
[39/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-2070: Anti-Affinity - When Vm deployment fails because of not being able to satisfy the anti-affinity rule , user should be provided with more informative message. Changes: - There is no good mechanism currently to figure out if the deployment failed due to affinity groups only - We can just hint the user that the deployment might have failed due to the affinity groups and ask to review the input Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/31a67706 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/31a67706 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/31a67706 Branch: refs/heads/vmware-datamodel Commit: 31a67706e402fc73c592f871291223107ed0c21c Parents: 55c1e28 Author: Prachi Damle Authored: Fri May 17 14:36:23 2013 -0700 Committer: Prachi Damle Committed: Fri May 17 14:36:23 2013 -0700 -- .../InsufficientServerCapacityException.java | 11 + .../api/command/user/vm/DeployVMCmd.java | 11 - .../cloudstack/api/command/user/vm/StartVMCmd.java | 14 +- .../cloud/entity/api/VMEntityManagerImpl.java | 18 - .../com/cloud/vm/VirtualMachineManagerImpl.java| 32 ++ 5 files changed, 72 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/31a67706/api/src/com/cloud/exception/InsufficientServerCapacityException.java -- diff --git a/api/src/com/cloud/exception/InsufficientServerCapacityException.java b/api/src/com/cloud/exception/InsufficientServerCapacityException.java index af34e57..8f889fe 100755 --- a/api/src/com/cloud/exception/InsufficientServerCapacityException.java +++ b/api/src/com/cloud/exception/InsufficientServerCapacityException.java @@ -27,6 +27,8 @@ public class InsufficientServerCapacityException extends InsufficientCapacityExc private static final long serialVersionUID = SerialVersionUID.InsufficientServerCapacityException; +private boolean affinityGroupsApplied = false; + public InsufficientServerCapacityException(String msg, Long clusterId) { this(msg, Cluster.class, clusterId); } @@ -34,4 +36,13 @@ public class InsufficientServerCapacityException extends InsufficientCapacityExc public InsufficientServerCapacityException(String msg, Class scope, Long id) { super(msg, scope, id); } + +public InsufficientServerCapacityException(String msg, Class scope, Long id, boolean affinityGroupsApplied) { +super(msg, scope, id); +this.affinityGroupsApplied = affinityGroupsApplied; +} + +public boolean isAffinityApplied() { +return affinityGroupsApplied; +} } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/31a67706/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java -- diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java index b5cf9f9..63198a4 100755 --- a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java @@ -51,6 +51,7 @@ import com.cloud.dc.DataCenter.NetworkType; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.InsufficientServerCapacityException; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; @@ -424,9 +425,15 @@ public class DeployVMCmd extends BaseAsyncCreateCmd { s_logger.warn("Exception: ", ex); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage()); } catch (InsufficientCapacityException ex) { +StringBuilder message = new StringBuilder(ex.getMessage()); +if (ex instanceof InsufficientServerCapacityException) { + if(((InsufficientServerCapacityException)ex).isAffinityApplied()){ +message.append(", Please check the affinity groups provided, there may not be sufficient capacity to follow them"); +} +} s_logger.info(ex); -s_logger.info(ex.getMessage(), ex); -throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage()); +s_logger.info(message.toString(), ex); +throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, message.toString()); }
[35/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
iCLOUDSTACK-2321 Fix the response of scaleVMCmd Add Scale System vm command Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4eb310e9 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4eb310e9 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4eb310e9 Branch: refs/heads/vmware-datamodel Commit: 4eb310e926771c30515034bb056f71f52afe1a19 Parents: e520ff4 Author: Nitin Mehta Authored: Fri May 17 17:38:21 2013 +0530 Committer: Nitin Mehta Committed: Fri May 17 17:43:43 2013 +0530 -- api/src/com/cloud/event/EventTypes.java|3 + api/src/com/cloud/server/ManagementService.java| 12 +- api/src/com/cloud/vm/UserVmService.java|2 +- .../command/admin/systemvm/ScaleSystemVMCmd.java | 131 +++ .../cloudstack/api/command/user/vm/ScaleVMCmd.java | 23 ++- .../api/command/test/ScaleVMCmdTest.java | 30 +++- client/tomcatconf/commands.properties.in |1 + server/src/com/cloud/server/ManagementServer.java |6 + .../src/com/cloud/server/ManagementServerImpl.java | 47 +++--- server/src/com/cloud/vm/UserVmManager.java |6 +- server/src/com/cloud/vm/UserVmManagerImpl.java | 17 ++- .../test/com/cloud/vm/MockUserVmManagerImpl.java |9 +- 12 files changed, 238 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4eb310e9/api/src/com/cloud/event/EventTypes.java -- diff --git a/api/src/com/cloud/event/EventTypes.java b/api/src/com/cloud/event/EventTypes.java index ee7f5b7..9c83f13 100755 --- a/api/src/com/cloud/event/EventTypes.java +++ b/api/src/com/cloud/event/EventTypes.java @@ -92,6 +92,8 @@ public class EventTypes { public static final String EVENT_PROXY_STOP = "PROXY.STOP"; public static final String EVENT_PROXY_REBOOT = "PROXY.REBOOT"; public static final String EVENT_PROXY_HA = "PROXY.HA"; +public static final String EVENT_PROXY_SCALE = "PROXY.SCALE"; + // VNC Console Events public static final String EVENT_VNC_CONNECT = "VNC.CONNECT"; @@ -213,6 +215,7 @@ public class EventTypes { public static final String EVENT_SSVM_STOP = "SSVM.STOP"; public static final String EVENT_SSVM_REBOOT = "SSVM.REBOOT"; public static final String EVENT_SSVM_HA = "SSVM.HA"; +public static final String EVENT_SSVM_SCALE = "SSVM.SCALE"; // Service Offerings public static final String EVENT_SERVICE_OFFERING_CREATE = "SERVICE.OFFERING.CREATE"; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4eb310e9/api/src/com/cloud/server/ManagementService.java -- diff --git a/api/src/com/cloud/server/ManagementService.java b/api/src/com/cloud/server/ManagementService.java index 59b83c9..24d33d5 100755 --- a/api/src/com/cloud/server/ManagementService.java +++ b/api/src/com/cloud/server/ManagementService.java @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import com.cloud.exception.*; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.command.admin.cluster.ListClustersCmd; import org.apache.cloudstack.api.command.admin.config.ListCfgsByCmd; @@ -34,11 +35,7 @@ import org.apache.cloudstack.api.command.admin.resource.DeleteAlertsCmd; import org.apache.cloudstack.api.command.admin.resource.ListAlertsCmd; import org.apache.cloudstack.api.command.admin.resource.ListCapacityCmd; import org.apache.cloudstack.api.command.admin.resource.UploadCustomCertificateCmd; -import org.apache.cloudstack.api.command.admin.systemvm.DestroySystemVmCmd; -import org.apache.cloudstack.api.command.admin.systemvm.ListSystemVMsCmd; -import org.apache.cloudstack.api.command.admin.systemvm.RebootSystemVmCmd; -import org.apache.cloudstack.api.command.admin.systemvm.StopSystemVmCmd; -import org.apache.cloudstack.api.command.admin.systemvm.UpgradeSystemVMCmd; +import org.apache.cloudstack.api.command.admin.systemvm.*; import org.apache.cloudstack.api.command.admin.vlan.ListVlanIpRangesCmd; import org.apache.cloudstack.api.command.user.address.ListPublicIpAddressesCmd; import org.apache.cloudstack.api.command.user.config.ListCapabilitiesCmd; @@ -64,10 +61,6 @@ import com.cloud.configuration.Configuration; import com.cloud.dc.Pod; import com.cloud.dc.Vlan; import com.cloud.domain.Domain; -import com.cloud.exception.ConcurrentOperationException; -import com.cloud.exception.InternalErrorException; -import com.cloud.exception.PermissionDeniedException; -import com.cloud.exception.ResourceUnavailableException; import com.cloud.host.Host; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.hypervisor.H
[49/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
Fix trailing white spaces. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ac848e44 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ac848e44 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ac848e44 Branch: refs/heads/vmware-datamodel Commit: ac848e4422b84aa957cc2ed1785bc373bd440809 Parents: 4385057 Author: Sateesh Chodapuneedi Authored: Sun May 19 17:22:34 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Sun May 19 17:22:34 2013 +0530 -- .../vmware/VmwareDatacenterZoneMapVO.java |4 ++-- .../hypervisor/vmware/dao/VmwareDatacenterDao.java |8 .../api/command/admin/zone/AddVmwareDcCmd.java |2 +- .../api/command/admin/zone/RemoveVmwareDcCmd.java |4 ++-- .../src/com/cloud/upgrade/dao/Upgrade410to420.java |2 +- 5 files changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac848e44/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterZoneMapVO.java -- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterZoneMapVO.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterZoneMapVO.java index e20386d..df1062b 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterZoneMapVO.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterZoneMapVO.java @@ -56,7 +56,7 @@ public class VmwareDatacenterZoneMapVO implements VmwareDatacenterZoneMap { public long getId() { return id; } - + @Override public long getZoneId() { return zoneId; @@ -74,4 +74,4 @@ public class VmwareDatacenterZoneMapVO implements VmwareDatacenterZoneMap { public void setVsmId(long vmwareDcId) { this.vmwareDcId = vmwareDcId; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac848e44/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/VmwareDatacenterDao.java -- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/VmwareDatacenterDao.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/VmwareDatacenterDao.java index e339604..c3f92ae 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/VmwareDatacenterDao.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/dao/VmwareDatacenterDao.java @@ -8,14 +8,14 @@ import com.cloud.utils.db.GenericDao; public interface VmwareDatacenterDao extends GenericDao { /** - * Return a VMware Datacenter given guid + * Return a VMware Datacenter given guid * @param guid of VMware datacenter * @return VmwareDatacenterVO for the VMware datacenter having the specified guid. */ VmwareDatacenterVO getVmwareDatacenterByGuid(String guid); /** - * Return a VMware Datacenter given name and vCenter host. + * Return a VMware Datacenter given name and vCenter host. * For legacy zones multiple records will be present in the table. * @param name of VMware datacenter * @param vCenter host @@ -34,14 +34,14 @@ public interface VmwareDatacenterDao extends GenericDao listVmwareDatacenterByVcenter(String vCenterHost); /** * Lists all associated VMware datacenter on the management server. - * @return list of VmwareDatacenterVO for all associated VMware datacenters + * @return list of VmwareDatacenterVO for all associated VMware datacenters */ List listAllVmwareDatacenters(); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac848e44/plugins/hypervisors/vmware/src/org/apache/cloudstack/api/command/admin/zone/AddVmwareDcCmd.java -- diff --git a/plugins/hypervisors/vmware/src/org/apache/cloudstack/api/command/admin/zone/AddVmwareDcCmd.java b/plugins/hypervisors/vmware/src/org/apache/cloudstack/api/command/admin/zone/AddVmwareDcCmd.java index 3d9101b..0d9057e 100644 --- a/plugins/hypervisors/vmware/src/org/apache/cloudstack/api/command/admin/zone/AddVmwareDcCmd.java +++ b/plugins/hypervisors/vmware/src/org/apache/cloudstack/api/command/admin/zone/AddVmwareDcCmd.java @@ -75,7 +75,7 @@ public class AddVmwareDcCmd extends BaseCmd { @Override public void execute() { try { -VmwareDatacenterResponse response = new VmwareDatacenterResponse(); +VmwareDatacenterResponse response = new VmwareDatacenterResponse(); VmwareDatacenterVO result = _vmwareDatacenterService.addVmwareDatacenter(this
[47/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
CLOUDSTACK-1963 New mapping model for CloudStack zone and Vmware datacenter Upgrade changes with legacy zone support Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f78c2a3c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f78c2a3c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f78c2a3c Branch: refs/heads/vmware-datamodel Commit: f78c2a3c4e6a6016a2f086a6595f08b84e07a9ae Parents: fba7713 Author: Sateesh Chodapuneedi Authored: Mon May 6 15:59:24 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Sun May 19 08:52:03 2013 +0530 -- .../src/com/cloud/upgrade/dao/Upgrade410to420.java | 160 +++ .../cloud/hypervisor/vmware/VmwareDatacenter.java |4 - 2 files changed, 160 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f78c2a3c/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 c03d377..7baa1ab 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java @@ -18,6 +18,7 @@ package com.cloud.upgrade.dao; import com.cloud.deploy.DeploymentPlanner; +import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; import org.apache.log4j.Logger; @@ -28,6 +29,8 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; +import java.util.ArrayList; +import java.util.List; import java.util.UUID; import com.cloud.network.vpc.NetworkACL; @@ -62,6 +65,7 @@ public class Upgrade410to420 implements DbUpgrade { @Override public void performDataMigration(Connection conn) { upgradeVmwareLabels(conn); +persistLegacyZones(conn); createPlaceHolderNics(conn); updateRemoteAccessVpn(conn); updateSystemVmTemplates(conn); @@ -245,6 +249,162 @@ public class Upgrade410to420 implements DbUpgrade { } } +private void persistLegacyZones(Connection conn) { +List listOfLegacyZones = new ArrayList(); +PreparedStatement pstmt = null; +PreparedStatement clustersQuery = null; +PreparedStatement clusterDetailsQuery = null; +ResultSet rs = null; +ResultSet clusters = null; +ResultSet clusterDetails = null; +ResultSet dcInfo = null; +Long vmwareDcId = 1L; +Long zoneId; +Long clusterId; +String clusterHypervisorType; +boolean legacyZone; +boolean ignoreZone; +Long count; +String dcOfPreviousCluster = null; +String dcOfCurrentCluster = null; +String[] tokens; +String url; +String user; +String password; +String vc = ""; +String dcName = ""; +String guid; + +try { +clustersQuery = conn.prepareStatement("select id, hypervisor_type from `cloud`.`cluster` where removed is NULL"); +pstmt = conn.prepareStatement("select id from `cloud`.`data_center` where removed is NULL"); +rs = pstmt.executeQuery(); + +while (rs.next()) { +zoneId = rs.getLong("id"); +legacyZone = false; +ignoreZone = true; +count = 0L; +// Legacy zone term is meant only for VMware +// Legacy zone is a zone with atleast 2 clusters & with multiple DCs or VCs +clusters = clustersQuery.executeQuery(); +if (!clusters.next()) { +continue; // Ignore the zone without any clusters +} else { +dcOfPreviousCluster = null; +dcOfCurrentCluster = null; +do { +clusterHypervisorType = clusters.getString("hypervisor_type"); +clusterId = clusters.getLong("id"); +if (clusterHypervisorType.equalsIgnoreCase("VMware")) { +ignoreZone = false; +if (count > 0) { +dcOfPreviousCluster = dcOfCurrentCluster; +clusterDetailsQuery = conn.prepareStatement("select value,username,password from `cloud`.`cluster_details` where name='url' and cluster_id=?"); +clusterDetailsQuery
git commit: updated refs/heads/vmware-storage-motion to b837fae
Updated Branches: refs/heads/vmware-storage-motion 5b63a0f78 -> b837fae07 Support for volume live migration across datastores Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b837fae0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b837fae0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b837fae0 Branch: refs/heads/vmware-storage-motion Commit: b837fae076cb9a2282de73699d3c3599e680aa91 Parents: 5b63a0f Author: Sateesh Chodapuneedi Authored: Mon May 20 07:35:46 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Mon May 20 07:35:46 2013 +0530 -- .../hypervisor/vmware/manager/VmwareManager.java |5 + .../vmware/manager/VmwareManagerImpl.java | 31 .../hypervisor/vmware/resource/VmwareResource.java | 61 ++- 3 files changed, 93 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b837fae0/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java -- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java index fb6d3d6..9273143 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java @@ -20,6 +20,7 @@ import java.io.File; import java.util.List; import java.util.Map; +import com.cloud.agent.api.to.VolumeTO; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.hypervisor.vmware.manager.VmwareStorageManager; import com.cloud.hypervisor.vmware.mo.HostMO; @@ -66,4 +67,8 @@ public interface VmwareManager { String getPrivateVSwitchName(long dcId, HypervisorType hypervisorType); public String getRootDiskController(); + +String getVmName(long l); + +String getStoragePoolOfVolume(long volumeId); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b837fae0/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java -- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java index 9f260f1..0d50a2c 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java @@ -35,6 +35,8 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; @@ -45,6 +47,8 @@ import com.cloud.agent.api.Answer; import com.cloud.agent.api.Command; import com.cloud.agent.api.StartupCommand; import com.cloud.agent.api.StartupRoutingCommand; +import com.cloud.agent.api.storage.MigrateVolumeAnswer; +import com.cloud.agent.api.to.VolumeTO; import com.cloud.cluster.ClusterManager; import com.cloud.configuration.Config; import com.cloud.configuration.dao.ConfigurationDao; @@ -79,6 +83,9 @@ import com.cloud.serializer.GsonHelper; import com.cloud.server.ConfigurationServer; import com.cloud.storage.JavaStorageLayer; import com.cloud.storage.StorageLayer; +import com.cloud.storage.StoragePool; +import com.cloud.storage.VolumeVO; +import com.cloud.storage.dao.VolumeDao; import com.cloud.storage.secondary.SecondaryStorageVmManager; import com.cloud.utils.FileUtil; import com.cloud.utils.NumbersUtil; @@ -92,6 +99,8 @@ import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; import com.cloud.utils.ssh.SshHelper; import com.cloud.vm.DomainRouterVO; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; import com.google.gson.Gson; import com.vmware.vim25.AboutInfo; import com.vmware.vim25.HostConnectSpec; @@ -124,6 +133,9 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw @Inject ConfigurationDao _configDao; @Inject ConfigurationServer _configServer; @Inject HypervisorCapabilitiesDao _hvCapabilitiesDao; +@Inject VMInstanceDao _vmDao; +@Inject VolumeDao _volDao; +@Inject DataStoreManager dataStoreMgr; String _mountParent; StorageLayer _storage; @@ -865,4 +877,23 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager,
git commit: updated refs/heads/vmware-datamodel to 8b9f598
Updated Branches: refs/heads/vmware-datamodel d07f87548 -> 8b9f598a0 Minor fixes, removed duplicate entry for a column in schema-410-420. Renamed a method. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8b9f598a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8b9f598a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8b9f598a Branch: refs/heads/vmware-datamodel Commit: 8b9f598a0ff477cf82092cd17a6a53e115ccb9d9 Parents: d07f875 Author: Sateesh Chodapuneedi Authored: Wed May 22 07:10:27 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Wed May 22 07:10:27 2013 +0530 -- .../vmware/VmwareDatacenterZoneMapVO.java |2 +- setup/db/db/schema-410to420.sql|1 - 2 files changed, 1 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8b9f598a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterZoneMapVO.java -- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterZoneMapVO.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterZoneMapVO.java index df1062b..4e2cbe9 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterZoneMapVO.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareDatacenterZoneMapVO.java @@ -71,7 +71,7 @@ public class VmwareDatacenterZoneMapVO implements VmwareDatacenterZoneMap { this.zoneId = zoneId; } -public void setVsmId(long vmwareDcId) { +public void setVmwareDcId(long vmwareDcId) { this.vmwareDcId = vmwareDcId; } } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8b9f598a/setup/db/db/schema-410to420.sql -- diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql index 12d50af..a401e75 100644 --- a/setup/db/db/schema-410to420.sql +++ b/setup/db/db/schema-410to420.sql @@ -1117,7 +1117,6 @@ CREATE VIEW `cloud`.`account_view` AS select account.id, account.uuid, -account.uuid, account.account_name, account.type, account.state,
git commit: updated refs/heads/vmware-datamodel to 96c9937
Updated Branches: refs/heads/vmware-datamodel 8b9f598a0 -> 96c9937d9 Unit tests for zone to vmware datacenter mapping model. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/96c9937d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/96c9937d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/96c9937d Branch: refs/heads/vmware-datamodel Commit: 96c9937d9d14cc06213760a67e2a0caa6004f83c Parents: 8b9f598 Author: Sateesh Chodapuneedi Authored: Wed May 22 07:11:43 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Wed May 22 07:11:43 2013 +0530 -- .../vmware/VmwareDatacenterApiUnitTest.java| 442 +++ 1 files changed, 442 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/96c9937d/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java -- diff --git a/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java b/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java new file mode 100644 index 000..2d69377 --- /dev/null +++ b/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java @@ -0,0 +1,442 @@ +// Licensed to the Apache Software Foundation (ASF) under one + +package com.cloud.hypervisor.vmware; + +import static org.junit.Assert.*; +import static org.mockito.Mockito.when; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import junit.framework.TestCase; + +import org.apache.cloudstack.api.command.admin.zone.AddVmwareDcCmd; +import org.apache.cloudstack.api.command.admin.zone.RemoveVmwareDcCmd; +import org.apache.cloudstack.test.utils.SpringUtils; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.Spy; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.ComponentScan.Filter; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FilterType; +import org.springframework.core.type.classreading.MetadataReader; +import org.springframework.core.type.classreading.MetadataReaderFactory; +import org.springframework.core.type.filter.TypeFilter; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.support.AnnotationConfigContextLoader; + +import com.cloud.agent.AgentManager; +import com.cloud.cluster.ClusterManager; +import com.cloud.configuration.dao.ConfigurationDao; +import com.cloud.dc.ClusterDetailsDao; +import com.cloud.dc.ClusterDetailsVO; +import com.cloud.dc.DataCenter.NetworkType; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.HostPodVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.dao.ClusterVSMMapDao; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.dc.dao.HostPodDao; +import com.cloud.event.dao.EventDao; +import com.cloud.exception.DiscoveryException; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.ResourceInUseException; +import com.cloud.host.dao.HostDao; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.hypervisor.dao.HypervisorCapabilitiesDao; +import com.cloud.hypervisor.vmware.dao.VmwareDatacenterDao; +import com.cloud.hypervisor.vmware.dao.VmwareDatacenterZoneMapDao; +import com.cloud.hypervisor.vmware.manager.VmwareManager; +import com.cloud.hypervisor.vmware.manager.VmwareManagerImpl; +import com.cloud.network.NetworkModel; +import com.cloud.network.dao.CiscoNexusVSMDeviceDao; +import com.cloud.org.Cluster.ClusterType; +import com.cloud.org.Managed.ManagedState; +import com.cloud.secstorage.CommandExecLogDao; +import com.cloud.server.ConfigurationServer; +import com.cloud.storage.secondary.SecondaryStorageVmManager; +import com.cloud.user.Account; +import com.cloud.user.AccountManager; +import com.cloud.user.AccountService; +import com.cloud.user.AccountVO; +import com.cloud.user.UserContext; +import com.cloud.user.dao.AccountDao; +import com.cloud.utils.component.ComponentContext; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.vm.dao.UserVmDao; + +/* +public class VmwareManagerTest { + +@Spy VmwareManagerImpl _mgr = new VmwareManagerImpl() { +@Overr
git commit: updated refs/heads/vmware-datamodel to 45d7b9f
Updated Branches: refs/heads/vmware-datamodel 96c9937d9 -> 45d7b9fdb Cleanup Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/45d7b9fd Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/45d7b9fd Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/45d7b9fd Branch: refs/heads/vmware-datamodel Commit: 45d7b9fdb3ccb5f000e6c265f18cfcfefa72afce Parents: 96c9937 Author: Sateesh Chodapuneedi Authored: Wed May 22 07:13:55 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Wed May 22 07:13:55 2013 +0530 -- .../vmware/VmwareDatacenterApiUnitTest.java| 56 --- 1 files changed, 0 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/45d7b9fd/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java -- diff --git a/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java b/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java index 2d69377..7e68e6e 100644 --- a/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java +++ b/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java @@ -78,62 +78,6 @@ import com.cloud.utils.component.ComponentContext; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.vm.dao.UserVmDao; -/* -public class VmwareManagerTest { - -@Spy VmwareManagerImpl _mgr = new VmwareManagerImpl() { -@Override -public VmwareHypervisorHost getHyperHost(VmwareContext context, Command cmd) { -return hyperHost; -} -}; - -@Mock VmwareContext context; -@Mock ScaleVmCommand cmd; -@Mock VirtualMachineTO vmSpec; -@Mock -VmwareHypervisorHost hyperHost; -@Mock VirtualMachineMO vmMo; -@Mock VirtualMachineConfigSpec vmConfigSpec; - -@Before -public void setup(){ -MockitoAnnotations.initMocks(this); -doReturn(context).when(_resource).getServiceContext(null); -when(cmd.getVirtualMachine()).thenReturn(vmSpec); -} -//Test successful scaling up the vm -@Test -public void testScaleVMF1() throws Exception { -when(_resource.getHyperHost(context, null)).thenReturn(hyperHost); -doReturn("i-2-3-VM").when(cmd).getVmName(); -when(hyperHost.findVmOnHyperHost("i-2-3-VM")).thenReturn(vmMo); -doReturn(1024L).when(vmSpec).getMinRam(); -doReturn(1).when(vmSpec).getCpus(); -doReturn(1000).when(vmSpec).getSpeed(); -doReturn(1024L).when(vmSpec).getMaxRam(); -doReturn(false).when(vmSpec).getLimitCpuUse(); -when(vmMo.configureVm(vmConfigSpec)).thenReturn(true); - -ScaleVmAnswer answer = _resource.execute(cmd); -verify(_resource).execute(cmd); -} -@Before -public void setUp() throws Exception { -} - -@After -public void tearDown() throws Exception { -} - -@Test -public void test() { -fail("Not yet implemented"); -} - -} -*/ - @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(loader = AnnotationConfigContextLoader.class) public class VmwareDatacenterApiUnitTest {
git commit: updated refs/heads/vmware-datamodel to b77facf
Updated Branches: refs/heads/vmware-datamodel 45d7b9fdb -> b77facffa Removed mock for VmwareManager Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b77facff Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b77facff Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b77facff Branch: refs/heads/vmware-datamodel Commit: b77facffacf3672ef93c07b3e991309fab909e8a Parents: 45d7b9f Author: Sateesh Chodapuneedi Authored: Wed May 22 09:22:00 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Wed May 22 09:22:00 2013 +0530 -- .../vmware/VmwareDatacenterApiUnitTest.java|5 - 1 files changed, 0 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b77facff/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java -- diff --git a/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java b/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java index 7e68e6e..6ff4e47 100644 --- a/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java +++ b/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java @@ -265,11 +265,6 @@ public class VmwareDatacenterApiUnitTest { } @Bean -public VmwareManager vmwareManager() { -return Mockito.mock(VmwareManager.class); -} - -@Bean public AccountService accountService() { return Mockito.mock(AccountService.class); }
git commit: updated refs/heads/vmware-datamodel to dc4aef9
Updated Branches: refs/heads/vmware-datamodel b77facffa -> dc4aef9b7 Added tests for removal of VMware dc from cloudstack zone. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dc4aef9b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dc4aef9b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dc4aef9b Branch: refs/heads/vmware-datamodel Commit: dc4aef9b7eceb1e3b7c8ca4dc94b8f8a20fee361 Parents: b77facf Author: Sateesh Chodapuneedi Authored: Wed May 22 13:03:31 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Wed May 22 13:03:31 2013 +0530 -- .../vmware/manager/VmwareManagerImpl.java |1 - .../vmware/VmwareDatacenterApiUnitTest.java| 80 ++- 2 files changed, 52 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dc4aef9b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java -- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java index 21c6cda..4462037 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java @@ -1102,7 +1102,6 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw if (zone == null) { InvalidParameterValueException ex = new InvalidParameterValueException( "Can't find zone by the id specified"); -ex.addProxyObject(zone, zoneId, "dcId"); throw ex; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dc4aef9b/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java -- diff --git a/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java b/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java index 6ff4e47..ff98556 100644 --- a/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java +++ b/plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java @@ -24,6 +24,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; import org.mockito.Spy; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @@ -103,6 +104,9 @@ public class VmwareDatacenterApiUnitTest { @Inject ClusterDetailsDao _clusterDetailsDao; +@Inject +ConfigurationDao _configDao; + @Inject AccountDao _accountDao; @@ -110,6 +114,7 @@ public class VmwareDatacenterApiUnitTest { AccountManager _acctMgr; long zoneId; +long podId; long clusterId; long vmwareDcId; private static long domainId = 5L; @@ -120,8 +125,7 @@ public class VmwareDatacenterApiUnitTest { private static String user = "administrator"; private static String password = "password"; private static String guid = vmwareDcName + "@" + vCenterHost; -private static AddVmwareDcCmd addCmd; -private static RemoveVmwareDcCmd removeCmd; + private static VmwareDatacenterVO dc; private static List vmwareDcs; private static ClusterVO cluster; @@ -129,21 +133,27 @@ public class VmwareDatacenterApiUnitTest { private static List clusterList; private static ClusterDetailsVO clusterDetails; +@Mock +private static AddVmwareDcCmd addCmd; +@Mock +private static RemoveVmwareDcCmd removeCmd; + @BeforeClass public static void setUp() throws ConfigurationException { } @Before public void testSetUp() { +Mockito.when(_configDao.isPremium()).thenReturn(true); ComponentContext.initComponentsLifeCycle(); +MockitoAnnotations.initMocks(this); DataCenterVO zone = new DataCenterVO(UUID.randomUUID().toString(), "test", "8.8.8.8", null, "10.0.0.1", null, "10.0.0.1/24", null, null, NetworkType.Basic, null, null, true, true, null, null); -zone = _dcDao.persist(zone); -zoneId = zone.getId(); +zoneId = 1L; HostPodVO pod = new HostPodVO(UUID.randomUUID().toString(), zoneId, "192.168.56.1", "192.168.56.0/24"
[01/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
Updated Branches: refs/heads/vmware-datamodel dc4aef9b7 -> 8996ea386 CLOUDSTACK-2576. AWS API not returning values in CFSimpleXML Object format. PHP SDK calls the CFSimpleXML parser class to parse the response body into CFSimpleXML Object format. In AWSAPI added an XML declaration during serialization of Axis beans to XML output Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8986e16e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8986e16e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8986e16e Branch: refs/heads/vmware-datamodel Commit: 8986e16e5f9f59fdf222704ec9716b9b821bdea8 Parents: a2fea4d Author: Likitha Shetty Authored: Mon May 20 14:51:20 2013 +0530 Committer: Likitha Shetty Committed: Mon May 20 15:01:57 2013 +0530 -- .../com/cloud/bridge/service/EC2RestServlet.java |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8986e16e/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java -- diff --git a/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java b/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java index 630e16f..6dd7a8c 100644 --- a/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java +++ b/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java @@ -2043,8 +2043,9 @@ public class EC2RestServlet extends HttpServlet { throws ADBException, XMLStreamException, IOException { OutputStream os = response.getOutputStream(); response.setStatus(200); -response.setContentType("text/xml; charset=UTF-8"); +response.setContentType("text/xml"); XMLStreamWriter xmlWriter = xmlOutFactory.createXMLStreamWriter( os ); +xmlWriter.writeStartDocument("UTF-8","1.0"); MTOMAwareXMLSerializer MTOMWriter = new MTOMAwareXMLSerializer( xmlWriter ); MTOMWriter.setDefaultNamespace("http://ec2.amazonaws.com/doc/"; + wsdlVersion + "/"); EC2Response.serialize( null, factory, MTOMWriter );
[05/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
migrate only when hosts are available Identify the hosts that are suitable for migration before proceeding with migrateVM 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/e1ad36bc Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e1ad36bc Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e1ad36bc Branch: refs/heads/vmware-datamodel Commit: e1ad36bccb70a9f73de1d06b408043a93876195c Parents: 92e6352 Author: Prasanna Santhanam Authored: Mon May 20 17:51:18 2013 +0530 Committer: Prasanna Santhanam Committed: Mon May 20 17:51:50 2013 +0530 -- test/integration/smoke/test_vm_life_cycle.py | 131 +++-- 1 files changed, 66 insertions(+), 65 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e1ad36bc/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 21c2635..3f7c17b 100644 --- a/test/integration/smoke/test_vm_life_cycle.py +++ b/test/integration/smoke/test_vm_life_cycle.py @@ -135,35 +135,34 @@ class TestDeployVM(cloudstackTestCase): cls.apiclient = super(TestDeployVM, cls).getClsTestClient().getApiClient() # Get Zone, Domain and templates domain = get_domain(cls.apiclient, cls.services) -zone = get_zone(cls.apiclient, cls.services) -cls.services['mode'] = zone.networktype +cls.zone = get_zone(cls.apiclient, cls.services) +cls.services['mode'] = cls.zone.networktype #If local storage is enabled, alter the offerings to use localstorage #this step is needed for devcloud -if zone.localstorageenabled == True: +if cls.zone.localstorageenabled == True: cls.services["service_offerings"]["tiny"]["storagetype"] = 'local' cls.services["service_offerings"]["small"]["storagetype"] = 'local' cls.services["service_offerings"]["medium"]["storagetype"] = 'local' template = get_template( cls.apiclient, -zone.id, +cls.zone.id, cls.services["ostype"] ) # Set Zones and disk offerings -cls.services["small"]["zoneid"] = zone.id +cls.services["small"]["zoneid"] = cls.zone.id cls.services["small"]["template"] = template.id -cls.services["medium"]["zoneid"] = zone.id +cls.services["medium"]["zoneid"] = cls.zone.id cls.services["medium"]["template"] = template.id -cls.services["iso"]["zoneid"] = zone.id +cls.services["iso"]["zoneid"] = cls.zone.id cls.account = Account.create( cls.apiclient, cls.services["account"], domainid=domain.id ) -cls.debug(str("" )) cls.debug(cls.account.id) cls.service_offering = ServiceOffering.create( @@ -811,68 +810,76 @@ class TestVMLifeCycle(cloudstackTestCase): """Test migrate VM """ # Validate the following -# 1. Should be able to login to the VM. -# 2. listVM command should return this VM.State of this VM -#should be "Running" and the host should be the host -#to which the VM was migrated to +# 1. Environment has enough hosts for migration +# 2. DeployVM on suitable host (with another host in the cluster) +# 3. Migrate the VM and assert migration successful hosts = Host.list( - self.apiclient, - zoneid=self.medium_virtual_machine.zoneid, - type='Routing' - ) - +self.apiclient, +zoneid=self.zone.id, +type='Routing' +) self.assertEqual( - isinstance(hosts, list), - True, - "Check the number of hosts in the zone" - ) +isinstance(hosts, list), +True, +"Check the number of hosts in the zone" +) self.assertGreaterEqual( -len(hosts), -2, -"Atleast 2 hosts should be present in a zone for VM migration" -) -# Remove the host of current VM from the hosts list -hosts[:] = [host for host in hosts if host.id != self.medium_virtual_machine.hostid] +len(hosts), +2, +"Atleast 2 hosts should be present for VM migration" +) -host = hosts[0] +#identify suitable host +clusters = [h.clusterid for h in hosts] +#fin
[03/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2085: DMC enable guest scaling When dmc is enabled allow cloudstack to scale the VM between dynamic ranges. This requires a further commit where there is enough memory available between dynamic-max and static-max for the VM to scale under memory pressure. See the TODO in Xenserver56FP1Resource.java 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/8da7ec05 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8da7ec05 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8da7ec05 Branch: refs/heads/vmware-datamodel Commit: 8da7ec05f1c7dae0aab827ae0568e120111c6579 Parents: 2778486 Author: Prasanna Santhanam Authored: Mon May 20 17:48:07 2013 +0530 Committer: Prasanna Santhanam Committed: Mon May 20 17:51:49 2013 +0530 -- .../xen/resource/CitrixResourceBase.java | 11 +++ .../hypervisor/xen/resource/XcpServerResource.java |9 ++- .../xen/resource/XenServer56FP1Resource.java | 71 +-- 3 files changed, 64 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8da7ec05/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java -- diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index 19444cc..cd49773 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -3523,6 +3523,17 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe vm.setMemoryLimits(conn, mem_128m, maxMemsize, minMemsize, maxMemsize); } +/** + * When Dynamic Memory Control (DMC) is enabled - + * xen allows scaling the guest memory while the guest is running + * + * By default this is disallowed, override the specific xen resource + * if this is enabled + */ +protected boolean isDmcEnabled(Connection conn, Host host) throws XenAPIException, XmlRpcException { +return false; +} + protected void waitForTask(Connection c, Task task, long pollInterval, long timeout) throws XenAPIException, XmlRpcException { long beginTime = System.currentTimeMillis(); while (task.getStatus(c) == Types.TaskStatusType.PENDING) { http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8da7ec05/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java -- diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java index bf0a408..67e37d52 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java @@ -24,6 +24,7 @@ import com.cloud.resource.ServerResource; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; import com.xensource.xenapi.Connection; +import com.xensource.xenapi.Host; import com.xensource.xenapi.Types.XenAPIException; import com.xensource.xenapi.VM; import org.apache.log4j.Logger; @@ -38,7 +39,6 @@ import java.util.List; public class XcpServerResource extends CitrixResourceBase { private final static Logger s_logger = Logger.getLogger(XcpServerResource.class); private static final long mem_32m = 33554432L; - private String version; public XcpServerResource() { @@ -148,4 +148,11 @@ public class XcpServerResource extends CitrixResourceBase { } vm.setMemoryLimits(conn, mem_32m, maxMemsize, minMemsize, maxMemsize); } + +@Override +protected boolean isDmcEnabled(Connection conn, Host host) { +//Dynamic Memory Control (DMC) is a technology provided by Xen Cloud Platform (XCP), starting from the 0.5 release +//For the supported XCPs dmc is default enabled, XCP 1.0.0, 1.1.0, 1.4.x, 1.5 beta, 1.6.x; +return true; +} } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8da7ec05/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java -- diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java index ad412c1..78ad236 100644 -
[06/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
LDAP moved to regression suite. LDAP requires a Directory server which isn't available by default in most environments. Moving this to the regression suite so it can be run on demand. 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/32e7ba23 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/32e7ba23 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/32e7ba23 Branch: refs/heads/vmware-datamodel Commit: 32e7ba23a3bd514f7b4026b522913def406383c1 Parents: e1ad36b Author: Prasanna Santhanam Authored: Mon May 20 17:59:19 2013 +0530 Committer: Prasanna Santhanam Committed: Mon May 20 17:59:19 2013 +0530 -- test/integration/component/test_ldap.py | 365 ++ test/integration/smoke/test_ldap.py | 365 -- 2 files changed, 365 insertions(+), 365 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/32e7ba23/test/integration/component/test_ldap.py -- diff --git a/test/integration/component/test_ldap.py b/test/integration/component/test_ldap.py new file mode 100755 index 000..1b933db --- /dev/null +++ b/test/integration/component/test_ldap.py @@ -0,0 +1,365 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +""" P1 for LDAP Config +""" + + +#!/usr/bin/env python + +import marvin +from marvin import cloudstackTestCase +from marvin.cloudstackTestCase import * +import unittest +import hashlib +import random +from marvin.cloudstackAPI import * +from marvin.cloudstackAPI import login +from marvin.integration.lib.utils import * +from marvin.integration.lib.base import * +from marvin.integration.lib.common import * +from nose.plugins.attrib import attr +import urllib + + + +class Services: +"""Test LDAP Configuration +""" + +def __init__(self): +self.services = { +"account": { +"email": "t...@test.com", +"firstname": "test", +"lastname": "t", +"username": "test", +"password": "password", +}, +"ldapCon_1":#valid values&Query filter as email. +{ +"ldapHostname": "10.147.38.163", +"port": "389", +"binddn": "CN=test,CN=Users,DC=hyd-qa,DC=com", +"bindpass": "_", +"queryfilter": "(&(mail=%e))", +"searchbase": "CN=Users,DC=hyd-qa,DC=com", +"ldapusername": "test", +"ldappasswd": "_" +}, +"ldapCon_2": ##valid values&Query filter as displayName. +{ +"ldapHostname": "10.147.38.163", +"port": "389", +"binddn": "CN=test,CN=Users,DC=hyd-qa,DC=com", +"bindpass": "_", +"queryfilter": "(&(displayName=%u))", +"searchbase": "CN=Users,DC=hyd-qa,DC=com", +"ldapusername": "test", +"ldappasswd": "_" +}, +"ldapCon_3": #Configuration with missing parameters value(queryfilter) +{ +"ldapHostname": "10.147.38.163", +"port": "389", +"binddn": "CN=test,CN=Users,DC=hyd-qa,DC=com", +"bindpass": "_", +"queryfilter": "", +"searchbase": "CN=Users,DC=hyd-qa,DC=com", +"ldapusername": "test", +"ldappasswd": "_" +}, + +"ldapCon_4": #invalid configuration-wrong query filter +{ +"ldapHostname": "10.147.38.163", +"port": "389", +"binddn": "CN=test,CN=Users,DC=hyd-qa,DC=com", +"bindpass": "_", +"queryfilt
[07/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2553: Made ACL item action case-insensitive Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/612afbd1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/612afbd1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/612afbd1 Branch: refs/heads/vmware-datamodel Commit: 612afbd17941ee840b1bba3e5951f89cafeea243 Parents: 32e7ba2 Author: Kishan Kavala Authored: Mon May 20 17:58:14 2013 +0530 Committer: Kishan Kavala Committed: Mon May 20 18:06:12 2013 +0530 -- .../cloud/network/vpc/NetworkACLServiceImpl.java |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/612afbd1/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java -- diff --git a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java index 4d5d981..2b02a88 100644 --- a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java +++ b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java @@ -342,9 +342,7 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ //Check ofr valid action Allow/Deny if(action != null){ -try { -NetworkACLItem.Action.valueOf(action); -} catch (IllegalArgumentException ex) { +if(!("Allow".equalsIgnoreCase(action) || "Deny".equalsIgnoreCase(action))){ throw new InvalidParameterValueException("Invalid action. Allowed actions are Allow and Deny"); } }
[02/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
Detect the second zone for copyImage operation When copying templates and ISOs detect that a second zone is available. Else skip the test. 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/92e63522 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/92e63522 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/92e63522 Branch: refs/heads/vmware-datamodel Commit: 92e635228731fb72461e757f523cd20fefcd370b Parents: 8da7ec0 Author: Prasanna Santhanam Authored: Mon May 20 17:50:32 2013 +0530 Committer: Prasanna Santhanam Committed: Mon May 20 17:51:49 2013 +0530 -- test/integration/smoke/test_iso.py | 10 ++ test/integration/smoke/test_templates.py | 11 +++ 2 files changed, 13 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/92e63522/test/integration/smoke/test_iso.py -- diff --git a/test/integration/smoke/test_iso.py b/test/integration/smoke/test_iso.py index ad4a8f2..c645d3b 100644 --- a/test/integration/smoke/test_iso.py +++ b/test/integration/smoke/test_iso.py @@ -202,11 +202,9 @@ class TestISO(cloudstackTestCase): cls.services["sourcezoneid"] = cls.zone.id #populate second zone id for iso copy cmd = listZones.listZonesCmd() -zones = cls.api_client.listZones(cmd) -if not isinstance(zones, list): +cls.zones = cls.api_client.listZones(cmd) +if not isinstance(cls.zones, list): raise Exception("Failed to find zones.") -if len(zones) >= 2: -cls.services["destzoneid"] = zones[1].id #Create an account, ISOs etc. cls.account = Account.create( @@ -484,6 +482,10 @@ class TestISO(cloudstackTestCase): #Validate the following #1. copy ISO should be successful and secondary storage # should contain new copied ISO. +if len(self.zones) <= 1: +self.skipTest("Not enough zones available to perform copy template") + +self.services["destzoneid"] = filter(lambda z: z.id != self.zone.id, self.zones)[0] self.debug("Copy ISO from %s to %s" % ( self.zone.id, http://git-wip-us.apache.org/repos/asf/cloudstack/blob/92e63522/test/integration/smoke/test_templates.py -- diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py index 382f56f..8b83f5e 100644 --- a/test/integration/smoke/test_templates.py +++ b/test/integration/smoke/test_templates.py @@ -295,11 +295,9 @@ class TestTemplates(cloudstackTestCase): cls.services['mode'] = cls.zone.networktype #populate second zone id for iso copy cmd = listZones.listZonesCmd() -zones = cls.api_client.listZones(cmd) -if not isinstance(zones, list): +cls.zones = cls.api_client.listZones(cmd) +if not isinstance(cls.zones, list): raise Exception("Failed to find zones.") -if len(zones) >= 2: -cls.services["destzoneid"] = zones[1].id cls.disk_offering = DiskOffering.create( cls.api_client, @@ -664,6 +662,11 @@ class TestTemplates(cloudstackTestCase): # 1. copy template should be successful and #secondary storage should contain new copied template. +if len(self.zones) <= 1: +self.skipTest("Not enough zones available to perform copy template") + +self.services["destzoneid"] = filter(lambda z: z.id != self.services["sourcezoneid"], self.zones)[0] + self.debug("Copy template from Zone: %s to %s" % ( self.services["sourcezoneid"], self.services["destzoneid"]
[08/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2379: Fix for issue destroy vm causing NPE. Made the following changes. 1. Made a fix to make sure a null object is added to the exception. 2. Also fixed the marvin test cases for the feature. Account cleanup will remove the vms deployed for the account. There is no need to explicitly delete the vms for the account. 3. Fixed the assertion checks for the vm created for an account. If there are multiple vms for an account, the test script needs to compare the ids with the correct instance. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f5c8e386 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f5c8e386 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f5c8e386 Branch: refs/heads/vmware-datamodel Commit: f5c8e386e5881c1d7aad1f85922752621bb96c1a Parents: 612afbd Author: Devdeep Singh Authored: Mon May 20 18:26:50 2013 +0530 Committer: Devdeep Singh Committed: Mon May 20 18:26:50 2013 +0530 -- server/src/com/cloud/vm/UserVmManagerImpl.java |1 - .../smoke/test_deploy_vm_with_userdata.py |8 2 files changed, 4 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5c8e386/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 05ff6aa..86150a2 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -3228,7 +3228,6 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use if (vm == null || vm.getRemoved() != null) { InvalidParameterValueException ex = new InvalidParameterValueException( "Unable to find a virtual machine with specified vmId"); -ex.addProxyObject(vm, vmId, "vmId"); throw ex; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5c8e386/test/integration/smoke/test_deploy_vm_with_userdata.py -- diff --git a/test/integration/smoke/test_deploy_vm_with_userdata.py b/test/integration/smoke/test_deploy_vm_with_userdata.py index 8ca9bd0..260106c 100644 --- a/test/integration/smoke/test_deploy_vm_with_userdata.py +++ b/test/integration/smoke/test_deploy_vm_with_userdata.py @@ -105,13 +105,13 @@ class TestDeployVmWithUserData(cloudstackTestCase): vms = list_virtual_machines( self.apiClient, account=self.account.name, -domainid=self.account.domainid +domainid=self.account.domainid, +id=deployVmResponse.id ) self.assert_(len(vms) > 0, "There are no Vms deployed in the account %s" % self.account.name) vm = vms[0] self.assert_(vm.id == str(deployVmResponse.id), "Vm deployed is different from the test") self.assert_(vm.state == "Running", "VM is not in Running state") -self.cleanup.append(deployVmResponse) @attr(tags=["simulator", "devcloud", "basic", "advanced"]) def test_deployvm_userdata(self): @@ -129,13 +129,13 @@ class TestDeployVmWithUserData(cloudstackTestCase): vms = list_virtual_machines( self.apiClient, account=self.account.name, -domainid=self.account.domainid +domainid=self.account.domainid, +id=deployVmResponse.id ) self.assert_(len(vms) > 0, "There are no Vms deployed in the account %s" % self.account.name) vm = vms[0] self.assert_(vm.id == str(deployVmResponse.id), "Vm deployed is different from the test") self.assert_(vm.state == "Running", "VM is not in Running state") -self.cleanup.append(deployVmResponse) @classmethod def tearDownClass(cls):
[24/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
code compares Long values with == which will work for Long cached values Fixed by switch to use .equals 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/49faa002 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/49faa002 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/49faa002 Branch: refs/heads/vmware-datamodel Commit: 49faa002e220311f10a5f3fad66a22836dad Parents: 45d2e60 Author: Dave Brosius Authored: Tue May 21 11:45:10 2013 +0530 Committer: Prasanna Santhanam Committed: Tue May 21 11:45:10 2013 +0530 -- .../subsystem/api/storage/AbstractScope.java |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/49faa002/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/AbstractScope.java -- diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/AbstractScope.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/AbstractScope.java index c94db66..083b1fe 100644 --- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/AbstractScope.java +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/AbstractScope.java @@ -21,10 +21,6 @@ package org.apache.cloudstack.engine.subsystem.api.storage; public abstract class AbstractScope implements Scope { @Override public boolean isSameScope(Scope scope) { -if (this.getScopeType() == scope.getScopeType() && this.getScopeId() == scope.getScopeId()) { -return true; -} else { -return false; -} +return this.getScopeType() == scope.getScopeType() && this.getScopeId().equals(scope.getScopeId()); } }
[23/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
Nop assignment due to missing 'this.' 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/45d2e606 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/45d2e606 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/45d2e606 Branch: refs/heads/vmware-datamodel Commit: 45d2e60656a7c9b2b4171bc63450afa229ca4e75 Parents: 5033921 Author: Dave Brosius Authored: Tue May 21 11:42:53 2013 +0530 Committer: Prasanna Santhanam Committed: Tue May 21 11:43:25 2013 +0530 -- .../network/dao/ExternalLoadBalancerDeviceVO.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/45d2e606/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceVO.java -- diff --git a/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceVO.java b/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceVO.java index 04714a6..c1c9834 100644 --- a/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceVO.java +++ b/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceVO.java @@ -198,7 +198,7 @@ public class ExternalLoadBalancerDeviceVO implements InternalIdentity, Identity } public void setGslbProvider(boolean gslbProvider) { -gslbProvider = gslbProvider; +this.gslbProvider = gslbProvider; } public void setGslbSitePublicIP(String gslbSitePublicIP) {
[12/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
Fixing TestVMLifeCycle class Missed the reference to zone listed in setUpClass() 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/145a116c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/145a116c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/145a116c Branch: refs/heads/vmware-datamodel Commit: 145a116c9bbe69e3c5cb026ce9d659f449137d30 Parents: aa60105 Author: Prasanna Santhanam Authored: Mon May 20 22:05:07 2013 +0530 Committer: Prasanna Santhanam Committed: Mon May 20 22:05:53 2013 +0530 -- test/integration/smoke/test_vm_life_cycle.py | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/145a116c/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 3f7c17b..d52ed9b 100644 --- a/test/integration/smoke/test_vm_life_cycle.py +++ b/test/integration/smoke/test_vm_life_cycle.py @@ -292,28 +292,28 @@ class TestVMLifeCycle(cloudstackTestCase): # Get Zone, Domain and templates domain = get_domain(cls.api_client, cls.services) -zone = get_zone(cls.api_client, cls.services) -cls.services['mode'] = zone.networktype +cls.zone = get_zone(cls.api_client, cls.services) +cls.services['mode'] = cls.zone.networktype #if local storage is enabled, alter the offerings to use localstorage #this step is needed for devcloud -if zone.localstorageenabled == True: +if cls.zone.localstorageenabled == True: cls.services["service_offerings"]["tiny"]["storagetype"] = 'local' cls.services["service_offerings"]["small"]["storagetype"] = 'local' cls.services["service_offerings"]["medium"]["storagetype"] = 'local' template = get_template( cls.api_client, -zone.id, +cls.zone.id, cls.services["ostype"] ) # Set Zones and disk offerings -cls.services["small"]["zoneid"] = zone.id +cls.services["small"]["zoneid"] = cls.zone.id cls.services["small"]["template"] = template.id -cls.services["medium"]["zoneid"] = zone.id +cls.services["medium"]["zoneid"] = cls.zone.id cls.services["medium"]["template"] = template.id -cls.services["iso"]["zoneid"] = zone.id +cls.services["iso"]["zoneid"] = cls.zone.id # Create VMs, NAT Rules etc cls.account = Account.create(
[21/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
PVLAN: CLOUDSTACK-2401: VM Migration support Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/eb7c3214 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/eb7c3214 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/eb7c3214 Branch: refs/heads/vmware-datamodel Commit: eb7c3214260371b0551040831ad7404f5880fc8d Parents: 7260e8d Author: Sheng Yang Authored: Fri May 3 11:02:44 2013 -0700 Committer: Sheng Yang Committed: Mon May 20 16:43:24 2013 -0700 -- .../network/element/VirtualRouterElement.java | 70 ++- .../router/VirtualNetworkApplianceManager.java |2 +- .../router/VirtualNetworkApplianceManagerImpl.java | 32 +--- server/src/com/cloud/vm/UserVmManager.java |1 + server/src/com/cloud/vm/UserVmManagerImpl.java | 13 ++- .../test/com/cloud/vm/MockUserVmManagerImpl.java |6 ++ .../vpc/MockVpcVirtualNetworkApplianceManager.java |6 ++ 7 files changed, 110 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb7c3214/server/src/com/cloud/network/element/VirtualRouterElement.java -- diff --git a/server/src/com/cloud/network/element/VirtualRouterElement.java b/server/src/com/cloud/network/element/VirtualRouterElement.java index 8021e6f..1916678 100755 --- a/server/src/com/cloud/network/element/VirtualRouterElement.java +++ b/server/src/com/cloud/network/element/VirtualRouterElement.java @@ -47,7 +47,9 @@ import com.cloud.network.Network; import com.cloud.network.Network.Capability; import com.cloud.network.Network.Provider; import com.cloud.network.Network.Service; +import com.cloud.network.NetworkMigrationResponder; import com.cloud.network.NetworkModel; +import com.cloud.network.Networks; import com.cloud.network.Networks.BroadcastDomainType; import com.cloud.network.Networks.TrafficType; import com.cloud.network.PhysicalNetworkServiceProvider; @@ -85,9 +87,13 @@ import com.cloud.utils.db.SearchCriteriaService; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.vm.DomainRouterVO; import com.cloud.vm.NicProfile; +import com.cloud.vm.NicVO; import com.cloud.vm.ReservationContext; +import com.cloud.vm.UserVmManager; +import com.cloud.vm.UserVmVO; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachine.State; +import com.cloud.vm.VirtualMachine.Type; import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.dao.DomainRouterDao; import com.cloud.vm.dao.UserVmDao; @@ -108,10 +114,12 @@ import java.util.Set; @Local(value = {NetworkElement.class, FirewallServiceProvider.class, DhcpServiceProvider.class, UserDataServiceProvider.class, StaticNatServiceProvider.class, LoadBalancingServiceProvider.class, - PortForwardingServiceProvider.class, IpDeployer.class, RemoteAccessVPNServiceProvider.class} ) + PortForwardingServiceProvider.class, IpDeployer.class, + RemoteAccessVPNServiceProvider.class, NetworkMigrationResponder.class} ) public class VirtualRouterElement extends AdapterBase implements VirtualRouterElementService, DhcpServiceProvider, UserDataServiceProvider, SourceNatServiceProvider, StaticNatServiceProvider, FirewallServiceProvider, -LoadBalancingServiceProvider, PortForwardingServiceProvider, RemoteAccessVPNServiceProvider, IpDeployer { +LoadBalancingServiceProvider, PortForwardingServiceProvider, RemoteAccessVPNServiceProvider, IpDeployer, +NetworkMigrationResponder { private static final Logger s_logger = Logger.getLogger(VirtualRouterElement.class); protected static final Map> capabilities = setCapabilities(); @@ -130,6 +138,8 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl ConfigurationManager _configMgr; @Inject RulesManager _rulesMgr; +@Inject +UserVmManager _userVmMgr; @Inject UserVmDao _userVmDao; @@ -1024,7 +1034,6 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl // TODO Auto-generated method stub return null; } - private boolean canHandleLbRules(List rules) { Map lbCaps = this.getCapabilities().get(Service.Lb); if (!lbCaps.isEmpty()) { @@ -1039,5 +1048,60 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl } } return true; +} + + @Override + public boolean prepareMigration(NicProfile nic, Network network, + VirtualMachineProfile vm, + DeployDestination de
[18/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
Adding a name to the framework/jobs/pom.xml file Signed-off-by: Chip Childers Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0365d555 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0365d555 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0365d555 Branch: refs/heads/vmware-datamodel Commit: 0365d555cf50ad551427ebe2c5634b807bd6a9c0 Parents: cede6c1 Author: Chip Childers Authored: Mon May 20 19:17:33 2013 +0100 Committer: Chip Childers Committed: Mon May 20 19:17:33 2013 +0100 -- framework/jobs/pom.xml |1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0365d555/framework/jobs/pom.xml -- diff --git a/framework/jobs/pom.xml b/framework/jobs/pom.xml index 5ae63af..cf1fdd5 100644 --- a/framework/jobs/pom.xml +++ b/framework/jobs/pom.xml @@ -19,6 +19,7 @@ http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> 4.0.0 cloud-framework-jobs + Apache CloudStack Framework - Jobs org.apache.cloudstack cloudstack-framework
[11/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2543: [Multiple_IP_Ranges] Failed to create IP alias on router vm createipAlias.sh/deleteipAlias.sh won't be copied to XenServer host. The directory of the scripts should be ".." rather "../../.." in all the xenserver patches file. Corrected the path to ".." because the scripts are located at scripts/vm/hypervisor/xenserver/xenserver56/patch Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/aa60105a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/aa60105a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/aa60105a Branch: refs/heads/vmware-datamodel Commit: aa60105a84e1260ec9687759a069a0c9cf0c46bf Parents: d6452be Author: Sanjeev Neelarapu Authored: Mon May 20 20:36:00 2013 +0530 Committer: Koushik Das Committed: Mon May 20 20:40:59 2013 +0530 -- scripts/vm/hypervisor/xenserver/xcposs/patch |2 ++ scripts/vm/hypervisor/xenserver/xcpserver/patch|4 ++-- scripts/vm/hypervisor/xenserver/xenserver56/patch |4 ++-- .../vm/hypervisor/xenserver/xenserver56fp1/patch |4 ++-- scripts/vm/hypervisor/xenserver/xenserver60/patch |4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa60105a/scripts/vm/hypervisor/xenserver/xcposs/patch -- diff --git a/scripts/vm/hypervisor/xenserver/xcposs/patch b/scripts/vm/hypervisor/xenserver/xcposs/patch index 6dc3baa..4d07c76 100644 --- a/scripts/vm/hypervisor/xenserver/xcposs/patch +++ b/scripts/vm/hypervisor/xenserver/xcposs/patch @@ -65,3 +65,5 @@ getRouterStatus.sh=../../../../network/domr/,0755,/usr/lib/xcp/bin bumpUpPriority.sh=../../../../network/domr/,0755,/usr/lib/xcp/bin getDomRVersion.sh=../../../../network/domr/,0755,/usr/lib/xcp/bin router_proxy.sh=../../../../network/domr/,0755,/usr/lib/xcp/bin +createipAlias.sh=..,0755,/usr/lib/xcp/bin +deleteipAlias.sh=..,0755,/usr/lib/xcp/bin http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa60105a/scripts/vm/hypervisor/xenserver/xcpserver/patch -- diff --git a/scripts/vm/hypervisor/xenserver/xcpserver/patch b/scripts/vm/hypervisor/xenserver/xcpserver/patch index a275df4..7e92d5a 100644 --- a/scripts/vm/hypervisor/xenserver/xcpserver/patch +++ b/scripts/vm/hypervisor/xenserver/xcpserver/patch @@ -40,8 +40,8 @@ make_migratable.sh=..,0755,/opt/xensource/bin setup_iscsi.sh=..,0755,/opt/xensource/bin pingtest.sh=../../..,0755,/opt/xensource/bin dhcp_entry.sh=../../../../network/domr/,0755,/opt/xensource/bin -createipAlias.sh=../../..,0755,/opt/xensource/bin -deleteipAlias.sh=../../..,0755,/opt/xensource/bin +createipAlias.sh=..,0755,/opt/xensource/bin +deleteipAlias.sh=..,0755,/opt/xensource/bin router_proxy.sh=../../../../network/domr/,0755,/opt/xensource/bin vm_data.sh=../../../../network/domr/,0755,/opt/xensource/bin save_password_to_domr.sh=../../../../network/domr/,0755,/opt/xensource/bin http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa60105a/scripts/vm/hypervisor/xenserver/xenserver56/patch -- diff --git a/scripts/vm/hypervisor/xenserver/xenserver56/patch b/scripts/vm/hypervisor/xenserver/xenserver56/patch index 5c4673d..8abd6b2 100644 --- a/scripts/vm/hypervisor/xenserver/xenserver56/patch +++ b/scripts/vm/hypervisor/xenserver/xenserver56/patch @@ -38,8 +38,8 @@ make_migratable.sh=..,0755,/opt/xensource/bin setup_iscsi.sh=..,0755,/opt/xensource/bin cloud-setup-bonding.sh=..,0755,/opt/xensource/bin pingtest.sh=../../..,0755,/opt/xensource/bin -createipAlias.sh=../../..,0755,/opt/xensource/bin -deleteipAlias.sh=../../..,0755,/opt/xensource/bin +createipAlias.sh=..,0755,/opt/xensource/bin +deleteipAlias.sh=..,0755,/opt/xensource/bin dhcp_entry.sh=../../../../network/domr/,0755,/opt/xensource/bin vm_data.sh=../../../../network/domr/,0755,/opt/xensource/bin save_password_to_domr.sh=../../../../network/domr/,0755,/opt/xensource/bin http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa60105a/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch -- diff --git a/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch b/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch index c7c58b9..901f6de 100644 --- a/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch +++ b/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch @@ -37,8 +37,8 @@ setupxenserver.sh=..,0755,/opt/xensource/bin make_migratable.sh=..,0755,/opt/xensource/bin setup_iscsi.sh=..,0755,/opt/xensource/bin pingtest.sh=../../..,0755,/opt/xensource/bin -createipAlias.sh=../../..,0755,/opt/xensource/bin -deleteipAlias.sh=../
[04/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2287: Tests for the LDAP system API tests for the LDAP config/remove commands 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/2778486c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2778486c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2778486c Branch: refs/heads/vmware-datamodel Commit: 2778486c34427dbc4e66a7f5db0e3b2364cf9f11 Parents: 8986e16 Author: suresh sadhu Authored: Mon May 20 14:48:06 2013 +0530 Committer: Prasanna Santhanam Committed: Mon May 20 17:51:49 2013 +0530 -- test/integration/smoke/test_ldap.py | 365 ++ 1 files changed, 365 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2778486c/test/integration/smoke/test_ldap.py -- diff --git a/test/integration/smoke/test_ldap.py b/test/integration/smoke/test_ldap.py new file mode 100755 index 000..1b933db --- /dev/null +++ b/test/integration/smoke/test_ldap.py @@ -0,0 +1,365 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +""" P1 for LDAP Config +""" + + +#!/usr/bin/env python + +import marvin +from marvin import cloudstackTestCase +from marvin.cloudstackTestCase import * +import unittest +import hashlib +import random +from marvin.cloudstackAPI import * +from marvin.cloudstackAPI import login +from marvin.integration.lib.utils import * +from marvin.integration.lib.base import * +from marvin.integration.lib.common import * +from nose.plugins.attrib import attr +import urllib + + + +class Services: +"""Test LDAP Configuration +""" + +def __init__(self): +self.services = { +"account": { +"email": "t...@test.com", +"firstname": "test", +"lastname": "t", +"username": "test", +"password": "password", +}, +"ldapCon_1":#valid values&Query filter as email. +{ +"ldapHostname": "10.147.38.163", +"port": "389", +"binddn": "CN=test,CN=Users,DC=hyd-qa,DC=com", +"bindpass": "_", +"queryfilter": "(&(mail=%e))", +"searchbase": "CN=Users,DC=hyd-qa,DC=com", +"ldapusername": "test", +"ldappasswd": "_" +}, +"ldapCon_2": ##valid values&Query filter as displayName. +{ +"ldapHostname": "10.147.38.163", +"port": "389", +"binddn": "CN=test,CN=Users,DC=hyd-qa,DC=com", +"bindpass": "_", +"queryfilter": "(&(displayName=%u))", +"searchbase": "CN=Users,DC=hyd-qa,DC=com", +"ldapusername": "test", +"ldappasswd": "_" +}, +"ldapCon_3": #Configuration with missing parameters value(queryfilter) +{ +"ldapHostname": "10.147.38.163", +"port": "389", +"binddn": "CN=test,CN=Users,DC=hyd-qa,DC=com", +"bindpass": "_", +"queryfilter": "", +"searchbase": "CN=Users,DC=hyd-qa,DC=com", +"ldapusername": "test", +"ldappasswd": "_" +}, + +"ldapCon_4": #invalid configuration-wrong query filter +{ +"ldapHostname": "10.147.38.163", +"port": "389", +"binddn": "CN=test,CN=Users,DC=hyd-qa,DC=com", +"bindpass": "_", +"queryfilter": "(&(displayName=%p))", +"searchbase":"CN=Users,DC=hyd-qa,DC=com", +"ldapusername": "test", +"ldappasswd": "_" +
[38/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2473: Fix a typo in test_vpc_network.py 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/1736031f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1736031f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1736031f Branch: refs/heads/vmware-datamodel Commit: 1736031fcbd51bcac29f2bd0feef0018bd27c715 Parents: a8975f9 Author: Girish Shilamkar Authored: Tue May 21 17:02:58 2013 +0530 Committer: Prasanna Santhanam Committed: Tue May 21 19:28:22 2013 +0530 -- test/integration/component/test_vpc_network.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1736031f/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 dc53585..c0c393c 100644 --- a/test/integration/component/test_vpc_network.py +++ b/test/integration/component/test_vpc_network.py @@ -2003,7 +2003,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): ) self.debug("Checking if we can SSH into VM using NAT rule?") try: -ssh_3 = vm_3.get_ssh_client( +ssh_3 = vm_1.get_ssh_client( ipaddress=public_ip_3.ipaddress.ipaddress, reconnect=True, port=self.services["natrule"]["publicport"]
[37/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2474: Remove garbage code which was added while resolving merge conflicts. 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/a8975f95 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a8975f95 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a8975f95 Branch: refs/heads/vmware-datamodel Commit: a8975f952214cd1e7f015934c53311ed7f710779 Parents: 37308eb Author: Girish Shilamkar Authored: Tue May 21 19:25:58 2013 +0530 Committer: Prasanna Santhanam Committed: Tue May 21 19:25:58 2013 +0530 -- test/integration/component/test_vpc_routers.py | 37 --- 1 files changed, 0 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a8975f95/test/integration/component/test_vpc_routers.py -- diff --git a/test/integration/component/test_vpc_routers.py b/test/integration/component/test_vpc_routers.py index 763a4cb..7dc95e8 100644 --- a/test/integration/component/test_vpc_routers.py +++ b/test/integration/component/test_vpc_routers.py @@ -918,43 +918,6 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): self.debug("VPC network validated - %s" % network.name) return -try: -ssh_1 = self.vm_1.get_ssh_client( -ipaddress=self.public_ip_1.ipaddress.ipaddress) -self.debug("SSH into VM is successfully") - -self.debug("Verifying if we can ping to outside world from VM?") -# Ping to outsite world -res = ssh_1.execute("ping -c 1 www.google.com") -# res = 64 bytes from maa03s17-in-f20.1e100.net (74.125.236.212): -# icmp_req=1 ttl=57 time=25.9 ms -# --- www.l.google.com ping statistics --- -# 1 packets transmitted, 1 received, 0% packet loss, time 0ms -# rtt min/avg/max/mdev = 25.970/25.970/25.970/0.000 ms -result = str(res) -self.assertEqual( - result.count("1 received"), - 1, - "Ping to outside world from VM should be successful" - ) - -self.debug("We should be allowed to ping virtual gateway") -self.debug("VM gateway: %s" % self.vm_1.nic[0].gateway) - -res = ssh_1.execute("ping -c 1 %s" % self.vm_1.nic[0].gateway) -self.debug("ping -c 1 %s: %s" % (self.vm_1.nic[0].gateway, res)) - -result = str(res) -self.assertEqual( - result.count("1 received"), - 1, - "Ping to VM gateway should be successful" - ) -except Exception as e: -self.fail("Failed to SSH into VM - %s, %s" % -(self.public_ip_1.ipaddress.ipaddress, e)) -return - def validate_network_rules(self): """ Validate network rules """
[30/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2603. EC2RunInstances return xen or ovm as the response value for attribute "hypervisor" Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/eb92135d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/eb92135d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/eb92135d Branch: refs/heads/vmware-datamodel Commit: eb92135d55e454799a647490c501f13505325bcb Parents: 904a2a8 Author: Likitha Shetty Authored: Tue May 21 15:13:18 2013 +0530 Committer: Likitha Shetty Committed: Tue May 21 15:15:35 2013 +0530 -- .../cloud/bridge/service/core/ec2/EC2Engine.java | 19 +- 1 files changed, 17 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb92135d/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java -- diff --git a/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java b/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java index 137111a..9ac2bc6 100644 --- a/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java +++ b/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java @@ -1458,7 +1458,7 @@ public class EC2Engine extends ManagerBase { vm.setIpAddress(resp.getIpAddress()); vm.setAccountName(resp.getAccountName()); vm.setDomainId(resp.getDomainId()); -vm.setHypervisor(resp.getHypervisor()); +vm.setHypervisor( mapToAmazonHypervisorType(resp.getHypervisor()) ); vm.setServiceOffering( svcOffering.getName()); vm.setKeyPairName(resp.getKeyPairName()); instances.addInstance(vm); @@ -1860,7 +1860,7 @@ public class EC2Engine extends ManagerBase { ec2Vm.setIpAddress(cloudVm.getIpAddress()); ec2Vm.setAccountName(cloudVm.getAccountName()); ec2Vm.setDomainId(cloudVm.getDomainId()); -ec2Vm.setHypervisor(cloudVm.getHypervisor()); +ec2Vm.setHypervisor( mapToAmazonHypervisorType(cloudVm.getHypervisor()) ); ec2Vm.setRootDeviceType(cloudVm.getRootDeviceType()); ec2Vm.setRootDeviceId(cloudVm.getRootDeviceId()); ec2Vm.setServiceOffering(serviceOfferingIdToInstanceType(cloudVm.getServiceOfferingId().toString())); @@ -2499,6 +2499,21 @@ public class EC2Engine extends ManagerBase { } /** + * Map CloudStack hypervisor to CloudStack hypervisor + * + * @param CloudStack hypervisor + * @return Amazon hypervisor + */ +private String mapToAmazonHypervisorType( String hypervisor) { +if (hypervisor.equalsIgnoreCase("Xenserver")) +return("xen"); +else if(hypervisor.equalsIgnoreCase("Ovm")) +return("ovm"); +else +return (""); +} + +/** * Stop an instance * Wait until one specific VM has stopped *
[34/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
debian: Packaging fixes for AWSAPI Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/730e6571 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/730e6571 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/730e6571 Branch: refs/heads/vmware-datamodel Commit: 730e6571f6c054b75777694be05ec00c9f16a0f8 Parents: a58ee74 Author: Wido den Hollander Authored: Tue May 21 11:23:50 2013 +0200 Committer: Wido den Hollander Committed: Tue May 21 13:20:44 2013 +0200 -- debian/rules |1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/730e6571/debian/rules -- diff --git a/debian/rules b/debian/rules index ff12154..575a015 100755 --- a/debian/rules +++ b/debian/rules @@ -153,6 +153,7 @@ install: mkdir $(DESTDIR)/usr/share/$(PACKAGE)-bridge mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi mkdir $(DESTDIR)/usr/share/$(PACKAGE)-bridge/setup + ln -s /usr/share/$(PACKAGE)-bridge/webapps/awsapi $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps7080/awsapi cp -r awsapi/target/cloud-awsapi-$(VERSION)-SNAPSHOT/* $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi install -D awsapi-setup/setup/cloud-setup-bridge $(DESTDIR)/usr/bin/cloudstack-setup-bridge install -D awsapi-setup/setup/cloudstack-aws-api-register $(DESTDIR)/usr/bin/cloudstack-aws-api-register
[26/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
Adding the 'advanced' attribute for test_public_ip_range Fixing typo in class name. 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/218d26be Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/218d26be Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/218d26be Branch: refs/heads/vmware-datamodel Commit: 218d26be60a556dccd0a40499a04901f2ac4adc1 Parents: 55c3846 Author: Prasanna Santhanam Authored: Tue May 21 12:03:27 2013 +0530 Committer: Prasanna Santhanam Committed: Tue May 21 12:04:03 2013 +0530 -- test/integration/smoke/test_public_ip_range.py |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/218d26be/test/integration/smoke/test_public_ip_range.py -- diff --git a/test/integration/smoke/test_public_ip_range.py b/test/integration/smoke/test_public_ip_range.py index f2099ff..e1d78d9 100644 --- a/test/integration/smoke/test_public_ip_range.py +++ b/test/integration/smoke/test_public_ip_range.py @@ -52,11 +52,11 @@ class Services: "vlan": "", } -class TesDedicatePublicIPRange(cloudstackTestCase): +class TestDedicatePublicIPRange(cloudstackTestCase): @classmethod def setUpClass(cls): -cls.api_client = super(TesDedicatePublicIPRange, cls).getClsTestClient().getApiClient() +cls.api_client = super(TestDedicatePublicIPRange, cls).getClsTestClient().getApiClient() cls.services = Services().services # Get Zone, Domain cls.domain = get_domain(cls.api_client, cls.services) @@ -96,7 +96,7 @@ class TesDedicatePublicIPRange(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return -@attr(tags = ["simulator", "publiciprange", "dedicate", "release"]) +@attr(tags = ["simulator", "advanced", "publiciprange", "dedicate", "release"]) def test_dedicatePublicIpRange(self): """Test public IP range dedication """
[32/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
Adding docstrings for the portablip test 1. Test to create a portable public ip range 2. Test to acquire a provisioned public ip range 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/2adc8e9a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2adc8e9a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2adc8e9a Branch: refs/heads/vmware-datamodel Commit: 2adc8e9a03fd657423add436400f761bd155564f Parents: 5fb1a16 Author: Prasanna Santhanam Authored: Tue May 21 15:26:23 2013 +0530 Committer: Prasanna Santhanam Committed: Tue May 21 15:26:23 2013 +0530 -- test/integration/smoke/test_portable_publicip.py |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2adc8e9a/test/integration/smoke/test_portable_publicip.py -- diff --git a/test/integration/smoke/test_portable_publicip.py b/test/integration/smoke/test_portable_publicip.py index 101747d..5b2fbc7 100644 --- a/test/integration/smoke/test_portable_publicip.py +++ b/test/integration/smoke/test_portable_publicip.py @@ -138,7 +138,7 @@ class TestPortablePublicIPRange(cloudstackTestCase): @attr(tags = ["simulator", "basic", "advanced", "portablepublicip"]) def test_createPortablePublicIPRange(self): -""" +""" Test to create a portable public ip range """ self.debug("attempting to create a portable Public IP range") self.portable_ip_range = PortablePublicIpRange.create( @@ -155,7 +155,6 @@ class TestPortablePublicIPRange(cloudstackTestCase): class TestPortablePublicIPAcquire(cloudstackTestCase): - """ This test validates functionality where - admin has provisioned a portable public ip range @@ -223,7 +222,7 @@ class TestPortablePublicIPAcquire(cloudstackTestCase): @attr(tags = ["simulator", "basic", "advanced", "portablepublicip"]) def test_createPortablePublicIPAcquire(self): -""" +""" Test to acquire a provisioned public ip range """ self.debug("attempting to create a portable Public IP range") self.portable_ip_range = PortablePublicIpRange.create(
[17/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
Adding package declaration to MidoNetElementTest Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cede6c11 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cede6c11 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cede6c11 Branch: refs/heads/vmware-datamodel Commit: cede6c11ab5e5ee7838dd84b0914a640267c7769 Parents: 54ac779 Author: Dave Cahill Authored: Mon May 20 17:00:12 2013 +0900 Committer: Chip Childers Committed: Mon May 20 18:57:42 2013 +0100 -- .../cloud/network/element/MidoNetElementTest.java |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cede6c11/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java -- diff --git a/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java b/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java index baf99b9..a7d96b0 100644 --- a/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java +++ b/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java @@ -17,7 +17,8 @@ * under the License. */ -import com.cloud.network.element.MidoNetElement; +package com.cloud.network.element; + import com.cloud.user.AccountVO; import com.cloud.user.dao.AccountDao; import junit.framework.TestCase;
[47/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2308 fixed adding route in vware for mgmt subnet 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/e31553af Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e31553af Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e31553af Branch: refs/heads/vmware-datamodel Commit: e31553aff827abd88e3dfa9b65bfb335e09fbd22 Parents: dce4258 Author: Jayapal Authored: Thu May 16 19:01:17 2013 +0530 Committer: Abhinandan Prateek Committed: Wed May 22 12:21:30 2013 +0530 -- .../debian/config/etc/init.d/cloud-early-config|5 - 1 files changed, 4 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e31553af/patches/systemvm/debian/config/etc/init.d/cloud-early-config -- diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config index 893a245..d918670 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -757,7 +757,10 @@ EOF fi if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] then -ip route add $MGMTNET via $LOCAL_GW dev eth1 + if [ "$hyp" == "vmware" ] + then + ip route add $MGMTNET via $LOCAL_GW dev eth0 + fi fi ip route delete default
[31/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
Fix apidocs build Portable IP section added post portable IP merge 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/5fb1a161 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5fb1a161 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5fb1a161 Branch: refs/heads/vmware-datamodel Commit: 5fb1a1610933b989df25f717d6bd2df10ff34386 Parents: eb92135 Author: Prasanna Santhanam Authored: Tue May 21 14:39:33 2013 +0530 Committer: Prasanna Santhanam Committed: Tue May 21 15:19:28 2013 +0530 -- tools/apidoc/gen_toc.py |1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5fb1a161/tools/apidoc/gen_toc.py -- diff --git a/tools/apidoc/gen_toc.py b/tools/apidoc/gen_toc.py index 3758503..793f720 100644 --- a/tools/apidoc/gen_toc.py +++ b/tools/apidoc/gen_toc.py @@ -143,6 +143,7 @@ known_categories = { 'AffinityGroup': 'Affinity Group', 'InternalLoadBalancer': 'Internal LB', 'DeploymentPlanners': 'Configuration', +'PortableIp': 'Portable IP' }
[19/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-747: internalLb in VPC - UI - create network offering - system offering dropdown is for router only. Change its variable name to be more intuitive. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cf6045f1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cf6045f1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cf6045f1 Branch: refs/heads/vmware-datamodel Commit: cf6045f1aa37674f0225144ae0a1f662f955f153 Parents: 0365d55 Author: Jessica Wang Authored: Mon May 20 13:40:37 2013 -0700 Committer: Jessica Wang Committed: Mon May 20 13:41:02 2013 -0700 -- ui/scripts/configuration.js | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cf6045f1/ui/scripts/configuration.js -- diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 9a08c4c..e3421a3 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -1122,7 +1122,7 @@ title: 'label.add.network.offering', preFilter: function(args) { var $availability = args.$form.find('.form-item[rel=availability]'); - var $serviceOfferingId = args.$form.find('.form-item[rel=serviceOfferingId]'); + var $systemOfferingForRouter = args.$form.find('.form-item[rel=systemOfferingForRouter]'); var $conservemode = args.$form.find('.form-item[rel=conservemode]'); var $serviceSourceNatRedundantRouterCapabilityCheckbox = args.$form.find('.form-item[rel="service.SourceNat.redundantRouterCapabilityCheckbox"]'); var hasAdvancedZones = false; @@ -1185,10 +1185,10 @@ } }); if(havingVirtualRouterForAtLeastOneService == true) { - $serviceOfferingId.css('display', 'inline-block'); + $systemOfferingForRouter.css('display', 'inline-block'); } else { - $serviceOfferingId.hide(); + $systemOfferingForRouter.hide(); } @@ -1569,8 +1569,8 @@ }, //show or hide upon checked services and selected providers above (begin) - serviceOfferingId: { -label: 'label.system.offering', + systemOfferingForRouter: { +label: 'System Offering for Router', docID: 'helpNetworkOfferingSystemOffering', select: function(args) { $.ajax({ @@ -1829,8 +1829,8 @@ if(args.$form.find('.form-item[rel=availability]').css("display") == "none") inputData['availability'] = 'Optional'; - if(args.$form.find('.form-item[rel=serviceOfferingId]').css("display") == "none") - delete inputData.serviceOfferingId; + if(args.$form.find('.form-item[rel=systemOfferingForRouter]').css("display") == "none") + delete inputData.systemOffering
[44/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
PVLAN: Fix NPE when VM are in allocated state If vlan is not assigned for VM, nic.getBroadcastUri() would be null. Then just ignore it. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/92ad6aba Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/92ad6aba Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/92ad6aba Branch: refs/heads/vmware-datamodel Commit: 92ad6abab0063771dffaabb7c9d6d8256083c5be Parents: a75cf9a Author: Sheng Yang Authored: Tue May 21 14:46:31 2013 -0700 Committer: Sheng Yang Committed: Tue May 21 14:51:35 2013 -0700 -- .../router/VirtualNetworkApplianceManagerImpl.java |2 +- server/src/com/cloud/vm/UserVmManagerImpl.java |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/92ad6aba/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java -- diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index 64e412a..b969be2 100755 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -2609,7 +2609,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V List routerNics = _nicDao.listByVmId(profile.getId()); for (Nic nic : routerNics) { Network network = _networkModel.getNetwork(nic.getNetworkId()); - if (network.getTrafficType() == TrafficType.Guest && nic.getBroadcastUri().getScheme().equals("pvlan")) { + if (network.getTrafficType() == TrafficType.Guest && nic.getBroadcastUri() != null && nic.getBroadcastUri().getScheme().equals("pvlan")) { NicProfile nicProfile = new NicProfile(nic, network, nic.getBroadcastUri(), nic.getIsolationUri(), 0, false, "pvlan-nic"); setupDhcpForPvlan(false, domR, domR.getHostId(), nicProfile); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/92ad6aba/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 71b4e3f..5e20656 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -3059,7 +3059,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use for (NicVO nic : nics) { NetworkVO network = _networkDao.findById(nic.getNetworkId()); if (network.getTrafficType() == TrafficType.Guest) { -if (nic.getBroadcastUri().getScheme().equals("pvlan")) { +if (nic.getBroadcastUri() != null && nic.getBroadcastUri().getScheme().equals("pvlan")) { NicProfile nicProfile = new NicProfile(nic, network, nic.getBroadcastUri(), nic.getIsolationUri(), 0, false, "pvlan-nic"); setupVmForPvlan(false, vm.getHostId(), nicProfile); }
[35/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
blocker bug in dnsmaq config 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/79dc83d1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/79dc83d1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/79dc83d1 Branch: refs/heads/vmware-datamodel Commit: 79dc83d1ac055d62b70d172789a6883f29bab186 Parents: 730e657 Author: Bharat Kumar Authored: Tue May 21 17:02:19 2013 +0530 Committer: Abhinandan Prateek Committed: Tue May 21 17:49:05 2013 +0530 -- .../src/com/cloud/network/DnsMasqConfigurator.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/79dc83d1/core/src/com/cloud/network/DnsMasqConfigurator.java -- diff --git a/core/src/com/cloud/network/DnsMasqConfigurator.java b/core/src/com/cloud/network/DnsMasqConfigurator.java index bbf721d..ee8e5fc 100644 --- a/core/src/com/cloud/network/DnsMasqConfigurator.java +++ b/core/src/com/cloud/network/DnsMasqConfigurator.java @@ -110,7 +110,7 @@ import java.util.List; dnsServers = dnsServers+dnsMasqconfigcmd.getDns2()+","; } dnsServers = dnsServers +"*"; - dnsServers = dnsServers.replace(";*", ""); + dnsServers = dnsServers.replace(",*", ""); dnsMasqconf.set(24,"dhcp-option=6,"+dnsServers); return dnsMasqconf.toArray( new String[dnsMasqconf.size()]); }
[40/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-778: Add tests for user provided hostname for vms Automation tests to qualify User provides hostname feature. 1. Defines services class 2. Test to verify custom hostname for the instance with internal name 3. Test to verify custom hostname for the instance without internal name 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/2bc88ea2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2bc88ea2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2bc88ea2 Branch: refs/heads/vmware-datamodel Commit: 2bc88ea277a4024afd3b365910ea9f85fde44ebf Parents: b74d13f Author: Girish Shilamkar Authored: Tue May 21 14:46:24 2013 +0530 Committer: Prasanna Santhanam Committed: Tue May 21 20:27:26 2013 +0530 -- test/integration/component/test_custom_hostname.py | 369 +++ 1 files changed, 369 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2bc88ea2/test/integration/component/test_custom_hostname.py -- diff --git a/test/integration/component/test_custom_hostname.py b/test/integration/component/test_custom_hostname.py new file mode 100644 index 000..e545214 --- /dev/null +++ b/test/integration/component/test_custom_hostname.py @@ -0,0 +1,369 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +""" P1 tests for user provide hostname cases +""" +#Import Local Modules +import marvin +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import * +from marvin.cloudstackAPI import * +from marvin.integration.lib.utils import * +from marvin.integration.lib.base import * +from marvin.integration.lib.common import * +from marvin.remoteSSHClient import remoteSSHClient +import datetime + + +class Services: +"""Test user provided hostname Services +""" + +def __init__(self): +self.services = { +"domain": { + "name": "Domain", +}, +"project": { +"name": "Project", +"displaytext": "Test project", +}, +"account": { +"email": "administra...@clogeny.com", +"firstname": "Test", +"lastname": "User", +"username": "test", +# Random characters are appended for unique +# username +"password": "password", + }, + "user": { +"email": "administra...@clogeny.com", +"firstname": "User", +"lastname": "User", +"username": "User", +# Random characters are appended for unique +# username +"password": "password", + }, +"disk_offering": { +"displaytext": "Tiny Disk Offering", +"name": "Tiny Disk Offering", +"disksize": 1 +}, +"volume": { +"diskname": "Test Volume", +}, +"service_offering": { +"name": "Tiny Instance", +"displaytext": "Tiny Instance", +"cpunumber": 1, +"cpuspeed": 100, # in MHz +"memory": 128, # In MBs +}, +
[29/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2601 : xen.heartbeat.interval doesn't change the parameter passed to xenheartbeat.sh. Made changes to read the parameter from config and to pass it to the resource. Signed-off-by: Devdeep Singh Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/904a2a87 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/904a2a87 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/904a2a87 Branch: refs/heads/vmware-datamodel Commit: 904a2a87f799392c70053f7949b9a6b1e6a2e4dc Parents: 9350441 Author: Devdeep Singh Authored: Tue May 21 13:32:09 2013 +0530 Committer: Devdeep Singh Committed: Tue May 21 13:33:07 2013 +0530 -- .../xen/discoverer/XcpServerDiscoverer.java|1 + server/src/com/cloud/resource/DiscovererBase.java |1 + 2 files changed, 2 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/904a2a87/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java -- diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java index f0121e7..fd49836 100755 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java @@ -315,6 +315,7 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L details.put("wait", Integer.toString(_wait)); params.put("migratewait", _configDao.getValue(Config.MigrateWait.toString())); params.put(Config.XenMaxNics.toString().toLowerCase(), _configDao.getValue(Config.XenMaxNics.toString())); + params.put(Config.XenHeartBeatInterval.toString().toLowerCase(), _configDao.getValue(Config.XenHeartBeatInterval.toString())); params.put(Config.InstanceName.toString().toLowerCase(), _instance); details.put(Config.InstanceName.toString().toLowerCase(), _instance); try { http://git-wip-us.apache.org/repos/asf/cloudstack/blob/904a2a87/server/src/com/cloud/resource/DiscovererBase.java -- diff --git a/server/src/com/cloud/resource/DiscovererBase.java b/server/src/com/cloud/resource/DiscovererBase.java index b7c5b6f..0c9dd25 100644 --- a/server/src/com/cloud/resource/DiscovererBase.java +++ b/server/src/com/cloud/resource/DiscovererBase.java @@ -129,6 +129,7 @@ public abstract class DiscovererBase extends AdapterBase implements Discoverer { params.put("max.template.iso.size", _configDao.getValue(Config.MaxTemplateAndIsoSize.toString())); params.put("migratewait", _configDao.getValue(Config.MigrateWait.toString())); params.put(Config.XenMaxNics.toString().toLowerCase(), _configDao.getValue(Config.XenMaxNics.toString())); +params.put(Config.XenHeartBeatInterval.toString().toLowerCase(), _configDao.getValue(Config.XenHeartBeatInterval.toString())); return params; }
[28/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
remove bogus self assign to parent Signed off by : Nitin Mehta Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9350441d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9350441d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9350441d Branch: refs/heads/vmware-datamodel Commit: 9350441dd3dfc27a5852c5662463a1d5af1cd026 Parents: 6217b0f Author: Dave Brosius Authored: Tue May 21 12:09:21 2013 +0530 Committer: Nitin Mehta Committed: Tue May 21 12:19:03 2013 +0530 -- .../storage/CreateEntityDownloadURLCommand.java|1 - 1 files changed, 0 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9350441d/core/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java -- diff --git a/core/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java b/core/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java index d928e0c..98a957f 100755 --- a/core/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java +++ b/core/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java @@ -28,7 +28,6 @@ public class CreateEntityDownloadURLCommand extends AbstractDownloadCommand { public CreateEntityDownloadURLCommand(String installPath, String uuid) { super(); -this.parent = parent; this.installPath = installPath; this.extractLinkUUID = uuid; }
[42/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-747: internalLb in VPC - UI - create network offering - when VPC checkbox is checked, enable provider InternalLbVm, VpcVirtualRouter, Netscaler. When VPC checkbox is unchecked, disable provider InternalLbVm, VpcVirtualRouter. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/263cc9a6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/263cc9a6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/263cc9a6 Branch: refs/heads/vmware-datamodel Commit: 263cc9a62c731a22518056a601c9c57fb3777690 Parents: e42ddb8 Author: Jessica Wang Authored: Tue May 21 10:57:12 2013 -0700 Committer: Jessica Wang Committed: Tue May 21 11:44:20 2013 -0700 -- ui/scripts/configuration.js | 41 ++--- 1 files changed, 29 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/263cc9a6/ui/scripts/configuration.js -- diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 058f440..7485898 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -1436,20 +1436,37 @@ docID: 'helpNetworkOfferingVPC', isBoolean: true, onChange: function(args) { - var $checkbox = args.$checkbox; - var $selects = $checkbox.closest('form').find('.dynamic-input select'); - var $vpcOptions = $selects.find('option[value=VpcVirtualRouter]'); + var $vpc = args.$checkbox; + var $providers = $vpc.closest('form').find('.dynamic-input select'); + var $optionsOfProviders = $providers.find('option'); - if ($checkbox.is(':checked')) { -$vpcOptions.siblings().attr('disabled', true); -$selects.val('VpcVirtualRouter'); - } else { -$vpcOptions.siblings().attr('disabled', false); -$vpcOptions.attr('disabled', true); -$selects.each(function() { - $(this).val($(this).find('option:first')); -}); + //p.s. Netscaler is supported in both vpc and non-vpc + + if ($vpc.is(':checked')) { //*** vpc *** +$optionsOfProviders.each(function(index) { + if($(this).val() == 'InternalLbVm' || $(this).val() == 'VpcVirtualRouter' || $(this).val() == 'Netscaler') { +$(this).attr('disabled', false); + } + else { +$(this).attr('disabled', true); + } +}); + } + else { //*** non-vpc *** +$optionsOfProviders.each(function(index) { + if($(this).val() == 'InternalLbVm' || $(this).val() == 'VpcVirtualRouter') { +$(this).attr('disabled', true); + } + else { +$(this).attr('disabled', false); + } +}); } + + $providers.each(function() { +$(this).val($(this).find('option:first')); + }); + } },
[33/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2567 - Check whether DMC - dynamic memory control is enabled for the hyervisor before trying to scale the vm. If its not then dont scale and instead throw and exception. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a58ee74e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a58ee74e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a58ee74e Branch: refs/heads/vmware-datamodel Commit: a58ee74e1c3760852214be28d8ef7051f27e1f29 Parents: 2adc8e9 Author: Nitin Mehta Authored: Tue May 21 16:36:10 2013 +0530 Committer: Nitin Mehta Committed: Tue May 21 16:39:25 2013 +0530 -- .../xen/resource/CitrixResourceBase.java |7 +++ .../xen/resource/CitrixResourceBaseTest.java |5 - 2 files changed, 11 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a58ee74e/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java -- diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index cd49773..d08aaec 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -660,6 +660,13 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe Connection conn = getConnection(); Set vms = VM.getByNameLabel(conn, vmName); Host host = Host.getByUuid(conn, _host.uuid); + +// If DMC is not enable then dont execute this command. +if (isDmcEnabled(conn, host)) { +String msg = "Unable to scale the vm: " + vmName + " as DMC - Dynamic memory control is not enabled for the XenServer:" + _host.uuid + " ,check your license and hypervisor version."; +s_logger.info(msg); +return new ScaleVmAnswer(cmd, false, msg); +} // stop vm which is running on this host or is in halted state Iterator iter = vms.iterator(); while ( iter.hasNext() ) { http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a58ee74e/plugins/hypervisors/xen/test/com/cloud/hypervisor/xen/resource/CitrixResourceBaseTest.java -- diff --git a/plugins/hypervisors/xen/test/com/cloud/hypervisor/xen/resource/CitrixResourceBaseTest.java b/plugins/hypervisors/xen/test/com/cloud/hypervisor/xen/resource/CitrixResourceBaseTest.java index 877e3bc..3328d4b 100644 --- a/plugins/hypervisors/xen/test/com/cloud/hypervisor/xen/resource/CitrixResourceBaseTest.java +++ b/plugins/hypervisors/xen/test/com/cloud/hypervisor/xen/resource/CitrixResourceBaseTest.java @@ -58,7 +58,10 @@ public class CitrixResourceBaseTest { super.scaleVM(conn, vm, vmSpec, host); } - +@Override +protected boolean isDmcEnabled(Connection conn, Host host) throws Types.XenAPIException, XmlRpcException { +return true; +} }; @Mock XsHost _host; @Mock Host host;
[45/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
Add base internal LB provider module Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0a443697 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0a443697 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0a443697 Branch: refs/heads/vmware-datamodel Commit: 0a443697ea48d48310a24c5e25a2298522183901 Parents: 92ad6ab Author: Brian Federle Authored: Tue May 21 15:26:55 2013 -0700 Committer: Brian Federle Committed: Tue May 21 15:26:59 2013 -0700 -- .../internalLbProvider/internalLbProvider.js | 182 +++ ui/modules/modules.js |3 +- 2 files changed, 184 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0a443697/ui/modules/internalLbProvider/internalLbProvider.js -- diff --git a/ui/modules/internalLbProvider/internalLbProvider.js b/ui/modules/internalLbProvider/internalLbProvider.js new file mode 100644 index 000..aaa386e --- /dev/null +++ b/ui/modules/internalLbProvider/internalLbProvider.js @@ -0,0 +1,182 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +(function($, cloudStack) { + cloudStack.modules.internalLbProvider = function(module) { +var internalLbDeviceViewAll = [ + { +label: 'Devices', +path: '_zone.internalLbDevices' + } +]; + +var internalLbListView = { + id: 'internalLbDevices', + fields: { +resourcename: { label: 'Resource Name' }, +provider: { label: 'Provider' } + }, + dataProvider: function(args) { +args.response.success({ data: [] }); + }, + actions: { +add: { + label: 'Add internal LB device', + + messages: { +notification: function(args) { + return 'Add internal LB device'; +} + }, + + createForm: { +title: 'Add internal LB device', +fields: { + hostname: { +label: 'label.host', +validation: { required: true } + }, + username: { +label: 'label.username', +validation: { required: true } + }, + password: { +label: 'label.password', +isPassword: true, +validation: { required: true } + } +} + }, + + action: function(args) { +args.response.success(); + }, + + notification: { +poll: function(args) { + args.complete(); +} + } +} + }, + + detailView: { +name: 'Internal LB resource details', +actions: { + remove: { +label: 'delete Internal LB resource', +messages: { + confirm: function(args) { +return 'Please confirm you want to delete Internal LB resource'; + }, + notification: function(args) { +return 'delete Internal LB resource'; + } +}, +action: function(args) { + args.response.success(); +}, +notification: { + poll: function(args) { +args.complete(); + } +} + } +}, + +tabs: { + details: { +title: 'label.details', +fields: [ + { + resourcename: { label: 'Resource Name' } + }, + { + resourceid: { label: 'Resource ID'}, + provider: { label: 'Provider' }, + RESOURCE_NAME: { label: 'Resource Name'} + } + ], + dataProvider: function(args) { + args.response.success({ dat
[27/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2600. Fix CS AWSAPI to add the below filters that are missing in DescribeImages API- architecture description image-id image-type is-public name owner-id state tag-key tag-value tag:key hypervisor Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6217b0fb Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6217b0fb Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6217b0fb Branch: refs/heads/vmware-datamodel Commit: 6217b0fb4cd79d7c39ce9fdff2c18e4e7504d62f Parents: 218d26b Author: Likitha Shetty Authored: Tue May 21 11:58:01 2013 +0530 Committer: Likitha Shetty Committed: Tue May 21 12:10:52 2013 +0530 -- .../com/cloud/bridge/service/EC2RestServlet.java | 10 + .../cloud/bridge/service/EC2SoapServiceImpl.java | 41 +++- .../bridge/service/core/ec2/EC2DescribeImages.java | 10 + .../cloud/bridge/service/core/ec2/EC2Engine.java | 34 +++- .../cloud/bridge/service/core/ec2/EC2Image.java| 63 -- .../bridge/service/core/ec2/EC2ImageFilterSet.java | 168 +++ 6 files changed, 290 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6217b0fb/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java -- diff --git a/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java b/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java index 6b634e8..83645a3 100644 --- a/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java +++ b/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java @@ -135,6 +135,7 @@ import com.cloud.bridge.service.core.ec2.EC2Engine; import com.cloud.bridge.service.core.ec2.EC2Filter; import com.cloud.bridge.service.core.ec2.EC2GroupFilterSet; import com.cloud.bridge.service.core.ec2.EC2Image; +import com.cloud.bridge.service.core.ec2.EC2ImageFilterSet; import com.cloud.bridge.service.core.ec2.EC2ImageAttributes.ImageAttribute; import com.cloud.bridge.service.core.ec2.EC2ImageLaunchPermission; import com.cloud.bridge.service.core.ec2.EC2ImportKeyPair; @@ -1380,6 +1381,15 @@ public class EC2RestServlet extends HttpServlet { if (null != value && 0 < value.length) EC2request.addImageSet( value[0] ); } } +// add filters +EC2Filter[] filterSet = extractFilters( request ); +if ( filterSet != null ) { +EC2ImageFilterSet ifs = new EC2ImageFilterSet(); +for( int i=0; i < filterSet.length; i++ ) { +ifs.addFilter(filterSet[i]); +} +EC2request.setFilterSet( ifs ); +} // -> execute the request EC2Engine engine = ServiceProvider.getInstance().getEC2Engine(); DescribeImagesResponse EC2response = EC2SoapServiceImpl.toDescribeImagesResponse( engine.describeImages( EC2request )); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6217b0fb/awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java -- diff --git a/awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java b/awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java index 9362b81..dc0d993 100644 --- a/awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java +++ b/awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java @@ -51,6 +51,7 @@ import com.cloud.bridge.service.core.ec2.EC2DescribeInstances; import com.cloud.bridge.service.core.ec2.EC2DescribeInstancesResponse; import com.cloud.bridge.service.core.ec2.EC2DescribeKeyPairs; import com.cloud.bridge.service.core.ec2.EC2DescribeKeyPairsResponse; +import com.cloud.bridge.service.core.ec2.EC2ImageFilterSet; import com.cloud.bridge.service.core.ec2.EC2ImageLaunchPermission; import com.cloud.bridge.service.core.ec2.EC2ResourceTag; import com.cloud.bridge.service.core.ec2.EC2DescribeSecurityGroups; @@ -407,7 +408,10 @@ public class EC2SoapServiceImpl implements AmazonEC2SkeletonInterface { for( int i=0; i < items3.length; i++ ) request.addOwnersSet( items3[i].getOwner()); } } - +FilterSetType fst = dit.getFilterSet(); +if ( fst != null) { +request.setFilterSet(toImageFilterSet(fst)); +} return toDescribeImagesResponse( engine.describeImages( request )); } @@ -948,7 +952,7 @@ public class EC2SoapServiceImpl implements AmazonEC2SkeletonInterface { DescribeImagesResponseItemType param3 = new DescribeImagesResponseItemType(); param3.setImageId( images[i].getId()); param3.setImageLocation( "" ); - param3.setImageState( (images[i].getIsReady() ?
[20/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-1638: Introduce NetworkMigrationResponder The location of the virtual machine is provided by DeployDestination, which will be passed in NetworkGuru#reserve and NetworkElement#prepare. During the virtual machine migration, it actually changes DeployDestination and it looks like that it will tell that event to network components as it has NetworkManager#prepareNicForMigration. The problem is that althogh the interface has that method, NetworkManagerImpl does not tell the DeployDestination changes to network components. So IMHO, we need to add calls of NetworkGuru#reserve and NetworkElement#prepare in NetworkManagerImpl#prepareNicForMigration . And then, we also need to add calls NetworkGuru#release and NetworkElement#release after the migration, otherwise the network resources that plugin reserved will be kept even when the vm leaves off. (Sheng Yang: rebase code, add license header) Signed-off-by: Sheng Yang Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7260e8d8 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7260e8d8 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7260e8d8 Branch: refs/heads/vmware-datamodel Commit: 7260e8d83f07d90b48c34adaeb227de265019487 Parents: cf6045f Author: Hiroaki Kawai Authored: Fri May 3 10:43:20 2013 -0700 Committer: Sheng Yang Committed: Mon May 20 16:43:18 2013 -0700 -- .../cloud/network/NetworkMigrationResponder.java | 70 ++ server/src/com/cloud/network/NetworkManager.java | 29 ++- .../src/com/cloud/network/NetworkManagerImpl.java | 72 ++- .../com/cloud/vm/VirtualMachineManagerImpl.java| 11 ++ .../com/cloud/network/MockNetworkManagerImpl.java | 29 +- .../test/com/cloud/vpc/MockNetworkManagerImpl.java | 48 +++--- 6 files changed, 239 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7260e8d8/api/src/com/cloud/network/NetworkMigrationResponder.java -- diff --git a/api/src/com/cloud/network/NetworkMigrationResponder.java b/api/src/com/cloud/network/NetworkMigrationResponder.java new file mode 100644 index 000..6283cc5 --- /dev/null +++ b/api/src/com/cloud/network/NetworkMigrationResponder.java @@ -0,0 +1,70 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package com.cloud.network; + +import com.cloud.deploy.DeployDestination; +import com.cloud.vm.NicProfile; +import com.cloud.vm.ReservationContext; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.VirtualMachineProfile; + +/** + * NetworkGuru and NetworkElements that implement this interface + * will be called during Virtual Machine migration. + */ +public interface NetworkMigrationResponder { +/** + * Prepare for migration. + * + * This method will be called per nic before the vm migration. + * @param nic + * @param network + * @param vm + * @param dest + * @param context + * @return true when operation was successful. + */ +public boolean prepareMigration(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context); + +/** + * Cancel for migration preparation. + * + * This method will be called per nic when the entire vm migration + * process failed and need to release the resouces that was + * allocated at the migration preparation. + * @param nic destination nic + * @param network destination network + * @param vm destination vm profile + * @param src The context nic migrates from. + * @param dst The context nic migrates to. + */ +public void rollbackMigration(NicProfile nic, Network network, VirtualMachineProfile vm, ReservationContext src, ReservationContext dst); + +/** + * Commit the migration resource. + * + * This method will be called per nic when the entire vm migration + * process was successful. This is useful to release the resource
[50/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
Remove old Upgrade410to420 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8996ea38 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8996ea38 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8996ea38 Branch: refs/heads/vmware-datamodel Commit: 8996ea386b25bdac12057d00015eb101551c7dc8 Parents: 97fe5cb Author: Sateesh Chodapuneedi Authored: Wed May 22 19:24:46 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Wed May 22 19:24:46 2013 +0530 -- .../src/com/cloud/upgrade/dao/Upgrade410to420.java | 562 --- 1 files changed, 0 insertions(+), 562 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8996ea38/server/src/com/cloud/upgrade/dao/Upgrade410to420.java -- diff --git a/server/src/com/cloud/upgrade/dao/Upgrade410to420.java b/server/src/com/cloud/upgrade/dao/Upgrade410to420.java deleted file mode 100644 index 0c53280..000 --- a/server/src/com/cloud/upgrade/dao/Upgrade410to420.java +++ /dev/null @@ -1,562 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package com.cloud.upgrade.dao; - -import com.cloud.hypervisor.Hypervisor.HypervisorType; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; -import org.apache.log4j.Logger; - -import java.io.File; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -public class Upgrade410to420 implements DbUpgrade { - final static Logger s_logger = Logger.getLogger(Upgrade410to420.class); - - @Override - public String[] getUpgradableVersionRange() { - return new String[] { "4.1.0", "4.2.0" }; - } - - @Override - public String getUpgradedVersion() { - return "4.2.0"; - } - - @Override - public boolean supportsRollingUpgrade() { - return false; - } - - @Override - public File[] getPrepareScripts() { - String script = Script.findScript("", "db/schema-410to420.sql"); -if (script == null) { -throw new CloudRuntimeException("Unable to find db/schema-410to420.sql"); -} - -return new File[] { new File(script) }; - } - - @Override - public void performDataMigration(Connection conn) { -upgradeVmwareLabels(conn); -persistLegacyZones(conn); -createPlaceHolderNics(conn); -updateRemoteAccessVpn(conn); -updateSystemVmTemplates(conn); -updateCluster_details(conn); -updatePrimaryStore(conn); -addEgressFwRulesForSRXGuestNw(conn); -upgradeEIPNetworkOfferings(conn); -} - - private void updateSystemVmTemplates(Connection conn) { - PreparedStatement sql = null; -try { -sql = conn.prepareStatement("update vm_template set image_data_store_id = 1 where type = 'SYSTEM' or type = 'BUILTIN'"); -sql.executeUpdate(); -} catch (SQLException e) { -throw new CloudRuntimeException("Failed to upgrade vm template data store uuid: " + e.toString()); -} finally { -if (sql != null) { -try { -sql.close(); -} catch (SQLException e) { -} -} -} - } - - private void updatePrimaryStore(Connection conn) { - PreparedStatement sql = null; - PreparedStatement sql2 = null; -try { -sql = conn.prepareStatement("update storage_pool set storage_provider_name = ? , scope = ? where pool_type = 'Filesystem' or pool_type = 'LVM'"); -sql.setString(1, "ancient primary data
[36/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
debian: Create the webapps7080 directory Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/37308ebf Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/37308ebf Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/37308ebf Branch: refs/heads/vmware-datamodel Commit: 37308ebff4a28ae7a1fb7b0bece58ec2cb71de92 Parents: 79dc83d Author: Wido den Hollander Authored: Tue May 21 14:35:46 2013 +0200 Committer: Wido den Hollander Committed: Tue May 21 14:36:03 2013 +0200 -- debian/rules |1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/37308ebf/debian/rules -- diff --git a/debian/rules b/debian/rules index 575a015..e381b1a 100755 --- a/debian/rules +++ b/debian/rules @@ -80,6 +80,7 @@ install: mkdir -p $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/ mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps/client + mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps7080 mkdir $(DESTDIR)/usr/share/$(PACKAGE)-management/setup mkdir $(DESTDIR)/var/log/$(PACKAGE)/management mkdir $(DESTDIR)/var/cache/$(PACKAGE)/management
[49/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
Merge branch 'master' into vmware-datamodel Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/97fe5cb2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/97fe5cb2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/97fe5cb2 Branch: refs/heads/vmware-datamodel Commit: 97fe5cb236054de43bde41b4fd705e92bdf76c91 Parents: dc4aef9 49e39e5 Author: Sateesh Chodapuneedi Authored: Wed May 22 13:44:06 2013 +0530 Committer: Sateesh Chodapuneedi Committed: Wed May 22 13:44:06 2013 +0530 -- api/src/com/cloud/async/AsyncJob.java |1 + .../cloud/configuration/ConfigurationService.java | 13 + api/src/com/cloud/event/EventTypes.java|5 + api/src/com/cloud/network/IpAddress.java |4 +- .../cloud/network/NetworkMigrationResponder.java | 70 +++ api/src/com/cloud/network/NetworkService.java |5 + .../org/apache/cloudstack/api/ApiConstants.java|2 + .../apache/cloudstack/api/ResponseGenerator.java |9 +- .../api/command/admin/cluster/AddClusterCmd.java | 36 +- .../command/admin/cluster/UpdateClusterCmd.java|6 +- .../admin/region/CreatePortableIpRangeCmd.java | 156 ++ .../admin/region/DeletePortableIpRangeCmd.java | 93 .../admin/region/ListPortableIpRangesCmd.java | 109 + .../command/user/address/AssociateIPAddrCmd.java | 28 +- .../user/address/DisassociateIPAddrCmd.java| 12 +- .../api/command/user/nat/EnableStaticNatCmd.java |6 + .../cloudstack/api/response/ClusterResponse.java | 27 +- .../cloudstack/api/response/IPAddressResponse.java |7 + .../api/response/PortableIpRangeResponse.java | 93 .../api/response/PortableIpResponse.java | 106 .../org/apache/cloudstack/region/PortableIp.java | 58 +++ .../apache/cloudstack/region/PortableIpRange.java | 38 ++ .../com/cloud/bridge/service/EC2RestServlet.java | 104 - .../cloud/bridge/service/EC2SoapServiceImpl.java | 176 +--- .../bridge/service/core/ec2/EC2DescribeImages.java | 10 + .../cloud/bridge/service/core/ec2/EC2Engine.java | 53 ++- .../cloud/bridge/service/core/ec2/EC2Image.java| 63 ++- .../bridge/service/core/ec2/EC2ImageFilterSet.java | 168 +++ client/tomcatconf/applicationContext.xml.in|2 + client/tomcatconf/commands.properties.in |6 + .../storage/CreateEntityDownloadURLCommand.java|1 - .../src/com/cloud/network/DnsMasqConfigurator.java |2 +- debian/rules |2 + .../subsystem/api/storage/AbstractScope.java |6 +- .../cloud/entity/api/db/VolumeReservationVO.java | 22 +- .../api/db/dao/VolumeReservationDaoImpl.java |2 +- .../src/com/cloud/alert/dao/AlertDaoImpl.java |8 + .../cloud/configuration/dao/ResourceCountDao.java |2 + .../configuration/dao/ResourceCountDaoImpl.java| 16 + .../cloud/configuration/dao/ResourceLimitDao.java |2 + .../configuration/dao/ResourceLimitDaoImpl.java| 14 + .../src/com/cloud/event/dao/EventDaoImpl.java |5 + .../network/dao/ExternalLoadBalancerDeviceVO.java |2 +- .../src/com/cloud/network/dao/IPAddressVO.java | 24 + framework/jobs/pom.xml |1 + .../debian/config/etc/init.d/cloud-early-config|5 +- .../xen/discoverer/XcpServerDiscoverer.java| 110 +++--- .../hypervisor/xen/resource/CitrixHelper.java |4 +- .../xen/resource/CitrixResourceBase.java | 40 ++- .../xen/resource/XcpServer16Resource.java | 32 ++ .../hypervisor/xen/resource/XcpServerResource.java | 120 -- .../xen/resource/XenServer56FP1Resource.java | 97 +++-- .../xen/resource/CitrixResourceBaseTest.java |5 +- .../cloud/network/element/MidoNetElementTest.java |3 +- scripts/vm/hypervisor/xenserver/xcposs/patch |2 + scripts/vm/hypervisor/xenserver/xcpserver/patch|4 +- scripts/vm/hypervisor/xenserver/xenserver56/patch |4 +- .../vm/hypervisor/xenserver/xenserver56fp1/patch |4 +- scripts/vm/hypervisor/xenserver/xenserver60/patch |4 +- server/src/com/cloud/api/ApiResponseHelper.java| 80 +++- .../com/cloud/capacity/CapacityManagerImpl.java| 20 +- .../configuration/ConfigurationManagerImpl.java| 165 +++- .../com/cloud/hypervisor/HypervisorGuruBase.java |6 +- server/src/com/cloud/network/NetworkManager.java | 43 ++- .../src/com/cloud/network/NetworkManagerImpl.java | 334 +- .../src/com/cloud/network/NetworkServiceImpl.java | 105 +++-- server/src/com/cloud/network/addr/PublicIp.java|9 + .../network/element/VirtualRouterElement.java | 70 +++- .../router/VirtualNetworkApplianceManager.java |2 +-
[22/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2599. Fix EC2 Rest to support tag related EC2 API's - CreateTags/DeleteTags/DescribeTags Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/50339211 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/50339211 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/50339211 Branch: refs/heads/vmware-datamodel Commit: 503392119d515a81742e9c36d3f285afe2a960fb Parents: eb7c321 Author: Likitha Shetty Authored: Tue May 21 11:19:02 2013 +0530 Committer: Likitha Shetty Committed: Tue May 21 11:33:33 2013 +0530 -- .../com/cloud/bridge/service/EC2RestServlet.java | 91 ++ .../cloud/bridge/service/EC2SoapServiceImpl.java | 135 -- 2 files changed, 168 insertions(+), 58 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/50339211/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java -- diff --git a/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java b/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java index 6dd7a8c..6b634e8 100644 --- a/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java +++ b/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java @@ -35,8 +35,11 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.Enumeration; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Properties; +import java.util.Set; import java.util.UUID; import javax.inject.Inject; @@ -68,10 +71,12 @@ import com.amazon.ec2.CreateImageResponse; import com.amazon.ec2.CreateKeyPairResponse; import com.amazon.ec2.CreateSecurityGroupResponse; import com.amazon.ec2.CreateSnapshotResponse; +import com.amazon.ec2.CreateTagsResponse; import com.amazon.ec2.CreateVolumeResponse; import com.amazon.ec2.DeleteKeyPairResponse; import com.amazon.ec2.DeleteSecurityGroupResponse; import com.amazon.ec2.DeleteSnapshotResponse; +import com.amazon.ec2.DeleteTagsResponse; import com.amazon.ec2.DeleteVolumeResponse; import com.amazon.ec2.DeregisterImageResponse; import com.amazon.ec2.DescribeAvailabilityZonesResponse; @@ -82,6 +87,7 @@ import com.amazon.ec2.DescribeInstancesResponse; import com.amazon.ec2.DescribeKeyPairsResponse; import com.amazon.ec2.DescribeSecurityGroupsResponse; import com.amazon.ec2.DescribeSnapshotsResponse; +import com.amazon.ec2.DescribeTagsResponse; import com.amazon.ec2.DescribeVolumesResponse; import com.amazon.ec2.DetachVolumeResponse; import com.amazon.ec2.DisassociateAddressResponse; @@ -122,6 +128,7 @@ import com.cloud.bridge.service.core.ec2.EC2DescribeInstances; import com.cloud.bridge.service.core.ec2.EC2DescribeKeyPairs; import com.cloud.bridge.service.core.ec2.EC2DescribeSecurityGroups; import com.cloud.bridge.service.core.ec2.EC2DescribeSnapshots; +import com.cloud.bridge.service.core.ec2.EC2DescribeTags; import com.cloud.bridge.service.core.ec2.EC2DescribeVolumes; import com.cloud.bridge.service.core.ec2.EC2DisassociateAddress; import com.cloud.bridge.service.core.ec2.EC2Engine; @@ -143,6 +150,10 @@ import com.cloud.bridge.service.core.ec2.EC2SecurityGroup; import com.cloud.bridge.service.core.ec2.EC2SnapshotFilterSet; import com.cloud.bridge.service.core.ec2.EC2StartInstances; import com.cloud.bridge.service.core.ec2.EC2StopInstances; +import com.cloud.bridge.service.core.ec2.EC2TagKeyValue; +import com.cloud.bridge.service.core.ec2.EC2TagTypeId; +import com.cloud.bridge.service.core.ec2.EC2Tags; +import com.cloud.bridge.service.core.ec2.EC2TagsFilterSet; import com.cloud.bridge.service.core.ec2.EC2Volume; import com.cloud.bridge.service.core.ec2.EC2VolumeFilterSet; import com.cloud.bridge.service.exception.EC2ServiceException; @@ -294,6 +305,9 @@ public class EC2RestServlet extends HttpServlet { else if (action.equalsIgnoreCase( "ImportKeyPair" )) importKeyPair(request, response); else if (action.equalsIgnoreCase( "DeleteKeyPair" )) deleteKeyPair(request, response); else if (action.equalsIgnoreCase( "DescribeKeyPairs" )) describeKeyPairs(request, response); +else if (action.equalsIgnoreCase( "CreateTags")) createTags(request, response); +else if (action.equalsIgnoreCase( "DeleteTags")) deleteTags(request, response); +else if (action.equalsIgnoreCase( "DescribeTags" )) describeTags(request, response); else if (action.equalsIgnoreCase( "GetPasswordData" )) getPasswordData(request, response); else { logger.error("Unsupported action " + action); @@ -1824,6 +1838,83 @@ public class EC2RestServlet extends HttpServlet {
[39/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2472: Fix unresolved reference to max_value 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/b74d13f9 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b74d13f9 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b74d13f9 Branch: refs/heads/vmware-datamodel Commit: b74d13f9b1daf7e09fa3fa23d963b20ed12e588a Parents: 1736031 Author: Girish Shilamkar Authored: Tue May 21 16:38:39 2013 +0530 Committer: Prasanna Santhanam Committed: Tue May 21 19:31:52 2013 +0530 -- test/integration/component/test_project_limits.py |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b74d13f9/test/integration/component/test_project_limits.py -- diff --git a/test/integration/component/test_project_limits.py b/test/integration/component/test_project_limits.py index 17ddfc6..9184dca 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -193,7 +193,7 @@ class TestProjectLimits(cloudstackTestCase): #Also, verify resource limits for the project are independent of #account resource limits # 3. Increase Projects Resources limits above domains limit. Verify -#project canât have more resources than domain level limit allows. +#project can't have more resources than domain level limit allows. # 4. Create Resource more than its set limit for a project. Verify #resource allocation should fail giving proper message @@ -312,6 +312,7 @@ class TestProjectLimits(cloudstackTestCase): max=2 ) with self.assertRaises(Exception): +max_value = 3 self.debug( "Attempting to update project: %s resource limit to: %s" % ( project.id, @@ -321,7 +322,7 @@ class TestProjectLimits(cloudstackTestCase): update_resource_limit( self.apiclient, resource.resourcetype, -max=3, +max=max_value, projectid=project.id ) return
[25/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-2305: [Automation] NPE: not able to create volume from snapshot Signed off by : Nitin Mehta Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/55c38465 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/55c38465 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/55c38465 Branch: refs/heads/vmware-datamodel Commit: 55c384651acf3778a4cce57543f79c6e5838fef4 Parents: 49faa00 Author: Sanjay Tripathi Authored: Tue May 21 11:49:42 2013 +0530 Committer: Nitin Mehta Committed: Tue May 21 12:00:49 2013 +0530 -- .../src/com/cloud/storage/VolumeManagerImpl.java | 16 +++--- 1 files changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/55c38465/server/src/com/cloud/storage/VolumeManagerImpl.java -- diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java index 55e20cf..4b654eb 100644 --- a/server/src/com/cloud/storage/VolumeManagerImpl.java +++ b/server/src/com/cloud/storage/VolumeManagerImpl.java @@ -878,14 +878,6 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager { size = diskOffering.getDiskSize(); } -if(displayVolumeEnabled == null){ -displayVolumeEnabled = true; -} else{ -if(!_accountMgr.isRootAdmin(caller.getType())){ -throw new PermissionDeniedException( "Cannot update parameter displayvolume, only admin permitted "); -} -} - if (!validateVolumeSizeRange(size)) {// convert size from mb to gb // for validation throw new InvalidParameterValueException( @@ -917,6 +909,14 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager { _accountMgr.checkAccess(caller, null, true, snapshotCheck); } +if(displayVolumeEnabled == null){ +displayVolumeEnabled = true; +} else{ +if(!_accountMgr.isRootAdmin(caller.getType())){ +throw new PermissionDeniedException( "Cannot update parameter displayvolume, only admin permitted "); +} +} + // Check that the resource limit for primary storage won't be exceeded _resourceLimitMgr.checkResourceLimit(_accountMgr.getAccount(ownerId), ResourceType.primary_storage, new Long(size));
[43/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to 8996ea3
CLOUDSTACK-747: internalLb in VPC - UI - create network offering - when Lb service is checked and LB provider is InternalLbVm, pass capability type as lbSchemes and capability value as internal. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a75cf9a7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a75cf9a7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a75cf9a7 Branch: refs/heads/vmware-datamodel Commit: a75cf9a79d9f3f3c6c399b03e73362523e3d815a Parents: 263cc9a Author: Jessica Wang Authored: Tue May 21 11:37:12 2013 -0700 Committer: Jessica Wang Committed: Tue May 21 11:44:50 2013 -0700 -- ui/scripts/configuration.js |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a75cf9a7/ui/scripts/configuration.js -- diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 7485898..92c3d00 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -1834,7 +1834,13 @@ inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].capabilitytype'] = 'associatePublicIP'; inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].capabilityvalue'] = true; //because this checkbox's value == "on" serviceCapabilityIndex++; - } + } +else if((key == 'service.Lb.provider') && ("Lb" in serviceProviderMap) && (serviceProviderMap.Lb == "InternalLbVm")) { + inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].service'] = 'lb'; + inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].capabilitytype'] = 'lbSchemes'; + inputData['servicecapabilitylist[' + serviceCapabilityIndex + '].capabilityvalue'] = 'internal'; + serviceCapabilityIndex++; +} } else if (value != '') { // Normal data inputData[key] = value;