summaryrefslogtreecommitdiffstats
path: root/src/yum/test/test_common.sh
diff options
context:
space:
mode:
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