cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [50/50] [abbrv] git commit: updated refs/heads/object_store to a0c3d28
Date Wed, 15 May 2013 07:42:33 GMT
merge to master


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

Branch: refs/heads/object_store
Commit: a0c3d280b4eae3005e0b991d7c171e099331b727
Parents: ed06541 be98501
Author: Edison Su <edison.su@citrix.com>
Authored: Wed May 15 00:40:53 2013 -0700
Committer: Edison Su <edison.su@citrix.com>
Committed: Wed May 15 00:40:53 2013 -0700

----------------------------------------------------------------------
 agent/pom.xml                                      |    5 +
 agent/src/com/cloud/agent/AgentShell.java          |  108 +-
 api/src/com/cloud/agent/api/to/DnsmasqTO.java      |   53 +
 api/src/com/cloud/agent/api/to/NetworkACLTO.java   |   49 +-
 api/src/com/cloud/async/AsyncJob.java              |    2 +
 api/src/com/cloud/event/EventTypes.java            |   43 +-
 .../exception/MissingParameterValueException.java  |   25 +
 api/src/com/cloud/network/IpAddress.java           |    3 +
 api/src/com/cloud/network/Network.java             |   24 +-
 api/src/com/cloud/network/NetworkModel.java        |    7 +
 api/src/com/cloud/network/NetworkProfile.java      |   19 +
 api/src/com/cloud/network/NetworkService.java      |    9 +-
 .../network/VirtualNetworkApplianceService.java    |    2 +
 .../com/cloud/network/VirtualRouterProvider.java   |    3 +-
 .../cloud/network/element/DhcpServiceProvider.java |    2 +
 .../network/element/NetworkACLServiceProvider.java |    3 +-
 api/src/com/cloud/network/element/VpcProvider.java |    2 +
 .../cloud/network/firewall/NetworkACLService.java  |   51 -
 .../com/cloud/network/lb/LoadBalancingRule.java    |   83 +-
 .../network/lb/LoadBalancingRulesService.java      |   16 +-
 .../com/cloud/network/router/VirtualRouter.java    |    2 +-
 api/src/com/cloud/network/rules/LoadBalancer.java  |   10 +-
 .../cloud/network/rules/LoadBalancerContainer.java |   33 +
 api/src/com/cloud/network/vpc/NetworkACL.java      |   36 +
 api/src/com/cloud/network/vpc/NetworkACLItem.java  |   80 +
 .../com/cloud/network/vpc/NetworkACLService.java   |  135 +
 api/src/com/cloud/network/vpc/VpcGateway.java      |    5 +
 api/src/com/cloud/network/vpc/VpcOffering.java     |    1 +
 api/src/com/cloud/network/vpc/VpcService.java      |    3 +-
 api/src/com/cloud/offering/NetworkOffering.java    |   11 +
 api/src/com/cloud/offering/ServiceOffering.java    |    1 +
 .../com/cloud/server/ResourceMetaDataService.java  |   47 +
 api/src/com/cloud/server/ResourceTag.java          |    1 +
 .../com/cloud/server/TaggedResourceService.java    |    5 +-
 api/src/com/cloud/storage/VolumeApiService.java    |    8 +-
 api/src/com/cloud/vm/NicIpAlias.java               |   45 +
 api/src/com/cloud/vm/UserVmService.java            |   22 +-
 api/src/com/cloud/vm/VirtualMachine.java           |    3 +-
 .../org/apache/cloudstack/api/ApiConstants.java    |   13 +
 api/src/org/apache/cloudstack/api/BaseCmd.java     |   11 +-
 .../apache/cloudstack/api/ResponseGenerator.java   |  134 +-
 .../ConfigureInternalLoadBalancerElementCmd.java   |  114 +
 .../CreateInternalLoadBalancerElementCmd.java      |  116 +
 .../admin/internallb/ListInternalLBVMsCmd.java     |  151 +
 .../ListInternalLoadBalancerElementsCmd.java       |   99 +
 .../admin/internallb/StartInternalLBVMCmd.java     |  120 +
 .../admin/internallb/StopInternalLBVMCmd.java      |  123 +
 .../admin/network/CreateNetworkOfferingCmd.java    |   15 +-
 .../admin/offering/CreateDiskOfferingCmd.java      |    9 +-
 .../router/CreateVirtualRouterElementCmd.java      |   21 +-
 .../api/command/admin/router/ListRoutersCmd.java   |    7 +-
 .../api/command/admin/router/StartRouterCmd.java   |   10 +-
 .../api/command/admin/router/StopRouterCmd.java    |   11 +-
 .../command/admin/vpc/CreatePrivateGatewayCmd.java |   15 +-
 .../CreateApplicationLoadBalancerCmd.java          |  218 +
 .../loadbalancer/CreateLoadBalancerRuleCmd.java    |    6 +-
 .../DeleteApplicationLoadBalancerCmd.java          |  116 +
 .../ListApplicationLoadBalancersCmd.java           |  131 +
 .../command/user/network/CreateNetworkACLCmd.java  |  222 +-
 .../user/network/CreateNetworkACLListCmd.java      |  120 +
 .../api/command/user/network/CreateNetworkCmd.java |   22 +-
 .../command/user/network/DeleteNetworkACLCmd.java  |   43 +-
 .../user/network/DeleteNetworkACLListCmd.java      |   93 +
 .../user/network/ListNetworkACLListsCmd.java       |  102 +
 .../command/user/network/ListNetworkACLsCmd.java   |   46 +-
 .../user/network/ReplaceNetworkACLListCmd.java     |  120 +
 .../user/network/UpdateNetworkACLItemCmd.java      |  173 +
 .../api/command/user/network/UpdateNetworkCmd.java |    9 +-
 .../api/command/user/vm/DeployVMCmd.java           |   14 +-
 .../api/command/user/vm/UpdateVMCmd.java           |    7 +
 .../command/user/volume/AddResourceDetailCmd.java  |  116 +
 .../api/command/user/volume/CreateVolumeCmd.java   |    8 +-
 .../user/volume/ListResourceDetailsCmd.java        |   75 +
 .../user/volume/RemoveResourceDetailCmd.java       |  110 +
 .../api/command/user/volume/UpdateVolumeCmd.java   |  112 +
 .../ApplicationLoadBalancerInstanceResponse.java   |   63 +
 .../response/ApplicationLoadBalancerResponse.java  |  142 +
 .../ApplicationLoadBalancerRuleResponse.java       |   51 +
 .../api/response/DiskOfferingResponse.java         |   12 +
 .../api/response/DomainRouterResponse.java         |   13 +-
 .../InternalLoadBalancerElementResponse.java       |   51 +
 .../api/response/NetworkACLItemResponse.java       |  122 +
 .../api/response/NetworkACLResponse.java           |   78 +-
 .../api/response/NetworkOfferingResponse.java      |    9 +
 .../cloudstack/api/response/NetworkResponse.java   |   13 +-
 .../cloudstack/api/response/NicDetailResponse.java |   81 +
 .../api/response/PrivateGatewayResponse.java       |    9 +
 .../api/response/ResourceDetailResponse.java       |   81 +
 .../cloudstack/api/response/UserVmResponse.java    |    9 +
 .../response/VirtualRouterProviderResponse.java    |    1 +
 .../api/response/VolumeDetailResponse.java         |   82 +
 .../cloudstack/api/response/VolumeResponse.java    |   12 +
 .../InternalLoadBalancerElementService.java        |   56 +
 .../lb/ApplicationLoadBalancerContainer.java       |   28 +
 .../network/lb/ApplicationLoadBalancerRule.java    |   24 +
 .../network/lb/ApplicationLoadBalancerService.java |   42 +
 .../network/lb/InternalLoadBalancerVMService.java  |   34 +
 .../org/apache/cloudstack/query/QueryService.java  |   10 +
 client/pom.xml                                     |    5 +
 client/tomcatconf/applicationContext.xml.in        |   16 +-
 client/tomcatconf/commands.properties.in           |   38 +-
 client/tomcatconf/componentContext.xml.in          |    2 +
 client/tomcatconf/nonossComponentContext.xml.in    |    2 +
 client/tomcatconf/simulatorComponentContext.xml.in |    1 +
 .../agent/api/routing/CreateIpAliasCommand.java    |   36 +
 .../agent/api/routing/DeleteIpAliasCommand.java    |   50 +
 .../agent/api/routing/DnsMasqConfigCommand.java    |   65 +
 .../src/com/cloud/agent/api/routing/IpAliasTO.java |   42 +
 .../agent/api/routing/NetworkElementCommand.java   |    2 +
 .../agent/api/routing/SetNetworkACLCommand.java    |   19 +-
 .../virtualnetwork/VirtualRoutingResource.java     |  132 +-
 .../src/com/cloud/network/DnsMasqConfigurator.java |  118 +
 core/src/com/cloud/storage/VolumeDetailVO.java     |   85 +
 .../api/agent/test/BackupSnapshotCommandTest.java  |   36 -
 .../api/agent/test/SnapshotCommandTest.java        |    6 -
 debian/changelog                                   |    6 +
 debian/rules                                       |    2 +-
 docs/en-US/Installation_Guide.xml                  |    1 +
 docs/en-US/Release_Notes.xml                       |   12 +-
 docs/en-US/added-API-commands-4.2.xml              |   33 +-
 docs/en-US/aws-ec2-configuration.xml               |    2 +-
 docs/en-US/build-rpm.xml                           |    2 +-
 docs/en-US/change-database-password.xml            |    6 +-
 docs/en-US/citrix-xenserver-installation.xml       |    2 +-
 docs/en-US/configure-usage-server.xml              |    4 +-
 docs/en-US/creating-network-offerings.xml          |    2 +-
 docs/en-US/database-replication.xml                |    6 +-
 docs/en-US/delete-event-alerts.xml                 |    5 +-
 .../external-firewalls-and-load-balancers.xml      |    1 +
 docs/en-US/gslb.xml                                |  582 ++-
 docs/en-US/host-add-xenserver-kvm-ovm.xml          |    4 +-
 docs/en-US/hypervisor-host-install-agent.xml       |    6 +-
 docs/en-US/hypervisor-host-install-libvirt.xml     |    2 +-
 docs/en-US/images/gslb.png                         |  Bin 184080 -> 60354 bytes
 .../increase-management-server-max-memory.xml      |    2 +-
 docs/en-US/install-usage-server.xml                |    2 +-
 docs/en-US/lxc-install.xml                         |    4 +-
 docs/en-US/networks.xml                            |    3 +-
 docs/en-US/set-database-buffer-pool-size.xml       |    2 +-
 docs/en-US/set-global-project-resource-limits.xml  |    2 +-
 docs/en-US/set-projects-creator-permissions.xml    |    2 +-
 docs/en-US/set-up-invitations.xml                  |    2 +-
 docs/en-US/stop-restart-management-server.xml      |    6 +-
 docs/en-US/storage-setup.xml                       |  192 +
 docs/en-US/sys-offering-sysvm.xml                  |    2 +-
 docs/en-US/zone-add.xml                            |    2 +-
 engine/schema/src/com/cloud/dc/dao/VlanDao.java    |    6 +-
 .../schema/src/com/cloud/dc/dao/VlanDaoImpl.java   |   38 +-
 .../com/cloud/network/dao/FirewallRulesDao.java    |    1 -
 .../src/com/cloud/network/dao/IPAddressDao.java    |    8 +-
 .../com/cloud/network/dao/IPAddressDaoImpl.java    |   39 +-
 .../src/com/cloud/network/dao/IPAddressVO.java     |    9 +-
 .../src/com/cloud/network/dao/LoadBalancerDao.java |   10 +-
 .../com/cloud/network/dao/LoadBalancerDaoImpl.java |   74 +-
 .../src/com/cloud/network/dao/LoadBalancerVO.java  |   18 +
 .../src/com/cloud/network/dao/NetworkDao.java      |    2 +
 .../src/com/cloud/network/dao/NetworkDaoImpl.java  |    9 +
 .../cloud/network/dao/NetworkServiceMapDao.java    |    1 +
 .../network/dao/NetworkServiceMapDaoImpl.java      |    9 +
 .../src/com/cloud/network/dao/NetworkVO.java       |   28 +-
 .../com/cloud/network/rules/FirewallRuleVO.java    |    2 -
 .../src/com/cloud/network/vpc/VpcGatewayVO.java    |   17 +-
 .../com/cloud/network/vpc/dao/VpcGatewayDao.java   |    7 +
 .../cloud/network/vpc/dao/VpcGatewayDaoImpl.java   |   27 +
 .../cloud/offerings/NetworkOfferingDetailsVO.java  |   90 +
 .../src/com/cloud/offerings/NetworkOfferingVO.java |   44 +-
 .../cloud/offerings/dao/NetworkOfferingDao.java    |    4 +
 .../offerings/dao/NetworkOfferingDaoImpl.java      |   24 +
 .../offerings/dao/NetworkOfferingDetailsDao.java   |   31 +
 .../dao/NetworkOfferingDetailsDaoImpl.java         |   79 +
 .../src/com/cloud/storage/DiskOfferingVO.java      |   12 +
 engine/schema/src/com/cloud/storage/VolumeVO.java  |   14 +-
 .../src/com/cloud/upgrade/dao/Upgrade302to40.java  |   51 +-
 .../src/com/cloud/upgrade/dao/Upgrade410to420.java |  254 +-
 engine/schema/src/com/cloud/vm/VMInstanceVO.java   |   11 +
 engine/schema/src/com/cloud/vm/dao/NicDao.java     |    8 +-
 engine/schema/src/com/cloud/vm/dao/NicDaoImpl.java |   21 +-
 engine/schema/src/com/cloud/vm/dao/UserVmDao.java  |    3 +-
 .../schema/src/com/cloud/vm/dao/UserVmDaoImpl.java |    3 +-
 .../lb/ApplicationLoadBalancerRuleVO.java          |  133 +
 .../lb/dao/ApplicationLoadBalancerRuleDao.java     |   35 +
 .../lb/dao/ApplicationLoadBalancerRuleDaoImpl.java |  115 +
 .../storage/image/TemplateServiceImpl.java         |    5 +
 .../cloudstack/storage/volume/db/VolumeVO.java     |    2 +
 .../datastore/provider/DefaultHostListener.java    |    2 +-
 .../storage/volume/VolumeServiceImpl.java          |    5 +-
 packaging/centos63/cloud.spec                      |    7 +
 .../debian/config/etc/init.d/cloud-early-config    |   26 +
 .../debian/config/etc/iptables/iptables-ilbvm      |   33 +
 .../systemvm/debian/config/opt/cloud/bin/ilb.sh    |  211 +
 .../debian/config/opt/cloud/bin/patchsystemvm.sh   |   23 +
 .../debian/config/opt/cloud/bin/vpc_acl.sh         |   11 +-
 .../config/opt/cloud/bin/vpc_loadbalancer.sh       |   23 +
 .../config/opt/cloud/bin/vpc_privategw_acl.sh      |  224 +
 .../systemvm/debian/config/root/createIpAlias.sh   |   35 +
 .../systemvm/debian/config/root/deleteIpAlias.sh   |   43 +
 patches/systemvm/debian/config/root/dnsmasq.sh     |   43 +
 .../networkservice/BaremetalDhcpElement.java       |   41 +-
 .../kvm/resource/LibvirtComputingResource.java     |    3 +-
 plugins/hypervisors/vmware/pom.xml                 |   10 +
 .../hypervisor/vmware/resource/VmwareResource.java |  258 +-
 .../vmware/resource/VmwareResourceTest.java        |   82 +
 .../xen/resource/CitrixResourceBase.java           |  166 +-
 .../network/cisco/create-egress-acl-rule.xml       |   53 +-
 .../create-generic-egress-acl-no-protocol-rule.xml |   94 +
 .../cisco/create-generic-egress-acl-rule.xml       |    1 -
 .../network/cisco/create-ingress-acl-rule.xml      |   43 +-
 .../commands/ListCiscoAsa1000vResourcesCmd.java    |    1 +
 .../api/commands/ListCiscoVnmcResourcesCmd.java    |   15 +-
 .../response/CiscoAsa1000vResourceResponse.java    |   45 +-
 .../api/response/CiscoVnmcResourceResponse.java    |   42 +-
 .../cloud/network/cisco/CiscoVnmcConnection.java   |   10 +-
 .../network/cisco/CiscoVnmcConnectionImpl.java     |   77 +-
 .../cloud/network/element/CiscoVnmcElement.java    |   42 +-
 .../cloud/network/resource/CiscoVnmcResource.java  |   30 +-
 .../network/resource/CiscoVnmcResourceTest.java    |   17 +-
 .../element/ElasticLoadBalancerElement.java        |   22 +-
 .../network/lb/ElasticLoadBalancerManager.java     |    4 +-
 .../network/lb/ElasticLoadBalancerManagerImpl.java |   32 +-
 .../element/F5ExternalLoadBalancerElement.java     |   87 +-
 .../network-elements/internal-loadbalancer/pom.xml |   50 +
 .../element/InternalLoadBalancerElement.java       |  548 ++
 .../network/lb/InternalLoadBalancerVMManager.java  |   90 +
 .../lb/InternalLoadBalancerVMManagerImpl.java      |  958 +++
 .../ElementChildTestConfiguration.java             |  125 +
 .../InternalLbElementServiceTest.java              |  189 +
 .../internallbelement/InternalLbElementTest.java   |  226 +
 .../internallbvmmgr/InternalLBVMManagerTest.java   |  388 +
 .../internallbvmmgr/InternalLBVMServiceTest.java   |  278 +
 .../internallbvmmgr/LbChildTestConfiguration.java  |  180 +
 .../test/resources/lb_element.xml                  |   46 +
 .../test/resources/lb_mgr.xml                      |   46 +
 .../test/resources/lb_svc.xml                      |   46 +
 .../com/cloud/network/element/MidoNetElement.java  |   59 +-
 .../cloud/network/element/NetscalerElement.java    |  112 +-
 plugins/pom.xml                                    |    1 +
 pom.xml                                            |    2 +
 scripts/vm/hypervisor/xenserver/createipAlias.sh   |   26 +
 scripts/vm/hypervisor/xenserver/deleteipAlias.sh   |   25 +
 scripts/vm/hypervisor/xenserver/vmops              |   47 +-
 scripts/vm/hypervisor/xenserver/xcpserver/patch    |    2 +
 scripts/vm/hypervisor/xenserver/xenserver56/patch  |    2 +
 .../vm/hypervisor/xenserver/xenserver56fp1/patch   |    2 +
 scripts/vm/hypervisor/xenserver/xenserver60/patch  |    2 +
 server/pom.xml                                     |    4 +-
 server/src/com/cloud/api/ApiDBUtils.java           |   37 +-
 server/src/com/cloud/api/ApiResponseHelper.java    |  187 +-
 .../src/com/cloud/api/query/QueryManagerImpl.java  |  155 +-
 .../api/query/dao/DiskOfferingJoinDaoImpl.java     |    5 +-
 .../api/query/dao/DomainRouterJoinDaoImpl.java     |    9 +-
 .../com/cloud/api/query/dao/UserVmJoinDaoImpl.java |    1 +
 .../com/cloud/api/query/dao/VolumeJoinDaoImpl.java |    1 +
 .../com/cloud/api/query/vo/DiskOfferingJoinVO.java |   11 +
 .../com/cloud/api/query/vo/DomainRouterJoinVO.java |   17 +-
 .../src/com/cloud/api/query/vo/UserVmJoinVO.java   |   10 +
 .../src/com/cloud/api/query/vo/VolumeJoinVO.java   |   10 +
 server/src/com/cloud/configuration/Config.java     |    5 +-
 .../cloud/configuration/ConfigurationManager.java  |   16 +-
 .../configuration/ConfigurationManagerImpl.java    |  456 +-
 .../cloud/metadata/ResourceMetaDataManager.java    |   22 +
 .../metadata/ResourceMetaDataManagerImpl.java      |  247 +
 .../network/ExternalLoadBalancerDeviceManager.java |    6 +-
 .../ExternalLoadBalancerDeviceManagerImpl.java     |   33 +-
 .../ExternalLoadBalancerUsageManagerImpl.java      |   34 +-
 server/src/com/cloud/network/NetworkManager.java   |   13 +-
 .../src/com/cloud/network/NetworkManagerImpl.java  |  184 +-
 server/src/com/cloud/network/NetworkModelImpl.java |   57 +-
 .../src/com/cloud/network/NetworkServiceImpl.java  |  137 +-
 server/src/com/cloud/network/addr/PublicIp.java    |    4 +
 .../network/element/VirtualRouterElement.java      |  115 +-
 .../network/element/VpcVirtualRouterElement.java   |   58 +-
 .../network/firewall/FirewallManagerImpl.java      |   81 +-
 .../network/guru/ExternalGuestNetworkGuru.java     |   40 +-
 .../com/cloud/network/guru/GuestNetworkGuru.java   |   43 +-
 .../com/cloud/network/lb/LBHealthCheckManager.java |    4 +-
 .../cloud/network/lb/LBHealthCheckManagerImpl.java |    9 +-
 .../network/lb/LoadBalancingRulesManager.java      |   24 +-
 .../network/lb/LoadBalancingRulesManagerImpl.java  |  402 +-
 .../router/VirtualNetworkApplianceManager.java     |   17 +-
 .../router/VirtualNetworkApplianceManagerImpl.java |  332 +-
 .../router/VpcVirtualNetworkApplianceManager.java  |    9 +-
 .../VpcVirtualNetworkApplianceManagerImpl.java     |   93 +-
 .../src/com/cloud/network/rules/RulesManager.java  |    3 +
 .../com/cloud/network/rules/RulesManagerImpl.java  |   38 +
 .../com/cloud/network/vpc/NetworkACLItemDao.java   |   37 +
 .../com/cloud/network/vpc/NetworkACLItemVO.java    |  237 +
 .../com/cloud/network/vpc/NetworkACLManager.java   |  133 +-
 .../cloud/network/vpc/NetworkACLManagerImpl.java   |  596 +-
 .../cloud/network/vpc/NetworkACLServiceImpl.java   |  491 ++
 server/src/com/cloud/network/vpc/NetworkACLVO.java |   79 +
 .../cloud/network/vpc/PrivateGatewayProfile.java   |    6 +
 server/src/com/cloud/network/vpc/VpcManager.java   |   11 +-
 .../src/com/cloud/network/vpc/VpcManagerImpl.java  |  112 +-
 .../com/cloud/network/vpc/dao/NetworkACLDao.java   |   23 +
 .../cloud/network/vpc/dao/NetworkACLDaoImpl.java   |   35 +
 .../network/vpc/dao/NetworkACLItemDaoImpl.java     |  113 +
 .../com/cloud/server/ConfigurationServerImpl.java  |   14 +-
 .../src/com/cloud/server/ManagementServerImpl.java |  518 ++-
 .../src/com/cloud/storage/VolumeManagerImpl.java   |   31 +
 .../com/cloud/storage/dao/VolumeDetailsDao.java    |   36 +
 .../cloud/storage/dao/VolumeDetailsDaoImpl.java    |  114 +
 .../com/cloud/tags/TaggedResourceManagerImpl.java  |   25 +-
 .../cloud/uuididentity/dao/IdentityDaoImpl.java    |    4 +-
 server/src/com/cloud/vm/NicDetailVO.java           |   85 +
 server/src/com/cloud/vm/UserVmManagerImpl.java     |   95 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java    |   50 +-
 server/src/com/cloud/vm/dao/NicDetailDao.java      |   35 +
 server/src/com/cloud/vm/dao/NicDetailDaoImpl.java  |  110 +
 server/src/com/cloud/vm/dao/NicIpAliasDao.java     |   61 +
 server/src/com/cloud/vm/dao/NicIpAliasDaoImpl.java |  186 +
 server/src/com/cloud/vm/dao/NicIpAliasVO.java      |  226 +
 .../lb/ApplicationLoadBalancerManagerImpl.java     |  524 ++
 .../cloud/configuration/ValidateIpRangeTest.java   |   71 +
 .../metadata/ResourceMetaDataManagerTest.java      |  117 +
 .../com/cloud/network/MockNetworkManagerImpl.java  |   58 +-
 .../com/cloud/network/MockNetworkModelImpl.java    |   17 +
 .../com/cloud/network/MockRulesManagerImpl.java    |    8 +
 .../test/com/cloud/vm/MockUserVmManagerImpl.java   |   10 +-
 server/test/com/cloud/vm/UserVmManagerTest.java    |   87 +-
 .../cloud/vpc/MockConfigurationManagerImpl.java    |   81 +-
 .../test/com/cloud/vpc/MockNetworkManagerImpl.java |   92 +-
 .../test/com/cloud/vpc/MockNetworkModelImpl.java   |   17 +
 server/test/com/cloud/vpc/MockVpcManagerImpl.java  |   26 +-
 .../vpc/MockVpcVirtualNetworkApplianceManager.java |   34 +-
 .../test/com/cloud/vpc/NetworkACLManagerTest.java  |  201 +
 .../test/com/cloud/vpc/NetworkACLServiceTest.java  |  226 +
 server/test/com/cloud/vpc/VpcTest.java             |  269 +
 .../test/com/cloud/vpc/dao/MockNetworkDaoImpl.java |    5 +
 .../cloud/vpc/dao/MockNetworkOfferingDaoImpl.java  |   12 +-
 .../vpc/dao/MockNetworkServiceMapDaoImpl.java      |    6 +
 .../cloudstack/lb/ApplicationLoadBalancerTest.java |  292 +
 .../cloudstack/lb/ChildTestConfiguration.java      |  105 +
 .../networkoffering/CreateNetworkOfferingTest.java |   89 +-
 .../cloudstack/privategw/AclOnPrivateGwTest.java   |  286 +
 server/test/resources/appLoadBalancer.xml          |   43 +
 server/test/resources/createNetworkOffering.xml    |   21 +-
 services/console-proxy/server/js/ajaxkeys.js       |   70 +-
 setup/db/db/schema-302to40.sql                     |   10 +-
 setup/db/db/schema-40to410.sql                     |    4 +-
 setup/db/db/schema-410to420.sql                    |  474 ++-
 setup/dev/advanced.cfg                             |    4 +
 test/integration/component/test_asa1000v_fw.py     |    2 +-
 test/integration/component/test_eip_elb.py         |    4 +-
 .../component/test_high_availability.py            | 1080 +++
 .../component/test_host_high_availability.py       |  814 +++
 .../component/test_multiple_ip_ranges.py           |  124 +-
 .../component/test_netscaler_configs.py            | 3024 ++++++++
 test/integration/component/test_netscaler_lb.py    | 2964 ++++++++
 .../component/test_netscaler_lb_algo.py            | 2031 ++++++
 .../component/test_netscaler_lb_sticky.py          | 1032 +++
 .../integration/component/test_netscaler_nw_off.py | 2370 ++++++
 .../integration/component/test_network_offering.py |    4 +-
 .../integration/component/test_redundant_router.py | 5581 +++++++++++++++
 test/integration/component/test_regions.py         |    1 -
 .../integration/component/test_regions_accounts.py |    2 +-
 test/integration/component/test_security_groups.py |    4 +-
 test/integration/component/test_shared_networks.py | 2986 ++++++++
 test/integration/component/test_stopped_vm.py      | 2036 ++++++
 test/integration/component/test_tags.py            | 2325 ++++++
 test/integration/component/test_vpc.py             | 2724 +++++++
 .../component/test_vpc_host_maintenance.py         |  891 +++
 test/integration/component/test_vpc_network.py     | 2587 +++++++
 .../component/test_vpc_network_lbrules.py          | 1025 +++
 .../component/test_vpc_network_pfrules.py          |  876 +++
 .../component/test_vpc_network_staticnatrule.py    |  710 ++
 test/integration/component/test_vpc_offerings.py   | 1201 ++++
 test/integration/component/test_vpc_routers.py     | 1398 ++++
 .../component/test_vpc_vm_life_cycle.py            | 3603 ++++++++++
 .../component/test_vpc_vms_deployment.py           | 2458 +++++++
 test/integration/component/test_vpn_users.py       |   22 +-
 test/integration/smoke/test_deploy_vm.py           |  153 +
 test/integration/smoke/test_global_settings.py     |    7 +-
 test/integration/smoke/test_guest_vlan_range.py    |    2 +-
 test/integration/smoke/test_internal_lb.py         |  250 +
 test/integration/smoke/test_network_acl.py         |  118 +
 test/integration/smoke/test_nicdetail.py           |  224 +
 test/integration/smoke/test_privategw_acl.py       |  148 +
 test/integration/smoke/test_resource_detail.py     |  188 +
 test/integration/smoke/test_volumedetail.py        |  239 +
 tools/apidoc/gen_toc.py                            |    2 +
 .../definitions/systemvmtemplate/postinstall.sh    |    8 +-
 .../definitions/systemvmtemplate64/postinstall.sh  |    8 +-
 tools/marvin/marvin/deployDataCenter.py            |   12 +
 .../marvin/marvin/sandbox/advanced/advanced_env.py |    5 +
 tools/marvin/setup.py                              |   14 +-
 ui/modules/infrastructure/infrastructure.js        |   75 +
 ui/modules/modules.js                              |    3 +
 ui/modules/vnmcAsa1000v/vnmcAsa1000v.js            |  183 +
 .../vnmcNetworkProvider/vnmcNetworkProvider.js     |  333 +
 ui/scripts/configuration.js                        |    2 +-
 ui/scripts/events.js                               |   10 +-
 ui/scripts/instances.js                            |    2 +-
 ui/scripts/system.js                               |    8 +
 ui/scripts/ui-custom/vpc.js                        |    1 +
 ui/scripts/vpc.js                                  |  217 +-
 ui/scripts/zoneWizard.js                           |  104 +
 usage/pom.xml                                      |    2 +-
 .../cloud/hypervisor/vmware/util/VmwareHelper.java |   26 +-
 398 files changed, 66010 insertions(+), 2785 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/api/src/com/cloud/storage/VolumeApiService.java
