cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [50/50] [abbrv] git commit: updated refs/heads/rbac to 3b58a45
Date Fri, 07 Feb 2014 21:46:59 GMT
Merge branch 'master' into rbac.



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

Branch: refs/heads/rbac
Commit: 3b58a45e049c3341c7b54f9d09bff5f7088c9425
Parents: c440d90 3384633
Author: Min Chen <min.chen@citrix.com>
Authored: Fri Feb 7 13:43:36 2014 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Fri Feb 7 13:43:36 2014 -0800

----------------------------------------------------------------------
 api/src/com/cloud/event/EventTypes.java         |    6 +
 .../com/cloud/network/MonitoringService.java    |    2 +-
 api/src/com/cloud/network/NetworkService.java   |    4 +-
 .../cloud/network/firewall/FirewallService.java |    2 +
 .../com/cloud/network/rules/RulesService.java   |    2 +
 .../cloud/network/vpc/NetworkACLService.java    |    5 +-
 api/src/com/cloud/network/vpc/VpcService.java   |    3 +-
 .../network/vpn/RemoteAccessVpnService.java     |    5 +
 .../cloud/network/vpn/Site2SiteVpnService.java  |    4 +
 api/src/com/cloud/storage/Storage.java          |    5 +-
 .../cloudstack/api/BaseAsyncCustomIdCmd.java    |    7 +-
 api/src/org/apache/cloudstack/api/BaseCmd.java  |    6 +-
 .../apache/cloudstack/api/BaseCustomIdCmd.java  |    7 +-
 .../admin/network/UpdateNetworkCmdByAdmin.java  |    2 +-
 .../command/admin/vpc/UpdateVPCCmdByAdmin.java  |    2 +-
 .../command/user/address/UpdateIPAddrCmd.java   |  124 +
 .../autoscale/UpdateAutoScaleVmGroupCmd.java    |   13 +-
 .../autoscale/UpdateAutoScaleVmProfileCmd.java  |   13 +-
 .../firewall/UpdateEgressFirewallRuleCmd.java   |  113 +
 .../user/firewall/UpdateFirewallRuleCmd.java    |  114 +
 .../firewall/UpdatePortForwardingRuleCmd.java   |   29 +-
 .../UpdateApplicationLoadBalancerCmd.java       |   96 +
 .../loadbalancer/UpdateLoadBalancerRuleCmd.java |   14 +-
 .../user/network/UpdateNetworkACLItemCmd.java   |   16 +-
 .../user/network/UpdateNetworkACLListCmd.java   |   91 +
 .../command/user/network/UpdateNetworkCmd.java  |   14 +-
 .../api/command/user/vm/UpdateVMCmd.java        |    8 +
 .../command/user/volume/UpdateVolumeCmd.java    |    9 +
 .../api/command/user/vpc/UpdateVPCCmd.java      |   14 +-
 .../user/vpn/UpdateRemoteAccessVpnCmd.java      |  102 +
 .../user/vpn/UpdateVpnConnectionCmd.java        |   90 +
 .../command/user/vpn/UpdateVpnGatewayCmd.java   |   89 +
 .../Site2SiteVpnConnectionResponse.java         |    5 +-
 .../lb/ApplicationLoadBalancerService.java      |    2 +
 client/pom.xml                                  |   25 +-
 client/tomcatconf/commands.properties.in        |    9 +
 .../api/storage/StorageCacheManager.java        |    2 +
 .../cloud/network/vpc/NetworkACLManager.java    |    3 +-
 .../com/cloud/agent/manager/AgentAttache.java   |    2 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java |    2 +-
 .../orchestration/NetworkOrchestrator.java      |   19 +-
 .../cloud/network/as/AutoScaleVmGroupVO.java    |    4 +
 .../cloud/network/as/AutoScaleVmProfileVO.java  |    9 +-
 .../network/dao/MonitoringServiceDaoImpl.java   |    4 +-
 .../cloud/network/dao/MonitoringServiceVO.java  |   22 +-
 .../cloud/network/dao/RemoteAccessVpnVO.java    |    4 +
 .../network/dao/Site2SiteVpnConnectionVO.java   |    4 +
 .../network/dao/Site2SiteVpnGatewayVO.java      |    4 +
 .../com/cloud/network/vpc/NetworkACLItemVO.java |    4 +
 .../src/com/cloud/network/vpc/NetworkACLVO.java |    3 +
 .../schema/src/com/cloud/network/vpc/VpcVO.java |   13 +-
 .../resourcedetail/ResourceDetailsDaoBase.java  |    5 +-
 .../storage/datastore/db/ImageStoreVO.java      |   10 +-
 .../storage/datastore/db/StoragePoolVO.java     |   15 +-
 .../cache/allocator/StorageCacheAllocator.java  |    3 +
 .../allocator/StorageCacheRandomAllocator.java  |   38 +
 .../cache/manager/StorageCacheManagerImpl.java  |   13 +
 .../motion/AncientDataMotionStrategy.java       |    4 +-
 .../storage/test/ChildTestConfiguration.java    |    6 -
 .../storage/snapshot/SnapshotObject.java        |    3 +
 .../storage/snapshot/SnapshotServiceImpl.java   |    8 +-
 .../snapshot/XenserverSnapshotStrategy.java     |    5 +
 .../endpoint/DefaultEndPointSelector.java       |    3 +-
 .../storage/image/format/ImageFormatHelper.java |    2 +-
 .../datastore/PrimaryDataStoreHelper.java       |    2 +-
 .../storage/datastore/PrimaryDataStoreImpl.java |    5 +-
 .../HypervResource/CloudStackTypes.cs           |    8 +-
 .../HypervResource/HypervResourceController.cs  |    8 +-
 .../ServerResource/HypervResource/WmiCallsV2.cs |    8 +-
 .../kvm/resource/LibvirtComputingResource.java  |   56 +-
 .../kvm/resource/LibvirtDomainXMLParser.java    |    4 +-
 .../hypervisor/kvm/resource/LibvirtVMDef.java   |   16 +
 .../kvm/storage/KVMStorageProcessor.java        |    2 +
 .../kvm/storage/LibvirtStorageAdaptor.java      |    6 +
 .../resource/LibvirtDomainXMLParserTest.java    |  194 ++
 .../com/cloud/hypervisor/guru/VMwareGuru.java   |   36 +-
 .../vmware/manager/VmwareManagerImpl.java       |   94 +-
 .../resource/VmwareStorageProcessor.java        |    6 +
 .../VmwareStorageSubsystemCommandHandler.java   |   51 +-
 .../vmware/VmwareDatacenterApiUnitTest.java     |    6 -
 .../xen/resource/CitrixResourceBase.java        |    7 +-
 .../contrail/management/ContrailGuru.java       |   42 +-
 .../management/ContrailManagerImpl.java         |    6 +-
 .../IntegrationTestConfiguration.java           |    6 -
 plugins/network-elements/netscaler/pom.xml      |    8 +-
 .../network/resource/NetscalerResource.java     |  149 +-
 .../cloudstack/network/element/SspClient.java   |  110 +-
 .../network/element/SspClientTest.java          |   20 +-
 plugins/pom.xml                                 |   12 +-
 ...CloudStackPrimaryDataStoreLifeCycleImpl.java |    8 +-
 pom.xml                                         |    6 +-
 .../spring-server-core-managers-context.xml     |    6 -
 server/src/com/cloud/api/ApiDispatcher.java     |   12 +-
 .../com/cloud/api/query/vo/UserVmJoinVO.java    |   23 +-
 .../configuration/ConfigurationManagerImpl.java |   41 +-
 .../com/cloud/consoleproxy/AgentHookBase.java   |    5 +-
 .../ConsoleProxyBalanceAllocator.java           |    3 -
 .../consoleproxy/StaticConsoleProxyManager.java |   18 -
 .../src/com/cloud/dc/DedicatedResourceVO.java   |   10 +-
 .../com/cloud/network/IpAddressManagerImpl.java |   36 +-
 .../src/com/cloud/network/NetworkModelImpl.java |    7 +-
 .../com/cloud/network/NetworkServiceImpl.java   |   29 +-
 .../cloud/network/as/AutoScaleManagerImpl.java  |   20 +-
 .../network/firewall/FirewallManagerImpl.java   |   31 +-
 .../cloud/network/guru/ControlNetworkGuru.java  |    4 +-
 .../lb/LoadBalancingRulesManagerImpl.java       |   15 +-
 .../VirtualNetworkApplianceManagerImpl.java     | 1587 ++++++------
 .../cloud/network/rules/RulesManagerImpl.java   |   20 +-
 .../network/vpc/NetworkACLManagerImpl.java      |    9 +-
 .../network/vpc/NetworkACLServiceImpl.java      |   22 +-
 .../com/cloud/network/vpc/VpcManagerImpl.java   |   15 +-
 .../network/vpn/RemoteAccessVpnManagerImpl.java |   26 +-
 .../network/vpn/Site2SiteVpnManagerImpl.java    |   42 +-
 .../com/cloud/resource/ResourceManagerImpl.java |   66 +-
 .../PremiumSecondaryStorageManagerImpl.java     |  185 --
 .../cloud/server/ConfigurationServerImpl.java   |  413 +--
 .../com/cloud/server/ManagementServerImpl.java  |   51 +-
 .../com/cloud/storage/VolumeApiServiceImpl.java |  188 +-
 .../storage/download/DownloadMonitorImpl.java   |   29 +-
 .../secondary/SecondaryStorageListener.java     |    5 +-
 .../secondary/SecondaryStorageManagerImpl.java  | 1389 ----------
 .../storage/snapshot/SnapshotManagerImpl.java   |   66 +-
 .../cloud/storage/upload/UploadMonitorImpl.java |   27 +-
 .../com/cloud/template/TemplateManagerImpl.java |  135 +-
 .../src/com/cloud/uuididentity/UUIDManager.java |   37 -
 .../com/cloud/uuididentity/UUIDManagerImpl.java |    1 +
 server/src/com/cloud/vm/UserVmManagerImpl.java  |   15 +-
 .../lb/ApplicationLoadBalancerManagerImpl.java  |   23 +-
 .../cloudstack/network/lb/CertServiceImpl.java  |   14 +-
 .../cloud/network/MockFirewallManagerImpl.java  |    6 +
 .../com/cloud/vpc/MockNetworkManagerImpl.java   |   13 +-
 .../cloud/vpc/MockSite2SiteVpnManagerImpl.java  |   15 +-
 .../com/cloud/vpc/NetworkACLManagerTest.java    |    9 +-
 .../networkoffering/ChildTestConfiguration.java |    6 -
 .../consoleproxy/ConsoleProxyRdpClient.java     |  147 +-
 .../ConsoleProxyThumbnailHandler.java           |    1 +
 services/secondary-storage/controller/pom.xml   |   50 +
 ...econdary-storage-controller-core-context.xml |   33 +
 .../PremiumSecondaryStorageManagerImpl.java     |  186 ++
 .../SecondaryStorageManagerImpl.java            | 1388 ++++++++++
 services/secondary-storage/pom.xml              |   85 +-
 .../module.properties                           |   18 -
 ...ing-secondary-storage-discoverer-context.xml |   36 -
 services/secondary-storage/server/pom.xml       |  105 +
 .../module.properties                           |   18 +
 ...ing-secondary-storage-discoverer-context.xml |   36 +
 .../LocalNfsSecondaryStorageResource.java       |   95 +
 .../resource/LocalSecondaryStorageResource.java |  240 ++
 .../resource/NfsSecondaryStorageResource.java   | 2430 ++++++++++++++++++
 .../resource/SecondaryStorageDiscoverer.java    |  312 +++
 .../resource/SecondaryStorageResource.java      |   29 +
 .../SecondaryStorageResourceHandler.java        |   24 +
 .../storage/template/DownloadManager.java       |  108 +
 .../storage/template/DownloadManagerImpl.java   | 1080 ++++++++
 .../storage/template/UploadManager.java         |   82 +
 .../storage/template/UploadManagerImpl.java     |  550 ++++
 .../LocalNfsSecondaryStorageResourceTest.java   |  143 ++
 .../NfsSecondaryStorageResourceTest.java        |  110 +
 .../LocalNfsSecondaryStorageResource.java       |   95 -
 .../resource/LocalSecondaryStorageResource.java |  240 --
 .../resource/NfsSecondaryStorageResource.java   | 2430 ------------------
 .../resource/SecondaryStorageDiscoverer.java    |  312 ---
 .../resource/SecondaryStorageResource.java      |   29 -
 .../SecondaryStorageResourceHandler.java        |   24 -
 .../storage/template/DownloadManager.java       |  108 -
 .../storage/template/DownloadManagerImpl.java   | 1080 --------
 .../storage/template/UploadManager.java         |   82 -
 .../storage/template/UploadManagerImpl.java     |  550 ----
 .../LocalNfsSecondaryStorageResourceTest.java   |  143 --
 .../NfsSecondaryStorageResourceTest.java        |  110 -
 setup/db/create-schema.sql                      |    2 +-
 .../patches/debian/config/etc/dnsmasq.conf.tmpl |    2 +-
 .../patches/debian/config/etc/vpcdnsmasq.conf   |    2 +-
 .../definitions/systemvm64template/base.sh      |    6 +-
 .../systemvm64template/definition.rb            |    6 +-
 .../systemvm64template/postinstall.sh           |   14 +-
 .../definitions/systemvmtemplate/base.sh        |    4 +-
 .../definitions/systemvmtemplate/definition.rb  |    6 +-
 .../definitions/systemvmtemplate/postinstall.sh |   10 +-
 ui/scripts/configuration.js                     |   12 +-
 ui/scripts/instances.js                         |    2 +-
 ui/scripts/system.js                            |   33 +-
 ui/scripts/ui/widgets/detailView.js             |    3 +-
 utils/src/com/cloud/utils/UriUtils.java         |   60 +
 utils/src/com/cloud/utils/db/UUIDManager.java   |   37 +
 utils/src/com/cloud/utils/net/Ip.java           |    2 +-
 utils/test/com/cloud/utils/net/IpTest.java      |   43 +
 187 files changed, 10508 insertions(+), 9061 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/api/src/com/cloud/event/EventTypes.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/api/src/org/apache/cloudstack/api/BaseCmd.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkCmdByAdmin.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkCmdByAdmin.java
