cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [2/2] git commit: Some initial checkins
Date Tue, 20 Nov 2012 00:53:37 GMT
Some initial checkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/bd17d35a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/bd17d35a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/bd17d35a

Branch: refs/heads/javelin
Commit: bd17d35adb44e47077d76d8a853fddfd9a826000
Parents: 6866613
Author: Alex Huang <alex.huang@citrix.com>
Authored: Sun Nov 18 07:37:52 2012 -0800
Committer: Alex Huang <alex.huang@citrix.com>
Committed: Mon Nov 19 16:53:21 2012 -0800

----------------------------------------------------------------------
 engine/api/pom.xml                                 |   11 +
 .../cloud/entity/api/VirtualMachineEntity.java     |   14 +-
 .../entity/api/DataCenterResourceEntity.java       |    7 +
 .../engine/datacenter/entity/api/ZoneEntity.java   |    7 +-
 .../engine/entity/api/CloudStackEntity.java        |   17 +-
 .../engine/service/api/EntityService.java          |    3 +
 .../engine/service/api/OrchestrationService.java   |   83 ++-
 .../engine/service/api/ProvisioningService.java    |   48 ++-
 .../datacenter/entity/api/ZoneEntityImpl.java      |  294 +++++++++
 .../service/api/ProvisioningServiceImpl.java       |  138 ++++
 .../platform/orchestration/CloudOrchestrator.java  |   39 +-
 engine/service/pom.xml                             |   54 ++-
 .../org/apache/cloudstack/test/TimeService.java    |   42 ++
 engine/service/src/main/webapp/WEB-INF/beans.xml   |   20 +
 engine/service/src/main/webapp/WEB-INF/log4j.xml   |   31 +
 engine/service/src/main/webapp/WEB-INF/web.xml     |   22 +-
 .../storage/image/TemplateEntityImpl.java          |  490 +++++++--------
 .../storage/volume/VolumeEntityImpl.java           |  358 ++++++------
 18 files changed, 1171 insertions(+), 507 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/api/pom.xml
----------------------------------------------------------------------
diff --git a/engine/api/pom.xml b/engine/api/pom.xml
index 88b3b38..45153d8 100644
--- a/engine/api/pom.xml
+++ b/engine/api/pom.xml
@@ -33,6 +33,17 @@
       <artifactId>cloud-api</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-bundle-jaxrs</artifactId>
+      <version>2.7.0</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-server</artifactId>
+        </exclusion>
+      </exclusions>       
+   </dependency>     
   </dependencies>
   <build>
     <defaultGoal>install</defaultGoal>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntity.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntity.java b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntity.java
index ad44f19..8fb3896 100755
--- a/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntity.java
+++ b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntity.java
@@ -20,6 +20,12 @@ package org.apache.cloudstack.engine.cloud.entity.api;
 
 import java.util.List;
 
+import javax.ws.rs.BeanParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.xml.bind.annotation.XmlRootElement;
+
 import org.apache.cloudstack.engine.entity.api.CloudStackEntity;
 
 import com.cloud.deploy.DeployDestination;
@@ -31,12 +37,16 @@ import com.cloud.vm.VirtualMachine;
  * Platform.  
  *
  */
+@Path("vm/{id}")
+@Produces({"application/json", "application/xml"})
+@XmlRootElement(name="vm")
 public interface VirtualMachineEntity extends VirtualMachine, CloudStackEntity {
 
     /**
      * @return List of uuids for volumes attached to this virtual machine.
      */
-    List<String> listVolumeUuids();
+    @GET
+    List<String> listVolumeIds();
 
     /**
      * @return List of volumes attached to this virtual machine.
@@ -74,7 +84,7 @@ public interface VirtualMachineEntity extends VirtualMachine, CloudStackEntity {
      * @param exclude list of areas to exclude
      * @return a reservation id
      */
-    String reserve(String plannerToUse, DeployDestination dest, ExcludeList exclude);
+    String reserve(String plannerToUse, @BeanParam DeployDestination dest, ExcludeList exclude);
 
     /**
      * Migrate this VM to a certain destination.

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceEntity.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceEntity.java b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceEntity.java
index 75faed7..6752abe 100755
--- a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceEntity.java
+++ b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceEntity.java
@@ -18,6 +18,8 @@
  */
 package org.apache.cloudstack.engine.datacenter.entity.api;
 
+import javax.ws.rs.POST;
+
 import org.apache.cloudstack.engine.entity.api.CloudStackEntity;
 
 import com.cloud.utils.fsm.StateMachine2;
@@ -60,24 +62,29 @@ public interface DataCenterResourceEntity extends CloudStackEntity, StateObject<
         }
 
     }