----------------------------------------------------------------------
diff --cc api/src/com/cloud/storage/VolumeApiService.java
index 462ff64,7e5ebe2..aa52cf7
--- a/api/src/com/cloud/storage/VolumeApiService.java
+++ b/api/src/com/cloud/storage/VolumeApiService.java
@@@ -80,9 -75,5 +75,10 @@@ public interface VolumeApiService 
  
      Volume detachVolumeFromVM(DetachVolumeCmd cmmd);
  
 +	Snapshot takeSnapshot(Long volumeId, Long policyId, Long snapshotId, Account account)
 +			throws ResourceAllocationException;
 +	
 +	Snapshot allocSnapshot(Long volumeId, Long policyId)
 +            throws ResourceAllocationException;
+     Volume updateVolume(UpdateVolumeCmd updateVolumeCmd);
  }

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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/api/src/org/apache/cloudstack/api/ResponseGenerator.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/ResponseGenerator.java
index 2546618,10bf305..dd2bd58
--- a/api/src/org/apache/cloudstack/api/ResponseGenerator.java
+++ b/api/src/org/apache/cloudstack/api/ResponseGenerator.java
@@@ -26,83 -33,91 +33,8 @@@ import com.cloud.network.vpc.VpcOfferin
  import org.apache.cloudstack.api.ApiConstants.HostDetails;
  import org.apache.cloudstack.api.ApiConstants.VMDetails;
  import org.apache.cloudstack.api.command.user.job.QueryAsyncJobResultCmd;
