mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-2934 Fixed not showing uuid in list firewall rules response
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
This commit is contained in:
parent
aeb024723a
commit
b72c79b370
@ -39,10 +39,10 @@ public class FirewallResponse extends BaseResponse {
|
||||
private String endPort;
|
||||
|
||||
@SerializedName(ApiConstants.IP_ADDRESS_ID) @Param(description="the public ip address id for the firewall rule")
|
||||
private Long publicIpAddressId;
|
||||
private String publicIpAddressId;
|
||||
|
||||
@SerializedName(ApiConstants.NETWORK_ID) @Param(description="the network id of the firewall rule")
|
||||
private Long networkId;
|
||||
private String networkId;
|
||||
|
||||
@SerializedName(ApiConstants.IP_ADDRESS) @Param(description="the public ip address for the firewall rule")
|
||||
private String publicIpAddress;
|
||||
@ -78,7 +78,7 @@ public class FirewallResponse extends BaseResponse {
|
||||
this.endPort = endPort;
|
||||
}
|
||||
|
||||
public void setPublicIpAddressId(Long publicIpAddressId) {
|
||||
public void setPublicIpAddressId(String publicIpAddressId) {
|
||||
this.publicIpAddressId = publicIpAddressId;
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ public class FirewallResponse extends BaseResponse {
|
||||
this.publicIpAddress = publicIpAddress;
|
||||
}
|
||||
|
||||
public void setNetworkId(Long networkId) {
|
||||
public void setNetworkId(String networkId) {
|
||||
this.networkId = networkId;
|
||||
}
|
||||
|
||||
|
||||
@ -2399,11 +2399,12 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
|
||||
if (fwRule.getTrafficType() == FirewallRule.TrafficType.Ingress) {
|
||||
IpAddress ip = ApiDBUtils.findIpAddressById(fwRule.getSourceIpAddressId());
|
||||
response.setPublicIpAddressId(ip.getId());
|
||||
response.setPublicIpAddressId(ip.getUuid());
|
||||
response.setPublicIpAddress(ip.getAddress().addr());
|
||||
} else if (fwRule.getTrafficType() == FirewallRule.TrafficType.Egress) {
|
||||
response.setPublicIpAddress(null);
|
||||
response.setNetworkId(fwRule.getNetworkId());
|
||||
Network network = ApiDBUtils.findNetworkById(fwRule.getNetworkId());
|
||||
response.setNetworkId(network.getUuid());
|
||||
}
|
||||
|
||||
FirewallRule.State state = fwRule.getState();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user