Allon Mureinik has uploaded a new change for review.

Change subject: core: Remove IsVdsWithSameIpExistsQurey
......................................................................

core: Remove IsVdsWithSameIpExistsQurey

This patch removes the unused IsVdsWithSameIpExistQuery.

Removed in this patch:
1. The IsVdsWithSameIpExistQuery class.
2. The IsVdsWithSameIpExistParameters class only used by the
   aforementioned query.
3. The IsVdsWithSameIpExist constant from VdcQueryType corresponding
   to the aforementioned query.
4. The isVdsWithSameIpExists and isVdsWithSameIpExsitsStatic methods
   in VdsHandler which are no longer in use.

Change-Id: Ife14c2758c8f46b244a32ac67747aecbf9d799b4
Signed-off-by: Allon Mureinik <[email protected]>
---
D 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/IsVdsWithSameIpExistsQuery.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsHandler.java
D 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/IsVdsWithSameIpExistsParameters.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
4 files changed, 0 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/91/13591/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/IsVdsWithSameIpExistsQuery.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/IsVdsWithSameIpExistsQuery.java
deleted file mode 100644
index 79b1ae5..0000000
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/IsVdsWithSameIpExistsQuery.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.ovirt.engine.core.bll;
-
-import org.ovirt.engine.core.common.queries.*;
-
-public class IsVdsWithSameIpExistsQuery<P extends 
IsVdsWithSameIpExistsParameters> extends QueriesCommandBase<P> {
-    public IsVdsWithSameIpExistsQuery(P parameters) {
-        super(parameters);
-    }
-
-    @Override
-    protected void executeQueryCommand() {
-        
getQueryReturnValue().setReturnValue(VdsHandler.isVdsWithSameIpExistsStatic(getParameters().getIpAddress()));
-    }
-}
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsHandler.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsHandler.java
index dc07193..3be4348 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsHandler.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsHandler.java
@@ -1,7 +1,6 @@
 package org.ovirt.engine.core.bll;
 
 import java.util.Arrays;
-import java.util.List;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.exception.ExceptionUtils;
@@ -19,7 +18,6 @@
 import org.ovirt.engine.core.common.vdscommands.VDSReturnValue;
 import org.ovirt.engine.core.compat.Guid;
 import org.ovirt.engine.core.compat.RpmVersion;
-import org.ovirt.engine.core.dal.dbbroker.DbFacade;
 import org.ovirt.engine.core.utils.ObjectIdentityChecker;
 import org.ovirt.engine.core.utils.log.Log;
 import org.ovirt.engine.core.utils.log.LogFactory;
@@ -65,15 +63,6 @@
 
     public static void HandleVdsCpuFlagsOrClusterChanged(Guid vdsId) {
 
-    }
-
-    public boolean isVdsWithSameIpExists(String ipAddress) {
-        return isVdsWithSameIpExistsStatic(ipAddress);
-    }
-
-    public static boolean isVdsWithSameIpExistsStatic(String ipAddress) {
-        List<VdsStatic> vds = 
DbFacade.getInstance().getVdsStaticDao().getAllWithIpAddress(ipAddress);
-        return (vds.size() != 0);
     }
 
     static private boolean isPendingOvirt(VDSType type, VDSStatus status) {
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/IsVdsWithSameIpExistsParameters.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/IsVdsWithSameIpExistsParameters.java
deleted file mode 100644
index 8d57c56..0000000
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/IsVdsWithSameIpExistsParameters.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.ovirt.engine.core.common.queries;
-
-public class IsVdsWithSameIpExistsParameters extends VdcQueryParametersBase {
-    private static final long serialVersionUID = 3967554280743440995L;
-
-    public IsVdsWithSameIpExistsParameters(String ipAddress) {
-        _ipAddress = ipAddress;
-    }
-
-    private String _ipAddress;
-
-    public String getIpAddress() {
-        return _ipAddress;
-    }
-
-    public IsVdsWithSameIpExistsParameters() {
-    }
-}
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
index 1874435..12a2b48 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
@@ -17,7 +17,6 @@
     IsBalloonEnabled(VdcQueryAuthType.User),
 
     // Vds queries
-    IsVdsWithSameIpExists,
     GetVdsByVdsId,
     GetVdsByHost,
     GetVdsByName,


--
To view, visit http://gerrit.ovirt.org/13591
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife14c2758c8f46b244a32ac67747aecbf9d799b4
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to