From 54cce5fa18485bb50fe66e3163d48ead022b5645 Mon Sep 17 00:00:00 2001 From: Alex Huang Date: Thu, 13 Dec 2012 15:10:27 -0800 Subject: [PATCH] Getting things to compile --- engine/api/pom.xml | 6 +- .../datacenter/entity/api/ZoneEntity.java | 4 + .../service/api/ProvisioningRestService.java | 2 - .../service/api/ProvisioningService.java | 10 ++ .../service/api/ProvisioningServiceImpl.java | 62 +++++------ engine/pom.xml | 1 - .../service/src/main/webapp/WEB-INF/beans.xml | 2 +- .../DefaultPrimaryDatastoreProviderImpl.java | 5 + framework/rest/pom.xml | 11 ++ .../CSJacksonAnnotationIntrospector.java | 60 +++++++++++ .../ws/jackson/CSJacksonAnnotationModule.java | 47 ++++++++ .../framework/ws/jackson/UriSerializer.java | 58 ++++++++++ .../framework/ws/jackson/UrisSerializer.java | 71 ++++++++++++ .../cloudstack/framework/ws/jackson/Url.java | 53 +++++++++ .../ws/jackson/CSJacksonAnnotationTest.java | 101 ++++++++++++++++++ .../SolidfirePrimaryDataStoreProvider.java | 7 +- 16 files changed, 462 insertions(+), 38 deletions(-) create mode 100644 framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationIntrospector.java create mode 100644 framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationModule.java create mode 100644 framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UriSerializer.java create mode 100644 framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UrisSerializer.java create mode 100644 framework/rest/src/org/apache/cloudstack/framework/ws/jackson/Url.java create mode 100644 framework/rest/test/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationTest.java diff --git a/engine/api/pom.xml b/engine/api/pom.xml index 2abb1ab5643..63071b3b09e 100644 --- a/engine/api/pom.xml +++ b/engine/api/pom.xml @@ -37,9 +37,9 @@ - org.codehaus.jackson - jackson-jaxrs - 1.9.9 + org.apache.cloudstack + cloud-framework-rest + ${project.version} diff --git a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntity.java b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntity.java index 92124c2351c..2b683e2c9a7 100755 --- a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntity.java +++ b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntity.java @@ -24,6 +24,9 @@ import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.xml.bind.annotation.XmlRootElement; +import org.apache.cloudstack.engine.service.api.ProvisioningService; +import org.apache.cloudstack.framework.ws.jackson.Url; + import com.cloud.dc.DataCenter; /** @@ -35,5 +38,6 @@ public interface ZoneEntity extends DataCenterResourceEntity, DataCenter { @Path("/pods") List listPods(); + @Url(clazz=ProvisioningService.class, method="getPod", name="id", type=List.class) List listPodIds(); } diff --git a/engine/api/src/org/apache/cloudstack/engine/rest/service/api/ProvisioningRestService.java b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/ProvisioningRestService.java index 6355b308517..fe2aa5b1730 100644 --- a/engine/api/src/org/apache/cloudstack/engine/rest/service/api/ProvisioningRestService.java +++ b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/ProvisioningRestService.java @@ -36,10 +36,8 @@ import org.apache.cloudstack.engine.rest.datacenter.entity.api.PodRestTO; import org.apache.cloudstack.engine.rest.datacenter.entity.api.ZoneRestTO; import org.apache.cloudstack.engine.service.api.ProvisioningService; import org.springframework.stereotype.Component; -import org.springframework.stereotype.Service; -@Service("provisioningService") @Path("/provisioning") @Produces({"application/xml", "application/json"}) @Component diff --git a/engine/api/src/org/apache/cloudstack/engine/service/api/ProvisioningService.java b/engine/api/src/org/apache/cloudstack/engine/service/api/ProvisioningService.java index c2696bf67b4..fc1d8dcf656 100755 --- a/engine/api/src/org/apache/cloudstack/engine/service/api/ProvisioningService.java +++ b/engine/api/src/org/apache/cloudstack/engine/service/api/ProvisioningService.java @@ -21,6 +21,10 @@ 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; @@ -35,6 +39,8 @@ 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 tags, Map details); @@ -61,11 +67,15 @@ public interface ProvisioningService { List listHosts(); + @GET + @Path("/zone/{zoneid}/pods") List listPods(); List listZones(); List listStorage(); + @GET + @Path("/{zoneid}") ZoneEntity getZone(String id); } diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java index 8b62d48fe32..f9a4ddf05d8 100644 --- a/engine/orchestration/src/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java +++ b/engine/orchestration/src/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java @@ -29,44 +29,16 @@ 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 - public StorageEntity registerStorage(String name, List tags, Map details) { - // TODO Auto-generated method stub - return null; - } - - @Override - public ZoneEntity registerZone(String name, List tags, Map details) { - // TODO Auto-generated method stub - return null; - } - - @Override - public PodEntity registerPod(String name, List tags, Map details) { - // TODO Auto-generated method stub - return null; - } - - @Override - public ClusterEntity registerCluster(String name, List tags, Map details) { - // TODO Auto-generated method stub - return null; - } - - @Override - public String registerHost(String name, List tags, Map details) { - // TODO Auto-generated method stub - return null; - } - @Override public void deregisterStorage(String uuid) { // TODO Auto-generated method stub @@ -137,4 +109,34 @@ public class ProvisioningServiceImpl implements ProvisioningService { return impl; } + @Override + public StorageEntity registerStorage(String name, List tags, Map details) { + // TODO Auto-generated method stub + return null; + } + + @Override + public ZoneEntity registerZone(String name, List tags, Map details) { + // TODO Auto-generated method stub + return null; + } + + @Override + public PodEntity registerPod(String name, List tags, Map details) { + // TODO Auto-generated method stub + return null; + } + + @Override + public ClusterEntity registerCluster(String name, List tags, Map details) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String registerHost(String name, List tags, Map details) { + // TODO Auto-generated method stub + return null; + } + } diff --git a/engine/pom.xml b/engine/pom.xml index 1a8a0b8e5b3..e1681f1b719 100644 --- a/engine/pom.xml +++ b/engine/pom.xml @@ -42,7 +42,6 @@ storage/imagemotion storage/backup storage/snapshot - storage/integration-test components-api schema network diff --git a/engine/service/src/main/webapp/WEB-INF/beans.xml b/engine/service/src/main/webapp/WEB-INF/beans.xml index 55aaa5778df..c7151ee700f 100755 --- a/engine/service/src/main/webapp/WEB-INF/beans.xml +++ b/engine/service/src/main/webapp/WEB-INF/beans.xml @@ -18,7 +18,7 @@ - + diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java index f89ba808c26..dae0832cf55 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java @@ -51,6 +51,11 @@ public class DefaultPrimaryDatastoreProviderImpl implements PrimaryDataStoreProv configuratorMaps.put(key, configurator); } } + + // TODO: Remove this. I put this in to get over the compilation problem. Edison needs to look at Solidfire's implementation which requires this. + public DefaultPrimaryDatastoreProviderImpl() { + + } protected String generateKey(HypervisorType hypervisor, String poolType) { return hypervisor.toString().toLowerCase() + "_" + poolType.toString().toLowerCase(); diff --git a/framework/rest/pom.xml b/framework/rest/pom.xml index dc2a580b4cc..e9009bf72d1 100644 --- a/framework/rest/pom.xml +++ b/framework/rest/pom.xml @@ -40,5 +40,16 @@ jackson-jaxrs-json-provider 2.1.1 + + org.apache.cxf + cxf-bundle-jaxrs + 2.7.0 + + + org.eclipse.jetty + jetty-server + + + diff --git a/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationIntrospector.java b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationIntrospector.java new file mode 100644 index 00000000000..998bfa084b3 --- /dev/null +++ b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationIntrospector.java @@ -0,0 +1,60 @@ +/* + * 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.framework.ws.jackson; + +import java.lang.reflect.AnnotatedElement; +import java.util.List; + +import com.fasterxml.jackson.core.Version; +import com.fasterxml.jackson.databind.introspect.Annotated; +import com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector; + + +/** + * Adds introspectors for the annotations added specifically for CloudStack + * Web Services. + * + */ +public class CSJacksonAnnotationIntrospector extends NopAnnotationIntrospector { + + private static final long serialVersionUID = 5532727887216652602L; + + @Override + public Version version() { + return new Version(1, 7, 0, "abc", "org.apache.cloudstack", "cloudstack-framework-rest"); + } + + @Override + public Object findSerializer(Annotated a) { + AnnotatedElement ae = a.getAnnotated(); + Url an = ae.getAnnotation(Url.class); + if (an == null) { + return null; + } + + if (an.type() == String.class) { + return new UriSerializer(an); + } else if (an.type() == List.class){ + return new UrisSerializer(an); + } + + throw new UnsupportedOperationException("Unsupported type " + an.type()); + + } +} diff --git a/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationModule.java b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationModule.java new file mode 100644 index 00000000000..55debd9b7b2 --- /dev/null +++ b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationModule.java @@ -0,0 +1,47 @@ +/* + * 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.framework.ws.jackson; + + +import com.fasterxml.jackson.core.Version; +import com.fasterxml.jackson.databind.Module; + + +/** + * This module extends SimpleModle so that our annotations can be processed. + * + */ +public class CSJacksonAnnotationModule extends Module { + + @Override + public String getModuleName() { + return "CloudStackSupplementalModule"; + } + + @Override + public void setupModule(SetupContext ctx) { + ctx.appendAnnotationIntrospector(new CSJacksonAnnotationIntrospector()); + } + + @Override + public Version version() { + return new Version(1, 0, 0, "", "org.apache.cloudstack", "cloudstack-framework-rest"); + } + +} diff --git a/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UriSerializer.java b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UriSerializer.java new file mode 100644 index 00000000000..074d60f8a98 --- /dev/null +++ b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UriSerializer.java @@ -0,0 +1,58 @@ +/* + * 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.framework.ws.jackson; + +import java.io.IOException; + +import javax.ws.rs.core.UriBuilder; + +import org.apache.cxf.jaxrs.impl.tl.ThreadLocalUriInfo; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +public class UriSerializer extends JsonSerializer { + + Url _annotation; + + public UriSerializer(Url annotation) { + _annotation = annotation; + } + + protected UriSerializer() { + } + + @Override + public void serialize(String id, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeStartObject(); + jgen.writeStringField("id", id); + jgen.writeFieldName("uri"); + jgen.writeString(buildUri(_annotation.clazz(), _annotation.method(), id)); + jgen.writeEndObject(); + } + + protected String buildUri(Class clazz, String method, String id) { + ThreadLocalUriInfo uriInfo = new ThreadLocalUriInfo(); + UriBuilder ub = uriInfo.getAbsolutePathBuilder().path(clazz, method); + ub.build(id); + return ub.toString(); + } +} diff --git a/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UrisSerializer.java b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UrisSerializer.java new file mode 100644 index 00000000000..8b622123e3f --- /dev/null +++ b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UrisSerializer.java @@ -0,0 +1,71 @@ +/* + * 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.framework.ws.jackson; + +import java.io.IOException; +import java.util.Iterator; +import java.util.List; + +import javax.ws.rs.core.UriBuilder; + +import org.apache.cxf.jaxrs.impl.tl.ThreadLocalUriInfo; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + + +/** + * Serializer for a list of ids. + * + */ +public class UrisSerializer extends JsonSerializer> { + Url _annotation; + + public UrisSerializer(Url annotation) { + _annotation = annotation; + } + + protected UrisSerializer() { + } + + @Override + public void serialize(List lst, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + Iterator it = lst.iterator(); + jgen.writeStartObject(); + while (it.hasNext()) { + Object id = it.next(); + jgen.writeStartObject(); + jgen.writeFieldName("id"); + jgen.writeObject(id); + jgen.writeFieldName("uri"); + jgen.writeString(buildUri(_annotation.clazz(), _annotation.method(), id)); + jgen.writeEndObject(); + } + jgen.writeEndObject(); + } + + protected String buildUri(Class clazz, String method, Object id) { + ThreadLocalUriInfo uriInfo = new ThreadLocalUriInfo(); + UriBuilder ub = uriInfo.getAbsolutePathBuilder().path(clazz, method); + ub.build(id); + return ub.toString(); + } +} diff --git a/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/Url.java b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/Url.java new file mode 100644 index 00000000000..7094fb07f84 --- /dev/null +++ b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/Url.java @@ -0,0 +1,53 @@ +/* + * 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.framework.ws.jackson; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * Url can be placed onto a method to construct an URL from the returned + * results. + * + * This annotation is supplemental to JAX-RS 2.0's annotations. JAX-RS 2.0 + * annotations do not include a way to construct an URL. Of + * course, this only works with how CloudStack works. + * + */ +@Target({FIELD, METHOD}) +@Retention(RUNTIME) +public @interface Url { + /** + * @return the class that the path should belong to. + */ + Class clazz() default Object.class; + + /** + * @return the name of the method that the path should call back to. + */ + String method(); + + String name() default ""; + + Class type() default String.class; +} diff --git a/framework/rest/test/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationTest.java b/framework/rest/test/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationTest.java new file mode 100644 index 00000000000..52b2d7fb9c6 --- /dev/null +++ b/framework/rest/test/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationTest.java @@ -0,0 +1,101 @@ +package org.apache.cloudstack.framework.ws.jackson; + +import java.io.IOException; +import java.io.StringWriter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +import org.junit.Before; +import org.junit.Test; + +import com.fasterxml.jackson.core.JsonGenerationException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule; +import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule.Priority; + +public class CSJacksonAnnotationTest { + + @Before + public void setUp() throws Exception { + } + + @Test + public void test() { + ObjectMapper mapper = new ObjectMapper(); + JaxbAnnotationModule jaxbModule = new JaxbAnnotationModule(); + jaxbModule.setPriority(Priority.SECONDARY); + mapper.registerModule(jaxbModule); + mapper.registerModule(new CSJacksonAnnotationModule()); + + StringWriter writer = new StringWriter(); + + TestVO vo = new TestVO(1000, "name"); + vo.names = new ArrayList(); + vo.names.add("name1"); + vo.names.add("name2"); + vo.values = new HashMap(); + vo.values.put("key1", 1000l); + vo.values.put("key2", 2000l); + vo.vo2.name = "testvoname2"; + vo.pods="abcde"; + + try { + mapper.writeValue(writer, vo); + } catch (JsonGenerationException e) { + e.printStackTrace(); + } catch (JsonMappingException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + System.out.print(writer.getBuffer().toString()); + + } + + @XmlRootElement(name="xml-test2") + public class Test2VO { + public String name; + } + + @XmlRootElement(name="abc") + public class TestVO { + public int id; + + public Map values; + + public String name; + + + public List names; + + public String pods; + + + @XmlElement(name="test2") + public Test2VO vo2 = new Test2VO(); + + public TestVO(int id, String name) { + this.id = id; + this.name = name; + } + + @Url(clazz=TestVO.class, method="getName") + public String getName() { + return name; + } + + @Url(clazz=TestVO.class, method="getNames", type=List.class) + public List getNames() { + return names; + } + + } + +} diff --git a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/provider/SolidfirePrimaryDataStoreProvider.java b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/provider/SolidfirePrimaryDataStoreProvider.java index 672a72648d7..b6c92a38666 100644 --- a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/provider/SolidfirePrimaryDataStoreProvider.java +++ b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/provider/SolidfirePrimaryDataStoreProvider.java @@ -38,9 +38,14 @@ public class SolidfirePrimaryDataStoreProvider extends DefaultPrimaryDataStore pds = DefaultPrimaryDataStore.createDataStore(dsv); SolidfirePrimaryDataStoreDriver driver = new SolidfirePrimaryDataStoreDriver(); pds.setDriver(driver); +<<<<<<< HEAD DefaultPrimaryDataStoreLifeCycleImpl lifeCycle = new DefaultPrimaryDataStoreLifeCycleImpl(dataStoreDao); +======= + + DefaultPrimaryDataStoreLifeCycleImpl lifeCycle = new DefaultPrimaryDataStoreLifeCycleImpl(super.dataStoreDao, pds); +>>>>>>> Getting things to compile pds.setLifeCycle(lifeCycle); return pds; - } + } }