mirror of https://github.com/apache/cloudstack.git
IPv6: Update NetworkResponse and NicResponse
Conflicts: api/src/com/cloud/api/response/NetworkResponse.java api/src/com/cloud/api/response/NicResponse.java
This commit is contained in:
parent
4f76eee258
commit
f7047eba73
|
|
@ -139,6 +139,12 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
|
|||
|
||||
@SerializedName(ApiConstants.TAGS) @Param(description="the list of resource tags associated with network", responseObject = ResourceTagResponse.class)
|
||||
private List<ResourceTagResponse> tags;
|
||||
|
||||
@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);
|
||||
|
|
@ -293,4 +299,12 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
|
|||
public void setTags(List<ResourceTagResponse> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public void setIp6Gateway(String ip6Gateway) {
|
||||
this.ip6Gateway = ip6Gateway;
|
||||
}
|
||||
|
||||
public void setIp6Cidr(String ip6Cidr) {
|
||||
this.ip6Cidr = ip6Cidr;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,15 @@ public class NicResponse extends BaseResponse {
|
|||
|
||||
@SerializedName("macaddress") @Param(description="true if nic is default, false otherwise")
|
||||
private String macAddress;
|
||||
|
||||
@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;
|
||||
|
||||
@SerializedName(ApiConstants.IP6_ADDRESS) @Param(description="the IPv6 address of network")
|
||||
private String ip6Address;
|
||||
|
||||
public Long getId() {
|
||||
return id.getValue();
|
||||
|
|
@ -110,6 +119,18 @@ public class NicResponse extends BaseResponse {
|
|||
|
||||
public void setMacAddress(String macAddress) {
|
||||
this.macAddress = macAddress;
|
||||
}
|
||||
|
||||
public void setIp6Gateway(String ip6Gateway) {
|
||||
this.ip6Gateway = ip6Gateway;
|
||||
}
|
||||
|
||||
public void setIp6Cidr(String ip6Cidr) {
|
||||
this.ip6Cidr = ip6Cidr;
|
||||
}
|
||||
|
||||
public void setIp6Address(String ip6Address) {
|
||||
this.ip6Address = ip6Address;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -136,5 +157,4 @@ public class NicResponse extends BaseResponse {
|
|||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3079,6 +3079,9 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
if (network.getCidr() != null) {
|
||||
response.setNetmask(NetUtils.cidr2Netmask(network.getCidr()));
|
||||
}
|
||||
|
||||
response.setIp6Gateway(network.getIp6Gateway());
|
||||
response.setIp6Cidr(network.getIp6Cidr());
|
||||
|
||||
//return vlan information only to Root admin
|
||||
if (network.getBroadcastUri() != null && UserContext.current().getCaller().getType() == Account.ACCOUNT_TYPE_ADMIN) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue