Branch 'ssm-kickstart' - java/code
by Partha Aji
java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKickstartableSystemsAction.java | 11 ---
java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java | 10 +++
java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/profile-list.jspf | 29 ++++++++++
java/code/webapp/WEB-INF/pages/kickstart/ssm/kickstartablesystems.jsp | 25 +-------
java/code/webapp/WEB-INF/pages/kickstart/wizard/schedule/first.jsp | 28 ---------
5 files changed, 43 insertions(+), 60 deletions(-)
New commits:
commit a20096c8201212eacc9e894da1b24447be620ee6
Author: Partha Aji <paji(a)redhat.com>
Date: Wed Jul 1 13:59:14 2009 -0400
Decided to remove distro list from ks systems page
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKickstartableSystemsAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKickstartableSystemsAction.java
index 2971acb..2269ab8 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKickstartableSystemsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKickstartableSystemsAction.java
@@ -15,7 +15,6 @@
package com.redhat.rhn.frontend.action.kickstart.ssm;
import com.redhat.rhn.domain.kickstart.KickstartIpRange;
-import com.redhat.rhn.domain.kickstart.KickstartableTree;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnAction;
@@ -23,7 +22,6 @@ import com.redhat.rhn.frontend.struts.RhnHelper;
import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper;
import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
import com.redhat.rhn.manager.kickstart.KickstartManager;
-import com.redhat.rhn.manager.kickstart.KickstartWizardHelper;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
@@ -40,8 +38,6 @@ import javax.servlet.http.HttpServletResponse;
* @version $Rev$
*/
public class SsmKickstartableSystemsAction extends RhnAction implements Listable {
- private static final String DISTROS = "distros";
- private static final String DISTRO = "distro";
private static final String DISABLE_RANGES = "disableRanges";
/**
* ${@inheritDoc}
@@ -51,13 +47,6 @@ public class SsmKickstartableSystemsAction extends RhnAction implements Listable
RequestContext context = new RequestContext(request);
ListHelper helper = new ListHelper(this, request);
helper.execute();
- KickstartWizardHelper wiz = new
- KickstartWizardHelper(context.getLoggedInUser());
- List <KickstartableTree> trees = wiz.getKickstartableTrees();
- if (trees != null && !trees.isEmpty()) {
- request.setAttribute(DISTROS, trees);
- request.setAttribute(DISTRO, trees.get(0).getId());
- }
List <KickstartIpRange> range = KickstartManager.getInstance().
listIpRanges(context.getLoggedInUser());
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java
index b7893cb..dc2ecbf 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java
@@ -117,9 +117,17 @@ public class KickstartManager extends BaseManager {
* @return the the list of ip ranges accessible to the user.
*/
public List<KickstartIpRange> listIpRanges(User user) {
+ ensureConfigAdmin(user);
+ return KickstartFactory.lookupRangeByOrg(user.getOrg());
+ }
+
+ /**
+ * ensure that the user is a config admin throw perm exception other wise
+ * @param user user object
+ */
+ private void ensureConfigAdmin(User user) {
if (!user.hasRole(RoleFactory.CONFIG_ADMIN)) {
throw new PermissionException(RoleFactory.CONFIG_ADMIN);
}
- return KickstartFactory.lookupRangeByOrg(user.getOrg());
}
}
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/profile-list.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/profile-list.jspf
new file mode 100644
index 0000000..c446249
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/profile-list.jspf
@@ -0,0 +1,29 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
+<%@ taglib uri="http://rhn.redhat.com/tags/list" prefix="rl" %>
+
+ <rl:list width="100%" emptykey = "kickstart.schedule.no.profiles.jsp" alphabarcolumn="label">
+ <rl:decorator name = "PageSizeDecorator"/>
+ <rl:radiocolumn value="${current.cobblerId}" styleclass="first-column"/>
+ <rl:column headerkey="kickstartranges.jsp.profile" filterattr="label" sortable="true" sortattr="label">
+ <a href="${current.cobblerUrl}">${fn:escapeXml(current.label)}</a>
+ </rl:column>
+
+ <rl:column headerkey="kickstart.distro.label.jsp" sortable="true" sortattr="treeLabel">
+ <c:out value="${current.treeLabel}"/>
+ </rl:column>
+
+ <rl:column headerkey="kickstart.distro.sw_managed.jsp" sortable="true" sortattr="cobbler"
+ styleclass="last-column">
+ <c:choose>
+ <c:when test="${current.cobbler}">
+ <img src="/img/rhn-listicon-error.gif">
+ </c:when>
+ <c:otherwise>
+ <img src="/img/rhn-listicon-checked.gif">
+ </c:otherwise>
+ </c:choose>
+ </rl:column>
+ </rl:list>
+ <rhn:tooltip>* - <bean:message key="kickstart.distro.cobbler-only.tooltip"/></rhn:tooltip>
\ No newline at end of file
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/ssm/kickstartablesystems.jsp b/java/code/webapp/WEB-INF/pages/kickstart/ssm/kickstartablesystems.jsp
index 9144772..d12cb9c 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/ssm/kickstartablesystems.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/ssm/kickstartablesystems.jsp
@@ -53,31 +53,12 @@
</th>
<td>
- <input type="radio" name="scheduleManual" value="true" id="manual"
- onclick="form.distroId.disabled = false;" <c:if test="${empty distros}">disabled="true"</c:if>
- <c:if test="${not empty distros and empty param.scheduleManual or param.scheduleManual =='true' }">checked="checked" </c:if> />
+ <input type="radio" name="scheduleManual" value="true"
+ <c:if test="${empty param.scheduleManual or param.scheduleManual =='true' }">checked="checked" </c:if> />
<strong><bean:message key="ssm.kickstartable-systems.jsp.manual-summary"/>:<strong>
<br/>
- <c:choose>
- <c:when test="${empty distros}"><strong><bean:message key="ssm.kickstartable-systems.jsp.notrees"/><strong></c:when>
- <c:otherwise>
- <select name="distro" id="distroId" <c:if test="${empty distros or param.scheduleManual == 'false'}">disabled="true"</c:if> />
- <c:forEach var="dist" items="${distros}">
- <option
- <c:if test="${dist.id == distro}">selected="selected"</c:if>
- value='${dist.id}'>${dist.label}</option>
- </c:forEach>
- </select>
- </c:otherwise>
- </c:choose>
-
- <br />
- <rhn:tooltip>
- <bean:message key="ssm.kickstartable-systems.jsp.distribution-tooltip"/>
- </rhn:tooltip>
- <br /><br />
<input type="radio" name="scheduleManual" value="false" id="ipId"
- onclick="form.distroId.disabled = true;" <c:if test="${empty distros or not empty disableRanges}">disabled="true"</c:if>
+ <c:if test="${not empty disableRanges}">disabled="true"</c:if>
<c:if test="${param.scheduleManual =='false'}">checked="checked" </c:if> />
<strong><bean:message key="ssm.kickstartable-systems.jsp.ip-summary"/></strong>
<br/>
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/wizard/schedule/first.jsp b/java/code/webapp/WEB-INF/pages/kickstart/wizard/schedule/first.jsp
index 84dfbd9..61e2084 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/wizard/schedule/first.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/wizard/schedule/first.jsp
@@ -56,33 +56,9 @@ function setStep(stepName) {
</p>
<c:set var="form" value="${kickstartScheduleWizardForm.map}"/>
-
+<c:set var="regularKS" value="true"/>
<rl:listset name="wizard-form">
- <rl:list width="100%" emptykey = "kickstart.schedule.no.profiles.jsp" alphabarcolumn="label">
- <rl:decorator name = "PageSizeDecorator"/>
- <rl:radiocolumn value="${current.cobblerId}" styleclass="first-column"/>
- <rl:column headerkey="kickstartranges.jsp.profile" filterattr="label" sortable="true" sortattr="label">
- <a href="${current.cobblerUrl}">${fn:escapeXml(current.label)}</a>
- </rl:column>
-
- <rl:column headerkey="kickstart.distro.label.jsp" sortable="true" sortattr="treeLabel">
- <c:out value="${current.treeLabel}"/>
- </rl:column>
-
- <rl:column headerkey="kickstart.distro.sw_managed.jsp" sortable="true" sortattr="cobbler"
- styleclass="last-column">
- <c:choose>
- <c:when test="${current.cobbler}">
- <img src="/img/rhn-listicon-error.gif">
- </c:when>
- <c:otherwise>
- <img src="/img/rhn-listicon-checked.gif">
- </c:otherwise>
- </c:choose>
- </rl:column>
- </rl:list>
- <rhn:tooltip>* - <bean:message key="kickstart.distro.cobbler-only.tooltip"/></rhn:tooltip>
- <c:set var="regularKS" value="true"/>
+ <%@ include file="/WEB-INF/pages/common/fragments/kickstart/schedule/profile-list.jspf" %>
<%@ include file="/WEB-INF/pages/common/fragments/kickstart/schedule/ks-wizard.jspf" %>
</rl:listset>
</div>
14 years, 10 months
client/tools
by Mike McCune
client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py | 35 ++++++-------
1 file changed, 17 insertions(+), 18 deletions(-)
New commits:
commit 934c39bfb1b7c3e28422aecdaa0f16fc0d56e334
Author: Mike McCune <mmccune(a)gibson.pdx.redhat.com>
Date: Wed Jul 1 10:33:05 2009 -0700
508956 - fixing file preservation to actually use updated initrd.img
diff --git a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
index 5908b0e..1439c2f 100644
--- a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
+++ b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
@@ -46,13 +46,13 @@ def initiate(kickstart_host, base, extra_append, static_device=None, system_reco
k.is_virt = 0
k.is_replace = 1
k.is_display = 0
- k.profile = None
+ k.profile = None
if system_record != "":
k.system = system_record
else:
k.system = None
- k.port = 443
+ k.port = 443
k.image = None
k.live_cd = None
k.virt_path = None
@@ -147,26 +147,25 @@ def create_new_rd(initrd, preserve_files=[]):
(err_code, err_string, dict) if problems were found
"""
if not initrd:
- return (3, "Kickstart create new init failed: initrd not found: %s" %
+ return (3, "Kickstart create new init failed: initrd not found: %s" %
initrd, {})
- if preserve_files:
- # quota should be configurable from the UI
- quota = 1000000
- # lame naming below to use /tmp/ks-tres-shadow 2X
- # but needed to get it here the ks.cfg expects it
- preserve_shadow = SHADOW + SHADOW
- # new FileCopier class handles the dirty work of getting the
- # preserved file set copied w/ all permissions, owners, etc
- # kept intact and in the correct location
- c = FileCopier(preserve_files, preserve_shadow, quota=quota)
- try:
- c.copy()
- except QuotaExceeded:
- return (3, "Quota of %s bytes exceeded" % quota, {})
+ # quota should be configurable from the UI
+ quota = 1000000
+ # lame naming below to use /tmp/ks-tres-shadow 2X
+ # but needed to get it here the ks.cfg expects it
+ preserve_shadow = SHADOW + SHADOW
+ # new FileCopier class handles the dirty work of getting the
+ # preserved file set copied w/ all permissions, owners, etc
+ # kept intact and in the correct location
+ c = FileCopier(preserve_files, preserve_shadow, quota=quota)
+ try:
+ c.copy()
+ except QuotaExceeded:
+ return (3, "Quota of %s bytes exceeded" % quota, {})
(status, stdout, stderr) = my_popen([
- "/usr/sbin/merge-rd.sh", initrd, initrd + ".merged", SHADOW])
+ "/usr/sbin/merge-rd.sh", initrd, initrd, SHADOW])
if status:
return (status, 'Error creating the new RAM disk',
_build_error(status, stdout, stderr))
14 years, 10 months
Branch 'VADER' - java/code
by Brad Buckingham
java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 357d8f2728ccddab6f7e8dae8b57f3ffd17b5939
Author: Brad Buckingham <bbuckingham(a)redhat.com>
Date: Wed Jul 1 13:13:55 2009 -0400
509027 - kickstart profile edit - update length of supported kernel and post kernel options
The kernel and post kernel options that could be set from the Kickstart edit
profile page would restrict the user to 64 characters for kernel and
post kernel options. This was too short. In discussing with others, we
decided to increase this limit to 1024 characters vs removing it entirely.
This will still support a real scenario but avoid adding something entirely
bogus in length.
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp b/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp
index 732a03d..c069ade 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp
@@ -77,12 +77,12 @@
</tr>
<tr>
<th><bean:message key="kickstartdetails.jsp.kernel_options"/></th>
- <td><html:text property="kernel_options" maxlength="64" size="32" /></td>
+ <td><html:text property="kernel_options" maxlength="1024" size="32" /></td>
</tr>
<tr>
<th><bean:message key="kickstartdetails.jsp.post_kernel_options"/></th>
- <td><html:text property="post_kernel_options" maxlength="64" size="32" /></td>
+ <td><html:text property="post_kernel_options" maxlength="1024" size="32" /></td>
</tr>
<tr>
14 years, 10 months
Branch 'ssm-kickstart' - java/code
by Partha Aji
java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml | 1
java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java | 2 -
java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKickstartableSystemsAction.java | 8 ++++
java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java | 18 +++++++++
java/code/webapp/WEB-INF/pages/kickstart/ssm/kickstartablesystems.jsp | 16 ++------
java/code/webapp/WEB-INF/struts-config.xml | 20 +++++++++-
6 files changed, 49 insertions(+), 16 deletions(-)
New commits:
commit f5ae83825e7e896759a0f87082778497aa1a0580
Author: Partha Aji <paji(a)redhat.com>
Date: Wed Jul 1 13:17:37 2009 -0400
Code to disable KS by ip range if no iprange is defined
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 107de4d..2ce6af8 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
@@ -52,7 +52,6 @@ SELECT S.id,
ORDER BY UPPER(NVL(S.NAME, '(none)')), S.ID
</query>
<elaborator name="system_overview" />
- <elaborator name="entitlements"/>
</mode>
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java
index f0fe369..2cedb69 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java
@@ -455,7 +455,7 @@ public class KickstartFactory extends HibernateFactory {
* @param org who owns the Kickstart Range
* @return List of Kickstart Ip Ranges if found
*/
- public static List lookupRangeByOrg(Org org) {
+ public static List<KickstartIpRange> lookupRangeByOrg(Org org) {
Session session = null;
session = HibernateFactory.getSession();
return session.getNamedQuery("KickstartIpRange.lookupByOrg")
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKickstartableSystemsAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKickstartableSystemsAction.java
index 349122e..2971acb 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKickstartableSystemsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKickstartableSystemsAction.java
@@ -14,6 +14,7 @@
*/
package com.redhat.rhn.frontend.action.kickstart.ssm;
+import com.redhat.rhn.domain.kickstart.KickstartIpRange;
import com.redhat.rhn.domain.kickstart.KickstartableTree;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.struts.RequestContext;
@@ -41,6 +42,7 @@ import javax.servlet.http.HttpServletResponse;
public class SsmKickstartableSystemsAction extends RhnAction implements Listable {
private static final String DISTROS = "distros";
private static final String DISTRO = "distro";
+ private static final String DISABLE_RANGES = "disableRanges";
/**
* ${@inheritDoc}
*/
@@ -56,6 +58,12 @@ public class SsmKickstartableSystemsAction extends RhnAction implements Listable
request.setAttribute(DISTROS, trees);
request.setAttribute(DISTRO, trees.get(0).getId());
}
+
+ List <KickstartIpRange> range = KickstartManager.getInstance().
+ listIpRanges(context.getLoggedInUser());
+ if (range.isEmpty()) {
+ request.setAttribute(DISABLE_RANGES, Boolean.TRUE);
+ }
return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
}
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java
index 8a0f0da..b7893cb 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java
@@ -18,16 +18,21 @@ import com.redhat.rhn.common.conf.Config;
import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.common.db.datasource.ModeFactory;
import com.redhat.rhn.common.db.datasource.SelectMode;
+import com.redhat.rhn.common.security.PermissionException;
import com.redhat.rhn.common.util.download.DownloadException;
import com.redhat.rhn.common.util.download.DownloadUtils;
import com.redhat.rhn.common.validator.ValidatorException;
import com.redhat.rhn.domain.kickstart.KickstartData;
+import com.redhat.rhn.domain.kickstart.KickstartFactory;
+import com.redhat.rhn.domain.kickstart.KickstartIpRange;
+import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.dto.SystemOverview;
import com.redhat.rhn.manager.BaseManager;
import java.util.Collections;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
/**
@@ -104,4 +109,17 @@ public class KickstartManager extends BaseManager {
params.put("user_id", user.getId());
return makeDataResult(params, Collections.EMPTY_MAP, null, m);
}
+
+ /**
+ * returns a list of IP ranges accessible to the
+ * user
+ * @param user the current user needed for org information
+ * @return the the list of ip ranges accessible to the user.
+ */
+ public List<KickstartIpRange> listIpRanges(User user) {
+ if (!user.hasRole(RoleFactory.CONFIG_ADMIN)) {
+ throw new PermissionException(RoleFactory.CONFIG_ADMIN);
+ }
+ return KickstartFactory.lookupRangeByOrg(user.getOrg());
+ }
}
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/ssm/kickstartablesystems.jsp b/java/code/webapp/WEB-INF/pages/kickstart/ssm/kickstartablesystems.jsp
index ca8fdd6..9144772 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/ssm/kickstartablesystems.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/ssm/kickstartablesystems.jsp
@@ -38,18 +38,10 @@
<!-- Base Channel Column -->
<rl:column sortable="false"
bound="false"
- headerkey="systemlist.jsp.channel" >
+ headerkey="systemlist.jsp.channel"
+ styleclass="last-column" >
<%@ include file="/WEB-INF/pages/common/fragments/channel/channel_list_fragment.jspf" %>
</rl:column>
-
- <!-- Entitlement Column -->
- <rl:column sortable="false"
- bound="false"
- headerkey="systemlist.jsp.entitlement"
- styleclass="last-column center"
- headerclass="thin-column">
- <c:out value="${current.entitlementLevel}" escapeXml="false"/>
- </rl:column>
</rl:list>
<h2><bean:message key="ssm.kickstartable-systems.jsp.systems"/></h2>
<p><bean:message key="ssm.kickstartable-systems.jsp.systems.summary"/></p>
@@ -85,8 +77,8 @@
</rhn:tooltip>
<br /><br />
<input type="radio" name="scheduleManual" value="false" id="ipId"
- onclick="form.distroId.disabled = true;"
- <c:if test="${empty distros or param.scheduleManual =='false'}">checked="checked" </c:if> />
+ onclick="form.distroId.disabled = true;" <c:if test="${empty distros or not empty disableRanges}">disabled="true"</c:if>
+ <c:if test="${param.scheduleManual =='false'}">checked="checked" </c:if> />
<strong><bean:message key="ssm.kickstartable-systems.jsp.ip-summary"/></strong>
<br/>
<rhn:tooltip>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index c48ec5e..d0013ff 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -4612,13 +4612,29 @@
<set-property property="acls" value="org_entitlement(rhn_provisioning); user_role(config_admin)"/>
<forward name="default"
path="/WEB-INF/pages/kickstart/ssm/kickstartablesystems.jsp"/>
+ <forward name="scheduleByIp"
+ path="/ssm/kickstart/ScheduleByIp.do"/>
+ <forward name="scheduleByProfile"
+ path="/ssm/kickstart/ScheduleByProfile.do"/>
+ </action>
+ <action path="/ssm/kickstart/ScheduleByProfile"
+ scope="request"
+ input="/WEB-INF/pages/kickstart/ssm/schedule.jsp"
+ type="com.redhat.rhn.frontend.action.kickstart.ssm.SsmKSScheduleAction"
+ parameter="profile"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ <set-property property="acls" value="org_entitlement(rhn_provisioning); user_role(config_admin)"/>
+ <forward name="default"
+ path="/WEB-INF/pages/kickstart/ssm/schedule.jsp"/>
<forward name="success"
- path="/ssm/kickstart/Schedule.do"/>
+ path="/ssm/kickstart/KickstartableSystems.do"/>
</action>
- <action path="/ssm/kickstart/Schedule"
+
+ <action path="/ssm/kickstart/ScheduleByIp"
scope="request"
input="/WEB-INF/pages/kickstart/ssm/schedule.jsp"
type="com.redhat.rhn.frontend.action.kickstart.ssm.SsmKSScheduleAction"
+ parameter="ip"
className="com.redhat.rhn.frontend.struts.RhnActionMapping">
<set-property property="acls" value="org_entitlement(rhn_provisioning); user_role(config_admin)"/>
<forward name="default"
14 years, 10 months
java/code
by Brad Buckingham
java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 1147de6f3feabc790c0dfe541dabdb7a4a6576bb
Author: Brad Buckingham <bbuckingham(a)redhat.com>
Date: Wed Jul 1 13:13:55 2009 -0400
509027 - kickstart profile edit - update length of supported kernel and post kernel options
The kernel and post kernel options that could be set from the Kickstart edit
profile page would restrict the user to 64 characters for kernel and
post kernel options. This was too short. In discussing with others, we
decided to increase this limit to 1024 characters vs removing it entirely.
This will still support a real scenario but avoid adding something entirely
bogus in length.
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp b/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp
index eca73ce..e8f40ae 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp
@@ -71,12 +71,12 @@
</tr>
<tr>
<th><bean:message key="kickstartdetails.jsp.kernel_options"/></th>
- <td><html:text property="kernel_options" maxlength="64" size="32" /></td>
+ <td><html:text property="kernel_options" maxlength="1024" size="32" /></td>
</tr>
<tr>
<th><bean:message key="kickstartdetails.jsp.post_kernel_options"/></th>
- <td><html:text property="post_kernel_options" maxlength="64" size="32" /></td>
+ <td><html:text property="post_kernel_options" maxlength="1024" size="32" /></td>
</tr>
<tr>
14 years, 10 months
backend/satellite_tools
by Pradeep Kilambi
backend/satellite_tools/satsync.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 93d3696df45e3267e00db4bdf23d0a8dec0e6ac2
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Wed Jul 1 13:02:50 2009 -0400
509181 - The config cert defaults to hosted if specified instead of master. This fix should override the hosted options when using iss settings
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 4504517..cc39ac6 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -2129,7 +2129,8 @@ def processCommandline():
CFG.set("ISS_PARENT", None)
else:
CFG.set("ISS_PARENT", OPTIONS.iss_parent or CFG.ISS_PARENT)
- CFG.set("ISS_CA_CHAIN", OPTIONS.ca_cert or CFG.CA_CHAIN)
+ CFG.set("ISS_CA_CHAIN", OPTIONS.ca_cert or CFG.ISS_CA_CHAIN or CFG.CA_CHAIN)
+
CFG.set("HTTP_PROXY", OPTIONS.http_proxy or CFG.HTTP_PROXY)
CFG.set("HTTP_PROXY_USERNAME", OPTIONS.http_proxy_username or CFG.HTTP_PROXY_USERNAME)
CFG.set("HTTP_PROXY_PASSWORD", OPTIONS.http_proxy_password or CFG.HTTP_PROXY_PASSWORD)
14 years, 10 months
Branch 'VADER' - backend/satellite_tools
by Pradeep Kilambi
backend/satellite_tools/satsync.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit a5225cddb0671a8f11f6c52dafc6bbe0af6b23da
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Wed Jul 1 13:02:50 2009 -0400
509181 - The config cert defaults to hosted if specified instead of master. This fix should override the hosted options when using iss settings
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 4504517..cc39ac6 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -2129,7 +2129,8 @@ def processCommandline():
CFG.set("ISS_PARENT", None)
else:
CFG.set("ISS_PARENT", OPTIONS.iss_parent or CFG.ISS_PARENT)
- CFG.set("ISS_CA_CHAIN", OPTIONS.ca_cert or CFG.CA_CHAIN)
+ CFG.set("ISS_CA_CHAIN", OPTIONS.ca_cert or CFG.ISS_CA_CHAIN or CFG.CA_CHAIN)
+
CFG.set("HTTP_PROXY", OPTIONS.http_proxy or CFG.HTTP_PROXY)
CFG.set("HTTP_PROXY_USERNAME", OPTIONS.http_proxy_username or CFG.HTTP_PROXY_USERNAME)
CFG.set("HTTP_PROXY_PASSWORD", OPTIONS.http_proxy_password or CFG.HTTP_PROXY_PASSWORD)
14 years, 10 months
Branch 'VADER' - java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java | 11 ++++++++++
1 file changed, 11 insertions(+)
New commits:
commit eb16d36b04ba0e2f4880024fbe7ac66ee3db6033
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Jul 1 11:10:07 2009 -0400
unit test fixes
diff --git a/java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java b/java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java
index 140a30d..28805e7 100644
--- a/java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java
@@ -69,6 +69,11 @@ public class ActivationKeyManagerTest extends BaseTestCaseWithUser {
public void testDeployConfig() throws Exception {
UserTestUtils.addUserRole(user, RoleFactory.ACTIVATION_KEY_ADMIN);
UserTestUtils.addProvisioning(user.getOrg());
+
+ //need a tools channel for config deploy
+ Channel base = ChannelTestUtils.createBaseChannel(user);
+ ChannelTestUtils.setupBaseChannelForVirtualization(user, base);
+
ActivationKey key = createActivationKey();
//Create a config channel
ConfigChannel cc = ConfigTestUtils.createConfigChannel(user.getOrg());
@@ -85,6 +90,12 @@ public class ActivationKeyManagerTest extends BaseTestCaseWithUser {
UserTestUtils.addUserRole(user, RoleFactory.ACTIVATION_KEY_ADMIN);
UserTestUtils.addProvisioning(user.getOrg());
ActivationKey key = createActivationKey();
+
+ //need a tools channel for config deploy
+ Channel base = ChannelTestUtils.createBaseChannel(user);
+ ChannelTestUtils.setupBaseChannelForVirtualization(user, base);
+
+
try {
key.setDeployConfigs(true);
fail("Permission exception not raised");
14 years, 10 months
java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java | 11 ++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 8ea6c8d33398b802f723d700378ae7f5c6ea5568
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Jul 1 11:10:07 2009 -0400
unit test fixes
diff --git a/java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java b/java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java
index 140a30d..28805e7 100644
--- a/java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java
@@ -69,6 +69,11 @@ public class ActivationKeyManagerTest extends BaseTestCaseWithUser {
public void testDeployConfig() throws Exception {
UserTestUtils.addUserRole(user, RoleFactory.ACTIVATION_KEY_ADMIN);
UserTestUtils.addProvisioning(user.getOrg());
+
+ //need a tools channel for config deploy
+ Channel base = ChannelTestUtils.createBaseChannel(user);
+ ChannelTestUtils.setupBaseChannelForVirtualization(user, base);
+
ActivationKey key = createActivationKey();
//Create a config channel
ConfigChannel cc = ConfigTestUtils.createConfigChannel(user.getOrg());
@@ -85,6 +90,12 @@ public class ActivationKeyManagerTest extends BaseTestCaseWithUser {
UserTestUtils.addUserRole(user, RoleFactory.ACTIVATION_KEY_ADMIN);
UserTestUtils.addProvisioning(user.getOrg());
ActivationKey key = createActivationKey();
+
+ //need a tools channel for config deploy
+ Channel base = ChannelTestUtils.createBaseChannel(user);
+ ChannelTestUtils.setupBaseChannelForVirtualization(user, base);
+
+
try {
key.setDeployConfigs(true);
fail("Permission exception not raised");
14 years, 10 months
Branch 'VADER' - java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java | 13 +++++-----
1 file changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 3cc35baa52b612e29a7455349b5d39bbb0d8da2d
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Jul 1 11:01:33 2009 -0400
unit test fixes
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java
index 2d8d53a..e8a5486 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java
@@ -22,6 +22,7 @@ import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.frontend.action.kickstart.KickstartPackageProfileSetupAction;
import com.redhat.rhn.frontend.dto.ProfileDto;
import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.taglibs.list.ListTagHelper;
import com.redhat.rhn.manager.profile.test.ProfileManagerTest;
import com.redhat.rhn.testing.RhnMockStrutsTestCase;
import com.redhat.rhn.testing.TestUtils;
@@ -52,21 +53,21 @@ public class KickstartPackageProfileActionTest extends RhnMockStrutsTestCase {
user.addRole(RoleFactory.ORG_ADMIN);
setRequestPathInfo("/kickstart/KickstartPackageProfileEdit");
actionPerform();
- verifyPageList(ProfileDto.class);
- assertNotNull(request.getAttribute(RequestContext.KICKSTART));
+ assertNotNull(request.getParameter(RequestContext.KICKSTART_ID));
}
public void testSubmit() throws Exception {
assertNull(ksdata.getKickstartDefaults().getProfile());
user.addRole(RoleFactory.ORG_ADMIN);
Profile p = ProfileManagerTest.createProfileWithServer(user);
- addSelectedItem(p.getId());
- addDispatchCall(KickstartPackageProfileSetupAction.UPDATE_METHOD);
- setRequestPathInfo("/kickstart/KickstartPackageProfileEditSubmit");
+ ksdata.getKickstartDefaults().setProfile(p);
+ addDispatchCall(KickstartPackageProfileSetupAction.CLEAR_METHOD);
+ setRequestPathInfo("/kickstart/KickstartPackageProfileEdit");
actionPerform();
// Gotta make sure we can update the profile to the same entry twice
actionPerform();
- assertNotNull(ksdata.getKickstartDefaults().getProfile());
+ ksdata = (KickstartData) TestUtils.reload(ksdata);
+ assertNull(ksdata.getKickstartDefaults().getProfile());
setRequestPathInfo("/kickstart/KickstartPackageProfileEdit");
// Need to test that the SetupAction works after we
// add the profile to the Kickstart
14 years, 10 months