Skip to content

Commit f3dae81

Browse files
author
Sheng Yang
committed
IPv6: Add IPv6 for domain router view
1 parent f900d0b commit f3dae81

4 files changed

Lines changed: 64 additions & 1 deletion

File tree

‎server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ public DomainRouterResponse newDomainRouterResponse(DomainRouterJoinVO router, A
116116
nicResponse.setNetworkid(router.getNetworkUuid());
117117
nicResponse.setNetworkName(router.getNetworkName());
118118
nicResponse.setMacAddress(router.getMacAddress());
119+
nicResponse.setIp6Address(router.getIp6Address());
120+
nicResponse.setIp6Gateway(router.getIp6Gateway());
121+
nicResponse.setIp6Cidr(router.getIp6Cidr());
119122
if (router.getBroadcastUri() != null) {
120123
nicResponse.setBroadcastUri(router.getBroadcastUri().toString());
121124
}
@@ -171,6 +174,9 @@ public DomainRouterResponse setDomainRouterResponse(DomainRouterResponse vrData,
171174
nicResponse.setNetmask(vr.getNetmask());
172175
nicResponse.setNetworkid(vr.getNetworkUuid());
173176
nicResponse.setMacAddress(vr.getMacAddress());
177+
nicResponse.setIp6Address(vr.getIp6Address());
178+
nicResponse.setIp6Gateway(vr.getIp6Gateway());
179+
nicResponse.setIp6Cidr(vr.getIp6Cidr());
174180
if (vr.getBroadcastUri() != null) {
175181
nicResponse.setBroadcastUri(vr.getBroadcastUri().toString());
176182
}

‎server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,15 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti
157157
@Column(name = "netmask")
158158
private String netmask;
159159

160+
@Column(name = "ip6_address")
161+
private String ip6Address;
162+
163+
@Column(name = "ip6_gateway")
164+
private String ip6Gateway;
165+
166+
@Column(name = "ip6_cidr")
167+
private String ip6Cidr;
168+
160169
@Column(name = "mac_address")
161170
private String macAddress;
162171

@@ -920,4 +929,46 @@ public void setGuestType(GuestType guestType) {
920929
}
921930

922931

932+
933+
934+
public String getIp6Address() {
935+
return ip6Address;
936+
}
937+
938+
939+
940+
941+
public void setIp6Address(String ip6Address) {
942+
this.ip6Address = ip6Address;
943+
}
944+
945+
946+
947+
948+
public String getIp6Gateway() {
949+
return ip6Gateway;
950+
}
951+
952+
953+
954+
955+
public void setIp6Gateway(String ip6Gateway) {
956+
this.ip6Gateway = ip6Gateway;
957+
}
958+
959+
960+
961+
962+
public String getIp6Cidr() {
963+
return ip6Cidr;
964+
}
965+
966+
967+
968+
969+
public void setIp6Cidr(String ip6Cidr) {
970+
this.ip6Cidr = ip6Cidr;
971+
}
972+
973+
923974
}

‎setup/db/create-schema-view.sql‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ CREATE VIEW `cloud`.`domain_router_view` AS
222222
nics.uuid nic_uuid,
223223
nics.network_id network_id,
224224
nics.ip4_address ip_address,
225+
nics.ip6_address ip6_address,
226+
nics.ip6_gateway ip6_gateway,
227+
nics.ip6_cidr ip6_cidr,
225228
nics.default_nic is_default_nic,
226229
nics.gateway gateway,
227230
nics.netmask netmask,
@@ -1133,4 +1136,4 @@ CREATE VIEW `cloud`.`data_center_view` AS
11331136
from
11341137
`cloud`.`data_center`
11351138
left join
1136-
`cloud`.`domain` ON data_center.domain_id = domain.id;
1139+
`cloud`.`domain` ON data_center.domain_id = domain.id;

‎setup/db/db/schema-40to410.sql‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ CREATE VIEW `cloud`.`domain_router_view` AS
358358
nics.uuid nic_uuid,
359359
nics.network_id network_id,
360360
nics.ip4_address ip_address,
361+
nics.ip6_address ip6_address,
362+
nics.ip6_gateway ip6_gateway,
363+
nics.ip6_cidr ip6_cidr,
361364
nics.default_nic is_default_nic,
362365
nics.gateway gateway,
363366
nics.netmask netmask,

0 commit comments

Comments
 (0)