summaryrefslogtreecommitdiffstats
path: root/src/yum/test/test_common.sh
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2012-10-03 11:32:02 +0200
committerMichal Minar <miminar@redhat.com>2012-10-03 11:54:30 +0200
commit3c719d73efc1902edfc79d0d6de6b14670addd26 (patch)
treec3a0acd140138785776ba6ef9f7a8b102e26c4cf /src/yum/test/test_common.sh
parentc16fe890c8a909b580d47b3aa40a3d94b25b6f6f (diff)
downloadopenlmi-providers-3c719d73efc1902edfc79d0d6de6b14670addd26.tar.gz
openlmi-providers-3c719d73efc1902edfc79d0d6de6b14670addd26.tar.xz
openlmi-providers-3c719d73efc1902edfc79d0d6de6b14670addd26.zip
update/delete methods done on YumInstalledPackage
enumerating YumPackage now yields all available packages - removed update, delete and check_integrity methods - added Install method - SoftwareElementState now equals to: 1 ("Installable") - for not installed and available package 2 ("Executable") - for installed package enumerating YumInstalledPackage now yields all installed packages - added update, delete and check_integrity methods
Diffstat (limited to 'src/yum/test/test_common.sh')
-rw-r--r--src/yum/test/test_common.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/yum/test/test_common.sh b/src/yum/test/test_common.sh
index 25d931f..1e5cd98 100644
--- a/src/yum/test/test_common.sh
+++ b/src/yum/test/test_common.sh
@@ -6,8 +6,7 @@ if [ -z $CLASS_NAME ]; then
fi
-url="http://localhost:5988/root/cimv2"
-op="${url}:${cls}"
+url="http://localhost:5988"
fedora_release=`sed 's/Fedora release\s*\([0-9]\+\).*/\1/' \
/etc/fedora-release`
@@ -18,6 +17,18 @@ function make_nevra() {
printf "%s-%s:%s-%s.%s" $@
}
+function make_op() {
+ local class_name keys
+ read class_name keys <<< "$@"
+ [ -n "$keys" ] && keys=".$keys"
+ printf "root/cimv2:$class_name$keys"
+}
+
+computer_system_keys="CreationClassName=\"Linux_ComputerSystem\""
+computer_system_keys+=",Name=$(hostname)"
+computer_system_op=`make_op Linux_ComputerSystem "$computer_system_keys"`
+op=`make_op ${CLASS_NAME}`
+
function make_rpm_name() {
local name epoch ver rel arch;
if [ $# -ge 5 ]; then