--import org.apache.cloudstack.api.response.AccountResponse;
- import org.apache.cloudstack.api.response.AsyncJobResponse;
- import org.apache.cloudstack.api.response.AutoScalePolicyResponse;
- import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse;
- import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse;
- import org.apache.cloudstack.api.response.CapacityResponse;
- import org.apache.cloudstack.api.response.ClusterResponse;
- import org.apache.cloudstack.api.response.ConditionResponse;
- import org.apache.cloudstack.api.response.ConfigurationResponse;
- import org.apache.cloudstack.api.response.CounterResponse;
- import org.apache.cloudstack.api.response.CreateCmdResponse;
- import org.apache.cloudstack.api.response.DiskOfferingResponse;
- import org.apache.cloudstack.api.response.DomainResponse;
- import org.apache.cloudstack.api.response.DomainRouterResponse;
- import org.apache.cloudstack.api.response.EventResponse;
- import org.apache.cloudstack.api.response.ExtractResponse;
- import org.apache.cloudstack.api.response.FirewallResponse;
- import org.apache.cloudstack.api.response.FirewallRuleResponse;
- import org.apache.cloudstack.api.response.GuestOSResponse;
- import org.apache.cloudstack.api.response.HostResponse;
- import org.apache.cloudstack.api.response.HypervisorCapabilitiesResponse;
- import org.apache.cloudstack.api.response.IPAddressResponse;
- import org.apache.cloudstack.api.response.InstanceGroupResponse;
- import org.apache.cloudstack.api.response.IpForwardingRuleResponse;
- import org.apache.cloudstack.api.response.IsolationMethodResponse;
- import org.apache.cloudstack.api.response.LBHealthCheckResponse;
- import org.apache.cloudstack.api.response.LBStickinessResponse;
- import org.apache.cloudstack.api.response.LDAPConfigResponse;
- import org.apache.cloudstack.api.response.LoadBalancerResponse;
- import org.apache.cloudstack.api.response.NetworkACLResponse;
- import org.apache.cloudstack.api.response.NetworkOfferingResponse;
- import org.apache.cloudstack.api.response.NetworkResponse;
- import org.apache.cloudstack.api.response.NicResponse;
- import org.apache.cloudstack.api.response.NicSecondaryIpResponse;
- import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
- import org.apache.cloudstack.api.response.PodResponse;
- import org.apache.cloudstack.api.response.PrivateGatewayResponse;
- import org.apache.cloudstack.api.response.ProjectAccountResponse;
- import org.apache.cloudstack.api.response.ProjectInvitationResponse;
- import org.apache.cloudstack.api.response.ProjectResponse;
- import org.apache.cloudstack.api.response.ProviderResponse;
- import org.apache.cloudstack.api.response.RegionResponse;
- import org.apache.cloudstack.api.response.RemoteAccessVpnResponse;
- import org.apache.cloudstack.api.response.ResourceCountResponse;
- import org.apache.cloudstack.api.response.ResourceLimitResponse;
- import org.apache.cloudstack.api.response.ResourceTagResponse;
- import org.apache.cloudstack.api.response.S3Response;
- import org.apache.cloudstack.api.response.SecurityGroupResponse;
- import org.apache.cloudstack.api.response.ServiceOfferingResponse;
- import org.apache.cloudstack.api.response.ServiceResponse;
- import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse;
- import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse;
- import org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse;
- import org.apache.cloudstack.api.response.SnapshotPolicyResponse;
- import org.apache.cloudstack.api.response.SnapshotResponse;
- import org.apache.cloudstack.api.response.SnapshotScheduleResponse;
- import org.apache.cloudstack.api.response.StaticRouteResponse;
- import org.apache.cloudstack.api.response.StorageNetworkIpRangeResponse;
- import org.apache.cloudstack.api.response.StoragePoolResponse;
- import org.apache.cloudstack.api.response.SwiftResponse;
- import org.apache.cloudstack.api.response.SystemVmInstanceResponse;
- import org.apache.cloudstack.api.response.SystemVmResponse;
- import org.apache.cloudstack.api.response.TemplatePermissionsResponse;
- import org.apache.cloudstack.api.response.TemplateResponse;
- import org.apache.cloudstack.api.response.TrafficMonitorResponse;
- import org.apache.cloudstack.api.response.TrafficTypeResponse;
- import org.apache.cloudstack.api.response.UsageRecordResponse;
- import org.apache.cloudstack.api.response.UserResponse;
- import org.apache.cloudstack.api.response.UserVmResponse;
- import org.apache.cloudstack.api.response.VMSnapshotResponse;
- import org.apache.cloudstack.api.response.VirtualRouterProviderResponse;
- import org.apache.cloudstack.api.response.VlanIpRangeResponse;
- import org.apache.cloudstack.api.response.VolumeResponse;
- import org.apache.cloudstack.api.response.VpcOfferingResponse;
- import org.apache.cloudstack.api.response.VpcResponse;
- import org.apache.cloudstack.api.response.VpnUsersResponse;
- import org.apache.cloudstack.api.response.ZoneResponse;
 -import org.apache.cloudstack.api.response.ApplicationLoadBalancerResponse;
 -import org.apache.cloudstack.api.response.AsyncJobResponse;
 -import org.apache.cloudstack.api.response.AutoScalePolicyResponse;
 -import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse;
 -import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse;
 -import org.apache.cloudstack.api.response.CapacityResponse;
 -import org.apache.cloudstack.api.response.ClusterResponse;
 -import org.apache.cloudstack.api.response.ConditionResponse;
 -import org.apache.cloudstack.api.response.ConfigurationResponse;
 -import org.apache.cloudstack.api.response.CounterResponse;
 -import org.apache.cloudstack.api.response.CreateCmdResponse;
 -import org.apache.cloudstack.api.response.DiskOfferingResponse;
 -import org.apache.cloudstack.api.response.DomainResponse;
 -import org.apache.cloudstack.api.response.DomainRouterResponse;
 -import org.apache.cloudstack.api.response.EventResponse;
 -import org.apache.cloudstack.api.response.ExtractResponse;
 -import org.apache.cloudstack.api.response.FirewallResponse;
 -import org.apache.cloudstack.api.response.FirewallRuleResponse;
 -import org.apache.cloudstack.api.response.GlobalLoadBalancerResponse;
 -import org.apache.cloudstack.api.response.GuestOSResponse;
 -import org.apache.cloudstack.api.response.GuestVlanRangeResponse;
 -import org.apache.cloudstack.api.response.HostForMigrationResponse;
 -import org.apache.cloudstack.api.response.HostResponse;
 -import org.apache.cloudstack.api.response.HypervisorCapabilitiesResponse;
 -import org.apache.cloudstack.api.response.IPAddressResponse;
 -import org.apache.cloudstack.api.response.InstanceGroupResponse;
 -import org.apache.cloudstack.api.response.InternalLoadBalancerElementResponse;
 -import org.apache.cloudstack.api.response.IpForwardingRuleResponse;
 -import org.apache.cloudstack.api.response.IsolationMethodResponse;
 -import org.apache.cloudstack.api.response.LBHealthCheckResponse;
 -import org.apache.cloudstack.api.response.LBStickinessResponse;
 -import org.apache.cloudstack.api.response.LDAPConfigResponse;
 -import org.apache.cloudstack.api.response.LoadBalancerResponse;
 -import org.apache.cloudstack.api.response.NetworkACLResponse;
 -import org.apache.cloudstack.api.response.NetworkOfferingResponse;
 -import org.apache.cloudstack.api.response.NetworkResponse;
 -import org.apache.cloudstack.api.response.NicResponse;
 -import org.apache.cloudstack.api.response.NicSecondaryIpResponse;
 -import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
 -import org.apache.cloudstack.api.response.PodResponse;
 -import org.apache.cloudstack.api.response.PrivateGatewayResponse;
 -import org.apache.cloudstack.api.response.ProjectAccountResponse;
 -import org.apache.cloudstack.api.response.ProjectInvitationResponse;
 -import org.apache.cloudstack.api.response.ProjectResponse;
 -import org.apache.cloudstack.api.response.ProviderResponse;
 -import org.apache.cloudstack.api.response.RegionResponse;
 -import org.apache.cloudstack.api.response.RemoteAccessVpnResponse;
 -import org.apache.cloudstack.api.response.ResourceCountResponse;
 -import org.apache.cloudstack.api.response.ResourceLimitResponse;
 -import org.apache.cloudstack.api.response.ResourceTagResponse;
 -import org.apache.cloudstack.api.response.S3Response;
 -import org.apache.cloudstack.api.response.SecurityGroupResponse;
 -import org.apache.cloudstack.api.response.ServiceOfferingResponse;
 -import org.apache.cloudstack.api.response.ServiceResponse;
 -import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse;
 -import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse;
 -import org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse;
 -import org.apache.cloudstack.api.response.SnapshotPolicyResponse;
 -import org.apache.cloudstack.api.response.SnapshotResponse;
 -import org.apache.cloudstack.api.response.SnapshotScheduleResponse;
 -import org.apache.cloudstack.api.response.StaticRouteResponse;
 -import org.apache.cloudstack.api.response.StorageNetworkIpRangeResponse;
 -import org.apache.cloudstack.api.response.StoragePoolForMigrationResponse;
 -import org.apache.cloudstack.api.response.StoragePoolResponse;
 -import org.apache.cloudstack.api.response.SwiftResponse;
 -import org.apache.cloudstack.api.response.SystemVmInstanceResponse;
 -import org.apache.cloudstack.api.response.SystemVmResponse;
 -import org.apache.cloudstack.api.response.TemplatePermissionsResponse;
 -import org.apache.cloudstack.api.response.TemplateResponse;
 -import org.apache.cloudstack.api.response.TrafficMonitorResponse;
 -import org.apache.cloudstack.api.response.TrafficTypeResponse;
 -import org.apache.cloudstack.api.response.UsageRecordResponse;
 -import org.apache.cloudstack.api.response.UserResponse;
 -import org.apache.cloudstack.api.response.UserVmResponse;
 -import org.apache.cloudstack.api.response.VMSnapshotResponse;
 -import org.apache.cloudstack.api.response.VirtualRouterProviderResponse;
 -import org.apache.cloudstack.api.response.VlanIpRangeResponse;
 -import org.apache.cloudstack.api.response.VolumeResponse;
 -import org.apache.cloudstack.api.response.VpcOfferingResponse;
 -import org.apache.cloudstack.api.response.VpcResponse;
 -import org.apache.cloudstack.api.response.VpnUsersResponse;
 -import org.apache.cloudstack.api.response.ZoneResponse;
