Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
18 changes: 1 addition & 17 deletions api/src/main/java/com/cloud/agent/api/to/IpAddressTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ public class IpAddressTO {
private boolean newNic;
private boolean isPrivateGateway;
private NicTO nicTO;

private Integer mtu;
Map<String, String> details;

public IpAddressTO(long accountId, String ipAddress, boolean add, boolean firstIP, boolean sourceNat, String broadcastUri, String vlanGateway, String vlanNetmask,
String vifMacAddress, Integer networkRate, boolean isOneToOneNat) {
String vifMacAddress, Integer networkRate, boolean isOneToOneNat) {
this.accountId = accountId;
this.publicIp = ipAddress;
this.add = add;
Expand All @@ -58,12 +56,6 @@ public IpAddressTO(long accountId, String ipAddress, boolean add, boolean firstI
this.oneToOneNat = isOneToOneNat;
}

public IpAddressTO(String ipAddress, Integer mtu, String vlanNetmask ) {
this.publicIp = ipAddress;
this.mtu = mtu;
this.vlanNetmask = vlanNetmask;
}

protected IpAddressTO() {
}

Expand Down Expand Up @@ -163,14 +155,6 @@ public void setNicTO(NicTO nicTO) {
this.nicTO = nicTO;
}

public Integer getMtu() {
return mtu;
}

public void setMtu(Integer mtu) {
this.mtu = mtu;
}


public Map<String, String> getDetails() {
return details;
Expand Down
9 changes: 0 additions & 9 deletions api/src/main/java/com/cloud/agent/api/to/NicTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public class NicTO extends NetworkTO {
List<String> nicSecIps;
Map<NetworkOffering.Detail, String> details;
boolean dpdkEnabled;
Integer mtu;

public NicTO() {
super();
Expand Down Expand Up @@ -119,12 +118,4 @@ public boolean isDpdkEnabled() {
public void setDpdkEnabled(boolean dpdkEnabled) {
this.dpdkEnabled = dpdkEnabled;
}

public Integer getMtu() {
return mtu;
}

public void setMtu(Integer mtu) {
this.mtu = mtu;
}
}
4 changes: 0 additions & 4 deletions api/src/main/java/com/cloud/network/Network.java
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,4 @@ public void setIp6Address(String ip6Address) {
String getIp6Dns2();

Date getCreated();

Integer getPublicMtu();

Integer getPrivateMtu();
}
12 changes: 0 additions & 12 deletions api/src/main/java/com/cloud/network/NetworkProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.Networks.Mode;
import com.cloud.network.Networks.TrafficType;
import org.apache.log4j.Logger;

public class NetworkProfile implements Network {
static final Logger s_logger = Logger.getLogger(NetworkProfile.class);
private final long id;
private final String uuid;
private final long dataCenterId;
Expand Down Expand Up @@ -359,14 +357,4 @@ public Date getCreated() {
return null;
}

@Override
public Integer getPublicMtu() {
return null;
}

@Override
public Integer getPrivateMtu() {
return null;
}

}
16 changes: 0 additions & 16 deletions api/src/main/java/com/cloud/network/NetworkService.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.apache.cloudstack.api.command.user.network.UpdateNetworkCmd;
import org.apache.cloudstack.api.command.user.vm.ListNicsCmd;
import org.apache.cloudstack.api.response.AcquirePodIpCmdResponse;
import org.apache.cloudstack.framework.config.ConfigKey;

import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientAddressCapacityException;
Expand All @@ -60,21 +59,6 @@
*/
public interface NetworkService {

public static final Integer DEFAULT_MTU = 1500;
public static final Integer MINIMUM_MTU = 68;

public static final ConfigKey<Integer> VRPublicInterfaceMtu = new ConfigKey<>("VirtualRouter", Integer.class,
"vr.public.interface.max.mtu", "1500", "The maximum value the MTU can have on the VR's public interfaces",
true, ConfigKey.Scope.Zone);

public static final ConfigKey<Integer> VRPrivateInterfaceMtu = new ConfigKey<>("VirtualRouter", Integer.class,
"vr.private.interface.max.mtu", "1500", "The maximum value the MTU can have on the VR's private interfaces",
true, ConfigKey.Scope.Zone);

public static final ConfigKey<Boolean> AllowUsersToSpecifyVRMtu = new ConfigKey<>("Advanced", Boolean.class,
"allow.end.users.to.specify.vr.mtu", "false", "Allow end users to specify VR MTU",
true, ConfigKey.Scope.Zone);

List<? extends Network> getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner);

IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId, Boolean displayIp, String ipaddress) throws ResourceAllocationException, InsufficientAddressCapacityException,
Expand Down
2 changes: 0 additions & 2 deletions api/src/main/java/com/cloud/network/vpc/Vpc.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ public enum State {

Date getCreated();

Integer getPublicMtu();

String getIp4Dns1();

String getIp4Dns2();
Expand Down
9 changes: 4 additions & 5 deletions api/src/main/java/com/cloud/network/vpc/VpcService.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public interface VpcService {
* @throws ResourceAllocationException TODO
*/
public Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName, String displayText, String cidr, String networkDomain,
String dns1, String dns2, String ip6Dns1, String ip6Dns2, Boolean displayVpc, Integer publicMtu)
String dns1, String dns2, String ip6Dns1, String ip6Dns2, Boolean displayVpc)
throws ResourceAllocationException;

/**
Expand All @@ -73,12 +73,11 @@ public Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName
* @param vpcId
* @param vpcName
* @param displayText
* @param customId TODO
* @param displayVpc TODO
* @param mtu
* @param customId TODO
* @param displayVpc TODO
* @return
*/
public Vpc updateVpc(long vpcId, String vpcName, String displayText, String customId, Boolean displayVpc, Integer mtu);
public Vpc updateVpc(long vpcId, String vpcName, String displayText, String customId, Boolean displayVpc);

/**
* Lists VPC(s) based on the parameters passed to the method call
Expand Down
2 changes: 0 additions & 2 deletions api/src/main/java/com/cloud/vm/Nic.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,4 @@ public enum ReservationStrategy {
String getIPv6Cidr();

String getIPv6Address();

Integer getMtu();
}
11 changes: 0 additions & 11 deletions api/src/main/java/com/cloud/vm/NicProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public class NicProfile implements InternalIdentity, Serializable {
String iPv6Dns1;
String iPv6Dns2;
String requestedIPv6;
Integer mtu;

//
// CONSTRUCTORS
Expand Down Expand Up @@ -397,15 +396,6 @@ public void setOrderIndex(Integer orderIndex) {
this.orderIndex = orderIndex;
}

public Integer getMtu() {
return mtu;
}

public void setMtu(Integer mtu) {
this.mtu = mtu;
}


//
// OTHER METHODS
//
Expand Down Expand Up @@ -436,7 +426,6 @@ public void deallocate() {
isolationUri = null;

orderIndex = null;
mtu = null;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ private AlertType(short type, String name, boolean isDefault) {
public static final AlertType ALERT_TYPE_HA_ACTION = new AlertType((short)30, "ALERT.HA.ACTION", true);
public static final AlertType ALERT_TYPE_CA_CERT = new AlertType((short)31, "ALERT.CA.CERT", true);
public static final AlertType ALERT_TYPE_VM_SNAPSHOT = new AlertType((short)32, "ALERT.VM.SNAPSHOT", true);
public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PUBLIC.IFACE.MTU", true);
public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PRIVATE.IFACE.MTU", true);

public short getType() {
return type;
Expand Down
7 changes: 0 additions & 7 deletions api/src/main/java/org/apache/cloudstack/api/ApiConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,6 @@ public class ApiConstants {
public static final String RESTART_REQUIRED = "restartrequired";
public static final String ALLOW_USER_CREATE_PROJECTS = "allowusercreateprojects";
public static final String ALLOW_USER_DRIVEN_BACKUPS = "allowuserdrivenbackups";
public static final String ALLOW_USER_SPECIFY_VR_MTU = "allowuserspecifyvrmtu";
public static final String CONSERVE_MODE = "conservemode";
public static final String TRAFFIC_TYPE_IMPLEMENTOR = "traffictypeimplementor";
public static final String KEYWORD = "keyword";
Expand Down Expand Up @@ -883,8 +882,6 @@ public class ApiConstants {
public static final String ROUTER_CHECK_TYPE = "checktype";
public static final String ROUTER_IP = "routerip";
public static final String ROUTER_IPV6 = "routeripv6";
public static final String ROUTER_PRIVATE_INTERFACE_MAX_MTU = "routerprivateinterfacemaxmtu";
public static final String ROUTER_PUBLIC_INTERFACE_MAX_MTU = "routerpublicinterfacemaxmtu";
public static final String LAST_UPDATED = "lastupdated";
public static final String PERFORM_FRESH_CHECKS = "performfreshchecks";
public static final String CACHE_MODE = "cachemode";
Expand Down Expand Up @@ -923,17 +920,13 @@ public class ApiConstants {
public static final String DYNAMIC_SCALING_ENABLED = "dynamicscalingenabled";

public static final String POOL_TYPE = "pooltype";
public static final String REDUNDANT_STATE = "redundantstate";

public static final String ADMINS_ONLY = "adminsonly";
public static final String ANNOTATION_FILTER = "annotationfilter";
public static final String LOGIN = "login";
public static final String LOGOUT = "logout";
public static final String LIST_IDPS = "listIdps";

public static final String PUBLIC_MTU = "publicmtu";
public static final String PRIVATE_MTU = "privatemtu";
public static final String MTU = "mtu";
public enum BootType {
UEFI, BIOS;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
// under the License.
package org.apache.cloudstack.api.command.user.network;

import com.cloud.network.NetworkService;
import org.apache.log4j.Logger;

import org.apache.cloudstack.acl.RoleType;
Expand Down Expand Up @@ -158,14 +157,6 @@ public class CreateNetworkCmd extends BaseCmd implements UserCmd {
description = "The network this network is associated to. only available if create a Shared network")
private Long associatedNetworkId;

@Parameter(name = ApiConstants.PUBLIC_MTU, type = CommandType.INTEGER,
description = "MTU to be configured on the network VR's public facing interfaces", since = "4.18.0")
private Integer publicMtu;

@Parameter(name = ApiConstants.PRIVATE_MTU, type = CommandType.INTEGER,
description = "MTU to be configured on the network VR's private interface(s)", since = "4.18.0")
private Integer privateMtu;

@Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, description = "the first IPv4 DNS for the network", since = "4.18.0")
private String ip4Dns1;

Expand Down Expand Up @@ -347,13 +338,6 @@ public Long getAclId() {
return aclId;
}

public Integer getPublicMtu() {
return publicMtu != null ? publicMtu : NetworkService.DEFAULT_MTU;
}

public Integer getPrivateMtu() {
return privateMtu != null ? privateMtu : NetworkService.DEFAULT_MTU;
}
public String getIp4Dns1() {
return ip4Dns1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,12 @@ public class UpdateNetworkCmd extends BaseAsyncCustomIdCmd implements UserCmd {

@Parameter(name = ApiConstants.DISPLAY_NETWORK,
type = CommandType.BOOLEAN,
description = "an optional field, whether to the display the network to the end user or not.", authorized = {RoleType.Admin})
description = "an optional field, whether to the display the network to the end user or not.", authorized = {RoleType.Admin})
private Boolean displayNetwork;

@Parameter(name= ApiConstants.FORCED, type = CommandType.BOOLEAN, description = "Setting this to true will cause a forced network update,", authorized = {RoleType.Admin})
private Boolean forced;

@Parameter(name = ApiConstants.PUBLIC_MTU, type = CommandType.INTEGER,
description = "MTU to be configured on the network VR's public facing interfaces", since = "4.18.0")
private Integer publicMtu;

@Parameter(name = ApiConstants.PRIVATE_MTU, type = CommandType.INTEGER,
description = "MTU to be configured on the network VR's public facing interfaces", since = "4.18.0")
private Integer privateMtu;

@Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, description = "the first IPv4 DNS for the network. Empty string will update the first IPv4 DNS with the value from the zone", since = "4.18.0")
private String ip4Dns1;

Expand Down Expand Up @@ -157,14 +149,6 @@ public boolean getForced(){
return forced;
}

public Integer getPublicMtu() {
return publicMtu;
}

public Integer getPrivateMtu() {
return privateMtu;
}

public String getIp4Dns1() {
return ip4Dns1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
// under the License.
package org.apache.cloudstack.api.command.user.vpc;

import com.cloud.network.NetworkService;
import org.apache.log4j.Logger;

import org.apache.cloudstack.acl.RoleType;
Expand Down Expand Up @@ -96,10 +95,6 @@ public class CreateVPCCmd extends BaseAsyncCreateCmd implements UserCmd {
@Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpc to the end user or not", since = "4.4", authorized = {RoleType.Admin})
private Boolean display;

@Parameter(name = ApiConstants.PUBLIC_MTU, type = CommandType.INTEGER,
description = "MTU to be configured on the network VR's public facing interfaces", since = "4.18.0")
private Integer publicMtu;

@Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, description = "the first IPv4 DNS for the VPC", since = "4.18.0")
private String ip4Dns1;

Expand Down Expand Up @@ -148,10 +143,6 @@ public String getNetworkDomain() {
return networkDomain;
}

public Integer getPublicMtu() {
return publicMtu != null ? publicMtu : NetworkService.DEFAULT_MTU;
}

public String getIp4Dns1() {
return ip4Dns1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ public class UpdateVPCCmd extends BaseAsyncCustomIdCmd implements UserCmd {
@Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpc to the end user or not", since = "4.4", authorized = {RoleType.Admin})
private Boolean display;

@Parameter(name = ApiConstants.PUBLIC_MTU, type = CommandType.INTEGER,
description = "MTU to be configured on the network VR's public facing interfaces", since = "4.18.0")
private Integer publicMtu;

/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
/////////////////////////////////////////////////////
Expand All @@ -83,10 +79,6 @@ public Boolean isDisplayVpc() {
return display;
}

public Integer getPublicMtu() {
return publicMtu;
}

/////////////////////////////////////////////////////
/////////////// API Implementation///////////////////
/////////////////////////////////////////////////////
Expand All @@ -107,7 +99,7 @@ public long getEntityOwnerId() {

@Override
public void execute() {
Vpc result = _vpcService.updateVpc(getId(), getVpcName(), getDisplayText(), getCustomId(), isDisplayVpc(), getPublicMtu());
Vpc result = _vpcService.updateVpc(getId(), getVpcName(), getDisplayText(), getCustomId(), isDisplayVpc());
if (result != null) {
VpcResponse response = _responseGenerator.createVpcResponse(getResponseView(), result);
response.setResponseName(getCommandName());
Expand Down
Loading