cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject git commit: latest changes
Date Thu, 13 Sep 2012 18:36:54 GMT
Updated Branches:
  refs/heads/javelin 298d224f8 -> 06b7d80fe


latest changes


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

Branch: refs/heads/javelin
Commit: 06b7d80fec6d7913e09a74d464152d19dabb6b0d
Parents: 298d224
Author: Alex Huang <alex.huang@citrix.com>
Authored: Thu Sep 13 11:31:54 2012 -0700
Committer: Alex Huang <alex.huang@citrix.com>
Committed: Thu Sep 13 11:31:54 2012 -0700

----------------------------------------------------------------------
 api/src/com/cloud/vm/VirtualMachine.java           |    1 -
 core/src/com/cloud/vm/DomainRouterVO.java          |  156 +++---
 core/src/com/cloud/vm/VMInstanceVO.java            |  396 ++++++++-------
 .../platform/service/api/OrchestrationService.java |   29 +-
 platform/orchestration/.classpath                  |   20 +-
 platform/orchestration/.project                    |    6 +
 .../.settings/org.eclipse.jdt.core.prefs           |    7 +-
 .../.settings/org.eclipse.m2e.core.prefs           |    4 +
 platform/orchestration/pom.xml                     |    6 +
 .../platform/orchestration/CloudOrchestrator.java  |  106 +----
 .../com/cloud/upgrade/DatabaseUpgradeChecker.java  |    6 +-
 11 files changed, 331 insertions(+), 406 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/06b7d80f/api/src/com/cloud/vm/VirtualMachine.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/vm/VirtualMachine.java b/api/src/com/cloud/vm/VirtualMachine.java
index 9214fa4..b3c40a3 100755
--- a/api/src/com/cloud/vm/VirtualMachine.java
+++ b/api/src/com/cloud/vm/VirtualMachine.java
@@ -293,5 +293,4 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity,
S
 
     public Map<String, String> getDetails();
 