+ import org.apache.cloudstack.api.response.*;
+ import org.apache.cloudstack.network.lb.ApplicationLoadBalancerRule;
  import org.apache.cloudstack.region.Region;
  import org.apache.cloudstack.usage.Usage;
  
@@@ -145,7 -171,12 +88,13 @@@ import com.cloud.projects.ProjectAccoun
  import com.cloud.projects.ProjectInvitation;
  import com.cloud.region.ha.GlobalLoadBalancerRule;
  import com.cloud.server.ResourceTag;
- import com.cloud.storage.*;
+ import com.cloud.storage.GuestOS;
++import com.cloud.storage.ImageStore;
+ import com.cloud.storage.S3;
+ import com.cloud.storage.Snapshot;
+ import com.cloud.storage.StoragePool;
+ import com.cloud.storage.Swift;
+ import com.cloud.storage.Volume;
  import com.cloud.storage.snapshot.SnapshotPolicy;
  import com.cloud.storage.snapshot.SnapshotSchedule;
  import com.cloud.template.VirtualMachineTemplate;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/api/src/org/apache/cloudstack/query/QueryService.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/query/QueryService.java
index 6bb24b5,2dfd97c..1a9e36e
--- a/api/src/org/apache/cloudstack/query/QueryService.java
+++ b/api/src/org/apache/cloudstack/query/QueryService.java
@@@ -18,8 -18,8 +18,9 @@@ package org.apache.cloudstack.query
  
  import org.apache.cloudstack.affinity.AffinityGroupResponse;
  import org.apache.cloudstack.api.command.admin.host.ListHostsCmd;
