Skip to content

Commit 20ffe6f

Browse files
author
Alex Huang
committed
more changes
1 parent b250b98 commit 20ffe6f

7 files changed

Lines changed: 137 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
*
3+
*/
4+
package com.cloud.domain;
5+
6+
import java.util.Date;
7+
8+
import com.cloud.user.OwnedBy;
9+
10+
/**
11+
* Domain defines the Domain object.
12+
*/
13+
public interface Domain extends OwnedBy {
14+
public static final long ROOT_DOMAIN = 1L;
15+
16+
long getId();
17+
18+
Long getParent();
19+
20+
void setParent(Long parent);
21+
22+
String getName();
23+
24+
void setName(String name);
25+
26+
Date getRemoved();
27+
28+
String getPath();
29+
30+
void setPath(String path);
31+
32+
int getLevel();
33+
34+
int getChildCount();
35+
36+
long getNextChildSeq();
37+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
*
3+
*/
4+
package com.cloud.domain;
5+
6+
/**
7+
* PartOf must be implemented by all objects that belongs
8+
* in a domain.
9+
*/
10+
public interface PartOf {
11+
/**
12+
* @return domain id that the object belongs to.
13+
*/
14+
long getDomainId();
15+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
*
3+
*/
4+
package com.cloud.template;
5+
6+
/**
7+
* BasedOn is implemented by all objects that are based on a certain template.
8+
*/
9+
public interface BasedOn {
10+
11+
/**
12+
* @return the template id that the volume is based on.
13+
*/
14+
Long getTemplateId();
15+
16+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
*
3+
*/
4+
package com.cloud.user;
5+
6+
/**
7+
* OwnedBy must be inheritted by all objects that can be owned by an account.
8+
*/
9+
public interface OwnedBy {
10+
/**
11+
* @return account id that owns this object.
12+
*/
13+
long getAccountId();
14+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
*
3+
*/
4+
package com.cloud.vm;
5+
6+
import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
7+
import com.cloud.utils.Pair;
8+
import com.cloud.utils.component.Adapter;
9+
10+
/**
11+
* NetworkConcierge reserves network settings for a VM based
12+
* on the NetworkCharacteristics given. A Concierge must
13+
* return a unique name so we know to call it to release
14+
* the reservation.
15+
*
16+
*/
17+
public interface NetworkConcierge extends Adapter {
18+
String getUniqueName();
19+
20+
Pair<String, NetworkTO> reserve(long vmId, NetworkCharacteristics ch) throws InsufficientVirtualNetworkCapcityException;
21+
22+
boolean release(String uniqueName, String uniqueId);
23+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
*
3+
*/
4+
package com.cloud.vm;
5+
6+
import java.util.Collection;
7+
import java.util.List;
8+
9+
import com.cloud.offering.DiskOffering;
10+
import com.cloud.offering.NetworkOffering;
11+
import com.cloud.offering.ServiceOffering;
12+
import com.cloud.user.Account;
13+
import com.cloud.utils.Ternary;
14+
import com.cloud.utils.component.Adapter;
15+
16+
public interface NetworkProfiler extends Adapter {
17+
Ternary<VmCharacteristics, List<NetworkCharacteristics>, List<DiskCharacteristics>> convert(VirtualMachine vm, ServiceOffering serviceOffering, List<NetworkOffering> networkOfferings, Collection<DiskOffering> diskOfferings, Account owner);
18+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
*
3+
*/
4+
package com.cloud.vm;
5+
6+
/**
7+
* RunningOn must be implemented by objects that runs on hosts.
8+
*
9+
*/
10+
public interface RunningOn {
11+
12+
Long getHostId();
13+
14+
}

0 commit comments

Comments
 (0)