java/code/src/com/redhat/rhn/domain/server/Server.java
| 11 ++--------
java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/VirtualGuestsListSetupAction.java
| 2 -
2 files changed, 4 insertions(+), 9 deletions(-)
New commits:
commit 8631578e03a62b7329dab7fa5ff2742f5156c717
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu Mar 4 14:32:32 2010 -0500
514554 - adding back the ability to delete virt guests and fixing entitelment bug
the entitlement bug revolved around the system having its virt entry removed before
calling the delete_system stored procedure, which treated it as a non-virt system. the
fix is simply to delete the virt entry after the stored proc is called
diff --git a/java/code/src/com/redhat/rhn/domain/server/Server.java
b/java/code/src/com/redhat/rhn/domain/server/Server.java
index 098339a..2a6f0cd 100644
--- a/java/code/src/com/redhat/rhn/domain/server/Server.java
+++ b/java/code/src/com/redhat/rhn/domain/server/Server.java
@@ -16,6 +16,7 @@ package com.redhat.rhn.domain.server;
import com.redhat.rhn.common.conf.Config;
import com.redhat.rhn.common.conf.ConfigDefaults;
+import com.redhat.rhn.common.hibernate.HibernateFactory;
import com.redhat.rhn.domain.BaseDomainHelper;
import com.redhat.rhn.domain.Identifiable;
import com.redhat.rhn.domain.channel.Channel;
@@ -1362,14 +1363,8 @@ public class Server extends BaseDomainHelper implements
Identifiable {
* @return <code>true</code> if the guest is deleted,
<code>false</code> otherwise.
*/
public boolean deleteGuest(VirtualInstance guest) {
- boolean deleted = removeGuest(guest);
- log.debug("deleteGuest.deleted? " + deleted);
- // only remove the host from the virtual instance if it belongs to this server
- if (deleted) {
- guest.deleteGuestSystem();
- }
-
- return deleted;
+ guest.deleteGuestSystem();
+ return removeGuest(guest);
}
/**
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/VirtualGuestsListSetupAction.java
b/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/VirtualGuestsListSetupAction.java
index 0309707..6f14d28 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/VirtualGuestsListSetupAction.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/VirtualGuestsListSetupAction.java
@@ -89,7 +89,7 @@ public class VirtualGuestsListSetupAction extends
BaseSystemListSetupAction {
// Set parameter for the actions dropdown:
List actionOptions = new LinkedList();
String [] resourceBundleKeys = {
- //"virtualguestslist.jsp.deletesystem",
+ "virtualguestslist.jsp.deletesystem",
"virtualguestslist.jsp.startsystem",
"virtualguestslist.jsp.suspendsystem",
"virtualguestslist.jsp.resumesystem",
Show replies by date