+ import org.apache.cloudstack.api.command.admin.internallb.ListInternalLBVMsCmd;
  import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd;
 +import org.apache.cloudstack.api.command.admin.storage.ListImageStoresCmd;
  import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd;
  import org.apache.cloudstack.api.command.admin.user.ListUsersCmd;
  import org.apache.cloudstack.api.command.user.account.ListAccountsCmd;
@@@ -33,32 -32,12 +34,34 @@@ import org.apache.cloudstack.api.comman
  import org.apache.cloudstack.api.command.user.project.ListProjectsCmd;
  import org.apache.cloudstack.api.command.user.securitygroup.ListSecurityGroupsCmd;
  import org.apache.cloudstack.api.command.user.tag.ListTagsCmd;
 +import org.apache.cloudstack.api.command.user.template.ListTemplatesCmd;
  import org.apache.cloudstack.api.command.user.vm.ListVMsCmd;
  import org.apache.cloudstack.api.command.user.vmgroup.ListVMGroupsCmd;
+ import org.apache.cloudstack.api.command.user.volume.ListResourceDetailsCmd;
  import org.apache.cloudstack.api.command.user.volume.ListVolumesCmd;
  import org.apache.cloudstack.api.command.user.zone.ListZonesByCmd;
 +import org.apache.cloudstack.api.response.AccountResponse;
 +import org.apache.cloudstack.api.response.AsyncJobResponse;
 +import org.apache.cloudstack.api.response.DiskOfferingResponse;
 +import org.apache.cloudstack.api.response.DomainRouterResponse;
 +import org.apache.cloudstack.api.response.EventResponse;
 +import org.apache.cloudstack.api.response.HostResponse;
 +import org.apache.cloudstack.api.response.ImageStoreResponse;
 +import org.apache.cloudstack.api.response.InstanceGroupResponse;
 +import org.apache.cloudstack.api.response.ListResponse;
 +import org.apache.cloudstack.api.response.ProjectAccountResponse;
 +import org.apache.cloudstack.api.response.ProjectInvitationResponse;
 +import org.apache.cloudstack.api.response.ProjectResponse;
 +import org.apache.cloudstack.api.response.ResourceTagResponse;
 +import org.apache.cloudstack.api.response.SecurityGroupResponse;
 +import org.apache.cloudstack.api.response.ServiceOfferingResponse;
 +import org.apache.cloudstack.api.response.StoragePoolResponse;
 +import org.apache.cloudstack.api.response.TemplateResponse;
 +import org.apache.cloudstack.api.response.UserResponse;
 +import org.apache.cloudstack.api.response.UserVmResponse;
 +import org.apache.cloudstack.api.response.VolumeResponse;
 +import org.apache.cloudstack.api.response.ZoneResponse;
+ import org.apache.cloudstack.api.response.*;
  
  import com.cloud.exception.PermissionDeniedException;
  
@@@ -106,9 -85,11 +111,14 @@@ public interface QueryService 
  
      public ListResponse<ZoneResponse>  listDataCenters(ListZonesByCmd cmd);
  
 +    public ListResponse<TemplateResponse> listTemplates(ListTemplatesCmd cmd);
 +
 +    public ListResponse<TemplateResponse> listIsos(ListIsosCmd cmd);
      public ListResponse<AffinityGroupResponse> listAffinityGroups(Long affinityGroupId, String affinityGroupName,
              String affinityGroupType, Long vmId, Long startIndex, Long pageSize);
+ 
+     public List<ResourceDetailResponse> listResource(ListResourceDetailsCmd cmd);
+ 
+     ListResponse<DomainRouterResponse> searchForInternalLbVms(ListInternalLBVMsCmd cmd);
+ 
  }

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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --cc client/tomcatconf/applicationContext.xml.in
index bb46b23,6406660..2ec6b59
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@@ -795,9 -801,8 +807,11 @@@
    <bean id="vMSnapshotManagerImpl" class="com.cloud.vm.snapshot.VMSnapshotManagerImpl" />
    <bean id="volumeManagerImpl" class="com.cloud.storage.VolumeManagerImpl" />
    <bean id="ClassicalPrimaryDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl" />
 +  <bean id="cloudStackImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.CloudStackImageStoreProviderImpl" />
 +  <bean id="s3ImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.S3ImageStoreProviderImpl" />
 +  <bean id="swiftImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.SwiftImageStoreProviderImpl" />  
+   <bean id="ApplicationLoadBalancerService" class="org.apache.cloudstack.network.lb.ApplicationLoadBalancerManagerImpl" />
+   <bean id="InternalLoadBalancerVMManager" class="org.apache.cloudstack.network.lb.InternalLoadBalancerVMManagerImpl" />
  
  
  <!--=======================================================================================================-->

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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/core/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java
----------------------------------------------------------------------
diff --cc core/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java
index 44d53aa,44d53aa..40083a8
--- a/core/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java
+++ b/core/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java
@@@ -159,11 -159,11 +159,6 @@@ public class BackupSnapshotCommandTest 
              "9012793e-0657-11e2-bebc-0050568b0057",
              "7167e0b2-f5b0-11e1-8414-0050568b0057", false, "vmName", 5);
  
--    @Test
--    public void testGetPrimaryStoragePoolNameLabel() {
--        String label = bsc.getPrimaryStoragePoolNameLabel();
--        assertTrue(label.equals("bed9f83e-cac3-11e1-ac8a-0050568b007e"));
--    }
  
      @Test
      public void testGetSecondaryStorageUrl() {
@@@ -199,37 -199,37 +194,6 @@@
          assertEquals(expected, ssId);
      }
  
--    @Test
--    public void testGetPool() {
--        StorageFilerTO pool = bsc.getPool();
--
--        Long id = pool.getId();
--        Long expectedL = 1L;
--        assertEquals(expectedL, id);
--
--        String uuid = pool.getUuid();
--        assertTrue(uuid.equals("bed9f83e-cac3-11e1-ac8a-0050568b007e"));
--
--        String host = pool.getHost();
--        assertTrue(host.equals("hostAddress"));
--
--        String path = pool.getPath();
--        assertTrue(path.equals("path"));
--
--        String userInfo = pool.getUserInfo();
--        assertTrue(userInfo.equals("userInfo"));
--
--        Integer port = pool.getPort();
--        Integer expectedI = 25;
--        assertEquals(expectedI, port);
--
--        StoragePoolType type = pool.getType();
--        assertEquals(StoragePoolType.Filesystem, type);
--
--        String str = pool.toString();
--        assertTrue(str.equals("Pool[" + id.toString() + "|" + host + ":"
--                + port.toString() + "|" + path + "]"));
--    }
  
      @Test
      public void testGetCreated() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/core/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java
----------------------------------------------------------------------
diff --cc core/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java
index c2d69c0,c2d69c0..56a1d22
--- a/core/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java
+++ b/core/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java
@@@ -143,12 -143,12 +143,6 @@@ public class SnapshotCommandTest 
      }
  
      @Test
