mirror of https://github.com/apache/cloudstack.git
IPv6: Fix VlanIpRangeResponse
Conflicts: api/src/com/cloud/api/response/VlanIpRangeResponse.java
This commit is contained in:
parent
730da70d7d
commit
4f76eee258
|
|
@ -77,6 +77,18 @@ public class VlanIpRangeResponse extends BaseResponse implements ControlledEntit
|
|||
@SerializedName(ApiConstants.PHYSICAL_NETWORK_ID) @Param(description="the physical network this belongs to")
|
||||
private IdentityProxy physicalNetworkId = new IdentityProxy("physical_network");
|
||||
|
||||
@SerializedName(ApiConstants.START_IPV6) @Param(description="the start ipv6 of the VLAN IP range")
|
||||
private String startIpv6;
|
||||
|
||||
@SerializedName(ApiConstants.END_IPV6) @Param(description="the end ipv6 of the VLAN IP range")
|
||||
private String endIpv6;
|
||||
|
||||
@SerializedName(ApiConstants.IP6_GATEWAY) @Param(description="the gateway of IPv6 network")
|
||||
private String ip6Gateway;
|
||||
|
||||
@SerializedName(ApiConstants.IP6_CIDR) @Param(description="the cidr of IPv6 network")
|
||||
private String ip6Cidr;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id.setValue(id);
|
||||
}
|
||||
|
|
@ -153,5 +165,29 @@ public class VlanIpRangeResponse extends BaseResponse implements ControlledEntit
|
|||
|
||||
public long getphysicalNetworkId() {
|
||||
return physicalNetworkId.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
public String getStartIpv6() {
|
||||
return startIpv6;
|
||||
}
|
||||
|
||||
public void setStartIpv6(String startIpv6) {
|
||||
this.startIpv6 = startIpv6;
|
||||
}
|
||||
|
||||
public void setEndIpv6(String endIpv6) {
|
||||
this.endIpv6 = endIpv6;
|
||||
}
|
||||
|
||||
public void setIp6Gateway(String ip6Gateway) {
|
||||
this.ip6Gateway = ip6Gateway;
|
||||
}
|
||||
|
||||
public void setIp6Cidr(String ip6Cidr) {
|
||||
this.ip6Cidr = ip6Cidr;
|
||||
}
|
||||
|
||||
public String getphysicalNetworkId() {
|
||||
return physicalNetworkId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -791,9 +791,21 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
|
||||
// get start ip and end ip of corresponding vlan
|
||||
String ipRange = vlan.getIpRange();
|
||||
String[] range = ipRange.split("-");
|
||||
vlanResponse.setStartIp(range[0]);
|
||||
vlanResponse.setEndIp(range[1]);
|
||||
if (ipRange != null) {
|
||||
String[] range = ipRange.split("-");
|
||||
vlanResponse.setStartIp(range[0]);
|
||||
vlanResponse.setEndIp(range[1]);
|
||||
}
|
||||
|
||||
vlanResponse.setIp6Gateway(vlan.getIp6Gateway());
|
||||
vlanResponse.setIp6Cidr(vlan.getIp6Cidr());
|
||||
|
||||
String ip6Range = vlan.getIp6Range();
|
||||
if (ip6Range != null) {
|
||||
String[] range = ip6Range.split("-");
|
||||
vlanResponse.setStartIpv6(range[0]);
|
||||
vlanResponse.setEndIpv6(range[1]);
|
||||
}
|
||||
|
||||
vlanResponse.setNetworkId(vlan.getNetworkId());
|
||||
Account owner = ApiDBUtils.getVlanAccount(vlan.getId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue