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

[17/50] [abbrv] Merge branch 'api_refactoring' into javelin

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/agent/src/com/cloud/agent/AgentShell.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/api/src/com/cloud/network/element/NetworkElement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/api/src/com/cloud/storage/Snapshot.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/api/src/com/cloud/storage/StoragePool.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/api/src/com/cloud/storage/VMTemplateStorageResourceAssoc.java
----------------------------------------------------------------------
diff --cc api/src/com/cloud/storage/VMTemplateStorageResourceAssoc.java
index 6c49352,97baa4b..a404ea4
--- a/api/src/com/cloud/storage/VMTemplateStorageResourceAssoc.java
+++ b/api/src/com/cloud/storage/VMTemplateStorageResourceAssoc.java
@@@ -16,11 -16,14 +16,14 @@@
  // under the License.
  package com.cloud.storage;
  
+ import org.apache.cloudstack.api.Identity;
+ import org.apache.cloudstack.api.InternalIdentity;
+ 
  import java.util.Date;
  
- public interface VMTemplateStorageResourceAssoc {
+ public interface VMTemplateStorageResourceAssoc extends InternalIdentity {
      public static enum Status {
 -        UNKNOWN, DOWNLOAD_ERROR, NOT_DOWNLOADED, DOWNLOAD_IN_PROGRESS, DOWNLOADED, ABANDONED, UPLOADED, NOT_UPLOADED, UPLOAD_ERROR, UPLOAD_IN_PROGRESS
 +        UNKNOWN, DOWNLOAD_ERROR, NOT_DOWNLOADED, DOWNLOAD_IN_PROGRESS, DOWNLOADED, ABANDONED, UPLOADED, NOT_UPLOADED, UPLOAD_ERROR, UPLOAD_IN_PROGRESS, CREATING, CREATED
      }
  
      String getInstallPath();

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/api/src/com/cloud/storage/Volume.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/api/src/com/cloud/template/VirtualMachineTemplate.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/api/src/com/cloud/vm/VirtualMachine.java
----------------------------------------------------------------------
diff --cc api/src/com/cloud/vm/VirtualMachine.java
index 82ff937,cd30579..9c07cdc
--- a/api/src/com/cloud/vm/VirtualMachine.java
+++ b/api/src/com/cloud/vm/VirtualMachine.java
@@@ -27,9 -28,9 +28,9 @@@ import org.apache.cloudstack.api.Intern
  
  /**
   * VirtualMachine describes the properties held by a virtual machine
 - *
 + * 
   */
- public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, StateObject<VirtualMachine.State> {
+ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, InternalIdentity, StateObject<VirtualMachine.State> {
  
      public enum State {
          Starting(true, "VM is being started.  At this state, you should find host id filled which means it's being started on that host."),

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/api/src/org/apache/cloudstack/api/BaseCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/BaseCmd.java
index 0000000,d964e70..fbbee50
mode 000000,100644..100644
--- a/api/src/org/apache/cloudstack/api/BaseCmd.java
+++ b/api/src/org/apache/cloudstack/api/BaseCmd.java
@@@ -1,0 -1,538 +1,539 @@@
+ // Licensed to the Apache Software Foundation (ASF) under one
+ // or more contributor license agreements.  See the NOTICE file
+ // distributed with this work for additional information
+ // regarding copyright ownership.  The ASF licenses this file
+ // to you under the Apache License, Version 2.0 (the
+ // "License"); you may not use this file except in compliance
+ // with the License.  You may obtain a copy of the License at
+ //
+ //   http://www.apache.org/licenses/LICENSE-2.0
+ //
+ // Unless required by applicable law or agreed to in writing,
+ // software distributed under the License is distributed on an
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ // KIND, either express or implied.  See the License for the
+ // specific language governing permissions and limitations
+ // under the License.
+ 
+ package org.apache.cloudstack.api;
+ 
+ import java.text.DateFormat;
+ import java.text.SimpleDateFormat;
+ import java.util.ArrayList;
+ import java.util.Date;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+ import java.util.regex.Pattern;
+ 
+ import org.apache.cloudstack.query.QueryService;
+ import org.apache.log4j.Logger;
+ 
+ import com.cloud.configuration.ConfigurationService;
+ import com.cloud.consoleproxy.ConsoleProxyService;
+ import com.cloud.dao.EntityManager;
+ import com.cloud.domain.Domain;
+ import com.cloud.exception.ConcurrentOperationException;
+ import com.cloud.exception.InsufficientCapacityException;
+ import com.cloud.exception.InvalidParameterValueException;
+ import com.cloud.exception.NetworkRuleConflictException;
+ import com.cloud.exception.PermissionDeniedException;
+ import com.cloud.exception.ResourceAllocationException;
+ import com.cloud.exception.ResourceUnavailableException;
+ import com.cloud.network.NetworkService;
+ import com.cloud.network.StorageNetworkService;
+ import com.cloud.network.VpcVirtualNetworkApplianceService;
+ import com.cloud.network.as.AutoScaleService;
+ import com.cloud.network.firewall.FirewallService;
+ import com.cloud.network.firewall.NetworkACLService;
+ import com.cloud.network.lb.LoadBalancingRulesService;
+ import com.cloud.network.rules.RulesService;
+ import com.cloud.network.security.SecurityGroupService;
+ import com.cloud.network.vpc.VpcService;
+ import com.cloud.network.vpn.RemoteAccessVpnService;
+ import com.cloud.network.vpn.Site2SiteVpnService;
+ import com.cloud.projects.Project;
+ import com.cloud.projects.ProjectService;
+ import com.cloud.resource.ResourceService;
+ import com.cloud.server.ManagementService;
+ import com.cloud.server.TaggedResourceService;
+ import com.cloud.storage.StorageService;
+ import com.cloud.storage.snapshot.SnapshotService;
+ import com.cloud.template.TemplateService;
+ import com.cloud.user.Account;
+ import com.cloud.user.AccountService;
+ import com.cloud.user.DomainService;
+ import com.cloud.user.ResourceLimitService;
+ import com.cloud.utils.IdentityProxy;
+ import com.cloud.utils.Pair;
++import com.cloud.utils.component.ComponentContext;
+ import com.cloud.utils.component.ComponentLocator;
+ import com.cloud.vm.BareMetalVmService;
+ import com.cloud.vm.UserVmService;
+ 
+ public abstract class BaseCmd {
+     private static final Logger s_logger = Logger.getLogger(BaseCmd.class.getName());
+ 
+     public static final String USER_ERROR_MESSAGE = "Internal error executing command, please contact your system administrator";
+     public static final int PROGRESS_INSTANCE_CREATED = 1;
+ 
+     public static final String RESPONSE_TYPE_XML = "xml";
+     public static final String RESPONSE_TYPE_JSON = "json";
+ 
+     public enum CommandType {
+         BOOLEAN, DATE, FLOAT, INTEGER, SHORT, LIST, LONG, OBJECT, MAP, STRING, TZDATE, UUID
+     }
+ 
+     // FIXME: Extract these out into a separate file
+     // Client error codes
+     public static final int MALFORMED_PARAMETER_ERROR = 430;
+     public static final int PARAM_ERROR = 431;
+     public static final int UNSUPPORTED_ACTION_ERROR = 432;
+     public static final int PAGE_LIMIT_EXCEED = 433;
+ 
+     // Server error codes
+     public static final int INTERNAL_ERROR = 530;
+     public static final int ACCOUNT_ERROR = 531;
+     public static final int ACCOUNT_RESOURCE_LIMIT_ERROR = 532;
+     public static final int INSUFFICIENT_CAPACITY_ERROR = 533;
+     public static final int RESOURCE_UNAVAILABLE_ERROR = 534;
+     public static final int RESOURCE_ALLOCATION_ERROR = 534;
+     public static final int RESOURCE_IN_USE_ERROR = 536;
+     public static final int NETWORK_RULE_CONFLICT_ERROR = 537;
+ 
+     public static final DateFormat INPUT_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
+     public static final DateFormat NEW_INPUT_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+     public static Pattern newInputDateFormat = Pattern.compile("[\\d]+-[\\d]+-[\\d]+ [\\d]+:[\\d]+:[\\d]+");
+     private static final DateFormat _outputFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
+ 
+     private Object _responseObject = null;
+     private Map<String, String> fullUrlParams;
+ 
+     @Parameter(name = "response", type = CommandType.STRING)
+     private String responseType;
+ 
+     public static ComponentLocator s_locator;
+     public static ConfigurationService _configService;
+     public static AccountService _accountService;
+     public static UserVmService _userVmService;
+     public static ManagementService _mgr;
+     public static StorageService _storageService;
+     public static ResourceService _resourceService;
+     public static NetworkService _networkService;
+     public static TemplateService _templateService;
+     public static SecurityGroupService _securityGroupService;
+     public static SnapshotService _snapshotService;
+     public static ConsoleProxyService _consoleProxyService;
+     public static VpcVirtualNetworkApplianceService _routerService;
+     public static ResponseGenerator _responseGenerator;
+     public static EntityManager _entityMgr;
+     public static RulesService _rulesService;
+     public static AutoScaleService _autoScaleService;
+     public static LoadBalancingRulesService _lbService;
+     public static RemoteAccessVpnService _ravService;
+     public static BareMetalVmService _bareMetalVmService;
+     public static ProjectService _projectService;
+     public static FirewallService _firewallService;
+     public static DomainService _domainService;
+     public static ResourceLimitService _resourceLimitService;
+     public static IdentityService _identityService;
+     public static StorageNetworkService _storageNetworkService;
+     public static TaggedResourceService _taggedResourceService;
+     public static VpcService _vpcService;
+     public static NetworkACLService _networkACLService;
+     public static Site2SiteVpnService _s2sVpnService;
+ 
+     public static QueryService _queryService;
+ 
+     public static void setComponents(ResponseGenerator generator) {
+         ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name);
+         _mgr = (ManagementService) ComponentLocator.getComponent(ManagementService.Name);
+         _accountService = locator.getManager(AccountService.class);
+         _configService = locator.getManager(ConfigurationService.class);
+         _userVmService = locator.getManager(UserVmService.class);
+         _storageService = locator.getManager(StorageService.class);
+         _resourceService = locator.getManager(ResourceService.class);
+         _networkService = locator.getManager(NetworkService.class);
+         _templateService = locator.getManager(TemplateService.class);
+         _securityGroupService = locator.getManager(SecurityGroupService.class);
+         _snapshotService = locator.getManager(SnapshotService.class);
+         _consoleProxyService = locator.getManager(ConsoleProxyService.class);
+         _routerService = locator.getManager(VpcVirtualNetworkApplianceService.class);
+         _entityMgr = locator.getManager(EntityManager.class);
+         _rulesService = locator.getManager(RulesService.class);
+         _lbService = locator.getManager(LoadBalancingRulesService.class);
+         _autoScaleService = locator.getManager(AutoScaleService.class);
+         _ravService = locator.getManager(RemoteAccessVpnService.class);
+         _responseGenerator = generator;
+         _bareMetalVmService = locator.getManager(BareMetalVmService.class);
+         _projectService = locator.getManager(ProjectService.class);
+         _firewallService = locator.getManager(FirewallService.class);
+         _domainService = locator.getManager(DomainService.class);
+         _resourceLimitService = locator.getManager(ResourceLimitService.class);
+         _identityService = locator.getManager(IdentityService.class);
+         _storageNetworkService = locator.getManager(StorageNetworkService.class);
+         _taggedResourceService = locator.getManager(TaggedResourceService.class);
+         _vpcService = locator.getManager(VpcService.class);
+         _networkACLService = locator.getManager(NetworkACLService.class);
+         _s2sVpnService = locator.getManager(Site2SiteVpnService.class);
+         _queryService = locator.getManager(QueryService.class);
+     }
+ 
+     public abstract void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException;
+ 
+     public String getResponseType() {
+         if (responseType == null) {
+             return RESPONSE_TYPE_XML;
+         }
+         return responseType;
+     }
+ 
+     public void setResponseType(String responseType) {
+         this.responseType = responseType;
+     }
+ 
+     public abstract String getCommandName();
+ 
+     /**
+      * For commands the API framework needs to know the owner of the object being acted upon. This method is
+      * used to determine that information.
 -     *
++     * 
+      * @return the id of the account that owns the object being acted upon
+      */
+     public abstract long getEntityOwnerId();
+ 
+     public Object getResponseObject() {
+         return _responseObject;
+     }
+ 
+     public void setResponseObject(Object responseObject) {
+         _responseObject = responseObject;
+     }
+ 
+     public ManagementService getMgmtServiceRef() {
 -        return _mgr;
++    	return _mgr;
+     }
 -
++    
+     public static String getDateString(Date date) {
+         if (date == null) {
+             return "";
+         }
+         String formattedString = null;
+         synchronized (_outputFormat) {
+             formattedString = _outputFormat.format(date);
+         }
+         return formattedString;
+     }
+ 
+     // FIXME: move this to a utils method so that maps can be unpacked and integer/long values can be appropriately cast
+     @SuppressWarnings({ "unchecked", "rawtypes" })
+     public Map<String, Object> unpackParams(Map<String, String> params) {
+         Map<String, Object> lowercaseParams = new HashMap<String, Object>();
+         for (String key : params.keySet()) {
+             int arrayStartIndex = key.indexOf('[');
+             int arrayStartLastIndex = key.lastIndexOf('[');
+             if (arrayStartIndex != arrayStartLastIndex) {
+                 throw new ServerApiException(MALFORMED_PARAMETER_ERROR, "Unable to decode parameter " + key
+                         + "; if specifying an object array, please use parameter[index].field=XXX, e.g. userGroupList[0].group=httpGroup");
+             }
+ 
+             if (arrayStartIndex > 0) {
+                 int arrayEndIndex = key.indexOf(']');
+                 int arrayEndLastIndex = key.lastIndexOf(']');
+                 if ((arrayEndIndex < arrayStartIndex) || (arrayEndIndex != arrayEndLastIndex)) {
+                     // malformed parameter
+                     throw new ServerApiException(MALFORMED_PARAMETER_ERROR, "Unable to decode parameter " + key
+                             + "; if specifying an object array, please use parameter[index].field=XXX, e.g. userGroupList[0].group=httpGroup");
+                 }
+ 
+                 // Now that we have an array object, check for a field name in the case of a complex object
+                 int fieldIndex = key.indexOf('.');
+                 String fieldName = null;
+                 if (fieldIndex < arrayEndIndex) {
+                     throw new ServerApiException(MALFORMED_PARAMETER_ERROR, "Unable to decode parameter " + key
+                             + "; if specifying an object array, please use parameter[index].field=XXX, e.g. userGroupList[0].group=httpGroup");
+                 } else {
+                     fieldName = key.substring(fieldIndex + 1);
+                 }
+ 
+                 // parse the parameter name as the text before the first '[' character
+                 String paramName = key.substring(0, arrayStartIndex);
+                 paramName = paramName.toLowerCase();
+ 
+                 Map<Integer, Map> mapArray = null;
+                 Map<String, Object> mapValue = null;
+                 String indexStr = key.substring(arrayStartIndex + 1, arrayEndIndex);
+                 int index = 0;
+                 boolean parsedIndex = false;
+                 try {
+                     if (indexStr != null) {
+                         index = Integer.parseInt(indexStr);
+                         parsedIndex = true;
+                     }
+                 } catch (NumberFormatException nfe) {
+                     s_logger.warn("Invalid parameter " + key + " received, unable to parse object array, returning an error.");
+                 }
+ 
+                 if (!parsedIndex) {
+                     throw new ServerApiException(MALFORMED_PARAMETER_ERROR, "Unable to decode parameter " + key
+                             + "; if specifying an object array, please use parameter[index].field=XXX, e.g. userGroupList[0].group=httpGroup");
+                 }
+ 
+                 Object value = lowercaseParams.get(paramName);
+                 if (value == null) {
+                     // for now, assume object array with sub fields
+                     mapArray = new HashMap<Integer, Map>();
+                     mapValue = new HashMap<String, Object>();
+                     mapArray.put(Integer.valueOf(index), mapValue);
+                 } else if (value instanceof Map) {
+                     mapArray = (HashMap) value;
+                     mapValue = mapArray.get(Integer.valueOf(index));
+                     if (mapValue == null) {
+                         mapValue = new HashMap<String, Object>();
+                         mapArray.put(Integer.valueOf(index), mapValue);
+                     }
+                 }
+ 
+                 // we are ready to store the value for a particular field into the map for this object
+                 mapValue.put(fieldName, params.get(key));
+ 
+                 lowercaseParams.put(paramName, mapArray);
+             } else {
+                 lowercaseParams.put(key.toLowerCase(), params.get(key));
+             }
+         }
+         return lowercaseParams;
+     }
+ 
+     public String buildResponse(ServerApiException apiException, String responseType) {
+         StringBuffer sb = new StringBuffer();
+         if (RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) {
+             // JSON response
+             sb.append("{ \"" + getCommandName() + "\" : { " + "\"@attributes\":{\"cloudstack-version\":\"" + _mgr.getVersion() + "\"},");
+             sb.append("\"errorcode\" : \"" + apiException.getErrorCode() + "\", \"description\" : \"" + apiException.getDescription() + "\" } }");
+         } else {
+             sb.append("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
+             sb.append("<" + getCommandName() + ">");
+             sb.append("<errorcode>" + apiException.getErrorCode() + "</errorcode>");
+             sb.append("<description>" + escapeXml(apiException.getDescription()) + "</description>");
+             sb.append("</" + getCommandName() + " cloudstack-version=\"" + _mgr.getVersion() + "\">");
+         }
+         return sb.toString();
+     }
+ 
+     public String buildResponse(List<Pair<String, Object>> tagList, String responseType) {
+         StringBuffer prefixSb = new StringBuffer();
+         StringBuffer suffixSb = new StringBuffer();
+ 
+         // set up the return value with the name of the response
+         if (RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) {
+             prefixSb.append("{ \"" + getCommandName() + "\" : { \"@attributes\":{\"cloudstack-version\":\"" + _mgr.getVersion() + "\"},");
+         } else {
+             prefixSb.append("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
+             prefixSb.append("<" + getCommandName() + " cloudstack-version=\"" + _mgr.getVersion() + "\">");
+         }
+ 
+         int i = 0;
+         for (Pair<String, Object> tagData : tagList) {
+             String tagName = tagData.first();
+             Object tagValue = tagData.second();
+             if (tagValue instanceof Object[]) {
+                 Object[] subObjects = (Object[]) tagValue;
+                 if (subObjects.length < 1) {
+                     continue;
+                 }
+                 writeObjectArray(responseType, suffixSb, i++, tagName, subObjects);
+             } else {
+                 writeNameValuePair(suffixSb, tagName, tagValue, responseType, i++);
+             }
+         }
+ 
+         if (suffixSb.length() > 0) {
+             if (RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) { // append comma only if we have some suffix else
+                 // not as per strict Json syntax.
+                 prefixSb.append(",");
+             }
+             prefixSb.append(suffixSb);
+         }
+         // close the response
+         if (RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) {
+             prefixSb.append("} }");
+         } else {
+             prefixSb.append("</" + getCommandName() + ">");
+         }
+         return prefixSb.toString();
+     }
+ 
+     private void writeNameValuePair(StringBuffer sb, String tagName, Object tagValue, String responseType, int propertyCount) {
+         if (tagValue == null) {
+             return;
+         }
+ 
+         if (tagValue instanceof Object[]) {
+             Object[] subObjects = (Object[]) tagValue;
+             if (subObjects.length < 1) {
+                 return;
+             }
+             writeObjectArray(responseType, sb, propertyCount, tagName, subObjects);
+         } else {
+             if (RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) {
+                 String seperator = ((propertyCount > 0) ? ", " : "");
+                 sb.append(seperator + "\"" + tagName + "\" : \"" + escapeJSON(tagValue.toString()) + "\"");
+             } else {
+                 sb.append("<" + tagName + ">" + escapeXml(tagValue.toString()) + "</" + tagName + ">");
+             }
+         }
+     }
+ 
+     @SuppressWarnings("rawtypes")
+     private void writeObjectArray(String responseType, StringBuffer sb, int propertyCount, String tagName, Object[] subObjects) {
+         if (RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) {
+             String separator = ((propertyCount > 0) ? ", " : "");
+             sb.append(separator);
+         }
+         int j = 0;
+         for (Object subObject : subObjects) {
+             if (subObject instanceof List) {
+                 List subObjList = (List) subObject;
+                 writeSubObject(sb, tagName, subObjList, responseType, j++);
+             }
+         }
+ 
+         if (RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) {
+             sb.append("]");
+         }
+     }
+ 
+     @SuppressWarnings("rawtypes")
+     private void writeSubObject(StringBuffer sb, String tagName, List tagList, String responseType, int objectCount) {
+         if (RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) {
+             sb.append(((objectCount == 0) ? "\"" + tagName + "\" : [  { " : ", { "));
+         } else {
+             sb.append("<" + tagName + ">");
+         }
+ 
+         int i = 0;
+         for (Object tag : tagList) {
+             if (tag instanceof Pair) {
+                 Pair nameValuePair = (Pair) tag;
+                 writeNameValuePair(sb, (String) nameValuePair.first(), nameValuePair.second(), responseType, i++);
+             }
+         }
+ 
+         if (RESPONSE_TYPE_JSON.equalsIgnoreCase(responseType)) {
+             sb.append("}");
+         } else {
+             sb.append("</" + tagName + ">");
+         }
+     }
+ 
+     /**
+      * Escape xml response set to false by default. API commands to override this method to allow escaping
+      */
+     public boolean requireXmlEscape() {
+         return true;
+     }
+ 
+     private String escapeXml(String xml) {
+         if (!requireXmlEscape()) {
+             return xml;
+         }
+         int iLen = xml.length();
+         if (iLen == 0) {
+             return xml;
+         }
+         StringBuffer sOUT = new StringBuffer(iLen + 256);
+         int i = 0;
+         for (; i < iLen; i++) {
+             char c = xml.charAt(i);
+             if (c == '<') {
+                 sOUT.append("&lt;");
+             } else if (c == '>') {
+                 sOUT.append("&gt;");
+             } else if (c == '&') {
+                 sOUT.append("&amp;");
+             } else if (c == '"') {
+                 sOUT.append("&quot;");
+             } else if (c == '\'') {
+                 sOUT.append("&apos;");
+             } else {
+                 sOUT.append(c);
+             }
+         }
+         return sOUT.toString();
+     }
+ 
+     private static String escapeJSON(String str) {
+         if (str == null) {
+             return str;
+         }
+ 
+         return str.replace("\"", "\\\"");
+     }
+ 
+     protected long getInstanceIdFromJobSuccessResult(String result) {
+         s_logger.debug("getInstanceIdFromJobSuccessResult not overridden in subclass " + this.getClass().getName());
+         return 0;
+     }
+ 
+     public static boolean isAdmin(short accountType) {
+         return ((accountType == Account.ACCOUNT_TYPE_ADMIN) ||
+                 (accountType == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN) ||
+                 (accountType == Account.ACCOUNT_TYPE_DOMAIN_ADMIN) || (accountType == Account.ACCOUNT_TYPE_READ_ONLY_ADMIN));
+     }
+ 
+     public static boolean isRootAdmin(short accountType) {
+         return ((accountType == Account.ACCOUNT_TYPE_ADMIN));
+     }
+ 
+     public void setFullUrlParams(Map<String, String> map) {
+         this.fullUrlParams = map;
+     }
+ 
+     public Map<String, String> getFullUrlParams() {
+         return this.fullUrlParams;
+     }
+ 
+     public Long finalyzeAccountId(String accountName, Long domainId, Long projectId, boolean enabledOnly) {
+         if (accountName != null) {
+             if (domainId == null) {
+                 throw new InvalidParameterValueException("Account must be specified with domainId parameter");
+             }
+ 
+             Domain domain = _domainService.getDomain(domainId);
+             if (domain == null) {
+                 throw new InvalidParameterValueException("Unable to find domain by id");
+             }
+ 
+             Account account = _accountService.getActiveAccountByName(accountName, domainId);
+             if (account != null && account.getType() != Account.ACCOUNT_TYPE_PROJECT) {
+                 if (!enabledOnly || account.getState() == Account.State.enabled) {
+                     return account.getId();
+                 } else {
 -                    throw new PermissionDeniedException("Can't add resources to the account id=" + account.getId() + " in state=" + account.getState() + " as it's no longer active");
++                    throw new PermissionDeniedException("Can't add resources to the account id=" + account.getId() + " in state=" + account.getState() + " as it's no longer active");                    
+                 }
+             } else {
+                 // idList is not used anywhere, so removed it now
+                 //List<IdentityProxy> idList = new ArrayList<IdentityProxy>();
+                 //idList.add(new IdentityProxy("domain", domainId, "domainId"));
+                 throw new InvalidParameterValueException("Unable to find account by name " + accountName + " in domain with specified id");
+             }
+         }
+ 
+         if (projectId != null) {
+             Project project = _projectService.getProject(projectId);
+             if (project != null) {
+                 if (!enabledOnly || project.getState() == Project.State.Active) {
+                     return project.getProjectAccountId();
+                 } else {
 -                    PermissionDeniedException ex = new PermissionDeniedException("Can't add resources to the project with specified projectId in state=" + project.getState() + " as it's no longer active");
 -                    ex.addProxyObject(project, projectId, "projectId");
++                	PermissionDeniedException ex = new PermissionDeniedException("Can't add resources to the project with specified projectId in state=" + project.getState() + " as it's no longer active");
++                	ex.addProxyObject(project, projectId, "projectId");                    
+                     throw ex;
+                 }
+             } else {
+                 throw new InvalidParameterValueException("Unable to find project by id");
+             }
+         }
+         return null;
+     }
+ }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/client/pom.xml
----------------------------------------------------------------------
diff --cc client/pom.xml
index e4707c0,b703cbe..74cebf0
--- a/client/pom.xml
+++ b/client/pom.xml
@@@ -100,81 -109,9 +109,81 @@@
      <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
-       <version>5.1.21</version>
+       <version>${cs.mysql.version}</version>
        <scope>runtime</scope>
      </dependency>
 +    <dependency>
 +    	<groupId>org.apache.cloudstack</groupId>
 +    	<artifactId>cloud-framework-ipc</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +        <artifactId>cloud-framework-rest</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +        <artifactId>cloud-engine-api</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +    	<artifactId>cloud-engine-components-api</artifactId>
 +    	<version>${project.version}</version>
 +    </dependency>
 +
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +        <artifactId>cloud-engine-compute</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
 +
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +        <artifactId>cloud-engine-network</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +        <artifactId>cloud-engine-orchestration</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +        <artifactId>cloud-engine-schema</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +        <artifactId>cloud-engine-storage</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +        <artifactId>cloud-engine-storage-backup</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +        <artifactId>cloud-engine-storage-image</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +        <artifactId>cloud-engine-storage-imagemotion</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +        <artifactId>cloud-engine-storage-snapshot</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
 +    <dependency>
 +        <groupId>org.apache.cloudstack</groupId>
 +        <artifactId>cloud-engine-storage-volume</artifactId>
 +        <version>${project.version}</version>
 +    </dependency>
    </dependencies>
    <build>
      <defaultGoal>install</defaultGoal>
@@@ -199,10 -136,9 +208,10 @@@
                <maxIdleTime>60000</maxIdleTime>
              </connector>
            </connectors>
 +          <jvmArgs>-XX:MaxPermSize=512m -Xmx2g</jvmArgs>
            <contextPath>/client</contextPath>
-           <webXml>${basedir}/target/${project.artifactId}-${project.version}/WEB-INF/web.xml</webXml>
-           <webAppSourceDirectory>${basedir}/target/${project.artifactId}-${project.version}</webAppSourceDirectory>
+           <webXml>${basedir}/WEB-INF/web.xml</webXml>
+           <webAppSourceDirectory>${project.build.directory}/${project.build.finalName}</webAppSourceDirectory>
          </configuration>
        </plugin>
        <plugin>
@@@ -287,85 -330,100 +403,100 @@@
      </pluginManagement>
    </build>
    <profiles>
 -    <profile>
 +	<profile>
+         <id>simulator</id>
+         <activation>
+             <property>
+                 <name>simulator</name>
+             </property>
+         </activation>
+         <dependencies>
+             <dependency>
+                 <groupId>org.apache.cloudstack</groupId>
+                 <artifactId>cloud-plugin-hypervisor-simulator</artifactId>
+                 <version>${project.version}</version>
+             </dependency>
+         </dependencies>
+     </profile>
+     <profile>
 -      <id>netapp</id>
 -      <activation>
 -        <property>
 -          <name>nonoss</name>
 -        </property>
 -      </activation>
 -      <dependencies>
 -        <dependency>
 -          <groupId>org.apache.cloudstack</groupId>
 -          <artifactId>cloud-plugin-netapp</artifactId>
 -          <version>${project.version}</version>
 -        </dependency>
 -      </dependencies>
 -    </profile>
 -    <profile>
 -      <id>f5</id>
 -      <activation>
 -        <property>
 -          <name>nonoss</name>
 -        </property>
 -      </activation>
 -      <dependencies>
 -        <dependency>
 -          <groupId>org.apache.cloudstack</groupId>
 -          <artifactId>cloud-plugin-network-f5</artifactId>
 -          <version>${project.version}</version>
 -        </dependency>
 -      </dependencies>
 -    </profile>
 -    <profile>
 -      <id>netscaler</id>
 -      <activation>
 -        <property>
 -          <name>nonoss</name>
 -        </property>
 -      </activation>
 -      <dependencies>
 -        <dependency>
 -          <groupId>org.apache.cloudstack</groupId>
 -          <artifactId>cloud-plugin-network-netscaler</artifactId>
 -          <version>${project.version}</version>
 -        </dependency>
 -      </dependencies>
 -    </profile>
 -    <profile>
 -      <id>srx</id>
 -      <activation>
 -        <property>
 -          <name>nonoss</name>
 -        </property>
 -      </activation>
 -      <dependencies>
 -        <dependency>
 -          <groupId>org.apache.cloudstack</groupId>
 -          <artifactId>cloud-plugin-network-srx</artifactId>
 -          <version>${project.version}</version>
 -        </dependency>
 -      </dependencies>
 -    </profile>
 -    <profile>
 -      <id>vmware</id>
 -      <activation>
 -        <property>
 -          <name>nonoss</name>
 -        </property>
 -      </activation>
 -      <dependencies>
 -        <dependency>
 -          <groupId>org.apache.cloudstack</groupId>
 -          <artifactId>cloud-plugin-hypervisor-vmware</artifactId>
 -          <version>${project.version}</version>
 -        </dependency>
 -        <dependency>
 -          <groupId>org.apache.cloudstack</groupId>
 -          <artifactId>cloud-vmware-base</artifactId>
 -          <version>${project.version}</version>
 -        </dependency>
 -      </dependencies>
 -    </profile>
 -  </profiles>
 +		<id>netapp</id>
 +		<activation>
 +			<property>
 +				<name>nonoss</name>
 +			</property>
 +		</activation>
 +		<dependencies>
 +			<dependency>
 +				<groupId>org.apache.cloudstack</groupId>
 +				<artifactId>cloud-plugin-netapp</artifactId>
 +				<version>${project.version}</version>
 +			</dependency>
 +		</dependencies>
 +	</profile>
 +	<profile>
 +		<id>f5</id>
 +		<activation>
 +			<property>
 +				<name>nonoss</name>
 +			</property>
 +		</activation>
 +		<dependencies>
 +			<dependency>
 +				<groupId>org.apache.cloudstack</groupId>
 +				<artifactId>cloud-plugin-network-f5</artifactId>
 +				<version>${project.version}</version>
 +			</dependency>
 +		</dependencies>
 +	</profile>
 +	<profile>
 +		<id>netscaler</id>
 +		<activation>
 +			<property>
 +				<name>nonoss</name>
 +			</property>
 +		</activation>
 +		<dependencies>
 +			<dependency>
 +				<groupId>org.apache.cloudstack</groupId>
 +				<artifactId>cloud-plugin-network-netscaler</artifactId>
 +				<version>${project.version}</version>
 +			</dependency>
 +		</dependencies>
 +	</profile>
 +	<profile>
 +		<id>srx</id>
 +		<activation>
 +			<property>
 +				<name>nonoss</name>
 +			</property>
 +		</activation>
 +		<dependencies>
 +			<dependency>
 +				<groupId>org.apache.cloudstack</groupId>
 +				<artifactId>cloud-plugin-network-srx</artifactId>
 +				<version>${project.version}</version>
 +			</dependency>
 +		</dependencies>
 +	</profile>
 +	<profile>
 +		<id>vmware</id>
 +		<activation>
 +			<property>
 +				<name>nonoss</name>
 +			</property>
 +		</activation>
 +		<dependencies>
 +			<dependency>
 +				<groupId>org.apache.cloudstack</groupId>
 +				<artifactId>cloud-plugin-hypervisor-vmware</artifactId>
 +				<version>${project.version}</version>
 +			</dependency>
 +            <dependency>
 +                <groupId>org.apache.cloudstack</groupId>
 +                <artifactId>cloud-vmware-base</artifactId>
 +                <version>${project.version}</version>
 +            </dependency>
 +		</dependencies>
 +	</profile>
 +  </profiles>  
  </project>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/console-proxy/pom.xml
----------------------------------------------------------------------
diff --cc console-proxy/pom.xml
index d3f983e,2526503..929eb00
--- a/console-proxy/pom.xml
+++ b/console-proxy/pom.xml
@@@ -54,20 -49,10 +49,11 @@@
      </dependency>
      <dependency>
        <groupId>org.apache.cloudstack</groupId>
-       <artifactId>cloud-api</artifactId>
-       <version>${project.version}</version>
-     </dependency>
-     <dependency>
-       <groupId>org.apache.cloudstack</groupId>
-       <artifactId>cloud-utils</artifactId>
-       <version>${project.version}</version>
-     </dependency>
-     <!-- dependency>
-       <groupId>org.apache.cloudstack</groupId>
        <artifactId>cloud-patches</artifactId>
        <version>${project.version}</version>
+       <type>pom</type>
      </dependency>
 +    -->
    </dependencies>
    <build>
      <defaultGoal>install</defaultGoal>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/core/src/com/cloud/storage/SnapshotVO.java
----------------------------------------------------------------------
diff --cc core/src/com/cloud/storage/SnapshotVO.java
index 75f9657,e5e3650..8ed6a5a
--- a/core/src/com/cloud/storage/SnapshotVO.java
+++ b/core/src/com/cloud/storage/SnapshotVO.java
@@@ -289,6 -291,15 +293,15 @@@ public class SnapshotVO implements Snap
      }
  
      public void setUuid(String uuid) {
 -    	this.uuid = uuid;
 +        this.uuid = uuid;
      }
+ 
+     public Long getS3Id() {
+         return s3Id;
+     }
+ 
+     public void setS3Id(Long s3Id) {
+         this.s3Id = s3Id;
+     }
+ 
  }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/core/src/com/cloud/storage/StoragePoolVO.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/core/src/com/cloud/storage/VolumeVO.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/core/src/com/cloud/vm/VMInstanceVO.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/developer/pom.xml
----------------------------------------------------------------------
diff --cc developer/pom.xml
index c4d77f7,684eb0c..4ebb903
--- a/developer/pom.xml
+++ b/developer/pom.xml
@@@ -424,11 -234,11 +425,13 @@@
                    <username>root</username>
                    <password>${db.root.password}</password>
                    <url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}</url>
--                  <sqlCommand>drop database if exists `cloudbridge`</sqlCommand>
++                  <sqlCommand>GRANT ALL ON cloud_usage.* to
++                    ${db.cloud.username}@`localhost` identified by
++                    '${db.cloud.password}';</sqlCommand>
                  </configuration>
                </execution>
                <execution>
--                <id>create-database-cloudbridge</id>
++                <id>grant-user-cloud-usage-all</id>
                  <phase>process-test-resources</phase>
                  <goals>
                    <goal>execute</goal>
@@@ -437,7 -247,7 +440,9 @@@
                    <username>root</username>
                    <password>${db.root.password}</password>
                    <url>jdbc:mysql://${db.cloud.host}:${db.cloud.port}</url>
--                  <sqlCommand>create database `cloudbridge`</sqlCommand>
++                  <sqlCommand>GRANT ALL ON cloud_usage.* to
++                    ${db.cloud.username}@`%` identified by
++                    '${db.cloud.password}';</sqlCommand>
                  </configuration>
                </execution>
                <execution>
@@@ -470,10 -280,170 +475,170 @@@
                      '${db.cloud.password}';</sqlCommand>
                  </configuration>
                </execution>
+               <execution>
+                 <id>create-schema</id>
+                 <phase>process-test-resources</phase>
+                 <goals>
+                   <goal>execute</goal>
+                 </goals>
+                 <configuration>
+                   <srcFiles>
+                     <srcFile>${basedir}/target/db/create-schema.sql</srcFile>
+                     <srcFile>${basedir}/target/db/create-schema-view.sql</srcFile>
+                     <srcFile>${basedir}/target/db/create-schema-premium.sql</srcFile>
+                     <srcFile>${basedir}/target/db/templates.sql</srcFile>
+                     <srcFile>${basedir}/target/db/create-index-fk.sql</srcFile>
+                     <srcFile>${basedir}/target/db/cloudbridge_schema.sql</srcFile>
+                     <srcFile>${basedir}/target/db/cloudbridge_multipart.sql</srcFile>
+                     <srcFile>${basedir}/target/db/cloudbridge_index.sql</srcFile>
+                     <srcFile>${basedir}/target/db/cloudbridge_multipart_alter.sql</srcFile>
+                     <srcFile>${basedir}/target/db/cloudbridge_bucketpolicy.sql</srcFile>
+                     <srcFile>${basedir}/target/db/cloudbridge_policy_alter.sql</srcFile>
+                     <srcFile>${basedir}/target/db/cloudbridge_offering.sql</srcFile>
+                     <srcFile>${basedir}/target/db/cloudbridge_offering_alter.sql</srcFile>
+                   </srcFiles>
+                 </configuration>
+               </execution>
+               <execution>
+                 <id>prefill-developer-schema</id>
+                 <phase>process-test-resources</phase>
+                 <goals>
+                   <goal>execute</goal>
+                 </goals>
+                 <configuration>
+                   <autocommit>true</autocommit>
+                     <srcFiles>
+                         <srcFile>${basedir}/developer-prefill.sql</srcFile>
+                     </srcFiles>
+                 </configuration>
+               </execution>
+             </executions>
+           </plugin>
+         </plugins>
+       </build>
+     </profile>
+ 
+       <!-- Simulator profile -->
+       <profile>
+           <id>simulator</id>
+           <activation>
+               <property><name>deploydb-simulator</name></property>
+           </activation>
+           <build>
+               <plugins>
+                   <plugin>
+                       <groupId>org.codehaus.mojo</groupId>
+                       <artifactId>properties-maven-plugin</artifactId>
+                       <version>1.0-alpha-2</version>
+                       <executions>
+                           <execution>
+                               <phase>initialize</phase>
+                               <goals>
+                                   <goal>read-project-properties</goal>
+                               </goals>
+                               <configuration>
+                                   <files>
+                                       <file>${project.parent.basedir}/utils/conf/db.properties</file>
+                                       <file>${project.parent.basedir}/utils/conf/db.properties.override</file>
+                                   </files>
+                                   <quiet>true</quiet>
+                               </configuration>
+                           </execution>
+                       </executions>
+                   </plugin>
+                   <plugin>
+                       <groupId>org.codehaus.mojo</groupId>
+                       <artifactId>sql-maven-plugin</artifactId>
+                       <version>1.5</version>
+                       <dependencies>
+                           <dependency>
+                               <groupId>mysql</groupId>
+                               <artifactId>mysql-connector-java</artifactId>
+                               <version>${cs.mysql.version}</version>
+                           </dependency>
+                       </dependencies>
+                       <configuration>
+                           <driver>org.gjt.mm.mysql.Driver</driver>
+                           <url>jdbc:mysql://${db.simulator.host}:3306/simulator</url>
+                           <username>${db.simulator.username}</username>
+                           <password>${db.simulator.password}</password>
+                           <skip>${maven.test.skip}</skip>
+                           <forceMojoExecution>true</forceMojoExecution>
+                       </configuration>
+                       <executions>
 -                          <execution>
++              <execution>
+                               <id>drop-database</id>
 -                              <phase>process-test-resources</phase>
 -                              <goals>
 -                                  <goal>execute</goal>
 -                              </goals>
 -                              <configuration>
 -                                  <username>root</username>
 -                                  <password>${db.root.password}</password>
++                <phase>process-test-resources</phase>
++                <goals>
++                  <goal>execute</goal>
++                </goals>
++                <configuration>
++                  <username>root</username>
++                  <password>${db.root.password}</password>
+                                   <url>jdbc:mysql://${db.simulator.host}:3306</url>
+                                   <sqlCommand>drop database if exists `simulator`</sqlCommand>
+                               </configuration>
+                           </execution>
+                           <execution>
+                               <id>create-database</id>
 -                              <phase>process-test-resources</phase>
 -                              <goals>
 -                                  <goal>execute</goal>
 -                              </goals>
 -                              <configuration>
 -                                  <username>root</username>
 -                                  <password>${db.root.password}</password>
++                <phase>process-test-resources</phase>
++                <goals>
++                  <goal>execute</goal>
++                </goals>
++                <configuration>
++                  <username>root</username>
++                  <password>${db.root.password}</password>
+                                   <url>jdbc:mysql://${db.simulator.host}:3306</url>
+                                   <sqlCommand>create database `simulator`</sqlCommand>
+                               </configuration>
+                           </execution>
+                           <execution>
+                               <id>grant-user-cloud</id>
+                               <phase>process-test-resources</phase>
+                               <goals>
+                                   <goal>execute</goal>
+                               </goals>
+                               <configuration>
+                                   <username>root</username>
+                                   <password>${db.root.password}</password>
+                                   <url>jdbc:mysql://${db.simulator.host}:3306</url>
+                                   <sqlCommand>GRANT ALL ON simulator.* to
+                                       ${db.simulator.username}@`localhost` identified by
+                                       '${db.simulator.password}';</sqlCommand>
+                               </configuration>
+                           </execution>
+                           <execution>
+                               <id>grant-user-cloud-all</id>
+                               <phase>process-test-resources</phase>
+                               <goals>
+                                   <goal>execute</goal>
+                               </goals>
+                               <configuration>
+                                   <username>root</username>
+                                   <password>${db.root.password}</password>
+                                   <url>jdbc:mysql://${db.simulator.host}:3306</url>
+                                   <sqlCommand>GRANT ALL ON simulator.* to
+                                       ${db.simulator.username}@`%` identified by
+                                       '${db.simulator.password}';</sqlCommand>
+                               </configuration>
+                           </execution>
+                           <execution>
+                               <id>create-schema</id>
+                               <phase>process-test-resources</phase>
+                               <goals>
+                                   <goal>execute</goal>
+                               </goals>
+                               <configuration>
+                                   <srcFiles>
+                                       <srcFile>${basedir}/target/db/create-schema-simulator.sql</srcFile>
+                                       <srcFile>${basedir}/target/db/templates.simulator.sql</srcFile>
+                                   </srcFiles>
 -                              </configuration>
 -                          </execution>
 -                      </executions>
 -                  </plugin>
 -              </plugins>
 -          </build>
++                </configuration>
++              </execution>
 +            </executions>
 +          </plugin>
 +        </plugins>
 +      </build>
      </profile>
    </profiles>
  </project>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/docs/en-US/about-clusters.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/docs/en-US/about-hosts.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/docs/en-US/about-virtual-networks.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/docs/en-US/accounts.xml
----------------------------------------------------------------------
diff --cc docs/en-US/accounts.xml
index 08404c8,e505686..aa62f68
--- a/docs/en-US/accounts.xml
+++ b/docs/en-US/accounts.xml
@@@ -5,24 -5,23 +5,23 @@@
  ]>
  
  <!-- 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.
  -->
  
- <<<<<<< HEAD
  <chapter id="accounts">
      <title>Accounts</title>
      <xi:include href="accounts-users-domains.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/docs/en-US/alerts.xml
----------------------------------------------------------------------
diff --cc docs/en-US/alerts.xml
index 9f926cf,b7f34d0..ebea4b8
--- a/docs/en-US/alerts.xml
+++ b/docs/en-US/alerts.xml
@@@ -3,53 -3,51 +3,51 @@@
  <!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.
  -->
  
  <appendix id="alerts">
 -    <title>Alerts</title>
 -        <para>The following is the list of alert type numbers. The current alerts can be found by calling listAlerts.</para>
 -        <programlisting>MEMORY = 0</programlisting>
 -        <programlisting>CPU = 1</programlisting>
 -        <programlisting>STORAGE =2</programlisting>
 -        <programlisting>STORAGE_ALLOCATED = 3</programlisting>
 -        <programlisting>PUBLIC_IP = 4</programlisting>
 -        <programlisting>PRIVATE_IP = 5</programlisting>
 -        <programlisting>HOST = 6</programlisting>
 -        <programlisting>USERVM = 7</programlisting>
 -        <programlisting>DOMAIN_ROUTER = 8</programlisting>
 -        <programlisting>CONSOLE_PROXY = 9</programlisting>
 -        <programlisting>ROUTING = 10// lost connection to default route (to the gateway)</programlisting>
 -        <programlisting>STORAGE_MISC = 11 // lost connection to default route (to the gateway)</programlisting>
 -        <programlisting>USAGE_SERVER = 12 // lost connection to default route (to the gateway)</programlisting>
 -        <programlisting>MANAGMENT_NODE = 13 // lost connection to default route (to the gateway)</programlisting>
 -        <programlisting>DOMAIN_ROUTER_MIGRATE = 14</programlisting>
 -        <programlisting>CONSOLE_PROXY_MIGRATE = 15</programlisting>
 -        <programlisting>USERVM_MIGRATE = 16</programlisting>
 -        <programlisting>VLAN = 17</programlisting>
 -        <programlisting>SSVM = 18</programlisting>
 -        <programlisting>USAGE_SERVER_RESULT = 19</programlisting>
 -        <programlisting>STORAGE_DELETE = 20;</programlisting>
 -        <programlisting>UPDATE_RESOURCE_COUNT = 21; //Generated when we fail to update the resource count</programlisting>
 -        <programlisting>USAGE_SANITY_RESULT = 22;</programlisting>
 -        <programlisting>DIRECT_ATTACHED_PUBLIC_IP = 23;</programlisting>
 -        <programlisting>LOCAL_STORAGE = 24;</programlisting>
 -        <programlisting>RESOURCE_LIMIT_EXCEEDED = 25; //Generated when the resource limit exceeds the limit. Currently used for recurring snapshots only</programlisting>
 -</appendix>
 +		<title>Alerts</title>
 +		<para>The following is the list of alert type numbers. The current alerts can be found by calling listAlerts.</para>
 +		<programlisting>MEMORY = 0</programlisting>
 +		<programlisting>CPU = 1</programlisting>
 +		<programlisting>STORAGE =2</programlisting>
 +		<programlisting>STORAGE_ALLOCATED = 3</programlisting>
 +		<programlisting>PUBLIC_IP = 4</programlisting>
 +		<programlisting>PRIVATE_IP = 5</programlisting>
 +		<programlisting>HOST = 6</programlisting>
 +		<programlisting>USERVM = 7</programlisting>
 +		<programlisting>DOMAIN_ROUTER = 8</programlisting>
 +		<programlisting>CONSOLE_PROXY = 9</programlisting>
 +		<programlisting>ROUTING = 10// lost connection to default route (to the gateway)</programlisting>
 +		<programlisting>STORAGE_MISC = 11 // lost connection to default route (to the gateway)</programlisting>
 +		<programlisting>USAGE_SERVER = 12 // lost connection to default route (to the gateway)</programlisting>
 +		<programlisting>MANAGMENT_NODE = 13 // lost connection to default route (to the gateway)</programlisting>
 +		<programlisting>DOMAIN_ROUTER_MIGRATE = 14</programlisting>
 +		<programlisting>CONSOLE_PROXY_MIGRATE = 15</programlisting>
 +		<programlisting>USERVM_MIGRATE = 16</programlisting>
 +		<programlisting>VLAN = 17</programlisting>
 +		<programlisting>SSVM = 18</programlisting>
 +		<programlisting>USAGE_SERVER_RESULT = 19</programlisting>
 +		<programlisting>STORAGE_DELETE = 20;</programlisting>
 +		<programlisting>UPDATE_RESOURCE_COUNT = 21; //Generated when we fail to update the resource count</programlisting>
 +		<programlisting>USAGE_SANITY_RESULT = 22;</programlisting>
 +		<programlisting>DIRECT_ATTACHED_PUBLIC_IP = 23;</programlisting>
 +		<programlisting>LOCAL_STORAGE = 24;</programlisting>
 +		<programlisting>RESOURCE_LIMIT_EXCEEDED = 25; //Generated when the resource limit exceeds the limit. Currently used for recurring snapshots only</programlisting>
- 	</appendix>
- 
++</appendix>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/docs/en-US/api-calls.xml
----------------------------------------------------------------------
diff --cc docs/en-US/api-calls.xml
index 0000000,1fe6f02..3b97893
mode 000000,100644..100644
--- a/docs/en-US/api-calls.xml
+++ b/docs/en-US/api-calls.xml
@@@ -1,0 -1,32 +1,32 @@@
+ <?xml version='1.0' encoding='utf-8' ?>
+ <!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;
+ ]>
+ 
+ <!-- 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.
+ -->
+ 
+ <chapter id="api-calls">
+     <title>Calling the &PRODUCT; API</title>
+     <xi:include href="making-api-request.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+     <xi:include href="enabling-api-call-expiration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+     <xi:include href="signing-api-requests.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+     <xi:include href="responses.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+     <xi:include href="asynchronous-commands.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </chapter>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/docs/en-US/basic-zone-configuration.xml
----------------------------------------------------------------------
diff --cc docs/en-US/basic-zone-configuration.xml
index 2b37f80,e0c67d8..eb8b506
--- a/docs/en-US/basic-zone-configuration.xml
+++ b/docs/en-US/basic-zone-configuration.xml
@@@ -65,9 -66,8 +65,8 @@@
          <listitem><para>Choose which traffic types will be carried by the physical network.</para>
              <para>The traffic types are management, public, guest, and storage traffic. For more information about the types, roll over the icons to display their tool tips, or see Basic Zone Network Traffic Types. This screen starts out with some traffic types already assigned. To add more, drag and drop traffic types onto the network. You can also change the network name if desired.</para>
          </listitem>
 -        <listitem><para>(Introduced in version 3.0.1) Assign a network traffic label to each traffic type on the physical network. These labels must match the labels you have already defined on the hypervisor host. To assign each label, click the Edit button under the traffic type icon. A popup dialog appears where you can type the label, then click OK.</para>
 +        <listitem><para>3.	(Introduced in version 3.0.1) Assign a network traffic label to each traffic type on the physical network. These labels must match the labels you have already defined on the hypervisor host. To assign each label, click the Edit button under the traffic type icon. A popup dialog appears where you can type the label, then click OK.</para>
              <para>These traffic labels will be defined only for the hypervisor selected for the first cluster. For all other hypervisors, the labels can be configured after the zone is created.</para>
-             <para>(VMware only) If you have enabled Nexus dvSwitch in the environment, you must specify the corresponding Ethernet port profile names as network traffic label for each traffic type on the physical network. For more information on Nexus dvSwitch, see Configuring a vSphere Cluster with Nexus 1000v Virtual Switch.</para>
          </listitem>
          <listitem><para>Click Next.</para></listitem>
          <listitem><para>(NetScaler only) If you chose the network offering for NetScaler, you have an additional screen to fill out. Provide the requested details to set up the NetScaler, then click Next.</para>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/docs/en-US/basic-zone-physical-network-configuration.xml
----------------------------------------------------------------------
diff --cc docs/en-US/basic-zone-physical-network-configuration.xml
index 302c293,32aeb84..4b1d24f
--- a/docs/en-US/basic-zone-physical-network-configuration.xml
+++ b/docs/en-US/basic-zone-physical-network-configuration.xml
@@@ -5,23 -5,25 +5,24 @@@
  ]>
  
  <!-- 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="basic-zone-physical-network-configuration">
 -    <title>Basic Zone Physical Network Configuration</title>
 -    <para>In a basic network, configuring the physical network is fairly straightforward. You only need to configure one guest network to carry traffic that is generated by guest VMs. When you first add a zone to &PRODUCT;, you set up the guest network through the Add Zone screens.</para>
 +	<title>Basic Zone Physical Network Configuration</title>
 +	<para>In a basic network, configuring the physical network is fairly straightforward. You only need to configure one guest network to carry traffic that is generated by guest VMs. When you first add a zone to &PRODUCT;, you set up the guest network through the Add Zone screens.</para>				
