mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
GenericDao maintains a map of VO interface -> DaoImpl. Since cloud-engine is not yet a separate service, we need to introduce dummy interfaces to load both CloudStack API daoImpls and engine daoImpls
This commit is contained in:
parent
057097d0e0
commit
d182e64897
@ -0,0 +1,23 @@
|
|||||||
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
// or more contributor license agreements. See the NOTICE file
|
||||||
|
// distributed with this work for additional information
|
||||||
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
|
// to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance
|
||||||
|
// with the License. You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing,
|
||||||
|
// software distributed under the License is distributed on an
|
||||||
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
// KIND, either express or implied. See the License for the
|
||||||
|
// specific language governing permissions and limitations
|
||||||
|
// under the License.
|
||||||
|
package org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||||
|
|
||||||
|
import com.cloud.org.Cluster;
|
||||||
|
|
||||||
|
public interface EngineCluster extends Cluster {
|
||||||
|
|
||||||
|
}
|
||||||
@ -40,7 +40,7 @@ import com.cloud.utils.db.StateMachine;
|
|||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name="cluster")
|
@Table(name="cluster")
|
||||||
public class EngineClusterVO implements Cluster, Identity {
|
public class EngineClusterVO implements EngineCluster, Identity {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
// or more contributor license agreements. See the NOTICE file
|
||||||
|
// distributed with this work for additional information
|
||||||
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
|
// to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance
|
||||||
|
// with the License. You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing,
|
||||||
|
// software distributed under the License is distributed on an
|
||||||
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
// KIND, either express or implied. See the License for the
|
||||||
|
// specific language governing permissions and limitations
|
||||||
|
// under the License.
|
||||||
|
package org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||||
|
|
||||||
|
import com.cloud.dc.DataCenter;
|
||||||
|
|
||||||
|
public interface EngineDataCenter extends DataCenter {
|
||||||
|
|
||||||
|
}
|
||||||
@ -33,7 +33,7 @@ import org.apache.cloudstack.api.Identity;
|
|||||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State;
|
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State;
|
||||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||||
|
|
||||||
import com.cloud.dc.DataCenter;
|
|
||||||
import com.cloud.network.Network.Provider;
|
import com.cloud.network.Network.Provider;
|
||||||
import com.cloud.org.Grouping;
|
import com.cloud.org.Grouping;
|
||||||
import com.cloud.utils.NumbersUtil;
|
import com.cloud.utils.NumbersUtil;
|
||||||
@ -42,7 +42,7 @@ import com.cloud.utils.db.StateMachine;
|
|||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name="data_center")
|
@Table(name="data_center")
|
||||||
public class EngineDataCenterVO implements DataCenter, Identity {
|
public class EngineDataCenterVO implements EngineDataCenter, Identity {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||||
|
|||||||
@ -0,0 +1,24 @@
|
|||||||
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
// or more contributor license agreements. See the NOTICE file
|
||||||
|
// distributed with this work for additional information
|
||||||
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
|
// to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance
|
||||||
|
// with the License. You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing,
|
||||||
|
// software distributed under the License is distributed on an
|
||||||
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
// KIND, either express or implied. See the License for the
|
||||||
|
// specific language governing permissions and limitations
|
||||||
|
// under the License.
|
||||||
|
|
||||||
|
package org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||||
|
|
||||||
|
import com.cloud.host.Host;
|
||||||
|
|
||||||
|
public interface EngineHost extends Host {
|
||||||
|
|
||||||
|
}
|
||||||
@ -30,7 +30,6 @@ import org.apache.cloudstack.api.Identity;
|
|||||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State;
|
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State;
|
||||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||||
|
|
||||||
import com.cloud.dc.Pod;
|
|
||||||
import com.cloud.org.Grouping;
|
import com.cloud.org.Grouping;
|
||||||
import com.cloud.utils.NumbersUtil;
|
import com.cloud.utils.NumbersUtil;
|
||||||
import com.cloud.utils.db.GenericDao;
|
import com.cloud.utils.db.GenericDao;
|
||||||
@ -38,7 +37,7 @@ import com.cloud.utils.db.StateMachine;
|
|||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "host_pod_ref")
|
@Table(name = "host_pod_ref")
|
||||||
public class EngineHostPodVO implements Pod, Identity {
|
public class EngineHostPodVO implements EnginePod, Identity {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
long id;
|
long id;
|
||||||
|
|||||||
@ -41,7 +41,6 @@ import org.apache.cloudstack.api.Identity;
|
|||||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State;
|
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State;
|
||||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event;
|
||||||
|
|
||||||
import com.cloud.host.Host;
|
|
||||||
import com.cloud.host.Status;
|
import com.cloud.host.Status;
|
||||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||||
import com.cloud.resource.ResourceState;
|
import com.cloud.resource.ResourceState;
|
||||||
@ -54,7 +53,7 @@ import com.cloud.utils.db.StateMachine;
|
|||||||
@Table(name="host")
|
@Table(name="host")
|
||||||
@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
|
@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
|
||||||
@DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING, length=32)
|
@DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING, length=32)
|
||||||
public class EngineHostVO implements Host, Identity {
|
public class EngineHostVO implements EngineHost, Identity {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||||
@Column(name="id")
|
@Column(name="id")
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
// or more contributor license agreements. See the NOTICE file
|
||||||
|
// distributed with this work for additional information
|
||||||
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
|
// to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance
|
||||||
|
// with the License. You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing,
|
||||||
|
// software distributed under the License is distributed on an
|
||||||
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
// KIND, either express or implied. See the License for the
|
||||||
|
// specific language governing permissions and limitations
|
||||||
|
// under the License.
|
||||||
|
package org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||||
|
|
||||||
|
import com.cloud.dc.Pod;
|
||||||
|
|
||||||
|
public interface EnginePod extends Pod {
|
||||||
|
|
||||||
|
}
|
||||||
@ -15,10 +15,9 @@ package org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity;
|
import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity;
|
||||||
import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity;
|
|
||||||
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO;
|
import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO;
|
||||||
|
|
||||||
import com.cloud.utils.Pair;
|
|
||||||
import com.cloud.utils.db.GenericDao;
|
import com.cloud.utils.db.GenericDao;
|
||||||
import com.cloud.utils.fsm.StateDao;
|
import com.cloud.utils.fsm.StateDao;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user