+
     /**
      * Prepare the resource to take new on new demands.
      */
+    @POST 
     boolean enable();
 
     /**
      * Disables the resource.  Cleanup.  Prepare for the resource to be removed.
      */
+    @POST
     boolean disable();
 
     /**
      * Do not use the resource for new demands.
      */
+    @POST
     boolean deactivate();
 
     /**
      * Reactivates a deactivated resource.
      */
+    @POST
     boolean reactivate();
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntity.java
----------------------------------------------------------------------
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 587e40b..577323c 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
@@ -20,11 +20,16 @@ package org.apache.cloudstack.engine.datacenter.entity.api;
 
 import java.util.List;
 
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+
 import com.cloud.dc.DataCenter;
 
 /**
  * Describes a zone and operations that can be done in a zone. 
  */
+@Path("zone/{zone-id}")
 public interface ZoneEntity extends DataCenterResourceEntity, DataCenter {
-    List<PodEntity> listPods(); 
+    @GET
+    List<PodEntity> listPods();
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/api/src/org/apache/cloudstack/engine/entity/api/CloudStackEntity.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/entity/api/CloudStackEntity.java b/engine/api/src/org/apache/cloudstack/engine/entity/api/CloudStackEntity.java
index ebda6a2..3b19cca 100755
--- a/engine/api/src/org/apache/cloudstack/engine/entity/api/CloudStackEntity.java
+++ b/engine/api/src/org/apache/cloudstack/engine/entity/api/CloudStackEntity.java
@@ -23,6 +23,9 @@ import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
+import javax.ws.rs.GET;
+import javax.ws.rs.QueryParam;
+
 /**
  * All entities returned by the Cloud Orchestration Platform must implement
  * this interface.  CloudValueEntity is an immutable representation of 
@@ -36,6 +39,7 @@ public interface CloudStackEntity {
     /**
      * @return the uuid of the object.
      */
+    @GET
     String getUuid();
 
     /**
@@ -44,39 +48,40 @@ public interface CloudStackEntity {
     long getId();
 
     /**
-     * @return external id set by the caller
-     */
-    String getExternalId();
-
-    /**
      * @return current state for the entity
      */
+    @GET
     String getCurrentState();
 
     /**
      * @return desired state for the entity
      */
+    @GET
     String getDesiredState();
 
     /**
      * Get the time the entity was created
      */
+    @GET
     Date getCreatedTime();
 
     /**
      * Get the time the entity was last updated
      */
+    @GET
     Date getLastUpdatedTime();
 
     /**
      * @return reference to the owner of this entity
      */
+    @GET
     String getOwner();
 
     /**
      * @return details stored for this entity when created.
      */
-    Map<String, String> getDetails(String source);
+    Map<String, String> getDetails(
+            @QueryParam("source") String source);
 
     /**
      * @return a list of sources that have added to the details.

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/api/src/org/apache/cloudstack/engine/service/api/EntityService.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/service/api/EntityService.java b/engine/api/src/org/apache/cloudstack/engine/service/api/EntityService.java
index 44c9b5c..2743ab8 100755
--- a/engine/api/src/org/apache/cloudstack/engine/service/api/EntityService.java
+++ b/engine/api/src/org/apache/cloudstack/engine/service/api/EntityService.java
@@ -20,6 +20,8 @@ package org.apache.cloudstack.engine.service.api;
 
 import java.util.List;
 
+import javax.ws.rs.Path;
+
 import com.cloud.network.Network;
 import com.cloud.storage.Volume;
 import com.cloud.vm.VirtualMachine;
@@ -28,6 +30,7 @@ import com.cloud.vm.VirtualMachine;
  * Service to retrieve CloudStack entities
  * very likely to change
  */
+@Path("resources")
 public interface EntityService {
     List<String> listVirtualMachines();
     List<String> listVolumes();

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/api/src/org/apache/cloudstack/engine/service/api/OrchestrationService.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/service/api/OrchestrationService.java b/engine/api/src/org/apache/cloudstack/engine/service/api/OrchestrationService.java
index 2dc0e4c..0bb256d 100755
--- a/engine/api/src/org/apache/cloudstack/engine/service/api/OrchestrationService.java
+++ b/engine/api/src/org/apache/cloudstack/engine/service/api/OrchestrationService.java
@@ -20,7 +20,12 @@ package org.apache.cloudstack.engine.service.api;
 
 import java.net.URL;
 import java.util.List;
-import java.util.Map;
+
+import javax.ws.rs.DELETE;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
 
 import org.apache.cloudstack.engine.cloud.entity.api.NetworkEntity;
 import org.apache.cloudstack.engine.cloud.entity.api.TemplateEntity;
@@ -29,56 +34,68 @@ import org.apache.cloudstack.engine.cloud.entity.api.VolumeEntity;
 
 import com.cloud.hypervisor.Hypervisor;
 
+@Path("orchestration")
+@Produces({"application/json", "application/xml"})
 public interface OrchestrationService {
     /**
      * creates a new virtual machine
      * 
-     * @param uuid externally unique name to reference the virtual machine
+     * @param id externally unique name to reference the virtual machine
+     * @param owner owner reference
      * @param template reference to the template
      * @param hostName name of the host
+     * @param displayName name to look at 
      * @param cpu # of cpu cores
-     * @param speed speed of the cpu core
+     * @param speed speed of the cpu core in MHZ
      * @param memory memory to allocate in bytes
-     * @param networks networks that this VM belongs in
-     * @param rootDiskTags tags for the root disk
      * @param computeTags tags for the compute
-     * @param details extra details to store for the VM
-     * @return VirtualMachine
+     * @param rootDiskTags tags for the root disk
+     * @param networks networks that this VM should join
+     * @return VirtualMachineEntity
      */
-    VirtualMachineEntity createVirtualMachine(String name, 
-            String template,
-            String hostName,
-            int cpu, 
-            int speed, 
-            long memory, 
-            List<String> networks, 
-            List<String> rootDiskTags,
-            List<String> computeTags, 
-            Map<String, String> details,
-            String owner);
+    @POST
+    VirtualMachineEntity createVirtualMachine(
+            @QueryParam("id") String id,
+            @QueryParam("owner") String owner,            
+            @QueryParam("template-id") String templateId,
+            @QueryParam("host-name") String hostName,
+            @QueryParam("display-name") String displayName,
+            @QueryParam("cpu") int cpu, 
+            @QueryParam("speed") int speed, 
+            @QueryParam("ram") long memory, 
+            @QueryParam("compute-tags") List<String> computeTags,
+            @QueryParam("root-disk-tags") List<String> rootDiskTags,
+            @QueryParam("networks") List<String> networks
+            );
 
-    VirtualMachineEntity createVirtualMachineFromScratch(String uuid,
-            String iso,
-            String os,
-            String hypervisor,
-            String hostName,
-            int cpu,
-            int speed,
-            long memory,
-            List<String> networks,
-            List<String> computeTags,
-            Map<String, String> details,
-            String owner);
+    @POST
+    VirtualMachineEntity createVirtualMachineFromScratch(
+            @QueryParam("id") String id,
+            @QueryParam("owner") String owner,
+            @QueryParam("iso-id") String isoId,
+            @QueryParam("host-name") String hostName,
+            @QueryParam("display-name") String displayName,
+            @QueryParam("hypervisor") String hypervisor,
+            @QueryParam("os") String os,
+            @QueryParam("cpu") int cpu,
+            @QueryParam("speed") int speed,
+            @QueryParam("ram") long memory,
+            @QueryParam("compute-tags") List<String> computeTags,
+            @QueryParam("root-disk-tags") List<String> rootDiskTags,
+            @QueryParam("networks") List<String> networks);
 
-    NetworkEntity createNetwork(String externaId, String name, String cidr, String gateway);
+    @POST
+    NetworkEntity createNetwork(String id, String name, String domainName, String cidr, String gateway);
 
+    @DELETE
     void destroyNetwork(String networkUuid);
 
+    @POST
     VolumeEntity createVolume();
 
+    @DELETE
     void destroyVolume(String volumeEntity);
 
+    @POST
     TemplateEntity registerTemplate(String name, URL path, String os, Hypervisor hypervisor);
-
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/api/src/org/apache/cloudstack/engine/service/api/ProvisioningService.java
----------------------------------------------------------------------
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 8f11273..a8cd5d2 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,9 +21,17 @@ package org.apache.cloudstack.engine.service.api;
 import java.util.List;
 import java.util.Map;
 
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+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;
 import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity;
 
-import com.cloud.dc.DataCenter;
 import com.cloud.dc.Pod;
 import com.cloud.host.Host;
 import com.cloud.host.Status;
@@ -34,32 +42,56 @@ import com.cloud.storage.StoragePool;
  * ProvisioningService registers and deregisters physical and virtual 
  * resources that the management server can use.  
  */
+@Path("/provision")
+@Produces({"application/json", "application/xml"})
 public interface ProvisioningService {
 
-    String registerStorage(String name, List<String> tags, Map<String, String> details);
+    @POST
+    StorageEntity registerStorage(String name, List<String> tags, Map<String, String> details);
+
+    @POST
     ZoneEntity registerZone(String name, List<String> tags, Map<String, String> details);
-    String registerPod(String name, List<String> tags, Map<String, String> details);
-    String registerCluster(String name, List<String> tags, Map<String, String> details);
-    String registerHost(String name, List<String> tags, Map<String, String> details);
 
+    @POST
+    PodEntity registerPod(String name, List<String> tags, Map<String, String> details);
 
+    @POST
+    ClusterEntity registerCluster(String name, List<String> tags, Map<String, String> details);
 
+    @POST
+    String registerHost(String name, List<String> tags, Map<String, String> details);
+
+    @DELETE
     void deregisterStorage(String uuid);
+
+    @DELETE
     void deregisterZone();
+
+    @DELETE
     void deregisterPod();
+
+    @DELETE
     void deregisterCluster();
+
+    @DELETE
     void deregisterHost();
 
     void changeState(String type, String entity, Status state);
 
+    @GET
+    @Path("/hosts")
     List<Host> listHosts();
 
+    @GET
+    @Path("/pods")
     List<Pod> listPods();
 
-    List<DataCenter> listZones();
-
-
+    @GET
+    @Path("/zones")
+    List<ZoneEntity> listZones();
 
+    @GET
+    @Path("/storages")
     List<StoragePool> listStorage();
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntityImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntityImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntityImpl.java
new file mode 100644
index 0000000..cd62155
--- /dev/null
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntityImpl.java
@@ -0,0 +1,294 @@
+/*
+ * 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;
+
+import java.lang.reflect.Method;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+
+@Path("/zone/{id}")
+public class ZoneEntityImpl implements ZoneEntity {
+
+    @Override
+    @POST
+    public boolean enable() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    @POST
+    public boolean disable() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    @POST
+    public boolean deactivate() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    @POST
+    public boolean reactivate() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    @GET
+    public String getUuid() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public long getId() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    @GET
+    public String getCurrentState() {
+        // TODO Auto-generated method stub
+        return "state";
+    }
+
+    @Override
+    @GET
+    public String getDesiredState() {
+        // TODO Auto-generated method stub
+        return "desired_state";
+    }
+
+    @Override
+    @GET
+    public Date getCreatedTime() {
+        // TODO Auto-generated method stub
+        return new Date();
+    }
+
+    @Override
+    @GET
+    public Date getLastUpdatedTime() {
+        // TODO Auto-generated method stub
+        return new Date();
+    }
+
+    @Override
+    @GET
+    public String getOwner() {
+        // TODO Auto-generated method stub
+        return "owner";
+    }
+
+    @Override
+    public Map<String, String> getDetails(String source) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public List<String> getDetailSources() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void addDetail(String source, String name, String value) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void delDetail(String source, String name, String value) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void updateDetail(String source, String name, String value) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public List<Method> getApplicableActions() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public State getState() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getDns1() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getDns2() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getGuestNetworkCidr() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getName() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Long getDomainId() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getDescription() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getDomain() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public NetworkType getNetworkType() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getInternalDns1() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getInternalDns2() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getDnsProvider() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getGatewayProvider() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getFirewallProvider() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getDhcpProvider() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getLoadBalancerProvider() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getUserDataProvider() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getVpnProvider() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public boolean isSecurityGroupEnabled() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public Map<String, String> getDetails() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void setDetails(Map<String, String> details) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public AllocationState getAllocationState() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getZoneToken() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public boolean isLocalStorageEnabled() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public List<PodEntity> listPods() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/orchestration/src/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java
----------------------------------------------------------------------
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
new file mode 100644
index 0000000..d3c0e11
--- /dev/null
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java
@@ -0,0 +1,138 @@
+/*
+ * 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.service.api;
+
+import java.util.ArrayList;
+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;
+import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity;
+import org.springframework.stereotype.Service;
+
+import com.cloud.dc.Pod;
+import com.cloud.host.Host;
+import com.cloud.host.Status;
+import com.cloud.storage.StoragePool;
+
+@Service("provisioningService")
+@Path("/provisioning")
+public class ProvisioningServiceImpl implements ProvisioningService {
+
+    @Override
+    public StorageEntity registerStorage(String name, List<String> tags, Map<String, String> details) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public ZoneEntity registerZone(String name, List<String> tags, Map<String, String> details) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public PodEntity registerPod(String name, List<String> tags, Map<String, String> details) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public ClusterEntity registerCluster(String name, List<String> tags, Map<String, String> details) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String registerHost(String name, List<String> tags, Map<String, String> details) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void deregisterStorage(String uuid) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void deregisterZone() {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void deregisterPod() {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void deregisterCluster() {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void deregisterHost() {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void changeState(String type, String entity, Status state) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public List<Host> listHosts() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public List<Pod> listPods() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    @GET
+    @Path("/zones")
+    @Produces("text/plain")
+    public List<ZoneEntity> listZones() {
+        List<ZoneEntity> zones = new ArrayList<ZoneEntity>();
+        // TODO Auto-generated method stub
+        return zones;
+    }
+
+    @Override
+    public List<StoragePool> listStorage() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
index 13fe88b..36784c5 100755
--- a/engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
@@ -34,11 +34,7 @@ import com.cloud.hypervisor.Hypervisor;
 
 public class CloudOrchestrator implements OrchestrationService {
 
-    public VirtualMachineEntity create(String name, String template, String hostName, int cpu, int speed, long memory, List<String> networks, List<String> rootDiskTags, List<String> computeTags,
-            Map<String, String> details, String owner) {
-        // TODO Auto-generated method stub
-        return null;
-    }
+
 
     public VirtualMachineEntity createFromScratch(String uuid, String iso, String os, String hypervisor, String hostName, int cpu, int speed, long memory, List<String> networks, List<String> computeTags,
             Map<String, String> details, String owner) {
@@ -83,35 +79,44 @@ public class CloudOrchestrator implements OrchestrationService {
     }
 
     @Override
-    public VirtualMachineEntity createVirtualMachine(String name, String template, String hostName, int cpu, int speed, long memory, List<String> networks, List<String> rootDiskTags, List<String> computeTags,
-            Map<String, String> details, String owner) {
+    public void destroyNetwork(String networkUuid) {
         // TODO Auto-generated method stub
-        return null;
+
     }
 
     @Override
-    public VirtualMachineEntity createVirtualMachineFromScratch(String uuid, String iso, String os, String hypervisor, String hostName, int cpu, int speed, long memory, List<String> networks, List<String> computeTags,
-            Map<String, String> details, String owner) {
+    public void destroyVolume(String volumeEntity) {
         // TODO Auto-generated method stub
-        return null;
+
     }
 
     @Override
-    public NetworkEntity createNetwork(String externaId, String name, String cidr, String gateway) {
-        // TODO Auto-generated method stub
+    public VirtualMachineEntity createVirtualMachine(
+            String id, 
+            String owner, 
+            String templateId, 
+            String hostName, 
+            String displayName, 
+            int cpu, 
+            int speed, 
+            long memory, 
+            List<String> computeTags, 
+            List<String> rootDiskTags,
+            List<String> networks) {
         return null;
     }
 
     @Override
-    public void destroyNetwork(String networkUuid) {
+    public VirtualMachineEntity createVirtualMachineFromScratch(String id, String owner, String isoId, String hostName, String displayName, String hypervisor, String os, int cpu, int speed, long memory,
+            List<String> computeTags, List<String> rootDiskTags, List<String> networks) {
         // TODO Auto-generated method stub
-
+        return null;
     }
 
     @Override
-    public void destroyVolume(String volumeEntity) {
+    public NetworkEntity createNetwork(String id, String name, String domainName, String cidr, String gateway) {
         // TODO Auto-generated method stub
-
+        return null;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/service/pom.xml
----------------------------------------------------------------------
diff --git a/engine/service/pom.xml b/engine/service/pom.xml
index 0f9e0da..c39f0e7 100644
--- a/engine/service/pom.xml
+++ b/engine/service/pom.xml
@@ -1,18 +1,17 @@
 <?xml version="1.0"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.cloudstack</groupId>
     <artifactId>cloud-engine</artifactId>
     <version>4.1.0-SNAPSHOT</version>
   </parent>
-  <groupId>org.apache.cloudstack</groupId>
   <artifactId>cloud-engine-service</artifactId>
-  <version>4.1.0-SNAPSHOT</version>
   <packaging>war</packaging>
-  <name>service Maven Webapp</name>
-  <url>http://maven.apache.org</url>
+  <name>CloudStack Cloud-Engine Service</name>
+  <url>http://www.cloudstack.org</url>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
@@ -55,10 +54,49 @@
       <artifactId>cloud-engine-compute</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-bundle-jaxrs</artifactId>
+      <version>2.7.0</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-server</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+      <version>3.1.2.RELEASE</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-web</artifactId>
+      <version>3.1.2.RELEASE</version>
+    </dependency>
   </dependencies>
   <build>
     <finalName>engine</finalName>
-    <sourceDirectory>src</sourceDirectory>
-    <testSourceDirectory>test</testSourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>jetty-maven-plugin</artifactId>
+        <version>8.1.7.v20120910</version>
+        <configuration>
+          <scanIntervalSeconds>10</scanIntervalSeconds>
+          <webApp>
+            <contextPath>/engine</contextPath>
+          </webApp>
+          <connectors>
+            <connector
+              implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
+              <port>1736</port>
+              <maxIdleTime>60000</maxIdleTime>
+            </connector>
+          </connectors>
+        </configuration>
+      </plugin>
+    </plugins>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/service/src/main/java/org/apache/cloudstack/test/TimeService.java
----------------------------------------------------------------------
diff --git a/engine/service/src/main/java/org/apache/cloudstack/test/TimeService.java b/engine/service/src/main/java/org/apache/cloudstack/test/TimeService.java
new file mode 100755
index 0000000..817db59
--- /dev/null
+++ b/engine/service/src/main/java/org/apache/cloudstack/test/TimeService.java
@@ -0,0 +1,42 @@
+/*
+ * 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.test;
+
+import java.util.Calendar;
+import java.util.Locale;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+
+import org.springframework.format.datetime.DateFormatter;
+import org.springframework.stereotype.Service;
+
+@Service("timeService")
+@Path("/time")
+public class TimeService {
+
+    @GET @Produces("text/plain")
+    public String getDateTime()
+    {
+        DateFormatter formatter = new DateFormatter("dd/MM/yyyy hh:mm:ss");
+        return formatter.print(Calendar.getInstance().getTime(), Locale.getDefault());
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/service/src/main/webapp/WEB-INF/beans.xml
----------------------------------------------------------------------
diff --git a/engine/service/src/main/webapp/WEB-INF/beans.xml b/engine/service/src/main/webapp/WEB-INF/beans.xml
new file mode 100755
index 0000000..28b7d6b
--- /dev/null
+++ b/engine/service/src/main/webapp/WEB-INF/beans.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+  xmlns:context="http://www.springframework.org/schema/context"
+  xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
+       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
+
+  <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.service.api" />
+
+  <jaxrs:server id="restContainer" address="/">
+    <jaxrs:serviceBeans>
+      <ref bean="provisioningService"/>
+    </jaxrs:serviceBeans>
+  </jaxrs:server>
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/service/src/main/webapp/WEB-INF/log4j.xml
----------------------------------------------------------------------
diff --git a/engine/service/src/main/webapp/WEB-INF/log4j.xml b/engine/service/src/main/webapp/WEB-INF/log4j.xml
new file mode 100755
index 0000000..d4b09d0
--- /dev/null
+++ b/engine/service/src/main/webapp/WEB-INF/log4j.xml
@@ -0,0 +1,31 @@
+<log4j:configuration debug="false">
+
+    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+        <param name="Threshold" value="DEBUG"/>
+        <param name="Target" value="System.out"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+        </layout>
+    </appender>
+<!-- 
+    <appender name="FILE_APPENDER" class="org.apache.log4j.DailyRollingFileAppender">
+        <param name="File" value="${catalina.home}/logs/webapp.txt"/>
+        <param name="DatePattern" value="'-'yyyy-MM-dd'.txt'"/>
+        <param name="Threshold" value="DEBUG"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-4p [%t] %C{2} - %m%n"/>
+        </layout>
+    </appender>
+    -->
+
+    <!-- Spring -->
+    <logger name="org.springframework" additivity="false">
+        <level value="DEBUG"/>
+        <appender-ref ref="CONSOLE"/>
+    </logger>
+
+    <root>
+        <level value="DEBUG"/>
+        <appender-ref ref="CONSOLE"/>
+    </root>
+</log4j:configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/service/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/engine/service/src/main/webapp/WEB-INF/web.xml b/engine/service/src/main/webapp/WEB-INF/web.xml
index 04563ea..a89e6ed 100644
--- a/engine/service/src/main/webapp/WEB-INF/web.xml
+++ b/engine/service/src/main/webapp/WEB-INF/web.xml
@@ -3,5 +3,25 @@
  "http://java.sun.com/dtd/web-app_2_3.dtd" >
 
 <web-app>
-  <display-name>Archetype Created Web Application</display-name>
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>WEB-INF/beans.xml</param-value>
+  </context-param>
+  <listener>
+    <listener-class>
+      org.springframework.web.context.ContextLoaderListener
+    </listener-class>
+  </listener>
+  <servlet>
+    <servlet-name>CXFServlet</servlet-name>
+    <display-name>CXF Servlet</display-name>
+    <servlet-class>
+      org.apache.cxf.transport.servlet.CXFServlet
+    </servlet-class>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>CXFServlet</servlet-name>
+    <url-pattern>/rest/*</url-pattern>
+  </servlet-mapping>
 </web-app>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java
index 8783804..384ca0d 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java
@@ -24,8 +24,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.cloudstack.engine.cloud.entity.api.TemplateEntity;
-import org.apache.cloudstack.storage.image.db.ImageDataVO;
-import org.apache.cloudstack.storage.image.store.ImageDataStore;
 import org.apache.cloudstack.storage.image.store.ImageDataStoreInfo;
 
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
@@ -33,262 +31,256 @@ import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.Storage.TemplateType;
 
 public class TemplateEntityImpl implements TemplateEntity {
-	protected TemplateInfo templateInfo;
+    protected TemplateInfo templateInfo;
     public TemplateEntityImpl(TemplateInfo templateInfo) {
-       this.templateInfo = templateInfo;
+        this.templateInfo = templateInfo;
     }
 
     public ImageDataStoreInfo getImageDataStore() {
         return templateInfo.getImageDataStore();
     }
 
-    
+
     public long getImageDataStoreId() {
-    	return getImageDataStore().getImageDataStoreId();
+        return getImageDataStore().getImageDataStoreId();
     }
-    
+
     public TemplateInfo getTemplateInfo() {
-    	return this.templateInfo;
-    }
-
-	@Override
-	public String getUuid() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public long getId() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-	@Override
-	public String getExternalId() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getCurrentState() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getDesiredState() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public Date getCreatedTime() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public Date getLastUpdatedTime() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getOwner() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public Map<String, String> getDetails(String source) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public List<String> getDetailSources() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public void addDetail(String source, String name, String value) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	@Override
-	public void delDetail(String source, String name, String value) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	@Override
-	public void updateDetail(String source, String name, String value) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	@Override
-	public List<Method> getApplicableActions() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public boolean isFeatured() {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	@Override
-	public boolean isPublicTemplate() {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	@Override
-	public boolean isExtractable() {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	@Override
-	public String getName() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public ImageFormat getFormat() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public boolean isRequiresHvm() {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	@Override
-	public String getDisplayText() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public boolean getEnablePassword() {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	@Override
-	public boolean getEnableSshKey() {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	@Override
-	public boolean isCrossZones() {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	@Override
-	public Date getCreated() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public long getGuestOSId() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-	@Override
-	public boolean isBootable() {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	@Override
-	public TemplateType getTemplateType() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public HypervisorType getHypervisorType() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public int getBits() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-	@Override
-	public String getUniqueName() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getUrl() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getChecksum() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public Long getSourceTemplateId() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getTemplateTag() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public Map getDetails() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public long getAccountId() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-	@Override
-	public long getDomainId() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-	@Override
-	public long getPhysicalSize() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-	@Override
-	public long getVirtualSize() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
+        return this.templateInfo;
+    }
+
+    @Override
+    public String getUuid() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public long getId() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public String getCurrentState() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getDesiredState() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Date getCreatedTime() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Date getLastUpdatedTime() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getOwner() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Map<String, String> getDetails(String source) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public List<String> getDetailSources() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void addDetail(String source, String name, String value) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void delDetail(String source, String name, String value) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void updateDetail(String source, String name, String value) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public List<Method> getApplicableActions() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public boolean isFeatured() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isPublicTemplate() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isExtractable() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public String getName() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public ImageFormat getFormat() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public boolean isRequiresHvm() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public String getDisplayText() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public boolean getEnablePassword() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean getEnableSshKey() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isCrossZones() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public Date getCreated() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public long getGuestOSId() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public boolean isBootable() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public TemplateType getTemplateType() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public HypervisorType getHypervisorType() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getBits() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public String getUniqueName() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getUrl() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getChecksum() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Long getSourceTemplateId() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getTemplateTag() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Map getDetails() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public long getAccountId() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public long getDomainId() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public long getPhysicalSize() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public long getVirtualSize() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/bd17d35a/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java b/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java
index e79614c..424c7f7 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java
@@ -31,187 +31,181 @@ import org.apache.cloudstack.engine.subsystem.api.storage.disktype.VolumeDiskTyp
 import org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeType;
 
 public class VolumeEntityImpl implements VolumeEntity {
-	private VolumeInfo volumeInfo;
-	
-	public VolumeEntityImpl(VolumeInfo volumeObject) {
-		this.volumeInfo = volumeObject;
-	}
-	
-	public VolumeInfo getVolumeInfo() {
-		return volumeInfo;
-	}
-	
-	public void setVolumeInfo(VolumeInfo vi) {
-		this.volumeInfo = vi;
-	}
-	
-	@Override 
-	public String getUuid() {
-		return volumeInfo.getUuid();
-	}
-
-	@Override
-	public long getId() {
-		return volumeInfo.getId();
-	}
-
-	@Override
-	public String getExternalId() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getCurrentState() {
-		return volumeInfo.getCurrentState().toString();
-	}
-
-	@Override
-	public String getDesiredState() {
-		return volumeInfo.getDesiredState().toString();
-	}
-
-	@Override
-	public Date getCreatedTime() {
-		return volumeInfo.getCreatedData();
-	}
-
-	@Override
-	public Date getLastUpdatedTime() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getOwner() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public Map<String, String> getDetails(String source) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public List<String> getDetailSources() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public void addDetail(String source, String name, String value) {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public void delDetail(String source, String name, String value) {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public void updateDetail(String source, String name, String value) {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public List<Method> getApplicableActions() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public SnapshotEntity takeSnapshotOf(boolean full) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String reserveForMigration(long expirationTime) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public void migrate(String reservationToken) {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public VolumeEntity setupForCopy() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public void copy(VolumeEntity dest) {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public void attachTo(String vm, long deviceId) {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public void detachFrom() {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public void destroy() {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public long getSize() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-	@Override
-	public String getTemplatePath() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getTemplateUuid() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public VolumeDiskType getDiskType() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public VolumeType getType() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public StorageEntity getDataStore() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public void setPath(String path) {
-		// TODO Auto-generated method stub
-
-	}
+    private VolumeInfo volumeInfo;
+
+    public VolumeEntityImpl(VolumeInfo volumeObject) {
+        this.volumeInfo = volumeObject;
+    }
+
+    public VolumeInfo getVolumeInfo() {
+        return volumeInfo;
+    }
+
+    public void setVolumeInfo(VolumeInfo vi) {
+        this.volumeInfo = vi;
+    }
+
+    @Override 
+    public String getUuid() {
+        return volumeInfo.getUuid();
+    }
+
+    @Override
+    public long getId() {
+        return volumeInfo.getId();
+    }
+
+    @Override
+    public String getCurrentState() {
+        return volumeInfo.getCurrentState().toString();
+    }
+
+    @Override
+    public String getDesiredState() {
+        return volumeInfo.getDesiredState().toString();
+    }
+
+    @Override
+    public Date getCreatedTime() {
+        return volumeInfo.getCreatedData();
+    }
+
+    @Override
+    public Date getLastUpdatedTime() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getOwner() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public Map<String, String> getDetails(String source) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public List<String> getDetailSources() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void addDetail(String source, String name, String value) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void delDetail(String source, String name, String value) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void updateDetail(String source, String name, String value) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public List<Method> getApplicableActions() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public SnapshotEntity takeSnapshotOf(boolean full) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String reserveForMigration(long expirationTime) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void migrate(String reservationToken) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public VolumeEntity setupForCopy() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void copy(VolumeEntity dest) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void attachTo(String vm, long deviceId) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void detachFrom() {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void destroy() {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public long getSize() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public String getTemplatePath() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getTemplateUuid() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public VolumeDiskType getDiskType() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public VolumeType getType() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public StorageEntity getDataStore() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void setPath(String path) {
+        // TODO Auto-generated method stub
+
+    }
 
 }


Mime
View raw message