--    public void testGetPrimaryStoragePoolNameLabel() {
--        String label = ssc.getPrimaryStoragePoolNameLabel();
--        assertTrue(label.equals("bed9f83e-cac3-11e1-ac8a-0050568b007e"));
--    }
--
--    @Test
      public void testGetSecondaryStorageUrl() {
          String url = ssc.getSecondaryStorageUrl();
          assertTrue(url.equals("http://secondary.Storage.Url"));

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
----------------------------------------------------------------------
diff --cc engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
index 46c2c78,1bd9abe..f14a3ed
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
@@@ -66,10 -70,12 +70,13 @@@ public class Upgrade410to420 implement
          updatePrimaryStore(conn);
          addEgressFwRulesForSRXGuestNw(conn);
          upgradeEIPNetworkOfferings(conn);
+         upgradeDefaultVpcOffering(conn);
+         upgradePhysicalNtwksWithInternalLbProvider(conn);
+         updateNetworkACLs(conn);
      }
 -	
 +
  	private void updateSystemVmTemplates(Connection conn) {
 +	    /* TODO: where should be system vm templates located?
  	    PreparedStatement sql = null;
          try {
              sql = conn.prepareStatement("update vm_template set image_data_store_id = 1 where type = 'SYSTEM' or type = 'BUILTIN'");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
----------------------------------------------------------------------
diff --cc engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
index 9bd7cb7,0000000..3f9e3a1
mode 100644,000000..100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
@@@ -1,618 -1,0 +1,623 @@@
 +/*
 + * 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.storage.image;
 +
 +import java.io.File;
 +import java.util.ArrayList;
 +import java.util.Date;
 +import java.util.HashSet;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Set;
 +
 +import javax.inject.Inject;
 +
 +import org.apache.log4j.Logger;
 +import org.springframework.stereotype.Component;
 +
 +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
 +import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
 +import org.apache.cloudstack.engine.subsystem.api.storage.DataMotionService;
 +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
 +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
 +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 +import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
 +import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
 +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
 +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event;
 +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
 +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory;
 +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
 +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService;
 +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 +import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
 +import org.apache.cloudstack.framework.async.AsyncCallFuture;
 +import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 +import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 +import org.apache.cloudstack.framework.async.AsyncRpcConext;
 +import org.apache.cloudstack.storage.command.CommandResult;
 +import org.apache.cloudstack.storage.datastore.DataObjectManager;
 +import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager;
 +import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao;
 +import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
 +import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreDao;
 +import org.apache.cloudstack.storage.image.store.TemplateObject;
 +
 +import com.cloud.agent.api.Answer;
 +import com.cloud.agent.api.storage.DeleteTemplateCommand;
 +import com.cloud.agent.api.storage.ListTemplateAnswer;
 +import com.cloud.agent.api.storage.ListTemplateCommand;
 +import com.cloud.alert.AlertManager;
 +import com.cloud.dc.DataCenterVO;
 +import com.cloud.dc.dao.ClusterDao;
 +import com.cloud.dc.dao.DataCenterDao;
 +import com.cloud.exception.ResourceAllocationException;
 +import com.cloud.hypervisor.Hypervisor.HypervisorType;
 +import com.cloud.storage.DataStoreRole;
 +import com.cloud.storage.StoragePool;
 +import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
 +import com.cloud.storage.VMTemplateVO;
 +import com.cloud.storage.VMTemplateZoneVO;
 +import com.cloud.storage.dao.VMTemplateDao;
 +import com.cloud.storage.dao.VMTemplatePoolDao;
 +import com.cloud.storage.dao.VMTemplateZoneDao;
 +import com.cloud.storage.dao.VolumeDao;
 +import com.cloud.storage.download.DownloadMonitor;
 +import com.cloud.storage.template.TemplateConstants;
 +import com.cloud.storage.template.TemplateProp;
 +import com.cloud.user.AccountManager;
 +import com.cloud.user.ResourceLimitService;
 +import com.cloud.utils.UriUtils;
 +import com.cloud.vm.UserVmVO;
 +import com.cloud.vm.dao.UserVmDao;
 +
 +@Component
 +public class TemplateServiceImpl implements TemplateService {
 +    private static final Logger s_logger = Logger.getLogger(TemplateServiceImpl.class);
 +    @Inject
 +    ObjectInDataStoreManager _objectInDataStoreMgr;
 +    @Inject
 +    DataObjectManager _dataObjectMgr;
 +    @Inject
 +    DataStoreManager _storeMgr;
 +    @Inject
 +    DataMotionService _motionSrv;
 +    @Inject
 +    ResourceLimitService _resourceLimitMgr;
 +    @Inject
 +    AccountManager _accountMgr;
 +    @Inject
 +    AlertManager _alertMgr;
 +    @Inject
 +    VMTemplateDao _templateDao;
 +    @Inject
 +    TemplateDataStoreDao _vmTemplateStoreDao;
 +    @Inject
 +    VolumeDataStoreDao _volumeStoreDao;
 +    @Inject
 +    DownloadMonitor _dlMonitor;
 +    @Inject
 +    DataCenterDao _dcDao = null;
 +    @Inject
 +    VMTemplateZoneDao _vmTemplateZoneDao;
 +    @Inject
 +    ClusterDao _clusterDao;
 +    @Inject
 +    UserVmDao _userVmDao;
 +    @Inject
 +    VolumeDao _volumeDao;
 +    @Inject
 +    TemplateDataFactory _templateFactory;
 +    @Inject VMTemplatePoolDao _tmpltPoolDao;
 +    @Inject
 +    EndPointSelector _epSelector;
 +
 +    class TemplateOpContext<T> extends AsyncRpcConext<T> {
 +        final TemplateObject template;
 +        final AsyncCallFuture<TemplateApiResult> future;
 +        public TemplateOpContext(AsyncCompletionCallback<T> callback, TemplateObject template,
 +        		AsyncCallFuture<TemplateApiResult> future) {
 +            super(callback);
 +            this.template = template;
 +            this.future = future;
 +        }
 +
 +        public TemplateObject getTemplate() {
 +            return template;
 +        }
 +
 +        public AsyncCallFuture<TemplateApiResult> getFuture() {
 +            return future;
 +        }
 +
 +
 +    }
 +
 +    @Override
 +    public void createTemplateAsync(
 +            TemplateInfo template, DataStore store, AsyncCompletionCallback<TemplateApiResult> callback) {
 +        // persist template_store_ref entry
 +        TemplateObject templateOnStore = (TemplateObject)store.create(template);
 +        // update template_store_ref and template state
 +        try{
 +            templateOnStore.processEvent(ObjectInDataStoreStateMachine.Event.CreateOnlyRequested);
 +        } catch (Exception e) {
 +            TemplateApiResult result = new TemplateApiResult(templateOnStore);
 +            result.setResult(e.toString());
 +            result.setSuccess(false);
 +            if ( callback != null ){
 +                callback.complete(result);
 +            }
 +            return;
 +        }
 +
 +        TemplateOpContext<TemplateApiResult> context = new TemplateOpContext<TemplateApiResult>(callback,
 +                templateOnStore, null);
 +
 +        AsyncCallbackDispatcher<TemplateServiceImpl, CreateCmdResult> caller = AsyncCallbackDispatcher.create(this);
 +        caller.setCallback(caller.getTarget().createTemplateCallback(null, null)).setContext(context);
 +        store.getDriver().createAsync(templateOnStore, caller);
 +    }
 +
 +    @Override
 +    public void downloadBootstrapSysTemplate(DataStore store) {
 +        Set<VMTemplateVO> toBeDownloaded = new HashSet<VMTemplateVO>();
 +
 +        List<VMTemplateVO> rtngTmplts = _templateDao.listAllSystemVMTemplates();
 +
 +        for (VMTemplateVO rtngTmplt : rtngTmplts) {
 +            toBeDownloaded.add(rtngTmplt);
 +        }
 +
 +        List<HypervisorType> availHypers = _clusterDao.getAvailableHypervisorInZone(store.getScope().getScopeId());
 +        if (availHypers.isEmpty()) {
 +            /*
 +             * This is for cloudzone, local secondary storage resource
 +             * started before cluster created
 +             */
 +            availHypers.add(HypervisorType.KVM);
 +        }
 +        /* Baremetal need not to download any template */
 +        availHypers.remove(HypervisorType.BareMetal);
 +        availHypers.add(HypervisorType.None); // bug 9809: resume ISO
 +                                              // download.
 +
 +        for (VMTemplateVO template : toBeDownloaded) {
 +            if (availHypers.contains(template.getHypervisorType())) {
 +                // only download sys template applicable for current hypervisor
 +                TemplateDataStoreVO tmpltHost = _vmTemplateStoreDao.findByStoreTemplate(store.getId(), template.getId());
 +                if (tmpltHost == null || tmpltHost.getState() != ObjectInDataStoreStateMachine.State.Ready) {
 +                    TemplateInfo tmplt = _templateFactory.getTemplate(template.getId(), DataStoreRole.Image);
 +                    createTemplateAsync(tmplt, store, null);
 +                }
 +            }
 +        }
 +    }
 +
 +    @Override
 +    public void handleSysTemplateDownload(HypervisorType hostHyper, Long dcId) {
 +        Set<VMTemplateVO> toBeDownloaded = new HashSet<VMTemplateVO>();
 +        List<DataStore> stores = _storeMgr.getImageStoresByScope(new ZoneScope(dcId));
 +        if (stores == null || stores.isEmpty()){
 +            return;
 +        }
 +
 +        /*Download all the templates in zone with the same hypervisortype*/
 +        for ( DataStore store : stores) {
 +            List<VMTemplateVO> rtngTmplts = _templateDao.listAllSystemVMTemplates();
 +            List<VMTemplateVO> defaultBuiltin = _templateDao.listDefaultBuiltinTemplates();
 +
 +
 +            for (VMTemplateVO rtngTmplt : rtngTmplts) {
 +                if (rtngTmplt.getHypervisorType() == hostHyper) {
 +                    toBeDownloaded.add(rtngTmplt);
 +                }
 +            }
 +
 +            for (VMTemplateVO builtinTmplt : defaultBuiltin) {
 +                if (builtinTmplt.getHypervisorType() == hostHyper) {
 +                    toBeDownloaded.add(builtinTmplt);
 +                }
 +            }
 +
 +            for (VMTemplateVO template: toBeDownloaded) {
 +                TemplateDataStoreVO tmpltHost = _vmTemplateStoreDao.findByStoreTemplate(store.getId(), template.getId());
 +                if (tmpltHost == null || tmpltHost.getState() != ObjectInDataStoreStateMachine.State.Ready) {
 +                    TemplateInfo tmplt = _templateFactory.getTemplate(template.getId(), DataStoreRole.Image);
 +                    createTemplateAsync(tmplt, store, null);
 +                }
 +            }
 +        }
 +    }
 +
 +    @Override
 +    public void handleTemplateSync(DataStore store) {
 +        if (store == null) {
 +            s_logger.warn("Huh? image store is null");
 +            return;
 +        }
 +        long storeId = store.getId();
 +        Long zoneId = store.getScope().getScopeId();
 +
 +        Map<String, TemplateProp> templateInfos = listTemplate(store);
 +        if (templateInfos == null) {
 +            return;
 +        }
 +
 +        Set<VMTemplateVO> toBeDownloaded = new HashSet<VMTemplateVO>();
 +        List<VMTemplateVO> allTemplates = null;
 +        if (zoneId == null){
 +            // region wide store
 +            allTemplates = _templateDao.listAll();
 +        }
 +        else{
 +            // zone wide store
 +            allTemplates = _templateDao.listAllInZone(zoneId);
 +        }
 +        List<VMTemplateVO> rtngTmplts = _templateDao.listAllSystemVMTemplates();
 +        List<VMTemplateVO> defaultBuiltin = _templateDao.listDefaultBuiltinTemplates();
 +
 +        if (rtngTmplts != null) {
 +            for (VMTemplateVO rtngTmplt : rtngTmplts) {
 +                if (!allTemplates.contains(rtngTmplt)) {
 +                    allTemplates.add(rtngTmplt);
 +                }
 +            }
 +        }
 +
 +        if (defaultBuiltin != null) {
 +            for (VMTemplateVO builtinTmplt : defaultBuiltin) {
 +                if (!allTemplates.contains(builtinTmplt)) {
 +                    allTemplates.add(builtinTmplt);
 +                }
 +            }
 +        }
 +
 +        toBeDownloaded.addAll(allTemplates);
 +
 +        for (VMTemplateVO tmplt : allTemplates) {
 +            String uniqueName = tmplt.getUniqueName();
 +            TemplateDataStoreVO tmpltStore = _vmTemplateStoreDao.findByStoreTemplate(storeId, tmplt.getId());
 +            if (templateInfos.containsKey(uniqueName)) {
 +                TemplateProp tmpltInfo = templateInfos.remove(uniqueName);
 +                toBeDownloaded.remove(tmplt);
 +                if (tmpltStore != null) {
 +                    s_logger.info("Template Sync found " + uniqueName + " already in the image store");
 +                    if (tmpltStore.getDownloadState() != Status.DOWNLOADED) {
 +                        tmpltStore.setErrorString("");
 +                    }
 +                    if (tmpltInfo.isCorrupted()) {
 +                        tmpltStore.setDownloadState(Status.DOWNLOAD_ERROR);
 +                        String msg = "Template " + tmplt.getName() + ":" + tmplt.getId() + " is corrupted on secondary storage " + tmpltStore.getId();
 +                        tmpltStore.setErrorString(msg);
 +                        s_logger.info("msg");
 +                        if (tmplt.getUrl() == null) {
 +                            msg = "Private Template (" + tmplt + ") with install path " + tmpltInfo.getInstallPath() + "is corrupted, please check in image store: " + tmpltStore.getDataStoreId();
 +                            s_logger.warn(msg);
 +                        } else {
 +                            toBeDownloaded.add(tmplt);
 +                        }
 +
 +                    } else {
 +                        tmpltStore.setDownloadPercent(100);
 +                        tmpltStore.setDownloadState(Status.DOWNLOADED);
 +                        tmpltStore.setInstallPath(tmpltInfo.getInstallPath());
 +                        tmpltStore.setSize(tmpltInfo.getSize());
 +                        tmpltStore.setPhysicalSize(tmpltInfo.getPhysicalSize());
 +                        tmpltStore.setLastUpdated(new Date());
 +                        // update size in vm_template table
 +                        VMTemplateVO tmlpt = _templateDao.findById(tmplt.getId());
 +                        tmlpt.setSize(tmpltInfo.getSize());
 +                        _templateDao.update(tmplt.getId(), tmlpt);
 +
 +                        if (tmpltInfo.getSize() > 0) {
 +                            long accountId = tmplt.getAccountId();
 +                            try {
 +                                _resourceLimitMgr.checkResourceLimit(_accountMgr.getAccount(accountId),
 +                                        com.cloud.configuration.Resource.ResourceType.secondary_storage,
 +                                        tmpltInfo.getSize() - UriUtils.getRemoteSize(tmplt.getUrl()));
 +                            } catch (ResourceAllocationException e) {
 +                                s_logger.warn(e.getMessage());
 +                                _alertMgr.sendAlert(_alertMgr.ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED, zoneId,
 +                                        null, e.getMessage(), e.getMessage());
 +                            } finally {
 +                                _resourceLimitMgr.recalculateResourceCount(accountId, _accountMgr.getAccount(accountId).getDomainId(),
 +                                        com.cloud.configuration.Resource.ResourceType.secondary_storage.getOrdinal());
 +                            }
 +                        }
 +                    }
 +                    _vmTemplateStoreDao.update(tmpltStore.getId(), tmpltStore);
 +                } else {
 +                    tmpltStore = new TemplateDataStoreVO(storeId, tmplt.getId(), new Date(), 100, Status.DOWNLOADED, null, null, null, tmpltInfo.getInstallPath(), tmplt.getUrl());
 +                    tmpltStore.setSize(tmpltInfo.getSize());
 +                    tmpltStore.setPhysicalSize(tmpltInfo.getPhysicalSize());
 +                    tmpltStore.setDataStoreRole(store.getRole());
 +                    _vmTemplateStoreDao.persist(tmpltStore);
++                    
++                    // update size in vm_template table
++                    VMTemplateVO tmlpt = _templateDao.findById(tmplt.getId());
++                    tmlpt.setSize(tmpltInfo.getSize());
++                    _templateDao.update(tmplt.getId(), tmlpt);
 +                    associateTemplateToZone(tmplt.getId(), zoneId);
 +                }
 +
 +                continue;
 +            }
 +            if (tmpltStore != null && tmpltStore.getDownloadState() != Status.DOWNLOADED) {
 +                s_logger.info("Template Sync did not find " + uniqueName + " ready on image store " + storeId + ", will request download to start/resume shortly");
 +                s_logger.info("Removing template " + uniqueName + " from template store table");
 +                // remove those leftover entries
 +                _vmTemplateStoreDao.remove(tmpltStore.getId());
 +
 +            } else if (tmpltStore == null) {
 +                s_logger.info("Template Sync did not find " + uniqueName + " on the image store " + storeId + ", will request download shortly");
 +                // persist template_zone_ref table
 +                // TODO: we may have some bugs in removing these entries in case of failure, maybe we should pass another callback below in invoking createTemplateAsync
 +                // to just clear those entries.
 +                associateTemplateToZone(tmplt.getId(), zoneId);
 +            }
 +
 +        }
 +
 +        if (toBeDownloaded.size() > 0) {
 +            /* Only download templates whose hypervirsor type is in the zone */
 +            List<HypervisorType> availHypers = _clusterDao.getAvailableHypervisorInZone(zoneId);
 +            if (availHypers.isEmpty()) {
 +                /*
 +                 * This is for cloudzone, local secondary storage resource
 +                 * started before cluster created
 +                 */
 +                availHypers.add(HypervisorType.KVM);
 +            }
 +            /* Baremetal need not to download any template */
 +            availHypers.remove(HypervisorType.BareMetal);
 +            availHypers.add(HypervisorType.None); // bug 9809: resume ISO
 +                                                  // download.
 +            for (VMTemplateVO tmplt : toBeDownloaded) {
 +                if (tmplt.getUrl() == null) { // If url is null we can't
 +                                              // initiate the download
 +                    continue;
 +                }
 +                // check if there is a record for this template in this store
 +                TemplateDataStoreVO tmpltStoreVO = _vmTemplateStoreDao.findByStoreTemplate(storeId, tmplt.getId());
 +
 +                // if this is private template, and there is no record for this
 +                // template in this store, skip
 +                // TODO: don't understand this logic. What happens if we have a record for this template, still download?
 +                if (!tmplt.isPublicTemplate() && !tmplt.isFeatured()) {
 +                    if (tmpltStoreVO == null) {
 +                        continue;
 +                    }
 +                }
 +                if (availHypers.contains(tmplt.getHypervisorType())) {
 +                     if (tmpltStoreVO != null && tmpltStoreVO.getDownloadState() == Status.DOWNLOADED) {
 +                        continue;
 +                    }
 +                    s_logger.info("Downloading template " + tmplt.getUniqueName() + " to image store " + store.getName());
 +                    TemplateInfo tmpl = _templateFactory.getTemplate(tmplt.getId(), DataStoreRole.Image);
 +                    createTemplateAsync(tmpl, store, null);
 +                }
 +            }
 +        }
 +
 +       for (String uniqueName : templateInfos.keySet()) {
 +            TemplateProp tInfo = templateInfos.get(uniqueName);
 +            List<UserVmVO> userVmUsingIso = _userVmDao.listByIsoId(tInfo.getId());
 +            //check if there is any Vm using this ISO.
 +            if (userVmUsingIso == null || userVmUsingIso.isEmpty()) {
 +                //TODO: we cannot directly call deleteTemplateSync here to reuse delete logic since in this case, our db does not have this template at all.
 +                VMTemplateVO template = _templateDao.findById(tInfo.getId());
 +                DeleteTemplateCommand dtCommand = new DeleteTemplateCommand(store.getTO(), tInfo.getInstallPath(), null, null);
 +                EndPoint ep = _epSelector.select(store);
 +                Answer answer = ep.sendMessage(dtCommand);
 +                if (answer == null || !answer.getResult()) {
 +                    s_logger.info("Failed to deleted template at store: " + store.getName());
 +
 +                } else {
 +                    String description = "Deleted template " + tInfo.getTemplateName() + " on secondary storage " + storeId;
 +                    s_logger.info(description);
 +                }
 +
 +            }
 +        }
 +
 +    }
 +
 +
 +    // persist entry in template_zone_ref table. zoneId can be empty for region-wide image store, in that case,
 +    // we will associate the template to all the zones.
 +    private void associateTemplateToZone(long templateId, Long zoneId){
 +        List<Long> dcs = new ArrayList<Long>();
 +        if (zoneId != null ){
 +            dcs.add(zoneId);
 +        }
 +        else{
 +            List<DataCenterVO> zones = _dcDao.listAll();
 +            for (DataCenterVO zone : zones){
 +                dcs.add(zone.getId());
 +            }
 +        }
 +        for (Long id : dcs) {
 +            VMTemplateZoneVO tmpltZoneVO = _vmTemplateZoneDao.findByZoneTemplate(id, templateId);
 +            if (tmpltZoneVO == null) {
 +                tmpltZoneVO = new VMTemplateZoneVO(id, templateId, new Date());
 +                _vmTemplateZoneDao.persist(tmpltZoneVO);
 +            } else {
 +                tmpltZoneVO.setLastUpdated(new Date());
 +                _vmTemplateZoneDao.update(tmpltZoneVO.getId(), tmpltZoneVO);
 +            }
 +        }
 +    }
 +
 +
 +    private Map<String, TemplateProp> listTemplate(DataStore ssStore) {
 +        ListTemplateCommand cmd = new ListTemplateCommand(ssStore.getTO());
 +        EndPoint ep = _epSelector.select(ssStore);
 +        Answer answer = ep.sendMessage(cmd);
 +        if (answer != null && answer.getResult()) {
 +            ListTemplateAnswer tanswer = (ListTemplateAnswer)answer;
 +            return tanswer.getTemplateInfo();
 +        } else {
 +            if (s_logger.isDebugEnabled()) {
 +                s_logger.debug("can not list template for secondary storage host " + ssStore.getId());
 +            }
 +        }
 +
 +        return null;
 +    }
 +
 +
 +    protected Void createTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImpl, CreateCmdResult> callback,
 +            TemplateOpContext<TemplateApiResult> context) {
 +        TemplateObject template = context.getTemplate();
 +        AsyncCompletionCallback<TemplateApiResult> parentCallback = context.getParentCallback();
 +        TemplateApiResult result = new TemplateApiResult(template);
 +        CreateCmdResult callbackResult = callback.getResult();
 +        if (callbackResult.isFailed()) {
 +            template.processEvent(ObjectInDataStoreStateMachine.Event.OperationFailed);
 +            result.setResult(callbackResult.getResult());
 +            if ( parentCallback != null ){
 +                parentCallback.complete(result);
 +            }
 +            return null;
 +        }
 +
 +        try {
 +            template.processEvent(ObjectInDataStoreStateMachine.Event.OperationSuccessed);
 +        } catch (Exception e) {
 +            result.setResult(e.toString());
 +            if ( parentCallback != null ){
 +                parentCallback.complete(result);
 +            }
 +            return null;
 +        }
 +
 +        if (parentCallback != null){
 +            parentCallback.complete(result);
 +        }
 +        return null;
 +    }
 +
 +    @Override
 +    public AsyncCallFuture<TemplateApiResult> deleteTemplateAsync(
 +            TemplateInfo template) {
 +        TemplateObject to = (TemplateObject) template;
 +        // update template_store_ref status
 +        to.processEvent(ObjectInDataStoreStateMachine.Event.DestroyRequested);
 +
 +        AsyncCallFuture<TemplateApiResult> future = new AsyncCallFuture<TemplateApiResult>();
 +
 +        TemplateOpContext<TemplateApiResult> context = new TemplateOpContext<TemplateApiResult>(null, to, future);
 +        AsyncCallbackDispatcher<TemplateServiceImpl, CommandResult> caller = AsyncCallbackDispatcher.create(this);
 +        caller.setCallback(caller.getTarget().deleteTemplateCallback(null, null)).setContext(context);
 +        to.getDataStore().getDriver().deleteAsync(to, caller);
 +        return future;
 +    }
 +
 +    public Void deleteTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImpl, CommandResult> callback, TemplateOpContext<TemplateApiResult> context) {
 +        CommandResult result = callback.getResult();
 +        TemplateObject vo = context.getTemplate();
 +         if (result.isSuccess()) {
 +            vo.processEvent(Event.OperationSuccessed);
 +        } else {
 +            vo.processEvent(Event.OperationFailed);
 +         }
 +        TemplateApiResult apiResult = new TemplateApiResult(vo);
 +        apiResult.setResult(result.getResult());
 +        apiResult.setSuccess(result.isSuccess());
 +        context.future.complete(apiResult);
 +        return null;
 +    }
 +
 +    private AsyncCallFuture<TemplateApiResult> copyAsync(DataObject source, TemplateInfo template, DataStore store){
 +        AsyncCallFuture<TemplateApiResult> future = new AsyncCallFuture<TemplateApiResult>();
 +        DataObject templateOnStore = store.create(template);
 +        templateOnStore.processEvent(Event.CreateOnlyRequested);
 +
 +        TemplateOpContext<TemplateApiResult> context = new TemplateOpContext<TemplateApiResult>(null, (TemplateObject) templateOnStore, future);
 +        AsyncCallbackDispatcher<TemplateServiceImpl, CopyCommandResult> caller = AsyncCallbackDispatcher.create(this);
 +        caller.setCallback(caller.getTarget().copyTemplateCallBack(null, null)).setContext(context);
 +        _motionSrv.copyAsync(source, templateOnStore, caller);
 +        return future;
 +    }
 +
 +    @Override
 +    public AsyncCallFuture<TemplateApiResult> createTemplateFromSnapshotAsync(
 +            SnapshotInfo snapshot, TemplateInfo template, DataStore store) {
 +        return copyAsync(snapshot, template, store);
 +    }
 +
 +    @Override
 +    public AsyncCallFuture<TemplateApiResult> createTemplateFromVolumeAsync(
 +            VolumeInfo volume, TemplateInfo template, DataStore store) {
 +        return copyAsync(volume, template, store);
 +    }
 +
 +    @Override
 +    public AsyncCallFuture<TemplateApiResult> copyTemplate(TemplateInfo srcTemplate, DataStore destStore) {
 +        return copyAsync(srcTemplate, srcTemplate, destStore);
 +    }
 +
 +    @Override
 +    public AsyncCallFuture<TemplateApiResult> prepareTemplateOnPrimary(TemplateInfo srcTemplate, StoragePool pool) {
 +        return copyAsync(srcTemplate, srcTemplate, (DataStore)pool);
 +    }
 +
 +    protected Void copyTemplateCallBack(AsyncCallbackDispatcher<TemplateServiceImpl, CopyCommandResult> callback,
 +            TemplateOpContext<TemplateApiResult> context) {
 +        TemplateInfo destTemplate = context.getTemplate();
 +        CopyCommandResult result = callback.getResult();
 +        AsyncCallFuture<TemplateApiResult> future = context.getFuture();
 +        TemplateApiResult res = new TemplateApiResult(destTemplate);
 +        try {
 +            if (result.isFailed()) {
 +                res.setResult(result.getResult());
 +                destTemplate.processEvent(Event.OperationFailed);
 +                // remove entry from template_store_ref
 +                destTemplate.getDataStore().delete(destTemplate);
 +            } else {
 +                destTemplate.processEvent(Event.OperationSuccessed, result.getAnswer());
 +            }
 +            future.complete(res);
 +        } catch (Exception e) {
 +            s_logger.debug("Failed to process copy template callback", e);
 +            res.setResult(e.toString());
 +            future.complete(res);
 +        }
 +
 +        return null;
 +    }
 +
 +
 +    @Override
 +    public void addSystemVMTemplatesToSecondary(DataStore store){
 +        long storeId = store.getId();
 +        List<VMTemplateVO> rtngTmplts = _templateDao.listAllSystemVMTemplates();
 +        for ( VMTemplateVO tmplt : rtngTmplts ) {
 +            TemplateDataStoreVO tmpltStore = _vmTemplateStoreDao.findByStoreTemplate(storeId, tmplt.getId());
 +            if ( tmpltStore == null ) {
 +                tmpltStore = new TemplateDataStoreVO(storeId, tmplt.getId(), new Date(), 100, Status.DOWNLOADED, null, null, null, TemplateConstants.DEFAULT_SYSTEM_VM_TEMPLATE_PATH + tmplt.getId() + File.separator, tmplt.getUrl());
 +                tmpltStore.setSize(0);
 +                tmpltStore.setPhysicalSize(0); // no size information for pre-seeded system vm templates
 +                tmpltStore.setDataStoreRole(store.getRole());
 +                _vmTemplateStoreDao.persist(tmpltStore);
 +            }
 +        }
 +    }
 +}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --cc plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 747f337,b8c6f09..b3e9be1
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@@ -1646,10 -1639,15 +1646,11 @@@ ServerResource 
  
      private SetNetworkACLAnswer execute(SetNetworkACLCommand cmd) {
          String[] results = new String[cmd.getRules().length];
 -        String callResult;
 -        Connect conn;
 -        String routerName = cmd.getAccessDetail(NetworkElementCommand.ROUTER_NAME);
 +       
          String routerIp = cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP);
