java/code
by Brad Buckingham
java/code/webapp/WEB-INF/struts-config.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8e760a06723ed975b1cc5fd60a83f2aca6f55b95
Author: Brad Buckingham <bbuckingham(a)redhat.com>
Date: Fri Apr 3 09:58:02 2009 -0400
493173 - add redirect in struts config for errata/manage/Delete
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 2caf809..5944e97 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -1883,7 +1883,7 @@
<forward name="default"
path="/WEB-INF/pages/errata/delete.jsp" />
<forward name="deleted"
- path="/errata/manage/PublishedErrata.do" />
+ path="/errata/manage/PublishedErrata.do" redirect="true" />
</action>
<action path="/errata/manage/Create"
15 years, 2 months
Branch 'VADER' - java/code
by Brad Buckingham
java/code/webapp/WEB-INF/struts-config.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 21400483fe20cd345e4c7893daaea64c0fdfbb19
Author: Brad Buckingham <bbuckingham(a)redhat.com>
Date: Fri Apr 3 09:58:02 2009 -0400
493173 - add redirect in struts config for errata/manage/Delete
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 2caf809..5944e97 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -1883,7 +1883,7 @@
<forward name="default"
path="/WEB-INF/pages/errata/delete.jsp" />
<forward name="deleted"
- path="/errata/manage/PublishedErrata.do" />
+ path="/errata/manage/PublishedErrata.do" redirect="true" />
</action>
<action path="/errata/manage/Create"
15 years, 2 months
rel-eng/lib
by Devan Goodwin
rel-eng/lib/spacewalk/releng/builder.py | 33 +++++++++++++++++++++-----------
1 file changed, 22 insertions(+), 11 deletions(-)
New commits:
commit d0f0ed6dd59aef4c6fefa5cc5346c115573a769b
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Fri Apr 3 10:26:19 2009 -0300
tito: Fix missing upstream patches in CVS builds.
CVS build code was copying the wrong spec file to CVS, one that did not
have the dynamically generated PatchX lines for upstream builder.
(patches were being included, just not the spec file that applies them)
diff --git a/rel-eng/lib/spacewalk/releng/builder.py b/rel-eng/lib/spacewalk/releng/builder.py
index 67b794e..62e6f95 100644
--- a/rel-eng/lib/spacewalk/releng/builder.py
+++ b/rel-eng/lib/spacewalk/releng/builder.py
@@ -372,14 +372,25 @@ class Builder(object):
# Build the list of all files we will copy from git to CVS.
debug("Searching for git files to copy to CVS:")
- files_to_copy = []
+
+ # Include the spec file explicitly, in the case of SatelliteBuilder
+ # we modify and then use a spec file copy from a different location.
+ files_to_copy = [self.spec_file] # full paths
+ filenames_to_copy = [os.path.basename(self.spec_file)] # just filenames
+
for filename in os.listdir(self.rpmbuild_gitcopy):
- if os.path.isdir(os.path.join(self.rpmbuild_gitcopy, filename)):
+ full_filepath = os.path.join(self.rpmbuild_gitcopy, filename)
+ if os.path.isdir(full_filepath):
# skip it
continue
if filename in CVS_PROTECT_FILES:
debug(" skipping: %s (protected file)" % filename)
continue
+ elif filename.endswith(".spec"):
+ # Skip the spec file, we already copy this explicitly as it
+ # can come from a couple different locations depending on which
+ # builder is in use.
+ continue
# Check if file ends with something this builder subclass wants
# to copy:
@@ -390,7 +401,8 @@ class Builder(object):
continue
if copy_it:
debug(" copying: %s" % filename)
- files_to_copy.append(filename)
+ files_to_copy.append(full_filepath)
+ filenames_to_copy.append(filename)
for branch in self.cvs_branches:
branch_dir = os.path.join(self.cvs_workdir, self.project_name,
@@ -398,9 +410,8 @@ class Builder(object):
os.chdir(branch_dir)
print("Syncing files with CVS branch [%s]" % branch)
for copy_me in files_to_copy:
- source_path = os.path.join(self.rpmbuild_gitcopy,
- copy_me)
- dest_path = os.path.join(branch_dir, copy_me)
+ base_filename = os.path.basename(copy_me)
+ dest_path = os.path.join(branch_dir, base_filename)
# Check if file we're about to copy already exists in CVS so
# we know if we need to run 'cvs add' or not:
@@ -408,19 +419,19 @@ class Builder(object):
if os.path.exists(dest_path):
cvs_add = False
- cmd = "cp %s %s" % (source_path, dest_path)
+ cmd = "cp %s %s" % (copy_me, dest_path)
run_command(cmd)
if cvs_add:
- print(" added: %s" % copy_me)
- commands.getstatusoutput("cvs add %s" % copy_me)
+ print(" added: %s" % base_filename)
+ commands.getstatusoutput("cvs add %s" % base_filename)
else:
- print(" copied: %s" % copy_me)
+ print(" copied: %s" % base_filename)
# Now delete any extraneous files in the CVS branch.
for filename in os.listdir(branch_dir):
if filename not in CVS_PROTECT_FILES and \
- filename not in files_to_copy:
+ filename not in filenames_to_copy:
print(" deleted: %s" % filename)
# Can't delete via full path, must not chdir:
run_command("cvs rm -Rf %s" % filename)
15 years, 2 months
testfile2
by Devan Goodwin
testfile2 | 1 -
1 file changed, 1 deletion(-)
New commits:
commit d1af6060d698bb1388f36e99fcb54d2238de2941
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Fri Apr 3 08:10:14 2009 -0300
Remove testfile2.
Mostly just testing push. :)
diff --git a/testfile2 b/testfile2
deleted file mode 100644
index 7e30ae7..0000000
--- a/testfile2
+++ /dev/null
@@ -1 +0,0 @@
-sigh
15 years, 2 months
Branch 'VADER' - 2 commits - client/tools rel-eng/packages
by Jan Pazdziora
client/tools/rhnpush/rhnpush.spec | 6 +++++-
rel-eng/packages/rhnpush | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit fafbf778652a8c8cd48001d1c70a7f1d73032fea
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Apr 3 11:17:04 2009 +0200
Automatic commit of package [rhnpush] release [5.3.0-1].
diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index d860d11..45cb14f 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -5,7 +5,7 @@ Summary: Common programs needed to be installed on the RHN servers/proxies
Group: Applications/System
License: GPLv2
URL: http://fedorahosted.org/spacewalk
-Version: 0.4.7
+Version: 5.3.0
Release: 1%{?dist}
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -49,6 +49,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/solaris2mpm.8*
%changelog
+* Fri Apr 3 2009 Jan Pazdziora 5.3.0-1
+- bump version to 5.3.0
+
* Wed Apr 01 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 0.4.7-1
- new build for 485880 (pkilambi(a)redhat.com)
- 241221 - add release of the package (if it exists) to Provides (Jan P.)
diff --git a/rel-eng/packages/rhnpush b/rel-eng/packages/rhnpush
index e1e0f3a..b9b6099 100644
--- a/rel-eng/packages/rhnpush
+++ b/rel-eng/packages/rhnpush
@@ -1 +1 @@
-0.4.7-1 client/tools/rhnpush/
+5.3.0-1 client/tools/rhnpush/
commit d3a90c7d7f7a30f85fc71dc03ba2b494bf3a594f
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Apr 3 11:16:31 2009 +0200
rhnpush: add missing %changelog record.
diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index b37c129..d860d11 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -51,6 +51,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Apr 01 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 0.4.7-1
- new build for 485880 (pkilambi(a)redhat.com)
+- 241221 - add release of the package (if it exists) to Provides (Jan P.)
* Wed Apr 1 2009 Pradeep Kilambi <pkilambi(a)redhat.com>
- Resolves: 485880 - missing help and man options for rhnpush - new build
15 years, 2 months
Changes to 'refs/tags/rhnpush-5.3.0-1'
by Jan Pazdziora
Tag 'rhnpush-5.3.0-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2009-04-03 09:17 +0000
Tagging package [rhnpush] version [5.3.0-1] in directory [client/tools/rhnpush/].
Changes since spacewalk-java-0.6.1-1-11:
---
0 files changed
---
15 years, 2 months
2 commits - client/tools rel-eng/packages
by Jan Pazdziora
client/tools/rhnpush/rhnpush.spec | 6 +++++-
rel-eng/packages/rhnpush | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 998e938abc01767c81926e629ddd72c2c8a29389
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Apr 3 11:17:04 2009 +0200
Automatic commit of package [rhnpush] release [5.3.0-1].
diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index d860d11..45cb14f 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -5,7 +5,7 @@ Summary: Common programs needed to be installed on the RHN servers/proxies
Group: Applications/System
License: GPLv2
URL: http://fedorahosted.org/spacewalk
-Version: 0.4.7
+Version: 5.3.0
Release: 1%{?dist}
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -49,6 +49,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/solaris2mpm.8*
%changelog
+* Fri Apr 3 2009 Jan Pazdziora 5.3.0-1
+- bump version to 5.3.0
+
* Wed Apr 01 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 0.4.7-1
- new build for 485880 (pkilambi(a)redhat.com)
- 241221 - add release of the package (if it exists) to Provides (Jan P.)
diff --git a/rel-eng/packages/rhnpush b/rel-eng/packages/rhnpush
index e1e0f3a..b9b6099 100644
--- a/rel-eng/packages/rhnpush
+++ b/rel-eng/packages/rhnpush
@@ -1 +1 @@
-0.4.7-1 client/tools/rhnpush/
+5.3.0-1 client/tools/rhnpush/
commit 39e1b10a16627b2f809c13c901c959f4a4be6fa6
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Apr 3 11:16:31 2009 +0200
rhnpush: add missing %changelog record.
diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index b37c129..d860d11 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -51,6 +51,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Apr 01 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 0.4.7-1
- new build for 485880 (pkilambi(a)redhat.com)
+- 241221 - add release of the package (if it exists) to Provides (Jan P.)
* Wed Apr 1 2009 Pradeep Kilambi <pkilambi(a)redhat.com>
- Resolves: 485880 - missing help and man options for rhnpush - new build
15 years, 2 months
4 commits - rel-eng/build-missing-builds-in-koji.sh rel-eng/tito.props
by Miroslav Suchý
rel-eng/build-missing-builds-in-koji.sh | 17 ++++++++++-------
rel-eng/tito.props | 6 +++---
2 files changed, 13 insertions(+), 10 deletions(-)
New commits:
commit df8392481f54a85e47559e6081ab7485317e3ae2
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Apr 3 09:38:02 2009 +0200
say python to be nice to pipe
python has buffered output by default, that make pipe processing synch.
if we switch off buffering, pipe processing will be asynch.
diff --git a/rel-eng/build-missing-builds-in-koji.sh b/rel-eng/build-missing-builds-in-koji.sh
index d231424..c7f9bb3 100755
--- a/rel-eng/build-missing-builds-in-koji.sh
+++ b/rel-eng/build-missing-builds-in-koji.sh
@@ -6,6 +6,9 @@ pushd `pwd`
cd `dirname $0`/..
+# say python to be nice to pipe
+export PYTHONUNBUFFERED=1
+
for tag in 0 1; do
rel-eng/koji-missing-builds.py --no-extra ${TAGS[$tag]} | \
grep -v oracle-server-admin | \
commit ad58f7abc1904467e1f7b96550fd28e152cb1a08
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Apr 3 09:30:18 2009 +0200
utilize --no-extra
diff --git a/rel-eng/build-missing-builds-in-koji.sh b/rel-eng/build-missing-builds-in-koji.sh
index 5b7879a..d231424 100755
--- a/rel-eng/build-missing-builds-in-koji.sh
+++ b/rel-eng/build-missing-builds-in-koji.sh
@@ -7,7 +7,7 @@ pushd `pwd`
cd `dirname $0`/..
for tag in 0 1; do
- rel-eng/koji-missing-builds.py ${TAGS[$tag]} | \
+ rel-eng/koji-missing-builds.py --no-extra ${TAGS[$tag]} | \
grep -v oracle-server-admin | \
grep -v oracle-server-scripts | \
awk '!/buildsys-macros/ {
commit d965aedbb52adb46a8de4755f4f9f10bb35b13c4
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Apr 3 09:28:24 2009 +0200
build using tito
diff --git a/rel-eng/build-missing-builds-in-koji.sh b/rel-eng/build-missing-builds-in-koji.sh
index 159976b..5b7879a 100755
--- a/rel-eng/build-missing-builds-in-koji.sh
+++ b/rel-eng/build-missing-builds-in-koji.sh
@@ -1,7 +1,6 @@
#!/bin/bash
TAGS=([0]="dist-5E-sw-0.6-candidate" [1]="dist-f10-sw-0.6-candidate")
-DISTS=([0]='.el5' [1]='.fc10')
pushd `pwd`
@@ -9,6 +8,8 @@ cd `dirname $0`/..
for tag in 0 1; do
rel-eng/koji-missing-builds.py ${TAGS[$tag]} | \
+ grep -v oracle-server-admin | \
+ grep -v oracle-server-scripts | \
awk '!/buildsys-macros/ {
if (x==1) { print gensub(" *([a-zA-Z_-]+)-.*", "\\1", "g")}
}
@@ -16,11 +17,10 @@ for tag in 0 1; do
xargs -I replacestring awk '{print $2}' rel-eng/packages/replacestring | \
while read package ; do
(
- echo Building $package for ${TAGS[$tag]}
- cd $package && make srpm DIST=${DISTS[$tag]} | \
- awk '/Wrote:/ {print $2}' | \
- xargs -I packagepath koji -c ~/.koji/spacewalk-config build ${TAGS[$tag]} packagepath
- make upload-tgz
+ echo Building package in path $package
+ cd $package && ${TITO_PATH}tito build --koji-release | \
+ awk '/Wrote:.*tar.gz/ {print $2}' | \
+ xargs -I packagepath scp packagepath fedorahosted.org:spacewalk
)
done
done
commit 13b07f01cb64773c8bc89f9a29680cc9b0b0d9df
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Apr 3 08:57:45 2009 +0200
we are now building for 0.6 by default
diff --git a/rel-eng/tito.props b/rel-eng/tito.props
index ce9e025..570b0aa 100644
--- a/rel-eng/tito.props
+++ b/rel-eng/tito.props
@@ -3,10 +3,10 @@ default_builder = spacewalk.releng.builder.Builder
default_tagger = spacewalk.releng.tagger.VersionTagger
[koji]
-autobuild_tags = dist-f10-sw-0.5-candidate dist-5E-sw-0.5-candidate
+autobuild_tags = dist-f10-sw-0.6-candidate dist-5E-sw-0.6-candidate
-[dist-f10-sw-0.5-candidate]
+[dist-f10-sw-0.6-candidate]
disttag = .fc10
-[dist-5E-sw-0.5-candidate]
+[dist-5E-sw-0.6-candidate]
disttag = .el5
15 years, 2 months
java/code
by Partha Aji
java/code/src/com/redhat/rhn/domain/kickstart/KickstartVirtualizationType.java | 43 +++++++++-
java/code/src/com/redhat/rhn/frontend/action/kickstart/AdvancedModeDetailsAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java | 6 -
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 21 ++++
java/code/src/com/redhat/rhn/manager/kickstart/KickstartWizardHelper.java | 20 +---
java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf | 2
java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp | 2
java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp | 2
9 files changed, 78 insertions(+), 22 deletions(-)
New commits:
commit 884664be295c25d85023078caf41d45e29bf6db7
Author: Partha Aji <paji(a)redhat.com>
Date: Thu Apr 2 18:39:29 2009 -0400
487418- Added a 'None' option to the available virtualization type
We need a clearer way to let the user know how to create a profiles that was not associated to virt. At the same time we needed logic to let user know that the virtual type 'None' could also be used forKVM fully virt.. So we basically changed the KVM Guest to None or KVM guest.. Other changes in this commit include custom ordering and i18nized display...
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartVirtualizationType.java b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartVirtualizationType.java
index 2e9675b..2ed111f 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartVirtualizationType.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartVirtualizationType.java
@@ -14,6 +14,8 @@
*/
package com.redhat.rhn.domain.kickstart;
+import com.redhat.rhn.common.localization.LocalizationService;
+
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
@@ -42,6 +44,35 @@ public class KickstartVirtualizationType
private Date created;
private Date modified;
+ /**
+ * @return the Kickstart Virtualization type associated to xen para virt
+ */
+ public static KickstartVirtualizationType xenPV() {
+ return KickstartFactory.lookupKickstartVirtualizationTypeByLabel(XEN_PARAVIRT);
+ }
+
+ /**
+ * @return the Kickstart Virtualization type associated to xen full virt
+ */
+ public static KickstartVirtualizationType xenFV() {
+ return KickstartFactory.lookupKickstartVirtualizationTypeByLabel(XEN_FULLYVIRT);
+ }
+
+ /**
+ * Note this is presently used for default virt type also..
+ * @return the Kickstart Virtualization type associated to kvm guest
+ */
+ public static KickstartVirtualizationType kvmGuest() {
+ return KickstartFactory.lookupKickstartVirtualizationTypeByLabel(KVM_FULLYVIRT);
+ }
+
+ /**
+ * @return the Kickstart Virtualization type associated to para host
+ */
+ public static KickstartVirtualizationType paraHost() {
+ return KickstartFactory.lookupKickstartVirtualizationTypeByLabel(PARA_HOST);
+ }
+
/**
* Getter for id
* @return Long to get
@@ -134,7 +165,17 @@ public class KickstartVirtualizationType
castOther.getId()).append(this.getLabel(),
castOther.getLabel()).isEquals();
}
-
+ /**
+ * Returns a i18nized name of the passed in virt type.
+ * Mainly used for display purposes
+ * @return the i18nized name..
+ */
+ public String getFormattedName() {
+ LocalizationService ls = LocalizationService.getInstance();
+ String messageId = "kickstart.jsp.virt-type." + getLabel();
+ return ls.getMessage(messageId);
+ }
+
/**
* {@inheritDoc}
*/
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/AdvancedModeDetailsAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/AdvancedModeDetailsAction.java
index ea1fb43..8f1188a 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/AdvancedModeDetailsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/AdvancedModeDetailsAction.java
@@ -175,7 +175,7 @@ public class AdvancedModeDetailsAction extends RhnAction {
if (isCreateMode(context.getRequest())) {
form.set(VIRTUALIZATION_TYPE_LABEL_PARAM,
- KickstartVirtualizationType.XEN_PARAVIRT);
+ KickstartVirtualizationType.KVM_FULLYVIRT);
}
else {
KickstartRawData data = getKsData(context);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java
index 38e1ac8..22b9bc0 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java
@@ -42,7 +42,6 @@ import org.apache.struts.action.DynaActionForm;
import org.cobbler.Distro;
import java.lang.reflect.Method;
-import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -330,7 +329,6 @@ public class CreateProfileWizardAction extends RhnWizardAction {
private void loadVirtualizationTypes(KickstartWizardHelper cmd, DynaActionForm form,
HttpServletRequest request) {
List types = cmd.getVirtualizationTypes();
- Collections.sort(types);
form.set(VIRTUALIZATION_TYPES_PARAM, types);
form.set(VIRTUALIZATION_TYPE_LABEL_PARAM,
KickstartVirtualizationType.KVM_FULLYVIRT);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java
index 643a974..57d776f 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java
@@ -28,6 +28,7 @@ import com.redhat.rhn.frontend.xmlrpc.kickstart.InvalidVirtualizationTypeExcepti
import com.redhat.rhn.manager.kickstart.BaseKickstartCommand;
import com.redhat.rhn.manager.kickstart.KickstartEditCommand;
import com.redhat.rhn.manager.kickstart.KickstartFileDownloadCommand;
+import com.redhat.rhn.manager.kickstart.KickstartWizardHelper;
import com.redhat.rhn.manager.kickstart.cobbler.CobblerProfileCommand;
import com.redhat.rhn.manager.kickstart.cobbler.CobblerProfileEditCommand;
import com.redhat.rhn.manager.kickstart.cobbler.CobblerXMLRPCHelper;
@@ -113,9 +114,10 @@ public class KickstartDetailsEditAction extends BaseKickstartEditAction {
setupCobblerFormValues(ctx, form, cmd.getKickstartData());
-
+ KickstartWizardHelper wizardHelper = new
+ KickstartWizardHelper(ctx.getLoggedInUser());
// Lookup the kickstart virtualization types and pre-select the current one:
- List types = KickstartFactory.lookupVirtualizationTypes();
+ List types = wizardHelper.getVirtualizationTypes();
form.set(VIRTUALIZATION_TYPES, types);
form.set(VIRTUALIZATION_TYPE_LABEL, cmd.getVirtualizationType().getLabel());
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index 68b4e23..8b2e9df 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -11709,6 +11709,27 @@ the <strong>Red Hat Enterprise Linux System Administration Guide.</stro
<context context-type="sourcefile">/rhn/kickstart/CreateProfileWizard.do</context>
</context-group>
</trans-unit>
+
+ <group>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/kickstart/CreateProfileWizard.do</context>
+ </context-group>
+ <trans-unit id="kickstart.jsp.virt-type.para_host">
+ <source>Para-Virtualized Host</source>
+ </trans-unit>
+ <trans-unit id="kickstart.jsp.virt-type.qemu">
+ <source>None Or KVM Virtualized Guest</source>
+ </trans-unit>
+ <trans-unit id="kickstart.jsp.virt-type.xenfv">
+ <source>XEN Fully-Virtualized Guest</source>
+ </trans-unit>
+ <trans-unit id="kickstart.jsp.virt-type.xenpv">
+ <source>XEN Para-Virtualized Guest</source>
+ </trans-unit>
+ </group>
+
+
+
<!-- Activation Keys -->
<group>
<context-group name="ctx">
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartWizardHelper.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartWizardHelper.java
index 63dbfba..da19588 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartWizardHelper.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartWizardHelper.java
@@ -14,7 +14,6 @@
*/
package com.redhat.rhn.manager.kickstart;
-import com.redhat.rhn.common.conf.Config;
import com.redhat.rhn.domain.channel.ChannelFactory;
import com.redhat.rhn.domain.kickstart.KickstartCommand;
import com.redhat.rhn.domain.kickstart.KickstartData;
@@ -70,18 +69,13 @@ public class KickstartWizardHelper {
* Retrieve a list of the valid virtualization types
* @return list of VirtualizationTypes
*/
- public List getVirtualizationTypes() {
- // Filter out KVM if this is Satellite
- List types = KickstartFactory.lookupVirtualizationTypes();
- if (!Config.get().isSpacewalk()) {
- for (int i = 0; i < types.size(); i++) {
- KickstartVirtualizationType type =
- (KickstartVirtualizationType) types.get(i);
- if (type.getLabel().equals(KickstartVirtualizationType.KVM_FULLYVIRT)) {
- types.remove(i);
- }
- }
- }
+ public List<KickstartVirtualizationType> getVirtualizationTypes() {
+ List <KickstartVirtualizationType> types =
+ new LinkedList<KickstartVirtualizationType>();
+ types.add(KickstartVirtualizationType.kvmGuest());
+ types.add(KickstartVirtualizationType.paraHost());
+ types.add(KickstartVirtualizationType.xenPV());
+ types.add(KickstartVirtualizationType.xenFV());
return types;
}
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
index bd8ac29..d321095 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
@@ -33,7 +33,7 @@
<th><bean:message key="kickstart.jsp.create.wizard.virtualization.label" /></th>
<td colspan="2" align="left">
<html:select property="virtualizationTypeLabel">
- <html:optionsCollection property="virtualizationTypes" label="name" value="label" />
+ <html:optionsCollection property="virtualizationTypes" label="formattedName" value="label" />
</html:select>
</td>
</tr>
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp b/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp
index d532c9b..69a2d9c 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp
@@ -42,7 +42,7 @@
<th><bean:message key="kickstartdetails.jsp.virtualization_type" /></th>
<td colspan="2" align="left">
<html:select property="virtualizationTypeLabel">
- <html:optionsCollection property="virtualizationTypes" label="name" value="label" />
+ <html:optionsCollection property="virtualizationTypes" label="formattedName" value="label" />
</html:select><br/>
<span class="small-text"><bean:message key="kickstartdetails.jsp.virtTypeChangeWarning" arg0="${ksdata.id}"/></span>
</td>
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp b/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp
index 5b617d2..791fc51 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp
@@ -85,7 +85,7 @@ function refresh() {
<th width="10%"><bean:message key="kickstart.jsp.create.wizard.virtualization.label" /></th>
<td colspan="2" align="left">
<html:select property="virtualizationTypeLabel">
- <html:optionsCollection property="virtualizationTypes" label="name" value="label" />
+ <html:optionsCollection property="virtualizationTypes" label="formattedName" value="label" />
</html:select>
</td>
</tr>
15 years, 2 months
Branch 'VADER' - java/code
by Partha Aji
java/code/src/com/redhat/rhn/domain/kickstart/KickstartVirtualizationType.java | 43 +++++++++-
java/code/src/com/redhat/rhn/frontend/action/kickstart/AdvancedModeDetailsAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java | 6 -
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 21 ++++
java/code/src/com/redhat/rhn/manager/kickstart/KickstartWizardHelper.java | 20 +---
java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf | 2
java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp | 2
java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp | 2
9 files changed, 78 insertions(+), 22 deletions(-)
New commits:
commit 0fa444a8fa8f9a46a35a2aa5fd187401b173c48f
Author: Partha Aji <paji(a)redhat.com>
Date: Thu Apr 2 18:39:29 2009 -0400
487418- Added a 'None' option to the available virtualization type
We need a clearer way to let the user know how to create a profiles that was not associated to virt. At the same time we needed logic to let user know that the virtual type 'None' could also be used forKVM fully virt.. So we basically changed the KVM Guest to None or KVM guest.. Other changes in this commit include custom ordering and i18nized display...
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartVirtualizationType.java b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartVirtualizationType.java
index 2e9675b..2ed111f 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartVirtualizationType.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartVirtualizationType.java
@@ -14,6 +14,8 @@
*/
package com.redhat.rhn.domain.kickstart;
+import com.redhat.rhn.common.localization.LocalizationService;
+
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
@@ -42,6 +44,35 @@ public class KickstartVirtualizationType
private Date created;
private Date modified;
+ /**
+ * @return the Kickstart Virtualization type associated to xen para virt
+ */
+ public static KickstartVirtualizationType xenPV() {
+ return KickstartFactory.lookupKickstartVirtualizationTypeByLabel(XEN_PARAVIRT);
+ }
+
+ /**
+ * @return the Kickstart Virtualization type associated to xen full virt
+ */
+ public static KickstartVirtualizationType xenFV() {
+ return KickstartFactory.lookupKickstartVirtualizationTypeByLabel(XEN_FULLYVIRT);
+ }
+
+ /**
+ * Note this is presently used for default virt type also..
+ * @return the Kickstart Virtualization type associated to kvm guest
+ */
+ public static KickstartVirtualizationType kvmGuest() {
+ return KickstartFactory.lookupKickstartVirtualizationTypeByLabel(KVM_FULLYVIRT);
+ }
+
+ /**
+ * @return the Kickstart Virtualization type associated to para host
+ */
+ public static KickstartVirtualizationType paraHost() {
+ return KickstartFactory.lookupKickstartVirtualizationTypeByLabel(PARA_HOST);
+ }
+
/**
* Getter for id
* @return Long to get
@@ -134,7 +165,17 @@ public class KickstartVirtualizationType
castOther.getId()).append(this.getLabel(),
castOther.getLabel()).isEquals();
}
-
+ /**
+ * Returns a i18nized name of the passed in virt type.
+ * Mainly used for display purposes
+ * @return the i18nized name..
+ */
+ public String getFormattedName() {
+ LocalizationService ls = LocalizationService.getInstance();
+ String messageId = "kickstart.jsp.virt-type." + getLabel();
+ return ls.getMessage(messageId);
+ }
+
/**
* {@inheritDoc}
*/
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/AdvancedModeDetailsAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/AdvancedModeDetailsAction.java
index ea1fb43..8f1188a 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/AdvancedModeDetailsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/AdvancedModeDetailsAction.java
@@ -175,7 +175,7 @@ public class AdvancedModeDetailsAction extends RhnAction {
if (isCreateMode(context.getRequest())) {
form.set(VIRTUALIZATION_TYPE_LABEL_PARAM,
- KickstartVirtualizationType.XEN_PARAVIRT);
+ KickstartVirtualizationType.KVM_FULLYVIRT);
}
else {
KickstartRawData data = getKsData(context);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java
index 38e1ac8..22b9bc0 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java
@@ -42,7 +42,6 @@ import org.apache.struts.action.DynaActionForm;
import org.cobbler.Distro;
import java.lang.reflect.Method;
-import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -330,7 +329,6 @@ public class CreateProfileWizardAction extends RhnWizardAction {
private void loadVirtualizationTypes(KickstartWizardHelper cmd, DynaActionForm form,
HttpServletRequest request) {
List types = cmd.getVirtualizationTypes();
- Collections.sort(types);
form.set(VIRTUALIZATION_TYPES_PARAM, types);
form.set(VIRTUALIZATION_TYPE_LABEL_PARAM,
KickstartVirtualizationType.KVM_FULLYVIRT);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java
index 643a974..57d776f 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java
@@ -28,6 +28,7 @@ import com.redhat.rhn.frontend.xmlrpc.kickstart.InvalidVirtualizationTypeExcepti
import com.redhat.rhn.manager.kickstart.BaseKickstartCommand;
import com.redhat.rhn.manager.kickstart.KickstartEditCommand;
import com.redhat.rhn.manager.kickstart.KickstartFileDownloadCommand;
+import com.redhat.rhn.manager.kickstart.KickstartWizardHelper;
import com.redhat.rhn.manager.kickstart.cobbler.CobblerProfileCommand;
import com.redhat.rhn.manager.kickstart.cobbler.CobblerProfileEditCommand;
import com.redhat.rhn.manager.kickstart.cobbler.CobblerXMLRPCHelper;
@@ -113,9 +114,10 @@ public class KickstartDetailsEditAction extends BaseKickstartEditAction {
setupCobblerFormValues(ctx, form, cmd.getKickstartData());
-
+ KickstartWizardHelper wizardHelper = new
+ KickstartWizardHelper(ctx.getLoggedInUser());
// Lookup the kickstart virtualization types and pre-select the current one:
- List types = KickstartFactory.lookupVirtualizationTypes();
+ List types = wizardHelper.getVirtualizationTypes();
form.set(VIRTUALIZATION_TYPES, types);
form.set(VIRTUALIZATION_TYPE_LABEL, cmd.getVirtualizationType().getLabel());
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index 68b4e23..8b2e9df 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -11709,6 +11709,27 @@ the <strong>Red Hat Enterprise Linux System Administration Guide.</stro
<context context-type="sourcefile">/rhn/kickstart/CreateProfileWizard.do</context>
</context-group>
</trans-unit>
+
+ <group>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/kickstart/CreateProfileWizard.do</context>
+ </context-group>
+ <trans-unit id="kickstart.jsp.virt-type.para_host">
+ <source>Para-Virtualized Host</source>
+ </trans-unit>
+ <trans-unit id="kickstart.jsp.virt-type.qemu">
+ <source>None Or KVM Virtualized Guest</source>
+ </trans-unit>
+ <trans-unit id="kickstart.jsp.virt-type.xenfv">
+ <source>XEN Fully-Virtualized Guest</source>
+ </trans-unit>
+ <trans-unit id="kickstart.jsp.virt-type.xenpv">
+ <source>XEN Para-Virtualized Guest</source>
+ </trans-unit>
+ </group>
+
+
+
<!-- Activation Keys -->
<group>
<context-group name="ctx">
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartWizardHelper.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartWizardHelper.java
index 63dbfba..da19588 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartWizardHelper.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartWizardHelper.java
@@ -14,7 +14,6 @@
*/
package com.redhat.rhn.manager.kickstart;
-import com.redhat.rhn.common.conf.Config;
import com.redhat.rhn.domain.channel.ChannelFactory;
import com.redhat.rhn.domain.kickstart.KickstartCommand;
import com.redhat.rhn.domain.kickstart.KickstartData;
@@ -70,18 +69,13 @@ public class KickstartWizardHelper {
* Retrieve a list of the valid virtualization types
* @return list of VirtualizationTypes
*/
- public List getVirtualizationTypes() {
- // Filter out KVM if this is Satellite
- List types = KickstartFactory.lookupVirtualizationTypes();
- if (!Config.get().isSpacewalk()) {
- for (int i = 0; i < types.size(); i++) {
- KickstartVirtualizationType type =
- (KickstartVirtualizationType) types.get(i);
- if (type.getLabel().equals(KickstartVirtualizationType.KVM_FULLYVIRT)) {
- types.remove(i);
- }
- }
- }
+ public List<KickstartVirtualizationType> getVirtualizationTypes() {
+ List <KickstartVirtualizationType> types =
+ new LinkedList<KickstartVirtualizationType>();
+ types.add(KickstartVirtualizationType.kvmGuest());
+ types.add(KickstartVirtualizationType.paraHost());
+ types.add(KickstartVirtualizationType.xenPV());
+ types.add(KickstartVirtualizationType.xenFV());
return types;
}
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
index bd8ac29..d321095 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
@@ -33,7 +33,7 @@
<th><bean:message key="kickstart.jsp.create.wizard.virtualization.label" /></th>
<td colspan="2" align="left">
<html:select property="virtualizationTypeLabel">
- <html:optionsCollection property="virtualizationTypes" label="name" value="label" />
+ <html:optionsCollection property="virtualizationTypes" label="formattedName" value="label" />
</html:select>
</td>
</tr>
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp b/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp
index d532c9b..69a2d9c 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/kickstartdetails.jsp
@@ -42,7 +42,7 @@
<th><bean:message key="kickstartdetails.jsp.virtualization_type" /></th>
<td colspan="2" align="left">
<html:select property="virtualizationTypeLabel">
- <html:optionsCollection property="virtualizationTypes" label="name" value="label" />
+ <html:optionsCollection property="virtualizationTypes" label="formattedName" value="label" />
</html:select><br/>
<span class="small-text"><bean:message key="kickstartdetails.jsp.virtTypeChangeWarning" arg0="${ksdata.id}"/></span>
</td>
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp b/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp
index 5b617d2..791fc51 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp
@@ -85,7 +85,7 @@ function refresh() {
<th width="10%"><bean:message key="kickstart.jsp.create.wizard.virtualization.label" /></th>
<td colspan="2" align="left">
<html:select property="virtualizationTypeLabel">
- <html:optionsCollection property="virtualizationTypes" label="name" value="label" />
+ <html:optionsCollection property="virtualizationTypes" label="formattedName" value="label" />
</html:select>
</td>
</tr>
15 years, 2 months