Skip to content

Commit 198cab4

Browse files
author
keshav
committed
Added support code for external firewalls and loadbalancers. Added new host types and startup commands, and enabled NicVO to reserve IPs for external network resources.
1 parent 8d87271 commit 198cab4

14 files changed

Lines changed: 72 additions & 25 deletions

File tree

‎api/src/com/cloud/host/Host.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ public enum Type {
3131
Storage(false),
3232
Routing(false),
3333
SecondaryStorage(false),
34-
ConsoleProxy(true);
34+
ConsoleProxy(true),
35+
ExternalFirewall(false),
36+
ExternalLoadBalancer(false);
3537

3638
boolean _virtual;
3739
private Type(boolean virtual) {

‎api/src/com/cloud/network/service/Providers.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@
1919

2020
public class Providers {
2121
public final static String VirtualRouter = "VirtualRouter";
22+
public final static String ExternalFirewall = "ExternalFirewall";
23+
public final static String ExternalLoadBalancer = "ExternalLoadBalancer";
2224
}

‎api/src/com/cloud/resource/Resource.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ public String getDescription() {
7878
enum ReservationStrategy {
7979
UserSpecified,
8080
Create,
81-
Start
81+
Start,
82+
PlaceHolder;
8283
}
8384

8485
/**
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.cloud.agent.api;
2+
3+
public class StartupExternalFirewallCommand extends StartupCommand {
4+
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.cloud.agent.api;
2+
3+
public class StartupExternalLoadBalancerCommand extends StartupCommand {
4+
5+
}

‎deps/cloud-axis.jar‎

1.53 MB
Binary file not shown.

‎deps/cloud-commons-discovery.jar‎

69.8 KB
Binary file not shown.

‎deps/cloud-iControl.jar‎

2.18 MB
Binary file not shown.

‎deps/cloud-wsdl4j.jar‎

124 KB
Binary file not shown.

‎server/src/com/cloud/agent/AgentManager.java‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package com.cloud.agent;
1919

2020
import java.util.List;
21+
import java.util.Map;
2122
import java.util.Set;
2223

2324
import com.cloud.agent.api.Answer;
@@ -34,8 +35,10 @@
3435
import com.cloud.host.HostStats;
3536
import com.cloud.host.HostVO;
3637
import com.cloud.host.Status;
38+
import com.cloud.host.Host.Type;
3739
import com.cloud.host.Status.Event;
3840
import com.cloud.offering.ServiceOffering;
41+
import com.cloud.resource.ServerResource;
3942
import com.cloud.service.ServiceOfferingVO;
4043
import com.cloud.storage.StoragePoolVO;
4144
import com.cloud.storage.VMTemplateVO;
@@ -159,6 +162,16 @@ public enum OnError {
159162
List<PodCluster> listByDataCenter(long dcId);
160163
List<PodCluster> listByPod(long podId);
161164

165+
/**
166+
* Adds a new host
167+
* @param zoneId
168+
* @param resource
169+
* @param hostType
170+
* @param hostDetails
171+
* @return new Host
172+
*/
173+
public Host addHost(long zoneId, ServerResource resource, Type hostType, Map<String, String> hostDetails);
174+
162175
/**
163176
* Deletes a host
164177
*

0 commit comments

Comments
 (0)