index cab88d4,0000000..644a0fa
mode 100644,000000..100644
--- a/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkCmdByAdmin.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkCmdByAdmin.java
@@@ -1,63 -1,0 +1,63 @@@
 +// 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.command.admin.network;
 +
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.api.APICommand;
 +import org.apache.cloudstack.api.ApiErrorCode;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
 +import org.apache.cloudstack.api.ServerApiException;
 +import org.apache.cloudstack.api.command.user.network.UpdateNetworkCmd;
 +import org.apache.cloudstack.api.response.NetworkResponse;
 +import org.apache.cloudstack.context.CallContext;
 +
 +import com.cloud.exception.ConcurrentOperationException;
 +import com.cloud.exception.InsufficientCapacityException;
 +import com.cloud.exception.InvalidParameterValueException;
 +import com.cloud.network.Network;
 +import com.cloud.user.Account;
 +import com.cloud.user.User;
 +
 +@APICommand(name = "updateNetwork", description = "Updates a network", responseObject = NetworkResponse.class, responseView = ResponseView.Full)
 +public class UpdateNetworkCmdByAdmin extends UpdateNetworkCmd {
 +    public static final Logger s_logger = Logger.getLogger(UpdateNetworkCmdByAdmin.class.getName());
 +
 +
 +    @Override
 +    public void execute() throws InsufficientCapacityException, ConcurrentOperationException{
 +        User callerUser = _accountService.getActiveUser(CallContext.current().getCallingUserId());
 +        Account callerAccount = _accountService.getActiveAccountById(callerUser.getAccountId());
 +        Network network = _networkService.getNetwork(id);
 +        if (network == null) {
 +            throw new InvalidParameterValueException("Couldn't find network by id");
 +        }
 +
 +        Network result = _networkService.updateGuestNetwork(getId(), getNetworkName(), getDisplayText(), callerAccount,
-                     callerUser, getNetworkDomain(), getNetworkOfferingId(), getChangeCidr(), getGuestVmCidr(), getDisplayNetwork());
++                callerUser, getNetworkDomain(), getNetworkOfferingId(), getChangeCidr(), getGuestVmCidr(), getDisplayNetwork(), getCustomId());
 +
 +
 +        if (result != null) {
 +            NetworkResponse response = _responseGenerator.createNetworkResponse(ResponseView.Full, result);
 +            response.setResponseName(getCommandName());
 +            setResponseObject(response);
 +        } else {
 +            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update network");
 +        }
 +    }
 +
 +}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/api/src/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCCmdByAdmin.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCCmdByAdmin.java
index a0e8021,0000000..372bb75
mode 100644,000000..100644
--- a/api/src/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCCmdByAdmin.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCCmdByAdmin.java
@@@ -1,47 -1,0 +1,47 @@@
 +// 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.command.admin.vpc;
 +
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.api.APICommand;
 +import org.apache.cloudstack.api.ApiErrorCode;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
 +import org.apache.cloudstack.api.ServerApiException;
 +import org.apache.cloudstack.api.command.user.vpc.UpdateVPCCmd;
 +import org.apache.cloudstack.api.response.VpcResponse;
 +
 +import com.cloud.network.vpc.Vpc;
 +
 +@APICommand(name = "updateVPC", description = "Updates a VPC", responseObject = VpcResponse.class, responseView = ResponseView.Full)
 +public class UpdateVPCCmdByAdmin extends UpdateVPCCmd {
 +    public static final Logger s_logger = Logger.getLogger(UpdateVPCCmdByAdmin.class.getName());
 +
 +    @Override
 +    public void execute(){
-         Vpc result = _vpcService.updateVpc(getId(), getVpcName(), getDisplayText());
++        Vpc result = _vpcService.updateVpc(getId(), getVpcName(), getDisplayText(), getCustomId());
 +        if (result != null) {
 +            VpcResponse response = _responseGenerator.createVpcResponse(ResponseView.Full, result);
 +            response.setResponseName(getCommandName());
 +            setResponseObject(response);
 +        } else {
 +            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update VPC");
 +        }
 +    }
 +
 +
 +}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/api/src/org/apache/cloudstack/api/command/user/address/UpdateIPAddrCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/address/UpdateIPAddrCmd.java
index 0000000,b45bf94..ea55dc4
mode 000000,100644..100644
--- a/api/src/org/apache/cloudstack/api/command/user/address/UpdateIPAddrCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/address/UpdateIPAddrCmd.java
@@@ -1,0 -1,122 +1,124 @@@
+ // 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.command.user.address;
+ 
++import org.apache.log4j.Logger;
++
+ import org.apache.cloudstack.api.APICommand;
+ import org.apache.cloudstack.api.ApiConstants;
+ import org.apache.cloudstack.api.BaseAsyncCustomIdCmd;
+ import org.apache.cloudstack.api.Parameter;
++import org.apache.cloudstack.api.ResponseObject.ResponseView;
+ import org.apache.cloudstack.api.ServerApiException;
+ import org.apache.cloudstack.api.response.AccountResponse;
+ import org.apache.cloudstack.api.response.IPAddressResponse;
 -import org.apache.log4j.Logger;
