diff --git a/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java b/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java
index 56fbdc56d19..0f6aa78d9d6 100755
--- a/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java
+++ b/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java
@@ -2056,6 +2056,10 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Connect conn = LibvirtConnection.getConnection();
for (NicTO nic : nics) {
String vlanId = null;
+ String nicName = _privBridgeName;
+ if (nic.getName() != null) {
+ nicName = nic.getName();
+ }
if (nic.getBroadcastType() == BroadcastDomainType.Vlan) {
URI broadcastUri = nic.getBroadcastUri();
vlanId = broadcastUri.getHost();
@@ -2063,7 +2067,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements
if (nic.getType() == TrafficType.Guest) {
if (nic.getBroadcastType() == BroadcastDomainType.Vlan
&& !vlanId.equalsIgnoreCase("untagged")) {
- createVlanBr(vlanId, getPhysicalNetwork(nic.getName()));
+ createVlanBr(vlanId, getPhysicalNetwork(nicName));
}
} else if (nic.getType() == TrafficType.Control) {
/* Make sure the network is still there */
@@ -2071,7 +2075,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements
} else if (nic.getType() == TrafficType.Public) {
if (nic.getBroadcastType() == BroadcastDomainType.Vlan
&& !vlanId.equalsIgnoreCase("untagged")) {
- createVlanBr(vlanId, getPhysicalNetwork(nic.getName()));
+ createVlanBr(vlanId, getPhysicalNetwork(nicName));
}
}
}
diff --git a/api/src/com/cloud/api/commands/DeleteVlanIpRangeCmd.java b/api/src/com/cloud/api/commands/DeleteVlanIpRangeCmd.java
index d751c791cd4..65f61b9c043 100644
--- a/api/src/com/cloud/api/commands/DeleteVlanIpRangeCmd.java
+++ b/api/src/com/cloud/api/commands/DeleteVlanIpRangeCmd.java
@@ -12,8 +12,6 @@
// Automatically generated by addcopyright.py at 04/03/2012
package com.cloud.api.commands;
-import java.util.UUID;
-
import org.apache.log4j.Logger;
import com.cloud.api.ApiConstants;
@@ -23,6 +21,7 @@ import com.cloud.api.Implementation;
import com.cloud.api.Parameter;
import com.cloud.api.ServerApiException;
import com.cloud.api.response.SuccessResponse;
+import com.cloud.exception.ConcurrentOperationException;
import com.cloud.user.Account;
@Implementation(description="Creates a VLAN IP range.", responseObject=SuccessResponse.class)
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index 4a9a2a587a7..2eb048c2c0d 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -1,4 +1,15 @@
#new labels (begin) **********************************************************************************************
+label.action.register.template=Register template
+label.action.register.iso=Register ISO
+#new labels (end) ************************************************************************************************
+
+
+#modified labels (begin) *****************************************************************************************
+
+
+#modified labels (end) *******************************************************************************************
+
+
label.management.ips=Management IP Addresses
label.devices=Devices
label.rules=Rules
@@ -15,15 +26,6 @@ label.account.and.security.group=Account, Security group
label.fetch.latest=Fetch latest
label.system.offering=System Offering
message.validate.instance.name=Instance name can not be longer than 63 characters. Only ASCII letters a~z, A~Z, digits 0~9, hyphen are allowed. Must start with a letter and end with a letter or a digit.
-label.action.register.template=Register template
-label.action.register.iso=Register ISO
-#new labels (end) ************************************************************************************************
-
-
-#modified labels (begin) *****************************************************************************************
-
-
-#modified labels (end) *******************************************************************************************
label.isolated.networks=Isolated networks
diff --git a/client/WEB-INF/classes/resources/messages_ja.properties b/client/WEB-INF/classes/resources/messages_ja.properties
index 9e4e30eaba0..bdf237ac7de 100644
--- a/client/WEB-INF/classes/resources/messages_ja.properties
+++ b/client/WEB-INF/classes/resources/messages_ja.properties
@@ -10,6 +10,24 @@
#modified labels (end) *******************************************************************************************
+label.management.ips=管理 IP アドレス
+label.devices=デバイス
+label.rules=規則
+label.traffic.label=トラフィック ラベル
+label.vm.state=VM の状態
+message.setup.physical.network.during.zone.creation.basic=基本ゾーンを追加するときは、ハイパーバイザー上の NIC に対応する 1 つの物理ネットワークをセットアップできます。ネットワークはいくつかの種類のトラフィックを伝送します。
物理ネットワークにほかのトラフィックの種類をドラッグ アンド ドロップすることもできます。
+label.domain.router=ドメイン ルーター
+label.console.proxy=コンソール プロキシ
+label.secondary.storage.vm=セカンダリ ストレージ VM
+label.add.netScaler.device=Netscaler デバイスの追加
+label.add.F5.device=F5 デバイスの追加
+label.add.SRX.device=SRX デバイスの追加
+label.account.and.security.group=アカウント、セキュリティ グループ
+label.fetch.latest=最新情報の取得
+label.system.offering=システム オファリング
+message.validate.instance.name=インスタンス名は 63 文字以内で指定してください。ASCII 文字の a~z、A~Z、数字の 0~9、およびハイフンのみを使用できます。文字で始まり、文字または数字で終わる必要があります。
+
+
label.isolated.networks=分離されたネットワーク
label.latest.events=最新イベント
state.Enabled=有効
diff --git a/core/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java b/core/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
index 3da2bb84ada..b7e5415fb18 100644
--- a/core/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
+++ b/core/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
@@ -161,7 +161,6 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
String workerVMName = null;
String volumePath = cmd.getVolumePath();
ManagedObjectReference morDs = null;
- String snapshotUUID = null;
DatastoreMO dsMo=null;
// By default assume failure
@@ -203,16 +202,12 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
// attach volume to worker VM
String datastoreVolumePath = String.format("[%s] %s.vmdk", dsMo.getName(), volumePath);
vmMo.attachDisk(new String[] { datastoreVolumePath }, morDs);
- snapshotUUID = UUID.randomUUID().toString();
- if (!vmMo.createSnapshot(snapshotUUID, "Snapshot taken for " + cmd.getSnapshotName(), false, false)) {
- throw new Exception("Failed to take snapshot " + cmd.getSnapshotName() + " on vm: " + cmd.getVmName());
- }
- }
- } else {
- if (!vmMo.createSnapshot(snapshotUuid, "Snapshot taken for " + cmd.getSnapshotName(), false, false)) {
- throw new Exception("Failed to take snapshot " + cmd.getSnapshotName() + " on vm: " + cmd.getVmName());
- }
- }
+ }
+ }
+
+ if (!vmMo.createSnapshot(snapshotUuid, "Snapshot taken for " + cmd.getSnapshotName(), false, false)) {
+ throw new Exception("Failed to take snapshot " + cmd.getSnapshotName() + " on vm: " + cmd.getVmName());
+ }
snapshotBackupUuid = backupSnapshotToSecondaryStorage(vmMo, accountId, volumeId, cmd.getVolumePath(), snapshotUuid, secondaryStorageUrl, prevSnapshotUuid, prevBackupUuid,
hostService.getWorkerName(context, cmd, 1));
diff --git a/core/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java b/core/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java
index 3aba320fa22..1cc1075dd78 100644
--- a/core/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java
+++ b/core/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java
@@ -22,13 +22,14 @@ import org.apache.log4j.Logger;
*
*/
public class CitrixHelper {
- private static final Logger s_logger = Logger.getLogger(CitrixHelper.class);
- private static final HashMap _xcp100GuestOsMap = new HashMap(70);
- private static final HashMap _xenServerGuestOsMap = new HashMap(70);
- private static final HashMap _xenServer56FP1GuestOsMap = new HashMap(70);
- private static final HashMap _xenServer56FP2GuestOsMap = new HashMap(70);
- private static final HashMap _xenServer600GuestOsMap = new HashMap(70);
- private static final ArrayList _guestOsList = new ArrayList(70);
+ private static final Logger s_logger = Logger.getLogger(CitrixHelper.class);
+ private static final HashMap _xcp100GuestOsMap = new HashMap(70);
+ private static final HashMap _xenServerGuestOsMap = new HashMap(70);
+ private static final HashMap _xenServer56FP1GuestOsMap = new HashMap(70);
+ private static final HashMap _xenServer56FP2GuestOsMap = new HashMap(70);
+ private static final HashMap _xenServer600GuestOsMap = new HashMap(70);
+ private static final HashMap _xenServer602GuestOsMap = new HashMap(70);
+ private static final ArrayList _guestOsList = new ArrayList(70);
static {
@@ -433,6 +434,122 @@ public class CitrixHelper {
}
+ static {
+ _xenServer602GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.6 (32-bit)", "CentOS 5 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.6 (64-bit)", "CentOS 5 (64-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.7 (32-bit)", "CentOS 5 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 5.7 (64-bit)", "CentOS 5 (64-bit)");
+ _xenServer602GuestOsMap.put("CentOS 6.0 (32-bit)", "CentOS 6.0 (32-bit)");
+ _xenServer602GuestOsMap.put("CentOS 6.0 (64-bit)", "CentOS 6.0 (64-bit)");
+ _xenServer602GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)");
+ _xenServer602GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)");
+ _xenServer602GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.6 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.6 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.7 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.7 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 6.0 (32-bit)", "Oracle Enterprise Linux 6.0 (32-bit)");
+ _xenServer602GuestOsMap.put("Oracle Enterprise Linux 6.0 (64-bit)", "Oracle Enterprise Linux 6.0 (64-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6.0 (32-bit)");
+ _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6.0 (64-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", "SUSE Linux Enterprise Server 10 SP3 (32-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP4 (32-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", "SUSE Linux Enterprise Server 10 SP4 (64-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)");
+ _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)");
+ _xenServer602GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)");
+ _xenServer602GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)");
+ _xenServer602GuestOsMap.put("Windows 8 (32-bit)", "Windows 8 (32-bit) (experimental)");
+ _xenServer602GuestOsMap.put("Windows 8 (64-bit)", "Windows 7 (64-bit) (experimental)");
+ _xenServer602GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)");
+ _xenServer602GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)");
+ _xenServer602GuestOsMap.put("Windows Server 2003 PAE (32-bit)", "Windows Server 2003 PAE (32-bit)");
+ _xenServer602GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)");
+ _xenServer602GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)");
+ _xenServer602GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)");
+ _xenServer602GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)");
+ _xenServer602GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)");
+ _xenServer602GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)");
+ _xenServer602GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)");
+ _xenServer602GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)");
+ _xenServer602GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)");
+ _xenServer602GuestOsMap.put("Windows Server 8 (64-bit)", "Windows Server 8 (64-bit) (experimental)");
+ _xenServer602GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)");
+ _xenServer602GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)");
+ _xenServer602GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)");
+ _xenServer602GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)");
+ _xenServer602GuestOsMap.put("Ubuntu 10.10 (32-bit)", "Ubuntu Maverick Meerkat 10.10 (32-bit) (experimental)");
+ _xenServer602GuestOsMap.put("Ubuntu 10.10 (64-bit)", "Ubuntu Maverick Meerkat 10.10 (64-bit) (experimental)");
+ _xenServer602GuestOsMap.put("Other Linux (32-bit)", "Other install media");
+ _xenServer602GuestOsMap.put("Other Linux (64-bit)", "Other install media");
+ _xenServer602GuestOsMap.put("Other (32-bit)", "Other install media");
+ _xenServer602GuestOsMap.put("Other (64-bit)", "Other install media");
+ _xenServer602GuestOsMap.put("Other CentOS (32-bit)", "Other install media");
+ _xenServer602GuestOsMap.put("Other CentOS (64-bit)", "Other install media");
+ _xenServer602GuestOsMap.put("Other Ubuntu (32-bit)", "Other install media");
+ _xenServer602GuestOsMap.put("Other Ubuntu (64-bit)", "Other install media");
+ _xenServer602GuestOsMap.put("Other SUSE Linux(32-bit)", "Other install media");
+ _xenServer602GuestOsMap.put("Other SUSE Linux(64-bit)", "Other install media");
+ _xenServer602GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)");
+ _xenServer602GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)");
+ }
+
public static String getXcpGuestOsType(String stdType) {
String guestOS = _xcp100GuestOsMap.get(stdType);
if (guestOS == null) {
@@ -500,4 +617,19 @@ public class CitrixHelper {
}
return guestOS;
}
+
+ public static String getXenServer602GuestOsType(String stdType, boolean bootFromCD) {
+ String guestOS = _xenServer602GuestOsMap.get(stdType);
+ if (guestOS == null) {
+ if (!bootFromCD) {
+ s_logger.debug("Can't find the guest os: " + stdType + " mapping into XenServer 6.0.2 guestOS type, start it as HVM guest");
+ guestOS = "Other install media";
+ } else {
+ String msg = "XenServer 6.0.2 DOES NOT support Guest OS type " + stdType;
+ s_logger.warn(msg);
+ }
+
+ }
+ return guestOS;
+ }
}
diff --git a/core/src/com/cloud/hypervisor/xen/resource/XenServer602Resource.java b/core/src/com/cloud/hypervisor/xen/resource/XenServer602Resource.java
new file mode 100644
index 00000000000..9c2e914d9f8
--- /dev/null
+++ b/core/src/com/cloud/hypervisor/xen/resource/XenServer602Resource.java
@@ -0,0 +1,55 @@
+// Copyright 2012 Citrix Systems, Inc. Licensed under the
+// Apache License, Version 2.0 (the "License"); you may not use this
+// file except in compliance with the License. Citrix Systems, Inc.
+// reserves all rights not expressly granted by 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.
+//
+// Automatically generated by addcopyright.py at 04/03/2012
+package com.cloud.hypervisor.xen.resource;
+
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.ejb.Local;
+
+import org.apache.log4j.Logger;
+
+import com.cloud.resource.ServerResource;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.utils.script.Script;
+
+
+@Local(value=ServerResource.class)
+public class XenServer602Resource extends XenServer56FP1Resource {
+ private static final Logger s_logger = Logger.getLogger(XenServer602Resource.class);
+
+ public XenServer602Resource() {
+ super();
+ }
+
+ @Override
+ protected String getGuestOsType(String stdType, boolean bootFromCD) {
+ return CitrixHelper.getXenServer602GuestOsType(stdType, bootFromCD);
+ }
+
+ @Override
+ protected List getPatchFiles() {
+ List files = new ArrayList();
+ String patch = "scripts/vm/hypervisor/xenserver/xenserver60/patch";
+ String patchfilePath = Script.findScript("" , patch);
+ if ( patchfilePath == null ) {
+ throw new CloudRuntimeException("Unable to find patch file " + patch);
+ }
+ File file = new File(patchfilePath);
+ files.add(file);
+ return files;
+ }
+
+}
diff --git a/server/src/com/cloud/configuration/ConfigurationManager.java b/server/src/com/cloud/configuration/ConfigurationManager.java
index 95bdeb26a2f..85cdf34cf24 100644
--- a/server/src/com/cloud/configuration/ConfigurationManager.java
+++ b/server/src/com/cloud/configuration/ConfigurationManager.java
@@ -137,9 +137,10 @@ public interface ConfigurationManager extends ConfigurationService, Manager {
*
* @param userId
* @param vlanDbId
+ * @param caller TODO
* @return success/failure
*/
- boolean deleteVlanAndPublicIpRange(long userId, long vlanDbId);
+ boolean deleteVlanAndPublicIpRange(long userId, long vlanDbId, Account caller);
/**
* Converts a comma separated list of tags to a List
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 4f9560198ec..ac4790c1688 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -38,8 +38,8 @@ import org.apache.log4j.Logger;
import com.cloud.acl.SecurityChecker;
import com.cloud.alert.AlertManager;
-import com.cloud.api.ApiDBUtils;
import com.cloud.api.ApiConstants.LDAPParams;
+import com.cloud.api.ApiDBUtils;
import com.cloud.api.commands.CreateDiskOfferingCmd;
import com.cloud.api.commands.CreateNetworkOfferingCmd;
import com.cloud.api.commands.CreateServiceOfferingCmd;
@@ -110,6 +110,7 @@ import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.Networks.TrafficType;
import com.cloud.network.PhysicalNetwork;
import com.cloud.network.PhysicalNetworkVO;
+import com.cloud.network.dao.FirewallRulesDao;
import com.cloud.network.dao.IPAddressDao;
import com.cloud.network.dao.NetworkDao;
import com.cloud.network.dao.PhysicalNetworkDao;
@@ -155,6 +156,7 @@ import com.cloud.utils.db.Transaction;
import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.utils.net.NetUtils;
import com.cloud.vm.VirtualMachine;
+import com.cloud.vm.dao.NicDao;
import edu.emory.mathcs.backport.java.util.Arrays;
@@ -219,6 +221,10 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
SwiftManager _swiftMgr;
@Inject
PhysicalNetworkTrafficTypeDao _trafficTypeDao;
+ @Inject
+ NicDao _nicDao;
+ @Inject
+ FirewallRulesDao _firewallDao;
// FIXME - why don't we have interface for DataCenterLinkLocalIpAddressDao?
protected static final DataCenterLinkLocalIpAddressDaoImpl _LinkLocalIpAllocDao = ComponentLocator.inject(DataCenterLinkLocalIpAddressDaoImpl.class);
@@ -2195,7 +2201,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
Vlan vlan = createVlanAndPublicIpRange(zoneId, networkId, physicalNetworkId, forVirtualNetwork, podId, startIP, endIP, vlanGateway, vlanNetmask, vlanId, vlanOwner);
if (associateIpRangeToAccount) {
- _networkMgr.associateIpAddressListToAccount(userId, vlanOwner.getId(), zoneId, vlan.getId(), network);
+ _networkMgr.associateIpAddressListToAccount(userId, vlanOwner.getId(), zoneId, vlan.getId(), null);
}
txn.commit();
@@ -2425,24 +2431,78 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
}
@Override
- public boolean deleteVlanAndPublicIpRange(long userId, long vlanDbId) {
+ @DB
+ public boolean deleteVlanAndPublicIpRange(long userId, long vlanDbId, Account caller) {
VlanVO vlan = _vlanDao.findById(vlanDbId);
if (vlan == null) {
throw new InvalidParameterValueException("Please specify a valid IP range id.");
}
+
+ boolean isAccountSpecific = false;
+ List acctVln = _accountVlanMapDao.listAccountVlanMapsByVlan(vlan.getId());
+ // Check for account wide pool. It will have an entry for account_vlan_map.
+ if (acctVln != null && !acctVln.isEmpty()) {
+ isAccountSpecific = true;
+ }
// Check if the VLAN has any allocated public IPs
- if (_publicIpAddressDao.countIPs(vlan.getDataCenterId(), vlanDbId, true) > 0) {
- throw new InvalidParameterValueException("The IP range can't be deleted because it has allocated public IP addresses.");
+ long allocIpCount = _publicIpAddressDao.countIPs(vlan.getDataCenterId(), vlanDbId, true);
+ boolean success = true;
+ if (allocIpCount > 0) {
+ if (isAccountSpecific) {
+ try {
+ vlan = _vlanDao.acquireInLockTable(vlanDbId, 30);
+ if (vlan == null) {
+ throw new CloudRuntimeException("Unable to acquire vlan configuration: " + vlanDbId);
+ }
+
+ if (s_logger.isDebugEnabled()) {
+ s_logger.debug("lock vlan " + vlanDbId + " is acquired");
+ }
+
+ List ips = _publicIpAddressDao.listByVlanId(vlanDbId);
+
+ for (IPAddressVO ip : ips) {
+ if (ip.isOneToOneNat()) {
+ throw new InvalidParameterValueException("Can't delete account specific vlan " + vlanDbId +
+ " as ip " + ip + " belonging to the range is used for static nat purposes. Cleanup the rules first");
+ }
+
+ if (ip.isSourceNat() && _nicDao.findByIp4AddressAndNetworkId(ip.getAddress().addr(), ip.getSourceNetworkId()) != null) {
+ throw new InvalidParameterValueException("Can't delete account specific vlan " + vlanDbId +
+ " as ip " + ip + " belonging to the range is a source nat ip for the network id=" + ip.getSourceNetworkId() +
+ ". Either delete the network, or Virtual Router instance using this ip address");
+ }
+
+ if (_firewallDao.countRulesByIpId(ip.getId()) > 0) {
+ throw new InvalidParameterValueException("Can't delete account specific vlan " + vlanDbId +
+ " as ip " + ip + " belonging to the range has firewall rules applied. Cleanup the rules first");
+ }
+ //release public ip address here
+ success = success && _networkMgr.releasePublicIpAddress(ip.getId(), userId, caller);
+ }
+ if (!success) {
+ s_logger.warn("Some ip addresses failed to be released as a part of vlan " + vlanDbId + " removal");
+ }
+ } finally {
+ _vlanDao.releaseFromLockTable(vlanDbId);
+ }
+ } else {
+ throw new InvalidParameterValueException("The IP range can't be deleted because it has allocated public IP addresses.");
+ }
}
- // Delete all public IPs in the VLAN
- if (!deletePublicIPRange(vlanDbId)) {
+ if (success) {
+ // Delete all public IPs in the VLAN
+ if (!deletePublicIPRange(vlanDbId)) {
+ return false;
+ }
+
+ // Delete the VLAN
+ return _vlanDao.expunge(vlanDbId);
+ } else {
return false;
}
-
- // Delete the VLAN
- return _vlanDao.expunge(vlanDbId);
}
@Override
@@ -2766,7 +2826,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
throw new InvalidParameterValueException("Please specify a valid IP range id.");
}
- return deleteVlanAndPublicIpRange(UserContext.current().getCallerUserId(), vlanDbId);
+ return deleteVlanAndPublicIpRange(UserContext.current().getCallerUserId(), vlanDbId, UserContext.current().getCaller());
}
@@ -3620,7 +3680,8 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
Transaction txn = Transaction.currentTxn();
txn.start();
for (AccountVlanMapVO map : maps) {
- if (!deleteVlanAndPublicIpRange(_accountMgr.getSystemUser().getId(), map.getVlanDbId())) {
+ if (!deleteVlanAndPublicIpRange(_accountMgr.getSystemUser().getId(), map.getVlanDbId(),
+ _accountMgr.getAccount(Account.ACCOUNT_ID_SYSTEM))) {
result = false;
}
}
diff --git a/server/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java b/server/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
index d23dfc03403..1f576d6e53a 100755
--- a/server/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
+++ b/server/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
@@ -64,6 +64,7 @@ import com.cloud.hypervisor.xen.resource.XenServer56FP1Resource;
import com.cloud.hypervisor.xen.resource.XenServer56Resource;
import com.cloud.hypervisor.xen.resource.XenServer56SP2Resource;
import com.cloud.hypervisor.xen.resource.XenServer600Resource;
+import com.cloud.hypervisor.xen.resource.XenServer602Resource;
import com.cloud.hypervisor.xen.resource.XenServerConnectionPool;
import com.cloud.resource.Discoverer;
import com.cloud.resource.DiscovererBase;
@@ -408,9 +409,12 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
if(prodBrand.equals("XenServer") && prodVersion.equals("5.6.0"))
return new XenServer56Resource();
- if(prodBrand.equals("XenServer") && prodVersion.startsWith("6.0"))
+ if (prodBrand.equals("XenServer") && prodVersion.equals("6.0.0"))
return new XenServer600Resource();
+ if (prodBrand.equals("XenServer") && prodVersion.equals("6.0.2"))
+ return new XenServer602Resource();
+
if(prodBrand.equals("XenServer") && prodVersion.equals("5.6.100")) {
String prodVersionTextShort = record.softwareVersion.get("product_version_text_short").trim();
if("5.6 SP2".equals(prodVersionTextShort)) {
@@ -552,8 +556,10 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
resource = XcpServerResource.class.getName();
} else if(prodBrand.equals("XenServer") && prodVersion.equals("5.6.0")) {
resource = XenServer56Resource.class.getName();
- } else if(prodBrand.equals("XenServer") && prodVersion.startsWith("6.0")) {
+ } else if (prodBrand.equals("XenServer") && prodVersion.equals("6.0.0")) {
resource = XenServer600Resource.class.getName();
+ } else if (prodBrand.equals("XenServer") && prodVersion.equals("6.0.2")) {
+ resource = XenServer602Resource.class.getName();
} else if(prodBrand.equals("XenServer") && prodVersion.equals("5.6.100")) {
String prodVersionTextShort = details.get("product_version_text_short").trim();
if("5.6 SP2".equals(prodVersionTextShort)) {
diff --git a/server/src/com/cloud/network/NetworkManager.java b/server/src/com/cloud/network/NetworkManager.java
index c53985a95ee..daf2d61d3ac 100755
--- a/server/src/com/cloud/network/NetworkManager.java
+++ b/server/src/com/cloud/network/NetworkManager.java
@@ -177,7 +177,7 @@ public interface NetworkManager extends NetworkService {
* @throws InsufficientAddressCapacityException
* @throws
*/
- boolean associateIpAddressListToAccount(long userId, long accountId, long zoneId, Long vlanId, Network networkToAssociateWith) throws InsufficientCapacityException, ConcurrentOperationException,
+ boolean associateIpAddressListToAccount(long userId, long accountId, long zoneId, Long vlanId, Network guestNetwork) throws InsufficientCapacityException, ConcurrentOperationException,
ResourceUnavailableException, ResourceAllocationException;
Nic getNicInNetwork(long vmId, long networkId);
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index c2ea7558a74..cfca71a093f 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -605,7 +605,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
} else if (addr.getState() == IpAddress.State.Releasing) {
// Cleanup all the resources for ip address if there are any, and only then un-assign ip in the
-// system
+ // system
if (cleanupIpResources(addr.getId(), Account.ACCOUNT_ID_SYSTEM, _accountMgr.getSystemAccount())) {
_ipAddressDao.unassignIpAddress(addr.getId());
} else {
@@ -3053,7 +3053,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
txn.start();
guru.trash(network, _networkOfferingDao.findById(network.getNetworkOfferingId()), owner);
- if (!deleteVlansInNetwork(network.getId(), context.getCaller().getId())) {
+ if (!deleteVlansInNetwork(network.getId(), context.getCaller().getId(), callerAccount)) {
success = false;
s_logger.warn("Failed to delete network " + network + "; was unable to cleanup corresponding ip ranges");
} else {
@@ -3068,11 +3068,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
return success;
}
- private boolean deleteVlansInNetwork(long networkId, long userId) {
+ private boolean deleteVlansInNetwork(long networkId, long userId, Account callerAccount) {
List vlans = _vlanDao.listVlansByNetworkId(networkId);
boolean result = true;
for (VlanVO vlan : vlans) {
- if (!_configMgr.deleteVlanAndPublicIpRange(_accountMgr.getSystemUser().getId(), vlan.getId())) {
+ if (!_configMgr.deleteVlanAndPublicIpRange(_accountMgr.getSystemUser().getId(), vlan.getId(), callerAccount)) {
s_logger.warn("Failed to delete vlan " + vlan.getId() + ");");
result = false;
}
@@ -3583,21 +3583,25 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
@Override
@DB
- public boolean associateIpAddressListToAccount(long userId, long accountId, long zoneId, Long vlanId, Network network) throws InsufficientCapacityException, ConcurrentOperationException,
+ public boolean associateIpAddressListToAccount(long userId, long accountId, long zoneId, Long vlanId, Network guestNetwork)
+ throws InsufficientCapacityException, ConcurrentOperationException,
ResourceUnavailableException, ResourceAllocationException {
Account owner = _accountMgr.getActiveAccountById(accountId);
boolean createNetwork = false;
+
+ if (guestNetwork != null && guestNetwork.getTrafficType() != TrafficType.Guest) {
+ throw new InvalidParameterValueException("Network " + guestNetwork + " is not of a type " + TrafficType.Guest);
+ }
Transaction txn = Transaction.currentTxn();
-
txn.start();
- if (network == null) {
+ if (guestNetwork == null) {
List extends Network> networks = getIsolatedNetworksWithSourceNATOwnedByAccountInZone(zoneId, owner);
if (networks.size() == 0) {
createNetwork = true;
} else if (networks.size() == 1) {
- network = networks.get(0);
+ guestNetwork = networks.get(0);
}else{
throw new InvalidParameterValueException("Error, more than 1 Guest Isolated Networks with SourceNAT service enabled found for this account, cannot assosiate the IP range, please provide the network ID");
}
@@ -3613,9 +3617,9 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
if (requiredOfferings.get(0).getState() == NetworkOffering.State.Enabled) {
s_logger.debug("Creating network for account " + owner + " from the network offering id=" + requiredOfferings.get(0).getId() + " as a part of createVlanIpRange process");
- network = createGuestNetwork(requiredOfferings.get(0).getId(), owner.getAccountName() + "-network", owner.getAccountName() + "-network", null, null, null, null, owner, false, null, physicalNetwork, zoneId,
+ guestNetwork = createGuestNetwork(requiredOfferings.get(0).getId(), owner.getAccountName() + "-network", owner.getAccountName() + "-network", null, null, null, null, owner, false, null, physicalNetwork, zoneId,
ACLType.Account, null);
- if (network == null) {
+ if (guestNetwork == null) {
s_logger.warn("Failed to create default Virtual network for the account " + accountId + "in zone " + zoneId);
throw new CloudRuntimeException("Failed to create a Guest Isolated Networks with SourceNAT service enabled as a part of createVlanIpRange, for the account " + accountId + "in zone " + zoneId);
}
@@ -3626,7 +3630,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
// Check if there is a source nat ip address for this account; if not - we have to allocate one
boolean allocateSourceNat = false;
- List sourceNat = _ipAddressDao.listByAssociatedNetwork(network.getId(), true);
+ List sourceNat = _ipAddressDao.listByAssociatedNetwork(guestNetwork.getId(), true);
if (sourceNat.isEmpty()) {
allocateSourceNat = true;
}
@@ -3642,7 +3646,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
} else {
addr.setSourceNat(false);
}
- addr.setAssociatedWithNetworkId(network.getId());
+ addr.setAssociatedWithNetworkId(guestNetwork.getId());
addr.setAllocatedTime(new Date());
addr.setAllocatedInDomainId(owner.getDomainId());
addr.setAllocatedToAccountId(owner.getId());
diff --git a/server/src/com/cloud/upgrade/dao/Upgrade301to302.java b/server/src/com/cloud/upgrade/dao/Upgrade301to302.java
index a9612da3d77..8a0df6f6563 100644
--- a/server/src/com/cloud/upgrade/dao/Upgrade301to302.java
+++ b/server/src/com/cloud/upgrade/dao/Upgrade301to302.java
@@ -75,6 +75,7 @@ public class Upgrade301to302 implements DbUpgrade {
dropKeysIfExists(conn);
updateSharedNetworks(conn);
fixLastHostIdKey(conn);
+ changeEngine(conn);
}
@Override
@@ -188,4 +189,39 @@ public class Upgrade301to302 implements DbUpgrade {
}
}
}
+
+ private void changeEngine(Connection conn) {
+ s_logger.debug("Fixing engine and row_format for op_lock and op_nwgrp_work tables");
+ PreparedStatement pstmt = null;
+ try {
+ pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`op_lock` ENGINE=MEMORY, ROW_FORMAT = FIXED");
+ pstmt.executeUpdate();
+ pstmt.close();
+ } catch (Exception e) {
+ s_logger.debug("Failed do execute the statement " + pstmt + ", moving on as it's not critical fix");
+ } finally {
+ try {
+ if (pstmt != null) {
+ pstmt.close();
+ }
+ } catch (SQLException e) {
+ }
+ }
+
+ try {
+ pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`op_nwgrp_work` ENGINE=MEMORY, ROW_FORMAT = FIXED");
+ pstmt.executeUpdate();
+ pstmt.close();
+ } catch (Exception e) {
+ s_logger.debug("Failed do execute the statement " + pstmt + ", moving on as it's not critical fix");
+ } finally {
+ try {
+ if (pstmt != null) {
+ pstmt.close();
+ }
+ } catch (SQLException e) {
+ }
+ }
+ }
+
}
diff --git a/server/test/com/cloud/network/MockNetworkManagerImpl.java b/server/test/com/cloud/network/MockNetworkManagerImpl.java
index 6ecb6889476..2ae21bb8dd1 100755
--- a/server/test/com/cloud/network/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/network/MockNetworkManagerImpl.java
@@ -317,7 +317,7 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
}
@Override
- public boolean associateIpAddressListToAccount(long userId, long accountId, long zoneId, Long vlanId, Network networkToAssociateWith) throws InsufficientCapacityException,
+ public boolean associateIpAddressListToAccount(long userId, long accountId, long zoneId, Long vlanId, Network guestNetwork) throws InsufficientCapacityException,
ConcurrentOperationException, ResourceUnavailableException, ResourceAllocationException {
// TODO Auto-generated method stub
return false;
diff --git a/setup/db/db/schema-301to302.sql b/setup/db/db/schema-301to302.sql
index 25756275956..25284246fb9 100755
--- a/setup/db/db/schema-301to302.sql
+++ b/setup/db/db/schema-301to302.sql
@@ -27,10 +27,5 @@ UPDATE `cloud`.`network_offerings` SET display_text='Offering for Isolated netwo
UPDATE `cloud`.`network_offerings` SET display_text='Offering for Isolated networks with no Source Nat service' WHERE name='DefaultIsolatedNetworkOffering' and `cloud`.`network_offerings`.default=1;
UPDATE `cloud`.`network_offerings` SET display_text='Offering for Shared networks' WHERE name='DefaultSharedNetworkOffering' and `cloud`.`network_offerings`.default=1;
-
-
-ALTER TABLE `cloud`.`op_lock` ENGINE=MEMORY, ROW_FORMAT = FIXED;
-ALTER TABLE `cloud`.`op_nwgrp_work` ENGINE=MEMORY, ROW_FORMAT = FIXED;
-
INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled) VALUES ('XenServer', '6.0.2', 50, 1);
INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled) VALUES ('VMware', '5.0', 128, 0);
diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js
index aee33cfacf7..3d52633d600 100644
--- a/ui/scripts/accounts.js
+++ b/ui/scripts/accounts.js
@@ -67,7 +67,7 @@
add: {
label: 'label.add.account',
preFilter: function(args) {
- if(isAdmin() || isDomainAdmin())
+ if(isAdmin())
return true;
else
return false;
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index fcdd95cd963..0abba2efe24 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -697,7 +697,7 @@
],
dataProvider: function(args) {
$.ajax({
- url: createURL("listNetworks&id=" + args.context.networks[0].id + "&listAll=true"), //pass "listAll=true" for now until API is fixed.
+ url: createURL("listNetworks&id=" + args.context.networks[0].id + "&listAll=true"), //pass "&listAll=true" to "listNetworks&id=xxxxxxxx" for now before API gets fixed.
data: { listAll: true },
dataType: "json",
async: true,
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index c6e6b0b2e5b..168a8cf2ee9 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -1684,7 +1684,7 @@
],
dataProvider: function(args) {
$.ajax({
- url: createURL("listNetworks&id=" + args.context.networks[0].id),
+ url: createURL("listNetworks&id=" + args.context.networks[0].id + "&listAll=true"), //pass "&listAll=true" to "listNetworks&id=xxxxxxxx" for now before API gets fixed.
dataType: "json",
async: false,
success: function(json) {
@@ -2548,7 +2548,7 @@
}
},
- //f5 provider detail view
+ //f5 provider detail view
f5: {
type: 'detailView',
id: 'f5Provider',
@@ -2586,6 +2586,7 @@
label: 'label.add.F5.device',
createForm: {
title: 'label.add.F5.device',
+ preFilter: cloudStack.preFilter.addLoadBalancerDevice,
fields: {
ip: {
label: 'label.ip.address'
@@ -2623,15 +2624,15 @@
// items.push({id: "true", description: "inline"});
// args.response.success({data: items});
// }
- // },
- capacity: {
- label: 'label.capacity',
- validation: { required: false, number: true }
- },
+ // },
dedicated: {
label: 'label.dedicated',
isBoolean: true,
isChecked: false
+ },
+ capacity: {
+ label: 'label.capacity',
+ validation: { required: false, number: true }
}
}
},
@@ -4029,6 +4030,7 @@
label: 'label.add.netScaler.device',
createForm: {
title: 'label.add.netScaler.device',
+ preFilter: cloudStack.preFilter.addLoadBalancerDevice,
fields: {
ip: {
label: 'label.ip.address'
@@ -4069,15 +4071,15 @@
// args.response.success({data: items});
// }
// },
- capacity: {
- label: 'label.capacity',
- validation: { required: false, number: true }
- },
dedicated: {
label: 'label.dedicated',
isBoolean: true,
isChecked: false
- }
+ },
+ capacity: {
+ label: 'label.capacity',
+ validation: { required: false, number: true }
+ }
}
},
action: function(args) {
@@ -4223,6 +4225,7 @@
label: 'label.add.F5.device',
createForm: {
title: 'label.add.F5.device',
+ preFilter: cloudStack.preFilter.addLoadBalancerDevice,
fields: {
ip: {
label: 'label.ip.address'
@@ -4260,15 +4263,15 @@
// items.push({id: "true", description: "inline"});
// args.response.success({data: items});
// }
- // },
- capacity: {
- label: 'label.capacity',
- validation: { required: false, number: true }
- },
+ // },
dedicated: {
label: 'label.dedicated',
isBoolean: true,
isChecked: false
+ },
+ capacity: {
+ label: 'label.capacity',
+ validation: { required: false, number: true }
}
}
},
@@ -5958,6 +5961,22 @@
tabs: {
details: {
title: 'label.details',
+
+ preFilter: function(args) {
+ var hiddenFields = [];
+ $.ajax({
+ url: createURL('listConfigurations&name=ha.tag'),
+ dataType: 'json',
+ async: false,
+ success: function(json) {
+ if(json.listconfigurationsresponse.configuration == null || json.listconfigurationsresponse.configuration[0].value == null || json.listconfigurationsresponse.configuration[0].value.length == 0) {
+ hiddenFields.push('hahost');
+ }
+ }
+ });
+ return hiddenFields;
+ },
+
fields: [
{
name: { label: 'label.name' }
@@ -5966,16 +5985,15 @@
id: { label: 'label.id' },
resourcestate: { label: 'label.resource.state' },
state: { label: 'label.state' },
- type: { label: 'label.type' },
- zonename: { label: 'label.zone' },
- podname: { label: 'label.pod' },
- clustername: { label: 'label.cluster' },
- ipaddress: { label: 'label.ip.address' },
- version: { label: 'label.version' },
+ type: { label: 'label.type' },
hosttags: {
label: 'label.host.tags',
isEditable: true
},
+ hahost: {
+ label: 'label.ha.enabled',
+ converter: cloudStack.converters.toBooleanText
+ },
oscategoryid: {
label: 'label.os.preference',
isEditable: true,
@@ -5997,6 +6015,11 @@
});
}
},
+ zonename: { label: 'label.zone' },
+ podname: { label: 'label.pod' },
+ clustername: { label: 'label.cluster' },
+ ipaddress: { label: 'label.ip.address' },
+ version: { label: 'label.version' },
disconnected: { label: 'label.last.disconnected' }
}
],
@@ -6638,17 +6661,25 @@
'remove': {
label: 'label.action.delete.primary.storage' ,
- messages: {
- confirm: function(args) {
- return 'message.action.delete.primary.storage';
- },
+ messages: {
notification: function(args) {
return 'label.action.delete.primary.storage';
}
- },
- action: function(args) {
+ },
+ createForm: {
+ title: 'label.action.delete.primary.storage',
+ fields: {
+ isForced: {
+ label: 'force.remove',
+ isBoolean: true
+ }
+ }
+ },
+ action: function(args) {
+ var array1 = [];
+ array1.push("&forced=" + (args.data.isForced == "on"));
$.ajax({
- url: createURL("deleteStoragePool&id=" + args.context.primarystorages[0].id),
+ url: createURL("deleteStoragePool&id=" + args.context.primarystorages[0].id + array1.join("")),
dataType: "json",
async: true,
success: function(json) {
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index a92ec9f8f86..a8cbbc79b26 100644
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -513,6 +513,7 @@
},
basicPhysicalNetwork: { //"Netscaler" now
+ preFilter: cloudStack.preFilter.addLoadBalancerDevice,
fields: {
ip: {
label: 'label.ip.address'
@@ -543,15 +544,15 @@
numretries: {
label: 'label.numretries',
defaultValue: '2'
- },
- capacity: {
- label: 'label.capacity',
- validation: { required: false, number: true }
- },
+ },
dedicated: {
label: 'label.dedicated',
isBoolean: true,
isChecked: false
+ },
+ capacity: {
+ label: 'label.capacity',
+ validation: { required: false, number: true }
}
}
},