mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-1862 Added vm ip address info in the list PF rules response
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
This commit is contained in:
parent
cbbba28657
commit
c8f2003138
|
|
@ -71,6 +71,18 @@ public class FirewallRuleResponse extends BaseResponse {
|
|||
@SerializedName(ApiConstants.TAGS) @Param(description="the list of resource tags associated with the rule", responseObject = ResourceTagResponse.class)
|
||||
private List<ResourceTagResponse> tags;
|
||||
|
||||
@SerializedName(ApiConstants.VM_GUEST_IP) @Param(description="the vm ip address for the port forwarding rule")
|
||||
private String destNatVmIp;
|
||||
|
||||
|
||||
public String getDestNatVmIp() {
|
||||
return destNatVmIp;
|
||||
}
|
||||
|
||||
public void setDestNatVmIp(String destNatVmIp) {
|
||||
this.destNatVmIp = destNatVmIp;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getObjectId() {
|
||||
|
|
|
|||
|
|
@ -965,6 +965,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
response.setPublicIpAddress(ip.getAddress().addr());
|
||||
|
||||
if (ip != null && fwRule.getDestinationIpAddress() != null) {
|
||||
response.setDestNatVmIp(fwRule.getDestinationIpAddress().toString());
|
||||
UserVm vm = ApiDBUtils.findUserVmById(fwRule.getVirtualMachineId());
|
||||
if (vm != null) {
|
||||
response.setVirtualMachineId(vm.getUuid());
|
||||
|
|
|
|||
Loading…
Reference in New Issue