mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
Started an object model for the orchestration platform
This commit is contained in:
parent
49c9f1f0ab
commit
b9ddcf8cfe
@ -40,6 +40,7 @@ public interface Snapshot extends ControlledEntity {
|
||||
return max;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name();
|
||||
}
|
||||
@ -56,6 +57,7 @@ public interface Snapshot extends ControlledEntity {
|
||||
BackedUp,
|
||||
Error;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name();
|
||||
}
|
||||
@ -67,8 +69,9 @@ public interface Snapshot extends ControlledEntity {
|
||||
|
||||
public static final long MANUAL_POLICY_ID = 0L;
|
||||
|
||||
Long getId();
|
||||
long getId();
|
||||
|
||||
@Override
|
||||
long getAccountId();
|
||||
|
||||
long getVolumeId();
|
||||
|
||||
@ -40,7 +40,7 @@ public class SnapshotVO implements Snapshot, Identity {
|
||||
@Id
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
@Column(name="id")
|
||||
private long id = -1;
|
||||
private final long id = -1;
|
||||
|
||||
@Column(name="data_center_id")
|
||||
long dataCenterId;
|
||||
@ -109,7 +109,7 @@ public class SnapshotVO implements Snapshot, Identity {
|
||||
String uuid;
|
||||
|
||||
public SnapshotVO() {
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
public SnapshotVO(long dcId, long accountId, long domainId, Long volumeId, Long diskOfferingId, String path, String name, short snapshotType, String typeDescription, long size, HypervisorType hypervisorType ) {
|
||||
@ -127,11 +127,11 @@ public class SnapshotVO implements Snapshot, Identity {
|
||||
this.prevSnapshotId = 0;
|
||||
this.hypervisorType = hypervisorType;
|
||||
this.version = "2.2";
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getId() {
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@ -144,6 +144,7 @@ public class SnapshotVO implements Snapshot, Identity {
|
||||
return accountId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
@ -167,7 +168,7 @@ public class SnapshotVO implements Snapshot, Identity {
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -205,7 +206,7 @@ public class SnapshotVO implements Snapshot, Identity {
|
||||
|
||||
@Override
|
||||
public HypervisorType getHypervisorType() {
|
||||
return hypervisorType;
|
||||
return hypervisorType;
|
||||
}
|
||||
|
||||
public void setSnapshotType(short snapshotType) {
|
||||
@ -239,6 +240,7 @@ public class SnapshotVO implements Snapshot, Identity {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreated() {
|
||||
return created;
|
||||
}
|
||||
@ -247,30 +249,30 @@ public class SnapshotVO implements Snapshot, Identity {
|
||||
return removed;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public Status getStatus() {
|
||||
return status;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Status status) {
|
||||
this.status = status;
|
||||
}
|
||||
public void setStatus(Status status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getBackupSnapshotId(){
|
||||
return backupSnapshotId;
|
||||
}
|
||||
public String getBackupSnapshotId(){
|
||||
return backupSnapshotId;
|
||||
}
|
||||
|
||||
public long getPrevSnapshotId(){
|
||||
return prevSnapshotId;
|
||||
}
|
||||
return prevSnapshotId;
|
||||
}
|
||||
|
||||
public void setBackupSnapshotId(String backUpSnapshotId){
|
||||
this.backupSnapshotId = backUpSnapshotId;
|
||||
}
|
||||
public void setBackupSnapshotId(String backUpSnapshotId){
|
||||
this.backupSnapshotId = backUpSnapshotId;
|
||||
}
|
||||
|
||||
public void setPrevSnapshotId(long prevSnapshotId){
|
||||
this.prevSnapshotId = prevSnapshotId;
|
||||
}
|
||||
public void setPrevSnapshotId(long prevSnapshotId){
|
||||
this.prevSnapshotId = prevSnapshotId;
|
||||
}
|
||||
|
||||
public static Type getSnapshotType(String snapshotType) {
|
||||
for ( Type type : Type.values()) {
|
||||
@ -283,10 +285,10 @@ public class SnapshotVO implements Snapshot, Identity {
|
||||
|
||||
@Override
|
||||
public String getUuid() {
|
||||
return this.uuid;
|
||||
return this.uuid;
|
||||
}
|
||||
|
||||
public void setUuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
this.uuid = uuid;
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,8 +8,6 @@ public interface StorageSubSystem {
|
||||
String getType();
|
||||
Class<? extends Grouping> getScope();
|
||||
|
||||
create();
|
||||
|
||||
URI grantAccess(String vol, String reservationId);
|
||||
URI RemoveAccess(String vol, String reservationId);
|
||||
}
|
||||
|
||||
@ -50,5 +50,6 @@ public interface FiniteState<S, E> {
|
||||
* @return array of events.
|
||||
*/
|
||||
Set<E> getPossibleEvents();
|
||||
|
||||
String getDescription();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user