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;
|
private String endPort;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.IP_ADDRESS_ID) @Param(description="the public ip address id for the firewall rule")
|
@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")
|
@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")
|
@SerializedName(ApiConstants.IP_ADDRESS) @Param(description="the public ip address for the firewall rule")
|
||||||
private String publicIpAddress;
|
private String publicIpAddress;
|
||||||
@ -78,7 +78,7 @@ public class FirewallResponse extends BaseResponse {
|
|||||||
this.endPort = endPort;
|
this.endPort = endPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPublicIpAddressId(Long publicIpAddressId) {
|
public void setPublicIpAddressId(String publicIpAddressId) {
|
||||||
this.publicIpAddressId = publicIpAddressId;
|
this.publicIpAddressId = publicIpAddressId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ public class FirewallResponse extends BaseResponse {
|
|||||||
this.publicIpAddress = publicIpAddress;
|
this.publicIpAddress = publicIpAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNetworkId(Long networkId) {
|
public void setNetworkId(String networkId) {
|
||||||
this.networkId = networkId;
|
this.networkId = networkId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2399,11 +2399,12 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||||||
|
|
||||||
if (fwRule.getTrafficType() == FirewallRule.TrafficType.Ingress) {
|
if (fwRule.getTrafficType() == FirewallRule.TrafficType.Ingress) {
|
||||||
IpAddress ip = ApiDBUtils.findIpAddressById(fwRule.getSourceIpAddressId());
|
IpAddress ip = ApiDBUtils.findIpAddressById(fwRule.getSourceIpAddressId());
|
||||||
response.setPublicIpAddressId(ip.getId());
|
response.setPublicIpAddressId(ip.getUuid());
|
||||||
response.setPublicIpAddress(ip.getAddress().addr());
|
response.setPublicIpAddress(ip.getAddress().addr());
|
||||||
} else if (fwRule.getTrafficType() == FirewallRule.TrafficType.Egress) {
|
} else if (fwRule.getTrafficType() == FirewallRule.TrafficType.Egress) {
|
||||||
response.setPublicIpAddress(null);
|
response.setPublicIpAddress(null);
|
||||||
response.setNetworkId(fwRule.getNetworkId());
|
Network network = ApiDBUtils.findNetworkById(fwRule.getNetworkId());
|
||||||
|
response.setNetworkId(network.getUuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
FirewallRule.State state = fwRule.getState();
|
FirewallRule.State state = fwRule.getState();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user