Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,36 +108,22 @@ public interface ConfigurationService {
/**
* Updates a service offering
*
* @param serviceOfferingId
* @param userId
* @param name
* @param displayText
* @param offerHA
* @param useVirtualNetwork
* @param tags
* @return updated service offering
*/
ServiceOffering updateServiceOffering(UpdateServiceOfferingCmd cmd);

/**
* Deletes a service offering
*
* @param userId
* @param serviceOfferingId
*/
boolean deleteServiceOffering(DeleteServiceOfferingCmd cmd);

/**
* Retrieve ID of domains for a service offering
*
* @param serviceOfferingId
*/
List<Long> getServiceOfferingDomains(Long serviceOfferingId);

/**
* Retrieve ID of domains for a service offering
*
* @param serviceOfferingId
*/
List<Long> getServiceOfferingZones(Long serviceOfferingId);

Expand All @@ -147,7 +133,6 @@ public interface ConfigurationService {
* @param cmd
* - the command specifying diskOfferingId, name, description, tags
* @return updated disk offering
* @throws
*/
DiskOffering updateDiskOffering(UpdateDiskOfferingCmd cmd);

Expand All @@ -157,34 +142,22 @@ public interface ConfigurationService {
* @param cmd
* - the command specifying disk offering id
* @return true or false
* @throws
*/
boolean deleteDiskOffering(DeleteDiskOfferingCmd cmd);

/**
* Creates a new disk offering
*
* @param domainId
* @param name
* @param description
* @param numGibibytes
* @param mirrored
* @param size
* @return ID
*/
DiskOffering createDiskOffering(CreateDiskOfferingCmd cmd);

/**
* Retrieve ID of domains for a disk offering
*
* @param diskOfferingId
*/
List<Long> getDiskOfferingDomains(Long diskOfferingId);

/**
* Retrieve ID of domains for a disk offering
*
* @param diskOfferingId
*/
List<Long> getDiskOfferingZones(Long diskOfferingId);

Expand All @@ -207,8 +180,6 @@ public interface ConfigurationService {
* TODO
* @param storageAccessGroups
* @return the new pod if successful, null otherwise
* @throws
* @throws
*/
Pod createPod(long zoneId, String name, String startIp, String endIp, String gateway, String netmask, String allocationState, List<String> storageAccessGroups);

Expand All @@ -228,8 +199,7 @@ public interface ConfigurationService {
/**
* Updates a mutually exclusive IP range in the pod.
* @param cmd - The command specifying pod ID, current Start IP, current End IP, new Start IP, new End IP.
* @throws com.cloud.exception.ConcurrentOperationException
* @return Success
* @throws com.cloud.exception.ConcurrentOperationException when this pod is already being accessed
*/
void updatePodIpRange(UpdatePodManagementNetworkIpRangeCmd cmd) throws ConcurrentOperationException;

Expand All @@ -250,9 +220,6 @@ public interface ConfigurationService {

/**
* Edits a pod in the database. Will not allow you to edit pods that are being used anywhere in the system.
*
* @param UpdatePodCmd
* api command
*/
Pod editPod(UpdatePodCmd cmd);

Expand All @@ -262,17 +229,12 @@ public interface ConfigurationService {
* @param cmd
* - the command containing podId
* @return true or false
* @throws ,
*/
boolean deletePod(DeletePodCmd cmd);

/**
* Creates a new zone
*
* @param cmd
* @return the zone if successful, null otherwise
* @throws
* @throws
*/
DataCenter createZone(CreateZoneCmd cmd);

Expand All @@ -295,22 +257,7 @@ public interface ConfigurationService {
* Adds a VLAN to the database, along with an IP address range. Can add three types of VLANs: (1) zone-wide VLANs on
* the
* virtual public network (2) pod-wide direct attached VLANs (3) account-specific direct attached VLANs
*
* @param userId
* @param vlanType
* - either "DomR" (VLAN for a virtual public network) or "DirectAttached" (VLAN for IPs that will be
* directly
* attached to UserVMs)
* @param zoneId
* @param accountId
* @param podId
* @param add
* @param vlanId
* @param gateway
* @param startIP
* @param endIP
* @throws ResourceAllocationException TODO
* @throws
* @return The new Vlan object
*/
Vlan createVlanAndPublicIpRange(CreateVlanIpRangeCmd cmd) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException,
Expand All @@ -325,9 +272,6 @@ Vlan updateVlanAndPublicIpRange(UpdateVlanIpRangeCmd cmd) throws ConcurrentOpera
/**
* Marks the account with the default zone-id.
*
* @param accountName
* @param domainId
* @param defaultZoneId
* @return The new account object
*/
Account markDefaultZone(String accountName, long domainId, long defaultZoneId);
Expand All @@ -349,14 +293,12 @@ Vlan updateVlanAndPublicIpRange(UpdateVlanIpRangeCmd cmd) throws ConcurrentOpera
/**
* Retrieve ID of domains for a network offering
*
* @param networkOfferingId
*/
List<Long> getNetworkOfferingDomains(Long networkOfferingId);

/**
* Retrieve ID of domains for a network offering
*
* @param networkOfferingId
*/
List<Long> getNetworkOfferingZones(Long networkOfferingId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public interface RouterHealthCheckResult {

String getCheckType();

boolean getCheckResult();
VirtualNetworkApplianceService.RouterHealthStatus getCheckResult();

Date getLastUpdateTime();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,8 @@ void startRouterForHA(VirtualMachine vm, Map<VirtualMachineProfile.Param, Object
Pair<Boolean, String> performRouterHealthChecks(long routerId);

<T extends VirtualRouter> void collectNetworkStatistics(T router, Nic nic);

enum RouterHealthStatus{
SUCCESS, FAILED, WARNING, UNKNOWN;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,23 @@
public interface LoadBalancingRulesService {
/**
* Create a load balancer rule from the given ipAddress/port to the given private port
* @param xId an existing UUID for this rule (for instance a device generated one)
* @param name
* @param description
* @param srcPortStart
* @param srcPortEnd
* @param defPortStart
* @param defPortEnd
* @param ipAddrId
* @param protocol
* @param algorithm
* @param networkId
* @param lbOwnerId
* @param openFirewall
* TODO
* @param forDisplay TODO
* @param cmd
* the command specifying the ip address, public port, protocol, private port, and algorithm
*
* @param lbProtocol
* @param forDisplay
* @return the newly created LoadBalancerVO if successful, null otherwise
* @throws NetworkRuleConflictException
* @throws InsufficientAddressCapacityException
*/
LoadBalancer createPublicLoadBalancerRule(String xId, String name, String description, int srcPortStart, int srcPortEnd, int defPortStart, int defPortEnd,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import java.util.Date;

import com.cloud.network.VirtualNetworkApplianceService.RouterHealthStatus;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;

Expand All @@ -36,7 +37,7 @@ public class RouterHealthCheckResultResponse extends BaseResponse {

@SerializedName(ApiConstants.SUCCESS)
@Param(description = "result of the health check")
private boolean result;
private RouterHealthStatus result;

@SerializedName(ApiConstants.LAST_UPDATED)
@Param(description = "the date this VPC was created")
Expand All @@ -54,7 +55,7 @@ public String getCheckType() {
return checkType;
}

public boolean getResult() {
public RouterHealthStatus getResult() {
return result;
}

Expand All @@ -74,7 +75,7 @@ public void setCheckType(String checkType) {
this.checkType = checkType;
}

public void setResult(boolean result) {
public void setResult(RouterHealthStatus result) {
this.result = result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,44 +76,52 @@ public interface NetworkOrchestrationService {
*/
Long RVRHandoverTime = 10000L;

ConfigKey<String> MinVRVersion = new ConfigKey<String>(String.class, MinVRVersionCK, "Advanced", "4.10.0",
ConfigKey<String> MinVRVersion = new ConfigKey<>(String.class, MinVRVersionCK, "Advanced", "4.10.0",
"What version should the Virtual Routers report", true, ConfigKey.Scope.Zone, null);

ConfigKey<Integer> NetworkLockTimeout = new ConfigKey<Integer>(Integer.class, NetworkLockTimeoutCK, "Network", "600",
"Lock wait timeout (seconds) while implementing network", true, Scope.Global, null);
ConfigKey<Integer> NetworkLockTimeout = new ConfigKey<>(Integer.class, NetworkLockTimeoutCK, "Network", "600",
"Lock wait timeout (seconds) while implementing network", true, Scope.Global, null);

ConfigKey<String> DeniedRoutes = new ConfigKey<String>(String.class, "denied.routes", "Network", "",
ConfigKey<String> DeniedRoutes = new ConfigKey<>(String.class, "denied.routes", "Network", "",
"Routes that are denied, can not be used for Static Routes creation for the VPC Private Gateway", true, ConfigKey.Scope.Zone, null);

ConfigKey<String> GuestDomainSuffix = new ConfigKey<String>(String.class, GuestDomainSuffixCK, "Network", "cloud.internal",
"Default domain name for vms inside virtualized networks fronted by router", true, ConfigKey.Scope.Zone, null);
ConfigKey<String> GuestDomainSuffix = new ConfigKey<>(String.class, GuestDomainSuffixCK, "Network", "cloud.internal",
"Default domain name for vms inside virtualized networks fronted by router", true, ConfigKey.Scope.Zone, null);

ConfigKey<Integer> NetworkThrottlingRate = new ConfigKey<Integer>("Network", Integer.class, NetworkThrottlingRateCK, "200",
"Default data transfer rate in megabits per second allowed in network.", true, ConfigKey.Scope.Zone);
ConfigKey<Integer> NetworkThrottlingRate = new ConfigKey<>("Network", Integer.class, NetworkThrottlingRateCK, "200",
"Default data transfer rate in megabits per second allowed in network.", true, ConfigKey.Scope.Zone);

ConfigKey<Boolean> PromiscuousMode = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.promiscuous.mode", "false",
ConfigKey<Boolean> PromiscuousMode = new ConfigKey<>("Advanced", Boolean.class, "network.promiscuous.mode", "false",
"Whether to allow or deny promiscuous mode on nics for applicable network elements such as for vswitch/dvswitch portgroups.", true);

ConfigKey<Boolean> MacAddressChanges = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.mac.address.changes", "true",
ConfigKey<Boolean> MacAddressChanges = new ConfigKey<>("Advanced", Boolean.class, "network.mac.address.changes", "true",
"Whether to allow or deny mac address changes on nics for applicable network elements such as for vswitch/dvswitch porgroups.", true);

ConfigKey<Boolean> ForgedTransmits = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.forged.transmits", "true",
ConfigKey<Boolean> ForgedTransmits = new ConfigKey<>("Advanced", Boolean.class, "network.forged.transmits", "true",
"Whether to allow or deny forged transmits on nics for applicable network elements such as for vswitch/dvswitch portgroups.", true);

ConfigKey<Boolean> MacLearning = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.mac.learning", "false",
ConfigKey<Boolean> MacLearning = new ConfigKey<>("Advanced", Boolean.class, "network.mac.learning", "false",
"Whether to allow or deny MAC learning on nics for applicable network elements such as for dvswitch portgroups.", true);

ConfigKey<Boolean> RollingRestartEnabled = new ConfigKey<Boolean>("Advanced", Boolean.class, "network.rolling.restart", "true",
ConfigKey<Boolean> RollingRestartEnabled = new ConfigKey<>("Advanced", Boolean.class, "network.rolling.restart", "true",
"Whether to allow or deny rolling restart of network routers.", true);

static final ConfigKey<Boolean> TUNGSTEN_ENABLED = new ConfigKey<>(Boolean.class, "tungsten.plugin.enable", "Advanced", "false",
ConfigKey<Boolean> TUNGSTEN_ENABLED = new ConfigKey<>(Boolean.class, "tungsten.plugin.enable", "Advanced", "false",
"Indicates whether to enable the Tungsten plugin", false, ConfigKey.Scope.Zone, null);

static final ConfigKey<Boolean> NSX_ENABLED = new ConfigKey<>(Boolean.class, "nsx.plugin.enable", "Advanced", "false",
ConfigKey<Boolean> NSX_ENABLED = new ConfigKey<>(Boolean.class, "nsx.plugin.enable", "Advanced", "false",
"Indicates whether to enable the NSX plugin", false, ConfigKey.Scope.Zone, null);

ConfigKey<Boolean> NETRIS_ENABLED = new ConfigKey<>(Boolean.class, "netris.plugin.enable", "Advanced", "false",
"Indicates whether to enable the Netris plugin", false, ConfigKey.Scope.Zone, null);
ConfigKey<Integer> NETWORK_LB_HAPROXY_MAX_CONN = new ConfigKey<>(
"Network",
Integer.class,
"network.loadbalancer.haproxy.max.conn",
"4096",
"Load Balancer(haproxy) maximum number of concurrent connections(global max)",
true,
Scope.Global);

List<? extends Network> setupNetwork(Account owner, NetworkOffering offering, DeploymentPlan plan, String name, String displayText, boolean isDefault)
throws ConcurrentOperationException;
Expand All @@ -129,7 +137,7 @@ void allocate(VirtualMachineProfile vm, LinkedHashMap<? extends Network, List<?
* configures the provided dhcp options on the given nic.
* @param network of the nic
* @param nicId
* @param extraDhcpOptions
* @param extraDhcpOptions a map of rank:value pairs
*/
void configureExtraDhcpOptions(Network network, long nicId, Map<Integer, String> extraDhcpOptions);

Expand Down Expand Up @@ -158,16 +166,15 @@ void prepare(VirtualMachineProfile profile, DeployDestination dest, ReservationC
Pair<? extends NetworkGuru, ? extends Network> implementNetwork(long networkId, DeployDestination dest, ReservationContext context)
throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;

Map<Integer, String> getExtraDhcpOptions(long nicId);

/**
* Returns all extra dhcp options which are set on the provided nic
* @param nicId
* @return map which maps the dhcp value on it's option code
*/
Map<Integer, String> getExtraDhcpOptions(long nicId);

/**
* prepares vm nic change for migration
*
* This method will be called in migration transaction before the vm migration.
* @param vm
* @param dest
Expand All @@ -176,7 +183,6 @@ void prepare(VirtualMachineProfile profile, DeployDestination dest, ReservationC

/**
* commit vm nic change for migration
*
* This method will be called in migration transaction after the successful
* vm migration.
* @param src
Expand All @@ -186,7 +192,6 @@ void prepare(VirtualMachineProfile profile, DeployDestination dest, ReservationC

/**
* rollback vm nic change for migration
*
* This method will be called in migaration transaction after vm migration
* failure.
* @param src
Expand Down Expand Up @@ -266,7 +271,7 @@ NicProfile prepareNic(VirtualMachineProfile vmProfile, DeployDestination dest, R
void releaseNic(VirtualMachineProfile vmProfile, Nic nic) throws ConcurrentOperationException, ResourceUnavailableException;

NicProfile createNicForVm(Network network, NicProfile requested, ReservationContext context, VirtualMachineProfile vmProfile, boolean prepare)
throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
throws ConcurrentOperationException, InsufficientCapacityException,
ResourceUnavailableException;

NetworkProfile convertNetworkToNetworkProfile(long networkId);
Expand All @@ -277,7 +282,7 @@ boolean restartNetwork(Long networkId, Account callerAccount, User callerUser, b
boolean shutdownNetworkElementsAndResources(ReservationContext context, boolean b, Network network);

void implementNetworkElementsAndResources(DeployDestination dest, ReservationContext context, Network network, NetworkOffering findById)
throws ConcurrentOperationException, InsufficientAddressCapacityException, ResourceUnavailableException, InsufficientCapacityException;
throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;

Map<String, String> finalizeServicesAndProvidersForNetwork(NetworkOffering offering, Long physicalNetworkId);

Expand Down
Loading
Loading