Skip to content

Commit 7bd8bec

Browse files
committed
Sync javelin with master up to 894cb8f
2 parents 64d794e + 894cb8f commit 7bd8bec

80 files changed

Lines changed: 2244 additions & 422 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

INSTALL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ server are available and not blocked by any local firewall. Following ports are
5252
used by Apache CloudStack and its entities:
5353

5454
8787: Apache CloudStack (Tomcat) debug socket
55-
9090, 8250: Apache CloudStack Management Server, User/Client API
55+
9090, 8250, 8080: Apache CloudStack Management Server, User/Client API
5656
8096: User/Client to CloudStack Management Server (unauthenticated)
57+
7080: AWS API Server
5758
3306: MySQL Server
5859
3922, 8250, 80/443, 111/2049, 53: Secondary Storage VM
5960
3922, 8250, 53: Console Proxy VM

api/src/com/cloud/agent/api/routing/DhcpEntryCommand.java

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ public class DhcpEntryCommand extends NetworkElementCommand {
2828
String defaultRouter;
2929
String staticRoutes;
3030
String defaultDns;
31-
31+
String vmIp6Address;
32+
String ip6Gateway;
33+
String duid;
3234

3335
protected DhcpEntryCommand() {
3436

@@ -39,14 +41,15 @@ public boolean executeInSequence() {
3941
return true;
4042
}
4143

42-
public DhcpEntryCommand(String vmMac, String vmIpAddress, String vmName) {
44+
public DhcpEntryCommand(String vmMac, String vmIpAddress, String vmName, String vmIp6Address) {
4345
this.vmMac = vmMac;
4446
this.vmIpAddress = vmIpAddress;
4547
this.vmName = vmName;
48+
this.vmIp6Address = vmIp6Address;
4649
}
4750

48-
public DhcpEntryCommand(String vmMac, String vmIpAddress, String vmName, String dns, String gateway) {
49-
this(vmMac, vmIpAddress, vmName);
51+
public DhcpEntryCommand(String vmMac, String vmIpAddress, String vmName, String vmIp6Address, String dns, String gateway, String ip6Gateway) {
52+
this(vmMac, vmIpAddress, vmName, vmIp6Address);
5053
this.dns = dns;
5154
this.gateway = gateway;
5255
}
@@ -102,4 +105,28 @@ public String getDefaultDns() {
102105
public void setDefaultDns(String defaultDns) {
103106
this.defaultDns = defaultDns;
104107
}
108+
109+
public String getIp6Gateway() {
110+
return ip6Gateway;
111+
}
112+
113+
public void setIp6Gateway(String ip6Gateway) {
114+
this.ip6Gateway = ip6Gateway;
115+
}
116+
117+
public String getDuid() {
118+
return duid;
119+
}
120+
121+
public void setDuid(String duid) {
122+
this.duid = duid;
123+
}
124+
125+
public String getVmIp6Address() {
126+
return vmIp6Address;
127+
}
128+
129+
public void setVmIp6Address(String ip6Address) {
130+
this.vmIp6Address = ip6Address;
131+
}
105132
}

api/src/com/cloud/dc/Vlan.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,9 @@ public enum VlanType {
4444

4545
public Long getPhysicalNetworkId();
4646

47+
public String getIp6Gateway();
48+
49+
public String getIp6Cidr();
50+
51+
public String getIp6Range();
4752
}

api/src/com/cloud/network/Network.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,32 @@ private State(String description) {
256256
}
257257
}
258258

259+
public class IpAddresses {
260+
private String ip4Address;
261+
private String ip6Address;
262+
263+
public IpAddresses(String ip4Address, String ip6Address) {
264+
this.setIp4Address(ip4Address);
265+
this.setIp6Address(ip6Address);
266+
}
267+
268+
public String getIp4Address() {
269+
return ip4Address;
270+
}
271+
272+
public void setIp4Address(String ip4Address) {
273+
this.ip4Address = ip4Address;
274+
}
275+
276+
public String getIp6Address() {
277+
return ip6Address;
278+
}
279+
280+
public void setIp6Address(String ip6Address) {
281+
this.ip6Address = ip6Address;
282+
}
283+
}
284+
259285
String getName();
260286

261287
Mode getMode();
@@ -268,6 +294,10 @@ private State(String description) {
268294

269295
String getCidr();
270296

297+
String getIp6Gateway();
298+
299+
String getIp6Cidr();
300+
271301
long getDataCenterId();
272302

273303
long getNetworkOfferingId();

api/src/com/cloud/network/NetworkModel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,5 @@ Map<PublicIpAddress, Set<Service>> getIpToServices(List<? extends PublicIpAddres
249249

250250
boolean isNetworkInlineMode(Network network);
251251

252+
Vlan getVlanForNetwork(long networkId);
252253
}

api/src/com/cloud/network/NetworkProfile.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public class NetworkProfile implements Network {
3838
private TrafficType trafficType;
3939
private String gateway;
4040
private String cidr;
41+
private String ip6Gateway;
42+
private String ip6Cidr;
4143
private long networkOfferingId;
4244
private long related;
4345
private String displayText;
@@ -63,6 +65,8 @@ public NetworkProfile(Network network) {
6365
this.trafficType = network.getTrafficType();
6466
this.gateway = network.getGateway();
6567
this.cidr = network.getCidr();
68+
this.ip6Gateway = network.getIp6Gateway();
69+
this.ip6Cidr = network.getIp6Cidr();
6670
this.networkOfferingId = network.getNetworkOfferingId();
6771
this.related = network.getRelated();
6872
this.displayText = network.getDisplayText();
@@ -229,4 +233,14 @@ public Long getVpcId() {
229233
public void setTrafficType(TrafficType type) {
230234
this.trafficType = type;
231235
}
236+
237+
@Override
238+
public String getIp6Gateway() {
239+
return ip6Gateway;
240+
}
241+
242+
@Override
243+
public String getIp6Cidr() {
244+
return ip6Cidr;
245+
}
232246
}

api/src/com/cloud/network/Networks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public enum Mode {
4848
public enum AddressFormat {
4949
Ip4,
5050
Ip6,
51-
Mixed
51+
DualStack
5252
}
5353

5454
/**

api/src/com/cloud/vm/Nic.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,10 @@ public enum ReservationStrategy {
145145
VirtualMachine.Type getVmType();
146146

147147
AddressFormat getAddressFormat();
148+
149+
String getIp6Gateway();
150+
151+
String getIp6Cidr();
152+
153+
String getIp6Address();
148154
}

api/src/com/cloud/vm/NicProfile.java

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public class NicProfile implements InternalIdentity {
3838
TrafficType trafficType;
3939
String ip4Address;
4040
String ip6Address;
41+
String ip6Gateway;
42+
String ip6Cidr;
4143
String macAddress;
4244
URI isolationUri;
4345
String netmask;
@@ -51,7 +53,8 @@ public class NicProfile implements InternalIdentity {
5153
Integer networkRate;
5254
boolean isSecurityGroupEnabled;
5355
String name;
54-
String requestedIp;
56+
String requestedIpv4;
57+
String requestedIpv6;
5558

5659
public String getDns1() {
5760
return dns1;
@@ -219,7 +222,7 @@ public NicProfile(Nic nic, Network network, URI broadcastUri, URI isolationUri,
219222
this.trafficType = network.getTrafficType();
220223
this.ip4Address = nic.getIp4Address();
221224
this.format = nic.getAddressFormat();
222-
this.ip6Address = null;
225+
this.ip6Address = nic.getIp6Address();
223226
this.macAddress = nic.getMacAddress();
224227
this.reservationId = nic.getReservationId();
225228
this.strategy = nic.getReservationStrategy();
@@ -231,6 +234,8 @@ public NicProfile(Nic nic, Network network, URI broadcastUri, URI isolationUri,
231234
this.isSecurityGroupEnabled = isSecurityGroupEnabled;
232235
this.vmId = nic.getInstanceId();
233236
this.name = name;
237+
this.ip6Cidr = nic.getIp6Cidr();
238+
this.ip6Gateway = nic.getIp6Gateway();
234239

235240
if (networkRate != null) {
236241
this.networkRate = networkRate;
@@ -246,8 +251,9 @@ public NicProfile(ReservationStrategy strategy, String ip4Address, String macAdd
246251
this.strategy = strategy;
247252
}
248253

249-
public NicProfile(String requestedIp) {
250-
this.requestedIp = requestedIp;
254+
public NicProfile(String requestedIpv4, String requestedIpv6) {
255+
this.requestedIpv4 = requestedIpv4;
256+
this.requestedIpv6 = requestedIpv6;
251257
}
252258

253259
public NicProfile() {
@@ -273,8 +279,8 @@ public void setSecurityGroupEnabled(boolean enabled) {
273279
this.isSecurityGroupEnabled = enabled;
274280
}
275281

276-
public String getRequestedIp() {
277-
return requestedIp;
282+
public String getRequestedIpv4() {
283+
return requestedIpv4;
278284
}
279285

280286
public void deallocate() {
@@ -302,4 +308,28 @@ public String toString() {
302308
append(reservationId).append("-").append(ip4Address).append("-").append(broadcastUri).toString();
303309
}
304310

311+
public String getIp6Gateway() {
312+
return ip6Gateway;
313+
}
314+
315+
public void setIp6Gateway(String ip6Gateway) {
316+
this.ip6Gateway = ip6Gateway;
317+
}
318+
319+
public String getIp6Cidr() {
320+
return ip6Cidr;
321+
}
322+
323+
public void setIp6Cidr(String ip6Cidr) {
324+
this.ip6Cidr = ip6Cidr;
325+
}
326+
327+
public String getRequestedIpv6() {
328+
return requestedIpv6;
329+
}
330+
331+
public void setRequestedIpv6(String requestedIpv6) {
332+
this.requestedIpv6 = requestedIpv6;
333+
}
334+
305335
}

api/src/com/cloud/vm/UserVmService.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
import com.cloud.exception.VirtualMachineMigrationException;
5252
import com.cloud.host.Host;
5353
import com.cloud.hypervisor.Hypervisor.HypervisorType;
54+
import com.cloud.network.Network.IpAddresses;
5455
import com.cloud.offering.ServiceOffering;
5556
import com.cloud.storage.StoragePool;
5657
import com.cloud.storage.Volume;
@@ -232,7 +233,7 @@ UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, E
232233
* @throws InsufficientResourcesException
233234
*/
234235
UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> securityGroupIdList, Account owner, String hostName,
235-
String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, String> requestedIps, String defaultIp, String keyboard)
236+
String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIp, String keyboard)
236237
throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException;
237238

238239
/**
@@ -279,7 +280,7 @@ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering s
279280
* - name of the ssh key pair used to login to the virtual machine
280281
* @param requestedIps
281282
* TODO
282-
* @param defaultIp
283+
* @param defaultIps
283284
* TODO
284285
* @param accountName
285286
* - an optional account for the virtual machine. Must be used with domainId
@@ -297,8 +298,8 @@ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering s
297298
* @throws InsufficientResourcesException
298299
*/
299300
UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> networkIdList, List<Long> securityGroupIdList,
300-
Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, String> requestedIps,
301-
String defaultIp, String keyboard)
301+
Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps,
302+
IpAddresses defaultIps, String keyboard)
302303
throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException;
303304

304305
/**
@@ -343,8 +344,7 @@ UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOfferin
343344
* - name of the ssh key pair used to login to the virtual machine
344345
* @param requestedIps
345346
* TODO
346-
* @param defaultIp
347-
* TODO
347+
* @param defaultIps TODO
348348
* @param accountName
349349
* - an optional account for the virtual machine. Must be used with domainId
350350
* @param domainId
@@ -361,7 +361,7 @@ UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOfferin
361361
* @throws InsufficientResourcesException
362362
*/
363363
UserVm createAdvancedVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> networkIdList, Account owner, String hostName,
364-
String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, String> requestedIps, String defaultIp, String keyboard)
364+
String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps, String keyboard)
365365
throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException;
366366

367367
/**

0 commit comments

Comments
 (0)