mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
more changes
This commit is contained in:
parent
b250b985ec
commit
20ffe6f13d
37
api/src/com/cloud/domain/Domain.java
Normal file
37
api/src/com/cloud/domain/Domain.java
Normal file
@ -0,0 +1,37 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.cloud.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.user.OwnedBy;
|
||||
|
||||
/**
|
||||
* Domain defines the Domain object.
|
||||
*/
|
||||
public interface Domain extends OwnedBy {
|
||||
public static final long ROOT_DOMAIN = 1L;
|
||||
|
||||
long getId();
|
||||
|
||||
Long getParent();
|
||||
|
||||
void setParent(Long parent);
|
||||
|
||||
String getName();
|
||||
|
||||
void setName(String name);
|
||||
|
||||
Date getRemoved();
|
||||
|
||||
String getPath();
|
||||
|
||||
void setPath(String path);
|
||||
|
||||
int getLevel();
|
||||
|
||||
int getChildCount();
|
||||
|
||||
long getNextChildSeq();
|
||||
}
|
||||
15
api/src/com/cloud/domain/PartOf.java
Normal file
15
api/src/com/cloud/domain/PartOf.java
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.cloud.domain;
|
||||
|
||||
/**
|
||||
* PartOf must be implemented by all objects that belongs
|
||||
* in a domain.
|
||||
*/
|
||||
public interface PartOf {
|
||||
/**
|
||||
* @return domain id that the object belongs to.
|
||||
*/
|
||||
long getDomainId();
|
||||
}
|
||||
16
api/src/com/cloud/template/BasedOn.java
Normal file
16
api/src/com/cloud/template/BasedOn.java
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.cloud.template;
|
||||
|
||||
/**
|
||||
* BasedOn is implemented by all objects that are based on a certain template.
|
||||
*/
|
||||
public interface BasedOn {
|
||||
|
||||
/**
|
||||
* @return the template id that the volume is based on.
|
||||
*/
|
||||
Long getTemplateId();
|
||||
|
||||
}
|
||||
14
api/src/com/cloud/user/OwnedBy.java
Normal file
14
api/src/com/cloud/user/OwnedBy.java
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.cloud.user;
|
||||
|
||||
/**
|
||||
* OwnedBy must be inheritted by all objects that can be owned by an account.
|
||||
*/
|
||||
public interface OwnedBy {
|
||||
/**
|
||||
* @return account id that owns this object.
|
||||
*/
|
||||
long getAccountId();
|
||||
}
|
||||
23
api/src/com/cloud/vm/NetworkConcierge.java
Normal file
23
api/src/com/cloud/vm/NetworkConcierge.java
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.cloud.vm;
|
||||
|
||||
import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
|
||||
import com.cloud.utils.Pair;
|
||||
import com.cloud.utils.component.Adapter;
|
||||
|
||||
/**
|
||||
* NetworkConcierge reserves network settings for a VM based
|
||||
* on the NetworkCharacteristics given. A Concierge must
|
||||
* return a unique name so we know to call it to release
|
||||
* the reservation.
|
||||
*
|
||||
*/
|
||||
public interface NetworkConcierge extends Adapter {
|
||||
String getUniqueName();
|
||||
|
||||
Pair<String, NetworkTO> reserve(long vmId, NetworkCharacteristics ch) throws InsufficientVirtualNetworkCapcityException;
|
||||
|
||||
boolean release(String uniqueName, String uniqueId);
|
||||
}
|
||||
18
api/src/com/cloud/vm/NetworkProfiler.java
Normal file
18
api/src/com/cloud/vm/NetworkProfiler.java
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.cloud.vm;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import com.cloud.offering.DiskOffering;
|
||||
import com.cloud.offering.NetworkOffering;
|
||||
import com.cloud.offering.ServiceOffering;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.utils.Ternary;
|
||||
import com.cloud.utils.component.Adapter;
|
||||
|
||||
public interface NetworkProfiler extends Adapter {
|
||||
Ternary<VmCharacteristics, List<NetworkCharacteristics>, List<DiskCharacteristics>> convert(VirtualMachine vm, ServiceOffering serviceOffering, List<NetworkOffering> networkOfferings, Collection<DiskOffering> diskOfferings, Account owner);
|
||||
}
|
||||
14
api/src/com/cloud/vm/RunningOn.java
Normal file
14
api/src/com/cloud/vm/RunningOn.java
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.cloud.vm;
|
||||
|
||||
/**
|
||||
* RunningOn must be implemented by objects that runs on hosts.
|
||||
*
|
||||
*/
|
||||
public interface RunningOn {
|
||||
|
||||
Long getHostId();
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user