+         String privateGw = cmd.getAccessDetail(NetworkElementCommand.VPC_PRIVATE_GATEWAY);
  
          try {
 -            conn = LibvirtConnection.getConnectionByVmName(routerName);
 -            Domain vm = getDomain(conn, routerName);
              String [][] rules = cmd.generateFwRules();
              String[] aclRules = rules[0];
              NicTO nic = cmd.getNic();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --cc plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 017e4e9,37ddaa1..482ec52
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@@ -503,8 -493,8 +538,10 @@@ public class VmwareResource implements 
                  return execute((ResizeVolumeCommand) cmd);
              } else if (clz == UnregisterVMCommand.class) {
                  return execute((UnregisterVMCommand) cmd);
 +            } else if (cmd instanceof StorageSubSystemCommand) {
 +            	return storageHandler.handleStorageCommands((StorageSubSystemCommand)cmd);
+             } else if (clz == ScaleVmCommand.class) {
+                 return execute((ScaleVmCommand) cmd);
              } else {
                  answer = Answer.createUnsupportedCommandAnswer(cmd);
              }
@@@ -2100,9 -2249,31 +2303,31 @@@
              }
          }
  
 -        return validatedDisks.toArray(new VolumeTO[0]);
 +        return validatedDisks.toArray(new DiskTO[0]);
      }
  
