You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by an...@apache.org on 2013/11/21 02:02:38 UTC

git commit: updated refs/heads/4.2 to b2b4b45

Updated Branches:
  refs/heads/4.2 465ac1625 -> b2b4b45ae


don't program security rules in XS host if the zone is not SG enabled


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b2b4b45a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b2b4b45a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b2b4b45a

Branch: refs/heads/4.2
Commit: b2b4b45ae4630d2dba68dc4701f90566bc526d26
Parents: 465ac16
Author: Anthony Xu <an...@citrix.com>
Authored: Wed Nov 20 17:01:53 2013 -0800
Committer: Anthony Xu <an...@citrix.com>
Committed: Wed Nov 20 17:01:53 2013 -0800

----------------------------------------------------------------------
 .../hypervisor/xen/discoverer/XcpServerDiscoverer.java | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b2b4b45a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
index d3a345f..a05456c 100755
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
@@ -312,7 +312,6 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
                 DataCenterVO zone = _dcDao.findById(dcId);
                 boolean securityGroupEnabled = zone.isSecurityGroupEnabled();
                 params.put("securitygroupenabled", Boolean.toString(securityGroupEnabled));
-                details.put("securitygroupenabled", Boolean.toString(securityGroupEnabled));
 
                 params.put("wait", Integer.toString(_wait));
                 details.put("wait", Integer.toString(_wait));
@@ -743,6 +742,18 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
 		return new DeleteHostAnswer(true);
     }
 
+
+    protected HashMap<String, Object> buildConfigParams(HostVO host){
+        HashMap<String, Object> params = super.buildConfigParams(host);
+        DataCenterVO zone = _dcDao.findById(host.getDataCenterId());
+        if ( zone != null ) {
+            boolean securityGroupEnabled = zone.isSecurityGroupEnabled();
+            params.put("securitygroupenabled", Boolean.toString(securityGroupEnabled));
+        }
+        return params;
+    }
+
+
     @Override
     public boolean stop() {
     	_resourceMgr.unregisterResourceStateAdapter(this.getClass().getSimpleName());