Changes to 'refs/tags/spacewalk-java-1.7.45-1'
by Šimon Lukašík
Tag 'spacewalk-java-1.7.45-1' created by Simon Lukasik <slukasik(a)redhat.com> at 2012-02-27 22:19 +0000
Tagging package [spacewalk-java] version [1.7.45-1] in directory [java/].
Changes since spacewalk-schema-1.7.44-1:
Simon Lukasik (1):
Automatic commit of package [spacewalk-java] release [1.7.45-1].
---
java/spacewalk-java.spec | 6 +++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
---
12 years, 3 months
java/spacewalk-java.spec rel-eng/packages
by Šimon Lukašík
java/spacewalk-java.spec | 6 +++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 0f302a1fbef62f5f2e1b35bd22ca8017c9022e5b
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Mon Feb 27 23:19:15 2012 +0100
Automatic commit of package [spacewalk-java] release [1.7.45-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 3c13f01..a26876d 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -17,7 +17,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.7.44
+Version: 1.7.45
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -585,6 +585,10 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Mon Feb 27 2012 Simon Lukasik <slukasik(a)redhat.com> 1.7.45-1
+- OpenSCAP integration -- Frontend API for scan schedule. (slukasik(a)redhat.com)
+- checkstyle: allow Copyright 2012. (slukasik(a)redhat.com)
+
* Mon Feb 27 2012 Tomas Lestach <tlestach(a)redhat.com> 1.7.44-1
- remove redundant interfaces (tlestach(a)redhat.com)
- remove redundant assignments (tlestach(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 0d0f2bf..2c8cb9c 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.7.44-1 java/
+1.7.45-1 java/
12 years, 3 months
Changes to 'refs/tags/spacewalk-schema-1.7.44-1'
by Šimon Lukašík
Tag 'spacewalk-schema-1.7.44-1' created by Simon Lukasik <slukasik(a)redhat.com> at 2012-02-27 22:17 +0000
Tagging package [spacewalk-schema] version [1.7.44-1] in directory [schema/spacewalk/].
Changes since spacewalk-java-1.7.44-1:
Simon Lukasik (9):
Do not require libxml2-python
checkstyle: allow Copyright 2012.
OpenSCAP integration -- Database schema.
OpenSCAP integration -- Database schema upgrade.
OpenSCAP integration -- Frontend API for scan schedule.
OpenSCAP integration -- Backend API interface.
OpenSCAP integration -- Client package.
OpenSCAP integration -- Spacewalk reports.
Automatic commit of package [spacewalk-schema] release [1.7.44-1].
---
backend/server/action/Makefile | 2
backend/server/action/scap.py | 40 ++
backend/server/action_extra_data/Makefile | 2
backend/server/action_extra_data/scap.py | 148 ++++++++++
client/debian/rhn-client-tools/debian/control | 2
client/rhel/rhn-client-tools/rhn-client-tools.spec | 1
client/rhel/spacewalk-oscap/Makefile | 6
client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap | 28 +
client/rhel/spacewalk-oscap/scap.py | 70 ++++
client/rhel/spacewalk-oscap/spacewalk-oscap.spec | 44 ++
client/rhel/spacewalk-oscap/xccdf-resume.xslt | 96 ++++++
java/buildconf/LICENSE.txt | 2
java/code/src/com/redhat/rhn/domain/action/ActionFactory.java | 7
java/code/src/com/redhat/rhn/domain/action/Action_legacyUser.hbm.xml | 9
java/code/src/com/redhat/rhn/domain/action/scap/ScapAction.java | 40 ++
java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.hbm.xml | 21 +
java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.java | 102 ++++++
java/code/src/com/redhat/rhn/frontend/xmlrpc/handler-manifest.xml | 1
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/scap/SystemScapHandler.java | 60 ++++
java/code/src/com/redhat/rhn/manager/action/ActionManager.java | 30 ++
rel-eng/packages/spacewalk-schema | 2
reporting/reports/data/scap-scan | 43 ++
reporting/reports/data/scap-scan-results | 33 ++
reporting/reports/data/system-history | 6
reporting/reports/data/system-history-scap | 44 ++
schema/spacewalk/common/data/rhnActionType.sql | 3
schema/spacewalk/common/data/rhnXccdfRuleresultType.sql | 33 ++
schema/spacewalk/common/tables/rhnActionScap.sql | 43 ++
schema/spacewalk/common/tables/rhnXccdfBenchmark.sql | 32 ++
schema/spacewalk/common/tables/rhnXccdfIdent.sql | 34 ++
schema/spacewalk/common/tables/rhnXccdfIdentsystem.sql | 31 ++
schema/spacewalk/common/tables/rhnXccdfProfile.sql | 32 ++
schema/spacewalk/common/tables/rhnXccdfRuleresult.sql | 35 ++
schema/spacewalk/common/tables/rhnXccdfRuleresultType.sql | 31 ++
schema/spacewalk/common/tables/rhnXccdfTestresult.sql | 49 +++
schema/spacewalk/common/tables/tables.deps | 4
schema/spacewalk/oracle/procs/lookup_xccdf_benchmark.sql | 39 ++
schema/spacewalk/oracle/procs/lookup_xccdf_ident.sql | 51 +++
schema/spacewalk/oracle/procs/lookup_xccdf_profile.sql | 39 ++
schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql | 124 ++++++++
schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql | 48 +++
schema/spacewalk/postgres/procs/lookup_xccdf_profile.sql | 40 ++
schema/spacewalk/spacewalk-schema.spec | 29 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/080-rhnActionType_data.sql | 3
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/081-rhnActionScap.sql.oracle | 28 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/081-rhnActionScap.sql.postgresql | 21 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/082-rhnXccdfBenchmark.sql.oracle | 18 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/082-rhnXccdfBenchmark.sql.postgresql | 14
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/083-rhnXccdfProfile.sql.oracle | 18 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/083-rhnXccdfProfile.sql.postgresql | 14
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/084-rhnXccdfIdentsystem.sql.oracle | 17 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/084-rhnXccdfIdentsystem.sql.postgresql | 13
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/085-rhnXccdfIdent.sql.oracle | 20 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/085-rhnXccdfIdent.sql.postgresql | 16 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/086-rhnXccdfTestresult.sql.oracle | 35 ++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/086-rhnXccdfTestresult.sql.postgresql | 30 ++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/087-rhnXccdfRuleresultType.sql.oracle | 17 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/087-rhnXccdfRuleresultType.sql.postgresql | 13
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/088-rhnXccdfRuleresultType_data.sql | 19 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/089-rhnXccdfRuleresult.sql.oracle | 21 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/089-rhnXccdfRuleresult.sql.postgresql | 18 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/090-lookup_xccdf_benchmark.sql.oracle | 25 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/090-lookup_xccdf_benchmark.sql.postgresql | 26 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/091-lookup_xccdf_profile.sql.oracle | 25 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/091-lookup_xccdf_profile.sql.postgresql | 26 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/092-lookup_xccdf_ident.sql.oracle | 37 ++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/092-lookup_xccdf_ident.sql.postgresql | 34 ++
67 files changed, 2036 insertions(+), 8 deletions(-)
---
12 years, 3 months
rel-eng/packages schema/spacewalk
by Šimon Lukašík
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 29 ++++++++++++++++++++++++++++-
2 files changed, 29 insertions(+), 2 deletions(-)
New commits:
commit 0da6fcbdd5a39bd33e704d69ab219e420733d749
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Mon Feb 27 23:17:24 2012 +0100
Automatic commit of package [spacewalk-schema] release [1.7.44-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 5a3d08b..4523141 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.7.43-1 schema/spacewalk/
+1.7.44-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index 3df08bc..2554798 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -2,7 +2,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.7.43
+Version: 1.7.44
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -66,6 +66,33 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Mon Feb 27 2012 Simon Lukasik <slukasik(a)redhat.com> 1.7.44-1
+- OpenSCAP integration -- Database schema upgrade. (slukasik(a)redhat.com)
+- OpenSCAP integration -- Database schema. (slukasik(a)redhat.com)
+- update postgresql procs dependencies (mzazrivec(a)redhat.com)
+- use coalesce and proper quoting (mzazrivec(a)redhat.com)
+- lookup_config_filename: postgresql schema upgrade script
+ (mzazrivec(a)redhat.com)
+- use pg_dblink_exec to execute insert inside lookup_config_filename
+ (mzazrivec(a)redhat.com)
+- lookup_config_filename: schema upgrade script (mzazrivec(a)redhat.com)
+- restrict autonomous_transaction to insert only (mzazrivec(a)redhat.com)
+- use 'select into strict' (mzazrivec(a)redhat.com)
+- lookup_client_capability: schema upgrade script (mzazrivec(a)redhat.com)
+- use pg_dblink_exec to execute insert inside lookup_client_capability
+ (mzazrivec(a)redhat.com)
+- lookup_client_capability: oracle schema upgrade script (mzazrivec(a)redhat.com)
+- restrict autonomous_transaction to insert only (mzazrivec(a)redhat.com)
+- lookup_checksum: schema upgrade files (mzazrivec(a)redhat.com)
+- use pg_dblink_exec to execute insert inside lookup_checksum
+ (mzazrivec(a)redhat.com)
+- restrict autonomous_transaction to insert only (mzazrivec(a)redhat.com)
+- pg_dblink_exec: schema upgrade script (mzazrivec(a)redhat.com)
+- weird schema-source-sanity-check.pl checks (mzazrivec(a)redhat.com)
+- fix checksum header (mzazrivec(a)redhat.com)
+- Introduce pg_dblink_exec for executing SQL queries in a separate db
+ connection (mzazrivec(a)redhat.com)
+
* Mon Feb 27 2012 Jan Pazdziora 1.7.43-1
- All Oracle triggers now have their PostgreSQL counterparts.
12 years, 3 months
8 commits - backend/server client/debian client/rhel java/buildconf java/code reporting/reports schema/spacewalk
by Šimon Lukašík
backend/server/action/Makefile | 2
backend/server/action/scap.py | 40 ++
backend/server/action_extra_data/Makefile | 2
backend/server/action_extra_data/scap.py | 148 ++++++++++
client/debian/rhn-client-tools/debian/control | 2
client/rhel/rhn-client-tools/rhn-client-tools.spec | 1
client/rhel/spacewalk-oscap/Makefile | 6
client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap | 28 +
client/rhel/spacewalk-oscap/scap.py | 70 ++++
client/rhel/spacewalk-oscap/spacewalk-oscap.spec | 44 ++
client/rhel/spacewalk-oscap/xccdf-resume.xslt | 96 ++++++
java/buildconf/LICENSE.txt | 2
java/code/src/com/redhat/rhn/domain/action/ActionFactory.java | 7
java/code/src/com/redhat/rhn/domain/action/Action_legacyUser.hbm.xml | 9
java/code/src/com/redhat/rhn/domain/action/scap/ScapAction.java | 40 ++
java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.hbm.xml | 21 +
java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.java | 102 ++++++
java/code/src/com/redhat/rhn/frontend/xmlrpc/handler-manifest.xml | 1
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/scap/SystemScapHandler.java | 60 ++++
java/code/src/com/redhat/rhn/manager/action/ActionManager.java | 30 ++
reporting/reports/data/scap-scan | 43 ++
reporting/reports/data/scap-scan-results | 33 ++
reporting/reports/data/system-history | 6
reporting/reports/data/system-history-scap | 44 ++
schema/spacewalk/common/data/rhnActionType.sql | 3
schema/spacewalk/common/data/rhnXccdfRuleresultType.sql | 33 ++
schema/spacewalk/common/tables/rhnActionScap.sql | 43 ++
schema/spacewalk/common/tables/rhnXccdfBenchmark.sql | 32 ++
schema/spacewalk/common/tables/rhnXccdfIdent.sql | 34 ++
schema/spacewalk/common/tables/rhnXccdfIdentsystem.sql | 31 ++
schema/spacewalk/common/tables/rhnXccdfProfile.sql | 32 ++
schema/spacewalk/common/tables/rhnXccdfRuleresult.sql | 35 ++
schema/spacewalk/common/tables/rhnXccdfRuleresultType.sql | 31 ++
schema/spacewalk/common/tables/rhnXccdfTestresult.sql | 49 +++
schema/spacewalk/common/tables/tables.deps | 4
schema/spacewalk/oracle/procs/lookup_xccdf_benchmark.sql | 39 ++
schema/spacewalk/oracle/procs/lookup_xccdf_ident.sql | 51 +++
schema/spacewalk/oracle/procs/lookup_xccdf_profile.sql | 39 ++
schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql | 124 ++++++++
schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql | 48 +++
schema/spacewalk/postgres/procs/lookup_xccdf_profile.sql | 40 ++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/080-rhnActionType_data.sql | 3
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/081-rhnActionScap.sql.oracle | 28 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/081-rhnActionScap.sql.postgresql | 21 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/082-rhnXccdfBenchmark.sql.oracle | 18 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/082-rhnXccdfBenchmark.sql.postgresql | 14
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/083-rhnXccdfProfile.sql.oracle | 18 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/083-rhnXccdfProfile.sql.postgresql | 14
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/084-rhnXccdfIdentsystem.sql.oracle | 17 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/084-rhnXccdfIdentsystem.sql.postgresql | 13
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/085-rhnXccdfIdent.sql.oracle | 20 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/085-rhnXccdfIdent.sql.postgresql | 16 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/086-rhnXccdfTestresult.sql.oracle | 35 ++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/086-rhnXccdfTestresult.sql.postgresql | 30 ++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/087-rhnXccdfRuleresultType.sql.oracle | 17 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/087-rhnXccdfRuleresultType.sql.postgresql | 13
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/088-rhnXccdfRuleresultType_data.sql | 19 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/089-rhnXccdfRuleresult.sql.oracle | 21 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/089-rhnXccdfRuleresult.sql.postgresql | 18 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/090-lookup_xccdf_benchmark.sql.oracle | 25 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/090-lookup_xccdf_benchmark.sql.postgresql | 26 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/091-lookup_xccdf_profile.sql.oracle | 25 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/091-lookup_xccdf_profile.sql.postgresql | 26 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/092-lookup_xccdf_ident.sql.oracle | 37 ++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/092-lookup_xccdf_ident.sql.postgresql | 34 ++
65 files changed, 2007 insertions(+), 6 deletions(-)
New commits:
commit d603d4b8bf5117563ac1e73b107ab71dd93bca8a
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Mon Feb 27 15:58:43 2012 +0100
OpenSCAP integration -- Spacewalk reports.
diff --git a/reporting/reports/data/scap-scan b/reporting/reports/data/scap-scan
new file mode 100644
index 0000000..20c74f4
--- /dev/null
+++ b/reporting/reports/data/scap-scan
@@ -0,0 +1,43 @@
+
+synopsis:
+
+ Results of OpenSCAP xccdf eval
+
+description:
+
+ For each system, list xccdf scans performed.
+
+columns:
+
+ system_id:i System identifier
+ event_id:i Event id
+ testresult_id:i Testresult identifier
+ name Identifier of xccdf testresult
+ benchmark Name of the xccdf benchmark
+ benchmark_version Version of xccdf benchmark
+ profile Name of the xccdf profile
+ profile_title Title of the xccdf profile
+ end_time System time of finished scan
+
+multival_columns:
+
+sql:
+
+ select system_id, event_id, testresult_id, name, benchmark, benchmark_version,
+ profile, profile_title, end_time from (
+ select rhnxccdftestresult.server_id as system_id,
+ rhnactionscap.action_id as event_id,
+ rhnxccdftestresult.id as testresult_id,
+ rhnxccdftestresult.identifier as name,
+ rhnxccdfbenchmark.identifier as benchmark,
+ rhnxccdfbenchmark.version as benchmark_version,
+ rhnxccdfprofile.identifier as profile,
+ rhnxccdfprofile.title as profile_title,
+ to_char(rhnxccdftestresult.end_time, 'YYYY-MM-DD HH24:MI:SS') as end_time
+ from rhnxccdftestresult, rhnactionscap, rhnxccdfbenchmark, rhnxccdfprofile
+ where rhnxccdftestresult.action_scap_id = rhnactionscap.id
+ and rhnxccdftestresult.benchmark_id = rhnxccdfbenchmark.id
+ and rhnxccdftestresult.profile_id = rhnxccdfprofile.id
+ ) X
+ -- where placeholder
+ order by system_id, event_id
diff --git a/reporting/reports/data/scap-scan-results b/reporting/reports/data/scap-scan-results
new file mode 100644
index 0000000..ce2f824
--- /dev/null
+++ b/reporting/reports/data/scap-scan-results
@@ -0,0 +1,33 @@
+
+synopsis:
+
+ Results of OpenSCAP xccdf eval
+
+description:
+
+ For each scan, list identifiers and results of xccdf rules.
+
+columns:
+
+ testresult_id:i Testresult identifier
+ system Naming scheme for the identifier
+ ident Identifier of the xccdf rule
+ result Result of the check
+
+multival_columns:
+
+sql:
+
+ select testresult_id, system, ident, result from (
+ select rhnxccdftestresult.id as testresult_id,
+ rhnxccdfidentsystem.system as system,
+ rhnxccdfident.identifier as ident,
+ rhnxccdfruleresulttype.label as result
+ from rhnxccdftestresult, rhnxccdfruleresult, rhnxccdfruleresulttype, rhnxccdfident, rhnxccdfidentsystem
+ where rhnxccdftestresult.id = rhnxccdfruleresult.testresult_id
+ and rhnxccdfruleresult.result_id = rhnxccdfruleresulttype.id
+ and rhnxccdfruleresult.ident_id = rhnxccdfident.id
+ and rhnxccdfident.identsystem_id = rhnxccdfidentsystem.id
+ ) X
+ -- where placeholder
+ order by testresult_id, system, ident
diff --git a/reporting/reports/data/system-history b/reporting/reports/data/system-history
index d03932f..98da181 100755
--- a/reporting/reports/data/system-history
+++ b/reporting/reports/data/system-history
@@ -43,6 +43,12 @@ sql:
and rhnkickstartsessionhistory.kickstart_session_id = rhnkickstartsession.id
and rhnkickstartsession.kickstart_id = rhnksdata.id
)
+ when rhnactiontype.label = 'scap.xccdf_eval' then (
+ select rhnxccdftestresult.identifier
+ from rhnxccdftestresult, rhnactionscap
+ where rhnaction.id = rhnactionscap.action_id
+ and rhnxccdftestresult.action_scap_id = rhnactionscap.id
+ )
end as event_data
from rhnserveraction left outer join rhnactionerrataupdate
on rhnserveraction.action_id = rhnactionerrataupdate.action_id
diff --git a/reporting/reports/data/system-history-scap b/reporting/reports/data/system-history-scap
new file mode 100644
index 0000000..e1b638a
--- /dev/null
+++ b/reporting/reports/data/system-history-scap
@@ -0,0 +1,44 @@
+
+synopsis:
+
+ OpenSCAP event history
+
+description:
+
+ OpenSCAP event history.
+
+columns:
+
+ server_id:i System identifier
+ event_id:i Event id
+ created_date Date created
+ earliest_action Earliest date this action will occur
+ pickup_date The date/time the action was picked up
+ completed_date The date/time the event was completed
+ status Status of the event
+ event Type of the event
+ event_data Identifier of xccdf testresult
+
+multival_columns:
+
+sql:
+ select server_id, event_id, created_date, earliest_action, pickup_date, completed_date, status, event, event_data from (
+ select rhnserveraction.server_id,
+ rhnserveraction.action_id as event_id,
+ to_char(rhnaction.created, 'YYYY-MM-DD HH24:MI:SS') as created_date,
+ rhnaction.created as created_raw_date,
+ to_char(rhnaction.earliest_action, 'YYYY-MM-DD HH24:MI:SS') as earliest_action,
+ to_char(rhnserveraction.pickup_time, 'YYYY-MM-DD HH24:MI:SS') as pickup_date,
+ to_char(rhnserveraction.completion_time, 'YYYY-MM-DD HH24:MI:SS') as completed_date,
+ rhnactionstatus.name as status,
+ rhnactiontype.name as event,
+ rhnxccdftestresult.identifier as event_data
+ from rhnserveraction, rhnaction, rhnactiontype, rhnactionstatus, rhnactionscap, rhnxccdftestresult
+ where rhnserveraction.action_id = rhnaction.id
+ and rhnaction.action_type = rhnactiontype.id
+ and rhnserveraction.status = rhnactionstatus.id
+ and rhnactionscap.action_id = rhnaction.id
+ and rhnxccdftestresult.action_scap_id = rhnactionscap.id
+ ) X
+ -- where placeholder
+ order by server_id, created_raw_date, event_id
commit bc3166d7e113c59aee6d04d36f821baa279f9809
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Mon Feb 27 11:45:33 2012 +0100
OpenSCAP integration -- Client package.
diff --git a/client/rhel/spacewalk-oscap/Makefile b/client/rhel/spacewalk-oscap/Makefile
new file mode 100644
index 0000000..31d9890
--- /dev/null
+++ b/client/rhel/spacewalk-oscap/Makefile
@@ -0,0 +1,6 @@
+NAME := spacewalk-oscap
+
+SPECFILE = $(NAME).spec
+DO_TAR_GZ := git-tree-sha1
+
+include ../../../rel-eng/Makefile
diff --git a/client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap b/client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap
new file mode 100644
index 0000000..cbb8d72
--- /dev/null
+++ b/client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap
@@ -0,0 +1,28 @@
+# Makefuile for spacewalk-oscap
+#
+
+ACTIONS = scap
+PYFILES = $(addsuffix .py, $(ACTIONS)) $(addsuffix .pyc, $(ACTIONS))
+XSLT = xccdf-resume.xslt
+OBJECTS = $(PYFILES) $(XSLT)
+
+PREFIX ?=
+ACTIONDIR = $(PREFIX)/usr/share/rhn/actions
+XSLTDIR = $(PREFIX)/usr/share/openscap/xsl
+INSTALL = /usr/bin/install -c
+FILE = -m 644
+DIR = -m 755 --verbose -d
+
+
+all: $(OBJECTS)
+
+%.pyc: %.py
+ python -c "import py_compile; py_compile.compile('$<')"
+
+install: all
+ $(INSTALL) $(DIR) $(ACTIONDIR) $(XSLTDIR)
+ $(INSTALL) $(FILE) $(PYFILES) $(ACTIONDIR)
+ $(INSTALL) $(FILE) $(XSLT) $(XSLTDIR)
+
+clean:
+ @rm -rf *.pyc *~ .*~
diff --git a/client/rhel/spacewalk-oscap/scap.py b/client/rhel/spacewalk-oscap/scap.py
new file mode 100644
index 0000000..55ba2a1
--- /dev/null
+++ b/client/rhel/spacewalk-oscap/scap.py
@@ -0,0 +1,70 @@
+
+import os
+import sys
+import subprocess
+import xml.sax
+import tempfile
+from base64 import encodestring
+sys.path.append("/usr/share/rhn/")
+from up2date_client import up2dateLog
+
+__rhnexport__ = [ 'xccdf_eval' ]
+
+log = up2dateLog.initLog()
+
+def xccdf_eval(args, cache_only=None):
+ if cache_only:
+ return (0, 'no-ops for caching', {})
+
+ results_file = tempfile.NamedTemporaryFile()
+ oscap_err = _run_oscap(['xccdf', 'eval', '--results', results_file.name]
+ + args['params'].split(' ') + [args['path']])
+ if not _assert_xml(results_file.name):
+ return (1, 'oscap tool did not produce valid xml.')
+
+ ret, resume, xslt_err = _xccdf_resume(results_file.name)
+ os.unlink(results_file.name)
+ if ret != 0 or resume == '':
+ return (1, 'Problems with extracting resume:\n' + xslt_err, {})
+ return (0, 'openscap scan completed', {
+ 'resume': encodestring(resume),
+ 'errors': encodestring(oscap_err + xslt_err)
+ })
+
+def _run_oscap(arguments):
+ c = _popen(['/usr/bin/oscap'] + arguments)
+ ret = c.wait()
+ errors = c.stderr.read()
+ if ret != 0:
+ errors += 'xccdf_eval: oscap tool returned %i\n' % ret
+ log.log_debug('The oscap tool completed\n%s' % errors)
+ return errors
+
+def _xccdf_resume(results_file):
+ xslt = '/usr/share/openscap/xsl/xccdf-resume.xslt'
+ c = _popen(['/usr/bin/xsltproc', xslt, results_file])
+ ret = c.wait()
+ errors = c.stderr.read()
+ if ret != 0:
+ errors += 'xccdf_eval: xsltproc tool returned %i\n' % ret
+ log.log_debug('The xsltproc tool completed:\n%s' % errors)
+ return ret, c.stdout.read(), errors
+
+def _popen(args):
+ log.log_debug('Running: ' + str(args))
+ return subprocess.Popen(args, bufsize=-1, stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
+
+def _assert_xml(filename):
+ with open(filename, 'rb') as f:
+ try:
+ xml.sax.parse(f, xml.sax.ContentHandler())
+ return True
+ except:
+ return False
+
+if __name__ == "__main__":
+ print xccdf_eval({
+ 'params': '--profile united_states_government_configuration_baseline',
+ 'path': 'usgcb-rhel5desktop-xccdf.xml'
+ })
diff --git a/client/rhel/spacewalk-oscap/spacewalk-oscap.spec b/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
new file mode 100644
index 0000000..b67ad0b
--- /dev/null
+++ b/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
@@ -0,0 +1,44 @@
+Name: spacewalk-oscap
+Version: 0.0.1
+Release: 1%{?dist}
+Summary: OpenSCAP plug-in for rhn-check
+
+Group: Applications/System
+License: GPLv2
+URL: https://fedorahosted.org/spacewalk
+Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+BuildRequires: python-devel
+BuildRequires: rhnlib
+Requires: openscap-utils
+Requires: libxslt
+Requires: rhnlib
+Requires: rhn-check
+%description
+spacewalk-oscap is a plug-in fro rhn-check. With this plugin, user is able
+to run OpenSCAP scan from Spacewalk or RHN Satellite server.
+
+%prep
+%setup -q
+
+
+%build
+make -f Makefile.spacewalk-oscap
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make -f Makefile.spacewalk-oscap install PREFIX=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%{_datadir}/rhn/actions/scap.*
+%{_datadir}/openscap/xsl/xccdf-resume.xslt
+
+
+%changelog
diff --git a/client/rhel/spacewalk-oscap/xccdf-resume.xslt b/client/rhel/spacewalk-oscap/xccdf-resume.xslt
new file mode 100644
index 0000000..9af59cd
--- /dev/null
+++ b/client/rhel/spacewalk-oscap/xccdf-resume.xslt
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2012 Red Hat Inc., Durham, North Carolina. All Rights Reserved.
+
+This library is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the Free
+Software Foundation; either version 2.1 of the License.
+
+This library is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+details.
+
+You should have received a copy of the GNU Lesser General Public License along
+with this library; if not, write to the Free Software Foundation, Inc., 59
+Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Authors:
+ Simon Lukasik <slukasik(a)redhat.com>
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:cdf="http://checklists.nist.gov/xccdf/1.1">
+ <xsl:output method="xml" encoding="UTF-8"/>
+
+ <xsl:template match="/">
+ <benchmark-resume>
+ <xsl:apply-templates select="cdf:Benchmark"/>
+ </benchmark-resume>
+ </xsl:template>
+
+ <xsl:template match="cdf:Benchmark">
+ <xsl:copy-of select="@id"/>
+ <xsl:attribute name="version">
+ <xsl:value-of select="normalize-space(cdf:version/text())"/>
+ </xsl:attribute>
+ <xsl:apply-templates select="cdf:Profile"/>
+ <xsl:apply-templates select="cdf:TestResult"/>
+ </xsl:template>
+
+ <xsl:template match="cdf:Profile">
+ <profile>
+ <xsl:attribute name="title">
+ <xsl:value-of select="normalize-space(cdf:title/text())"/>
+ </xsl:attribute>
+ <xsl:copy-of select="@id"/>
+ <xsl:attribute name="description">
+ <xsl:value-of select="normalize-space(cdf:description[@xml:lang='en-US']/text())"/>
+ </xsl:attribute>
+ </profile>
+ </xsl:template>
+
+ <xsl:template match="cdf:TestResult">
+ <TestResult>
+ <xsl:copy-of select="@id"/>
+ <xsl:copy-of select="@start-time"/>
+ <xsl:copy-of select="@end-time"/>
+ <pass>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'pass']"/>
+ </pass>
+ <fail>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'fail']"/>
+ </fail>
+ <error>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'error']"/>
+ </error>
+ <unknown>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'unknown']"/>
+ </unknown>
+ <notapplicable>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'notapplicable']"/>
+ </notapplicable>
+ <notchecked>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'notchecked']"/>
+ </notchecked>
+ <notselected>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'notselected']"/>
+ </notselected>
+ <informational>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'informational']"/>
+ </informational>
+ <fixed>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'fixed']"/>
+ </fixed>
+ </TestResult>
+ </xsl:template>
+
+ <xsl:template match="cdf:rule-result">
+ <xsl:apply-templates select="cdf:ident"/>
+ </xsl:template>
+
+ <xsl:template match="cdf:ident">
+ <ident>
+ <xsl:copy-of select="@system"/>
+ <xsl:value-of select="normalize-space(text())"/>
+ </ident>
+ </xsl:template>
+</xsl:stylesheet>
commit d487d1266231178e8e8a27e27f99d69a7d71bb59
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Sat Feb 25 14:07:13 2012 +0100
OpenSCAP integration -- Backend API interface.
diff --git a/backend/server/action/Makefile b/backend/server/action/Makefile
index dfbf414..764d73c 100644
--- a/backend/server/action/Makefile
+++ b/backend/server/action/Makefile
@@ -7,7 +7,7 @@ SUBDIR = server/action
SPACEWALK_FILES = __init__ configfiles kickstart kickstart_guest packages errata hardware reboot \
rollback activation solarispkgs script rhnsd rhn_applet virt kickstart_host \
- utils
+ utils scap
include $(TOP)/Makefile.defs
diff --git a/backend/server/action/scap.py b/backend/server/action/scap.py
new file mode 100644
index 0000000..1503b64
--- /dev/null
+++ b/backend/server/action/scap.py
@@ -0,0 +1,40 @@
+#
+# Copyright (c) 2012 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+
+from spacewalk.common.rhnLog import log_debug
+from spacewalk.server import rhnSQL
+from spacewalk.server.rhnLib import InvalidAction
+
+__rhnexport__ = ['xccdf_eval']
+
+def xccdf_eval(server_id, action_id, dry_run=0):
+ log_debug(3)
+ statement = """
+ select path, parameters
+ from rhnActionScap
+ where action_id = :action_id"""
+ h = rhnSQL.prepare(statement)
+ h.execute(action_id=action_id)
+ dict = h.fetchone_dict()
+ if not dict:
+ raise InvalidAction("scap.xccdf_eval: Unknown action id "
+ "%s for server %s" % (action_id, server_id))
+ data = {
+ 'params': dict['parameters'],
+ 'path': dict['path']}
+ return ({
+ 'path': dict['path'],
+ 'params': rhnSQL.read_lob(dict['parameters'])
+ },)
diff --git a/backend/server/action_extra_data/Makefile b/backend/server/action_extra_data/Makefile
index 7658f08..d64e2a3 100644
--- a/backend/server/action_extra_data/Makefile
+++ b/backend/server/action_extra_data/Makefile
@@ -6,7 +6,7 @@ TOP = ../..
SUBDIR = server/action_extra_data
SPACEWALK_FILES = __init__ configfiles kickstart kickstart_guest packages errata hardware reboot \
- rollback up2date_config solarispkgs script rhnsd rhn_applet virt kickstart_host
+ rollback up2date_config solarispkgs script rhnsd rhn_applet virt kickstart_host scap
include $(TOP)/Makefile.defs
diff --git a/backend/server/action_extra_data/scap.py b/backend/server/action_extra_data/scap.py
new file mode 100644
index 0000000..956a946
--- /dev/null
+++ b/backend/server/action_extra_data/scap.py
@@ -0,0 +1,148 @@
+#
+# Copyright (c) 2012 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+import xml.dom.minidom
+from base64 import decodestring
+from spacewalk.common.rhnLog import log_debug, log_error
+from spacewalk.server import rhnSQL
+
+__rhnexport__ = ['xccdf_eval']
+
+def xccdf_eval(server_id, action_id, data={}):
+ log_debug(3)
+ h = rhnSQL.prepare(_query_clear_tresult)
+ h.execute(server_id=server_id, action_id=action_id)
+ if not data:
+ log_debug(4, "No data sent by client")
+ return
+
+ for item in ('resume', 'errors'):
+ data[item] = decodestring(data[item])
+
+ resume = xml.dom.minidom.parseString(data['resume'])
+ benchmark = resume.getElementsByTagName('benchmark-resume')[0]
+ profiles = benchmark.getElementsByTagName('profile')
+ testresults = benchmark.getElementsByTagName('TestResult')
+ if len(profiles) < 1 or len(testresults) < 1:
+ log_error('Scap report misses profile or testresult element')
+ return
+ if len(profiles) != 1 or len(testresults) != 1:
+ log_error('Scap report containst multiple results',
+ len(profiles), len(testresults))
+ _process_testresult(testresults[0], server_id, action_id, benchmark,
+ profiles[0], data['errors'])
+
+
+def _process_testresult(tr, server_id, action_id, benchmark, profile, errors):
+ start_time = None
+ if tr.hasAttribute('start-time'):
+ start_time = tr.getAttribute('start-time')
+
+ h = rhnSQL.prepare(_query_insert_tresult, blob_map={'errors': 'errors'})
+ h.execute(server_id=server_id,
+ action_id=action_id,
+ bench_id=benchmark.getAttribute('id'),
+ bench_version=benchmark.getAttribute('version'),
+ profile_id=profile.getAttribute('id'),
+ profile_title=profile.getAttribute('title'),
+ identifier=tr.getAttribute('id'),
+ start_time=start_time.replace('T',' '),
+ end_time=tr.getAttribute('end-time').replace('T', ' '),
+ errors=errors
+ )
+ h = rhnSQL.prepare(_query_get_tresult)
+ h.execute(server_id=server_id, action_id=action_id)
+ _process_ruleresults(h.fetchone()[0], tr)
+
+def _process_ruleresults(testresult_id, tr):
+ inserts = {'tr_id': [], 'system': [], 'ident': [], 'type': []}
+ for rule_result in tr.childNodes:
+ for ident in rule_result.childNodes:
+ inserts['tr_id'].append(testresult_id)
+ inserts['system'].append(ident.getAttribute('system'))
+ inserts['ident'].append(_get_text(ident))
+ inserts['type'].append(rule_result.nodeName)
+ log_error(inserts)
+ for i in ['tr_id', 'system', 'ident', 'type']:
+ log_error(i, len(inserts[i]))
+ _store_ruleresults(inserts)
+
+def _store_ruleresults(data):
+ h = rhnSQL.prepare(_query_insert_ruleresult)
+ rowcount = h.execute_bulk(data)
+ log_debug(5, "Inserted xccdf_ruleresults rows:", rowcount)
+
+def _get_text(node):
+ rc = []
+ for node in node.childNodes:
+ if node.nodeType == node.TEXT_NODE:
+ rc.append(node.data)
+ return ''.join(rc)
+
+_query_clear_tresult = rhnSQL.Statement("""
+delete from rhnXccdfTestresult
+ where server_id = :server_id
+ and action_scap_id = (
+ select id from rhnActionScap
+ where action_id = :action_id)
+""")
+
+_query_insert_tresult = rhnSQL.Statement("""
+insert into rhnXccdfTestresult(
+ id,
+ server_id,
+ action_scap_id,
+ benchmark_id,
+ profile_id,
+ identifier,
+ start_time,
+ end_time,
+ errors)
+values (
+ sequence_nextval('rhn_xccdf_tresult_id_seq'),
+ :server_id,
+ (select ras.id
+ from rhnActionScap ras
+ where ras.action_id = :action_id),
+ lookup_xccdf_benchmark(:bench_id, :bench_version),
+ lookup_xccdf_profile(:profile_id, :profile_title),
+ :identifier,
+ TO_TIMESTAMP(:start_time, 'YYYY-MM-DD HH24:MI:SS'),
+ TO_TIMESTAMP(:end_time, 'YYYY-MM-DD HH24:MI:SS'),
+ :errors
+ )
+""")
+
+_query_get_tresult = rhnSQL.Statement("""
+select id from rhnXccdfTestresult
+ where server_id = :server_id
+ and action_scap_id = (
+ select ras.id
+ from rhnActionScap ras
+ where ras.action_id = :action_id
+ )
+""")
+
+_query_insert_ruleresult = rhnSQL.Statement("""
+insert into rhnXccdfRuleresult (testresult_id, ident_id, result_id)
+values (
+ :tr_id,
+ lookup_xccdf_ident(:system, :ident),
+ (select rt.id
+ from rhnXccdfRuleresultType rt
+ where rt.label = :type)
+ )
+""")
commit d9b781560b64d32cc0695f5cc94df1110465122c
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Thu Feb 23 13:19:10 2012 +0100
OpenSCAP integration -- Frontend API for scan schedule.
diff --git a/java/code/src/com/redhat/rhn/domain/action/ActionFactory.java b/java/code/src/com/redhat/rhn/domain/action/ActionFactory.java
index b09d0d3..aeda70c 100644
--- a/java/code/src/com/redhat/rhn/domain/action/ActionFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/action/ActionFactory.java
@@ -32,6 +32,7 @@ import com.redhat.rhn.domain.action.kickstart.KickstartInitiateGuestAction;
import com.redhat.rhn.domain.action.kickstart.KickstartScheduleSyncAction;
import com.redhat.rhn.domain.action.rhnpackage.PackageAction;
import com.redhat.rhn.domain.action.rhnpackage.PackageActionDetails;
+import com.redhat.rhn.domain.action.scap.ScapAction;
import com.redhat.rhn.domain.action.script.ScriptActionDetails;
import com.redhat.rhn.domain.action.script.ScriptRunAction;
import com.redhat.rhn.domain.action.server.ServerAction;
@@ -363,6 +364,9 @@ public class ActionFactory extends HibernateFactory {
else if (typeIn.equals(TYPE_VIRTUALIZATION_GUEST_SUBSCRIBE_TO_TOOLS_CHANNEL)) {
retval = new KickstartGuestToolsChannelSubscriptionAction();
}
+ else if (typeIn.equals(TYPE_SCAP_XCCDF_EVAL)) {
+ retval = new ScapAction();
+ }
else {
retval = new Action();
@@ -998,6 +1002,9 @@ public class ActionFactory extends HibernateFactory {
public static final ActionType TYPE_VIRTUALIZATION_GUEST_SUBSCRIBE_TO_TOOLS_CHANNEL =
lookupActionTypeByLabel("kickstart_guest.add_tools_channel");
+ public static final ActionType TYPE_SCAP_XCCDF_EVAL =
+ lookupActionTypeByLabel("scap.xccdf_eval");
+
public static final String TXN_OPERATION_INSERT = "insert";
public static final String TXN_OPERATION_DELETE = "delete";
diff --git a/java/code/src/com/redhat/rhn/domain/action/Action_legacyUser.hbm.xml b/java/code/src/com/redhat/rhn/domain/action/Action_legacyUser.hbm.xml
index 768512e..abb3aea 100644
--- a/java/code/src/com/redhat/rhn/domain/action/Action_legacyUser.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/action/Action_legacyUser.hbm.xml
@@ -226,6 +226,15 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
discriminator-value="197542" lazy="true">
</subclass>
+ <!-- ScapActions: 50 -->
+ <subclass name="com.redhat.rhn.domain.action.scap.ScapAction"
+ discriminator-value="50" lazy="true">
+ <one-to-one name="scapActionDetails"
+ class="com.redhat.rhn.domain.action.scap.ScapActionDetails"
+ outer-join="false" cascade="all" constrained="false"
+ property-ref="parentAction"/>
+ </subclass>
+
<!-- ScriptActions: 30 -->
<subclass
name="com.redhat.rhn.domain.action.script.ScriptRunAction"
diff --git a/java/code/src/com/redhat/rhn/domain/action/scap/ScapAction.java b/java/code/src/com/redhat/rhn/domain/action/scap/ScapAction.java
new file mode 100644
index 0000000..fa60f09
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/domain/action/scap/ScapAction.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2012 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.domain.action.scap;
+
+import com.redhat.rhn.domain.action.Action;
+/**
+ * ScapAction - Class representing TYPE_SCAP_*.
+ * @version $Rev$
+ */
+public class ScapAction extends Action {
+
+ private ScapActionDetails scapActionDetails;
+
+ /**
+ * @return Returns the scapActionDetails.
+ */
+ public ScapActionDetails getScapActionDetails() {
+ return scapActionDetails;
+ }
+
+ /**
+ * @param scapActionDetailsIn The scapActionDetails to set.
+ */
+ public void setScapActionDetails(ScapActionDetails scapActionDetailsIn) {
+ scapActionDetailsIn.setParentAction(this);
+ scapActionDetails = scapActionDetailsIn;
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.hbm.xml b/java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.hbm.xml
new file mode 100644
index 0000000..7e98cfd
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.hbm.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping
+PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="com.redhat.rhn.domain.action.scap.ScapActionDetails"
+ table="rhnActionScap" >
+ <id name="id" type="long" column="id">
+ <meta attribute="scope-set">protected</meta>
+ <generator class="sequence">
+ <param name="sequence">RHN_ACT_SCAP_ID_SEQ</param>
+ </generator>
+ </id>
+
+ <property name="path" type="string" column="path" />
+ <property name="parameters" type="binary" column="parameters" />
+ <many-to-one name="parentAction" column="action_id"
+ class="com.redhat.rhn.domain.action.Action" outer-join="true"
+ not-null="true" insert="true" update="false" />
+ </class>
+</hibernate-mapping>
diff --git a/java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.java b/java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.java
new file mode 100644
index 0000000..c7f87cd
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/domain/action/scap/ScapActionDetails.java
@@ -0,0 +1,102 @@
+/**
+ * Copyright (c) 2012 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.domain.action.scap;
+
+import com.redhat.rhn.common.hibernate.HibernateFactory;
+import com.redhat.rhn.domain.action.ActionChild;
+
+/**
+ * ScapActionDetails
+ * @version $Rev$
+ */
+public class ScapActionDetails extends ActionChild {
+
+ private Long id;
+ private String path;
+ private byte[] parameters;
+
+ /**
+ * ScapActionDetails constructor.
+ * @param pathIn New setting for the path.
+ * @param parametersIn New setting for the parameters.
+ */
+ public ScapActionDetails(String pathIn, String parametersIn) {
+ super();
+ this.setPath(pathIn);
+ this.setParameters(parametersIn);
+ }
+
+ /**
+ * Set the path to the main scap content.
+ * @param pathIn New setting for the path.
+ */
+ public void setPath(String pathIn) {
+ path = pathIn;
+ }
+
+ /**
+ * Get the path to the scap content.
+ * @return The path settings.
+ */
+ public String getPath() {
+ return path;
+ }
+
+ /**
+ * Set the additional parameters for the oscap tool.
+ * @param parametersIn New setting for the parameters.
+ */
+ public void setParameters(String parametersIn) {
+ parameters = HibernateFactory.stringToByteArray(parametersIn);
+ }
+
+ /**
+ * Set the additional parameters for the oscap tool.
+ * @param parametersIn New setting for the parameters.
+ */
+ public void setParameters(byte[] parametersIn) {
+ parameters = parametersIn;
+ }
+
+ /**
+ * Get the parameters for the oscap tool.
+ * @return The parameters for oscap tool.
+ */
+ public byte[] getParameters() {
+ return parameters;
+ }
+
+ /**
+ * Get the parameters for the oscap tool.
+ * @return The parameters for oscap tool.
+ */
+ public String getParametersContents() {
+ return HibernateFactory.getByteArrayContents(parameters);
+ }
+
+ /**
+ * @return Returns the id.
+ */
+ public Long getId() {
+ return id;
+ }
+
+ /**
+ * @param i The id to set.
+ */
+ public void setId(Long i) {
+ this.id = i;
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/handler-manifest.xml b/java/code/src/com/redhat/rhn/frontend/xmlrpc/handler-manifest.xml
index 0cbe2e4..d14aebb 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/handler-manifest.xml
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/handler-manifest.xml
@@ -10,6 +10,7 @@
<template name="system.config" classname="com.redhat.rhn.frontend.xmlrpc.system.config.ServerConfigHandler"/>
<template name="system.custominfo" classname="com.redhat.rhn.frontend.xmlrpc.system.custominfo.CustomInfoHandler"/>
<template name="system.provisioning.snapshot" classname="com.redhat.rhn.frontend.xmlrpc.system.provisioning.snapshot.SnapshotHandler"/>
+ <template name="system.scap" classname="com.redhat.rhn.frontend.xmlrpc.system.scap.SystemScapHandler"/>
<template name="system.search" classname="com.redhat.rhn.frontend.xmlrpc.system.search.SystemSearchHandler"/>
<template name="systemgroup" classname="com.redhat.rhn.frontend.xmlrpc.systemgroup.ServerGroupHandler" />
<template name="proxy" classname="com.redhat.rhn.frontend.xmlrpc.proxy.ProxyHandler"/>
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/scap/SystemScapHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/scap/SystemScapHandler.java
new file mode 100644
index 0000000..6fe4e17
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/scap/SystemScapHandler.java
@@ -0,0 +1,60 @@
+/**
+ * Copyright (c) 2012 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.frontend.xmlrpc.system.scap;
+
+import com.redhat.rhn.frontend.xmlrpc.BaseHandler;
+import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.domain.server.Server;
+import com.redhat.rhn.domain.action.scap.ScapAction;
+import com.redhat.rhn.manager.system.SystemManager;
+import com.redhat.rhn.manager.action.ActionManager;
+
+import java.util.Date;
+
+/**
+ * SystemScapHandler
+ * @version $Rev$
+ * @xmlrpc.namespace system.scap
+ * @xmlrpc.doc Provides methods to schedule scap scans and access the results.
+ */
+public class SystemScapHandler extends BaseHandler {
+ /**
+ * Run Open Scap XCCDF Evaluation on a given server
+ * @param sessionKey The session key.
+ * @param sid The server id.
+ * @param xccdfPath The path to xccdf path.
+ * @param oscapParams The additional params for oscap tool.
+ * @return ID of the new scap action.
+ *
+ * @xmlrpc.doc Schedule Scap XCCDF scan.
+ * @xmlrpc.param #session_key()
+ * @xmlrpc.param #param("int", "serverId")
+ * @xmlrpc.param #param("string", "Path to xccdf content on targeted system.")
+ * @xmlrpc.param #param("string", "Additional parameters for oscap tool.");
+ * @xmlrpc.returntype int - ID os the scap action created.
+ */
+ // TODO: Date ... earliest occurence
+ // TODO: multiple server instances at once
+ // TODO: install all the needed stuff
+ public int scheduleXccdfScan(String sessionKey, Integer sid,
+ String xccdfPath, String oscapParams) {
+ User loggedInUser = getLoggedInUser(sessionKey);
+ Server server = SystemManager.lookupByIdAndUser(new Long(sid.longValue()),
+ loggedInUser);
+ ScapAction action = ActionManager.scheduleXccdfEval(loggedInUser, server,
+ xccdfPath, oscapParams, new Date());
+ return action.getId().intValue();
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
index 18e4391..e1b1178 100644
--- a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
+++ b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
@@ -34,6 +34,8 @@ import com.redhat.rhn.domain.action.kickstart.KickstartGuestActionDetails;
import com.redhat.rhn.domain.action.rhnpackage.PackageAction;
import com.redhat.rhn.domain.action.script.ScriptActionDetails;
import com.redhat.rhn.domain.action.script.ScriptRunAction;
+import com.redhat.rhn.domain.action.scap.ScapAction;
+import com.redhat.rhn.domain.action.scap.ScapActionDetails;
import com.redhat.rhn.domain.action.server.ServerAction;
import com.redhat.rhn.domain.action.solaris.SolarisPackagePatchClusterInstallAction;
import com.redhat.rhn.domain.action.solaris.SolarisPackagePatchInstallAction;
@@ -1808,5 +1810,33 @@ public class ActionManager extends BaseManager {
);
}
+ /**
+ * Schedules Xccdf evaluation.
+ * @param scheduler User scheduling the action.
+ * @param srvr Server for which the action affects.
+ * @param path Path for the Xccdf content.
+ * @param parameters Additional parameters for oscap tool.
+ * @param earliestAction Date of earliest action to be executed.
+ * @return scheduled Scap Action
+ */
+ public static ScapAction scheduleXccdfEval(User scheduler, Server srvr, String path,
+ String parameters, Date earliestAction) {
+ if (!SystemManager.hasEntitlement(srvr.getId(),
+ EntitlementManager.MANAGEMENT)) {
+ throw new MissingEntitlementException(
+ EntitlementManager.MANAGEMENT.getHumanReadableLabel());
+ }
+
+ Set<Long> serverIds = new HashSet<Long>();
+ serverIds.add(srvr.getId());
+ ScapActionDetails scapDetails = new ScapActionDetails(path, parameters);
+ ScapAction action = (ScapAction) scheduleAction(scheduler,
+ ActionFactory.TYPE_SCAP_XCCDF_EVAL,
+ ActionFactory.TYPE_SCAP_XCCDF_EVAL.getName(),
+ earliestAction, serverIds);
+ action.setScapActionDetails(scapDetails);
+ ActionFactory.save(action);
+ return action;
+ }
}
commit ebd2aeb6e355eddfd743365527831e745650be61
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Sun Feb 26 18:07:04 2012 +0100
OpenSCAP integration -- Database schema upgrade.
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/080-rhnActionType_data.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/080-rhnActionType_data.sql
new file mode 100644
index 0000000..e14faa4
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/080-rhnActionType_data.sql
@@ -0,0 +1,3 @@
+
+insert into rhnActionType
+ values (50, 'scap.xccdf_eval', 'OpenSCAP xccdf scanning', 'N', 'Y');
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/081-rhnActionScap.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/081-rhnActionScap.sql.oracle
new file mode 100644
index 0000000..679cf1e
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/081-rhnActionScap.sql.oracle
@@ -0,0 +1,28 @@
+
+CREATE TABLE rhnActionScap
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_act_scap_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[4m_tbs]],
+ action_id NUMBER NOT NULL
+ CONSTRAINT rhn_act_scap_act_fk
+ REFERENCES rhnAction (id)
+ ON DELETE CASCADE,
+ path VARCHAR2(2048) NOT NULL,
+ parameters BLOB
+)
+TABLESPACE [[blob]]
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_act_scap_aid_idx
+ ON rhnActionScap (action_id)
+ TABLESPACE [[4m_tbs]]
+ NOLOGGING;
+
+CREATE INDEX rhn_act_scap_path_idx
+ ON rhnActionScap (path)
+ TABLESPACE [[4m_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_act_scap_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/081-rhnActionScap.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/081-rhnActionScap.sql.postgresql
new file mode 100644
index 0000000..5237e47
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/081-rhnActionScap.sql.postgresql
@@ -0,0 +1,21 @@
+-- oracle equivalent source sha1 04aaac23861d5f56b412b080009e8b47addbc70d
+
+CREATE TABLE rhnActionScap
+(
+ id NUMERIC NOT NULL
+ CONSTRAINT rhn_act_scap_id_pk PRIMARY KEY,
+ action_id NUMERIC NOT NULL
+ CONSTRAINT rhn_act_scap_act_fk
+ REFERENCES rhnAction (id)
+ ON DELETE CASCADE,
+ path VARCHAR(2048) NOT NULL,
+ parameters BYTEA
+);
+
+CREATE UNIQUE INDEX rhn_act_scap_aid_idx
+ ON rhnActionScap (action_id);
+
+CREATE INDEX rhn_act_scap_path_idx
+ ON rhnActionScap (path);
+
+CREATE SEQUENCE rhn_act_scap_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/082-rhnXccdfBenchmark.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/082-rhnXccdfBenchmark.sql.oracle
new file mode 100644
index 0000000..38eac1f
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/082-rhnXccdfBenchmark.sql.oracle
@@ -0,0 +1,18 @@
+
+CREATE TABLE rhnXccdfBenchmark
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_benchmark_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[64k_tbs]],
+ identifier VARCHAR2(120) NOT NULL,
+ version VARCHAR2(80) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_benchmark_iv_uq
+ ON rhnXccdfBenchmark (identifier, version)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_xccdf_benchmark_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/082-rhnXccdfBenchmark.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/082-rhnXccdfBenchmark.sql.postgresql
new file mode 100644
index 0000000..a09a596
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/082-rhnXccdfBenchmark.sql.postgresql
@@ -0,0 +1,14 @@
+-- oracle equivalent source sha1 3816bc60a7a51a9b8195fa54077215b7e9fe00b5
+
+CREATE TABLE rhnXccdfBenchmark
+(
+ id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_benchmark_id_pk PRIMARY KEY,
+ identifier VARCHAR(120) NOT NULL,
+ version VARCHAR(80) NOT NULL
+);
+
+CREATE UNIQUE INDEX rhn_xccdf_benchmark_iv_uq
+ ON rhnXccdfBenchmark (identifier, version);
+
+CREATE SEQUENCE rhn_xccdf_benchmark_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/083-rhnXccdfProfile.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/083-rhnXccdfProfile.sql.oracle
new file mode 100644
index 0000000..04dab99
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/083-rhnXccdfProfile.sql.oracle
@@ -0,0 +1,18 @@
+
+CREATE TABLE rhnXccdfProfile
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_profile_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[64k_tbs]],
+ identifier VARCHAR2(120) NOT NULL,
+ title VARCHAR2(120) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_profile_it_uq
+ ON rhnXccdfProfile (identifier, title)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_xccdf_profile_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/083-rhnXccdfProfile.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/083-rhnXccdfProfile.sql.postgresql
new file mode 100644
index 0000000..f05177b
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/083-rhnXccdfProfile.sql.postgresql
@@ -0,0 +1,14 @@
+-- oracle equivalent source sha1 b02413a644b20ae1f8125c2cc952b3aa2629b915
+
+CREATE TABLE rhnXccdfProfile
+(
+ id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_profile_id_pk PRIMARY KEY,
+ identifier VARCHAR(120) NOT NULL,
+ title VARCHAR(120) NOT NULL
+);
+
+CREATE UNIQUE INDEX rhn_xccdf_profile_it_uq
+ ON rhnXccdfProfile (identifier, title);
+
+CREATE SEQUENCE rhn_xccdf_profile_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/084-rhnXccdfIdentsystem.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/084-rhnXccdfIdentsystem.sql.oracle
new file mode 100644
index 0000000..81aab88
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/084-rhnXccdfIdentsystem.sql.oracle
@@ -0,0 +1,17 @@
+
+CREATE TABLE rhnXccdfIdentsystem
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_identsytem_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[64k_tbs]],
+ system VARCHAR2(80) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_identsystem_id_uq
+ ON rhnXccdfIdentsystem (system)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_xccdf_identsytem_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/084-rhnXccdfIdentsystem.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/084-rhnXccdfIdentsystem.sql.postgresql
new file mode 100644
index 0000000..b422105
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/084-rhnXccdfIdentsystem.sql.postgresql
@@ -0,0 +1,13 @@
+-- oracle equivalent source sha1 da38af7476829b03a79aba148ca710b0a40ae40a
+
+CREATE TABLE rhnXccdfIdentsystem
+(
+ id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_identsytem_id_pk PRIMARY KEY,
+ system VARCHAR(80) NOT NULL
+);
+
+CREATE UNIQUE INDEX rhn_xccdf_identsystem_id_uq
+ ON rhnXccdfIdentsystem (system);
+
+CREATE SEQUENCE rhn_xccdf_identsytem_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/085-rhnXccdfIdent.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/085-rhnXccdfIdent.sql.oracle
new file mode 100644
index 0000000..643792f
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/085-rhnXccdfIdent.sql.oracle
@@ -0,0 +1,20 @@
+
+CREATE TABLE rhnXccdfIdent
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_ident_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[2m_tbs]],
+ identsystem_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_ident_system_fk
+ REFERENCES rhnXccdfIdentsystem (id),
+ identifier VARCHAR (20) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_ident_isi_uq
+ ON rhnXccdfIdent (identsystem_id, identifier)
+ TABLESPACE [[2m_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_xccdf_ident_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/085-rhnXccdfIdent.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/085-rhnXccdfIdent.sql.postgresql
new file mode 100644
index 0000000..53408bb
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/085-rhnXccdfIdent.sql.postgresql
@@ -0,0 +1,16 @@
+-- oracle equivalent source sha1 3dfd1ac361743035c22d03f250713d9c60689102
+
+CREATE TABLE rhnXccdfIdent
+(
+ id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_ident_id_pk PRIMARY KEY,
+ identsystem_id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_ident_system_fk
+ REFERENCES rhnXccdfIdentsystem (id),
+ identifier VARCHAR (20) NOT NULL
+);
+
+CREATE UNIQUE INDEX rhn_xccdf_ident_isi_uq
+ ON rhnXccdfIdent (identsystem_id, identifier);
+
+CREATE SEQUENCE rhn_xccdf_ident_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/086-rhnXccdfTestresult.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/086-rhnXccdfTestresult.sql.oracle
new file mode 100644
index 0000000..b0a4edb
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/086-rhnXccdfTestresult.sql.oracle
@@ -0,0 +1,35 @@
+
+CREATE TABLE rhnXccdfTestresult
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[2m_tbs]],
+ server_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_srvr_fk
+ REFERENCES rhnServer (id)
+ ON DELETE CASCADE,
+ action_scap_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_act_fk
+ REFERENCES rhnActionScap (id)
+ ON DELETE CASCADE,
+ benchmark_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_bench_fk
+ REFERENCES rhnXccdfBenchmark (id),
+ profile_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_profile_fk
+ REFERENCES rhnXccdfProfile (id),
+ identifier VARCHAR2(120) NOT NULL,
+ start_time DATE,
+ end_time DATE NOT NULL,
+ errors BLOB
+)
+TABLESPACE [[blob]]
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_tresult_sa_uq
+ ON rhnXccdfTestresult (server_id, action_scap_id)
+ TABLESPACE [[2m_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_xccdf_tresult_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/086-rhnXccdfTestresult.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/086-rhnXccdfTestresult.sql.postgresql
new file mode 100644
index 0000000..81f42cc
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/086-rhnXccdfTestresult.sql.postgresql
@@ -0,0 +1,30 @@
+-- oracle equivalent source sha1 0cdc9f9284b139e82e8edbe5be8f0da155c36870
+
+CREATE TABLE rhnXccdfTestresult
+(
+ id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_id_pk PRIMARY KEY,
+ server_id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_srvr_fk
+ REFERENCES rhnServer (id)
+ ON DELETE CASCADE,
+ action_scap_id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_act_fk
+ REFERENCES rhnActionScap (id)
+ ON DELETE CASCADE,
+ benchmark_id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_bench_fk
+ REFERENCES rhnXccdfBenchmark (id),
+ profile_id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_profile_fk
+ REFERENCES rhnXccdfProfile (id),
+ identifier VARCHAR(120) NOT NULL,
+ start_time TIMESTAMPTZ,
+ end_time TIMESTAMPTZ NOT NULL,
+ errors BYTEA
+);
+
+CREATE UNIQUE INDEX rhn_xccdf_tresult_sa_uq
+ ON rhnXccdfTestresult (server_id, action_scap_id);
+
+CREATE SEQUENCE rhn_xccdf_tresult_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/087-rhnXccdfRuleresultType.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/087-rhnXccdfRuleresultType.sql.oracle
new file mode 100644
index 0000000..6758e74
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/087-rhnXccdfRuleresultType.sql.oracle
@@ -0,0 +1,17 @@
+
+CREATE TABLE rhnXccdfRuleresultType
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_rresult_t_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[64k_tbs]],
+ abbreviation CHAR(1) NOT NULL,
+ label VARCHAR2(16) NOT NULL,
+ description VARCHAR2(120) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_rresult_t_label_uq
+ ON rhnXccdfRuleresultType (label)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/087-rhnXccdfRuleresultType.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/087-rhnXccdfRuleresultType.sql.postgresql
new file mode 100644
index 0000000..0702af1
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/087-rhnXccdfRuleresultType.sql.postgresql
@@ -0,0 +1,13 @@
+-- oracle equivalent source sha1 3ffc2d45261e6fe07bb990206e5c0efdbcaf0561
+
+CREATE TABLE rhnXccdfRuleresultType
+(
+ id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_rresult_t_id_pk PRIMARY KEY,
+ abbreviation CHAR(1) NOT NULL,
+ label VARCHAR(16) NOT NULL,
+ description VARCHAR(120) NOT NULL
+);
+
+CREATE UNIQUE INDEX rhn_xccdf_rresult_t_label_uq
+ ON rhnXccdfRuleresultType (label);
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/088-rhnXccdfRuleresultType_data.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/088-rhnXccdfRuleresultType_data.sql
new file mode 100644
index 0000000..bd18ddb
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/088-rhnXccdfRuleresultType_data.sql
@@ -0,0 +1,19 @@
+
+insert into rhnXccdfRuleresultType values (1, 'P', 'pass',
+ 'The target system satisfied all the conditions of the xccdf:Rule.');
+insert into rhnXccdfRuleresultType values (2, 'F', 'fail',
+ 'The target system did not satisfy all the conditions of the xccdf:Rule');
+insert into rhnXccdfRuleresultType values (3, 'E', 'error',
+ 'The checking engine could not complete the evaluation, therefore the status of compliance is uncertain.');
+insert into rhnXccdfRuleresultType values (4, 'U', 'unknown',
+ 'The testing tool encountered some problem and the result is unknown.');
+insert into rhnXccdfRuleresultType values (5, 'N', 'notapplicable',
+ 'The xccdf:Rule was not applicable to the target.');
+insert into rhnXccdfRuleresultType values (6, 'K', 'notchecked',
+ 'The xccdf:Rule was not evaluated by the checking engine; xccdf:check was either unspecified or unsupported.');
+insert into rhnXccdfRuleresultType values (7, 'S', 'notselected',
+ 'The xccdf:Rule was not selected in the profile.');
+insert into rhnXccdfRuleresultType values (8, 'I', 'informational',
+ 'The xccdf:Rule was not checked; it is not a compliance category.');
+insert into rhnXccdfRuleresultType values (9, 'X', 'fixed',
+ 'The xccdf:Rule had failed, but was then fixed by tool.');
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/089-rhnXccdfRuleresult.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/089-rhnXccdfRuleresult.sql.oracle
new file mode 100644
index 0000000..1e135c7
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/089-rhnXccdfRuleresult.sql.oracle
@@ -0,0 +1,21 @@
+
+CREATE TABLE rhnXccdfRuleresult
+(
+ testresult_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_rresult_tresult_fk
+ REFERENCES rhnXccdfTestresult (id)
+ ON DELETE CASCADE,
+ ident_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_rresult_ident_fk
+ REFERENCES rhnXccdfIdent (id),
+ result_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_rresult_result_fk
+ REFERENCES rhnXccdfRuleresultType (id)
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_rresult_tri_uq
+ ON rhnXccdfRuleresult (testresult_id, ident_id)
+ TABLESPACE [[8m_tbs]]
+ NOLOGGING;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/089-rhnXccdfRuleresult.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/089-rhnXccdfRuleresult.sql.postgresql
new file mode 100644
index 0000000..1e51b26
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/089-rhnXccdfRuleresult.sql.postgresql
@@ -0,0 +1,18 @@
+-- oracle equivalent source sha1 43c723fb63e07b88898d873e018edcb9b69a3223
+
+CREATE TABLE rhnXccdfRuleresult
+(
+ testresult_id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_rresult_tresult_fk
+ REFERENCES rhnXccdfTestresult (id)
+ ON DELETE CASCADE,
+ ident_id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_rresult_ident_fk
+ REFERENCES rhnXccdfIdent (id),
+ result_id NUMERIC NOT NULL
+ CONSTRAINT rhn_xccdf_rresult_result_fk
+ REFERENCES rhnXccdfRuleresultType (id)
+);
+
+CREATE UNIQUE INDEX rhn_xccdf_rresult_tri_uq
+ ON rhnXccdfRuleresult (testresult_id, ident_id);
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/090-lookup_xccdf_benchmark.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/090-lookup_xccdf_benchmark.sql.oracle
new file mode 100644
index 0000000..e6c6917
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/090-lookup_xccdf_benchmark.sql.oracle
@@ -0,0 +1,25 @@
+
+CREATE OR REPLACE FUNCTION
+lookup_xccdf_benchmark(identifier_in IN VARCHAR2, version_in IN VARCHAR2)
+RETURN NUMBER
+IS
+ PRAGMA AUTONOMOUS_TRANSACTION;
+ benchmark_id NUMBER;
+BEGIN
+ SELECT id
+ INTO benchmark_id
+ FROM rhnXccdfBenchmark
+ WHERE identifier = identifier_in
+ AND version = version_in;
+ RETURN benchmark_id;
+EXCEPTION
+ WHEN NO_DATA_FOUND THEN
+ INSERT INTO rhnXccdfBenchmark (id, identifier, version)
+ VALUES (rhn_xccdf_benchmark_id_seq.nextval,
+ identifier_in, version_in)
+ RETURNING id INTO benchmark_id;
+ COMMIT;
+ RETURN benchmark_id;
+END lookup_xccdf_benchmark;
+/
+SHOW ERRORS
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/090-lookup_xccdf_benchmark.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/090-lookup_xccdf_benchmark.sql.postgresql
new file mode 100644
index 0000000..3d2a538
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/090-lookup_xccdf_benchmark.sql.postgresql
@@ -0,0 +1,26 @@
+-- oracle equivalent source sha1 ce2c38efd7de9640b9338173f385ffb26d70b053
+
+CREATE OR REPLACE FUNCTION
+lookup_xccdf_benchmark(identifier_in IN VARCHAR, version_in IN VARCHAR)
+RETURNS NUMERIC
+AS
+$$
+DECLARE
+ benchmark_id NUMERIC;
+BEGIN
+ SELECT id
+ INTO benchmark_id
+ FROM rhnXccdfBenchmark
+ WHERE identifier = identifier_in
+ AND version = version_in;
+
+ IF NOT FOUND THEN
+ INSERT INTO rhnXccdfBenchmark (id, identifier, version)
+ VALUES (nextval('rhn_xccdf_benchmark_id_seq'),
+ identifier_in, version_in)
+ RETURNING id INTO benchmark_id;
+ END IF;
+
+ RETURN benchmark_id;
+END;
+$$ LANGUAGE PLPGSQL;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/091-lookup_xccdf_profile.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/091-lookup_xccdf_profile.sql.oracle
new file mode 100644
index 0000000..475bc37
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/091-lookup_xccdf_profile.sql.oracle
@@ -0,0 +1,25 @@
+
+CREATE OR REPLACE FUNCTION
+lookup_xccdf_profile(identifier_in IN VARCHAR2, title_in IN VARCHAR2)
+RETURN NUMBER
+IS
+ PRAGMA AUTONOMOUS_TRANSACTION;
+ profile_id NUMBER;
+BEGIN
+ SELECT id
+ INTO profile_id
+ FROM rhnXccdfProfile
+ WHERE identifier = identifier_in
+ AND title = title_in;
+ RETURN profile_id;
+EXCEPTION
+ WHEN NO_DATA_FOUND THEN
+ INSERT INTO rhnXccdfProfile (id, identifier, title)
+ VALUES (rhn_xccdf_profile_id_seq.nextval,
+ identifier_in, title_in)
+ RETURNING id INTO profile_id;
+ COMMIT;
+ RETURN profile_id;
+END lookup_xccdf_profile;
+/
+SHOW ERRORS
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/091-lookup_xccdf_profile.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/091-lookup_xccdf_profile.sql.postgresql
new file mode 100644
index 0000000..8ba97a7
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/091-lookup_xccdf_profile.sql.postgresql
@@ -0,0 +1,26 @@
+-- oracle equivalent source sha1 1865b4640fb444ac71304968fbc34e8d03454d44
+
+CREATE OR REPLACE FUNCTION
+lookup_xccdf_profile(identifier_in IN VARCHAR, title_in IN VARCHAR)
+RETURNS NUMERIC
+AS
+$$
+DECLARE
+ profile_id NUMERIC;
+BEGIN
+ SELECT id
+ INTO profile_id
+ FROM rhnXccdfProfile
+ WHERE identifier = identifier_in
+ AND title = title_in;
+
+ IF NOT FOUND THEN
+ INSERT INTO rhnXccdfProfile (id, identifier, title)
+ VALUES (nextval('rhn_xccdf_profile_id_seq'),
+ identifier_in, title_in)
+ RETURNING id INTO profile_id;
+ END IF;
+
+ RETURN profile_id;
+END;
+$$ LANGUAGE PLPGSQL;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/092-lookup_xccdf_ident.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/092-lookup_xccdf_ident.sql.oracle
new file mode 100644
index 0000000..9716e9e
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/092-lookup_xccdf_ident.sql.oracle
@@ -0,0 +1,37 @@
+
+CREATE OR REPLACE FUNCTION
+lookup_xccdf_ident(system_in IN VARCHAR2, identifier_in IN VARCHAR2)
+RETURN NUMBER
+IS
+ PRAGMA AUTONOMOUS_TRANSACTION;
+ xccdf_ident_id NUMBER;
+ ident_sys_id NUMBER;
+BEGIN
+ BEGIN
+ SELECT id
+ INTO ident_sys_id
+ FROM rhnXccdfIdentsystem
+ WHERE system = system_in;
+ EXCEPTION
+ WHEN NO_DATA_FOUND THEN
+ INSERT INTO rhnXccdfIdentsystem (id, system)
+ VALUES (rhn_xccdf_identsytem_id_seq.nextval, system_in)
+ RETURNING id INTO ident_sys_id;
+ END;
+
+ SELECT id
+ INTO xccdf_ident_id
+ FROM rhnXccdfIdent
+ WHERE identsystem_id = ident_sys_id
+ AND identifier = identifier_in;
+ RETURN xccdf_ident_id;
+EXCEPTION
+ WHEN NO_DATA_FOUND THEN
+ INSERT INTO rhnXccdfIdent (id, identsystem_id, identifier)
+ VALUES (rhn_xccdf_ident_id_seq.nextval, ident_sys_id, identifier_in)
+ RETURNING id INTO xccdf_ident_id;
+ COMMIT;
+ RETURN xccdf_ident_id;
+END lookup_xccdf_ident;
+/
+SHOW ERRORS
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/092-lookup_xccdf_ident.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/092-lookup_xccdf_ident.sql.postgresql
new file mode 100644
index 0000000..3674bb6
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/092-lookup_xccdf_ident.sql.postgresql
@@ -0,0 +1,34 @@
+-- oracle equivalent source sha1 c53a7de29f22c4ae4b9db65c7355dd5b6075adef
+
+CREATE OR REPLACE FUNCTION
+lookup_xccdf_ident(system_in IN VARCHAR, identifier_in IN VARCHAR)
+RETURNS NUMERIC
+AS
+$$
+DECLARE
+ xccdf_ident_id NUMERIC;
+ ident_sys_id NUMERIC;
+BEGIN
+ SELECT id
+ INTO ident_sys_id
+ FROM rhnXccdfIdentsystem
+ WHERE system = system_in;
+ IF NOT FOUND THEN
+ INSERT INTO rhnXccdfIdentsystem (id, system)
+ VALUES (nextval('rhn_xccdf_identsytem_id_seq'), system_in)
+ RETURNING id INTO ident_sys_id;
+ END IF;
+
+ SELECT id
+ INTO xccdf_ident_id
+ FROM rhnXccdfIdent
+ WHERE identsystem_id = ident_sys_id
+ AND identifier = identifier_in;
+ IF NOT FOUND THEN
+ INSERT INTO rhnXccdfIdent (id, identsystem_id, identifier)
+ VALUES (nextval('rhn_xccdf_ident_id_seq'), ident_sys_id, identifier_in)
+ RETURNING id INTO xccdf_ident_id;
+ END IF;
+ RETURN xccdf_ident_id;
+END;
+$$ LANGUAGE PLPGSQL;
commit 7bc4e6f0926cff682d2c64d09e037bfa6950588c
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Tue Feb 21 14:41:15 2012 +0100
OpenSCAP integration -- Database schema.
diff --git a/schema/spacewalk/common/data/rhnActionType.sql b/schema/spacewalk/common/data/rhnActionType.sql
index 018ef24..a99c85a 100644
--- a/schema/spacewalk/common/data/rhnActionType.sql
+++ b/schema/spacewalk/common/data/rhnActionType.sql
@@ -1,5 +1,5 @@
--
--- Copyright (c) 2008 Red Hat, Inc.
+-- Copyright (c) 2012 Red Hat, Inc.
--
-- This software is licensed to you under the GNU General Public License,
-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
@@ -69,6 +69,7 @@ insert into rhnActionType values (47, 'kickstart_guest.add_tools_channel', 'Subs
insert into rhnActionType values (48, 'virt.setVCPUs', 'Sets the Vcpu usage for a virtual domain.', 'N', 'N');
commit;
insert into rhnActionType values (49, 'proxy.deactivate', 'Deactivate Proxy', 'N', 'N');
+insert into rhnActionType values (50, 'scap.xccdf_eval', 'OpenSCAP xccdf scanning', 'N', 'Y');
--
--
-- Revision 1.25 2004/10/29 05:07:52 pjones
diff --git a/schema/spacewalk/common/data/rhnXccdfRuleresultType.sql b/schema/spacewalk/common/data/rhnXccdfRuleresultType.sql
new file mode 100644
index 0000000..6cc6b5d
--- /dev/null
+++ b/schema/spacewalk/common/data/rhnXccdfRuleresultType.sql
@@ -0,0 +1,33 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+insert into rhnXccdfRuleresultType values (1, 'P', 'pass',
+ 'The target system satisfied all the conditions of the xccdf:Rule.');
+insert into rhnXccdfRuleresultType values (2, 'F', 'fail',
+ 'The target system did not satisfy all the conditions of the xccdf:Rule');
+insert into rhnXccdfRuleresultType values (3, 'E', 'error',
+ 'The checking engine could not complete the evaluation, therefore the status of compliance is uncertain.');
+insert into rhnXccdfRuleresultType values (4, 'U', 'unknown',
+ 'The testing tool encountered some problem and the result is unknown.');
+insert into rhnXccdfRuleresultType values (5, 'N', 'notapplicable',
+ 'The xccdf:Rule was not applicable to the target.');
+insert into rhnXccdfRuleresultType values (6, 'K', 'notchecked',
+ 'The xccdf:Rule was not evaluated by the checking engine; xccdf:check was either unspecified or unsupported.');
+insert into rhnXccdfRuleresultType values (7, 'S', 'notselected',
+ 'The xccdf:Rule was not selected in the profile.');
+insert into rhnXccdfRuleresultType values (8, 'I', 'informational',
+ 'The xccdf:Rule was not checked; it is not a compliance category.');
+insert into rhnXccdfRuleresultType values (9, 'X', 'fixed',
+ 'The xccdf:Rule had failed, but was then fixed by tool.');
diff --git a/schema/spacewalk/common/tables/rhnActionScap.sql b/schema/spacewalk/common/tables/rhnActionScap.sql
new file mode 100644
index 0000000..c233792
--- /dev/null
+++ b/schema/spacewalk/common/tables/rhnActionScap.sql
@@ -0,0 +1,43 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+
+CREATE TABLE rhnActionScap
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_act_scap_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[4m_tbs]],
+ action_id NUMBER NOT NULL
+ CONSTRAINT rhn_act_scap_act_fk
+ REFERENCES rhnAction (id)
+ ON DELETE CASCADE,
+ path VARCHAR2(2048) NOT NULL,
+ parameters BLOB
+)
+TABLESPACE [[blob]]
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_act_scap_aid_idx
+ ON rhnActionScap (action_id)
+ TABLESPACE [[4m_tbs]]
+ NOLOGGING;
+
+CREATE INDEX rhn_act_scap_path_idx
+ ON rhnActionScap (path)
+ TABLESPACE [[4m_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_act_scap_id_seq;
diff --git a/schema/spacewalk/common/tables/rhnXccdfBenchmark.sql b/schema/spacewalk/common/tables/rhnXccdfBenchmark.sql
new file mode 100644
index 0000000..593e0f9
--- /dev/null
+++ b/schema/spacewalk/common/tables/rhnXccdfBenchmark.sql
@@ -0,0 +1,32 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE TABLE rhnXccdfBenchmark
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_benchmark_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[64k_tbs]],
+ identifier VARCHAR2(120) NOT NULL,
+ version VARCHAR2(80) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_benchmark_iv_uq
+ ON rhnXccdfBenchmark (identifier, version)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_xccdf_benchmark_id_seq;
diff --git a/schema/spacewalk/common/tables/rhnXccdfIdent.sql b/schema/spacewalk/common/tables/rhnXccdfIdent.sql
new file mode 100644
index 0000000..bafb588
--- /dev/null
+++ b/schema/spacewalk/common/tables/rhnXccdfIdent.sql
@@ -0,0 +1,34 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE TABLE rhnXccdfIdent
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_ident_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[2m_tbs]],
+ identsystem_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_ident_system_fk
+ REFERENCES rhnXccdfIdentsystem (id),
+ identifier VARCHAR (20) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_ident_isi_uq
+ ON rhnXccdfIdent (identsystem_id, identifier)
+ TABLESPACE [[2m_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_xccdf_ident_id_seq;
diff --git a/schema/spacewalk/common/tables/rhnXccdfIdentsystem.sql b/schema/spacewalk/common/tables/rhnXccdfIdentsystem.sql
new file mode 100644
index 0000000..af66295
--- /dev/null
+++ b/schema/spacewalk/common/tables/rhnXccdfIdentsystem.sql
@@ -0,0 +1,31 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE TABLE rhnXccdfIdentsystem
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_identsytem_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[64k_tbs]],
+ system VARCHAR2(80) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_identsystem_id_uq
+ ON rhnXccdfIdentsystem (system)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_xccdf_identsytem_id_seq;
diff --git a/schema/spacewalk/common/tables/rhnXccdfProfile.sql b/schema/spacewalk/common/tables/rhnXccdfProfile.sql
new file mode 100644
index 0000000..1b24753
--- /dev/null
+++ b/schema/spacewalk/common/tables/rhnXccdfProfile.sql
@@ -0,0 +1,32 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE TABLE rhnXccdfProfile
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_profile_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[64k_tbs]],
+ identifier VARCHAR2(120) NOT NULL,
+ title VARCHAR2(120) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_profile_it_uq
+ ON rhnXccdfProfile (identifier, title)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_xccdf_profile_id_seq;
diff --git a/schema/spacewalk/common/tables/rhnXccdfRuleresult.sql b/schema/spacewalk/common/tables/rhnXccdfRuleresult.sql
new file mode 100644
index 0000000..8233f90
--- /dev/null
+++ b/schema/spacewalk/common/tables/rhnXccdfRuleresult.sql
@@ -0,0 +1,35 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE TABLE rhnXccdfRuleresult
+(
+ testresult_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_rresult_tresult_fk
+ REFERENCES rhnXccdfTestresult (id)
+ ON DELETE CASCADE,
+ ident_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_rresult_ident_fk
+ REFERENCES rhnXccdfIdent (id),
+ result_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_rresult_result_fk
+ REFERENCES rhnXccdfRuleresultType (id)
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_rresult_tri_uq
+ ON rhnXccdfRuleresult (testresult_id, ident_id)
+ TABLESPACE [[8m_tbs]]
+ NOLOGGING;
diff --git a/schema/spacewalk/common/tables/rhnXccdfRuleresultType.sql b/schema/spacewalk/common/tables/rhnXccdfRuleresultType.sql
new file mode 100644
index 0000000..22ceec9
--- /dev/null
+++ b/schema/spacewalk/common/tables/rhnXccdfRuleresultType.sql
@@ -0,0 +1,31 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE TABLE rhnXccdfRuleresultType
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_rresult_t_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[64k_tbs]],
+ abbreviation CHAR(1) NOT NULL,
+ label VARCHAR2(16) NOT NULL,
+ description VARCHAR2(120) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_rresult_t_label_uq
+ ON rhnXccdfRuleresultType (label)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
diff --git a/schema/spacewalk/common/tables/rhnXccdfTestresult.sql b/schema/spacewalk/common/tables/rhnXccdfTestresult.sql
new file mode 100644
index 0000000..f77c451
--- /dev/null
+++ b/schema/spacewalk/common/tables/rhnXccdfTestresult.sql
@@ -0,0 +1,49 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE TABLE rhnXccdfTestresult
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[2m_tbs]],
+ server_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_srvr_fk
+ REFERENCES rhnServer (id)
+ ON DELETE CASCADE,
+ action_scap_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_act_fk
+ REFERENCES rhnActionScap (id)
+ ON DELETE CASCADE,
+ benchmark_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_bench_fk
+ REFERENCES rhnXccdfBenchmark (id),
+ profile_id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_tresult_profile_fk
+ REFERENCES rhnXccdfProfile (id),
+ identifier VARCHAR2(120) NOT NULL,
+ start_time DATE,
+ end_time DATE NOT NULL,
+ errors BLOB
+)
+TABLESPACE [[blob]]
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_tresult_sa_uq
+ ON rhnXccdfTestresult (server_id, action_scap_id)
+ TABLESPACE [[2m_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_xccdf_tresult_id_seq;
diff --git a/schema/spacewalk/common/tables/tables.deps b/schema/spacewalk/common/tables/tables.deps
index 0c695bb..1233b42 100644
--- a/schema/spacewalk/common/tables/tables.deps
+++ b/schema/spacewalk/common/tables/tables.deps
@@ -258,3 +258,7 @@ web_contact :: web_customer
web_user_contact_permission :: web_contact
web_user_site_info :: web_contact web_user_site_type
web_user_personal_info :: web_contact web_user_prefix
+rhnActionScap :: rhnAction
+rhnXccdfIdent :: rhnXccdfIdentsystem
+rhnXccdfRuleresult :: rhnXccdfTestresult rhnXccdfIdent rhnXccdfRuleresultType
+rhnXccdfTestresult :: rhnServer rhnActionScap rhnXccdfBenchmark rhnXccdfProfile
diff --git a/schema/spacewalk/oracle/procs/lookup_xccdf_benchmark.sql b/schema/spacewalk/oracle/procs/lookup_xccdf_benchmark.sql
new file mode 100644
index 0000000..71addd5
--- /dev/null
+++ b/schema/spacewalk/oracle/procs/lookup_xccdf_benchmark.sql
@@ -0,0 +1,39 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE OR REPLACE FUNCTION
+lookup_xccdf_benchmark(identifier_in IN VARCHAR2, version_in IN VARCHAR2)
+RETURN NUMBER
+IS
+ PRAGMA AUTONOMOUS_TRANSACTION;
+ benchmark_id NUMBER;
+BEGIN
+ SELECT id
+ INTO benchmark_id
+ FROM rhnXccdfBenchmark
+ WHERE identifier = identifier_in
+ AND version = version_in;
+ RETURN benchmark_id;
+EXCEPTION
+ WHEN NO_DATA_FOUND THEN
+ INSERT INTO rhnXccdfBenchmark (id, identifier, version)
+ VALUES (rhn_xccdf_benchmark_id_seq.nextval,
+ identifier_in, version_in)
+ RETURNING id INTO benchmark_id;
+ COMMIT;
+ RETURN benchmark_id;
+END lookup_xccdf_benchmark;
+/
+SHOW ERRORS
diff --git a/schema/spacewalk/oracle/procs/lookup_xccdf_ident.sql b/schema/spacewalk/oracle/procs/lookup_xccdf_ident.sql
new file mode 100644
index 0000000..c63af38
--- /dev/null
+++ b/schema/spacewalk/oracle/procs/lookup_xccdf_ident.sql
@@ -0,0 +1,51 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE OR REPLACE FUNCTION
+lookup_xccdf_ident(system_in IN VARCHAR2, identifier_in IN VARCHAR2)
+RETURN NUMBER
+IS
+ PRAGMA AUTONOMOUS_TRANSACTION;
+ xccdf_ident_id NUMBER;
+ ident_sys_id NUMBER;
+BEGIN
+ BEGIN
+ SELECT id
+ INTO ident_sys_id
+ FROM rhnXccdfIdentsystem
+ WHERE system = system_in;
+ EXCEPTION
+ WHEN NO_DATA_FOUND THEN
+ INSERT INTO rhnXccdfIdentsystem (id, system)
+ VALUES (rhn_xccdf_identsytem_id_seq.nextval, system_in)
+ RETURNING id INTO ident_sys_id;
+ END;
+
+ SELECT id
+ INTO xccdf_ident_id
+ FROM rhnXccdfIdent
+ WHERE identsystem_id = ident_sys_id
+ AND identifier = identifier_in;
+ RETURN xccdf_ident_id;
+EXCEPTION
+ WHEN NO_DATA_FOUND THEN
+ INSERT INTO rhnXccdfIdent (id, identsystem_id, identifier)
+ VALUES (rhn_xccdf_ident_id_seq.nextval, ident_sys_id, identifier_in)
+ RETURNING id INTO xccdf_ident_id;
+ COMMIT;
+ RETURN xccdf_ident_id;
+END lookup_xccdf_ident;
+/
+SHOW ERRORS
diff --git a/schema/spacewalk/oracle/procs/lookup_xccdf_profile.sql b/schema/spacewalk/oracle/procs/lookup_xccdf_profile.sql
new file mode 100644
index 0000000..abbf837
--- /dev/null
+++ b/schema/spacewalk/oracle/procs/lookup_xccdf_profile.sql
@@ -0,0 +1,39 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE OR REPLACE FUNCTION
+lookup_xccdf_profile(identifier_in IN VARCHAR2, title_in IN VARCHAR2)
+RETURN NUMBER
+IS
+ PRAGMA AUTONOMOUS_TRANSACTION;
+ profile_id NUMBER;
+BEGIN
+ SELECT id
+ INTO profile_id
+ FROM rhnXccdfProfile
+ WHERE identifier = identifier_in
+ AND title = title_in;
+ RETURN profile_id;
+EXCEPTION
+ WHEN NO_DATA_FOUND THEN
+ INSERT INTO rhnXccdfProfile (id, identifier, title)
+ VALUES (rhn_xccdf_profile_id_seq.nextval,
+ identifier_in, title_in)
+ RETURNING id INTO profile_id;
+ COMMIT;
+ RETURN profile_id;
+END lookup_xccdf_profile;
+/
+SHOW ERRORS
diff --git a/schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql b/schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql
new file mode 100644
index 0000000..4fb6af3
--- /dev/null
+++ b/schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql
@@ -0,0 +1,124 @@
+-- oracle equivalent source sha1 9072e8c15b70f30f60d974c38302a5ca739193
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--9072e8c15b70f30f60d974c38302a5ca739193
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--9072e8c15b70f30f60d974c38302a5ca739193
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--9072e8c15b70f30f60d974c38302a5ca739193
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--9072e8c15b70f30f60d974c38302a5ca739193
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--9072e8c15b70f30f60d974c38302a5ca739193
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--9072e8c15b70f30f60d974c38302a5ca739193
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE OR REPLACE FUNCTION
+lookup_xccdf_benchmark(identifier_in IN VARCHAR, version_in IN VARCHAR)
+RETURNS NUMERIC
+AS
+$$
+DECLARE
+ benchmark_id NUMERIC;
+BEGIN
+ SELECT id
+ INTO benchmark_id
+ FROM rhnXccdfBenchmark
+ WHERE identifier = identifier_in
+ AND version = version_in;
+
+ IF NOT FOUND THEN
+ INSERT INTO rhnXccdfBenchmark (id, identifier, version)
+ VALUES (nextval('rhn_xccdf_benchmark_id_seq'),
+ identifier_in, version_in)
+ RETURNING id INTO benchmark_id;
+ END IF;
+
+ RETURN benchmark_id;
+END;
+$$ LANGUAGE PLPGSQL;
diff --git a/schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql b/schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql
new file mode 100644
index 0000000..35d5f06
--- /dev/null
+++ b/schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql
@@ -0,0 +1,48 @@
+-- oracle equivalent source sha1 518a069bf3f4d1683433a4fc17eb22b8a9fbb935
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE OR REPLACE FUNCTION
+lookup_xccdf_ident(system_in IN VARCHAR, identifier_in IN VARCHAR)
+RETURNS NUMERIC
+AS
+$$
+DECLARE
+ xccdf_ident_id NUMERIC;
+ ident_sys_id NUMERIC;
+BEGIN
+ SELECT id
+ INTO ident_sys_id
+ FROM rhnXccdfIdentsystem
+ WHERE system = system_in;
+ IF NOT FOUND THEN
+ INSERT INTO rhnXccdfIdentsystem (id, system)
+ VALUES (nextval('rhn_xccdf_identsytem_id_seq'), system_in)
+ RETURNING id INTO ident_sys_id;
+ END IF;
+
+ SELECT id
+ INTO xccdf_ident_id
+ FROM rhnXccdfIdent
+ WHERE identsystem_id = ident_sys_id
+ AND identifier = identifier_in;
+ IF NOT FOUND THEN
+ INSERT INTO rhnXccdfIdent (id, identsystem_id, identifier)
+ VALUES (nextval('rhn_xccdf_ident_id_seq'), ident_sys_id, identifier_in)
+ RETURNING id INTO xccdf_ident_id;
+ END IF;
+ RETURN xccdf_ident_id;
+END;
+$$ LANGUAGE PLPGSQL;
diff --git a/schema/spacewalk/postgres/procs/lookup_xccdf_profile.sql b/schema/spacewalk/postgres/procs/lookup_xccdf_profile.sql
new file mode 100644
index 0000000..157bece
--- /dev/null
+++ b/schema/spacewalk/postgres/procs/lookup_xccdf_profile.sql
@@ -0,0 +1,40 @@
+-- oracle equivalent source sha1 075297176824db8dc7086d1e9627106d04d7d103
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE OR REPLACE FUNCTION
+lookup_xccdf_profile(identifier_in IN VARCHAR, title_in IN VARCHAR)
+RETURNS NUMERIC
+AS
+$$
+DECLARE
+ profile_id NUMERIC;
+BEGIN
+ SELECT id
+ INTO profile_id
+ FROM rhnXccdfProfile
+ WHERE identifier = identifier_in
+ AND title = title_in;
+
+ IF NOT FOUND THEN
+ INSERT INTO rhnXccdfProfile (id, identifier, title)
+ VALUES (nextval('rhn_xccdf_profile_id_seq'),
+ identifier_in, title_in)
+ RETURNING id INTO profile_id;
+ END IF;
+
+ RETURN profile_id;
+END;
+$$ LANGUAGE PLPGSQL;
commit 82c42195ea026f5e38f2f583a63fb7df3632bbae
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Thu Feb 23 14:39:41 2012 +0100
checkstyle: allow Copyright 2012.
diff --git a/java/buildconf/LICENSE.txt b/java/buildconf/LICENSE.txt
index 795f4b3..c114c87 100644
--- a/java/buildconf/LICENSE.txt
+++ b/java/buildconf/LICENSE.txt
@@ -1,5 +1,5 @@
^/\*\*$
-^ \* Copyright \(c\) (20(0\d|10)--)?201[01] (Red Hat, Inc.|Novell)$
+^ \* Copyright \(c\) (20(0\d|10)--)?201[012] (Red Hat, Inc.|Novell)$
^ \*$
^ \* This software is licensed to you under the GNU General Public License,$
^ \* version 2 \(GPLv2\). There is NO WARRANTY for this software, express or$
commit ceaa785a5f6600e665a01d3d474a95ee7f082f23
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Mon Feb 27 10:21:42 2012 +0100
Do not require libxml2-python
It is not used since f0fddcd6e7bdbb3b25a9ae36705f10a0b6bdcb2b.
diff --git a/client/debian/rhn-client-tools/debian/control b/client/debian/rhn-client-tools/debian/control
index 0edf0d6..0948882 100644
--- a/client/debian/rhn-client-tools/debian/control
+++ b/client/debian/rhn-client-tools/debian/control
@@ -11,7 +11,7 @@ Package: python-rhn-client-tools
Architecture: all
Depends: ${python:Depends}, ${misc:Depends}, python-rhnlib (>= 2.5.40),
python-ethtool, python-dbus, python-apt (>= 0.7.100), python-newt,
- python-dmidecode, python-libxml2, lsb-release, gnupg, hal
+ python-dmidecode, lsb-release, gnupg, hal
Provides: ${python:Provides}, rhn-client-tools, rhn-check, rhn-setup,
rhn-setup-gnome
Recommends: apt-spacewalk
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 62cffba..e777835 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -35,7 +35,6 @@ Requires: python-newt
Requires: newt
%endif
Requires: python-dmidecode
-Requires: libxml2-python
%if 0%{?suse_version}
Requires: zypper
%else
12 years, 3 months
Changes to 'refs/tags/spacewalk-java-1.7.44-1'
by Tomas Lestach
Tag 'spacewalk-java-1.7.44-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2012-02-27 21:35 +0000
Tagging package [spacewalk-java] version [1.7.44-1] in directory [java/].
Changes since spacecmd-1.7.7-1:
Tomas Lestach (45):
do not check whether Org expression is an instance of Org
remove unnecessary casts
remove unnecessary semicolons
remove dead code in ActionExecutor
remove dead code in ErrataQueueWorker
remove dead code in KickstartFormatter
remove dead code in PatchConfirmAction
remove dead code in PatchConfirmInstallAction
remove dead code in DeleteFileAction
do not allocate object that will never be used in SystemHandler
do not allocate object that will never be used in UpdateErrataCacheCommand
desc cannot be null at this location
epoch cannot be null at this location
hostDir cannot be null at this location
name cannot be null at this location
is can only be null at this location
o can only be null at this location
proposed cannot be null at this location
rebootAction cannot be null at this location
optimize code based on null and non-empty conditions
updates cannot be null at this location
channel cannot be null at this location
compoundLocales cannot be null at this location
count cannot be null at this location
cr cannot be null at this location
cr cannot be null at this location
currentErrata cannot be null at this location
info cannot be null at this location
key cannot be null at this location
kss cannot be null at this location
mess can only be null at this location
mtime cannot be null at this location
pAdded cannot be null at this location
parent cannot be null at this location
pkgs cannot be null at this location
regCount cannot be null at this location
selectedChannel can only be null at this location
user cannot be null at this location
toChannel cannot be null at this location
remove redundant assignements
baos cannot be null at this location
binaryInput cannot be null at this location
remove redundant assignments
remove redundant interfaces
Automatic commit of package [spacewalk-java] release [1.7.44-1].
---
java/code/internal/src/com/redhat/rhn/internal/doclet/ApiCall.java | 2
java/code/internal/src/com/redhat/rhn/internal/junit/RhnCustomFormatter.java | 3
java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java | 2
java/code/src/com/redhat/rhn/common/db/datasource/test/DataSourceParserTest.java | 8
java/code/src/com/redhat/rhn/common/errors/SatelliteExceptionHandler.java | 2
java/code/src/com/redhat/rhn/common/hibernate/ConnectionManager.java | 3
java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java | 12
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java | 32 --
java/code/src/com/redhat/rhn/common/messaging/ActionExecutor.java | 3
java/code/src/com/redhat/rhn/common/security/acl/Access.java | 2
java/code/src/com/redhat/rhn/common/security/acl/ActivationKeyAclHandler.java | 2
java/code/src/com/redhat/rhn/common/security/acl/ConfigAclHandler.java | 2
java/code/src/com/redhat/rhn/common/security/acl/ErrataAclHandler.java | 2
java/code/src/com/redhat/rhn/common/security/acl/MonitoringAclHandler.java | 2
java/code/src/com/redhat/rhn/common/security/acl/PackageAclHandler.java | 2
java/code/src/com/redhat/rhn/common/security/acl/SystemAclHandler.java | 2
java/code/src/com/redhat/rhn/common/security/acl/test/SystemAclHandlerTest.java | 3
java/code/src/com/redhat/rhn/common/util/Asserts.java | 2
java/code/src/com/redhat/rhn/common/util/download/DownloadUtils.java | 11
java/code/src/com/redhat/rhn/common/validator/Validator.java | 8
java/code/src/com/redhat/rhn/domain/action/ActionFactory.java | 4
java/code/src/com/redhat/rhn/domain/config/ConfigurationFactory.java | 2
java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartRawDataTest.java | 4
java/code/src/com/redhat/rhn/domain/org/Org.java | 10
java/code/src/com/redhat/rhn/domain/org/SystemMigrationFactory.java | 6
java/code/src/com/redhat/rhn/domain/server/ServerFactory.java | 10
java/code/src/com/redhat/rhn/domain/server/ServerGroupFactory.java | 5
java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java | 7
java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryVirtualizationTest.java | 3
java/code/src/com/redhat/rhn/domain/server/test/ServerTest.java | 2
java/code/src/com/redhat/rhn/domain/server/test/VirtualInstanceFactoryTest.java | 2
java/code/src/com/redhat/rhn/domain/token/TokenPackageFactory.java | 4
java/code/src/com/redhat/rhn/domain/token/test/ActivationKeyTest.java | 10
java/code/src/com/redhat/rhn/domain/user/UserFactory.java | 4
java/code/src/com/redhat/rhn/frontend/action/YourRhnAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/channel/TargetSystemsAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/channel/TargetSystemsConfirmAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/channel/manage/AddCustomErrataAction.java | 3
java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java | 4
java/code/src/com/redhat/rhn/frontend/action/channel/ssm/BaseSubscribeAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/configuration/files/DeleteFileAction.java | 40 +-
java/code/src/com/redhat/rhn/frontend/action/configuration/files/FileDetailsAction.java | 37 +-
java/code/src/com/redhat/rhn/frontend/action/configuration/files/LocalRevisionDeployAction.java | 22 -
java/code/src/com/redhat/rhn/frontend/action/errata/ChannelSetupAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/errata/ErrataConfirmAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/errata/ErrataSearchAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java | 7
java/code/src/com/redhat/rhn/frontend/action/kickstart/BaseKickstartScriptAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java | 17 -
java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKSScheduleAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartScriptActionTest.java | 8
java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartScriptDeleteActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgSoftwareSubscriptionsAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgSystemSubscriptionsAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/TrustAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementDetailsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementSubscriptionsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/patches/PatchConfirmAction.java | 68 +---
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/patches/PatchConfirmInstallAction.java | 68 +---
java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchHelper.java | 12
java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/FlexGuestAction.java | 3
java/code/src/com/redhat/rhn/frontend/action/systems/provisioning/kickstart/SessionStatusAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/sdc/UpdateCustomDataAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/ProvisionVirtualizationWizardAction.java | 3
java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/test/VirtualGuestsActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/tasko/ScheduleDetailAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/token/ActivationKeyChildChannelsAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/user/EditAddressSetupAction.java | 3
java/code/src/com/redhat/rhn/frontend/dto/AuditDto.java | 2
java/code/src/com/redhat/rhn/frontend/dto/UpgradablePackageListItem.java | 2
java/code/src/com/redhat/rhn/frontend/events/CloneErrataAction.java | 3
java/code/src/com/redhat/rhn/frontend/html/BaseTag.java | 2
java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java | 5
java/code/src/com/redhat/rhn/frontend/servlets/LocalizedEnvironmentFilter.java | 2
java/code/src/com/redhat/rhn/frontend/servlets/test/AuthFilterTest.java | 2
java/code/src/com/redhat/rhn/frontend/struts/BaseSetHelper.java | 4
java/code/src/com/redhat/rhn/frontend/struts/RhnValidationHelper.java | 5
java/code/src/com/redhat/rhn/frontend/struts/test/BaseSetListActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/taglibs/list/ColumnTag.java | 9
java/code/src/com/redhat/rhn/frontend/taglibs/list/DecoratorTag.java | 3
java/code/src/com/redhat/rhn/frontend/taglibs/list/ExpandableColumnTag.java | 2
java/code/src/com/redhat/rhn/frontend/taglibs/list/ListFilterHelper.java | 8
java/code/src/com/redhat/rhn/frontend/taglibs/list/RadioColumnTag.java | 5
java/code/src/com/redhat/rhn/frontend/taglibs/list/RowRendererTag.java | 3
java/code/src/com/redhat/rhn/frontend/taglibs/list/SelectableColumnTag.java | 5
java/code/src/com/redhat/rhn/frontend/taglibs/list/decorators/test/PageSizeDecoratorTest.java | 2
java/code/src/com/redhat/rhn/frontend/taglibs/test/ListTagTest.java | 4
java/code/src/com/redhat/rhn/frontend/xmlrpc/RhnXmlRpcServer.java | 6
java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/ActivationKeyHandler.java | 8
java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/test/ActivationKeyHandlerTest.java | 4
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/test/ChannelSoftwareHandlerTest.java | 6
java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/software/test/SoftwareHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/test/SystemDetailsHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/PackageDtoSerializer.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/ManagedServerGroupSerializerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java | 1
java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java | 4
java/code/src/com/redhat/rhn/manager/BaseManager.java | 2
java/code/src/com/redhat/rhn/manager/action/ActionManager.java | 156 ++++------
java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java | 6
java/code/src/com/redhat/rhn/manager/audit/AuditManager.java | 2
java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java | 6
java/code/src/com/redhat/rhn/manager/configuration/test/ConfigurationManagerTest.java | 9
java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java | 5
java/code/src/com/redhat/rhn/manager/kickstart/KickstartCloneCommand.java | 4
java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java | 10
java/code/src/com/redhat/rhn/manager/kickstart/KickstartLocaleCommand.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/ProvisionVirtualInstanceCommand.java | 6
java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerDistroCreateCommand.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScheduleCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScriptCommandTest.java | 4
java/code/src/com/redhat/rhn/manager/org/UpdateOrgSoftwareEntitlementsCommand.java | 2
java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java | 2
java/code/src/com/redhat/rhn/manager/profile/ProfileManager.java | 4
java/code/src/com/redhat/rhn/manager/system/CancelKickstartSessionOperation.java | 3
java/code/src/com/redhat/rhn/manager/system/UpdateChildChannelsCommand.java | 2
java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java | 2
java/code/src/com/redhat/rhn/manager/user/UserManager.java | 4
java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java | 20 -
java/code/src/com/redhat/rhn/taskomatic/TaskoSchedule.java | 9
java/code/src/com/redhat/rhn/taskomatic/task/CobblerSyncTask.java | 2
java/code/src/com/redhat/rhn/taskomatic/task/PackageCleanup.java | 2
java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java | 97 ++----
java/code/src/com/redhat/rhn/taskomatic/task/repomd/CompressingDigestOutputWriter.java | 5
java/code/src/com/redhat/rhn/testing/RhnMockDynaActionForm.java | 3
java/code/src/com/redhat/rhn/testing/ServerGroupTestUtils.java | 2
java/code/src/org/cobbler/Profile.java | 2
java/spacewalk-java.spec | 51 +++
rel-eng/packages/spacewalk-java | 2
131 files changed, 502 insertions(+), 556 deletions(-)
---
12 years, 3 months
java/spacewalk-java.spec rel-eng/packages
by Tomas Lestach
java/spacewalk-java.spec | 51 +++++++++++++++++++++++++++++++++++++++-
rel-eng/packages/spacewalk-java | 2 -
2 files changed, 51 insertions(+), 2 deletions(-)
New commits:
commit e5853885dfab6d9a1301949f153189197821f41b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 22:35:10 2012 +0100
Automatic commit of package [spacewalk-java] release [1.7.44-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 695fb9e..3c13f01 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -17,7 +17,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.7.43
+Version: 1.7.44
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -585,6 +585,55 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Mon Feb 27 2012 Tomas Lestach <tlestach(a)redhat.com> 1.7.44-1
+- remove redundant interfaces (tlestach(a)redhat.com)
+- remove redundant assignments (tlestach(a)redhat.com)
+- binaryInput cannot be null at this location (tlestach(a)redhat.com)
+- baos cannot be null at this location (tlestach(a)redhat.com)
+- remove redundant assignements (tlestach(a)redhat.com)
+- toChannel cannot be null at this location (tlestach(a)redhat.com)
+- user cannot be null at this location (tlestach(a)redhat.com)
+- selectedChannel can only be null at this location (tlestach(a)redhat.com)
+- regCount cannot be null at this location (tlestach(a)redhat.com)
+- pkgs cannot be null at this location (tlestach(a)redhat.com)
+- parent cannot be null at this location (tlestach(a)redhat.com)
+- pAdded cannot be null at this location (tlestach(a)redhat.com)
+- mtime cannot be null at this location (tlestach(a)redhat.com)
+- mess can only be null at this location (tlestach(a)redhat.com)
+- kss cannot be null at this location (tlestach(a)redhat.com)
+- key cannot be null at this location (tlestach(a)redhat.com)
+- info cannot be null at this location (tlestach(a)redhat.com)
+- currentErrata cannot be null at this location (tlestach(a)redhat.com)
+- cr cannot be null at this location (tlestach(a)redhat.com)
+- cr cannot be null at this location (tlestach(a)redhat.com)
+- count cannot be null at this location (tlestach(a)redhat.com)
+- compoundLocales cannot be null at this location (tlestach(a)redhat.com)
+- channel cannot be null at this location (tlestach(a)redhat.com)
+- updates cannot be null at this location (tlestach(a)redhat.com)
+- optimize code based on null and non-empty conditions (tlestach(a)redhat.com)
+- rebootAction cannot be null at this location (tlestach(a)redhat.com)
+- proposed cannot be null at this location (tlestach(a)redhat.com)
+- o can only be null at this location (tlestach(a)redhat.com)
+- is can only be null at this location (tlestach(a)redhat.com)
+- name cannot be null at this location (tlestach(a)redhat.com)
+- hostDir cannot be null at this location (tlestach(a)redhat.com)
+- epoch cannot be null at this location (tlestach(a)redhat.com)
+- desc cannot be null at this location (tlestach(a)redhat.com)
+- do not allocate object that will never be used in UpdateErrataCacheCommand
+ (tlestach(a)redhat.com)
+- do not allocate object that will never be used in SystemHandler
+ (tlestach(a)redhat.com)
+- remove dead code in DeleteFileAction (tlestach(a)redhat.com)
+- remove dead code in PatchConfirmInstallAction (tlestach(a)redhat.com)
+- remove dead code in PatchConfirmAction (tlestach(a)redhat.com)
+- remove dead code in KickstartFormatter (tlestach(a)redhat.com)
+- remove dead code in ErrataQueueWorker (tlestach(a)redhat.com)
+- remove dead code in ActionExecutor (tlestach(a)redhat.com)
+- remove unnecessary semicolons (tlestach(a)redhat.com)
+- remove unnecessary casts (tlestach(a)redhat.com)
+- do not check whether Org expression is an instance of Org
+ (tlestach(a)redhat.com)
+
* Mon Feb 27 2012 Tomas Lestach <tlestach(a)redhat.com> 1.7.43-1
- remove unused hbm query - TaskoBunch.lookupById (tlestach(a)redhat.com)
- remove unused hbm query - TaskoTask.lookupByName (tlestach(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index c18e9de..0d0f2bf 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.7.43-1 java/
+1.7.44-1 java/
12 years, 3 months
44 commits - java/code
by Tomas Lestach
java/code/internal/src/com/redhat/rhn/internal/doclet/ApiCall.java | 2
java/code/internal/src/com/redhat/rhn/internal/junit/RhnCustomFormatter.java | 3
java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java | 2
java/code/src/com/redhat/rhn/common/db/datasource/test/DataSourceParserTest.java | 8
java/code/src/com/redhat/rhn/common/errors/SatelliteExceptionHandler.java | 2
java/code/src/com/redhat/rhn/common/hibernate/ConnectionManager.java | 3
java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java | 12
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java | 32 --
java/code/src/com/redhat/rhn/common/messaging/ActionExecutor.java | 3
java/code/src/com/redhat/rhn/common/security/acl/Access.java | 2
java/code/src/com/redhat/rhn/common/security/acl/ActivationKeyAclHandler.java | 2
java/code/src/com/redhat/rhn/common/security/acl/ConfigAclHandler.java | 2
java/code/src/com/redhat/rhn/common/security/acl/ErrataAclHandler.java | 2
java/code/src/com/redhat/rhn/common/security/acl/MonitoringAclHandler.java | 2
java/code/src/com/redhat/rhn/common/security/acl/PackageAclHandler.java | 2
java/code/src/com/redhat/rhn/common/security/acl/SystemAclHandler.java | 2
java/code/src/com/redhat/rhn/common/security/acl/test/SystemAclHandlerTest.java | 3
java/code/src/com/redhat/rhn/common/util/Asserts.java | 2
java/code/src/com/redhat/rhn/common/util/download/DownloadUtils.java | 11
java/code/src/com/redhat/rhn/common/validator/Validator.java | 8
java/code/src/com/redhat/rhn/domain/action/ActionFactory.java | 4
java/code/src/com/redhat/rhn/domain/config/ConfigurationFactory.java | 2
java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartRawDataTest.java | 4
java/code/src/com/redhat/rhn/domain/org/Org.java | 10
java/code/src/com/redhat/rhn/domain/org/SystemMigrationFactory.java | 6
java/code/src/com/redhat/rhn/domain/server/ServerFactory.java | 10
java/code/src/com/redhat/rhn/domain/server/ServerGroupFactory.java | 5
java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java | 7
java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryVirtualizationTest.java | 3
java/code/src/com/redhat/rhn/domain/server/test/ServerTest.java | 2
java/code/src/com/redhat/rhn/domain/server/test/VirtualInstanceFactoryTest.java | 2
java/code/src/com/redhat/rhn/domain/token/TokenPackageFactory.java | 4
java/code/src/com/redhat/rhn/domain/token/test/ActivationKeyTest.java | 10
java/code/src/com/redhat/rhn/domain/user/UserFactory.java | 4
java/code/src/com/redhat/rhn/frontend/action/YourRhnAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/channel/TargetSystemsAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/channel/TargetSystemsConfirmAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/channel/manage/AddCustomErrataAction.java | 3
java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java | 4
java/code/src/com/redhat/rhn/frontend/action/channel/ssm/BaseSubscribeAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/configuration/files/DeleteFileAction.java | 40 +-
java/code/src/com/redhat/rhn/frontend/action/configuration/files/FileDetailsAction.java | 37 +-
java/code/src/com/redhat/rhn/frontend/action/configuration/files/LocalRevisionDeployAction.java | 22 -
java/code/src/com/redhat/rhn/frontend/action/errata/ChannelSetupAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/errata/ErrataConfirmAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/errata/ErrataSearchAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java | 7
java/code/src/com/redhat/rhn/frontend/action/kickstart/BaseKickstartScriptAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/kickstart/CreateProfileWizardAction.java | 17 -
java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKSScheduleAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartScriptActionTest.java | 8
java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartScriptDeleteActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgSoftwareSubscriptionsAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgSystemSubscriptionsAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/TrustAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementDetailsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementSubscriptionsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/patches/PatchConfirmAction.java | 68 +---
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/patches/PatchConfirmInstallAction.java | 68 +---
java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchHelper.java | 12
java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/FlexGuestAction.java | 3
java/code/src/com/redhat/rhn/frontend/action/systems/provisioning/kickstart/SessionStatusAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/sdc/UpdateCustomDataAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/ProvisionVirtualizationWizardAction.java | 3
java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/test/VirtualGuestsActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/tasko/ScheduleDetailAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/token/ActivationKeyChildChannelsAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/user/EditAddressSetupAction.java | 3
java/code/src/com/redhat/rhn/frontend/dto/AuditDto.java | 2
java/code/src/com/redhat/rhn/frontend/dto/UpgradablePackageListItem.java | 2
java/code/src/com/redhat/rhn/frontend/events/CloneErrataAction.java | 3
java/code/src/com/redhat/rhn/frontend/html/BaseTag.java | 2
java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java | 5
java/code/src/com/redhat/rhn/frontend/servlets/LocalizedEnvironmentFilter.java | 2
java/code/src/com/redhat/rhn/frontend/servlets/test/AuthFilterTest.java | 2
java/code/src/com/redhat/rhn/frontend/struts/BaseSetHelper.java | 4
java/code/src/com/redhat/rhn/frontend/struts/RhnValidationHelper.java | 5
java/code/src/com/redhat/rhn/frontend/struts/test/BaseSetListActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/taglibs/list/ColumnTag.java | 9
java/code/src/com/redhat/rhn/frontend/taglibs/list/DecoratorTag.java | 3
java/code/src/com/redhat/rhn/frontend/taglibs/list/ExpandableColumnTag.java | 2
java/code/src/com/redhat/rhn/frontend/taglibs/list/ListFilterHelper.java | 8
java/code/src/com/redhat/rhn/frontend/taglibs/list/RadioColumnTag.java | 5
java/code/src/com/redhat/rhn/frontend/taglibs/list/RowRendererTag.java | 3
java/code/src/com/redhat/rhn/frontend/taglibs/list/SelectableColumnTag.java | 5
java/code/src/com/redhat/rhn/frontend/taglibs/list/decorators/test/PageSizeDecoratorTest.java | 2
java/code/src/com/redhat/rhn/frontend/taglibs/test/ListTagTest.java | 4
java/code/src/com/redhat/rhn/frontend/xmlrpc/RhnXmlRpcServer.java | 6
java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/ActivationKeyHandler.java | 8
java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/test/ActivationKeyHandlerTest.java | 4
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/test/ChannelSoftwareHandlerTest.java | 6
java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/software/test/SoftwareHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/test/SystemDetailsHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/PackageDtoSerializer.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/ManagedServerGroupSerializerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java | 1
java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java | 4
java/code/src/com/redhat/rhn/manager/BaseManager.java | 2
java/code/src/com/redhat/rhn/manager/action/ActionManager.java | 156 ++++------
java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java | 6
java/code/src/com/redhat/rhn/manager/audit/AuditManager.java | 2
java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java | 6
java/code/src/com/redhat/rhn/manager/configuration/test/ConfigurationManagerTest.java | 9
java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java | 5
java/code/src/com/redhat/rhn/manager/kickstart/KickstartCloneCommand.java | 4
java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java | 10
java/code/src/com/redhat/rhn/manager/kickstart/KickstartLocaleCommand.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/ProvisionVirtualInstanceCommand.java | 6
java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerDistroCreateCommand.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScheduleCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScriptCommandTest.java | 4
java/code/src/com/redhat/rhn/manager/org/UpdateOrgSoftwareEntitlementsCommand.java | 2
java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java | 2
java/code/src/com/redhat/rhn/manager/profile/ProfileManager.java | 4
java/code/src/com/redhat/rhn/manager/system/CancelKickstartSessionOperation.java | 3
java/code/src/com/redhat/rhn/manager/system/UpdateChildChannelsCommand.java | 2
java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java | 2
java/code/src/com/redhat/rhn/manager/user/UserManager.java | 4
java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java | 20 -
java/code/src/com/redhat/rhn/taskomatic/TaskoSchedule.java | 9
java/code/src/com/redhat/rhn/taskomatic/task/CobblerSyncTask.java | 2
java/code/src/com/redhat/rhn/taskomatic/task/PackageCleanup.java | 2
java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java | 97 ++----
java/code/src/com/redhat/rhn/taskomatic/task/repomd/CompressingDigestOutputWriter.java | 5
java/code/src/com/redhat/rhn/testing/RhnMockDynaActionForm.java | 3
java/code/src/com/redhat/rhn/testing/ServerGroupTestUtils.java | 2
java/code/src/org/cobbler/Profile.java | 2
129 files changed, 451 insertions(+), 554 deletions(-)
New commits:
commit 2745c365a09216f23f82ecb395d27425a9ca88e3
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 22:05:48 2012 +0100
remove redundant interfaces
they're already inherited from the super class
+ removing unused imports caused by the removal
diff --git a/java/code/internal/src/com/redhat/rhn/internal/junit/RhnCustomFormatter.java b/java/code/internal/src/com/redhat/rhn/internal/junit/RhnCustomFormatter.java
index 7c92633..04578a5 100644
--- a/java/code/internal/src/com/redhat/rhn/internal/junit/RhnCustomFormatter.java
+++ b/java/code/internal/src/com/redhat/rhn/internal/junit/RhnCustomFormatter.java
@@ -28,7 +28,6 @@ import java.util.Hashtable;
import junit.framework.AssertionFailedError;
import junit.framework.Test;
-import junit.framework.TestListener;
/**
* A more spartan custom ant results logger, shamelessly hacked out
@@ -38,7 +37,7 @@ import junit.framework.TestListener;
*
* @version $Rev$
*/
-public class RhnCustomFormatter implements JUnitResultFormatter, TestListener {
+public class RhnCustomFormatter implements JUnitResultFormatter {
private static final double MS_PER_S = 1000.0;
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java b/java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java
index 9b92c94..49d1729 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java
@@ -27,7 +27,7 @@ import java.util.Map;
* @param <T> the type of the objects to be used in this list.
* @version $Rev$
*/
-public class DataResult<T> extends ArrayList<T> implements List<T> {
+public class DataResult<T> extends ArrayList<T> {
/**
* Comment for <code>serialVersionUID</code>
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/Access.java b/java/code/src/com/redhat/rhn/common/security/acl/Access.java
index 9176e9d..93652b1 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/Access.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/Access.java
@@ -48,7 +48,7 @@ import java.util.Map;
* when evaluating {@link Acl Acls}.
* @version $Rev$
*/
-public class Access extends BaseHandler implements AclHandler {
+public class Access extends BaseHandler {
protected static Logger log = Logger.getLogger(Access.class);
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/ActivationKeyAclHandler.java b/java/code/src/com/redhat/rhn/common/security/acl/ActivationKeyAclHandler.java
index a7fba77..d431fc4 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/ActivationKeyAclHandler.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/ActivationKeyAclHandler.java
@@ -28,7 +28,7 @@ import java.util.Map;
* ActivationKeyAclHandler
* @version $Rev$
*/
-public class ActivationKeyAclHandler extends BaseHandler implements AclHandler {
+public class ActivationKeyAclHandler extends BaseHandler {
/**
* Returns true if the Token whose id matches the given tid,
* has the requested entitlement given by entitlement label in param 0
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/ConfigAclHandler.java b/java/code/src/com/redhat/rhn/common/security/acl/ConfigAclHandler.java
index 07c073f..479e51e 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/ConfigAclHandler.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/ConfigAclHandler.java
@@ -31,7 +31,7 @@ import java.util.Map;
* Some acl implementation for configuration management
* @version $Rev$
*/
-public class ConfigAclHandler extends BaseHandler implements AclHandler {
+public class ConfigAclHandler extends BaseHandler {
/**
* Tell whether a file is a directory.
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/ErrataAclHandler.java b/java/code/src/com/redhat/rhn/common/security/acl/ErrataAclHandler.java
index 0e9290a..62e2f53 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/ErrataAclHandler.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/ErrataAclHandler.java
@@ -25,7 +25,7 @@ import java.util.Map;
* ErrataAclHandler
* @version $Rev$
*/
-public class ErrataAclHandler extends BaseHandler implements AclHandler {
+public class ErrataAclHandler extends BaseHandler {
/**
* Constructor
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/MonitoringAclHandler.java b/java/code/src/com/redhat/rhn/common/security/acl/MonitoringAclHandler.java
index 0754138..3bbec72 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/MonitoringAclHandler.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/MonitoringAclHandler.java
@@ -25,7 +25,7 @@ import java.util.Map;
* SystemAclHandler
* @version $Rev: 54296 $
*/
-public class MonitoringAclHandler extends BaseHandler implements AclHandler {
+public class MonitoringAclHandler extends BaseHandler {
/**
*
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/PackageAclHandler.java b/java/code/src/com/redhat/rhn/common/security/acl/PackageAclHandler.java
index dd386a5..0b6d3d8 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/PackageAclHandler.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/PackageAclHandler.java
@@ -34,7 +34,7 @@ import java.util.Set;
* ActivationKeyAclHandler
* @version $Rev$
*/
-public class PackageAclHandler extends BaseHandler implements AclHandler {
+public class PackageAclHandler extends BaseHandler {
private final Log log = LogFactory.getLog(this.getClass());
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/SystemAclHandler.java b/java/code/src/com/redhat/rhn/common/security/acl/SystemAclHandler.java
index d71e773..a5b9c55 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/SystemAclHandler.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/SystemAclHandler.java
@@ -36,7 +36,7 @@ import java.util.Map;
* SystemAclHandler
* @version $Rev$
*/
-public class SystemAclHandler extends BaseHandler implements AclHandler {
+public class SystemAclHandler extends BaseHandler {
/**
* Logger for this class
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/FlexGuestAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/FlexGuestAction.java
index 285064c..cfbde52 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/FlexGuestAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/FlexGuestAction.java
@@ -18,7 +18,6 @@ import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.dto.ChannelFamilySystemGroup;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper;
-import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
import com.redhat.rhn.manager.system.VirtualizationEntitlementsManager;
import org.apache.struts.action.ActionForm;
@@ -35,7 +34,7 @@ import javax.servlet.http.HttpServletResponse;
* FloatingVirtualizationAction
* @version $Rev$
*/
-public class FlexGuestAction extends EligibleFlexGuestAction implements Listable {
+public class FlexGuestAction extends EligibleFlexGuestAction {
private static final String SELECTABLE = "selectable";
private static final String SELECTED_FAMILY = "channel_family";
diff --git a/java/code/src/com/redhat/rhn/frontend/events/CloneErrataAction.java b/java/code/src/com/redhat/rhn/frontend/events/CloneErrataAction.java
index f3447ca..d05a72e 100644
--- a/java/code/src/com/redhat/rhn/frontend/events/CloneErrataAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/events/CloneErrataAction.java
@@ -15,7 +15,6 @@
package com.redhat.rhn.frontend.events;
import com.redhat.rhn.common.messaging.EventMessage;
-import com.redhat.rhn.common.messaging.MessageAction;
import com.redhat.rhn.domain.channel.Channel;
import com.redhat.rhn.domain.errata.Errata;
import com.redhat.rhn.domain.errata.ErrataFactory;
@@ -38,7 +37,7 @@ import java.util.Set;
* @version $Rev$
*/
public class CloneErrataAction
- extends AbstractDatabaseAction implements MessageAction {
+ extends AbstractDatabaseAction {
private static Logger log = Logger.getLogger(CloneErrataAction.class);
diff --git a/java/code/src/com/redhat/rhn/manager/system/CancelKickstartSessionOperation.java b/java/code/src/com/redhat/rhn/manager/system/CancelKickstartSessionOperation.java
index d99d3be..5a94223 100644
--- a/java/code/src/com/redhat/rhn/manager/system/CancelKickstartSessionOperation.java
+++ b/java/code/src/com/redhat/rhn/manager/system/CancelKickstartSessionOperation.java
@@ -19,14 +19,13 @@ import com.redhat.rhn.common.validator.ValidatorError;
import com.redhat.rhn.domain.kickstart.KickstartFactory;
import com.redhat.rhn.domain.kickstart.KickstartSession;
import com.redhat.rhn.domain.user.User;
-import com.redhat.rhn.manager.PersistOperation;
/**
* DeleteSystemFromActionOperation - deletes a system from an action
* @version $Rev$
*/
public class CancelKickstartSessionOperation
- extends BaseSystemOperation implements PersistOperation {
+ extends BaseSystemOperation {
/**
* Construct the Operation
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/CompressingDigestOutputWriter.java b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/CompressingDigestOutputWriter.java
index de76558..9a3820d 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/CompressingDigestOutputWriter.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/CompressingDigestOutputWriter.java
@@ -17,8 +17,6 @@ package com.redhat.rhn.taskomatic.task.repomd;
import com.redhat.rhn.common.util.StringUtil;
import java.io.BufferedOutputStream;
-import java.io.Closeable;
-import java.io.Flushable;
import java.io.IOException;
import java.io.OutputStream;
import java.security.DigestOutputStream;
@@ -31,8 +29,7 @@ import java.util.zip.GZIPOutputStream;
* @version $Rev $
*
*/
-public class CompressingDigestOutputWriter extends OutputStream implements
- Closeable, Flushable {
+public class CompressingDigestOutputWriter extends OutputStream {
private DigestOutputStream uncompressedDigestStream;
private DigestOutputStream compressedDigestStream;
diff --git a/java/code/src/com/redhat/rhn/testing/RhnMockDynaActionForm.java b/java/code/src/com/redhat/rhn/testing/RhnMockDynaActionForm.java
index 6998009..72a6645 100644
--- a/java/code/src/com/redhat/rhn/testing/RhnMockDynaActionForm.java
+++ b/java/code/src/com/redhat/rhn/testing/RhnMockDynaActionForm.java
@@ -15,7 +15,6 @@
package com.redhat.rhn.testing;
import com.mockobjects.Expectation;
-import com.mockobjects.Verifiable;
import org.apache.struts.action.DynaActionForm;
import org.apache.struts.action.DynaActionFormClass;
@@ -36,7 +35,7 @@ import junit.framework.AssertionFailedError;
* @version $Rev$
*/
public class RhnMockDynaActionForm extends DynaActionForm
- implements Verifiable, Expectation {
+ implements Expectation {
/** Name of FormBean */
private String formName;
commit 92f6d15a2bd0bd8dd9c9ed17a4b744e38a3075de
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:59:54 2012 +0100
remove redundant assignments
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListFilterHelper.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListFilterHelper.java
index 56fa81c..38324a9 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListFilterHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListFilterHelper.java
@@ -87,12 +87,10 @@ public class ListFilterHelper {
filterBy = tmp;
}
catch (UnsupportedEncodingException e) {
- // This makes checkstyle happy
- tmp = null;
+ // nothing
}
catch (IllegalArgumentException e) {
// an illegal sequence was detected
- tmp = null;
}
try {
@@ -100,12 +98,10 @@ public class ListFilterHelper {
filterValue = tmp;
}
catch (UnsupportedEncodingException e) {
- // This makes checkstyle happy
- tmp = null;
+ // nothing
}
catch (IllegalArgumentException e) {
// an illegal sequence was detected
- tmp = null;
}
List filteredData = new ArrayList();
commit 47f2365f1ccfe67d57c46e0736ec736a0c52093c
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:55:05 2012 +0100
binaryInput cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/taskomatic/TaskoSchedule.java b/java/code/src/com/redhat/rhn/taskomatic/TaskoSchedule.java
index cc510b3..ab17395 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/TaskoSchedule.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/TaskoSchedule.java
@@ -126,12 +126,9 @@ public class TaskoSchedule {
try {
if (blob != null) {
InputStream binaryInput = new ByteArrayInputStream(blob);
-
- if (null != binaryInput) {
- ObjectInputStream in = new ObjectInputStream(binaryInput);
- obj = in.readObject();
- in.close();
- }
+ ObjectInputStream in = new ObjectInputStream(binaryInput);
+ obj = in.readObject();
+ in.close();
}
}
catch (Exception e) {
commit 4ee962babd6138cbfd19ce04f5d21d20a8364311
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:47:40 2012 +0100
baos cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java b/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java
index 8855e93..3b163bd 100644
--- a/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java
+++ b/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java
@@ -432,13 +432,11 @@ public abstract class HibernateFactory {
throw new DatabaseException(e.toString());
}
finally {
- if (baos != null) {
- try {
- baos.close();
- }
- catch (IOException ex) {
- throw new DatabaseException(ex.toString());
- }
+ try {
+ baos.close();
+ }
+ catch (IOException ex) {
+ throw new DatabaseException(ex.toString());
}
}
}
commit 46f20e600181e77e61d03d43e68d27d232722002
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:45:08 2012 +0100
remove redundant assignements
diff --git a/java/code/src/com/redhat/rhn/common/validator/Validator.java b/java/code/src/com/redhat/rhn/common/validator/Validator.java
index df4ed58..ac010b4 100644
--- a/java/code/src/com/redhat/rhn/common/validator/Validator.java
+++ b/java/code/src/com/redhat/rhn/common/validator/Validator.java
@@ -197,11 +197,14 @@ public class Validator {
String identifier =
LocalizationService.getInstance().getMessage(constraint.getIdentifier());
+ /* code does not change anything, leaving just for demonstration
if ((dataType.equals("String")) || (dataType.equals("java.lang.String"))) {
validationMessage = null;
}
+ else
+ */
- else if ((dataType.equals("int")) || (dataType.equals("java.lang.Integer"))) {
+ if ((dataType.equals("int")) || (dataType.equals("java.lang.Integer"))) {
try {
Integer.parseInt(data);
}
@@ -239,7 +242,8 @@ public class Validator {
(data.equalsIgnoreCase("false")) ||
(data.equalsIgnoreCase("yes")) ||
(data.equalsIgnoreCase("no"))) {
- validationMessage = null;
+ // empty
+ // validationMessage = null;
}
else {
validationMessage = new ValidatorError("errors.invalid", identifier);
commit 0a03face55bd2524327be375b55b6d7ec8f3aee5
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:41:30 2012 +0100
toChannel cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java b/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
index 98b83bf..822cefc 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
@@ -195,10 +195,8 @@ public class ChannelManager extends BaseManager {
public static void cloneNewestPackages(Long fromChannelId, Channel toChannel,
String label) {
ChannelFactory.cloneNewestPackageCache(fromChannelId, toChannel.getId());
- if (toChannel != null) {
- ChannelManager.queueChannelChange(
- toChannel.getLabel(), label, "clone channel");
- }
+ ChannelManager.queueChannelChange(
+ toChannel.getLabel(), label, "clone channel");
}
/**
commit 9a42ab3740696bd2c86c1acbab113a382db74dc0
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:39:34 2012 +0100
user cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/EditAddressSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/user/EditAddressSetupAction.java
index 6064281..23b612b 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/EditAddressSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/EditAddressSetupAction.java
@@ -56,8 +56,7 @@ public class EditAddressSetupAction extends RhnAction {
User user = UserManager.lookupUser(requestContext.getLoggedInUser(), uid);
request.setAttribute(RhnHelper.TARGET_USER, user);
form.set("uid", user.getId());
- if (!RhnValidationHelper.getFailedValidation(request) &&
- user != null) {
+ if (!RhnValidationHelper.getFailedValidation(request)) {
form.set("address1", user.getAddress1());
form.set("address2", user.getAddress2());
form.set("phone", user.getPhone());
commit 07aa3d2f92f56425f1b9434a314675de421be978
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:38:49 2012 +0100
selectedChannel can only be null at this location
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/AddCustomErrataAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/AddCustomErrataAction.java
index de358b1..0b23c0c 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/AddCustomErrataAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/AddCustomErrataAction.java
@@ -108,8 +108,7 @@ public class AddCustomErrataAction extends RhnListAction {
//If this is a clone, go ahead and pre-select the original Channel
Channel original = ChannelFactory.lookupOriginalChannel(currentChan);
- if (!requestContext.isSubmitted() && selectedChannel == null &&
- original != null) {
+ if (!requestContext.isSubmitted() && original != null) {
selectedChannel = original;
selectedChannelStr = selectedChannel.getId().toString();
}
commit 93d11d53aeec94edf6f223f4d59d0c87a5a0707f
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:37:50 2012 +0100
regCount cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgSoftwareSubscriptionsAction.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgSoftwareSubscriptionsAction.java
index 3d828e5..61b2fbf 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgSoftwareSubscriptionsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgSoftwareSubscriptionsAction.java
@@ -148,7 +148,7 @@ public class OrgSoftwareSubscriptionsAction extends RhnAction implements Listabl
Long flex = subsMap.containsKey(flexCountKey) ?
processCount(subsMap.get(flexCountKey), errors, cfm) : 0;
- if (flex != null && regCount != null) {
+ if (flex != null) {
UpdateOrgSoftwareEntitlementsCommand cmd =
new UpdateOrgSoftwareEntitlementsCommand(cfm.getLabel(), org,
regCount, flex);
commit ee6ad2fcf43b02416abdd17e7c1f71072d92bb79
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:37:08 2012 +0100
pkgs cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
index 0c591c0..18e4391 100644
--- a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
+++ b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
@@ -1018,89 +1018,87 @@ public class ActionManager extends BaseManager {
pd.setLabel("delta-" + System.currentTimeMillis());
PackageFactory.save(pd);
- if (pkgs != null) {
- // this is SOOOO WRONG, we need to get rid of DataSource
- WriteMode m = ModeFactory.getWriteMode("Action_queries",
- "insert_package_delta_element");
- for (Iterator itr = pkgs.iterator(); itr.hasNext();) {
- PackageMetadata pm = (PackageMetadata) itr.next();
- Map params = new HashMap();
- params.put("delta_id", pd.getId());
- if (pm.getComparisonAsInt() == PackageMetadata.KEY_THIS_ONLY) {
-
- if (log.isDebugEnabled()) {
- log.debug("compare returned [KEY_THIS_ONLY]; " +
- "deleting package from system");
- }
-
- params.put("operation", ActionFactory.TXN_OPERATION_DELETE);
- params.put("n", pm.getName());
- params.put("v", pm.getSystem().getVersion());
- params.put("r", pm.getSystem().getRelease());
- String epoch = pm.getSystem().getEpoch();
- params.put("e", epoch == "" ? null : epoch);
- params.put("a", pm.getSystem().getArch() != null ?
- pm.getSystem().getArch() : "");
- m.executeUpdate(params);
- }
- else if (pm.getComparisonAsInt() == PackageMetadata.KEY_OTHER_ONLY) {
-
- if (log.isDebugEnabled()) {
- log.debug("compare returned [KEY_OTHER_ONLY]; " +
- "installing package to system: " +
- pm.getName() + "-" + pm.getOtherEvr());
- }
-
- params.put("operation", ActionFactory.TXN_OPERATION_INSERT);
- params.put("n", pm.getName());
- params.put("v", pm.getOther().getVersion());
- params.put("r", pm.getOther().getRelease());
- String epoch = pm.getOther().getEpoch();
- params.put("e", epoch == "" ? null : epoch);
- params.put("a", pm.getOther().getArch() != null ?
- pm.getOther().getArch() : "");
- m.executeUpdate(params);
+ // this is SOOOO WRONG, we need to get rid of DataSource
+ WriteMode m = ModeFactory.getWriteMode("Action_queries",
+ "insert_package_delta_element");
+ for (Iterator itr = pkgs.iterator(); itr.hasNext();) {
+ PackageMetadata pm = (PackageMetadata) itr.next();
+ Map params = new HashMap();
+ params.put("delta_id", pd.getId());
+ if (pm.getComparisonAsInt() == PackageMetadata.KEY_THIS_ONLY) {
- }
- else if (pm.getComparisonAsInt() == PackageMetadata.KEY_THIS_NEWER ||
- pm.getComparisonAsInt() == PackageMetadata.KEY_OTHER_NEWER) {
-
- if (log.isDebugEnabled()) {
- log.debug("compare returned [KEY_THIS_NEWER OR KEY_OTHER_NEWER]; " +
- "deleting package [" + pm.getName() + "-" +
- pm.getSystemEvr() + "] from system " +
- "installing package [" + pm.getName() + "-" +
- pm.getOther().getEvr() + "] to system");
- }
-
- String epoch;
- if (isPackageRemovable(pm.getName())) {
- params.put("operation", ActionFactory.TXN_OPERATION_DELETE);
- params.put("n", pm.getName());
- params.put("v", pm.getSystem().getVersion());
- params.put("r", pm.getSystem().getRelease());
- epoch = pm.getSystem().getEpoch();
- params.put("e", epoch == "" ? null : epoch);
- params.put("a", pm.getSystem().getArch() != null ?
- pm.getOther().getArch() : "");
- m.executeUpdate(params);
- }
-
- params.put("operation", ActionFactory.TXN_OPERATION_INSERT);
- params.put("n", pm.getName());
- params.put("v", pm.getOther().getVersion());
- params.put("r", pm.getOther().getRelease());
- epoch = pm.getOther().getEpoch();
- params.put("e", epoch == "" ? null : epoch);
- params.put("a", pm.getOther().getArch() != null ?
- pm.getOther().getArch() : "");
- m.executeUpdate(params);
- }
- }
+ if (log.isDebugEnabled()) {
+ log.debug("compare returned [KEY_THIS_ONLY]; " +
+ "deleting package from system");
+ }
+
+ params.put("operation", ActionFactory.TXN_OPERATION_DELETE);
+ params.put("n", pm.getName());
+ params.put("v", pm.getSystem().getVersion());
+ params.put("r", pm.getSystem().getRelease());
+ String epoch = pm.getSystem().getEpoch();
+ params.put("e", epoch == "" ? null : epoch);
+ params.put("a", pm.getSystem().getArch() != null ?
+ pm.getSystem().getArch() : "");
+ m.executeUpdate(params);
+ }
+ else if (pm.getComparisonAsInt() == PackageMetadata.KEY_OTHER_ONLY) {
+
+ if (log.isDebugEnabled()) {
+ log.debug("compare returned [KEY_OTHER_ONLY]; " +
+ "installing package to system: " +
+ pm.getName() + "-" + pm.getOtherEvr());
+ }
+
+ params.put("operation", ActionFactory.TXN_OPERATION_INSERT);
+ params.put("n", pm.getName());
+ params.put("v", pm.getOther().getVersion());
+ params.put("r", pm.getOther().getRelease());
+ String epoch = pm.getOther().getEpoch();
+ params.put("e", epoch == "" ? null : epoch);
+ params.put("a", pm.getOther().getArch() != null ?
+ pm.getOther().getArch() : "");
+ m.executeUpdate(params);
+
+ }
+ else if (pm.getComparisonAsInt() == PackageMetadata.KEY_THIS_NEWER ||
+ pm.getComparisonAsInt() == PackageMetadata.KEY_OTHER_NEWER) {
+
+ if (log.isDebugEnabled()) {
+ log.debug("compare returned [KEY_THIS_NEWER OR KEY_OTHER_NEWER]; " +
+ "deleting package [" + pm.getName() + "-" +
+ pm.getSystemEvr() + "] from system " +
+ "installing package [" + pm.getName() + "-" +
+ pm.getOther().getEvr() + "] to system");
+ }
+
+ String epoch;
+ if (isPackageRemovable(pm.getName())) {
+ params.put("operation", ActionFactory.TXN_OPERATION_DELETE);
+ params.put("n", pm.getName());
+ params.put("v", pm.getSystem().getVersion());
+ params.put("r", pm.getSystem().getRelease());
+ epoch = pm.getSystem().getEpoch();
+ params.put("e", epoch == "" ? null : epoch);
+ params.put("a", pm.getSystem().getArch() != null ?
+ pm.getOther().getArch() : "");
+ m.executeUpdate(params);
+ }
+
+ params.put("operation", ActionFactory.TXN_OPERATION_INSERT);
+ params.put("n", pm.getName());
+ params.put("v", pm.getOther().getVersion());
+ params.put("r", pm.getOther().getRelease());
+ epoch = pm.getOther().getEpoch();
+ params.put("e", epoch == "" ? null : epoch);
+ params.put("a", pm.getOther().getArch() != null ?
+ pm.getOther().getArch() : "");
+ m.executeUpdate(params);
+ }
}
// this is SOOOO WRONG, we need to get rid of DataSource
- WriteMode m = ModeFactory.getWriteMode("Action_queries",
+ m = ModeFactory.getWriteMode("Action_queries",
"insert_action_package_delta");
Map params = new HashMap();
params.put("action_id", action.getId());
commit bc087f7afe79157423756141287672ded1d0349f
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:34:03 2012 +0100
parent cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/PackageCleanup.java b/java/code/src/com/redhat/rhn/taskomatic/task/PackageCleanup.java
index fb201bb..a02e58a 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/PackageCleanup.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/PackageCleanup.java
@@ -105,7 +105,7 @@ public class PackageCleanup extends RhnJavaJob {
}
parent = new File(pkgDir, pathFile.getPath());
}
- while (parent != null && parent.delete());
+ while (parent.delete());
}
else {
log.error(f.getAbsoluteFile() + " not found");
commit f8e56c6f41d3fe72fba73f3b1d1728364707f810
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:33:02 2012 +0100
pAdded cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java b/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
index 5197833..1995cbf 100644
--- a/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
@@ -234,7 +234,7 @@ public class UpdateErrataCacheCommand extends BaseTransactionCommand {
}
Map retval = new HashMap();
- if (pAdded != null && !pAdded.isEmpty()) {
+ if (!pAdded.isEmpty()) {
retval.put("packages", new LinkedList(pAdded));
}
commit a9eaf84d54fce71e67c0d90db561a0a818d7d5c5
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:32:18 2012 +0100
mtime cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/CobblerSyncTask.java b/java/code/src/com/redhat/rhn/taskomatic/task/CobblerSyncTask.java
index 1f3ead1..f14e1b2 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/CobblerSyncTask.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/CobblerSyncTask.java
@@ -81,7 +81,7 @@ public class CobblerSyncTask extends RhnJavaJob {
LAST_UPDATED.get());
//If we got an mtime from cobbler and that mtime is before our last update
// Then don't update anything
- if (mtime != null && mtime.longValue() < CobblerSyncTask.LAST_UPDATED.get()) {
+ if (mtime.longValue() < CobblerSyncTask.LAST_UPDATED.get()) {
log.debug("Cobbler mtime is less than last change, skipping");
return;
}
commit 82649a8786f91f3d707ee5ec99ec2e1fdb275394
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:30:24 2012 +0100
mess can only be null at this location
+ remove unncessary else block
diff --git a/java/code/src/com/redhat/rhn/common/localization/LocalizationService.java b/java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
index ac0144d..6d21190 100644
--- a/java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
+++ b/java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
@@ -275,17 +275,13 @@ public class LocalizationService {
if (!keyToBundleMap.containsKey(messageId)) {
return getMissingMessageString(messageId);
}
- else {
- if (mess == null) {
- z = Class.forName((String) keyToBundleMap.get(messageId));
- // If we already determined that there aren't an bundles
- // for this Locale then we shouldn't repeatedly fail
- // attempts to parse the bundle. Instead just force a
- // call to the default Locale.
- mess = XmlMessages.getInstance().format(z, locale,
- messageId, args);
- }
- }
+ z = Class.forName((String) keyToBundleMap.get(messageId));
+ // If we already determined that there aren't an bundles
+ // for this Locale then we shouldn't repeatedly fail
+ // attempts to parse the bundle. Instead just force a
+ // call to the default Locale.
+ mess = XmlMessages.getInstance().format(z, locale,
+ messageId, args);
}
catch (MissingResourceException e) {
// Try again with DEFAULT_LOCALE
commit e36a59b3cb4827a94df1c6dff9a14e42006caf65
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:29:13 2012 +0100
kss cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/provisioning/kickstart/SessionStatusAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/provisioning/kickstart/SessionStatusAction.java
index 88fa238..8176bf3 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/provisioning/kickstart/SessionStatusAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/provisioning/kickstart/SessionStatusAction.java
@@ -128,7 +128,7 @@ public class SessionStatusAction extends RhnAction {
}
// Check for downgrading base channel, example RHEL5 to RHEL4
request.setAttribute("kswarning", null);
- if ((kss != null) && (kss.getHostServer() != null)) {
+ if (kss.getHostServer() != null) {
if ((kss.getHostServer().getBaseChannel().compareTo(
kss.getKstree().getChannel()) < 0)) {
String warning = LocalizationService.getInstance().getMessage(
commit 26a71e35d750ffddae7b0c0f505dfb85418386c7
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:28:14 2012 +0100
key cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/frontend/action/YourRhnAction.java b/java/code/src/com/redhat/rhn/frontend/action/YourRhnAction.java
index f01269c..2f0b626 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/YourRhnAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/YourRhnAction.java
@@ -93,7 +93,7 @@ public class YourRhnAction extends RhnAction {
else if (key.equals(Pane.TASKS)) {
renderer = new TasksRenderer();
}
- if (key != null && renderer != null) {
+ if (renderer != null) {
renderers.put(key, renderer);
}
}
commit 7bf983a6d3da8544ba106c9cb5fedb7b952bfb54
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:27:37 2012 +0100
info cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/common/hibernate/ConnectionManager.java b/java/code/src/com/redhat/rhn/common/hibernate/ConnectionManager.java
index d9bd00c..e36747a 100644
--- a/java/code/src/com/redhat/rhn/common/hibernate/ConnectionManager.java
+++ b/java/code/src/com/redhat/rhn/common/hibernate/ConnectionManager.java
@@ -289,8 +289,7 @@ class ConnectionManager {
private Session getInternalSession() {
SessionInfo info = threadSessionInfo();
- if (info == null ||
- (info != null && info.getSession() == null)) {
+ if (info == null || info.getSession() == null) {
try {
if (LOG.isDebugEnabled()) {
LOG.debug("YYY Opening Hibernate Session");
commit db8d3256b247d4532b77a2c9155fb817ed4ee9f8
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:26:21 2012 +0100
currentErrata cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/frontend/action/errata/ErrataConfirmAction.java b/java/code/src/com/redhat/rhn/frontend/action/errata/ErrataConfirmAction.java
index 8655d5e..6246f65 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/errata/ErrataConfirmAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/errata/ErrataConfirmAction.java
@@ -92,7 +92,7 @@ public class ErrataConfirmAction extends RhnListDispatchAction {
DataResult systems = ErrataManager.relevantSystemsInSet(user,
SetLabels.AFFECTED_SYSTEMS_LIST, currentErrata.getId(), null);
- if (currentErrata != null && !systems.isEmpty()) {
+ if (!systems.isEmpty()) {
Action update = ActionManager.createErrataAction(user, currentErrata);
for (int i = 0; i < systems.size(); i++) {
ActionManager.addServerToAction(new Long(((SystemOverview)systems.get(i))
commit 9b8a0768d946596adfb7f18467ec269b64114915
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:25:36 2012 +0100
cr cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/frontend/action/configuration/files/LocalRevisionDeployAction.java b/java/code/src/com/redhat/rhn/frontend/action/configuration/files/LocalRevisionDeployAction.java
index 3f505ea..1234e03 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/configuration/files/LocalRevisionDeployAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/configuration/files/LocalRevisionDeployAction.java
@@ -76,19 +76,17 @@ public class LocalRevisionDeployAction extends RhnAction {
params);
}
- if (cr != null) {
- Server srv = findServer(request, cr);
- if (ConfigurationManager.getInstance().isConfigEnabled(srv, usr)) {
- request.setAttribute(DEPLOYABLE, Boolean.TRUE);
- }
- if (isSubmitted(dForm)) {
- submitDeploy(dForm, cr, srv, usr);
- success(request);
- return getStrutsDelegate().forwardParams(mapping.findForward("success"),
- params);
- }
- updateRequest(request, cr, srv);
+ Server srv = findServer(request, cr);
+ if (ConfigurationManager.getInstance().isConfigEnabled(srv, usr)) {
+ request.setAttribute(DEPLOYABLE, Boolean.TRUE);
+ }
+ if (isSubmitted(dForm)) {
+ submitDeploy(dForm, cr, srv, usr);
+ success(request);
+ return getStrutsDelegate().forwardParams(mapping.findForward("success"),
+ params);
}
+ updateRequest(request, cr, srv);
DatePicker d = getStrutsDelegate().prepopulateDatePicker(request, dForm, "date",
DatePicker.YEAR_RANGE_POSITIVE);
commit 3797171d7e44221eff26c0d79aa014dac604fb15
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:25:10 2012 +0100
cr cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/frontend/action/configuration/files/FileDetailsAction.java b/java/code/src/com/redhat/rhn/frontend/action/configuration/files/FileDetailsAction.java
index ffe1fa6..f604d7c 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/configuration/files/FileDetailsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/configuration/files/FileDetailsAction.java
@@ -74,27 +74,26 @@ public class FileDetailsAction extends RhnAction {
cff.set(ConfigFileForm.REV_PATH, cr.getConfigFile().getConfigFileName().getPath());
Map params = makeParamMap(request);
- if (cr != null) {
- if (isSubmitted(cff)) {
- ConfigFileBuilder builder = ConfigFileBuilder.getInstance();
- try {
- cr = builder.update(cff.toRevisedData(cr),
- context.getLoggedInUser(), cr.getConfigFile());
- params.put("crid", cr.getId().toString());
- }
- catch (ValidatorException ve) {
- getStrutsDelegate().saveMessages(request, ve.getResult());
- RhnValidationHelper.setFailedValidation(request);
- cff.updateFromRevision(request, cr);
- setupRequestParams(context, cr);
- return getStrutsDelegate().forwardParams(
- mapping.findForward("error"), params);
- }
+ if (isSubmitted(cff)) {
+ ConfigFileBuilder builder = ConfigFileBuilder.getInstance();
+ try {
+ cr = builder.update(cff.toRevisedData(cr),
+ context.getLoggedInUser(), cr.getConfigFile());
+ params.put("crid", cr.getId().toString());
+ }
+ catch (ValidatorException ve) {
+ getStrutsDelegate().saveMessages(request, ve.getResult());
+ RhnValidationHelper.setFailedValidation(request);
+ cff.updateFromRevision(request, cr);
+ setupRequestParams(context, cr);
+ return getStrutsDelegate().forwardParams(
+ mapping.findForward("error"), params);
}
- cff.updateFromRevision(request, cr);
- setupRequestParams(context, cr);
- request.setAttribute("form", cff);
}
+ cff.updateFromRevision(request, cr);
+ setupRequestParams(context, cr);
+ request.setAttribute("form", cff);
+
return getStrutsDelegate().forwardParams(mapping.findForward("default"), params);
}
commit a3846687b09989f7d92cb5b9056a139998d1eb45
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:24:08 2012 +0100
count cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgSystemSubscriptionsAction.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgSystemSubscriptionsAction.java
index 097a3f2..3ada62c 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgSystemSubscriptionsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/OrgSystemSubscriptionsAction.java
@@ -102,7 +102,7 @@ public class OrgSystemSubscriptionsAction extends RhnAction {
"orgsystemsubs.invalid", ent.getHumanReadableLabel());
return (RhnValidationHelper.validatorErrorToActionErrors(error));
}
- if (count != null && !StringUtils.isEmpty(count)) {
+ if (StringUtils.isNotEmpty(count)) {
UpdateOrgSystemEntitlementsCommand cmd =
new UpdateOrgSystemEntitlementsCommand(ent, org, newCount);
ValidatorError ve = cmd.store();
commit bfa90a3a8985ed2c00a8b8a7335c40e29039d8ce
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:20:34 2012 +0100
compoundLocales cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/common/localization/LocalizationService.java b/java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
index 08be9ed..ac0144d 100644
--- a/java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
+++ b/java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
@@ -146,14 +146,12 @@ public class LocalizationService {
LocaleInfo li = new LocaleInfo(locale);
this.supportedLocales.put(locale, li);
}
- if (compoundLocales != null) {
- for (Iterator iter = compoundLocales.iterator(); iter.hasNext();) {
- String cl = (String) iter.next();
- String[] parts = cl.split("_");
- LocaleInfo li = new LocaleInfo(parts[0], cl);
- if (this.supportedLocales.get(parts[0]) == null) {
- this.supportedLocales.put(parts[0], li);
- }
+ for (Iterator iter = compoundLocales.iterator(); iter.hasNext();) {
+ String cl = (String) iter.next();
+ String[] parts = cl.split("_");
+ LocaleInfo li = new LocaleInfo(parts[0], cl);
+ if (this.supportedLocales.get(parts[0]) == null) {
+ this.supportedLocales.put(parts[0], li);
}
}
}
commit 61601c8cfefecbd308e3b2a7b3d8cdbbd6dd9b4f
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:19:39 2012 +0100
channel cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/manager/system/UpdateChildChannelsCommand.java b/java/code/src/com/redhat/rhn/manager/system/UpdateChildChannelsCommand.java
index 22da04b..cbe3768 100644
--- a/java/code/src/com/redhat/rhn/manager/system/UpdateChildChannelsCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/system/UpdateChildChannelsCommand.java
@@ -143,7 +143,7 @@ public class UpdateChildChannelsCommand extends BaseUpdateChannelCommand {
throw new InvalidChannelException();
}
- if (channel != null && log.isDebugEnabled()) {
+ if (log.isDebugEnabled()) {
log.debug("checking to see if we can sub: " + channel.getLabel());
}
if (!SystemManager.canServerSubscribeToChannel(loggedInUser.getOrg(),
commit 62691739ba42778173399bfd2b95613b69fa5d44
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:13:39 2012 +0100
updates cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java b/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
index 878a23f..5197833 100644
--- a/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
@@ -262,7 +262,7 @@ public class UpdateErrataCacheCommand extends BaseTransactionCommand {
private void scheduleAutoUpdates(Long sid, Org org, Map updates) {
log.debug("Scheduling auto updates");
List errataAdded = (List) updates.get("errata");
- if (updates == null || errataAdded == null) {
+ if (errataAdded == null) {
return;
}
log.debug("Have errata - scheduling");
commit 073914cf55f581f843548289b8300608b8cbb263
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:12:30 2012 +0100
optimize code based on null and non-empty conditions
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 b650496..728156e 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
@@ -306,18 +306,11 @@ public class CreateProfileWizardAction extends RhnWizardAction {
}
else {
form.set(KSTREES_PARAM, trees);
- if (trees != null && trees.size() > 0) {
- if (!currentChanId.equals(prevChanId)) {
- form.set(PREV_CHAN_ID, currentChanId);
- if (trees == null || trees.size() == 0) {
- form.set(KSTREE_ID_PARAM, null);
- }
- else {
- KickstartableTree tree = (KickstartableTree)
- trees.get(trees.size() - 1);
- form.set(KSTREE_ID_PARAM, tree.getId());
- }
- }
+ if (!currentChanId.equals(prevChanId)) {
+ form.set(PREV_CHAN_ID, currentChanId);
+ KickstartableTree tree = (KickstartableTree)
+ trees.get(trees.size() - 1);
+ form.set(KSTREE_ID_PARAM, tree.getId());
}
}
}
commit 232efd2014e43ff8b3a3ac4378d5921294d3e617
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:03:24 2012 +0100
rebootAction cannot be null at this location
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 d154c30..7703f0c 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
@@ -793,7 +793,7 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
rebootAction.setEarliestAction(this.getScheduleDate());
rebootAction.setOrg(this.getUser().getOrg());
rebootAction.setName(rebootAction.getActionType().getName());
- log.debug("** saving reboot action: " + (rebootAction == null));
+ log.debug("** saving reboot action: " + rebootAction.getName());
ActionFactory.save(rebootAction);
log.debug("** Saved rebootAction: " + rebootAction.getId());
commit 0b30d7735fd8e0b99d2c8a230673e1117d99684b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:01:50 2012 +0100
proposed cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/manager/org/UpdateOrgSoftwareEntitlementsCommand.java b/java/code/src/com/redhat/rhn/manager/org/UpdateOrgSoftwareEntitlementsCommand.java
index 52aa1d6..68104d4 100644
--- a/java/code/src/com/redhat/rhn/manager/org/UpdateOrgSoftwareEntitlementsCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/org/UpdateOrgSoftwareEntitlementsCommand.java
@@ -146,7 +146,7 @@ public class UpdateOrgSoftwareEntitlementsCommand {
avail = satMax - satCurrent + orgMax;
}
- if (proposed == null || proposed < 0 || avail < proposed) {
+ if (proposed < 0 || avail < proposed) {
String key = isFlex ? "org.entitlements.software.not_in_range.flex" :
"org.entitlements.software.not_in_range";
commit 283b39696187c32777a546d101394cf148f12e1a
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 21:00:20 2012 +0100
o can only be null at this location
diff --git a/java/code/src/com/redhat/rhn/common/util/Asserts.java b/java/code/src/com/redhat/rhn/common/util/Asserts.java
index 3219a35..50bb143 100644
--- a/java/code/src/com/redhat/rhn/common/util/Asserts.java
+++ b/java/code/src/com/redhat/rhn/common/util/Asserts.java
@@ -75,9 +75,7 @@ public final class Asserts {
*/
public static void assertNotNull(Object o, String label)
throws IllegalStateException {
- if (o == null) {
assertTrue(o != null, "Value of " + label + " is null.");
- }
}
/**
commit e32add1bfecbc376a0f346456790f0ecb69dc1a9
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:52:20 2012 +0100
is can only be null at this location
remove code that cannot be accessed and find out the variable is unused
diff --git a/java/code/src/com/redhat/rhn/common/util/download/DownloadUtils.java b/java/code/src/com/redhat/rhn/common/util/download/DownloadUtils.java
index faeacef..06e65bc 100644
--- a/java/code/src/com/redhat/rhn/common/util/download/DownloadUtils.java
+++ b/java/code/src/com/redhat/rhn/common/util/download/DownloadUtils.java
@@ -45,7 +45,6 @@ public class DownloadUtils {
*/
public static String downloadUrl(String url) {
URL u;
- InputStream is = null;
StringBuilder toReturn = new StringBuilder();
try {
u = new URL(url);
@@ -63,16 +62,6 @@ public class DownloadUtils {
catch (IOException ioe) {
toReturn.append(ioe.getLocalizedMessage());
}
- finally {
- try {
- if (is != null) {
- is.close();
- }
- }
- catch (IOException ioe) {
- toReturn.append(ioe.getLocalizedMessage());
- }
- }
return toReturn.toString();
}
commit 78b98cdbdd49067cfb9151a0362c70cc504d87ae
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:47:42 2012 +0100
name cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java b/java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java
index 90fc64b..d9c9e9f 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java
@@ -53,7 +53,7 @@ public class CreateGroupAction extends RhnAction {
String name = daForm.getString("name");
String desc = daForm.getString("description");
- if (name.equals("") || name == null || StringUtils.isEmpty(desc)) {
+ if (StringUtils.isEmpty(name) || StringUtils.isEmpty(desc)) {
request.setAttribute("emptynameordesc", "1");
errors = true;
}
commit 27ae2b5e466c27d2d4fcf5d30d6d1c2d7c818eb8
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:44:37 2012 +0100
hostDir cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java b/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
index 2dd74d6..4f94447 100644
--- a/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
+++ b/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
@@ -335,7 +335,7 @@ public class AuditManager /* extends BaseManager */ {
// otherwise, just look up this one machine
hostDir = new File(logDirStr + "/" + machineName + "/audit");
- if (hostDir == null || !hostDir.exists()) {
+ if (!hostDir.exists()) {
return new DataResult(new LinkedList());
}
commit bf169bfee4b1f2b4c79d50b58ea0ae6110d4b0d1
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:42:36 2012 +0100
epoch cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/PackageDtoSerializer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/PackageDtoSerializer.java
index db0d6b1..f8b4c5a 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/PackageDtoSerializer.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/PackageDtoSerializer.java
@@ -67,7 +67,7 @@ public class PackageDtoSerializer implements XmlRpcCustomSerializer {
if (epoch == null || epoch.equals(" ")) {
epoch = "";
}
- helper.add("epoch", epoch == null ? "" : epoch);
+ helper.add("epoch", epoch);
helper.add("checksum", pack.getChecksum());
helper.add("checksum_type", pack.getChecksumType());
helper.add("id", pack.getId());
commit bf6890cfc648e9489808411436a12273a6725747
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:41:27 2012 +0100
desc cannot be null at this location
diff --git a/java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java b/java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java
index 24310a8..90fc64b 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java
@@ -22,6 +22,7 @@ import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnAction;
import com.redhat.rhn.manager.system.ServerGroupManager;
+import org.apache.commons.lang.StringUtils;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
@@ -52,7 +53,7 @@ public class CreateGroupAction extends RhnAction {
String name = daForm.getString("name");
String desc = daForm.getString("description");
- if (name.equals("") || name == null || desc.equals("") || desc == null) {
+ if (name.equals("") || name == null || StringUtils.isEmpty(desc)) {
request.setAttribute("emptynameordesc", "1");
errors = true;
}
commit 55e918521c1687ba46293ef7b12ca11d42fe6893
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:27:32 2012 +0100
do not allocate object that will never be used in UpdateErrataCacheCommand
diff --git a/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java b/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
index e5353f0..878a23f 100644
--- a/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java
@@ -216,7 +216,6 @@ public class UpdateErrataCacheCommand extends BaseTransactionCommand {
log.debug("Packages: " + pkgs);
}
- new ArrayList();
List pAdded = new ArrayList();
commit a151b969a67ffe569fca4683a0e832cee260fd09
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:25:42 2012 +0100
do not allocate object that will never be used in SystemHandler
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
index f88c8b8..0ec3d4c 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
@@ -1948,7 +1948,6 @@ public class SystemHandler extends BaseHandler {
*/
public List listSystemEvents(String sessionKey, Integer sid) {
- new LinkedList();
// Get the logged in user and server
User loggedInUser = getLoggedInUser(sessionKey);
Server server = lookupServer(loggedInUser, sid);
commit 6abc364347ea25f7beb1bfb75d4dc981054a9f98
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:24:06 2012 +0100
remove dead code in DeleteFileAction
diff --git a/java/code/src/com/redhat/rhn/frontend/action/configuration/files/DeleteFileAction.java b/java/code/src/com/redhat/rhn/frontend/action/configuration/files/DeleteFileAction.java
index 4f713e5..65936ab 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/configuration/files/DeleteFileAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/configuration/files/DeleteFileAction.java
@@ -60,33 +60,25 @@ public class DeleteFileAction extends RhnAction {
// If we have no file, tell the user "no can do" and go back to
// channel details
try {
- if (cf != null) {
- if (isSubmitted(cff)) {
- ConfigurationManager.getInstance().deleteConfigFile(usr, cf);
- ConfigActionHelper.processParamMap(cc, params);
- createSuccessMessage(req, "deletefile.jsp.success", filename);
- return getStrutsDelegate().forwardParams(
- map.findForward("success"), params);
- }
- else {
- int storage = ConfigurationManager.getInstance().
- getFileStorage(usr, cf);
- ConfigActionHelper.processParamMap(req, params);
- params.put("storage", new Integer(storage));
- ConfigActionHelper.setupRequestAttributes(ctx, cf,
- cf.getLatestConfigRevision());
- req.setAttribute("storage", StringUtil.displayFileSize(storage));
- req.setAttribute("deleting", Boolean.TRUE);
-
- return getStrutsDelegate().forwardParams(
- map.findForward("default"), params);
- }
+ if (isSubmitted(cff)) {
+ ConfigurationManager.getInstance().deleteConfigFile(usr, cf);
+ ConfigActionHelper.processParamMap(cc, params);
+ createSuccessMessage(req, "deletefile.jsp.success", filename);
+ return getStrutsDelegate().forwardParams(
+ map.findForward("success"), params);
}
- else { // Can't find the revision?!?
- createErrorMessage(req, "deletefile.jsp.unknown", null);
+ else {
+ int storage = ConfigurationManager.getInstance().
+ getFileStorage(usr, cf);
ConfigActionHelper.processParamMap(req, params);
+ params.put("storage", new Integer(storage));
+ ConfigActionHelper.setupRequestAttributes(ctx, cf,
+ cf.getLatestConfigRevision());
+ req.setAttribute("storage", StringUtil.displayFileSize(storage));
+ req.setAttribute("deleting", Boolean.TRUE);
+
return getStrutsDelegate().forwardParams(
- map.findForward("failure"), params);
+ map.findForward("default"), params);
}
}
catch (IllegalArgumentException e) {
commit 4db0310c6a431c84498d288469a9f0f013e9e341
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:23:29 2012 +0100
remove dead code in PatchConfirmInstallAction
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/patches/PatchConfirmInstallAction.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/patches/PatchConfirmInstallAction.java
index b3c493e..151ef25 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/patches/PatchConfirmInstallAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/patches/PatchConfirmInstallAction.java
@@ -71,48 +71,40 @@ public class PatchConfirmInstallAction extends LookupDispatchAction {
int numPatches = set.size();
- if (set != null) {
- Action install = ActionManager.createPatchInstallAction(user, server, set);
-
- ActionManager.storeAction(install); //commit action
- RhnSetDecl.PATCH_INSTALL.clear(user);
-
- ActionMessages msgs = new ActionMessages();
-
- /**
- * If there was only one action archived, display the "action" archived
- * message, else display the "actions" archived message.
- */
- if (numPatches == 1) {
- msgs.add(ActionMessages.GLOBAL_MESSAGE,
- new ActionMessage("message.patchinstall",
- LocalizationService.getInstance()
- .formatNumber(new Integer(numPatches)),
- install.getId().toString(),
- sid.toString(),
- server.getName()));
- }
- else {
- msgs.add(ActionMessages.GLOBAL_MESSAGE,
- new ActionMessage("message.patchinstalls",
- LocalizationService.getInstance()
+ Action install = ActionManager.createPatchInstallAction(user, server, set);
+
+ ActionManager.storeAction(install); //commit action
+ RhnSetDecl.PATCH_INSTALL.clear(user);
+
+ ActionMessages msgs = new ActionMessages();
+
+ /**
+ * If there was only one action archived, display the "action" archived
+ * message, else display the "actions" archived message.
+ */
+ if (numPatches == 1) {
+ msgs.add(ActionMessages.GLOBAL_MESSAGE,
+ new ActionMessage("message.patchinstall",
+ LocalizationService.getInstance()
.formatNumber(new Integer(numPatches)),
install.getId().toString(),
sid.toString(),
server.getName()));
- }
-
- strutsDelegate.saveMessages(request, msgs);
-
- Map params = makeParamMap(request);
- return strutsDelegate.forwardParams(mapping.findForward("installed"), params);
- }
- /*
- * Everything is not ok.
- * TODO: error msg
- */
- Map params = makeParamMap(request);
- return strutsDelegate.forwardParams(mapping.findForward("default"), params);
+ }
+ else {
+ msgs.add(ActionMessages.GLOBAL_MESSAGE,
+ new ActionMessage("message.patchinstalls",
+ LocalizationService.getInstance()
+ .formatNumber(new Integer(numPatches)),
+ install.getId().toString(),
+ sid.toString(),
+ server.getName()));
+ }
+
+ strutsDelegate.saveMessages(request, msgs);
+
+ Map params = makeParamMap(request);
+ return strutsDelegate.forwardParams(mapping.findForward("installed"), params);
}
/**
commit 7ae8cbc74f80aa207efdd894578ee4345bfdf794
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:21:47 2012 +0100
remove dead code in PatchConfirmAction
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/patches/PatchConfirmAction.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/patches/PatchConfirmAction.java
index 24de0bc..03c7c56 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/patches/PatchConfirmAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/patches/PatchConfirmAction.java
@@ -71,48 +71,40 @@ public class PatchConfirmAction extends LookupDispatchAction {
int numPatches = set.size();
- if (set != null) {
- Action remove = ActionManager.createPatchRemoveAction(user, server, set);
-
- ActionManager.storeAction(remove); //commit action
- RhnSetDecl.PATCH_REMOVE.clear(user);
-
- ActionMessages msgs = new ActionMessages();
-
- /**
- * If there was only one action archived, display the "action" archived
- * message, else display the "actions" archived message.
- */
- if (numPatches == 1) {
- msgs.add(ActionMessages.GLOBAL_MESSAGE,
- new ActionMessage("message.patchremoval",
- LocalizationService.getInstance()
- .formatNumber(new Integer(numPatches)),
- remove.getId().toString(),
- sid.toString(),
- server.getName()));
- }
- else {
- msgs.add(ActionMessages.GLOBAL_MESSAGE,
- new ActionMessage("message.patchremovals",
- LocalizationService.getInstance()
+ Action remove = ActionManager.createPatchRemoveAction(user, server, set);
+
+ ActionManager.storeAction(remove); //commit action
+ RhnSetDecl.PATCH_REMOVE.clear(user);
+
+ ActionMessages msgs = new ActionMessages();
+
+ /**
+ * If there was only one action archived, display the "action" archived
+ * message, else display the "actions" archived message.
+ */
+ if (numPatches == 1) {
+ msgs.add(ActionMessages.GLOBAL_MESSAGE,
+ new ActionMessage("message.patchremoval",
+ LocalizationService.getInstance()
.formatNumber(new Integer(numPatches)),
remove.getId().toString(),
sid.toString(),
server.getName()));
- }
-
- strutsDelegate.saveMessages(request, msgs);
-
- Map params = makeParamMap(request);
- return strutsDelegate.forwardParams(mapping.findForward("confirmed"), params);
- }
- /*
- * Everything is not ok.
- * TODO: error msg
- */
- Map params = makeParamMap(request);
- return strutsDelegate.forwardParams(mapping.findForward("default"), params);
+ }
+ else {
+ msgs.add(ActionMessages.GLOBAL_MESSAGE,
+ new ActionMessage("message.patchremovals",
+ LocalizationService.getInstance()
+ .formatNumber(new Integer(numPatches)),
+ remove.getId().toString(),
+ sid.toString(),
+ server.getName()));
+ }
+
+ strutsDelegate.saveMessages(request, msgs);
+
+ Map params = makeParamMap(request);
+ return strutsDelegate.forwardParams(mapping.findForward("confirmed"), params);
}
/**
commit 61d101486b9a4bc32528255afb3ad1bdb9724cb5
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:19:36 2012 +0100
remove dead code in KickstartFormatter
and place else statement correctly
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
index 08165ba..5c6ed99 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
@@ -849,16 +849,14 @@ public class KickstartFormatter {
log.debug("Session isn't null. Lets use the profile's activation key.");
//ActivationKey oneTimeKey = ActivationKeyFactory.
// lookupByKickstartSession(this.session);
- if (defaultKey != null) {
tokens.add(defaultKey);
if (log.isDebugEnabled()) {
log.debug("Found one time activation key: " + defaultKey.getKey());
}
- }
- else {
- log.error("We should have gotten an activation key with this session: " +
- ksession.getId());
- }
+ }
+ else {
+ log.error("We should have gotten an activation key with this session: " +
+ ksession.getId());
}
log.debug("tokens size: " + tokens.size());
//add the activation keys associated with the kickstart profile
commit 90c2fd1c1e6f466da5ad7766ddd75b5b3ff715d7
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:12:37 2012 +0100
remove dead code in ErrataQueueWorker
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java b/java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java
index eed6081..a6ba771 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/errata/ErrataQueueWorker.java
@@ -147,65 +147,58 @@ class ErrataQueueWorker implements QueueWorker {
ActionStatus queuedStatus, Channel chan) throws Exception {
logger.debug("Scheduling auto updates for " + errata.getAdvisoryName() + "(" +
errata.getId() + ")");
- String desc = errata.getAdvisory() + " - " + errata.getSynopsis();
HibernateFactory.getSession();
- if (desc != null) {
- SelectMode select = ModeFactory.getMode(TaskConstants.MODE_NAME,
- TaskConstants.TASK_QUERY_ERRATA_QUEUE_FIND_AUTOUPDATE_SERVERS);
- Map params = new HashMap();
- params.put("channel_id", chan.getId());
- params.put("errata_id", errata.getId());
- List results = select.execute(params);
- if (results == null || results.size() == 0) {
- if (logger.isDebugEnabled()) {
- logger.debug("No autoupdate servers found for errata " +
- errata.getId());
- }
- return;
- }
- else if (logger.isDebugEnabled()) {
- logger.debug("Found " + results.size() + " autoupdate servers for " +
- "errata " + errata.getId());
+ SelectMode select = ModeFactory.getMode(TaskConstants.MODE_NAME,
+ TaskConstants.TASK_QUERY_ERRATA_QUEUE_FIND_AUTOUPDATE_SERVERS);
+ Map params = new HashMap();
+ params.put("channel_id", chan.getId());
+ params.put("errata_id", errata.getId());
+ List results = select.execute(params);
+ if (results == null || results.size() == 0) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("No autoupdate servers found for errata " +
+ errata.getId());
}
+ return;
+ }
+ else if (logger.isDebugEnabled()) {
+ logger.debug("Found " + results.size() + " autoupdate servers for " +
+ "errata " + errata.getId());
+ }
- // I think this nifty little loop accurately models what the perl
- // code is doing
-
- Org org = null;
- for (Iterator iter = results.iterator(); iter.hasNext();) {
- Map row = (Map) iter.next();
- Long serverId = (Long) row.get("server_id");
- Long tmp = (Long) row.get("org_id");
- Long convertedOrgId = new Long(tmp.longValue());
- if (orgId == null) {
- org = OrgFactory.lookupById(convertedOrgId);
- }
- else {
- org = OrgFactory.lookupById(orgId);
- }
- Long convertedServerId = new Long(serverId.longValue());
- // Only schedule an Auto Update if the server supports the
- // feature. We originally calculated this in the driving
- // query but it wasn't performant.
- if (logger.isDebugEnabled()) {
- logger.debug("Scheduling auto update for Errata: " +
- errata.getId() + ", Server: " + convertedServerId +
- ", Org: " + convertedOrgId);
- }
- ErrataAction errataAction = ActionManager.
- createErrataAction(org, errata);
- ActionManager.addServerToAction(convertedServerId, errataAction);
- ActionManager.storeAction(errataAction);
- HibernateFactory.commitTransaction();
- HibernateFactory.closeSession();
+ // I think this nifty little loop accurately models what the perl
+ // code is doing
+
+ Org org = null;
+ for (Iterator iter = results.iterator(); iter.hasNext();) {
+ Map row = (Map) iter.next();
+ Long serverId = (Long) row.get("server_id");
+ Long tmp = (Long) row.get("org_id");
+ Long convertedOrgId = new Long(tmp.longValue());
+ if (orgId == null) {
+ org = OrgFactory.lookupById(convertedOrgId);
+ }
+ else {
+ org = OrgFactory.lookupById(orgId);
+ }
+ Long convertedServerId = new Long(serverId.longValue());
+ // Only schedule an Auto Update if the server supports the
+ // feature. We originally calculated this in the driving
+ // query but it wasn't performant.
+ if (logger.isDebugEnabled()) {
+ logger.debug("Scheduling auto update for Errata: " +
+ errata.getId() + ", Server: " + convertedServerId +
+ ", Org: " + convertedOrgId);
}
+ ErrataAction errataAction = ActionManager.
+ createErrataAction(org, errata);
+ ActionManager.addServerToAction(convertedServerId, errataAction);
+ ActionManager.storeAction(errataAction);
HibernateFactory.commitTransaction();
HibernateFactory.closeSession();
}
- else {
- logger.error("No advisory or synopsis found for errata " +
- errata.getId());
- }
+ HibernateFactory.commitTransaction();
+ HibernateFactory.closeSession();
}
commit 81c7e4a2c30e3eff248504ce91e3c3c6aadaad2e
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 20:10:14 2012 +0100
remove dead code in ActionExecutor
diff --git a/java/code/src/com/redhat/rhn/common/messaging/ActionExecutor.java b/java/code/src/com/redhat/rhn/common/messaging/ActionExecutor.java
index fb73102..12e8a95 100644
--- a/java/code/src/com/redhat/rhn/common/messaging/ActionExecutor.java
+++ b/java/code/src/com/redhat/rhn/common/messaging/ActionExecutor.java
@@ -50,9 +50,6 @@ class ActionExecutor implements Runnable {
for (Iterator iter = actionHandlers.iterator(); iter.hasNext();) {
MessageAction action = (MessageAction) iter.next();
LOG.debug("run() - got action: " + action.getClass().getName());
- if (action == null) {
- continue;
- }
try {
if (msg instanceof EventDatabaseMessage) {
EventDatabaseMessage evtdb = (EventDatabaseMessage) msg;
commit 3d3b7879387bf443dd942b26c63ab0684a0f70d2
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 19:56:13 2012 +0100
remove unnecessary semicolons
diff --git a/java/code/internal/src/com/redhat/rhn/internal/doclet/ApiCall.java b/java/code/internal/src/com/redhat/rhn/internal/doclet/ApiCall.java
index e23fa16..0ffeaf6 100644
--- a/java/code/internal/src/com/redhat/rhn/internal/doclet/ApiCall.java
+++ b/java/code/internal/src/com/redhat/rhn/internal/doclet/ApiCall.java
@@ -28,7 +28,7 @@ public class ApiCall implements Comparable<ApiCall> {
private String name;
private String doc;
- private List<String> params = new ArrayList<String>();;
+ private List<String> params = new ArrayList<String>();
private String returnDoc;
private boolean deprecated = false;
private String deprecatedVersion;
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchHelper.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchHelper.java
index 1e54c4b..656a4b1 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchHelper.java
@@ -99,7 +99,7 @@ public class SystemSearchHelper {
public static final String SERVER_CUSTOM_INFO_INDEX = "serverCustomInfo";
public static final Double PACKAGE_SCORE_THRESHOLD = 0.5;
- protected SystemSearchHelper() { };
+ protected SystemSearchHelper() { }
/**
* Returns a DataResult of SystemSearchResults which are based on the user's search
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/UpgradablePackageListItem.java b/java/code/src/com/redhat/rhn/frontend/dto/UpgradablePackageListItem.java
index b8d2bc4..d8645f0 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/UpgradablePackageListItem.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/UpgradablePackageListItem.java
@@ -30,7 +30,7 @@ public class UpgradablePackageListItem extends PackageListItem {
private Long serverId;
private List errataId = new ArrayList();
private List errataAdvisory = new ArrayList();
- private List errataAdvisoryType = new ArrayList();;
+ private List errataAdvisoryType = new ArrayList();
private Set installed;
private String installedPackage = new String();
commit 77fa50a6937009cfef1eadc704a6b7a64779dd19
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 19:39:54 2012 +0100
remove unnecessary casts
+ remove appropriate unused imports
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/test/DataSourceParserTest.java b/java/code/src/com/redhat/rhn/common/db/datasource/test/DataSourceParserTest.java
index 15096f8..2bf588e 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/test/DataSourceParserTest.java
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/test/DataSourceParserTest.java
@@ -82,7 +82,7 @@ public class DataSourceParserTest extends RhnBaseTestCase {
String name = (String)hm.get("username");
if (name.equals("SYS")) {
- dr = (DataResult)dr.subList(pos, pos + 1);
+ dr = dr.subList(pos, pos + 1);
}
pos++;
}
@@ -114,7 +114,7 @@ public class DataSourceParserTest extends RhnBaseTestCase {
String name = (String)hm.get("username");
if (name.equals("SYS")) {
- dr = (DataResult)dr.subList(pos, pos + 1);
+ dr = dr.subList(pos, pos + 1);
}
pos++;
}
@@ -190,7 +190,7 @@ public class DataSourceParserTest extends RhnBaseTestCase {
Iterator i = dr.iterator();
// Pick the first three tables, just so that we aren't elaborating
// all of the tables.
- dr = (DataResult)dr.subList(0, 3);
+ dr = dr.subList(0, 3);
dr.elaborate(new HashMap());
assertNotNull(dr);
@@ -379,7 +379,7 @@ public class DataSourceParserTest extends RhnBaseTestCase {
DataResult dr = m.execute(new HashMap(), "owner", "DESC");
assertNotNull(dr);
assertTrue(dr.size() > 0);
- dr = (DataResult)dr.subList(0, 1);
+ dr = dr.subList(0, 1);
dr.elaborate(new HashMap());
Iterator i = dr.iterator();
diff --git a/java/code/src/com/redhat/rhn/common/errors/SatelliteExceptionHandler.java b/java/code/src/com/redhat/rhn/common/errors/SatelliteExceptionHandler.java
index 86e2d82..b27805c 100644
--- a/java/code/src/com/redhat/rhn/common/errors/SatelliteExceptionHandler.java
+++ b/java/code/src/com/redhat/rhn/common/errors/SatelliteExceptionHandler.java
@@ -41,7 +41,7 @@ public class SatelliteExceptionHandler extends ExceptionHandler {
protected void logException(Exception ex) {
Logger log = Logger.getLogger(LookupExceptionHandler.class);
log.error(ex);
- exception = (Exception) ex;
+ exception = ex;
}
protected void storeException(HttpServletRequest request, String property,
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/test/SystemAclHandlerTest.java b/java/code/src/com/redhat/rhn/common/security/acl/test/SystemAclHandlerTest.java
index 1519522..1d59cb8 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/test/SystemAclHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/test/SystemAclHandlerTest.java
@@ -22,7 +22,6 @@ import com.redhat.rhn.domain.kickstart.test.KickstartDataTest;
import com.redhat.rhn.domain.kickstart.test.KickstartSessionTest;
import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.domain.server.Server;
-import com.redhat.rhn.domain.server.VirtualInstance;
import com.redhat.rhn.domain.server.test.ServerFactoryTest;
import com.redhat.rhn.manager.system.SystemManager;
import com.redhat.rhn.manager.system.test.SystemManagerTest;
@@ -84,7 +83,7 @@ public class SystemAclHandlerTest extends BaseTestCaseWithUser {
public void testIsVirtual() throws Exception {
Server host = ServerTestUtils.createVirtHostWithGuests(user, 1);
- Server guest = ((VirtualInstance) host.getGuests().iterator().next()).
+ Server guest = host.getGuests().iterator().next().
getGuestSystem();
SystemAclHandler sah = new SystemAclHandler();
diff --git a/java/code/src/com/redhat/rhn/domain/action/ActionFactory.java b/java/code/src/com/redhat/rhn/domain/action/ActionFactory.java
index c64bc1c..b09d0d3 100644
--- a/java/code/src/com/redhat/rhn/domain/action/ActionFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/action/ActionFactory.java
@@ -643,7 +643,7 @@ public class ActionFactory extends HibernateFactory {
Map params = new HashMap();
params.put("orgId", user.getOrg().getId());
params.put("server", serverIn);
- return (List) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"Action.findByServerAndOrgId", params);
}
@@ -655,7 +655,7 @@ public class ActionFactory extends HibernateFactory {
public static List listServerActionsForServer(Server serverIn) {
Map params = new HashMap();
params.put("server", serverIn);
- return (List) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"ServerAction.findByServer", params);
}
diff --git a/java/code/src/com/redhat/rhn/domain/config/ConfigurationFactory.java b/java/code/src/com/redhat/rhn/domain/config/ConfigurationFactory.java
index d6d929f..9bc14a8 100644
--- a/java/code/src/com/redhat/rhn/domain/config/ConfigurationFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/config/ConfigurationFactory.java
@@ -432,7 +432,7 @@ public class ConfigurationFactory extends HibernateFactory {
Session session = HibernateFactory.getSession();
Query q = session.getNamedQuery("ConfigRevision.findByConfigFile");
q.setEntity("cf", cf);
- return (List<ConfigRevision>) q.list();
+ return q.list();
}
/**
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartRawDataTest.java b/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartRawDataTest.java
index cffd2c8..6282695 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartRawDataTest.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartRawDataTest.java
@@ -57,7 +57,7 @@ public class KickstartRawDataTest extends BaseTestCaseWithUser {
public void testLookupAndSaveKickstartRawData() throws Exception {
- ((KickstartRawData) ksdata).setData(fileContents);
+ ksdata.setData(fileContents);
CobblerProfileCreateCommand cmd = new CobblerProfileCreateCommand(ksdata);
cmd.store();
@@ -79,7 +79,7 @@ public class KickstartRawDataTest extends BaseTestCaseWithUser {
}
public void testDeepCopy() throws Exception {
- ((KickstartRawData) ksdata).setData(fileContents);
+ ksdata.setData(fileContents);
CobblerProfileCreateCommand cmd = new CobblerProfileCreateCommand(ksdata);
cmd.store();
diff --git a/java/code/src/com/redhat/rhn/domain/org/SystemMigrationFactory.java b/java/code/src/com/redhat/rhn/domain/org/SystemMigrationFactory.java
index eaf8383..d549628 100644
--- a/java/code/src/com/redhat/rhn/domain/org/SystemMigrationFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/org/SystemMigrationFactory.java
@@ -72,7 +72,7 @@ import java.util.Map;
public static List<SystemMigration> lookupByFromOrg(Org fromOrg) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("fromOrg", fromOrg);
- return (List<SystemMigration>)singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"SystemMigration.lookupByFromOrg", params);
}
@@ -85,7 +85,7 @@ import java.util.Map;
public static List<SystemMigration> lookupByToOrg(Org toOrg) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("toOrg", toOrg);
- return (List<SystemMigration>)singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"SystemMigration.lookupByToOrg", params);
}
@@ -97,7 +97,7 @@ import java.util.Map;
public static List<SystemMigration> lookupByServer(Server server) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("server", server);
- return (List<SystemMigration>)singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"SystemMigration.lookupByServer", params);
}
diff --git a/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java b/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
index f1f4441..99cf8cf 100644
--- a/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
@@ -113,7 +113,7 @@ public class ServerFactory extends HibernateFactory {
public static List<CustomDataValue> lookupCustomDataValues(CustomDataKey key) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("key", key);
- return (List<CustomDataValue>) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"CustomDataValue.findByKey", params);
}
@@ -142,7 +142,7 @@ public class ServerFactory extends HibernateFactory {
public static List<Device> lookupStorageDevicesByServer(Server s) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("server", s);
- return (List<Device>) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"Device.findStorageByServer", params);
}
@@ -559,7 +559,7 @@ public class ServerFactory extends HibernateFactory {
"Server.listProxies", params);
List<Server> servers = new ArrayList(ids.size());
for (Number id : ids) {
- servers.add((Server) lookupById(id.longValue()));
+ servers.add(lookupById(id.longValue()));
}
return servers;
}
@@ -604,7 +604,7 @@ public class ServerFactory extends HibernateFactory {
* @return a list of config enabled systems
*/
public static List<Server> listConfigEnabledSystems() {
- return (List<Server>) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"Server.listConfigEnabledSystems", Collections.EMPTY_MAP);
}
@@ -615,7 +615,7 @@ public class ServerFactory extends HibernateFactory {
* @return a list of config-diff enabled systems
*/
public static List<Server> listConfigDiffEnabledSystems() {
- return (List<Server>) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"Server.listConfigDiffEnabledSystems", Collections.EMPTY_MAP);
}
diff --git a/java/code/src/com/redhat/rhn/domain/server/ServerGroupFactory.java b/java/code/src/com/redhat/rhn/domain/server/ServerGroupFactory.java
index 351b678..270f7f9 100644
--- a/java/code/src/com/redhat/rhn/domain/server/ServerGroupFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/server/ServerGroupFactory.java
@@ -257,8 +257,7 @@ public class ServerGroupFactory extends HibernateFactory {
* the server.
*/
public static List<EntitlementServerGroup> listEntitlementGroups(Server s) {
- return (List<EntitlementServerGroup>)
- listServerGroups(s, "ServerGroup.lookupEntitlementGroupsByServer");
+ return listServerGroups(s, "ServerGroup.lookupEntitlementGroupsByServer");
}
/**
@@ -268,7 +267,7 @@ public class ServerGroupFactory extends HibernateFactory {
* the server.
*/
public static List<ManagedServerGroup> listManagedGroups(Server s) {
- return (List<ManagedServerGroup>)listServerGroups(s,
+ return listServerGroups(s,
"ServerGroup.lookupManagedGroupsByServer");
}
diff --git a/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java b/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java
index 966d093..1ef8e32 100644
--- a/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java
+++ b/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java
@@ -269,7 +269,7 @@ public class ServerFactoryTest extends RhnBaseTestCase {
Server server2 = ServerFactory.lookupByIdAndOrg(id, usr.getOrg());
assertTrue(server2.getManagedGroups().size() == 1);
- sg1 = (ManagedServerGroup) server2.getManagedGroups().iterator().next();
+ sg1 = server2.getManagedGroups().iterator().next();
assertEquals(changedName, sg1.getName());
@@ -283,9 +283,8 @@ public class ServerFactoryTest extends RhnBaseTestCase {
Server testServer = createTestServer(user);
Org org = user.getOrg();
- ManagedServerGroup group = (ManagedServerGroup)
- org.getManagedServerGroups().
- iterator().next();
+ ManagedServerGroup group = org.getManagedServerGroups().
+ iterator().next();
assertNotNull(group);
ServerGroupFactory.save(group);
diff --git a/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryVirtualizationTest.java b/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryVirtualizationTest.java
index 49bc141..8a1aca0 100644
--- a/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryVirtualizationTest.java
+++ b/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryVirtualizationTest.java
@@ -59,8 +59,7 @@ public class ServerFactoryVirtualizationTest extends RhnBaseTestCase {
assertTrue(retrievedHost.getGuests().contains(virtualInstance));
- VirtualInstance retInstance = (VirtualInstance)
- retrievedHost.getGuests().iterator().next();
+ VirtualInstance retInstance = retrievedHost.getGuests().iterator().next();
assertEquals(retInstance.getHostSystem(), retrievedHost);
}
diff --git a/java/code/src/com/redhat/rhn/domain/server/test/ServerTest.java b/java/code/src/com/redhat/rhn/domain/server/test/ServerTest.java
index 464ad9d..5d59bd5 100644
--- a/java/code/src/com/redhat/rhn/domain/server/test/ServerTest.java
+++ b/java/code/src/com/redhat/rhn/domain/server/test/ServerTest.java
@@ -75,7 +75,7 @@ public class ServerTest extends BaseTestCaseWithUser {
UserTestUtils.addVirtualizationPlatform(user.getOrg());
Server host = ServerTestUtils.createVirtHostWithGuests(user, 1);
Server guest =
- ((VirtualInstance) host.getGuests().iterator().next()).getGuestSystem();
+ host.getGuests().iterator().next().getGuestSystem();
guest.setBaseEntitlement(EntitlementManager.MANAGEMENT);
assertFalse(guest.isEntitlementAllowed(EntitlementManager.VIRTUALIZATION));
diff --git a/java/code/src/com/redhat/rhn/domain/server/test/VirtualInstanceFactoryTest.java b/java/code/src/com/redhat/rhn/domain/server/test/VirtualInstanceFactoryTest.java
index bfbae38..2b3a298 100644
--- a/java/code/src/com/redhat/rhn/domain/server/test/VirtualInstanceFactoryTest.java
+++ b/java/code/src/com/redhat/rhn/domain/server/test/VirtualInstanceFactoryTest.java
@@ -296,7 +296,7 @@ public class VirtualInstanceFactoryTest extends RhnBaseTestCase {
public void testSetState() throws Exception {
Server host = ServerTestUtils.createVirtHostWithGuest();
- VirtualInstance vi = ((VirtualInstance) host.getGuests().iterator().next());
+ VirtualInstance vi = host.getGuests().iterator().next();
vi.setState(VirtualInstanceFactory.getInstance().getRunningState());
TestUtils.saveAndFlush(vi);
assertTrue(vi.getState() != null);
diff --git a/java/code/src/com/redhat/rhn/domain/token/TokenPackageFactory.java b/java/code/src/com/redhat/rhn/domain/token/TokenPackageFactory.java
index ea4543d..5ab40d1 100644
--- a/java/code/src/com/redhat/rhn/domain/token/TokenPackageFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/token/TokenPackageFactory.java
@@ -50,7 +50,7 @@ public class TokenPackageFactory extends HibernateFactory {
try {
session = HibernateFactory.getSession();
- retval = (List<TokenPackage>) session.getNamedQuery(
+ retval = session.getNamedQuery(
"TokenPackage.lookupByToken")
.setEntity("token", tokenIn)
//Retrieve from cache if there
@@ -81,7 +81,7 @@ public class TokenPackageFactory extends HibernateFactory {
try {
session = HibernateFactory.getSession();
- retval = (List<TokenPackage>) session.getNamedQuery("TokenPackage.lookupByName")
+ retval = session.getNamedQuery("TokenPackage.lookupByName")
.setEntity("token", tokenIn)
.setEntity("name", nameIn)
//Retrieve from cache if there
diff --git a/java/code/src/com/redhat/rhn/domain/token/test/ActivationKeyTest.java b/java/code/src/com/redhat/rhn/domain/token/test/ActivationKeyTest.java
index 0aa9070..b7084bd 100644
--- a/java/code/src/com/redhat/rhn/domain/token/test/ActivationKeyTest.java
+++ b/java/code/src/com/redhat/rhn/domain/token/test/ActivationKeyTest.java
@@ -72,19 +72,19 @@ public class ActivationKeyTest extends BaseTestCaseWithUser {
assertEquals(1, server.getEntitlements().size());
assertEquals(1, k2.getEntitlements().size());
- Entitlement e = (Entitlement) server.getEntitlements().iterator().next();
- ServerGroupType t2 = (ServerGroupType) k2.getEntitlements().iterator().next();
+ Entitlement e = server.getEntitlements().iterator().next();
+ ServerGroupType t2 = k2.getEntitlements().iterator().next();
assertEquals(e.getLabel(), t2.getLabel());
// test out ActivationKeyManager.findByServer while we're here...
- ActivationKey k4 = (ActivationKey) ActivationKeyManager.
+ ActivationKey k4 = ActivationKeyManager.
getInstance().findByServer(server, user).iterator().next();
assertNotNull(k4);
assertEquals(key, k4.getKey());
try {
- k3 = (ActivationKey) ActivationKeyManager.getInstance().
+ k3 = ActivationKeyManager.getInstance().
findByServer(null, user).iterator().next();
String msg = "Permission check failed :(.." +
" Activation key should not have existed" +
@@ -99,7 +99,7 @@ public class ActivationKeyTest extends BaseTestCaseWithUser {
User user1 = UserTestUtils.findNewUser("testuser", "testorg");
Server server2 = ServerFactoryTest.createTestServer(user1);
try {
- k3 = (ActivationKey) ActivationKeyManager.getInstance().
+ k3 = ActivationKeyManager.getInstance().
findByServer(server2, user1).iterator().next();
String msg = "Permission check failed :(.." +
" Activation key should not have existed" +
diff --git a/java/code/src/com/redhat/rhn/domain/user/UserFactory.java b/java/code/src/com/redhat/rhn/domain/user/UserFactory.java
index 629a751..37f71f8 100644
--- a/java/code/src/com/redhat/rhn/domain/user/UserFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/user/UserFactory.java
@@ -695,7 +695,7 @@ public class UserFactory extends HibernateFactory {
Session session = HibernateFactory.getSession();
Map<String, Object> params = new HashMap<String, Object>();
params.put("org_id", inOrg.getId());
- return (List<User>)listObjectsByNamedQuery("User.findAllUsersByOrg", params);
+ return listObjectsByNamedQuery("User.findAllUsersByOrg", params);
}
/**
@@ -708,7 +708,7 @@ public class UserFactory extends HibernateFactory {
Session session = HibernateFactory.getSession();
Map<String, Object> params = new HashMap<String, Object>();
params.put("org_id", inOrg.getId());
- return (List<User>)listObjectsByNamedQuery("User.findAllOrgAdmins", params);
+ return listObjectsByNamedQuery("User.findAllOrgAdmins", params);
}
/**
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/TargetSystemsAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/TargetSystemsAction.java
index 36f867c..b59ce8a 100755
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/TargetSystemsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/TargetSystemsAction.java
@@ -80,7 +80,7 @@ public class TargetSystemsAction extends RhnAction implements Listable {
*/
public List getResult(RequestContext context) {
User user = context.getLoggedInUser();
- Long cid = (Long) context.getRequiredParam(RequestContext.CID);
+ Long cid = context.getRequiredParam(RequestContext.CID);
Channel chan = ChannelManager.lookupByIdAndUser(cid, user);
return SystemManager.listTargetSystemForChannel(user, chan);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/TargetSystemsConfirmAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/TargetSystemsConfirmAction.java
index a81e752..5a0ef11 100755
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/TargetSystemsConfirmAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/TargetSystemsConfirmAction.java
@@ -105,7 +105,7 @@ public class TargetSystemsConfirmAction extends RhnAction implements Listable {
*/
public List getResult(RequestContext context) {
User user = context.getLoggedInUser();
- Long cid = (Long) context.getRequiredParam(RequestContext.CID);
+ Long cid = context.getRequiredParam(RequestContext.CID);
Channel chan = ChannelManager.lookupByIdAndUser(cid, user);
return SystemManager.inSet(user, TargetSystemsAction.getSetDecl(chan).getLabel());
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
index 0e0c444..8e9a799 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
@@ -116,7 +116,7 @@ public class EditChannelAction extends RhnAction implements Listable {
helper.setListName(getListName());
// ignore the return
helper.execute();
- request.setAttribute("channel_name", (String) form.getString("name"));
+ request.setAttribute("channel_name", form.getString("name"));
return getStrutsDelegate().forwardParams(
mapping.findForward(sharing), params);
}
@@ -269,7 +269,7 @@ public class EditChannelAction extends RhnAction implements Listable {
.getAccessibleChildrenFor(user);
Iterator<Channel> i = children.iterator();
while (i.hasNext()) {
- Channel child = (Channel) i.next();
+ Channel child = i.next();
if (s.isSubscribed(child)) {
// unsubscribe server from child channel
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/ssm/BaseSubscribeAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/ssm/BaseSubscribeAction.java
index eb7c912..9f2ac2b 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/ssm/BaseSubscribeAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/ssm/BaseSubscribeAction.java
@@ -464,7 +464,7 @@ public class BaseSubscribeAction extends RhnLookupDispatchAction {
StringBuffer valuesBuf = new StringBuffer();
while (names.hasMoreElements()) {
- String aName = (String) names.nextElement();
+ String aName = names.nextElement();
String aValue = request.getParameter(aName);
if (aName.startsWith(PREFIX) && !NO_CHG.equals(aValue)) {
diff --git a/java/code/src/com/redhat/rhn/frontend/action/errata/ChannelSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/errata/ChannelSetupAction.java
index 13c9fb9..6de8c94 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/errata/ChannelSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/errata/ChannelSetupAction.java
@@ -155,7 +155,7 @@ public class ChannelSetupAction extends RhnListAction {
}
private boolean errataInChannel(Errata e, Long id) {
- for (Channel chan : (Set<Channel>) e.getChannels()) {
+ for (Channel chan : e.getChannels()) {
if (chan.getId().equals(id)) {
return true;
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/errata/ErrataSearchAction.java b/java/code/src/com/redhat/rhn/frontend/action/errata/ErrataSearchAction.java
index 7e8be8f..0a7d6b7 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/errata/ErrataSearchAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/errata/ErrataSearchAction.java
@@ -612,7 +612,7 @@ public class ErrataSearchAction extends RhnAction {
}
private Boolean getOptionIssueDateSearch(HttpServletRequest request) {
- String strDateSearch = (String)request.getParameter("optionIssueDateSearch");
+ String strDateSearch = request.getParameter("optionIssueDateSearch");
if ("on".equals(strDateSearch)) {
return true;
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java b/java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java
index abcc094..24310a8 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/groups/CreateGroupAction.java
@@ -74,9 +74,9 @@ public class CreateGroupAction extends RhnAction {
return mapping.findForward("success");
}
else {
- request.setAttribute("name", (String) daForm.getString("name"));
+ request.setAttribute("name", daForm.getString("name"));
request.setAttribute("description",
- (String) daForm.getString("description"));
+ daForm.getString("description"));
return mapping.findForward("error");
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/BaseKickstartScriptAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/BaseKickstartScriptAction.java
index d7257cb..47ea7b4 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/BaseKickstartScriptAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/BaseKickstartScriptAction.java
@@ -59,7 +59,7 @@ public abstract class BaseKickstartScriptAction extends BaseKickstartEditAction
BaseKickstartScriptCommand kssc = (BaseKickstartScriptCommand) cmd;
- if (b.equals((Boolean)form.get(NOCHROOT))) {
+ if (b.equals(form.get(NOCHROOT))) {
chroot = "N";
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKSScheduleAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKSScheduleAction.java
index 8ef0355..ae12551 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKSScheduleAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKSScheduleAction.java
@@ -138,7 +138,7 @@ public class SsmKSScheduleAction extends RhnAction implements Listable {
com.setIpv6Gateway();
}
- String proxyId = (String) dynaForm.getString(
+ String proxyId = dynaForm.getString(
ScheduleKickstartWizardAction.PROXY_HOST);
if (!StringUtils.isEmpty(proxyId)) {
Server proxy = ServerFactory.lookupById(Long.parseLong(proxyId));
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartScriptActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartScriptActionTest.java
index a7a26d4..e9198b2 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartScriptActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartScriptActionTest.java
@@ -91,7 +91,7 @@ public class KickstartScriptActionTest extends BaseKickstartEditTestCase {
String[] keys = {"kickstart.script.success"};
verifyActionMessages(keys);
assertNotNull(ksdata.getScripts());
- KickstartScript ks = (KickstartScript) ksdata.getScripts().iterator().next();
+ KickstartScript ks = ksdata.getScripts().iterator().next();
assertEquals(contents, ks.getDataContents());
assertEquals(language, ks.getInterpreter());
assertEquals(KickstartScript.TYPE_POST, ks.getScriptType());
@@ -102,7 +102,7 @@ public class KickstartScriptActionTest extends BaseKickstartEditTestCase {
assertEquals(5, ksdata.getScripts().size());
addRequestParameter(KickstartScriptCreateAction.SUBMITTED,
Boolean.FALSE.toString());
- KickstartScript kss = (KickstartScript) ksdata.getScripts().iterator().next();
+ KickstartScript kss = ksdata.getScripts().iterator().next();
addRequestParameter(RequestContext.KICKSTART_SCRIPT_ID, kss.getId().toString());
setRequestPathInfo("/kickstart/KickstartScriptEdit");
actionPerform();
@@ -124,14 +124,14 @@ public class KickstartScriptActionTest extends BaseKickstartEditTestCase {
KickstartScript.TYPE_POST);
addRequestParameter(KickstartScriptCreateAction.SUBMITTED,
Boolean.TRUE.toString());
- KickstartScript kss = (KickstartScript) ksdata.getScripts().iterator().next();
+ KickstartScript kss = ksdata.getScripts().iterator().next();
addRequestParameter(RequestContext.KICKSTART_SCRIPT_ID, kss.getId().toString());
setRequestPathInfo("/kickstart/KickstartScriptEdit");
actionPerform();
String[] keys = {"kickstart.script.success"};
verifyActionMessages(keys);
assertNotNull(ksdata.getScripts());
- KickstartScript ks = (KickstartScript) ksdata.getScripts().iterator().next();
+ KickstartScript ks = ksdata.getScripts().iterator().next();
assertEquals(contents, ks.getDataContents());
assertEquals(language, ks.getInterpreter());
assertEquals(KickstartScript.TYPE_POST, ks.getScriptType());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartScriptDeleteActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartScriptDeleteActionTest.java
index ff6f86b..121895d 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartScriptDeleteActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartScriptDeleteActionTest.java
@@ -26,7 +26,7 @@ import com.redhat.rhn.frontend.struts.RequestContext;
public class KickstartScriptDeleteActionTest extends BaseKickstartEditTestCase {
public void testExecute() throws Exception {
- KickstartScript kss = (KickstartScript) ksdata.getScripts().iterator().next();
+ KickstartScript kss = ksdata.getScripts().iterator().next();
assertEquals(5, ksdata.getScripts().size());
addRequestParameter(RequestContext.KICKSTART_SCRIPT_ID, kss.getId().toString());
addRequestParameter(KickstartScriptDeleteAction.SUBMITTED,
@@ -39,7 +39,7 @@ public class KickstartScriptDeleteActionTest extends BaseKickstartEditTestCase {
public void testExecuteSubmit() throws Exception {
- KickstartScript kss = (KickstartScript) ksdata.getScripts().iterator().next();
+ KickstartScript kss = ksdata.getScripts().iterator().next();
assertEquals(5, ksdata.getScripts().size());
addRequestParameter(RequestContext.KICKSTART_SCRIPT_ID, kss.getId().toString());
addRequestParameter(KickstartScriptCreateAction.SUBMITTED,
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/TrustAction.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/TrustAction.java
index 42c7247..a154c07 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/TrustAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/TrustAction.java
@@ -270,7 +270,7 @@ public class TrustAction extends FormDispatcher {
.getAccessibleChildrenFor(orgUser);
Iterator<Channel> i = children.iterator();
while (i.hasNext()) {
- Channel child = (Channel) i.next();
+ Channel child = i.next();
if (s.isSubscribed(child)) {
// unsubscribe server from child channel
child.getTrustedOrgs().remove(theOrg);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementDetailsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementDetailsActionTest.java
index 81bfd38..13cf87b 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementDetailsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementDetailsActionTest.java
@@ -34,7 +34,7 @@ public class SoftwareEntitlementDetailsActionTest extends RhnMockStrutsTestCase
TestUtils.saveAndFlush(user);
Server s = ServerTestUtils.createTestSystem(user);
- Channel chan = (Channel)s.getChannels().iterator().next();
+ Channel chan = s.getChannels().iterator().next();
ChannelFamily family = chan.getChannelFamily();
setRequestPathInfo("/admin/multiorg/SoftwareEntitlementDetails");
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementSubscriptionsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementSubscriptionsActionTest.java
index cf474d1..7690398 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementSubscriptionsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementSubscriptionsActionTest.java
@@ -38,7 +38,7 @@ public class SoftwareEntitlementSubscriptionsActionTest extends RhnMockStrutsTes
TestUtils.saveAndFlush(user);
Server s = ServerTestUtils.createTestSystem(user);
- Channel chan = (Channel)s.getChannels().iterator().next();
+ Channel chan = s.getChannels().iterator().next();
family = chan.getChannelFamily();
testOrg = s.getOrg();
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java
index 2816e53..214d5b7 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java
@@ -128,7 +128,7 @@ public class ErrataSetupAction extends RhnAction implements Listable {
private List<Map<String, Object>> getComboList(HttpServletRequest request) {
- String selected = (String) request.getParameter(SELECTOR);
+ String selected = request.getParameter(SELECTOR);
List<Map<String, Object>> combo = new ArrayList<Map<String, Object>>();
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchHelper.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchHelper.java
index 72870ed..1e54c4b 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchHelper.java
@@ -162,8 +162,8 @@ public class SystemSearchHelper {
* Determine what index to search and form the query
*/
Map<String, String> params = preprocessSearchString(searchString, viewMode);
- String query = (String)params.get("query");
- String index = (String)params.get("index");
+ String query = params.get("query");
+ String index = params.get("index");
/**
* Contact the XMLRPC search server and get back the results
*/
@@ -517,7 +517,7 @@ public class SystemSearchHelper {
matchingField = "id";
}
serverItem.put("matchingField", matchingField);
- serverItem.put("matchingFieldValue", (String)result.get("matchingFieldValue"));
+ serverItem.put("matchingFieldValue", result.get("matchingFieldValue"));
if (log.isDebugEnabled()) {
log.debug("creating new map for system id: " + result.get("id") +
" new map = " + serverItem);
@@ -555,7 +555,7 @@ public class SystemSearchHelper {
matchingField = (String)result.get("name");
}
serverItem.put("matchingField", matchingField);
- serverItem.put("matchingFieldValue", (String)result.get("matchingFieldValue"));
+ serverItem.put("matchingFieldValue", result.get("matchingFieldValue"));
if (log.isDebugEnabled()) {
log.debug("creating new map for serverId = " + result.get("serverId") +
", hwdevice id: " + result.get("id") + " new map = " +
@@ -583,7 +583,7 @@ public class SystemSearchHelper {
matchingField = (String)result.get("name");
}
serverItem.put("matchingField", matchingField);
- serverItem.put("matchingFieldValue", (String)result.get("matchingFieldValue"));
+ serverItem.put("matchingFieldValue", result.get("matchingFieldValue"));
if (log.isDebugEnabled()) {
log.debug("creating new map for serverId = " + result.get("serverId") +
", snapshotID: " + result.get("snapshotId") + " new map = " +
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/UpdateCustomDataAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/UpdateCustomDataAction.java
index af808f1..12b0fba 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/UpdateCustomDataAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/UpdateCustomDataAction.java
@@ -120,7 +120,7 @@ public class UpdateCustomDataAction extends RhnAction {
cdv.setCreated(new Date());
cdv.setCreator(user);
cdv.setLastModifier(user);
- request.setAttribute(VAL_PARAM, (String)form.get(VAL_PARAM));
+ request.setAttribute(VAL_PARAM, form.get(VAL_PARAM));
return getStrutsDelegate().forwardParams(mapping.findForward("updated"),
params);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/ProvisionVirtualizationWizardAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/ProvisionVirtualizationWizardAction.java
index cc28405..dc4cbb5 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/ProvisionVirtualizationWizardAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/ProvisionVirtualizationWizardAction.java
@@ -220,8 +220,7 @@ public class ProvisionVirtualizationWizardAction extends ScheduleKickstartWizard
@Override
protected KickstartScheduleCommand getKickstartScheduleCommand(Long sid,
User currentUser) {
- return (KickstartScheduleCommand)
- new ProvisionVirtualInstanceCommand(sid, currentUser);
+ return new ProvisionVirtualInstanceCommand(sid, currentUser);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/test/VirtualGuestsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/test/VirtualGuestsActionTest.java
index 0aebfc2..5d47a1e 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/test/VirtualGuestsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/test/VirtualGuestsActionTest.java
@@ -109,7 +109,7 @@ public class VirtualGuestsActionTest extends RhnMockStrutsTestCase {
public void testDeleteGuestConfirm() throws Exception {
Server host = ServerTestUtils.createVirtHostWithGuests(user, 1);
Server guest =
- ((VirtualInstance) host.getGuests().iterator().next()).getGuestSystem();
+ host.getGuests().iterator().next().getGuestSystem();
VirtualInstance virtualInstance = new VirtualInstance();
virtualInstance.setUuid("1234");
@@ -157,7 +157,7 @@ public class VirtualGuestsActionTest extends RhnMockStrutsTestCase {
addRequestParameter(RequestContext.SID, host.getId().toString());
addDispatchCall("virtualguests_confirm.jsp.confirm");
RhnSet set = RhnSetDecl.VIRTUAL_SYSTEMS.get(user);
- VirtualInstance vi = ((VirtualInstance) host.getGuests().iterator().next());
+ VirtualInstance vi = host.getGuests().iterator().next();
vi.setState(VirtualInstanceFactory.getInstance().getRunningState());
TestUtils.saveAndFlush(vi);
set.addElement(vi.getId());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/tasko/ScheduleDetailAction.java b/java/code/src/com/redhat/rhn/frontend/action/tasko/ScheduleDetailAction.java
index f7bfbe9..859f7b8 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/tasko/ScheduleDetailAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/tasko/ScheduleDetailAction.java
@@ -190,7 +190,7 @@ public class ScheduleDetailAction extends RhnAction {
form.set("schedulename", scheduleName);
request.setAttribute("bunch", bunchName);
Map bunch = tapi.lookupBunchByName(loggedInUser, bunchName);
- request.setAttribute("bunchdescription", (String)bunch.get("description"));
+ request.setAttribute("bunchdescription", bunch.get("description"));
RecurringEventPicker.prepopulatePicker(request, "date",
(String) schedule.get(("cron_expr")));
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/token/ActivationKeyChildChannelsAction.java b/java/code/src/com/redhat/rhn/frontend/action/token/ActivationKeyChildChannelsAction.java
index 2dd7a6c..e670776 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/token/ActivationKeyChildChannelsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/token/ActivationKeyChildChannelsAction.java
@@ -125,7 +125,7 @@ public class ActivationKeyChildChannelsAction extends RhnAction {
key.getBaseChannel().getName());
}
else {
- finalList = (ArrayList)channelList;
+ finalList = channelList;
}
context.getRequest().setAttribute(CHANNELS, finalList);
form.set(CHANNELS, finalList);
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/AuditDto.java b/java/code/src/com/redhat/rhn/frontend/dto/AuditDto.java
index d0d9d44..8127e98 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/AuditDto.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/AuditDto.java
@@ -42,7 +42,7 @@ public class AuditDto extends BaseDto {
*/
public AuditDto(int serialIn, Date timeIn, int milliIn, String nodeIn,
LinkedHashMap<String, String> kvmapIn) {
- this.id = new Long((long)serialIn);
+ this.id = new Long(serialIn);
this.serial = serialIn;
this.time = timeIn;
this.milli = milliIn;
diff --git a/java/code/src/com/redhat/rhn/frontend/html/BaseTag.java b/java/code/src/com/redhat/rhn/frontend/html/BaseTag.java
index cf78ec2..5142633 100644
--- a/java/code/src/com/redhat/rhn/frontend/html/BaseTag.java
+++ b/java/code/src/com/redhat/rhn/frontend/html/BaseTag.java
@@ -115,7 +115,7 @@ public abstract class BaseTag {
ret.append(" ");
ret.append(key);
ret.append("=\"");
- ret.append((String)attribs.get(key));
+ ret.append(attribs.get(key));
ret.append("\"");
}
ret.append(">");
diff --git a/java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java b/java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java
index 41f94dd..66259f1 100644
--- a/java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/security/test/PxtAuthenticationServiceTest.java
@@ -24,7 +24,6 @@ import java.util.Vector;
import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
/**
* PxtAuthenticationServiceTest
@@ -124,7 +123,7 @@ public class PxtAuthenticationServiceTest extends AuthenticationServiceTest {
private void runRedirectToLoginTest() throws Exception {
mockRequest.expects(atLeastOnce()).method("getRequestDispatcher").will(
- returnValue((RequestDispatcher)mockDispatcher.proxy()));
+ returnValue(mockDispatcher.proxy()));
service.redirectToLogin(getRequest(), getResponse());
}
@@ -143,7 +142,7 @@ public class PxtAuthenticationServiceTest extends AuthenticationServiceTest {
mockDispatcher.expects(once()).method("forward").with(
new Constraint[] {eq(getRequest()),
- eq((HttpServletResponse)mockResponse.proxy())});
+ eq(mockResponse.proxy())});
mockRequest.stubs().method("getParameterNames").will(
returnValue(new Vector().elements()));
diff --git a/java/code/src/com/redhat/rhn/frontend/servlets/LocalizedEnvironmentFilter.java b/java/code/src/com/redhat/rhn/frontend/servlets/LocalizedEnvironmentFilter.java
index 01b5370..d110d59 100644
--- a/java/code/src/com/redhat/rhn/frontend/servlets/LocalizedEnvironmentFilter.java
+++ b/java/code/src/com/redhat/rhn/frontend/servlets/LocalizedEnvironmentFilter.java
@@ -75,7 +75,7 @@ public class LocalizedEnvironmentFilter implements Filter {
private void initializeContext(HttpServletRequest request) {
Context current = Context.getCurrentContext();
- User user = new RequestContext((HttpServletRequest) request)
+ User user = new RequestContext(request)
.getLoggedInUser();
setTimeZone(current, user, request);
resolveLocale(current, user, request);
diff --git a/java/code/src/com/redhat/rhn/frontend/servlets/test/AuthFilterTest.java b/java/code/src/com/redhat/rhn/frontend/servlets/test/AuthFilterTest.java
index b93843d..eb363f1 100644
--- a/java/code/src/com/redhat/rhn/frontend/servlets/test/AuthFilterTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/servlets/test/AuthFilterTest.java
@@ -79,7 +79,7 @@ public class AuthFilterTest extends MockObjectTestCase {
mockRequest.stubs().method("getRequestURI").will(returnValue("/rhn/YourRhn.do"));
mockRequest.stubs().method("getRequestDispatcher").withAnyArguments().will(
- returnValue((RequestDispatcher)mockDispatcher.proxy()));
+ returnValue(mockDispatcher.proxy()));
mockRequest.stubs().method("getHeaders").will(returnValue(new Vector().elements()));
filter.setAuthenticationService((AuthenticationService)mockAuthService.proxy());
diff --git a/java/code/src/com/redhat/rhn/frontend/struts/BaseSetHelper.java b/java/code/src/com/redhat/rhn/frontend/struts/BaseSetHelper.java
index 2e670c2..ddc8fcb 100644
--- a/java/code/src/com/redhat/rhn/frontend/struts/BaseSetHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/struts/BaseSetHelper.java
@@ -74,7 +74,7 @@ public class BaseSetHelper {
List filterList = null;
String uniqueName = TagHelper.generateUniqueName(listName);
- String filterClass = (String) request.getParameter(
+ String filterClass = request.getParameter(
ListTagUtil.makeFilterClassLabel(uniqueName));
if (filterClass != null) {
@@ -271,7 +271,7 @@ public class BaseSetHelper {
}
else if (obj instanceof Map) {
Map next = (Map) obj;
- set.add((String)next.get(SessionSetHelper.KEY));
+ set.add(next.get(SessionSetHelper.KEY));
}
else {
Identifiable next = (Identifiable) obj;
diff --git a/java/code/src/com/redhat/rhn/frontend/struts/RhnValidationHelper.java b/java/code/src/com/redhat/rhn/frontend/struts/RhnValidationHelper.java
index b6d71e9..e4e52b2 100644
--- a/java/code/src/com/redhat/rhn/frontend/struts/RhnValidationHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/struts/RhnValidationHelper.java
@@ -207,9 +207,8 @@ public class RhnValidationHelper {
ValidatorResult result = validate(base, form, fieldNames, xsdName);
if (!result.isEmpty()) {
- return validatorErrorToActionErrors((ValidatorError[])
- result.getErrors().toArray(new
- ValidatorError[0]));
+ return validatorErrorToActionErrors(result.getErrors().toArray(new
+ ValidatorError[0]));
}
return new ActionErrors();
}
diff --git a/java/code/src/com/redhat/rhn/frontend/struts/test/BaseSetListActionTest.java b/java/code/src/com/redhat/rhn/frontend/struts/test/BaseSetListActionTest.java
index b1a91ba..2355820 100644
--- a/java/code/src/com/redhat/rhn/frontend/struts/test/BaseSetListActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/struts/test/BaseSetListActionTest.java
@@ -82,7 +82,7 @@ public class BaseSetListActionTest extends RhnBaseTestCase {
}
DataResult dr = new DataResult(values);
if (pc != null) {
- dr = (DataResult) dr.subList(pc.getStart(), pc.getEnd());
+ dr = dr.subList(pc.getStart(), pc.getEnd());
}
return dr;
}
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ColumnTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ColumnTag.java
index 21f05cb..f0bef4e 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ColumnTag.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ColumnTag.java
@@ -145,8 +145,7 @@ public class ColumnTag extends BodyTagSupport {
* ${@inheritDoc}
*/
public int doStartTag() throws JspException {
- ListCommand command = (ListCommand)
- ListTagUtil.getCurrentCommand(this, pageContext);
+ ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
ListTag.class);
int retval = BodyTagSupport.SKIP_BODY;
@@ -182,8 +181,7 @@ public class ColumnTag extends BodyTagSupport {
throw new JspException("Sortable columns must use either attr or sortAttr");
}
checkForBoundsAndAttrs();
- ListCommand command = (ListCommand)
- ListTagUtil.getCurrentCommand(this, pageContext);
+ ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
if (command.equals(ListCommand.RENDER)) {
ListTagUtil.write(pageContext, "</td>");
}
@@ -365,8 +363,7 @@ public class ColumnTag extends BodyTagSupport {
protected void writeStartingTd() throws JspException {
ListTagUtil.write(pageContext, "<td");
- ListCommand command = (ListCommand)
- ListTagUtil.getCurrentCommand(this, pageContext);
+ ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
if (styleClass != null ||
(isCurrColumnSorted() && command != ListCommand.COL_HEADER)) {
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/DecoratorTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/DecoratorTag.java
index 315e392..500b076 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/DecoratorTag.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/DecoratorTag.java
@@ -45,8 +45,7 @@ public class DecoratorTag extends BodyTagSupport {
* {@inheritDoc}
*/
public int doEndTag() throws JspException {
- ListCommand command = (ListCommand)
- ListTagUtil.getCurrentCommand(this, pageContext);
+ ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
if (command.equals(ListCommand.ENUMERATE)) {
if (!StringUtils.isBlank(name)) {
ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ExpandableColumnTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ExpandableColumnTag.java
index 3fe2601..7b3106f 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ExpandableColumnTag.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ExpandableColumnTag.java
@@ -57,7 +57,7 @@ public class ExpandableColumnTag extends BodyTagSupport {
* @throws JspException
*/
public int doStartTag() throws JspException {
- ListCommand command = (ListCommand) ListTagUtil.
+ ListCommand command = ListTagUtil.
getCurrentCommand(this, pageContext);
if (command.equals(ListCommand.RENDER)) {
try {
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/RadioColumnTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/RadioColumnTag.java
index 61f207b..11ad57a 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/RadioColumnTag.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/RadioColumnTag.java
@@ -94,8 +94,7 @@ public class RadioColumnTag extends TagSupport {
@Override
public int doStartTag() throws JspException {
- ListCommand command = (ListCommand)
- ListTagUtil.getCurrentCommand(this, pageContext);
+ ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
ListTag.class);
listName = parent.getUniqueName();
@@ -121,7 +120,7 @@ public class RadioColumnTag extends TagSupport {
*/
@Override
public int doEndTag() throws JspException {
- ListCommand command = (ListCommand) ListTagUtil.
+ ListCommand command = ListTagUtil.
getCurrentCommand(this, pageContext);
if (command.equals(ListCommand.RENDER)) {
ListTagUtil.write(pageContext, "</td>");
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/RowRendererTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/RowRendererTag.java
index bb3317e..4b5ceb5 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/RowRendererTag.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/RowRendererTag.java
@@ -52,8 +52,7 @@ public class RowRendererTag extends BodyTagSupport {
* {@inheritDoc}
*/
public int doEndTag() throws JspException {
- ListCommand command = (ListCommand)
- ListTagUtil.getCurrentCommand(this, pageContext);
+ ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
if (command.equals(ListCommand.ENUMERATE)) {
if (!StringUtils.isBlank(name)) {
ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/SelectableColumnTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/SelectableColumnTag.java
index e811287..5287999 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/SelectableColumnTag.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/SelectableColumnTag.java
@@ -115,8 +115,7 @@ public class SelectableColumnTag extends TagSupport {
*/
public int doStartTag() throws JspException {
- ListCommand command = (ListCommand)
- ListTagUtil.getCurrentCommand(this, pageContext);
+ ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
ListTag.class);
listName = parent.getUniqueName();
@@ -140,7 +139,7 @@ public class SelectableColumnTag extends TagSupport {
* {@inheritDoc}
*/
public int doEndTag() throws JspException {
- ListCommand command = (ListCommand) ListTagUtil.
+ ListCommand command = ListTagUtil.
getCurrentCommand(this, pageContext);
if (command.equals(ListCommand.RENDER)) {
ListTagUtil.write(pageContext, "</td>");
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/decorators/test/PageSizeDecoratorTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/decorators/test/PageSizeDecoratorTest.java
index f2ee12d..a8944b9 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/decorators/test/PageSizeDecoratorTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/decorators/test/PageSizeDecoratorTest.java
@@ -53,7 +53,7 @@ public class PageSizeDecoratorTest extends RhnBaseTestCase {
Config.get().setString(ConfigDefaults.DEFAULT_PAGE_SIZE,
String.valueOf(custom.get(4) - 5));
assertTrue(custom.contains(PageSizeDecorator.getDefaultPageSize()));
- assertEquals((Integer)custom.get(3),
+ assertEquals(custom.get(3),
(Integer)PageSizeDecorator.getDefaultPageSize());
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ListTagTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ListTagTest.java
index c3608bc..c086078 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ListTagTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ListTagTest.java
@@ -81,7 +81,7 @@ public class ListTagTest extends RhnBaseTestCase {
// This is a hack, but I just need an empty list, and this works.
SelectMode m = ModeFactory.getMode("test_queries", "user_tables");
DataResult dr = m.execute(new HashMap());
- dr = (DataResult)dr.subList(0, 0);
+ dr = dr.subList(0, 0);
lt.setPageList(dr);
lt.setNoDataText("cant have spaces");
@@ -106,7 +106,7 @@ public class ListTagTest extends RhnBaseTestCase {
// This is a hack, but I just need an empty list, and this works.
SelectMode m = ModeFactory.getMode("test_queries", "user_tables");
DataResult dr = m.execute(new HashMap());
- dr = (DataResult)dr.subList(0, 1);
+ dr = dr.subList(0, 1);
lt.setPageList(dr);
lt.setNoDataText("No Data.");
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/RhnXmlRpcServer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/RhnXmlRpcServer.java
index 8d7869c..221765a 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/RhnXmlRpcServer.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/RhnXmlRpcServer.java
@@ -59,7 +59,7 @@ public class RhnXmlRpcServer extends XmlRpcServer {
* @return the server name
*/
public static String getServerName() {
- return (String) server.get();
+ return server.get();
}
/**
@@ -67,7 +67,7 @@ public class RhnXmlRpcServer extends XmlRpcServer {
* @return the protocol
*/
public static String getProtocol() {
- return (String) proto.get();
+ return proto.get();
}
/**
@@ -75,6 +75,6 @@ public class RhnXmlRpcServer extends XmlRpcServer {
* @return the IP of the caller
*/
public static String getCallerIp() {
- return (String) caller.get();
+ return caller.get();
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/ActivationKeyHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/ActivationKeyHandler.java
index b9b8d80..d804822 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/ActivationKeyHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/ActivationKeyHandler.java
@@ -739,10 +739,10 @@ public class ActivationKeyHandler extends BaseHandler {
String name = null;
String arch = null;
for (Map<String, String> pkg : packages) {
- name = (String) pkg.get("name");
+ name = pkg.get("name");
PackageName packageName = PackageFactory.lookupOrCreatePackageByName(name);
- arch = (String) pkg.get("arch");
+ arch = pkg.get("arch");
PackageArch packageArch = PackageFactory.lookupPackageArchByLabel(arch);
manager.addPackage(activationKey, packageName, packageArch);
@@ -790,10 +790,10 @@ public class ActivationKeyHandler extends BaseHandler {
String name = null;
String arch = null;
for (Map<String, String> pkg : packages) {
- name = (String) pkg.get("name");
+ name = pkg.get("name");
PackageName packageName = PackageFactory.lookupOrCreatePackageByName(name);
- arch = (String) pkg.get("arch");
+ arch = pkg.get("arch");
PackageArch packageArch = PackageFactory.lookupPackageArchByLabel(arch);
manager.removePackage(activationKey, packageName, packageArch);
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/test/ActivationKeyHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/test/ActivationKeyHandlerTest.java
index f7ea742..ad38d8a 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/test/ActivationKeyHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/activationkey/test/ActivationKeyHandlerTest.java
@@ -222,7 +222,7 @@ public class ActivationKeyHandlerTest extends BaseHandlerTestCase {
lookupByKey(key, admin);
assertEquals(1, activationKey.getChannels().size());
- assertEquals(baseChannel2, (Channel)activationKey.getChannels().iterator().next());
+ assertEquals(baseChannel2, activationKey.getChannels().iterator().next());
assertEquals(new Long(15), activationKey.getUsageLimit());
assertFalse(activationKey.isUniversalDefault());
}
@@ -264,7 +264,7 @@ public class ActivationKeyHandlerTest extends BaseHandlerTestCase {
PackageName newName3 = PackageNameTest.createTestPackageName();
keyHandler.addPackageNames(adminKey, newKey, buildList(newName3.getName()));
- ActivationKey key = (ActivationKey)keyHandler.getDetails(adminKey, newKey);
+ ActivationKey key = keyHandler.getDetails(adminKey, newKey);
Writer output = new StringWriter();
ActivationKeySerializer serializer = new ActivationKeySerializer();
serializer.serialize(key, output, new XmlRpcSerializer());
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/test/ChannelSoftwareHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/test/ChannelSoftwareHandlerTest.java
index 1b8dfa9..0783c38 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/test/ChannelSoftwareHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/test/ChannelSoftwareHandlerTest.java
@@ -284,7 +284,7 @@ public class ChannelSoftwareHandlerTest extends BaseHandlerTestCase {
server = (Server) reload(server);
assertEquals(1, result);
- Channel subscribed = (Channel) server.getChannels().iterator().next();
+ Channel subscribed = server.getChannels().iterator().next();
assertTrue(server.getChannels().contains(c2));
//try to make it break
@@ -302,7 +302,7 @@ public class ChannelSoftwareHandlerTest extends BaseHandlerTestCase {
server = (Server) reload(server);
//make sure servers channel subscriptions weren't changed
assertEquals(1, result);
- subscribed = (Channel) server.getChannels().iterator().next();
+ subscribed = server.getChannels().iterator().next();
assertEquals(c2.getLabel(), subscribed.getLabel());
// try setting the base channel of an s390 server to
@@ -828,7 +828,7 @@ public class ChannelSoftwareHandlerTest extends BaseHandlerTestCase {
mergeTo.getLabel());
assertEquals(1, list.length);
- assertEquals(packTwo, (Package) list[0]);
+ assertEquals(packTwo, list[0]);
}
public void testMergeErrata() throws Exception {
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/software/test/SoftwareHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/software/test/SoftwareHandlerTest.java
index c37d7d1..0d2a052 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/software/test/SoftwareHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/software/test/SoftwareHandlerTest.java
@@ -55,7 +55,7 @@ public class SoftwareHandlerTest extends BaseHandlerTestCase {
boolean pkgFound = false;
for (Iterator<KickstartPackage> itr = ksProfile.getKsPackages().iterator();
itr.hasNext();) {
- KickstartPackage pkg = (KickstartPackage) itr.next();
+ KickstartPackage pkg = itr.next();
if (pkg.getPackageName().getName().equals("gcc")) {
pkgFound = true;
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/test/SystemDetailsHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/test/SystemDetailsHandlerTest.java
index 2b72467..547829b 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/test/SystemDetailsHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/test/SystemDetailsHandlerTest.java
@@ -367,7 +367,7 @@ public class SystemDetailsHandlerTest extends BaseHandlerTestCase {
assertNotNull(foundLists);
assertEquals(1, foundLists.size());
- FileList foundList = (FileList)foundLists.iterator().next();
+ FileList foundList = foundLists.iterator().next();
assertEquals(fileList.getLabel(), foundList.getLabel());
assertEquals(fileList.getFileNames(), foundList.getFileNames());
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/ManagedServerGroupSerializerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/ManagedServerGroupSerializerTest.java
index 3a9d399..b6e0987 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/ManagedServerGroupSerializerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/test/ManagedServerGroupSerializerTest.java
@@ -50,7 +50,7 @@ public class ManagedServerGroupSerializerTest extends MockObjectTestCase {
mockMethod(mock, "getName", name);
mockMethod(mock, "getDescription", description);
mockMethod(mock, "getCurrentMembers", currentMembers);
- mockMethod(mock, "getOrg", (Org) mockOrg.proxy());
+ mockMethod(mock, "getOrg", mockOrg.proxy());
ManagedServerGroup sg = (ManagedServerGroup) mock.proxy();
sgs.serialize(sg, output, serializer);
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java
index 07c4ea1..e962aa5 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java
@@ -744,7 +744,7 @@ public class UserHandler extends BaseHandler {
// now for the real reason we're in this method.
Set defaults = target.getDefaultSystemGroupIds();
for (Iterator itr = sgNames.iterator(); itr.hasNext();) {
- ServerGroup sg = (ServerGroup) groupMap.get((String)itr.next());
+ ServerGroup sg = (ServerGroup) groupMap.get(itr.next());
if (sg != null) {
// not a simple add to the groups. Needs to call
// UserManager as DataSource is being used.
@@ -834,7 +834,7 @@ public class UserHandler extends BaseHandler {
// now for the real reason we're in this method.
Set defaults = target.getDefaultSystemGroupIds();
for (Iterator itr = sgNames.iterator(); itr.hasNext();) {
- ServerGroup sg = (ServerGroup) groupMap.get((String) itr.next());
+ ServerGroup sg = (ServerGroup) groupMap.get(itr.next());
if (sg != null) {
// not a simple remove to the groups. Needs to call
// UserManager as DataSource is being used.
diff --git a/java/code/src/com/redhat/rhn/manager/BaseManager.java b/java/code/src/com/redhat/rhn/manager/BaseManager.java
index 02014d3..91957e1 100644
--- a/java/code/src/com/redhat/rhn/manager/BaseManager.java
+++ b/java/code/src/com/redhat/rhn/manager/BaseManager.java
@@ -139,7 +139,7 @@ public abstract class BaseManager {
// now use the PageControl to limit the list to the
// selected region.
- dr = (DataResult)dr.subList(pc.getStart() - 1, pc.getEnd());
+ dr = dr.subList(pc.getStart() - 1, pc.getEnd());
//elaborate the data result to get the detailed information.
if (elabParams != null) {
diff --git a/java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java b/java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java
index 33c76ba..191cb84 100644
--- a/java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java
@@ -318,7 +318,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
UserFactory.save(user);
Action parentAction = createActionWithServerActions(user, 1);
- Server server = ((ServerAction)parentAction.getServerActions().iterator().next())
+ Server server = parentAction.getServerActions().iterator().next()
.getServer();
ActionFactory.save(parentAction);
@@ -629,14 +629,14 @@ public class ActionManagerTest extends RhnBaseTestCase {
TestUtils.saveAndFlush(ka);
assertNotNull(ka.getId());
KickstartGuestActionDetails kad =
- (KickstartGuestActionDetails) ka.getKickstartGuestActionDetails();
+ ka.getKickstartGuestActionDetails();
KickstartGuestAction ka2 = (KickstartGuestAction)
ActionManager.lookupAction(user, ka.getId());
assertNotNull(ka2);
assertNotNull(kad.getCobblerSystemName());
assertEquals(ka, ka2);
KickstartGuestActionDetails kad2 =
- (KickstartGuestActionDetails) ka2.getKickstartGuestActionDetails();
+ ka2.getKickstartGuestActionDetails();
assertNotNull(kad);
assertEquals(kad, kad2);
diff --git a/java/code/src/com/redhat/rhn/manager/configuration/test/ConfigurationManagerTest.java b/java/code/src/com/redhat/rhn/manager/configuration/test/ConfigurationManagerTest.java
index bda029b..9f8dfd2 100644
--- a/java/code/src/com/redhat/rhn/manager/configuration/test/ConfigurationManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/configuration/test/ConfigurationManagerTest.java
@@ -662,7 +662,7 @@ public class ConfigurationManagerTest extends RhnBaseTestCase {
assertEquals(EXPECTED_COUNT, actual);
- final ConfigChannel c = (ConfigChannel) s.getConfigChannels().get(0);
+ final ConfigChannel c = s.getConfigChannels().get(0);
SortedSet files = c.getConfigFiles();
assertEquals(files.size(), EXPECTED_COUNT.getFiles() +
@@ -732,9 +732,8 @@ public class ConfigurationManagerTest extends RhnBaseTestCase {
ConfigChannelType.local());
- ConfigChannel c = (ConfigChannel) s.getConfigChannels().get(0);
- String path = ((ConfigFile)c.getConfigFiles().first()).
- getConfigFileName().getPath();
+ ConfigChannel c = s.getConfigChannels().get(0);
+ String path = c.getConfigFiles().first().getConfigFileName().getPath();
ConfigFile fl = local.createConfigFile(
ConfigFileState.normal(),
path);
@@ -1396,7 +1395,7 @@ public class ConfigurationManagerTest extends RhnBaseTestCase {
assertNotNull(gcc2);
assertNotNull(gcc2.getConfigFiles());
assertEquals(1, gcc2.getConfigFiles().size());
- ConfigFile fl = (ConfigFile)gcc2.getConfigFiles().first();
+ ConfigFile fl = gcc2.getConfigFiles().first();
assertEquals(g1f1.getConfigFileName(), fl.getConfigFileName());
assertEquals(g1f1.getLatestConfigRevision().getConfigFileType(),
fl.getLatestConfigRevision().getConfigFileType());
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartCloneCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartCloneCommand.java
index ac7f39b..56a4b1e 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartCloneCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartCloneCommand.java
@@ -62,9 +62,9 @@ public class KickstartCloneCommand extends BaseKickstartCommand {
Profile cloned = clonedKickstart.getCobblerObject(user);
cloned.setKsMeta(original.getKsMeta());
- cloned.setVirtRam(((Integer) original.getVirtRam()));
+ cloned.setVirtRam(original.getVirtRam());
cloned.setVirtCpus(original.getVirtCpus());
- cloned.setVirtFileSize(((Integer) original.getVirtFileSize()));
+ cloned.setVirtFileSize(original.getVirtFileSize());
cloned.setVirtBridge(original.getVirtBridge());
cloned.setVirtPath(original.getVirtBridge());
cloned.setKernelOptions(original.getKernelOptions());
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartLocaleCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartLocaleCommand.java
index e5b01f7..c4168a0 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartLocaleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartLocaleCommand.java
@@ -101,7 +101,7 @@ public class KickstartLocaleCommand extends BaseKickstartCommand {
tokens = (LinkedList) StringUtil.stringToList(args);
Iterator iter = tokens.iterator();
while (iter.hasNext()) {
- if (current.equals((String) iter.next())) {
+ if (current.equals(iter.next())) {
iter.remove();
}
}
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/ProvisionVirtualInstanceCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/ProvisionVirtualInstanceCommand.java
index c6890b0..86424ba 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/ProvisionVirtualInstanceCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/ProvisionVirtualInstanceCommand.java
@@ -185,13 +185,13 @@ public class ProvisionVirtualInstanceCommand extends KickstartScheduleCommand {
//TODO -- It feels a little dirty to pass in this & this.getExtraOptions,
//but I don't know that I understand the implications of making getExtraOptions
//a public method.
- KickstartGuestAction ksAction = (KickstartGuestAction)
- ActionManager.scheduleKickstartGuestAction(this, sessionId);
+ KickstartGuestAction ksAction = ActionManager.scheduleKickstartGuestAction(this,
+ sessionId);
ksSession.setAction(ksAction);
ksAction.setPrerequisite(prereqAction);
ActionFactory.save(ksAction);
- return (Action) ksAction;
+ return ksAction;
}
/**
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerDistroCreateCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerDistroCreateCommand.java
index 56d8d06..0c8691f 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerDistroCreateCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerDistroCreateCommand.java
@@ -91,7 +91,7 @@ public class CobblerDistroCreateCommand extends CobblerDistroCommand {
tree.getCobblerDistroName(), tree.getKernelPath(),
tree.getInitrdPath(), ksmeta);
// Setup the kickstart metadata so the URLs and activation key are setup
- tree.setCobblerId((String) distro.getUid());
+ tree.setCobblerId(distro.getUid());
invokeCobblerUpdate();
if (tree.doesParaVirt()) {
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScheduleCommandTest.java b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScheduleCommandTest.java
index d724fbd..6196b82 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScheduleCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScheduleCommandTest.java
@@ -207,7 +207,7 @@ public class KickstartScheduleCommandTest extends BaseKickstartCommandTestCase {
ksdata.addPreserveFileList(list1);
KickstartFactory.saveKickstartData(ksdata);
- KickstartAction kickstartAction = (KickstartAction) ActionManager.
+ KickstartAction kickstartAction = ActionManager.
scheduleKickstartAction(this.ksdata, this.user,
server, new Date(), "extraoptions", "localhost");
ActionFactory.save(kickstartAction);
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScriptCommandTest.java b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScriptCommandTest.java
index 0548ea9..8d6a079 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScriptCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScriptCommandTest.java
@@ -61,7 +61,7 @@ public class KickstartScriptCommandTest extends BaseKickstartCommandTestCase {
}
public void testPreEdit() throws Exception {
- KickstartScript kss = (KickstartScript) ksdata.getScripts().iterator().next();
+ KickstartScript kss = ksdata.getScripts().iterator().next();
String language = "/usr/bin/perl";
String contents = "print \"some string\";\n";
String chroot = "Y";
@@ -77,7 +77,7 @@ public class KickstartScriptCommandTest extends BaseKickstartCommandTestCase {
public void testScriptDelete() throws Exception {
- KickstartScript kss = (KickstartScript) ksdata.getScripts().iterator().next();
+ KickstartScript kss = ksdata.getScripts().iterator().next();
assertEquals(5, ksdata.getScripts().size());
KickstartScriptDeleteCommand cmd = new KickstartScriptDeleteCommand(ksdata.getId(),
kss.getId(), user);
diff --git a/java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java b/java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java
index 70806cb..21dad1b 100644
--- a/java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java
@@ -248,7 +248,7 @@ public class MigrationManagerTest extends RhnBaseTestCase {
assertNotNull(server.getHistory());
assertTrue(server.getHistory().size() > 0);
boolean migrationRecorded = false;
- for (ServerHistoryEvent event : (Set<ServerHistoryEvent>) server.getHistory()) {
+ for (ServerHistoryEvent event : server.getHistory()) {
if (event.getSummary().equals("System migration") &&
event.getDetails().contains("From organization: " + origOrg.getName()) &&
event.getDetails().contains("To organization: " + destOrg.getName()) &&
diff --git a/java/code/src/com/redhat/rhn/manager/profile/ProfileManager.java b/java/code/src/com/redhat/rhn/manager/profile/ProfileManager.java
index e7db53a..59983f1 100644
--- a/java/code/src/com/redhat/rhn/manager/profile/ProfileManager.java
+++ b/java/code/src/com/redhat/rhn/manager/profile/ProfileManager.java
@@ -1118,7 +1118,7 @@ public class ProfileManager extends BaseManager {
boolean foundMatch = false;
if (pkgsInChannel != null) {
for (int i = 0; i < pkgsInChannel.size(); i++) {
- PackageListItem pkgInChannel = (PackageListItem) pkgsInChannel.get(i);
+ PackageListItem pkgInChannel = pkgsInChannel.get(i);
if (pkgInChannel.getVersion().equals(pm.getVersion()) &&
pkgInChannel.getRelease().equals(pm.getRelease()) &&
(epochcmp(pkgInChannel.getEpoch(), pm.getEpoch()) == 0)) {
@@ -1156,7 +1156,7 @@ public class ProfileManager extends BaseManager {
// now use the PageControl to limit the list to the
// selected region.
- dr = (DataResult)dr.subList(pc.getStart() - 1, pc.getEnd());
+ dr = dr.subList(pc.getStart() - 1, pc.getEnd());
}
return dr;
diff --git a/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java b/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java
index 57b4439..c9db9dd 100644
--- a/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java
@@ -80,7 +80,7 @@ public class CreateUserCommand {
validateLogin();
validatePrefix();
- return (ValidatorError[]) errors.toArray(new ValidatorError[0]);
+ return errors.toArray(new ValidatorError[0]);
}
/**
diff --git a/java/code/src/com/redhat/rhn/manager/user/UserManager.java b/java/code/src/com/redhat/rhn/manager/user/UserManager.java
index 60b213c..e46987f 100644
--- a/java/code/src/com/redhat/rhn/manager/user/UserManager.java
+++ b/java/code/src/com/redhat/rhn/manager/user/UserManager.java
@@ -368,7 +368,7 @@ public class UserManager extends BaseManager {
Iterator i = dr.iterator();
while (i.hasNext()) {
Map row = (Map)i.next();
- groupSet.add((Long)row.get("system_group_id"));
+ groupSet.add(row.get("system_group_id"));
}
return groupSet;
}
@@ -849,7 +849,7 @@ public class UserManager extends BaseManager {
DataResult dr = m.execute(params);
dr.setTotalSize(dr.size());
if (pc != null && dr.size() > 0) {
- dr = (DataResult)dr.subList(pc.getStart() - 1, pc.getEnd());
+ dr = dr.subList(pc.getStart() - 1, pc.getEnd());
dr.elaborate(new HashMap());
}
return dr;
diff --git a/java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java b/java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java
index 4189869..5d9a69a 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java
@@ -89,7 +89,7 @@ public class TaskoFactory extends HibernateFactory {
* @return list of bunches
*/
public static List<TaskoBunch> listOrgBunches() {
- return (List) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"TaskoBunch.listOrgBunches", null);
}
@@ -98,7 +98,7 @@ public class TaskoFactory extends HibernateFactory {
* @return list of bunches
*/
public static List<TaskoBunch> listSatBunches() {
- return (List) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"TaskoBunch.listSatBunches", null);
}
@@ -187,7 +187,7 @@ public class TaskoFactory extends HibernateFactory {
* @return list of tasks
*/
public static List<TaskoTask> listTasks() {
- return (List<TaskoTask>) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"TaskoTask.listTasks", new HashMap());
}
@@ -199,7 +199,7 @@ public class TaskoFactory extends HibernateFactory {
public static List<TaskoRun> listRunsOlderThan(Date limitTime) {
Map params = new HashMap();
params.put("limit_time", limitTime);
- return (List<TaskoRun>) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"TaskoRun.listOlderThan", params);
}
@@ -246,12 +246,12 @@ public class TaskoFactory extends HibernateFactory {
Map params = new HashMap();
params.put("timestamp", new Date()); // use server time, not DB time
if (orgId == null) {
- return (List<TaskoSchedule>) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"TaskoSchedule.listActiveInSat", params);
}
else {
params.put("org_id", orgId);
- return (List<TaskoSchedule>) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"TaskoSchedule.listActiveByOrg", params);
}
}
@@ -268,12 +268,12 @@ public class TaskoFactory extends HibernateFactory {
params.put("job_label", jobLabel);
params.put("timestamp", new Date()); // use server time, not DB time
if (orgId == null) {
- return (List<TaskoSchedule>) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"TaskoSchedule.listActiveInSatByLabel", params);
}
else {
params.put("org_id", orgId);
- return (List<TaskoSchedule>) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"TaskoSchedule.listActiveByOrgAndLabel", params);
}
}
@@ -292,12 +292,12 @@ public class TaskoFactory extends HibernateFactory {
params.put("timestamp", new Date()); // use server time, not DB time
params.put("bunch_id", bunch.getId());
if (orgId == null) {
- return (List<TaskoSchedule>) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"TaskoSchedule.listActiveInSatByBunch", params);
}
else {
params.put("org_id", orgId);
- return (List<TaskoSchedule>) singleton.listObjectsByNamedQuery(
+ return singleton.listObjectsByNamedQuery(
"TaskoSchedule.listActiveByOrgAndBunch", params);
}
}
diff --git a/java/code/src/com/redhat/rhn/testing/ServerGroupTestUtils.java b/java/code/src/com/redhat/rhn/testing/ServerGroupTestUtils.java
index 92b40be..1d40cbb 100644
--- a/java/code/src/com/redhat/rhn/testing/ServerGroupTestUtils.java
+++ b/java/code/src/com/redhat/rhn/testing/ServerGroupTestUtils.java
@@ -70,7 +70,7 @@ public class ServerGroupTestUtils {
*/
public static ManagedServerGroup createManaged(User user) throws Exception {
ServerGroupTest.checkSysGroupAdminRole(user);
- return (ManagedServerGroup) ServerGroupManager.getInstance().
+ return ServerGroupManager.getInstance().
create(user, NAME + TestUtils.randomString(),
DESCRIPTION);
}
diff --git a/java/code/src/org/cobbler/Profile.java b/java/code/src/org/cobbler/Profile.java
index b7e457a..994986f 100644
--- a/java/code/src/org/cobbler/Profile.java
+++ b/java/code/src/org/cobbler/Profile.java
@@ -359,7 +359,7 @@ public class Profile extends CobblerObject {
* @param virtRamIn the VirtRam
*/
public void setVirtRam(int virtRamIn) {
- modify(VIRT_RAM, (int) virtRamIn);
+ modify(VIRT_RAM, virtRamIn);
}
/**
commit eeae6498d332608dce2d55f589f2c52e7e116b21
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 27 19:38:11 2012 +0100
do not check whether Org expression is an instance of Org
diff --git a/java/code/src/com/redhat/rhn/domain/org/Org.java b/java/code/src/com/redhat/rhn/domain/org/Org.java
index df799c9..b33d18f 100644
--- a/java/code/src/com/redhat/rhn/domain/org/Org.java
+++ b/java/code/src/com/redhat/rhn/domain/org/Org.java
@@ -603,9 +603,8 @@ public class Org extends BaseDomainHelper {
*/
public void addTrust(Org org) {
trustedOrgs.add(org);
- if (org instanceof Org) {
- Org impl = org;
- impl.trustedOrgs.add(this);
+ if (org != null) {
+ org.trustedOrgs.add(this);
}
}
@@ -616,9 +615,8 @@ public class Org extends BaseDomainHelper {
*/
public void removeTrust(Org org) {
trustedOrgs.remove(org);
- if (org instanceof Org) {
- Org impl = org;
- impl.trustedOrgs.remove(this);
+ if (org != null) {
+ org.trustedOrgs.remove(this);
}
}
12 years, 3 months
Changes to 'refs/tags/spacecmd-1.7.7-1'
by shardy
Tag 'spacecmd-1.7.7-1' created by Steven Hardy <shardy(a)redhat.com> at 2012-02-27 20:00 +0000
Tagging package [spacecmd] version [1.7.7-1] in directory [spacecmd/].
Changes since spacewalk-java-1.7.43-1:
Joerg Steffens (1):
spacecmd : activationkey_details print child channels and packages sorted
Milan Zazrivec (18):
Introduce pg_dblink_exec for executing SQL queries in a separate db connection
fix checksum header
weird schema-source-sanity-check.pl checks
pg_dblink_exec: schema upgrade script
restrict autonomous_transaction to insert only
use pg_dblink_exec to execute insert inside lookup_checksum
lookup_checksum: schema upgrade files
restrict autonomous_transaction to insert only
lookup_client_capability: oracle schema upgrade script
use pg_dblink_exec to execute insert inside lookup_client_capability
lookup_client_capability: schema upgrade script
use 'select into strict'
restrict autonomous_transaction to insert only
lookup_config_filename: schema upgrade script
use pg_dblink_exec to execute insert inside lookup_config_filename
lookup_config_filename: postgresql schema upgrade script
use coalesce and proper quoting
update postgresql procs dependencies
Steven Hardy (7):
spacecmd bugfix : softwarechannel_addpackages validate channel arg
spacecmd enhancement : activationkey_delete add support for globbing
spacecmd : Fix error in do_activationkey_export comment
spacecmd enhancement : configchannel_delete add support for globbing
spacecmd enhancement : Add errata_findbycve function
spacecmd bugfix : softwarechannel_adderrata use cloneAsOriginal
Automatic commit of package [spacecmd] release [1.7.7-1].
---
rel-eng/packages/spacecmd | 2
schema/spacewalk/oracle/procs/insert_checksum.sql | 28 ++++
schema/spacewalk/oracle/procs/insert_client_capability.sql | 27 ++++
schema/spacewalk/oracle/procs/insert_config_filename.sql | 27 ++++
schema/spacewalk/oracle/procs/lookup_checksum.sql | 56 ++++----
schema/spacewalk/oracle/procs/lookup_client_capability.sql | 56 +++-----
schema/spacewalk/oracle/procs/lookup_config_filename.sql | 57 ++++----
schema/spacewalk/oracle/procs/procs.deps | 8 -
schema/spacewalk/postgres/procs/lookup_checksum.sql | 64 +++++-----
schema/spacewalk/postgres/procs/lookup_client_capability.sql | 55 ++++----
schema/spacewalk/postgres/procs/lookup_config_filename.sql | 55 ++++----
schema/spacewalk/postgres/procs/pg_dblink_exec.sql | 29 ++++
schema/spacewalk/postgres/procs/procs.deps | 4
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/076-pg_dblink_exec.sql.postgresql | 29 ++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/077-lookup-checksum.sql.oracle | 46 +++++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/077-lookup-checksum.sql.postgresql | 55 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/078-lookup_client_capability.sql.oracle | 39 ++++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/078-lookup_client_capability.sql.postgresql | 45 +++++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/079-lookup_config_filename.sql.oracle | 42 ++++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/079-lookup_config_filename.sql.postgresql | 45 +++++++
spacecmd/spacecmd.spec | 16 ++
spacecmd/src/lib/activationkey.py | 26 ++--
spacecmd/src/lib/configchannel.py | 12 +
spacecmd/src/lib/errata.py | 33 +++++
spacecmd/src/lib/softwarechannel.py | 23 ++-
25 files changed, 688 insertions(+), 191 deletions(-)
---
12 years, 3 months
rel-eng/packages spacecmd/spacecmd.spec
by shardy
rel-eng/packages/spacecmd | 2 +-
spacecmd/spacecmd.spec | 16 +++++++++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
New commits:
commit a6cb3e049d08a121d8565ab3afd6eb2ae73c4a20
Author: Steven Hardy <shardy(a)redhat.com>
Date: Mon Feb 27 20:00:23 2012 +0000
Automatic commit of package [spacecmd] release [1.7.7-1].
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index 86264ce..0298e24 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-1.7.6-1 spacecmd/
+1.7.7-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index 3c12438..331e2a5 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 1.7.6
+Version: 1.7.7
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -61,6 +61,20 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
+* Mon Feb 27 2012 Steven Hardy <shardy(a)redhat.com> 1.7.7-1
+- spacecmd : activationkey_details print child channels and packages sorted
+ (joerg.steffens(a)dass-it.de)
+- spacecmd bugfix : softwarechannel_adderrata use cloneAsOriginal
+ (shardy(a)redhat.com)
+- spacecmd enhancement : Add errata_findbycve function (shardy(a)redhat.com)
+- spacecmd enhancement : configchannel_delete add support for globbing
+ (shardy(a)redhat.com)
+- spacecmd : Fix error in do_activationkey_export comment (shardy(a)redhat.com)
+- spacecmd enhancement : activationkey_delete add support for globbing
+ (shardy(a)redhat.com)
+- spacecmd bugfix : softwarechannel_addpackages validate channel arg
+ (shardy(a)redhat.com)
+
* Mon Feb 27 2012 Jan Pazdziora 1.7.6-1
- 769430 - avoid using the quoted string, parse it first.
12 years, 3 months