remove unused table: ovs_nic_map

This commit is contained in:
tuna 2013-11-04 11:05:57 +07:00
parent c7dab82dc4
commit 0624fe5d03
5 changed files with 0 additions and 165 deletions

View File

@ -266,7 +266,6 @@
<bean id="objectInDataStoreDaoImpl" class="org.apache.cloudstack.storage.db.ObjectInDataStoreDaoImpl" />
<bean id="ovsTunnelInterfaceDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelInterfaceDaoImpl" />
<bean id="ovsTunnelNetworkDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelNetworkDaoImpl" />
<bean id="ovsNicMappingDaoImpl" class="com.cloud.network.ovs.dao.OvsNicMappingDaoImpl" />
<bean id="physicalNetworkDaoImpl" class="com.cloud.network.dao.PhysicalNetworkDaoImpl" />
<bean id="physicalNetworkIsolationMethodDaoImpl" class="com.cloud.network.dao.PhysicalNetworkIsolationMethodDaoImpl" />
<bean id="physicalNetworkServiceProviderDaoImpl" class="com.cloud.network.dao.PhysicalNetworkServiceProviderDaoImpl" />

View File

@ -1,24 +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.ovs.dao;
import com.cloud.utils.db.GenericDao;
public interface OvsNicMappingDao extends GenericDao<OvsNicMappingVO, Long> {
public OvsNicMappingVO findByNicUuid(String nicUuid);
}

View File

@ -1,47 +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.ovs.dao;
import javax.ejb.Local;
import org.springframework.stereotype.Component;
import com.cloud.utils.db.GenericDaoBase;
import com.cloud.utils.db.SearchBuilder;
import com.cloud.utils.db.SearchCriteria;
import com.cloud.utils.db.SearchCriteria.Op;
@Component
@Local(value=OvsNicMappingDao.class)
public class OvsNicMappingDaoImpl extends GenericDaoBase<OvsNicMappingVO, Long> implements OvsNicMappingDao{
protected final SearchBuilder<OvsNicMappingVO> nicSearch;
public OvsNicMappingDaoImpl() {
nicSearch = createSearchBuilder();
nicSearch.and("nicUuid", nicSearch.entity().getNicUuid(), Op.EQ);
nicSearch.done();
}
@Override
public OvsNicMappingVO findByNicUuid(String nicUuid) {
SearchCriteria<OvsNicMappingVO> sc = nicSearch.create();
sc.setParameters("nicUuid", nicUuid);
return findOneBy(sc);
}
}

View File

@ -1,83 +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.ovs.dao;
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 org.apache.cloudstack.api.InternalIdentity;
@Entity
@Table(name="ovs_nic_map")
public class OvsNicMappingVO implements InternalIdentity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name="id")
private long id;
@Column(name="logicalswitch")
private String logicalSwitchUuid;
@Column(name="logicalswitchport")
private String logicalSwitchPortUuid;
@Column(name="nic")
private String nicUuid;
public OvsNicMappingVO() {
}
public OvsNicMappingVO (String logicalSwitchUuid, String logicalSwitchPortUuid, String nicUuid) {
this.logicalSwitchUuid = logicalSwitchUuid;
this.logicalSwitchPortUuid = logicalSwitchPortUuid;
this.nicUuid = nicUuid;
}
public String getLogicalSwitchUuid() {
return logicalSwitchUuid;
}
public void setLogicalSwitchUuid(String logicalSwitchUuid) {
this.logicalSwitchUuid = logicalSwitchUuid;
}
public String getLogicalSwitchPortUuid() {
return logicalSwitchPortUuid;
}
public void setLogicalSwitchPortUuid(String logicalSwitchPortUuid) {
this.logicalSwitchPortUuid = logicalSwitchPortUuid;
}
public String getNicUuid() {
return nicUuid;
}
public void setNicUuid(String nicUuid) {
this.nicUuid = nicUuid;
}
public long getId() {
return id;
}
}

View File

@ -2103,16 +2103,6 @@ CREATE TABLE `cloud`.`vm_disk_statistics` (
insert into `cloud`.`vm_disk_statistics`(data_center_id,account_id,vm_id,volume_id)
select volumes.data_center_id, volumes.account_id, vm_instance.id, volumes.id from volumes,vm_instance where vm_instance.vm_type="User" and vm_instance.state<>"Expunging" and volumes.instance_id=vm_instance.id order by vm_instance.id;
DROP TABLE IF EXISTS `cloud`.`ovs_nic_map`;
CREATE TABLE `cloud`.`ovs_nic_map` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`logicalswitch` varchar(255) NOT NULL COMMENT 'uuid of logical switch this port is provisioned on',
`logicalswitchport` varchar(255) UNIQUE COMMENT 'uuid of this logical switch port',
`nic` varchar(255) UNIQUE COMMENT 'cloudstack uuid of the nic connected to this logical switch port',
PRIMARY KEY (`id`),
CONSTRAINT `fk_ovs_nic_map__nic` FOREIGN KEY(`nic`) REFERENCES `nics`(`uuid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `cloud`.`ovs_providers`;
CREATE TABLE `cloud`.`ovs_providers` (
`id` bigint unsigned NOT NULL auto_increment COMMENT 'id',