+     protected ScaleVmAnswer execute(ScaleVmCommand cmd) {
+ 
+         VmwareContext context = getServiceContext();
+         VirtualMachineTO vmSpec = cmd.getVirtualMachine();
+         try{
+             VmwareHypervisorHost hyperHost = getHyperHost(context);
+             VirtualMachineMO vmMo = hyperHost.findVmOnHyperHost(cmd.getVmName());
+             VirtualMachineConfigSpec vmConfigSpec = new VirtualMachineConfigSpec();
+             int ramMb = (int) (vmSpec.getMinRam());
+ 
+             VmwareHelper.setVmScaleUpConfig(vmConfigSpec, vmSpec.getCpus(), vmSpec.getSpeed(), vmSpec.getSpeed(),(int) (vmSpec.getMaxRam()), ramMb, vmSpec.getLimitCpuUse());
+ 
+             if(!vmMo.configureVm(vmConfigSpec)) {
+                 throw new Exception("Unable to execute ScaleVmCommand");
+             }
+         }catch(Exception e) {
+             s_logger.error("Unexpected exception: ", e);
+             return new ScaleVmAnswer(cmd, false, "Unable to execute ScaleVmCommand due to " + e.toString());
+         }
+         return new ScaleVmAnswer(cmd, true, null);
+     }
+ 
      protected StartAnswer execute(StartCommand cmd) {
  
          if (s_logger.isInfoEnabled()) {
@@@ -5291,9 -5440,8 +5519,13 @@@
  
  	}
  
 +	@Override
 +	public Answer execute(DestroyCommand cmd) {
 +		// TODO Auto-generated method stub
 +		return null;
 +	}
+     private boolean isVMWareToolsInstalled(VirtualMachineMO vmMo) throws Exception{
+         GuestInfo guestInfo = vmMo.getVmGuestInfo();
+         return (guestInfo != null && guestInfo.getGuestState() != null && guestInfo.getGuestState().equalsIgnoreCase("running"));
+     }	
  }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/plugins/pom.xml
----------------------------------------------------------------------
diff --cc plugins/pom.xml
index b0685de,e49fac9..c7f41e1
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@@ -58,14 -58,11 +58,15 @@@
      <module>user-authenticators/sha256salted</module>
      <module>network-elements/dns-notifier</module>
      <module>storage/image/s3</module>
 +    <module>storage/image/swift</module>
 +    <module>storage/image/default</module>
 +    <module>storage/image/sample</module>    
      <module>storage/volume/solidfire</module>
      <module>storage/volume/default</module>
 +    <module>storage/volume/sample</module>
      <module>alert-handlers/snmp-alerts</module>
      <module>alert-handlers/syslog-alerts</module>
+     <module>network-elements/internal-loadbalancer</module>
    </modules>
  
    <dependencies>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/server/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/server/src/com/cloud/api/ApiDBUtils.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/api/ApiDBUtils.java
index 74dda18,94c873e..26f6fe0
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@@ -37,10 -50,9 +50,10 @@@ import org.apache.cloudstack.api.respon
  import org.apache.cloudstack.api.response.DiskOfferingResponse;
  import org.apache.cloudstack.api.response.DomainRouterResponse;
  import org.apache.cloudstack.api.response.EventResponse;
- import org.apache.cloudstack.api.response.HostResponse;
  import org.apache.cloudstack.api.response.HostForMigrationResponse;
+ import org.apache.cloudstack.api.response.HostResponse;
  import org.apache.cloudstack.api.response.InstanceGroupResponse;
 +import org.apache.cloudstack.api.response.ImageStoreResponse;
  import org.apache.cloudstack.api.response.ProjectAccountResponse;
  import org.apache.cloudstack.api.response.ProjectInvitationResponse;
  import org.apache.cloudstack.api.response.ProjectResponse;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0c3d280/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/api/ApiResponseHelper.java
index 5bc2274,9a70d95..fc5ff59
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@@ -292,10 -305,9 +310,11 @@@ public class ApiResponseHelper implemen
  
      public final Logger s_logger = Logger.getLogger(ApiResponseHelper.class);
      private static final DecimalFormat s_percentFormat = new DecimalFormat("##.##");
 -    @Inject private EntityManager _entityMgr = null;
 -    @Inject private UsageService _usageSvc = null;
 +    @Inject
 +    private EntityManager _entityMgr = null;
 +    @Inject
 +    private UsageService _usageSvc = null;
+     @Inject NetworkModel _ntwkModel;
  
      @Override
      public UserResponse createUserResponse(User user) {
@@@ -2915,8 -3163,14 +2953,13 @@@
          response.setState(result.getState().toString());
          response.setSourceNat(result.getSourceNat());
  
+         NetworkACL acl =  ApiDBUtils.findByNetworkACLId(result.getNetworkACLId());
+         if (acl != null) {
+             response.setAclId(acl.getUuid());
+         }
+ 
          response.setObjectName("privategateway");
  
 -
          return response;
      }
  


Mime
View raw message