Skip to content

Commit f340e77

Browse files
Pearl1594Locharla, Sandeep
authored andcommitted
CKS: Use Zone MTUs when network is created at the time of CKS cluster creation (apache#12228)
1 parent 2a8e844 commit f340e77

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

api/src/main/java/com/cloud/network/NetworkService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ Network createGuestNetwork(long networkOfferingId, String name, String displayTe
108108
PhysicalNetwork physicalNetwork, long zoneId, ControlledEntity.ACLType aclType) throws
109109
InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException;
110110

111+
Network createGuestNetwork(long networkOfferingId, String name, String displayText, Account owner,
112+
PhysicalNetwork physicalNetwork, long zoneId, ControlledEntity.ACLType aclType, Pair<Integer, Integer> vrIfaceMTUs) throws
113+
InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException;
114+
111115
Pair<List<? extends Network>, Integer> searchForNetworks(ListNetworksCmd cmd);
112116

113117
boolean deleteNetwork(long networkId, boolean forced);

server/src/main/java/com/cloud/network/NetworkServiceImpl.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,6 +1886,18 @@ public Network createGuestNetwork(long networkOfferingId, String name, String di
18861886
null, null, null, null, null, null, null, null, null, null);
18871887
}
18881888

1889+
@Override
1890+
@DB
1891+
@ActionEvent(eventType = EventTypes.EVENT_NETWORK_CREATE, eventDescription = "creating network")
1892+
public Network createGuestNetwork(long networkOfferingId, String name, String displayText, Account owner,
1893+
PhysicalNetwork physicalNetwork, long zoneId, ACLType aclType, Pair<Integer, Integer> vrIfaceMTUs) throws
1894+
InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException {
1895+
return _networkMgr.createGuestNetwork(networkOfferingId, name, displayText,
1896+
null, null, null, false, null, owner, null, physicalNetwork, zoneId,
1897+
aclType, null, null, null, null, true, null,
1898+
null, null, null, null, null, null, null, null, vrIfaceMTUs, null);
1899+
}
1900+
18891901
void checkAndSetRouterSourceNatIp(Account owner, CreateNetworkCmd cmd, Network network) throws InsufficientAddressCapacityException, ResourceAllocationException {
18901902
String sourceNatIp = cmd.getSourceNatIP();
18911903
if (sourceNatIp == null) {

server/src/test/java/com/cloud/vpc/MockNetworkManagerImpl.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,13 @@ public Network createGuestNetwork(long networkOfferingId, String name, String di
231231
return null;
232232
}
233233

234+
@Override
235+
public Network createGuestNetwork(long networkOfferingId, String name, String displayText, Account owner,
236+
PhysicalNetwork physicalNetwork, long zoneId, ACLType aclType, Pair<Integer, Integer> vrIfaceMTUs)
237+
throws InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException {
238+
return null;
239+
}
240+
234241
/* (non-Javadoc)
235242
* @see com.cloud.network.NetworkService#searchForNetworks(com.cloud.api.commands.ListNetworksCmd)
236243
*/

0 commit comments

Comments
 (0)