You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2013/11/20 16:35:35 UTC
[48/51] [partial] Reformat all source code. Added checkstyle to check
the source code
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/exception/ResourceInUseException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/ResourceInUseException.java b/api/src/com/cloud/exception/ResourceInUseException.java
index 8b091b2..efcab23 100644
--- a/api/src/com/cloud/exception/ResourceInUseException.java
+++ b/api/src/com/cloud/exception/ResourceInUseException.java
@@ -26,8 +26,7 @@ public class ResourceInUseException extends ManagementServerException {
super(message);
}
- public ResourceInUseException(String message, String resourceType,
- String resourceName) {
+ public ResourceInUseException(String message, String resourceType, String resourceName) {
super(message);
this.resourceType = resourceType;
this.resourceName = resourceName;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/exception/StorageUnavailableException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/StorageUnavailableException.java b/api/src/com/cloud/exception/StorageUnavailableException.java
index 6db1629..e454530 100644
--- a/api/src/com/cloud/exception/StorageUnavailableException.java
+++ b/api/src/com/cloud/exception/StorageUnavailableException.java
@@ -30,6 +30,7 @@ public class StorageUnavailableException extends ResourceUnavailableException {
public StorageUnavailableException(String msg, long poolId) {
this(msg, poolId, null);
}
+
public StorageUnavailableException(String msg, long poolId, Throwable cause) {
this(msg, StoragePool.class, poolId, cause);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/ha/FenceBuilder.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/ha/FenceBuilder.java b/api/src/com/cloud/ha/FenceBuilder.java
index 41bde71..8b63869 100644
--- a/api/src/com/cloud/ha/FenceBuilder.java
+++ b/api/src/com/cloud/ha/FenceBuilder.java
@@ -21,11 +21,11 @@ import com.cloud.utils.component.Adapter;
import com.cloud.vm.VirtualMachine;
public interface FenceBuilder extends Adapter {
- /**
- * Fence off the vm.
- *
- * @param vm vm
- * @param host host where the vm was running on.
- */
+ /**
+ * Fence off the vm.
+ *
+ * @param vm vm
+ * @param host host where the vm was running on.
+ */
public Boolean fenceOff(VirtualMachine vm, Host host);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/host/Host.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/host/Host.java b/api/src/com/cloud/host/Host.java
index 581bd47..3f32b68 100755
--- a/api/src/com/cloud/host/Host.java
+++ b/api/src/com/cloud/host/Host.java
@@ -25,7 +25,6 @@ import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.resource.ResourceState;
import com.cloud.utils.fsm.StateObject;
-
/**
* Host represents one particular host server.
*/
@@ -49,6 +48,7 @@ public interface Host extends StateObject<Status>, Identity, InternalIdentity {
LocalSecondaryStorage(false),
L2Networking(false);
boolean _virtual;
+
private Type(boolean virtual) {
_virtual = virtual;
}
@@ -155,26 +155,32 @@ public interface Host extends StateObject<Status>, Identity, InternalIdentity {
* @return disconnection date
*/
Date getDisconnectedOn();
+
/**
* @return version
*/
String getVersion();
+
/*
* @return total size
*/
long getTotalSize();
+
/*
* @return capabilities
*/
String getCapabilities();
+
/*
* @return last pinged time
*/
long getLastPinged();
+
/*
* @return management server id
*/
Long getManagementServerId();
+
/*
*@return removal date
*/
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/host/HostEnvironment.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/host/HostEnvironment.java b/api/src/com/cloud/host/HostEnvironment.java
index 89077b5..0eb14d5 100644
--- a/api/src/com/cloud/host/HostEnvironment.java
+++ b/api/src/com/cloud/host/HostEnvironment.java
@@ -16,7 +16,6 @@
// under the License.
package com.cloud.host;
-
/**
* the networking environment of the host. The
* the environment.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/host/HostStats.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/host/HostStats.java b/api/src/com/cloud/host/HostStats.java
index 803b148..4eb7b1a 100755
--- a/api/src/com/cloud/host/HostStats.java
+++ b/api/src/com/cloud/host/HostStats.java
@@ -20,12 +20,19 @@ public interface HostStats {
// host related stats
public double getCpuUtilization();
+
public double getNetworkWriteKBs();
+
public double getTotalMemoryKBs();
+
public double getFreeMemoryKBs();
+
public double getNetworkReadKBs();
+
public String getEntityType();
+
public double getUsedMemory();
+
public HostStats getHostStats();
// public double getAverageLoad();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/host/Status.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/host/Status.java b/api/src/com/cloud/host/Status.java
index dd49122..fd136c9 100755
--- a/api/src/com/cloud/host/Status.java
+++ b/api/src/com/cloud/host/Status.java
@@ -23,32 +23,27 @@ import com.cloud.utils.fsm.NoTransitionException;
import com.cloud.utils.fsm.StateMachine2;
public enum Status {
- Creating(true, false, false),
- Connecting(true, false, false),
- Up(true, false, false),
- Down(true, true, true),
- Disconnected(true, true, true),
- Alert(true, true, true),
- Removed(true, false, true),
- Error(true, false, true),
- Rebalancing(true, false, true);
+ Creating(true, false, false), Connecting(true, false, false), Up(true, false, false), Down(true, true, true), Disconnected(true, true, true), Alert(true, true, true), Removed(
+ true,
+ false,
+ true), Error(true, false, true), Rebalancing(true, false, true);
private final boolean updateManagementServer;
private final boolean checkManagementServer;
private final boolean lostConnection;
private Status(boolean updateConnection, boolean checkManagementServer, boolean lostConnection) {
- this.updateManagementServer = updateConnection;
- this.checkManagementServer = checkManagementServer;
- this.lostConnection = lostConnection;
+ this.updateManagementServer = updateConnection;
+ this.checkManagementServer = checkManagementServer;
+ this.lostConnection = lostConnection;
}
public boolean updateManagementServer() {
- return updateManagementServer;
+ return updateManagementServer;
}
public boolean checkManagementServer() {
- return checkManagementServer;
+ return checkManagementServer;
}
public boolean lostConnection() {
@@ -74,8 +69,9 @@ public enum Status {
private final boolean isUserRequest;
private final String comment;
+
private Event(boolean isUserRequest, String comment) {
- this.isUserRequest = isUserRequest;
+ this.isUserRequest = isUserRequest;
this.comment = comment;
}
@@ -84,7 +80,7 @@ public enum Status {
}
public boolean isUserRequest() {
- return isUserRequest;
+ return isUserRequest;
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/hypervisor/Hypervisor.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/hypervisor/Hypervisor.java b/api/src/com/cloud/hypervisor/Hypervisor.java
index 710ddfc..35346c4 100644
--- a/api/src/com/cloud/hypervisor/Hypervisor.java
+++ b/api/src/com/cloud/hypervisor/Hypervisor.java
@@ -51,7 +51,7 @@ public class Hypervisor {
return HypervisorType.VirtualBox;
} else if (hypervisor.equalsIgnoreCase("Parralels")) {
return HypervisorType.Parralels;
- }else if (hypervisor.equalsIgnoreCase("BareMetal")) {
+ } else if (hypervisor.equalsIgnoreCase("BareMetal")) {
return HypervisorType.BareMetal;
} else if (hypervisor.equalsIgnoreCase("Simulator")) {
return HypervisorType.Simulator;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/hypervisor/HypervisorCapabilities.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/hypervisor/HypervisorCapabilities.java b/api/src/com/cloud/hypervisor/HypervisorCapabilities.java
index c954750..368ac84 100644
--- a/api/src/com/cloud/hypervisor/HypervisorCapabilities.java
+++ b/api/src/com/cloud/hypervisor/HypervisorCapabilities.java
@@ -21,18 +21,16 @@ import org.apache.cloudstack.api.InternalIdentity;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
-
/**
* HypervisorCapability represents one particular hypervisor version's capabilities.
*/
-public interface HypervisorCapabilities extends Identity, InternalIdentity{
+public interface HypervisorCapabilities extends Identity, InternalIdentity {
/**
* @return type of hypervisor
*/
HypervisorType getHypervisorType();
-
String getHypervisorVersion();
boolean isSecurityGroupEnabled();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/info/ConsoleProxyLoadInfo.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/info/ConsoleProxyLoadInfo.java b/api/src/com/cloud/info/ConsoleProxyLoadInfo.java
index a3ec3e3..4311c7a 100644
--- a/api/src/com/cloud/info/ConsoleProxyLoadInfo.java
+++ b/api/src/com/cloud/info/ConsoleProxyLoadInfo.java
@@ -17,32 +17,32 @@
package com.cloud.info;
public class ConsoleProxyLoadInfo {
-
- private long id;
- private String name;
- private int count;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public int getCount() {
- return count;
- }
-
- public void setCount(int count) {
- this.count = count;
- }
+
+ private long id;
+ private String name;
+ private int count;
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getCount() {
+ return count;
+ }
+
+ public void setCount(int count) {
+ this.count = count;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/info/RunningHostCountInfo.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/info/RunningHostCountInfo.java b/api/src/com/cloud/info/RunningHostCountInfo.java
index f77a4dc..e4062d8 100644
--- a/api/src/com/cloud/info/RunningHostCountInfo.java
+++ b/api/src/com/cloud/info/RunningHostCountInfo.java
@@ -17,32 +17,32 @@
package com.cloud.info;
public class RunningHostCountInfo {
-
- private long dcId;
- private String hostType;
- private int count;
-
- public long getDcId() {
- return dcId;
- }
-
- public void setDcId(long dcId) {
- this.dcId = dcId;
- }
-
- public String getHostType() {
- return hostType;
- }
-
- public void setHostType(String hostType) {
- this.hostType = hostType;
- }
-
- public int getCount() {
- return count;
- }
-
- public void setCount(int count) {
- this.count = count;
- }
+
+ private long dcId;
+ private String hostType;
+ private int count;
+
+ public long getDcId() {
+ return dcId;
+ }
+
+ public void setDcId(long dcId) {
+ this.dcId = dcId;
+ }
+
+ public String getHostType() {
+ return hostType;
+ }
+
+ public void setHostType(String hostType) {
+ this.hostType = hostType;
+ }
+
+ public int getCount() {
+ return count;
+ }
+
+ public void setCount(int count) {
+ this.count = count;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/IpAddress.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/IpAddress.java b/api/src/com/cloud/network/IpAddress.java
index de11a6d..a3816cb 100644
--- a/api/src/com/cloud/network/IpAddress.java
+++ b/api/src/com/cloud/network/IpAddress.java
@@ -44,8 +44,7 @@ public interface IpAddress extends ControlledEntity, Identity, InternalIdentity
}
enum Purpose {
- StaticNat,
- Lb
+ StaticNat, Lb
}
long getDataCenterId();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/MonitoringService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/MonitoringService.java b/api/src/com/cloud/network/MonitoringService.java
index 2a1754a..2024204 100644
--- a/api/src/com/cloud/network/MonitoringService.java
+++ b/api/src/com/cloud/network/MonitoringService.java
@@ -16,27 +16,29 @@
// under the License.
package com.cloud.network;
+
import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;
-
/**
* Nic represents one nic on the VM.
*/
-public interface MonitoringService extends ControlledEntity, Identity, InternalIdentity {
+public interface MonitoringService extends ControlledEntity, Identity, InternalIdentity {
/**
* @return id in the CloudStack database
*/
enum Service {
- Dhcp,
- LoadBalancing,
- Ssh,
- Webserver,
+ Dhcp, LoadBalancing, Ssh, Webserver,
}
+
long getId();
+
String getService();
+
String getServiceName();
+
String getPidFile();
+
String getServicePath();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/Network.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/Network.java b/api/src/com/cloud/network/Network.java
index 4eadd61..bb94f81 100644
--- a/api/src/com/cloud/network/Network.java
+++ b/api/src/com/cloud/network/Network.java
@@ -36,8 +36,7 @@ import com.cloud.utils.fsm.StateObject;
public interface Network extends ControlledEntity, StateObject<Network.State>, InternalIdentity, Identity {
public enum GuestType {
- Shared,
- Isolated
+ Shared, Isolated
}
public static class Service {
@@ -47,11 +46,10 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
public static final Service Dhcp = new Service("Dhcp");
public static final Service Dns = new Service("Dns", Capability.AllowDnsSuffixModification);
public static final Service Gateway = new Service("Gateway");
- public static final Service Firewall = new Service("Firewall", Capability.SupportedProtocols,
- Capability.MultipleIps, Capability.TrafficStatistics, Capability.SupportedTrafficDirection, Capability.SupportedEgressProtocols);
- public static final Service Lb = new Service("Lb", Capability.SupportedLBAlgorithms, Capability.SupportedLBIsolation,
- Capability.SupportedProtocols, Capability.TrafficStatistics, Capability.LoadBalancingSupportedIps,
- Capability.SupportedStickinessMethods, Capability.ElasticLb, Capability.LbSchemes);
+ public static final Service Firewall = new Service("Firewall", Capability.SupportedProtocols, Capability.MultipleIps, Capability.TrafficStatistics,
+ Capability.SupportedTrafficDirection, Capability.SupportedEgressProtocols);
+ public static final Service Lb = new Service("Lb", Capability.SupportedLBAlgorithms, Capability.SupportedLBIsolation, Capability.SupportedProtocols,
+ Capability.TrafficStatistics, Capability.LoadBalancingSupportedIps, Capability.SupportedStickinessMethods, Capability.ElasticLb, Capability.LbSchemes);
public static final Service UserData = new Service("UserData");
public static final Service SourceNat = new Service("SourceNat", Capability.SupportedSourceNatTypes, Capability.RedundantRouter);
public static final Service StaticNat = new Service("StaticNat", Capability.ElasticIp);
@@ -60,7 +58,6 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
public static final Service NetworkACL = new Service("NetworkACL", Capability.SupportedProtocols);
public static final Service Connectivity = new Service("Connectivity");
-
private final String name;
private final Capability[] caps;
@@ -82,7 +79,7 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
boolean success = false;
if (caps != null) {
int length = caps.length;
- for (int i = 0; i< length; i++) {
+ for (int i = 0; i < length; i++) {
if (caps[i].getName().equalsIgnoreCase(cap.getName())) {
success = true;
break;
@@ -102,7 +99,7 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
return null;
}
- public static List<Service> listAllServices(){
+ public static List<Service> listAllServices() {
return supportedServices;
}
}
@@ -207,20 +204,14 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
}
enum Event {
- ImplementNetwork,
- DestroyNetwork,
- OperationSucceeded,
- OperationFailed;
+ ImplementNetwork, DestroyNetwork, OperationSucceeded, OperationFailed;
}
public enum State {
- Allocated("Indicates the network configuration is in allocated but not setup"),
- Setup("Indicates the network configuration is setup"),
- Implementing("Indicates the network configuration is being implemented"),
- Implemented("Indicates the network configuration is in use"),
- Shutdown("Indicates the network configuration is being destroyed"),
- Destroy("Indicates that the network is destroyed");
+ Allocated("Indicates the network configuration is in allocated but not setup"), Setup("Indicates the network configuration is setup"), Implementing(
+ "Indicates the network configuration is being implemented"), Implemented("Indicates the network configuration is in use"), Shutdown(
+ "Indicates the network configuration is being destroyed"), Destroy("Indicates that the network is destroyed");
protected static final StateMachine2<State, Network.Event, Network> s_fsm = new StateMachine2<State, Network.Event, Network>();
@@ -240,37 +231,38 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
}
String _description;
+
private State(String description) {
_description = description;
}
}
public class IpAddresses {
- private String ip4Address;
- private String ip6Address;
-
- public IpAddresses(String ip4Address, String ip6Address) {
- setIp4Address(ip4Address);
- setIp6Address(ip6Address);
- }
-
- public String getIp4Address() {
- return ip4Address;
- }
-
- public void setIp4Address(String ip4Address) {
- this.ip4Address = ip4Address;
- }
-
- public String getIp6Address() {
- return ip6Address;
- }
-
- public void setIp6Address(String ip6Address) {
- this.ip6Address = ip6Address;
- }
+ private String ip4Address;
+ private String ip6Address;
+
+ public IpAddresses(String ip4Address, String ip6Address) {
+ setIp4Address(ip4Address);
+ setIp6Address(ip6Address);
+ }
+
+ public String getIp4Address() {
+ return ip4Address;
+ }
+
+ public void setIp4Address(String ip4Address) {
+ this.ip4Address = ip4Address;
+ }
+
+ public String getIp6Address() {
+ return ip6Address;
+ }
+
+ public void setIp6Address(String ip6Address) {
+ this.ip6Address = ip6Address;
+ }
}
-
+
String getName();
Mode getMode();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/NetworkModel.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/NetworkModel.java b/api/src/com/cloud/network/NetworkModel.java
index f067787..8c627cd 100644
--- a/api/src/com/cloud/network/NetworkModel.java
+++ b/api/src/com/cloud/network/NetworkModel.java
@@ -39,7 +39,6 @@ import com.cloud.vm.Nic;
import com.cloud.vm.NicProfile;
import com.cloud.vm.VirtualMachine;
-
/**
* The NetworkModel presents a read-only view into the Network data such as L2 networks,
* Nics, PublicIps, NetworkOfferings, traffic labels, physical networks and the like
@@ -143,8 +142,7 @@ public interface NetworkModel {
boolean areServicesEnabledInZone(long zoneId, NetworkOffering offering, List<Service> services);
- Map<PublicIpAddress, Set<Service>> getIpToServices(List<? extends PublicIpAddress> publicIps, boolean rulesRevoked,
- boolean includingFirewall);
+ Map<PublicIpAddress, Set<Service>> getIpToServices(List<? extends PublicIpAddress> publicIps, boolean rulesRevoked, boolean includingFirewall);
Map<Provider, ArrayList<PublicIpAddress>> getProviderToIpList(Network network, Map<PublicIpAddress, Set<Service>> ipToServices);
@@ -239,25 +237,25 @@ public interface NetworkModel {
Set<Long> getAvailableIps(Network network, String requestedIp);
String getDomainNetworkDomain(long domainId, long zoneId);
-
+
PublicIpAddress getSourceNatIpAddressForGuestNetwork(Account owner, Network guestNetwork);
-
+
boolean isNetworkInlineMode(Network network);
- boolean isIP6AddressAvailableInNetwork(long networkId);
+ boolean isIP6AddressAvailableInNetwork(long networkId);
- boolean isIP6AddressAvailableInVlan(long vlanId);
+ boolean isIP6AddressAvailableInVlan(long vlanId);
- void checkIp6Parameters(String startIPv6, String endIPv6, String ip6Gateway, String ip6Cidr) throws InvalidParameterValueException;
+ void checkIp6Parameters(String startIPv6, String endIPv6, String ip6Gateway, String ip6Cidr) throws InvalidParameterValueException;
- void checkRequestedIpAddresses(long networkId, String ip4, String ip6) throws InvalidParameterValueException;
+ void checkRequestedIpAddresses(long networkId, String ip4, String ip6) throws InvalidParameterValueException;
- String getStartIpv6Address(long id);
+ String getStartIpv6Address(long id);
boolean isProviderEnabledInZone(long zoneId, String provider);
Nic getPlaceholderNicForRouter(Network network, Long podId);
-
+
IpAddress getPublicIpAddress(String ipAddress, long zoneId);
List<String> getUsedIpsInNetwork(Network network);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/NetworkProfile.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/NetworkProfile.java b/api/src/com/cloud/network/NetworkProfile.java
index 542df3e..1b66c7c 100644
--- a/api/src/com/cloud/network/NetworkProfile.java
+++ b/api/src/com/cloud/network/NetworkProfile.java
@@ -124,7 +124,6 @@ public class NetworkProfile implements Network {
return id;
}
-
@Override
public String getUuid() {
return uuid;
@@ -267,13 +266,13 @@ public class NetworkProfile implements Network {
trafficType = type;
}
- @Override
- public String getIp6Gateway() {
- return ip6Gateway;
- }
+ @Override
+ public String getIp6Gateway() {
+ return ip6Gateway;
+ }
- @Override
- public String getIp6Cidr() {
- return ip6Cidr;
- }
+ @Override
+ public String getIp6Cidr() {
+ return ip6Cidr;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/NetworkRuleApplier.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/NetworkRuleApplier.java b/api/src/com/cloud/network/NetworkRuleApplier.java
index 31763d0..e749608 100644
--- a/api/src/com/cloud/network/NetworkRuleApplier.java
+++ b/api/src/com/cloud/network/NetworkRuleApplier.java
@@ -24,5 +24,5 @@ import com.cloud.network.rules.FirewallRule;
public interface NetworkRuleApplier {
public boolean applyRules(Network network, FirewallRule.Purpose purpose, List<? extends FirewallRule> rules) throws ResourceUnavailableException;
-
+
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/NetworkService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/NetworkService.java b/api/src/com/cloud/network/NetworkService.java
index b91a63d..ceb9f41 100755
--- a/api/src/com/cloud/network/NetworkService.java
+++ b/api/src/com/cloud/network/NetworkService.java
@@ -51,25 +51,22 @@ public interface NetworkService {
List<? extends Network> getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner);
- IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId) throws ResourceAllocationException,
- InsufficientAddressCapacityException, ConcurrentOperationException;
+ IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId) throws ResourceAllocationException, InsufficientAddressCapacityException, ConcurrentOperationException;
boolean releaseIpAddress(long ipAddressId) throws InsufficientAddressCapacityException;
- IpAddress allocatePortableIP(Account ipOwner, int regionId, Long zoneId, Long networkId, Long vpcId) throws ResourceAllocationException,
- InsufficientAddressCapacityException, ConcurrentOperationException;
+ IpAddress allocatePortableIP(Account ipOwner, int regionId, Long zoneId, Long networkId, Long vpcId) throws ResourceAllocationException, InsufficientAddressCapacityException,
+ ConcurrentOperationException;
boolean releasePortableIpAddress(long ipAddressId);
- Network createGuestNetwork(CreateNetworkCmd cmd) throws InsufficientCapacityException, ConcurrentOperationException,
- ResourceAllocationException;
+ Network createGuestNetwork(CreateNetworkCmd cmd) throws InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException;
List<? extends Network> searchForNetworks(ListNetworksCmd cmd);
boolean deleteNetwork(long networkId);
- boolean restartNetwork(RestartNetworkCmd cmd, boolean cleanup) throws ConcurrentOperationException,
- ResourceUnavailableException, InsufficientCapacityException;
+ boolean restartNetwork(RestartNetworkCmd cmd, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
int getActiveNicsInNetwork(long networkId);
@@ -79,27 +76,23 @@ public interface NetworkService {
IpAddress getIp(long id);
- Network updateGuestNetwork(long networkId, String name, String displayText, Account callerAccount, User callerUser,
- String domainSuffix, Long networkOfferingId, Boolean changeCidr, String guestVmCidr, Boolean displayNetwork);
+ Network updateGuestNetwork(long networkId, String name, String displayText, Account callerAccount, User callerUser, String domainSuffix, Long networkOfferingId,
+ Boolean changeCidr, String guestVmCidr, Boolean displayNetwork);
- PhysicalNetwork createPhysicalNetwork(Long zoneId, String vnetRange, String networkSpeed,
- List<String> isolationMethods, String broadcastDomainRange, Long domainId, List<String> tags, String name);
+ PhysicalNetwork createPhysicalNetwork(Long zoneId, String vnetRange, String networkSpeed, List<String> isolationMethods, String broadcastDomainRange, Long domainId,
+ List<String> tags, String name);
- Pair<List<? extends PhysicalNetwork>, Integer> searchPhysicalNetworks(Long id, Long zoneId, String keyword,
- Long startIndex, Long pageSize, String name);
+ Pair<List<? extends PhysicalNetwork>, Integer> searchPhysicalNetworks(Long id, Long zoneId, String keyword, Long startIndex, Long pageSize, String name);
- PhysicalNetwork updatePhysicalNetwork(Long id, String networkSpeed, List<String> tags,
- String newVnetRangeString, String state);
+ PhysicalNetwork updatePhysicalNetwork(Long id, String networkSpeed, List<String> tags, String newVnetRangeString, String state);
boolean deletePhysicalNetwork(Long id);
List<? extends Service> listNetworkServices(String providerName);
- PhysicalNetworkServiceProvider addProviderToPhysicalNetwork(Long physicalNetworkId, String providerName,
- Long destinationPhysicalNetworkId, List<String> enabledServices);
+ PhysicalNetworkServiceProvider addProviderToPhysicalNetwork(Long physicalNetworkId, String providerName, Long destinationPhysicalNetworkId, List<String> enabledServices);
- Pair<List<? extends PhysicalNetworkServiceProvider>, Integer> listNetworkServiceProviders(Long physicalNetworkId, String name,
- String state, Long startIndex, Long pageSize);
+ Pair<List<? extends PhysicalNetworkServiceProvider>, Integer> listNetworkServiceProviders(Long physicalNetworkId, String name, String state, Long startIndex, Long pageSize);
PhysicalNetworkServiceProvider updateNetworkServiceProvider(Long id, String state, List<String> enabledServices);
@@ -115,8 +108,8 @@ public interface NetworkService {
long findPhysicalNetworkId(long zoneId, String tag, TrafficType trafficType);
- PhysicalNetworkTrafficType addTrafficTypeToPhysicalNetwork(Long physicalNetworkId, String trafficType,
- String xenLabel, String kvmLabel, String vmwareLabel, String simulatorLabel, String vlan, String hypervLabel);
+ PhysicalNetworkTrafficType addTrafficTypeToPhysicalNetwork(Long physicalNetworkId, String trafficType, String xenLabel, String kvmLabel, String vmwareLabel,
+ String simulatorLabel, String vlan, String hypervLabel);
PhysicalNetworkTrafficType getPhysicalNetworkTrafficType(Long id);
@@ -132,14 +125,11 @@ public interface NetworkService {
Pair<List<? extends PhysicalNetworkTrafficType>, Integer> listTrafficTypes(Long physicalNetworkId);
-
Network getExclusiveGuestNetwork(long zoneId);
List<Pair<TrafficType, String>> listTrafficTypeImplementor(ListTrafficTypeImplementorsCmd cmd);
List<? extends Network> getIsolatedNetworksWithSourceNATOwnedByAccountInZone(long zoneId, Account owner);
-
-
/**
* @param networkId
@@ -150,8 +140,8 @@ public interface NetworkService {
* @throws ResourceAllocationException
* @throws InsufficientAddressCapacityException
*/
- IpAddress associateIPToNetwork(long ipId, long networkId) throws InsufficientAddressCapacityException,
- ResourceAllocationException, ResourceUnavailableException, ConcurrentOperationException;
+ IpAddress associateIPToNetwork(long ipId, long networkId) throws InsufficientAddressCapacityException, ResourceAllocationException, ResourceUnavailableException,
+ ConcurrentOperationException;
/**
*
@@ -171,13 +161,11 @@ public interface NetworkService {
* @throws ConcurrentOperationException
* @throws ResourceAllocationException
*/
- Network createPrivateNetwork(String networkName, String displayText, long physicalNetworkId, String broadcastUri,
- String startIp, String endIP, String gateway, String netmask, long networkOwnerId, Long vpcId, Boolean sourceNat, Long networkOfferingId)
- throws ResourceAllocationException, ConcurrentOperationException, InsufficientCapacityException;
+ Network createPrivateNetwork(String networkName, String displayText, long physicalNetworkId, String broadcastUri, String startIp, String endIP, String gateway, String netmask,
+ long networkOwnerId, Long vpcId, Boolean sourceNat, Long networkOfferingId) throws ResourceAllocationException, ConcurrentOperationException, InsufficientCapacityException;
/* Requests an IP address for the guest nic */
- NicSecondaryIp allocateSecondaryGuestIP(Account account, long zoneId, Long nicId,
- Long networkId, String ipaddress) throws InsufficientAddressCapacityException;
+ NicSecondaryIp allocateSecondaryGuestIP(Account account, long zoneId, Long nicId, Long networkId, String ipaddress) throws InsufficientAddressCapacityException;
boolean releaseSecondaryIpFromNic(long ipAddressId);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/Networks.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/Networks.java b/api/src/com/cloud/network/Networks.java
index 0412bf4..b03f14a 100755
--- a/api/src/com/cloud/network/Networks.java
+++ b/api/src/com/cloud/network/Networks.java
@@ -28,8 +28,7 @@ import com.cloud.utils.exception.CloudRuntimeException;
public class Networks {
public enum RouterPrivateIpStrategy {
- None,
- DcGlobal, // global to data center
+ None, DcGlobal, // global to data center
HostLocal;
public static String DummyPrivateIp = "169.254.1.1";
@@ -39,16 +38,11 @@ public class Networks {
* Different ways to assign ip address to this network.
*/
public enum Mode {
- None,
- Static,
- Dhcp,
- ExternalDhcp;
+ None, Static, Dhcp, ExternalDhcp;
};
public enum AddressFormat {
- Ip4,
- Ip6,
- DualStack
+ Ip4, Ip6, DualStack
}
/**
@@ -78,23 +72,17 @@ public class Networks {
else
return new URI("vlan://" + value.toString());
} catch (URISyntaxException e) {
- throw new CloudRuntimeException(
- "Unable to convert to broadcast URI: " + value);
+ throw new CloudRuntimeException("Unable to convert to broadcast URI: " + value);
}
}
},
- Vswitch("vs", String.class),
- LinkLocal(null, null),
- Vnet("vnet", Long.class),
- Storage("storage", Integer.class),
- Lswitch("lswitch", String.class) {
+ Vswitch("vs", String.class), LinkLocal(null, null), Vnet("vnet", Long.class), Storage("storage", Integer.class), Lswitch("lswitch", String.class) {
@Override
public <T> URI toUri(T value) {
try {
return new URI("lswitch", value.toString(), null, null);
} catch (URISyntaxException e) {
- throw new CloudRuntimeException(
- "Unable to convert to broadcast URI: " + value);
+ throw new CloudRuntimeException("Unable to convert to broadcast URI: " + value);
}
}
@@ -106,10 +94,7 @@ public class Networks {
return uri.getSchemeSpecificPart();
}
},
- Mido("mido", String.class),
- Pvlan("pvlan", String.class),
- Vxlan("vxlan", Long.class),
- UnDecided(null, null);
+ Mido("mido", String.class), Pvlan("pvlan", String.class), Vxlan("vxlan", Long.class), UnDecided(null, null);
private final String scheme;
private final Class<?> type;
@@ -145,8 +130,7 @@ public class Networks {
try {
return new URI(scheme + "://" + value.toString());
} catch (URISyntaxException e) {
- throw new CloudRuntimeException(
- "Unable to convert to broadcast URI: " + value);
+ throw new CloudRuntimeException("Unable to convert to broadcast URI: " + value);
}
}
@@ -167,8 +151,7 @@ public class Networks {
* @return the scheme as BroadcastDomainType
* @throws URISyntaxException when the string can not be converted to URI
*/
- public static BroadcastDomainType getTypeOf(String str)
- throws URISyntaxException {
+ public static BroadcastDomainType getTypeOf(String str) throws URISyntaxException {
if (com.cloud.dc.Vlan.UNTAGGED.equalsIgnoreCase(str)) {
return Native;
}
@@ -223,8 +206,7 @@ public class Networks {
* @return depending on the scheme/BroadcastDomainType
* @throws URISyntaxException the string is not even an uri
*/
- public static String getValue(String uriString)
- throws URISyntaxException {
+ public static String getValue(String uriString) throws URISyntaxException {
return getValue(new URI(uriString));
}
@@ -260,17 +242,10 @@ public class Networks {
* Different types of network traffic in the data center.
*/
public enum TrafficType {
- None,
- Public,
- Guest,
- Storage,
- Management,
- Control,
- Vpn;
+ None, Public, Guest, Storage, Management, Control, Vpn;
public static boolean isSystemNetwork(TrafficType trafficType) {
- if (Storage.equals(trafficType) || Management.equals(trafficType)
- || Control.equals(trafficType)) {
+ if (Storage.equals(trafficType) || Management.equals(trafficType) || Control.equals(trafficType)) {
return true;
}
return false;
@@ -296,9 +271,7 @@ public class Networks {
};
public enum IsolationType {
- None(null, null),
- Ec2("ec2", String.class),
- Vlan("vlan", Integer.class) {
+ None(null, null), Ec2("ec2", String.class), Vlan("vlan", Integer.class) {
@Override
public <T> URI toUri(T value) {
try {
@@ -307,14 +280,11 @@ public class Networks {
else
return new URI("vlan", value.toString(), null, null);
} catch (URISyntaxException e) {
- throw new CloudRuntimeException(
- "Unable to convert to isolation URI: " + value);
+ throw new CloudRuntimeException("Unable to convert to isolation URI: " + value);
}
}
},
- Vswitch("vs", String.class),
- Undecided(null, null),
- Vnet("vnet", Long.class);
+ Vswitch("vs", String.class), Undecided(null, null), Vnet("vnet", Long.class);
private final String scheme;
private final Class<?> type;
@@ -336,15 +306,13 @@ public class Networks {
try {
return new URI(scheme + "://" + value.toString());
} catch (URISyntaxException e) {
- throw new CloudRuntimeException(
- "Unable to convert to isolation type URI: " + value);
+ throw new CloudRuntimeException("Unable to convert to isolation type URI: " + value);
}
}
}
public enum BroadcastScheme {
- Vlan("vlan"),
- VSwitch("vswitch");
+ Vlan("vlan"), VSwitch("vswitch");
private final String scheme;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/PhysicalNetwork.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/PhysicalNetwork.java b/api/src/com/cloud/network/PhysicalNetwork.java
index 55b18e6..08b28ae 100644
--- a/api/src/com/cloud/network/PhysicalNetwork.java
+++ b/api/src/com/cloud/network/PhysicalNetwork.java
@@ -28,24 +28,15 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface PhysicalNetwork extends Identity, InternalIdentity {
public enum State {
- Disabled,
- Enabled;
+ Disabled, Enabled;
}
public enum IsolationMethod {
- VLAN,
- L3,
- GRE,
- STT,
- VNS,
- MIDO,
- SSP,
- VXLAN;
+ VLAN, L3, GRE, STT, VNS, MIDO, SSP, VXLAN;
}
public enum BroadcastDomainRange {
- POD,
- ZONE;
+ POD, ZONE;
}
BroadcastDomainRange getBroadcastDomainRange();
@@ -62,7 +53,7 @@ public interface PhysicalNetwork extends Identity, InternalIdentity {
Long getDomainId();
- List<Pair<Integer,Integer>> getVnet();
+ List<Pair<Integer, Integer>> getVnet();
String getVnetString();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/PhysicalNetworkServiceProvider.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/PhysicalNetworkServiceProvider.java b/api/src/com/cloud/network/PhysicalNetworkServiceProvider.java
index d67c3c7..bbf137c 100644
--- a/api/src/com/cloud/network/PhysicalNetworkServiceProvider.java
+++ b/api/src/com/cloud/network/PhysicalNetworkServiceProvider.java
@@ -28,9 +28,7 @@ import com.cloud.network.Network.Service;
public interface PhysicalNetworkServiceProvider extends InternalIdentity {
public enum State {
- Disabled,
- Enabled,
- Shutdown;
+ Disabled, Enabled, Shutdown;
}
long getId();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/PhysicalNetworkTrafficType.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/PhysicalNetworkTrafficType.java b/api/src/com/cloud/network/PhysicalNetworkTrafficType.java
index ad3b93d..a50aa37 100644
--- a/api/src/com/cloud/network/PhysicalNetworkTrafficType.java
+++ b/api/src/com/cloud/network/PhysicalNetworkTrafficType.java
@@ -37,6 +37,6 @@ public interface PhysicalNetworkTrafficType extends InternalIdentity, Identity {
String getVmwareNetworkLabel();
String getSimulatorNetworkLabel();
-
+
String getHypervNetworkLabel();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/RemoteAccessVpn.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/RemoteAccessVpn.java b/api/src/com/cloud/network/RemoteAccessVpn.java
index 4f61334..d3262b7 100644
--- a/api/src/com/cloud/network/RemoteAccessVpn.java
+++ b/api/src/com/cloud/network/RemoteAccessVpn.java
@@ -22,16 +22,20 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface RemoteAccessVpn extends ControlledEntity, InternalIdentity, Identity {
enum State {
- Added,
- Running,
- Removed
+ Added, Running, Removed
}
long getServerAddressId();
+
String getIpRange();
+
String getIpsecPresharedKey();
+
String getLocalIp();
+
Long getNetworkId();
+
Long getVpcId();
+
State getState();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/Site2SiteCustomerGateway.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/Site2SiteCustomerGateway.java b/api/src/com/cloud/network/Site2SiteCustomerGateway.java
index 3a54385..2de4ff2 100644
--- a/api/src/com/cloud/network/Site2SiteCustomerGateway.java
+++ b/api/src/com/cloud/network/Site2SiteCustomerGateway.java
@@ -24,13 +24,22 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface Site2SiteCustomerGateway extends ControlledEntity, Identity, InternalIdentity {
public String getGatewayIp();
+
public String getGuestCidrList();
+
public String getIpsecPsk();
+
public String getIkePolicy();
+
public String getEspPolicy();
+
public Long getIkeLifetime();
+
public Long getEspLifetime();
+
public Boolean getDpd();
+
public Date getRemoved();
+
String getName();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/Site2SiteVpnConnection.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/Site2SiteVpnConnection.java b/api/src/com/cloud/network/Site2SiteVpnConnection.java
index 984b051..bb09f70 100644
--- a/api/src/com/cloud/network/Site2SiteVpnConnection.java
+++ b/api/src/com/cloud/network/Site2SiteVpnConnection.java
@@ -23,17 +23,22 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface Site2SiteVpnConnection extends ControlledEntity, InternalIdentity {
enum State {
- Pending,
- Connected,
- Disconnected,
- Error,
+ Pending, Connected, Disconnected, Error,
}
+
public long getId();
+
public String getUuid();
+
public long getVpnGatewayId();
+
public long getCustomerGatewayId();
+
public State getState();
+
public Date getCreated();
+
public Date getRemoved();
+
public boolean isPassive();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/Site2SiteVpnGateway.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/Site2SiteVpnGateway.java b/api/src/com/cloud/network/Site2SiteVpnGateway.java
index 8137913..b60db3a 100644
--- a/api/src/com/cloud/network/Site2SiteVpnGateway.java
+++ b/api/src/com/cloud/network/Site2SiteVpnGateway.java
@@ -24,6 +24,8 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface Site2SiteVpnGateway extends ControlledEntity, Identity, InternalIdentity {
public long getAddrId();
+
public long getVpcId();
+
public Date getRemoved();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/UserIpv6Address.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/UserIpv6Address.java b/api/src/com/cloud/network/UserIpv6Address.java
index 4c33d45..edfb364 100644
--- a/api/src/com/cloud/network/UserIpv6Address.java
+++ b/api/src/com/cloud/network/UserIpv6Address.java
@@ -41,12 +41,12 @@ public interface UserIpv6Address extends ControlledEntity, Identity, InternalIde
State getState();
Long getNetworkId();
-
+
Long getSourceNetworkId();
Long getPhysicalNetworkId();
void setState(UserIpv6Address.State state);
-
+
String getMacAddress();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/VirtualNetworkApplianceService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/VirtualNetworkApplianceService.java b/api/src/com/cloud/network/VirtualNetworkApplianceService.java
index fb5d12a..ec8dba7 100644
--- a/api/src/com/cloud/network/VirtualNetworkApplianceService.java
+++ b/api/src/com/cloud/network/VirtualNetworkApplianceService.java
@@ -35,8 +35,7 @@ public interface VirtualNetworkApplianceService {
* the command specifying router's id
* @return DomainRouter object
*/
- VirtualRouter startRouter(long routerId, boolean reprogramNetwork) throws ConcurrentOperationException,
- ResourceUnavailableException, InsufficientCapacityException;
+ VirtualRouter startRouter(long routerId, boolean reprogramNetwork) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
/**
* Reboots domain router
@@ -45,8 +44,7 @@ public interface VirtualNetworkApplianceService {
* the command specifying router's id
* @return router if successful
*/
- VirtualRouter rebootRouter(long routerId, boolean reprogramNetwork) throws ConcurrentOperationException,
- ResourceUnavailableException, InsufficientCapacityException;
+ VirtualRouter rebootRouter(long routerId, boolean reprogramNetwork) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
VirtualRouter upgradeRouter(UpgradeRouterCmd cmd);
@@ -66,7 +64,7 @@ public interface VirtualNetworkApplianceService {
VirtualRouter startRouter(long id) throws ResourceUnavailableException, InsufficientCapacityException, ConcurrentOperationException;
VirtualRouter destroyRouter(long routerId, Account caller, Long callerUserId) throws ResourceUnavailableException, ConcurrentOperationException;
-
+
VirtualRouter findRouter(long routerId);
List<Long> upgradeRouterTemplate(UpgradeRouterTemplateCmd cmd);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/VirtualRouterProvider.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/VirtualRouterProvider.java b/api/src/com/cloud/network/VirtualRouterProvider.java
index 02efb93..8e2fa70 100644
--- a/api/src/com/cloud/network/VirtualRouterProvider.java
+++ b/api/src/com/cloud/network/VirtualRouterProvider.java
@@ -21,10 +21,7 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface VirtualRouterProvider extends InternalIdentity, Identity {
public enum Type {
- VirtualRouter,
- ElasticLoadBalancerVm,
- VPCVirtualRouter,
- InternalLbVm
+ VirtualRouter, ElasticLoadBalancerVm, VPCVirtualRouter, InternalLbVm
}
public Type getType();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/VpcVirtualNetworkApplianceService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/VpcVirtualNetworkApplianceService.java b/api/src/com/cloud/network/VpcVirtualNetworkApplianceService.java
index 6e8fd38..eee62ce 100644
--- a/api/src/com/cloud/network/VpcVirtualNetworkApplianceService.java
+++ b/api/src/com/cloud/network/VpcVirtualNetworkApplianceService.java
@@ -21,7 +21,7 @@ import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.network.router.VirtualRouter;
-public interface VpcVirtualNetworkApplianceService extends VirtualNetworkApplianceService{
+public interface VpcVirtualNetworkApplianceService extends VirtualNetworkApplianceService {
/**
* @param router
@@ -32,8 +32,8 @@ public interface VpcVirtualNetworkApplianceService extends VirtualNetworkApplian
* @throws ResourceUnavailableException
* @throws InsufficientCapacityException
*/
- boolean addVpcRouterToGuestNetwork(VirtualRouter router, Network network, boolean isRedundant)
- throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
+ boolean addVpcRouterToGuestNetwork(VirtualRouter router, Network network, boolean isRedundant) throws ConcurrentOperationException, ResourceUnavailableException,
+ InsufficientCapacityException;
/**
* @param router
@@ -43,7 +43,6 @@ public interface VpcVirtualNetworkApplianceService extends VirtualNetworkApplian
* @throws ConcurrentOperationException
* @throws ResourceUnavailableException
*/
- boolean removeVpcRouterFromGuestNetwork(VirtualRouter router, Network network, boolean isRedundant)
- throws ConcurrentOperationException, ResourceUnavailableException;
+ boolean removeVpcRouterFromGuestNetwork(VirtualRouter router, Network network, boolean isRedundant) throws ConcurrentOperationException, ResourceUnavailableException;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/VpnUser.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/VpnUser.java b/api/src/com/cloud/network/VpnUser.java
index ad84e91..0caca59 100644
--- a/api/src/com/cloud/network/VpnUser.java
+++ b/api/src/com/cloud/network/VpnUser.java
@@ -22,9 +22,7 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface VpnUser extends ControlledEntity, InternalIdentity, Identity {
enum State {
- Add,
- Revoke,
- Active
+ Add, Revoke, Active
}
String getUsername();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/as/AutoScaleCounter.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/as/AutoScaleCounter.java b/api/src/com/cloud/network/as/AutoScaleCounter.java
index ca7b65a..5753972 100644
--- a/api/src/com/cloud/network/as/AutoScaleCounter.java
+++ b/api/src/com/cloud/network/as/AutoScaleCounter.java
@@ -50,8 +50,7 @@ public class AutoScaleCounter {
@SerializedName("description")
private String _description;
- public AutoScaleCounterParam(String name, Boolean required,
- String description, Boolean flag) {
+ public AutoScaleCounterParam(String name, Boolean required, String description, Boolean flag) {
this._paramName = name;
this._required = required;
this._description = description;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/as/AutoScaleVmGroup.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/as/AutoScaleVmGroup.java b/api/src/com/cloud/network/as/AutoScaleVmGroup.java
index faa166d..cc0a3da 100644
--- a/api/src/com/cloud/network/as/AutoScaleVmGroup.java
+++ b/api/src/com/cloud/network/as/AutoScaleVmGroup.java
@@ -20,7 +20,6 @@ package com.cloud.network.as;
import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.api.InternalIdentity;
-
public interface AutoScaleVmGroup extends ControlledEntity, InternalIdentity {
String State_New = "new";
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/as/Counter.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/as/Counter.java b/api/src/com/cloud/network/as/Counter.java
index 207ec57..46585f3 100644
--- a/api/src/com/cloud/network/as/Counter.java
+++ b/api/src/com/cloud/network/as/Counter.java
@@ -23,8 +23,7 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface Counter extends InternalIdentity, Identity {
public static enum Source {
- netscaler,
- snmp
+ netscaler, snmp
}
String getName();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/element/DhcpServiceProvider.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/element/DhcpServiceProvider.java b/api/src/com/cloud/network/element/DhcpServiceProvider.java
index 62c650b..2b91968 100644
--- a/api/src/com/cloud/network/element/DhcpServiceProvider.java
+++ b/api/src/com/cloud/network/element/DhcpServiceProvider.java
@@ -27,7 +27,11 @@ import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachineProfile;
public interface DhcpServiceProvider extends NetworkElement {
- boolean addDhcpEntry(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
- boolean configDhcpSupportForSubnet(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
- boolean removeDhcpSupportForSubnet(Network network) throws ResourceUnavailableException;
+ boolean addDhcpEntry(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
+ InsufficientCapacityException, ResourceUnavailableException;
+
+ boolean configDhcpSupportForSubnet(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
+ throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
+
+ boolean removeDhcpSupportForSubnet(Network network) throws ResourceUnavailableException;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/element/IpDeployer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/element/IpDeployer.java b/api/src/com/cloud/network/element/IpDeployer.java
index d356c3b..e7c8702 100644
--- a/api/src/com/cloud/network/element/IpDeployer.java
+++ b/api/src/com/cloud/network/element/IpDeployer.java
@@ -26,7 +26,7 @@ import com.cloud.network.Network.Service;
import com.cloud.network.PublicIpAddress;
import com.cloud.utils.component.Adapter;
-public interface IpDeployer extends Adapter{
+public interface IpDeployer extends Adapter {
/**
* Modify ip addresses on this network
* Depending on the State of the ip addresses the element should take
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/element/NetworkACLServiceProvider.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/element/NetworkACLServiceProvider.java b/api/src/com/cloud/network/element/NetworkACLServiceProvider.java
index dac0a25..ed1f496 100644
--- a/api/src/com/cloud/network/element/NetworkACLServiceProvider.java
+++ b/api/src/com/cloud/network/element/NetworkACLServiceProvider.java
@@ -23,7 +23,7 @@ import com.cloud.network.Network;
import com.cloud.network.rules.FirewallRule;
import com.cloud.network.vpc.NetworkACLItem;
-public interface NetworkACLServiceProvider extends NetworkElement{
+public interface NetworkACLServiceProvider extends NetworkElement {
/**
* @param config
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/element/NetworkElement.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/element/NetworkElement.java b/api/src/com/cloud/network/element/NetworkElement.java
index 5f603ce..5f68e80 100644
--- a/api/src/com/cloud/network/element/NetworkElement.java
+++ b/api/src/com/cloud/network/element/NetworkElement.java
@@ -56,8 +56,8 @@ public interface NetworkElement extends Adapter {
* @return true if network configuration is now usable; false if not; null if not handled by this element.
* @throws InsufficientNetworkCapacityException TODO
*/
- boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context)
- throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
+ boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
+ ResourceUnavailableException, InsufficientCapacityException;
/**
* Prepare for a nic to be added into this network.
@@ -71,9 +71,8 @@ public interface NetworkElement extends Adapter {
* @throws ResourceUnavailableException
* @throws InsufficientNetworkCapacityException
*/
- boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm,
- DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
- ResourceUnavailableException, InsufficientCapacityException;
+ boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
+ ResourceUnavailableException, InsufficientCapacityException;
/**
* A nic is released from this network.
@@ -85,8 +84,7 @@ public interface NetworkElement extends Adapter {
* @throws ConcurrentOperationException
* @throws ResourceUnavailableException
*/
- boolean release(Network network, NicProfile nic, VirtualMachineProfile vm,
- ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException;
+ boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException;
/**
* The network is being shutdown.
@@ -97,8 +95,7 @@ public interface NetworkElement extends Adapter {
* @throws ConcurrentOperationException
* @throws ResourceUnavailableException
*/
- boolean shutdown(Network network, ReservationContext context, boolean cleanup)
- throws ConcurrentOperationException, ResourceUnavailableException;
+ boolean shutdown(Network network, ReservationContext context, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException;
/**
* The network is being destroyed.
@@ -124,8 +121,7 @@ public interface NetworkElement extends Adapter {
* @throws ConcurrentOperationException
* @throws ResourceUnavailableException
*/
- boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context)
- throws ConcurrentOperationException, ResourceUnavailableException;
+ boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException;
/**
* This should return true if out of multiple services provided by this element, only some can be enabled. If all the services MUST be provided, this should return false.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/element/UserDataServiceProvider.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/element/UserDataServiceProvider.java b/api/src/com/cloud/network/element/UserDataServiceProvider.java
index 29cd5ae..eb80ede 100644
--- a/api/src/com/cloud/network/element/UserDataServiceProvider.java
+++ b/api/src/com/cloud/network/element/UserDataServiceProvider.java
@@ -27,8 +27,12 @@ import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachineProfile;
public interface UserDataServiceProvider extends NetworkElement {
- public boolean addPasswordAndUserdata(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
+ public boolean addPasswordAndUserdata(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
+ throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
+
boolean savePassword(Network network, NicProfile nic, VirtualMachineProfile vm) throws ResourceUnavailableException;
+
boolean saveUserData(Network network, NicProfile nic, VirtualMachineProfile vm) throws ResourceUnavailableException;
+
boolean saveSSHKey(Network network, NicProfile nic, VirtualMachineProfile vm, String SSHPublicKey) throws ResourceUnavailableException;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/element/VirtualRouterElementService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/element/VirtualRouterElementService.java b/api/src/com/cloud/network/element/VirtualRouterElementService.java
index b0db3d9..e929d14 100644
--- a/api/src/com/cloud/network/element/VirtualRouterElementService.java
+++ b/api/src/com/cloud/network/element/VirtualRouterElementService.java
@@ -25,9 +25,12 @@ import com.cloud.network.VirtualRouterProvider;
import com.cloud.network.VirtualRouterProvider.Type;
import com.cloud.utils.component.PluggableService;
-public interface VirtualRouterElementService extends PluggableService{
+public interface VirtualRouterElementService extends PluggableService {
VirtualRouterProvider configure(ConfigureVirtualRouterElementCmd cmd);
+
VirtualRouterProvider addElement(Long nspId, Type providerType);
+
VirtualRouterProvider getCreatedElement(long id);
+
List<? extends VirtualRouterProvider> searchForVirtualRouterElement(ListVirtualRouterElementsCmd cmd);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/element/VpcProvider.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/element/VpcProvider.java b/api/src/com/cloud/network/element/VpcProvider.java
index dc7b3bb..5165481 100644
--- a/api/src/com/cloud/network/element/VpcProvider.java
+++ b/api/src/com/cloud/network/element/VpcProvider.java
@@ -16,7 +16,6 @@
// under the License.
package com.cloud.network.element;
-
import java.util.List;
import com.cloud.deploy.DeployDestination;
@@ -30,14 +29,14 @@ import com.cloud.network.vpc.StaticRouteProfile;
import com.cloud.network.vpc.Vpc;
import com.cloud.vm.ReservationContext;
-public interface VpcProvider extends NetworkElement{
+public interface VpcProvider extends NetworkElement {
/**
* Start vpc element as specified
* @param vpc fully specified vpc configuration.
* @throws InsufficientNetworkCapacityException TODO
*/
- boolean implementVpc(Vpc vpc, DeployDestination dest, ReservationContext context)
- throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
+ boolean implementVpc(Vpc vpc, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException,
+ InsufficientCapacityException;
/**
* @param vpc
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/firewall/FirewallService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/firewall/FirewallService.java b/api/src/com/cloud/network/firewall/FirewallService.java
index 179e9f7..3413c4d 100644
--- a/api/src/com/cloud/network/firewall/FirewallService.java
+++ b/api/src/com/cloud/network/firewall/FirewallService.java
@@ -16,7 +16,6 @@
// under the License.
package com.cloud.network.firewall;
-
import java.util.List;
import org.apache.cloudstack.api.command.user.firewall.ListFirewallRulesCmd;
@@ -29,6 +28,7 @@ import com.cloud.utils.Pair;
public interface FirewallService {
FirewallRule createIngressFirewallRule(FirewallRule rule) throws NetworkRuleConflictException;
+
FirewallRule createEgressFirewallRule(FirewallRule rule) throws NetworkRuleConflictException;
Pair<List<? extends FirewallRule>, Integer> listFirewallRules(ListFirewallRulesCmd cmd);
@@ -42,8 +42,9 @@ public interface FirewallService {
*/
boolean revokeFirewallRule(long ruleId, boolean apply);
- boolean applyEgressFirewallRules (FirewallRule rule, Account caller) throws ResourceUnavailableException;
- boolean applyIngressFirewallRules(long Ipid , Account caller) throws ResourceUnavailableException;
+ boolean applyEgressFirewallRules(FirewallRule rule, Account caller) throws ResourceUnavailableException;
+
+ boolean applyIngressFirewallRules(long Ipid, Account caller) throws ResourceUnavailableException;
FirewallRule getFirewallRule(long ruleId);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/guru/NetworkGuru.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/guru/NetworkGuru.java b/api/src/com/cloud/network/guru/NetworkGuru.java
index 57ffef8..01e3995 100755
--- a/api/src/com/cloud/network/guru/NetworkGuru.java
+++ b/api/src/com/cloud/network/guru/NetworkGuru.java
@@ -126,7 +126,8 @@ public interface NetworkGuru extends Adapter {
* @throws InsufficientAddressCapacityException if there are not addresses
* to be assigned.
*/
- NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException;
+ NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException,
+ ConcurrentOperationException;
/**
* Once a guest network is implemented, then the virtual machine must
@@ -146,7 +147,8 @@ public interface NetworkGuru extends Adapter {
* @throws ConcurrentOperationException if there are multiple operations
* happening on this guest network or vm.
*/
- void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException;
+ void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapcityException,
+ InsufficientAddressCapacityException, ConcurrentOperationException;
/**
* When a virtual machine is stopped, the NetworkGuru is informed via the
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/lb/CertService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/lb/CertService.java b/api/src/com/cloud/network/lb/CertService.java
index 69d77d6..5342a7e 100644
--- a/api/src/com/cloud/network/lb/CertService.java
+++ b/api/src/com/cloud/network/lb/CertService.java
@@ -16,7 +16,6 @@
// under the License.
package com.cloud.network.lb;
-
import org.apache.cloudstack.api.command.user.loadbalancer.DeleteSslCertCmd;
import org.apache.cloudstack.api.command.user.loadbalancer.ListSslCertsCmd;
import org.apache.cloudstack.api.command.user.loadbalancer.UploadSslCertCmd;
@@ -27,6 +26,8 @@ import java.util.List;
public interface CertService {
public SslCertResponse uploadSslCert(UploadSslCertCmd certCmd);
+
public void deleteSslCert(DeleteSslCertCmd deleteSslCertCmd);
+
public List<SslCertResponse> listSslCerts(ListSslCertsCmd listSslCertCmd);
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/lb/LoadBalancingRule.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/lb/LoadBalancingRule.java b/api/src/com/cloud/network/lb/LoadBalancingRule.java
index 39c969c..b9d0cc2 100644
--- a/api/src/com/cloud/network/lb/LoadBalancingRule.java
+++ b/api/src/com/cloud/network/lb/LoadBalancingRule.java
@@ -39,8 +39,8 @@ public class LoadBalancingRule {
private LbSslCert sslCert;
private String lbProtocol;
- public LoadBalancingRule(LoadBalancer lb, List<LbDestination> destinations,
- List<LbStickinessPolicy> stickinessPolicies, List<LbHealthCheckPolicy> healthCheckPolicies, Ip sourceIp) {
+ public LoadBalancingRule(LoadBalancer lb, List<LbDestination> destinations, List<LbStickinessPolicy> stickinessPolicies, List<LbHealthCheckPolicy> healthCheckPolicies,
+ Ip sourceIp) {
this.lb = lb;
this.destinations = destinations;
this.stickinessPolicies = stickinessPolicies;
@@ -48,8 +48,8 @@ public class LoadBalancingRule {
this.sourceIp = sourceIp;
}
- public LoadBalancingRule(LoadBalancer lb, List<LbDestination> destinations,
- List<LbStickinessPolicy> stickinessPolicies, List<LbHealthCheckPolicy> healthCheckPolicies, Ip sourceIp, LbSslCert sslCert, String lbProtocol) {
+ public LoadBalancingRule(LoadBalancer lb, List<LbDestination> destinations, List<LbStickinessPolicy> stickinessPolicies, List<LbHealthCheckPolicy> healthCheckPolicies,
+ Ip sourceIp, LbSslCert sslCert, String lbProtocol) {
this.lb = lb;
this.destinations = destinations;
this.stickinessPolicies = stickinessPolicies;
@@ -119,7 +119,6 @@ public class LoadBalancingRule {
return lb.getNetworkId();
}
-
public void setDestinations(List<LbDestination> destinations) {
this.destinations = destinations;
}
@@ -140,7 +139,7 @@ public class LoadBalancingRule {
return healthCheckPolicies;
}
- public LbSslCert getLbSslCert(){
+ public LbSslCert getLbSslCert() {
return sslCert;
}
@@ -193,13 +192,11 @@ public class LoadBalancingRule {
private int unhealthThresshold;
private boolean _revoke;
- public LbHealthCheckPolicy(String pingpath, String description, int responseTime, int healthcheckInterval,
- int healthcheckThresshold, int unhealthThresshold) {
+ public LbHealthCheckPolicy(String pingpath, String description, int responseTime, int healthcheckInterval, int healthcheckThresshold, int unhealthThresshold) {
this(pingpath, description, responseTime, healthcheckInterval, healthcheckThresshold, unhealthThresshold, false);
}
- public LbHealthCheckPolicy(String pingpath, String description, int responseTime, int healthcheckInterval,
- int healthcheckThresshold, int unhealthThresshold, boolean revoke) {
+ public LbHealthCheckPolicy(String pingpath, String description, int responseTime, int healthcheckInterval, int healthcheckThresshold, int unhealthThresshold, boolean revoke) {
this.pingpath = pingpath;
this.description = description;
this.responseTime = responseTime;
@@ -349,9 +346,8 @@ public class LoadBalancingRule {
private final String networkId;
private final String vmName;
- public LbAutoScaleVmProfile(AutoScaleVmProfile profile, String autoScaleUserApiKey,
- String autoScaleUserSecretKey, String csUrl, String zoneId, String domainId, String serviceOfferingId,
- String templateId, String vmName, String networkId) {
+ public LbAutoScaleVmProfile(AutoScaleVmProfile profile, String autoScaleUserApiKey, String autoScaleUserSecretKey, String csUrl, String zoneId, String domainId,
+ String serviceOfferingId, String templateId, String vmName, String networkId) {
this.profile = profile;
this.autoScaleUserApiKey = autoScaleUserApiKey;
this.autoScaleUserSecretKey = autoScaleUserSecretKey;
@@ -411,8 +407,7 @@ public class LoadBalancingRule {
private final LbAutoScaleVmProfile profile;
private final String currentState;
- public LbAutoScaleVmGroup(AutoScaleVmGroup vmGroup, List<LbAutoScalePolicy> policies,
- LbAutoScaleVmProfile profile, String currentState) {
+ public LbAutoScaleVmGroup(AutoScaleVmGroup vmGroup, List<LbAutoScalePolicy> policies, LbAutoScaleVmProfile profile, String currentState) {
this.vmGroup = vmGroup;
this.policies = policies;
this.profile = profile;
@@ -439,11 +434,10 @@ public class LoadBalancingRule {
public static class LbSslCert {
private String cert;
private String key;
- private String password=null;
- private String chain=null;
+ private String password = null;
+ private String chain = null;
private boolean revoked;
-
public LbSslCert(String cert, String key, String password, String chain, boolean revoked) {
this.cert = cert;
this.key = key;
@@ -469,7 +463,7 @@ public class LoadBalancingRule {
return chain;
}
- public boolean isRevoked(){
+ public boolean isRevoked() {
return revoked;
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/lb/LoadBalancingRulesService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/lb/LoadBalancingRulesService.java b/api/src/com/cloud/network/lb/LoadBalancingRulesService.java
index 298426b..a48d79a 100644
--- a/api/src/com/cloud/network/lb/LoadBalancingRulesService.java
+++ b/api/src/com/cloud/network/lb/LoadBalancingRulesService.java
@@ -38,7 +38,6 @@ import com.cloud.uservm.UserVm;
import com.cloud.utils.Pair;
import com.cloud.utils.net.Ip;
-
public interface LoadBalancingRulesService {
/**
* Create a load balancer rule from the given ipAddress/port to the given private port
@@ -50,9 +49,9 @@ public interface LoadBalancingRulesService {
* @return the newly created LoadBalancerVO if successful, null otherwise
* @throws InsufficientAddressCapacityException
*/
- LoadBalancer createPublicLoadBalancerRule(String xId, String name, String description,
- int srcPortStart, int srcPortEnd, int defPortStart, int defPortEnd, Long ipAddrId, String protocol, String algorithm,
- long networkId, long lbOwnerId, boolean openFirewall, String lbProtocol) throws NetworkRuleConflictException, InsufficientAddressCapacityException;
+ LoadBalancer createPublicLoadBalancerRule(String xId, String name, String description, int srcPortStart, int srcPortEnd, int defPortStart, int defPortEnd, Long ipAddrId,
+ String protocol, String algorithm, long networkId, long lbOwnerId, boolean openFirewall, String lbProtocol) throws NetworkRuleConflictException,
+ InsufficientAddressCapacityException;
LoadBalancer updateLoadBalancerRule(UpdateLoadBalancerRuleCmd cmd);
@@ -86,7 +85,9 @@ public interface LoadBalancingRulesService {
* @thows NetworkRuleConflictException
*/
public HealthCheckPolicy createLBHealthCheckPolicy(CreateLBHealthCheckPolicyCmd cmd);
+
public boolean applyLBHealthCheckPolicy(CreateLBHealthCheckPolicyCmd cmd) throws ResourceUnavailableException;
+
boolean deleteLBHealthCheckPolicy(long healthCheckPolicyId, boolean apply);
/**
@@ -101,8 +102,8 @@ public interface LoadBalancingRulesService {
boolean applyLoadBalancerConfig(long lbRuleId) throws ResourceUnavailableException;
boolean assignCertToLoadBalancer(long lbRuleId, Long CertId);
- boolean removeCertFromLoadBalancer(long lbRuleId);
+ boolean removeCertFromLoadBalancer(long lbRuleId);
/**
* List instances that have either been applied to a load balancer or are eligible to be assigned to a load
@@ -145,7 +146,7 @@ public interface LoadBalancingRulesService {
List<? extends HealthCheckPolicy> searchForLBHealthCheckPolicies(ListLBHealthCheckPoliciesCmd cmd);
LoadBalancer findById(long LoadBalancer);
-
+
public void updateLBHealthChecks(Scheme scheme) throws ResourceUnavailableException;
Map<Ip, UserVm> getLbInstances(long lbId);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/lb/SslCert.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/lb/SslCert.java b/api/src/com/cloud/network/lb/SslCert.java
index 56555b6..98f96ce 100644
--- a/api/src/com/cloud/network/lb/SslCert.java
+++ b/api/src/com/cloud/network/lb/SslCert.java
@@ -16,7 +16,6 @@
// under the License.
package com.cloud.network.lb;
-
import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;
@@ -24,9 +23,13 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface SslCert extends InternalIdentity, Identity, ControlledEntity {
public String getCertificate();
- public String getKey() ;
+
+ public String getKey();
+
public String getChain();
+
public String getPassword();
+
public String getFingerPrint();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/router/VirtualRouter.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/router/VirtualRouter.java b/api/src/com/cloud/network/router/VirtualRouter.java
index a875218..0114a96 100755
--- a/api/src/com/cloud/network/router/VirtualRouter.java
+++ b/api/src/com/cloud/network/router/VirtualRouter.java
@@ -23,23 +23,29 @@ import com.cloud.vm.VirtualMachine;
*/
public interface VirtualRouter extends VirtualMachine {
public enum Role {
- VIRTUAL_ROUTER, LB, INTERNAL_LB_VM
- }
+ VIRTUAL_ROUTER, LB, INTERNAL_LB_VM
+ }
+
Role getRole();
+
boolean getIsRedundantRouter();
+
public enum RedundantState {
- UNKNOWN,
- MASTER,
- BACKUP,
- FAULT
+ UNKNOWN, MASTER, BACKUP, FAULT
}
+
RedundantState getRedundantState();
+
String getPublicIpAddress();
+
boolean isStopPending();
+
void setStopPending(boolean stopPending);
+
/**
* @return
*/
Long getVpcId();
+
String getTemplateVersion();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/rules/FirewallRule.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/rules/FirewallRule.java b/api/src/com/cloud/network/rules/FirewallRule.java
index 042665c..4cfa42b 100644
--- a/api/src/com/cloud/network/rules/FirewallRule.java
+++ b/api/src/com/cloud/network/rules/FirewallRule.java
@@ -24,12 +24,7 @@ import org.apache.cloudstack.api.InternalIdentity;
public interface FirewallRule extends ControlledEntity, Identity, InternalIdentity {
enum Purpose {
- Firewall,
- PortForwarding,
- LoadBalancing,
- Vpn,
- StaticNat,
- NetworkACL,
+ Firewall, PortForwarding, LoadBalancing, Vpn, StaticNat, NetworkACL,
}
enum FirewallRuleType {
@@ -45,8 +40,7 @@ public interface FirewallRule extends ControlledEntity, Identity, InternalIdenti
}
enum TrafficType {
- Ingress,
- Egress
+ Ingress, Egress
}
/**
@@ -85,7 +79,7 @@ public interface FirewallRule extends ControlledEntity, Identity, InternalIdenti
Long getRelated();
- FirewallRuleType getType();
+ FirewallRuleType getType();
/**
* @return
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/rules/LbStickinessMethod.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/rules/LbStickinessMethod.java b/api/src/com/cloud/network/rules/LbStickinessMethod.java
index 1e5a55e..56a0622 100644
--- a/api/src/com/cloud/network/rules/LbStickinessMethod.java
+++ b/api/src/com/cloud/network/rules/LbStickinessMethod.java
@@ -21,7 +21,6 @@ import java.util.List;
import com.google.gson.annotations.SerializedName;
-
public class LbStickinessMethod {
public static class StickinessMethodType {
private String _name;
@@ -29,6 +28,7 @@ public class LbStickinessMethod {
public static final StickinessMethodType LBCookieBased = new StickinessMethodType("LbCookie");
public static final StickinessMethodType AppCookieBased = new StickinessMethodType("AppCookie");
public static final StickinessMethodType SourceBased = new StickinessMethodType("SourceBased");
+
public StickinessMethodType(String name) {
_name = name;
}
@@ -51,8 +51,7 @@ public class LbStickinessMethod {
@SerializedName("description")
private String _description;
- public LbStickinessMethodParam(String name, Boolean required,
- String description,Boolean flag) {
+ public LbStickinessMethodParam(String name, Boolean required, String description, Boolean flag) {
this._paramName = name;
this._required = required;
this._description = description;
@@ -110,8 +109,8 @@ public class LbStickinessMethod {
public void addParam(String name, Boolean required, String description, Boolean isFlag) {
/* FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */
- // LbStickinessMethodParam param = new LbStickinessMethodParam(name, required, description);
- LbStickinessMethodParam param = new LbStickinessMethodParam(name,required, " ",isFlag);
+ // LbStickinessMethodParam param = new LbStickinessMethodParam(name, required, description);
+ LbStickinessMethodParam param = new LbStickinessMethodParam(name, required, " ", isFlag);
_paramList.add(param);
return;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/rules/LoadBalancer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/rules/LoadBalancer.java b/api/src/com/cloud/network/rules/LoadBalancer.java
index c260b81..ea7538d 100644
--- a/api/src/com/cloud/network/rules/LoadBalancer.java
+++ b/api/src/com/cloud/network/rules/LoadBalancer.java
@@ -20,10 +20,9 @@ package com.cloud.network.rules;
* Definition for a LoadBalancer
*/
public interface LoadBalancer extends FirewallRule, LoadBalancerContainer {
-
+
int getDefaultPortStart();
int getDefaultPortEnd();
-
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/rules/LoadBalancerContainer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/rules/LoadBalancerContainer.java b/api/src/com/cloud/network/rules/LoadBalancerContainer.java
index c75d0cc..71040f8 100644
--- a/api/src/com/cloud/network/rules/LoadBalancerContainer.java
+++ b/api/src/com/cloud/network/rules/LoadBalancerContainer.java
@@ -17,7 +17,7 @@
package com.cloud.network.rules;
public interface LoadBalancerContainer {
-
+
public enum Scheme {
Public, Internal;
}
@@ -25,11 +25,11 @@ public interface LoadBalancerContainer {
String getName();
String getDescription();
-
+
String getAlgorithm();
String getLbProtocol();
-
+
Scheme getScheme();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/rules/PortForwardingRule.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/rules/PortForwardingRule.java b/api/src/com/cloud/network/rules/PortForwardingRule.java
index c353e9b..c61f1f3 100644
--- a/api/src/com/cloud/network/rules/PortForwardingRule.java
+++ b/api/src/com/cloud/network/rules/PortForwardingRule.java
@@ -27,7 +27,6 @@ public interface PortForwardingRule extends FirewallRule {
*/
Ip getDestinationIpAddress();
-
/**
* updates the destination ip address.
*/
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/com/cloud/network/rules/RulesService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/rules/RulesService.java b/api/src/com/cloud/network/rules/RulesService.java
index 2a2074b..d073672 100644
--- a/api/src/com/cloud/network/rules/RulesService.java
+++ b/api/src/com/cloud/network/rules/RulesService.java
@@ -28,7 +28,8 @@ import com.cloud.utils.Pair;
import com.cloud.utils.net.Ip;
public interface RulesService {
- Pair<List<? extends FirewallRule>, Integer> searchStaticNatRules(Long ipId, Long id, Long vmId, Long start, Long size, String accountName, Long domainId, Long projectId, boolean isRecursive, boolean listAll);
+ Pair<List<? extends FirewallRule>, Integer> searchStaticNatRules(Long ipId, Long id, Long vmId, Long start, Long size, String accountName, Long domainId, Long projectId,
+ boolean isRecursive, boolean listAll);
/**
* Creates a port forwarding rule between two ip addresses or between