openshift/openshift-extras — pull request #210 by dobbymoodge (2013-11-25 21:36:42+00:00)
Title: <yum-validator> Rewrite ver/subscription guessing to be generic and configurable

* Added `_available_subs` helper method to `oo-admin-yum-validator`:
checks available repositories to determine which subscription
management tools might be available and generates a hash with the
results

* Added `detect_prod_version_and_sub` to `oo-admin-yum-validator`,
replacing `guess_ose_version_and_subscription` method. This uses the
available `RepoDB` data - including the `preferred_version` and
`preferred_subscription` config values - to resolve
version/subscription detection when multiple possibilities exist.

* Added logic to `repo_db.py` to support the new `preferences` INI
section and set `preferred_subscription` and `preferred_version`
variables for use in version/subscription guessing.

* Added `preferences` section to `repos.ini` to set preferred OSE
version to 2.0 and subscription type to `rhsm`

* Removed old `guess_ose_version_and_subscription` method from
`OpenShiftYumValidator`

* Added `RepoDB.list_available` to get sorted set list of a `RepoDB`
attributes (needed for updated `validate_version` method in
`OpenShiftYumValidator`)

* Updated `--help` output to remove valid arguments for `--oo-version`
option

* Updated `OpenShiftYumValidator.validate_version` to check argument
to `--oo-version` option against available versions in `RepoDB`
object `self.rdb`

* Updated `OpenShiftYumValidator.main` to add `validate_version` as a
requirement for running checks

* Merged `beta2.ini` and `repos.ini`

* Updated `oo-admin-yum-validator.txt2man` manpage to explain updated
`--oo-version` argument and to tweak some wording, style and typo
issues

* Removed obsolete symlinks (only needed for OSE 2.0 beta)

* Removed obsolete `beta2.ini` repo conf file