You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2013/11/12 01:32:25 UTC
[1/2] git commit: updated refs/heads/master to 04884b8
Updated Branches:
refs/heads/master 8b7b7a041 -> 04884b8f0
ListPortFowardingRules: added networkId to the list of optional parameters to list by
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/268c27b4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/268c27b4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/268c27b4
Branch: refs/heads/master
Commit: 268c27b4f22b3818a54271a4484f47cfa1f8075d
Parents: 8b7b7a0
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Mon Nov 11 10:11:13 2013 -0800
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Mon Nov 11 16:17:43 2013 -0800
----------------------------------------------------------------------
.../user/firewall/ListPortForwardingRulesCmd.java | 9 +++++++++
.../cloudstack/api/response/FirewallRuleResponse.java | 7 +++++++
server/src/com/cloud/api/ApiResponseHelper.java | 3 +++
.../src/com/cloud/network/rules/RulesManagerImpl.java | 12 +++++++++---
4 files changed, 28 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/268c27b4/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java b/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java
index 9fd4e45..7e96e0b 100644
--- a/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java
@@ -26,6 +26,7 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.response.FirewallRuleResponse;
import org.apache.cloudstack.api.response.IPAddressResponse;
import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.NetworkResponse;
import org.apache.log4j.Logger;
import com.cloud.network.rules.PortForwardingRule;
@@ -48,6 +49,10 @@ public class ListPortForwardingRulesCmd extends BaseListTaggedResourcesCmd {
@Parameter(name=ApiConstants.IP_ADDRESS_ID, type=CommandType.UUID, entityType = IPAddressResponse.class,
description="the id of IP address of the port forwarding services")
private Long ipAddressId;
+
+ @Parameter(name=ApiConstants.NETWORK_ID, type=CommandType.UUID, entityType = NetworkResponse.class,
+ description="list port forwarding rules for ceratin network", since="4.3")
+ private Long networkId;
/////////////////////////////////////////////////////
/////////////////// Accessors ///////////////////////
@@ -60,6 +65,10 @@ public class ListPortForwardingRulesCmd extends BaseListTaggedResourcesCmd {
public Long getId() {
return id;
}
+
+ public Long getNetworkId() {
+ return networkId;
+ }
/////////////////////////////////////////////////////
/////////////// API Implementation///////////////////
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/268c27b4/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java b/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java
index 787410a..20ea407 100644
--- a/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java
@@ -73,6 +73,9 @@ public class FirewallRuleResponse extends BaseResponse {
@SerializedName(ApiConstants.VM_GUEST_IP) @Param(description="the vm ip address for the port forwarding rule")
private String destNatVmIp;
+
+ @SerializedName(ApiConstants.NETWORK_ID) @Param(description="the id of the guest network the port forwarding rule belongs to")
+ private String networkId;
public String getDestNatVmIp() {
@@ -196,4 +199,8 @@ public class FirewallRuleResponse extends BaseResponse {
public void setTags(List<ResourceTagResponse> tags) {
this.tags = tags;
}
+
+ public void setNetworkId(String networkId) {
+ this.networkId = networkId;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/268c27b4/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index f70af5f..89c951c 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -1023,6 +1023,9 @@ public class ApiResponseHelper implements ResponseGenerator {
response.setPublicEndPort(Integer.toString(fwRule.getSourcePortEnd()));
List<String> cidrs = ApiDBUtils.findFirewallSourceCidrs(fwRule.getId());
response.setCidrList(StringUtils.join(cidrs, ","));
+
+ Network guestNtwk = ApiDBUtils.findNetworkById(fwRule.getNetworkId());
+ response.setNetworkId(guestNtwk.getUuid());
IpAddress ip = ApiDBUtils.findIpAddressById(fwRule.getSourceIpAddressId());
response.setPublicIpAddressId(ip.getUuid());
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/268c27b4/server/src/com/cloud/network/rules/RulesManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/rules/RulesManagerImpl.java b/server/src/com/cloud/network/rules/RulesManagerImpl.java
index 2ea1021..5808938 100755
--- a/server/src/com/cloud/network/rules/RulesManagerImpl.java
+++ b/server/src/com/cloud/network/rules/RulesManagerImpl.java
@@ -25,10 +25,10 @@ import java.util.Set;
import javax.ejb.Local;
import javax.inject.Inject;
-import org.apache.log4j.Logger;
import org.apache.cloudstack.api.command.user.firewall.ListPortForwardingRulesCmd;
import org.apache.cloudstack.context.CallContext;
import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
+import org.apache.log4j.Logger;
import com.cloud.configuration.ConfigurationManager;
import com.cloud.domain.dao.DomainDao;
@@ -75,10 +75,10 @@ import com.cloud.utils.db.Filter;
import com.cloud.utils.db.JoinBuilder;
import com.cloud.utils.db.SearchBuilder;
import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.TransactionCallbackNoReturn;
-import com.cloud.utils.db.TransactionCallbackWithException;
import com.cloud.utils.db.SearchCriteria.Op;
import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionCallbackNoReturn;
+import com.cloud.utils.db.TransactionCallbackWithException;
import com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn;
import com.cloud.utils.db.TransactionStatus;
import com.cloud.utils.exception.CloudRuntimeException;
@@ -783,6 +783,7 @@ public class RulesManagerImpl extends ManagerBase implements RulesManager, Rules
Long ipId = cmd.getIpAddressId();
Long id = cmd.getId();
Map<String, String> tags = cmd.getTags();
+ Long networkId = cmd.getNetworkId();
Account caller = CallContext.current().getCallingAccount();
List<Long> permittedAccounts = new ArrayList<Long>();
@@ -808,6 +809,7 @@ public class RulesManagerImpl extends ManagerBase implements RulesManager, Rules
sb.and("id", sb.entity().getId(), Op.EQ);
sb.and("ip", sb.entity().getSourceIpAddressId(), Op.EQ);
sb.and("purpose", sb.entity().getPurpose(), Op.EQ);
+ sb.and("networkId", sb.entity().getNetworkId(), Op.EQ);
if (tags != null && !tags.isEmpty()) {
SearchBuilder<ResourceTagVO> tagSearch = _resourceTagDao.createSearchBuilder();
@@ -842,6 +844,10 @@ public class RulesManagerImpl extends ManagerBase implements RulesManager, Rules
if (ipId != null) {
sc.setParameters("ip", ipId);
}
+
+ if (networkId != null) {
+ sc.setParameters("networkId", networkId);
+ }
sc.setParameters("purpose", Purpose.PortForwarding);
[2/2] git commit: updated refs/heads/master to 04884b8
Posted by al...@apache.org.
CLOUDSTACK-5084: added missing global config vmware.hung.wokervm.timeout to the 4.2-4.2.1 upgrade path
Conflicts:
setup/db/db/schema-420to421.sql
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/04884b8f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/04884b8f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/04884b8f
Branch: refs/heads/master
Commit: 04884b8f047d7dd6a6a881209b4d0af4e2279e3e
Parents: 268c27b
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Mon Nov 11 16:29:22 2013 -0800
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Mon Nov 11 16:32:48 2013 -0800
----------------------------------------------------------------------
setup/db/db/schema-420to421.sql | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04884b8f/setup/db/db/schema-420to421.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-420to421.sql b/setup/db/db/schema-420to421.sql
index d429b30..1d28485 100644
--- a/setup/db/db/schema-420to421.sql
+++ b/setup/db/db/schema-420to421.sql
@@ -221,3 +221,6 @@ CREATE VIEW `cloud`.`user_vm_view` AS
update `cloud`.`volumes` v, `cloud`.`volume_host_ref` vhr set v.format=vhr.format where v.id=vhr.volume_id and v.format is null;
+INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'baremetal.ipmi.lan.interface', 'default', 'option specified in -I option of impitool. candidates are: open/bmc/lipmi/lan/lanplus/free/imb, see ipmitool man page for details. default valule "default" means using default option of ipmitool');
+INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'baremetal.ipmi.fail.retry', 'default', "ipmi interface will be temporary out of order after power opertions(e.g. cycle, on), it leads following commands fail immediately. The value specifies retry times before accounting it as real failure");
+INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vmware.hung.wokervm.timeout', '7200', 'Worker VM timeout in seconds');