cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [17/72] [abbrv] [partial] Moved most of the VOs and DAOs from server package into engine-schema as well
Date Tue, 07 May 2013 22:01:33 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/DataCenterLinkLocalIpAddressVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/DataCenterLinkLocalIpAddressVO.java b/server/src/com/cloud/dc/DataCenterLinkLocalIpAddressVO.java
deleted file mode 100644
index ffa7549..0000000
--- a/server/src/com/cloud/dc/DataCenterLinkLocalIpAddressVO.java
+++ /dev/null
@@ -1,108 +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.dc;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-import java.util.Date;
-
-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 javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-@Entity
-@Table(name="op_dc_link_local_ip_address_alloc")
-public class DataCenterLinkLocalIpAddressVO implements InternalIdentity {
-
-    @Id
-    @GeneratedValue(strategy=GenerationType.IDENTITY)
-    @Column(name="id")
-    long id;
-    
-    @Column(name="ip_address", updatable=false, nullable=false)
-    String ipAddress;
-    
-    @Column(name="taken")
-    @Temporal(value=TemporalType.TIMESTAMP)
-    private Date takenAt;
-    
-    @Column(name="data_center_id", updatable=false, nullable=false)
-    private long dataCenterId;
-    
-    @Column(name="pod_id", updatable=false, nullable=false)
-    private long podId;
-    
-    @Column(name="nic_id")
-    private Long instanceId;
-    
-    @Column(name="reservation_id")
-    private String reservationId;
-    
-    protected DataCenterLinkLocalIpAddressVO() {
-    }
-    
-    public DataCenterLinkLocalIpAddressVO(String ipAddress, long dataCenterId, long podId) {
-        this.ipAddress = ipAddress;
-        this.dataCenterId = dataCenterId;
-        this.podId = podId;
-    }
-    
-    public long getId() {
-        return id;
-    }
-    
-    public Long getInstanceId() {
-    	return instanceId;
-    }
-    
-    public void setInstanceId(Long instanceId) {
-    	this.instanceId = instanceId;
-    }
-
-    public long getPodId() {
-        return podId;
-    }
-
-    public void setTakenAt(Date takenDate) {
-        this.takenAt = takenDate;
-    }
-    
-    public void setReservationId(String reservationId) {
-        this.reservationId = reservationId;
-    }
-    
-    public String getReservationId() {
-        return reservationId;
-    }
-
-    public String getIpAddress() {
-        return ipAddress;
-    }
-    
-    public long getDataCenterId() {
-        return dataCenterId;
-    }
-
-    public Date getTakenAt() {
-        return takenAt;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/DataCenterVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/DataCenterVO.java b/server/src/com/cloud/dc/DataCenterVO.java
deleted file mode 100644
index 6da13e7..0000000
--- a/server/src/com/cloud/dc/DataCenterVO.java
+++ /dev/null
@@ -1,460 +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.dc;
-
-import java.util.Date;
-import java.util.Map;
-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.TableGenerator;
-import javax.persistence.Transient;
-
-import org.apache.cloudstack.api.Identity;
-import com.cloud.network.Network.Provider;
-import com.cloud.org.Grouping;
-import com.cloud.utils.NumbersUtil;
-import com.cloud.utils.db.GenericDao;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="data_center")
-public class DataCenterVO implements DataCenter {
-
-    @Id
-    @GeneratedValue(strategy=GenerationType.IDENTITY)
-    @Column(name="id")
-    private long id;
-
-	@Column(name="name")
-	private String name = null;
-
-    @Column(name="description")
-    private String description = null;
-
-    @Column(name="dns1")
-    private String dns1 = null;
-
-    @Column(name="dns2")
-    private String dns2 = null;
-
-    @Column(name="ip6_dns1")
-    private String ip6Dns1 = null;
-
-    @Column(name="ip6_dns2")
-    private String ip6Dns2 = null;
-
-    @Column(name="internal_dns1")
-    private String internalDns1 = null;
-
-    @Column(name="internal_dns2")
-    private String internalDns2 = null;
-
-    @Column(name="router_mac_address", updatable = false, nullable=false)
-    private String routerMacAddress = "02:00:00:00:00:01";
-
-    @Column(name="guest_network_cidr")
-    private String guestNetworkCidr = null;
-
-    @Column(name="domain_id")
-    private Long domainId = null;
-
-    @Column(name="domain")
-    private String domain;
-
-    @Column(name="networktype")
-    @Enumerated(EnumType.STRING)
-    NetworkType networkType;
-
-    @Column(name="dns_provider")
-    private String dnsProvider;
-
-    @Column(name="dhcp_provider")
-    private String dhcpProvider;
-
-    @Column(name="gateway_provider")
-    private String gatewayProvider;
-
-    @Column(name="vpn_provider")
-    private String vpnProvider;
-
-    @Column(name="userdata_provider")
-    private String userDataProvider;
-
-    @Column(name="lb_provider")
-    private String loadBalancerProvider;
-
-    @Column(name="firewall_provider")
-    private String firewallProvider;
-
-    @Column(name="mac_address", nullable=false)
-    @TableGenerator(name="mac_address_sq", table="data_center", pkColumnName="id", valueColumnName="mac_address", allocationSize=1)
-    private long macAddress = 1;
-
-	@Column(name="zone_token")
-	private String zoneToken;
-
-    @Column(name=GenericDao.REMOVED_COLUMN)
-    private Date removed;
-
-    // This is a delayed load value.  If the value is null,
-    // then this field has not been loaded yet.
-    // Call the dao to load it.
-    @Transient
-    Map<String, String> details;
-
-    @Column(name="allocation_state")
-    @Enumerated(value=EnumType.STRING)
-    AllocationState allocationState;
-
-	@Column(name="uuid")
-	private String uuid;
-
-    @Column(name="is_security_group_enabled")
-    boolean securityGroupEnabled;
-
-    @Column(name="is_local_storage_enabled")
-    boolean localStorageEnabled;
-
-    @Override
-    public String getDnsProvider() {
-        return dnsProvider;
-    }
-
-    public void setDnsProvider(String dnsProvider) {
-        this.dnsProvider = dnsProvider;
-    }
-
-    @Override
-    public String getDhcpProvider() {
-        return dhcpProvider;
-    }
-
-    public void setDhcpProvider(String dhcpProvider) {
-        this.dhcpProvider = dhcpProvider;
-    }
-
-    @Override
-    public String getGatewayProvider() {
-        return gatewayProvider;
-    }
-
-    public void setGatewayProvider(String gatewayProvider) {
-        this.gatewayProvider = gatewayProvider;
-    }
-
-    @Override
-    public String getLoadBalancerProvider() {
-        return loadBalancerProvider;
-    }
-
-    public void setLoadBalancerProvider(String loadBalancerProvider) {
-        this.loadBalancerProvider = loadBalancerProvider;
-    }
-
-    @Override
-    public String getFirewallProvider() {
-        return firewallProvider;
-    }
-
-    public void setFirewallProvider(String firewallProvider) {
-        this.firewallProvider = firewallProvider;
-    }
-
-    public DataCenterVO(long id, String name, String description, String dns1, String dns2, String dns3, String dns4, String guestCidr, String domain, Long domainId, NetworkType zoneType, String zoneToken, String domainSuffix) {
-        this(name, description, dns1, dns2, dns3, dns4, guestCidr, domain, domainId, zoneType, zoneToken, domainSuffix, false, false, null, null);
-        this.id = id;
-        this.allocationState = Grouping.AllocationState.Enabled;
-        this.uuid = UUID.randomUUID().toString();
-	}
-
-    public DataCenterVO(String name, String description, String dns1, String dns2, String dns3, String dns4, String guestCidr, String domain, Long domainId, NetworkType zoneType, String zoneToken, String domainSuffix, boolean securityGroupEnabled, boolean localStorageEnabled, String ip6Dns1, String ip6Dns2) {
-        this.name = name;
-        this.description = description;
-        this.dns1 = dns1;
-        this.dns2 = dns2;
-        this.ip6Dns1 = ip6Dns1;
-        this.ip6Dns2 = ip6Dns2;
-        this.internalDns1 = dns3;
-        this.internalDns2 = dns4;
-        this.guestNetworkCidr = guestCidr;
-        this.domain = domain;
-        this.domainId = domainId;
-        this.networkType = zoneType;
-        this.allocationState = Grouping.AllocationState.Enabled;
-        this.securityGroupEnabled = securityGroupEnabled;
-        this.localStorageEnabled = localStorageEnabled;
-
-        if (zoneType == NetworkType.Advanced) {
-            loadBalancerProvider = Provider.VirtualRouter.getName();
-            firewallProvider = Provider.VirtualRouter.getName();
-            dhcpProvider = Provider.VirtualRouter.getName();
-            dnsProvider = Provider.VirtualRouter.getName();
-            gatewayProvider = Provider.VirtualRouter.getName();
-            vpnProvider = Provider.VirtualRouter.getName();
-            userDataProvider = Provider.VirtualRouter.getName();
-        } else if (zoneType == NetworkType.Basic){
-            dhcpProvider = Provider.VirtualRouter.getName();
-            dnsProvider = Provider.VirtualRouter.getName();
-            userDataProvider = Provider.VirtualRouter.getName();
-            loadBalancerProvider = Provider.ElasticLoadBalancerVm.getName();
-        }
-
-        this.zoneToken = zoneToken;
-        this.domain = domainSuffix;
-        this.uuid = UUID.randomUUID().toString();
-    }
-
-    @Override
-    public String getVpnProvider() {
-        return vpnProvider;
-    }
-
-    public void setVpnProvider(String vpnProvider) {
-        this.vpnProvider = vpnProvider;
-    }
-
-    @Override
-    public String getUserDataProvider() {
-        return userDataProvider;
-    }
-
-    public void setUserDataProvider(String userDataProvider) {
-        this.userDataProvider = userDataProvider;
-    }
-
-    @Override
-    public String getGuestNetworkCidr()
-    {
-    	return guestNetworkCidr;
-    }
-
-    public void setGuestNetworkCidr(String guestNetworkCidr)
-    {
-    	this.guestNetworkCidr = guestNetworkCidr;
-    }
-
-    @Override
-    public Long getDomainId() {
-		return domainId;
-	}
-
-	public void setDomainId(Long domainId) {
-		this.domainId = domainId;
-	}
-
-    @Override
-    public String getDescription() {
-        return description;
-    }
-
-    public String getRouterMacAddress() {
-        return routerMacAddress;
-    }
-
-    @Override
-    public String getDns1() {
-        return dns1;
-    }
-
-    @Override
-    public String getDns2() {
-        return dns2;
-    }
-
-    @Override
-    public String getInternalDns1() {
-        return internalDns1;
-    }
-
-    @Override
-    public String getInternalDns2() {
-        return internalDns2;
-    }
-
-	protected DataCenterVO() {
-    }
-
-	@Override
-    public long getId() {
-		return id;
-	}
-
-	@Override
-    public String getName() {
-	    return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public void setDns1(String dns1) {
-		this.dns1 = dns1;
-	}
-
-	public void setDns2(String dns2) {
-		this.dns2 = dns2;
-	}
-
-	public void setInternalDns1(String dns3) {
-		this.internalDns1 = dns3;
-	}
-
-	public void setInternalDns2(String dns4) {
-		this.internalDns2 = dns4;
-	}
-
-    public void setRouterMacAddress(String routerMacAddress) {
-        this.routerMacAddress = routerMacAddress;
-    }
-
-    @Override
-    public String getDomain() {
-        return domain;
-    }
-
-    public void setDomain(String domain) {
-        this.domain = domain;
-    }
-
-    public void setNetworkType(NetworkType zoneNetworkType) {
-        this.networkType = zoneNetworkType;
-    }
-
-    @Override
-    public NetworkType getNetworkType() {
-        return networkType;
-    }
-
-    @Override
-    public boolean isSecurityGroupEnabled() {
-        return securityGroupEnabled;
-    }
-
-    public void setSecurityGroupEnabled(boolean enabled) {
-        this.securityGroupEnabled = enabled;
-    }
-
-    @Override
-    public boolean isLocalStorageEnabled() {
-        return localStorageEnabled;
-    }
-
-    public void setLocalStorageEnabled(boolean enabled) {
-        this.localStorageEnabled = enabled;
-    }
-
-    @Override
-    public Map<String, String> getDetails() {
-        return details;
-    }
-
-    @Override
-    public void setDetails(Map<String, String> details2) {
-        details = details2;
-    }
-
-    public String getDetail(String name) {
-        assert (details != null) : "Did you forget to load the details?";
-
-        return details != null ? details.get(name) : null;
-    }
-
-    public void setDetail(String name, String value) {
-        assert (details != null) : "Did you forget to load the details?";
-
-        details.put(name, value);
-    }
-
-    public AllocationState getAllocationState() {
-    	return allocationState;
-    }
-
-    public void setAllocationState(AllocationState allocationState) {
-		this.allocationState = allocationState;
-    }
-
-    @Override
-    public int hashCode() {
-        return NumbersUtil.hash(id);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof DataCenterVO)) {
-            return false;
-        }
-        DataCenterVO that = (DataCenterVO)obj;
-        return this.id == that.id;
-    }
-
-    @Override
-    public String getZoneToken() {
- 	    return zoneToken;
- 	}
-
- 	public void setZoneToken(String zoneToken) {
- 		this.zoneToken = zoneToken;
- 	}
-
- 	public Date getRemoved() {
- 	    return removed;
- 	}
-
- 	@Override
- 	public String getUuid() {
- 		return this.uuid;
- 	}
-
- 	public void setUuid(String uuid) {
- 		this.uuid = uuid;
- 	}
-
-    public long getMacAddress() {
-        return macAddress;
-    }
-
-    public void setMacAddress(long macAddress) {
-        this.macAddress = macAddress;
-    }
-
- 	@Override
-	public String getIp6Dns1() {
-		return ip6Dns1;
-	}
-
-	public void setIp6Dns1(String ip6Dns1) {
-		this.ip6Dns1 = ip6Dns1;
-	}
-
- 	@Override
-	public String getIp6Dns2() {
-		return ip6Dns2;
-	}
-
-	public void setIp6Dns2(String ip6Dns2) {
-		this.ip6Dns2 = ip6Dns2;
-	}
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/DataCenterVnetVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/DataCenterVnetVO.java b/server/src/com/cloud/dc/DataCenterVnetVO.java
deleted file mode 100755
index 9bae132..0000000
--- a/server/src/com/cloud/dc/DataCenterVnetVO.java
+++ /dev/null
@@ -1,120 +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.dc;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-import java.util.Date;
-
-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 javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-@Entity
-@Table(name="op_dc_vnet_alloc")
-public class DataCenterVnetVO implements InternalIdentity {
-    
-    @Id
-    @GeneratedValue(strategy=GenerationType.IDENTITY)
-    @Column(name="id")
-    long id;
-    
-    @Column(name="taken", nullable=true)
-    @Temporal(value=TemporalType.TIMESTAMP)
-    Date takenAt;
-
-    @Column(name="vnet", updatable=false, nullable=false)
-    protected String vnet;
-
-    @Column(name="physical_network_id", updatable=false, nullable=false)
-    protected long physicalNetworkId;
-
-    @Column(name="data_center_id", updatable=false, nullable=false)
-    protected long dataCenterId;
-
-    @Column(name="account_id")
-    protected Long accountId;
-    
-    @Column(name="reservation_id")
-    protected String reservationId;
-
-    @Column(name="account_vnet_map_id")
-    protected Long accountGuestVlanMapId;
-    
-    public Date getTakenAt() {
-        return takenAt;
-    }
-
-    public void setTakenAt(Date taken) {
-        this.takenAt = taken;
-    }
-
-    public DataCenterVnetVO(String vnet, long dcId, long physicalNetworkId) {
-        this.vnet = vnet;
-        this.dataCenterId = dcId;
-        this.physicalNetworkId = physicalNetworkId;
-        this.takenAt = null;
-    }
-    
-    public long getId() {
-        return id;
-    }
-    
-    public String getVnet() {
-        return vnet;
-    }
-    
-    public String getReservationId() {
-        return reservationId;
-    }
-    
-    public void setReservationId(String reservationId) {
-        this.reservationId = reservationId;
-    }
-    
-    public Long getAccountId() {
-    	return accountId;
-    }
-    
-    public void setAccountId(Long accountId) {
-    	this.accountId = accountId;
-    }
-    
-    public long getDataCenterId() {
-        return dataCenterId;
-    }
-
-    public long getPhysicalNetworkId() {
-        return physicalNetworkId;
-    }
-
-    public void setAccountGuestVlanMapId(Long accountGuestVlanMapId) {
-        this.accountGuestVlanMapId = accountGuestVlanMapId;
-    }
-
-    public Long getAccountGuestVlanMapId() {
-        return accountGuestVlanMapId;
-    }
-    
-    protected DataCenterVnetVO() {
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/DcDetailVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/DcDetailVO.java b/server/src/com/cloud/dc/DcDetailVO.java
deleted file mode 100644
index 15bfacb..0000000
--- a/server/src/com/cloud/dc/DcDetailVO.java
+++ /dev/null
@@ -1,73 +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.dc;
-
-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="data_center_details")
-public class DcDetailVO implements InternalIdentity {
-    @Id
-    @GeneratedValue(strategy=GenerationType.IDENTITY)
-    @Column(name="id")
-    private long id;
-    
-    @Column(name="dc_id")
-    private long dcId;
-    
-    @Column(name="name")
-    private String name;
-    
-    @Column(name="value")
-    private String value;
-    
-    protected DcDetailVO() {
-    }
-    
-    public DcDetailVO(long dcId, String name, String value) {
-        this.dcId = dcId;
-        this.name = name;
-        this.value = value;
-    }
-
-    public long getDcId() {
-        return dcId;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public long getId() {
-        return id;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/HostPodVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/HostPodVO.java b/server/src/com/cloud/dc/HostPodVO.java
deleted file mode 100644
index e4ba9d0..0000000
--- a/server/src/com/cloud/dc/HostPodVO.java
+++ /dev/null
@@ -1,197 +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.dc;
-
-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 org.apache.cloudstack.api.Identity;
-import com.cloud.org.Grouping;
-import com.cloud.utils.NumbersUtil;
-import com.cloud.utils.db.GenericDao;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name = "host_pod_ref")
-public class HostPodVO implements Pod {
-	@Id
-	@GeneratedValue(strategy = GenerationType.IDENTITY)
-	long id;
-
-	@Column(name = "name")
-	private String name = null;
-
-	@Column(name = "data_center_id")
-	private long dataCenterId;
-
-	@Column(name = "gateway")
-	private String gateway;
-
-	@Column(name = "cidr_address")
-	private String cidrAddress;
-
-	@Column(name = "cidr_size")
-	private int cidrSize;
-
-	@Column(name = "description")
-	private String description;
-
-    @Column(name="allocation_state")
-    @Enumerated(value=EnumType.STRING)
-    AllocationState allocationState;
-
-	@Column(name = "external_dhcp")
-	private Boolean externalDhcp;
-
-    @Column(name=GenericDao.REMOVED_COLUMN)
-    private Date removed;
-
-	@Column(name = "uuid")
-	private String uuid;
-
-	public HostPodVO(String name, long dcId, String gateway, String cidrAddress, int cidrSize, String description) {
-		this.name = name;
-		this.dataCenterId = dcId;
-		this.gateway = gateway;
-		this.cidrAddress = cidrAddress;
-		this.cidrSize = cidrSize;
-		this.description = description;
-		this.allocationState = Grouping.AllocationState.Enabled;
-		this.externalDhcp = false;
-		this.uuid = UUID.randomUUID().toString();
-	}
-
-	/*
-	 * public HostPodVO(String name, long dcId) { this(null, name, dcId); }
-	 */
-	protected HostPodVO() {
-		this.uuid = UUID.randomUUID().toString();
-	}
-
-	@Override
-    public long getId() {
-		return id;
-	}
-
-	public long getDataCenterId() {
-		return dataCenterId;
-	}
-
-	public void setDataCenterId(long dataCenterId) {
-		this.dataCenterId = dataCenterId;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	@Override
-    public String getCidrAddress() {
-		return cidrAddress;
-	}
-
-	public void setCidrAddress(String cidrAddress) {
-		this.cidrAddress = cidrAddress;
-	}
-
-	@Override
-    public int getCidrSize() {
-		return cidrSize;
-	}
-
-	public void setCidrSize(int cidrSize) {
-		this.cidrSize = cidrSize;
-	}
-
-	@Override
-    public String getGateway() {
-		return gateway;
-	}
-
-	public void setGateway(String gateway) {
-		this.gateway = gateway;
-	}
-
-	public String getDescription() {
-		return description;
-	}
-
-	public void setDescription(String description) {
-		this.description = description;
-	}
-
-    public AllocationState getAllocationState() {
-    	return allocationState;
-    }
-
-    public void setAllocationState(AllocationState allocationState) {
-		this.allocationState = allocationState;
-    }
-
-	// Use for comparisons only.
-	public HostPodVO(Long id) {
-	    this.id = id;
-	}
-
-	@Override
-    public int hashCode() {
-	    return  NumbersUtil.hash(id);
-	}
-
-	public boolean getExternalDhcp() {
-		return externalDhcp;
-	}
-
-	public void setExternalDhcp(boolean use) {
-		externalDhcp = use;
-	}
-
-	@Override
-    public boolean equals(Object obj) {
-	    if (obj instanceof HostPodVO) {
-	        return id == ((HostPodVO)obj).id;
-	    } else {
-	        return false;
-	    }
-	}
-
-    public Date getRemoved() {
-        return removed;
-    }
-
-    @Override
-    public String getUuid() {
-    	return this.uuid;
-    }
-
-    public void setUuid(String uuid) {
-    	this.uuid = uuid;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/PodCluster.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/PodCluster.java b/server/src/com/cloud/dc/PodCluster.java
deleted file mode 100644
index acffe4d..0000000
--- a/server/src/com/cloud/dc/PodCluster.java
+++ /dev/null
@@ -1,67 +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.dc;
-
-public class PodCluster {
-    HostPodVO _pod;
-    ClusterVO _cluster;
-    
-    protected PodCluster() {
-        super();
-    }
-    
-    public PodCluster(HostPodVO pod, ClusterVO cluster) {
-        _pod = pod;
-        _cluster = cluster;
-    }
-    
-    public HostPodVO getPod() {
-        return _pod;
-    }
-    
-    public ClusterVO getCluster() {
-        return _cluster;
-    }
-    
-    
-    @Override
-    public int hashCode() {
-        return _pod.hashCode() ^ (_cluster != null ? _cluster.hashCode() : 0);
-    }
-    
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof PodCluster)) {
-            return false;
-        }
-        
-        PodCluster that = (PodCluster)obj;
-        if (!this._pod.equals(that._pod)) {
-            return false;
-        }
-        
-        if (this._cluster == null && that._cluster == null) {
-            return true;
-        }
-        
-        if (this._cluster == null || that._cluster == null) {
-            return false;
-        }
-        
-        return this._cluster.equals(that._cluster);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/PodVlanMapVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/PodVlanMapVO.java b/server/src/com/cloud/dc/PodVlanMapVO.java
deleted file mode 100644
index 8853fac..0000000
--- a/server/src/com/cloud/dc/PodVlanMapVO.java
+++ /dev/null
@@ -1,62 +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.dc;
-
-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="pod_vlan_map")
-public class PodVlanMapVO implements InternalIdentity {
-	    
-	@Id
-	@GeneratedValue(strategy=GenerationType.IDENTITY)
-	@Column(name="id")
-	private long id;
-	
-	@Column(name="pod_id")
-	private long podId;
-	
-	@Column(name="vlan_db_id")
-	private long vlanDbId;
-	
-	public PodVlanMapVO(long podId, long vlanDbId) {
-		this.podId = podId;
-		this.vlanDbId = vlanDbId;
-	}
-	
-	public PodVlanMapVO() {
-	}
-	
-	public long getId() {
-		return id;
-	}
-	
-	public long getPodId() {
-		return podId;
-	}
-	
-	public long getVlanDbId() {
-		return vlanDbId;
-	}
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/PodVlanVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/PodVlanVO.java b/server/src/com/cloud/dc/PodVlanVO.java
deleted file mode 100755
index 5324c84..0000000
--- a/server/src/com/cloud/dc/PodVlanVO.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.dc;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-import java.util.Date;
-
-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 javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-@Entity
-@Table(name="op_pod_vlan_alloc")
-public class PodVlanVO implements InternalIdentity {
-    
-    @Id
-    @GeneratedValue(strategy=GenerationType.IDENTITY)
-    @Column(name="id")
-    Long id;
-    
-    @Column(name="taken", nullable=true)
-    @Temporal(value=TemporalType.TIMESTAMP)
-    Date takenAt;
-
-    @Column(name="vlan", updatable=false, nullable=false)
-    protected String vlan;
-    
-    @Column(name="data_center_id") 
-    long dataCenterId;
-    
-    @Column(name="pod_id", updatable=false, nullable=false)
-    protected long podId;
-
-    @Column(name="account_id")
-    protected Long accountId;
-    
-    public Date getTakenAt() {
-        return takenAt;
-    }
-
-    public void setTakenAt(Date taken) {
-        this.takenAt = taken;
-    }
-
-    public PodVlanVO(String vlan, long dataCenterId, long podId) {
-        this.vlan = vlan;
-        this.dataCenterId = dataCenterId;
-        this.podId = podId;
-        this.takenAt = null;
-    }
-    
-    public long getId() {
-        return id;
-    }
-    
-    public Long getAccountId() {
-    	return accountId;
-    }
-    
-    public String getVlan() {
-        return vlan;
-    }
-
-    public long getDataCenterId() {
-        return dataCenterId;
-    }
-
-    public long getPodId() {
-        return podId;
-    }
-
-    public void setAccountId(Long accountId) {
-    	this.accountId = accountId;
-    }
-    
-    protected PodVlanVO() {
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/StorageNetworkIpAddressVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/StorageNetworkIpAddressVO.java b/server/src/com/cloud/dc/StorageNetworkIpAddressVO.java
deleted file mode 100755
index 6ad1ecd..0000000
--- a/server/src/com/cloud/dc/StorageNetworkIpAddressVO.java
+++ /dev/null
@@ -1,120 +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.dc;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-import java.util.Date;
-
-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.SecondaryTable;
-import javax.persistence.SecondaryTables;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-@Entity
-@Table(name="op_dc_storage_network_ip_address")
-@SecondaryTables({@SecondaryTable(name = "dc_storage_network_ip_range", pkJoinColumns = { @PrimaryKeyJoinColumn(name = "range_id", referencedColumnName = "id")})})
-public class StorageNetworkIpAddressVO implements InternalIdentity {
-	@Id
-	@GeneratedValue(strategy = GenerationType.IDENTITY)
-	@Column(name = "id")
-	long id;
-
-	@Column(name = "range_id")
-	long rangeId;
-			
-	@Column(name = "ip_address", updatable = false, nullable = false)
-	String ipAddress;
-
-	@Column(name = "taken")
-	@Temporal(value = TemporalType.TIMESTAMP)
-	private Date takenAt;
-	
-	@Column(name = "netmask", table = "dc_storage_network_ip_range", insertable = false, updatable = false)
-	private String netmask;
-	
-	@Column(name = "mac_address")
-	long mac;
-	
-	@Column(name = "vlan", table = "dc_storage_network_ip_range", insertable = false, updatable = false)
-	Integer vlan;
-	
-	@Column(name = "gateway", table = "dc_storage_network_ip_range", insertable = false, updatable = false)
-	String gateway;
-
-	protected StorageNetworkIpAddressVO() {
-	}
-
-	public long getId() {
-		return id;
-	}
-
-	public void setTakenAt(Date takenDate) {
-		this.takenAt = takenDate;
-	}
-
-	public String getIpAddress() {
-		return ipAddress;
-	}
-	
-	public void setIpAddress(String ip) {
-		this.ipAddress = ip;
-	}
-
-	public Date getTakenAt() {
-		return takenAt;
-	}
-	
-	public long getRangeId() {
-		return rangeId;
-	}
-	
-	public void setRangeId(long id) {
-		this.rangeId = id;
-	}
-	
-	public long getMac() {
-		return mac;
-	}
-	
-	public void setMac(long mac) {
-		this.mac = mac;
-	}
-	
-	public String getNetmask() {
-		return netmask;
-	}
-	
-	public void setNetmask(String netmask) {
-		this.netmask = netmask;
-	}
-	
-	public Integer getVlan() {
-		return vlan;
-	}
-	
-	public String getGateway() {
-		return gateway;
-	}
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/StorageNetworkIpRangeVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/StorageNetworkIpRangeVO.java b/server/src/com/cloud/dc/StorageNetworkIpRangeVO.java
deleted file mode 100755
index e410d22..0000000
--- a/server/src/com/cloud/dc/StorageNetworkIpRangeVO.java
+++ /dev/null
@@ -1,184 +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.dc;
-
-import org.apache.cloudstack.api.InternalIdentity;
-
-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.SecondaryTable;
-import javax.persistence.SecondaryTables;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="dc_storage_network_ip_range")
-@SecondaryTables({@SecondaryTable(name="networks", pkJoinColumns={@PrimaryKeyJoinColumn(name="network_id", referencedColumnName="id")}),
-	@SecondaryTable(name="host_pod_ref", pkJoinColumns={@PrimaryKeyJoinColumn(name="pod_id", referencedColumnName="id")}),
-	@SecondaryTable(name="data_center", pkJoinColumns={@PrimaryKeyJoinColumn(name="data_center_id", referencedColumnName="id")})
-})
-public class StorageNetworkIpRangeVO implements StorageNetworkIpRange {
-	@Id
-	@GeneratedValue(strategy = GenerationType.IDENTITY)
-	@Column(name = "id")
-	private long id;
-	
-	@Column(name = "uuid")
-	String uuid;
-	
-	@Column(name = "vlan")
-	private Integer vlan;
-	
-	@Column(name = "data_center_id")
-	private long dataCenterId;
-	
-	@Column(name = "pod_id")
-	private long podId;
-	
-	@Column(name = "start_ip")
-	private String startIp;
-	
-	@Column(name = "end_ip")
-	private String endIp;
-	
-	@Column(name = "gateway")
-	private String gateway;
-	
-	@Column(name = "network_id")
-	private long networkId;
-	
-	@Column(name="netmask")
-	private String netmask;
-	
-	@Column(name = "uuid", table = "networks", insertable = false, updatable = false)
-	String networkUuid;
-	
-	@Column(name = "uuid", table = "host_pod_ref", insertable = false, updatable = false)
-	String podUuid;
-	
-	@Column(name = "uuid", table = "data_center", insertable = false, updatable = false)
-	String zoneUuid;
-	
-	public StorageNetworkIpRangeVO(long dcId, long podId, long networkId, String startIp, String endIp, Integer vlan, String netmask, String gateway) {
-		this();
-		this.dataCenterId = dcId;
-		this.podId = podId;
-		this.networkId = networkId;
-		this.startIp = startIp;
-		this.endIp = endIp;
-		this.vlan = vlan;
-		this.netmask = netmask;
-		this.gateway = gateway;
-	}
-		
-	protected StorageNetworkIpRangeVO() {
-		this.uuid = UUID.randomUUID().toString();
-	}
-	
-	public long getId() {
-		return id;
-	}
-	
-	public long getDataCenterId() {
-		return dataCenterId;
-	}
-	
-	public void setDataCenterId(long dcId) {
-		this.dataCenterId = dcId;
-	}
-	
-	public long getPodId() {
-		return podId;
-	}
-	
-	public void setPodId(long podId) {
-		this.podId = podId;
-	}
-	
-	public long getNetworkId() {
-		return networkId;
-	}
-	
-	public void setNetworkId(long nwId) {
-		this.networkId = nwId;
-	}
-		
-	public Integer getVlan() {
-		return vlan;
-	}
-	
-	public void setVlan(int vlan) {
-		this.vlan = vlan;
-	}
-	
-	public void setStartIp(String start) {
-		this.startIp = start;
-	}
-	
-	public String getStartIp() {
-		return startIp;
-	}
-	
-	public void setEndIp(String end) {
-		this.endIp = end;
-	}
-
-	public String getEndIp() {
-		return endIp;
-	}
-	
-	public String getNetmask() {
-		return netmask;
-	}
-	
-	public String getGateway() {
-		return this.gateway;
-	}
-	
-	public void setGateway(String gateway) {
-		this.gateway = gateway;
-	}
-	
-	public void setNetmask(String netmask) {
-		this.netmask = netmask;
-	}
-
-	@Override
-	public String getUuid() {
-		return uuid;
-	}
-
-	@Override
-	public String getPodUuid() {
-		return podUuid;
-	}
-
-	@Override
-	public String getNetworkUuid() {
-		return networkUuid;
-	}
-
-	@Override
-	public String getZoneUuid() {
-		return zoneUuid;
-	}
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/VlanVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/VlanVO.java b/server/src/com/cloud/dc/VlanVO.java
deleted file mode 100644
index af6b5fc..0000000
--- a/server/src/com/cloud/dc/VlanVO.java
+++ /dev/null
@@ -1,196 +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.dc;
-
-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 org.apache.cloudstack.api.Identity;
-import org.apache.cloudstack.api.InternalIdentity;
-
-@Entity
-@Table(name="vlan")
-public class VlanVO implements Vlan {
-
-	@Id
-	@GeneratedValue(strategy=GenerationType.IDENTITY)
-	@Column(name="id")
-	Long id;
-
-	@Column(name="vlan_id")
-	String vlanTag;
-
-	@Column(name="vlan_gateway")
-	String vlanGateway;
-
-	@Column(name="vlan_netmask")
-	String vlanNetmask;
-
-	@Column(name="ip6_gateway")
-	String ip6Gateway;
-
-	@Column(name="ip6_cidr")
-	String ip6Cidr;
-
-	@Column(name="data_center_id")
-	long dataCenterId;
-
-	@Column(name="description")
-	String ipRange;
-
-	@Column(name="ip6_range")
-	String ip6Range;
-	
-    @Column(name="network_id")
-    Long networkId;
-
-    @Column(name="physical_network_id")
-    Long physicalNetworkId;
-
-	@Column(name="vlan_type")
-	@Enumerated(EnumType.STRING)
-	VlanType vlanType;
-
-    @Column(name="uuid")
-    String uuid;
-
-	public VlanVO(VlanType vlanType, String vlanTag, String vlanGateway, String vlanNetmask, long dataCenterId, String ipRange, Long networkId, Long physicalNetworkId, String ip6Gateway, String ip6Cidr, String ip6Range) {
-		this.vlanType = vlanType;
-		this.vlanTag = vlanTag;
-		this.vlanGateway = vlanGateway;
-		this.vlanNetmask = vlanNetmask;
-		this.ip6Gateway = ip6Gateway;
-		this.ip6Cidr = ip6Cidr;
-		this.dataCenterId = dataCenterId;
-		this.ipRange = ipRange;
-		this.ip6Range = ip6Range;
-		this.networkId = networkId;
-		this.uuid = UUID.randomUUID().toString();
-		this.physicalNetworkId = physicalNetworkId;
-	}
-
-	public VlanVO() {
-		this.uuid = UUID.randomUUID().toString();
-	}
-
-	@Override
-    public long getId() {
-		return id;
-	}
-
-	@Override
-    public String getVlanTag() {
-		return vlanTag;
-	}
-
-	@Override
-    public String getVlanGateway() {
-		return vlanGateway;
-	}
-
-	@Override
-    public String getVlanNetmask() {
-        return vlanNetmask;
-    }
-
-	@Override
-    public long getDataCenterId() {
-		return dataCenterId;
-	}
-
-	@Override
-    public String getIpRange() {
-		return ipRange;
-	}
-
-	@Override
-    public VlanType getVlanType() {
-		return vlanType;
-	}
-
-    @Override
-    public Long getNetworkId() {
-        return networkId;
-    }
-
-    public void setNetworkId(Long networkId) {
-        this.networkId = networkId;
-    }
-
-    @Override
-    public String getUuid() {
-    	return this.uuid;
-    }
-
-    public void setUuid(String uuid) {
-    	this.uuid = uuid;
-    }
-    @Override
-    public Long getPhysicalNetworkId() {
-        return physicalNetworkId;
-    }
-
-    public void setPhysicalNetworkId(Long physicalNetworkId) {
-        this.physicalNetworkId = physicalNetworkId;
-    }
-
-    transient String toString;
-    @Override
-    public String toString() {
-        if (toString == null) {
-            toString = new StringBuilder("Vlan[").append(vlanTag).append("|").append(vlanGateway).append("|").append(vlanNetmask).
-                    append("|").append(ip6Gateway).append("|").append(ip6Cidr).append("|").append(ipRange).append("|").
-                    append("|").append(ip6Range).append(networkId).append("]").toString();
-        }
-        return toString;
-    }
-    
-    @Override
-	public String getIp6Gateway() {
-		return ip6Gateway;
-	}
-
-	public void setIp6Gateway(String ip6Gateway) {
-		this.ip6Gateway = ip6Gateway;
-	}
-
-    @Override
-	public String getIp6Cidr() {
-		return ip6Cidr;
-	}
-
-	public void setIp6Cidr(String ip6Cidr) {
-		this.ip6Cidr = ip6Cidr;
-	}
-
-	@Override
-	public String getIp6Range() {
-		return ip6Range;
-	}
-
-	public void setIp6Range(String ip6Range) {
-		this.ip6Range = ip6Range;
-	}
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/dao/AccountVlanMapDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/AccountVlanMapDao.java b/server/src/com/cloud/dc/dao/AccountVlanMapDao.java
deleted file mode 100644
index c90557b..0000000
--- a/server/src/com/cloud/dc/dao/AccountVlanMapDao.java
+++ /dev/null
@@ -1,30 +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.dc.dao;
-
-import java.util.List;
-
-import com.cloud.dc.AccountVlanMapVO;
-import com.cloud.utils.db.GenericDao;
-
-public interface AccountVlanMapDao extends GenericDao<AccountVlanMapVO, Long> {
-		
-	public List<AccountVlanMapVO> listAccountVlanMapsByAccount(long accountId);
-	public List<AccountVlanMapVO> listAccountVlanMapsByVlan(long vlanDbId);
-	public AccountVlanMapVO findAccountVlanMap(long accountId, long vlanDbId);
-	
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/dao/AccountVlanMapDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/AccountVlanMapDaoImpl.java b/server/src/com/cloud/dc/dao/AccountVlanMapDaoImpl.java
deleted file mode 100644
index e4c0652..0000000
--- a/server/src/com/cloud/dc/dao/AccountVlanMapDaoImpl.java
+++ /dev/null
@@ -1,75 +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.dc.dao;
-
-import java.util.List;
-
-import javax.ejb.Local;
-
-import org.springframework.stereotype.Component;
-
-import com.cloud.dc.AccountVlanMapVO;
-import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.SearchBuilder;
-import com.cloud.utils.db.SearchCriteria;
-
-@Component
-@Local(value={AccountVlanMapDao.class})
-public class AccountVlanMapDaoImpl extends GenericDaoBase<AccountVlanMapVO, Long> implements AccountVlanMapDao {
-    
-	protected SearchBuilder<AccountVlanMapVO> AccountSearch;
-	protected SearchBuilder<AccountVlanMapVO> VlanSearch;
-	protected SearchBuilder<AccountVlanMapVO> AccountVlanSearch;
-	
-	@Override
-	public List<AccountVlanMapVO> listAccountVlanMapsByAccount(long accountId) {
-		SearchCriteria<AccountVlanMapVO> sc = AccountSearch.create();
-    	sc.setParameters("accountId", accountId);
-    	return listIncludingRemovedBy(sc);
-	}
-	
-	@Override
-	public List<AccountVlanMapVO> listAccountVlanMapsByVlan(long vlanDbId) {
-		SearchCriteria<AccountVlanMapVO> sc = VlanSearch.create();
-    	sc.setParameters("vlanDbId", vlanDbId);
-    	return listIncludingRemovedBy(sc);
-	}
-	
-	@Override
-	public AccountVlanMapVO findAccountVlanMap(long accountId, long vlanDbId) {
-		SearchCriteria<AccountVlanMapVO> sc = AccountVlanSearch.create();
-		sc.setParameters("accountId", accountId);
-		sc.setParameters("vlanDbId", vlanDbId);
-		return findOneIncludingRemovedBy(sc);
-	}
-	
-    public AccountVlanMapDaoImpl() {
-    	AccountSearch = createSearchBuilder();
-    	AccountSearch.and("accountId", AccountSearch.entity().getAccountId(), SearchCriteria.Op.EQ);
-        AccountSearch.done();
-        
-        VlanSearch = createSearchBuilder();
-    	VlanSearch.and("vlanDbId", VlanSearch.entity().getVlanDbId(), SearchCriteria.Op.EQ);
-        VlanSearch.done();
-        
-        AccountVlanSearch = createSearchBuilder();
-        AccountVlanSearch.and("accountId", AccountVlanSearch.entity().getAccountId(), SearchCriteria.Op.EQ);
-        AccountVlanSearch.and("vlanDbId", AccountVlanSearch.entity().getVlanDbId(), SearchCriteria.Op.EQ);
-        AccountVlanSearch.done();
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/dao/ClusterDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/ClusterDao.java b/server/src/com/cloud/dc/dao/ClusterDao.java
deleted file mode 100644
index 3ce0798..0000000
--- a/server/src/com/cloud/dc/dao/ClusterDao.java
+++ /dev/null
@@ -1,37 +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.dc.dao;
-
-import java.util.List;
-import java.util.Map;
-
-import com.cloud.dc.ClusterVO;
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.utils.db.GenericDao;
-
-public interface ClusterDao extends GenericDao<ClusterVO, Long> {
-    List<ClusterVO> listByPodId(long podId);
-    ClusterVO findBy(String name, long podId);
-    List<ClusterVO> listByHyTypeWithoutGuid(String hyType);
-    List<ClusterVO> listByZoneId(long zoneId);
-
-    List<HypervisorType> getAvailableHypervisorInZone(Long zoneId);
-    List<ClusterVO> listByDcHyType(long dcId, String hyType);
-    Map<Long, List<Long>> getPodClusterIdMap(List<Long> clusterIds);
-    List<Long> listDisabledClusters(long zoneId, Long podId);
-    List<Long> listClustersWithDisabledPods(long zoneId);
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/dao/ClusterDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/ClusterDaoImpl.java b/server/src/com/cloud/dc/dao/ClusterDaoImpl.java
deleted file mode 100644
index 86dc65e..0000000
--- a/server/src/com/cloud/dc/dao/ClusterDaoImpl.java
+++ /dev/null
@@ -1,241 +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.dc.dao;
-
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ejb.Local;
-import javax.inject.Inject;
-
-import org.springframework.stereotype.Component;
-
-import com.cloud.dc.ClusterVO;
-import com.cloud.dc.HostPodVO;
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-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.Func;
-import com.cloud.utils.db.SearchCriteria.Op;
-import com.cloud.utils.db.Transaction;
-import com.cloud.utils.exception.CloudRuntimeException;
-
-@Component
-@Local(value=ClusterDao.class)
-public class ClusterDaoImpl extends GenericDaoBase<ClusterVO, Long> implements ClusterDao {
-
-    protected final SearchBuilder<ClusterVO> PodSearch;
-    protected final SearchBuilder<ClusterVO> HyTypeWithoutGuidSearch;
-    protected final SearchBuilder<ClusterVO> AvailHyperSearch;
-    protected final SearchBuilder<ClusterVO> ZoneSearch;
-    protected final SearchBuilder<ClusterVO> ZoneHyTypeSearch;
-
-    private static final String GET_POD_CLUSTER_MAP_PREFIX = "SELECT pod_id, id FROM cloud.cluster WHERE cluster.id IN( ";
-    private static final String GET_POD_CLUSTER_MAP_SUFFIX = " )";
-    @Inject
-    protected HostPodDao _hostPodDao;
-
-    public ClusterDaoImpl() {
-        super();
-
-        HyTypeWithoutGuidSearch = createSearchBuilder();
-        HyTypeWithoutGuidSearch.and("hypervisorType", HyTypeWithoutGuidSearch.entity().getHypervisorType(), SearchCriteria.Op.EQ);
-        HyTypeWithoutGuidSearch.and("guid", HyTypeWithoutGuidSearch.entity().getGuid(), SearchCriteria.Op.NULL);
-        HyTypeWithoutGuidSearch.done();
-
-        ZoneHyTypeSearch = createSearchBuilder();
-        ZoneHyTypeSearch.and("hypervisorType", ZoneHyTypeSearch.entity().getHypervisorType(), SearchCriteria.Op.EQ);
-        ZoneHyTypeSearch.and("dataCenterId", ZoneHyTypeSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
-        ZoneHyTypeSearch.done();
-
-        PodSearch = createSearchBuilder();
-        PodSearch.and("pod", PodSearch.entity().getPodId(), SearchCriteria.Op.EQ);
-        PodSearch.and("name", PodSearch.entity().getName(), SearchCriteria.Op.EQ);
-        PodSearch.done();
-
-        ZoneSearch = createSearchBuilder();
-        ZoneSearch.and("dataCenterId", ZoneSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
-        ZoneSearch.groupBy(ZoneSearch.entity().getHypervisorType());
-        ZoneSearch.done();
-
-        AvailHyperSearch = createSearchBuilder();
-        AvailHyperSearch.and("zoneId", AvailHyperSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
-        AvailHyperSearch.select(null, Func.DISTINCT, AvailHyperSearch.entity().getHypervisorType());
-        AvailHyperSearch.done();
-    }
-
-    @Override
-    public List<ClusterVO> listByZoneId(long zoneId) {
-        SearchCriteria<ClusterVO> sc = ZoneSearch.create();
-        sc.setParameters("dataCenterId", zoneId);        
-        return listBy(sc);
-    }
-
-    @Override
-    public List<ClusterVO> listByPodId(long podId) {
-        SearchCriteria<ClusterVO> sc = PodSearch.create();
-        sc.setParameters("pod", podId);
-
-        return listBy(sc);
-    }
-
-    @Override
-    public ClusterVO findBy(String name, long podId) {
-        SearchCriteria<ClusterVO> sc = PodSearch.create();
-        sc.setParameters("pod", podId);
-        sc.setParameters("name", name);
-
-        return findOneBy(sc);
-    }
-
-    @Override
-    public List<ClusterVO> listByHyTypeWithoutGuid(String hyType) {
-        SearchCriteria<ClusterVO> sc = HyTypeWithoutGuidSearch.create();
-        sc.setParameters("hypervisorType", hyType);
-
-        return listBy(sc);
-    }
-
-    @Override
-    public List<ClusterVO> listByDcHyType(long dcId, String hyType) {
-        SearchCriteria<ClusterVO> sc = ZoneHyTypeSearch.create();
-        sc.setParameters("dataCenterId", dcId);
-        sc.setParameters("hypervisorType", hyType);
-        return listBy(sc);
-    }
-
-    @Override
-    public List<HypervisorType> getAvailableHypervisorInZone(Long zoneId) {
-        SearchCriteria<ClusterVO> sc = AvailHyperSearch.create();
-        if (zoneId != null) {
-            sc.setParameters("zoneId", zoneId);
-        }
-        List<ClusterVO> clusters = listBy(sc);
-        List<HypervisorType> hypers = new ArrayList<HypervisorType>(4);
-        for (ClusterVO cluster : clusters) {
-            hypers.add(cluster.getHypervisorType());
-        }
-
-        return hypers;
-    }
-
-    @Override
-    public Map<Long, List<Long>> getPodClusterIdMap(List<Long> clusterIds){
-        Transaction txn = Transaction.currentTxn();
-        PreparedStatement pstmt = null;
-        Map<Long, List<Long>> result = new HashMap<Long, List<Long>>();
-
-        try {
-            StringBuilder sql = new StringBuilder(GET_POD_CLUSTER_MAP_PREFIX);
-            if (clusterIds.size() > 0) {
-                for (Long clusterId : clusterIds) {
-                    sql.append(clusterId).append(",");
-                }
-                sql.delete(sql.length()-1, sql.length());
-                sql.append(GET_POD_CLUSTER_MAP_SUFFIX);
-            }
-
-            pstmt = txn.prepareAutoCloseStatement(sql.toString());
-            ResultSet rs = pstmt.executeQuery();
-            while (rs.next()) {
-                Long podId = rs.getLong(1);
-                Long clusterIdInPod  = rs.getLong(2);
-                if(result.containsKey(podId)){
-                    List<Long> clusterList = result.get(podId);
-                    clusterList.add(clusterIdInPod);
-                    result.put(podId, clusterList);
-                }else{
-                    List<Long> clusterList = new ArrayList<Long>();
-                    clusterList.add(clusterIdInPod);
-                    result.put(podId, clusterList);
-                }
-            }
-            return result;
-        } catch (SQLException e) {
-            throw new CloudRuntimeException("DB Exception on: " + GET_POD_CLUSTER_MAP_PREFIX, e);
-        } catch (Throwable e) {
-            throw new CloudRuntimeException("Caught: " + GET_POD_CLUSTER_MAP_PREFIX, e);
-        }
-    }
-
-    @Override
-    public List<Long> listDisabledClusters(long zoneId, Long podId) {
-        GenericSearchBuilder<ClusterVO, Long> clusterIdSearch = createSearchBuilder(Long.class);
-        clusterIdSearch.selectField(clusterIdSearch.entity().getId());
-        clusterIdSearch.and("dataCenterId", clusterIdSearch.entity().getDataCenterId(), Op.EQ);
-        if(podId != null){
-            clusterIdSearch.and("podId", clusterIdSearch.entity().getPodId(), Op.EQ);
-        }
-        clusterIdSearch.and("allocationState", clusterIdSearch.entity().getAllocationState(), Op.EQ);
-        clusterIdSearch.done();
-
-
-        SearchCriteria<Long> sc = clusterIdSearch.create();
-        sc.addAnd("dataCenterId", SearchCriteria.Op.EQ, zoneId);
-        if (podId != null) {
-            sc.addAnd("podId", SearchCriteria.Op.EQ, podId);
-        }
-        sc.addAnd("allocationState", SearchCriteria.Op.EQ, Grouping.AllocationState.Disabled);
-        return customSearch(sc, null);
-    }
-
-    @Override
-    public List<Long> listClustersWithDisabledPods(long zoneId) {
-
-        GenericSearchBuilder<HostPodVO, Long> disabledPodIdSearch = _hostPodDao.createSearchBuilder(Long.class);
-        disabledPodIdSearch.selectField(disabledPodIdSearch.entity().getId());
-        disabledPodIdSearch.and("dataCenterId", disabledPodIdSearch.entity().getDataCenterId(), Op.EQ);
-        disabledPodIdSearch.and("allocationState", disabledPodIdSearch.entity().getAllocationState(), Op.EQ);
-
-        GenericSearchBuilder<ClusterVO, Long> clusterIdSearch = createSearchBuilder(Long.class);
-        clusterIdSearch.selectField(clusterIdSearch.entity().getId());
-        clusterIdSearch.join("disabledPodIdSearch", disabledPodIdSearch, clusterIdSearch.entity().getPodId(), disabledPodIdSearch.entity().getId(), JoinBuilder.JoinType.INNER);
-        clusterIdSearch.done();
-
-
-        SearchCriteria<Long> sc = clusterIdSearch.create();
-        sc.setJoinParameters("disabledPodIdSearch", "dataCenterId", zoneId);
-        sc.setJoinParameters("disabledPodIdSearch", "allocationState", Grouping.AllocationState.Disabled);
-
-        return customSearch(sc, null);
-    }
-
-    @Override
-    public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
-        txn.start();
-        ClusterVO cluster = createForUpdate();
-        cluster.setName(null);
-        cluster.setGuid(null);
-
-        update(id, cluster);
-
-        boolean result = super.remove(id);
-        txn.commit();
-        return result;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/dao/ClusterVSMMapDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/ClusterVSMMapDao.java b/server/src/com/cloud/dc/dao/ClusterVSMMapDao.java
deleted file mode 100644
index ae08e59..0000000
--- a/server/src/com/cloud/dc/dao/ClusterVSMMapDao.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.dc.dao;
-
-import java.util.List;
-
-import com.cloud.dc.ClusterVSMMapVO;
-import com.cloud.utils.db.GenericDao;
-
-public interface ClusterVSMMapDao extends GenericDao<ClusterVSMMapVO, Long> {
-    ClusterVSMMapVO findByClusterId(long clusterId);
-    List<ClusterVSMMapVO> listByVSMId(long vsmId);
-    boolean removeByVsmId(long vsmId);
-    boolean removeByClusterId(long clusterId);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java b/server/src/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java
deleted file mode 100644
index b12fa9d..0000000
--- a/server/src/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java
+++ /dev/null
@@ -1,95 +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.dc.dao;
-
-import java.util.List;
-import javax.ejb.Local;
-
-import org.springframework.stereotype.Component;
-
-import com.cloud.dc.ClusterVSMMapVO;
-import com.cloud.utils.db.DB;
-import com.cloud.utils.db.GenericDaoBase;
-import com.cloud.utils.db.SearchBuilder;
-import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
-
-@Component
-@Local(value=ClusterVSMMapDao.class)
-@DB(txn = false)
-public class ClusterVSMMapDaoImpl extends GenericDaoBase<ClusterVSMMapVO, Long> implements ClusterVSMMapDao {
-
-    final SearchBuilder<ClusterVSMMapVO> ClusterSearch;
-    final SearchBuilder<ClusterVSMMapVO> VsmSearch;
-    
-    public ClusterVSMMapDaoImpl() {
-        //super();
-        
-        ClusterSearch = createSearchBuilder();
-        ClusterSearch.and("clusterId", ClusterSearch.entity().getClusterId(), SearchCriteria.Op.EQ);
-        ClusterSearch.done();
-        
-        VsmSearch = createSearchBuilder();
-        VsmSearch.and("vsmId", VsmSearch.entity().getVsmId(), SearchCriteria.Op.EQ);
-        VsmSearch.done();
-    }
-
-    @Override
-    public boolean removeByVsmId(long vsmId) {
-    	SearchCriteria<ClusterVSMMapVO> sc = VsmSearch.create();
-    	sc.setParameters("vsmId", vsmId);
-    	this.remove(sc);
-    	return true;
-    }
-    
-    @Override
-    public boolean removeByClusterId(long clusterId) {
-    	SearchCriteria<ClusterVSMMapVO> sc = ClusterSearch.create();
-    	sc.setParameters("clusterId", clusterId);
-    	this.remove(sc);
-    	return true;
-    }
-    
-    @Override
-    public ClusterVSMMapVO findByClusterId(long clusterId) {
-        SearchCriteria<ClusterVSMMapVO> sc = ClusterSearch.create();
-        sc.setParameters("clusterId", clusterId);        
-        return findOneBy(sc);
-    }
-
-    @Override
-    public List<ClusterVSMMapVO> listByVSMId(long vsmId) {
-    	SearchCriteria<ClusterVSMMapVO> sc = VsmSearch.create();
-    	sc.setParameters("vsmId", vsmId);
-    	return listBy(sc);
-    }
-    
-    public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
-        txn.start();
-        ClusterVSMMapVO cluster = createForUpdate();
-        //cluster.setClusterId(null);
-        //cluster.setVsmId(null);
-        
-        update(id, cluster);
-
-        boolean result = super.remove(id);
-        txn.commit();
-        return result;
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d015fb35/server/src/com/cloud/dc/dao/DataCenterDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/dao/DataCenterDao.java b/server/src/com/cloud/dc/dao/DataCenterDao.java
deleted file mode 100755
index e54b9bb..0000000
--- a/server/src/com/cloud/dc/dao/DataCenterDao.java
+++ /dev/null
@@ -1,82 +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.dc.dao;
-
-import java.util.List;
-
-import com.cloud.dc.DataCenterIpAddressVO;
-import com.cloud.dc.DataCenterVO;
-import com.cloud.dc.DataCenterVnetVO;
-import com.cloud.utils.Pair;
-import com.cloud.utils.db.GenericDao;
-
-public interface DataCenterDao extends GenericDao<DataCenterVO, Long> {
-    DataCenterVO findByName(String name);
-    
-    /**
-     * @param id data center id
-     * @return a pair of mac address strings.  The first one is private and second is public.
-     */
-    String[] getNextAvailableMacAddressPair(long id);
-    String[] getNextAvailableMacAddressPair(long id, long mask);
-    Pair<String, Long> allocatePrivateIpAddress(long id, long podId, long instanceId, String reservationId);
-    DataCenterIpAddressVO allocatePrivateIpAddress(long id, String reservationId);
-    String allocateLinkLocalIpAddress(long id, long podId, long instanceId, String reservationId);
-    String allocateVnet(long dcId, long physicalNetworkId, long accountId, String reservationId);
-    
-    void releaseVnet(String vnet, long dcId, long physicalNetworkId, long accountId, String reservationId);
-    void releasePrivateIpAddress(String ipAddress, long dcId, Long instanceId);
-    void releasePrivateIpAddress(long nicId, String reservationId);
-    void releaseLinkLocalIpAddress(String ipAddress, long dcId, Long instanceId);
-    void releaseLinkLocalIpAddress(long nicId, String reservationId);
-    
-    boolean deletePrivateIpAddressByPod(long podId);
-    boolean deleteLinkLocalIpAddressByPod(long podId);
-    
-    void addPrivateIpAddress(long dcId,long podId, String start, String end);
-    void addLinkLocalIpAddress(long dcId,long podId, String start, String end);
-    
-    List<DataCenterVnetVO> findVnet(long dcId, long physicalNetworkId, String vnet);
-
-    String allocatePodVlan(long podId, long accountId);
-
-	List<DataCenterVO> findZonesByDomainId(Long domainId);
-
-	List<DataCenterVO> listPublicZones(String keyword);
-
-	List<DataCenterVO> findChildZones(Object[] ids, String keyword);
-
-    void loadDetails(DataCenterVO zone);
-    void saveDetails(DataCenterVO zone);
-    
-    List<DataCenterVO> listDisabledZones();
-    List<DataCenterVO> listEnabledZones();
-    DataCenterVO findByToken(String zoneToken);    
-    DataCenterVO findByTokenOrIdOrName(String tokenIdOrName);
-
-	int countZoneVlans(long dcId, boolean onlyCountAllocated);
-    
-    void addVnet(long dcId, long physicalNetworkId, int start, int end);
-    void deleteVnet(long physicalNetworkId);
-    List<DataCenterVnetVO> listAllocatedVnets(long physicalNetworkId);
-
-	List<DataCenterVO> findZonesByDomainId(Long domainId, String keyword);
-
-	List<DataCenterVO> findByKeyword(String keyword);
-
-    List<DataCenterVO> listAllZones();
-}


Mime
View raw message