- </section>
+                     
+     </section>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/docs/en-US/best-practices-for-vms.xml
----------------------------------------------------------------------
diff --cc docs/en-US/best-practices-for-vms.xml
index 0ccb183,04c3c0a..bba20c6
--- a/docs/en-US/best-practices-for-vms.xml
+++ b/docs/en-US/best-practices-for-vms.xml
@@@ -3,23 -3,22 +3,22 @@@
  <!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="best-practices-vm">

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/docs/en-US/create-template-from-snapshot.xml
----------------------------------------------------------------------
diff --cc docs/en-US/create-template-from-snapshot.xml
index b212adc,80e660f..d968422
--- a/docs/en-US/create-template-from-snapshot.xml
+++ b/docs/en-US/create-template-from-snapshot.xml
@@@ -5,27 -5,25 +5,24 @@@
  ]>
  
  <!-- 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="create-template-from-snapshot">
      <title>Creating a Template from a Snapshot</title>
-     <note><para>Not supported by Oracle VM.</para></note>
-     <para></para>
-     <para>If you do not want to stop the VM to use the Create Template menu item, as described in
-             <xref linkend="create-template-from-existing-vm"/>), you can create a template directly
-         from any snapshot through the &PRODUCT; UI.</para>
+     <!--    <note><para>Not supported by Oracle VM</para></note> -->
+     <para>If you do not want to stop the VM in order to use the Create Template menu item (as described in <xref linkend="create-template-from-existing-vm"/>), you can create a template directly from any snapshot through the &PRODUCT; UI.</para>
  </section>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/docs/en-US/creating-vms.xml
