Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public class FirewallResponse extends BaseResponse {

@SerializedName(ApiConstants.START_PORT)
@Param(description = "the starting port of firewall rule's port range")
private String startPort;
private Integer startPort;

@SerializedName(ApiConstants.END_PORT)
@Param(description = "the ending port of firewall rule's port range")
private String endPort;
private Integer endPort;

@SerializedName(ApiConstants.IP_ADDRESS_ID)
@Param(description = "the public ip address id for the firewall rule")
Expand Down Expand Up @@ -87,11 +87,11 @@ public void setProtocol(String protocol) {
this.protocol = protocol;
}

public void setStartPort(String startPort) {
public void setStartPort(Integer startPort) {
this.startPort = startPort;
}

public void setEndPort(String endPort) {
public void setEndPort(Integer endPort) {
this.endPort = endPort;
}

Expand Down
4 changes: 2 additions & 2 deletions server/src/com/cloud/api/ApiResponseHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -2124,11 +2124,11 @@ public FirewallResponse createFirewallResponse(FirewallRule fwRule) {
response.setId(fwRule.getUuid());
response.setProtocol(fwRule.getProtocol());
if (fwRule.getSourcePortStart() != null) {
response.setStartPort(Integer.toString(fwRule.getSourcePortStart()));
response.setStartPort(fwRule.getSourcePortStart());
}

if (fwRule.getSourcePortEnd() != null) {
response.setEndPort(Integer.toString(fwRule.getSourcePortEnd()));
response.setEndPort(fwRule.getSourcePortEnd());
}

List<String> cidrs = ApiDBUtils.findFirewallSourceCidrs(fwRule.getId());
Expand Down