+ 
+ import com.cloud.event.EventTypes;
+ import com.cloud.exception.ConcurrentOperationException;
+ import com.cloud.exception.InsufficientCapacityException;
+ import com.cloud.exception.InvalidParameterValueException;
+ import com.cloud.exception.NetworkRuleConflictException;
+ import com.cloud.exception.ResourceAllocationException;
+ import com.cloud.exception.ResourceUnavailableException;
+ import com.cloud.network.IpAddress;
+ import com.cloud.user.Account;
+ 
+ @APICommand(name = "updatePublicIpAddress", description = "Updates an ip address", responseObject = IPAddressResponse.class)
+ public class UpdateIPAddrCmd extends BaseAsyncCustomIdCmd {
+     public static final Logger s_logger = Logger.getLogger(UpdateIPAddrCmd.class.getName());
+     private static final String s_name = "updateipaddressresponse";
+ 
+     /////////////////////////////////////////////////////
+     //////////////// API parameters /////////////////////
+     /////////////////////////////////////////////////////
+ 
+     @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, description = "the id of the public ip address"
+             + " to update")
+     private Long id;
+     // unexposed parameter needed for events logging
+     @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, expose = false)
+     private Long ownerId;
+ 
+     /////////////////////////////////////////////////////
+     /////////////////// Accessors ///////////////////////
+     /////////////////////////////////////////////////////
+     @Override
+     public String getCommandName() {
+         return s_name;
+     }
+ 
+     public Long getId() {
+         return id;
+     }
+ 
+ 
+     /////////////////////////////////////////////////////
+     /////////////// API Implementation///////////////////
+     /////////////////////////////////////////////////////
+     @Override
+     public String getEventType() {
+         return EventTypes.EVENT_NET_IP_UPDATE;
+     }
+ 
+     @Override
+     public String getEventDescription() {
+         return ("Updating ip address with id=" + id);
+     }
+ 
+     @Override
+     public long getEntityOwnerId() {
+         if (ownerId == null) {
+             IpAddress ip = getIpAddress(id);
+             if (ip == null) {
+                 throw new InvalidParameterValueException("Unable to find ip address by id=" + id);
+             }
+             ownerId = ip.getAccountId();
+         }
+ 
+         if (ownerId == null) {
+             return Account.ACCOUNT_ID_SYSTEM;
+         }
+         return ownerId;
+     }
+ 
+     private IpAddress getIpAddress(long id) {
+         IpAddress ip = _entityMgr.findById(IpAddress.class, id);
+ 
+         if (ip == null) {
+             throw new InvalidParameterValueException("Unable to find ip address by id=" + id);
+         } else {
+             return ip;
+         }
+     }
+ 
+     @Override
+     public void checkUuid() {
 -        if (this.getCustomId() != null) {
 -            _uuidMgr.checkUuid(this.getCustomId(), IpAddress.class);
++        if (getCustomId() != null) {
++            _uuidMgr.checkUuid(getCustomId(), IpAddress.class);
+         }
+     }
+ 
+     @Override
+     public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException,
+             NetworkRuleConflictException {
+ 
 -        IpAddress result = _networkService.updateIP(getId(), this.getCustomId());
 -        IPAddressResponse ipResponse = _responseGenerator.createIPAddressResponse(result);
++        IpAddress result = _networkService.updateIP(getId(), getCustomId());
++        IPAddressResponse ipResponse = _responseGenerator.createIPAddressResponse(ResponseView.Restricted, result);
+         ipResponse.setResponseName(getCommandName());
+         setResponseObject(ipResponse);
+     }
+ }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmGroupCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmGroupCmd.java
index 0aba633,628bb8a..7c205f3
--- a/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmGroupCmd.java
@@@ -39,8 -35,8 +39,8 @@@ import com.cloud.event.EventTypes
  import com.cloud.network.as.AutoScaleVmGroup;
  import com.cloud.user.Account;
  
 -@APICommand(name = "updateAutoScaleVmGroup", description = "Updates an existing autoscale vm group.", responseObject = AutoScaleVmGroupResponse.class)
 +@APICommand(name = "updateAutoScaleVmGroup", description = "Updates an existing autoscale vm group.", responseObject = AutoScaleVmGroupResponse.class, entityType = { AclEntityType.AutoScaleVmGroup })