----------------------------------------------------------------------
diff --cc docs/en-US/creating-vms.xml
index beb528f,9da4aea..86d89fd
--- a/docs/en-US/creating-vms.xml
+++ b/docs/en-US/creating-vms.xml
@@@ -3,53 -3,47 +3,53 @@@
  <!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="creating-vms">
 -        <title>Creating VMs</title>
 -        <para>Virtual machines are usually created from a template. Users can also create blank virtual machines. A blank virtual machine is a virtual machine without an OS template. Users can attach an ISO file and install the OS from the CD/DVD-ROM.</para>
 -    <para>To create a VM from a template:</para>
 -        <orderedlist>
 -            <listitem><para>Log in to the &PRODUCT; UI as an administrator or user.</para></listitem>
 -            <listitem><para>In the left navigation bar, click Instances.</para></listitem>
 -            <listitem><para>Click Add Instance.</para></listitem>
 -            <listitem><para>Select a template, then follow the steps in the wizard. (For more information about how the templates came to be in this list, see Working with Templates.</para></listitem>
 -            <listitem><para>Be sure that the hardware you have allows starting the selected service offering.</para></listitem>
 -            <listitem><para>Click Submit and your VM will be created and started.</para>
 -                <note><para>For security reason, the internal name of the VM is visible only to the root admin.</para></note></listitem>
 -        </orderedlist>
 -        <note><para>Starting with v3.0.3, you can create a VM without starting it. You can determine whether the VM needs to be started as part of the VM deployment.  A new request parameter, startVM, is introduced in the deployVm API to support this feature.  For more information, see the Developer's Guide</para></note>
 -        <para>To create a VM from an ISO:</para>
 -        <note><para>(XenServer) Windows VMs running on XenServer require PV drivers, which may be provided in the template or added after the VM is created. The PV drivers are necessary for essential management functions such as mounting additional volumes and ISO images, live migration, and graceful shutdown.</para></note>
 -    <orderedlist>
 -        <listitem><para>Log in to the &PRODUCT; UI as an administrator or user.</para></listitem>
 -        <listitem><para>In the left navigation bar, click Instances.</para></listitem>
 -        <listitem><para>Click Add Instance.</para></listitem>
 -        <listitem><para>Select ISO Boot, and follow the steps in the wizard.</para></listitem>
 -        <listitem><para>Click Submit and your VM will be created and started.</para></listitem>
 +		<title>Creating VMs</title>
 +		<para>Virtual machines are usually created from a template. Users can also create blank virtual machines. A blank virtual machine is a virtual machine without an OS template. Users can attach an ISO file and install the OS from the CD/DVD-ROM.</para>
 +	<note><para>Starting with v3.0.3, you can create a VM without starting it. You can determine whether the VM needs to be started as part of the VM deployment.  A new request parameter, startVM, is introduced in the deployVm API to support this feature.  For more information, see the Developer's Guide</para></note>	
 +	<para>To create a VM from a template:</para>
 +		<orderedlist>
 +			<listitem><para>Log in to the &PRODUCT; UI as an administrator or user.</para></listitem>
 +			<listitem><para>In the left navigation bar, click Instances.</para></listitem>
 +			<listitem>
 +			<para>Click Add Instance.</para>
 +		</listitem>
 +		<listitem>
 +			<para>Select a zone.</para>
 +		</listitem>
 +			<listitem><para>Select a template, then follow the steps in the wizard. For more information about how the templates came to be in this list, see <xref linkend="working-with-templates"/>.</para></listitem>
 +			<listitem><para>Be sure that the hardware you have allows starting the selected service offering.</para></listitem>
 +			<listitem><para>Click Submit and your VM will be created and started.</para>
 +			<note><para>For security reason, the internal name of the VM is visible only to the root admin.</para></note>
 +			</listitem>
 +		</orderedlist>
 +		<para>To create a VM from an ISO:</para>
 +		<note><para>(XenServer) Windows VMs running on XenServer require PV drivers, which may be provided in the template or added after the VM is created. The PV drivers are necessary for essential management functions such as mounting additional volumes and ISO images, live migration, and graceful shutdown.</para></note>
 +	<orderedlist>
 +		<listitem><para>Log in to the &PRODUCT; UI as an administrator or user.</para></listitem>
 +		<listitem><para>In the left navigation bar, click Instances.</para></listitem>
 +		<listitem><para>Click Add Instance.</para></listitem>
 +		<listitem><para>Select a zone.</para></listitem>
 +		<listitem><para>Select ISO Boot, and follow the steps in the wizard.</para></listitem>
 +		<listitem><para>Click Submit and your VM will be created and started.</para></listitem>
- 		<listitem><para>(Oracle VM only) After ISO installation, the installer reboots into the operating system. Due to a known issue in OVM, the reboot will place the VM in the Stopped state. In the &PRODUCT; UI, detach the ISO from the VM (so that the VM will not boot from the ISO again), then click the Start button to restart the VM.</para></listitem>
+         <!-- <listitem><para>(Oracle VM only) After ISO installation, the installer reboots into the operating system. Due to a known issue in OVM, the reboot will place the VM in the Stopped state. In the &PRODUCT; UI, detach the ISO from the VM (so that the VM will not boot from the ISO again), then click the Start button to restart the VM.</para></listitem> -->
 -    </orderedlist>
 +	</orderedlist>
  </section>
 +

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/30f2565d/docs/en-US/deployment-architecture-overview.xml
----------------------------------------------------------------------
diff --cc docs/en-US/deployment-architecture-overview.xml
index 1df0a52,2c5f30e..fba36eb
--- a/docs/en-US/deployment-architecture-overview.xml
+++ b/docs/en-US/deployment-architecture-overview.xml
@@@ -5,39 -5,53 +5,52 @@@
  ]>
  
  <!-- 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="deployment-architecture-overview">
 -    <title>Deployment Architecture Overview</title>
 -    <para>
 +	<title>Deployment Architecture Overview</title>
 +	<para>
