mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
made changes to work with the new injection stuff
This commit is contained in:
parent
e936c32a04
commit
c622bee1ed
@ -21,10 +21,6 @@ package org.apache.cloudstack.engine.service.api;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.PodEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.StorageEntity;
|
||||
@ -39,8 +35,6 @@ import com.cloud.storage.StoragePool;
|
||||
* ProvisioningService registers and deregisters physical and virtual
|
||||
* resources that the management server can use.
|
||||
*/
|
||||
@Path("/provisioning")
|
||||
@Produces({"application/json"})
|
||||
public interface ProvisioningService {
|
||||
|
||||
StorageEntity registerStorage(String name, List<String> tags, Map<String, String> details);
|
||||
@ -67,15 +61,11 @@ public interface ProvisioningService {
|
||||
|
||||
List<Host> listHosts();
|
||||
|
||||
@GET
|
||||
@Path("/zone/{zoneid}/pods")
|
||||
List<PodEntity> listPods();
|
||||
|
||||
List<ZoneEntity> listZones();
|
||||
|
||||
List<StoragePool> listStorage();
|
||||
|
||||
@GET
|
||||
@Path("/{zoneid}")
|
||||
ZoneEntity getZone(String id);
|
||||
}
|
||||
|
||||
@ -24,10 +24,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@Service("zoneService")
|
||||
public class ZoneEntityImpl implements ZoneEntity {
|
||||
String _id;
|
||||
String _name;
|
||||
|
||||
@ -29,14 +29,12 @@ import org.apache.cloudstack.engine.datacenter.entity.api.StorageEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity;
|
||||
import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntityImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.cloud.host.Host;
|
||||
import com.cloud.host.Status;
|
||||
import com.cloud.storage.StoragePool;
|
||||
|
||||
@Component
|
||||
@Service("provisioningService")
|
||||
public class ProvisioningServiceImpl implements ProvisioningService {
|
||||
|
||||
@Override
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<import resource="classpath:META-INF/cxf/cxf.xml" />
|
||||
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
|
||||
|
||||
<context:component-scan base-package="org.apache.cloudstack.engine.rest.service" />
|
||||
<context:component-scan base-package="org.apache.cloudstack" />
|
||||
|
||||
<jaxrs:server id="EngineService" address="/">
|
||||
<jaxrs:serviceBeans>
|
||||
@ -24,4 +24,30 @@
|
||||
<bean class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider" />
|
||||
</jaxrs:providers>
|
||||
</jaxrs:server>
|
||||
|
||||
<bean id="onwireRegistry" class="org.apache.cloudstack.framework.serializer.OnwireClassRegistry"
|
||||
init-method="scan" >
|
||||
<property name="packages">
|
||||
<list>
|
||||
<value>org.apache.cloudstack.framework</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="messageSerializer" class="org.apache.cloudstack.framework.serializer.JsonMessageSerializer">
|
||||
<property name="onwireClassRegistry" ref="onwireRegistry" />
|
||||
</bean>
|
||||
|
||||
<bean id="transportProvider" class="org.apache.cloudstack.framework.server.ServerTransportProvider" init-method="initialize">
|
||||
<property name="workerPoolSize" value="5" />
|
||||
<property name="nodeId" value="Node1" />
|
||||
<property name="messageSerializer" ref="messageSerializer" />
|
||||
</bean>
|
||||
|
||||
<bean id="rpcProvider" class="org.apache.cloudstack.framework.rpc.RpcProviderImpl" init-method="initialize">
|
||||
<constructor-arg ref="transportProvider" />
|
||||
<property name="messageSerializer" ref="messageSerializer" />
|
||||
</bean>
|
||||
|
||||
<bean id="eventBus" class = "org.apache.cloudstack.framework.eventbus.EventBusBase" />
|
||||
</beans>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user