- public class UpdateAutoScaleVmGroupCmd extends BaseAsyncCmd {
+ public class UpdateAutoScaleVmGroupCmd extends BaseAsyncCustomIdCmd {
      public static final Logger s_logger = Logger.getLogger(UpdateAutoScaleVmGroupCmd.class.getName());
  
      private static final String s_name = "updateautoscalevmgroupresponse";
@@@ -95,7 -90,7 +95,7 @@@
          if (result != null) {
              AutoScaleVmGroupResponse response = _responseGenerator.createAutoScaleVmGroupResponse(result);
              response.setResponseName(getCommandName());
--            this.setResponseObject(response);
++            setResponseObject(response);
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update autoscale VmGroup");
          }
@@@ -158,4 -153,11 +158,11 @@@
      public ApiCommandJobType getInstanceType() {
          return ApiCommandJobType.AutoScaleVmGroup;
      }
+ 
+     @Override
+     public void checkUuid() {
 -        if (this.getCustomId() != null) {
 -            _uuidMgr.checkUuid(this.getCustomId(), AutoScaleVmGroup.class);
++        if (getCustomId() != null) {
++            _uuidMgr.checkUuid(getCustomId(), AutoScaleVmGroup.class);
+         }
+     }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java
index 2d76c51,d6405c1..959b829
--- a/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java
@@@ -40,8 -36,8 +40,8 @@@ import com.cloud.event.EventTypes
  import com.cloud.network.as.AutoScaleVmProfile;
  import com.cloud.user.Account;
  
 -@APICommand(name = "updateAutoScaleVmProfile", description = "Updates an existing autoscale vm profile.", responseObject = AutoScaleVmProfileResponse.class)
 +@APICommand(name = "updateAutoScaleVmProfile", description = "Updates an existing autoscale vm profile.", responseObject = AutoScaleVmProfileResponse.class, entityType = { AclEntityType.AutoScaleVmProfile })
- public class UpdateAutoScaleVmProfileCmd extends BaseAsyncCmd {
+ public class UpdateAutoScaleVmProfileCmd extends BaseAsyncCustomIdCmd {
      public static final Logger s_logger = Logger.getLogger(UpdateAutoScaleVmProfileCmd.class.getName());
  
      private static final String s_name = "updateautoscalevmprofileresponse";
@@@ -91,7 -86,7 +91,7 @@@
          if (result != null) {
              AutoScaleVmProfileResponse response = _responseGenerator.createAutoScaleVmProfileResponse(result);
              response.setResponseName(getCommandName());
--            this.setResponseObject(response);
++            setResponseObject(response);
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update autoscale vm profile");
          }
@@@ -150,4 -145,11 +150,11 @@@
      public ApiCommandJobType getInstanceType() {
          return ApiCommandJobType.AutoScaleVmProfile;
      }
+ 
+     @Override
+     public void checkUuid() {
 -        if (this.getCustomId() != null) {
 -            _uuidMgr.checkUuid(this.getCustomId(), AutoScaleVmProfile.class);
++        if (getCustomId() != null) {
++            _uuidMgr.checkUuid(getCustomId(), AutoScaleVmProfile.class);
+         }
+     }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/api/src/org/apache/cloudstack/api/command/user/firewall/UpdatePortForwardingRuleCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/firewall/UpdatePortForwardingRuleCmd.java
index 6c860fe,a7bb7e3..79d3ce6
--- a/api/src/org/apache/cloudstack/api/command/user/firewall/UpdatePortForwardingRuleCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/firewall/UpdatePortForwardingRuleCmd.java
@@@ -34,8 -35,8 +37,8 @@@ import com.cloud.user.Account
  
  @APICommand(name = "updatePortForwardingRule",
              responseObject = FirewallRuleResponse.class,
-  description = "Updates a port forwarding rule.  Only the private port and the virtual machine can be updated.", entityType = { AclEntityType.PortForwardingRule })
- public class UpdatePortForwardingRuleCmd extends BaseAsyncCmd {
 - description = "Updates a port forwarding rule")
++        description = "Updates a port forwarding rule.  Only the private port and the virtual machine can be updated.", entityType = {AclEntityType.PortForwardingRule})
+ public class UpdatePortForwardingRuleCmd extends BaseAsyncCustomIdCmd {
      public static final Logger s_logger = Logger.getLogger(UpdatePortForwardingRuleCmd.class.getName());
      private static final String s_name = "updateportforwardingruleresponse";
  
@@@ -130,7 -131,21 +133,21 @@@
      }
  
      @Override
+     public void checkUuid() {
 -        if (this.getCustomId() != null) {
 -            _uuidMgr.checkUuid(this.getCustomId(), FirewallRule.class);
++        if (getCustomId() != null) {
++            _uuidMgr.checkUuid(getCustomId(), FirewallRule.class);
+         }
+     }
+ 
+     @Override
      public void execute() {
 -        PortForwardingRule rule = _rulesService.updatePortForwardingRule(id, this.getCustomId());
++        PortForwardingRule rule = _rulesService.updatePortForwardingRule(id, getCustomId());
+         FirewallRuleResponse fwResponse = new FirewallRuleResponse();
+         if (rule != null) {
+             fwResponse = _responseGenerator.createPortForwardingRuleResponse(rule);
+             setResponseObject(fwResponse);
+         }
+         fwResponse.setResponseName(getCommandName());
  //FIXME:        PortForwardingRule result = _mgr.updatePortForwardingRule(this);
  //        if (result != null) {
  //            FirewallRuleResponse response = _responseGenerator.createFirewallRuleResponse(result);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java
index 139f81a,85bea5f..215a1da
--- a/api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java
@@@ -25,8 -20,8 +25,9 @@@ import org.apache.cloudstack.api.APICom
  import org.apache.cloudstack.api.ApiConstants;
  import org.apache.cloudstack.api.ApiErrorCode;
  import org.apache.cloudstack.api.BaseAsyncCmd;
+ import org.apache.cloudstack.api.BaseAsyncCustomIdCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.NetworkOfferingResponse;
  import org.apache.cloudstack.api.response.NetworkResponse;
@@@ -41,8 -37,8 +42,8 @@@ import com.cloud.offering.NetworkOfferi
  import com.cloud.user.Account;
  import com.cloud.user.User;
  
 -@APICommand(name = "updateNetwork", description = "Updates a network", responseObject = NetworkResponse.class)
 +@APICommand(name = "updateNetwork", description = "Updates a network", responseObject = NetworkResponse.class, responseView = ResponseView.Restricted, entityType = { AclEntityType.Network })
- public class UpdateNetworkCmd extends BaseAsyncCmd {
+ public class UpdateNetworkCmd extends BaseAsyncCustomIdCmd {
      public static final Logger s_logger = Logger.getLogger(UpdateNetworkCmd.class.getName());
  
      private static final String s_name = "updatenetworkresponse";
@@@ -147,12 -141,12 +148,12 @@@
  
          Network result =
              _networkService.updateGuestNetwork(getId(), getNetworkName(), getDisplayText(), callerAccount, callerUser, getNetworkDomain(), getNetworkOfferingId(),
-                 getChangeCidr(), getGuestVmCidr(), getDisplayNetwork());
 -                getChangeCidr(), getGuestVmCidr(), getDisplayNetwork(), this.getCustomId());
++                getChangeCidr(), getGuestVmCidr(), getDisplayNetwork(), getCustomId());
  
          if (result != null) {
-             NetworkResponse response = _responseGenerator.createNetworkResponse(ResponseView.Full, result);
 -            NetworkResponse response = _responseGenerator.createNetworkResponse(result);
++            NetworkResponse response = _responseGenerator.createNetworkResponse(ResponseView.Restricted, result);
              response.setResponseName(getCommandName());
 -            this.setResponseObject(response);
 +            setResponseObject(response);
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update network");
          }
@@@ -194,4 -188,11 +195,11 @@@
      public Long getSyncObjId() {
          return id;
      }
+ 
+     @Override
+     public void checkUuid() {
 -        if (this.getCustomId() != null) {
 -            _uuidMgr.checkUuid(this.getCustomId(), Network.class);
++        if (getCustomId() != null) {
++            _uuidMgr.checkUuid(getCustomId(), Network.class);
+         }
+     }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
index 4b541f4,0639477..28d7c0ea
--- a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
@@@ -154,4 -146,12 +154,12 @@@ public class UpdateVMCmd extends BaseCu
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update vm");
          }
      }
+ 
+     @Override
+     public void checkUuid() {
 -        if (this.getCustomId() != null) {
 -            _uuidMgr.checkUuid(this.getCustomId(), UserVm.class);
++        if (getCustomId() != null) {
++            _uuidMgr.checkUuid(getCustomId(), UserVm.class);
+ 
+         }
+     }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
index f63a53c,65d2849..3fa24cf
--- a/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java
@@@ -15,11 -15,7 +15,12 @@@
  // specific language governing permissions and limitations
  // under the License.
  package org.apache.cloudstack.api.command.user.volume;
+ 
 +import org.apache.log4j.Logger;
 +
 +import org.apache.cloudstack.acl.AclEntityType;
 +import org.apache.cloudstack.acl.SecurityChecker.AccessType;
 +import org.apache.cloudstack.api.ACL;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiCommandJobType;
  import org.apache.cloudstack.api.ApiConstants;
@@@ -153,4 -148,12 +154,12 @@@ public class UpdateVolumeCmd extends Ba
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update volume");
          }
      }
+ 
+     @Override
+     public void checkUuid() {
 -        if (this.getCustomId() != null) {
 -            _uuidMgr.checkUuid(this.getCustomId(), Volume.class);
++        if (getCustomId() != null) {
++            _uuidMgr.checkUuid(getCustomId(), Volume.class);
+         }
+     }
+ 
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java
index ed63225,3f24a2f..16829a2
--- a/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java
@@@ -25,17 -20,18 +25,18 @@@ import org.apache.cloudstack.api.APICom
  import org.apache.cloudstack.api.ApiConstants;
  import org.apache.cloudstack.api.ApiErrorCode;
  import org.apache.cloudstack.api.BaseAsyncCmd;
+ import org.apache.cloudstack.api.BaseAsyncCustomIdCmd;
  import org.apache.cloudstack.api.Parameter;
 +import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.response.VpcResponse;
 -import org.apache.log4j.Logger;
  
  import com.cloud.event.EventTypes;
  import com.cloud.network.vpc.Vpc;
  import com.cloud.user.Account;
  
 -@APICommand(name = "updateVPC", description = "Updates a VPC", responseObject = VpcResponse.class)
 +@APICommand(name = "updateVPC", description = "Updates a VPC", responseObject = VpcResponse.class, responseView = ResponseView.Restricted, entityType = { AclEntityType.Vpc })
- public class UpdateVPCCmd extends BaseAsyncCmd{
+ public class UpdateVPCCmd extends BaseAsyncCustomIdCmd {
      public static final Logger s_logger = Logger.getLogger(UpdateVPCCmd.class.getName());
      private static final String Name = "updatevpcresponse";
  
@@@ -88,11 -84,11 +89,11 @@@
  
      @Override
      public void execute() {
-         Vpc result = _vpcService.updateVpc(getId(), getVpcName(), getDisplayText());
 -        Vpc result = _vpcService.updateVpc(getId(), getVpcName(), getDisplayText(), this.getCustomId());
++        Vpc result = _vpcService.updateVpc(getId(), getVpcName(), getDisplayText(), getCustomId());
          if (result != null) {
 -            VpcResponse response = _responseGenerator.createVpcResponse(result);
 +            VpcResponse response = _responseGenerator.createVpcResponse(ResponseView.Restricted, result);
              response.setResponseName(getCommandName());
 -            this.setResponseObject(response);
 +            setResponseObject(response);
          } else {
              throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update VPC");
          }
@@@ -117,4 -113,11 +118,11 @@@
      public Long getSyncObjId() {
          return getId();
      }
+ 
+     @Override
+     public void checkUuid() {
 -        if (this.getCustomId() != null) {
 -            _uuidMgr.checkUuid(this.getCustomId(), Vpc.class);
++        if (getCustomId() != null) {
++            _uuidMgr.checkUuid(getCustomId(), Vpc.class);
+         }
+     }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/client/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
----------------------------------------------------------------------
diff --cc engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
index 8684876,ce40762..1227210
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
@@@ -2447,8 -2430,12 +2448,12 @@@ public class NetworkOrchestrator extend
              return null;
          }
  
+         NetworkElement element = _networkModel.getElementImplementingProvider(DhcpProvider);
+         if ( element instanceof DhcpServiceProvider ) {
 -            return (DhcpServiceProvider)_networkModel.getElementImplementingProvider(DhcpProvider);
 +        return (DhcpServiceProvider)_networkModel.getElementImplementingProvider(DhcpProvider);
- 
+         } else {
+             return null;
+         }
      }
  
      protected boolean isSharedNetworkWithServices(Network network) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/engine/schema/src/com/cloud/network/as/AutoScaleVmGroupVO.java
----------------------------------------------------------------------
diff --cc engine/schema/src/com/cloud/network/as/AutoScaleVmGroupVO.java
index 27d00af,9650249..1c12ce6
--- a/engine/schema/src/com/cloud/network/as/AutoScaleVmGroupVO.java
+++ b/engine/schema/src/com/cloud/network/as/AutoScaleVmGroupVO.java
@@@ -210,8 -209,7 +210,12 @@@ public class AutoScaleVmGroupVO impleme
          return uuid;
      }
  
+     public void setUuid(String uuid) {
+         this.uuid = uuid;
+     }
++
 +    @Override
 +    public AclEntityType getEntityType() {
 +        return AclEntityType.AutoScaleVmGroup;
 +    }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/engine/schema/src/com/cloud/network/as/AutoScaleVmProfileVO.java
----------------------------------------------------------------------
diff --cc engine/schema/src/com/cloud/network/as/AutoScaleVmProfileVO.java
index e5db2c9,9a8fbd8..e718a2b
--- a/engine/schema/src/com/cloud/network/as/AutoScaleVmProfileVO.java
+++ b/engine/schema/src/com/cloud/network/as/AutoScaleVmProfileVO.java
@@@ -92,7 -91,7 +92,7 @@@ public class AutoScaleVmProfileVO imple
  
      public AutoScaleVmProfileVO(long zoneId, long domainId, long accountId, long serviceOfferingId, long templateId, String otherDeployParams, Map counterParamList,
              Integer destroyVmGraceperiod, long autoscaleUserId) {
--        this.uuid = UUID.randomUUID().toString();
++        uuid = UUID.randomUUID().toString();
          this.zoneId = zoneId;
          this.domainId = domainId;
          this.accountId = accountId;
@@@ -147,7 -146,7 +147,7 @@@
      }
  
      public void setCounterParams(String counterParam) {
--        this.counterParams = counterParam;
++        counterParams = counterParam;
      }
  
      public void setCounterParamsForUpdate(Map counterParamList) {
@@@ -218,8 -217,7 +218,13 @@@
          return autoscaleUserId;
      }
  
+     public void setUuid(String uuid) {
+         this.uuid = uuid;
+     }
++
 +    @Override
 +    public AclEntityType getEntityType() {
 +        return AclEntityType.AutoScaleVmProfile;
 +    }
++
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/engine/schema/src/com/cloud/network/dao/MonitoringServiceVO.java
----------------------------------------------------------------------
diff --cc engine/schema/src/com/cloud/network/dao/MonitoringServiceVO.java
index d7cb864,f9967ec..21e4f03
--- a/engine/schema/src/com/cloud/network/dao/MonitoringServiceVO.java
+++ b/engine/schema/src/com/cloud/network/dao/MonitoringServiceVO.java
@@@ -117,13 -113,7 +115,13 @@@ public class MonitoringServiceVO implem
          return defaultService;
      }
  
-     public String getProcessname() {
-         return processname;
+     public String getProcessName() {
+         return processName;
      }
 +
 +    @Override
 +    public AclEntityType getEntityType() {
 +        return AclEntityType.MonitorService;
 +    }
 +
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/engine/schema/src/com/cloud/network/dao/RemoteAccessVpnVO.java
----------------------------------------------------------------------
diff --cc engine/schema/src/com/cloud/network/dao/RemoteAccessVpnVO.java
index 678ea4a,c892949..f546bb7
--- a/engine/schema/src/com/cloud/network/dao/RemoteAccessVpnVO.java
+++ b/engine/schema/src/com/cloud/network/dao/RemoteAccessVpnVO.java
@@@ -151,8 -149,7 +151,12 @@@ public class RemoteAccessVpnVO implemen
          return vpcId;
      }
  
+     public void setUuid(String uuid) {
+         this.uuid = uuid;
+     }
++
 +    @Override
 +    public AclEntityType getEntityType() {
 +        return AclEntityType.RemoteAccessVpn;
 +    }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/engine/schema/src/com/cloud/network/dao/Site2SiteVpnConnectionVO.java
----------------------------------------------------------------------
diff --cc engine/schema/src/com/cloud/network/dao/Site2SiteVpnConnectionVO.java
index e3e0433,7f1d0aa..b092a4a
--- a/engine/schema/src/com/cloud/network/dao/Site2SiteVpnConnectionVO.java
+++ b/engine/schema/src/com/cloud/network/dao/Site2SiteVpnConnectionVO.java
@@@ -158,8 -156,7 +158,12 @@@ public class Site2SiteVpnConnectionVO i
          this.passive = passive;
      }
  
+     public void setUuid(String uuid) {
+         this.uuid = uuid;
+     }
++
 +    @Override
 +    public AclEntityType getEntityType() {
 +        return AclEntityType.Site2SiteVpnConnection;
 +    }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/engine/schema/src/com/cloud/network/dao/Site2SiteVpnGatewayVO.java
----------------------------------------------------------------------
diff --cc engine/schema/src/com/cloud/network/dao/Site2SiteVpnGatewayVO.java
index 626572e,5e8c6b6..c3ad360
--- a/engine/schema/src/com/cloud/network/dao/Site2SiteVpnGatewayVO.java
+++ b/engine/schema/src/com/cloud/network/dao/Site2SiteVpnGatewayVO.java
@@@ -116,8 -113,7 +116,12 @@@ public class Site2SiteVpnGatewayVO impl
          return accountId;
      }
  
+     public void setUuid(String uuid) {
+         this.uuid = uuid;
+     }
++
 +    @Override
 +    public AclEntityType getEntityType() {
 +        return AclEntityType.Site2SiteVpnGateway;
 +    }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/engine/schema/src/com/cloud/network/vpc/VpcVO.java
----------------------------------------------------------------------
diff --cc engine/schema/src/com/cloud/network/vpc/VpcVO.java
index 910a8c4,5f3528d..dc4f80e
--- a/engine/schema/src/com/cloud/network/vpc/VpcVO.java
+++ b/engine/schema/src/com/cloud/network/vpc/VpcVO.java
@@@ -78,7 -77,7 +79,7 @@@ public class VpcVO implements Vpc 
      boolean restartRequired = false;
  
      public VpcVO() {
--        this.uuid = UUID.randomUUID().toString();
++        uuid = UUID.randomUUID().toString();
      }
  
      public VpcVO(long zoneId, String name, String displayText, long accountId, long domainId, long vpcOffId, String cidr, String networkDomain) {
@@@ -88,10 -87,10 +89,10 @@@
          this.accountId = accountId;
          this.domainId = domainId;
          this.cidr = cidr;
--        this.uuid = UUID.randomUUID().toString();
--        this.state = State.Enabled;
++        uuid = UUID.randomUUID().toString();
++        state = State.Enabled;
          this.networkDomain = networkDomain;
--        this.vpcOfferingId = vpcOffId;
++        vpcOfferingId = vpcOffId;
      }
  
      @Override
@@@ -180,8 -179,7 +181,12 @@@
          return restartRequired;
      }
  
+     public void setUuid(String uuid) {
+         this.uuid = uuid;
+     }
++
 +    @Override
 +    public AclEntityType getEntityType() {
 +        return AclEntityType.Vpc;
 +    }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
----------------------------------------------------------------------
diff --cc engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
index 87bb44d,669a075..b5573dd
--- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
+++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
@@@ -287,7 -286,10 +287,10 @@@ public class SnapshotObject implements 
              } else if (answer instanceof CopyCmdAnswer) {
                  SnapshotObjectTO snapshotTO = (SnapshotObjectTO)((CopyCmdAnswer)answer).getNewData();
                  snapshotStore.setInstallPath(snapshotTO.getPath());
+                 if (snapshotTO.getPhysicalSize() != null) {
+                     // For S3 delta snapshot, physical size is currently not set
 -                    snapshotStore.setSize(snapshotTO.getPhysicalSize());
 +                snapshotStore.setSize(snapshotTO.getPhysicalSize());
+                 }
                  if (snapshotTO.getParentSnapshotPath() == null) {
                      snapshotStore.setParentSnapshotId(0L);
                  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/resources/META-INF/cloudstack/core/spring-server-core-managers-context.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/api/ApiDispatcher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 5f02004,49fee93..bf45d8f
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@@ -2877,29 -2875,44 +2877,44 @@@ public class ConfigurationManagerImpl e
                      continue;
                  }
                  // from here, subnet overlaps
-                 if (!NetUtils.isSameIsolationId(vlanId, vlan.getVlanTag())) {
-                     throw new InvalidParameterValueException("The IP range with tag: " + vlan.getVlanTag() + " in zone " + zone.getName()
-                             + " has overlapped with the subnet. Please specify a different gateway/netmask.");
+                 if ( !vlanId.equals(vlan.getVlanTag()) ) {
+                     boolean overlapped = false;
+                     if( network.getTrafficType() == TrafficType.Public ) {
+                         overlapped = true;
+                     } else {
+                         Long nwId = vlan.getNetworkId();
+                         if ( nwId != null ) {
+                             Network nw = _networkModel.getNetwork(nwId);
+                             if ( nw != null && nw.getTrafficType() == TrafficType.Public ) {
+                                 overlapped = true;
+                             }
 -                        }
 +                }
-                 if (vlan.getNetworkId() != networkId) {
-                     throw new InvalidParameterValueException("This subnet is overlapped with subnet in other network " + vlan.getNetworkId() + " in zone " + zone.getName()
-                             + " . Please specify a different gateway/netmask.");
  
 -                    }
 +                }
+                     if ( overlapped ) {
+                         throw new InvalidParameterValueException("The IP range with tag: " + vlan.getVlanTag()
+                                 + " in zone " + zone.getName()
+                                 + " has overlapped with the subnet. Please specify a different gateway/netmask.");
+                     }
+                 } else {
+ 
 -                    String[] otherVlanIpRange = vlan.getIpRange().split("\\-");
 -                    String otherVlanStartIP = otherVlanIpRange[0];
 -                    String otherVlanEndIP = null;
 -                    if (otherVlanIpRange.length > 1) {
 -                        otherVlanEndIP = otherVlanIpRange[1];
 -                    }
 +                String[] otherVlanIpRange = vlan.getIpRange().split("\\-");
 +                String otherVlanStartIP = otherVlanIpRange[0];
 +                String otherVlanEndIP = null;
 +                if (otherVlanIpRange.length > 1) {
 +                    otherVlanEndIP = otherVlanIpRange[1];
 +                }
  
-                 //extend IP range
+                     // extend IP range
 -                    if (!vlanGateway.equals(otherVlanGateway) || !vlanNetmask.equals(vlan.getVlanNetmask())) {
 +                if (!vlanGateway.equals(otherVlanGateway) || !vlanNetmask.equals(vlan.getVlanNetmask())) {
-                     throw new InvalidParameterValueException("The IP range has already been added with gateway " + otherVlanGateway + " ,and netmask " + otherVlanNetmask
-                             + ", Please specify the gateway/netmask if you want to extend ip range");
+                         throw new InvalidParameterValueException("The IP range has already been added with gateway "
+                                 + otherVlanGateway + " ,and netmask " + otherVlanNetmask
+                                 + ", Please specify the gateway/netmask if you want to extend ip range" );
 -                    }
 -                    if (NetUtils.ipRangesOverlap(startIP, endIP, otherVlanStartIP, otherVlanEndIP)) {
 +                }
 +                if (NetUtils.ipRangesOverlap(startIP, endIP, otherVlanStartIP, otherVlanEndIP)) {
-                     throw new InvalidParameterValueException("The IP range already has IPs that overlap with the new range." + " Please specify a different start IP/end IP.");
+                         throw new InvalidParameterValueException("The IP range already has IPs that overlap with the new range." +
+                                 " Please specify a different start IP/end IP.");
+                     }
                  }
              }
          }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/network/IpAddressManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/network/IpAddressManagerImpl.java
index 5e2046c,6596074..dbec06f
--- a/server/src/com/cloud/network/IpAddressManagerImpl.java
+++ b/server/src/com/cloud/network/IpAddressManagerImpl.java
@@@ -657,129 -654,129 +654,129 @@@ public class IpAddressManagerImpl exten
          IPAddressVO addr = Transaction.execute(new TransactionCallbackWithException<IPAddressVO, InsufficientAddressCapacityException>() {
              @Override
              public IPAddressVO doInTransaction(TransactionStatus status) throws InsufficientAddressCapacityException {
 -                StringBuilder errorMessage = new StringBuilder("Unable to get ip adress in ");
 -                boolean fetchFromDedicatedRange = false;
 -                List<Long> dedicatedVlanDbIds = new ArrayList<Long>();
 -                List<Long> nonDedicatedVlanDbIds = new ArrayList<Long>();
 -
 -                SearchCriteria<IPAddressVO> sc = null;
 -                if (podId != null) {
 -                    sc = AssignIpAddressFromPodVlanSearch.create();
 -                    sc.setJoinParameters("podVlanMapSB", "podId", podId);
 -                    errorMessage.append(" pod id=" + podId);
 -                } else {
 -                    sc = AssignIpAddressSearch.create();
 -                    errorMessage.append(" zone id=" + dcId);
 -                }
 +        StringBuilder errorMessage = new StringBuilder("Unable to get ip adress in ");
 +        boolean fetchFromDedicatedRange = false;
 +        List<Long> dedicatedVlanDbIds = new ArrayList<Long>();
 +        List<Long> nonDedicatedVlanDbIds = new ArrayList<Long>();
 +
 +        SearchCriteria<IPAddressVO> sc = null;
 +        if (podId != null) {
 +            sc = AssignIpAddressFromPodVlanSearch.create();
 +            sc.setJoinParameters("podVlanMapSB", "podId", podId);
 +            errorMessage.append(" pod id=" + podId);
 +        } else {
 +            sc = AssignIpAddressSearch.create();
 +            errorMessage.append(" zone id=" + dcId);
 +        }
  
 -                // If owner has dedicated Public IP ranges, fetch IP from the dedicated range
 -                // Otherwise fetch IP from the system pool
 -                List<AccountVlanMapVO> maps = _accountVlanMapDao.listAccountVlanMapsByAccount(owner.getId());
 -                for (AccountVlanMapVO map : maps) {
 -                    if (vlanDbIds == null || vlanDbIds.contains(map.getVlanDbId()))
 -                        dedicatedVlanDbIds.add(map.getVlanDbId());
 -                }
 -                List<VlanVO> nonDedicatedVlans = _vlanDao.listZoneWideNonDedicatedVlans(dcId);
 -                for (VlanVO nonDedicatedVlan : nonDedicatedVlans) {
 -                    if (vlanDbIds == null || vlanDbIds.contains(nonDedicatedVlan.getId()))
 -                        nonDedicatedVlanDbIds.add(nonDedicatedVlan.getId());
 -                }
 -                if (dedicatedVlanDbIds != null && !dedicatedVlanDbIds.isEmpty()) {
 -                    fetchFromDedicatedRange = true;
 -                    sc.setParameters("vlanId", dedicatedVlanDbIds.toArray());
 +        // If owner has dedicated Public IP ranges, fetch IP from the dedicated range
 +        // Otherwise fetch IP from the system pool
 +        List<AccountVlanMapVO> maps = _accountVlanMapDao.listAccountVlanMapsByAccount(owner.getId());
 +        for (AccountVlanMapVO map : maps) {
 +            if (vlanDbIds == null || vlanDbIds.contains(map.getVlanDbId()))
 +                dedicatedVlanDbIds.add(map.getVlanDbId());
 +        }
 +        List<VlanVO> nonDedicatedVlans = _vlanDao.listZoneWideNonDedicatedVlans(dcId);
 +        for (VlanVO nonDedicatedVlan : nonDedicatedVlans) {
 +            if (vlanDbIds == null || vlanDbIds.contains(nonDedicatedVlan.getId()))
 +                nonDedicatedVlanDbIds.add(nonDedicatedVlan.getId());
 +        }
 +        if (dedicatedVlanDbIds != null && !dedicatedVlanDbIds.isEmpty()) {
 +            fetchFromDedicatedRange = true;
 +            sc.setParameters("vlanId", dedicatedVlanDbIds.toArray());
-                     errorMessage.append(", vlanId id=" + Arrays.toString(dedicatedVlanDbIds.toArray()));
+                     errorMessage.append(", vlanId id=" + dedicatedVlanDbIds.toArray());
 -                } else if (nonDedicatedVlanDbIds != null && !nonDedicatedVlanDbIds.isEmpty()) {
 -                    sc.setParameters("vlanId", nonDedicatedVlanDbIds.toArray());
 +        } else if (nonDedicatedVlanDbIds != null && !nonDedicatedVlanDbIds.isEmpty()) {
 +            sc.setParameters("vlanId", nonDedicatedVlanDbIds.toArray());
-                     errorMessage.append(", vlanId id=" + Arrays.toString(nonDedicatedVlanDbIds.toArray()));
+                     errorMessage.append(", vlanId id=" + nonDedicatedVlanDbIds.toArray());
 -                } else {
 -                    if (podId != null) {
 -                        InsufficientAddressCapacityException ex = new InsufficientAddressCapacityException("Insufficient address capacity", Pod.class, podId);
 -                        ex.addProxyObject(ApiDBUtils.findPodById(podId).getUuid());
 -                        throw ex;
 -                    }
 -                    s_logger.warn(errorMessage.toString());
 -                    InsufficientAddressCapacityException ex = new InsufficientAddressCapacityException("Insufficient address capacity", DataCenter.class, dcId);
 -                    ex.addProxyObject(ApiDBUtils.findZoneById(dcId).getUuid());
 -                    throw ex;
 -                }
 +        } else {
 +            if (podId != null) {
 +                InsufficientAddressCapacityException ex = new InsufficientAddressCapacityException("Insufficient address capacity", Pod.class, podId);
 +                ex.addProxyObject(ApiDBUtils.findPodById(podId).getUuid());
 +                throw ex;
 +            }
 +            s_logger.warn(errorMessage.toString());
 +            InsufficientAddressCapacityException ex = new InsufficientAddressCapacityException("Insufficient address capacity", DataCenter.class, dcId);
 +            ex.addProxyObject(ApiDBUtils.findZoneById(dcId).getUuid());
 +            throw ex;
 +        }
  
 -                sc.setParameters("dc", dcId);
 +        sc.setParameters("dc", dcId);
  
 -                DataCenter zone = _entityMgr.findById(DataCenter.class, dcId);
 +        DataCenter zone = _entityMgr.findById(DataCenter.class, dcId);
  
 -                // for direct network take ip addresses only from the vlans belonging to the network
 -                if (vlanUse == VlanType.DirectAttached) {
 -                    sc.setJoinParameters("vlan", "networkId", guestNetworkId);
 -                    errorMessage.append(", network id=" + guestNetworkId);
 -                }
 -                sc.setJoinParameters("vlan", "type", vlanUse);
 +        // for direct network take ip addresses only from the vlans belonging to the network
 +        if (vlanUse == VlanType.DirectAttached) {
 +            sc.setJoinParameters("vlan", "networkId", guestNetworkId);
 +            errorMessage.append(", network id=" + guestNetworkId);
 +        }
 +        sc.setJoinParameters("vlan", "type", vlanUse);
  
 -                if (requestedIp != null) {
 -                    sc.addAnd("address", SearchCriteria.Op.EQ, requestedIp);
 -                    errorMessage.append(": requested ip " + requestedIp + " is not available");
 -                }
 +        if (requestedIp != null) {
 +            sc.addAnd("address", SearchCriteria.Op.EQ, requestedIp);
 +            errorMessage.append(": requested ip " + requestedIp + " is not available");
 +        }
  
 -                Filter filter = new Filter(IPAddressVO.class, "vlanId", true, 0l, 1l);
 +        Filter filter = new Filter(IPAddressVO.class, "vlanId", true, 0l, 1l);
  
 -                List<IPAddressVO> addrs = _ipAddressDao.lockRows(sc, filter, true);
 +        List<IPAddressVO> addrs = _ipAddressDao.lockRows(sc, filter, true);
  
 -                // If all the dedicated IPs of the owner are in use fetch an IP from the system pool
 -                if (addrs.size() == 0 && fetchFromDedicatedRange) {
 -                    // Verify if account is allowed to acquire IPs from the system
 -                    boolean useSystemIps = UseSystemPublicIps.valueIn(owner.getId());
 -                    if (useSystemIps && nonDedicatedVlanDbIds != null && !nonDedicatedVlanDbIds.isEmpty()) {
 -                        fetchFromDedicatedRange = false;
 -                        sc.setParameters("vlanId", nonDedicatedVlanDbIds.toArray());
 +        // If all the dedicated IPs of the owner are in use fetch an IP from the system pool
 +        if (addrs.size() == 0 && fetchFromDedicatedRange) {
 +            // Verify if account is allowed to acquire IPs from the system
 +            boolean useSystemIps = UseSystemPublicIps.valueIn(owner.getId());
 +            if (useSystemIps && nonDedicatedVlanDbIds != null && !nonDedicatedVlanDbIds.isEmpty()) {
 +                fetchFromDedicatedRange = false;
 +                sc.setParameters("vlanId", nonDedicatedVlanDbIds.toArray());
-                         errorMessage.append(", vlanId id=" + Arrays.toString(nonDedicatedVlanDbIds.toArray()));
+                         errorMessage.append(", vlanId id=" + nonDedicatedVlanDbIds.toArray());
 -                        addrs = _ipAddressDao.lockRows(sc, filter, true);
 -                    }
 -                }
 +                addrs = _ipAddressDao.lockRows(sc, filter, true);
 +            }
 +        }
  
 -                if (addrs.size() == 0) {
 -                    if (podId != null) {
 -                        InsufficientAddressCapacityException ex = new InsufficientAddressCapacityException("Insufficient address capacity", Pod.class, podId);
 -                        // for now, we hardcode the table names, but we should ideally do a lookup for the tablename from the VO object.
 -                        ex.addProxyObject(ApiDBUtils.findPodById(podId).getUuid());
 -                        throw ex;
 -                    }
 -                    s_logger.warn(errorMessage.toString());
 -                    InsufficientAddressCapacityException ex = new InsufficientAddressCapacityException("Insufficient address capacity", DataCenter.class, dcId);
 -                    ex.addProxyObject(ApiDBUtils.findZoneById(dcId).getUuid());
 -                    throw ex;
 -                }
 +        if (addrs.size() == 0) {
 +            if (podId != null) {
 +                InsufficientAddressCapacityException ex = new InsufficientAddressCapacityException("Insufficient address capacity", Pod.class, podId);
 +                // for now, we hardcode the table names, but we should ideally do a lookup for the tablename from the VO object.
 +                ex.addProxyObject(ApiDBUtils.findPodById(podId).getUuid());
 +                throw ex;
 +            }
 +            s_logger.warn(errorMessage.toString());
 +            InsufficientAddressCapacityException ex = new InsufficientAddressCapacityException("Insufficient address capacity", DataCenter.class, dcId);
 +            ex.addProxyObject(ApiDBUtils.findZoneById(dcId).getUuid());
 +            throw ex;
 +        }
  
 -                assert (addrs.size() == 1) : "Return size is incorrect: " + addrs.size();
 +        assert (addrs.size() == 1) : "Return size is incorrect: " + addrs.size();
  
 -                if (!fetchFromDedicatedRange) {
 -                    // Check that the maximum number of public IPs for the given accountId will not be exceeded
 -                    try {
 -                        _resourceLimitMgr.checkResourceLimit(owner, ResourceType.public_ip);
 -                    } catch (ResourceAllocationException ex) {
 -                        s_logger.warn("Failed to allocate resource of type " + ex.getResourceType() + " for account " + owner);
 -                        throw new AccountLimitException("Maximum number of public IP addresses for account: " + owner.getAccountName() + " has been exceeded.");
 -                    }
 -                }
 +        if (!fetchFromDedicatedRange) {
 +            // Check that the maximum number of public IPs for the given accountId will not be exceeded
 +            try {
 +                _resourceLimitMgr.checkResourceLimit(owner, ResourceType.public_ip);
 +            } catch (ResourceAllocationException ex) {
 +                s_logger.warn("Failed to allocate resource of type " + ex.getResourceType() + " for account " + owner);
 +                throw new AccountLimitException("Maximum number of public IP addresses for account: " + owner.getAccountName() + " has been exceeded.");
 +            }
 +        }
  
 -                IPAddressVO addr = addrs.get(0);
 -                addr.setSourceNat(sourceNat);
 -                addr.setAllocatedTime(new Date());
 -                addr.setAllocatedInDomainId(owner.getDomainId());
 -                addr.setAllocatedToAccountId(owner.getId());
 -                addr.setSystem(isSystem);
 +        IPAddressVO addr = addrs.get(0);
 +        addr.setSourceNat(sourceNat);
 +        addr.setAllocatedTime(new Date());
 +        addr.setAllocatedInDomainId(owner.getDomainId());
 +        addr.setAllocatedToAccountId(owner.getId());
 +        addr.setSystem(isSystem);
  
 -                if (assign) {
 -                    markPublicIpAsAllocated(addr);
 -                } else {
 -                    addr.setState(IpAddress.State.Allocating);
 -                }
 -                addr.setState(assign ? IpAddress.State.Allocated : IpAddress.State.Allocating);
 +        if (assign) {
 +            markPublicIpAsAllocated(addr);
 +        } else {
 +            addr.setState(IpAddress.State.Allocating);
 +        }
 +        addr.setState(assign ? IpAddress.State.Allocated : IpAddress.State.Allocating);
  
 -                if (vlanUse != VlanType.DirectAttached) {
 -                    addr.setAssociatedWithNetworkId(guestNetworkId);
 -                    addr.setVpcId(vpcId);
 -                }
 +        if (vlanUse != VlanType.DirectAttached) {
 +            addr.setAssociatedWithNetworkId(guestNetworkId);
 +            addr.setVpcId(vpcId);
 +        }
  
 -                _ipAddressDao.update(addr.getId(), addr);
 +        _ipAddressDao.update(addr.getId(), addr);
  
                  return addr;
              }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/network/NetworkServiceImpl.java
index 474f510,bcadd69..41cc2ed
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@@ -1989,9 -1984,13 +1989,13 @@@ public class NetworkServiceImpl extend
              network.setDisplayText(displayText);
          }
  
+         if (customId != null) {
+             network.setUuid(customId);
+         }
+ 
          // display flag is not null and has changed
          if (displayNetwork != null && displayNetwork != network.getDisplayNetwork()) {
 -            if (!_accountMgr.isRootAdmin(callerAccount.getType())) {
 +            if (!_accountMgr.isRootAdmin(callerAccount.getId())) {
                  throw new PermissionDeniedException("Only admin allowed to update displaynetwork parameter");
              }
  
@@@ -4032,7 -4031,30 +4036,30 @@@
  
      @Inject
      public void setNetworkGurus(List<NetworkGuru> networkGurus) {
 -        this._networkGurus = networkGurus;
 +        _networkGurus = networkGurus;
      }
  
+     @Override
+     @ActionEvent(eventType = EventTypes.EVENT_NET_IP_UPDATE, eventDescription = "updating public ip address", async = true)
+     public IpAddress updateIP(Long id, String customId) {
+         Account caller = CallContext.current().getCallingAccount();
+         IPAddressVO ipVO = _ipAddressDao.findById(id);
+         if (ipVO == null) {
+             throw new InvalidParameterValueException("Unable to find ip address by id");
+         }
+ 
+         // verify permissions
+         if (ipVO.getAllocatedToAccountId() != null) {
+             _accountMgr.checkAccess(caller, null, true, ipVO);
+         } else if (caller.getType() != Account.ACCOUNT_TYPE_ADMIN) {
+             throw new PermissionDeniedException("Only Root admin can update non-allocated ip addresses");
+         }
+ 
+         if (customId != null) {
+             ipVO.setUuid(customId);
+         }
+         _ipAddressDao.update(id, ipVO);
+         return _ipAddressDao.findById(id);
+     }
+ 
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/network/rules/RulesManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
index 2ab34c5,ec43883..ef3bba9
--- a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
+++ b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java
@@@ -33,7 -29,12 +33,9 @@@ import org.apache.cloudstack.api.comman
  import org.apache.cloudstack.api.command.user.network.ListNetworkACLListsCmd;
  import org.apache.cloudstack.api.command.user.network.ListNetworkACLsCmd;
  import org.apache.cloudstack.context.CallContext;
 -import org.apache.commons.lang.StringUtils;
 -import org.apache.log4j.Logger;
 -import org.springframework.stereotype.Component;
  
+ import com.cloud.event.ActionEvent;
+ import com.cloud.event.EventTypes;
  import com.cloud.exception.InvalidParameterValueException;
  import com.cloud.exception.ResourceUnavailableException;
  import com.cloud.network.Network;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/network/vpc/VpcManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
index 71a639b,0b33ae3..446e385
--- a/server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
+++ b/server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
@@@ -724,7 -725,24 +729,24 @@@ public class RemoteAccessVpnManagerImp
      }
  
      public void setVpnServiceProviders(List<RemoteAccessVPNServiceProvider> vpnServiceProviders) {
 -        this._vpnServiceProviders = vpnServiceProviders;
 +        _vpnServiceProviders = vpnServiceProviders;
      }
  
+     @Override
+     @ActionEvent(eventType = EventTypes.EVENT_REMOTE_ACCESS_VPN_UPDATE, eventDescription = "updating remote access vpn", async = true)
+     public RemoteAccessVpn updateRemoteAccessVpn(long id, String customId) {
+         final RemoteAccessVpnVO vpn = _remoteAccessVpnDao.findById(id);
+         if (vpn == null) {
+             throw new InvalidParameterValueException("Can't find remote access vpn by id " + id);
+         }
+ 
+         _accountMgr.checkAccess(CallContext.current().getCallingAccount(), null, true, vpn);
+         if (customId != null) {
+             vpn.setUuid(customId);
+         }
+ 
+         _remoteAccessVpnDao.update(vpn.getId(), vpn);
+         return _remoteAccessVpnDao.findById(id);
+     }
+ 
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
index d296db1,2f6ad6c..03a13c3
--- a/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
+++ b/server/src/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java
@@@ -790,6 -780,43 +789,43 @@@ public class Site2SiteVpnManagerImpl ex
  
      @Inject
      public void setS2sProviders(List<Site2SiteVpnServiceProvider> s2sProviders) {
 -        this._s2sProviders = s2sProviders;
 +        _s2sProviders = s2sProviders;
      }
+ 
+     @Override
+     @ActionEvent(eventType = EventTypes.EVENT_S2S_VPN_CONNECTION_UPDATE, eventDescription = "creating s2s vpn gateway", async = true)
+     public Site2SiteVpnConnection updateVpnConnection(long id, String customId) {
+         Account caller = CallContext.current().getCallingAccount();
+         Site2SiteVpnConnectionVO conn = _vpnConnectionDao.findById(id);
+         if (conn == null) {
+             throw new InvalidParameterValueException("Fail to find site to site VPN connection " + id);
+         }
+ 
+         _accountMgr.checkAccess(caller, null, false, conn);
+         if (customId != null) {
+             conn.setUuid(customId);
+         }
+ 
+         _vpnConnectionDao.update(id, conn);
+         return _vpnConnectionDao.findById(id);
+     }
+ 
+     @Override
+     @ActionEvent(eventType = EventTypes.EVENT_S2S_VPN_GATEWAY_UPDATE, eventDescription = "updating s2s vpn gateway", async = true)
+     public Site2SiteVpnGateway updateVpnGateway(Long id, String customId) {
+         Account caller = CallContext.current().getCallingAccount();
+ 
+         Site2SiteVpnGatewayVO vpnGateway = _vpnGatewayDao.findById(id);
+         if (vpnGateway == null) {
+             throw new InvalidParameterValueException("Fail to find vpn gateway with " + id);
+         }
+ 
+         _accountMgr.checkAccess(caller, null, false, vpnGateway);
+         if (customId != null) {
+             vpnGateway.setUuid(customId);
+         }
+         _vpnGatewayDao.update(id, vpnGateway);
+         return _vpnGatewayDao.findById(id);
+ 
+     }
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/resource/ResourceManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/server/ManagementServerImpl.java
index 0fe7f17,2a08ddc4..bd84692
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@@ -433,8 -434,11 +438,11 @@@ import org.apache.cloudstack.api.comman
  import org.apache.cloudstack.api.command.user.vpn.ListVpnUsersCmd;
  import org.apache.cloudstack.api.command.user.vpn.RemoveVpnUserCmd;
  import org.apache.cloudstack.api.command.user.vpn.ResetVpnConnectionCmd;
+ import org.apache.cloudstack.api.command.user.vpn.UpdateRemoteAccessVpnCmd;
+ import org.apache.cloudstack.api.command.user.vpn.UpdateVpnConnectionCmd;
  import org.apache.cloudstack.api.command.user.vpn.UpdateVpnCustomerGatewayCmd;
+ import org.apache.cloudstack.api.command.user.vpn.UpdateVpnGatewayCmd;
 -import org.apache.cloudstack.api.command.user.zone.ListZonesByCmd;
 +import org.apache.cloudstack.api.command.user.zone.ListZonesCmd;
  import org.apache.cloudstack.config.Configuration;
  import org.apache.cloudstack.context.CallContext;
  import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/template/TemplateManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/template/TemplateManagerImpl.java
index c84a9b7,70e4a49..dde18b9
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@@ -74,9 -72,6 +74,8 @@@ import org.apache.cloudstack.framework.
  import org.apache.cloudstack.framework.config.ConfigKey;
  import org.apache.cloudstack.framework.config.Configurable;
  import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
- import org.apache.cloudstack.framework.jobs.AsyncJobManager;
 +import org.apache.cloudstack.framework.messagebus.MessageBus;
 +import org.apache.cloudstack.framework.messagebus.PublishScope;
  import org.apache.cloudstack.managed.context.ManagedContextRunnable;
  import org.apache.cloudstack.storage.command.AttachCommand;
  import org.apache.cloudstack.storage.command.CommandResult;
@@@ -198,118 -175,78 +180,82 @@@ public class TemplateManagerImpl extend
      private final static Logger s_logger = Logger.getLogger(TemplateManagerImpl.class);
  
      @Inject
-     VMTemplateDao _tmpltDao;
+     private VMTemplateDao _tmpltDao;
      @Inject
-     TemplateDataStoreDao _tmplStoreDao;
+     private TemplateDataStoreDao _tmplStoreDao;
      @Inject
-     VMTemplatePoolDao _tmpltPoolDao;
+     private VMTemplatePoolDao _tmpltPoolDao;
      @Inject
-     VMTemplateZoneDao _tmpltZoneDao;
+     private VMTemplateZoneDao _tmpltZoneDao;
      @Inject
-     protected UserVmDetailsDao _vmDetailsDao;
+     private VMInstanceDao _vmInstanceDao;
      @Inject
-     protected VMTemplateDetailsDao _templateDetailsDao;
+     private PrimaryDataStoreDao _poolDao;
      @Inject
-     VMInstanceDao _vmInstanceDao;
+     private StoragePoolHostDao _poolHostDao;
      @Inject
-     PrimaryDataStoreDao _poolDao;
+     private AccountDao _accountDao;
      @Inject
-     StoragePoolHostDao _poolHostDao;
+     private AgentManager _agentMgr;
      @Inject
-     EventDao _eventDao;
+     private AccountManager _accountMgr;
      @Inject
-     DownloadMonitor _downloadMonitor;
+     private HostDao _hostDao;
      @Inject
-     UploadMonitor _uploadMonitor;
+     private DataCenterDao _dcDao;
      @Inject
-     UserAccountDao _userAccountDao;
+     private UserVmDao _userVmDao;
      @Inject
-     AccountDao _accountDao;
+     private VolumeDao _volumeDao;
      @Inject
-     UserDao _userDao;
+     private SnapshotDao _snapshotDao;
      @Inject
-     AgentManager _agentMgr;
+     private ConfigurationDao _configDao;
      @Inject
-     AccountManager _accountMgr;
+     private DomainDao _domainDao;
      @Inject
-     HostDao _hostDao;
+     private GuestOSDao _guestOSDao;
      @Inject
-     DataCenterDao _dcDao;
+     private StorageManager _storageMgr;
      @Inject
-     UserVmDao _userVmDao;
+     private UsageEventDao _usageEventDao;
      @Inject
-     VolumeDao _volumeDao;
+     private AccountService _accountService;
      @Inject
-     SnapshotDao _snapshotDao;
+     private ResourceLimitService _resourceLimitMgr;
      @Inject
-     ConfigurationDao _configDao;
+     private LaunchPermissionDao _launchPermissionDao;
      @Inject
-     ClusterDao _clusterDao;
+     private ProjectManager _projectMgr;
      @Inject
-     DomainDao _domainDao;
+     private VolumeDataFactory _volFactory;
      @Inject
-     UploadDao _uploadDao;
+     private TemplateDataFactory _tmplFactory;
      @Inject
-     protected GuestOSDao _guestOSDao;
+     private SnapshotDataFactory _snapshotFactory;
      @Inject
-     StorageManager _storageMgr;
+     private TemplateService _tmpltSvr;
      @Inject
-     AsyncJobManager _asyncMgr;
+     private DataStoreManager _dataStoreMgr;
      @Inject
-     UserVmManager _vmMgr;
+     private VolumeOrchestrationService _volumeMgr;
      @Inject
-     UsageEventDao _usageEventDao;
+     private EndPointSelector _epSelector;
      @Inject
-     HypervisorGuruManager _hvGuruMgr;
-     @Inject
-     AccountService _accountService;
-     @Inject
-     ResourceLimitService _resourceLimitMgr;
-     @Inject
-     SecondaryStorageVmManager _ssvmMgr;
-     @Inject
-     LaunchPermissionDao _launchPermissionDao;
-     @Inject
-     ProjectManager _projectMgr;
-     @Inject
-     VolumeDataFactory _volFactory;
-     @Inject
-     TemplateDataFactory _tmplFactory;
-     @Inject
-     SnapshotDataFactory _snapshotFactory;
-     @Inject
-     TemplateService _tmpltSvr;
-     @Inject
-     DataStoreManager _dataStoreMgr;
-     @Inject
-     protected ResourceManager _resourceMgr;
-     @Inject
-     VolumeOrchestrationService _volumeMgr;
-     @Inject
-     ImageStoreDao _imageStoreDao;
-     @Inject
-     EndPointSelector _epSelector;
-     @Inject
-     UserVmJoinDao _userVmJoinDao;
-     @Inject
-     VMTemplateHostDao _vmTemplateHostDao;
+     private UserVmJoinDao _userVmJoinDao;
 +
 +    @Inject
-     ConfigurationServer _configServer;
-     @Inject
 +    MessageBus _messageBus;
 +
-     int _primaryStorageDownloadWait;
-     int _storagePoolMaxWaitSeconds = 3600;
-     boolean _disableExtraction = false;
-     ExecutorService _preloadExecutor;
+     private boolean _disableExtraction = false;
+     private ExecutorService _preloadExecutor;
  
-     protected List<TemplateAdapter> _adapters;
+     private List<TemplateAdapter> _adapters;
  
      @Inject
-     StorageCacheManager cacheMgr;
+     private StorageCacheManager cacheMgr;
      @Inject
-     EndPointSelector selector;
+     private EndPointSelector selector;
  
      private TemplateAdapter getAdapter(HypervisorType type) {
          TemplateAdapter adapter = null;
@@@ -432,9 -369,9 +378,9 @@@
          if (isISO) {
              desc = Upload.Type.ISO.toString();
          }
-         eventId = (eventId == null ? 0 : eventId);
+         eventId = eventId == null ? 0 : eventId;
  
 -        if (!_accountMgr.isRootAdmin(caller.getType()) && _disableExtraction) {
 +        if (!_accountMgr.isRootAdmin(caller.getId()) && _disableExtraction) {
              throw new PermissionDeniedException("Extraction has been disabled by admin");
          }
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/vm/UserVmManagerImpl.java
index 0089476,f6f20cc..2957bac
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@@ -4559,16 -4735,19 +4557,19 @@@ public class UserVmManagerImpl extends 
          _volsDao.detachVolume(root.getId());
          volumeMgr.destroyVolume(root);
  
-         // For VMware hypervisor since the old root volume is replaced by the new root volume in storage, force expunge old root volume
+         // For VMware hypervisor since the old root volume is replaced by the new root volume, force expunge old root volume if it has been created in storage
          if (vm.getHypervisorType() == HypervisorType.VMware) {
+             VolumeInfo volumeInStorage = volFactory.getVolume(root.getId());
+             if (volumeInStorage != null) {
 -                s_logger.info("Expunging volume " + root.getId() + " from primary data store");
 -                AsyncCallFuture<VolumeApiResult> future = _volService.expungeVolumeAsync(volFactory.getVolume(root.getId()));
 -                try {
 -                    future.get();
 -                } catch (Exception e) {
 -                    s_logger.debug("Failed to expunge volume:" + root.getId(), e);
 -                }
 +            s_logger.info("Expunging volume " + root.getId() + " from primary data store");
 +            AsyncCallFuture<VolumeApiResult> future = _volService.expungeVolumeAsync(volFactory.getVolume(root.getId()));
 +            try {
 +                future.get();
 +            } catch (Exception e) {
 +                s_logger.debug("Failed to expunge volume:" + root.getId(), e);
              }
          }
++        }
  
          if (template.getEnablePassword()) {
              String password = generateRandomPassword();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b58a45e/server/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerManagerImpl.java
----------------------------------------------------------------------


Mime
View raw message