You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2013/01/22 02:02:21 UTC
[6/7] add unit test back, primary storage life cycle is tested
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerLoadBalancerElementService.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerLoadBalancerElementService.java b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerLoadBalancerElementService.java
index 158b36e..03b7a26 100644
--- a/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerLoadBalancerElementService.java
+++ b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerLoadBalancerElementService.java
@@ -23,8 +23,8 @@ import com.cloud.api.commands.DeleteNetscalerLoadBalancerCmd;
import com.cloud.api.commands.ListNetscalerLoadBalancerNetworksCmd;
import com.cloud.api.commands.ListNetscalerLoadBalancersCmd;
import com.cloud.api.response.NetscalerLoadBalancerResponse;
-import com.cloud.network.ExternalLoadBalancerDeviceVO;
import com.cloud.network.Network;
+import com.cloud.network.dao.ExternalLoadBalancerDeviceVO;
import com.cloud.utils.component.PluggableService;
public interface NetscalerLoadBalancerElementService extends PluggableService {
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java b/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
index 2bc7a08..244c19b 100644
--- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
+++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
@@ -80,7 +80,6 @@ import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service;
import com.cloud.network.NetworkManager;
import com.cloud.network.NetworkModel;
-import com.cloud.network.NetworkVO;
import com.cloud.network.Networks;
import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.NiciraNvpDeviceVO;
@@ -88,17 +87,18 @@ import com.cloud.network.NiciraNvpNicMappingVO;
import com.cloud.network.NiciraNvpRouterMappingVO;
import com.cloud.network.PhysicalNetwork;
import com.cloud.network.PhysicalNetworkServiceProvider;
-import com.cloud.network.PhysicalNetworkVO;
import com.cloud.network.PublicIpAddress;
import com.cloud.network.addr.PublicIp;
import com.cloud.network.dao.NetworkDao;
import com.cloud.network.dao.NetworkServiceMapDao;
+import com.cloud.network.dao.NetworkVO;
import com.cloud.network.dao.NiciraNvpDao;
import com.cloud.network.dao.NiciraNvpNicMappingDao;
import com.cloud.network.dao.NiciraNvpRouterMappingDao;
import com.cloud.network.dao.PhysicalNetworkDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
+import com.cloud.network.dao.PhysicalNetworkVO;
import com.cloud.network.resource.NiciraNvpResource;
import com.cloud.network.rules.PortForwardingRule;
import com.cloud.network.rules.StaticNat;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java b/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
index 090e5e3..3ba6167 100644
--- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
+++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
@@ -44,17 +44,17 @@ import com.cloud.network.Network;
import com.cloud.network.Network.Service;
import com.cloud.network.NetworkModel;
import com.cloud.network.NetworkProfile;
-import com.cloud.network.NetworkVO;
import com.cloud.network.Network.GuestType;
import com.cloud.network.Network.State;
import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.NiciraNvpDeviceVO;
import com.cloud.network.PhysicalNetwork;
import com.cloud.network.PhysicalNetwork.IsolationMethod;
-import com.cloud.network.PhysicalNetworkVO;
import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.NetworkVO;
import com.cloud.network.dao.NiciraNvpDao;
import com.cloud.network.dao.PhysicalNetworkDao;
+import com.cloud.network.dao.PhysicalNetworkVO;
import com.cloud.offering.NetworkOffering;
import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
import com.cloud.resource.ResourceManager;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java b/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
index 124e28f..f86e705 100644
--- a/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
+++ b/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
@@ -46,14 +46,14 @@ import com.cloud.network.Network.State;
import com.cloud.network.NetworkManager;
import com.cloud.network.NetworkModel;
import com.cloud.network.NetworkProfile;
-import com.cloud.network.NetworkVO;
import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.Networks.TrafficType;
import com.cloud.network.NiciraNvpDeviceVO;
-import com.cloud.network.PhysicalNetworkVO;
import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.NetworkVO;
import com.cloud.network.dao.NiciraNvpDao;
import com.cloud.network.dao.PhysicalNetworkDao;
+import com.cloud.network.dao.PhysicalNetworkVO;
import com.cloud.offering.NetworkOffering;
import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
import com.cloud.user.Account;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java b/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
index 91efa75..18abc59 100644
--- a/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
+++ b/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
@@ -33,10 +33,10 @@ import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
import com.cloud.network.Network;
import com.cloud.network.Network.GuestType;
import com.cloud.network.Network.State;
-import com.cloud.network.NetworkVO;
import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.PhysicalNetwork;
import com.cloud.network.PhysicalNetwork.IsolationMethod;
+import com.cloud.network.dao.NetworkVO;
import com.cloud.network.ovs.OvsTunnelManager;
import com.cloud.offering.NetworkOffering;
import com.cloud.user.Account;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/api/ApiDBUtils.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiDBUtils.java b/server/src/com/cloud/api/ApiDBUtils.java
index 64effbe..cb6dc6f 100755
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@ -106,24 +106,16 @@ import com.cloud.host.HostStats;
import com.cloud.host.HostVO;
import com.cloud.host.dao.HostDao;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.network.IPAddressVO;
import com.cloud.network.IpAddress;
-import com.cloud.network.LoadBalancerVO;
import com.cloud.network.Network;
import com.cloud.network.Network.Capability;
import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service;
-import com.cloud.network.NetworkDomainVO;
import com.cloud.network.NetworkManager;
import com.cloud.network.NetworkModel;
import com.cloud.network.NetworkProfile;
-import com.cloud.network.NetworkRuleConfigVO;
-import com.cloud.network.NetworkVO;
import com.cloud.network.Networks.TrafficType;
import com.cloud.network.PhysicalNetworkServiceProvider;
-import com.cloud.network.PhysicalNetworkVO;
-import com.cloud.network.Site2SiteCustomerGatewayVO;
-import com.cloud.network.Site2SiteVpnGatewayVO;
import com.cloud.network.as.AutoScalePolicy;
import com.cloud.network.as.AutoScalePolicyConditionMapVO;
import com.cloud.network.as.AutoScalePolicyVO;
@@ -142,17 +134,25 @@ import com.cloud.network.as.dao.CounterDao;
import com.cloud.network.dao.FirewallRulesCidrsDao;
import com.cloud.network.dao.FirewallRulesDao;
import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
import com.cloud.network.dao.LoadBalancerDao;
+import com.cloud.network.dao.LoadBalancerVO;
import com.cloud.network.dao.NetworkDao;
import com.cloud.network.dao.NetworkDomainDao;
+import com.cloud.network.dao.NetworkDomainVO;
import com.cloud.network.dao.NetworkRuleConfigDao;
+import com.cloud.network.dao.NetworkRuleConfigVO;
+import com.cloud.network.dao.NetworkVO;
import com.cloud.network.dao.PhysicalNetworkDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
import com.cloud.network.dao.PhysicalNetworkTrafficTypeDao;
import com.cloud.network.dao.PhysicalNetworkTrafficTypeVO;
+import com.cloud.network.dao.PhysicalNetworkVO;
import com.cloud.network.dao.Site2SiteCustomerGatewayDao;
+import com.cloud.network.dao.Site2SiteCustomerGatewayVO;
import com.cloud.network.dao.Site2SiteVpnGatewayDao;
+import com.cloud.network.dao.Site2SiteVpnGatewayVO;
import com.cloud.network.router.VirtualRouter;
import com.cloud.network.rules.FirewallRuleVO;
import com.cloud.network.security.SecurityGroup;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index dfeeb87..6c703c9 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -156,19 +156,16 @@ import com.cloud.event.Event;
import com.cloud.host.Host;
import com.cloud.host.HostVO;
import com.cloud.hypervisor.HypervisorCapabilities;
-import com.cloud.network.IPAddressVO;
import com.cloud.network.IpAddress;
import com.cloud.network.Network;
import com.cloud.network.Network.Capability;
import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service;
import com.cloud.network.NetworkProfile;
-import com.cloud.network.NetworkVO;
import com.cloud.network.Networks.TrafficType;
import com.cloud.network.PhysicalNetwork;
import com.cloud.network.PhysicalNetworkServiceProvider;
import com.cloud.network.PhysicalNetworkTrafficType;
-import com.cloud.network.PhysicalNetworkVO;
import com.cloud.network.RemoteAccessVpn;
import com.cloud.network.Site2SiteCustomerGateway;
import com.cloud.network.Site2SiteVpnConnection;
@@ -182,6 +179,9 @@ import com.cloud.network.as.AutoScaleVmProfileVO;
import com.cloud.network.as.Condition;
import com.cloud.network.as.ConditionVO;
import com.cloud.network.as.Counter;
+import com.cloud.network.dao.IPAddressVO;
+import com.cloud.network.dao.NetworkVO;
+import com.cloud.network.dao.PhysicalNetworkVO;
import com.cloud.network.router.VirtualRouter;
import com.cloud.network.rules.FirewallRule;
import com.cloud.network.rules.FirewallRuleVO;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java b/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java
index 19f8418..407084c 100755
--- a/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java
+++ b/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java
@@ -64,8 +64,8 @@ import com.cloud.host.Host;
import com.cloud.host.HostVO;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.network.Network;
-import com.cloud.network.NetworkVO;
import com.cloud.network.Networks.TrafficType;
+import com.cloud.network.dao.NetworkVO;
import com.cloud.org.Grouping;
import com.cloud.resource.ResourceManager;
import com.cloud.service.ServiceOfferingVO;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 0e3363e..59cb6e8 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -104,7 +104,6 @@ import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.host.HostVO;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.network.IPAddressVO;
import com.cloud.network.Network;
import com.cloud.network.Network.Capability;
import com.cloud.network.Network.GuestType;
@@ -113,17 +112,18 @@ import com.cloud.network.Network.Service;
import com.cloud.network.NetworkManager;
import com.cloud.network.NetworkModel;
import com.cloud.network.NetworkService;
-import com.cloud.network.NetworkVO;
import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.Networks.TrafficType;
import com.cloud.network.PhysicalNetwork;
-import com.cloud.network.PhysicalNetworkVO;
import com.cloud.network.dao.FirewallRulesDao;
import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.NetworkVO;
import com.cloud.network.dao.PhysicalNetworkDao;
import com.cloud.network.dao.PhysicalNetworkTrafficTypeDao;
import com.cloud.network.dao.PhysicalNetworkTrafficTypeVO;
+import com.cloud.network.dao.PhysicalNetworkVO;
import com.cloud.network.vpc.VpcManager;
import com.cloud.offering.DiskOffering;
import com.cloud.offering.NetworkOffering;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
index 52c90af..58dd3f8 100755
--- a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
+++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
@@ -93,14 +93,14 @@ import com.cloud.info.RunningHostInfoAgregator.ZoneHostInfo;
import com.cloud.keystore.KeystoreDao;
import com.cloud.keystore.KeystoreManager;
import com.cloud.keystore.KeystoreVO;
-import com.cloud.network.IPAddressVO;
import com.cloud.network.Network;
import com.cloud.network.NetworkManager;
import com.cloud.network.NetworkModel;
-import com.cloud.network.NetworkVO;
import com.cloud.network.Networks.TrafficType;
import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.NetworkVO;
import com.cloud.network.rules.RulesManager;
import com.cloud.offering.NetworkOffering;
import com.cloud.offering.ServiceOffering;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/dc/dao/DataCenterDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/DataCenterDaoImpl.java b/server/src/com/cloud/dc/dao/DataCenterDaoImpl.java
index 730029d..a63bbd3 100755
--- a/server/src/com/cloud/dc/dao/DataCenterDaoImpl.java
+++ b/server/src/com/cloud/dc/dao/DataCenterDaoImpl.java
@@ -293,7 +293,7 @@ public class DataCenterDaoImpl extends GenericDaoBase<DataCenterVO, Long> implem
return true;
}
- protected DataCenterDaoImpl() {
+ public DataCenterDaoImpl() {
super();
NameSearch = createSearchBuilder();
NameSearch.and("name", NameSearch.entity().getName(), SearchCriteria.Op.EQ);
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java b/server/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
index ba7dd44..353402d 100755
--- a/server/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
+++ b/server/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
@@ -198,7 +198,7 @@ public class DataCenterIpAddressDaoImpl extends GenericDaoBase<DataCenterIpAddre
return count.get(0);
}
- protected DataCenterIpAddressDaoImpl() {
+ public DataCenterIpAddressDaoImpl() {
super();
AllFieldsSearch = createSearchBuilder();
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java b/server/src/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java
index b7a30ed..6456ebf 100644
--- a/server/src/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java
+++ b/server/src/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java
@@ -151,7 +151,7 @@ public class DataCenterLinkLocalIpAddressDaoImpl extends GenericDaoBase<DataCent
return count.get(0);
}
- protected DataCenterLinkLocalIpAddressDaoImpl() {
+ public DataCenterLinkLocalIpAddressDaoImpl() {
super();
AllFieldsSearch = createSearchBuilder();
AllFieldsSearch.and("ip", AllFieldsSearch.entity().getIpAddress(), SearchCriteria.Op.EQ);
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/dc/dao/DataCenterVnetDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/DataCenterVnetDaoImpl.java b/server/src/com/cloud/dc/dao/DataCenterVnetDaoImpl.java
index bdfb8cc..af8bd25 100755
--- a/server/src/com/cloud/dc/dao/DataCenterVnetDaoImpl.java
+++ b/server/src/com/cloud/dc/dao/DataCenterVnetDaoImpl.java
@@ -142,7 +142,7 @@ public class DataCenterVnetDaoImpl extends GenericDaoBase<DataCenterVnetVO, Long
update(vo.getId(), vo);
}
- protected DataCenterVnetDaoImpl() {
+ public DataCenterVnetDaoImpl() {
super();
DcSearchAllocated = createSearchBuilder();
DcSearchAllocated.and("dc", DcSearchAllocated.entity().getDataCenterId(), SearchCriteria.Op.EQ);
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/dc/dao/DcDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/DcDetailsDaoImpl.java b/server/src/com/cloud/dc/dao/DcDetailsDaoImpl.java
index fe07906..278fdb4 100644
--- a/server/src/com/cloud/dc/dao/DcDetailsDaoImpl.java
+++ b/server/src/com/cloud/dc/dao/DcDetailsDaoImpl.java
@@ -36,7 +36,7 @@ public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implement
protected final SearchBuilder<DcDetailVO> DcSearch;
protected final SearchBuilder<DcDetailVO> DetailSearch;
- protected DcDetailsDaoImpl() {
+ public DcDetailsDaoImpl() {
DcSearch = createSearchBuilder();
DcSearch.and("dcId", DcSearch.entity().getDcId(), SearchCriteria.Op.EQ);
DcSearch.done();
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/dc/dao/HostPodDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/HostPodDao.java b/server/src/com/cloud/dc/dao/HostPodDao.java
index ced3484..03f7155 100644
--- a/server/src/com/cloud/dc/dao/HostPodDao.java
+++ b/server/src/com/cloud/dc/dao/HostPodDao.java
@@ -26,8 +26,6 @@ import com.cloud.vm.VirtualMachine;
public interface HostPodDao extends GenericDao<HostPodVO, Long> {
public List<HostPodVO> listByDataCenterId(long id);
- public List<HostPodVO> listByDataCenterIdVMTypeAndStates(long id, VirtualMachine.Type type, VirtualMachine.State... states);
-
public HostPodVO findByName(String name, long dcId);
public HashMap<Long, List<Object>> getCurrentPodCidrSubnets(long zoneId, long podIdToSkip);
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/dc/dao/HostPodDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/HostPodDaoImpl.java b/server/src/com/cloud/dc/dao/HostPodDaoImpl.java
index 7b635f0..07b4ad1 100644
--- a/server/src/com/cloud/dc/dao/HostPodDaoImpl.java
+++ b/server/src/com/cloud/dc/dao/HostPodDaoImpl.java
@@ -24,7 +24,6 @@ import java.util.HashMap;
import java.util.List;
import javax.ejb.Local;
-import javax.inject.Inject;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;
@@ -33,26 +32,20 @@ import com.cloud.dc.HostPodVO;
import com.cloud.org.Grouping;
import com.cloud.utils.db.GenericDaoBase;
import com.cloud.utils.db.GenericSearchBuilder;
-import com.cloud.utils.db.JoinBuilder;
import com.cloud.utils.db.SearchBuilder;
import com.cloud.utils.db.SearchCriteria;
import com.cloud.utils.db.SearchCriteria.Op;
import com.cloud.utils.db.Transaction;
-import com.cloud.vm.VMInstanceVO;
-import com.cloud.vm.VirtualMachine;
-import com.cloud.vm.dao.VMInstanceDao;
-import com.cloud.vm.dao.VMInstanceDaoImpl;
@Component
@Local(value={HostPodDao.class})
public class HostPodDaoImpl extends GenericDaoBase<HostPodVO, Long> implements HostPodDao {
private static final Logger s_logger = Logger.getLogger(HostPodDaoImpl.class);
- @Inject VMInstanceDao _vmDao;
protected SearchBuilder<HostPodVO> DataCenterAndNameSearch;
protected SearchBuilder<HostPodVO> DataCenterIdSearch;
- protected HostPodDaoImpl() {
+ public HostPodDaoImpl() {
DataCenterAndNameSearch = createSearchBuilder();
DataCenterAndNameSearch.and("dc", DataCenterAndNameSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
DataCenterAndNameSearch.and("name", DataCenterAndNameSearch.entity().getName(), SearchCriteria.Op.EQ);
@@ -72,26 +65,6 @@ public class HostPodDaoImpl extends GenericDaoBase<HostPodVO, Long> implements H
}
@Override
- public List<HostPodVO> listByDataCenterIdVMTypeAndStates(long id, VirtualMachine.Type type, VirtualMachine.State... states) {
- SearchBuilder<VMInstanceVO> vmInstanceSearch = _vmDao.createSearchBuilder();
- vmInstanceSearch.and("type", vmInstanceSearch.entity().getType(), SearchCriteria.Op.EQ);
- vmInstanceSearch.and("states", vmInstanceSearch.entity().getState(), SearchCriteria.Op.IN);
-
- SearchBuilder<HostPodVO> podIdSearch = createSearchBuilder();
- podIdSearch.and("dc", podIdSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
- podIdSearch.select(null, SearchCriteria.Func.DISTINCT, podIdSearch.entity().getId());
- podIdSearch.join("vmInstanceSearch", vmInstanceSearch, podIdSearch.entity().getId(),
- vmInstanceSearch.entity().getPodIdToDeployIn(), JoinBuilder.JoinType.INNER);
- podIdSearch.done();
-
- SearchCriteria<HostPodVO> sc = podIdSearch.create();
- sc.setParameters("dc", id);
- sc.setJoinParameters("vmInstanceSearch", "type", type);
- sc.setJoinParameters("vmInstanceSearch", "states", (Object[]) states);
- return listBy(sc);
- }
-
- @Override
public HostPodVO findByName(String name, long dcId) {
SearchCriteria<HostPodVO> sc = DataCenterAndNameSearch.create();
sc.setParameters("dc", dcId);
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/dc/dao/PodVlanDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/PodVlanDaoImpl.java b/server/src/com/cloud/dc/dao/PodVlanDaoImpl.java
index 84918b0..96cd42c 100755
--- a/server/src/com/cloud/dc/dao/PodVlanDaoImpl.java
+++ b/server/src/com/cloud/dc/dao/PodVlanDaoImpl.java
@@ -117,7 +117,7 @@ public class PodVlanDaoImpl extends GenericDaoBase<PodVlanVO, Long> implements G
update(vo.getId(), vo);
}
- protected PodVlanDaoImpl() {
+ public PodVlanDaoImpl() {
super();
PodSearchAllocated = createSearchBuilder();
PodSearchAllocated.and("podId", PodSearchAllocated.entity().getPodId(), SearchCriteria.Op.EQ);
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/host/dao/HostDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/host/dao/HostDaoImpl.java b/server/src/com/cloud/host/dao/HostDaoImpl.java
index 5d56485..50de8e6 100755
--- a/server/src/com/cloud/host/dao/HostDaoImpl.java
+++ b/server/src/com/cloud/host/dao/HostDaoImpl.java
@@ -64,7 +64,7 @@ import com.cloud.utils.db.Transaction;
import com.cloud.utils.db.UpdateBuilder;
import com.cloud.utils.exception.CloudRuntimeException;
-@Component
+
@Local(value = { HostDao.class })
@DB(txn = false)
@TableGenerator(name = "host_req_sq", table = "op_host", pkColumnName = "id", valueColumnName = "sequence", allocationSize = 1)
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/host/dao/HostDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/host/dao/HostDetailsDaoImpl.java b/server/src/com/cloud/host/dao/HostDetailsDaoImpl.java
index 43f7b07..b6a9cef 100644
--- a/server/src/com/cloud/host/dao/HostDetailsDaoImpl.java
+++ b/server/src/com/cloud/host/dao/HostDetailsDaoImpl.java
@@ -37,7 +37,7 @@ public class HostDetailsDaoImpl extends GenericDaoBase<DetailVO, Long> implement
protected final SearchBuilder<DetailVO> HostSearch;
protected final SearchBuilder<DetailVO> DetailSearch;
- protected HostDetailsDaoImpl() {
+ public HostDetailsDaoImpl() {
HostSearch = createSearchBuilder();
HostSearch.and("hostId", HostSearch.entity().getHostId(), SearchCriteria.Op.EQ);
HostSearch.done();
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/host/dao/HostTagsDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/host/dao/HostTagsDaoImpl.java b/server/src/com/cloud/host/dao/HostTagsDaoImpl.java
index e98e7e2..0e93275 100644
--- a/server/src/com/cloud/host/dao/HostTagsDaoImpl.java
+++ b/server/src/com/cloud/host/dao/HostTagsDaoImpl.java
@@ -34,7 +34,7 @@ import com.cloud.utils.db.Transaction;
public class HostTagsDaoImpl extends GenericDaoBase<HostTagVO, Long> implements HostTagsDao {
protected final SearchBuilder<HostTagVO> HostSearch;
- protected HostTagsDaoImpl() {
+ public HostTagsDaoImpl() {
HostSearch = createSearchBuilder();
HostSearch.and("hostId", HostSearch.entity().getHostId(), SearchCriteria.Op.EQ);
HostSearch.done();
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/ExternalFirewallDeviceManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalFirewallDeviceManager.java b/server/src/com/cloud/network/ExternalFirewallDeviceManager.java
index f758ca1..2768f57 100644
--- a/server/src/com/cloud/network/ExternalFirewallDeviceManager.java
+++ b/server/src/com/cloud/network/ExternalFirewallDeviceManager.java
@@ -21,6 +21,7 @@ import java.util.List;
import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.host.Host;
+import com.cloud.network.dao.ExternalFirewallDeviceVO;
import com.cloud.network.rules.FirewallRule;
import com.cloud.network.rules.PortForwardingRule;
import com.cloud.resource.ServerResource;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java b/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
index 3761a14..7623b3f 100644
--- a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
@@ -63,16 +63,21 @@ import com.cloud.host.dao.HostDetailsDao;
import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice;
import com.cloud.network.Networks.TrafficType;
import com.cloud.network.dao.ExternalFirewallDeviceDao;
+import com.cloud.network.dao.ExternalFirewallDeviceVO;
import com.cloud.network.dao.FirewallRulesDao;
import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
import com.cloud.network.dao.InlineLoadBalancerNicMapDao;
+import com.cloud.network.dao.InlineLoadBalancerNicMapVO;
import com.cloud.network.dao.LoadBalancerDao;
import com.cloud.network.dao.NetworkDao;
import com.cloud.network.dao.NetworkExternalFirewallDao;
+import com.cloud.network.dao.NetworkExternalFirewallVO;
import com.cloud.network.dao.NetworkServiceMapDao;
import com.cloud.network.dao.PhysicalNetworkDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
+import com.cloud.network.dao.PhysicalNetworkVO;
import com.cloud.network.dao.VpnUserDao;
import com.cloud.network.rules.FirewallRule;
import com.cloud.network.rules.PortForwardingRule;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/ExternalFirewallDeviceVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalFirewallDeviceVO.java b/server/src/com/cloud/network/ExternalFirewallDeviceVO.java
deleted file mode 100644
index 83be8c4..0000000
--- a/server/src/com/cloud/network/ExternalFirewallDeviceVO.java
+++ /dev/null
@@ -1,161 +0,0 @@
-// 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 com.cloud.network;
-
-import org.apache.cloudstack.api.Identity;
-import org.apache.cloudstack.api.InternalIdentity;
-
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-/**
- * ExternalFirewallDeviceVO contains information of a external firewall device (Juniper SRX) added into a deployment
- */
-
-@Entity
-@Table(name="external_firewall_devices")
-public class ExternalFirewallDeviceVO implements InternalIdentity, Identity {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id")
- private long id;
-
- @Column(name="uuid")
- private String uuid;
-
- @Column(name = "host_id")
- private long hostId;
-
- @Column(name = "physical_network_id")
- private long physicalNetworkId;
-
- @Column(name = "provider_name")
- private String providerName;
-
- @Column(name = "device_name")
- private String deviceName;
-
- @Column(name="device_state")
- @Enumerated(value=EnumType.STRING)
- FirewallDeviceState deviceState;
-
- @Column(name="is_dedicated")
- private boolean isDedicatedDevice;
-
- @Column(name = "capacity")
- private long capacity;
-
- @Column(name = "allocation_state")
- @Enumerated(value=EnumType.STRING)
- private FirewallDeviceAllocationState allocationState;
-
- //keeping it enum for future possible states Maintenance, Shutdown
- public enum FirewallDeviceState {
- Enabled,
- Disabled
- }
-
- public enum FirewallDeviceAllocationState {
- Free,
- Allocated
- }
-
- public ExternalFirewallDeviceVO(long hostId, long physicalNetworkId, String provider_name, String device_name, long capacity, boolean dedicated) {
- this.physicalNetworkId = physicalNetworkId;
- this.providerName = provider_name;
- this.deviceName = device_name;
- this.hostId = hostId;
- this.deviceState = FirewallDeviceState.Disabled;
- this.allocationState = FirewallDeviceAllocationState.Free;
- this.capacity = capacity;
- this.isDedicatedDevice = dedicated;
- this.deviceState = FirewallDeviceState.Enabled;
- this.uuid = UUID.randomUUID().toString();
- }
-
- public ExternalFirewallDeviceVO() {
- this.uuid = UUID.randomUUID().toString();
- }
-
- public long getId() {
- return id;
- }
-
- public long getPhysicalNetworkId() {
- return physicalNetworkId;
- }
-
- public String getProviderName() {
- return providerName;
- }
-
- public String getDeviceName() {
- return deviceName;
- }
-
- public long getHostId() {
- return hostId;
- }
-
- public long getCapacity() {
- return capacity;
- }
-
- public void setCapacity(long capacity) {
- this.capacity = capacity;
- }
-
- public FirewallDeviceState getDeviceState() {
- return deviceState;
- }
-
- public void setDeviceState(FirewallDeviceState state) {
- this.deviceState = state;
- }
-
- public FirewallDeviceAllocationState getAllocationState() {
- return allocationState;
- }
-
- public void setAllocationState(FirewallDeviceAllocationState allocationState) {
- this.allocationState = allocationState;
- }
-
- public boolean getIsDedicatedDevice() {
- return isDedicatedDevice;
- }
-
- public void setIsDedicatedDevice(boolean isDedicated) {
- isDedicatedDevice = isDedicated;
- }
-
- public String getUuid() {
- return uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/ExternalLoadBalancerDeviceManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManager.java b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManager.java
index 5e7b98a..d979f07 100644
--- a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManager.java
+++ b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManager.java
@@ -21,6 +21,7 @@ import java.util.List;
import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.host.Host;
+import com.cloud.network.dao.ExternalLoadBalancerDeviceVO;
import com.cloud.network.rules.FirewallRule;
import com.cloud.resource.ServerResource;
import com.cloud.utils.component.Manager;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
index d1e1faf..bcefccc 100644
--- a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
@@ -59,8 +59,6 @@ import com.cloud.host.Host;
import com.cloud.host.HostVO;
import com.cloud.host.dao.HostDao;
import com.cloud.host.dao.HostDetailsDao;
-import com.cloud.network.ExternalLoadBalancerDeviceVO.LBDeviceAllocationState;
-import com.cloud.network.ExternalLoadBalancerDeviceVO.LBDeviceState;
import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice;
import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service;
@@ -68,16 +66,23 @@ import com.cloud.network.Networks.TrafficType;
import com.cloud.network.addr.PublicIp;
import com.cloud.network.dao.ExternalFirewallDeviceDao;
import com.cloud.network.dao.ExternalLoadBalancerDeviceDao;
+import com.cloud.network.dao.ExternalLoadBalancerDeviceVO;
import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
import com.cloud.network.dao.InlineLoadBalancerNicMapDao;
+import com.cloud.network.dao.InlineLoadBalancerNicMapVO;
import com.cloud.network.dao.LoadBalancerDao;
import com.cloud.network.dao.NetworkDao;
import com.cloud.network.dao.NetworkExternalFirewallDao;
import com.cloud.network.dao.NetworkExternalLoadBalancerDao;
+import com.cloud.network.dao.NetworkExternalLoadBalancerVO;
import com.cloud.network.dao.NetworkServiceMapDao;
import com.cloud.network.dao.PhysicalNetworkDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
+import com.cloud.network.dao.PhysicalNetworkVO;
+import com.cloud.network.dao.ExternalLoadBalancerDeviceVO.LBDeviceAllocationState;
+import com.cloud.network.dao.ExternalLoadBalancerDeviceVO.LBDeviceState;
import com.cloud.network.element.IpDeployer;
import com.cloud.network.element.NetworkElement;
import com.cloud.network.element.StaticNatServiceProvider;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/ExternalLoadBalancerDeviceVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalLoadBalancerDeviceVO.java b/server/src/com/cloud/network/ExternalLoadBalancerDeviceVO.java
deleted file mode 100644
index d77352a..0000000
--- a/server/src/com/cloud/network/ExternalLoadBalancerDeviceVO.java
+++ /dev/null
@@ -1,200 +0,0 @@
-// 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 com.cloud.network;
-
-import org.apache.cloudstack.api.Identity;
-import org.apache.cloudstack.api.InternalIdentity;
-import org.apache.cloudstack.network.ExternalNetworkDeviceManager;
-
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-/**
- * ExternalLoadBalancerDeviceVO contains information on external load balancer devices (F5/Netscaler VPX,MPX,SDX) added into a deployment
- */
-
-@Entity
-@Table(name="external_load_balancer_devices")
-public class ExternalLoadBalancerDeviceVO implements InternalIdentity, Identity {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id")
- private long id;
-
- @Column(name="uuid")
- private String uuid;
-
- @Column(name = "host_id")
- private long hostId;
-
- @Column(name = "physical_network_id")
- private long physicalNetworkId;
-
- @Column(name = "provider_name")
- private String providerName;
-
- @Column(name = "device_name")
- private String deviceName;
-
- @Column(name="device_state")
- @Enumerated(value=EnumType.STRING)
- private LBDeviceState state;
-
- @Column(name = "allocation_state")
- @Enumerated(value=EnumType.STRING)
- private LBDeviceAllocationState allocationState;
-
- @Column(name="is_managed")
- private boolean isManagedDevice;
-
- @Column(name="is_dedicated")
- private boolean isDedicatedDevice;
-
- @Column(name = "parent_host_id")
- private long parentHostId;
-
- @Column(name = "capacity")
- private long capacity;
-
- //keeping it enum for future possible states Maintenance, Shutdown
- public enum LBDeviceState {
- Enabled,
- Disabled
- }
-
- public enum LBDeviceAllocationState {
- Free, // In this state no networks are using this device for load balancing
- Shared, // In this state one or more networks will be using this device for load balancing
- Dedicated, // In this state this device is dedicated for a single network
- Provider // This state is set only for device that can dynamically provision LB appliances
- }
-
- public ExternalLoadBalancerDeviceVO(long hostId, long physicalNetworkId, String provider_name, String device_name,
- long capacity, boolean dedicated) {
- this.physicalNetworkId = physicalNetworkId;
- this.providerName = provider_name;
- this.deviceName = device_name;
- this.hostId = hostId;
- this.state = LBDeviceState.Disabled;
- this.allocationState = LBDeviceAllocationState.Free;
- this.capacity = capacity;
- this.isDedicatedDevice = dedicated;
- this.isManagedDevice = false;
- this.state = LBDeviceState.Enabled;
- this.uuid = UUID.randomUUID().toString();
-
- if (device_name.equalsIgnoreCase(ExternalNetworkDeviceManager.NetworkDevice.NetscalerSDXLoadBalancer.getName())) {
- this.allocationState = LBDeviceAllocationState.Provider;
- }
- }
-
- public ExternalLoadBalancerDeviceVO(long hostId, long physicalNetworkId, String provider_name, String device_name,
- long capacity, boolean dedicated, boolean managed, long parentHostId) {
- this(hostId, physicalNetworkId, provider_name, device_name, capacity, dedicated);
- this.isManagedDevice = managed;
- this.parentHostId = parentHostId;
- }
-
- public ExternalLoadBalancerDeviceVO() {
- this.uuid = UUID.randomUUID().toString();
- }
-
- public long getId() {
- return id;
- }
-
- public long getPhysicalNetworkId() {
- return physicalNetworkId;
- }
-
- public String getProviderName() {
- return providerName;
- }
-
- public String getDeviceName() {
- return deviceName;
- }
-
- public long getHostId() {
- return hostId;
- }
-
- public long getParentHostId() {
- return parentHostId;
- }
-
- public void setParentHostId(long parentHostId) {
- this.parentHostId = parentHostId;
- }
-
- public long getCapacity() {
- return capacity;
- }
-
- public void setCapacity(long capacity) {
- this.capacity = capacity;
- }
-
- public LBDeviceState getState() {
- return state;
- }
-
- public void setState(LBDeviceState state) {
- this.state = state;
- }
-
- public LBDeviceAllocationState getAllocationState() {
- return allocationState;
- }
-
- public void setAllocationState(LBDeviceAllocationState allocationState) {
- this.allocationState = allocationState;
- }
-
- public boolean getIsManagedDevice() {
- return isManagedDevice;
- }
-
- public void setIsManagedDevice(boolean managed) {
- this.isManagedDevice = managed;
- }
-
- public boolean getIsDedicatedDevice() {
- return isDedicatedDevice;
- }
-
- public void setIsDedicatedDevice(boolean isDedicated) {
- isDedicatedDevice = isDedicated;
- }
-
- public String getUuid() {
- return uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/ExternalLoadBalancerUsageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalLoadBalancerUsageManagerImpl.java b/server/src/com/cloud/network/ExternalLoadBalancerUsageManagerImpl.java
index be22a54..ad5a6b7 100644
--- a/server/src/com/cloud/network/ExternalLoadBalancerUsageManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalLoadBalancerUsageManagerImpl.java
@@ -48,13 +48,18 @@ import com.cloud.host.dao.HostDao;
import com.cloud.host.dao.HostDetailsDao;
import com.cloud.network.dao.ExternalFirewallDeviceDao;
import com.cloud.network.dao.ExternalLoadBalancerDeviceDao;
+import com.cloud.network.dao.ExternalLoadBalancerDeviceVO;
import com.cloud.network.dao.IPAddressDao;
import com.cloud.network.dao.InlineLoadBalancerNicMapDao;
+import com.cloud.network.dao.InlineLoadBalancerNicMapVO;
import com.cloud.network.dao.LoadBalancerDao;
+import com.cloud.network.dao.LoadBalancerVO;
import com.cloud.network.dao.NetworkDao;
import com.cloud.network.dao.NetworkExternalFirewallDao;
import com.cloud.network.dao.NetworkExternalLoadBalancerDao;
+import com.cloud.network.dao.NetworkExternalLoadBalancerVO;
import com.cloud.network.dao.NetworkServiceMapDao;
+import com.cloud.network.dao.NetworkVO;
import com.cloud.network.dao.PhysicalNetworkDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
import com.cloud.network.rules.dao.PortForwardingRulesDao;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/FirewallRulesCidrsVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/FirewallRulesCidrsVO.java b/server/src/com/cloud/network/FirewallRulesCidrsVO.java
deleted file mode 100644
index 0048dce..0000000
--- a/server/src/com/cloud/network/FirewallRulesCidrsVO.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// 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 com.cloud.network;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-@Entity
-@Table(name=("firewall_rules_cidrs"))
-public class FirewallRulesCidrsVO implements InternalIdentity {
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- private Long id;
-
- @Column(name="firewall_rule_id")
- private long firewallRuleId;
-
- @Column(name="source_cidr")
- private String sourceCidrList;
-
- public FirewallRulesCidrsVO() { }
-
- public FirewallRulesCidrsVO(long firewallRuleId, String sourceCidrList) {
- this.firewallRuleId = firewallRuleId;
- this.sourceCidrList = sourceCidrList;
- }
-
- public long getId() {
- return id;
- }
-
- public long getFirewallRuleId() {
- return firewallRuleId;
- }
-
- public String getCidr() {
- return sourceCidrList;
- }
-
- public String getSourceCidrList() {
- return sourceCidrList;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/IPAddressVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/IPAddressVO.java b/server/src/com/cloud/network/IPAddressVO.java
deleted file mode 100644
index c17d68f..0000000
--- a/server/src/com/cloud/network/IPAddressVO.java
+++ /dev/null
@@ -1,292 +0,0 @@
-// 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 com.cloud.network;
-
-import java.util.Date;
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Transient;
-
-import org.apache.cloudstack.api.Identity;
-import com.cloud.utils.net.Ip;
-import org.apache.cloudstack.api.InternalIdentity;
-
-/**
- * A bean representing a public IP Address
- *
- */
-@Entity
-@Table(name=("user_ip_address"))
-public class IPAddressVO implements IpAddress {
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- long id;
-
- @Column(name="account_id")
- private Long allocatedToAccountId = null;
-
- @Column(name="domain_id")
- private Long allocatedInDomainId = null;
-
- @Id
- @Column(name="public_ip_address")
- @Enumerated(value=EnumType.STRING)
- private Ip address = null;
-
- @Column(name="data_center_id", updatable=false)
- private long dataCenterId;
-
- @Column(name="source_nat")
- private boolean sourceNat;
-
- @Column(name="allocated")
- @Temporal(value=TemporalType.TIMESTAMP)
- private Date allocatedTime;
-
- @Column(name="vlan_db_id")
- private long vlanId;
-
- @Column(name="one_to_one_nat")
- private boolean oneToOneNat;
-
- @Column(name="vm_id")
- private Long associatedWithVmId;
-
- @Column(name="state")
- private State state;
-
- @Column(name="mac_address")
- private long macAddress;
-
- @Column(name="source_network_id")
- private Long sourceNetworkId;
-
- @Column(name="network_id")
- private Long associatedWithNetworkId;
-
- @Column(name="uuid")
- private String uuid;
-
- @Column(name="physical_network_id")
- private Long physicalNetworkId;
-
- @Column(name="is_system")
- private boolean system;
-
- @Column(name="account_id")
- @Transient
- private Long accountId = null;
-
- @Transient
- @Column(name="domain_id")
- private Long domainId = null;
-
- @Column(name="vpc_id")
- private Long vpcId;
-
- protected IPAddressVO() {
- this.uuid = UUID.randomUUID().toString();
- }
-
- @Override
- public boolean readyToUse() {
- return state == State.Allocated;
- }
-
- public IPAddressVO(Ip address, long dataCenterId, long macAddress, long vlanDbId, boolean sourceNat) {
- this.address = address;
- this.dataCenterId = dataCenterId;
- this.vlanId = vlanDbId;
- this.sourceNat = sourceNat;
- this.allocatedInDomainId = null;
- this.allocatedToAccountId = null;
- this.allocatedTime = null;
- this.state = State.Free;
- this.macAddress = macAddress;
- this.uuid = UUID.randomUUID().toString();
- }
-
- public long getMacAddress() {
- return macAddress;
- }
-
- @Override
- public long getDataCenterId() {
- return dataCenterId;
- }
-
- @Override
- public Ip getAddress() {
- return address;
- }
-
- @Override
- public Long getAllocatedToAccountId() {
- return allocatedToAccountId;
- }
-
- @Override
- public Long getAllocatedInDomainId() {
- return allocatedInDomainId;
- }
-
- @Override
- public Long getAssociatedWithNetworkId() {
- return associatedWithNetworkId;
- }
-
- public void setAssociatedWithNetworkId(Long networkId) {
- this.associatedWithNetworkId = networkId;
- }
-
- @Override
- public Long getAssociatedWithVmId() {
- return associatedWithVmId;
- }
-
- public void setAssociatedWithVmId(Long associatedWithVmId) {
- this.associatedWithVmId = associatedWithVmId;
- }
-
- @Override
- public Date getAllocatedTime() {
- return allocatedTime;
- }
-
- public void setAllocatedToAccountId(Long accountId) {
- this.allocatedToAccountId = accountId;
- }
-
- public void setAllocatedInDomainId(Long domainId) {
- this.allocatedInDomainId = domainId;
- }
-
- public void setSourceNat(boolean sourceNat) {
- this.sourceNat = sourceNat;
- }
-
- @Override
- public boolean isSourceNat() {
- return sourceNat;
- }
-
- public void setAllocatedTime(Date allocated) {
- this.allocatedTime = allocated;
- }
-
- @Override
- public long getVlanId() {
- return this.vlanId;
- }
-
- public void setVlanId(long vlanDbId) {
- this.vlanId = vlanDbId;
- }
-
- @Override
- public boolean isOneToOneNat() {
- return oneToOneNat;
- }
-
- public void setOneToOneNat(boolean oneToOneNat) {
- this.oneToOneNat = oneToOneNat;
- }
-
- @Override
- public long getDomainId() {
- return allocatedInDomainId == null ? -1 : allocatedInDomainId;
- }
-
- @Override
- public long getAccountId() {
- return allocatedToAccountId == null ? -1 : allocatedToAccountId;
- }
-
- @Override
- public State getState() {
- return state;
- }
-
- public void setState(State state) {
- this.state = state;
- }
-
- @Override
- public String toString() {
- return new StringBuilder("Ip[").append(address).append("-").append(dataCenterId).append("]").toString();
- }
-
- @Override
- public long getId() {
- return id;
- }
-
- public Long getSourceNetworkId() {
- return sourceNetworkId;
- }
-
- public void setSourceNetworkId(Long sourceNetworkId) {
- this.sourceNetworkId = sourceNetworkId;
- }
-
- @Override
- public String getUuid() {
- return this.uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-
- public Long getPhysicalNetworkId() {
- return physicalNetworkId;
- }
-
- public void setPhysicalNetworkId(Long physicalNetworkId) {
- this.physicalNetworkId = physicalNetworkId;
- }
-
- @Override
- public boolean getSystem() {
- return system;
- }
-
- public void setSystem(boolean isSystem) {
- this.system = isSystem;
- }
-
- @Override
- public Long getVpcId() {
- return vpcId;
- }
-
- @Override
- public void setVpcId(Long vpcId) {
- this.vpcId = vpcId;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/InlineLoadBalancerNicMapVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/InlineLoadBalancerNicMapVO.java b/server/src/com/cloud/network/InlineLoadBalancerNicMapVO.java
deleted file mode 100644
index 297aa2d..0000000
--- a/server/src/com/cloud/network/InlineLoadBalancerNicMapVO.java
+++ /dev/null
@@ -1,60 +0,0 @@
-// 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 com.cloud.network;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-@Entity
-@Table(name=("inline_load_balancer_nic_map"))
-public class InlineLoadBalancerNicMapVO implements InternalIdentity {
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- private long id;
-
- @Column(name="public_ip_address")
- private String publicIpAddress;
-
- @Column(name="nic_id")
- private long nicId;
-
- public InlineLoadBalancerNicMapVO() { }
-
- public InlineLoadBalancerNicMapVO(String publicIpAddress, long nicId) {
- this.publicIpAddress = publicIpAddress;
- this.nicId = nicId;
- }
-
- public long getId() {
- return id;
- }
-
- public String getPublicIpAddress() {
- return publicIpAddress;
- }
-
- public long getNicId() {
- return nicId;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/LBStickinessPolicyVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/LBStickinessPolicyVO.java b/server/src/com/cloud/network/LBStickinessPolicyVO.java
deleted file mode 100644
index 9a629ce..0000000
--- a/server/src/com/cloud/network/LBStickinessPolicyVO.java
+++ /dev/null
@@ -1,145 +0,0 @@
-// 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 com.cloud.network;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.PrimaryKeyJoinColumn;
-import javax.persistence.Table;
-import com.cloud.network.rules.StickinessPolicy;
-import com.cloud.utils.Pair;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name = ("load_balancer_stickiness_policies"))
-@PrimaryKeyJoinColumn(name = "load_balancer_id", referencedColumnName = "id")
-public class LBStickinessPolicyVO implements StickinessPolicy {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id")
- private long id;
-
- @Column(name = "load_balancer_id")
- private long loadBalancerId;
-
- @Column(name = "name")
- private String name;
-
- @Column(name = "description")
- private String description;
-
- @Column(name = "method_name")
- private String methodName;
-
- @Column(name = "params")
- private String paramsInDB;
-
- @Column(name = "uuid")
- private String uuid;
-
- @Column(name = "revoke")
- private boolean revoke = false;
- protected LBStickinessPolicyVO() {
- this.uuid = UUID.randomUUID().toString();
- }
-
-/* get the params in Map format and converts in to string format and stores in DB
- * paramsInDB represent the string stored in database :
- * Format : param1=value1¶m2=value2¶m3=value3&
- * Example for App cookie method: "name=cookapp&length=12&holdtime=3h" . Here 3 parameters name,length and holdtime with corresponding values.
- * getParams function is used to get in List<Pair<string,String>> Format.
- * - API response use Map format
- * - In database plain String with DB_PARM_DELIMITER
- * - rest of the code uses List<Pair<string,String>>
- */
- public LBStickinessPolicyVO(long loadBalancerId, String name, String methodName, Map paramList, String description) {
- this.loadBalancerId = loadBalancerId;
- this.name = name;
- this.methodName = methodName;
- StringBuilder sb = new StringBuilder("");
-
- if (paramList != null) {
- Iterator<HashMap<String, String>> iter = paramList.values().iterator();
- while (iter.hasNext()) {
- HashMap<String, String> paramKVpair = iter.next();
- String paramName = paramKVpair.get("name");
- String paramValue = paramKVpair.get("value");
- sb.append(paramName + "=" + paramValue + "&");
- }
- }
- paramsInDB = sb.toString();
- this.description = description;
- this.uuid = UUID.randomUUID().toString();
- }
-
- public List<Pair<String, String>> getParams() {
- List<Pair<String, String>> paramsList = new ArrayList<Pair<String, String>>();
- String[] params = paramsInDB.split("[=&]");
-
- for (int i = 0; i < (params.length - 1); i = i + 2) {
- paramsList.add(new Pair<String, String>(params[i], params[i + 1]));
- }
- return paramsList;
- }
-
- public long getId() {
- return id;
- }
-
- public long getLoadBalancerId() {
- return loadBalancerId;
- }
-
- public String getName() {
- return name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getMethodName() {
- return methodName;
- }
-
- public boolean isRevoke() {
- return revoke;
- }
-
- public void setRevoke(boolean revoke) {
- this.revoke = revoke;
- }
-
- @Override
- public String getUuid() {
- return this.uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/LoadBalancerVMMapVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/LoadBalancerVMMapVO.java b/server/src/com/cloud/network/LoadBalancerVMMapVO.java
deleted file mode 100644
index 3cc66dc..0000000
--- a/server/src/com/cloud/network/LoadBalancerVMMapVO.java
+++ /dev/null
@@ -1,77 +0,0 @@
-// 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 com.cloud.network;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-@Entity
-@Table(name=("load_balancer_vm_map"))
-public class LoadBalancerVMMapVO implements InternalIdentity {
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id")
- private long id;
-
- @Column(name="load_balancer_id")
- private long loadBalancerId;
-
- @Column(name="instance_id")
- private long instanceId;
-
- @Column(name="revoke")
- private boolean revoke = false;
-
- public LoadBalancerVMMapVO() { }
-
- public LoadBalancerVMMapVO(long loadBalancerId, long instanceId) {
- this.loadBalancerId = loadBalancerId;
- this.instanceId = instanceId;
- }
-
- public LoadBalancerVMMapVO(long loadBalancerId, long instanceId, boolean revoke) {
- this.loadBalancerId = loadBalancerId;
- this.instanceId = instanceId;
- this.revoke = revoke;
- }
-
- public long getId() {
- return id;
- }
-
- public long getLoadBalancerId() {
- return loadBalancerId;
- }
-
- public long getInstanceId() {
- return instanceId;
- }
-
- public boolean isRevoke() {
- return revoke;
- }
-
- public void setRevoke(boolean revoke) {
- this.revoke = revoke;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/LoadBalancerVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/LoadBalancerVO.java b/server/src/com/cloud/network/LoadBalancerVO.java
deleted file mode 100644
index df7c01d..0000000
--- a/server/src/com/cloud/network/LoadBalancerVO.java
+++ /dev/null
@@ -1,98 +0,0 @@
-// 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 com.cloud.network;
-
-import javax.persistence.Column;
-import javax.persistence.DiscriminatorValue;
-import javax.persistence.Entity;
-import javax.persistence.PrimaryKeyJoinColumn;
-import javax.persistence.Table;
-
-import com.cloud.network.rules.FirewallRuleVO;
-import com.cloud.network.rules.LoadBalancer;
-import com.cloud.utils.net.NetUtils;
-
-@Entity
-@Table(name=("load_balancing_rules"))
-@DiscriminatorValue(value="LoadBalancing")
-@PrimaryKeyJoinColumn(name="id")
-public class LoadBalancerVO extends FirewallRuleVO implements LoadBalancer {
-
- @Column(name="name")
- private String name;
-
- @Column(name="description", length=4096)
- private String description;
-
- @Column(name="algorithm")
- private String algorithm;
-
- @Column(name="default_port_start")
- private int defaultPortStart;
-
- @Column(name="default_port_end")
- private int defaultPortEnd;
-
- public LoadBalancerVO() {
- }
-
- public LoadBalancerVO(String xId, String name, String description, long srcIpId, int srcPort, int dstPort, String algorithm, long networkId, long accountId, long domainId) {
- super(xId, srcIpId, srcPort, NetUtils.TCP_PROTO, networkId, accountId, domainId, Purpose.LoadBalancing, null, null, null, null);
- this.name = name;
- this.description = description;
- this.algorithm = algorithm;
- this.defaultPortStart = dstPort;
- this.defaultPortEnd = dstPort;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public String getDescription() {
- return description;
- }
-
- @Override
- public String getAlgorithm() {
- return algorithm;
- }
-
- @Override
- public int getDefaultPortStart() {
- return defaultPortStart;
- }
-
- @Override
- public int getDefaultPortEnd() {
- return defaultPortEnd;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setAlgorithm(String algorithm) {
- this.algorithm = algorithm;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/NetworkAccountDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkAccountDaoImpl.java b/server/src/com/cloud/network/NetworkAccountDaoImpl.java
deleted file mode 100644
index e8ff27c..0000000
--- a/server/src/com/cloud/network/NetworkAccountDaoImpl.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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 com.cloud.network;
-
-import org.springframework.stereotype.Component;
-
-import com.cloud.utils.db.GenericDao;
-import com.cloud.utils.db.GenericDaoBase;
-
-@Component
-public class NetworkAccountDaoImpl extends GenericDaoBase<NetworkAccountVO, Long> implements GenericDao<NetworkAccountVO, Long> {
- public NetworkAccountDaoImpl() {
- super();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/NetworkAccountVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkAccountVO.java b/server/src/com/cloud/network/NetworkAccountVO.java
deleted file mode 100644
index b51e78c..0000000
--- a/server/src/com/cloud/network/NetworkAccountVO.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// 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 com.cloud.network;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import com.cloud.user.OwnedBy;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="account_network_ref")
-public class NetworkAccountVO implements OwnedBy, InternalIdentity {
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- long id;
-
- @Column(name="account_id")
- long accountId;
-
- @Column(name="network_id")
- long networkId;
-
- @Column(name="is_owner")
- boolean owner;
-
- protected NetworkAccountVO() {
- }
-
- public NetworkAccountVO(long networkId, long accountId, boolean owner) {
- this.networkId = networkId;
- this.accountId = accountId;
- this.owner = owner;
- }
-
- @Override
- public long getId() {
- return id;
- }
-
- @Override
- public long getAccountId() {
- return accountId;
- }
-
- public long getNetworkId() {
- return networkId;
- }
-
- public boolean isOwner() {
- return owner;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/NetworkDomainVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkDomainVO.java b/server/src/com/cloud/network/NetworkDomainVO.java
deleted file mode 100644
index 9b79887..0000000
--- a/server/src/com/cloud/network/NetworkDomainVO.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// 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 com.cloud.network;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import com.cloud.domain.PartOf;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="domain_network_ref")
-public class NetworkDomainVO implements PartOf, InternalIdentity {
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- long id;
-
- @Column(name="domain_id")
- long domainId;
-
- @Column(name="network_id")
- long networkId;
-
- @Column(name="subdomain_access")
- Boolean subdomainAccess;
-
- protected NetworkDomainVO() {
- }
-
- public NetworkDomainVO(long networkId, long domainId, Boolean subdomainAccess) {
- this.networkId = networkId;
- this.domainId = domainId;
- this.subdomainAccess = subdomainAccess;
- }
-
- @Override
- public long getId() {
- return id;
- }
-
- @Override
- public long getDomainId() {
- return domainId;
- }
-
- public long getNetworkId() {
- return networkId;
- }
-
- public Boolean isSubdomainAccess() {
- return subdomainAccess;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/NetworkExternalFirewallVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkExternalFirewallVO.java b/server/src/com/cloud/network/NetworkExternalFirewallVO.java
deleted file mode 100644
index 800e737..0000000
--- a/server/src/com/cloud/network/NetworkExternalFirewallVO.java
+++ /dev/null
@@ -1,88 +0,0 @@
-// 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 com.cloud.network;
-
-import java.util.Date;
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import com.cloud.utils.db.GenericDao;
-import org.apache.cloudstack.api.InternalIdentity;
-
-/**
- * NetworkExternalFirewallVO contains information on the networks that are using external firewall
- */
-
-@Entity
-@Table(name="network_external_firewall_device_map")
-public class NetworkExternalFirewallVO implements InternalIdentity {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id")
- private long id;
-
- @Column(name="uuid")
- private String uuid;
-
- @Column(name = "network_id")
- private long networkId;
-
- @Column(name = "external_firewall_device_id")
- private long externalFirewallDeviceId;
-
- @Column(name=GenericDao.CREATED_COLUMN)
- Date created;
-
- @Column(name=GenericDao.REMOVED_COLUMN)
- Date removed;
-
- public NetworkExternalFirewallVO(long networkId, long externalFirewallDeviceId) {
- this.networkId = networkId;
- this.externalFirewallDeviceId = externalFirewallDeviceId;
- this.uuid = UUID.randomUUID().toString();
- }
-
- public NetworkExternalFirewallVO() {
- this.uuid = UUID.randomUUID().toString();
- }
-
- public long getId() {
- return id;
- }
-
- public long getNetworkId() {
- return networkId;
- }
-
- public long getExternalFirewallDeviceId() {
- return externalFirewallDeviceId;
- }
-
- public String getUuid() {
- return uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/NetworkExternalLoadBalancerVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkExternalLoadBalancerVO.java b/server/src/com/cloud/network/NetworkExternalLoadBalancerVO.java
deleted file mode 100644
index 17f9ffd..0000000
--- a/server/src/com/cloud/network/NetworkExternalLoadBalancerVO.java
+++ /dev/null
@@ -1,89 +0,0 @@
-// 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 com.cloud.network;
-
-import java.util.Date;
-import java.util.UUID;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import com.cloud.utils.db.GenericDao;
-import org.apache.cloudstack.api.InternalIdentity;
-
-/**
- * NetworkExternalLoadBalancerVO contains mapping of a network and the external load balancer device id assigned to the network
- */
-
-@Entity
-@Table(name="network_external_lb_device_map")
-public class NetworkExternalLoadBalancerVO implements InternalIdentity {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id")
- private long id;
-
- @Column(name="uuid")
- private String uuid;
-
- @Column(name = "network_id")
- private long networkId;
-
- @Column(name = "external_load_balancer_device_id")
- private long externalLBDeviceId;
-
- @Column(name=GenericDao.CREATED_COLUMN)
- Date created;
-
- @Column(name=GenericDao.REMOVED_COLUMN)
- Date removed;
-
- public NetworkExternalLoadBalancerVO(long networkId, long externalLBDeviceID) {
- this.networkId = networkId;
- this.externalLBDeviceId = externalLBDeviceID;
- this.uuid = UUID.randomUUID().toString();
- }
-
- public NetworkExternalLoadBalancerVO(){
- this.uuid = UUID.randomUUID().toString();
- }
-
- public long getId() {
- return id;
- }
-
- public long getNetworkId() {
- return networkId;
- }
-
- public long getExternalLBDeviceId() {
- return externalLBDeviceId;
- }
-
- public String getUuid() {
- return uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/NetworkManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManager.java b/server/src/com/cloud/network/NetworkManager.java
index 546f1bf..5c5c893 100755
--- a/server/src/com/cloud/network/NetworkManager.java
+++ b/server/src/com/cloud/network/NetworkManager.java
@@ -34,6 +34,8 @@ import com.cloud.exception.ResourceUnavailableException;
import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service;
import com.cloud.network.addr.PublicIp;
+import com.cloud.network.dao.IPAddressVO;
+import com.cloud.network.dao.NetworkVO;
import com.cloud.network.element.LoadBalancingServiceProvider;
import com.cloud.network.element.StaticNatServiceProvider;
import com.cloud.network.element.UserDataServiceProvider;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index 706d332..09ffece 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -107,14 +107,19 @@ import com.cloud.network.Networks.TrafficType;
import com.cloud.network.addr.PublicIp;
import com.cloud.network.dao.FirewallRulesDao;
import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
import com.cloud.network.dao.LoadBalancerDao;
+import com.cloud.network.dao.LoadBalancerVO;
import com.cloud.network.dao.NetworkDao;
import com.cloud.network.dao.NetworkDomainDao;
import com.cloud.network.dao.NetworkServiceMapDao;
+import com.cloud.network.dao.NetworkServiceMapVO;
+import com.cloud.network.dao.NetworkVO;
import com.cloud.network.dao.PhysicalNetworkDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
import com.cloud.network.dao.PhysicalNetworkTrafficTypeDao;
import com.cloud.network.dao.PhysicalNetworkTrafficTypeVO;
+import com.cloud.network.dao.PhysicalNetworkVO;
import com.cloud.network.element.DhcpServiceProvider;
import com.cloud.network.element.IpDeployer;
import com.cloud.network.element.LoadBalancingServiceProvider;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4fbecf15/server/src/com/cloud/network/NetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java
index 307294c..222cd02 100644
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -59,14 +59,19 @@ import com.cloud.network.Networks.TrafficType;
import com.cloud.network.addr.PublicIp;
import com.cloud.network.dao.FirewallRulesDao;
import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
import com.cloud.network.dao.NetworkDao;
import com.cloud.network.dao.NetworkDomainDao;
+import com.cloud.network.dao.NetworkDomainVO;
import com.cloud.network.dao.NetworkServiceMapDao;
+import com.cloud.network.dao.NetworkServiceMapVO;
+import com.cloud.network.dao.NetworkVO;
import com.cloud.network.dao.PhysicalNetworkDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
import com.cloud.network.dao.PhysicalNetworkTrafficTypeDao;
import com.cloud.network.dao.PhysicalNetworkTrafficTypeVO;
+import com.cloud.network.dao.PhysicalNetworkVO;
import com.cloud.network.element.NetworkElement;
import com.cloud.network.element.UserDataServiceProvider;
import com.cloud.network.rules.FirewallRule.Purpose;