-    boolean canPlugNics();
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/06b7d80f/core/src/com/cloud/vm/DomainRouterVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/vm/DomainRouterVO.java b/core/src/com/cloud/vm/DomainRouterVO.java
index 052d205..0082d74 100755
--- a/core/src/com/cloud/vm/DomainRouterVO.java
+++ b/core/src/com/cloud/vm/DomainRouterVO.java
@@ -36,45 +36,45 @@ import com.cloud.network.router.VirtualRouter;
 public class DomainRouterVO extends VMInstanceVO implements VirtualRouter {
     @Column(name="element_id")
     private long elementId;
-    
+
     @Column(name="public_ip_address")
     private String publicIpAddress;
-    
+
     @Column(name="public_mac_address")
     private String publicMacAddress;
-    
+
     @Column(name="public_netmask")
     private String publicNetmask;
 
     @Column(name="is_redundant_router")
     boolean isRedundantRouter;
-    
+
     @Column(name="priority")
     int priority;
-    
+
     @Column(name="is_priority_bumpup")
     boolean isPriorityBumpUp;
-    
+
     @Column(name="redundant_state")
     @Enumerated(EnumType.STRING)
     private RedundantState redundantState;
-    
+
     @Column(name="stop_pending")
     boolean stopPending;
-    
+
     @Column(name="role")
     @Enumerated(EnumType.STRING)
     private Role role = Role.VIRTUAL_ROUTER;
-    
+
     @Column(name="template_version")
     private String templateVersion;
-    
+
     @Column(name="scripts_version")
     private String scriptsVersion;
-    
+
     @Column(name="vpc_id")
     private Long vpcId;
-    
+
     public DomainRouterVO(long id,
             long serviceOfferingId,
             long elementId,
@@ -99,7 +99,7 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter
{
         this.stopPending = stopPending;
         this.vpcId = vpcId;
     }
-    
+
     public DomainRouterVO(long id,
             long serviceOfferingId,
             long elementId,
@@ -146,94 +146,94 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter
{
     public long getDataCenterIdToDeployIn() {
         return dataCenterIdToDeployIn;
     }
-    
+
     public String getPublicNetmask() {
         return publicNetmask;
     }
-    
+
     public String getPublicMacAddress() {
         return publicMacAddress;
     }
-    
+
     protected DomainRouterVO() {
         super();
     }
-    
+
     @Override
     public String getPublicIpAddress() {
         return publicIpAddress;
     }
-    
-	@Override
-	public Role getRole() {
-		return role;
-	}
-
-	public void setRole(Role role) {
-		this.role = role;
-	}
-    
-	@Override
-	public boolean getIsRedundantRouter() {
-	    return this.isRedundantRouter;
- 	}
-
-	public void setIsRedundantRouter(boolean isRedundantRouter) {
-	    this.isRedundantRouter = isRedundantRouter;
-	}
-
-	@Override
-	public long getServiceOfferingId() {
-	    return serviceOfferingId;
-	}
-
-	public int getPriority() {
-	    return this.priority;
-	}
-	
-	public void setPriority(int priority) {
-	    this.priority = priority;
-	}
-
-	@Override
-	public RedundantState getRedundantState() {
-	    return this.redundantState;
-	}
-	
-	public void setRedundantState(RedundantState redundantState) {
-	    this.redundantState = redundantState;
-	}
-    
-	public boolean getIsPriorityBumpUp() {
-	    return this.isPriorityBumpUp;
- 	}
-
-	public void setIsPriorityBumpUp(boolean isPriorityBumpUp) {
-	    this.isPriorityBumpUp = isPriorityBumpUp;
-	}
 
     @Override
-	public boolean isStopPending() {
-	    return this.stopPending;
- 	}
+    public Role getRole() {
+        return role;
+    }
+
+    public void setRole(Role role) {
+        this.role = role;
+    }
+
+    @Override
+    public boolean getIsRedundantRouter() {
+        return this.isRedundantRouter;
+    }
+
+    public void setIsRedundantRouter(boolean isRedundantRouter) {
+        this.isRedundantRouter = isRedundantRouter;
+    }
 
     @Override
-	public void setStopPending(boolean stopPending) {
-	    this.stopPending = stopPending;
-	}
-    
+    public long getServiceOfferingId() {
+        return serviceOfferingId;
+    }
+
+    public int getPriority() {
+        return this.priority;
+    }
+
+    public void setPriority(int priority) {
+        this.priority = priority;
+    }
+
+    @Override
+    public RedundantState getRedundantState() {
+        return this.redundantState;
+    }
+
+    public void setRedundantState(RedundantState redundantState) {
+        this.redundantState = redundantState;
+    }
+
+    public boolean getIsPriorityBumpUp() {
+        return this.isPriorityBumpUp;
+    }
+
+    public void setIsPriorityBumpUp(boolean isPriorityBumpUp) {
+        this.isPriorityBumpUp = isPriorityBumpUp;
+    }
+
+    @Override
+    public boolean isStopPending() {
+        return this.stopPending;
+    }
+
+    @Override
+    public void setStopPending(boolean stopPending) {
+        this.stopPending = stopPending;
+    }
+
     public String getTemplateVersion() {
         return this.templateVersion;
     }
-    
+
     public void setTemplateVersion(String templateVersion) {
         this.templateVersion = templateVersion;
     }
-    
+
     public String getScriptsVersion() {
         return this.scriptsVersion;
     }
-    
+
     public void setScriptsVersion(String scriptsVersion) {
         this.scriptsVersion = scriptsVersion;
     }
@@ -242,9 +242,5 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter
{
     public Long getVpcId() {
         return vpcId;
     }
-    
-    @Override
-    public boolean canPlugNics() {
-        return true;
-    }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/06b7d80f/core/src/com/cloud/vm/VMInstanceVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/vm/VMInstanceVO.java b/core/src/com/cloud/vm/VMInstanceVO.java
index 8cb5816..986c421 100644
--- a/core/src/com/cloud/vm/VMInstanceVO.java
+++ b/core/src/com/cloud/vm/VMInstanceVO.java
@@ -48,21 +48,21 @@ import com.cloud.vm.VirtualMachine.State;
 @Inheritance(strategy=InheritanceType.JOINED)
 @DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING, length=32)
 public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, VirtualMachine.Event>
{
-	@Id
+    @Id
     @TableGenerator(name="vm_instance_sq", table="sequence", pkColumnName="name", valueColumnName="value",
pkColumnValue="vm_instance_seq", allocationSize=1)
     @Column(name="id", updatable=false, nullable = false)
-	protected long id;
+    protected long id;
 
     @Column(name="name", updatable=false, nullable=false, length=255)
-	protected String hostName = null;
+    protected String hostName = null;
 
     @Encrypt
     @Column(name="vnc_password", updatable=true, nullable=false, length=255)
     protected String vncPassword;
-    
+
     @Column(name="proxy_id", updatable=true, nullable=true)
     protected Long proxyId;
-    
+
     @Temporal(TemporalType.TIMESTAMP)
     @Column(name="proxy_assign_time", updatable=true, nullable=true)
     protected Date proxyAssignTime;
@@ -78,20 +78,20 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State,
Vi
     protected State state = null;
 
     @Column(name="private_ip_address", updatable=true)
-	protected String privateIpAddress;
+    protected String privateIpAddress;
 
     @Column(name="instance_name", updatable=true, nullable=false)
     protected String instanceName;
 
     @Column(name="vm_template_id", updatable=true, nullable=true, length=17)
-	protected Long templateId = new Long(-1);
+    protected Long templateId = new Long(-1);
 
     @Column(name="guest_os_id", nullable=false, length=17)
     protected long guestOSId;
-    
+
     @Column(name="host_id", updatable=true, nullable=true)
-	protected Long hostId;
-    
+    protected Long hostId;
+
     @Column(name="last_host_id", updatable=true, nullable=true)
     protected Long lastHostId;
 
@@ -116,51 +116,60 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State,
Vi
 
     @Column(name="update_count", updatable = true, nullable=false)
     protected long updated;	// This field should be updated everytime the state is updated.
 There's no set method in the vo object because it is done with in the dao code.
-    
+
     @Column(name=GenericDao.CREATED_COLUMN)
     protected Date created;
-    
+
     @Column(name=GenericDao.REMOVED_COLUMN)
     protected Date removed;
-    
+
     @Column(name="update_time", updatable=true)
     @Temporal(value=TemporalType.TIMESTAMP)
     protected Date updateTime;
-    
+
     @Column(name="domain_id")
     protected long domainId;
-    
+
     @Column(name="account_id")
     protected long accountId;
-    
+
     @Column(name="service_offering_id")
     protected long serviceOfferingId;
-    
+
     @Column(name="reservation_id")
     protected String reservationId;
-    
+
     @Column(name="hypervisor_type")
     @Enumerated(value=EnumType.STRING)
     protected HypervisorType hypervisorType;
 
+    @Column(name="ram")
+    protected long ram;
+
+    @Column(name="cpu")
+    protected int cpu;
+
+    @Column(name="tags")
+    protected String tags;
+
     @Transient
     Map<String, String> details;
 
     @Column(name="uuid")
     protected String uuid = UUID.randomUUID().toString();
     ;
-    
+
     public VMInstanceVO(long id,
-                        long serviceOfferingId,
-                        String name,
-                        String instanceName,
-                        Type type,
-                        Long vmTemplateId,
-                        HypervisorType hypervisorType,
-                        long guestOSId,
-                        long domainId,
-                        long accountId,
-                        boolean haEnabled) {
+            long serviceOfferingId,
+            String name,
+            String instanceName,
+            Type type,
+            Long vmTemplateId,
+            HypervisorType hypervisorType,
+            long guestOSId,
+            long domainId,
+            long accountId,
+            boolean haEnabled) {
         this.id = id;
         this.hostName = name != null ? name : this.uuid;
         if (vmTemplateId != null) {
@@ -191,177 +200,177 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State,
Vi
             long accountId,
             boolean haEnabled,
             boolean limitResourceUse) {
-    	this(id, serviceOfferingId, name, instanceName, type, vmTemplateId, hypervisorType,
guestOSId, domainId, accountId, haEnabled);
+        this(id, serviceOfferingId, name, instanceName, type, vmTemplateId, hypervisorType,
guestOSId, domainId, accountId, haEnabled);
         this.limitCpuUse = limitResourceUse;
     }
-    
+
     protected VMInstanceVO() {
     }
-    
+
     public Date getRemoved() {
-    	return removed;
+        return removed;
     }
-    
+
     @Override
     public long getDomainId() {
         return domainId;
     }
-    
+
     @Override
     public long getAccountId() {
         return accountId;
     }
-    
+
     @Override
     public Type getType() {
         return type;
     }
-    
+
     public long getUpdated() {
-    	return updated;
+        return updated;
     }
-    
-	@Override
+
+    @Override
     public long getId() {
-		return id;
-	}
-	
-	@Override
-	public String getUuid() {
-		return uuid;
-	}
-
-	public void setUuid(String uuid) {
-		this.uuid = uuid;
-	}
-	
-	@Override
+        return id;
+    }
+
+    @Override
+    public String getUuid() {
+        return uuid;
+    }
+
+    public void setUuid(String uuid) {
+        this.uuid = uuid;
+    }
+
+    @Override
     public HypervisorType getHypervisorType() {
-	    return hypervisorType;
-	}
-	
-	@Override
+        return hypervisorType;
+    }
+
+    @Override
     public Date getCreated() {
-		return created;
-	}
-	
-	public Date getUpdateTime() {
-		return updateTime;
-	}
-	
-	@Override
+        return created;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    @Override
     public long getDataCenterIdToDeployIn() {
-	    return dataCenterIdToDeployIn;
-	}
-	
-	@Override
-	public String getHostName() {
-		return hostName;
-	}
-	
-	@Override
-	public String getInstanceName() {
-	    return instanceName;
-	}
-	
-	@Override
-	public State getState() {
-		return state;
-	}
-	
-	// don't use this directly, use VM state machine instead, this method is added for migration
tool only
-	@Override
+        return dataCenterIdToDeployIn;
+    }
+
+    @Override
+    public String getHostName() {
+        return hostName;
+    }
+
+    @Override
+    public String getInstanceName() {
+        return instanceName;
+    }
+
+    @Override
+    public State getState() {
+        return state;
+    }
+
+    // don't use this directly, use VM state machine instead, this method is added for migration
tool only
+    @Override
     public void setState(State state) {
-		this.state = state;
-	}
-	
-	@Override
-	public String getPrivateIpAddress() {
-		return privateIpAddress;
-	}
-	
-	public void setPrivateIpAddress(String address) {
-		privateIpAddress = address;
-	}
-    
+        this.state = state;
+    }
+
+    @Override
+    public String getPrivateIpAddress() {
+        return privateIpAddress;
+    }
+
+    public void setPrivateIpAddress(String address) {
+        privateIpAddress = address;
+    }
+
     public void setVncPassword(String vncPassword) {
         this.vncPassword = vncPassword;
     }
-    
+
     @Override
     public String getVncPassword() {
         return vncPassword;
     }
-    
+
     @Override
     public long getServiceOfferingId() {
         return serviceOfferingId;
     }
-    
-	public Long getProxyId() {
-    	return proxyId;
+
+    public Long getProxyId() {
+        return proxyId;
     }
-    
+
     public void setProxyId(Long proxyId) {
-    	this.proxyId = proxyId;
+        this.proxyId = proxyId;
     }
-    
+
     public Date getProxyAssignTime() {
-    	return this.proxyAssignTime;
+        return this.proxyAssignTime;
     }
-    
+
     public void setProxyAssignTime(Date time) {
-    	this.proxyAssignTime = time;
+        this.proxyAssignTime = time;
     }
-	
-	@Override
-	public long getTemplateId() {
-		if (templateId == null) {
+
+    @Override
+    public long getTemplateId() {
+        if (templateId == null) {
             return -1;
         } else {
             return templateId;
         }
-	}
-	
-	public void setTemplateId(Long templateId) {
-		this.templateId = templateId;
-	}
+    }
+
+    public void setTemplateId(Long templateId) {
+        this.templateId = templateId;
+    }
 
-	@Override
+    @Override
     public long getGuestOSId() {
-		return guestOSId;
-	}
-	
-	public void setGuestOSId(long guestOSId) {
-		this.guestOSId = guestOSId;
-	}
-
-	public void incrUpdated() {
-		updated++;
-	}
-	
-	public void decrUpdated() {
-	    updated--;
-	}
-
-	@Override
-	public Long getHostId() {
-		return hostId;
-	}
-	
-	@Override
-	public Long getLastHostId() {
-		return lastHostId;
-	}
-	
+        return guestOSId;
+    }
+
+    public void setGuestOSId(long guestOSId) {
+        this.guestOSId = guestOSId;
+    }
+
+    public void incrUpdated() {
+        updated++;
+    }
+
+    public void decrUpdated() {
+        updated--;
+    }
+
+    @Override
+    public Long getHostId() {
+        return hostId;
+    }
+
+    @Override
+    public Long getLastHostId() {
+        return lastHostId;
+    }
+
     public void setLastHostId(Long lastHostId) {
-		this.lastHostId = lastHostId;
-	}
-	
-	public void setHostId(Long hostId) {
-		this.hostId = hostId;
-	}
-	
+        this.lastHostId = lastHostId;
+    }
+
+    public void setHostId(Long hostId) {
+        this.hostId = hostId;
+    }
+
     @Override
     public boolean isHaEnabled() {
         return haEnabled;
@@ -373,7 +382,7 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State,
Vi
     }
 
     public void setLimitCpuUse(boolean value) {
-    	limitCpuUse = value;
+        limitCpuUse = value;
     }
 
     @Override
@@ -385,7 +394,7 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State,
Vi
     public Long getPodIdToDeployIn() {
         return podIdToDeployIn;
     }
-    
+
     public void setPodId(long podId) {
         this.podIdToDeployIn = podId;
     }
@@ -397,78 +406,73 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State,
Vi
     public void setDataCenterId(long dataCenterId) {
         this.dataCenterIdToDeployIn = dataCenterId;
     }
-    
+
     public boolean isRemoved() {
         return removed != null;
     }
-    
+
     public void setHaEnabled(boolean value) {
         haEnabled = value;
     }
 
-	public void setReservationId(String reservationId) {
-	    this.reservationId = reservationId;
-	}
-	
-	public String getReservationId() {
-	    return this.reservationId;
-	}
-	
+    public void setReservationId(String reservationId) {
+        this.reservationId = reservationId;
+    }
+
+    public String getReservationId() {
+        return this.reservationId;
+    }
+
     @Override
     public Map<String, String> getDetails() {
         return details;
     }
-    
+
     public void setDetail(String name, String value) {
         assert (details != null) : "Did you forget to load the details?";
-        
+
         details.put(name, value);
     }
-    
+
     public void setDetails(Map<String, String> details) {
         this.details = details;
     }
 
-	transient String toString;
+    transient String toString;
     @Override
-	public String toString() {
+    public String toString() {
         if (toString == null) {
             toString = new StringBuilder("VM[").append(type.toString()).append("|").append(hostName).append("]").toString();
         }
         return toString;
     }
-    
+
 
     @Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + (int) (id ^ (id >>> 32));
-		return result;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (getClass() != obj.getClass())
-			return false;
-		VMInstanceVO other = (VMInstanceVO) obj;
-		if (id != other.id)
-			return false;
-		return true;
-	}
-	
-	
-    public void setServiceOfferingId(long serviceOfferingId) {
-        this.serviceOfferingId = serviceOfferingId;
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + (int) (id ^ (id >>> 32));
+        return result;
     }
-    
+
     @Override
-    public boolean canPlugNics() {
-        return false;
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        VMInstanceVO other = (VMInstanceVO) obj;
+        if (id != other.id)
+            return false;
+        return true;
     }
-
+
+
+    public void setServiceOfferingId(long serviceOfferingId) {
+        this.serviceOfferingId = serviceOfferingId;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/06b7d80f/platform/api/src/org/apache/cloudstack/platform/service/api/OrchestrationService.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/service/api/OrchestrationService.java
b/platform/api/src/org/apache/cloudstack/platform/service/api/OrchestrationService.java
index 13133e2..aa0a9f7 100755
--- a/platform/api/src/org/apache/cloudstack/platform/service/api/OrchestrationService.java
+++ b/platform/api/src/org/apache/cloudstack/platform/service/api/OrchestrationService.java
@@ -22,10 +22,11 @@ import java.net.URL;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.cloudstack.platform.cloud.entity.api.VirtualMachineEntity;
+import org.apache.cloudstack.platform.cloud.entity.api.VolumeEntity;
+
 import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.hypervisor.Hypervisor;
-import com.cloud.utils.exception.CloudRuntimeException;
-import com.cloud.vm.VirtualMachine;
 
 public interface OrchestrationService {
     /**
@@ -43,7 +44,7 @@ public interface OrchestrationService {
      * @param details extra details to store for the VM
      * @return VirtualMachine
      */
-    VirtualMachine create(String name, 
+    VirtualMachineEntity create(String name, 
             String template,
             String hostName,
             int cpu, 
@@ -55,7 +56,7 @@ public interface OrchestrationService {
             Map<String, String> details,
             String owner);
 
-    VirtualMachine createFromScratch(String uuid,
+    VirtualMachineEntity createFromScratch(String uuid,
             String iso,
             String os,
             String hypervisor,
@@ -77,8 +78,6 @@ public interface OrchestrationService {
      */
     String reserve(String vm, String planner, Long until) throws InsufficientCapacityException;
 
-    String cancel(String reservationId);
-
     /**
      * Deploy the reservation
      * @param reservationId  reservation id during the deployment
@@ -87,29 +86,13 @@ public interface OrchestrationService {
      */
     String deploy(String reservationId);
 
-    /**
-     * Stops the vm
-     * @param vm vm
-     * @throws CloudRuntimeException if error
-     */
-    String stop(String vm);
-
-    /**
-     * destroys the vm
-     * @param vm vm
-     * @throws CloudRuntimeException if error
-     */
-    void destroy(String vm);
-
     void joinNetwork(String network1, String network2);
 
-    void attachVolume(String vm, String vol);
-
     void createNetwork();
 
     void destroyNetwork();
 
-    void createVolume();
+    VolumeEntity createVolume();
 
     void registerTemplate(String name, URL path, String os, Hypervisor hypervisor);
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/06b7d80f/platform/orchestration/.classpath
----------------------------------------------------------------------
diff --git a/platform/orchestration/.classpath b/platform/orchestration/.classpath
index 3028798..54b5d82 100755
--- a/platform/orchestration/.classpath
+++ b/platform/orchestration/.classpath
@@ -1,10 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry including="**/*.java" kind="src" path="src"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/api"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/platform-api"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/platform-planning"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/framework-ipc"/>
-	<classpathentry kind="output" path="bin"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry combineaccessrules="false" kind="src" path="/cloud-framework-ipc"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/cloud-platform-api"/>
+	<classpathentry kind="output" path="target/classes"/>
 </classpath>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/06b7d80f/platform/orchestration/.project
----------------------------------------------------------------------
diff --git a/platform/orchestration/.project b/platform/orchestration/.project
index fe968bc..5963e0b 100755
--- a/platform/orchestration/.project
+++ b/platform/orchestration/.project
@@ -10,8 +10,14 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
 	</natures>
 </projectDescription>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/06b7d80f/platform/orchestration/.settings/org.eclipse.jdt.core.prefs
----------------------------------------------------------------------
diff --git a/platform/orchestration/.settings/org.eclipse.jdt.core.prefs b/platform/orchestration/.settings/org.eclipse.jdt.core.prefs
index 7341ab1..8e4055a 100755
--- a/platform/orchestration/.settings/org.eclipse.jdt.core.prefs
+++ b/platform/orchestration/.settings/org.eclipse.jdt.core.prefs
@@ -1,11 +1,12 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/06b7d80f/platform/orchestration/.settings/org.eclipse.m2e.core.prefs
----------------------------------------------------------------------
diff --git a/platform/orchestration/.settings/org.eclipse.m2e.core.prefs b/platform/orchestration/.settings/org.eclipse.m2e.core.prefs
new file mode 100755
index 0000000..f897a7f
--- /dev/null
+++ b/platform/orchestration/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/06b7d80f/platform/orchestration/pom.xml
----------------------------------------------------------------------
diff --git a/platform/orchestration/pom.xml b/platform/orchestration/pom.xml
new file mode 100755
index 0000000..70abde4
--- /dev/null
+++ b/platform/orchestration/pom.xml
@@ -0,0 +1,6 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.cloudstack</groupId>
+  <artifactId>cloud-platform-orchestration</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/06b7d80f/platform/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
----------------------------------------------------------------------
diff --git a/platform/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
b/platform/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
index 405289d..34154ad 100755
--- a/platform/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
+++ b/platform/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
@@ -22,140 +22,58 @@ import java.net.URL;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.cloudstack.framework.ipc.Publisher;
-import org.apache.cloudstack.platform.planning.Concierge;
+import org.apache.cloudstack.platform.cloud.entity.api.VirtualMachineEntity;
+import org.apache.cloudstack.platform.cloud.entity.api.VolumeEntity;
 import org.apache.cloudstack.platform.service.api.OrchestrationService;
 
 import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.hypervisor.Hypervisor;
-import com.cloud.vm.VirtualMachine;
+
 
 public class CloudOrchestrator implements OrchestrationService {
-    int _retryCount = 5;
-    Concierge _concierge = null;    // These are injected
-    Publisher _publisher = null;
-
-    @Override
-    public VirtualMachine create(String uuid, 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) {
-        // creates a virtual machine and relevant work in database
-        return null;
-    }
 
-    @Override
-    public VirtualMachine createFromScratch(String uuid, String iso, String os, String hypervisor,
String hostName, int cpu, int speed, long memory, List<String> networks, List<String>
computeTags,
+    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) {
-        // creates a virtual machine and relevant work in database
-        return null;
-    }
-
-    @Override
-    public String reserve(String vm, String planner, Long until) throws InsufficientCapacityException
{
-        return _concierge.reserve(vm, planner);
-    }
-
-    @Override
-    public String cancel(String reservationId) {
         // TODO Auto-generated method stub
         return null;
     }
 
-    @Override
-    public String deploy(String reservationId, String callback) {
-        for (int i = 0; i < _retryCount; i++) {
-            try {
-                // Retrieves the reservation
-                // Signals Network and Storage to prepare
-                // Signals Compute
-                _concierge.claim(reservationId);
-            } catch (Exception e) {
-                // Cancel reservations.
-            }
-            _concierge.reserveAnother(reservationId);
-        }
+    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) {
+        // TODO Auto-generated method stub
         return null;
     }
 
-    @Override
-    public String stop(String vm) {
-
+    public String reserve(String vm, String planner, Long until) throws InsufficientCapacityException
{
         // TODO Auto-generated method stub
         return null;
     }
 
-    @Override
-    public void destroy(String vm) {
+    public String deploy(String reservationId) {
         // TODO Auto-generated method stub
-
+        return null;
     }
 
-    @Override
     public void joinNetwork(String network1, String network2) {
         // TODO Auto-generated method stub
 
     }
 
-    @Override
-    public void attachNetwork(String network, String vm) {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void detachNetwork(String network, String vm) {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void attachVolume(String vm, String vol) {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
     public void createNetwork() {
         // TODO Auto-generated method stub
 
     }
 
-    @Override
     public void destroyNetwork() {
         // TODO Auto-generated method stub
 
     }
 
-    @Override
-    public void createVolume() {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void destroyVolume() {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void snapshotVirtualMachine(String vm) {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void snapshotVolume(String volume) {
+    public VolumeEntity createVolume() {
         // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void backup(String snapshot) {
-        // TODO Auto-generated method stub
-
+        return null;
     }
 
-    @Override
     public void registerTemplate(String name, URL path, String os, Hypervisor hypervisor)
{
         // TODO Auto-generated method stub
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/06b7d80f/server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java b/server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
index 047bb3e..cfa1bcd 100755
--- a/server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
+++ b/server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
@@ -131,7 +131,7 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker
{
 
         _upgradeMap.put("2.2.8", new DbUpgrade[] { new Upgrade228to229(), new Upgrade229to2210(),
new Upgrade2210to2211(),
                 new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(),
new Upgrade2214to30()
-                , new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40() });
+        , new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40() });
 
         _upgradeMap.put("2.2.9", new DbUpgrade[] { new Upgrade229to2210(), new Upgrade2210to2211(),
new Upgrade2211to2212(),
                 new Upgrade2212to2213(), new Upgrade2213to2214(), new Upgrade2214to30(),
new Upgrade30to301(),
@@ -335,8 +335,8 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker
{
                 }
 
                 if ( currentVersion == null )
-                	return;
-                
+                    return;
+
                 s_logger.info("DB version = " + dbVersion + " Code Version = " + currentVersion);
 
                 if (Version.compare(Version.trimToPatch(dbVersion), Version.trimToPatch(currentVersion))
> 0) {


Mime
View raw message