- 		A &PRODUCT; installation consists of two parts: the Management Server and the cloud infrastructure that it manages. When you set up and manage a &PRODUCT; cloud, you provision resources such as hosts, storage devices, and IP addresses into the Management Server, and the Management Server manages those resources.
+         A &PRODUCT; installation consists of two parts: the Management Server
+         and the cloud infrastructure that it manages. When you set up and 
+         manage a &PRODUCT; cloud, you provision resources such as hosts,
+         storage devices, and IP addresses into the Management Server, and
+         the Management Server manages those resources.
 -    </para>
 -    <para>
 +	</para>
 +	<para>
- 		The minimum production installation consists of one machine running the &PRODUCT; Management Server and another machine to act as the cloud infrastructure (in this case, a very simple infrastructure consisting of one host running hypervisor software). In a trial installation, a single machine can act as both the Management Server and the hypervisor host (using the KVM hypervisor).
+         The minimum production installation consists of one machine running
+         the &PRODUCT; Management Server and another machine to act as the
+         cloud infrastructure (in this case, a very simple infrastructure
+         consisting of one host running hypervisor software). In its smallest 
+         deployment, a single machine can act as both the Management Server
+         and the hypervisor host (using the KVM hypervisor).
 -    </para>
 -    <mediaobject>
 -        <imageobject>
 -            <imagedata fileref="./images/basic-deployment.png" />
 -        </imageobject>
 -        <textobject><phrase>basic-deployment.png: Basic two-machine deployment</phrase></textobject>
 -    </mediaobject>
 +	</para>
 +	<mediaobject>
 +		<imageobject>
 +			<imagedata fileref="./images/basic-deployment.png" />
 +		</imageobject>
 +		<textobject><phrase>basic-deployment.png: Basic two-machine deployment</phrase></textobject>
 +	</mediaobject>
- 	<para>A more full-featured installation consists of a highly-available multi-node Management Server installation and up to thousands of hosts using any of several advanced networking setups. For information about deployment options, see Choosing a Deployment Architecture.
+     <para>
+        A more full-featured installation consists of a highly-available
+        multi-node Management Server installation and up to tens of thousands of
+        hosts using any of several advanced networking setups. For 
+        information about deployment options, see Choosing a Deployment Architecture.
 -    </para>
 -    <xi:include href="management-server-overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 -    <xi:include href="cloud-infrastructure-overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 -    <xi:include href="networking-overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 +	</para>
 +	<xi:include href="management-server-overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 +	<xi:include href="cloud-infrastructure-overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 +	<xi:include href="networking-overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
  </section>