java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml | 15 ----
java/code/src/com/redhat/rhn/manager/system/SystemManager.java | 31
----------
java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java | 15 ----
3 files changed, 61 deletions(-)
New commits:
commit d7dc012f485cbd63b97c3ea06e77ddcf34aa3299
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Oct 29 14:14:18 2010 +0200
Operations on rhnSatelliteChannelFamily are not longer called, removing the queries.
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
index 7437492..7f64745 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
@@ -1559,27 +1559,12 @@ INSERT INTO rhnSatelliteInfo (server_id, cert, product, owner,
issued_string, e
</query>
</write-mode>
-<write-mode name="insert_satellite_channel_family">
- <query params="sid, channel_family_label, quantity">
-INSERT INTO rhnSatelliteChannelFamily
- (server_id, channel_family_id, quantity)
-VALUES
- (:sid, (SELECT id FROM rhnChannelFamily WHERE label = :channel_family_label),
:quantity)
- </query>
-</write-mode>
-
<write-mode name="delete_satellite_info">
<query params="sid">
DELETE FROM rhnSatelliteInfo WHERE server_id = :sid
</query>
</write-mode>
-<write-mode name="delete_satellite_channel_family">
- <query params="sid">
-DELETE FROM rhnSatelliteChannelFamily WHERE server_id = :sid
- </query>
-</write-mode>
-
<callable-mode name="remove_from_action">
<query params="server_id, action_id">
{call rhn_server.remove_action(:server_id, :action_id)}
commit f623e5b73e0a889fe23f77bfafa3adb614b25e80
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Oct 29 14:11:52 2010 +0200
Method deactivateSatellite not used (presumably hosted only), removing.
diff --git a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
index b5d99d8..8b9f31f 100644
--- a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
+++ b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
@@ -1498,37 +1498,6 @@ public class SystemManager extends BaseManager {
}
/**
- * Deactivate a current satellite
- * @param server the current satellite to be deactivated
- * @throws NotActivatedSatelliteException <code>server</code> is not a
satellite
- * @throws NoSuchSystemException thrown if the server is null.
- */
- public static void deactivateSatellite(Server server)
- throws NotActivatedSatelliteException, NoSuchSystemException {
- if (server == null) {
- throw new NoSuchSystemException();
- }
-
- if (!server.isSatellite()) {
- throw new NotActivatedSatelliteException();
- }
-
- Map params = new HashMap();
- params.put("sid", server.getId());
- executeWriteMode("System_queries", "delete_satellite_info",
params);
- executeWriteMode("System_queries",
"delete_satellite_channel_family", params);
-
- Set channels = server.getChannels();
- for (Iterator itr = channels.iterator(); itr.hasNext();) {
- Channel c = (Channel)itr.next();
- ChannelFamily cf = c.getChannelFamily();
- if (cf.getLabel().equals("rhn-satellite")) {
- SystemManager.unsubscribeServerFromChannel(server, c);
- }
- }
- }
-
- /**
* Entitles the given server to the given Entitlement.
* @param server Server to be entitled.
* @param ent Level of Entitlement.
diff --git a/java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java
b/java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java
index 85d451b..7a81437 100644
--- a/java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java
@@ -882,21 +882,6 @@ public class SystemManagerTest extends RhnBaseTestCase {
assertNotEmpty(dr);
}
- public void testDeactivateSatellite() throws Exception {
- // Server s = ServerFactory.lookupById(new Long(1007294616));
- Server s = ServerTestUtils.createTestSystem();
- flushAndEvict(s);
- s = (Server) reload(s);
- assertNotNull(s);
- try {
- SystemManager.deactivateSatellite(s);
- fail("Should have thrown an NotActivatedSatelliteException");
- }
- catch (Exception e) {
- // do nothing
- }
- }
-
public void testDeactivateProxy() throws Exception {
User user = UserTestUtils.findNewUser(TestStatics.TESTUSER,
TestStatics.TESTORG);
user.addRole(RoleFactory.ORG_ADMIN);
Show replies by date