From fffd1e6f51f11fa6fa19fe2905be1e1922c72528 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Tue, 23 Oct 2018 04:00:43 -0400 Subject: [PATCH] do task 342, update cases according to xcat-inventory design change --- .../testcase/xcat-inventory/cases.environment | 5 +--- .../testcase/xcat-inventory/cases.include | 1 - .../test.environments.osimage.stanza | 2 +- .../test.environments.osimage.update.json | 9 ++++--- .../test.environments.osimage.update.yaml | 6 +++-- .../test.environments.osimage.yaml | 26 ++++++++++++++----- 6 files changed, 31 insertions(+), 18 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment index 6e25e315a..ab7b69d2a 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment @@ -22,7 +22,6 @@ check:rc==0 cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi check:rc==0 cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir -check:output=~Importing object: test.environments.osimage check:output=~Inventory import successfully! check:rc==0 cmd:lsdef -t osimage -o test.environments.osimage @@ -86,7 +85,6 @@ cmd:lsdef -t osimage -o test.environments.osimage >/dev/null 2>&1;if [[ $? -eq 0 check:rc==0 cmd:dir="/tmp/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir -check:output=~Importing object: test.environments.osimage check:output=~Inventory import successfully! check:rc==0 cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environments.osimage.yaml.stanza @@ -101,14 +99,13 @@ check:rc==0 cmd:rmdef -t osimage -o test.environments.osimage check:rc==0 cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir -check:output=~Importing object: test.environments.osimage check:output=~Inventory import successfully! check:rc==0 cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environments.osimage.json.stanza check:rc==0 cmd:diff -y /tmp/export/test.environments.osimage.json.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza check:rc==0 -cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.json +cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.json --format json check:rc==0 cmd:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json /tmp/export/test.environments.osimage.json --ignore-blank-lines -I "^#" check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.include b/xCAT-test/autotest/testcase/xcat-inventory/cases.include index e1c85460f..6c12aff9f 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.include +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.include @@ -28,7 +28,6 @@ check:rc==0 cmd:rm -rf /tmp/imagedata/test_osimage cmd:xcat-inventory import -t osimage -d /tmp/imagedata/export check:rc==0 -check:output=~Importing object: test_osimage check:output=~Inventory import successfully! check:output=~The object test_osimage has been imported cmd:lsdef -t osimage -o test_osimage diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza index 903363536..86faff377 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza @@ -2,7 +2,7 @@ test.environments.osimage: objtype=osimage - environvar=GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo,SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir + environvar=GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo,OBJNAME=test.environments.osimage,SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir imagetype=linux osarch=ppc64le osdistroname=rhels7.5-alternate-ppc64le diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json index 68752808b..5e7680b40 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json @@ -8,7 +8,10 @@ "osname": "Linux" }, "deprecated": { - "comments": "rhels7.5,test_environment_variables" + "comments": [ + "rhels7.5", + "test_environment_variables" + ] }, "filestosync": [ "{{GITREPO}}/syncfiles/synclist" @@ -19,7 +22,7 @@ "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall", "{{GITREPO}}/postinstall/test1.postinstall" ], - "rootimgdir": "/install/custom/test.environments.osimage" + "rootimgdir": "/install/custom/{{OBJNAME}}" }, "imagetype": "linux", "package_selection": { @@ -47,4 +50,4 @@ }, "schema_version": "1.0" } -#Version 2.14.2 (git commit 09f0772835afdc0f962c9e7fe8cef862e9505ad7, built Tue Jun 19 01:58:56 EDT 2018) +#Version 2.14.4 (git commit 722709b61e63feb7f6d3ee787afa8113eefbe27e, built Wed Sep 26 06:17:57 EDT 2018) \ No newline at end of file diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml index c4f10968e..ced0777ea 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml @@ -6,7 +6,9 @@ osimage: osdistro: rhels7.5-alternate-ppc64le osname: Linux deprecated: - comments: rhels7.5,test_environment_variables + comments: + - rhels7.5 + - test_environment_variables filestosync: - '{{GITREPO}}/syncfiles/synclist' genimgoptions: @@ -14,7 +16,7 @@ osimage: postinstall: - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall - '{{GITREPO}}/postinstall/test1.postinstall' - rootimgdir: /install/custom/test.environments.osimage + rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux package_selection: otherpkgdir: diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml index 82143abc4..b6649accf 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml @@ -5,19 +5,31 @@ osimage: distribution: rhels7.5 osdistro: rhels7.5-ppc64le osname: Linux - filestosync: {{GITREPO}}/syncfiles/synclist + filestosync: + - {{GITREPO}}/syncfiles/synclist deprecated: - comments: rhels7.5,test_environment_variables + comments: + - rhels7.5 + - test_environment_variables genimgoptions: permission: '755' - postinstall: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall,{{GITREPO}}/postinstall/test1.postinstall - rootimgdir: /install/custom/test.environments.osimage + postinstall: + - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall + - {{GITREPO}}/postinstall/test1.postinstall + rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux package_selection: otherpkgdir: {{SWDIR}}/otherpkgdir/ - otherpkglist: {{GITREPO}}/otherpkglist/test1.otherpkglist,{{GITREPO}}/otherpkglist/test2.otherpkglist, - pkgdir: /install/rhels7.5/ppc64le,{{SWDIR}}/pkgdir/ - pkglist: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist,{{GITREPO}}/pkglist/test1.pkglist,{{GITREPO}}/pkglist/test2.pkglist + otherpkglist: + - {{GITREPO}}/otherpkglist/test1.otherpkglist + - {{GITREPO}}/otherpkglist/test2.otherpkglist, + pkgdir: + - /install/rhels7.5/ppc64le + - {{SWDIR}}/pkgdir/ + pkglist: + - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist + - {{GITREPO}}/pkglist/test1.pkglist + - {{GITREPO}}/pkglist/test2.pkglist provision_mode: netboot role: compute schema_version: '1.0'