You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/04/25 01:03:09 UTC

[01/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Updated Branches:
  refs/heads/ui-vm-affinity 922b51ca7 -> 25f2f0fcb


CLOUDSTACK-751: added a support for blacklisting certain routes on a zone level so they can't be used when create Static Route for VPC Private Gateway


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

Branch: refs/heads/ui-vm-affinity
Commit: c9c2c5902d0e9bc865683529a90d968686512425
Parents: df039aa
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Mon Apr 22 12:05:49 2013 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Mon Apr 22 13:35:15 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/configuration/Config.java     |   17 ++++--
 .../configuration/ConfigurationManagerImpl.java    |   12 ++++-
 server/src/com/cloud/dc/dao/DataCenterDao.java     |    2 +
 server/src/com/cloud/dc/dao/DataCenterDaoImpl.java |    8 +++
 .../src/com/cloud/network/vpc/VpcManagerImpl.java  |   42 ++++++++++++++-
 5 files changed, 73 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c9c2c590/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java
index 4d1185a..dbcbc53 100755
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -16,7 +16,10 @@
 // under the License.
 package com.cloud.configuration;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.StringTokenizer;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
 
@@ -26,6 +29,7 @@ import com.cloud.ha.HighAvailabilityManager;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.network.NetworkManager;
 import com.cloud.network.router.VpcVirtualNetworkApplianceManager;
+import com.cloud.network.vpc.VpcManager;
 import com.cloud.server.ManagementServer;
 import com.cloud.storage.StorageManager;
 import com.cloud.storage.secondary.SecondaryStorageVmManager;
@@ -34,10 +38,6 @@ import com.cloud.template.TemplateManager;
 import com.cloud.vm.UserVmManager;
 import com.cloud.vm.snapshot.VMSnapshotManager;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
 public enum Config {
 
 	// Alert
@@ -400,7 +400,10 @@ public enum Config {
     VMSnapshotMax("Advanced", VMSnapshotManager.class, Integer.class, "vmsnapshot.max", "10", "Maximum vm snapshots for a vm", null),
     VMSnapshotCreateWait("Advanced", VMSnapshotManager.class, Integer.class, "vmsnapshot.create.wait", "1800", "In second, timeout for create vm snapshot", null),
 
-    CloudDnsName("Advanced", ManagementServer.class, String.class, "cloud.dns.name", "default", " DNS name of the cloud", null);
+    CloudDnsName("Advanced", ManagementServer.class, String.class, "cloud.dns.name", "default", " DNS name of the cloud", null),
+	
+    BlacklistedRoutes("Advanced", VpcManager.class, String.class, "blacklisted.routes", null, "Routes that are blacklisted, can not be used for Static Routes creation for the VPC Private Gateway",
+	           "routes", ConfigurationParameterScope.zone.toString());
     
 	
 	private final String _category;
@@ -532,6 +535,8 @@ public enum Config {
             return "StorageManager";
         } else if (_componentClass == TemplateManager.class) {
             return "TemplateManager";
+        } else if (_componentClass == VpcManager.class) {
+            return "VpcManager";
         }else {
             return "none";
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c9c2c590/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index b5734a2..a2a6291 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -342,7 +342,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
                 }
                 DcDetailVO dcDetailVO = _zoneDetailsDao.findDetail(resourceId, name.toLowerCase());
                 if (dcDetailVO == null) {
-                    dcDetailVO = new DcDetailVO(dcDetailVO.getId(), name, value);
+                    dcDetailVO = new DcDetailVO(zone.getId(), name, value);
                     _zoneDetailsDao.persist(dcDetailVO);
                 } else {
                     dcDetailVO.setValue(value);
@@ -584,6 +584,16 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
                 if (!NetUtils.verifyInstanceName(value)) {
                     return "Instance name can not contain hyphen, spaces and plus sign";
                 }
+            } else if (range.equals("routes")) {
+                String[] routes = value.split(",");
+                for (String route : routes) {
+                    if (route != null) {
+                        String routeToVerify = route.trim();
+                        if (!NetUtils.isValidCIDR(routeToVerify)) {
+                            throw new InvalidParameterValueException("Invalid value for blacklisted route: " + route);
+                        }
+                    }
+                }
             } else {
                 String[] options = range.split(",");
                 for (String option : options) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c9c2c590/server/src/com/cloud/dc/dao/DataCenterDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/DataCenterDao.java b/server/src/com/cloud/dc/dao/DataCenterDao.java
index ee228f1..e54b9bb 100755
--- a/server/src/com/cloud/dc/dao/DataCenterDao.java
+++ b/server/src/com/cloud/dc/dao/DataCenterDao.java
@@ -77,4 +77,6 @@ public interface DataCenterDao extends GenericDao<DataCenterVO, Long> {
 	List<DataCenterVO> findZonesByDomainId(Long domainId, String keyword);
 
 	List<DataCenterVO> findByKeyword(String keyword);
+
+    List<DataCenterVO> listAllZones();
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c9c2c590/server/src/com/cloud/dc/dao/DataCenterDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/DataCenterDaoImpl.java b/server/src/com/cloud/dc/dao/DataCenterDaoImpl.java
index 2a6c2ec..4afd640 100755
--- a/server/src/com/cloud/dc/dao/DataCenterDaoImpl.java
+++ b/server/src/com/cloud/dc/dao/DataCenterDaoImpl.java
@@ -401,4 +401,12 @@ public class DataCenterDaoImpl extends GenericDaoBase<DataCenterVO, Long> implem
         txn.commit();
         return result;
     }
+    
+    @Override
+    public List<DataCenterVO> listAllZones(){
+        SearchCriteria<DataCenterVO> sc = NameSearch.create();
+        List<DataCenterVO> dcs =  listBy(sc);
+
+        return dcs;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c9c2c590/server/src/com/cloud/network/vpc/VpcManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/VpcManagerImpl.java b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
index dbd36ae..425f551 100644
--- a/server/src/com/cloud/network/vpc/VpcManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
@@ -39,11 +39,14 @@ import org.springframework.stereotype.Component;
 
 import com.cloud.configuration.Config;
 import com.cloud.configuration.ConfigurationManager;
+import com.cloud.configuration.ConfigurationVO;
 import com.cloud.configuration.Resource.ResourceType;
 import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.dc.DataCenter;
+import com.cloud.dc.DataCenterVO;
 import com.cloud.dc.Vlan.VlanType;
 import com.cloud.dc.VlanVO;
+import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.dc.dao.VlanDao;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.event.ActionEvent;
@@ -92,6 +95,7 @@ import com.cloud.offerings.NetworkOfferingServiceMapVO;
 import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
 import com.cloud.org.Grouping;
 import com.cloud.projects.Project.ListProjectResourcesCriteria;
+import com.cloud.server.ConfigurationServer;
 import com.cloud.server.ResourceTag.TaggedResourceType;
 import com.cloud.tags.ResourceTagVO;
 import com.cloud.tags.dao.ResourceTagDao;
@@ -115,7 +119,6 @@ import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.net.NetUtils;
-import com.cloud.vm.DomainRouterVO;
 import com.cloud.vm.ReservationContext;
 import com.cloud.vm.ReservationContextImpl;
 import com.cloud.vm.dao.DomainRouterDao;
@@ -175,11 +178,17 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
     ResourceLimitService _resourceLimitMgr;
     @Inject
     VpcServiceMapDao _vpcSrvcDao;
+    @Inject
+    DataCenterDao _dcDao;
+    @Inject
+    ConfigurationServer _configServer;
 
     private final ScheduledExecutorService _executor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("VpcChecker"));
     private List<VpcProvider> vpcElements = null;
     private final List<Service> nonSupportedServices = Arrays.asList(Service.SecurityGroup, Service.Firewall);
     private final List<Provider> supportedProviders = Arrays.asList(Provider.VPCVirtualRouter, Provider.NiciraNvp);
+    
+    private Map<Long, Set<String>> zoneBlackListedRoutes;
  
     int _cleanupInterval;
     int _maxNetworks;
@@ -231,6 +240,26 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
         IpAddressSearch.join("virtualNetworkVlanSB", virtualNetworkVlanSB, IpAddressSearch.entity().getVlanId(), virtualNetworkVlanSB.entity().getId(), JoinBuilder.JoinType.INNER);
         IpAddressSearch.done();
         
+        //populate blacklisted routes
+        List<DataCenterVO> zones = _dcDao.listAllZones();
+        zoneBlackListedRoutes = new HashMap<Long, Set<String>>();
+        for (DataCenterVO zone : zones) {
+            List<ConfigurationVO> confs = _configServer.getConfigListByScope(Config.ConfigurationParameterScope.zone.toString(), zone.getId());
+            for (ConfigurationVO conf : confs) {
+                String routeStr = conf.getValue();
+                if (conf.getName().equalsIgnoreCase(Config.BlacklistedRoutes.key()) && routeStr != null && !routeStr.isEmpty()) {
+                    String[] routes = routeStr.split(",");
+                    Set<String> cidrs = new HashSet<String>();
+                    for (String route : routes) {
+                        cidrs.add(route);
+                    }
+                    
+                    zoneBlackListedRoutes.put(zone.getId(), cidrs);
+                    break;
+                }
+            }
+        }
+        
         return true;
     }
 
@@ -1653,6 +1682,17 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
         if (NetUtils.isNetworksOverlap(vpc.getCidr(), NetUtils.getLinkLocalCIDR())) {
             throw new InvalidParameterValueException("CIDR should be outside of link local cidr " + NetUtils.getLinkLocalCIDR());
         }
+        
+        //3) Verify against blacklisted routes
+        Set<String> cidrBlackList = zoneBlackListedRoutes.get(vpc.getZoneId());
+        
+        if (cidrBlackList != null && !cidrBlackList.isEmpty()) {
+            for (String blackListedRoute : cidrBlackList) {
+                if (NetUtils.isNetworksOverlap(blackListedRoute, cidr)) {
+                    throw new InvalidParameterValueException("The static gateway cidr overlaps with one of the blacklisted routes of the VPC zone");
+                }
+            }
+        }
 
         Transaction txn = Transaction.currentTxn();
         txn.start();


[30/42] Convert zh_CH (chinese) resource file to ASCII with unicode, merge with 4.1 files, synchronize with transifex 4.2 resources file

Posted by bf...@apache.org.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2c271e0f/client/WEB-INF/classes/resources/messages_zh_CN.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages_zh_CN.properties b/client/WEB-INF/classes/resources/messages_zh_CN.properties
index d49cefa..1f22105 100644
--- a/client/WEB-INF/classes/resources/messages_zh_CN.properties
+++ b/client/WEB-INF/classes/resources/messages_zh_CN.properties
@@ -1,1520 +1,1476 @@
-# 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.
-
-
-#new labels (begin) **********************************************************************************************
-
-
-#new labels (end) ************************************************************************************************
-
-
-#modified labels (begin) *****************************************************************************************
-
-
-#modified labels (end) *******************************************************************************************
-
-label.configure.network.ACLs=配置网络 ACL
-label.network.ACLs=网络 ACL
-label.add.network.ACL=添加网络 ACL
-label.private.Gateway=专用网关
-label.VPC.router.details=VPC 路由器详细信息
-label.VMs.in.tier=层中的 VM
-
-message.zoneWizard.enable.local.storage=警告: 如果为此区域启用了本地存储,则必须执行以下操作,具体取决于希望启动系统 VM 的位置:<br/><br/>1. 如果要在主存储中启动系统 VM,则需要在创建后将主存储添加到此区域中。此外,还必须启动处于禁用状态的区域。<br/><br/>2. 如果要在本地存储中启动系统 VM,则需要先将 system.vm.use.local.storage 设置为 True,然后再启用此区域。<br/><br/><br/>是否要继续?
-label.local.storage.enabled=已启用本地存储
-label.tier.details=层详细信息
-label.edit.tags=编辑标签
-label.network.rate.megabytes=网络速率(MB/秒)
-label.action.enable.physical.network=启用物理网络
-label.action.disable.physical.network=禁用物理网络
-message.action.enable.physical.network=请确认您确实要启用此物理网络。
-message.action.disable.physical.network=请确认您确实要禁用此物理网络。
-
-label.select.tier=选择层
-label.add.ACL=添加 ACL
-label.remove.ACL=删除 ACL
-label.tier=层
-label.network.ACL=网络 ACL
-label.network.ACL.total=网络 ACL 总数
-label.add.new.gateway=添加新网关
-message.add.new.gateway.to.vpc=请指定将新网关添加到此 VPC 所需的信息。
-label.delete.gateway=删除网关
-message.delete.gateway=请确认您确实要删除此网关
-label.CIDR.of.destination.network=目的地网络的 CIDR
-label.add.route=添加路由
-label.add.static.route=添加静态路由
-label.remove.static.route=删除静态路由
-label.site.to.site.VPN=站点到站点 VPN
-label.add.VPN.gateway=添加 VPN 网关
-message.add.VPN.gateway=请确认您确实要添加 VPN 网关
-label.VPN.gateway=VPN 网关
-label.delete.VPN.gateway=删除 VPN 网关
-message.delete.VPN.gateway=请确认您确实要删除此 VPN 网关
-label.VPN.connection=VPN 连接
-label.IPsec.preshared.key=IPsec 预共享密钥
-label.IKE.policy=IKE 策略
-label.ESP.policy=ESP 策略
-label.create.VPN.connection=创建 VPN 连接
-label.VPN.customer.gateway=VPN 客户网关
-label.CIDR.list=CIDR 列表
-label.IKE.lifetime=IKE 使用期限(第二阶段)
-label.ESP.lifetime=ESP 使用期限(第二阶段)
-label.dead.peer.detection=失效对等体检测
-label.reset.VPN.connection=重置 VPN 连接
-message.reset.VPN.connection=请确认您确实要重置 VPN 连接
-label.delete.VPN.connection=删除 VPN 连接
-message.delete.VPN.connection=请确认您确实要删除 VPN 连接
-label.add.new.tier=添加新层
-label.add.VM.to.tier=向层中添加 VM
-label.remove.tier=删除层
-
-label.local.storage.enabled=已启用本地存储
-label.associated.network=关联网络
-label.add.port.forwarding.rule=添加端口转发规则
-label.dns=DNS
-
-label.vpc=VPC
-label.vpc.id=VPC ID
-label.tier=层
-label.add.vpc=添加 VPC
-label.super.cidr.for.guest.networks=来宾网络的超级 CIDR
-label.DNS.domain.for.guest.networks=来宾网络的 DNS 域
-label.configure.vpc=配置 VPC
-label.edit.vpc=编辑 VPC
-label.restart.vpc=重新启动 VPC
-message.restart.vpc=请确认您确实要重新启动 VPC
-label.remove.vpc=删除 VPC
-message.remove.vpc=请确认您确实要删除 VPC
-label.vpn.customer.gateway=VPN 客户网关
-label.add.vpn.customer.gateway=添加 VPN 客户网关
-label.IKE.encryption=IKE 加密算法
-label.IKE.hash=IKE 哈希算法
-label.IKE.DH=IKE DH 算法
-label.ESP.encryption=ESP 加密算法
-label.ESP.hash=ESP 哈希算法
-label.perfect.forward.secrecy=完全正向保密
-label.IKE.lifetime=IKE 使用期限(第二阶段)
-label.ESP.lifetime=ESP 使用期限(第二阶段)
-label.dead.peer.detection=失效对等体检测
-label.delete.VPN.customer.gateway=删除 VPN 客户网关
-message.delete.VPN.customer.gateway=请确认您确实要删除此 VPN 客户网关
-
-label.network.domain.text=网络域
-label.memory.mb=内存(MB)
-label.cpu.mhz=CPU (MHz)
-message.action.remove.host=请确认您确实要删除此主机。
-
-message.action.reboot.router=此虚拟路由器提供的所有服务都将中断。请确认您确实要重新启动此路由器。
-message.action.stop.router=此虚拟路由器提供的所有服务都将中断。请确认您确实要停止此路由器。
-message.restart.network=此网络提供的所有服务都将中断。请确认您确实要重新启动此网络。
-
-
-label.ipaddress=IP 地址
-label.vcdcname=vCenter DC 名称
-label.vcipaddress=vCenter IP 地址
-label.vsmctrlvlanid=控制 VLAN ID
-label.vsmpktvlanid=数据包 VLAN ID
-label.vsmstoragevlanid=存储 VLAN ID
-label.nexusVswitch=Nexus 1000v
-label.action.delete.nexusVswitch=删除 Nexus 1000v
-label.action.enable.nexusVswitch=启用 Nexus 1000v
-label.action.disable.nexusVswitch=禁用 Nexus 1000v
-label.action.list.nexusVswitch=列出 Nexus 1000v
-message.action.delete.nexusVswitch=请确认您确实要删除此 Nexus 1000v
-message.action.enable.nexusVswitch=请确认您确实要启用此 Nexus 1000v
-message.action.disable.nexusVswitch=请确认您确实要禁用此 Nexus 1000v
-message.specify.url=请指定 URL
-label.select.instance.to.attach.volume.to=选择要将卷附加到的实例
-label.upload=上载
-label.upload.volume=上载卷
-label.virtual.routers=虚拟路由器
-label.primary.storage.count=主存储池
-label.secondary.storage.count=辅助存储池
-label.number.of.system.vms=系统 VM 数
-label.number.of.virtual.routers=虚拟路由器数
-label.action.register.iso=注册 ISO
-label.isolation.method=隔离方法
-label.action.register.template=注册模板
-label.checksum=MD5 校验和
-label.vpn=VPN
-label.vlan=VLAN
-
-
-label.management.ips=管理类 IP 地址
-label.devices=设备
-label.rules=规则
-label.traffic.label=流量标签
-label.vm.state=VM 状态
-message.setup.physical.network.during.zone.creation.basic=添加基础区域时,可以设置一个物理网络,此网络应与虚拟机管理程序中的 NIC 相对应。此网络可以承载多种流量类型。<br/><br/>此外,还可以将其他流量类型<strong>拖放</strong>到此物理网络。
-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=已启用
-label.system.wide.capacity=全系统容量
-label.network.service.providers=网络服务提供程序
-message.launch.zone=区域已准备就绪,可随时启动;请继续执行下一步骤。
-error.unable.to.reach.management.server=无法访问管理服务器
-label.internal.name=内部名称
-message.configure.all.traffic.types=您有多个物理网络,请单击“编辑”按钮为每种流量类型配置标签。
-message.edit.traffic.type=请指定您希望与此流量类型关联的流量标签。
-label.edit.traffic.type=编辑流量类型
-label.label=标签
-label.max.networks=最大网络数
-error.invalid.username.password=用户名或密码无效
-message.enabling.security.group.provider=正在启用安全组提供程序
-message.adding.Netscaler.provider=正在添加 Netscaler 提供程序
-message.creating.guest.network=正在创建来宾网络
-label.action.delete.physical.network=删除物理网络
-message.action.delete.physical.network=请确认您确实要删除此物理网络
-message.installWizard.copy.whatIsAHost=主机是指一台计算机。主机提供运行来宾虚拟机的计算资源。每台主机上都安装有虚拟机管理程序软件,用于管理来宾 VM (裸机主机除外,将在“高级安装指南”中讨论这一特殊案例)。例如,启用了 KVM 的 Linux 服务器、Citrix XenServer 服务器和 ESXi 服务器都可用作主机。在基本安装中,我们将使用一台运行 XenServer 的主机。<br/><br/>主机是 CloudStack&#8482; 部署中最小的组织单位。主机包含在群集中,群集包含在提供点中,提供点包含在区域中。
-
-
-label.add.compute.offering=添加计算方案
-label.compute.offering=计算方案
-label.compute.offerings=计算方案
-label.select.offering=选择方案
-label.menu.infrastructure=基础架构
-label.sticky.tablesize=表大小
-label.sticky.expire=过期日期
-label.sticky.cookie-name=Cookie 名称
-label.sticky.mode=模式
-label.sticky.length=长度
-label.sticky.holdtime=持续时间
-label.sticky.request-learn=request-learn
-label.sticky.prefix=prefix
-label.sticky.nocache=nocache
-label.sticky.indirect=indirect
-label.sticky.postonly=postonly
-label.sticky.domain=域
-state.Allocating=正在分配
-state.Migrating=正在迁移
-error.please.specify.physical.network.tags=网络方案在您为此物理网络指定标签之后才可用。
-
-
-state.Stopping=正在停止
-message.add.load.balancer.under.ip=已在以下 IP 下添加负载平衡器规则:
-message.select.instance=请选择一个实例。
-label.select=选择
-label.select.vm.for.static.nat=为静态 NAT 选择 VM
-label.select.instance=选择实例
-label.nat.port.range=NAT 端口范围
-label.static.nat.vm.details=静态 NAT VM 详情
-label.edit.lb.rule=编辑负载平衡器规则
-message.migrate.instance.to.host=请确认您确实要将实例迁移到其他主机。
-label.migrate.instance.to.host=将实例迁移到其他主机
-message.migrate.instance.to.ps=请确认您确实要将实例迁移到其他主存储。
-label.migrate.instance.to.ps=将实例迁移到其他主存储
-label.corrections.saved=已保存修正
-message.installWizard.copy.whatIsSecondaryStorage=辅助存储与区域相关联,用于存储以下项目:<ul><li>模板 - 可用于启动 VM 并可以包含其他配置信息(例如,已安装的应用程序)的操作系统映像</li><li>ISO 映像 - 可重新启动或不可重新启动的操作系统映像</li><li>磁盘卷快照 - 已保存的 VM 数据副本,可用于执行数据恢复或创建新模板</ul>
-message.installWizard.copy.whatIsPrimaryStorage=CloudStack&#8482; 云基础架构使用以下两种类型的存储: 主存储和辅助存储。这两种类型的存储可以是 iSCSI 或 NFS 服务器,也可以是本地磁盘。<br/><br/><strong>主存储</strong>与群集相关联,用于存储该群集中的主机上正在运行的所有 VM 对应的每个来宾 VM 的磁盘卷。主存储服务器通常位于靠近主机的位置。
-message.installWizard.copy.whatIsACluster=群集提供了一种编组主机的方法。群集中的所有主机都具有相同的硬件,运行相同的虚拟机管理程序,位于同一子网中,并访问相同的共享存储。可以实时将虚拟机实例(VM)从一台主机迁移到同一群集内的其他主机,而无需中断向用户提供服务。群集是 CloudStack&#8482; 部署中的第三大组织单位。群集包含在提供点中,提供点包含在区域中。<br/><br/>CloudStack&#8482; 允许云部署中存在多个群集,但对于基本安装,我们只需要一个群集。
-message.installWizard.copy.whatIsAPod=一个提供点通常代表一个机架。同一提供点中的主机位于同一子网中。<br/><br/>提供点是 CloudStack&#8482; 部署中的第二大组织单位。提供点包含在区域中。每个区域中可以包含一个或多个提供点;在基本安装中,您的区域中将仅包含一个提供点。
-message.installWizard.copy.whatIsAZone=区域是 CloudStack&#8482; 部署中最大的组织单位。虽然允许一个数据中心中存在多个区域,但是一个区域通常与一个数据中心相对应。将基础架构编组到区域中的好处是可以提供物理隔离和冗余。例如,每个区域都可以拥有各自的电源供应和网络上行方案,并且各区域可以在地理位置上相隔很远(虽然并非必须相隔很远)。
-message.installWizard.copy.whatIsCloudStack=CloudStack&#8482 是一个软件平台,可将计算资源集中在一起以构建公共、私有和混合基础设施即服务(IaaS)云。CloudStack&#8482 负责管理组成云基础架构的网络、存储和计算节点。使用 CloudStack&#8482 可以部署、管理和配置云计算环境。<br/><br/>CloudStack&#8482 通过扩展商用硬件上运行的每个虚拟机映像的范围,提供了一个实时可用的云基础架构软件堆栈用于以服务方式交付虚拟数据中心,即交付构建、部署和管理多层次和多租户云应用程序必需的所有组件。开源版本和 Premium 版本都已可用,且提供的功能几乎完全相同。
-message.installWizard.tooltip.addSecondaryStorage.path=导出路径(位于上述指定服务器上)
-message.installWizard.tooltip.addSecondaryStorage.nfsServer=托管辅助存储的 NFS 服务器的 IP 地址
-message.installWizard.tooltip.addPrimaryStorage.path=(适用于 NFS)在 NFS 中,此路径为服务器的导出路径。路径(针对 SharedMountPoint)。对于 KVM,此路径为装载了辅助存储的每个主机上的路径。例如,/mnt/primary。
-message.installWizard.tooltip.addPrimaryStorage.server=(适用于 NFS、iSCSI 或 PreSetup)存储设备的 IP 地址或 DNS 名称。
-message.installWizard.tooltip.addPrimaryStorage.name=存储设备的名称。
-message.installWizard.tooltip.addHost.password=此为上述用户的密码(来自 XenServer 安装)。
-message.installWizard.tooltip.addHost.username=通常为 root。
-message.installWizard.tooltip.addHost.hostname=主机的 DNS 名称或 IP 地址。
-message.installWizard.tooltip.addCluster.name=群集的名称。此名称可以是您选择的文本,且未由 CloudStack 使用。
-message.installWizard.tooltip.addPod.reservedSystemEndIp=此为 CloudStack 用于管理辅助存储 VM 和控制台代理 VM 的专用网络中的 IP 范围。这些 IP 地址来自与计算服务器相同的子网。
-message.installWizard.tooltip.addPod.reservedSystemStartIp=此为 CloudStack 用于管理辅助存储 VM 和控制台代理 VM 的专用网络中的 IP 范围。这些 IP 地址来自与计算服务器相同的子网。
-message.installWizard.tooltip.addPod.reservedSystemNetmask=来宾将要使用的子网上正在使用的网络掩码。
-message.installWizard.tooltip.addPod.reservedSystemGateway=该提供点中的主机网关。
-message.installWizard.tooltip.addPod.name=提供点的名称
-message.installWizard.tooltip.configureGuestTraffic.guestEndIp=能够分配给此区域中的来宾的 IP 地址范围。如果使用一个 NIC,这些 IP 应位于与提供点 CIDR 相同的  CIDR 中。
-message.installWizard.tooltip.configureGuestTraffic.guestStartIp=能够分配给此区域中的来宾的 IP 地址范围。如果使用一个 NIC,这些 IP 应位于与提供点 CIDR 相同的  CIDR 中。
-message.installWizard.tooltip.configureGuestTraffic.guestNetmask=来宾应使用的子网上正在使用的网络掩码
-message.installWizard.tooltip.configureGuestTraffic.guestGateway=来宾应使用的网关
-message.installWizard.tooltip.configureGuestTraffic.description=您的网络说明
-message.installWizard.tooltip.configureGuestTraffic.name=您的网络名称
-message.installWizard.tooltip.addZone.internaldns2=这些服务器是供此区域中的系统 VM 使用的 DNS 服务器,将通过系统 VM 的专用网络接口进行访问。您为提供点提供的专用 IP 地址必须路由到在此处指定的 DNS 服务器。
-message.installWizard.tooltip.addZone.internaldns1=这些服务器是供此区域中的系统 VM 使用的 DNS 服务器,将通过系统 VM 的专用网络接口进行访问。您为提供点提供的专用 IP 地址必须路由到在此处指定的 DNS 服务器。
-message.installWizard.tooltip.addZone.dns2=这些服务器是供此区域中的来宾 VM 使用的 DNS 服务器,将通过您稍后要添加的公用网络进行访问。此区域的公用 IP 地址必须路由到在此处指定的 DNS 服务器。
-message.installWizard.tooltip.addZone.name=区域名称
-message.installWizard.tooltip.addZone.dns1=这些服务器是供此区域中的来宾 VM 使用的 DNS 服务器,将通过您稍后要添加的公用网络进行访问。此区域的公用 IP 地址必须路由到在此处指定的 DNS 服务器。
-message.setup.successful=已成功设置云!
-label.may.continue=您现在可以继续进行操作。
-error.installWizard.message=出现问题;请返回并更正任何错误
-message.installWizard.now.building=现在正在构建您的云... 
-message.installWizard.click.retry=请单击此按钮重新尝试启动。
-label.launch=启动
-label.installWizard.click.launch=请单击“启动”按钮。
-label.congratulations=祝贺您!
-label.installWizard.addSecondaryStorageIntro.subtitle=什么是辅助存储?
-label.installWizard.addSecondaryStorageIntro.title=添加一个辅助存储
-label.installWizard.addPrimaryStorageIntro.subtitle=什么是主存储?
-label.installWizard.addPrimaryStorageIntro.title=添加一个主存储
-label.installWizard.addHostIntro.subtitle=什么是主机?
-label.installWizard.addHostIntro.title=添加一个主机
-label.installWizard.addClusterIntro.subtitle=什么是群集?
-label.installWizard.addClusterIntro.title=添加一个群集
-label.installWizard.addPodIntro.subtitle=什么是提供点?
-label.installWizard.addPodIntro.title=添加一个提供点
-label.installWizard.addZone.title=添加区域
-label.installWizard.addZoneIntro.subtitle=什么是区域?
-label.installWizard.addZoneIntro.title=添加一个区域
-error.password.not.match=密码字段不一致
-label.confirm.password=确认密码
-message.change.password=请更改您的密码。
-label.save.and.continue=保存并继续
-label.skip.guide=我以前使用过 CloudStack,跳过此指南
-label.continue.basic.install=继续执行基本安装
-label.introduction.to.cloudstack=CloudStack&#8482 简介
-label.what.is.cloudstack=什么是 CloudStack&#8482?
-label.hints=提示
-label.installWizard.subtitle=此教程将帮助您设置 CloudStack&#8482 安装
-label.continue=继续
-label.installWizard.title=您好,欢迎使用 CloudStack&#8482
-label.agree=同意
-label.manage.resources=管理资源
-label.port.forwarding.policies=端口转发策略
-label.load.balancing.policies=负载平衡策略
-label.networking.and.security=网络连接与安全
-label.bandwidth=带宽
-label.virtual.machines=虚拟机
-label.compute.and.storage=计算与存储
-label.task.completed=已完成任务
-label.update.project.resources=更新项目资源
-label.remove.project.account=删除项目帐户
-label.item.listing=项目列表
-message.select.item=请选择一个项目。
-label.removing=正在删除
-label.invite=邀请
-label.add.by=添加方式
-label.max.vms=最大用户 VM 数
-label.max.public.ips=最大公用 IP 数
-label.max.volumes=最大卷数
-label.max.snapshots=最大快照数
-label.max.templates=最大模板数
-label.project.dashboard=项目控制板
-label.remind.later=以后提醒我
-label.invited.accounts=已邀请的帐户
-label.invite.to=邀请加入
-label.add.accounts.to=添加帐户至
-label.add.accounts=添加帐户
-label.project.name=项目名称
-label.create.project=创建项目
-label.networks=网络
-label.launch.vm=启动 VM
-label.new.vm=新建 VM
-label.previous=上一步
-label.add.to.group=添加到组
-message.vm.review.launch=请先核对以下信息,确认您的虚拟实例正确无误,然后再启动。
-message.select.security.groups=请为您的新 VM 选择安全组
-label.new=新建
-message.please.select.networks=请为您的虚拟机选择网络。
-message.please.proceed=请继续执行下个步骤。
-message.zone.no.network.selection=所选区域无任何网络选项。
-label.no.thanks=不,谢谢
-label.my.templates=我的模板
-message.select.template=请为您的新虚拟实例选择一个模板。
-message.select.iso=请为您的新虚拟实例选择一个 ISO。
-message.template.desc=可用于启动 VM 的操作系统映像
-message.iso.desc=包含操作系统的数据或可启动介质的磁盘映像
-label.select.iso.or.template=选择 ISO 或模板
-message.select.a.zone=一个区域通常与一个数据中心相对应。多个区域可以提供物理隔离和冗余,有助于使云更加可靠。
-label.select.a.zone=选择一个区域
-label.review=核对
-label.select.a.template=选择一个模板
-label.setup=设置
-state.Allocated=已分配
-changed.item.properties=更改项目属性
-label.apply=应用
-label.default=默认值
-label.viewing=正在查看
-label.move.to.top=移至顶部
-label.move.up.row=向上移动一行
-label.move.down.row=向下移动一行
-label.move.to.bottom=移至底部
-label.drag.new.position=拖动到新位置
-label.order=排序
-label.no.data=无可显示的数据
-label.change.value=更改值
-label.clear.list=清除列表
-label.full.path=完整路径
-message.add.domain=请指定要在此域下创建的子域
-message.delete.user=请确认您确实要删除此用户。
-message.enable.user=请确认您确实要启用此用户。
-message.disable.user=请确认您确实要禁用此用户。
-message.generate.keys=请确认您确实要为此用户生成新密钥。
-message.update.resource.count=请确认您确实要更新此帐户的资源数。
-message.edit.account=编辑(“-1”表示对要创建的资源数量没有任何限制)
-label.total.of.vm=总 VM 数
-label.total.of.ip=总 IP 地址数
-state.enabled=已启用
-message.action.download.iso=请确认您确实要下载此 ISO。
-message.action.download.template=请确认您确实要下载此模板。
-label.destination.zone=目标区域
-label.keyboard.type=键盘类型
-label.nic.adapter.type=NIC 适配器类型
-label.root.disk.controller=根磁盘控制器
-label.community=社区
-label.remove.egress.rule=删除出口规则
-label.add.egress.rule=添加出口规则
-label.egress.rule=出口规则
-label.remove.ingress.rule=删除入口规则
-label.delete.vpn.user=删除 VPN 用户
-label.add.vpn.user=添加 VPN 用户
-label.remove.pf=删除端口转发规则
-label.remove.vm.from.lb=从负载平衡器规则中删除 VM
-label.add.vms.to.lb=向负载平衡器规则中添加 VM
-label.add.vm=添加 VM
-label.remove.static.nat.rule=删除静态 NAT 规则
-label.remove.rule=删除规则
-label.add.static.nat.rule=添加静态 NAT 规则
-label.add.rule=添加规则
-label.configuration=配置
-message.disable.vpn=是否确实要禁用 VPN?
-label.disable.vpn=禁用 VPN
-message.enable.vpn=请确认您确实要对此 IP 地址启用 VPN 访问。
-label.enable.vpn=启用 VPN
-message.acquire.new.ip=请确认您确实要为此网络获取一个新 IP。
-label.elastic=弹性
-label.my.network=我的网络
-label.add.vms=添加 VM
-label.configure=配置
-label.stickiness=粘性
-label.source=源算法
-label.least.connections=最少连接算法
-label.round.robin=轮询算法
-label.restart.required=需要重新启动
-label.clean.up=清除
-label.restart.network=重新启动网络
-label.edit.network.details=编辑网络详情
-label.add.guest.network=添加来宾网络
-label.guest.networks=来宾网络
-message.ip.address.changed=您的 IP 地址可能已发生变化;是否要刷新此列表? 请注意,刷新此列表时,“详细信息”窗格将关闭。
-state.BackingUp=正在备份
-state.BackedUp=已备份
-label.done=完成
-label.vm.name=VM 名称
-message.migrate.volume=请确认您确实要将卷迁移到其他主存储。
-label.migrate.volume=将卷迁移到其他主存储
-message.create.template=是否确实要创建模板?
-label.create.template=创建模板
-message.download.volume.confirm=请确认您确实要下载此卷
-message.detach.disk=是否确实要取消附加此磁盘?
-state.ready=已就绪
-state.Ready=已就绪
-label.vm.display.name=VM 显示名称
-label.select-view=选择视图
-label.local.storage=本地存储
-label.direct.ips=直接 IP
-label.view.all=查看全部
-label.zone.details=区域详情
-message.alert.state.detected=检测到警报状态
-state.Starting=正在启动
-state.Expunging=正在删除
-state.Creating=正在创建
-message.decline.invitation=是否确实要拒绝此项目邀请?
-label.decline.invitation=拒绝邀请
-message.confirm.join.project=请确认您确实要加入此项目。
-message.join.project=您现在已加入了一个项目。请切换到“项目视图”以查看项目。
-label.accept.project.invitation=接受项目邀请
-label.token=令牌
-label.project.id=项目 ID
-message.enter.token=请输入您在邀请电子邮件中收到的令牌。
-label.enter.token=输入令牌
-state.Accepted=已接受
-state.Pending=待定
-state.Completed=已完成
-state.Declined=已拒绝
-label.project=项目
-label.invitations=邀请
-label.delete.project=删除项目
-message.delete.project=是否确实要删除此项目?
-message.activate.project=是否确实要激活此项目?
-label.activate.project=激活项目
-label.suspend.project=暂停项目
-message.suspend.project=是否确实要暂停此项目?
-state.Suspended=已暂停
-label.edit.project.details=编辑项目详情
-label.new.project=新建项目
-state.Active=活动
-state.Disabled=已禁用
-label.projects=项目
-label.make.project.owner=设为帐户项目所有者
-label.remove.project.account=从项目中删除帐户
-message.project.invite.sent=发送给用户的邀请;用户接受邀请后,将加入到项目中
-label.add.account.to.project=向项目中添加帐户
-label.revoke.project.invite=撤销邀请
-label.project.invite=邀请加入项目
-label.select.project=选择项目
-message.no.projects=您没有任何项目。<br/>请从“项目”部分中创建一个新项目。
-message.no.projects.adminOnly=您没有任何项目。<br/>请要求管理员创建一个新项目。
-message.pending.projects.1=您有待定项目邀请:
-message.pending.projects.2=要查看,请转至“项目”部分,然后从下拉列表中选择“邀请”。
-message.instanceWizard.noTemplates=您没有任何可用模板;请添加一个兼容的模板,然后重新启动实例向导。
-label.view=查看
-instances.actions.reboot.label=重新启动实例
-label.filterBy=过滤依据
-label.ok=确定
-notification.reboot.instance=重新启动实例
-notification.start.instance=启动实例
-notification.stop.instance=停止实例
-label.display.name=显示名称
-label.zone.name=区域名称
-ui.listView.filters.all=全部
-ui.listView.filters.mine=本用户
-state.Running=正在运行
-state.Stopped=已停止
-state.Destroyed=已销毁
-state.Error=错误
-message.reset.password.warning.notPasswordEnabled=创建此实例的模板时未启用密码
-message.reset.password.warning.notStopped=必须先停止您的实例,才能尝试更改其当前密码
-label.notifications=通知
-label.default.view=默认视图
-label.project.view=项目视图
-
-message.add.system.service.offering=请填写以下数据以添加一个新的系统服务方案。
-message.action.delete.system.service.offering=请确认您确实要删除此系统服务方案。
-label.action.delete.system.service.offering=删除系统服务方案
-label.hypervisor.capabilities=虚拟机管理程序功能
-label.hypervisor.version=虚拟机管理程序版本
-label.max.guest.limit=最大来宾数限制
-label.add.network.offering=添加网络方案
-label.supported.services=支持的服务
-label.service.capabilities=服务功能
-label.guest.type=来宾类型
-label.specify.IP.ranges=指定 IP 范围
-label.conserve.mode=保护模式
-label.created.by.system=由系统创建
-label.menu.system.service.offerings=系统方案
-label.add.system.service.offering=添加系统服务方案
-label.redundant.router.capability=冗余路由器功能
-label.supported.source.NAT.type=支持的源 NAT 类型
-label.elastic.LB=弹性负载平衡器
-label.LB.isolation=负载平衡器隔离
-label.elastic.IP=弹性 IP
-label.network.label.display.for.blank.value=使用默认网关
-label.xen.traffic.label=XenServer 流量标签
-label.kvm.traffic.label=KVM 流量标签
-label.vmware.traffic.label=VMware 流量标签
-label.start.IP=起始 IP
-label.end.IP=结束 IP
-label.remove.ip.range=删除 IP 范围
-label.ip.ranges=IP 范围
-label.start.vlan=起始 VLAN
-label.end.vlan=结束 VLAN
-label.broadcast.domain.range=广播域范围
-label.compute=计算
-message.add.guest.network=请确认您确实要添加一个来宾网络
-label.subdomain.access=子域访问
-label.guest.start.ip=来宾起始 IP
-label.guest.end.ip=来宾结束 IP
-label.virtual.router=虚拟路由器
-label.physical.network.ID=物理网络 ID
-label.destination.physical.network.id=目标物理网络 ID
-label.dhcp=DHCP
-label.destroy.router=销毁路由器
-message.confirm.destroy.router=请确认您确实要销毁此路由器
-label.change.service.offering=更改服务方案
-label.view.console=查看控制台
-label.redundant.state=冗余状态
-label.enable.provider=启用提供程序
-message.confirm.enable.provider=请确认您确实要启用此提供程序
-label.disable.provider=禁用提供程序
-message.confirm.disable.provider=请确认您确实要禁用此提供程序
-label.shutdown.provider=关闭提供程序
-message.confirm.shutdown.provider=请确认您确实要关闭此提供程序
-label.netScaler=NetScaler
-label.add.new.NetScaler=添加新 NetScaler
-label.capacity=容量
-label.dedicated=专用
-label.f5=F5
-label.add.new.F5=添加新 F5
-label.srx=SRX
-label.providers=提供程序
-label.add.new.SRX=添加新 SRX
-label.timeout=超时
-label.public.network=公用网络
-label.private.network=专用网络
-label.enable.swift=启用 SWIFT
-confirm.enable.swift=请填写以下信息以启用对 SWIFT 的支持
-message.after.enable.swift=已配置 SWIFT。注意: 退出此页面后,您将无法再次重新配置 SWIFT。
-label.key=密钥
-label.delete.NetScaler=删除 NetScaler
-message.confirm.delete.NetScaler=请确认您确实要删除 NetScaler
-label.delete.F5=删除 F5
-message.confirm.delete.F5=请确认您确实要删除 F5
-label.delete.SRX=删除 SRX
-message.confirm.delete.SRX=请确认您确实要删除 SRX
-label.pods=提供点
-label.pod.name=提供点名称
-label.reserved.system.gateway=预留的系统网关
-label.reserved.system.netmask=预留的系统网络掩码
-label.start.reserved.system.IP=起始预留系统 IP
-label.end.reserved.system.IP=结束预留系统 IP
-label.clusters=群集
-label.cluster.name=群集名称
-label.host.MAC=主机 MAC
-label.agent.username=代理用户名
-label.agent.password=代理密码
-message.confirm.action.force.reconnect=请确认您确实要强制重新连接此主机。
-label.resource.state=资源状态
-label.LUN.number=LUN 号
-message.confirm.remove.IP.range=请确认您确实要删除此 IP 范围。
-message.tooltip.zone.name=区域名称。
-message.tooltip.dns.1=供区域中的 VM 使用的 DNS 服务器名称。区域的公用 IP 地址必须路由到此服务器。
-message.tooltip.dns.2=供区域中的 VM 使用的辅助 DNS 服务器名称。区域的公用 IP 地址必须路由到此服务器。
-message.tooltip.internal.dns.1=供区域中的 CloudStack 内部系统 VM 使用的 DNS 服务器名称。提供点的专用 IP 地址必须路由到此服务器。
-message.tooltip.internal.dns.2=供区域中的 CloudStack 内部系统 VM 使用的 DNS 服务器名称。提供点的专用 IP 地址必须路由到此服务器。
-message.tooltip.network.domain=DNS 后缀,将为由来宾 VM 访问的网络创建一个自定义域名。
-message.tooltip.pod.name=此提供点的名称。
-message.tooltip.reserved.system.gateway=提供点中的主机网关。
-message.tooltip.reserved.system.netmask=用于定义提供点子网的网络前缀。请使用 CIDR 符号。
-message.creating.zone=正在创建区域
-message.creating.physical.networks=正在创建物理网络
-message.configuring.physical.networks=正在配置物理网络
-message.adding.Netscaler.device=正在添加 Netscaler 设备
-message.creating.pod=正在创建提供点
-message.configuring.public.traffic=正在配置公共流量
-message.configuring.storage.traffic=正在配置存储流量
-message.configuring.guest.traffic=正在配置来宾流量
-message.creating.cluster=正在创建群集
-message.adding.host=正在添加主机
-message.creating.primary.storage=正在创建主存储
-message.creating.secondary.storage=正在创建辅助存储
-message.Zone.creation.complete=已完成创建区域
-message.enabling.zone=正在启用区域
-error.something.went.wrong.please.correct.the.following=出现问题;请更正以下各项
-error.could.not.enable.zone=无法启用区域
-message.zone.creation.complete.would.you.like.to.enable.this.zone=已完成创建区域。是否要启用此区域?
-message.please.add.at.lease.one.traffic.range=请至少添加一个流量范围。
-message.you.must.have.at.least.one.physical.network=您必须至少拥有一个物理网络
-message.please.select.a.different.public.and.management.network.before.removing=请先选择其他公共管理网络,然后再删除
-
-label.zone.type=区域类型
-label.setup.zone=设置区域
-label.setup.network=设置网络
-label.add.resources=添加资源
-label.launch=启动
-label.set.up.zone.type=设置区域类型
-message.please.select.a.configuration.for.your.zone=请为您的区域选择一种配置。
-message.desc.basic.zone=提供一个网络,将直接从此网络中为每个 VM 实例分配一个 IP。可以通过安全组等第 3 层方式提供来宾隔离(IP 地址源过滤)。
-label.basic=基本
-message.desc.advanced.zone=适用于更加复杂的网络拓扑。此网络模式在定义来宾网络并提供防火墙、VPN 或负载平衡器支持等自定义网络方案方面提供了最大的灵活性。
-label.advanced=高级
-message.desc.zone=区域是 CloudStack 中最大的组织单位,一个区域通常与一个数据中心相对应。区域可提供物理隔离和冗余。一个区域由一个或多个提供点以及由区域中的所有提供点共享的一个辅助存储服务器组成,其中每个提供点中包含多个主机和主存储服务器。
-label.physical.network=物理网络
-label.public.traffic=公共流量
-label.guest.traffic=来宾流量
-label.storage.traffic=存储流量
-message.setup.physical.network.during.zone.creation=添加高级区域时,需要设置一个或多个物理网络。每个网络都与虚拟机管理程序中的一个 NIC 相对应。每个物理网络中可以包含一种或多种流量类型,并对这些流量类型可能的组合方式设置了某些限制。<br/><br/><strong>可以将一种或多种流量类型拖放</strong>到每个物理网络中。
-label.add.physical.network=添加物理网络
-label.traffic.types=流量类型
-label.management=管理
-label.guest=来宾
-label.please.specify.netscaler.info=请指定 Netscaler 信息
-message.public.traffic.in.advanced.zone=云中的 VM 访问 Internet 时将生成公共流量,但必须分配可公开访问的 IP 才能实现。最终用户可以使用 CloudStack UI 获取这些 IP,以在其来宾网络与公用网络之间执行 NAT。<br/><br/>请至少为 Internet 流量提供一个 IP 地址范围。
-message.public.traffic.in.basic.zone=云中的 VM 访问 Internet 或通过 Internet 向客户端提供服务时将生成公共流量,但必须分配可公开访问的 IP 才能实现。创建实例时,将把这一组公用 IP 中的 IP (来宾 IP 地址除外)分配给此实例。静态 1-1 NAT 将在公用 IP 与来宾 IP 之间自动设置。最终用户还可以使用 CloudStack UI 获取其他 IP,以在其实例与公用 IP 之间执行静态 NAT。
-message.add.pod.during.zone.creation=每个区域中必须包含一个或多个提供点,现在我们将添加第一个提供点。提供点中包含主机和主存储服务器,您将在随后的某个步骤中添加这些主机和服务器。首先,请为 CloudStack 的内部管理流量配置一个预留 IP 地址范围。预留的 IP 范围对云中的每个区域来说必须唯一。
-message.guest.traffic.in.advanced.zone=来宾网络流量是指最终用户虚拟机之间的通信。指定一个 VLAN ID 范围可传送每个物理网络的来宾流量。
-message.guest.traffic.in.basic.zone=来宾网络流量是指最终用户虚拟机之间的通信。应指定一个 CloudStack 可以分配给来宾 VM 的 IP 地址范围。请确保此范围与预留的系统 IP 范围不重叠。
-message.storage.traffic=CloudStack 内部资源(包括与管理服务器通信的任何组件,例如主机和 CloudStack 系统 VM)之间的流量。请在此处配置存储流量。
-message.desc.cluster=每个提供点中必须包含一个或多个群集,现在我们将添加第一个群集。群集提供了一种编组主机的方法。群集中的所有主机都具有相同的硬件,运行相同的虚拟机管理程序,位于相同的子网中,并访问相同的共享存储。每个群集由一个或多个主机以及一个或多个主存储服务器组成。
-message.desc.host=每个群集中必须至少包含一个主机以供来宾 VM 在上面运行,现在我们将添加第一个主机。要使主机在 CloudStack 中运行,必须在此主机上安装虚拟机管理程序软件,为其分配一个 IP 地址,并确保将其连接到 CloudStack 管理服务器。<br/><br/>请提供主机的 DNS 或 IP 地址、用户名(通常为 root)和密码,以及用于对主机进行分类的任何标签。
-message.desc.primary.storage=每个群集中必须包含一个或多个主存储服务器,现在我们将添加第一个主存储服务器。主存储中包含在群集中的主机上运行的所有 VM 的磁盘卷。请使用底层虚拟机管理程序支持的符合标准的协议。
-message.desc.secondary.storage=每个区域中必须至少包含一个 NFS 或辅助存储服务器,现在我们将添加第一个 NFS 或辅助存储服务器。辅助存储用于存储 VM 模板、ISO 映像和 VM 磁盘卷快照。此服务器必须对区域中的所有服务器可用。<br/><br/>请提供 IP 地址和导出路径。
-label.launch.zone=启动区域
-message.please.wait.while.zone.is.being.created=正在创建区域,请稍候;此操作可能需要一段时间才能完成...
-
-label.load.balancing=负载平衡
-label.static.nat.enabled=已启用静态 NAT
-label.zones=区域
-label.view.more=查看更多
-label.number.of.zones=区域数量
-label.number.of.pods=提供点数量
-label.number.of.clusters=群集数量
-label.number.of.hosts=主机数量
-label.total.hosts=总主机数
-label.total.CPU=CPU 总量
-label.total.memory=内存总量
-label.total.storage=存储总量
-label.purpose=目的
-
-
-
-
-label.action.migrate.router=迁移路由器
-label.action.migrate.router.processing=正在迁移路由器...
-message.migrate.router.confirm=请确认您要将路由器迁移到的主机:
-label.migrate.router.to=迁移路由器至
-
-label.action.migrate.systemvm=迁移系统 VM
-label.action.migrate.systemvm.processing=正在迁移系统 VM...
-message.migrate.systemvm.confirm=请确认您要将系统 VM 迁移到的主机:
-label.migrate.systemvm.to=迁移系统 VM 至
-
-
-mode=模式
-side.by.side=并行
-inline=内联
-
-extractable=可提取
-
-label.ocfs2=OCFS2
-
-label.action.edit.host=编辑主机
-
-network.rate=网络速率
-
-ICMP.type=ICMP 类型
-ICMP.code=ICMP 代码
-
-image.directory=图片目录
-
-label.action.create.template.from.vm=基于 VM 创建模板
-label.action.create.template.from.volume=基于卷创建模板
-
-message.vm.create.template.confirm=创建模板将自动重新启动 VM。
-
-label.action.manage.cluster=托管群集
-message.action.manage.cluster=请确认您确实要托管此群集。
-label.action.manage.cluster.processing=正在托管群集...
-
-label.action.unmanage.cluster=取消托管群集
-message.action.unmanage.cluster=请确认您确实要取消托管此群集。
-label.action.unmanage.cluster.processing=正在取消托管群集...
-
-label.allocation.state=分配状态
-managed.state=托管状态
-
-label.default.use=默认使用
-label.host.tags=主机标签
-
+# 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.
+
+changed.item.properties=\u66f4\u6539\u9879\u76ee\u5c5e\u6027
+confirm.enable.s3=\u8bf7\u586b\u5199\u4e0b\u5217\u4fe1\u606f\u4ee5\u542f\u7528\u652f\u6301S3\u7684\u4e8c\u7ea7\u5b58\u50a8
+confirm.enable.swift=\u8bf7\u586b\u5199\u4ee5\u4e0b\u4fe1\u606f\u4ee5\u542f\u7528\u5bf9 SWIFT \u7684\u652f\u6301
+error.could.not.enable.zone=\u65e0\u6cd5\u542f\u7528\u533a\u57df
+error.installWizard.message=\u51fa\u73b0\u95ee\u9898\uff1b\u8bf7\u8fd4\u56de\u5e76\u66f4\u6b63\u4efb\u4f55\u9519\u8bef
+error.invalid.username.password=\u7528\u6237\u540d\u6216\u5bc6\u7801\u65e0\u6548
+error.login=\u60a8\u7684\u7528\u6237\u540d/\u5bc6\u7801\u4e0e\u6211\u4eec\u7684\u8bb0\u5f55\u4e0d\u4e00\u81f4\u3002
+error.menu.select=\u6b63\u5728\u9009\u62e9\u9879\u76ee\uff0c\u65e0\u6cd5\u6267\u884c\u64cd\u4f5c\u3002
+error.mgmt.server.inaccessible=\u65e0\u6cd5\u8bbf\u95ee\u7ba1\u7406\u670d\u52a1\u5668\u3002\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002
+error.password.not.match=\u5bc6\u7801\u5b57\u6bb5\u4e0d\u4e00\u81f4
+error.please.specify.physical.network.tags=\u7f51\u7edc\u65b9\u6848\u5728\u60a8\u4e3a\u6b64\u7269\u7406\u7f51\u7edc\u6307\u5b9a\u6807\u7b7e\u4e4b\u540e\u624d\u53ef\u7528\u3002
+error.session.expired=\u60a8\u7684\u4f1a\u8bdd\u5df2\u8fc7\u671f\u3002
+error.something.went.wrong.please.correct.the.following=\u51fa\u73b0\u95ee\u9898\uff1b\u8bf7\u66f4\u6b63\u4ee5\u4e0b\u5404\u9879
+error.unable.to.reach.management.server=\u65e0\u6cd5\u8bbf\u95ee\u7ba1\u7406\u670d\u52a1\u5668
+error.unresolved.internet.name=\u65e0\u6cd5\u89e3\u6790\u60a8\u7684 Internet \u540d\u79f0\u3002
+extractable=\u53ef\u63d0\u53d6
+force.delete.domain.warning=\u8b66\u544a\: \u9009\u62e9\u6b64\u9009\u9879\u5c06\u5bfc\u81f4\u5220\u9664\u6240\u6709\u5b50\u57df\u4ee5\u53ca\u6240\u6709\u76f8\u5173\u8054\u7684\u5e10\u6237\u53ca\u5176\u8d44\u6e90\u3002
+force.delete=\u5f3a\u5236\u5220\u9664
+force.remove.host.warning=\u8b66\u544a\: \u9009\u62e9\u6b64\u9009\u9879\u5c06\u5bfc\u81f4 CloudStack \u5728\u4ece\u7fa4\u96c6\u4e2d\u79fb\u9664\u6b64\u4e3b\u673a\u4e4b\u524d\uff0c\u5f3a\u5236\u505c\u6b62\u6240\u6709\u6b63\u5728\u8fd0\u884c\u7684\u865a\u62df\u673a\u3002
+force.remove=\u5f3a\u5236\u79fb\u9664
+force.stop.instance.warning=\u8b66\u544a\: \u9664\u975e\u4e07\u4e0d\u5f97\u5df2\uff0c\u5426\u5219\u4e0d\u5e94\u5f3a\u5236\u505c\u6b62\u6b64\u5b9e\u4f8b\u3002\u505c\u6b62\u6b64\u5b9e\u4f8b\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u4ee5\u53ca\u81f4\u4f7f\u865a\u62df\u673a\u72b6\u6001\u4e0d\u4e00\u81f4\u3002
+force.stop=\u5f3a\u5236\u505c\u6b62
+ICMP.code=ICMP \u4ee3\u7801
+ICMP.type=ICMP \u7c7b\u578b
+image.directory=\u56fe\u7247\u76ee\u5f55
+inline=\u5185\u8054
+instances.actions.reboot.label=\u91cd\u65b0\u542f\u52a8\u5b9e\u4f8b
+label.accept.project.invitation=\u63a5\u53d7\u9879\u76ee\u9080\u8bf7
+label.account.and.security.group=\u5e10\u6237\u3001\u5b89\u5168\u7ec4
+label.account.id=\u5e10\u6237 ID
+label.account.name=\u5e10\u6237\u540d\u79f0
+label.account.specific=\u5e10\u6237\u4e13\u7528
+label.accounts=\u5e10\u53f7
+label.account=\u5e10\u6237
+label.acquire.new.ip=\u83b7\u53d6\u65b0 IP
+label.action.attach.disk.processing=\u6b63\u5728\u9644\u52a0\u78c1\u76d8...
+label.action.attach.disk=\u9644\u52a0\u78c1\u76d8
+label.action.attach.iso.processing=\u6b63\u5728\u9644\u52a0 ISO...
+label.action.attach.iso=\u9644\u52a0 ISO
+label.action.cancel.maintenance.mode.processing=\u6b63\u5728\u53d6\u6d88\u7ef4\u62a4\u6a21\u5f0f...
+label.action.cancel.maintenance.mode=\u53d6\u6d88\u7ef4\u62a4\u6a21\u5f0f
+label.action.change.password=\u66f4\u6539\u5bc6\u7801
+label.action.change.service.processing=\u6b63\u5728\u66f4\u6539\u670d\u52a1...
+label.action.change.service=\u66f4\u6539\u670d\u52a1
+label.action.copy.ISO.processing=\u6b63\u5728\u590d\u5236 ISO...
+label.action.copy.ISO=\u590d\u5236 ISO
+label.action.copy.template.processing=\u6b63\u5728\u590d\u5236\u6a21\u677f...
+label.action.copy.template=\u590d\u5236\u6a21\u677f
+label.action.create.template.from.vm=\u57fa\u4e8e VM \u521b\u5efa\u6a21\u677f
+label.action.create.template.from.volume=\u57fa\u4e8e\u5377\u521b\u5efa\u6a21\u677f
+label.action.create.template.processing=\u6b63\u5728\u521b\u5efa\u6a21\u677f...
+label.action.create.template=\u521b\u5efa\u6a21\u677f
+label.action.create.vm.processing=\u6b63\u5728\u521b\u5efa VM...
+label.action.create.vm=\u521b\u5efa VM
+label.action.create.volume.processing=\u6b63\u5728\u521b\u5efa\u5377...
+label.action.create.volume=\u521b\u5efa\u5377
+label.action.delete.account.processing=\u6b63\u5728\u5220\u9664\u5e10\u6237...
+label.action.delete.account=\u5220\u9664\u5e10\u6237
+label.action.delete.cluster.processing=\u6b63\u5728\u5220\u9664\u7fa4\u96c6...
+label.action.delete.cluster=\u5220\u9664\u7fa4\u96c6
+label.action.delete.disk.offering.processing=\u6b63\u5728\u5220\u9664\u78c1\u76d8\u65b9\u6848...
+label.action.delete.disk.offering=\u5220\u9664\u78c1\u76d8\u65b9\u6848
+label.action.delete.domain.processing=\u6b63\u5728\u5220\u9664\u57df...
+label.action.delete.domain=\u5220\u9664\u57df
+label.action.delete.firewall.processing=\u6b63\u5728\u5220\u9664\u9632\u706b\u5899...
+label.action.delete.firewall=\u5220\u9664\u9632\u706b\u5899\u89c4\u5219
+label.action.delete.ingress.rule.processing=\u6b63\u5728\u5220\u9664\u5165\u53e3\u89c4\u5219...
+label.action.delete.ingress.rule=\u5220\u9664\u5165\u53e3\u89c4\u5219
+label.action.delete.IP.range.processing=\u6b63\u5728\u5220\u9664 IP \u8303\u56f4...
+label.action.delete.IP.range=\u5220\u9664 IP \u8303\u56f4
+label.action.delete.ISO.processing=\u6b63\u5728\u5220\u9664 ISO...
+label.action.delete.ISO=\u5220\u9664 ISO
+label.action.delete.load.balancer.processing=\u6b63\u5728\u5220\u9664\u8d1f\u8f7d\u5e73\u8861\u5668...
+label.action.delete.load.balancer=\u5220\u9664\u8d1f\u8f7d\u5e73\u8861\u5668\u89c4\u5219
+label.action.delete.network.processing=\u6b63\u5728\u5220\u9664\u7f51\u7edc...
+label.action.delete.network=\u5220\u9664\u7f51\u7edc
+label.action.delete.nexusVswitch=\u5220\u9664 Nexus 1000v
+label.action.delete.physical.network=\u5220\u9664\u7269\u7406\u7f51\u7edc
+label.action.delete.pod.processing=\u6b63\u5728\u5220\u9664\u63d0\u4f9b\u70b9...
+label.action.delete.pod=\u5220\u9664\u63d0\u4f9b\u70b9
+label.action.delete.primary.storage.processing=\u6b63\u5728\u5220\u9664\u4e3b\u5b58\u50a8...
+label.action.delete.primary.storage=\u5220\u9664\u4e3b\u5b58\u50a8
+label.action.delete.secondary.storage.processing=\u6b63\u5728\u5220\u9664\u8f85\u52a9\u5b58\u50a8...
+label.action.delete.secondary.storage=\u5220\u9664\u8f85\u52a9\u5b58\u50a8
+label.action.delete.security.group.processing=\u6b63\u5728\u5220\u9664\u5b89\u5168\u7ec4...
+label.action.delete.security.group=\u5220\u9664\u5b89\u5168\u7ec4
+label.action.delete.service.offering.processing=\u6b63\u5728\u5220\u9664\u670d\u52a1\u65b9\u6848...
+label.action.delete.service.offering=\u5220\u9664\u670d\u52a1\u65b9\u6848
+label.action.delete.snapshot.processing=\u6b63\u5728\u5220\u9664\u5feb\u7167...
+label.action.delete.snapshot=\u5220\u9664\u5feb\u7167
+label.action.delete.system.service.offering=\u5220\u9664\u7cfb\u7edf\u670d\u52a1\u65b9\u6848
+label.action.delete.template.processing=\u6b63\u5728\u5220\u9664\u6a21\u677f...
+label.action.delete.template=\u5220\u9664\u6a21\u677f
+label.action.delete.user.processing=\u6b63\u5728\u5220\u9664\u7528\u6237...
+label.action.delete.user=\u5220\u9664\u7528\u6237
+label.action.delete.volume.processing=\u6b63\u5728\u5220\u9664\u5377...
+label.action.delete.volume=\u5220\u9664\u5377
+label.action.delete.zone.processing=\u6b63\u5728\u5220\u9664\u533a\u57df...
+label.action.delete.zone=\u5220\u9664\u533a\u57df
+label.action.destroy.instance.processing=\u6b63\u5728\u9500\u6bc1\u5b9e\u4f8b...
+label.action.destroy.instance=\u9500\u6bc1\u5b9e\u4f8b
+label.action.destroy.systemvm.processing=\u6b63\u5728\u9500\u6bc1\u7cfb\u7edf VM...
+label.action.destroy.systemvm=\u9500\u6bc1\u7cfb\u7edf VM
+label.action.detach.disk.processing=\u6b63\u5728\u53d6\u6d88\u9644\u52a0\u78c1\u76d8...
+label.action.detach.disk=\u53d6\u6d88\u9644\u52a0\u78c1\u76d8
+label.action.detach.iso.processing=\u6b63\u5728\u53d6\u6d88\u9644\u52a0 ISO...
+label.action.detach.iso=\u53d6\u6d88\u9644\u52a0 ISO
+label.action.disable.account.processing=\u6b63\u5728\u7981\u7528\u5e10\u6237...
+label.action.disable.account=\u7981\u7528\u5e10\u6237
+label.action.disable.cluster.processing=\u6b63\u5728\u7981\u7528\u7fa4\u96c6...
+label.action.disable.cluster=\u7981\u7528\u7fa4\u96c6
+label.action.disable.nexusVswitch=\u7981\u7528 Nexus 1000v
+label.action.disable.physical.network=\u7981\u7528\u7269\u7406\u7f51\u7edc
+label.action.disable.pod.processing=\u6b63\u5728\u7981\u7528\u63d0\u4f9b\u70b9...
+label.action.disable.pod=\u7981\u7528\u63d0\u4f9b\u70b9
+label.action.disable.static.NAT.processing=\u6b63\u5728\u7981\u7528\u9759\u6001 NAT...
+label.action.disable.static.NAT=\u7981\u7528\u9759\u6001 NAT
+label.action.disable.user.processing=\u6b63\u5728\u7981\u7528\u7528\u6237...
+label.action.disable.user=\u7981\u7528\u7528\u6237
+label.action.disable.zone.processing=\u6b63\u5728\u7981\u7528\u533a\u57df...
+label.action.disable.zone=\u7981\u7528\u533a\u57df
+label.action.download.ISO=\u4e0b\u8f7d ISO
+label.action.download.template=\u4e0b\u8f7d\u6a21\u677f
+label.action.download.volume.processing=\u6b63\u5728\u4e0b\u8f7d\u5377...
+label.action.download.volume=\u4e0b\u8f7d\u5377
+label.action.edit.account=\u7f16\u8f91\u5e10\u6237
+label.action.edit.disk.offering=\u7f16\u8f91\u78c1\u76d8\u65b9\u6848
+label.action.edit.domain=\u7f16\u8f91\u57df
+label.action.edit.global.setting=\u7f16\u8f91\u5168\u5c40\u8bbe\u7f6e
+label.action.edit.host=\u7f16\u8f91\u4e3b\u673a
+label.action.edit.instance=\u7f16\u8f91\u5b9e\u4f8b
+label.action.edit.ISO=\u7f16\u8f91 ISO
+label.action.edit.network.offering=\u7f16\u8f91\u7f51\u7edc\u65b9\u6848
+label.action.edit.network.processing=\u6b63\u5728\u7f16\u8f91\u7f51\u7edc...
+label.action.edit.network=\u7f16\u8f91\u7f51\u7edc
+label.action.edit.pod=\u7f16\u8f91\u63d0\u4f9b\u70b9
+label.action.edit.primary.storage=\u7f16\u8f91\u4e3b\u5b58\u50a8
+label.action.edit.resource.limits=\u7f16\u8f91\u8d44\u6e90\u9650\u5236
+label.action.edit.service.offering=\u7f16\u8f91\u670d\u52a1\u65b9\u6848
+label.action.edit.template=\u7f16\u8f91\u6a21\u677f
+label.action.edit.user=\u7f16\u8f91\u7528\u6237
+label.action.edit.zone=\u7f16\u8f91\u533a\u57df
+label.action.enable.account.processing=\u6b63\u5728\u542f\u7528\u5e10\u6237...
+label.action.enable.account=\u542f\u7528\u5e10\u6237
+label.action.enable.cluster.processing=\u6b63\u5728\u542f\u7528\u7fa4\u96c6...
+label.action.enable.cluster=\u542f\u7528\u7fa4\u96c6
+label.action.enable.maintenance.mode.processing=\u6b63\u5728\u542f\u7528\u7ef4\u62a4\u6a21\u5f0f...
+label.action.enable.maintenance.mode=\u542f\u7528\u7ef4\u62a4\u6a21\u5f0f
+label.action.enable.nexusVswitch=\u542f\u7528 Nexus 1000v
+label.action.enable.physical.network=\u542f\u7528\u7269\u7406\u7f51\u7edc
+label.action.enable.pod.processing=\u6b63\u5728\u542f\u7528\u63d0\u4f9b\u70b9...
+label.action.enable.pod=\u542f\u7528\u63d0\u4f9b\u70b9
+label.action.enable.static.NAT.processing=\u6b63\u5728\u542f\u7528\u9759\u6001 NAT...
+label.action.enable.static.NAT=\u542f\u7528\u9759\u6001 NAT
+label.action.enable.user.processing=\u6b63\u5728\u542f\u7528\u7528\u6237...
+label.action.enable.user=\u542f\u7528\u7528\u6237
+label.action.enable.zone.processing=\u6b63\u5728\u542f\u7528\u533a\u57df...
+label.action.enable.zone=\u542f\u7528\u533a\u57df
+label.action.force.reconnect.processing=\u6b63\u5728\u91cd\u65b0\u8fde\u63a5...
+label.action.force.reconnect=\u5f3a\u5236\u91cd\u65b0\u8fde\u63a5
+label.action.generate.keys.processing=\u6b63\u5728\u751f\u6210\u5bc6\u94a5...
+label.action.generate.keys=\u751f\u6210\u5bc6\u94a5
+label.action.list.nexusVswitch=\u5217\u51fa Nexus 1000v
+label.action.lock.account.processing=\u6b63\u5728\u9501\u5b9a\u5e10\u6237...
+label.action.lock.account=\u9501\u5b9a\u5e10\u6237
+label.action.manage.cluster.processing=\u6b63\u5728\u6258\u7ba1\u7fa4\u96c6...
+label.action.manage.cluster=\u6258\u7ba1\u7fa4\u96c6
+label.action.migrate.instance.processing=\u6b63\u5728\u8fc1\u79fb\u5b9e\u4f8b...
+label.action.migrate.instance=\u8fc1\u79fb\u5b9e\u4f8b
+label.action.migrate.router.processing=\u6b63\u5728\u8fc1\u79fb\u8def\u7531\u5668...
+label.action.migrate.router=\u8fc1\u79fb\u8def\u7531\u5668
+label.action.migrate.systemvm.processing=\u6b63\u5728\u8fc1\u79fb\u7cfb\u7edf VM...
+label.action.migrate.systemvm=\u8fc1\u79fb\u7cfb\u7edf VM
+label.action.reboot.instance.processing=\u6b63\u5728\u91cd\u65b0\u542f\u52a8\u5b9e\u4f8b...
+label.action.reboot.instance=\u91cd\u65b0\u542f\u52a8\u5b9e\u4f8b
+label.action.reboot.router.processing=\u6b63\u5728\u91cd\u65b0\u542f\u52a8\u8def\u7531\u5668...
+label.action.reboot.router=\u91cd\u65b0\u542f\u52a8\u8def\u7531\u5668
+label.action.reboot.systemvm.processing=\u6b63\u5728\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf VM...
+label.action.reboot.systemvm=\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf VM
+label.action.recurring.snapshot=\u91cd\u73b0\u5feb\u7167
+label.action.register.iso=\u6ce8\u518c ISO
+label.action.register.template=\u6ce8\u518c\u6a21\u677f
+label.action.release.ip.processing=\u6b63\u5728\u91ca\u653e IP...
+label.action.release.ip=\u91ca\u653e IP
+label.action.remove.host.processing=\u6b63\u5728\u5220\u9664\u4e3b\u673a...
+label.action.remove.host=\u5220\u9664\u4e3b\u673a
+label.action.reset.password.processing=\u6b63\u5728\u91cd\u7f6e\u5bc6\u7801...
+label.action.reset.password=\u91cd\u7f6e\u5bc6\u7801
+label.action.resize.volume.processing=Resizing Volume....
+label.action.resize.volume=Resize Volume
+label.action.resource.limits=\u8d44\u6e90\u9650\u5236
+label.action.restore.instance.processing=\u6b63\u5728\u8fd8\u539f\u5b9e\u4f8b...
+label.action.restore.instance=\u8fd8\u539f\u5b9e\u4f8b
+label.action.start.instance.processing=\u6b63\u5728\u542f\u52a8\u5b9e\u4f8b...
+label.action.start.instance=\u542f\u52a8\u5b9e\u4f8b
+label.action.start.router.processing=\u6b63\u5728\u542f\u52a8\u8def\u7531\u5668...
+label.action.start.router=\u542f\u52a8\u8def\u7531\u5668
+label.action.start.systemvm.processing=\u6b63\u5728\u542f\u52a8\u7cfb\u7edf VM...
+label.action.start.systemvm=\u542f\u52a8\u7cfb\u7edf VM
+label.action.stop.instance.processing=\u6b63\u5728\u505c\u6b62\u5b9e\u4f8b...
+label.action.stop.instance=\u505c\u6b62\u5b9e\u4f8b
+label.action.stop.router.processing=\u6b63\u5728\u505c\u6b62\u8def\u7531\u5668...
+label.action.stop.router=\u505c\u6b62\u8def\u7531\u5668
+label.action.stop.systemvm.processing=\u6b63\u5728\u505c\u6b62\u7cfb\u7edf VM...
+label.action.stop.systemvm=\u505c\u6b62\u7cfb\u7edf VM
+label.actions=\u64cd\u4f5c
+label.action.take.snapshot.processing=\u6b63\u5728\u521b\u5efa\u5feb\u7167...
+label.action.take.snapshot=\u521b\u5efa\u5feb\u7167
+label.action.unmanage.cluster.processing=\u6b63\u5728\u53d6\u6d88\u6258\u7ba1\u7fa4\u96c6...
+label.action.unmanage.cluster=\u53d6\u6d88\u6258\u7ba1\u7fa4\u96c6
+label.action.update.OS.preference.processing=\u6b63\u5728\u66f4\u65b0\u64cd\u4f5c\u7cfb\u7edf\u9996\u9009\u9879...
+label.action.update.OS.preference=\u66f4\u65b0\u64cd\u4f5c\u7cfb\u7edf\u9996\u9009\u9879
+label.action.update.resource.count.processing=\u6b63\u5728\u66f4\u65b0\u8d44\u6e90\u6570\u91cf...
+label.action.update.resource.count=\u66f4\u65b0\u8d44\u6e90\u6570\u91cf
+label.activate.project=\u6fc0\u6d3b\u9879\u76ee
+label.active.sessions=\u6d3b\u52a8\u4f1a\u8bdd
+label.add.accounts.to=\u6dfb\u52a0\u5e10\u6237\u81f3
+label.add.accounts=\u6dfb\u52a0\u5e10\u6237
+label.add.account.to.project=\u5411\u9879\u76ee\u4e2d\u6dfb\u52a0\u5e10\u6237
+label.add.account=\u6dfb\u52a0\u5e10\u6237
+label.add.ACL=\u6dfb\u52a0 ACL
+label.add.by.cidr=\u6309 CIDR \u6dfb\u52a0
+label.add.by.group=\u6309\u7ec4\u6dfb\u52a0
+label.add.by=\u6dfb\u52a0\u65b9\u5f0f
+label.add.cluster=\u6dfb\u52a0\u7fa4\u96c6
+label.add.compute.offering=\u6dfb\u52a0\u8ba1\u7b97\u65b9\u6848
+label.add.direct.iprange=\u6dfb\u52a0\u76f4\u63a5 IP \u8303\u56f4
+label.add.disk.offering=\u6dfb\u52a0\u78c1\u76d8\u65b9\u6848
+label.add.domain=\u6dfb\u52a0\u57df
+label.add.egress.rule=\u6dfb\u52a0\u51fa\u53e3\u89c4\u5219
+label.add.F5.device=\u6dfb\u52a0 F5 \u8bbe\u5907
+label.add.firewall=\u6dfb\u52a0\u9632\u706b\u5899\u89c4\u5219
+label.add.guest.network=\u6dfb\u52a0\u6765\u5bbe\u7f51\u7edc
+label.add.host=\u6dfb\u52a0\u4e3b\u673a
+label.adding.cluster=\u6b63\u5728\u6dfb\u52a0\u7fa4\u96c6
+label.adding.failed=\u6dfb\u52a0\u5931\u8d25
+label.adding.pod=\u6b63\u5728\u6dfb\u52a0\u63d0\u4f9b\u70b9
+label.adding.processing=\u6b63\u5728\u6dfb\u52a0...
+label.add.ingress.rule=\u6dfb\u52a0\u5165\u53e3\u89c4\u5219
+label.adding.succeeded=\u5df2\u6210\u529f\u6dfb\u52a0
+label.adding=\u6b63\u5728\u6dfb\u52a0
+label.adding.user=\u6b63\u5728\u6dfb\u52a0\u7528\u6237
+label.adding.zone=\u6b63\u5728\u6dfb\u52a0\u533a\u57df
+label.add.ip.range=\u6dfb\u52a0 IP \u8303\u56f4
+label.additional.networks=\u5176\u4ed6\u7f51\u7edc
+label.add.load.balancer=\u6dfb\u52a0\u8d1f\u8f7d\u5e73\u8861\u5668
+label.add.more=\u6dfb\u52a0\u66f4\u591a
+label.add.netScaler.device=\u6dfb\u52a0 Netscaler \u8bbe\u5907
+label.add.network.ACL=\u6dfb\u52a0\u7f51\u7edc ACL
+label.add.network.device=\u6dfb\u52a0\u7f51\u7edc\u8bbe\u5907
+label.add.network.offering=\u6dfb\u52a0\u7f51\u7edc\u65b9\u6848
+label.add.network=\u6dfb\u52a0\u7f51\u7edc
+label.add.new.F5=\u6dfb\u52a0\u65b0 F5
+label.add.new.gateway=\u6dfb\u52a0\u65b0\u7f51\u5173
+label.add.new.NetScaler=\u6dfb\u52a0\u65b0 NetScaler
+label.add.new.SRX=\u6dfb\u52a0\u65b0 SRX
+label.add.new.tier=\u6dfb\u52a0\u65b0\u5c42
+label.add.NiciraNvp.device=\u6dfb\u52a0Nvp\u63a7\u5236\u5668
+label.add.physical.network=\u6dfb\u52a0\u7269\u7406\u7f51\u7edc
+label.add.pod=\u6dfb\u52a0\u63d0\u4f9b\u70b9
+label.add.port.forwarding.rule=\u6dfb\u52a0\u7aef\u53e3\u8f6c\u53d1\u89c4\u5219
+label.add.primary.storage=\u6dfb\u52a0\u4e3b\u5b58\u50a8
+label.add.resources=\u6dfb\u52a0\u8d44\u6e90
+label.add.route=\u6dfb\u52a0\u8def\u7531
+label.add.rule=\u6dfb\u52a0\u89c4\u5219
+label.add.secondary.storage=\u6dfb\u52a0\u8f85\u52a9\u5b58\u50a8
+label.add.security.group=\u6dfb\u52a0\u5b89\u5168\u7ec4
+label.add.service.offering=\u6dfb\u52a0\u670d\u52a1\u65b9\u6848
+label.add.SRX.device=\u6dfb\u52a0 SRX \u8bbe\u5907
+label.add.static.nat.rule=\u6dfb\u52a0\u9759\u6001 NAT \u89c4\u5219
+label.add.static.route=\u6dfb\u52a0\u9759\u6001\u8def\u7531
+label.add.system.service.offering=\u6dfb\u52a0\u7cfb\u7edf\u670d\u52a1\u65b9\u6848
+label.add.template=\u6dfb\u52a0\u6a21\u677f
+label.add.to.group=\u6dfb\u52a0\u5230\u7ec4
+label.add=\u6dfb\u52a0
+label.add.user=\u6dfb\u52a0\u7528\u6237
+label.add.vlan=\u6dfb\u52a0 VLAN
+label.add.vms.to.lb=\u5411\u8d1f\u8f7d\u5e73\u8861\u5668\u89c4\u5219\u4e2d\u6dfb\u52a0 VM
+label.add.vms=\u6dfb\u52a0 VM
+label.add.VM.to.tier=\u5411\u5c42\u4e2d\u6dfb\u52a0 VM
+label.add.vm=\u6dfb\u52a0 VM
+label.add.volume=\u6dfb\u52a0\u5377
+label.add.vpc=\u6dfb\u52a0 VPC
+label.add.vpn.customer.gateway=\u6dfb\u52a0 VPN \u5ba2\u6237\u7f51\u5173
+label.add.VPN.gateway=\u6dfb\u52a0 VPN \u7f51\u5173
+label.add.vpn.user=\u6dfb\u52a0 VPN \u7528\u6237
+label.add.zone=\u6dfb\u52a0\u533a\u57df
+label.admin.accounts=\u7ba1\u7406\u5458\u5e10\u6237
+label.admin=\u7ba1\u7406\u5458
+label.advanced.mode=\u9ad8\u7ea7\u6a21\u5f0f
+label.advanced.search=\u9ad8\u7ea7\u641c\u7d22
+label.advanced=\u9ad8\u7ea7
+label.agent.password=\u4ee3\u7406\u5bc6\u7801
+label.agent.username=\u4ee3\u7406\u7528\u6237\u540d
+label.agree=\u540c\u610f
+label.alert=\u8b66\u62a5
+label.algorithm=\u7b97\u6cd5
+label.allocated=\u5df2\u5206\u914d
+label.allocation.state=\u5206\u914d\u72b6\u6001
+label.api.key=API \u5bc6\u94a5
+label.apply=\u5e94\u7528
+label.assign.to.load.balancer=\u6b63\u5728\u5c06\u5b9e\u4f8b\u5206\u914d\u7ed9\u8d1f\u8f7d\u5e73\u8861\u5668
+label.assign=\u5206\u914d
+label.associated.network.id=\u5df2\u5173\u8054\u7f51\u7edc ID
+label.associated.network=\u5173\u8054\u7f51\u7edc
+label.attached.iso=\u5df2\u9644\u52a0 ISO
+label.availability=\u53ef\u7528\u6027
+label.availability.zone=\u53ef\u7528\u533a\u57df
+label.available.public.ips=\u53ef\u7528\u516c\u7528 IP \u5730\u5740
+label.available=\u53ef\u7528
+label.back=\u8fd4\u56de
+label.bandwidth=\u5e26\u5bbd
+label.basic.mode=\u57fa\u672c\u6a21\u5f0f
+label.basic=\u57fa\u672c
+label.bootable=\u53ef\u542f\u52a8
+label.broadcast.domain.range=\u5e7f\u64ad\u57df\u8303\u56f4
+label.broadcast.domain.type=\u5e7f\u64ad\u57df\u7c7b\u578b
+label.broadcast.uri=\u5e7f\u64adURI
+label.by.account=\u6309\u5e10\u6237
+label.by.availability=\u6309\u53ef\u7528\u6027
+label.by.domain=\u6309\u57df
+label.by.end.date=\u6309\u7ed3\u675f\u65e5\u671f
+label.by.level=\u6309\u7ea7\u522b
+label.by.pod=\u6309\u63d0\u4f9b\u70b9
+label.by.role=\u6309\u89d2\u8272
+label.by.start.date=\u6309\u5f00\u59cb\u65e5\u671f
+label.by.state=\u6309\u72b6\u6001
+label.bytes.received=\u63a5\u6536\u7684\u5b57\u8282\u6570
+label.bytes.sent=\u53d1\u9001\u7684\u5b57\u8282\u6570
+label.by.traffic.type=\u6309\u6d41\u91cf\u7c7b\u578b
+label.by.type.id=\u6309\u7c7b\u578b ID
+label.by.type=\u6309\u7c7b\u578b
+label.by.zone=\u6309\u533a\u57df
+label.cancel=\u53d6\u6d88
+label.capacity=\u5bb9\u91cf
+label.certificate=\u8bc1\u4e66
+label.change.service.offering=\u66f4\u6539\u670d\u52a1\u65b9\u6848
+label.change.value=\u66f4\u6539\u503c
+label.character=\u5b57\u7b26
+label.checksum=MD5 \u6821\u9a8c\u548c
+label.cidr.account=CIDR \u6216\u5e10\u6237/\u5b89\u5168\u7ec4
 label.cidr=CIDR
-label.cidr.list=源 CIDR
-
-label.storage.tags=存储标签
-
-label.redundant.router=冗余路由器
-label.is.redundant.router=冗余
-
-force.delete=强制删除
-force.delete.domain.warning=警告: 选择此选项将导致删除所有子域以及所有相关联的帐户及其资源。
-
-force.remove=强制移除
-force.remove.host.warning=警告: 选择此选项将导致 CloudStack 在从群集中移除此主机之前,强制停止所有正在运行的虚拟机。
-
-force.stop=强制停止
-force.stop.instance.warning=警告: 除非万不得已,否则不应强制停止此实例。停止此实例可能会导致数据丢失以及致使虚拟机状态不一致。
-
-label.PreSetup=PreSetup
-label.SR.name = SR 名称标签
-label.SharedMountPoint=SharedMountPoint
+label.CIDR.list=CIDR \u5217\u8868
+label.cidr.list=\u6e90 CIDR
+label.CIDR.of.destination.network=\u76ee\u7684\u5730\u7f51\u7edc\u7684 CIDR
+label.clean.up=\u6e05\u9664
+label.clear.list=\u6e05\u9664\u5217\u8868
+label.close=\u5173\u95ed
+label.cloud.console=\u4e91\u7ba1\u7406\u63a7\u5236\u53f0
+label.cloud.managed=\u7531 Cloud.com \u7ba1\u7406
+label.cluster.name=\u7fa4\u96c6\u540d\u79f0
+label.clusters=\u7fa4\u96c6
+label.cluster.type=\u7fa4\u96c6\u7c7b\u578b
+label.cluster=\u7fa4\u96c6
 label.clvm=CLVM
-label.volgroup=卷组
-label.VMFS.datastore=VMFS 数据存储
-
-label.network.device=网络设备
-label.add.network.device=添加网络设备
-label.network.device.type=网络设备类型
-label.DHCP.server.type=DHCP 服务器类型
-label.Pxe.server.type=Pxe 服务器类型
-label.PING.storage.IP=PING 存储 IP
-label.PING.dir=PING 目录
-label.TFTP.dir=TFTP 目录
-label.PING.CIFS.username=PING CIFS 用户名
-label.PING.CIFS.password=PING CIFS 密码
-label.CPU.cap=CPU 上限
-
-
-label.action.enable.zone=启用区域
-label.action.enable.zone.processing=正在启用区域...
-message.action.enable.zone=请确认您确实要启用此区域。
-label.action.disable.zone=禁用区域
-label.action.disable.zone.processing=正在禁用区域...
-message.action.disable.zone=请确认您确实要禁用此区域。
-
-label.action.enable.pod=启用提供点
-label.action.enable.pod.processing=正在启用提供点...
-message.action.enable.pod=请确认您确实要启用此提供点。
-label.action.disable.pod=禁用提供点
-label.action.disable.pod.processing=正在禁用提供点...
-message.action.disable.pod=请确认您确实要禁用此提供点。
-
-label.action.enable.cluster=启用群集
-label.action.enable.cluster.processing=正在启用群集...
-message.action.enable.cluster=请确认您确实要启用此群集。
-label.action.disable.cluster=禁用群集
-label.action.disable.cluster.processing=正在禁用群集...
-message.action.disable.cluster=请确认您确实要禁用此群集。
-
-label.account.id=帐户 ID
-label.account.name=帐户名称
-label.account.specific=帐户专用
-label.account=帐户
-label.accounts=帐户
-label.acquire.new.ip=获取新 IP
-label.show.ingress.rule=显示入口规则
-label.hide.ingress.rule=隐藏入口规则
-label.action.attach.disk.processing=正在附加磁盘...
-label.action.attach.disk=附加磁盘
-label.action.attach.iso.processing=正在附加 ISO...
-label.action.attach.iso=附加 ISO
-label.action.cancel.maintenance.mode.processing=正在取消维护模式...
-label.action.cancel.maintenance.mode=取消维护模式
-label.action.change.password=更改密码
-label.action.change.service.processing=正在更改服务...
-label.action.change.service=更改服务
-label.action.copy.ISO.processing=正在复制 ISO...
-label.action.copy.ISO=复制 ISO
-label.action.copy.template.processing=正在复制模板...
-label.action.copy.template=复制模板
-label.action.create.template.processing=正在创建模板...
-label.action.create.template=创建模板
-label.action.create.vm.processing=正在创建 VM...
-label.action.create.vm=创建 VM
-label.action.create.volume.processing=正在创建卷...
-label.action.create.volume=创建卷
-label.action.delete.IP.range.processing=正在删除 IP 范围...
-label.action.delete.IP.range=删除 IP 范围
-label.action.delete.ISO.processing=正在删除 ISO...
-label.action.delete.ISO=删除 ISO
-label.action.delete.account.processing=正在删除帐户...
-label.action.delete.account=删除帐户
-label.action.delete.cluster.processing=正在删除群集...
-label.action.delete.cluster=删除群集
-label.action.delete.disk.offering.processing=正在删除磁盘方案...
-label.action.delete.disk.offering=删除磁盘方案
-
-label.action.update.resource.count=更新资源数量
-label.action.update.resource.count.processing=正在更新资源数量...
-
-label.action.delete.domain=删除域
-label.action.delete.domain.processing=正在删除域...
-
-label.action.delete.firewall.processing=正在删除防火墙...
-label.action.delete.firewall=删除防火墙规则
-label.action.delete.ingress.rule.processing=正在删除入口规则...
-label.action.delete.ingress.rule=删除入口规则
-label.action.delete.load.balancer.processing=正在删除负载平衡器...
-label.action.delete.load.balancer=删除负载平衡器规则
-label.action.edit.network.processing=正在编辑网络...
-label.action.edit.network=编辑网络
-label.action.delete.network.processing=正在删除网络...
-label.action.delete.network=删除网络
-label.action.delete.pod.processing=正在删除提供点...
-label.action.delete.pod=删除提供点
-label.action.delete.primary.storage.processing=正在删除主存储...
-label.action.delete.primary.storage=删除主存储
-label.action.delete.secondary.storage.processing=正在删除辅助存储...
-label.action.delete.secondary.storage=删除辅助存储
-label.action.delete.security.group.processing=正在删除安全组...
-label.action.delete.security.group=删除安全组
-label.action.delete.service.offering.processing=正在删除服务方案...
-label.action.delete.service.offering=删除服务方案
-label.action.delete.snapshot.processing=正在删除快照...
-label.action.delete.snapshot=删除快照
-label.action.delete.template.processing=正在删除模板...
-label.action.delete.template=删除模板
-label.action.delete.user.processing=正在删除用户...
-label.action.delete.user=删除用户
-label.action.delete.volume.processing=正在删除卷...
-label.action.delete.volume=删除卷
-label.action.delete.zone.processing=正在删除区域...
-label.action.delete.zone=删除区域
-label.action.destroy.instance.processing=正在销毁实例...
-label.action.destroy.instance=销毁实例
-label.action.destroy.systemvm.processing=正在销毁系统 VM...
-label.action.destroy.systemvm=销毁系统 VM
-label.action.detach.disk.processing=正在取消附加磁盘...
-label.action.detach.disk=取消附加磁盘
-label.action.detach.iso.processing=正在取消附加 ISO...
-label.action.detach.iso=取消附加 ISO
-label.action.disable.account.processing=正在禁用帐户...
-label.action.disable.account=禁用帐户
-label.action.disable.static.NAT.processing=正在禁用静态 NAT...
-label.action.disable.static.NAT=禁用静态 NAT
-label.action.disable.user.processing=正在禁用用户...
-label.action.disable.user=禁用用户
-label.action.download.ISO=下载 ISO
-label.action.download.template=下载模板
-label.action.download.volume.processing=正在下载卷...
-label.action.download.volume=下载卷
-label.action.edit.ISO=编辑 ISO
-label.action.edit.account=编辑帐户
-label.action.edit.disk.offering=编辑磁盘方案
-label.action.edit.domain=编辑域
-label.action.edit.global.setting=编辑全局设置
-label.action.edit.instance=编辑实例
-label.action.edit.network.offering=编辑网络方案
-label.action.edit.pod=编辑提供点
-label.action.edit.primary.storage=编辑主存储
-label.action.edit.resource.limits=编辑资源限制
-label.action.edit.service.offering=编辑服务方案
-label.action.edit.template=编辑模板
-label.action.edit.user=编辑用户
-label.action.edit.zone=编辑区域
-label.action.enable.account.processing=正在启用帐户...
-label.action.enable.account=启用帐户
-label.action.enable.maintenance.mode.processing=正在启用维护模式...
-label.action.enable.maintenance.mode=启用维护模式
-label.action.enable.static.NAT.processing=正在启用静态 NAT...
-label.action.enable.static.NAT=启用静态 NAT
-label.action.enable.user.processing=正在启用用户...
-label.action.enable.user=启用用户
-label.action.force.reconnect.processing=正在重新连接...
-label.action.force.reconnect=强制重新连接
-label.action.generate.keys.processing=正在生成密钥...
-label.action.generate.keys=生成密钥
-label.action.lock.account.processing=正在锁定帐户...
-label.action.lock.account=锁定帐户
-label.action.migrate.instance=迁移实例
-label.action.migrate.instance.processing=正在迁移实例...
-label.action.reboot.instance.processing=正在重新启动实例...
-label.action.reboot.instance=重新启动实例
-label.action.reboot.router.processing=正在重新启动路由器...
-label.action.reboot.router=重新启动路由器
-label.action.reboot.systemvm.processing=正在重新启动系统 VM...
-label.action.reboot.systemvm=重新启动系统 VM
-label.action.recurring.snapshot=重现快照
-label.action.release.ip.processing=正在释放 IP...
-label.action.release.ip=释放 IP
-label.action.remove.host.processing=正在删除主机...
-label.action.remove.host=删除主机
-label.action.reset.password.processing=正在重置密码...
-label.action.reset.password=重置密码
-label.action.resource.limits=资源限制
-label.action.restore.instance.processing=正在还原实例...
-label.action.restore.instance=还原实例
-label.action.start.instance.processing=正在启动实例...
-label.action.start.instance=启动实例
-label.action.start.router.processing=正在启动路由器...
-label.action.start.router=启动路由器
-label.action.start.systemvm.processing=正在启动系统 VM...
-label.action.start.systemvm=启动系统 VM
-label.action.stop.instance.processing=正在停止实例...
-label.action.stop.instance=停止实例
-label.action.stop.router.processing=正在停止路由器...
-label.action.stop.router=停止路由器
-label.action.stop.systemvm.processing=正在停止系统 VM...
-label.action.stop.systemvm=停止系统 VM
-label.action.take.snapshot.processing=正在创建快照...
-label.action.take.snapshot=创建快照
-label.action.update.OS.preference.processing=正在更新操作系统首选项...
-label.action.update.OS.preference=更新操作系统首选项
-label.actions=操作
-label.active.sessions=活动会话
-label.add.account=添加帐户
-label.add.by.cidr=按 CIDR 添加
-label.add.by.group=按组添加
-label.add.cluster=添加群集
-label.add.direct.iprange=添加直接 IP 范围
-label.add.disk.offering=添加磁盘方案
-label.add.domain=添加域
-label.add.firewall=添加防火墙规则
-label.add.host=添加主机
-label.add.ingress.rule=添加入口规则
-label.add.ip.range=添加 IP 范围
-label.add.load.balancer=添加负载平衡器
-label.add.more=添加更多
-label.add.network=添加网络
-label.add.pod=添加提供点
-label.add.primary.storage=添加主存储
-label.add.secondary.storage=添加辅助存储
-label.add.security.group=添加安全组
-label.add.service.offering=添加服务方案
-label.add.template=添加模板
-label.add.user=添加用户
-label.add.vlan=添加 VLAN
-label.add.volume=添加卷
-label.add.zone=添加区域
-label.add=添加
-label.adding.cluster=正在添加群集
-label.adding.failed=添加失败
-label.adding.pod=正在添加提供点
-label.adding.processing=正在添加...
-label.adding.succeeded=已成功添加
-label.adding.user=正在添加用户
-label.adding.zone=正在添加区域
-label.adding=正在添加
-label.additional.networks=其他网络
-label.admin.accounts=管理员帐户
-label.admin=管理员
-label.advanced.mode=高级模式
-label.advanced.search=高级搜索
-label.advanced=高级
-label.alert=警报
-label.algorithm=算法
-label.allocated=已分配
-label.api.key=API 密钥
-label.assign.to.load.balancer=正在将实例分配给负载平衡器
-label.assign=分配
-label.associated.network.id=已关联网络 ID
-label.attached.iso=已附加 ISO
-label.availability.zone=可用区域
-label.availability=可用性
-label.available.public.ips=可用公用 IP 地址
-label.available=可用
-label.back=返回
-label.basic.mode=基本模式
-label.bootable=可启动
-label.broadcast.domain.type=广播域类型
-label.by.account=按帐户
-label.by.availability=按可用性
-label.by.domain=按域
-label.by.end.date=按结束日期
-label.by.level=按级别
-label.by.pod=按提供点
-label.by.role=按角色
-label.by.start.date=按开始日期
-label.by.state=按状态
-label.by.traffic.type=按流量类型
-label.by.type.id=按类型 ID
-label.by.type=按类型
-label.by.zone=按区域
-label.bytes.received=接收的字节数
-label.bytes.sent=发送的字节数
-label.cancel=取消
-label.certificate=证书
-label.privatekey=PKCS#8 私钥
-label.domain.suffix=DNS 域后缀(例如 xyz.com)
-label.character=字符
-label.cidr.account=CIDR 或帐户/安全组
-label.close=关闭
-label.cloud.console=云管理控制台
-label.cloud.managed=由 Cloud.com 管理
-label.cluster.type=群集类型
-label.cluster=群集
-label.code=代码
-label.confirmation=确认
-label.cpu.allocated.for.VMs=已分配给 VM 的 CPU
-label.cpu.allocated=已分配的 CPU
-label.cpu.utilized=CPU 利用率
+label.code=\u4ee3\u7801
+label.community=\u793e\u533a
+label.compute.and.storage=\u8ba1\u7b97\u4e0e\u5b58\u50a8
+label.compute.offerings=\u8ba1\u7b97\u65b9\u6848
+label.compute.offering=\u8ba1\u7b97\u65b9\u6848
+label.compute=\u8ba1\u7b97
+label.configuration=\u4e91\u5e73\u53f0\u914d\u7f6e
+label.configure.network.ACLs=\u914d\u7f6e\u7f51\u7edc ACL
+label.configure=\u914d\u7f6e
+label.configure.vpc=\u914d\u7f6e VPC
+label.confirmation=\u786e\u8ba4
+label.confirm.password=\u786e\u8ba4\u5bc6\u7801
+label.congratulations=\u795d\u8d3a\u60a8\!
+label.conserve.mode=\u4fdd\u62a4\u6a21\u5f0f
+label.console.proxy=\u63a7\u5236\u53f0\u4ee3\u7406
+label.continue.basic.install=\u7ee7\u7eed\u6267\u884c\u57fa\u672c\u5b89\u88c5
+label.continue=\u7ee7\u7eed
+label.corrections.saved=\u5df2\u4fdd\u5b58\u4fee\u6b63
+label.cpu.allocated.for.VMs=\u5df2\u5206\u914d\u7ed9 VM \u7684 CPU
+label.cpu.allocated=\u5df2\u5206\u914d\u7684 CPU
+label.CPU.cap=CPU \u4e0a\u9650
 label.cpu=CPU
-label.created=创建日期
-label.cross.zones=跨区域
-label.custom.disk.size=自定义磁盘大小
-label.daily=每天一次
-label.data.disk.offering=数据磁盘方案
-label.date=日期
-label.day.of.month=日期
-label.day.of.week=星期
-label.delete=删除
-label.deleting.failed=删除失败
-label.deleting.processing=正在删除...
-label.description=说明
-label.detaching.disk=正在取消附加磁盘
-label.details=详细信息
-label.device.id=设备 ID
-label.disabled=已禁用
-label.disabling.vpn.access=正在禁用 VPN 访问
-label.disk.allocated=已分配的磁盘
-label.disk.offering=磁盘方案
-label.disk.size.gb=磁盘大小(GB)
-label.disk.size=磁盘大小
-label.disk.total=磁盘总量
-label.disk.volume=磁盘卷
-label.display.text=显示文本
+label.cpu.mhz=CPU (MHz)
+label.cpu.utilized=CPU \u5229\u7528\u7387
+label.created.by.system=\u7531\u7cfb\u7edf\u521b\u5efa
+label.created=\u521b\u5efa\u65e5\u671f
+label.create.project=\u521b\u5efa\u9879\u76ee
+label.create.template=\u521b\u5efa\u6a21\u677f
+label.create.VPN.connection=\u521b\u5efa VPN \u8fde\u63a5
+label.cross.zones=\u8de8\u533a\u57df
+label.custom.disk.size=\u81ea\u5b9a\u4e49\u78c1\u76d8\u5927\u5c0f
+label.daily=\u6bcf\u5929\u4e00\u6b21
+label.data.disk.offering=\u6570\u636e\u78c1\u76d8\u65b9\u6848
+label.date=\u65e5\u671f
+label.day.of.month=\u65e5\u671f
+label.day.of.week=\u661f\u671f
+label.dead.peer.detection=\u5931\u6548\u5bf9\u7b49\u4f53\u68c0\u6d4b
+label.decline.invitation=\u62d2\u7edd\u9080\u8bf7
+label.dedicated=\u4e13\u7528
+label.default=\u9ed8\u8ba4\u503c
+label.default.use=\u9ed8\u8ba4\u4f7f\u7528
+label.default.view=\u9ed8\u8ba4\u89c6\u56fe
+label.delete.F5=\u5220\u9664 F5
+label.delete.gateway=\u5220\u9664\u7f51\u5173
+label.delete.NetScaler=\u5220\u9664 NetScaler
+label.delete.NiciraNvp=\u5220\u9664Nvp\u63a7\u5236\u5668
+label.delete.project=\u5220\u9664\u9879\u76ee
+label.delete.SRX=\u5220\u9664 SRX
+label.delete=\u5220\u9664
+label.delete.VPN.connection=\u5220\u9664 VPN \u8fde\u63a5
+label.delete.VPN.customer.gateway=\u5220\u9664 VPN \u5ba2\u6237\u7f51\u5173
+label.delete.VPN.gateway=\u5220\u9664 VPN \u7f51\u5173
+label.delete.vpn.user=\u5220\u9664 VPN \u7528\u6237
+label.deleting.failed=\u5220\u9664\u5931\u8d25
+label.deleting.processing=\u6b63\u5728\u5220\u9664...
+label.description=\u8bf4\u660e
+label.destination.physical.network.id=\u76ee\u6807\u7269\u7406\u7f51\u7edc ID
+label.destination.zone=\u76ee\u6807\u533a\u57df
+label.destroy.router=\u9500\u6bc1\u8def\u7531\u5668
+label.destroy=\u00e9\u0094\u0080\u00e6\u00af\u0081
+label.detaching.disk=\u6b63\u5728\u53d6\u6d88\u9644\u52a0\u78c1\u76d8
+label.details=\u8be6\u7ec6\u4fe1\u606f
+label.device.id=\u8bbe\u5907 ID
+label.devices=\u8bbe\u5907
+label.dhcp=DHCP
+label.DHCP.server.type=DHCP \u670d\u52a1\u5668\u7c7b\u578b
+label.direct.ips=\u76f4\u63a5 IP
+label.disabled=\u5df2\u7981\u7528
+label.disable.provider=\u7981\u7528\u63d0\u4f9b\u7a0b\u5e8f
+label.disable.vpn=\u7981\u7528 VPN
+label.disabling.vpn.access=\u6b63\u5728\u7981\u7528 VPN \u8bbf\u95ee
+label.disk.allocated=\u5df2\u5206\u914d\u7684\u78c1\u76d8
+label.disk.offering=\u78c1\u76d8\u65b9\u6848
+label.disk.size.gb=\u78c1\u76d8\u5927\u5c0f(GB)
+label.disk.size=\u78c1\u76d8\u5927\u5c0f
+label.disk.total=\u78c1\u76d8\u603b\u91cf
+label.disk.volume=\u78c1\u76d8\u5377
+label.display.name=\u663e\u793a\u540d\u79f0
+label.display.text=\u663e\u793a\u6587\u672c
 label.dns.1=DNS 1
 label.dns.2=DNS 2
-label.domain.admin=域管理员
-label.domain.id=域 ID
-label.domain.name=域名
-label.domain=域
-label.double.quotes.are.not.allowed=不允许使用双引号
-label.download.progress=下载进度
-label.edit=编辑
-label.email=电子邮件
-label.enabling.vpn.access=正在启用 VPN 访问
-label.enabling.vpn=正在启用 VPN
-label.end.port=结束端口
-label.endpoint.or.operation=端点或操作
-label.error.code=错误代码
-label.error=错误
-label.esx.host=ESX/ESXi 主机
-label.example=示例
-label.failed=失败
-label.featured=精选
-label.firewall=防火墙
-label.first.name=名字
-label.format=格式
-label.friday=星期五
-label.full=满载
-label.gateway=网关
-label.general.alerts=常规警报
-label.generating.url=正在生成 URL
-label.go.step.2=转至步骤 2
-label.go.step.3=转至步骤 3
-label.go.step.4=转至步骤 4
-label.go.step.5=转至步骤 5
-label.group.optional=组(可选)
-label.group=组
-label.guest.cidr=来宾 CIDR
-label.guest.gateway=来宾网关
-label.guest.ip.range=来宾 IP 范围
-label.guest.ip=来宾 IP 地址
-label.guest.netmask=来宾网络掩码
-label.ha.enabled=已启用高可用性
-label.help=帮助
-label.host.alerts=主机警报
-label.host.name=主机名称
-label.host=主机
-label.hosts=主机
-label.hourly=每小时一次
-label.hypervisor.type=虚拟机管理程序类型
-label.hypervisor=虚拟机管理程序
+label.dns=DNS
+label.DNS.domain.for.guest.networks=\u6765\u5bbe\u7f51\u7edc\u7684 DNS \u57df
+label.domain.admin=\u57df\u7ba1\u7406\u5458
+label.domain.id=\u57df ID
+label.domain.name=\u57df\u540d
+label.domain.router=\u57df\u8def\u7531\u5668
+label.domain.suffix=DNS \u57df\u540e\u7f00(\u4f8b\u5982 xyz.com)
+label.domain=\u57df
+label.done=\u5b8c\u6210
+label.double.quotes.are.not.allowed=\u4e0d\u5141\u8bb8\u4f7f\u7528\u53cc\u5f15\u53f7
+label.download.progress=\u4e0b\u8f7d\u8fdb\u5ea6
+label.drag.new.position=\u62d6\u52a8\u5230\u65b0\u4f4d\u7f6e
+label.edit.lb.rule=\u7f16\u8f91\u8d1f\u8f7d\u5e73\u8861\u5668\u89c4\u5219
+label.edit.network.details=\u7f16\u8f91\u7f51\u7edc\u8be6\u60c5
+label.edit.project.details=\u7f16\u8f91\u9879\u76ee\u8be6\u60c5
+label.edit.tags=\u7f16\u8f91\u6807\u7b7e
+label.edit.traffic.type=\u7f16\u8f91\u6d41\u91cf\u7c7b\u578b
+label.edit=\u7f16\u8f91
+label.edit.vpc=\u7f16\u8f91 VPC
+label.egress.rules=\u51fa\u53e3\u89c4\u5219
+label.egress.rule=\u51fa\u53e3\u89c4\u5219
+label.elastic.IP=\u5f39\u6027 IP
+label.elastic.LB=\u5f39\u6027\u8d1f\u8f7d\u5e73\u8861\u5668
+label.elastic=\u5f39\u6027
+label.email=\u7535\u5b50\u90ae\u4ef6
+label.enable.provider=\u542f\u7528\u63d0\u4f9b\u7a0b\u5e8f
+label.enable.s3=\u542f\u7528\u652f\u6301S3\u7684\u4e8c\u7ea7\u5b58\u50a8
+label.enable.swift=\u542f\u7528 SWIFT
+label.enable.vpn=\u542f\u7528 VPN
+label.enabling.vpn.access=\u6b63\u5728\u542f\u7528 VPN \u8bbf\u95ee
+label.enabling.vpn=\u6b63\u5728\u542f\u7528 VPN
+label.end.IP=\u7ed3\u675f IP
+label.endpoint.or.operation=\u7aef\u70b9\u6216\u64cd\u4f5c
+label.endpoint=\u7aef\u70b9
+label.end.port=\u7ed3\u675f\u7aef\u53e3
+label.end.reserved.system.IP=\u7ed3\u675f\u9884\u7559\u7cfb\u7edf IP
+label.end.vlan=\u7ed3\u675f VLAN
+label.enter.token=\u8f93\u5165\u4ee4\u724c
+label.error.code=\u9519\u8bef\u4ee3\u7801
+label.error=\u9519\u8bef
+label.ESP.encryption=ESP \u52a0\u5bc6\u7b97\u6cd5
+label.ESP.hash=ESP \u54c8\u5e0c\u7b97\u6cd5
+label.ESP.lifetime=ESP \u4f7f\u7528\u671f\u9650(\u7b2c\u4e8c\u9636\u6bb5)
+label.ESP.policy=ESP \u7b56\u7565
+label.esx.host=ESX/ESXi \u4e3b\u673a
+label.example=\u793a\u4f8b
+label.f5=F5
+label.failed=\u5931\u8d25
+label.featured=\u7cbe\u9009
+label.fetch.latest=\u63d0\u53d6\u6700\u65b0\u5185\u5bb9
+label.filterBy=\u8fc7\u6ee4\u4f9d\u636e
+label.firewall=\u9632\u706b\u5899
+label.first.name=\u540d\u5b57
+label.format=\u683c\u5f0f
+label.friday=\u661f\u671f\u4e94
+label.full.path=\u5b8c\u6574\u8def\u5f84
+label.full=\u6ee1\u8f7d
+label.gateway=\u7f51\u5173
+label.general.alerts=\u5e38\u89c4\u8b66\u62a5
+label.generating.url=\u6b63\u5728\u751f\u6210 URL
+label.go.step.2=\u8f6c\u81f3\u6b65\u9aa4 2
+label.go.step.3=\u8f6c\u81f3\u6b65\u9aa4 3
+label.go.step.4=\u8f6c\u81f3\u6b65\u9aa4 4
+label.go.step.5=\u8f6c\u81f3\u6b65\u9aa4 5
+label.group.optional=\u7ec4(\u53ef\u9009)
+label.group=\u7ec4
+label.guest.cidr=\u6765\u5bbe CIDR
+label.guest.end.ip=\u6765\u5bbe\u7ed3\u675f IP
+label.guest.gateway=\u6765\u5bbe\u7f51\u5173
+label.guest.ip.range=\u6765\u5bbe IP \u8303\u56f4
+label.guest.ip=\u6765\u5bbe IP \u5730\u5740
+label.guest.netmask=\u6765\u5bbe\u7f51\u7edc\u63a9\u7801
+label.guest.networks=\u6765\u5bbe\u7f51\u7edc
+label.guest.start.ip=\u6765\u5bbe\u8d77\u59cb IP
+label.guest.traffic=\u6765\u5bbe\u6d41\u91cf
+label.guest.type=\u6765\u5bbe\u7c7b\u578b
+label.guest=\u6765\u5bbe
+label.ha.enabled=\u5df2\u542f\u7528\u9ad8\u53ef\u7528\u6027
+label.help=\u5e2e\u52a9
+label.hide.ingress.rule=\u9690\u85cf\u5165\u53e3\u89c4\u5219
+label.hints=\u63d0\u793a
+label.host.alerts=\u4e3b\u673a\u8b66\u62a5
+label.host.MAC=\u4e3b\u673a MAC
+label.host.name=\u4e3b\u673a\u540d\u79f0
+label.hosts=\u4e3b\u673a
+label.host.tags=\u4e3b\u673a\u6807\u7b7e
+label.host=\u4e3b\u673a
+label.hourly=\u6bcf\u5c0f\u65f6\u4e00\u6b21
+label.hypervisor.capabilities=\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u529f\u80fd
+label.hypervisor.type=\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u7c7b\u578b
+label.hypervisor=\u865a\u62df\u673a\u5e73\u53f0
+label.hypervisor.version=\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u7248\u672c
 label.id=ID
-label.info=信息
-label.ingress.rule=入口规则
-label.initiated.by=启动者
-label.instance.limits=实例限制
-label.instance.name=实例名称
-label.instance=实例
-label.instances=实例
-label.internal.dns.1=内部 DNS 1
-label.internal.dns.2=内部 DNS 2
-label.interval.type=间隔类型
-label.invalid.integer=无效整数
-label.invalid.number=无效数字
-label.ip.address=IP 地址
-label.ip.allocations=IP 分配
-label.ip.limits=公用 IP 限制
-label.ip.or.fqdn=IP 或 FQDN
-label.ip.range=IP 范围
+label.IKE.DH=IKE DH \u7b97\u6cd5
+label.IKE.encryption=IKE \u52a0\u5bc6\u7b97\u6cd5
+label.IKE.hash=IKE \u54c8\u5e0c\u7b97\u6cd5
+label.IKE.lifetime=IKE \u4f7f\u7528\u671f\u9650(\u7b2c\u4e8c\u9636\u6bb5)
+label.IKE.policy=IKE \u7b56\u7565
+label.info=\u4fe1\u606f
+label.ingress.rule=\u5165\u53e3\u89c4\u5219
+label.initiated.by=\u542f\u52a8\u8005
+label.installWizard.addClusterIntro.subtitle=\u4ec0\u4e48\u662f\u7fa4\u96c6?
+label.installWizard.addClusterIntro.title=\u6dfb\u52a0\u4e00\u4e2a\u7fa4\u96c6
+label.installWizard.addHostIntro.subtitle=\u4ec0\u4e48\u662f\u4e3b\u673a?
+label.installWizard.addHostIntro.title=\u6dfb\u52a0\u4e00\u4e2a\u4e3b\u673a
+label.installWizard.addPodIntro.subtitle=\u4ec0\u4e48\u662f\u63d0\u4f9b\u70b9?
+label.installWizard.addPodIntro.title=\u6dfb\u52a0\u4e00\u4e2a\u63d0\u4f9b\u70b9
+label.installWizard.addPrimaryStorageIntro.subtitle=\u4ec0\u4e48\u662f\u4e3b\u5b58\u50a8?
+label.installWizard.addPrimaryStorageIntro.title=\u6dfb\u52a0\u4e00\u4e2a\u4e3b\u5b58\u50a8
+label.installWizard.addSecondaryStorageIntro.subtitle=\u4ec0\u4e48\u662f\u8f85\u52a9\u5b58\u50a8?
+label.installWizard.addSecondaryStorageIntro.title=\u6dfb\u52a0\u4e00\u4e2a\u8f85\u52a9\u5b58\u50a8
+label.installWizard.addZoneIntro.subtitle=\u4ec0\u4e48\u662f\u533a\u57df?
+label.installWizard.addZoneIntro.title=\u6dfb\u52a0\u4e00\u4e2a\u533a\u57df
+label.installWizard.addZone.title=\u6dfb\u52a0\u533a\u57df
+label.installWizard.click.launch=\u8bf7\u5355\u51fb\u201c\u542f\u52a8\u201d\u6309\u94ae\u3002
+label.installWizard.subtitle=\u6b64\u6559\u7a0b\u5c06\u5e2e\u52a9\u60a8\u8bbe\u7f6e CloudStack&\#8482 \u5b89\u88c5
+label.installWizard.title=\u60a8\u597d\uff0c\u6b22\u8fce\u4f7f\u7528 CloudStack&\#8482
+label.instance.limits=\u5b9e\u4f8b\u9650\u5236
+label.instance.name=\u5b9e\u4f8b\u540d\u79f0
+label.instances=\u5b9e\u4f8b
+label.instance=\u5b9e\u4f8b
+label.internal.dns.1=\u5185\u90e8 DNS 1
+label.internal.dns.2=\u5185\u90e8 DNS 2
+label.internal.name=\u5185\u90e8\u540d\u79f0
+label.interval.type=\u95f4\u9694\u7c7b\u578b
+label.introduction.to.cloudstack=CloudStack&\#8482 \u7b80\u4ecb
+label.invalid.integer=\u65e0\u6548\u6574\u6570
+label.invalid.number=\u65e0\u6548\u6570\u5b57
+label.invitations=\u9080\u8bf7
+label.invited.accounts=\u5df2\u9080\u8bf7\u7684\u5e10\u6237
+label.invite.to=\u9080\u8bf7\u52a0\u5165
+label.invite=\u9080\u8bf7
+label.ip.address=IP \u5730\u5740
+label.ipaddress=IP \u5730\u5740
+label.ip.allocations=IP \u5206\u914d
 label.ip=IP
+label.ip.limits=\u516c\u7528 IP \u9650\u5236
+label.ip.or.fqdn=IP \u6216 FQDN
+label.ip.range=IP \u8303\u56f4
+label.ip.ranges=IP \u8303\u56f4
+label.IPsec.preshared.key=IPsec \u9884\u5171\u4eab\u5bc6\u94a5
 label.ips=IP
-label.is.default=是否为默认值
-label.is.shared=是否共享
-label.is.system=是否为系统
 label.iscsi=iSCSI
-label.iso.boot=ISO 启动
+label.is.default=\u662f\u5426\u4e3a\u9ed8\u8ba4\u503c
+label.iso.boot=ISO \u542f\u52a8
 label.iso=ISO
-label.isolation.mode=隔离模式
-label.keep=保留
-label.lang.chinese=简体中文
-label.lang.english=英语
-label.lang.japanese=日语
-label.lang.korean=韩国语
-label.lang.spanish=西班牙语
-label.last.disconnected=上次断开连接时间
-label.last.name=姓氏
-label.level=级别
-label.linklocal.ip=链接本地 IP 地址
-label.load.balancer=负载平衡器
-label.loading=正在加载
-label.local=本地
-label.login=登录
-label.logout=注销
+label.isolated.networks=\u9694\u79bb\u7f51\u7edc
+label.isolation.method=\u9694\u79bb\u65b9\u6cd5
+label.isolation.mode=\u9694\u79bb\u6a21\u5f0f
+label.isolation.uri=\u9694\u79bbURI
+label.is.redundant.router=\u5197\u4f59
+label.is.shared=\u662f\u5426\u5171\u4eab
+label.is.system=\u662f\u5426\u4e3a\u7cfb\u7edf
+label.item.listing=\u9879\u76ee\u5217\u8868
+label.keep=\u4fdd\u7559
+label.keyboard.type=\u952e\u76d8\u7c7b\u578b
+label.key=\u5bc6\u94a5
+label.kvm.traffic.label=KVM \u6d41\u91cf\u6807\u7b7e
+label.label=\u6807\u7b7e
+label.lang.brportugese=\u5df4\u897f\u8461\u8404\u7259\u8bed
+label.lang.chinese=\u7b80\u4f53\u4e2d\u6587
+label.lang.english=\u82f1\u8bed
+label.lang.french=\u6cd5\u8bed
+label.lang.japanese=\u65e5\u8bed
+label.lang.korean=\u97e9\u56fd\u8bed
+label.lang.russian=\u4fc4\u8bed
+label.lang.spanish=\u897f\u73ed\u7259\u8bed
+label.last.disconnected=\u4e0a\u6b21\u65ad\u5f00\u8fde\u63a5\u65f6\u95f4
+label.last.name=\u59d3\u6c0f
+label.latest.events=\u6700\u65b0\u4e8b\u4ef6
+label.launch=\u542f\u52a8
+label.launch.vm=\u542f\u52a8 VM
+label.launch.zone=\u542f\u52a8\u533a\u57df
+label.LB.isolation=\u8d1f\u8f7d\u5e73\u8861\u5668\u9694\u79bb
+label.least.connections=\u6700\u5c11\u8fde\u63a5\u7b97\u6cd5
+label.level=\u7ea7\u522b
+label.linklocal.ip=\u94fe\u63a5\u672c\u5730 IP \u5730\u5740
+label.load.balancer=\u8d1f\u8f7d\u5e73\u8861\u5668
+label.load.balancing.policies=\u8d1f\u8f7d\u5e73\u8861\u7b56\u7565
+label.load.balancing=\u8d1f\u8f7d\u5e73\u8861
+label.loading=\u6b63\u5728\u52a0\u8f7d
+label.local.storage.enabled=\u5df2\u542f\u7528\u672c\u5730\u5b58\u50a8
+label.local.storage=\u672c\u5730\u5b58\u50a8
+label.local=\u672c\u5730
+label.login=\u767b\u5f55
+label.logout=\u6ce8\u9500
 label.lun=LUN
-label.manage=托管
-label.maximum=最大值
-label.memory.allocated=已分配的内存
-label.memory.total=内存总量
-label.memory.used=已使用的内存
-label.memory=内存
-label.menu.accounts=帐户
-label.menu.alerts=警报
-label.menu.all.accounts=所有帐户
-label.menu.all.instances=所有实例
-label.menu.community.isos=社区 ISO
-label.menu.community.templates=社区模板
-label.menu.configuration=配置
-label.menu.dashboard=控制板
-label.menu.destroyed.instances=已销毁的实例
-label.menu.disk.offerings=磁盘方案
-label.menu.domains=域
-label.menu.events=事件
-label.menu.featured.isos=精选 ISO
-label.menu.featured.templates=精选模板
-label.menu.global.settings=全局设置
-label.menu.instances=实例
-label.menu.ipaddresses=IP 地址
+label.LUN.number=LUN \u53f7
+label.make.project.owner=\u8bbe\u4e3a\u5e10\u6237\u9879\u76ee\u6240\u6709\u8005
+label.management.ips=\u7ba1\u7406\u7c7b IP \u5730\u5740
+label.management=\u7ba1\u7406
+label.manage.resources=\u7ba1\u7406\u8d44\u6e90
+label.manage=\u6258\u7ba1
+label.max.guest.limit=\u6700\u5927\u6765\u5bbe\u6570\u9650\u5236
+label.maximum=\u6700\u5927\u503c
+label.max.networks=\u6700\u5927\u7f51\u7edc\u6570
+label.max.public.ips=\u6700\u5927\u516c\u7528 IP \u6570
+label.max.snapshots=\u6700\u5927\u5feb\u7167\u6570
+label.max.templates=\u6700\u5927\u6a21\u677f\u6570
+label.max.vms=\u6700\u5927\u7528\u6237 VM \u6570
+label.max.volumes=\u6700\u5927\u5377\u6570
+label.max.vpcs=\u6700\u591aVPC\u5c42\u6570
+label.may.continue=\u60a8\u73b0\u5728\u53ef\u4ee5\u7ee7\u7eed\u8fdb\u884c\u64cd\u4f5c\u3002
+label.memory.allocated=\u5df2\u5206\u914d\u7684\u5185\u5b58
+label.memory.mb=\u5185\u5b58(MB)
+label.memory.total=\u5185\u5b58\u603b\u91cf
+label.memory=\u5185\u5b58
+label.memory.used=\u5df2\u4f7f\u7528\u7684\u5185\u5b58
+label.menu.accounts=\u5e10\u53f7
+label.menu.alerts=\u8b66\u62a5
+label.menu.all.accounts=\u6240\u6709\u5e10\u6237
+label.menu.all.instances=\u6240\u6709\u5b9e\u4f8b
+label.menu.community.isos=\u793e\u533a ISO
+label.menu.community.templates=\u793e\u533a\u6a21\u677f
+label.menu.configuration=\u4e91\u5e73\u53f0\u914d\u7f6e
+label.menu.dashboard=\u63a7\u5236\u677f
+label.menu.destroyed.instances=\u5df2\u9500\u6bc1\u7684\u5b9e\u4f8b
+label.menu.disk.offerings=\u78c1\u76d8\u65b9\u6848
+label.menu.domains=\u57df
+label.menu.events=\u4e8b\u4ef6
+label.menu.featured.isos=\u7cbe\u9009 ISO
+label.menu.featured.templates=\u7cbe\u9009\u6a21\u677f
+label.menu.global.settings=\u5168\u5c40\u8bbe\u7f6e
+label.menu.infrastructure=\u57fa\u7840\u67b6\u6784
+label.menu.instances=\u5b9e\u4f8b
+label.menu.ipaddresses=IP\u5730\u5740
 label.menu.isos=ISO
-label.menu.my.accounts=我的帐户
-label.menu.my.instances=我的实例
-label.menu.my.isos=我的 ISO
-label.menu.my.templates=我的模板
-label.menu.network.offerings=网络方案
-label.menu.network=网络
-label.menu.physical.resources=物理资源
-label.menu.running.instances=正在运行的实例
-label.menu.security.groups=安全组
-label.menu.service.offerings=服务方案
-label.menu.snapshots=快照
-label.menu.stopped.instances=已停止的实例
-label.menu.storage=存储
-label.menu.system.vms=系统 VM
-label.menu.system=系统
-label.menu.templates=模板
-label.menu.virtual.appliances=虚拟设备
-label.menu.virtual.resources=虚拟资源
-label.menu.volumes=卷
-label.migrate.instance.to=迁移实例至
-label.minimum=最小值
-label.minute.past.hour=分钟时
-label.monday=星期一
-label.monthly=每月一次
-label.more.templates=更多模板
-label.my.account=我的帐户
-label.name.optional=名称(可选)
-label.name=名称
-label.netmask=网络掩码
-label.network.desc=网络描述
-label.network.domain=网络域
-label.network.id=网络 ID
-label.network.name=网络名称
-label.network.offering.display.text=网络方案显示文本
-label.network.offering.id=网络方案 ID
-label.network.offering.name=网络方案名称
-label.network.offering=网络方案
-label.network.rate=网络速率
-label.network.read=网络读取量
-label.network.type=网络类型
-label.network.write=网络写入量
-label.network=网络
-label.new.password=新密码
-label.next=下一步
-label.nfs.server=NFS 服务器
-label.nfs.storage=NFS 存储
+label.menu.my.accounts=\u6211\u7684\u5e10\u6237
+label.menu.my.instances=\u6211\u7684\u5b9e\u4f8b
+label.menu.my.isos=\u6211\u7684 ISO
+label.menu.my.templates=\u6211\u7684\u6a21\u677f
+label.menu.network.offerings=\u7f51\u7edc\u65b9\u6848
+label.menu.network=\u7f51\u7edc
+label.menu.physical.resources=\u7269\u7406\u8d44\u6e90
+label.menu.running.instances=\u6b63\u5728\u8fd0\u884c\u7684\u5b9e\u4f8b
+label.menu.security.groups=\u5b89\u5168\u5206\u7ec4
+label.menu.service.offerings=\u670d\u52a1\u63d0\u4f9b
+label.menu.snapshots=\u5feb\u7167
+label.menu.stopped.instances=\u5df2\u505c\u6b62\u7684\u5b9e\u4f8b
+label.menu.storage=\u5b58\u50a8
+label.menu.system.service.offerings=\u7cfb\u7edf\u65b9\u6848
+label.menu.system=\u7cfb\u7edf
+label.menu.system.vms=\u7cfb\u7edf VM
+label.menu.templates=\u6a21\u677f
+label.menu.virtual.appliances=\u865a\u62df\u8bbe\u5907
+label.menu.virtual.resources=\u865a\u62df\u8d44\u6e90
+label.menu.volumes=\u5377
+label.migrate.instance.to.host=\u5c06\u5b9e\u4f8b\u8fc1\u79fb\u5230\u5176\u4ed6\u4e3b\u673a
+label.migrate.instance.to.ps=\u5c06\u5b9e\u4f8b\u8fc1\u79fb\u5230\u5176\u4ed6\u4e3b\u5b58\u50a8
+label.migrate.instance.to=\u8fc1\u79fb\u5b9e\u4f8b\u81f3
+label.migrate.router.to=\u8fc1\u79fb\u8def\u7531\u5668\u81f3
+label.migrate.systemvm.to=\u8fc1\u79fb\u7cfb\u7edf VM \u81f3
+label.migrate.to.host=\u8fc1\u79fb\u5230\u4e3b\u673a
+label.migrate.to.storage=\u8fc1\u79fb\u5230\u5b58\u50a8
+label.migrate.volume=\u5c06\u5377\u8fc1\u79fb\u5230\u5176\u4ed6\u4e3b\u5b58\u50a8
+label.minimum=\u6700\u5c0f\u503c
+label.minute.past.hour=\u5206\u949f\u65f6
+label.monday=\u661f\u671f\u4e00
+label.monthly=\u6bcf\u6708\u4e00\u6b21
+label.more.templates=\u66f4\u591a\u6a21\u677f
+label.move.down.row=\u5411\u4e0b\u79fb\u52a8\u4e00\u884c
+label.move.to.bottom=\u79fb\u81f3\u5e95\u90e8
+label.move.to.top=\u79fb\u81f3\u9876\u90e8
+label.move.up.row=\u5411\u4e0a\u79fb\u52a8\u4e00\u884c
+label.my.account=\u6211\u7684\u5e10\u6237
+label.my.network=\u6211\u7684\u7f51\u7edc
+label.my.templates=\u6211\u7684\u6a21\u677f
+label.name.optional=\u540d\u79f0(\u53ef\u9009)
+label.name=\u540d\u79f0
+label.nat.port.range=NAT \u7aef\u53e3\u8303\u56f4
+label.netmask=\u7f51\u7edc\u63a9\u7801
+label.netScaler=NetScaler
+label.network.ACLs=\u7f51\u7edc ACL
+label.network.ACL.total=\u7f51\u7edc ACL \u603b\u6570
+label.network.ACL=\u7f51\u7edc ACL
+label.network.desc=\u7f51\u7edc\u63cf\u8ff0
+label.network.device.type=\u7f51\u7edc\u8bbe\u5907\u7c7b\u578b
+label.network.device=\u7f51\u7edc\u8bbe\u5907
+label.network.domain.text=\u7f51\u7edc\u57df
+label.network.domain=\u7f51\u7edc\u57df
+label.network.id=\u7f51\u7edc ID
+label.networking.and.security=\u7f51\u7edc\u8fde\u63a5\u4e0e\u5b89\u5168
+label.network.label.display.for.blank.value=\u4f7f\u7528\u9ed8\u8ba4\u7f51\u5173
+label.network.name=\u7f51\u7edc\u540d\u79f0
+label.network.offering.display.text=\u7f51\u7edc\u65b9\u6848\u663e\u793a\u6587\u672c
+label.network.offering.id=\u7f51\u7edc\u65b9\u6848 ID
+label.network.offering.name=\u7f51\u7edc\u65b9\u6848\u540d\u79f0
+label.network.offering=\u7f51\u7edc\u65b9\u6848
+label.network.rate.megabytes=\u7f51\u7edc\u901f\u7387(MB/\u79d2)
+label.network.rate=\u7f51\u7edc\u901f\u7387
+label.network.read=\u7f51\u7edc\u8bfb\u53d6\u91cf
+label.network.service.providers=\u7f51\u7edc\u670d\u52a1\u63d0\u4f9b\u65b9\u6848
+label.networks=\u7f51\u7edc
+label.network.type=\u7f51\u7edc\u7c7b\u578b
+label.network=\u7f51\u7edc
+label.network.write=\u7f51\u7edc\u5199\u5165\u91cf
+label.new.password=\u65b0\u5bc6\u7801
+label.new.project=\u65b0\u5efa\u9879\u76ee
+label.new=\u65b0\u5efa
+label.new.vm=\u65b0\u5efa VM
+label.next=\u4e0b\u4e00\u6b65
+label.nexusVswitch=Nexus 1000v
 label.nfs=NFS
+label.nfs.server=NFS \u670d\u52a1\u5668
+label.nfs.storage=NFS \u5b58\u50a8
+label.nic.adapter.type=NIC \u9002\u914d\u5668\u7c7b\u578b
+label.nicira.controller.address=\u63a7\u5236\u5668\u5730\u5740
+label.nicira.l3gatewayserviceuuid=3\u5c42\u7f51\u5173\u670d\u52a1UUID
+label.nicira.transportzoneuuid=\u4f20\u8f93\u8d44\u6e90\u57dfUUID
 label.nics=NIC
-label.no.actions=无可用操作
-label.no.alerts=无最近发出的警报
-label.no.errors=无最近出现的错误
-label.no.isos=无可用 ISO
-label.no.items=无可用项目
-label.no.security.groups=无可用安全组
-label.no.thanks=不,谢谢
-label.no=否
-label.none=无
-label.not.found=未找到
-label.num.cpu.cores=CPU 内核数
-label.numretries=重试次数
-label.offer.ha=提供高可用性
-label.optional=可选
-label.os.preference=操作系统首选项
-label.os.type=操作系统类型
-label.owned.public.ips=拥有的公用 IP 地址数
-label.owner.account=所有者帐户
-label.owner.domain=所有者域
-label.parent.domain=父域
-label.password.enabled=已启用密码
-label.password=密码
-label.path=路径
-label.please.wait=请稍候
-label.pod=提供点
-label.port.forwarding=端口转发
-label.port.range=端口范围
-label.prev=上一页
-label.primary.allocated=已分配的主存储
-label.primary.network=主网络
-label.primary.storage=主存储
-label.primary.used=已使用的主存储
-label.private.interface=专用接口
-label.private.ip.range=专用 IP 范围
-label.private.ip=专用 IP 地址
-label.private.ips=专用 IP 地址
-label.private.port=专用端口
-label.private.zone=专用区域
-label.protocol=协议
-label.public.interface=公用接口
-label.public.ip=公用 IP 地址
-label.public.ips=公用 IP 地址
-label.public.port=公用端口
-label.public.zone=公用区域
-label.public=公用
-label.recent.errors=最近出现的错误
-label.refresh=刷新
-label.related=相关联
-label.remove.from.load.balancer=正在从负载平衡器中删除实例
-label.removing.user=正在删除用户
-label.required=必填项
-label.reserved.system.ip=预留的系统 IP
-label.resource.limits=资源限制
-label.resource=资源
-label.resources=资源
-label.role=角色
-label.root.disk.offering=根磁盘方案
-label.running.vms=正在运行的 VM
-label.saturday=星期六
-label.save=保存
-label.saving.processing=正在保存...
-label.scope=范围
-label.search=搜索
-label.secondary.storage=辅助存储
-label.secondary.used=已使用的辅助存储
-label.secret.key=密钥
-label.security.group.name=安全组名称
-label.security.group=安全组
-label.security.groups.enabled=已启用安全组
-label.security.groups=安全组
-label.sent=已发送
-label.server=服务器
-label.service.offering=服务方案
-label.system.service.offering=系统服务方案
-label.session.expired=会话已过期
-label.shared=已共享
-label.size=大小
-label.snapshot.limits=快照限制
-label.snapshot.name=快照名称
-label.snapshot.s=快照
-label.snapshot.schedule=设置重现快照
-label.snapshot=快照
-label.snapshots=快照
-label.source.nat=源 NAT
-label.specify.vlan=指定 VLAN
-label.start.port=起始端口
-label.state=状态
-label.static.nat.to=静态 NAT 目标
-label.static.nat=静态 NAT
-label.statistics=统计数据
-label.status=状态
-label.step.1.title=步骤 1: <strong>选择一个模板</strong>
-label.step.1=步骤 1
-label.step.2.title=步骤 2: <strong>服务方案</strong>
-label.step.2=步骤 2
-label.step.3.title=步骤 3: <strong id="step3_label">选择一种磁盘方案</strong>
-label.step.3=步骤 3
-label.step.4.title=步骤 4: <strong>网络</strong>
-label.step.4=步骤 4
-label.step.5.title=步骤 5: <strong>核对</strong>
-label.step.5=步骤 5
-label.stopped.vms=已停止的 VM
-label.storage.type=存储类型
-label.storage=存储
-label.submit=提交
-label.submitted.by=[提交者: <span id="submitted_by"></span>]
-label.succeeded=成功
-label.sunday=星期日
-label.system.capacity=系统容量
-label.system.vm.type=系统 VM 类型
-label.system.vm=系统 VM
-label.system.vms=系统 VM
-label.tagged=已标记
-label.tags=标签
-label.target.iqn=目标 IQN
-label.template.limits=模板限制
-label.template=模板
-label.theme.default=默认主题
-label.theme.grey=自定义 - 灰色
-label.theme.lightblue=自定义 - 淡蓝色
-label.thursday=星期四
-label.time.zone=时区
-label.time=时间
-label.timeout.in.second = 超时(秒)
-label.timezone=时区
-label.total.cpu=CPU 总量
-label.total.vms=总 VM 数
-label.traffic.type=流量类型
-label.tuesday=星期二
-label.type.id=类型 ID
-label.type=类型
-label.unavailable=不可用
-label.unlimited=无限制
-label.untagged=已取消标记
-label.update.ssl.cert=更新 SSL 证书
-label.update.ssl=更新 SSL 证书
-label.updating=正在更新
+label.no.actions=\u65e0\u53ef\u7528\u64cd\u4f5c
+label.no.alerts=\u65e0\u6700\u8fd1\u53d1\u51fa\u7684\u8b66\u62a5
+label.no.data=\u65e0\u53ef\u663e\u793a\u7684\u6570\u636e
+label.no.errors=\u65e0\u6700\u8fd1\u51fa\u73b0\u7684\u9519\u8bef
+label.no.isos=\u65e0\u53ef\u7528 ISO
+label.no.items=\u65e0\u53ef\u7528\u9879\u76ee
+label.none=\u65e0
+label.no.security.groups=\u65e0\u53ef\u7528\u5b89\u5168\u7ec4
+label.not.found=\u672a\u627e\u5230
+label.no.thanks=\u4e0d\uff0c\u8c22\u8c22
+label.notifications=\u901a\u77e5
+label.no=\u5426
+label.number.of.clusters=\u7fa4\u96c6\u6570\u91cf
+label.number.of.hosts=\u4e3b\u673a\u6570\u91cf
+label.number.of.pods=\u63d0\u4f9b\u70b9\u6570\u91cf
+label.number.of.system.vms=\u7cfb\u7edf VM \u6570
+label.number.of.virtual.routers=\u865a\u62df\u8def\u7531\u5668\u6570
+label.number.of.zones=\u533a\u57df\u6570\u91cf
+label.num.cpu.cores=CPU \u5185\u6838\u6570
+label.numretries=\u91cd\u8bd5\u6b21\u6570
+label.ocfs2=OCFS2
+label.offer.ha=\u63d0\u4f9b\u9ad8\u53ef\u7528\u6027
+label.ok=\u786e\u5b9a
+label.optional=\u53ef\u9009\u7684
+label.order=\u6392\u5e8f
+label.os.preference=\u64cd\u4f5c\u7cfb\u7edf\u9996\u9009\u9879
+label.os.type=\u64cd\u4f5c\u7cfb\u7edf\u7c7b\u578b
+label.owned.public.ips=\u62e5\u6709\u7684\u516c\u7528 IP \u5730\u5740\u6570
+label.owner.account=\u6240\u6709\u8005\u5e10\u6237
+label.owner.domain=\u6240\u6709\u8005\u57df
+label.parent.domain=\u7236\u57df
+label.password.enabled=\u5df2\u542f\u7528\u5bc6\u7801
+la

<TRUNCATED>

[29/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
fix CLOUDSTACK-1944 Destruction of a VM with StaticNAT/FW throws a NullPointerException during VM Expunge


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

Branch: refs/heads/ui-vm-affinity
Commit: 8ff442bbeb056f3da755b31019014ab6f5dd6525
Parents: 39f772e
Author: Mice Xia <mi...@tcloudcomputing.com>
Authored: Wed Apr 24 20:10:35 2013 +0800
Committer: Mice Xia <mi...@tcloudcomputing.com>
Committed: Wed Apr 24 20:11:18 2013 +0800

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8ff442bb/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 45b313f..f24288a 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -1520,6 +1520,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
 
         @Override
         public void run() {
+            UserContext.registerContext(_accountMgr.getSystemUser().getId(), _accountMgr.getSystemAccount(), null, false);
             GlobalLock scanLock = GlobalLock.getInternLock("UserVMExpunge");
             try {
                 if (scanLock.lock(ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_COOPERATION)) {


[31/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
Convert zh_CH (chinese) resource file to ASCII with unicode, merge with 4.1 files, synchronize with transifex 4.2 resources file


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

Branch: refs/heads/ui-vm-affinity
Commit: 2c271e0f1db88b10c31a7c257664bdf3045a1eae
Parents: 8ff442b
Author: Milamber <mi...@apache.org>
Authored: Wed Apr 24 13:54:47 2013 +0000
Committer: Milamber <mi...@apache.org>
Committed: Wed Apr 24 13:54:47 2013 +0000

----------------------------------------------------------------------
 .../classes/resources/messages_zh_CN.properties    | 2956 +++++++--------
 1 files changed, 1456 insertions(+), 1500 deletions(-)
----------------------------------------------------------------------



[26/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2114:Scale Up VM icon


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

Branch: refs/heads/ui-vm-affinity
Commit: 403f7b5b87170009ce6ba08848e6409747382608
Parents: 4b7fe3b
Author: Pranav Saxena <pr...@citrix.com>
Authored: Wed Apr 24 14:34:36 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Wed Apr 24 14:34:36 2013 +0530

----------------------------------------------------------------------
 ui/css/cloudstack3.css |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/403f7b5b/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 1140d91..85f7dff 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -11889,18 +11889,21 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
   background-position: -168px -31px;
 }
 
-.reset .icon,
-.scaleUp .icon {
+.reset .icon {
   background-position: -168px -31px;
 }
 
+.scaleUp .icon{
+   background-position: -167px -66px;
+
+}
+
 .restoreVM:hover .icon,
 .restore:hover .icon {
   background-position: -168px -613px;
 }
 
-.reset:hover .icon,
-.scaleUp:hover .icon {
+.reset:hover .icon {
   background-position: -168px -613px;
 }
 


[03/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-1617: cloudstack UI - IPv6 - zone wizard - hide IPv6 DNS 1, IPv6 DNS2 when Advanced SG-Enabled mode is selected.


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

Branch: refs/heads/ui-vm-affinity
Commit: b9d8955f4d9467467baa33416c4f939bdb76e08b
Parents: 2790069
Author: Jessica Wang <je...@apache.org>
Authored: Mon Apr 22 14:24:03 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Mon Apr 22 14:24:03 2013 -0700

----------------------------------------------------------------------
 ui/scripts/zoneWizard.js |   29 ++++++++++++++++++-----------
 1 files changed, 18 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b9d8955f/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index aa2c2fa..b282585 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -323,23 +323,30 @@
         preFilter: function(args) {
           var $form = args.$form;
 
-          if (args.data['network-model'] == 'Basic') {
+          if (args.data['network-model'] == 'Basic') { //Basic zone
             args.$form.find('[rel=networkOfferingId]').show();
             args.$form.find('[rel=guestcidraddress]').hide();						
-						args.$form.find('[rel=ip6dns1]').hide();
-						args.$form.find('[rel=ip6dns2]').hide();
+	    
+            args.$form.find('[rel=ip6dns1]').hide();
+	    args.$form.find('[rel=ip6dns2]').hide();
           }
-          else { //args.data['network-model'] == 'Advanced'
+          else { //Advanced zone
             args.$form.find('[rel=networkOfferingId]').hide();
 						
-						if(args.data["zone-advanced-sg-enabled"] !=	"on")
+	    if(args.data["zone-advanced-sg-enabled"] !=	"on") { //Advanced SG-disabled zone
               args.$form.find('[rel=guestcidraddress]').show();
-						else //args.data["zone-advanced-sg-enabled"] ==	"on
-						  args.$form.find('[rel=guestcidraddress]').hide();
-          					  
-						args.$form.find('[rel=ip6dns1]').show();
-						args.$form.find('[rel=ip6dns2]').show();
-					}													
+              					  
+	      args.$form.find('[rel=ip6dns1]').show();
+	      args.$form.find('[rel=ip6dns2]').show();
+            }
+	    else { //Advanced SG-enabled zone
+	      args.$form.find('[rel=guestcidraddress]').hide();
+
+              args.$form.find('[rel=ip6dns1]').hide();
+	      args.$form.find('[rel=ip6dns2]').hide();
+            }
+          
+	  }													
 										
           setTimeout(function() {
             if ($form.find('input[name=ispublic]').is(':checked')) {


[10/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2154: create account command returns user response

Fix the annotation so cloudmonkey, marvin and apidocs can process the
response of createAccount as AccountResponse and not UserResponse as was
previously mapped.

Signed-off-by: Prasanna Santhanam <ts...@apache.org>


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

Branch: refs/heads/ui-vm-affinity
Commit: 2712ddda26551117fea0149a7a5f7aceeedac3b1
Parents: 9abc21c
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Tue Apr 23 20:38:14 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Tue Apr 23 22:21:42 2013 +0530

----------------------------------------------------------------------
 .../command/admin/account/CreateAccountCmd.java    |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2712ddda/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java
index 95d0d07..cc74eb2 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java
@@ -16,9 +16,9 @@
 // under the License.
 package org.apache.cloudstack.api.command.admin.account;
 
-import java.util.Collection;
-import java.util.Map;
-
+import com.cloud.user.Account;
+import com.cloud.user.UserAccount;
+import com.cloud.user.UserContext;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiErrorCode;
@@ -27,14 +27,12 @@ import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.AccountResponse;
 import org.apache.cloudstack.api.response.DomainResponse;
-import org.apache.cloudstack.api.response.UserResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.user.Account;
-import com.cloud.user.UserAccount;
-import com.cloud.user.UserContext;
+import java.util.Collection;
+import java.util.Map;
 
-@APICommand(name = "createAccount", description="Creates an account", responseObject=UserResponse.class)
+@APICommand(name = "createAccount", description="Creates an account", responseObject=AccountResponse.class)
 public class CreateAccountCmd extends BaseCmd {
     public static final Logger s_logger = Logger.getLogger(CreateAccountCmd.class.getName());
 


[15/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2120 - mixed zone management - extend listIsos API to return zone type.


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

Branch: refs/heads/ui-vm-affinity
Commit: 6230e5b77bf701494e3b416a5b7cd04adacfcd24
Parents: f7f1279
Author: Jessica Wang <je...@apache.org>
Authored: Tue Apr 23 13:46:36 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Apr 23 13:46:36 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiResponseHelper.java |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6230e5b7/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 0b996c9..f4567c0 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -1738,6 +1738,7 @@ public class ApiResponseHelper implements ResponseGenerator {
         if (datacenter != null) {
             isoResponse.setZoneId(datacenter.getUuid());
             isoResponse.setZoneName(datacenter.getName());
+            isoResponse.setZoneType(datacenter.getNetworkType().toString());
         }
 
         // If the user is an admin, add the template download status


[41/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-1910: cloudstack UI - Regions menu - GSLB - assigned load balancing - display assigned load balancing in listView and exclude assigned one from LB dropdown in Assign more load balancing dialog.


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

Branch: refs/heads/ui-vm-affinity
Commit: 8f5d8d505243372d241e1ce90a16cbaa9991c1d2
Parents: 1c89bc7
Author: Jessica Wang <je...@apache.org>
Authored: Wed Apr 24 14:55:50 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Wed Apr 24 14:57:47 2013 -0700

----------------------------------------------------------------------
 ui/scripts/regions.js |  111 +++++++++++++++++++++++---------------------
 1 files changed, 58 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f5d8d50/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index ef6f976..334eb26 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -382,7 +382,7 @@
 										
 					detailView: {
             name: 'GSLB details',
-            viewAll: { path: 'regions.lbUnderGSLB', label: 'load balancer rules' },
+            viewAll: { path: 'regions.lbUnderGSLB', label: 'assigned load balancing' },
             actions: {              
 							remove: {
                 label: 'delete GSLB',
@@ -452,77 +452,82 @@
         }
       },
 						
-			lbUnderGSLB: {
+     lbUnderGSLB: {
         id: 'lbUnderGSLB',
         type: 'select',
-        title: 'assigned load balancer rules',
+        title: 'assigned load balancing',
         listView: {
           section: 'lbUnderGSLB',
           id: 'lbUnderGSLB',
-          label: 'assigned load balancer rules',
+          label: 'assigned load balancing',
           fields: {
-            name: { label: 'label.name' },
+            'name': { label: 'label.name' },
             publicport: { label: 'label.public.port' },
-						privateport: { label: 'label.private.port' },
-						algorithm: { label: 'label.algorithm' }
+	    privateport: { label: 'label.private.port' },
+	    algorithm: { label: 'label.algorithm' }
           },					
-					dataProvider: function(args) {					
-						var data = {
-						  globalloadbalancerruleid: args.context.GSLB[0].id,
-						  listAll: true
-						};
-            $.ajax({
-              url: createURL('listLoadBalancerRules'),
-							data: data,
-              success: function(json) {
-                var items = json.listloadbalancerrulesresponse.loadbalancerrule;
-                args.response.success({								 
-                  data: items
-                });
-              }
+	  dataProvider: function(args) {					
+	    var items = args.context.GSLB[0].loadbalancerrule;
+            args.response.success({								 
+              data: items
             });
           },	        
-					actions: {            
+	  actions: {            
             add: {
-              label: 'assign load balancer rule to GSLB',
-              messages: {
-                confirm: function(args) {
-                  return 'Please confirm you want to assign load balancer rule to GSLB';
-                },
+              label: 'assign more load balancing',
+              messages: {                
                 notification: function(args) {
-                  return 'assign load balancer rule to GSLB';
+                  return 'assign more load balancing';
                 }
               },
               createForm: {
-                title: 'assign load balancer rule to GSLB',              
+                title: 'assign more load balancing',              
                 fields: {                  
                   loadbalancerrule: {
-                    label: 'load balancer rule',                    
+                    label: 'load balancing rule',                    
                     select: function(args) {		
-											var data = {
-												globalloadbalancerruleid: args.context.GSLB[0].id,
-												listAll: true
-											};
-											$.ajax({
-												url: createURL('listLoadBalancerRules'),
-												data: data,
-												success: function(json) {
-													var items = json.listloadbalancerrulesresponse.loadbalancerrule;
-													args.response.success({								 
-														data: items,
-														descriptionField: 'name'
-													});													
-												}
-											});																						
+		      var data = {
+			globalloadbalancerruleid: args.context.GSLB[0].id,
+			listAll: true
+		      };
+		      $.ajax({
+			url: createURL('listLoadBalancerRules'),
+			data: data,
+			success: function(json) {
+			  var allLbRules = json.listloadbalancerrulesresponse.loadbalancerrule;
+                          var assignedLbRules = args.context.GSLB[0].loadbalancerrule;
+                          var items = [];
+                          if(allLbRules != null) {
+                            for(var i = 0; i < allLbRules.length; i++) {  
+                              var isAssigned = false;                            
+                              if(assignedLbRules != null) {
+                                for(var k = 0; k < assignedLbRules.length; k++) {
+                                  if(allLbRules[i].id == assignedLbRules[k].id) {
+                                    isAssigned = true;
+                                    break; 
+                                  }
+                                }
+                              }
+                              if(isAssigned == false) {
+                                items.push(allLbRules[i]);
+                              }
+                            }
+                          }                        
+			  args.response.success({								 
+			    data: items,
+			    descriptionField: 'name'
+			  });													
+			}
+		      });																						
                     }
                   }  
                 }
               },
               action: function(args) {							  
-								var data = {
-								  id: args.context.GSLB[0].id,
-									loadbalancerrulelist: args.data.loadbalancerrule
-								};			
+		var data = {
+		  id: args.context.GSLB[0].id,
+		  loadbalancerrulelist: args.data.loadbalancerrule
+		};			
                 $.ajax({
                   url: createURL('assignToGlobalLoadBalancerRule'),
                   data: data,                 
@@ -547,16 +552,16 @@
 					},						
 									
 					detailView: {
-            name: 'load balancer rule details',            
+            name: 'load balancing details',            
             actions: {              
               remove: {
-                label: 'remove load balancer rule from this GSLB',
+                label: 'remove load balancing from this GSLB',
                 messages: {
                   notification: function() { 
-									  return 'remove load balancer rule from GSLB'; 
+									  return 'remove load balancing from GSLB'; 
 									},
                   confirm: function() { 
-									  return 'Please confirm you want to remove load balancer rule from GSLB'; 
+									  return 'Please confirm you want to remove load balancing from GSLB'; 
 									}
                 },               
                 action: function(args) {								                


[28/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2161 updated cloud-early-config to copy iptables-* to rules.v4

In iptables-persistent, iptables-restore is loading config from the /etc/iptables/rule.v4

Signed-off-by: Abhinandan Prateek <ap...@apache.org>


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

Branch: refs/heads/ui-vm-affinity
Commit: 39f772eee81863ec51fb1a2668c85e863167182f
Parents: 762977d
Author: Jayapal <ja...@citrix.com>
Authored: Wed Apr 24 12:49:59 2013 +0530
Committer: Abhinandan Prateek <ap...@apache.org>
Committed: Wed Apr 24 15:25:15 2013 +0530

----------------------------------------------------------------------
 .../debian/config/etc/init.d/cloud-early-config    |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/39f772ee/patches/systemvm/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
index b8ddaf1..4b3cb5f 100755
--- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config
+++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
@@ -691,7 +691,7 @@ setup_router() {
   disable_rpfilter_domR
   enable_fwding 1
   chkconfig nfs-common off
-  cp /etc/iptables/iptables-router /etc/iptables/rules
+  cp /etc/iptables/iptables-router /etc/iptables/rules.v4
   setup_sshd $ETH1_IP "eth1"
 }
 
@@ -763,7 +763,7 @@ EOF
   enable_svc cloud 0
   disable_rpfilter
   enable_fwding 1
-  cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules
+  cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4
   setup_sshd $ETH0_IP "eth0"
   cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf
   cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules
@@ -789,7 +789,7 @@ setup_dhcpsrvr() {
   enable_svc cloud 0
   enable_fwding 0
   chkconfig nfs-common off
-  cp /etc/iptables/iptables-router /etc/iptables/rules
+  cp /etc/iptables/iptables-router /etc/iptables/rules.v4
   if [ "$SSHONGUEST" == "true" ]
   then
     setup_sshd $ETH0_IP "eth0"
@@ -824,7 +824,7 @@ setup_secstorage() {
   [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP
   echo "$public_ip $NAME" >> /etc/hosts
 
-  cp /etc/iptables/iptables-secstorage /etc/iptables/rules
+  cp /etc/iptables/iptables-secstorage /etc/iptables/rules.v4
   if [ "$hyp" == "vmware" ]; then
     setup_sshd $ETH1_IP "eth1"
   else
@@ -848,7 +848,7 @@ setup_console_proxy() {
   [ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH1_IP
   sed -i  /gateway/d /etc/hosts
   echo "$public_ip $NAME" >> /etc/hosts
-  cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules
+  cp /etc/iptables/iptables-consoleproxy /etc/iptables/rules.v4
   if [ "$hyp" == "vmware" ]; then
     setup_sshd $ETH1_IP "eth1"
   else
@@ -873,7 +873,7 @@ setup_elbvm() {
   [ "$ETH2_IP" == "0.0.0.0" ] || [ "$ETH2_IP" == "" ] && public_ip=$ETH0_IP
   echo "$public_ip $NAME" >> /etc/hosts
 
-  cp /etc/iptables/iptables-elbvm /etc/iptables/rules
+  cp /etc/iptables/iptables-elbvm /etc/iptables/rules.v4
   if [ "$SSHONGUEST" == "true" ]
   then
     setup_sshd $ETH0_IP "eth0"


[25/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2151:Vlan values in the UI Detail view are not updated properly


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

Branch: refs/heads/ui-vm-affinity
Commit: 4b7fe3bc29ae847ca9622bf9df5860169f8622f0
Parents: fa7049a
Author: Pranav Saxena <pr...@citrix.com>
Authored: Wed Apr 24 14:21:39 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Wed Apr 24 14:21:39 2013 +0530

----------------------------------------------------------------------
 ui/scripts/system.js |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b7fe3bc/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index b2bd42b..50dd66d 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -1110,23 +1110,24 @@
                 preFilter: function(args) {
                   var hiddenFields = [];
                   if(selectedZoneObj.networktype == "Basic") {
-                    hiddenFields.push("startVlan");
-                    hiddenFields.push("endVlan");
+                    hiddenFields.push("vlan");
+                   // hiddenFields.push("endVlan");
                   }
                   return hiddenFields;
                 },
                 fields: [
                   { //updatePhysicalNetwork API
                     state: { label: 'label.state' },
-                    startVlan: {
-                      label: 'label.start.vlan',
+                    vlan: {
+                      label: 'VLAN Range(s)',
                       isEditable: true
                     },
-                    endVlan: {
+                  /*  endVlan: {
                       label: 'label.end.vlan',
                       isEditable: true
-                    },
-										tags: { label: 'Tags', isEditable: true },
+                    },*/
+
+		    tags: { label: 'Tags', isEditable: true },
                     broadcastdomainrange: { label: 'label.broadcast.domain.range' }
                   },
                   { //updateTrafficType API
@@ -1148,9 +1149,9 @@
 										success: function(json) {										  
 											selectedPhysicalNetworkObj = json.listphysicalnetworksresponse.physicalnetwork[0];			
 											
-											var startVlan, endVlan;
+										//	var startVlan, endVlan;
 											var vlan = selectedPhysicalNetworkObj.vlan;
-											if(vlan != null && vlan.length > 0) {
+									 	/*	if(vlan != null && vlan.length > 0) {
 												if(vlan.indexOf("-") != -1) {
 													var vlanArray = vlan.split("-");
 													startVlan = vlanArray[0];
@@ -1161,7 +1162,7 @@
 												}
 												selectedPhysicalNetworkObj["startVlan"] = startVlan;
 												selectedPhysicalNetworkObj["endVlan"] = endVlan;
-											}
+											}*/
 
 											//traffic type
 											var xentrafficlabel, kvmtrafficlabel, vmwaretrafficlabel;


[39/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
Detail: Delete KVMHA dir contents if found when deleting templates, volumes
from Nfs Secondary storage

BUG-ID: CLOUDSTACK-2173
Bugfix-for: 4.2
Signed-off-by: Marcus Sorensen <ma...@betterservers.com> 1366838425 -0600


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

Branch: refs/heads/ui-vm-affinity
Commit: 7fa57922a40428d73e80f5f2a48ff67c8cecd148
Parents: d893ba8
Author: Marcus Sorensen <ma...@betterservers.com>
Authored: Wed Apr 24 15:20:25 2013 -0600
Committer: Marcus Sorensen <ma...@betterservers.com>
Committed: Wed Apr 24 15:20:25 2013 -0600

----------------------------------------------------------------------
 .../resource/NfsSecondaryStorageResource.java      |   22 +++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7fa57922/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java b/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index 1176d76..638d5ca 100755
--- a/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++ b/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -1291,6 +1291,17 @@ SecondaryStorageResource {
                 if (!found && f.getName().equals("template.properties")) {
                     found = true;
                 }
+
+                // KVM HA monitor makes a mess in the templates with its heartbeat tests
+                // Don't let this stop us from cleaning up the template
+                if (f.isDirectory() && f.getName().equals("KVMHA")) {
+                    s_logger.debug("Deleting KVMHA directory contents from template location");
+                    File[] haFiles = f.listFiles();
+                    for (File haFile : haFiles) {
+                        haFile.delete();
+                    }
+                }
+
                 if (!f.delete()) {
                     return new Answer(cmd, false, "Unable to delete file " + f.getName() + " under Template path "
                             + relativeTemplatePath);
@@ -1339,6 +1350,17 @@ SecondaryStorageResource {
                 if (!found && f.getName().equals("volume.properties")) {
                     found = true;
                 }
+
+                // KVM HA monitor makes a mess in the templates with its heartbeat tests
+                // Don't let this stop us from cleaning up the template
+                if (f.isDirectory() && f.getName().equals("KVMHA")) {
+                    s_logger.debug("Deleting KVMHA directory contents from template location");
+                    File[] haFiles = f.listFiles();
+                    for (File haFile : haFiles) {
+                        haFile.delete();
+                    }
+                }
+
                 if (!f.delete()) {
                     return new Answer(cmd, false, "Unable to delete file " + f.getName() + " under Volume path "
                             + relativeVolumePath);


[38/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2120: mixed zone management - (1) extend listVolumes API to to take in zonetype. (2) UI: populate Volumes list page with instances whose zonetype matches selected option in zone type dropdown on top menu.


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

Branch: refs/heads/ui-vm-affinity
Commit: d893ba881b6ea00de00910a0d5f259b1397e16de
Parents: 435f4bc
Author: Jessica Wang <je...@apache.org>
Authored: Wed Apr 24 11:26:43 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Wed Apr 24 11:26:58 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/api/command/user/vm/ListVMsCmd.java |    3 +--
 .../api/command/user/volume/ListVolumesCmd.java    |    7 +++++++
 .../src/com/cloud/api/query/QueryManagerImpl.java  |    5 +++++
 ui/scripts/storage.js                              |   12 +++++++++---
 4 files changed, 22 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d893ba88/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
index d93d657..b2a2ce0 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
@@ -75,8 +75,7 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
     @Parameter(name=ApiConstants.STATE, type=CommandType.STRING, description="state of the virtual machine")
     private String state;
 
-    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class,
-            description="the availability zone ID")
+    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class, description="the availability zone ID")
     private Long zoneId;
 
     @Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d893ba88/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java
index 4c78eed..91316b0 100644
--- a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java
@@ -67,6 +67,9 @@ public class ListVolumesCmd extends BaseListTaggedResourcesCmd {
             description="the ID of the availability zone")
     private Long zoneId;
 
+    @Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
+    private String zoneType;
+    
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -100,6 +103,10 @@ public class ListVolumesCmd extends BaseListTaggedResourcesCmd {
         return zoneId;
     }
 
+    public String getZoneType() {
+        return zoneType;
+    }
+    
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d893ba88/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 d0b4237..ea260c3 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -1522,6 +1522,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         Map<String, String> tags = cmd.getTags();
 
         Long zoneId = cmd.getZoneId();
+        String zoneType = cmd.getZoneType();
         Long podId = null;
         if (_accountMgr.isAdmin(caller.getType())) {
             podId = cmd.getPodId();
@@ -1549,6 +1550,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         sb.and("volumeType", sb.entity().getVolumeType(), SearchCriteria.Op.LIKE);
         sb.and("instanceId", sb.entity().getVmId(), SearchCriteria.Op.EQ);
         sb.and("dataCenterId", sb.entity().getDataCenterId(), SearchCriteria.Op.EQ);
+        sb.and("dataCenterType", sb.entity().getDataCenterType(), SearchCriteria.Op.EQ);
         sb.and("podId", sb.entity().getPodId(), SearchCriteria.Op.EQ);
         // Only return volumes that are not destroyed
         sb.and("state", sb.entity().getState(), SearchCriteria.Op.NEQ);
@@ -1608,6 +1610,9 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         if (zoneId != null) {
             sc.setParameters("dataCenterId", zoneId);
         }
+        if (zoneType != null) {
+        	sc.setParameters("dataCenterType", zoneType);
+        }
         if (podId != null) {
             sc.setParameters("podId", podId);
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d893ba88/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index 1acc9c7..cf40769 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -398,12 +398,18 @@
            
             if(args.context != null) {
               if("instances" in args.context) {
-							  $.extend(data, {
-								  virtualMachineId: args.context.instances[0].id
-								});
+		$.extend(data, {
+		  virtualMachineId: args.context.instances[0].id
+		});
               }
             }
 
+            if(args.context.zoneType != null && args.context.zoneType.length > 0) { //Basic type or Advanced type
+              $.extend(data, {
+                zonetype: args.context.zoneType
+              });
+            }
+
             $.ajax({
               url: createURL('listVolumes'),
               data: data,             


[34/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-804 ui changes


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

Branch: refs/heads/ui-vm-affinity
Commit: 7e5fd88f7c1d5072c774d5278229de2a76d6da78
Parents: f65f3b9
Author: Radhika PC <ra...@citrix.com>
Authored: Wed Apr 24 17:54:21 2013 +0530
Committer: unknown <ra...@BANLRADHIKAP.citrite.net>
Committed: Wed Apr 24 22:08:19 2013 +0530

----------------------------------------------------------------------
 docs/en-US/images/add-vlan-icon.png |  Bin 0 -> 860 bytes
 docs/en-US/non-contiguous-vlan.xml  |   68 ++++++++++++++++++++++++++++++
 docs/en-US/vlan-provisioning.xml    |    2 +
 3 files changed, 70 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e5fd88f/docs/en-US/images/add-vlan-icon.png
----------------------------------------------------------------------
diff --git a/docs/en-US/images/add-vlan-icon.png b/docs/en-US/images/add-vlan-icon.png
new file mode 100644
index 0000000..04655dc
Binary files /dev/null and b/docs/en-US/images/add-vlan-icon.png differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e5fd88f/docs/en-US/non-contiguous-vlan.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/non-contiguous-vlan.xml b/docs/en-US/non-contiguous-vlan.xml
new file mode 100644
index 0000000..79fac83
--- /dev/null
+++ b/docs/en-US/non-contiguous-vlan.xml
@@ -0,0 +1,68 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
+%BOOK_ENTITIES;
+]>
+
+<!-- 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.
+-->
+<section id="non-contiguous-vlan">
+  <title>Non Contiguous VLAN Ranges</title>
+  <para>&PRODUCT; provides you with the flexibility to add non contiguous VLAN ranges to your
+    network. The administrator can either update an existing VLAN range or add multiple non
+    contiguous VLAN ranges while creating a zone. You can also use the UpdatephysicalNetwork API to
+    extend the VLAN range.</para>
+  <section id="add-vlan-range">
+    <title>Adding a New VLAN Range</title>
+    <orderedlist>
+      <listitem><para>Log in to the CloudPlatform UI as an administrator or end user.</para></listitem>
+      <listitem>
+        <para>Ensure that the VLAN range does not already exist.</para>
+      </listitem>
+      <listitem>
+        <para>Check whether the new VLAN range overlaps with any existing ones. If overlaps, extend
+          the existing range. If does not overlap, add the new range.</para>
+      </listitem>
+      <listitem>
+        <para>In the left navigation, choose Infrastructure. On Zones, click View More, then click the zone to
+          which you want to work with.</para>
+      </listitem>
+      <listitem>
+        <para>Click Physical Network.</para>
+      </listitem>
+      <listitem>
+        <para>In the Guest node of the diagram, click Configure.</para>
+      </listitem>
+      <listitem>
+        <para>Click Add VLAN Ranges button <inlinemediaobject>
+            <imageobject>
+              <imagedata fileref="./images/add-vlan-icon.png"/>
+            </imageobject>
+            <textobject>
+              <phrase>add-vlan-ico.png: button to add a VLAN range.</phrase>
+            </textobject>
+          </inlinemediaobject></para>
+        <para>The Add VLAN Ranges dialog is displayed.</para>
+      </listitem>
+      <listitem>
+        <para>Specify the start and end of the VLAN range.</para>
+      </listitem>
+      <listitem>
+      <para>Click OK.</para>
+      </listitem>
+    </orderedlist>
+  </section>
+</section>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e5fd88f/docs/en-US/vlan-provisioning.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/vlan-provisioning.xml b/docs/en-US/vlan-provisioning.xml
index 9345647..d37be16 100644
--- a/docs/en-US/vlan-provisioning.xml
+++ b/docs/en-US/vlan-provisioning.xml
@@ -40,4 +40,6 @@
     different physical NIC and use the same set of VLANs if you run out of VLANs. Another advantage
     is that you can use the same set of IPs for different customers, each one with their own routers
     and the guest networks on different physical NICs.</para>
+  <xi:include href="vlan-allocation-eg.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+  <xi:include href="non-contiguous-vlan.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 </section>


[40/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
regression, need to modify iptables rules in rules.v4


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

Branch: refs/heads/ui-vm-affinity
Commit: 1c89bc78fd02f394f933a6bc0f8c2e029b8d514d
Parents: 7fa5792
Author: Edison Su <su...@gmail.com>
Authored: Wed Apr 24 14:52:44 2013 -0700
Committer: Edison Su <su...@gmail.com>
Committed: Wed Apr 24 14:52:44 2013 -0700

----------------------------------------------------------------------
 .../debian/config/etc/init.d/cloud-early-config    |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1c89bc78/patches/systemvm/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
index 4b3cb5f..187ae25 100755
--- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config
+++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
@@ -519,7 +519,7 @@ setup_sshd(){
   local ip=$1
   local eth=$2
   [ -f /etc/ssh/sshd_config ] && sed -i -e "s/^[#]*ListenAddress.*$/ListenAddress $ip/" /etc/ssh/sshd_config
-  sed -i "/3922/s/eth./$eth/" /etc/iptables/rules
+  sed -i "/3922/s/eth./$eth/" /etc/iptables/rules.v4
 }
 
 


[21/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2166:UI Support for remove Vlan for the non-contiguous vlan support


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

Branch: refs/heads/ui-vm-affinity
Commit: 94d5d3de50cd8d8e9de9703e5874d41a46466109
Parents: 932946b
Author: Pranav Saxena <pr...@citrix.com>
Authored: Wed Apr 24 12:40:38 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Wed Apr 24 12:40:38 2013 +0530

----------------------------------------------------------------------
 ui/css/cloudstack3.css |   11 ++++++++++
 ui/scripts/system.js   |   46 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 55 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/94d5d3de/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 1d5d72b..1140d91 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -11853,6 +11853,17 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
   background-position: -37px -62px;
 }
 
+.removeVlanRange .icon {
+
+  background-position: 1px -92px;
+}
+
+.removeVlanRange:hover .icon{
+
+  background-position: 1px -92px;
+}
+
+
 .resize .icon,
 .updateResourceCount .icon {
   background-position: -167px -66px;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/94d5d3de/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 2058065..4f5925c 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -1036,8 +1036,50 @@
                  notification:{poll:pollAsyncJobResult}
 
 
-               }
+               },
+
+                removeVlanRange:{
+                  label:'Remove VLAN Range',
+                   messages: {
+                        confirm: function(args) {
+                          return 'Are you sure you want to remove an existing VLAN Range from this guest network?';
+                        },
+                        notification: function(args) {
+                          return 'VLAN Range removed';
+                        }
+                      },
 
+                   createForm:{
+                       title:'Remove VLAN Range',
+                       fields:{
+                         startvlan: {label:'Vlan Start', validation:{required:true}},
+                         endvlan:{label:'Vlan End', validation:{required:true}}
+                       }
+
+                    },
+
+                  action:function(args){
+
+                  var array1=[];
+                  if(args.data.startvlan != "" && args.data.endvlan != ""){
+                    array1.push("&removevlan=" + args.data.startvlan + "-" +  args.data.endvlan);
+                  }
+                  $.ajax({
+                    url: createURL("updatePhysicalNetwork&id=" + selectedPhysicalNetworkObj.id + array1.join("")),
+                    dataType: "json",
+                    success: function(json) {
+                      var jobId = json.updatephysicalnetworkresponse.jobid;
+                      var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Guest');
+                      updateTrafficLabels(trafficType, args.data, function() {
+                        args.response.success({ _custom: { jobId: jobId }});
+                      });
+                   }
+                  });
+
+                  },
+                 notification:{poll:pollAsyncJobResult}
+
+               }
  
             },
 
@@ -1120,7 +1162,7 @@
 
 											args.response.success({
 												actionFilter: function() {
-													var allowedActions = ['edit' , 'addVlanRange'];
+													var allowedActions = ['edit' , 'addVlanRange','removeVlanRange'];
 													return allowedActions;
 												},
 												data: selectedPhysicalNetworkObj


[05/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-1561. Docs. Update VM Snapshots section.


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

Branch: refs/heads/ui-vm-affinity
Commit: e23d6b2af414a5789800a5b848f1a527dfdf66ce
Parents: b2b8f0e
Author: Jessica Tomechak <je...@gmail.com>
Authored: Mon Apr 22 23:07:29 2013 -0700
Committer: Jessica Tomechak <je...@gmail.com>
Committed: Mon Apr 22 23:08:10 2013 -0700

----------------------------------------------------------------------
 docs/en-US/vm-snapshots.xml |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e23d6b2a/docs/en-US/vm-snapshots.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/vm-snapshots.xml b/docs/en-US/vm-snapshots.xml
index 8d4bcf9..3e72fe4 100644
--- a/docs/en-US/vm-snapshots.xml
+++ b/docs/en-US/vm-snapshots.xml
@@ -24,8 +24,8 @@
 <section id="vm-snapshots">
   <title>Virtual Machine Snapshots for VMware</title>
   <para>(VMware hosts only)
-    In addition to the existing &PRODUCT; ability to snapshot VM volumes,
-    you can now take a VM snapshot to preserve all of the VM's state and data.
+    In addition to the existing &PRODUCT; ability to snapshot individual VM volumes,
+    you can now take a VM snapshot to preserve all the VM's data volumes as well as (optionally) its CPU/memory state.
     This is useful for quick restore of a VM.
     For example, you can snapshot a VM, then make changes such as software upgrades.
     If anything goes wrong, simply restore the VM to its previous state using the previously saved VM snapshot.
@@ -51,7 +51,9 @@
       <listitem><para>If a VM has some stored snapshots, you can't attach new volume to the VM
         or delete any existing volumes.
         If you change the volumes on the VM, it would become impossible to restore the VM snapshot
-        which was created with the previous volume structure.</para></listitem>
+        which was created with the previous volume structure.
+        If you want to attach a volume to such a VM, first delete its snapshots.
+      </para></listitem>
       <listitem><para>VM snapshots which include both data volumes and memory can't be kept if you change the VM's
         service offering. Any existing VM snapshots of this type will be discarded.</para></listitem>
       <listitem>
@@ -72,7 +74,7 @@
   <section id="vm-snapshot-configure">
     <title>Configuring VM Snapshots</title>
     <para>The cloud administrator can use global configuration variables to control the behavior of VM snapshots.
-      To set these variables, go through the Global Settings are of the UI.</para>
+      To set these variables, go through the Global Settings area of the &PRODUCT; UI.</para>
     <informaltable>
       <tgroup cols="2" align="left" colsep="1" rowsep="1">
         <thead>


[24/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2166:UI Support for remove Vlan for the non-contiguous vlan support:Exception handling


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

Branch: refs/heads/ui-vm-affinity
Commit: fa7049a5838b2d1c5436cfd8fb13c1a1cf884d88
Parents: 4e9e793
Author: Pranav Saxena <pr...@citrix.com>
Authored: Wed Apr 24 14:02:30 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Wed Apr 24 14:02:30 2013 +0530

----------------------------------------------------------------------
 ui/scripts/system.js |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fa7049a5/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 4f5925c..b2bd42b 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -1028,7 +1028,13 @@
                       updateTrafficLabels(trafficType, args.data, function() {
                         args.response.success({ _custom: { jobId: jobId }});
                       });
+                   },
+
+                    error:function(json){
+                      args.response.error(parseXMLHttpResponse(json));
+
                    }
+
                   });
 
 
@@ -1073,7 +1079,13 @@
                       updateTrafficLabels(trafficType, args.data, function() {
                         args.response.success({ _custom: { jobId: jobId }});
                       });
+                   },
+
+                   error:function(json){
+                      args.response.error(parseXMLHttpResponse(json));
+
                    }
+
                   });
 
                   },


[13/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2120: mixed zone management - extend listNetworks API to return zone type.


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

Branch: refs/heads/ui-vm-affinity
Commit: 16ba999bf1102938779f0b773984695b75ccd77e
Parents: 35e2072
Author: Jessica Wang <je...@apache.org>
Authored: Tue Apr 23 12:25:34 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Apr 23 13:01:55 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/api/response/NetworkResponse.java   |    7 +++++++
 server/src/com/cloud/api/ApiResponseHelper.java    |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16ba999b/api/src/org/apache/cloudstack/api/response/NetworkResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/NetworkResponse.java b/api/src/org/apache/cloudstack/api/response/NetworkResponse.java
index cd32ded..3f366e2 100644
--- a/api/src/org/apache/cloudstack/api/response/NetworkResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/NetworkResponse.java
@@ -66,6 +66,9 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
 
     @SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone the network belongs to")
     private String zoneName;
+    
+    @SerializedName(ApiConstants.ZONE_TYPE) @Param(description="the networktype of the zone the network belongs to")
+    private String zoneType;
 
     @SerializedName("networkofferingid") @Param(description="network offering id the network is created from")
     private String networkOfferingId;
@@ -291,6 +294,10 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
         this.zoneName = zoneName;
     }
 
+    public void setZoneType(String zoneType) {
+        this.zoneType = zoneType;
+    }
+    
     public void setCidr(String cidr) {
         this.cidr = cidr;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/16ba999b/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index a7d6165..84dc46e 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -2354,6 +2354,7 @@ public class ApiResponseHelper implements ResponseGenerator {
         if (zone != null) {
             response.setZoneId(zone.getUuid());
             response.setZoneName(zone.getName());
+            response.setZoneType(zone.getNetworkType().toString());
         }
         if (network.getPhysicalNetworkId() != null) {
             PhysicalNetworkVO pnet = ApiDBUtils.findPhysicalNetworkById(network.getPhysicalNetworkId());


[14/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2120: mixed zone management - extend listVolumes API to return zone type.


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

Branch: refs/heads/ui-vm-affinity
Commit: 35e2072660d20b538bf6929d9c68eecb16ac8318
Parents: ba4b8f1
Author: Jessica Wang <je...@apache.org>
Authored: Tue Apr 23 11:23:49 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Apr 23 13:01:55 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/api/response/VolumeResponse.java    |    8 +
 .../com/cloud/api/query/dao/VolumeJoinDaoImpl.java |    3 +-
 .../src/com/cloud/api/query/vo/VolumeJoinVO.java   |   15 ++
 setup/db/db/schema-410to420.sql                    |  102 +++++++++++++++
 4 files changed, 127 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35e20726/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
index d5054f0..b928fcd 100644
--- a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
@@ -47,6 +47,10 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
     @SerializedName(ApiConstants.ZONE_NAME)
     @Param(description = "name of the availability zone")
     private String zoneName;
+    
+    @SerializedName(ApiConstants.ZONE_TYPE)
+    @Param(description = "network type of the availability zone")
+    private String zoneType;
 
     @SerializedName(ApiConstants.TYPE)
     @Param(description = "type of the disk volume (ROOT or DATADISK)")
@@ -198,6 +202,10 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
         this.zoneName = zoneName;
     }
 
+    public void setZoneType(String zoneType) {
+        this.zoneType = zoneType;
+    }
+    
     public void setVolumeType(String volumeType) {
         this.volumeType = volumeType;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35e20726/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
index 495c0eb..a7a0bf0 100644
--- a/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
@@ -86,7 +86,8 @@ public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO, Long> implem
 
         volResponse.setZoneId(volume.getDataCenterUuid());
         volResponse.setZoneName(volume.getDataCenterName());
-
+        volResponse.setZoneType(volume.getDataCenterType());
+        
         volResponse.setVolumeType(volume.getVolumeType().toString());
         volResponse.setDeviceId(volume.getDeviceId());
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35e20726/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
index 4f6b35b..8a4bfe5 100644
--- a/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/VolumeJoinVO.java
@@ -117,6 +117,9 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
 
     @Column(name="data_center_name")
     private String dataCenterName;
+    
+    @Column(name="data_center_type")
+    private String dataCenterType;
 
     @Column(name="vm_id")
     private long vmId;
@@ -1004,8 +1007,20 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
         this.dataCenterName = dataCenterName;
     }
 
+       
+        
+    public String getDataCenterType() {
+        return dataCenterType;
+    }
+
 
 
+    public void setDataCenterType(String dataCenterType) {
+        this.dataCenterType = dataCenterType;
+    }
+    
+    
+
     public long getPodId() {
         return podId;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35e20726/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index 10cdbba..ac52f53 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -544,6 +544,108 @@ CREATE VIEW `cloud`.`affinity_group_view` AS
             left join
         `cloud`.`user_vm` ON user_vm.id = vm_instance.id;
 
+DROP VIEW IF EXISTS `cloud`.`volume_view`;
+CREATE VIEW `cloud`.`volume_view` AS
+    select 
+        volumes.id,
+        volumes.uuid,
+        volumes.name,
+        volumes.device_id,
+        volumes.volume_type,
+        volumes.size,
+        volumes.created,
+        volumes.state,
+        volumes.attached,
+        volumes.removed,
+        volumes.pod_id,
+        account.id account_id,
+        account.uuid account_uuid,
+        account.account_name account_name,
+        account.type account_type,
+        domain.id domain_id,
+        domain.uuid domain_uuid,
+        domain.name domain_name,
+        domain.path domain_path,
+        projects.id project_id,
+        projects.uuid project_uuid,
+        projects.name project_name,
+        data_center.id data_center_id,
+        data_center.uuid data_center_uuid,
+        data_center.name data_center_name,
+        data_center.networktype data_center_type,
+        vm_instance.id vm_id,
+        vm_instance.uuid vm_uuid,
+        vm_instance.name vm_name,
+        vm_instance.state vm_state,
+        vm_instance.vm_type,
+        user_vm.display_name vm_display_name,
+        volume_host_ref.size volume_host_size,
+        volume_host_ref.created volume_host_created,
+        volume_host_ref.format,
+        volume_host_ref.download_pct,
+        volume_host_ref.download_state,
+        volume_host_ref.error_str,
+        disk_offering.id disk_offering_id,
+        disk_offering.uuid disk_offering_uuid,
+        disk_offering.name disk_offering_name,
+        disk_offering.display_text disk_offering_display_text,
+        disk_offering.use_local_storage,
+        disk_offering.system_use,
+        storage_pool.id pool_id,
+        storage_pool.uuid pool_uuid,
+        storage_pool.name pool_name,
+        cluster.hypervisor_type,
+        vm_template.id template_id,
+        vm_template.uuid template_uuid,
+        vm_template.extractable,
+        vm_template.type template_type,
+        resource_tags.id tag_id,
+        resource_tags.uuid tag_uuid,
+        resource_tags.key tag_key,
+        resource_tags.value tag_value,
+        resource_tags.domain_id tag_domain_id,
+        resource_tags.account_id tag_account_id,
+        resource_tags.resource_id tag_resource_id,
+        resource_tags.resource_uuid tag_resource_uuid,
+        resource_tags.resource_type tag_resource_type,
+        resource_tags.customer tag_customer,
+        async_job.id job_id,
+        async_job.uuid job_uuid,
+        async_job.job_status job_status,
+        async_job.account_id job_account_id
+    from
+        `cloud`.`volumes`
+            inner join
+        `cloud`.`account` ON volumes.account_id = account.id
+            inner join
+        `cloud`.`domain` ON volumes.domain_id = domain.id
+            left join
+        `cloud`.`projects` ON projects.project_account_id = account.id
+            left join
+        `cloud`.`data_center` ON volumes.data_center_id = data_center.id
+            left join
+        `cloud`.`vm_instance` ON volumes.instance_id = vm_instance.id
+            left join
+        `cloud`.`user_vm` ON user_vm.id = vm_instance.id
+            left join
+        `cloud`.`volume_host_ref` ON volumes.id = volume_host_ref.volume_id
+            and volumes.data_center_id = volume_host_ref.zone_id
+            left join
+        `cloud`.`disk_offering` ON volumes.disk_offering_id = disk_offering.id
+            left join
+        `cloud`.`storage_pool` ON volumes.pool_id = storage_pool.id
+            left join
+        `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id
+            left join
+        `cloud`.`vm_template` ON volumes.template_id = vm_template.id
+            left join
+        `cloud`.`resource_tags` ON resource_tags.resource_id = volumes.id
+            and resource_tags.resource_type = 'Volume'
+            left join
+        `cloud`.`async_job` ON async_job.instance_id = volumes.id
+            and async_job.instance_type = 'Volume'
+            and async_job.job_status = 0;                       
+        
 CREATE TABLE `cloud`.`external_cisco_vnmc_devices` (
   `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
   `uuid` varchar(255) UNIQUE,


[07/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
fix CLOUDSTACK-2142 migrateVirtua lMachine() API errors out when passing a valid uuid for storageid.


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

Branch: refs/heads/ui-vm-affinity
Commit: f6fb4d2f6a9abe6f00ce359691bfe843f6b88895
Parents: 7dd88fb
Author: Mice Xia <mi...@tcloudcomputing.com>
Authored: Tue Apr 23 14:44:59 2013 +0800
Committer: Mice Xia <mi...@tcloudcomputing.com>
Committed: Tue Apr 23 14:44:59 2013 +0800

----------------------------------------------------------------------
 .../api/command/admin/vm/MigrateVMCmd.java         |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f6fb4d2f/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java
index ddba78e..e9779ce 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java
@@ -58,7 +58,7 @@ public class MigrateVMCmd extends BaseAsyncCmd {
             required=true, description="the ID of the virtual machine")
     private Long virtualMachineId;
 
-    @Parameter(name=ApiConstants.STORAGE_ID, type=CommandType.LONG, entityType=StoragePoolResponse.class,
+    @Parameter(name=ApiConstants.STORAGE_ID, type=CommandType.UUID, entityType=StoragePoolResponse.class,
             required=false, description="Destination storage pool ID to migrate VM volumes to. Required for migrating the root disk volume")
     private Long storageId;
 


[23/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
Fix Vijay's test to use the marvin integratin libararies

Changes to marvin_request and base libraries to accomadate POST
requests.

Additional tests for sending userdata through GET Userdata tests - send
size>2k data via GET and POST.

Signed-off-by: Prasanna Santhanam <ts...@apache.org>


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

Branch: refs/heads/ui-vm-affinity
Commit: 4e9e7937ed5e56cbd7f678b2ed9863a56af16635
Parents: b0caae6
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Wed Apr 24 00:06:44 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Apr 24 13:43:08 2013 +0530

----------------------------------------------------------------------
 .../component/test_deploy_vm_with_userdata.py      |  108 -----------
 .../smoke/test_deploy_vm_with_userdata.py          |  144 +++++++++++++++
 tools/marvin/marvin/cloudstackConnection.py        |   34 ++--
 tools/marvin/marvin/codegenerator.py               |    4 +-
 tools/marvin/marvin/integration/lib/base.py        |   11 +-
 5 files changed, 165 insertions(+), 136 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e9e7937/test/integration/component/test_deploy_vm_with_userdata.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_deploy_vm_with_userdata.py b/test/integration/component/test_deploy_vm_with_userdata.py
deleted file mode 100644
index 6b5767b..0000000
--- a/test/integration/component/test_deploy_vm_with_userdata.py
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/usr/bin/env python
-
-import marvin
-from marvin import cloudstackTestCase
-from marvin.cloudstackTestCase import *
-from marvin.integration.lib.base import *
-
-import unittest
-import hashlib
-import random
-import os
-import string
-
-class TestDeployVmWithUserData(cloudstackTestCase):
-    """
-    This test deploys a virtual machine into a user account
-    using the small service offering and builtin template
-    """
-    def setUp(self):
-        password = "password"
-
-        self.apiClient = self.testClient.getApiClient() #Get ourselves an API client
-
-        self.acct = createAccount.createAccountCmd() #The createAccount command
-        self.acct.accounttype = 0                    #We need a regular user. admins have accounttype=1
-        self.acct.firstname = 'firstname'
-        self.acct.lastname = 'lastname'
-        self.acct.password = password
-        self.acct.username = 'user1'
-        self.acct.email = 'user1@user.com'
-        self.acct.account = 'user1'
-        self.acct.domainid = 1                       #The default ROOT domain
-        self.acctResponse = self.apiClient.createAccount(self.acct)
-
-        self.debug("Successfully created account: %s, user: %s, id: \
-                   %s"%(self.acctResponse.account.account, \
-                        self.acctResponse.account.username, \
-                        self.acctResponse.account.id))
-
-        # Generate userdata of 2500 bytes. This is larger than the 2048 bytes limit.
-        # CS however allows for upto 4K bytes in the code. So this must succeed.
-        # Overall, the query length must not exceed 4K, for then the json decoder
-        # will fail this operation at the marvin client side itself.
-        user_data = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(2500))
-
-        self.virtual_machine = {
-          "displayname": "Test VM",
-          "username": "root",
-          "password": "password",
-          "ssh_port": 22,
-          "hypervisor": 'VMware',
-          "privateport": 22,
-          "publicport": 22,
-          "protocol": 'TCP',
-        }
-        #self.virtual_machine["userdata"] = base64.b64encode(user_data)
-        self.virtual_machine["userdata"] = user_data
-
-    def test_DeployVm(self):
-        """
-        Let's start by defining the attributes of our VM that we will be
-        deploying on CloudStack. We will be assuming a single zone is available
-        and is configured and all templates are Ready
-        """
-        deployVmCmd = deployVirtualMachine.deployVirtualMachineCmd()
-        deployVmCmd.zoneid = 1
-        deployVmCmd.account = self.acct.account
-        deployVmCmd.domainid = self.acct.domainid
-        deployVmCmd.templateid = 7
-        deployVmCmd.serviceofferingid = 1
-
-        # Userdata is passed in the virtual_machine dictionary.
-        deployVmResponse = VirtualMachine.create(
-          self.apiClient,
-          self.virtual_machine,
-          accountid=self.acct.account,
-          domainid=self.acct.domainid,
-          serviceofferingid=deployVmCmd.serviceofferingid,
-          templateid=deployVmCmd.templateid,
-          zoneid=deployVmCmd.zoneid
-        )
-
-        # At this point our VM is expected to be Running. Let's find out what
-        # listVirtualMachines tells us about VMs in this account
-
-        listVmCmd = listVirtualMachines.listVirtualMachinesCmd()
-        listVmCmd.id = deployVmResponse.id
-        listVmResponse = self.apiClient.listVirtualMachines(listVmCmd)
-
-        self.assertNotEqual(len(listVmResponse), 0, "Check if the list API \
-                            returns a non-empty response")
-
-        vm = listVmResponse[0]
-
-        self.assertEqual(vm.id, deployVmResponse.id, "Check if the VM returned \
-                         is the same as the one we deployed")
-
-
-        self.assertEqual(vm.state, "Running", "Check if VM has reached \
-                         a state of running")
-
-    def tearDown(self):
-        """
-        Delete the account created. This will clear the VM belonging to that account as well.
-        """
-        deleteAcct = deleteAccount.deleteAccountCmd()
-        deleteAcct.id = self.acctResponse.account.id
-        self.apiClient.deleteAccount(deleteAcct)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e9e7937/test/integration/smoke/test_deploy_vm_with_userdata.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vm_with_userdata.py b/test/integration/smoke/test_deploy_vm_with_userdata.py
new file mode 100644
index 0000000..fd9e320
--- /dev/null
+++ b/test/integration/smoke/test_deploy_vm_with_userdata.py
@@ -0,0 +1,144 @@
+# 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.
+
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.integration.lib.base import *
+from marvin.integration.lib.common import get_template, get_zone, list_virtual_machines, cleanup_resources
+from nose.plugins.attrib import attr
+
+import random
+import string
+
+class Services:
+    def __init__(self):
+        self.services = {
+            "account": {
+                "email": "test@test.com",
+                "firstname": "Test",
+                "lastname": "User",
+                "username": "test",
+                "password": "password",
+            },
+            "virtual_machine": {
+                "displayname": "Test VM",
+                "username": "root",
+                "password": "password",
+                "ssh_port": 22,
+                "hypervisor": 'XenServer',
+                "privateport": 22,
+                "publicport": 22,
+                "protocol": 'TCP',
+            },
+            "ostype": 'CentOS 5.3 (64-bit)',
+            "service_offering": {
+                "name": "Tiny Instance",
+                "displaytext": "Tiny Instance",
+                "cpunumber": 1,
+                "cpuspeed": 100,
+                "memory": 256,
+            },
+        }
+
+
+class TestDeployVmWithUserData(cloudstackTestCase):
+    """Tests for UserData
+    """
+
+    @classmethod
+    def setUpClass(cls):
+        cls.apiClient = super(TestDeployVmWithUserData, cls).getClsTestClient().getApiClient()
+        cls.services = Services().services
+        cls.zone = get_zone(cls.apiClient, cls.services)
+        if cls.zone.localstorageenabled:
+            #For devcloud since localstroage is enabled
+            cls.services["service_offering"]["storagetype"] = "local"
+        cls.service_offering = ServiceOffering.create(
+            cls.apiClient,
+            cls.services["service_offering"]
+        )
+        cls.account = Account.create(cls.apiClient, services=cls.services["account"])
+        cls.template = get_template(
+            cls.apiClient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+        cls.debug("Successfully created account: %s, id: \
+                   %s" % (cls.account.name,\
+                          cls.account.id))
+        cls.cleanup = [cls.account]
+
+        # Generate userdata of 2500 bytes. This is larger than the 2048 bytes limit.
+        # CS however allows for upto 4K bytes in the code. So this must succeed.
+        # Overall, the query length must not exceed 4K, for then the json decoder
+        # will fail this operation at the marvin client side itcls.
+        user_data = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(2500))
+        cls.services["virtual_machine"]["userdata"] = user_data
+
+    @attr(tags=["simulator", "devcloud", "basic", "advanced"])
+    def test_deployvm_userdata_post(self):
+        """Test userdata as POST, size > 2k
+        """
+        deployVmResponse = VirtualMachine.create(
+            self.apiClient,
+            services=self.services["virtual_machine"],
+            accountid=self.account.name,
+            domainid=self.account.domainid,
+            serviceofferingid=self.service_offering.id,
+            templateid=self.template.id,
+            zoneid=self.zone.id,
+            method='POST'
+        )
+        vms = list_virtual_machines(
+            self.apiClient,
+            account=self.account.name,
+            domainid=self.account.domainid
+        )
+        self.assert_(len(vms) > 0, "There are no Vms deployed in the account %s" % self.account.name)
+        vm = vms[0]
+        self.assert_(vm.id == str(deployVmResponse.id), "Vm deployed is different from the test")
+        self.assert_(vm.state == "Running", "VM is not in Running state")
+
+    @attr(tags=["simulator", "devcloud", "basic", "advanced"])
+    def test_deployvm_userdata(self):
+        """Test userdata as GET, size > 2k
+        """
+        deployVmResponse = VirtualMachine.create(
+            self.apiClient,
+            services=self.services["virtual_machine"],
+            accountid=self.account.name,
+            domainid=self.account.domainid,
+            serviceofferingid=self.service_offering.id,
+            templateid=self.template.id,
+            zoneid=self.zone.id
+        )
+        vms = list_virtual_machines(
+            self.apiClient,
+            account=self.account.name,
+            domainid=self.account.domainid
+        )
+        self.assert_(len(vms) > 0, "There are no Vms deployed in the account %s" % self.account.name)
+        vm = vms[0]
+        self.assert_(vm.id == str(deployVmResponse.id), "Vm deployed is different from the test")
+        self.assert_(vm.state == "Running", "VM is not in Running state")
+
+    @classmethod
+    def tearDownClass(cls):
+        try:
+            #Cleanup resources used
+            cleanup_resources(cls.apiClient, cls.cleanup)
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e9e7937/tools/marvin/marvin/cloudstackConnection.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py
index 214a878..5d30803 100644
--- a/tools/marvin/marvin/cloudstackConnection.py
+++ b/tools/marvin/marvin/cloudstackConnection.py
@@ -110,16 +110,15 @@ class cloudConnection(object):
         self.logging.info("Computed Signature by Marvin: %s" % signature)
         return signature
 
-    def request(self, command, auth=True, payload={}, data={}):
+    def request(self, command, auth=True, payload={}, method='GET'):
         """
         Makes requests using auth or over integration port
         @param command: cloudstack API command name
                     eg: deployVirtualMachineCommand
         @param auth: Authentication (apikey,secretKey) => True
                      else False for integration.api.port
-        @param payload: GET param data composed as a dictionary
-                        of key,value pairs
-        @param data: POST data as a dictionary
+        @param payload: request data composed as a dictionary
+        @param method: GET/POST via HTTP
         @return:
         """
         payload["command"] = command
@@ -131,9 +130,8 @@ class cloudConnection(object):
             payload["signature"] = signature
 
         try:
-            if data:
-                response = requests.get(self.baseurl, params=payload,
-                                        data=data)
+            if method == 'POST':
+                response = requests.post(self.baseurl, params=payload)
             else:
                 response = requests.get(self.baseurl, params=payload)
         except ConnectionError, c:
@@ -161,7 +159,7 @@ class cloudConnection(object):
         requests = {}
         required = []
         for attribute in dir(cmd):
-            if attribute != "__doc__" and attribute != "__init__" and \
+            if attribute != "__doc__" and attribute != "__init__" and\
                attribute != "__module__":
                 if attribute == "isAsync":
                     isAsync = getattr(cmd, attribute)
@@ -193,26 +191,20 @@ class cloudConnection(object):
                             i = i + 1
         return cmdname, isAsync, requests
 
-    def marvin_request(self, cmd, data={}, response_type=None):
+    def marvin_request(self, cmd, response_type=None, method='GET'):
         """
         Requester for marvin command objects
         @param cmd: marvin's command from cloudstackAPI
-        @param data: any data to be sent in as POST
         @param response_type: response type of the command in cmd
-        @param raw:
+        @param method: HTTP GET/POST, defaults to GET
         @return:
         """
         cmdname, isAsync, payload = self.sanitize_command(cmd)
-        self.logging.info("sending command: %s %s" % (cmdname, str(payload)))
-        if self.auth:
-            response = self.request(
-                cmdname, auth=True, payload=payload, data=data)
-        else:
-            response = self.request(
-                cmdname, auth=False, payload=payload, data=data)
-
-        self.logging.info("Request: %s Response: %s" %
-                          (response.url, response.text))
+        self.logging.debug("sending %s request: %s %s" % (method, cmdname, str(payload)))
+        response = self.request(
+            cmdname, self.auth, payload=payload, method=method)
+        self.logging.debug("Request: %s Response: %s" %
+                           (response.url, response.text))
         response = jsonHelper.getResultObj(response.json(), response_type)
 
         if isAsync == "false":

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e9e7937/tools/marvin/marvin/codegenerator.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/codegenerator.py b/tools/marvin/marvin/codegenerator.py
index b3b2a86..36ba180 100644
--- a/tools/marvin/marvin/codegenerator.py
+++ b/tools/marvin/marvin/codegenerator.py
@@ -184,9 +184,9 @@ class codeGenerator:
         body += "\n"
 
         for cmdName in self.cmdsName:
-            body += self.space + 'def %s(self, command, postdata={}):\n'%cmdName
+            body += self.space + 'def %s(self, command, method="GET"):\n'%cmdName
             body += self.space + self.space + 'response = %sResponse()\n'%cmdName
-            body += self.space + self.space + 'response = self.connection.marvin_request(command, data=postdata, response_type=response)\n'
+            body += self.space + self.space + 'response = self.connection.marvin_request(command, response_type=response, method=method)\n'
             body += self.space + self.space + 'return response\n'
             body += '\n'
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e9e7937/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py
index 92cdf81..6c28523 100755
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -102,7 +102,7 @@ class Account:
     def delete(self, apiclient):
         """Delete an account"""
         cmd = deleteAccount.deleteAccountCmd()
-        cmd.id = self.account.id
+        cmd.id = self.id
         apiclient.deleteAccount(cmd)
 
     @classmethod
@@ -220,7 +220,7 @@ class VirtualMachine:
     def create(cls, apiclient, services, templateid=None, accountid=None,
                     domainid=None, zoneid=None, networkids=None, serviceofferingid=None,
                     securitygroupids=None, projectid=None, startvm=None,
-                    diskofferingid=None, affinitygroupnames=None, hostid=None, mode='basic'):
+                    diskofferingid=None, affinitygroupnames=None, hostid=None, mode='basic', method='GET'):
         """Create the instance"""
 
         cmd = deployVirtualMachine.deployVirtualMachineCmd()
@@ -262,8 +262,6 @@ class VirtualMachine:
         if securitygroupids:
             cmd.securitygroupids = [str(sg_id) for sg_id in securitygroupids]
 
-        if "userdata" in services:
-            cmd.userdata = base64.b64encode(services["userdata"])
 
         if "affinitygroupnames" in services:
             cmd.affinitygroupnames  = services["affinitygroupnames"]
@@ -279,7 +277,10 @@ class VirtualMachine:
         if hostid:
             cmd.hostid = hostid
 
-        virtual_machine = apiclient.deployVirtualMachine(cmd)
+        if "userdata" in services:
+            cmd.userdata = base64.b64encode(services["userdata"])
+
+        virtual_machine = apiclient.deployVirtualMachine(cmd, method=method)
 
         # VM should be in Running state after deploy
         timeout = 10


[20/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2164:Add Vlan Button for non-contiguous VLAN Range


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

Branch: refs/heads/ui-vm-affinity
Commit: 932946bbe2b76c8f87ff429c96e576d3fdc889ef
Parents: 0bca349
Author: Pranav Saxena <pr...@citrix.com>
Authored: Wed Apr 24 12:19:21 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Wed Apr 24 12:19:21 2013 +0530

----------------------------------------------------------------------
 ui/css/cloudstack3.css |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/932946bb/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index da8e448..1d5d72b 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -11846,11 +11846,11 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
 }
 
 .addVlanRange .icon {
-  background-position: -168px -31px;
+  background-position: -37px -62px;
 }
 
 .addVlanRange:hover .icon {
-  background-position: -168px -613px;
+  background-position: -37px -62px;
 }
 
 .resize .icon,


[35/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-832, CLOUDSTACK-812,CLOUDSTACK-808


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

Branch: refs/heads/ui-vm-affinity
Commit: b7f5197c850f772980b5f4f416878589c3d3e853
Parents: 7e5fd88
Author: unknown <ra...@BANLRADHIKAP.citrite.net>
Authored: Wed Apr 24 23:06:25 2013 +0530
Committer: unknown <ra...@BANLRADHIKAP.citrite.net>
Committed: Wed Apr 24 23:06:25 2013 +0530

----------------------------------------------------------------------
 docs/en-US/about-working-with-vms.xml         |   85 ++++++++-----
 docs/en-US/append-displayname-vms.xml         |   84 +++++++++++++
 docs/en-US/creating-network-offerings.xml     |   45 +++++++
 docs/en-US/elastic-ip.xml                     |   90 +++++++++++++
 docs/en-US/network-offerings.xml              |   83 +++++++++---
 docs/en-US/networks.xml                       |    1 +
 docs/en-US/set-up-network-for-users.xml       |   13 +-
 docs/en-US/using-netscaler-load-balancers.xml |  132 ++++++++++++--------
 docs/en-US/virtual-machines.xml               |    1 +
 9 files changed, 425 insertions(+), 109 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b7f5197c/docs/en-US/about-working-with-vms.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/about-working-with-vms.xml b/docs/en-US/about-working-with-vms.xml
index 259c61b..90e5abf 100644
--- a/docs/en-US/about-working-with-vms.xml
+++ b/docs/en-US/about-working-with-vms.xml
@@ -3,37 +3,62 @@
 <!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
 %BOOK_ENTITIES;
 ]>
-
 <!-- 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.
+  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.
 -->
-
 <section id="about-working-with-vms">
-		<title>About Working with Virtual Machines</title>
-	<para>&PRODUCT; provides administrators with complete control over the lifecycle of all guest VMs executing in the cloud. &PRODUCT; provides several guest management operations for end users and administrators. VMs may be stopped, started, rebooted, and destroyed.</para>
-	<para>Guest VMs have a name and group. VM names and groups are opaque to &PRODUCT; and are available for end users to organize their VMs. Each VM can have three names for use in different contexts. Only two of these names can be controlled by the user:</para>
-		<itemizedlist>
-			<listitem><para>Instance name – a unique, immutable ID that is generated by &PRODUCT;, and can not be modified by the user. This name conforms to the requirements in IETF RFC 1123.</para></listitem>
-			<listitem><para>Display name – the name displayed in the &PRODUCT; web UI. Can be set by the user. Defaults to instance name.</para></listitem>
-			<listitem><para>Name – host name that the DHCP server assigns to the VM. Can be set by the user. Defaults to instance name</para></listitem>
-		</itemizedlist>
-		<para>Guest VMs can be configured to be Highly Available (HA). An HA-enabled VM is monitored by the system. If the system detects that the VM is down, it will attempt to restart the VM, possibly on a different host. For more information, see HA-Enabled Virtual Machines on </para>
-		<para>Each new VM is allocated one public IP address. When the VM is started, &PRODUCT; automatically creates a static NAT between this public IP address and the private IP address of the VM.</para>
-		<para>If elastic IP is in use (with the NetScaler load balancer), the IP address initially allocated to the new VM is not marked as elastic. The user must replace the automatically configured IP with a specifically acquired elastic IP, and set up the static NAT mapping between this new IP and the guest VM’s private IP. The VM’s original IP address is then released and returned to the pool of available public IPs.</para>
-		<para>&PRODUCT; cannot distinguish a guest VM that was shut down by the user (such as with the “shutdown” command in Linux) from a VM that shut down unexpectedly. If an HA-enabled VM is shut down from inside the VM, &PRODUCT; will restart it. To shut down an HA-enabled VM, you must go through the &PRODUCT; UI or API.</para>
+  <title>About Working with Virtual Machines</title>
+  <para>&PRODUCT; provides administrators with complete control over the lifecycle of all guest VMs
+    executing in the cloud. &PRODUCT; provides several guest management operations for end users and
+    administrators. VMs may be stopped, started, rebooted, and destroyed.</para>
+  <para>Guest VMs have a name and group. VM names and groups are opaque to &PRODUCT; and are
+    available for end users to organize their VMs. Each VM can have three names for use in different
+    contexts. Only two of these names can be controlled by the user:</para>
+  <itemizedlist>
+    <listitem>
+      <para>Instance name &ndash; a unique, immutable ID that is generated by &PRODUCT; and can not
+        be modified by the user. This name conforms to the requirements in IETF RFC 1123.</para>
+    </listitem>
+    <listitem>
+      <para>Display name &ndash; the name displayed in the &PRODUCT; web UI. Can be set by the user.
+        Defaults to instance name.</para>
+    </listitem>
+    <listitem>
+      <para>Name &ndash; host name that the DHCP server assigns to the VM. Can be set by the user.
+        Defaults to instance name</para>
+    </listitem>
+  </itemizedlist>
+  <note>
+    <para>You can append the display name of a guest VM to its internal name. For more information,
+      see <xref linkend="append-displayname-vms"/>.</para>
+  </note>
+  <para>Guest VMs can be configured to be Highly Available (HA). An HA-enabled VM is monitored by
+    the system. If the system detects that the VM is down, it will attempt to restart the VM,
+    possibly on a different host. For more information, see HA-Enabled Virtual Machines on </para>
+  <para>Each new VM is allocated one public IP address. When the VM is started, &PRODUCT;
+    automatically creates a static NAT between this public IP address and the private IP address of
+    the VM.</para>
+  <para>If elastic IP is in use (with the NetScaler load balancer), the IP address initially
+    allocated to the new VM is not marked as elastic. The user must replace the automatically
+    configured IP with a specifically acquired elastic IP, and set up the static NAT mapping between
+    this new IP and the guest VM’s private IP. The VM’s original IP address is then released and
+    returned to the pool of available public IPs. Optionally, you can also decide not to allocate a
+    public IP to a VM in an EIP-enabled Basic zone. For more information on Elastic IP, see <xref
+      linkend="elastic-ip"/>.</para>
+  <para>&PRODUCT; cannot distinguish a guest VM that was shut down by the user (such as with the
+    “shutdown” command in Linux) from a VM that shut down unexpectedly. If an HA-enabled VM is shut
+    down from inside the VM, &PRODUCT; will restart it. To shut down an HA-enabled VM, you must go
+    through the &PRODUCT; UI or API.</para>
 </section>
-

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b7f5197c/docs/en-US/append-displayname-vms.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/append-displayname-vms.xml b/docs/en-US/append-displayname-vms.xml
new file mode 100644
index 0000000..592a6e8
--- /dev/null
+++ b/docs/en-US/append-displayname-vms.xml
@@ -0,0 +1,84 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
+%BOOK_ENTITIES;
+]>
+<!-- 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.
+-->
+<section id="append-displayname-vms">
+  <title>Appending a Display Name to the Guest VM’s Internal Name</title>
+  <para>Every guest VM has an internal name. The host uses the internal name to identify the guest
+    VMs. &PRODUCT; gives you an option to provide a guest VM with a display name. You can set this
+    display name as the internal name so that the vCenter can use it to identify the guest VM. A new
+    global parameter, vm.instancename.flag, has now been added to achieve this functionality.</para>
+  <para>The default format of the internal name is
+    i-&lt;user_id&gt;-&lt;vm_id&gt;-&lt;instance.name&gt;, where instance.name is a global
+    parameter. However, If vm.instancename.flag is set to true, and if a display name is provided
+    during the creation of a guest VM, the display name is appended to the internal name of the
+    guest VM on the host. This makes the internal name format as
+    i-&lt;user_id&gt;-&lt;vm_id&gt;-&lt;displayName&gt;. The default value of vm.instancename.flag
+    is set to false. This feature is intended to make the correlation between instance names and
+    internal names easier in large data center deployments.</para>
+  <para>The following table explains how a VM name is displayed in different scenarios.</para>
+  <informaltable>
+    <tgroup cols="5" align="left" colsep="1" rowsep="1">
+      <colspec colnum="1" colname="c1" colwidth="1.0*"/>
+      <colspec colnum="2" colname="c2" colwidth="1.31*"/>
+      <colspec colnum="3" colname="c3" colwidth="1.07*"/>
+      <colspec colnum="4" colname="c4" colwidth="2.6*"/>
+      <colspec colnum="5" colname="c5" colwidth="4.65*"/>
+      <thead>
+        <row>
+          <entry><para>User-Provided Display Name </para></entry>
+          <entry><para>vm.instancename.flag</para></entry>
+          <entry><para>Hostname on the VM</para></entry>
+          <entry><para>Name on vCenter</para></entry>
+          <entry><para>Internal Name</para></entry>
+        </row>
+      </thead>
+      <tbody>
+        <row>
+          <entry><para>Yes</para></entry>
+          <entry><para>True</para></entry>
+          <entry><para>Display name</para></entry>
+          <entry><para>i-&lt;user_id&gt;-&lt;vm_id&gt;-displayName</para></entry>
+          <entry><para>i-&lt;user_id&gt;-&lt;vm_id&gt;-displayName</para></entry>
+        </row>
+        <row>
+          <entry><para>No</para></entry>
+          <entry><para>True</para></entry>
+          <entry><para>UUID</para></entry>
+          <entry><para>i-&lt;user_id&gt;-&lt;vm_id&gt;-&lt;instance.name&gt;</para></entry>
+          <entry><para>i-&lt;user_id&gt;-&lt;vm_id&gt;-&lt;instance.name&gt;</para></entry>
+        </row>
+        <row>
+          <entry><para>Yes</para></entry>
+          <entry><para>False</para></entry>
+          <entry><para>Display name</para></entry>
+          <entry><para>i-&lt;user_id&gt;-&lt;vm_id&gt;-&lt;instance.name&gt;</para></entry>
+          <entry><para>i-&lt;user_id&gt;-&lt;vm_id&gt;-&lt;instance.name&gt;</para></entry>
+        </row>
+        <row>
+          <entry><para>No</para></entry>
+          <entry><para>False</para></entry>
+          <entry><para>UUID</para></entry>
+          <entry><para>i-&lt;user_id&gt;-&lt;vm_id&gt;-&lt;instance.name&gt;</para></entry>
+          <entry><para>i-&lt;user_id&gt;-&lt;vm_id&gt;-&lt;instance.name&gt;</para></entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+</section>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b7f5197c/docs/en-US/creating-network-offerings.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/creating-network-offerings.xml b/docs/en-US/creating-network-offerings.xml
index 1f79fb1..2b23ca8 100644
--- a/docs/en-US/creating-network-offerings.xml
+++ b/docs/en-US/creating-network-offerings.xml
@@ -194,6 +194,51 @@
           <para condition="install">For more information, see the Administration Guide.</para>
         </listitem>
         <listitem>
+          <para><emphasis role="bold">LB Isolation</emphasis>: Specify what type of load balancer
+            isolation you want for the network: Shared or Dedicated.</para>
+          <para><emphasis role="bold">Dedicated</emphasis>: If you select dedicated LB isolation, a
+            dedicated load balancer device is assigned for the network from the pool of dedicated
+            load balancer devices provisioned in the zone. If no sufficient dedicated load balancer
+            devices are available in the zone, network creation fails. Dedicated device is a good
+            choice for the high-traffic networks that make full use of the device's
+            resources.</para>
+          <para><emphasis role="bold">Shared</emphasis>: If you select shared LB isolation, a shared
+            load balancer device is assigned for the network from the pool of shared load balancer
+            devices provisioned in the zone. While provisioning &PRODUCT; picks the shared load
+            balancer device that is used by the least number of accounts. Once the device reaches
+            its maximum capacity, the device will not be allocated to a new account.</para>
+        </listitem>
+        <listitem>
+          <para><emphasis role="bold">Mode</emphasis>: You can select either Inline mode or Side by
+            Side mode:</para>
+          <para><emphasis role="bold">Inline mode</emphasis>: Supported only for Juniper SRX
+            firewall and BigF5 load balancer devices. In inline mode, a firewall device is placed in
+            front of a load balancing device. The firewall acts as the gateway for all the incoming
+            traffic, then redirect the load balancing traffic to the load balancer behind it. The
+            load balancer in this case will not have the direct access to the public network. </para>
+          <para><emphasis role="bold">Side by Side</emphasis>: In side by side mode, a firewall
+            device is deployed in parallel with the load balancer device. So the traffic to the load
+            balancer public IP is not routed through the firewall, and therefore, is exposed to the
+            public network.</para>
+        </listitem>
+        <listitem>
+          <para><emphasis role="bold">Associate Public IP</emphasis>: Select this option if you want
+            to assign a public IP address to the VMs deployed in the guest network. This option is
+            available only if</para>
+          <itemizedlist>
+            <listitem>
+              <para>Guest network is shared.</para>
+            </listitem>
+            <listitem>
+              <para>StaticNAT is enabled.</para>
+            </listitem>
+            <listitem>
+              <para>Elastic IP is enabled.</para>
+            </listitem>
+          </itemizedlist>
+          <para>For information on Elastic IP, see <xref linkend="elastic-ip"/>.</para>
+        </listitem>
+        <listitem>
           <para><emphasis role="bold">Redundant router capability</emphasis>. Available only when
             Virtual Router is selected as the Source NAT provider. Select this option if you want to
             use two virtual routers in the network for uninterrupted connection: one operating as

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b7f5197c/docs/en-US/elastic-ip.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/elastic-ip.xml b/docs/en-US/elastic-ip.xml
new file mode 100644
index 0000000..b09d37d
--- /dev/null
+++ b/docs/en-US/elastic-ip.xml
@@ -0,0 +1,90 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
+%BOOK_ENTITIES;
+]>
+<!-- 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.
+-->
+<section id="elastic-ip">
+  <title>About Elastic IP</title>
+  <para>Elastic IP (EIP) addresses are the IP addresses that are associated with an account, and act
+    as static IP addresses. The account owner has complete control over the Elastic IP addresses
+    that belong to the account. You can allocate an Elastic IP to a VM of your choice from the EIP
+    pool of your account. Later if required you can reassign the IP address to a different VM. This
+    feature is extremely helpful during VM failure. Instead of replacing the VM which is down, the
+    IP address can be reassigned to a new VM in your account. Elastic IP service provides Static NAT
+    (1:1) service in an EIP-enabled basic zone. The default network offering,
+    DefaultSharedNetscalerEIPandELBNetworkOffering, provides your network with EIP and ELB network
+    services if a NetScaler device is deployed in your zone. Similar to the public IP address,
+    Elastic IP addresses are also mapped to their associated private IP addresses by using Stactic
+    NAT.</para>
+  <para>The EIP work flow is as follows:</para>
+  <itemizedlist>
+    <listitem>
+      <para>When a user VM is deployed, a public IP is automatically acquired from the pool of
+        public IPs configured in the zone. This IP is owned by the VM's account.</para>
+    </listitem>
+    <listitem>
+      <para>Each VM will have its own private IP. When the user VM starts, Static NAT is provisioned
+        on the NetScaler device by using the Inbound Network Address Translation (INAT) and Reverse
+        NAT (RNAT) rules between the public IP and the private IP.</para>
+      <note>
+        <para>Inbound NAT (INAT) is a type of NAT supported by NetScaler, in which the destination
+          IP address is replaced in the packets from the public network, such as the Internet, with
+          the private IP address of a VM in the private network. Reverse NAT (RNAT) is a type of NAT
+          supported by NetScaler, in which the source IP address is replaced in the packets
+          generated by a VM in the private network with the public IP address.</para>
+      </note>
+      <para/>
+    </listitem>
+    <listitem>
+      <para>This default public IP will be released in two cases:</para>
+      <itemizedlist>
+        <listitem>
+          <para>When the VM is stopped. When the VM starts, it again receives a new public IP, not
+            necessarily the same one allocated initially, from the pool of Public IPs.</para>
+        </listitem>
+        <listitem>
+          <para>The user acquires a public IP (Elastic IP). This public IP is associated with the
+            account, but will not be mapped to any private IP. However, the user can enable Static
+            NAT to associate this IP to the private IP of a VM in the account. The Static NAT rule
+            for the public IP can be disabled at any time. When Static NAT is disabled, a new public
+            IP is allocated from the pool, which is not necessarily be the same one allocated
+            initially.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+  </itemizedlist>
+  <para>However, for the deployments where public IPs are limited resources, you have the
+    flexibility to choose not to allocate a public IP by default. You can use the Associate Public
+    IP option to turn on or off the automatic public IP assignment in the EIP-enabled Basic zones.
+    If you turn off the automatic public IP assignment while creating a network offering, only a
+    private IP is assigned to a VM when the VM is deployed with that network offering. Later, the
+    user can acquire an IP for the VM and enable static NAT.</para>
+  <para condition="admin">For more information on the Associate Public IP option, see <xref
+      linkend="creating-network-offerings"/>.</para>
+  <para condition="install">For more information on the Associate Public IP option, see the
+    Administration Guide.</para>
+  <note>
+    <para>The Associate Public IP feature is designed only for use with user VMs. The System VMs
+      continue to get both public IP and private by default, irrespective of the network offering
+      configuration.</para>
+  </note>
+  <para/>
+  <para>New deployments which use the default shared network offering with EIP and ELB services to
+    create a shared network in the Basic zone will continue allocating public IPs to each user
+    VM.</para>
+</section>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b7f5197c/docs/en-US/network-offerings.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/network-offerings.xml b/docs/en-US/network-offerings.xml
index 0a7b8e7..8c685bf 100644
--- a/docs/en-US/network-offerings.xml
+++ b/docs/en-US/network-offerings.xml
@@ -22,25 +22,66 @@
     under the License.
 -->
 <section id="network-offerings">
-    <title>Network Offerings</title>
-    <note><para>For the most up-to-date list of supported network services, see the &PRODUCT; UI or call listNetworkServices.</para></note>
-    <para>A network offering is a named set of network services, such as:</para>
-    <itemizedlist>
-        <listitem><para>DHCP</para></listitem>
-        <listitem><para>DNS</para></listitem>
-        <listitem><para>Source NAT</para></listitem>
-        <listitem><para>Static NAT</para></listitem>
-        <listitem><para>Port Forwarding</para></listitem>
-        <listitem><para>Load Balancing</para></listitem>
-        <listitem><para>Firewall</para></listitem>
-        <listitem><para>VPN</para></listitem>
-        <listitem><para>Optional) Name one of several available providers to use for a given service, such as Juniper for the firewall</para></listitem>
-        <listitem><para>(Optional) Network tag to specify which physical network to use</para></listitem>
-    </itemizedlist>
-    <para>When creating a new VM, the user chooses one of the available network offerings, and that determines which network services the VM can use.</para>
-    <para>The &PRODUCT; administrator can create any number of custom network offerings, in addition to the default network offerings provided by &PRODUCT;. By creating multiple custom network offerings, you can set up your cloud to offer different classes of service on a single multi-tenant physical network.  For example, while the underlying physical wiring may be the same for two tenants, tenant A may only need simple firewall protection for their website, while tenant B may be running a web server farm and require a scalable firewall solution, load balancing solution, and alternate networks for accessing the database backend.</para>
-    <note><para>If you create load balancing rules while using a network service offering that includes an external load balancer device such as NetScaler, and later change the network service offering to one that uses the &PRODUCT; virtual router, you must create a firewall rule on the virtual router for each of your existing load balancing rules so that they continue to function.</para></note>
-    <para>When creating a new virtual network, the &PRODUCT; administrator chooses which network offering to enable for that network. Each virtual network is associated with one network offering. A virtual network can be upgraded or downgraded by changing its associated network offering.  If you do this, be sure to reprogram the physical network to match.</para>
-    <para>&PRODUCT; also has internal network offerings for use by &PRODUCT; system VMs. These network offerings are not visible to users but can be modified by administrators.</para>
-    <xi:include href="creating-network-offerings.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <title>Network Offerings</title>
+  <note>
+    <para>For the most up-to-date list of supported network services, see the &PRODUCT; UI or call
+      listNetworkServices.</para>
+  </note>
+  <para>A network offering is a named set of network services, such as:</para>
+  <itemizedlist>
+    <listitem>
+      <para>DHCP</para>
+    </listitem>
+    <listitem>
+      <para>DNS</para>
+    </listitem>
+    <listitem>
+      <para>Source NAT</para>
+    </listitem>
+    <listitem>
+      <para>Static NAT</para>
+    </listitem>
+    <listitem>
+      <para>Port Forwarding</para>
+    </listitem>
+    <listitem>
+      <para>Load Balancing</para>
+    </listitem>
+    <listitem>
+      <para>Firewall</para>
+    </listitem>
+    <listitem>
+      <para>VPN</para>
+    </listitem>
+    <listitem>
+      <para>(Optional) Name one of several available providers to use for a given service, such as
+        Juniper for the firewall</para>
+    </listitem>
+    <listitem>
+      <para>(Optional) Network tag to specify which physical network to use</para>
+    </listitem>
+  </itemizedlist>
+  <para>When creating a new VM, the user chooses one of the available network offerings, and that
+    determines which network services the VM can use.</para>
+  <para>The &PRODUCT; administrator can create any number of custom network offerings, in addition
+    to the default network offerings provided by &PRODUCT;. By creating multiple custom network
+    offerings, you can set up your cloud to offer different classes of service on a single
+    multi-tenant physical network. For example, while the underlying physical wiring may be the same
+    for two tenants, tenant A may only need simple firewall protection for their website, while
+    tenant B may be running a web server farm and require a scalable firewall solution, load
+    balancing solution, and alternate networks for accessing the database backend.</para>
+  <note>
+    <para>If you create load balancing rules while using a network service offering that includes an
+      external load balancer device such as NetScaler, and later change the network service offering
+      to one that uses the &PRODUCT; virtual router, you must create a firewall rule on the virtual
+      router for each of your existing load balancing rules so that they continue to
+      function.</para>
+  </note>
+  <para>When creating a new virtual network, the &PRODUCT; administrator chooses which network
+    offering to enable for that network. Each virtual network is associated with one network
+    offering. A virtual network can be upgraded or downgraded by changing its associated network
+    offering. If you do this, be sure to reprogram the physical network to match.</para>
+  <para>&PRODUCT; also has internal network offerings for use by &PRODUCT; system VMs. These network
+    offerings are not visible to users but can be modified by administrators.</para>
+  <xi:include href="creating-network-offerings.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 </section>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b7f5197c/docs/en-US/networks.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/networks.xml b/docs/en-US/networks.xml
index cb7493c..c2090d2 100644
--- a/docs/en-US/networks.xml
+++ b/docs/en-US/networks.xml
@@ -45,6 +45,7 @@
   <xi:include href="ip-load-balancing.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
   <xi:include href="dns-dhcp.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
   <xi:include href="vpn.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+  <xi:include href="elastic-ip.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
   <xi:include href="inter-vlan-routing.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
   <xi:include href="configure-vpc.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
   <xi:include href="persistent-network.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b7f5197c/docs/en-US/set-up-network-for-users.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/set-up-network-for-users.xml b/docs/en-US/set-up-network-for-users.xml
index c91565a..c22babc 100644
--- a/docs/en-US/set-up-network-for-users.xml
+++ b/docs/en-US/set-up-network-for-users.xml
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 <!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
 %BOOK_ENTITIES;
 ]>
@@ -21,11 +21,10 @@
     specific language governing permissions and limitations
     under the License.
 -->
-
 <chapter id="set-up-network-for-users">
-    <title>Setting Up Networking for Users</title>
-    <xi:include href="networks-for-users-overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-    <xi:include href="about-virtual-networks.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-    <xi:include href="network-service-providers.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-    <xi:include href="network-offerings.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <title>Setting Up Networking for Users</title>
+  <xi:include href="networks-for-users-overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+  <xi:include href="about-virtual-networks.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+  <xi:include href="network-service-providers.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+  <xi:include href="network-offerings.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 </chapter>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b7f5197c/docs/en-US/using-netscaler-load-balancers.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/using-netscaler-load-balancers.xml b/docs/en-US/using-netscaler-load-balancers.xml
index c2044de..7d18331 100644
--- a/docs/en-US/using-netscaler-load-balancers.xml
+++ b/docs/en-US/using-netscaler-load-balancers.xml
@@ -3,58 +3,88 @@
 <!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
 %BOOK_ENTITIES;
 ]>
-
 <!-- 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.
+  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.
 -->
-
 <section id="using-netscaler-load-balancers">
-    <title>About Using a NetScaler Load Balancer</title>
-    <para>Citrix NetScaler is supported as an external network element for load balancing in zones that use advanced networking (also called advanced zones). Set up an external load balancer when you want to provide load balancing through means other than &PRODUCT;’s provided virtual router.</para>
-    <para>The NetScaler can be set up in direct (outside the firewall) mode. It must be added before any load balancing rules are deployed on guest VMs in the zone.</para>
-    <para>The functional behavior of the NetScaler with &PRODUCT; is the same as described in the &PRODUCT; documentation for using an F5 external load balancer. The only exception is that the F5 supports routing domains, and NetScaler does not. NetScaler can not yet be used as a firewall.</para>
-    <para>The Citrix NetScaler comes in three varieties. The following table summarizes how these variants are treated in &PRODUCT;.</para>
-    <informaltable>
-        <tgroup cols="3" align="left" colsep="1" rowsep="1">
-            <thead>
-                <row>
-                    <entry><para>NetScaler ADC Type</para></entry>
-                    <entry><para>Description of Capabilities</para></entry>
-                    <entry><para>&PRODUCT; Supported Features</para></entry>
-                </row>    
-            </thead>
-            <tbody>
-                <row>
-                    <entry><para>MPX</para></entry>
-                    <entry><para>Physical appliance. Capable of deep packet inspection. Can act as application firewall and load balancer</para></entry>
-                    <entry><para>In advanced zones, load balancer functionality fully supported without limitation. In basic zones, static NAT, elastic IP (EIP), and elastic load balancing (ELB) are also provided</para></entry>
-                    
-                </row>
-                <row>
-                    <entry><para>VPX</para></entry>
-                    <entry><para>Virtual appliance. Can run as VM on XenServer, ESXi, and Hyper-V hypervisors. Same functionality as MPX</para></entry>
-                    <entry><para>Supported only on ESXi. Same functional support as for MPX. &PRODUCT; will treat VPX and MPX as the same device type</para></entry>
-                </row>
-                <row>
-                    <entry><para>SDX</para></entry>
-                    <entry><para>Physical appliance. Can create multiple fully isolated VPX instances on a single appliance to support multi-tenant usage</para></entry>
-                    <entry><para>&PRODUCT; will dynamically provision, configure, and manage the lifecycle of VPX instances on the SDX. Provisioned instances are added into &PRODUCT; automatically – no manual configuration by the administrator is required. Once a VPX instance is added into &PRODUCT;, it is treated the same as a VPX on an ESXi host.</para></entry>
-                </row>
-            </tbody>
-        </tgroup>
-    </informaltable>
+  <title>About Using a NetScaler Load Balancer</title>
+  <para>Citrix NetScaler is supported as an external network element for load balancing in zones
+    that use isolated networking in advanced zones. Set up an external load balancer when you want
+    to provide load balancing through means other than &PRODUCT;’s provided virtual router.</para>
+  <note>
+    <para>In a Basic zone, load balancing service is supported only if Elastic IP or Elastic LB
+      services are enabled.</para>
+  </note>
+  <para>When NetScaler load balancer is used to provide EIP or ELB services in a Basic zone, ensure
+    that all guest VM traffic must enter and exit through the NetScaler device. When inbound traffic
+    goes through the NetScaler device, traffic is routed by using the NAT protocol depending on the
+    EIP/ELB configured on the public IP to the private IP. The traffic that is originated from the
+    guest VMs usually goes through the layer 3 router. To ensure that outbound traffic goes through
+    NetScaler device providing EIP/ELB, layer 3 router must have a policy-based routing. A
+    policy-based route must be set up so that all traffic originated from the guest VM's are
+    directed to NetScaler device. This is required to ensure that the outbound traffic from the
+    guest VM's is routed to a public IP by using NAT.For more information on Elastic IP, see <xref
+      linkend="elastic-ip"/>. </para>
+  <para>The NetScaler can be set up in direct (outside the firewall) mode. It must be added before
+    any load balancing rules are deployed on guest VMs in the zone.</para>
+  <para>The functional behavior of the NetScaler with &PRODUCT; is the same as described in the
+    &PRODUCT; documentation for using an F5 external load balancer. The only exception is that the
+    F5 supports routing domains, and NetScaler does not. NetScaler can not yet be used as a
+    firewall.</para>
+  <para>To install and enable an external load balancer for &PRODUCT; management, see <phrase
+      condition="install"><xref linkend="external-guest-lb-integration"/>.</phrase>
+    <phrase condition="admin">External Guest Load Balancer Integration in the Installation
+      Guide.</phrase>
+  </para>
+  <para>The Citrix NetScaler comes in three varieties. The following table summarizes how these
+    variants are treated in &PRODUCT;.</para>
+  <informaltable>
+    <tgroup cols="3" align="left" colsep="1" rowsep="1">
+      <thead>
+        <row>
+          <entry><para>NetScaler ADC Type</para></entry>
+          <entry><para>Description of Capabilities</para></entry>
+          <entry><para>&PRODUCT; Supported Features</para></entry>
+        </row>
+      </thead>
+      <tbody>
+        <row>
+          <entry><para>MPX</para></entry>
+          <entry><para>Physical appliance. Capable of deep packet inspection. Can act as application
+              firewall and load balancer</para></entry>
+          <entry><para>In advanced zones, load balancer functionality fully supported without
+              limitation. In basic zones, static NAT, elastic IP (EIP), and elastic load balancing
+              (ELB) are also provided.</para></entry>
+        </row>
+        <row>
+          <entry><para>VPX</para></entry>
+          <entry><para>Virtual appliance. Can run as VM on XenServer, ESXi, and Hyper-V hypervisors.
+              Same functionality as MPX</para></entry>
+          <entry><para>Supported on ESXi and XenServer. Same functional support as for MPX.
+              &PRODUCT; will treat VPX and MPX as the same device type.</para></entry>
+        </row>
+        <row>
+          <entry><para>SDX</para></entry>
+          <entry><para>Physical appliance. Can create multiple fully isolated VPX instances on a
+              single appliance to support multi-tenant usage</para></entry>
+          <entry><para>&PRODUCT; will dynamically provision, configure, and manage the life cycle of
+              VPX instances on the SDX. Provisioned instances are added into &PRODUCT; automatically
+              – no manual configuration by the administrator is required. Once a VPX instance is
+              added into &PRODUCT;, it is treated the same as a VPX on an ESXi host.</para></entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
 </section>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b7f5197c/docs/en-US/virtual-machines.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/virtual-machines.xml b/docs/en-US/virtual-machines.xml
index 20018da..802e8e1 100644
--- a/docs/en-US/virtual-machines.xml
+++ b/docs/en-US/virtual-machines.xml
@@ -28,6 +28,7 @@
   <xi:include href="stopping-and-starting-vms.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
   <xi:include href="vm-snapshots.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
   <xi:include href="changing-vm-name-os-group.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+  <xi:include href="append-displayname-vms.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
   <xi:include href="changing-service-offering-for-vm.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
   <xi:include href="manual-live-migration.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
   <xi:include href="deleting-vms.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>


[04/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2010: cloudstack UI - IPv6 - Infrastructure menu - zone detail - add IPv6 DNS1, IPv6 DNS 2 field.


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

Branch: refs/heads/ui-vm-affinity
Commit: b2b8f0e9f48e529d936f9cd976d0fd5389f340f5
Parents: b9d8955
Author: Jessica Wang <je...@apache.org>
Authored: Mon Apr 22 15:07:31 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Mon Apr 22 15:07:31 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b2b8f0e9/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index a92506b..2058065 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -4893,14 +4893,16 @@
                       var array1 = [];
                       array1.push("&name="  +todb(args.data.name));
                       array1.push("&dns1=" + todb(args.data.dns1));
-                      array1.push("&dns2=" + todb(args.data.dns2));  //dns2 can be empty ("") when passed to API
+                      array1.push("&dns2=" + todb(args.data.dns2));  //dns2 can be empty ("") when passed to API, so a user gets to update this field from an existing value to blank.
+                      array1.push("&ip6dns1=" + todb(args.data.ip6dns1));  //p6dns1 can be empty ("") when passed to API, so a user gets to update this field from an existing value to blank.                      
+                      array1.push("&ip6dns2=" + todb(args.data.ip6dns2));  //ip6dns2 can be empty ("") when passed to API, so a user gets to update this field from an existing value to blank.
                       
                       if (selectedZoneObj.networktype == "Advanced" && args.data.guestcidraddress) {
                         array1.push("&guestcidraddress=" + todb(args.data.guestcidraddress));
                       }
                       
                       array1.push("&internaldns1=" + todb(args.data.internaldns1));
-                      array1.push("&internaldns2=" + todb(args.data.internaldns2));  //internaldns2 can be empty ("") when passed to API
+                      array1.push("&internaldns2=" + todb(args.data.internaldns2));  //internaldns2 can be empty ("") when passed to API, so a user gets to update this field from an existing value to blank.
                       array1.push("&domain=" + todb(args.data.domain));
                       array1.push("&localstorageenabled=" + (args.data.localstorageenabled == 'on'));
                       $.ajax({
@@ -4938,6 +4940,8 @@
                         allocationstate: { label: 'label.allocation.state' },
                         dns1: { label: 'label.dns.1', isEditable: true, validation: { required: true } },
                         dns2: { label: 'label.dns.2', isEditable: true },
+                        ip6dns1: { label: 'IPv6 DNS1', isEditable: true },
+                        ip6dns2: { label: 'IPv6 DNS2', isEditable: true },
                         internaldns1: { label: 'label.internal.dns.1', isEditable: true, validation: { required: true } },
                         internaldns2: { label: 'label.internal.dns.2', isEditable: true },
                         domainname: { label: 'label.domain' },
@@ -4950,8 +4954,8 @@
                         localstorageenabled: {
                           label: 'label.local.storage.enabled',
                           isBoolean: true,
-													isEditable: true,
-													converter:cloudStack.converters.toBooleanText
+			  isEditable: true,
+			  converter:cloudStack.converters.toBooleanText
                         }
                       }
                     ],


[08/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2152 Set REALVER properly


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

Branch: refs/heads/ui-vm-affinity
Commit: bdd5634924db84144c05887c6552c89aa4e78051
Parents: f6fb4d2
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Tue Apr 23 14:54:41 2013 +0200
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Tue Apr 23 14:58:12 2013 +0200

----------------------------------------------------------------------
 packaging/centos63/package.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bdd56349/packaging/centos63/package.sh
----------------------------------------------------------------------
diff --git a/packaging/centos63/package.sh b/packaging/centos63/package.sh
index d9d5b1c..faa089b 100755
--- a/packaging/centos63/package.sh
+++ b/packaging/centos63/package.sh
@@ -75,6 +75,7 @@ if echo $VERSION | grep SNAPSHOT ; then
   DEFPRE="-D_prerelease 1"
   DEFREL="-D_rel SNAPSHOT"
 else
+  REALVER=`echo $VERSION`
   DEFVER="-D_ver $REALVER"
   DEFPRE=
   DEFREL=


[22/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-1086: DeployVirtualMachine userdata enhancements

Description:

	Currently, userdata sent over to the DeployVMCmd and
	updateVMCmd commands can be upto 2K in length, whether
	sent over GET or POST. We remove this limitation for
	POST to change this limit to 32K. Also enabling lazy
	load on userdata to improve performance during reads
	of large sized userdata from user VM records.

Signed-off-by: Min Chen <mi...@citrix.com>


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

Branch: refs/heads/ui-vm-affinity
Commit: b0caae6b33347f36721f28dca1fa12e7b18f1cd1
Parents: 94d5d3d
Author: Vijayendra Bhamidipati <vi...@citrix.com>
Authored: Wed Apr 17 05:36:33 2013 -0700
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Apr 24 13:42:38 2013 +0530

----------------------------------------------------------------------
 api/src/com/cloud/vm/UserVmService.java            |   27 ++-
 api/src/org/apache/cloudstack/api/BaseCmd.java     |   24 +++
 .../api/command/user/vm/DeployVMCmd.java           |   12 +-
 .../api/command/user/vm/UpdateVMCmd.java           |    2 +-
 core/src/com/cloud/vm/UserVmVO.java                |    6 +-
 server/src/com/cloud/api/ApiDispatcher.java        |    9 -
 server/src/com/cloud/api/ApiServer.java            |  155 ++++++++++-----
 server/src/com/cloud/api/ApiServerService.java     |    1 +
 server/src/com/cloud/api/ApiServlet.java           |    6 +-
 server/src/com/cloud/vm/UserVmManagerImpl.java     |   96 ++++++----
 .../test/com/cloud/vm/MockUserVmManagerImpl.java   |   48 +++--
 .../test/com/cloud/vm/dao/UserVmDaoImplTest.java   |   43 +++-
 .../cloud/vm/dao/UserVmDaoTestConfiguration.java   |   50 +++++
 server/test/resources/UserVMDaoTestContext.xml     |   44 ++++
 setup/db/db/schema-410to420.sql                    |    4 +-
 .../component/test_deploy_vm_with_userdata.py      |  108 ++++++++++
 16 files changed, 501 insertions(+), 134 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/api/src/com/cloud/vm/UserVmService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/vm/UserVmService.java b/api/src/com/cloud/vm/UserVmService.java
index aa21136..7e89cd3 100755
--- a/api/src/com/cloud/vm/UserVmService.java
+++ b/api/src/com/cloud/vm/UserVmService.java
@@ -21,9 +21,22 @@ import java.util.Map;
 
 import javax.naming.InsufficientResourcesException;
 
+import org.apache.cloudstack.api.BaseCmd.HTTPMethod;
 import org.apache.cloudstack.api.command.admin.vm.AssignVMCmd;
 import org.apache.cloudstack.api.command.admin.vm.RecoverVMCmd;
-import org.apache.cloudstack.api.command.user.vm.*;
+import org.apache.cloudstack.api.command.user.vm.AddNicToVMCmd;
+import org.apache.cloudstack.api.command.user.vm.DeployVMCmd;
+import org.apache.cloudstack.api.command.user.vm.DestroyVMCmd;
+import org.apache.cloudstack.api.command.user.vm.RebootVMCmd;
+import org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd;
+import org.apache.cloudstack.api.command.user.vm.ResetVMPasswordCmd;
+import org.apache.cloudstack.api.command.user.vm.ResetVMSSHKeyCmd;
+import org.apache.cloudstack.api.command.user.vm.RestoreVMCmd;
+import org.apache.cloudstack.api.command.user.vm.ScaleVMCmd;
+import org.apache.cloudstack.api.command.user.vm.StartVMCmd;
+import org.apache.cloudstack.api.command.user.vm.UpdateDefaultNicForVMCmd;
+import org.apache.cloudstack.api.command.user.vm.UpdateVMCmd;
+import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd;
 import org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd;
 import org.apache.cloudstack.api.command.user.vmgroup.DeleteVMGroupCmd;
 import com.cloud.dc.DataCenter;
@@ -185,8 +198,8 @@ public interface UserVmService {
      */
     UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> securityGroupIdList, Account owner, String hostName,
             String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor,
-            String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIp,
-            String keyboard, List<Long> affinityGroupIdList)
+	    HTTPMethod httpmethod, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps,
+	    IpAddresses defaultIp, String keyboard, List<Long> affinityGroupIdList)
             throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException;
 
     /**
@@ -257,8 +270,8 @@ public interface UserVmService {
      * @throws InsufficientResourcesException
      */
     UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> networkIdList, List<Long> securityGroupIdList,
-            Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps,
-            IpAddresses defaultIps, String keyboard, List<Long> affinityGroupIdList)
+            Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, HTTPMethod httpmethod, String userData, String sshKeyPair,
+	    Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps, String keyboard, List<Long> affinityGroupIdList)
             throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException;
 
     /**
@@ -327,8 +340,8 @@ public interface UserVmService {
      */
     UserVm createAdvancedVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> networkIdList, Account owner, String hostName,
             String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor,
-            String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps,
-            String keyboard, List<Long> affinityGroupIdList)
+	    HTTPMethod httpmethod, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps,
+	    IpAddresses defaultIps, String keyboard, List<Long> affinityGroupIdList)
             throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException;
 
     /**

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/api/src/org/apache/cloudstack/api/BaseCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/BaseCmd.java b/api/src/org/apache/cloudstack/api/BaseCmd.java
index 42c0680..200675d 100644
--- a/api/src/org/apache/cloudstack/api/BaseCmd.java
+++ b/api/src/org/apache/cloudstack/api/BaseCmd.java
@@ -95,6 +95,11 @@ public abstract class BaseCmd {
     private Object _responseObject = null;
     private Map<String, String> fullUrlParams;
 
+    public enum HTTPMethod {
+        GET, POST, PUT, DELETE
+    }
+    private HTTPMethod httpMethod;
+
     @Parameter(name = "response", type = CommandType.STRING)
     private String responseType;
 
@@ -140,6 +145,25 @@ public abstract class BaseCmd {
     public void configure() {
     }
 
+    public HTTPMethod getHttpMethod() {
+        return httpMethod;
+    }
+
+    public void setHttpMethod(String method) {
+        if (method != null) {
+            if (method.equalsIgnoreCase("GET"))
+                httpMethod = HTTPMethod.GET;
+            else if (method.equalsIgnoreCase("PUT"))
+                httpMethod = HTTPMethod.PUT;
+            else if (method.equalsIgnoreCase("POST"))
+                httpMethod = HTTPMethod.POST;
+            else if (method.equalsIgnoreCase("DELETE"))
+                httpMethod = HTTPMethod.DELETE;
+        } else {
+            httpMethod = HTTPMethod.GET;
+	}
+    }
+
     public String getResponseType() {
         if (responseType == null) {
             return RESPONSE_TYPE_XML;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/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 70c0159..3ed08d2 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
@@ -128,7 +128,7 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
     @Parameter(name=ApiConstants.HYPERVISOR, type=CommandType.STRING, description="the hypervisor on which to deploy the virtual machine")
     private String hypervisor;
 
-    @Parameter(name=ApiConstants.USER_DATA, type=CommandType.STRING, description="an optional binary data that can be sent to the virtual machine upon a successful deployment. This binary data must be base64 encoded before adding it to the request. Currently only HTTP GET is supported. Using HTTP GET (via querystring), you can send up to 2KB of data after base64 encoding.", length=2048)
+    @Parameter(name=ApiConstants.USER_DATA, type=CommandType.STRING, description="an optional binary data that can be sent to the virtual machine upon a successful deployment. This binary data must be base64 encoded before adding it to the request. Using HTTP GET (via querystring), you can send up to 2KB of data after base64 encoding. Using HTTP POST(via POST body), you can send up to 32K of data after base64 encoding.", length=32768)
     private String userData;
 
     @Parameter(name=ApiConstants.SSH_KEYPAIR, type=CommandType.STRING, description="name of the ssh key pair used to login to the virtual machine")
@@ -312,8 +312,8 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
                         throw new InvalidParameterValueException("Unable to translate and find entity with networkId: " + ips.get("networkid"));
                     }
                 }
-                String requestedIp = (String) ips.get("ip");
-                String requestedIpv6 = (String) ips.get("ipv6");
+                String requestedIp = ips.get("ip");
+                String requestedIpv6 = ips.get("ipv6");
                 if (requestedIpv6 != null) {
                 	requestedIpv6 = requestedIpv6.toLowerCase();
                 }
@@ -481,18 +481,18 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
                     throw new InvalidParameterValueException("Can't specify network Ids in Basic zone");
                 } else {
                     vm = _userVmService.createBasicSecurityGroupVirtualMachine(zone, serviceOffering, template, getSecurityGroupIdList(), owner, name,
-                                displayName, diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard, getAffinityGroupIdList());
+                            displayName, diskOfferingId, size, group, getHypervisor(), this.getHttpMethod(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard, getAffinityGroupIdList());
                 }
             } else {
                 if (zone.isSecurityGroupEnabled())  {
                     vm = _userVmService.createAdvancedSecurityGroupVirtualMachine(zone, serviceOffering, template, getNetworkIds(), getSecurityGroupIdList(),
-                                owner, name, displayName, diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard, getAffinityGroupIdList());
+                            owner, name, displayName, diskOfferingId, size, group, getHypervisor(), this.getHttpMethod(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard, getAffinityGroupIdList());
                 } else {
                     if (getSecurityGroupIdList() != null && !getSecurityGroupIdList().isEmpty()) {
                         throw new InvalidParameterValueException("Can't create vm with security groups; security group feature is not enabled per zone");
                     }
                     vm = _userVmService.createAdvancedVirtualMachine(zone, serviceOffering, template, getNetworkIds(), owner, name, displayName,
-                                diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard, getAffinityGroupIdList());
+                            diskOfferingId, size, group, getHypervisor(), this.getHttpMethod(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard, getAffinityGroupIdList());
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
index ff8fff1..bbf9b25 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
@@ -61,7 +61,7 @@ public class UpdateVMCmd extends BaseCmd{
             description="the ID of the OS type that best represents this VM.")
     private Long osTypeId;
 
-    @Parameter(name=ApiConstants.USER_DATA, type=CommandType.STRING, description="an optional binary data that can be sent to the virtual machine upon a successful deployment. This binary data must be base64 encoded before adding it to the request. Currently only HTTP GET is supported. Using HTTP GET (via querystring), you can send up to 2KB of data after base64 encoding.", length=2048)
+    @Parameter(name=ApiConstants.USER_DATA, type=CommandType.STRING, description="an optional binary data that can be sent to the virtual machine upon a successful deployment. This binary data must be base64 encoded before adding it to the request. Using HTTP GET (via querystring), you can send up to 2KB of data after base64 encoding. Using HTTP POST(via POST body), you can send up to 32K of data after base64 encoding.", length=32768)
     private String userData;
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/core/src/com/cloud/vm/UserVmVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/vm/UserVmVO.java b/core/src/com/cloud/vm/UserVmVO.java
index a16eaf9..2e9bdf5 100755
--- a/core/src/com/cloud/vm/UserVmVO.java
+++ b/core/src/com/cloud/vm/UserVmVO.java
@@ -18,9 +18,11 @@ package com.cloud.vm;
 
 import java.util.HashMap;
 
+import javax.persistence.Basic;
 import javax.persistence.Column;
 import javax.persistence.DiscriminatorValue;
 import javax.persistence.Entity;
+import javax.persistence.FetchType;
 import javax.persistence.PrimaryKeyJoinColumn;
 import javax.persistence.Table;
 
@@ -36,7 +38,8 @@ public class UserVmVO extends VMInstanceVO implements UserVm {
     @Column(name="iso_id", nullable=true, length=17)
     private Long isoId = null;
     
-    @Column(name="user_data", updatable=true, nullable=true, length=2048)
+    @Column(name="user_data", updatable=true, nullable=true, length=32768)
+    @Basic(fetch = FetchType.LAZY)
     private String userData;
     
     @Column(name="display_name", updatable=true, nullable=true)
@@ -119,6 +122,7 @@ public class UserVmVO extends VMInstanceVO implements UserVm {
         return details != null ? details.get(name) : null;
     }
     
+    @Override
     public void setAccountId(long accountId){
         this.accountId = accountId;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/server/src/com/cloud/api/ApiDispatcher.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiDispatcher.java b/server/src/com/cloud/api/ApiDispatcher.java
index 925d90a..b4437ce 100755
--- a/server/src/com/cloud/api/ApiDispatcher.java
+++ b/server/src/com/cloud/api/ApiDispatcher.java
@@ -27,7 +27,6 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.StringTokenizer;
 import java.util.regex.Matcher;
 
@@ -56,21 +55,14 @@ import org.apache.cloudstack.api.command.user.event.ListEventsCmd;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
-import com.cloud.async.AsyncCommandQueued;
 import com.cloud.async.AsyncJobManager;
 import com.cloud.dao.EntityManager;
-import com.cloud.exception.AccountLimitException;
-import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.exception.PermissionDeniedException;
-import com.cloud.exception.ResourceAllocationException;
-import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.user.Account;
 import com.cloud.user.AccountManager;
 import com.cloud.user.UserContext;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.ReflectUtil;
-import com.cloud.utils.component.ComponentContext;
 import com.cloud.utils.exception.CSExceptionErrorCode;
 import com.cloud.utils.exception.CloudRuntimeException;
 
@@ -160,7 +152,6 @@ public class ApiDispatcher {
                     }
                 }
             }
-
             cmd.execute();
 
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index d842819..dd5fd4d 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -16,30 +16,51 @@
 // under the License.
 package com.cloud.api;
 
-import com.cloud.api.response.ApiResponseSerializer;
-import com.cloud.async.AsyncCommandQueued;
-import com.cloud.async.AsyncJob;
-import com.cloud.async.AsyncJobManager;
-import com.cloud.async.AsyncJobVO;
-import com.cloud.configuration.Config;
-import com.cloud.configuration.ConfigurationVO;
-import com.cloud.configuration.dao.ConfigurationDao;
-import com.cloud.domain.Domain;
-import com.cloud.domain.DomainVO;
-import com.cloud.event.ActionEventUtils;
-import com.cloud.exception.*;
-import com.cloud.user.*;
-import com.cloud.utils.NumbersUtil;
-import com.cloud.utils.Pair;
-import com.cloud.utils.StringUtils;
-import com.cloud.utils.component.ComponentContext;
-import com.cloud.utils.component.PluggableService;
-import com.cloud.utils.concurrency.NamedThreadFactory;
-import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
-import com.cloud.utils.exception.CloudRuntimeException;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InterruptedIOException;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URLEncoder;
+import java.security.SecureRandom;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TimeZone;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import javax.annotation.PostConstruct;
+import javax.crypto.Mac;
+import javax.crypto.spec.SecretKeySpec;
+import javax.inject.Inject;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
 import org.apache.cloudstack.acl.APIChecker;
-import org.apache.cloudstack.api.*;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseAsyncCreateCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.ResponseObject;
+import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.command.admin.host.ListHostsCmd;
 import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd;
 import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd;
@@ -61,7 +82,13 @@ import org.apache.cloudstack.api.response.ExceptionResponse;
 import org.apache.cloudstack.api.response.ListResponse;
 import org.apache.cloudstack.region.RegionManager;
 import org.apache.commons.codec.binary.Base64;
-import org.apache.http.*;
+import org.apache.http.ConnectionClosedException;
+import org.apache.http.HttpException;
+import org.apache.http.HttpRequest;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpServerConnection;
+import org.apache.http.HttpStatus;
+import org.apache.http.NameValuePair;
 import org.apache.http.client.utils.URLEncodedUtils;
 import org.apache.http.entity.BasicHttpEntity;
 import org.apache.http.impl.DefaultHttpResponseFactory;
@@ -72,29 +99,54 @@ import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.params.HttpParams;
-import org.apache.http.protocol.*;
+import org.apache.http.protocol.BasicHttpContext;
+import org.apache.http.protocol.BasicHttpProcessor;
+import org.apache.http.protocol.HttpContext;
+import org.apache.http.protocol.HttpRequestHandler;
+import org.apache.http.protocol.HttpRequestHandlerRegistry;
+import org.apache.http.protocol.HttpService;
+import org.apache.http.protocol.ResponseConnControl;
+import org.apache.http.protocol.ResponseContent;
+import org.apache.http.protocol.ResponseDate;
+import org.apache.http.protocol.ResponseServer;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
-import javax.annotation.PostConstruct;
-import javax.crypto.Mac;
-import javax.crypto.spec.SecretKeySpec;
-import javax.inject.Inject;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.*;
-import java.security.SecureRandom;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
+import com.cloud.api.response.ApiResponseSerializer;
+import com.cloud.async.AsyncCommandQueued;
+import com.cloud.async.AsyncJob;
+import com.cloud.async.AsyncJobManager;
+import com.cloud.async.AsyncJobVO;
+import com.cloud.configuration.Config;
+import com.cloud.configuration.ConfigurationVO;
+import com.cloud.configuration.dao.ConfigurationDao;
+import com.cloud.domain.Domain;
+import com.cloud.domain.DomainVO;
+import com.cloud.event.ActionEventUtils;
+import com.cloud.exception.AccountLimitException;
+import com.cloud.exception.CloudAuthenticationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.exception.RequestLimitException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.user.Account;
+import com.cloud.user.AccountManager;
+import com.cloud.user.DomainManager;
+import com.cloud.user.User;
+import com.cloud.user.UserAccount;
+import com.cloud.user.UserContext;
+import com.cloud.user.UserVO;
+import com.cloud.utils.NumbersUtil;
+import com.cloud.utils.Pair;
+import com.cloud.utils.StringUtils;
+import com.cloud.utils.component.ComponentContext;
+import com.cloud.utils.component.PluggableService;
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.Transaction;
+import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component
 public class ApiServer implements HttpRequestHandler, ApiServerService {
@@ -113,7 +165,7 @@ public class ApiServer implements HttpRequestHandler, ApiServerService {
     @Inject List<PluggableService> _pluggableServices;
     @Inject List<APIChecker> _apiAccessCheckers;
 
-    @Inject private RegionManager _regionMgr = null;
+    @Inject private final RegionManager _regionMgr = null;
 
     private static int _workerCount = 0;
     private static ApiServer s_instance = null;
@@ -227,6 +279,9 @@ public class ApiServer implements HttpRequestHandler, ApiServerService {
                 parameterMap.put(param.getName(), new String[] { param.getValue() });
             }
 
+	    // Get the type of http method being used.
+            parameterMap.put("httpmethod", new String[] { request.getRequestLine().getMethod() });
+
             // Check responseType, if not among valid types, fallback to JSON
             if (!(responseType.equals(BaseCmd.RESPONSE_TYPE_JSON) || responseType.equals(BaseCmd.RESPONSE_TYPE_XML)))
                 responseType = BaseCmd.RESPONSE_TYPE_XML;
@@ -254,10 +309,12 @@ public class ApiServer implements HttpRequestHandler, ApiServerService {
         }
     }
 
+    @Override
     @SuppressWarnings("rawtypes")
     public String handleRequest(Map params, String responseType, StringBuffer auditTrailSb) throws ServerApiException {
         String response = null;
         String[] command = null;
+
         try {
             command = (String[]) params.get("command");
             if (command == null) {
@@ -299,6 +356,7 @@ public class ApiServer implements HttpRequestHandler, ApiServerService {
                     cmdObj.configure();
                     cmdObj.setFullUrlParams(paramMap);
                     cmdObj.setResponseType(responseType);
+		    cmdObj.setHttpMethod(paramMap.get("httpmethod").toString());
 
                     // This is where the command is either serialized, or directly dispatched
                     response = queueCommand(cmdObj, paramMap);
@@ -530,6 +588,7 @@ public class ApiServer implements HttpRequestHandler, ApiServerService {
         }
     }
 
+    @Override
     public boolean verifyRequest(Map<String, Object[]> requestParameters, Long userId) throws ServerApiException {
         try {
             String apiKey = null;
@@ -692,10 +751,12 @@ public class ApiServer implements HttpRequestHandler, ApiServerService {
         return false;
     }
 
+    @Override
     public Long fetchDomainId(String domainUUID) {
         return _domainMgr.getDomain(domainUUID).getId();
     }
 
+    @Override
     public void loginUser(HttpSession session, String username, String password, Long domainId, String domainPath, String loginIpAddress ,Map<String, Object[]> requestParameters) throws CloudAuthenticationException {
         // We will always use domainId first. If that does not exist, we will use domain name. If THAT doesn't exist
         // we will default to ROOT
@@ -770,11 +831,13 @@ public class ApiServer implements HttpRequestHandler, ApiServerService {
         throw new CloudAuthenticationException("Failed to authenticate user " + username + " in domain " + domainId + "; please provide valid credentials");
     }
 
+    @Override
     public void logoutUser(long userId) {
         _accountMgr.logoutUser(Long.valueOf(userId));
         return;
     }
 
+    @Override
     public boolean verifyUser(Long userId) {
         User user = _accountMgr.getUserIncludingRemoved(userId);
         Account account = null;
@@ -931,6 +994,7 @@ public class ApiServer implements HttpRequestHandler, ApiServerService {
         }
     }
 
+    @Override
     public String getSerializedApiError(int errorCode, String errorText, Map<String, Object[]> apiCommandParams, String responseType) {
         String responseName = null;
         Class<?> cmdClass = null;
@@ -965,6 +1029,7 @@ public class ApiServer implements HttpRequestHandler, ApiServerService {
         return responseText;
     }
 
+    @Override
     public String getSerializedApiError(ServerApiException ex, Map<String, Object[]> apiCommandParams, String responseType) {
         String responseName = null;
         Class<?> cmdClass = null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/server/src/com/cloud/api/ApiServerService.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServerService.java b/server/src/com/cloud/api/ApiServerService.java
index 12d8b52..dac81c6 100644
--- a/server/src/com/cloud/api/ApiServerService.java
+++ b/server/src/com/cloud/api/ApiServerService.java
@@ -21,6 +21,7 @@ import java.util.Map;
 import javax.servlet.http.HttpSession;
 
 import org.apache.cloudstack.api.ServerApiException;
+
 import com.cloud.exception.CloudAuthenticationException;
 
 public interface ApiServerService {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/server/src/com/cloud/api/ApiServlet.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServlet.java b/server/src/com/cloud/api/ApiServlet.java
index 03bfb5f..7525b61 100755
--- a/server/src/com/cloud/api/ApiServlet.java
+++ b/server/src/com/cloud/api/ApiServlet.java
@@ -299,8 +299,10 @@ public class ApiServlet extends HttpServlet {
                 auditTrailSb.insert(0, "(userId=" + UserContext.current().getCallerUserId() + " accountId="
                         + UserContext.current().getCaller().getId() + " sessionId=" + (session != null ? session.getId() : null) + ")");
 
-                    String response = _apiServer.handleRequest(params, responseType, auditTrailSb);
-                    writeResponse(resp, response != null ? response : "", HttpServletResponse.SC_OK, responseType);
+                // Add the HTTP method (GET/POST/PUT/DELETE) as well into the params map.
+                params.put("httpmethod", new String[] { req.getMethod() });
+                String response = _apiServer.handleRequest(params, responseType, auditTrailSb);
+                writeResponse(resp, response != null ? response : "", HttpServletResponse.SC_OK, responseType);
             } else {
                 if (session != null) {
                     try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/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 35d09fc..45b313f 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -32,15 +32,27 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import com.cloud.api.ApiDBUtils;
 import org.apache.cloudstack.acl.ControlledEntity.ACLType;
 import org.apache.cloudstack.acl.SecurityChecker.AccessType;
 import org.apache.cloudstack.affinity.AffinityGroupVO;
 import org.apache.cloudstack.affinity.dao.AffinityGroupDao;
 import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao;
+import org.apache.cloudstack.api.BaseCmd.HTTPMethod;
 import org.apache.cloudstack.api.command.admin.vm.AssignVMCmd;
 import org.apache.cloudstack.api.command.admin.vm.RecoverVMCmd;
-import org.apache.cloudstack.api.command.user.vm.*;
+import org.apache.cloudstack.api.command.user.vm.AddNicToVMCmd;
+import org.apache.cloudstack.api.command.user.vm.DeployVMCmd;
+import org.apache.cloudstack.api.command.user.vm.DestroyVMCmd;
+import org.apache.cloudstack.api.command.user.vm.RebootVMCmd;
+import org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd;
+import org.apache.cloudstack.api.command.user.vm.ResetVMPasswordCmd;
+import org.apache.cloudstack.api.command.user.vm.ResetVMSSHKeyCmd;
+import org.apache.cloudstack.api.command.user.vm.RestoreVMCmd;
+import org.apache.cloudstack.api.command.user.vm.ScaleVMCmd;
+import org.apache.cloudstack.api.command.user.vm.StartVMCmd;
+import org.apache.cloudstack.api.command.user.vm.UpdateDefaultNicForVMCmd;
+import org.apache.cloudstack.api.command.user.vm.UpdateVMCmd;
+import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd;
 import org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd;
 import org.apache.cloudstack.api.command.user.vmgroup.DeleteVMGroupCmd;
 import org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntity;
@@ -67,6 +79,7 @@ import com.cloud.agent.api.to.VirtualMachineTO;
 import com.cloud.agent.api.to.VolumeTO;
 import com.cloud.agent.manager.Commands;
 import com.cloud.alert.AlertManager;
+import com.cloud.api.ApiDBUtils;
 import com.cloud.api.query.dao.UserVmJoinDao;
 import com.cloud.api.query.vo.UserVmJoinVO;
 import com.cloud.async.AsyncJobManager;
@@ -405,6 +418,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
     private int _createprivatetemplatefromvolumewait;
     private int _createprivatetemplatefromsnapshotwait;
     private final int MAX_VM_NAME_LEN = 80;
+    private final int MAX_HTTP_GET_LENGTH = 2 * MAX_USER_DATA_LENGTH_BYTES;
+    private final int MAX_HTTP_POST_LENGTH = 16 * MAX_USER_DATA_LENGTH_BYTES;
 
     @Inject
     protected OrchestrationService _orchSrvc;
@@ -1604,7 +1619,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
         if (userData != null) {
             // check and replace newlines
             userData = userData.replace("\\n", "");
-            validateUserData(userData);
+            validateUserData(userData, cmd.getHttpMethod());
             // update userData on domain router.
             updateUserdata = true;
         } else {
@@ -1926,10 +1941,10 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
 
     @Override
     public UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> securityGroupIdList, Account owner,
- String hostName,
-            String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor,
-            String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps,
-            String keyboard, List<Long> affinityGroupIdList)
+            String hostName, String displayName, Long diskOfferingId, Long diskSize, String group,
+	    HypervisorType hypervisor, HTTPMethod httpmethod, String userData, String sshKeyPair,
+	    Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps, String keyboard,
+	    List<Long> affinityGroupIdList)
                     throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException {
 
         Account caller = UserContext.current().getCaller();
@@ -1979,18 +1994,17 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
         }
 
         return createVirtualMachine(zone, serviceOffering, template, hostName, displayName, owner, diskOfferingId,
-                diskSize, networkList, securityGroupIdList, group, userData, sshKeyPair, hypervisor, caller,
-                requestedIps, defaultIps, keyboard, affinityGroupIdList);
+                diskSize, networkList, securityGroupIdList, group, httpmethod, userData, sshKeyPair, hypervisor,
+		caller, requestedIps, defaultIps, keyboard, affinityGroupIdList);
     }
 
     @Override
     public UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> networkIdList,
-            List<Long> securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData,
- String sshKeyPair, Map<Long, IpAddresses> requestedIps,
-            IpAddresses defaultIps, String keyboard, List<Long> affinityGroupIdList)
-            throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException,
-            StorageUnavailableException,
-            ResourceAllocationException {
+            List<Long> securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId,
+	    Long diskSize, String group, HypervisorType hypervisor, HTTPMethod httpmethod, String userData,
+            String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps, String keyboard,
+	    List<Long> affinityGroupIdList) throws InsufficientCapacityException, ConcurrentOperationException,
+	    ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException {
 
         Account caller = UserContext.current().getCaller();
         List<NetworkVO> networkList = new ArrayList<NetworkVO>();
@@ -2096,15 +2110,15 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
         }
 
         return createVirtualMachine(zone, serviceOffering, template, hostName, displayName, owner, diskOfferingId,
-                diskSize, networkList, securityGroupIdList, group, userData, sshKeyPair, hypervisor, caller,
-                requestedIps, defaultIps, keyboard, affinityGroupIdList);
+                diskSize, networkList, securityGroupIdList, group, httpmethod, userData, sshKeyPair, hypervisor,
+		caller, requestedIps, defaultIps, keyboard, affinityGroupIdList);
     }
 
     @Override
     public UserVm createAdvancedVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> networkIdList, Account owner, String hostName,
             String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor,
-            String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps,
-            String keyboard, List<Long> affinityGroupIdList)
+	    HTTPMethod httpmethod, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps,
+	    IpAddresses defaultIps, String keyboard, List<Long> affinityGroupIdList)
                     throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException {
 
         Account caller = UserContext.current().getCaller();
@@ -2213,8 +2227,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
         }
 
         return createVirtualMachine(zone, serviceOffering, template, hostName, displayName, owner, diskOfferingId,
-                diskSize, networkList, null, group, userData, sshKeyPair, hypervisor, caller, requestedIps, defaultIps,
-                keyboard, affinityGroupIdList);
+		diskSize, networkList, null, group, httpmethod, userData, sshKeyPair, hypervisor, caller, requestedIps,
+		defaultIps, keyboard, affinityGroupIdList);
     }
 
 
@@ -2227,9 +2241,9 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
 
     @DB @ActionEvent(eventType = EventTypes.EVENT_VM_CREATE, eventDescription = "deploying Vm", create = true)
     protected UserVm createVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, String hostName, String displayName, Account owner, Long diskOfferingId,
-            Long diskSize, List<NetworkVO> networkList, List<Long> securityGroupIdList, String group, String userData,
-            String sshKeyPair, HypervisorType hypervisor, Account caller, Map<Long, IpAddresses> requestedIps,
-            IpAddresses defaultIps, String keyboard, List<Long> affinityGroupIdList)
+            Long diskSize, List<NetworkVO> networkList, List<Long> securityGroupIdList, String group, HTTPMethod httpmethod,
+	    String userData, String sshKeyPair, HypervisorType hypervisor, Account caller, Map<Long, IpAddresses> requestedIps,
+	    IpAddresses defaultIps, String keyboard, List<Long> affinityGroupIdList)
                     throws InsufficientCapacityException, ResourceUnavailableException, ConcurrentOperationException, StorageUnavailableException, ResourceAllocationException {
 
         _accountMgr.checkAccess(caller, null, true, owner);
@@ -2337,7 +2351,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
         }
 
         // check if the user data is correct
-        validateUserData(userData);
+        validateUserData(userData, httpmethod);
 
         // Find an SSH public key corresponding to the key pair name, if one is
         // given
@@ -2601,22 +2615,36 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
         return vm;
     }
 
-    private void validateUserData(String userData) {
+    private void validateUserData(String userData, HTTPMethod httpmethod) {
         byte[] decodedUserData = null;
         if (userData != null) {
             if (!Base64.isBase64(userData)) {
                 throw new InvalidParameterValueException(
                         "User data is not base64 encoded");
             }
-            if (userData.length() >= 2 * MAX_USER_DATA_LENGTH_BYTES) {
-                throw new InvalidParameterValueException(
-                        "User data is too long");
-            }
-            decodedUserData = Base64.decodeBase64(userData.getBytes());
-            if (decodedUserData.length > MAX_USER_DATA_LENGTH_BYTES) {
-                throw new InvalidParameterValueException(
-                        "User data is too long");
+            // If GET, use 4K. If POST, support upto 32K.
+            if (httpmethod.equals(HTTPMethod.GET)) {
+                if (userData.length() >= MAX_HTTP_GET_LENGTH) {
+                    throw new InvalidParameterValueException(
+                            "User data is too long for an http GET request");
+                }
+                decodedUserData = Base64.decodeBase64(userData.getBytes());
+                if (decodedUserData.length > MAX_HTTP_GET_LENGTH) {
+                    throw new InvalidParameterValueException(
+                        "User data is too long for GET request");
+                }
+            } else if (httpmethod.equals(HTTPMethod.POST)) {
+                if (userData.length() >= MAX_HTTP_POST_LENGTH) {
+                    throw new InvalidParameterValueException(
+                            "User data is too long for an http POST request");
+                }
+                decodedUserData = Base64.decodeBase64(userData.getBytes());
+                if (decodedUserData.length > MAX_HTTP_POST_LENGTH) {
+                    throw new InvalidParameterValueException(
+                        "User data is too long for POST request");
+                }
             }
+
             if (decodedUserData.length < 1) {
                 throw new InvalidParameterValueException(
                         "User data is too short");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/server/test/com/cloud/vm/MockUserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/MockUserVmManagerImpl.java b/server/test/com/cloud/vm/MockUserVmManagerImpl.java
index 0d0a8f4..d886fd8 100644
--- a/server/test/com/cloud/vm/MockUserVmManagerImpl.java
+++ b/server/test/com/cloud/vm/MockUserVmManagerImpl.java
@@ -23,9 +23,22 @@ import java.util.Map;
 import javax.ejb.Local;
 import javax.naming.ConfigurationException;
 
+import org.apache.cloudstack.api.BaseCmd.HTTPMethod;
 import org.apache.cloudstack.api.command.admin.vm.AssignVMCmd;
 import org.apache.cloudstack.api.command.admin.vm.RecoverVMCmd;
-import org.apache.cloudstack.api.command.user.vm.*;
+import org.apache.cloudstack.api.command.user.vm.AddNicToVMCmd;
+import org.apache.cloudstack.api.command.user.vm.DeployVMCmd;
+import org.apache.cloudstack.api.command.user.vm.DestroyVMCmd;
+import org.apache.cloudstack.api.command.user.vm.RebootVMCmd;
+import org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd;
+import org.apache.cloudstack.api.command.user.vm.ResetVMPasswordCmd;
+import org.apache.cloudstack.api.command.user.vm.ResetVMSSHKeyCmd;
+import org.apache.cloudstack.api.command.user.vm.RestoreVMCmd;
+import org.apache.cloudstack.api.command.user.vm.ScaleVMCmd;
+import org.apache.cloudstack.api.command.user.vm.StartVMCmd;
+import org.apache.cloudstack.api.command.user.vm.UpdateDefaultNicForVMCmd;
+import org.apache.cloudstack.api.command.user.vm.UpdateVMCmd;
+import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd;
 import org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd;
 import org.apache.cloudstack.api.command.user.vmgroup.DeleteVMGroupCmd;
 import org.springframework.stereotype.Component;
@@ -40,13 +53,13 @@ import com.cloud.dc.DataCenter;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.ManagementServerException;
+import com.cloud.exception.PermissionDeniedException;
 import com.cloud.exception.ResourceAllocationException;
 import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.exception.StorageUnavailableException;
 import com.cloud.exception.VirtualMachineMigrationException;
-import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.exception.PermissionDeniedException;
 import com.cloud.host.Host;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.network.Network;
@@ -59,10 +72,9 @@ import com.cloud.template.VirtualMachineTemplate;
 import com.cloud.user.Account;
 import com.cloud.uservm.UserVm;
 import com.cloud.utils.Pair;
-import com.cloud.utils.component.Manager;
 import com.cloud.utils.component.ManagerBase;
-import com.cloud.utils.exception.ExecutionException;
 import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.utils.exception.ExecutionException;
 
 @Component
 @Local(value = { UserVmManager.class, UserVmService.class })
@@ -329,10 +341,10 @@ public class MockUserVmManagerImpl extends ManagerBase implements UserVmManager,
 
     @Override
     public UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> securityGroupIdList, Account owner,
-            String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps,
- IpAddresses defaultIp,
-            String keyboard, List<Long> affinityGroupIdList) throws InsufficientCapacityException,
-            ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException,
+            String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor,
+	    HTTPMethod httpmethod, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps,
+            IpAddresses defaultIp, String keyboard, List<Long> affinityGroupIdList)
+	    throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException,
             ResourceAllocationException {
         // TODO Auto-generated method stub
         return null;
@@ -340,21 +352,21 @@ public class MockUserVmManagerImpl extends ManagerBase implements UserVmManager,
 
     @Override
     public UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> networkIdList,
-            List<Long> securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData,
- String sshKeyPair, Map<Long, IpAddresses> requestedIps,
-            IpAddresses defaultIps, String keyboard, List<Long> affinityGroupIdList)
-            throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException,
-            StorageUnavailableException, ResourceAllocationException {
+            List<Long> securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize,
+	    String group, HypervisorType hypervisor, HTTPMethod httpmethod, String userData,
+            String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps,
+	    String keyboard, List<Long> affinityGroupIdList) throws InsufficientCapacityException,
+	    ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public UserVm createAdvancedVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> networkIdList, Account owner, String hostName,
-            String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps,
-            String keyboard, List<Long> affinityGroupIdList) throws InsufficientCapacityException,
-            ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException,
-            ResourceAllocationException {
+            String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor,
+	    HTTPMethod httpmethod, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps,
+	    IpAddresses defaultIps, String keyboard, List<Long> affinityGroupIdList) throws InsufficientCapacityException,
+	    ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException {
         // TODO Auto-generated method stub
         return null;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/server/test/com/cloud/vm/dao/UserVmDaoImplTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/dao/UserVmDaoImplTest.java b/server/test/com/cloud/vm/dao/UserVmDaoImplTest.java
index 0936180..12d08ec 100644
--- a/server/test/com/cloud/vm/dao/UserVmDaoImplTest.java
+++ b/server/test/com/cloud/vm/dao/UserVmDaoImplTest.java
@@ -20,24 +20,47 @@ import javax.inject.Inject;
 
 import junit.framework.TestCase;
 
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
+import org.apache.commons.lang.RandomStringUtils;
+import org.junit.Test;
 
+import com.cloud.hypervisor.Hypervisor;
 import com.cloud.vm.UserVmVO;
 import com.cloud.vm.VirtualMachine;
 
-
 public class UserVmDaoImplTest extends TestCase {
     @Inject UserVmDao dao;
-     
-	public void testPersist() {
-        
-        dao.expunge(1000l);
-        
-        UserVmVO vo = new UserVmVO(1000l, "instancename", "displayname", 1, HypervisorType.XenServer, 1, true, true, 1, 1, 1, "userdata", "name", null);
+
+    public void makeAndVerifyEntry(Long vmId, String instanceName, String displayName, long templateId, boolean userdataFlag, Hypervisor.HypervisorType hypervisor,
+            long guestOsId, boolean haEnabled, boolean limitCpuUse, long domainId, long accountId, long serviceOfferingId, String name, Long diskOfferingId) {
+
+        dao.expunge(vmId);
+        String userdata;
+
+        if (userdataFlag) {
+            // Generate large userdata to simulate 32k of random string data for userdata submitted through HTTP POST requests.
+            userdata = RandomStringUtils.randomAlphanumeric(32*1024);
+        } else {
+            // Generate normal sized userdata to simulate 2k of random string data.
+            userdata = RandomStringUtils.randomAlphanumeric(2*1024);
+        }
+
+        // Persist the data.
+        UserVmVO vo = new UserVmVO(vmId, instanceName, displayName, templateId, hypervisor, guestOsId, haEnabled, limitCpuUse, domainId, accountId, serviceOfferingId, userdata, name, diskOfferingId);
         dao.persist(vo);
-        
-        vo = dao.findById(1000l);
+
+        vo = dao.findById(vmId);
         assert (vo.getType() == VirtualMachine.Type.User) : "Incorrect type " + vo.getType();
+
+        // Check whether the userdata matches what we generated.
+        assert (vo.getUserData().equals(userdata)) : "User data retrieved does not match userdata generated as input";
+
+    }
+
+    @Test
+    public void testPersist() {
+        Long vmId = 2222l;
+        makeAndVerifyEntry(vmId, "vm1", "vmdisp1", 1l, false, Hypervisor.HypervisorType.KVM, 1l, false, true, 1l, 1l, 1l, "uservm1", 1l);
+        makeAndVerifyEntry(vmId, "vm1", "vmdisp1", 1l, true, Hypervisor.HypervisorType.KVM, 1l, false, true, 1l, 1l, 1l, "uservm1", 1l);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/server/test/com/cloud/vm/dao/UserVmDaoTestConfiguration.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/dao/UserVmDaoTestConfiguration.java b/server/test/com/cloud/vm/dao/UserVmDaoTestConfiguration.java
new file mode 100644
index 0000000..6a63fab
--- /dev/null
+++ b/server/test/com/cloud/vm/dao/UserVmDaoTestConfiguration.java
@@ -0,0 +1,50 @@
+// 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
+// the License.  You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package com.cloud.vm.dao;
+
+import java.io.IOException;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ComponentScan.Filter;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.FilterType;
+import org.springframework.core.type.classreading.MetadataReader;
+import org.springframework.core.type.classreading.MetadataReaderFactory;
+import org.springframework.core.type.filter.TypeFilter;
+
+import com.cloud.utils.component.SpringComponentScanUtils;
+
+@Configuration
+@ComponentScan(basePackageClasses={
+        UserVmDaoImpl.class},
+        includeFilters={@Filter(value=UserVmDaoTestConfiguration.Library.class, type=FilterType.CUSTOM)},
+        useDefaultFilters=false
+        )
+
+public class UserVmDaoTestConfiguration {
+    public static class Library implements TypeFilter {
+
+        @Override
+        public boolean match(MetadataReader mdr, MetadataReaderFactory arg1) throws IOException {
+            mdr.getClassMetadata().getClassName();
+            ComponentScan cs = UserVmDaoTestConfiguration.class.getAnnotation(ComponentScan.class);
+            return SpringComponentScanUtils.includedInBasePackageClasses(mdr.getClassMetadata().getClassName(), cs);
+        }
+
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/server/test/resources/UserVMDaoTestContext.xml
----------------------------------------------------------------------
diff --git a/server/test/resources/UserVMDaoTestContext.xml b/server/test/resources/UserVMDaoTestContext.xml
new file mode 100644
index 0000000..6045f59
--- /dev/null
+++ b/server/test/resources/UserVMDaoTestContext.xml
@@ -0,0 +1,44 @@
+<!-- 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. -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
+  xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/tx
+                      http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
+                      http://www.springframework.org/schema/aop
+                      http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+  <context:annotation-config />
+
+  <!-- @DB support -->
+  <bean id="componentContext" class="com.cloud.utils.component.ComponentContext" />
+
+  <bean id="transactionContextBuilder" class="com.cloud.utils.db.TransactionContextBuilder" />
+  <bean id="actionEventInterceptor" class="com.cloud.event.ActionEventInterceptor" />
+  <bean id="instantiatePostProcessor" class="com.cloud.utils.component.ComponentInstantiationPostProcessor">
+    <property name="Interceptors">
+        <list>
+            <ref bean="transactionContextBuilder" />
+            <ref bean="actionEventInterceptor" />
+        </list>
+    </property>
+  </bean>
+
+  <bean id="UVMTestConfiguration"
+    class="com.cloud.vm.dao.UserVmDaoTestConfiguration" />
+  <bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor" >
+    <property name="requiredParameterValue" value="false" />
+  </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index cfce81f..78444fd 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -296,6 +296,8 @@ UPDATE configuration SET value='KVM,XenServer,VMware,BareMetal,Ovm,LXC' WHERE na
 INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type)
      VALUES (10, 'routing-10', 'SystemVM Template (LXC)', 0, now(), 'SYSTEM', 0, 64, 1, 'http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2', '2755de1f9ef2ce4d6f2bee2efbb4da92', 0, 'SystemVM Template (LXC)', 'QCOW2', 15, 0, 1, 'LXC');
 
+ALTER TABLE `cloud`.`user_vm` MODIFY user_data TEXT(32768);
+
 -- END: support for LXC
 
 CREATE TABLE `cloud`.`vm_snapshots` (
@@ -1107,4 +1109,4 @@ CREATE VIEW `cloud`.`account_view` AS
             and async_job.instance_type = 'Account'
             and async_job.job_status = 0;
 
-alter table `cloud_usage`.`usage_network_offering` add column nic_id bigint(20) unsigned NOT NULL;             
\ No newline at end of file
+alter table `cloud_usage`.`usage_network_offering` add column nic_id bigint(20) unsigned NOT NULL;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0caae6b/test/integration/component/test_deploy_vm_with_userdata.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_deploy_vm_with_userdata.py b/test/integration/component/test_deploy_vm_with_userdata.py
new file mode 100644
index 0000000..6b5767b
--- /dev/null
+++ b/test/integration/component/test_deploy_vm_with_userdata.py
@@ -0,0 +1,108 @@
+#!/usr/bin/env python
+
+import marvin
+from marvin import cloudstackTestCase
+from marvin.cloudstackTestCase import *
+from marvin.integration.lib.base import *
+
+import unittest
+import hashlib
+import random
+import os
+import string
+
+class TestDeployVmWithUserData(cloudstackTestCase):
+    """
+    This test deploys a virtual machine into a user account
+    using the small service offering and builtin template
+    """
+    def setUp(self):
+        password = "password"
+
+        self.apiClient = self.testClient.getApiClient() #Get ourselves an API client
+
+        self.acct = createAccount.createAccountCmd() #The createAccount command
+        self.acct.accounttype = 0                    #We need a regular user. admins have accounttype=1
+        self.acct.firstname = 'firstname'
+        self.acct.lastname = 'lastname'
+        self.acct.password = password
+        self.acct.username = 'user1'
+        self.acct.email = 'user1@user.com'
+        self.acct.account = 'user1'
+        self.acct.domainid = 1                       #The default ROOT domain
+        self.acctResponse = self.apiClient.createAccount(self.acct)
+
+        self.debug("Successfully created account: %s, user: %s, id: \
+                   %s"%(self.acctResponse.account.account, \
+                        self.acctResponse.account.username, \
+                        self.acctResponse.account.id))
+
+        # Generate userdata of 2500 bytes. This is larger than the 2048 bytes limit.
+        # CS however allows for upto 4K bytes in the code. So this must succeed.
+        # Overall, the query length must not exceed 4K, for then the json decoder
+        # will fail this operation at the marvin client side itself.
+        user_data = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(2500))
+
+        self.virtual_machine = {
+          "displayname": "Test VM",
+          "username": "root",
+          "password": "password",
+          "ssh_port": 22,
+          "hypervisor": 'VMware',
+          "privateport": 22,
+          "publicport": 22,
+          "protocol": 'TCP',
+        }
+        #self.virtual_machine["userdata"] = base64.b64encode(user_data)
+        self.virtual_machine["userdata"] = user_data
+
+    def test_DeployVm(self):
+        """
+        Let's start by defining the attributes of our VM that we will be
+        deploying on CloudStack. We will be assuming a single zone is available
+        and is configured and all templates are Ready
+        """
+        deployVmCmd = deployVirtualMachine.deployVirtualMachineCmd()
+        deployVmCmd.zoneid = 1
+        deployVmCmd.account = self.acct.account
+        deployVmCmd.domainid = self.acct.domainid
+        deployVmCmd.templateid = 7
+        deployVmCmd.serviceofferingid = 1
+
+        # Userdata is passed in the virtual_machine dictionary.
+        deployVmResponse = VirtualMachine.create(
+          self.apiClient,
+          self.virtual_machine,
+          accountid=self.acct.account,
+          domainid=self.acct.domainid,
+          serviceofferingid=deployVmCmd.serviceofferingid,
+          templateid=deployVmCmd.templateid,
+          zoneid=deployVmCmd.zoneid
+        )
+
+        # At this point our VM is expected to be Running. Let's find out what
+        # listVirtualMachines tells us about VMs in this account
+
+        listVmCmd = listVirtualMachines.listVirtualMachinesCmd()
+        listVmCmd.id = deployVmResponse.id
+        listVmResponse = self.apiClient.listVirtualMachines(listVmCmd)
+
+        self.assertNotEqual(len(listVmResponse), 0, "Check if the list API \
+                            returns a non-empty response")
+
+        vm = listVmResponse[0]
+
+        self.assertEqual(vm.id, deployVmResponse.id, "Check if the VM returned \
+                         is the same as the one we deployed")
+
+
+        self.assertEqual(vm.state, "Running", "Check if VM has reached \
+                         a state of running")
+
+    def tearDown(self):
+        """
+        Delete the account created. This will clear the VM belonging to that account as well.
+        """
+        deleteAcct = deleteAccount.deleteAccountCmd()
+        deleteAcct.id = self.acctResponse.account.id
+        self.apiClient.deleteAccount(deleteAcct)


[37/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
in case vm doesn't exist on kvm host, getconnectionbyname will throw exception, need to catch the exception, and return the default connection


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

Branch: refs/heads/ui-vm-affinity
Commit: 435f4bceb27f7b7bc96ad1ee46f4688b9a971355
Parents: cdd459b
Author: Edison Su <su...@gmail.com>
Authored: Wed Apr 24 10:38:14 2013 -0700
Committer: Edison Su <su...@gmail.com>
Committed: Wed Apr 24 10:39:07 2013 -0700

----------------------------------------------------------------------
 .../hypervisor/kvm/resource/LibvirtConnection.java |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/435f4bce/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java
index 2ad1616..2fc5425 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java
@@ -61,13 +61,19 @@ public class LibvirtConnection {
     static public Connect getConnectionByVmName(String vmName) throws LibvirtException {
         HypervisorType[] hypervisors = new HypervisorType[] {HypervisorType.KVM, Hypervisor.HypervisorType.LXC};
 
+        
         for (HypervisorType hypervisor : hypervisors) {
-          Connect conn = LibvirtConnection.getConnectionByType(hypervisor.toString());
-          if (conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName.getBytes())) != null) {
-             return conn;
-          }
+            try {
+                Connect conn = LibvirtConnection.getConnectionByType(hypervisor.toString());
+                if (conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName.getBytes())) != null) {
+                    return conn;
+                }
+            } catch (Exception e) {
+               s_logger.debug("can't find connection: " + hypervisor.toString() + ", for vm: " + vmName + ", continue");
+            }
         }
 
+        s_logger.debug("can't find which hypervisor the vm used , then use the default hypervisor");
         // return the default connection
         return getConnection();
     }


[42/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
Merge branch 'master' into ui-vm-affinity

Conflicts:
	ui/scripts/instances.js


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

Branch: refs/heads/ui-vm-affinity
Commit: 25f2f0fcb795017fb8e54af86814a1663eea21bb
Parents: 922b51c 8f5d8d5
Author: Brian Federle <br...@citrix.com>
Authored: Wed Apr 24 16:02:56 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Wed Apr 24 16:02:56 2013 -0700

----------------------------------------------------------------------
 .../region/ha/GlobalLoadBalancingRulesService.java |    3 +
 api/src/com/cloud/vm/UserVmService.java            |   27 +-
 .../org/apache/cloudstack/api/ApiConstants.java    |    1 +
 api/src/org/apache/cloudstack/api/BaseCmd.java     |   24 +
 .../command/admin/account/CreateAccountCmd.java    |   14 +-
 .../api/command/admin/vm/MigrateVMCmd.java         |    2 +-
 .../api/command/user/vm/DeployVMCmd.java           |   12 +-
 .../cloudstack/api/command/user/vm/ListVMsCmd.java |   10 +-
 .../api/command/user/vm/UpdateVMCmd.java           |    2 +-
 .../api/command/user/volume/ListVolumesCmd.java    |    7 +
 .../cloudstack/api/response/ClusterResponse.java   |    9 +-
 .../api/response/DomainRouterResponse.java         |   11 +
 .../api/response/GlobalLoadBalancerResponse.java   |   10 +
 .../cloudstack/api/response/HostResponse.java      |    9 +-
 .../cloudstack/api/response/NetworkResponse.java   |    7 +
 .../cloudstack/api/response/PodResponse.java       |    9 +-
 .../cloudstack/api/response/SnapshotResponse.java  |   16 +
 .../api/response/StoragePoolResponse.java          |   15 +-
 .../cloudstack/api/response/SystemVmResponse.java  |   11 +
 .../cloudstack/api/response/TemplateResponse.java  |    7 +
 .../cloudstack/api/response/VolumeResponse.java    |    8 +
 .../com/cloud/bridge/service/core/s3/S3Engine.java |    2 +-
 .../classes/resources/messages_zh_CN.properties    | 2956 +++++++--------
 core/src/com/cloud/vm/UserVmVO.java                |    6 +-
 debian/rules                                       |    5 +-
 docs/en-US/about-working-with-vms.xml              |   85 +-
 docs/en-US/append-displayname-vms.xml              |   84 +
 docs/en-US/changed-API-commands-4.2.xml            |   16 +
 docs/en-US/creating-network-offerings.xml          |   45 +
 docs/en-US/elastic-ip.xml                          |   90 +
 docs/en-US/images/add-vlan-icon.png                |  Bin 0 -> 860 bytes
 docs/en-US/network-offerings.xml                   |   83 +-
 docs/en-US/networks.xml                            |    1 +
 docs/en-US/non-contiguous-vlan.xml                 |   68 +
 docs/en-US/set-up-network-for-users.xml            |   13 +-
 docs/en-US/using-netscaler-load-balancers.xml      |  132 +-
 docs/en-US/virtual-machines.xml                    |    1 +
 docs/en-US/vlan-provisioning.xml                   |    2 +
 docs/en-US/vm-snapshots.xml                        |   10 +-
 packaging/centos63/package.sh                      |    1 +
 .../debian/config/etc/init.d/cloud-early-config    |   14 +-
 .../hypervisor/kvm/resource/LibvirtConnection.java |   14 +-
 server/src/com/cloud/api/ApiDBUtils.java           |    9 +
 server/src/com/cloud/api/ApiDispatcher.java        |    9 -
 server/src/com/cloud/api/ApiResponseHelper.java    |   20 +
 server/src/com/cloud/api/ApiServer.java            |  155 +-
 server/src/com/cloud/api/ApiServerService.java     |    1 +
 server/src/com/cloud/api/ApiServlet.java           |    6 +-
 .../src/com/cloud/api/query/QueryManagerImpl.java  |   19 +-
 .../api/query/dao/DomainRouterJoinDaoImpl.java     |    1 +
 .../com/cloud/api/query/dao/HostJoinDaoImpl.java   |    1 +
 .../api/query/dao/StoragePoolJoinDaoImpl.java      |    1 +
 .../com/cloud/api/query/dao/VolumeJoinDaoImpl.java |    3 +-
 .../com/cloud/api/query/vo/DomainRouterJoinVO.java |   12 +
 server/src/com/cloud/api/query/vo/HostJoinVO.java  |   11 +
 .../com/cloud/api/query/vo/StoragePoolJoinVO.java  |   11 +
 .../src/com/cloud/api/query/vo/VolumeJoinVO.java   |   15 +
 server/src/com/cloud/configuration/Config.java     |   17 +-
 .../configuration/ConfigurationManagerImpl.java    |   13 +-
 server/src/com/cloud/dc/dao/DataCenterDao.java     |    2 +
 server/src/com/cloud/dc/dao/DataCenterDaoImpl.java |    8 +
 .../network/ExternalFirewallDeviceManagerImpl.java |    2 +-
 .../src/com/cloud/network/NetworkServiceImpl.java  |    2 +-
 .../com/cloud/network/guru/GuestNetworkGuru.java   |    2 +-
 .../src/com/cloud/network/vpc/VpcManagerImpl.java  |   31 +-
 server/src/com/cloud/server/Criteria.java          |    1 +
 server/src/com/cloud/vm/UserVmManagerImpl.java     |   99 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java    |    2 +-
 .../gslb/GlobalLoadBalancingRulesServiceImpl.java  |   14 +
 .../test/com/cloud/vm/MockUserVmManagerImpl.java   |   48 +-
 server/test/com/cloud/vm/UserVmManagerTest.java    |   45 +-
 .../test/com/cloud/vm/dao/UserVmDaoImplTest.java   |   43 +-
 .../cloud/vm/dao/UserVmDaoTestConfiguration.java   |   50 +
 server/test/resources/UserVMDaoTestContext.xml     |   44 +
 .../resource/NfsSecondaryStorageResource.java      |   22 +
 setup/db/db/schema-410to420.sql                    |  334 ++-
 test/integration/smoke/test_affinity_groups.py     |   10 +-
 .../smoke/test_deploy_vm_with_userdata.py          |  144 +
 test/integration/smoke/test_public_ip_range.py     |    6 +-
 test/integration/smoke/test_vm_life_cycle.py       |   28 +-
 tools/marvin/marvin/cloudstackConnection.py        |   34 +-
 tools/marvin/marvin/codegenerator.py               |    4 +-
 tools/marvin/marvin/integration/lib/base.py        |   11 +-
 ui/css/cloudstack3.css                             |   26 +-
 ui/scripts/instances.js                            |   37 +-
 ui/scripts/regions.js                              |  111 +-
 ui/scripts/storage.js                              |   12 +-
 ui/scripts/system.js                               |   91 +-
 ui/scripts/zoneWizard.js                           |   29 +-
 89 files changed, 3464 insertions(+), 1974 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/25f2f0fc/ui/css/cloudstack3.css
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/25f2f0fc/ui/scripts/instances.js
----------------------------------------------------------------------
diff --cc ui/scripts/instances.js
index b1c3e2e,0c4c7d2..f95f0a3
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@@ -194,17 -194,17 +194,23 @@@
  				}
  
          if("hosts" in args.context) {
 -	  $.extend(data, {
 -	    hostid: args.context.hosts[0].id
 -	  });
 -	}
 -        
 +					$.extend(data, {
 +					  hostid: args.context.hosts[0].id
 +					});
 +				}
 +				
 +				if("affinityGroups" in args.context) {				  
 +					$.extend(data, {
 +					  affinitygroupid: args.context.affinityGroups[0].id
 +					});		
 +				}
- 								
++
+         if(args.context.zoneType != null && args.context.zoneType.length > 0) { //Basic type or Advanced type
+           $.extend(data, {
+             zonetype: args.context.zoneType
+           });
 -	}
 -	
++	      }
++        
          $.ajax({
            url: createURL('listVirtualMachines'),
            data: data,


[06/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
fix CLOUDSTACK-2139 When VM is live migrated to a different host , stopped and started , It starts on the original host where it was before live migration.


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

Branch: refs/heads/ui-vm-affinity
Commit: 7dd88fbbc6e26097454ff8e387dbcc971d590dc4
Parents: e23d6b2
Author: Mice Xia <mi...@tcloudcomputing.com>
Authored: Tue Apr 23 14:26:28 2013 +0800
Committer: Mice Xia <mi...@tcloudcomputing.com>
Committed: Tue Apr 23 14:27:03 2013 +0800

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7dd88fbb/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
index b613917..c1f3f15 100755
--- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -1159,7 +1159,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
                 _workDao.update(work.getId(), work);
             }
 
-            return stateTransitTo(vm, Event.OperationSucceeded, null, null);
+            return stateTransitTo(vm, Event.OperationSucceeded, null);
         } catch (NoTransitionException e) {
             s_logger.warn(e.getMessage());
             return false;


[09/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
Adding an optional env variable for DEB packaging to pick up additional profiles to package

Signed-off-by: Chip Childers <ch...@gmail.com>

Conflicts:

	debian/rules


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

Branch: refs/heads/ui-vm-affinity
Commit: 9abc21ceb98dd9064b7816e3f675637cbc54726c
Parents: bdd5634
Author: Chip Childers <ch...@gmail.com>
Authored: Tue Apr 23 16:35:39 2013 +0100
Committer: Chip Childers <ch...@gmail.com>
Committed: Tue Apr 23 16:39:35 2013 +0100

----------------------------------------------------------------------
 debian/rules |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9abc21ce/debian/rules
----------------------------------------------------------------------
diff --git a/debian/rules b/debian/rules
index f5f68ab..c5875e7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -34,8 +34,9 @@ build: build-indep
 build-indep: build-indep-stamp
 
 build-indep-stamp: configure
-	mvn -Pawsapi package -DskipTests -Dsystemvm \
-        -Dcs.replace.properties=replace.properties.tmp
+	mvn package -Pawsapi -DskipTests -Dsystemvm \
+        -Dcs.replace.properties=replace.properties.tmp \
+		${ACS_BUILD_OPTS}
 	touch $@
 
 clean:


[02/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-1735: cloudstack UI - IPv6 - instances detailView - Nics tab - add IPv6 IP Address, IPv6 Gateway, IPv6 CIDR field.


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

Branch: refs/heads/ui-vm-affinity
Commit: 27900695f4146630ef424fda57eca33379dfdfee
Parents: c9c2c59
Author: Jessica Wang <je...@apache.org>
Authored: Mon Apr 22 14:04:47 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Mon Apr 22 14:05:56 2013 -0700

----------------------------------------------------------------------
 ui/scripts/instances.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/27900695/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index bd8b7f6..3a43c60 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1326,10 +1326,15 @@
               {
                 name: { label: 'label.name', header: true },
                 networkname: {label: 'Network Name' },
-                ipaddress: { label: 'label.ip.address' },
                 type: { label: 'label.type' },
+                ipaddress: { label: 'label.ip.address' },                
                 gateway: { label: 'label.gateway' },
                 netmask: { label: 'label.netmask' },
+
+                ip6address: { label: 'IPv6 IP Address' },
+                ip6gateway: { label: 'IPv6 Gateway' },
+                ip6cidr: { label: 'IPv6 CIDR' },
+
                 isdefault: {
                   label: 'label.is.default',
                   converter: function(data) {


[27/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
Account object dereferences as account.name

Previously the jsonHelper would incorrectly deserialize the json
response if the object returned had an attribute of the same name
resulting in an additional level of indirection to refer to the entity's
attributes. eg: account.account.name instead of account.name

This fixes the tests that have still the same indirection exposed.

Signed-off-by: Prasanna Santhanam <ts...@apache.org>


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

Branch: refs/heads/ui-vm-affinity
Commit: 762977d7c6f35c6f412dddc87a832a0bafc4db87
Parents: 403f7b5
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Wed Apr 24 14:37:39 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Apr 24 14:42:44 2013 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_affinity_groups.py |   10 +++---
 test/integration/smoke/test_public_ip_range.py |    6 ++--
 test/integration/smoke/test_vm_life_cycle.py   |   28 +++++++++---------
 3 files changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/762977d7/test/integration/smoke/test_affinity_groups.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_affinity_groups.py b/test/integration/smoke/test_affinity_groups.py
index 832c4a4..3ed3115 100644
--- a/test/integration/smoke/test_affinity_groups.py
+++ b/test/integration/smoke/test_affinity_groups.py
@@ -91,7 +91,7 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
             domainid=cls.domain.id
         )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
             cls.api_client,
@@ -120,8 +120,8 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
             self.api_client,
             self.services["virtual_machine"],
             templateid=self.template.id,
-            accountid=self.account.account.name,
-            domainid=self.account.account.domainid,
+            accountid=self.account.name,
+            domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
             affinitygroupnames=[self.ag.name]
         )
@@ -153,8 +153,8 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
             self.api_client,
             self.services["virtual_machine"],
             templateid=self.template.id,
-            accountid=self.account.account.name,
-            domainid=self.account.account.domainid,
+            accountid=self.account.name,
+            domainid=self.account.domainid,
             serviceofferingid=self.service_offering.id,
             affinitygroupnames=[self.ag.name]
         )

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/762977d7/test/integration/smoke/test_public_ip_range.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_public_ip_range.py b/test/integration/smoke/test_public_ip_range.py
index 7c965ea..f2099ff 100644
--- a/test/integration/smoke/test_public_ip_range.py
+++ b/test/integration/smoke/test_public_ip_range.py
@@ -139,8 +139,8 @@ class TesDedicatePublicIPRange(cloudstackTestCase):
         dedicate_public_ip_range_response = PublicIpRange.dedicate(
                                                 self.apiclient,
                                                 self.public_ip_range.vlan.id,
-                                                account=self.account.account.name,
-                                                domainid=self.account.account.domainid
+                                                account=self.account.name,
+                                                domainid=self.account.domainid
                                             )
         list_public_ip_range_response = PublicIpRange.list(
                                             self.apiclient,
@@ -149,7 +149,7 @@ class TesDedicatePublicIPRange(cloudstackTestCase):
         public_ip_response = list_public_ip_range_response[0]
         self.assertEqual(
                             public_ip_response.account,
-                            self.account.account.name,
+                            self.account.name,
                             "Check account name is in listVlanIpRanges as the account public ip range is dedicated to"
                         )
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/762977d7/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 cf9fd75..ae36c64 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -172,8 +172,8 @@ class TestDeployVM(cloudstackTestCase):
         cls.virtual_machine = VirtualMachine.create(
             cls.apiclient,
             cls.services["small"],
-            accountid=cls.account.account.name,
-            domainid=cls.account.account.domainid,
+            accountid=cls.account.name,
+            domainid=cls.account.domainid,
             serviceofferingid=cls.service_offering.id,
             mode=cls.services['mode']
         )
@@ -250,12 +250,12 @@ class TestDeployVM(cloudstackTestCase):
         3. Has a linklocalip, publicip and a guestip
         @return:
         """
-        routers = list_routers(self.apiclient, account=self.account.account.name)
+        routers = list_routers(self.apiclient, account=self.account.name)
         self.assertTrue(len(routers) > 0, msg = "No virtual router found")
         router = routers[0]
 
         self.assertEqual(router.state, 'Running', msg="Router is not in running state")
-        self.assertEqual(router.account, self.account.account.name, msg="Router does not belong to the account")
+        self.assertEqual(router.account, self.account.name, msg="Router does not belong to the account")
 
         #Has linklocal, public and guest ips
         self.assertIsNotNone(router.linklocalip, msg="Router has no linklocal ip")
@@ -271,12 +271,12 @@ class TestDeployVM(cloudstackTestCase):
         2. is in the account the VM was deployed in
         @return:
         """
-        routers = list_routers(self.apiclient, account=self.account.account.name)
+        routers = list_routers(self.apiclient, account=self.account.name)
         self.assertTrue(len(routers) > 0, msg = "No virtual router found")
         router = routers[0]
 
         self.assertEqual(router.state, 'Running', msg="Router is not in running state")
-        self.assertEqual(router.account, self.account.account.name, msg="Router does not belong to the account")
+        self.assertEqual(router.account, self.account.name, msg="Router does not belong to the account")
 
     def tearDown(self):
         pass
@@ -334,24 +334,24 @@ class TestVMLifeCycle(cloudstackTestCase):
         cls.small_virtual_machine = VirtualMachine.create(
                                         cls.api_client,
                                         cls.services["small"],
-                                        accountid=cls.account.account.name,
-                                        domainid=cls.account.account.domainid,
+                                        accountid=cls.account.name,
+                                        domainid=cls.account.domainid,
                                         serviceofferingid=cls.small_offering.id,
                                         mode=cls.services["mode"]
                                         )
         cls.medium_virtual_machine = VirtualMachine.create(
                                        cls.api_client,
                                        cls.services["medium"],
-                                       accountid=cls.account.account.name,
-                                       domainid=cls.account.account.domainid,
+                                       accountid=cls.account.name,
+                                       domainid=cls.account.domainid,
                                        serviceofferingid=cls.medium_offering.id,
                                        mode=cls.services["mode"]
                                     )
         cls.virtual_machine = VirtualMachine.create(
                                         cls.api_client,
                                         cls.services["small"],
-                                        accountid=cls.account.account.name,
-                                        domainid=cls.account.account.domainid,
+                                        accountid=cls.account.name,
+                                        domainid=cls.account.domainid,
                                         serviceofferingid=cls.small_offering.id,
                                         mode=cls.services["mode"]
                                         )
@@ -939,8 +939,8 @@ class TestVMLifeCycle(cloudstackTestCase):
         iso = Iso.create(
                          self.apiclient,
                          self.services["iso"],
-                         account=self.account.account.name,
-                         domainid=self.account.account.domainid
+                         account=self.account.name,
+                         domainid=self.account.domainid
                          )
 
         self.debug("Successfully created ISO with ID: %s" % iso.id)


[19/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-804 api changes


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

Branch: refs/heads/ui-vm-affinity
Commit: 0bca34963686930735e141e39c884289dd19424f
Parents: 434525b
Author: Radhika PC <ra...@citrix.com>
Authored: Wed Apr 24 11:33:25 2013 +0530
Committer: Radhika PC <ra...@citrix.com>
Committed: Wed Apr 24 11:33:25 2013 +0530

----------------------------------------------------------------------
 docs/en-US/changed-API-commands-4.2.xml |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0bca3496/docs/en-US/changed-API-commands-4.2.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/changed-API-commands-4.2.xml b/docs/en-US/changed-API-commands-4.2.xml
index cbaa2e3..26f10ff 100644
--- a/docs/en-US/changed-API-commands-4.2.xml
+++ b/docs/en-US/changed-API-commands-4.2.xml
@@ -101,6 +101,22 @@
             </itemizedlist>
           </entry>
         </row>
+        <row>
+          <entry><para>UpdatePhysicalNetwork</para></entry>
+          <entry>
+            <para>Added the following request parameters:</para>
+            <itemizedlist>
+              <listitem>
+                <para>vlan (adds a new VLAN range to the existing VLAN range)</para>
+              </listitem>
+              <listitem>
+                <para>removelan (removes the specified VLAN range)</para>
+              </listitem>
+            </itemizedlist>
+            <note><para>The removevlan and vlan parameters can be used together. If the VLAN range that you are trying
+                to remove is in use, the operation will not succeed.</para></note>
+          </entry>
+        </row>
       </tbody>
     </tgroup>
   </informaltable>


[11/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
LOUDSTACK-751: changed the way the code retrieves the blacklisted.routes config. Now it always reads it from the DB while before we used to load it only on the management server start, and the update happened only after MS restart


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

Branch: refs/heads/ui-vm-affinity
Commit: ba4b8f170569ea5e04cfdae37cee043aaa3ee3a6
Parents: 2712ddd
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Tue Apr 23 12:19:14 2013 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Tue Apr 23 12:22:04 2013 -0700

----------------------------------------------------------------------
 .../configuration/ConfigurationManagerImpl.java    |    3 +-
 .../src/com/cloud/network/vpc/VpcManagerImpl.java  |   53 ++++++---------
 2 files changed, 22 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ba4b8f17/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index a2a6291..d5e405d 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -590,7 +590,8 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
                     if (route != null) {
                         String routeToVerify = route.trim();
                         if (!NetUtils.isValidCIDR(routeToVerify)) {
-                            throw new InvalidParameterValueException("Invalid value for blacklisted route: " + route);
+                            throw new InvalidParameterValueException("Invalid value for blacklisted route: " + route + ". Valid format is list" +
+                            		" of cidrs separated by coma. Example: 10.1.1.0/24,192.168.0.0/24");
                         }
                     }
                 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ba4b8f17/server/src/com/cloud/network/vpc/VpcManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/VpcManagerImpl.java b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
index 425f551..224a680 100644
--- a/server/src/com/cloud/network/vpc/VpcManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
@@ -39,11 +39,9 @@ import org.springframework.stereotype.Component;
 
 import com.cloud.configuration.Config;
 import com.cloud.configuration.ConfigurationManager;
-import com.cloud.configuration.ConfigurationVO;
 import com.cloud.configuration.Resource.ResourceType;
 import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.dc.DataCenter;
-import com.cloud.dc.DataCenterVO;
 import com.cloud.dc.Vlan.VlanType;
 import com.cloud.dc.VlanVO;
 import com.cloud.dc.dao.DataCenterDao;
@@ -187,9 +185,7 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
     private List<VpcProvider> vpcElements = null;
     private final List<Service> nonSupportedServices = Arrays.asList(Service.SecurityGroup, Service.Firewall);
     private final List<Provider> supportedProviders = Arrays.asList(Provider.VPCVirtualRouter, Provider.NiciraNvp);
-    
-    private Map<Long, Set<String>> zoneBlackListedRoutes;
- 
+     
     int _cleanupInterval;
     int _maxNetworks;
     SearchBuilder<IPAddressVO> IpAddressSearch;
@@ -240,26 +236,6 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
         IpAddressSearch.join("virtualNetworkVlanSB", virtualNetworkVlanSB, IpAddressSearch.entity().getVlanId(), virtualNetworkVlanSB.entity().getId(), JoinBuilder.JoinType.INNER);
         IpAddressSearch.done();
         
-        //populate blacklisted routes
-        List<DataCenterVO> zones = _dcDao.listAllZones();
-        zoneBlackListedRoutes = new HashMap<Long, Set<String>>();
-        for (DataCenterVO zone : zones) {
-            List<ConfigurationVO> confs = _configServer.getConfigListByScope(Config.ConfigurationParameterScope.zone.toString(), zone.getId());
-            for (ConfigurationVO conf : confs) {
-                String routeStr = conf.getValue();
-                if (conf.getName().equalsIgnoreCase(Config.BlacklistedRoutes.key()) && routeStr != null && !routeStr.isEmpty()) {
-                    String[] routes = routeStr.split(",");
-                    Set<String> cidrs = new HashSet<String>();
-                    for (String route : routes) {
-                        cidrs.add(route);
-                    }
-                    
-                    zoneBlackListedRoutes.put(zone.getId(), cidrs);
-                    break;
-                }
-            }
-        }
-        
         return true;
     }
 
@@ -1684,14 +1660,8 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
         }
         
         //3) Verify against blacklisted routes
-        Set<String> cidrBlackList = zoneBlackListedRoutes.get(vpc.getZoneId());
-        
-        if (cidrBlackList != null && !cidrBlackList.isEmpty()) {
-            for (String blackListedRoute : cidrBlackList) {
-                if (NetUtils.isNetworksOverlap(blackListedRoute, cidr)) {
-                    throw new InvalidParameterValueException("The static gateway cidr overlaps with one of the blacklisted routes of the VPC zone");
-                }
-            }
+        if (isCidrBlacklisted(cidr, vpc.getZoneId())) {
+            throw new InvalidParameterValueException("The static gateway cidr overlaps with one of the blacklisted routes of the zone the VPC belongs to");
         }
 
         Transaction txn = Transaction.currentTxn();
@@ -1713,6 +1683,23 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
         return newRoute;
     }
 
+    protected boolean isCidrBlacklisted(String cidr, long zoneId) {
+        String routesStr = _configServer.getConfigValue(Config.BlacklistedRoutes.key(), Config.ConfigurationParameterScope.zone.toString(), zoneId);
+        if (routesStr != null && !routesStr.isEmpty()) {
+            String[] cidrBlackList = routesStr.split(",");
+            
+            if (cidrBlackList != null && cidrBlackList.length > 0) {
+                for (String blackListedRoute : cidrBlackList) {
+                    if (NetUtils.isNetworksOverlap(blackListedRoute, cidr)) {
+                        return true;
+                    }
+                }
+            }
+        }
+       
+        return false;
+    }
+
     @Override
     public Pair<List<? extends StaticRoute>, Integer> listStaticRoutes(ListStaticRoutesCmd cmd) {
         Long id = cmd.getId();


[33/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-1958: List GSLB response should have the GSLB site (zone load
balancer rule) details as well


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

Branch: refs/heads/ui-vm-affinity
Commit: f65f3b9d50f7ece9ef1c72af0f3518d8813f2951
Parents: ff7112a
Author: Murali Reddy <mu...@citrix.com>
Authored: Wed Apr 24 21:02:42 2013 +0530
Committer: Murali Reddy <mu...@citrix.com>
Committed: Wed Apr 24 21:03:26 2013 +0530

----------------------------------------------------------------------
 .../region/ha/GlobalLoadBalancingRulesService.java |    3 +++
 .../org/apache/cloudstack/api/ApiConstants.java    |    1 +
 .../api/response/GlobalLoadBalancerResponse.java   |   10 ++++++++++
 server/src/com/cloud/api/ApiDBUtils.java           |    9 +++++++++
 server/src/com/cloud/api/ApiResponseHelper.java    |    8 ++++++++
 .../gslb/GlobalLoadBalancingRulesServiceImpl.java  |   14 ++++++++++++++
 6 files changed, 45 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f65f3b9d/api/src/com/cloud/region/ha/GlobalLoadBalancingRulesService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/region/ha/GlobalLoadBalancingRulesService.java b/api/src/com/cloud/region/ha/GlobalLoadBalancingRulesService.java
index e2f097e..186faf7 100644
--- a/api/src/com/cloud/region/ha/GlobalLoadBalancingRulesService.java
+++ b/api/src/com/cloud/region/ha/GlobalLoadBalancingRulesService.java
@@ -17,6 +17,7 @@
 
 package com.cloud.region.ha;
 
+import com.cloud.network.rules.LoadBalancer;
 import org.apache.cloudstack.api.command.user.region.ha.gslb.*;
 
 import java.util.List;
@@ -44,4 +45,6 @@ public interface GlobalLoadBalancingRulesService {
 
     List<GlobalLoadBalancerRule> listGlobalLoadBalancerRule(ListGlobalLoadBalancerRuleCmd listGslbCmd);
 
+    List<LoadBalancer> listSiteLoadBalancers(long gslbRuleId);
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f65f3b9d/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index e774ecc..1165c7b 100755
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -335,6 +335,7 @@ public class ApiConstants {
     public static final String LOAD_BALANCER_DEVICE_STATE = "lbdevicestate";
     public static final String LOAD_BALANCER_DEVICE_CAPACITY = "lbdevicecapacity";
     public static final String LOAD_BALANCER_DEVICE_DEDICATED = "lbdevicededicated";
+    public static final String LOAD_BALANCER_RULE = "loadbalancerrule";
     public static final String LOAD_BALANCER_RULE_LIST = "loadbalancerrulelist";
     public static final String FIREWALL_DEVICE_ID = "fwdeviceid";
     public static final String FIREWALL_DEVICE_NAME = "fwdevicename";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f65f3b9d/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java b/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java
index 38e080b..9f5139d 100644
--- a/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java
@@ -23,6 +23,8 @@ import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseResponse;
 import org.apache.cloudstack.api.EntityReference;
 
+import java.util.List;
+
 @EntityReference(value= GlobalLoadBalancerRule.class)
 public class GlobalLoadBalancerResponse extends BaseResponse implements ControlledEntityResponse {
 
@@ -76,6 +78,10 @@ public class GlobalLoadBalancerResponse extends BaseResponse implements Controll
     @Param(description = "the domain of the load balancer rule")
     private String domainName;
 
+    @SerializedName(ApiConstants.LOAD_BALANCER_RULE)
+    @Param(description="List of load balancer rules that are part of GSLB rule", responseObject = LoadBalancerResponse.class)
+    private List<LoadBalancerResponse> siteLoadBalancers;
+
     public void setRegionIdId(Integer regionId) {
         this.regionId = regionId;
     }
@@ -130,4 +136,8 @@ public class GlobalLoadBalancerResponse extends BaseResponse implements Controll
     public void setDomainName(String domainName) {
         this.domainName = domainName;
     }
+
+    public void setSiteLoadBalancers(List<LoadBalancerResponse> siteLoadBalancers) {
+        this.siteLoadBalancers = siteLoadBalancers;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f65f3b9d/server/src/com/cloud/api/ApiDBUtils.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiDBUtils.java b/server/src/com/cloud/api/ApiDBUtils.java
index c60af27..21ce63b 100755
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@ -25,6 +25,8 @@ import java.util.Set;
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
 
+import com.cloud.network.rules.LoadBalancer;
+import com.cloud.region.ha.GlobalLoadBalancingRulesService;
 import org.apache.cloudstack.affinity.AffinityGroup;
 import org.apache.cloudstack.affinity.AffinityGroupResponse;
 import org.apache.cloudstack.affinity.dao.AffinityGroupDao;
@@ -388,6 +390,7 @@ public class ApiDBUtils {
     static VpcProvisioningService _vpcProvSvc;
     static AffinityGroupDao _affinityGroupDao;
     static AffinityGroupJoinDao _affinityGroupJoinDao;
+    static GlobalLoadBalancingRulesService _gslbService;
 
     @Inject private ManagementServer ms;
     @Inject public AsyncJobManager asyncMgr;
@@ -494,6 +497,7 @@ public class ApiDBUtils {
     @Inject private VpcProvisioningService vpcProvSvc;
     @Inject private AffinityGroupDao affinityGroupDao;
     @Inject private AffinityGroupJoinDao affinityGroupJoinDao;
+    @Inject private GlobalLoadBalancingRulesService gslbService;
 
     @PostConstruct
     void init() {
@@ -599,6 +603,7 @@ public class ApiDBUtils {
         _vpcProvSvc = vpcProvSvc;
         _affinityGroupDao = affinityGroupDao;
         _affinityGroupJoinDao = affinityGroupJoinDao;
+        _gslbService = gslbService;
         // Note: stats collector should already have been initialized by this time, otherwise a null instance is returned
         _statsCollector = StatsCollector.getInstance();
     }
@@ -1630,4 +1635,8 @@ public class ApiDBUtils {
     public static AffinityGroupResponse fillAffinityGroupDetails(AffinityGroupResponse resp, AffinityGroupJoinVO group) {
         return _affinityGroupJoinDao.setAffinityGroupResponse(resp, group);
     }
+
+    public static List<? extends LoadBalancer> listSiteLoadBalancers(long gslbRuleId) {
+        return _gslbService.listSiteLoadBalancers(gslbRuleId);
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f65f3b9d/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index cd0158d..894ec8d 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -798,6 +798,14 @@ public class ApiResponseHelper implements ResponseGenerator {
         response.setId(globalLoadBalancerRule.getUuid());
         populateOwner(response, globalLoadBalancerRule);
         response.setObjectName("globalloadbalancer");
+
+        List<LoadBalancerResponse> siteLbResponses = new ArrayList<LoadBalancerResponse>();
+        List<? extends LoadBalancer> siteLoadBalaners = ApiDBUtils.listSiteLoadBalancers(globalLoadBalancerRule.getId());
+        for (LoadBalancer siteLb : siteLoadBalaners) {
+            LoadBalancerResponse siteLbResponse = createLoadBalancerResponse(siteLb);
+            siteLbResponses.add(siteLbResponse);
+        }
+        response.setSiteLoadBalancers(siteLbResponses);
         return response;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f65f3b9d/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java b/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
index 1ed2618..56c46b0 100644
--- a/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
+++ b/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
@@ -511,6 +511,20 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
         return null;
     }
 
+    @Override
+    public List<LoadBalancer> listSiteLoadBalancers(long gslbRuleId) {
+        List<GlobalLoadBalancerLbRuleMapVO> gslbLbMapVos = _gslbLbMapDao.listByGslbRuleId(gslbRuleId);
+        List<LoadBalancer> siteLoadBalancers = new ArrayList<LoadBalancer>();
+        if (gslbLbMapVos != null) {
+            for (GlobalLoadBalancerLbRuleMapVO gslbLbMapVo : gslbLbMapVos) {
+                LoadBalancerVO loadBalancer = _lbDao.findById(gslbLbMapVo.getLoadBalancerId());
+                siteLoadBalancers.add(loadBalancer);
+            }
+            return siteLoadBalancers;
+        }
+        return null;
+    }
+
     private boolean applyGlobalLoadBalancerRuleConfig(long gslbRuleId, boolean revoke) throws ResourceUnavailableException {
 
         GlobalLoadBalancerRuleVO gslbRule = _gslbRuleDao.findById(gslbRuleId);


[36/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2120: mixed zone management - (1) extend listVirtualMachines API to to take in zonetype. (2) UI: populate Instances list page with instances whose zonetype matches selected option in zone type dropdown on top menu.


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

Branch: refs/heads/ui-vm-affinity
Commit: cdd459bb0bfb502df056a553a42735d4bd8f0e31
Parents: b7f5197
Author: Jessica Wang <je...@apache.org>
Authored: Wed Apr 24 10:35:47 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Wed Apr 24 10:38:28 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/api/command/user/vm/ListVMsCmd.java |    7 +++
 .../src/com/cloud/api/query/QueryManagerImpl.java  |   14 ++++-
 server/src/com/cloud/server/Criteria.java          |    1 +
 ui/scripts/instances.js                            |   38 +++++----------
 4 files changed, 32 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cdd459bb/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
index dae9df3..d93d657 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
@@ -79,6 +79,9 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
             description="the availability zone ID")
     private Long zoneId;
 
+    @Parameter(name=ApiConstants.ZONE_TYPE, type=CommandType.STRING, description="the network type of the zone that the virtual machine belongs to")
+    private String zoneType;
+    
     @Parameter(name=ApiConstants.FOR_VIRTUAL_NETWORK, type=CommandType.BOOLEAN,
             description="list by network type; true if need to list vms using Virtual Network, false otherwise")
     private Boolean forVirtualNetwork;
@@ -147,6 +150,10 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
         return zoneId;
     }
 
+    public String getZoneType() {
+        return zoneType;
+    }
+    
     public Boolean getForVirtualNetwork() {
         return forVirtualNetwork;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cdd459bb/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 2298252..d0b4237 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -632,6 +632,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         c.addCriteria(Criteria.NAME, cmd.getInstanceName());
         c.addCriteria(Criteria.STATE, cmd.getState());
         c.addCriteria(Criteria.DATACENTERID, cmd.getZoneId());
+        c.addCriteria(Criteria.DATACENTERTYPE, cmd.getZoneType());
         c.addCriteria(Criteria.GROUPID, cmd.getGroupId());
         c.addCriteria(Criteria.FOR_VIRTUAL_NETWORK, cmd.getForVirtualNetwork());
         c.addCriteria(Criteria.NETWORKID, cmd.getNetworkId());
@@ -680,7 +681,8 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         Object name = c.getCriteria(Criteria.NAME);
         Object state = c.getCriteria(Criteria.STATE);
         Object notState = c.getCriteria(Criteria.NOTSTATE);
-        Object zone = c.getCriteria(Criteria.DATACENTERID);
+        Object zoneId = c.getCriteria(Criteria.DATACENTERID);
+        Object zoneType = c.getCriteria(Criteria.DATACENTERTYPE);
         Object pod = c.getCriteria(Criteria.PODID);
         Object hostId = c.getCriteria(Criteria.HOSTID);
         Object hostName = c.getCriteria(Criteria.HOSTNAME);
@@ -703,6 +705,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         sb.and("stateNEQ", sb.entity().getState(), SearchCriteria.Op.NEQ);
         sb.and("stateNIN", sb.entity().getState(), SearchCriteria.Op.NIN);
         sb.and("dataCenterId", sb.entity().getDataCenterId(), SearchCriteria.Op.EQ);
+        sb.and("dataCenterType", sb.entity().getDataCenterType(), SearchCriteria.Op.EQ);
         sb.and("podId", sb.entity().getPodId(), SearchCriteria.Op.EQ);
         sb.and("hypervisorType", sb.entity().getHypervisorType(), SearchCriteria.Op.EQ);
         sb.and("hostIdEQ", sb.entity().getHostId(), SearchCriteria.Op.EQ);
@@ -809,13 +812,18 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
             sc.setParameters("stateNIN", "Destroyed", "Expunging");
         }
 
-        if (zone != null) {
-            sc.setParameters("dataCenterId", zone);
+        if (zoneId != null) {
+            sc.setParameters("dataCenterId", zoneId);
 
             if (state == null) {
                 sc.setParameters("stateNEQ", "Destroyed");
             }
         }
+        
+        if (zoneType != null) {
+        	sc.setParameters("dataCenterType", zoneType);
+        }
+        
         if (pod != null) {
             sc.setParameters("podId", pod);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cdd459bb/server/src/com/cloud/server/Criteria.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/Criteria.java b/server/src/com/cloud/server/Criteria.java
index d54aaf5..cbe022a 100755
--- a/server/src/com/cloud/server/Criteria.java
+++ b/server/src/com/cloud/server/Criteria.java
@@ -32,6 +32,7 @@ public class Criteria {
 	public static final String NOTSTATE = "notState";
 	public static final String STATE = "state";
 	public static final String DATACENTERID = "dataCenterId";
+	public static final String DATACENTERTYPE = "dataCenterType";
 	public static final String DESCRIPTION = "description";
 	public static final String PODID = "podId";
 	public static final String CLUSTERID = "clusterId";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cdd459bb/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 3a43c60..0c4c7d2 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -194,38 +194,26 @@
 				}
 
         if("hosts" in args.context) {
-					$.extend(data, {
-					  hostid: args.context.hosts[0].id
-					});
-				}
-
+	  $.extend(data, {
+	    hostid: args.context.hosts[0].id
+	  });
+	}
+        
+        if(args.context.zoneType != null && args.context.zoneType.length > 0) { //Basic type or Advanced type
+          $.extend(data, {
+            zonetype: args.context.zoneType
+          });
+	}
+	
         $.ajax({
           url: createURL('listVirtualMachines'),
           data: data,
           success: function(json) {
-            var items = json.listvirtualmachinesresponse.virtualmachine;
-           // Code for hiding "Expunged VMs"
-           /* if(items != null) {
-            var i=0;
-            for( i=0;i< items.length;i++){
-              if(items[i].state == 'Expunging')
-                args.response.success ({
-
-              });
-            else {
+            var items = json.listvirtualmachinesresponse.virtualmachine;           
             args.response.success({
               actionFilter: vmActionfilter,
-              data: items[i]
-             });
-            }
-           }
-          }
-          else {*/
-             args.response.success({
-              actionFilter: vmActionfilter,
               data: items
-             });
-
+            });
           }
         });
       },


[32/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
Correcting the spelling errors in the Non contigous Vlan range code


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

Branch: refs/heads/ui-vm-affinity
Commit: ff7112a074916514d00e01fecad73bd3a54b9161
Parents: 2c271e0
Author: Pranav Saxena <pr...@citrix.com>
Authored: Wed Apr 24 19:58:10 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Wed Apr 24 19:58:10 2013 +0530

----------------------------------------------------------------------
 .../com/cloud/bridge/service/core/s3/S3Engine.java |    2 +-
 .../network/ExternalFirewallDeviceManagerImpl.java |    2 +-
 .../src/com/cloud/network/NetworkServiceImpl.java  |    2 +-
 .../com/cloud/network/guru/GuestNetworkGuru.java   |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff7112a0/awsapi/src/com/cloud/bridge/service/core/s3/S3Engine.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/service/core/s3/S3Engine.java b/awsapi/src/com/cloud/bridge/service/core/s3/S3Engine.java
index e1ccd4c..7beb012 100644
--- a/awsapi/src/com/cloud/bridge/service/core/s3/S3Engine.java
+++ b/awsapi/src/com/cloud/bridge/service/core/s3/S3Engine.java
@@ -1126,7 +1126,7 @@ public class S3Engine {
         SBucketVO sbucket = bucketDao.getByName( bucketName );
         if (sbucket == null) {
             response.setResultCode(404);
-            response.setResultDescription("<Code>Bucket dosen't exists</Code><Message>Bucket " + bucketName + " does not exist</Message>");
+            response.setResultDescription("<Code>Bucket doesn't exists</Code><Message>Bucket " + bucketName + " does not exist</Message>");
             return response;
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff7112a0/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java b/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
index ac00bc1..4a90a77 100644
--- a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
@@ -725,7 +725,7 @@ public abstract class ExternalFirewallDeviceManagerImpl extends AdapterBase impl
             }
         }
         if (lowestVlanTag == null) {
-            throw new InvalidParameterValueException ("The vlan tag dose not belong to any of the existing vlan ranges");
+            throw new InvalidParameterValueException ("The vlan tag does not belong to any of the existing vlan ranges");
         }
         return vlanTag - lowestVlanTag;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff7112a0/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index ac2ac45..7653a08 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -2529,7 +2529,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
         }
 
         if (temp == 0){
-            throw new InvalidParameterValueException("The vlan range you are trying to delete dose not exist.");
+            throw new InvalidParameterValueException("The vlan range you are trying to delete does not exist.");
         }
         if(existingRanges.get(i).first() > existingRanges.get(i).second()){
             existingRanges.remove(i);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff7112a0/server/src/com/cloud/network/guru/GuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/GuestNetworkGuru.java b/server/src/com/cloud/network/guru/GuestNetworkGuru.java
index 92607e2..291e3cc 100755
--- a/server/src/com/cloud/network/guru/GuestNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/GuestNetworkGuru.java
@@ -284,7 +284,7 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur
             }
         }
         if (lowestVlanTag == null) {
-            throw new InvalidParameterValueException ("The vlan tag dose not belong to any of the existing vlan ranges");
+            throw new InvalidParameterValueException ("The vlan tag does not belong to any of the existing vlan ranges");
         }
         return vlanTag - lowestVlanTag;
     }


[17/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2120: mixed zone management - extend listPods, listClusters, listHosts, listStoragePools, listSystemVms, listRouters API to return zone type.


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

Branch: refs/heads/ui-vm-affinity
Commit: 04a2b2d326c34e234e78852b28fa18a5f96fcc00
Parents: 15e2bc4
Author: Jessica Wang <je...@apache.org>
Authored: Tue Apr 23 16:32:19 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Apr 23 16:32:19 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/api/response/ClusterResponse.java   |    9 +-
 .../api/response/DomainRouterResponse.java         |   11 +
 .../cloudstack/api/response/HostResponse.java      |    9 +-
 .../cloudstack/api/response/PodResponse.java       |    9 +-
 .../api/response/StoragePoolResponse.java          |   15 +-
 .../cloudstack/api/response/SystemVmResponse.java  |   11 +
 server/src/com/cloud/api/ApiResponseHelper.java    |    3 +
 .../api/query/dao/DomainRouterJoinDaoImpl.java     |    1 +
 .../com/cloud/api/query/dao/HostJoinDaoImpl.java   |    1 +
 .../api/query/dao/StoragePoolJoinDaoImpl.java      |    1 +
 .../com/cloud/api/query/vo/DomainRouterJoinVO.java |   12 +
 server/src/com/cloud/api/query/vo/HostJoinVO.java  |   11 +
 .../com/cloud/api/query/vo/StoragePoolJoinVO.java  |   11 +
 setup/db/db/schema-410to420.sql                    |  230 ++++++++++++++-
 14 files changed, 328 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/api/src/org/apache/cloudstack/api/response/ClusterResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ClusterResponse.java b/api/src/org/apache/cloudstack/api/response/ClusterResponse.java
index a90acde..cfd772d 100644
--- a/api/src/org/apache/cloudstack/api/response/ClusterResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/ClusterResponse.java
@@ -46,7 +46,10 @@ public class ClusterResponse extends BaseResponse {
 
     @SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the cluster")
     private String zoneName;
-
+    
+    @SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
+    private String zoneType;
+    
     @SerializedName("hypervisortype") @Param(description="the hypervisor type of the cluster")
     private String hypervisorType;
 
@@ -116,6 +119,10 @@ public class ClusterResponse extends BaseResponse {
         this.zoneName = zoneName;
     }
 
+    public void setZoneType(String zoneType) {
+        this.zoneType = zoneType;
+    }
+    
     public String getClusterType() {
         return clusterType;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java b/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java
index b2bc02e..79c8596 100644
--- a/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java
@@ -42,6 +42,9 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView
     @SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name for the router")
     private String zoneName;
 
+    @SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
+    private String zoneType;   
+    
     @SerializedName(ApiConstants.DNS1) @Param(description="the first DNS for the router")
     private String dns1;
 
@@ -186,6 +189,14 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView
         this.zoneName = zoneName;
     }
 
+    public String getZoneType() {
+        return zoneType;
+    }
+
+    public void setZoneType(String zoneType) {
+        this.zoneType = zoneType;
+    }        
+    
     public void setDns1(String dns1) {
         this.dns1 = dns1;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/api/src/org/apache/cloudstack/api/response/HostResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/HostResponse.java b/api/src/org/apache/cloudstack/api/response/HostResponse.java
index 687687d..be1a4b4 100644
--- a/api/src/org/apache/cloudstack/api/response/HostResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/HostResponse.java
@@ -59,7 +59,10 @@ public class HostResponse extends BaseResponse {
 
     @SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the host")
     private String zoneName;
-
+    
+    @SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
+    private String zoneType;
+    
     @SerializedName(ApiConstants.POD_ID) @Param(description="the Pod ID of the host")
     private String podId;
 
@@ -209,6 +212,10 @@ public class HostResponse extends BaseResponse {
         this.zoneName = zoneName;
     }
 
+    public void setZoneType(String zoneType) {
+        this.zoneType = zoneType;
+    }
+    
     public void setPodId(String podId) {
         this.podId = podId;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/api/src/org/apache/cloudstack/api/response/PodResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/PodResponse.java b/api/src/org/apache/cloudstack/api/response/PodResponse.java
index f31c289..471cac1 100644
--- a/api/src/org/apache/cloudstack/api/response/PodResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/PodResponse.java
@@ -36,10 +36,13 @@ public class PodResponse extends BaseResponse {
 
     @SerializedName("zoneid") @Param(description="the Zone ID of the Pod")
     private String zoneId;
-
+    
     @SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the Pod")
     private String zoneName;
 
+    @SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
+    private String zoneType;    
+    
     @SerializedName("gateway") @Param(description="the gateway of the Pod")
     private String gateway;
 
@@ -86,6 +89,10 @@ public class PodResponse extends BaseResponse {
         return zoneName;
     }
 
+    public void setZoneType(String zoneType) {
+        this.zoneType = zoneType;
+    }
+    
     public void setZoneName(String zoneName) {
         this.zoneName = zoneName;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
index e034b17..4411ddc 100644
--- a/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
@@ -38,12 +38,15 @@ public class StoragePoolResponse extends BaseResponse {
     @SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the storage pool")
     private String zoneName;
 
+    @SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
+    private String zoneType;
+    
     @SerializedName("podid") @Param(description="the Pod ID of the storage pool")
     private String podId;
 
     @SerializedName("podname") @Param(description="the Pod name of the storage pool")
-    private String podName;
-
+    private String podName;    
+    
     @SerializedName("name") @Param(description="the name of the storage pool")
     private String name;
 
@@ -126,6 +129,14 @@ public class StoragePoolResponse extends BaseResponse {
         this.zoneName = zoneName;
     }
 
+    public String getZoneType() {
+        return zoneType;
+    }
+    
+    public void setZoneType(String zoneType) {
+        this.zoneType = zoneType;
+    }
+    
     public String getPodId() {
         return podId;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java b/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java
index 8d2798a..3439dc0 100644
--- a/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java
@@ -46,6 +46,9 @@ public class SystemVmResponse extends BaseResponse {
     @SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name for the system VM")
     private String zoneName;
 
+    @SerializedName(ApiConstants.ZONE_TYPE) @Param(description = "network type of the availability zone")
+    private String zoneType;    
+    
     @SerializedName("dns1") @Param(description="the first DNS for the system VM")
     private String dns1;
 
@@ -150,7 +153,15 @@ public class SystemVmResponse extends BaseResponse {
     public void setZoneName(String zoneName) {
         this.zoneName = zoneName;
     }
+      
+    public String getZoneType() {
+        return zoneType;
+    }
 
+    public void setZoneType(String zoneType) {
+        this.zoneType = zoneType;
+    }        
+    
     public String getDns1() {
         return dns1;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index ba5322f..cd0158d 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -817,6 +817,7 @@ public class ApiResponseHelper implements ResponseGenerator {
         if (zone != null) {
             podResponse.setZoneId(zone.getUuid());
             podResponse.setZoneName(zone.getName());
+            podResponse.setZoneType(zone.getNetworkType().toString());
         }
         podResponse.setNetmask(NetUtils.getCidrNetmask(pod.getCidrSize()));
         podResponse.setStartIp(ipRange[0]);
@@ -961,6 +962,7 @@ public class ApiResponseHelper implements ResponseGenerator {
         if (dc != null) {
             clusterResponse.setZoneId(dc.getUuid());
             clusterResponse.setZoneName(dc.getName());
+            clusterResponse.setZoneType(dc.getNetworkType().toString());
         }
         clusterResponse.setHypervisorType(cluster.getHypervisorType().toString());
         clusterResponse.setClusterType(cluster.getClusterType().toString());
@@ -1165,6 +1167,7 @@ public class ApiResponseHelper implements ResponseGenerator {
             if (zone != null) {
                 vmResponse.setZoneId(zone.getUuid());
                 vmResponse.setZoneName(zone.getName());
+                vmResponse.setZoneType(zone.getNetworkType().toString());
                 vmResponse.setDns1(zone.getDns1());
                 vmResponse.setDns2(zone.getDns2());
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
index 488c4e4..25cd62f 100644
--- a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java
@@ -148,6 +148,7 @@ public class DomainRouterJoinDaoImpl extends GenericDaoBase<DomainRouterJoinVO,
         routerResponse.setDomainName(router.getDomainName());
 
         routerResponse.setZoneName(router.getDataCenterName());
+        routerResponse.setZoneType(router.getDataCenterType());
         routerResponse.setDns1(router.getDns1());
         routerResponse.setDns2(router.getDns2());
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
index 7796529..c678f2f 100644
--- a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
@@ -99,6 +99,7 @@ public class HostJoinDaoImpl extends GenericDaoBase<HostJoinVO, Long> implements
             hostResponse.setOsCategoryId(host.getOsCategoryUuid());
             hostResponse.setOsCategoryName(host.getOsCategoryName());
             hostResponse.setZoneName(host.getZoneName());
+            hostResponse.setZoneType(host.getZoneType().toString());
             hostResponse.setPodName(host.getPodName());
             if ( host.getClusterId() > 0) {
                 hostResponse.setClusterName(host.getClusterName());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
index 34b88ba..260ff4d 100644
--- a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java
@@ -77,6 +77,7 @@ public class StoragePoolJoinDaoImpl extends GenericDaoBase<StoragePoolJoinVO, Lo
         poolResponse.setIpAddress(pool.getHostAddress());
         poolResponse.setZoneId(pool.getZoneUuid());
         poolResponse.setZoneName(pool.getZoneName());
+        poolResponse.setZoneType(pool.getZoneType());
         if (pool.getPoolType() != null) {
             poolResponse.setType(pool.getPoolType().toString());
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
index b04120a..5f2b500 100644
--- a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java
@@ -101,6 +101,9 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti
     @Column(name="data_center_name")
     private String dataCenterName = null;
 
+    @Column(name="data_center_type")
+    private String dataCenterType;
+    
     @Column(name="dns1")
     private String dns1 = null;
 
@@ -447,6 +450,15 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti
         this.dataCenterName = zoneName;
     }
 
+    
+    public String getDataCenterType() {
+        return dataCenterType;
+    }
+
+    public void setDataCenterType(String dataCenterType) {
+        this.dataCenterType = dataCenterType;
+    }
+        
 
     public Long getHostId() {
         return hostId;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/query/vo/HostJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/HostJoinVO.java b/server/src/com/cloud/api/query/vo/HostJoinVO.java
index 0b8f672..4aa45e5 100644
--- a/server/src/com/cloud/api/query/vo/HostJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/HostJoinVO.java
@@ -130,6 +130,9 @@ public class HostJoinVO extends BaseViewVO implements InternalIdentity, Identity
     @Column(name="data_center_name")
     private String zoneName;
 
+    @Column(name="data_center_type")
+    private String zoneType;
+    
     @Column(name="pod_id")
     private long podId;
 
@@ -231,7 +234,15 @@ public class HostJoinVO extends BaseViewVO implements InternalIdentity, Identity
     public void setZoneName(String zoneName) {
         this.zoneName = zoneName;
     }
+    
+    public String getZoneType() {
+        return zoneType;
+    }
 
+    public void setZoneType(String zoneType) {
+        this.zoneType = zoneType;
+    }   
+    
     public String getName() {
         return name;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java b/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
index bab3990..da06227 100644
--- a/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
@@ -97,6 +97,9 @@ public class StoragePoolJoinVO extends BaseViewVO implements InternalIdentity, I
     @Column(name="data_center_name")
     private String zoneName;
 
+    @Column(name="data_center_type")
+    private String zoneType;
+    
     @Column(name="pod_id")
     private long podId;
 
@@ -283,6 +286,14 @@ public class StoragePoolJoinVO extends BaseViewVO implements InternalIdentity, I
         this.zoneName = zoneName;
     }
 
+    public String getZoneType() {
+        return zoneType;
+    }
+
+    public void setZoneType(String zoneType) {
+        this.zoneType = zoneType;
+    }
+    
     public long getPodId() {
         return podId;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04a2b2d3/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index ac52f53..cfce81f 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -544,6 +544,77 @@ CREATE VIEW `cloud`.`affinity_group_view` AS
             left join
         `cloud`.`user_vm` ON user_vm.id = vm_instance.id;
 
+DROP VIEW IF EXISTS `cloud`.`host_view`;
+CREATE VIEW `cloud`.`host_view` AS
+    select 
+        host.id,
+        host.uuid,
+        host.name,
+        host.status,
+        host.disconnected,
+        host.type,
+        host.private_ip_address,
+        host.version,
+        host.hypervisor_type,
+        host.hypervisor_version,
+        host.capabilities,
+        host.last_ping,
+        host.created,
+        host.removed,
+        host.resource_state,
+        host.mgmt_server_id,
+        host.cpus,
+        host.speed,
+        host.ram,
+        cluster.id cluster_id,
+        cluster.uuid cluster_uuid,
+        cluster.name cluster_name,
+        cluster.cluster_type,
+        data_center.id data_center_id,
+        data_center.uuid data_center_uuid,
+        data_center.name data_center_name,
+        data_center.networktype data_center_type,
+        host_pod_ref.id pod_id,
+        host_pod_ref.uuid pod_uuid,
+        host_pod_ref.name pod_name,
+        host_tags.tag,
+        guest_os_category.id guest_os_category_id,
+        guest_os_category.uuid guest_os_category_uuid,
+        guest_os_category.name guest_os_category_name,
+        mem_caps.used_capacity memory_used_capacity,
+        mem_caps.reserved_capacity memory_reserved_capacity,
+        cpu_caps.used_capacity cpu_used_capacity,
+        cpu_caps.reserved_capacity cpu_reserved_capacity,
+        async_job.id job_id,
+        async_job.uuid job_uuid,
+        async_job.job_status job_status,
+        async_job.account_id job_account_id
+    from
+        `cloud`.`host`
+            left join
+        `cloud`.`cluster` ON host.cluster_id = cluster.id
+            left join
+        `cloud`.`data_center` ON host.data_center_id = data_center.id
+            left join
+        `cloud`.`host_pod_ref` ON host.pod_id = host_pod_ref.id
+            left join
+        `cloud`.`host_details` ON host.id = host_details.id
+            and host_details.name = 'guest.os.category.id'
+            left join
+        `cloud`.`guest_os_category` ON guest_os_category.id = CONVERT( host_details.value , UNSIGNED)
+            left join
+        `cloud`.`host_tags` ON host_tags.host_id = host.id
+            left join
+        `cloud`.`op_host_capacity` mem_caps ON host.id = mem_caps.host_id
+            and mem_caps.capacity_type = 0
+            left join
+        `cloud`.`op_host_capacity` cpu_caps ON host.id = cpu_caps.host_id
+            and cpu_caps.capacity_type = 1
+            left join
+        `cloud`.`async_job` ON async_job.instance_id = host.id
+            and async_job.instance_type = 'Host'
+            and async_job.job_status = 0;
+        
 DROP VIEW IF EXISTS `cloud`.`volume_view`;
 CREATE VIEW `cloud`.`volume_view` AS
     select 
@@ -645,7 +716,164 @@ CREATE VIEW `cloud`.`volume_view` AS
         `cloud`.`async_job` ON async_job.instance_id = volumes.id
             and async_job.instance_type = 'Volume'
             and async_job.job_status = 0;                       
-        
+ 
+DROP VIEW IF EXISTS `cloud`.`storage_pool_view`;
+CREATE VIEW `cloud`.`storage_pool_view` AS
+    select 
+        storage_pool.id,
+        storage_pool.uuid,
+        storage_pool.name,
+        storage_pool.status,
+        storage_pool.path,
+        storage_pool.pool_type,
+        storage_pool.host_address,
+        storage_pool.created,
+        storage_pool.removed,
+        storage_pool.capacity_bytes,
+        storage_pool.scope,
+        cluster.id cluster_id,
+        cluster.uuid cluster_uuid,
+        cluster.name cluster_name,
+        cluster.cluster_type,
+        data_center.id data_center_id,
+        data_center.uuid data_center_uuid,
+        data_center.name data_center_name,      
+        data_center.networktype data_center_type,
+        host_pod_ref.id pod_id,
+        host_pod_ref.uuid pod_uuid,
+        host_pod_ref.name pod_name,
+        storage_pool_details.name tag,
+        op_host_capacity.used_capacity disk_used_capacity,
+        op_host_capacity.reserved_capacity disk_reserved_capacity,
+        async_job.id job_id,
+        async_job.uuid job_uuid,
+        async_job.job_status job_status,
+        async_job.account_id job_account_id
+    from
+        `cloud`.`storage_pool`
+            left join
+        `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id
+            left join
+        `cloud`.`data_center` ON storage_pool.data_center_id = data_center.id
+            left join
+        `cloud`.`host_pod_ref` ON storage_pool.pod_id = host_pod_ref.id
+            left join
+        `cloud`.`storage_pool_details` ON storage_pool_details.pool_id = storage_pool.id
+            and storage_pool_details.value = 'true'
+            left join
+        `cloud`.`op_host_capacity` ON storage_pool.id = op_host_capacity.host_id
+            and op_host_capacity.capacity_type = 3
+            left join
+        `cloud`.`async_job` ON async_job.instance_id = storage_pool.id
+            and async_job.instance_type = 'StoragePool'
+            and async_job.job_status = 0;
+            
+
+DROP VIEW IF EXISTS `cloud`.`domain_router_view`;
+CREATE VIEW `cloud`.`domain_router_view` AS
+    select 
+        vm_instance.id id,
+        vm_instance.name name,
+        account.id account_id,
+        account.uuid account_uuid,
+        account.account_name account_name,
+        account.type account_type,
+        domain.id domain_id,
+        domain.uuid domain_uuid,
+        domain.name domain_name,
+        domain.path domain_path,
+        projects.id project_id,
+        projects.uuid project_uuid,
+        projects.name project_name,
+        vm_instance.uuid uuid,
+        vm_instance.created created,
+        vm_instance.state state,
+        vm_instance.removed removed,
+        vm_instance.pod_id pod_id,
+        vm_instance.instance_name instance_name,
+        host_pod_ref.uuid pod_uuid,
+        data_center.id data_center_id,
+        data_center.uuid data_center_uuid,
+        data_center.name data_center_name,
+        data_center.networktype data_center_type,
+        data_center.dns1 dns1,
+        data_center.dns2 dns2,
+        data_center.ip6_dns1 ip6_dns1,
+        data_center.ip6_dns2 ip6_dns2,
+        host.id host_id,
+        host.uuid host_uuid,
+        host.name host_name,
+        vm_template.id template_id,
+        vm_template.uuid template_uuid,
+        service_offering.id service_offering_id,
+        disk_offering.uuid service_offering_uuid,
+        disk_offering.name service_offering_name,
+        nics.id nic_id,
+        nics.uuid nic_uuid,
+        nics.network_id network_id,
+        nics.ip4_address ip_address,
+        nics.ip6_address ip6_address,
+        nics.ip6_gateway ip6_gateway,
+        nics.ip6_cidr ip6_cidr,
+        nics.default_nic is_default_nic,
+        nics.gateway gateway,
+        nics.netmask netmask,
+        nics.mac_address mac_address,
+        nics.broadcast_uri broadcast_uri,
+        nics.isolation_uri isolation_uri,
+        vpc.id vpc_id,
+        vpc.uuid vpc_uuid,
+        networks.uuid network_uuid,
+        networks.name network_name,
+        networks.network_domain network_domain,
+        networks.traffic_type traffic_type,
+        networks.guest_type guest_type,
+        async_job.id job_id,
+        async_job.uuid job_uuid,
+        async_job.job_status job_status,
+        async_job.account_id job_account_id,
+        domain_router.template_version template_version,
+        domain_router.scripts_version scripts_version,
+        domain_router.is_redundant_router is_redundant_router,
+        domain_router.redundant_state redundant_state,
+        domain_router.stop_pending stop_pending
+    from
+        `cloud`.`domain_router`
+            inner join
+        `cloud`.`vm_instance` ON vm_instance.id = domain_router.id
+            inner join
+        `cloud`.`account` ON vm_instance.account_id = account.id
+            inner join
+        `cloud`.`domain` ON vm_instance.domain_id = domain.id
+            left join
+        `cloud`.`host_pod_ref` ON vm_instance.pod_id = host_pod_ref.id
+            left join
+        `cloud`.`projects` ON projects.project_account_id = account.id
+            left join
+        `cloud`.`data_center` ON vm_instance.data_center_id = data_center.id
+            left join
+        `cloud`.`host` ON vm_instance.host_id = host.id
+            left join
+        `cloud`.`vm_template` ON vm_instance.vm_template_id = vm_template.id
+            left join
+        `cloud`.`service_offering` ON vm_instance.service_offering_id = service_offering.id
+            left join
+        `cloud`.`disk_offering` ON vm_instance.service_offering_id = disk_offering.id
+            left join
+        `cloud`.`volumes` ON vm_instance.id = volumes.instance_id
+            left join
+        `cloud`.`storage_pool` ON volumes.pool_id = storage_pool.id
+            left join
+        `cloud`.`nics` ON vm_instance.id = nics.instance_id
+            left join
+        `cloud`.`networks` ON nics.network_id = networks.id
+            left join
+        `cloud`.`vpc` ON domain_router.vpc_id = vpc.id
+            left join
+        `cloud`.`async_job` ON async_job.instance_id = vm_instance.id
+            and async_job.instance_type = 'DomainRouter'
+            and async_job.job_status = 0;
+            
 CREATE TABLE `cloud`.`external_cisco_vnmc_devices` (
   `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
   `uuid` varchar(255) UNIQUE,


[18/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
fix CLOUDSTACK-2149 and related unit test


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

Branch: refs/heads/ui-vm-affinity
Commit: 434525b83611f33796afc7fa457053868482476b
Parents: 04a2b2d
Author: Mice Xia <mi...@tcloudcomputing.com>
Authored: Wed Apr 24 11:12:34 2013 +0800
Committer: Mice Xia <mi...@tcloudcomputing.com>
Committed: Wed Apr 24 11:12:34 2013 +0800

----------------------------------------------------------------------
 server/src/com/cloud/vm/UserVmManagerImpl.java  |    2 +-
 server/test/com/cloud/vm/UserVmManagerTest.java |   45 +++++++++++-------
 2 files changed, 28 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/434525b8/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 1843f60..35d09fc 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -4096,7 +4096,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
             needRestart = true;
         }
 
-        List<VolumeVO> rootVols = _volsDao.findByInstance(vmId);
+        List<VolumeVO> rootVols = _volsDao.findByInstanceAndType(vmId, Volume.Type.ROOT);
         if (rootVols.isEmpty()) {
             InvalidParameterValueException ex = new InvalidParameterValueException(
                     "Can not find root volume for VM " + vm.getUuid());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/434525b8/server/test/com/cloud/vm/UserVmManagerTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/UserVmManagerTest.java b/server/test/com/cloud/vm/UserVmManagerTest.java
index bb1c07b..e5e2ff2 100755
--- a/server/test/com/cloud/vm/UserVmManagerTest.java
+++ b/server/test/com/cloud/vm/UserVmManagerTest.java
@@ -17,45 +17,54 @@
 
 package com.cloud.vm;
 
+import static org.mockito.Matchers.anyBoolean;
+import static org.mockito.Matchers.anyFloat;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.anyLong;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.when;
+
 import java.lang.reflect.Field;
 import java.util.List;
 
-import com.cloud.api.ApiDBUtils;
-import com.cloud.capacity.CapacityManager;
-import com.cloud.configuration.ConfigurationManager;
-import com.cloud.configuration.dao.ConfigurationDao;
-import com.cloud.hypervisor.Hypervisor;
-import com.cloud.offering.ServiceOffering;
-import com.cloud.service.ServiceOfferingVO;
-import com.cloud.user.*;
-import com.cloud.vm.dao.VMInstanceDao;
 import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.command.user.vm.RestoreVMCmd;
 import org.apache.cloudstack.api.command.user.vm.ScaleVMCmd;
-import org.apache.log4j.Logger;
-import org.junit.Test;
 import org.junit.Before;
+import org.junit.Test;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.mockito.Spy;
 
+import com.cloud.capacity.CapacityManager;
+import com.cloud.configuration.ConfigurationManager;
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.ResourceAllocationException;
 import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.storage.StorageManager;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.offering.ServiceOffering;
+import com.cloud.service.ServiceOfferingVO;
 import com.cloud.storage.VMTemplateVO;
+import com.cloud.storage.Volume;
 import com.cloud.storage.VolumeManager;
 import com.cloud.storage.VolumeVO;
 import com.cloud.storage.dao.VMTemplateDao;
 import com.cloud.storage.dao.VolumeDao;
+import com.cloud.user.Account;
+import com.cloud.user.AccountManager;
+import com.cloud.user.AccountVO;
+import com.cloud.user.UserContext;
+import com.cloud.user.UserVO;
 import com.cloud.user.dao.AccountDao;
 import com.cloud.user.dao.UserDao;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.vm.dao.UserVmDao;
-
-import static org.mockito.Mockito.*;
+import com.cloud.vm.dao.VMInstanceDao;
 
 public class UserVmManagerTest {
 
@@ -127,7 +136,7 @@ public class UserVmManagerTest {
 
         doReturn(VirtualMachine.State.Stopped).when(_vmMock).getState();
         when(_vmDao.findById(anyLong())).thenReturn(_vmMock);
-        when(_volsDao.findByInstance(anyLong())).thenReturn(_rootVols);
+        when(_volsDao.findByInstanceAndType(314L,Volume.Type.ROOT)).thenReturn(_rootVols);
         doReturn(false).when(_rootVols).isEmpty();
         when(_rootVols.get(eq(0))).thenReturn(_volumeMock);
         doReturn(3L).when(_volumeMock).getTemplateId();
@@ -150,7 +159,7 @@ public class UserVmManagerTest {
 
         doReturn(VirtualMachine.State.Running).when(_vmMock).getState();
         when(_vmDao.findById(anyLong())).thenReturn(_vmMock);
-        when(_volsDao.findByInstance(anyLong())).thenReturn(_rootVols);
+        when(_volsDao.findByInstanceAndType(314L,Volume.Type.ROOT)).thenReturn(_rootVols);
         doReturn(false).when(_rootVols).isEmpty();
         when(_rootVols.get(eq(0))).thenReturn(_volumeMock);
         doReturn(3L).when(_volumeMock).getTemplateId();
@@ -174,7 +183,7 @@ public class UserVmManagerTest {
             ConcurrentOperationException, ResourceAllocationException {
         doReturn(VirtualMachine.State.Running).when(_vmMock).getState();
         when(_vmDao.findById(anyLong())).thenReturn(_vmMock);
-        when(_volsDao.findByInstance(anyLong())).thenReturn(_rootVols);
+        when(_volsDao.findByInstanceAndType(314L,Volume.Type.ROOT)).thenReturn(_rootVols);
         doReturn(false).when(_rootVols).isEmpty();
         when(_rootVols.get(eq(0))).thenReturn(_volumeMock);
         doReturn(3L).when(_volumeMock).getTemplateId();
@@ -361,6 +370,6 @@ public class UserVmManagerTest {
         return serviceOffering;
     }
 
-
+ 
 
 }
\ No newline at end of file


[16/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2120: mixed zone management - extend listSnapshots API to return zone type.


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

Branch: refs/heads/ui-vm-affinity
Commit: 15e2bc463f05ff8b77f6b6a79bbcb391216778d8
Parents: 6230e5b
Author: Jessica Wang <je...@apache.org>
Authored: Tue Apr 23 14:03:35 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Apr 23 14:03:35 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/api/response/SnapshotResponse.java  |   16 +++++++++++++++
 server/src/com/cloud/api/ApiResponseHelper.java    |    6 +++++
 2 files changed, 22 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15e2bc46/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java b/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java
index 5b77fb2..7484ac9 100644
--- a/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java
@@ -93,6 +93,14 @@ public class SnapshotResponse extends BaseResponse implements ControlledEntityRe
     @Param(description = "the state of the snapshot. BackedUp means that snapshot is ready to be used; Creating - the snapshot is being allocated on the primary storage; BackingUp - the snapshot is being backed up on secondary storage")
     private Snapshot.State state;
 
+    @SerializedName(ApiConstants.ZONE_NAME)
+    @Param(description = "name of the availability zone")
+    private String zoneName;
+    
+    @SerializedName(ApiConstants.ZONE_TYPE)
+    @Param(description = "network type of the availability zone")
+    private String zoneType;
+    
     @SerializedName(ApiConstants.TAGS)  @Param(description="the list of resource tags associated with snapshot", responseObject = ResourceTagResponse.class)
     private List<ResourceTagResponse> tags;
 
@@ -173,6 +181,14 @@ public class SnapshotResponse extends BaseResponse implements ControlledEntityRe
         this.projectName = projectName;
     }
 
+    public void setZoneName(String zoneName) {
+        this.zoneName = zoneName;
+    }
+
+    public void setZoneType(String zoneType) {
+        this.zoneType = zoneType;
+    }
+    
     public void setTags(List<ResourceTagResponse> tags) {
         this.tags = tags;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15e2bc46/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index f4567c0..ba5322f 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -443,6 +443,12 @@ public class ApiResponseHelper implements ResponseGenerator {
             snapshotResponse.setVolumeId(volume.getUuid());
             snapshotResponse.setVolumeName(volume.getName());
             snapshotResponse.setVolumeType(volume.getVolumeType().name());
+        
+            DataCenter zone = ApiDBUtils.findZoneById(volume.getDataCenterId());
+            if (zone != null) {
+            	snapshotResponse.setZoneName(zone.getName());
+            	snapshotResponse.setZoneType(zone.getNetworkType().toString());                
+            }
         }
         snapshotResponse.setCreated(snapshot.getCreated());
         snapshotResponse.setName(snapshot.getName());


[12/42] git commit: updated refs/heads/ui-vm-affinity to 25f2f0f

Posted by bf...@apache.org.
CLOUDSTACK-2120: mixed zone management - extend listTemplates API to return zone type.


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

Branch: refs/heads/ui-vm-affinity
Commit: f7f1279d81f32a908b552f38f724e4d5ba4dab7e
Parents: 16ba999
Author: Jessica Wang <je...@apache.org>
Authored: Tue Apr 23 13:01:09 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Apr 23 13:01:55 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/api/response/TemplateResponse.java  |    7 +++++++
 server/src/com/cloud/api/ApiResponseHelper.java    |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f7f1279d/api/src/org/apache/cloudstack/api/response/TemplateResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/TemplateResponse.java b/api/src/org/apache/cloudstack/api/response/TemplateResponse.java
index ed933ff..896154a 100644
--- a/api/src/org/apache/cloudstack/api/response/TemplateResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/TemplateResponse.java
@@ -87,6 +87,9 @@ public class TemplateResponse extends BaseResponse implements ControlledEntityRe
 
     @SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone for this template")
     private String zoneName;
+    
+    @SerializedName(ApiConstants.ZONE_TYPE) @Param(description="the networktype of the zone for this template")
+    private String zoneType;
 
     @SerializedName(ApiConstants.STATUS) @Param(description="the status of the template")
     private String status;
@@ -156,6 +159,10 @@ public class TemplateResponse extends BaseResponse implements ControlledEntityRe
         this.zoneName = zoneName;
     }
 
+    public void setZoneType(String zoneType) {
+        this.zoneType = zoneType;
+    }
+    
     public void setAccountId(String accountId) {
         this.accountId = accountId;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f7f1279d/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 84dc46e..0b996c9 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -1449,6 +1449,7 @@ public class ApiResponseHelper implements ResponseGenerator {
             // Add the zone ID
             templateResponse.setZoneId(datacenter.getUuid());
             templateResponse.setZoneName(datacenter.getName());
+            templateResponse.setZoneType(datacenter.getNetworkType().toString());
         }
 
         boolean isAdmin = false;