git commit: updated refs/heads/4.4-forward to e5de1cb
Repository: cloudstack Updated Branches: refs/heads/4.4-forward 22f503aa2 -> e5de1cb7c CLOUDSTACK-6736: Added version informatoin, fixed data corruption, regression issues. Signed-off-by: Jayapal Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e5de1cb7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e5de1cb7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e5de1cb7 Branch: refs/heads/4.4-forward Commit: e5de1cb7c2ad98307edf4983ffe7b23be5f12d3b Parents: 22f503a Author: santhosh Authored: Wed May 21 19:59:44 2014 +1000 Committer: Jayapal Committed: Wed May 21 16:36:37 2014 +0530 -- test/integration/smoke/test_deploy_vm.py| 3 +- test/integration/smoke/test_guest_vlan_range.py | 8 +-- test/integration/smoke/test_hosts.py| 2 +- test/integration/smoke/test_vm_life_cycle.py| 52 +++- tools/marvin/marvin/cloudstackTestClient.py | 4 +- tools/marvin/setup.py | 8 +-- 6 files changed, 30 insertions(+), 47 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e5de1cb7/test/integration/smoke/test_deploy_vm.py -- diff --git a/test/integration/smoke/test_deploy_vm.py b/test/integration/smoke/test_deploy_vm.py index db26980..a8e406d 100644 --- a/test/integration/smoke/test_deploy_vm.py +++ b/test/integration/smoke/test_deploy_vm.py @@ -85,7 +85,8 @@ class TestDeployVM(cloudstackTestCase): serviceofferingid=self.service_offering.id, templateid=self.template.id ) - +if not self.virtual_machine: +self.fail("Deploying a Virtual Machine Failed") list_vms = VirtualMachine.list(self.apiclient, id=self.virtual_machine.id) self.debug( "Verify listVirtualMachines response for virtual machine: %s"\ http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e5de1cb7/test/integration/smoke/test_guest_vlan_range.py -- diff --git a/test/integration/smoke/test_guest_vlan_range.py b/test/integration/smoke/test_guest_vlan_range.py index bfef4a8..f5bcdf4 100644 --- a/test/integration/smoke/test_guest_vlan_range.py +++ b/test/integration/smoke/test_guest_vlan_range.py @@ -31,7 +31,7 @@ class TestDedicateGuestVlanRange(cloudstackTestCase): @classmethod def setUpClass(cls): testClient = super(TestDedicateGuestVlanRange, cls).getClsTestClient() -cls.apiclient = testClient.getApiClient() +cls.apiclient = testClient.getApiClient() cls.services = testClient.getParsedTestDataConfig() # Get Zone, Domain @@ -78,7 +78,7 @@ class TestDedicateGuestVlanRange(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return -@attr(tags=["simulator", "advanced", "guestvlanrange", "dedicate", "release", "selfservice"]) +@attr(tags=["simulator", "advanced", "guestvlanrange", "dedicate", "release", "selfservice"],BugId="CLOUDSTACK-6738") def test_dedicateGuestVlanRange(self): """Test guest vlan range dedication """ @@ -97,11 +97,7 @@ class TestDedicateGuestVlanRange(cloudstackTestCase): """ self.debug("Adding guest vlan range") - -print "existing vlna = %s" %self.physical_network.vlan -print "free vlan = %s" %self.free_vlan new_vlan = self.physical_network.vlan + "," + self.free_vlan["partial_range"][0] -print "new vlan = %s" % new_vlan #new_vlan = self.free_vlan["partial_range"][0] addGuestVlanRangeResponse = self.physical_network.update(self.apiclient, id=self.physical_network.id, vlan=new_vlan) http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e5de1cb7/test/integration/smoke/test_hosts.py -- diff --git a/test/integration/smoke/test_hosts.py b/test/integration/smoke/test_hosts.py index 7798c8e..952f160 100644 --- a/test/integration/smoke/test_hosts.py +++ b/test/integration/smoke/test_hosts.py @@ -53,7 +53,7 @@ class TestHosts(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return -@attr(tags=["selfservice"]) +#@attr(tags=["selfservice"]) def test_01_clusters(self): """Test Add clusters & hosts - simulator http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e5de1cb7/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 85033c5..1e56571 1006
[1/7] Disable IAM feature from 4.4 release.
Repository: cloudstack Updated Branches: refs/heads/4.4 850e068a5 -> 6ba541afb http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ba541af/test/integration/smoke/test_vm_iam.py -- diff --git a/test/integration/smoke/test_vm_iam.py b/test/integration/smoke/test_vm_iam.py deleted file mode 100644 index 80c049b..000 --- a/test/integration/smoke/test_vm_iam.py +++ /dev/null @@ -1,717 +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. -""" BVT tests for Virtual Machine IAM effect -""" -#Import Local Modules -import marvin -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 nose.plugins.attrib import attr -#Import System modules -import time - -_multiprocess_shared_ = True -class Services: -"""Test VM Life Cycle Services -""" - -def __init__(self): -self.services = { -#data for domains and accounts -"domain1": { -"name": "Domain1", - }, -"account1A": { -"email": "tes...@test.com", -"firstname": "test1A", -"lastname": "User", -"username": "test1A", -"password": "password", -}, -"account1B": { -"email": "tes...@test.com", -"firstname": "test1B", -"lastname": "User", -"username": "test1B", -"password": "password", -}, -"domain2": { -"name": "Domain2", - }, -"account2A": { -"email": "tes...@test.com", -"firstname": "test2A", -"lastname": "User", -"username": "test2A", -"password": "password", -}, -#data reqd for virtual machine creation -"virtual_machine1A" : { -"name" : "test1Avm", -"displayname" : "Test1A VM", -}, -"virtual_machine1B" : { -"name" : "test1Bvm", -"displayname" : "Test1B VM", -}, -"virtual_machine2A" : { -"name" : "test2Avm", -"displayname" : "Test2A VM", -}, -#small service offering -"service_offering": { -"small": { -"name": "Small Instance", -"displaytext": "Small Instance", -"cpunumber": 1, -"cpuspeed": 100, -"memory": 128, -}, -}, -"ostype": 'CentOS 5.6 (64-bit)', -# iam group and policy information -"service_desk_iam_grp" : { -"name" : "Service Desk", -"description" : "Service Desk IAM Group" -}, -"vm_readonly_iam_policy" : { -"name" : "VM Read Only Access", -"description" : "VM read only access iam policy" -}, -} - - - -class TestVMIam(cloudstackTestCase): - -@classmethod -def setUpClass(self): -self.apiclient = super(TestVMIam, self).getClsTestClient().getApiClient() -self.services = Services().services - -# backup default apikey and secretkey -self.default_apikey = self.apiclient.connection.apiKey -self.default_secretkey = self.apiclient.connection.securityKey - -# Create domains and accounts etc -self.domain_1 = Domain.create( - self.apiclient, - self.services["domain1"] - ) -self.domain_2 = Domain.create( - self.apiclient, - self.services["domain2"] - ) -# Create two accounts for doamin_1 -self.account_1A = Account.create( -
[3/7] Disable IAM feature from 4.4 release.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ba541af/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 e7db877..58709ec 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -35,6 +35,9 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; +import org.apache.commons.codec.binary.Base64; +import org.apache.log4j.Logger; + import org.apache.cloudstack.acl.ControlledEntity.ACLType; import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.cloudstack.affinity.AffinityGroupService; @@ -83,8 +86,6 @@ import org.apache.cloudstack.storage.command.DeleteCommand; import org.apache.cloudstack.storage.command.DettachCommand; import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; -import org.apache.commons.codec.binary.Base64; -import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; @@ -531,7 +532,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir throw new InvalidParameterValueException("Vm with id " + vmId + " is not in the right state"); } -_accountMgr.checkAccess(caller, null, userVm); +_accountMgr.checkAccess(caller, null, true, userVm); boolean result = resetVMPasswordInternal(vmId, password); @@ -637,7 +638,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir + " in specified domain id"); } -_accountMgr.checkAccess(caller, null, userVm); +_accountMgr.checkAccess(caller, null, true, userVm); String password = null; String sshPublicKey = s.getPublicKey(); if (template != null && template.getEnablePassword()) { @@ -777,7 +778,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir + "; make sure the virtual machine is stopped"); } -_accountMgr.checkAccess(caller, null, vmInstance); +_accountMgr.checkAccess(caller, null, true, vmInstance); // Check resource limits for CPU and Memory. Map customParameters = cmd.getDetails(); @@ -891,7 +892,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir throw new InvalidParameterValueException("unable to find a virtual machine with id " + vmId); } -_accountMgr.checkAccess(caller, null, vmInstance); +_accountMgr.checkAccess(caller, null, true, vmInstance); // Check resource limits for CPU and Memory. ServiceOfferingVO newServiceOffering = _offeringDao.findById(svcOffId); @@ -960,6 +961,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir Long vmId = cmd.getVmId(); Long networkId = cmd.getNetworkId(); String ipAddress = cmd.getIpAddress(); +Account caller = CallContext.current().getCallingAccount(); UserVmVO vmInstance = _vmDao.findById(vmId); if (vmInstance == null) { @@ -970,6 +972,12 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir throw new InvalidParameterValueException("unable to find a network with id " + networkId); } +if (caller.getType() != Account.ACCOUNT_TYPE_ADMIN) { +if (!(network.getGuestType() == Network.GuestType.Shared && network.getAclType() == ACLType.Domain) +&& !(network.getAclType() == ACLType.Account && network.getAccountId() == vmInstance.getAccountId())) { +throw new InvalidParameterValueException("only shared network or isolated network with the same account_id can be added to vmId: " + vmId); +} +} List allNics = _nicDao.listByVmId(vmInstance.getId()); for (NicVO nic : allNics) { @@ -982,12 +990,18 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir profile = new NicProfile(ipAddress, null); } +// Perform permission check on VM +_accountMgr.checkAccess(caller, null, true, vmInstance); + // Verify that zone is not Basic DataCenterVO dc = _dcDao.findById(vmInstance.getDataCenterId()); if (dc.getNetworkType() == DataCenter.NetworkType.Basic) { throw new CloudRuntimeException("Zone " + vmInstance.getDataCenterId() + ", has a NetworkType of Basic. Can't add a new NIC to a VM on a Basic Network"); } +// Perform account permission check on network +_accountMgr.checkAccess(caller, AccessType.UseEntry, false, network); + //ensure network belon
git commit: updated refs/heads/4.4-forward to 751f0ac
Repository: cloudstack Updated Branches: refs/heads/4.4-forward e5de1cb7c -> 751f0ac51 Fix for Marvin utils.py:checkVolumeSize Fix for test_01_create_volume to use the correct volume name for XenServer Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/751f0ac5 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/751f0ac5 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/751f0ac5 Branch: refs/heads/4.4-forward Commit: 751f0ac5185c832b30e65d271af8d08469202329 Parents: e5de1cb Author: Doug Clark Authored: Wed May 21 11:36:11 2014 + Committer: SrikanteswaraRao Talluri Committed: Wed May 21 17:25:56 2014 +0530 -- test/integration/smoke/test_volumes.py | 13 +++-- tools/marvin/marvin/lib/utils.py | 5 ++--- 2 files changed, 13 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/751f0ac5/test/integration/smoke/test_volumes.py -- diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py index c8fc26b..cc76e49 100644 --- a/test/integration/smoke/test_volumes.py +++ b/test/integration/smoke/test_volumes.py @@ -33,7 +33,7 @@ from marvin.lib.common import (get_domain, get_zone, get_template) from marvin.lib.utils import checkVolumeSize -from marvin.codes import SUCCESS, FAILED, ERROR_CODE_530 +from marvin.codes import SUCCESS, FAILED, ERROR_CODE_530, XEN_SERVER from nose.plugins.attrib import attr #Import System modules import os @@ -197,7 +197,16 @@ class TestCreateVolume(cloudstackTestCase): ssh = self.virtual_machine.get_ssh_client( reconnect=True ) -ret = checkVolumeSize(ssh_handle=ssh,size_to_verify=vol_sz) +# Get the updated volume information +list_volume_response = Volume.list( + self.apiClient, + id=volume.id) +if list_volume_response[0].hypervisor.lower() == XEN_SERVER.lower(): +volume_name = "/dev/xvd" + chr(ord('a') + int(list_volume_response[0].deviceid)) +self.debug(" Using XenServer volume_name: %s" % (volume_name)) +ret = checkVolumeSize(ssh_handle=ssh,volume_name=volume_name,size_to_verify=vol_sz) +else: +ret = checkVolumeSize(ssh_handle=ssh,size_to_verify=vol_sz) self.debug(" Volume Size Expected %s Actual :%s" %(vol_sz,ret[1])) self.virtual_machine.detach_volume(self.apiClient, volume) self.assertEqual(ret[0],SUCCESS,"Check if promised disk size actually available") http://git-wip-us.apache.org/repos/asf/cloudstack/blob/751f0ac5/tools/marvin/marvin/lib/utils.py -- diff --git a/tools/marvin/marvin/lib/utils.py b/tools/marvin/marvin/lib/utils.py index 4194e32..60a15ea 100644 --- a/tools/marvin/marvin/lib/utils.py +++ b/tools/marvin/marvin/lib/utils.py @@ -502,10 +502,9 @@ def checkVolumeSize(ssh_handle=None, fdisk_output = ssh_handle.runCommand(cmd_inp) if fdisk_output["status"] != SUCCESS: return FAILED -temp_out = fdisk_output["stdout"] -for line in temp_out.split("\n"): +for line in fdisk_output["stdout"]: if volume_name in line: -parts = line.split() +parts = line.strip().split() if str(parts[-2]) == str(size_to_verify): return [SUCCESS, str(parts[-2])] return [FAILED, "Volume Not Found"]
git commit: updated refs/heads/4.4-forward to 7bbad04
Repository: cloudstack Updated Branches: refs/heads/4.4-forward 751f0ac51 -> 7bbad0491 CLOUDSTACK-6671: Fixing NPE when a mapping is missing Adding missing KVM mappings Testing Done: Local testing with removing CentOS mapping and launch a VM. 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/7bbad049 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7bbad049 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7bbad049 Branch: refs/heads/4.4-forward Commit: 7bbad0491f7ec087f693814caadbe6d648d2edf2 Parents: 751f0ac Author: Amogh Vasekar Authored: Wed May 21 08:26:15 2014 -0700 Committer: Nitin Mehta Committed: Wed May 21 08:27:27 2014 -0700 -- .../src/com/cloud/hypervisor/XenServerGuru.java | 6 +- server/src/com/cloud/hypervisor/KVMGuru.java| 6 +- setup/db/db/schema-430to440.sql | 22 +++- 3 files changed, 31 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7bbad049/plugins/hypervisors/xen/src/com/cloud/hypervisor/XenServerGuru.java -- diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/XenServerGuru.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/XenServerGuru.java index 620d711..c10f4a0 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/XenServerGuru.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/XenServerGuru.java @@ -93,7 +93,11 @@ public class XenServerGuru extends HypervisorGuruBase implements HypervisorGuru to.setOs(guestOS.getDisplayName()); HostVO host = hostDao.findById(vm.getVirtualMachine().getHostId()); GuestOSHypervisorVO guestOsMapping = _guestOsHypervisorDao.findByOsIdAndHypervisor(guestOS.getId(), getHypervisorType().toString(), host.getHypervisorVersion()); -to.setPlatformEmulator(guestOsMapping.getGuestOsName()); +if (guestOsMapping == null) { +to.setPlatformEmulator(null); +} else { +to.setPlatformEmulator(guestOsMapping.getGuestOsName()); +} return to; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7bbad049/server/src/com/cloud/hypervisor/KVMGuru.java -- diff --git a/server/src/com/cloud/hypervisor/KVMGuru.java b/server/src/com/cloud/hypervisor/KVMGuru.java index 4225232..287b0d2 100644 --- a/server/src/com/cloud/hypervisor/KVMGuru.java +++ b/server/src/com/cloud/hypervisor/KVMGuru.java @@ -61,7 +61,11 @@ public class KVMGuru extends HypervisorGuruBase implements HypervisorGuru { to.setOs(guestOS.getDisplayName()); HostVO host = _hostDao.findById(vm.getVirtualMachine().getHostId()); GuestOSHypervisorVO guestOsMapping = _guestOsHypervisorDao.findByOsIdAndHypervisor(guestOS.getId(), getHypervisorType().toString(), host.getHypervisorVersion()); -to.setPlatformEmulator(guestOsMapping.getGuestOsName()); +if (guestOsMapping == null) { +to.setPlatformEmulator(null); +} else { +to.setPlatformEmulator(guestOsMapping.getGuestOsName()); +} return to; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7bbad049/setup/db/db/schema-430to440.sql -- diff --git a/setup/db/db/schema-430to440.sql b/setup/db/db/schema-430to440.sql index 89db04a..7fa93e7 100644 --- a/setup/db/db/schema-430to440.sql +++ b/setup/db/db/schema-430to440.sql @@ -1674,4 +1674,24 @@ CREATE TABLE `cloud`.`network_acl_item_cidrs` ( ALTER TABLE `cloud`.`load_balancer_healthcheck_policies` ADD COLUMN `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the policy can be displayed to the end user'; ALTER TABLE `cloud`.`load_balancer_stickiness_policies` ADD COLUMN `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the policy can be displayed to the end user'; - +INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'KVM', 'default', 'CentOS 5 (64-bit)', 140, now(), 0); +INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'KVM', 'default', 'Red Hat Enterprise Linux 6.0', 136, now(), 0); +INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'KVM', 'default', 'Red Hat Enterprise Linux 6.0', 137, now(), 0); +INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type
[2/2] git commit: updated refs/heads/multiple-disk-ova to 87d87a6
CLOUDSTACK-4757. Improvements to the marvin test. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/87d87a6f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/87d87a6f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/87d87a6f Branch: refs/heads/multiple-disk-ova Commit: 87d87a6f30c45125e5769f04e8d4260074c79f87 Parents: 30b8eba Author: Likitha Shetty Authored: Wed May 21 20:29:03 2014 +0530 Committer: Likitha Shetty Committed: Wed May 21 21:15:54 2014 +0530 -- server/src/com/cloud/vm/UserVmManagerImpl.java | 2 +- .../test_ova_templates_with_multiple_disks.py | 69 ++-- tools/marvin/marvin/lib/base.py | 14 ++-- 3 files changed, 41 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/87d87a6f/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 8a719de..74bd6d02 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -2610,7 +2610,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir if (dataDiskTemplate == null || (!dataDiskTemplate.getTemplateType().equals(TemplateType.DATADISK)) && (dataDiskTemplate.getState().equals(VirtualMachineTemplate.State.Active))) { -throw new InvalidParameterValueException("Invalid template id specified for Datadisk template" + datadiskTemplateToDiskOffering.getKey()); +throw new InvalidParameterValueException("Invalid template id specified for Datadisk template " + datadiskTemplateToDiskOffering.getKey()); } long dataDiskTemplateId = datadiskTemplateToDiskOffering.getKey(); if (!dataDiskTemplate.getParentTemplateId().equals(template.getId())) { http://git-wip-us.apache.org/repos/asf/cloudstack/blob/87d87a6f/test/integration/component/test_ova_templates_with_multiple_disks.py -- diff --git a/test/integration/component/test_ova_templates_with_multiple_disks.py b/test/integration/component/test_ova_templates_with_multiple_disks.py old mode 100644 new mode 100755 index adb948c..a4011f4 --- a/test/integration/component/test_ova_templates_with_multiple_disks.py +++ b/test/integration/component/test_ova_templates_with_multiple_disks.py @@ -20,13 +20,13 @@ 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.lib.utils import * +from marvin.lib.base import * +from marvin.lib.common import * import urllib from random import random import time - +from ddt import ddt class Services: """Test OVA template with mutiple disks @@ -51,7 +51,6 @@ class Services: "disk_offering": { "displaytext": "Small", "name": "Small", -"disksize": 1 }, "virtual_machine": { "displayname": "testVM", @@ -63,24 +62,19 @@ class Services: "privateport": 22, "publicport": 22, }, -"templates": { -0: { +"template": { "displaytext": "Template with multiple disks", "name": "Template with multiple disks", -"ostype": 'CentOS 5.3 (64-bit)', -"url": "http://10.147.28.7/templates/multipledisk.ova";, -"hypervisor": 'VMware', -"format": 'OVA', "isfeatured": True, "ispublic": True, "isextractable": False, -}, }, "sleep": 60, "timeout": 10, +"format": 'ova', } - +@ddt class TestOVATemplateWithMupltipleDisks(cloudstackTestCase): def setUp(self): @@ -101,20 +95,21 @@ class TestOVATemplateWithMupltipleDisks(cloudstackTestCase): @classmethod def setUpClass(cls): -
[1/2] git commit: updated refs/heads/multiple-disk-ova to 87d87a6
Repository: cloudstack Updated Branches: refs/heads/multiple-disk-ova fa0897f90 -> 87d87a6f3 CLOUDSTACK-4757. Cleanup datadisk templates that have already been created in case creation of one of the datadisk template fails Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/30b8eba9 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/30b8eba9 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/30b8eba9 Branch: refs/heads/multiple-disk-ova Commit: 30b8eba92342d391abef9bb3efa1c6efcf588875 Parents: fa0897f Author: Likitha Shetty Authored: Mon May 19 17:05:15 2014 +0530 Committer: Likitha Shetty Committed: Mon May 19 17:05:15 2014 +0530 -- .../storage/image/TemplateServiceImpl.java | 45 ++-- 1 file changed, 32 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/30b8eba9/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java -- diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java index c539dab..3af0904 100644 --- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java @@ -42,6 +42,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector; import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.State; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService.TemplateApiResult; import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; import org.apache.cloudstack.engine.subsystem.api.storage.StorageCacheManager; import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; @@ -96,9 +97,6 @@ import com.cloud.user.AccountManager; import com.cloud.user.ResourceLimitService; import com.cloud.utils.UriUtils; import com.cloud.utils.db.GlobalLock; -import com.cloud.utils.db.Transaction; -import com.cloud.utils.db.TransactionCallbackNoReturn; -import com.cloud.utils.db.TransactionStatus; import com.cloud.utils.exception.CloudRuntimeException; @Component @@ -652,17 +650,12 @@ public class TemplateServiceImpl implements TemplateService { } _resourceLimitMgr.incrementResourceCount(template.getAccountId(), ResourceType.secondary_storage, templateVO.getSize()); } else { -// Cleanup Datadisk template enries in case of failure -Transaction.execute(new TransactionCallbackNoReturn() { -@Override -public void doInTransactionWithoutResult(TransactionStatus status) { - _vmTemplateStoreDao.deletePrimaryRecordsForTemplate(templateId); - _vmTemplateZoneDao.deletePrimaryRecordsForTemplate(templateId); -_templateDao.expunge(templateId); -} -}); -// Don't create the remaining Datadisk templates if creation of any of the Datadisk template failed s_logger.error("Creation of Datadisk: " + templateVO.getId() + " failed: " + result.getResult()); +// Delete the Datadisk templates that were already created as they are now invalid +s_logger.debug("Since creation of Datadisk template: " + templateVO.getId() + " failed, delete other Datadisk templates that were created as part of parent" + +" template download"); +TemplateInfo parentTemplateInfo = imageFactory.getTemplate(templateVO.getParentTemplateId(), imageStore); +cleanupDatadiskTemplates(parentTemplateInfo); return false; } } catch (Exception e) { @@ -679,6 +672,11 @@ public class TemplateServiceImpl implements TemplateService { dataDiskTemplate.getFileSize(), dataDiskTemplate.isBootable()); try { result = templateFuture.get(); +if (!result.isSuccess()) { +s_logger.debug("Since creation of parent template: " + templateInfo.getId() + " failed, delete Datadisk templates that were created as part of parent" + +" template downloa
git commit: updated refs/heads/master to df6ce24
Repository: cloudstack Updated Branches: refs/heads/master 96f092a0a -> df6ce24f4 if networkID is not specified, get one network with free ips. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/df6ce24f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/df6ce24f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/df6ce24f Branch: refs/heads/master Commit: df6ce24f43572418ea8dccdc924ea22e232c0906 Parents: 96f092a Author: Anthony Xu Authored: Wed May 21 14:33:52 2014 -0700 Committer: Anthony Xu Committed: Wed May 21 14:33:52 2014 -0700 -- api/src/com/cloud/network/NetworkModel.java | 4 +++- .../src/com/cloud/network/NetworkModelImpl.java | 25 server/src/com/cloud/vm/UserVmManagerImpl.java | 2 +- .../com/cloud/network/MockNetworkModelImpl.java | 9 +++ .../com/cloud/vpc/MockNetworkModelImpl.java | 9 +++ 5 files changed, 47 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/df6ce24f/api/src/com/cloud/network/NetworkModel.java -- diff --git a/api/src/com/cloud/network/NetworkModel.java b/api/src/com/cloud/network/NetworkModel.java index f48bc9a..468feb3 100644 --- a/api/src/com/cloud/network/NetworkModel.java +++ b/api/src/com/cloud/network/NetworkModel.java @@ -92,6 +92,8 @@ public interface NetworkModel { boolean areServicesSupportedByNetworkOffering(long networkOfferingId, Service... services); +Network getNetworkWithSGWithFreeIPs(Long zoneId); + Network getNetworkWithSecurityGroupEnabled(Long zoneId); String getIpOfNetworkElementInVirtualNetwork(long accountId, long dataCenterId); @@ -277,4 +279,4 @@ public interface NetworkModel { boolean getNetworkEgressDefaultPolicy(Long networkId); void checkNetworkPermissions(Account owner, Network network, AccessType accessType); -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/df6ce24f/server/src/com/cloud/network/NetworkModelImpl.java -- diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java index 918ebf8..3aa797b 100755 --- a/server/src/com/cloud/network/NetworkModelImpl.java +++ b/server/src/com/cloud/network/NetworkModelImpl.java @@ -741,6 +741,31 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { } @Override +public NetworkVO getNetworkWithSGWithFreeIPs(Long zoneId) { +List networks = _networksDao.listByZoneSecurityGroup(zoneId); +if (networks == null || networks.isEmpty()) { +return null; +} +NetworkVO ret_network = null; +for (NetworkVO nw : networks) { +List vlans = _vlanDao.listVlansByNetworkId(nw.getId()); +for (VlanVO vlan : vlans) { +if (_ipAddressDao.countFreeIpsInVlan(vlan.getId()) > 0) { +ret_network = nw; +break; +} +} +if (ret_network != null) { +break; +} +} +if (ret_network == null) { +s_logger.debug("Can not find network with security group enabled with free IPs"); +} +return ret_network; +} + +@Override public NetworkVO getNetworkWithSecurityGroupEnabled(Long zoneId) { List networks = _networksDao.listByZoneSecurityGroup(zoneId); if (networks == null || networks.isEmpty()) { http://git-wip-us.apache.org/repos/asf/cloudstack/blob/df6ce24f/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 a563fad..11cea13 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -2350,7 +2350,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir // If no network is specified, find system security group enabled network if (networkIdList == null || networkIdList.isEmpty()) { -Network networkWithSecurityGroup = _networkModel.getNetworkWithSecurityGroupEnabled(zone.getId()); +Network networkWithSecurityGroup = _networkModel.getNetworkWithSGWithFreeIPs(zone.getId()); if (networkWithSecurityGroup == null) { throw new InvalidParameterValueException("No network with security enabled is found in zone id=" + zone.getId()); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/df6ce24f/server/tes
git commit: updated refs/heads/4.4-forward to 8c5a9ec
Repository: cloudstack Updated Branches: refs/heads/4.4-forward 7bbad0491 -> 8c5a9ec4d if networkID is not specified, get one network with free ips. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8c5a9ec4 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8c5a9ec4 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8c5a9ec4 Branch: refs/heads/4.4-forward Commit: 8c5a9ec4de2745aae551938dbf37ca459ec0297f Parents: 7bbad04 Author: Anthony Xu Authored: Wed May 21 14:33:52 2014 -0700 Committer: Anthony Xu Committed: Wed May 21 14:39:48 2014 -0700 -- api/src/com/cloud/network/NetworkModel.java | 4 +++- .../src/com/cloud/network/NetworkModelImpl.java | 25 server/src/com/cloud/vm/UserVmManagerImpl.java | 2 +- .../com/cloud/network/MockNetworkModelImpl.java | 9 +++ .../com/cloud/vpc/MockNetworkModelImpl.java | 9 +++ 5 files changed, 47 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c5a9ec4/api/src/com/cloud/network/NetworkModel.java -- diff --git a/api/src/com/cloud/network/NetworkModel.java b/api/src/com/cloud/network/NetworkModel.java index f6555db..574160d 100644 --- a/api/src/com/cloud/network/NetworkModel.java +++ b/api/src/com/cloud/network/NetworkModel.java @@ -90,6 +90,8 @@ public interface NetworkModel { boolean areServicesSupportedByNetworkOffering(long networkOfferingId, Service... services); +Network getNetworkWithSGWithFreeIPs(Long zoneId); + Network getNetworkWithSecurityGroupEnabled(Long zoneId); String getIpOfNetworkElementInVirtualNetwork(long accountId, long dataCenterId); @@ -273,4 +275,4 @@ public interface NetworkModel { boolean isNetworkReadyForGc(long networkId); boolean getNetworkEgressDefaultPolicy(Long networkId); -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c5a9ec4/server/src/com/cloud/network/NetworkModelImpl.java -- diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java index 7b4b2be..3d2b133 100755 --- a/server/src/com/cloud/network/NetworkModelImpl.java +++ b/server/src/com/cloud/network/NetworkModelImpl.java @@ -737,6 +737,31 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { } @Override +public NetworkVO getNetworkWithSGWithFreeIPs(Long zoneId) { +List networks = _networksDao.listByZoneSecurityGroup(zoneId); +if (networks == null || networks.isEmpty()) { +return null; +} +NetworkVO ret_network = null; +for (NetworkVO nw : networks) { +List vlans = _vlanDao.listVlansByNetworkId(nw.getId()); +for (VlanVO vlan : vlans) { +if (_ipAddressDao.countFreeIpsInVlan(vlan.getId()) > 0) { +ret_network = nw; +break; +} +} +if (ret_network != null) { +break; +} +} +if (ret_network == null) { +s_logger.debug("Can not find network with security group enabled with free IPs"); +} +return ret_network; +} + +@Override public NetworkVO getNetworkWithSecurityGroupEnabled(Long zoneId) { List networks = _networksDao.listByZoneSecurityGroup(zoneId); if (networks == null || networks.isEmpty()) { http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c5a9ec4/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 58709ec..cf04270 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -2356,7 +2356,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir // If no network is specified, find system security group enabled network if (networkIdList == null || networkIdList.isEmpty()) { -Network networkWithSecurityGroup = _networkModel.getNetworkWithSecurityGroupEnabled(zone.getId()); +Network networkWithSecurityGroup = _networkModel.getNetworkWithSGWithFreeIPs(zone.getId()); if (networkWithSecurityGroup == null) { throw new InvalidParameterValueException("No network with security enabled is found in zone id=" + zone.getId()); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c5a9ec4/server/test/com/cloud/network/MockNetwork
git commit: updated refs/heads/4.4-forward to e3bb8b9
Repository: cloudstack Updated Branches: refs/heads/4.4-forward 8c5a9ec4d -> e3bb8b98b CLOUDSTACK-5485: Use edge-triggering in MessageDetector to handle bogus wakeup gracefully. Level triggering plus bogus wakeup can cause a tight loop to spin Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e3bb8b98 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e3bb8b98 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e3bb8b98 Branch: refs/heads/4.4-forward Commit: e3bb8b98bd9055115004da2ec67b29271a3974c5 Parents: 8c5a9ec Author: Kelven Yang Authored: Wed May 21 16:14:14 2014 -0700 Committer: Kelven Yang Committed: Wed May 21 16:14:14 2014 -0700 -- .../apache/cloudstack/context/CallContext.java | 15 ++- .../framework/messagebus/MessageDetector.java | 33 +++-- .../cloudstack/messagebus/TestMessageBus.java | 7 +- framework/jobs/pom.xml | 17 ++- .../framework/jobs/AsyncJobManagerTest.java | 129 +++ .../jobs/AsyncJobManagerTestConfiguration.java | 54 .../framework/jobs/AsyncJobTestDashboard.java | 47 +++ .../framework/jobs/AsyncJobTestDispatcher.java | 62 + .../resources/AsyncJobManagerTestContext.xml| 38 ++ framework/jobs/test/resources/commonContext.xml | 37 ++ framework/jobs/test/resources/db.properties | 66 ++ framework/jobs/test/resources/log4j.properties | 35 + 12 files changed, 522 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e3bb8b98/api/src/org/apache/cloudstack/context/CallContext.java -- diff --git a/api/src/org/apache/cloudstack/context/CallContext.java b/api/src/org/apache/cloudstack/context/CallContext.java index 7305d14..bf4818b 100644 --- a/api/src/org/apache/cloudstack/context/CallContext.java +++ b/api/src/org/apache/cloudstack/context/CallContext.java @@ -114,7 +114,20 @@ public class CallContext { } public static CallContext current() { -return s_currentContext.get(); +CallContext context = s_currentContext.get(); + +// TODO other than async job and api dispatches, there are many system background running threads +// that do not setup CallContext at all, however, many places in code that are touched by these background tasks +// assume not-null CallContext. Following is a fix to address therefore caused NPE problems +// +// There are security implications with this. It assumes that all system background running threads are +// indeed have no problem in running under system context. +// +if (context == null) { +context = registerSystemCallContextOnceOnly(); +} + +return context; } /** http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e3bb8b98/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java -- diff --git a/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java b/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java index fae9bf3..1dcd6bd 100644 --- a/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java +++ b/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java @@ -18,29 +18,31 @@ */ package org.apache.cloudstack.framework.messagebus; +import org.apache.log4j.Logger; + public class MessageDetector implements MessageSubscriber { +private static final Logger s_logger = Logger.getLogger(MessageDetector.class); private MessageBus _messageBus; private String[] _subjects; -private volatile boolean _signalled = false; - public MessageDetector() { _messageBus = null; _subjects = null; } -public boolean waitAny(long timeoutInMiliseconds) { -synchronized (this) { -if (_signalled) -return true; +public void waitAny(long timeoutInMiliseconds) { +if (timeoutInMiliseconds < 100) { +s_logger.warn("waitAny is passed with a too short time-out interval. " + timeoutInMiliseconds + "ms"); +timeoutInMiliseconds = 100; +} +synchronized (this) { try { wait(timeoutInMiliseconds); } catch (InterruptedException e) { } } -return _signalled; } public void open(MessageBus messageBus, String[] subjects) { @@ -69,9 +71,20 @@ public class MessageDetector implements MessageSubscriber { @Override public void onPublishMessage(String senderAddress, String
git commit: updated refs/heads/master to 09ec127
Repository: cloudstack Updated Branches: refs/heads/master df6ce24f4 -> 09ec12747 CLOUDSTACK-6743: Use edge-triggering in MessageDetector to handle bogus wakeup gracefully. Level triggering plus bogus wakeup can cause a tight loop to spin Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/09ec1274 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/09ec1274 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/09ec1274 Branch: refs/heads/master Commit: 09ec127470febacb45df1e0323a7bd7e7343bd2e Parents: df6ce24 Author: Kelven Yang Authored: Wed May 21 16:14:14 2014 -0700 Committer: Kelven Yang Committed: Wed May 21 16:17:39 2014 -0700 -- .../apache/cloudstack/context/CallContext.java | 15 ++- .../framework/messagebus/MessageDetector.java | 33 +++-- .../cloudstack/messagebus/TestMessageBus.java | 7 +- framework/jobs/pom.xml | 17 ++- .../framework/jobs/AsyncJobManagerTest.java | 129 +++ .../jobs/AsyncJobManagerTestConfiguration.java | 54 .../framework/jobs/AsyncJobTestDashboard.java | 47 +++ .../framework/jobs/AsyncJobTestDispatcher.java | 62 + .../resources/AsyncJobManagerTestContext.xml| 38 ++ framework/jobs/test/resources/commonContext.xml | 37 ++ framework/jobs/test/resources/db.properties | 66 ++ framework/jobs/test/resources/log4j.properties | 35 + 12 files changed, 522 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/09ec1274/api/src/org/apache/cloudstack/context/CallContext.java -- diff --git a/api/src/org/apache/cloudstack/context/CallContext.java b/api/src/org/apache/cloudstack/context/CallContext.java index 7305d14..bf4818b 100644 --- a/api/src/org/apache/cloudstack/context/CallContext.java +++ b/api/src/org/apache/cloudstack/context/CallContext.java @@ -114,7 +114,20 @@ public class CallContext { } public static CallContext current() { -return s_currentContext.get(); +CallContext context = s_currentContext.get(); + +// TODO other than async job and api dispatches, there are many system background running threads +// that do not setup CallContext at all, however, many places in code that are touched by these background tasks +// assume not-null CallContext. Following is a fix to address therefore caused NPE problems +// +// There are security implications with this. It assumes that all system background running threads are +// indeed have no problem in running under system context. +// +if (context == null) { +context = registerSystemCallContextOnceOnly(); +} + +return context; } /** http://git-wip-us.apache.org/repos/asf/cloudstack/blob/09ec1274/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java -- diff --git a/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java b/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java index fae9bf3..1dcd6bd 100644 --- a/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java +++ b/framework/ipc/src/org/apache/cloudstack/framework/messagebus/MessageDetector.java @@ -18,29 +18,31 @@ */ package org.apache.cloudstack.framework.messagebus; +import org.apache.log4j.Logger; + public class MessageDetector implements MessageSubscriber { +private static final Logger s_logger = Logger.getLogger(MessageDetector.class); private MessageBus _messageBus; private String[] _subjects; -private volatile boolean _signalled = false; - public MessageDetector() { _messageBus = null; _subjects = null; } -public boolean waitAny(long timeoutInMiliseconds) { -synchronized (this) { -if (_signalled) -return true; +public void waitAny(long timeoutInMiliseconds) { +if (timeoutInMiliseconds < 100) { +s_logger.warn("waitAny is passed with a too short time-out interval. " + timeoutInMiliseconds + "ms"); +timeoutInMiliseconds = 100; +} +synchronized (this) { try { wait(timeoutInMiliseconds); } catch (InterruptedException e) { } } -return _signalled; } public void open(MessageBus messageBus, String[] subjects) { @@ -69,9 +71,20 @@ public class MessageDetector implements MessageSubscriber { @Override public void onPublishMessage(String senderAddress, String subject,
git commit: updated refs/heads/4.4-forward to 356f612
Repository: cloudstack Updated Branches: refs/heads/4.4-forward e3bb8b98b -> 356f6121a CLOUDSTACK-6742: listVolumes - As regularuser , able to list Vms and volumes of other users. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/356f6121 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/356f6121 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/356f6121 Branch: refs/heads/4.4-forward Commit: 356f6121a78d147d72136044c90472234f667730 Parents: e3bb8b9 Author: Min Chen Authored: Wed May 21 16:25:27 2014 -0700 Committer: Min Chen Committed: Wed May 21 16:26:20 2014 -0700 -- .../contrail/management/MockAccountManager.java | 31 --- .../com/cloud/api/query/QueryManagerImpl.java | 36 ++- server/src/com/cloud/user/AccountManager.java | 17 -- .../src/com/cloud/user/AccountManagerImpl.java | 267 --- .../com/cloud/user/MockAccountManagerImpl.java | 30 --- 5 files changed, 17 insertions(+), 364 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/356f6121/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java -- diff --git a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java index 1a29f9c..4136b5c 100644 --- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java +++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/MockAccountManager.java @@ -199,24 +199,6 @@ public class MockAccountManager extends ManagerBase implements AccountManager { return false; } - -@Override -public void buildACLSearchParameters(Account caller, Long id, String accountName, Long projectId, List permittedDomains, List permittedAccounts, -List permittedResources, Ternary domainIdRecursiveListProject, boolean listAll, boolean forProjectInvitation, -String action) { -// TODO Auto-generated method stub - -} - - - -@Override -public void buildACLViewSearchCriteria(SearchCriteria sc, SearchCriteria aclSc, boolean isRecursive, -List permittedDomains, List permittedAccounts, List permittedResources, ListProjectResourcesCriteria listProjectResourcesCriteria) { -// TODO Auto-generated method stub - -} - @Override public List listAclGroupsByAccount(Long accountId) { // TODO Auto-generated method stub @@ -274,12 +256,6 @@ public class MockAccountManager extends ManagerBase implements AccountManager { } @Override -public void buildACLViewSearchBuilder(SearchBuilder sb, Long domainId, boolean isRecursive, List permittedAccounts, -ListProjectResourcesCriteria listProjectResourcesCriteria, List grantedIds, List revokedIds) { -// TODO Auto-generated method stub -} - -@Override public void buildACLViewSearchCriteria(SearchCriteria sc, Long domainId, boolean isRecursive, List permittedAccounts, ListProjectResourcesCriteria listProjectResourcesCriteria) { // TODO Auto-generated method stub @@ -287,13 +263,6 @@ public class MockAccountManager extends ManagerBase implements AccountManager { } @Override -public void buildACLViewSearchCriteria(SearchCriteria sc, Long domainId, boolean isRecursive, List permittedAccounts, -ListProjectResourcesCriteria listProjectResourcesCriteria, List grantedIds, List revokedIds) { -// TODO Auto-generated method stub - -} - -@Override public Long checkAccessAndSpecifyAuthority(Account arg0, Long arg1) { // TODO Auto-generated method stub return null; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/356f6121/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 e675e83..3ce2b66 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -734,9 +734,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { private Pair, Integer> searchForUserVMsInternal(ListVMsCmd cmd) { Account caller = CallContext.current().getCallingAccount(); -List permittedDomains = new ArrayList(); List permittedAccounts = new ArrayList(); -L
git commit: updated refs/heads/4.4-forward to 65bb733
Repository: cloudstack Updated Branches: refs/heads/4.4-forward 356f6121a -> 65bb733a4 CLOUDSTACK-6744 > UI > zone wizard > baremetal hypervisor > support EIP ELB feature. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/65bb733a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/65bb733a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/65bb733a Branch: refs/heads/4.4-forward Commit: 65bb733a4237242e7f800956840c1a09be18fbb5 Parents: 356f612 Author: Jessica Wang Authored: Wed May 21 17:17:20 2014 -0700 Committer: Jessica Wang Committed: Wed May 21 17:17:20 2014 -0700 -- ui/scripts/zoneWizard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/65bb733a/ui/scripts/zoneWizard.js -- diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index 0a84bdb..a6321cf 100755 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -574,7 +574,7 @@ }); if (thisNetworkOffering.havingEIP == true && thisNetworkOffering.havingELB == true) { //EIP ELB -if (args.hypervisor == "VMware" || args.hypervisor == "BareMetal") { //VMware, BareMetal don't support EIP ELB +if (args.hypervisor == "VMware") { //VMware does not support EIP ELB return true; //move to next item in $.each() loop } if (args.context.zones[0]["network-model"] == "Advanced" && args.context.zones[0]["zone-advanced-sg-enabled"] == "on") { // Advanced SG-enabled zone doesn't support EIP ELB
git commit: updated refs/heads/master to d36c731
Repository: cloudstack Updated Branches: refs/heads/master 09ec12747 -> d36c731f7 CLOUDSTACK-6744 > UI > zone wizard > baremetal hypervisor > support EIP ELB feature. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d36c731f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d36c731f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d36c731f Branch: refs/heads/master Commit: d36c731f795e3d709d830c58936accfadc4277d8 Parents: 09ec127 Author: Jessica Wang Authored: Wed May 21 17:17:20 2014 -0700 Committer: Jessica Wang Committed: Wed May 21 17:22:15 2014 -0700 -- ui/scripts/zoneWizard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d36c731f/ui/scripts/zoneWizard.js -- diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index 0a84bdb..a6321cf 100755 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -574,7 +574,7 @@ }); if (thisNetworkOffering.havingEIP == true && thisNetworkOffering.havingELB == true) { //EIP ELB -if (args.hypervisor == "VMware" || args.hypervisor == "BareMetal") { //VMware, BareMetal don't support EIP ELB +if (args.hypervisor == "VMware") { //VMware does not support EIP ELB return true; //move to next item in $.each() loop } if (args.context.zones[0]["network-model"] == "Advanced" && args.context.zones[0]["zone-advanced-sg-enabled"] == "on") { // Advanced SG-enabled zone doesn't support EIP ELB
git commit: updated refs/heads/master to 570c3a2
Repository: cloudstack Updated Branches: refs/heads/master d36c731f7 -> 570c3a213 bugfix: systemvm template build failed since newer vboxmanage generates $appliance-$branch-vmware-disk3.vmdk Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/570c3a21 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/570c3a21 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/570c3a21 Branch: refs/heads/master Commit: 570c3a2130444cc23013079d7874a1feec35461c Parents: d36c731 Author: ynojima Authored: Wed May 21 18:23:29 2014 -0600 Committer: ynojima Committed: Wed May 21 18:27:24 2014 -0600 -- tools/appliance/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/570c3a21/tools/appliance/build.sh -- diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh index 6d2bd8f..a228e26 100755 --- a/tools/appliance/build.sh +++ b/tools/appliance/build.sh @@ -105,8 +105,8 @@ echo "$appliance exported for VMWare: dist/$appliance-$branch-vmware.vmdk.bz2" vboxmanage export $machine_uuid --output $appliance-$branch-vmware.ovf mv $appliance-$branch-vmware.ovf $appliance-$branch-vmware.ovf-orig java -cp convert Convert convert_ovf_vbox_to_esx.xslt $appliance-$branch-vmware.ovf-orig $appliance-$branch-vmware.ovf -tar -cf $appliance-$branch-vmware.ova $appliance-$branch-vmware.ovf $appliance-$branch-vmware-disk1.vmdk -rm -f $appliance-$branch-vmware.ovf $appliance-$branch-vmware.ovf-orig $appliance-$branch-vmware-disk1.vmdk +tar -cf $appliance-$branch-vmware.ova $appliance-$branch-vmware.ovf $appliance-$branch-vmware-disk[0-9].vmdk +rm -f $appliance-$branch-vmware.ovf $appliance-$branch-vmware.ovf-orig $appliance-$branch-vmware-disk[0-9].vmdk echo "$appliance exported for VMWare: dist/$appliance-$branch-vmware.ova" # Export for HyperV
git commit: updated refs/heads/4.4-forward to b4457d9
Repository: cloudstack Updated Branches: refs/heads/4.4-forward 65bb733a4 -> b4457d92f bugfix: systemvm template build failed since newer vboxmanage generates $appliance-$branch-vmware-disk3.vmdk Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b4457d92 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b4457d92 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b4457d92 Branch: refs/heads/4.4-forward Commit: b4457d92f4ceec83f09b4514a0164c7ec3775e4d Parents: 65bb733 Author: ynojima Authored: Wed May 21 18:23:29 2014 -0600 Committer: ynojima Committed: Wed May 21 19:54:34 2014 -0600 -- tools/appliance/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b4457d92/tools/appliance/build.sh -- diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh index 6d2bd8f..a228e26 100644 --- a/tools/appliance/build.sh +++ b/tools/appliance/build.sh @@ -105,8 +105,8 @@ echo "$appliance exported for VMWare: dist/$appliance-$branch-vmware.vmdk.bz2" vboxmanage export $machine_uuid --output $appliance-$branch-vmware.ovf mv $appliance-$branch-vmware.ovf $appliance-$branch-vmware.ovf-orig java -cp convert Convert convert_ovf_vbox_to_esx.xslt $appliance-$branch-vmware.ovf-orig $appliance-$branch-vmware.ovf -tar -cf $appliance-$branch-vmware.ova $appliance-$branch-vmware.ovf $appliance-$branch-vmware-disk1.vmdk -rm -f $appliance-$branch-vmware.ovf $appliance-$branch-vmware.ovf-orig $appliance-$branch-vmware-disk1.vmdk +tar -cf $appliance-$branch-vmware.ova $appliance-$branch-vmware.ovf $appliance-$branch-vmware-disk[0-9].vmdk +rm -f $appliance-$branch-vmware.ovf $appliance-$branch-vmware.ovf-orig $appliance-$branch-vmware-disk[0-9].vmdk echo "$appliance exported for VMWare: dist/$appliance-$branch-vmware.ova" # Export for HyperV
git commit: updated refs/heads/multiple-disk-ova to ebc92d6
Repository: cloudstack Updated Branches: refs/heads/multiple-disk-ova 87d87a6f3 -> ebc92d6cd CLOUDSTACK-4757. Update API params Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ebc92d6c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ebc92d6c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ebc92d6c Branch: refs/heads/multiple-disk-ova Commit: ebc92d6cd758d031f9d05ab7b277d5541149f771 Parents: 87d87a6 Author: Likitha Shetty Authored: Wed May 21 21:25:43 2014 +0530 Committer: Likitha Shetty Committed: Wed May 21 21:27:41 2014 +0530 -- .../cloudstack/api/command/user/template/ListTemplatesCmd.java | 2 +- api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ebc92d6c/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java -- diff --git a/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java index d257f60..1982ea0 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java @@ -72,7 +72,7 @@ public class ListTemplatesCmd extends BaseListTaggedResourcesCmd { private Boolean showRemoved; @Parameter(name = ApiConstants.PARENT_TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "list datadisk templates by parent template id", -since = "4.4") +since = "4.5") private Long parentTemplateId; / /// Accessors /// http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ebc92d6c/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 c59cea2..8c7f6f2 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 @@ -190,7 +190,7 @@ public class DeployVMCmd extends BaseAsyncCreateCustomIdCmd { @Parameter(name = ApiConstants.DEPLOYMENT_PLANNER, type = CommandType.STRING, description = "Deployment planner to use for vm allocation. Available to ROOT admin only", since = "4.4", authorized = { RoleType.Admin }) private String deploymentPlanner; -@Parameter(name = ApiConstants.DATADISKTEMPLATE_TO_DISKOFFERING_LIST, type = CommandType.MAP, since = "4.4", description = "datadisk template to disk-offering mapping;" + +@Parameter(name = ApiConstants.DATADISKTEMPLATE_TO_DISKOFFERING_LIST, type = CommandType.MAP, since = "4.5", description = "datadisk template to disk-offering mapping;" + " an optional parameter used to create additional data disks from datadisk templates; can't be specified with diskOfferingId parameter") private Map dataDiskTemplateToDiskOfferingList;
git commit: updated refs/heads/master to 6f0b572
Repository: cloudstack Updated Branches: refs/heads/master 570c3a213 -> 6f0b57216 Fix for Marvin utils.py:checkVolumeSize Fix for test_01_create_volume to use the correct volume name for XenServer Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6f0b5721 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6f0b5721 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6f0b5721 Branch: refs/heads/master Commit: 6f0b57216cd1b0ee79687fa98f1f4970984b805e Parents: 570c3a2 Author: Doug Clark Authored: Wed May 21 12:06:45 2014 + Committer: SrikanteswaraRao Talluri Committed: Thu May 22 11:12:37 2014 +0530 -- test/integration/smoke/test_volumes.py | 13 +++-- tools/marvin/marvin/lib/utils.py | 5 ++--- 2 files changed, 13 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6f0b5721/test/integration/smoke/test_volumes.py -- diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py index a151df9..e2539b8 100644 --- a/test/integration/smoke/test_volumes.py +++ b/test/integration/smoke/test_volumes.py @@ -33,7 +33,7 @@ from marvin.lib.common import (get_domain, get_zone, get_template) from marvin.lib.utils import checkVolumeSize -from marvin.codes import SUCCESS, FAILED, ERROR_CODE_530 +from marvin.codes import SUCCESS, FAILED, ERROR_CODE_530, XEN_SERVER from nose.plugins.attrib import attr #Import System modules import os @@ -213,7 +213,16 @@ class TestCreateVolume(cloudstackTestCase): ssh = self.virtual_machine.get_ssh_client( reconnect=True ) -ret = checkVolumeSize(ssh_handle=ssh,size_to_verify=vol_sz) +# Get the updated volume information +list_volume_response = Volume.list( + self.apiClient, + id=volume.id) +if list_volume_response[0].hypervisor.lower() == XEN_SERVER.lower(): +volume_name = "/dev/xvd" + chr(ord('a') + int(list_volume_response[0].deviceid)) +self.debug(" Using XenServer volume_name: %s" % (volume_name)) +ret = checkVolumeSize(ssh_handle=ssh,volume_name=volume_name,size_to_verify=vol_sz) +else: +ret = checkVolumeSize(ssh_handle=ssh,size_to_verify=vol_sz) self.debug(" Volume Size Expected %s Actual :%s" %(vol_sz,ret[1])) self.virtual_machine.detach_volume(self.apiClient, volume) self.assertEqual(ret[0],SUCCESS,"Check if promised disk size actually available") http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6f0b5721/tools/marvin/marvin/lib/utils.py -- diff --git a/tools/marvin/marvin/lib/utils.py b/tools/marvin/marvin/lib/utils.py index cb5dcfb..b095911 100644 --- a/tools/marvin/marvin/lib/utils.py +++ b/tools/marvin/marvin/lib/utils.py @@ -460,10 +460,9 @@ def checkVolumeSize(ssh_handle=None, fdisk_output = ssh_handle.runCommand(cmd_inp) if fdisk_output["status"] != SUCCESS: return FAILED -temp_out = fdisk_output["stdout"] -for line in temp_out.split("\n"): +for line in fdisk_output["stdout"]: if volume_name in line: -parts = line.split() +parts = line.strip().split() if str(parts[-2]) == str(size_to_verify): return [SUCCESS,str(parts[-2])] return [FAILED,"Volume Not Found"]
git commit: updated refs/heads/4.4-forward to 0d243ec
Repository: cloudstack Updated Branches: refs/heads/4.4-forward b4457d92f -> 0d243ec7f CLOUDSTACK-6745:DomainAdmin is not able to deploy Vm for users in his domain/subdomain. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0d243ec7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0d243ec7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0d243ec7 Branch: refs/heads/4.4-forward Commit: 0d243ec7f2e1a0e3508d385f7b793b103c56ca07 Parents: b4457d9 Author: Min Chen Authored: Wed May 21 21:57:29 2014 -0700 Committer: Min Chen Committed: Wed May 21 21:58:17 2014 -0700 -- .../org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java| 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d243ec7/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 0adc57b..43983bd 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 @@ -27,7 +27,6 @@ import java.util.Map; import org.apache.log4j.Logger; import org.apache.cloudstack.acl.RoleType; -import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.cloudstack.affinity.AffinityGroupResponse; import org.apache.cloudstack.api.ACL; import org.apache.cloudstack.api.APICommand; @@ -105,7 +104,7 @@ public class DeployVMCmd extends BaseAsyncCreateCustomIdCmd { private Long domainId; //Network information -@ACL(accessType = AccessType.UseEntry) +//@ACL(accessType = AccessType.UseEntry) @Parameter(name = ApiConstants.NETWORK_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = NetworkResponse.class, description = "list of network ids used by virtual machine. Can't be specified with ipToNetworkList parameter") private List networkIds;