@@ -37,6 +37,8 @@ public class NicProfile implements InternalIdentity {
3737 TrafficType trafficType ;
3838 String ip4Address ;
3939 String ip6Address ;
40+ String ip6Gateway ;
41+ String ip6Cidr ;
4042 String macAddress ;
4143 URI isolationUri ;
4244 String netmask ;
@@ -50,7 +52,8 @@ public class NicProfile implements InternalIdentity {
5052 Integer networkRate ;
5153 boolean isSecurityGroupEnabled ;
5254 String name ;
53- String requestedIp ;
55+ String requestedIpv4 ;
56+ String requestedIpv6 ;
5457
5558 public String getDns1 () {
5659 return dns1 ;
@@ -218,7 +221,7 @@ public NicProfile(Nic nic, Network network, URI broadcastUri, URI isolationUri,
218221 this .trafficType = network .getTrafficType ();
219222 this .ip4Address = nic .getIp4Address ();
220223 this .format = nic .getAddressFormat ();
221- this .ip6Address = null ;
224+ this .ip6Address = nic . getIp6Address () ;
222225 this .macAddress = nic .getMacAddress ();
223226 this .reservationId = nic .getReservationId ();
224227 this .strategy = nic .getReservationStrategy ();
@@ -230,6 +233,8 @@ public NicProfile(Nic nic, Network network, URI broadcastUri, URI isolationUri,
230233 this .isSecurityGroupEnabled = isSecurityGroupEnabled ;
231234 this .vmId = nic .getInstanceId ();
232235 this .name = name ;
236+ this .ip6Cidr = nic .getIp6Cidr ();
237+ this .ip6Gateway = nic .getIp6Gateway ();
233238
234239 if (networkRate != null ) {
235240 this .networkRate = networkRate ;
@@ -245,8 +250,9 @@ public NicProfile(ReservationStrategy strategy, String ip4Address, String macAdd
245250 this .strategy = strategy ;
246251 }
247252
248- public NicProfile (String requestedIp ) {
249- this .requestedIp = requestedIp ;
253+ public NicProfile (String requestedIpv4 , String requestedIpv6 ) {
254+ this .requestedIpv4 = requestedIpv4 ;
255+ this .requestedIpv6 = requestedIpv6 ;
250256 }
251257
252258 public NicProfile () {
@@ -272,8 +278,8 @@ public void setSecurityGroupEnabled(boolean enabled) {
272278 this .isSecurityGroupEnabled = enabled ;
273279 }
274280
275- public String getRequestedIp () {
276- return requestedIp ;
281+ public String getRequestedIpv4 () {
282+ return requestedIpv4 ;
277283 }
278284
279285 public void deallocate () {
@@ -301,4 +307,28 @@ public String toString() {
301307 append (reservationId ).append ("-" ).append (ip4Address ).append ("-" ).append (broadcastUri ).toString ();
302308 }
303309
310+ public String getIp6Gateway () {
311+ return ip6Gateway ;
312+ }
313+
314+ public void setIp6Gateway (String ip6Gateway ) {
315+ this .ip6Gateway = ip6Gateway ;
316+ }
317+
318+ public String getIp6Cidr () {
319+ return ip6Cidr ;
320+ }
321+
322+ public void setIp6Cidr (String ip6Cidr ) {
323+ this .ip6Cidr = ip6Cidr ;
324+ }
325+
326+ public String getRequestedIpv6 () {
327+ return requestedIpv6 ;
328+ }
329+
330+ public void setRequestedIpv6 (String requestedIpv6 ) {
331+ this .requestedIpv6 = requestedIpv6 ;
332+ }
333+
304334}
0 commit comments