java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java | 35
----------
java/code/src/com/redhat/rhn/manager/kickstart/KickstartSessionCreateCommand.java | 4
-
2 files changed, 1 insertion(+), 38 deletions(-)
New commits:
commit 7b03b871d88803c262935daac470b696685f7125
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Aug 1 16:23:11 2011 +0200
706416 - do not modify activation key base channel in kickstart stuff
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
index 615c80e..773dd26 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
@@ -44,7 +44,6 @@ import com.redhat.rhn.domain.server.ServerConstants;
import com.redhat.rhn.domain.server.ServerFactory;
import com.redhat.rhn.domain.token.ActivationKey;
import com.redhat.rhn.domain.token.ActivationKeyFactory;
-import com.redhat.rhn.domain.token.Token;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.dto.PackageListItem;
import com.redhat.rhn.frontend.dto.ProfileDto;
@@ -877,22 +876,6 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
}
}
- //fix for bugzilla 450954
- // We set the reactivation key's base channel to whatever
- // an activation key's is set to (assuming there is one)
- Channel chan = null;
- for (Token token : ksdata.getDefaultRegTokens()) {
- if (token.getBaseChannel() != null) {
- chan = token.getBaseChannel();
- break;
- }
- }
- if (chan != null) {
- if (log.isDebugEnabled()) {
- log.debug("Setting reactivation key's base chan to " +
chan.getLabel());
- }
- key.setBaseChannel(chan);
- }
log.debug("** Saving new token");
ActivationKeyFactory.save(key);
log.debug("** Saved new token: " + key.getId());
commit 529b257ec0bead4d768671e78080187ef44da55b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Aug 1 16:19:58 2011 +0200
706416 - do not add automatically tools channel to an activation key
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
index 0c08bdb..615c80e 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
@@ -644,13 +644,6 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
*
*/
private void storeActivationKeyInfo() {
- // The host server will contain the tools channel necessary to kickstart the
- // target system.
- Channel toolsChannel =
- getToolsChannel(this.ksdata, this.user, getHostServer());
- log.debug("** Looked up tools channel: " + toolsChannel.getName());
-
-
// If the target system exists already, remove any existing activation keys
// it might have associated with it.
@@ -694,7 +687,6 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
this.ksdata,
RegistrationType.NONE.equals(regType) ? null : getTargetServer(),
this.kickstartSession,
- toolsChannel,
cfgMgmtFlag,
1L,
note);
@@ -849,7 +841,6 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
* @param ksdata associated with the key
* @param server being kickstarted (can be null)
* @param session associated with the kickstart (NOT NULL)
- * @param toolsChannel containing up2date and autokickstart rpms
* @param deployConfigs if you want to or not
* @param note to add to key
* @param usageLimit to apply to the key. null for unlimited.
@@ -859,7 +850,6 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
KickstartData ksdata,
Server server,
KickstartSession session,
- Channel toolsChannel,
boolean deployConfigs,
Long usageLimit,
String note) {
@@ -887,14 +877,6 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
}
}
- //Only add the toolsChannel to the activation key if it exists.
- //This can happen on a satellite that has synced a base channel
- // but not the tools child channel, or when the kickstart channel
- // is a custom channel. See bug #201561
- if (toolsChannel != null) {
- key.addChannel(toolsChannel);
- }
-
//fix for bugzilla 450954
// We set the reactivation key's base channel to whatever
// an activation key's is set to (assuming there is one)
diff --git
a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartSessionCreateCommand.java
b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartSessionCreateCommand.java
index 2be85ec..baf55a0 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartSessionCreateCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartSessionCreateCommand.java
@@ -91,12 +91,10 @@ public class KickstartSessionCreateCommand {
String note = LocalizationService.getInstance().
getMessage("kickstart.session.newtokennote", " ");
- Channel toolsChannel = KickstartScheduleCommand.getToolsChannel(ksdata, user,
- null);
log.debug("creating one-time-activation key: " + user.getLogin());
ActivationKey key = KickstartScheduleCommand.createKickstartActivationKey(user,
ksdata, null,
- this.ksession, toolsChannel, BooleanUtils.toBoolean(
+ this.ksession, BooleanUtils.toBoolean(
ksdata.getKickstartDefaults().getCfgManagementFlag()), null,
note);
log.debug("added key: " + key.getKey());