Skip to content

Commit 221624d

Browse files
committed
CLOUDSTACK-8817: listFirewallRules response JSON startport/endport not an int
1 parent 4d626c1 commit 221624d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

api/src/org/apache/cloudstack/api/response/FirewallResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ public void setProtocol(String protocol) {
8787
this.protocol = protocol;
8888
}
8989

90-
public void setStartPort(String startPort) {
90+
public void setStartPort(Integer startPort) {
9191
this.startPort = startPort;
9292
}
9393

94-
public void setEndPort(String endPort) {
94+
public void setEndPort(Integer endPort) {
9595
this.endPort = endPort;
9696
}
9797

server/src/com/cloud/api/ApiResponseHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,11 +2124,11 @@ public FirewallResponse createFirewallResponse(FirewallRule fwRule) {
21242124
response.setId(fwRule.getUuid());
21252125
response.setProtocol(fwRule.getProtocol());
21262126
if (fwRule.getSourcePortStart() != null) {
2127-
response.setStartPort(Integer.toString(fwRule.getSourcePortStart()));
2127+
response.setStartPort(fwRule.getSourcePortStart());
21282128
}
21292129

21302130
if (fwRule.getSourcePortEnd() != null) {
2131-
response.setEndPort(Integer.toString(fwRule.getSourcePortEnd()));
2131+
response.setEndPort(fwRule.getSourcePortEnd());
21322132
}
21332133

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

0 commit comments

Comments
 (0)