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 1/5] 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' From fa17c990d238882032efabd470b6f8daa597acf0 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Thu, 25 Oct 2018 23:16:06 -0400 Subject: [PATCH 2/5] update for case failure --- .../templates/diff/change_name.sh | 13 ++ .../xcat-inventory/templates/diff/diff.result | 87 ++++++++ .../templates/diff/diff_files.result | 87 ++++++++ .../templates/diff/diff_source.result | 70 +++++++ .../diff/xcat-inventory_diff_file1.json | 191 ++++++++++++++++++ .../diff/xcat-inventory_diff_file2.json | 173 ++++++++++++++++ 6 files changed, 621 insertions(+) create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/templates/diff/change_name.sh create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff.result create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_files.result create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_source.result create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/change_name.sh b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/change_name.sh new file mode 100644 index 000000000..b37eb278f --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/change_name.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +file1=$1 +file2=$2 +tmp_diff_file=$3 +rm -rf $tmp_diff_file +echo "copy /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/diff.result to $tmp_diff_file and modify compare file name in $tmp_diff_file" +cp /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/diff.result $tmp_diff_file +echo "copy command exit code $?" +sed -i "s|#FILE1#|$file1|g" $tmp_diff_file +echo "sed command exit code $?" +sed -i "s|#FILE2#|$file2|g" $tmp_diff_file +echo "sed command exit code $?" diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff.result b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff.result new file mode 100644 index 000000000..a4a54c114 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff.result @@ -0,0 +1,87 @@ + +====================BEGIN===================== + + +--- #FILE1# ++++ #FILE2# +{ + "node": { + "node1": { + "obj_info": { +- "groups": "ipmi" ++ "groups": "all" + }, + "engines": { + "hardware_mgt_engine": { +- "engine_type": "ipmi" + "engine_info": { +- "bmcusername": "ADMIN" + }, ++ "engine_type": "openbmc" + } + } + }, +- "node3": { +- "obj_info": { +- "groups": "openbmc" +- }, +- "role": "compute", +- "device_type": "server", +- "engines": { +- "hardware_mgt_engine": { +- "engine_info": { +- "bmc": "10.1.1.2", +- "bmcusername": "ADMIN" +- }, +- "engine_type": "openbmc" +- } +- }, +- "obj_type": "node" +- } + "node2": { + "network_info": { + "primarynic": { + "mac": [ +- "42:73:0a:03:11:0a!*NOIP*", ++ "42:6e:0a:03:11:0b" + ] + } + } + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "package_selection": { + "pkgdir": [ ++ "/install/rhels7.5-alternate/ppc64le/test" + ], + "otherpkgdir": [ +- "/install/post/otherpkgs/rhels7.5-alternate/ppc64le", ++ "/install/post/otherpkgs/rhels7.5-alternate/ppc64" + ] + } + } + }, + "site": { + "clustersite": { +- "xcatdebugmode": "1", +- "domain": "test.com", +- "master": "10.1.1.2", +- "forwarders": "10.0.0.1" ++ "xcatdebugmode": "0", ++ "domain": "cluster.com", ++ "master": "10.1.1.1" + } + }, + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { +- "mgtifname": "eth1" ++ "mgtifname": "eth0" + } + } + } +} + +====================END===================== + diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_files.result b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_files.result new file mode 100644 index 000000000..a4a54c114 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_files.result @@ -0,0 +1,87 @@ + +====================BEGIN===================== + + +--- #FILE1# ++++ #FILE2# +{ + "node": { + "node1": { + "obj_info": { +- "groups": "ipmi" ++ "groups": "all" + }, + "engines": { + "hardware_mgt_engine": { +- "engine_type": "ipmi" + "engine_info": { +- "bmcusername": "ADMIN" + }, ++ "engine_type": "openbmc" + } + } + }, +- "node3": { +- "obj_info": { +- "groups": "openbmc" +- }, +- "role": "compute", +- "device_type": "server", +- "engines": { +- "hardware_mgt_engine": { +- "engine_info": { +- "bmc": "10.1.1.2", +- "bmcusername": "ADMIN" +- }, +- "engine_type": "openbmc" +- } +- }, +- "obj_type": "node" +- } + "node2": { + "network_info": { + "primarynic": { + "mac": [ +- "42:73:0a:03:11:0a!*NOIP*", ++ "42:6e:0a:03:11:0b" + ] + } + } + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "package_selection": { + "pkgdir": [ ++ "/install/rhels7.5-alternate/ppc64le/test" + ], + "otherpkgdir": [ +- "/install/post/otherpkgs/rhels7.5-alternate/ppc64le", ++ "/install/post/otherpkgs/rhels7.5-alternate/ppc64" + ] + } + } + }, + "site": { + "clustersite": { +- "xcatdebugmode": "1", +- "domain": "test.com", +- "master": "10.1.1.2", +- "forwarders": "10.0.0.1" ++ "xcatdebugmode": "0", ++ "domain": "cluster.com", ++ "master": "10.1.1.1" + } + }, + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { +- "mgtifname": "eth1" ++ "mgtifname": "eth0" + } + } + } +} + +====================END===================== + diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_source.result b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_source.result new file mode 100644 index 000000000..45f78d822 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/diff_source.result @@ -0,0 +1,70 @@ + +====================BEGIN===================== + + +--- xCAT DB ++++ /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json +{ + "node": { + "node1": { + "obj_info": { +- "groups": "ipmi" ++ "groups": "all" + }, + "engines": { + "hardware_mgt_engine": { +- "engine_type": "ipmi" + "engine_info": { +- "bmcusername": "ADMIN" + }, ++ "engine_type": "openbmc" + } + } + }, + "node2": { + "network_info": { + "primarynic": { + "mac": [ +- "42:73:0a:03:11:0a!*NOIP*", ++ "42:6e:0a:03:11:0b" + ] + } + } + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "package_selection": { + "pkgdir": [ ++ "/install/rhels7.5-alternate/ppc64le/test" + ], + "otherpkgdir": [ +- "/install/post/otherpkgs/rhels7.5-alternate/ppc64le", ++ "/install/post/otherpkgs/rhels7.5-alternate/ppc64" + ] + } + } + }, + "site": { + "clustersite": { +- "xcatdebugmode": "1", +- "domain": "test.com", +- "master": "10.1.1.2", +- "forwarders": "10.0.0.1" ++ "xcatdebugmode": "0", ++ "domain": "cluster.com", ++ "master": "10.1.1.1" + } + }, + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { +- "mgtifname": "eth1" ++ "mgtifname": "eth0" + } + } + } +} + +====================END===================== + diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json new file mode 100644 index 000000000..a77ff9b95 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json @@ -0,0 +1,191 @@ +{ + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { + "gateway": "", + "mask": "255.0.0.0", + "mgtifname": "eth1", + "mtu": "1500", + "net": "10.0.0.0" + }, + "service": { + "tftpserver": "" + } + } + }, + "node": { + "node1": { + "device_type": "server", + "engines": { + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.1.1.1", + "bmcusername": "ADMIN", + }, + "engine_type": "ipmi" + } + }, + "obj_info": { + "groups": "ipmi" + }, + "obj_type": "node", + "role": "compute" + }, + "node2": { + "device_info": { + "arch": "ppc64le", + "uuid": "7d6ca5da-9485-11e8-821f-426e0a03110a" + }, + "device_type": "server", + "engines": { + "console_engine": { + "engine_info": { + "consoleenabled": "1", + "serialport": "0", + "serialspeed": "115200" + } + }, + "hardware_mgt_engine": { + "engine_info": { + "id": "10", + "vmcpus": "2", + "vmhost": "node_host", + "vmmemory": "6144", + "vmnics": "brenP3p9s0f0,brenP3p9s0f1", + "vmstorage": "phy:/dev/mapper/vdiskvg01-vdisk01n10" + }, + "engine_type": "kvm" + }, + "netboot_engine": { + "engine_info": { + "osimage": "rhels7.5-ppc64le-install-compute" + }, + "engine_type": "grub2" + } + }, + "network_info": { + "primarynic": { + "mac": [ + "42:6e:0a:03:11:0a", + "42:73:0a:03:11:0a!*NOIP*" + ] + } + }, + "obj_info": { + "groups": "all" + }, + "obj_type": "node", + "role": "compute" + }, + "node3": { + "device_type": "server", + "engines": { + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.1.1.2", + "bmcusername": "ADMIN", + }, + "engine_type": "openbmc" + } + }, + "obj_info": { + "groups": "openbmc" + }, + "obj_type": "node", + "role": "compute" + }, + "service": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postscripts": "servicenode" + } + } + }, + "obj_type": "group", + "role": "compute" + }, + "xcatdefaults": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postbootscripts": "otherpkgs", + "postscripts": "syslog,remoteshell,syncfiles" + } + } + }, + "obj_type": "group", + "role": "compute" + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "basic_attributes": { + "arch": "ppc64le", + "distribution": "rhels7.5-alternate", + "osdistro": "rhels7.5-alternate-ppc64le", + "osname": "Linux" + }, + "imagetype": "linux", + "package_selection": { + "otherpkgdir": [ + "/install/post/otherpkgs/rhels7.5-alternate/ppc64le" + ], + "pkgdir": [ + "/install/rhels7.5-alternate/ppc64le" + ], + "pkglist": [ + "/opt/xcat/share/xcat/install/rh/compute.rhels7.pkglist" + ] + }, + "provision_mode": "install", + "role": "compute", + "template": "/opt/xcat/share/xcat/install/rh/compute.rhels7.tmpl" + }, + }, + "schema_version": "latest", + "site": { + "clustersite": { + "SNsyncfiledir": "/var/xcat/syncfiles", + "auditnosyslog": "0", + "auditskipcmds": "ALL", + "blademaxp": "64", + "cleanupxcatpost": "no", + "consoleondemand": "no", + "databaseloc": "/var/lib", + "db2installloc": "/mntdb2", + "dhcplease": "43200", + "dnshandler": "ddns", + "domain": "test.com", + "enableASMI": "no", + "forwarders": "10.0.0.1", + "fsptimeout": "0", + "installdir": "/install", + "ipmimaxp": "64", + "ipmiretries": "3", + "ipmitimeout": "2", + "master": "10.1.1.2", + "maxssh": "8", + "nameservers": "10.1.1.1", + "nodesyncfiledir": "/var/xcat/node/syncfiles", + "powerinterval": "0", + "ppcmaxp": "64", + "ppcretry": "3", + "ppctimeout": "0", + "sharedtftp": "1", + "sshbetweennodes": "ALLGROUPS", + "syspowerinterval": "0", + "tftpdir": "/tftpboot", + "timezone": "US/Eastern", + "useNmapfromMN": "no", + "vsftp": "n", + "xcatconfdir": "/etc/xcat", + "xcatdebugmode": "1", + "xcatdport": "3001", + "xcatiport": "3002", + "xcatsslversion": "TLSv1" + } + } +} diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json new file mode 100644 index 000000000..a3f7b243e --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json @@ -0,0 +1,173 @@ +{ + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { + "gateway": "", + "mask": "255.0.0.0", + "mgtifname": "eth0", + "mtu": "1500", + "net": "10.0.0.0" + }, + "service": { + "tftpserver": "" + } + } + }, + "node": { + "node1": { + "device_type": "server", + "engines": { + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.1.1.1", + }, + "engine_type": "openbmc" + } + }, + "obj_info": { + "groups": "all" + }, + "obj_type": "node", + "role": "compute" + }, + "node2": { + "device_info": { + "arch": "ppc64le", + "uuid": "7d6ca5da-9485-11e8-821f-426e0a03110a" + }, + "device_type": "server", + "engines": { + "console_engine": { + "engine_info": { + "consoleenabled": "1", + "serialport": "0", + "serialspeed": "115200" + } + }, + "hardware_mgt_engine": { + "engine_info": { + "id": "10", + "vmcpus": "2", + "vmhost": "node_host", + "vmmemory": "6144", + "vmnics": "brenP3p9s0f0,brenP3p9s0f1", + "vmstorage": "phy:/dev/mapper/vdiskvg01-vdisk01n10" + }, + "engine_type": "kvm" + }, + "netboot_engine": { + "engine_info": { + "osimage": "rhels7.5-ppc64le-install-compute" + }, + "engine_type": "grub2" + } + }, + "network_info": { + "primarynic": { + "mac": [ + "42:6e:0a:03:11:0a", + "42:6e:0a:03:11:0b" + ] + } + }, + "obj_info": { + "groups": "all" + }, + "obj_type": "node", + "role": "compute" + }, + "service": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postscripts": "servicenode" + } + } + }, + "obj_type": "group", + "role": "compute" + }, + "xcatdefaults": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postbootscripts": "otherpkgs", + "postscripts": "syslog,remoteshell,syncfiles" + } + } + }, + "obj_type": "group", + "role": "compute" + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "basic_attributes": { + "arch": "ppc64le", + "distribution": "rhels7.5-alternate", + "osdistro": "rhels7.5-alternate-ppc64le", + "osname": "Linux" + }, + "imagetype": "linux", + "package_selection": { + "otherpkgdir": [ + "/install/post/otherpkgs/rhels7.5-alternate/ppc64" + ], + "pkgdir": [ + "/install/rhels7.5-alternate/ppc64le", + "/install/rhels7.5-alternate/ppc64le/test" + ], + "pkglist": [ + "/opt/xcat/share/xcat/install/rh/compute.rhels7.pkglist" + ] + }, + "provision_mode": "install", + "role": "compute", + "template": "/opt/xcat/share/xcat/install/rh/compute.rhels7.tmpl" + }, + }, + "schema_version": "latest", + "site": { + "clustersite": { + "SNsyncfiledir": "/var/xcat/syncfiles", + "auditnosyslog": "0", + "auditskipcmds": "ALL", + "blademaxp": "64", + "cleanupxcatpost": "no", + "consoleondemand": "no", + "databaseloc": "/var/lib", + "db2installloc": "/mntdb2", + "dhcplease": "43200", + "dnshandler": "ddns", + "domain": "cluster.com", + "enableASMI": "no", + "fsptimeout": "0", + "installdir": "/install", + "ipmimaxp": "64", + "ipmiretries": "3", + "ipmitimeout": "2", + "master": "10.1.1.1", + "maxssh": "8", + "nameservers": "10.1.1.1", + "nodesyncfiledir": "/var/xcat/node/syncfiles", + "powerinterval": "0", + "ppcmaxp": "64", + "ppcretry": "3", + "ppctimeout": "0", + "sharedtftp": "1", + "sshbetweennodes": "ALLGROUPS", + "syspowerinterval": "0", + "tftpdir": "/tftpboot", + "timezone": "US/Eastern", + "useNmapfromMN": "no", + "vsftp": "n", + "xcatconfdir": "/etc/xcat", + "xcatdebugmode": "0", + "xcatdport": "3001", + "xcatiport": "3002", + "xcatsslversion": "TLSv1" + } + } +} From 9e9c4d2cf9efbbebe1e5bd726b56527a6e51c290 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Thu, 1 Nov 2018 23:14:32 -0400 Subject: [PATCH 3/5] update --- .../testcase/xcat-inventory/cases.environment | 30 +++++++++++++++++-- .../test.environments.osimage.stanza | 14 ++++----- .../test.environments.osimage.update.json | 16 +++++----- .../test.environments.osimage.update.yaml | 14 ++++----- .../test.environments.osimage.yaml | 14 ++++----- 5 files changed, 56 insertions(+), 32 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment index ab7b69d2a..a05f6a706 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment @@ -7,7 +7,7 @@ check:rc==0 cmd:makedns -n check:rc==0 -cmd:sleep 20 +#cmd:sleep 20 cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]] && [[ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]]; then getmacs -D $$CN; fi check:rc==0 cmd:makedhcp -n @@ -16,11 +16,17 @@ cmd:makedhcp -a check:rc==0 cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done check:rc==0 -cmd:copycds $$ISO +#cmd:copycds $$ISO 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:osarch=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osarch|awk -F'=' '{print $2}');sed -i "s/OSARCH/$osarch/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +cmd:osvers=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSVERS/$osvers/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +cmd:pkgdir=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkgdir|awk -F'=' '{print $2}');sed -i "s!PKGDIR!$pkgdir!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +cmd:pkglist=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkglist|awk -F'=' '{print $2}');sed -i "s!PKGLIST!$pkglist!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +cmd:postinstall=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w postinstall|awk -F'=' '{print $2}');sed -i "s!POSTINSTALL!$postinstall!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +cmd:osmajor=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSMAJOR/$osmajor/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml 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=~Inventory import successfully! check:rc==0 @@ -84,11 +90,23 @@ label:others,xcat_inventory cmd:lsdef -t osimage -o test.environments.osimage >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o test.environments.osimage -z >/tmp/test.environments.osimage_image.stanza ;rmdef -t osimage -o test.environments.osimage;fi check:rc==0 cmd:dir="/tmp/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir +cmd:osarch=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osarch|awk -F'=' '{print $2}');sed -i "s/OSARCH/$osarch/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +cmd:osvers=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSVERS/$osvers/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +cmd:pkgdir=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkgdir|awk -F'=' '{print $2}');sed -i "s!PKGDIR!$pkgdir!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +cmd:pkglist=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkglist|awk -F'=' '{print $2}');sed -i "s!PKGLIST!$pkglist!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +cmd:postinstall=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w postinstall|awk -F'=' '{print $2}');sed -i "s!POSTINSTALL!$postinstall!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +cmd:osmajor=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSMAJOR/$osmajor/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml 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=~Inventory import successfully! check:rc==0 cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environments.osimage.yaml.stanza check:rc==0 +cmd:osarch=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osarch|awk -F'=' '{print $2}');sed -i "s/OSARCH/$osarch/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +cmd:osvers=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSVERS/$osvers/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +cmd:pkgdir=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkgdir|awk -F'=' '{print $2}');sed -i "s!PKGDIR!$pkgdir!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +cmd:pkglist=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkglist|awk -F'=' '{print $2}');sed -i "s!PKGLIST!$pkglist!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +cmd:postinstall=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w postinstall|awk -F'=' '{print $2}');sed -i "s!POSTINSTALL!$postinstall!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +cmd:osmajor=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSMAJOR/$osmajor/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza cmd:diff -y /tmp/export/test.environments.osimage.yaml.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.yaml --format yaml @@ -98,6 +116,12 @@ cmd:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templat check:rc==0 cmd:rmdef -t osimage -o test.environments.osimage check:rc==0 +cmd:osarch=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osarch|awk -F'=' '{print $2}');sed -i "s/OSARCH/$osarch/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +cmd:osvers=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSVERS/$osvers/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +cmd:pkgdir=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkgdir|awk -F'=' '{print $2}');sed -i "s!PKGDIR!$pkgdir!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +cmd:pkglist=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkglist|awk -F'=' '{print $2}');sed -i "s!PKGLIST!$pkglist!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +cmd:postinstall=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w postinstall|awk -F'=' '{print $2}');sed -i "s!POSTINSTALL!$postinstall!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +cmd:osmajor=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSMAJOR/$osmajor/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json 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=~Inventory import successfully! check:rc==0 @@ -105,7 +129,7 @@ cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environ 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 --format json +cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.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/templates/environment/test.environments.osimage.stanza b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza index 86faff377..79166e511 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 @@ -4,18 +4,18 @@ test.environments.osimage: objtype=osimage 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 + osarch=OSARCH + osdistroname=OSVERS-OSARCH osname=Linux - osvers=rhels7.5-alternate + osvers=OSVERS otherpkgdir=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/ otherpkglist=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist, permission=755 - pkgdir=/install/rhels7.5-alternate/ppc64le,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/ - pkglist=/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist - postinstall=/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall + pkgdir=PKGDIR,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/ + pkglist=PKGLIST,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist + postinstall=POSTINSTALL,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall profile=compute provmethod=netboot rootimgdir=/install/custom/test.environments.osimage synclists=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/syncfiles/synclist - usercomment=rhels7.5,test_environment_variables + usercomment=OSMAJOR,test_environment_variables 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 5e7680b40..2dad18b47 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 @@ -2,14 +2,14 @@ "osimage": { "test.environments.osimage": { "basic_attributes": { - "arch": "ppc64le", - "distribution": "rhels7.5-alternate", - "osdistro": "rhels7.5-alternate-ppc64le", + "arch": "OSARCH", + "distribution": "OSVERS", + "osdistro": "OSARCH-OSVERS", "osname": "Linux" }, "deprecated": { "comments": [ - "rhels7.5", + "OSMAJOR", "test_environment_variables" ] }, @@ -19,7 +19,7 @@ "genimgoptions": { "permission": "755", "postinstall": [ - "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall", + "POSTINSTALL", "{{GITREPO}}/postinstall/test1.postinstall" ], "rootimgdir": "/install/custom/{{OBJNAME}}" @@ -35,11 +35,11 @@ "" ], "pkgdir": [ - "/install/rhels7.5-alternate/ppc64le", + "PKGDIR", "{{SWDIR}}/pkgdir/" ], "pkglist": [ - "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist", + "PKGLIST", "{{GITREPO}}/pkglist/test1.pkglist", "{{GITREPO}}/pkglist/test2.pkglist" ] @@ -50,4 +50,4 @@ }, "schema_version": "1.0" } -#Version 2.14.4 (git commit 722709b61e63feb7f6d3ee787afa8113eefbe27e, built Wed Sep 26 06:17:57 EDT 2018) \ No newline at end of file +#Version 2.14.4 (git commit 722709b61e63feb7f6d3ee787afa8113eefbe27e, built Wed Sep 26 06:17:57 EDT 2018) 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 ced0777ea..65a19b703 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 @@ -1,20 +1,20 @@ osimage: test.environments.osimage: basic_attributes: - arch: ppc64le - distribution: rhels7.5-alternate - osdistro: rhels7.5-alternate-ppc64le + arch: OSARCH + distribution: OSVERS + osdistro: OSVERS-OSARCH osname: Linux deprecated: comments: - - rhels7.5 + - OSMAJOR - test_environment_variables filestosync: - '{{GITREPO}}/syncfiles/synclist' genimgoptions: permission: '755' postinstall: - - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall + - POSTINSTALL - '{{GITREPO}}/postinstall/test1.postinstall' rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux @@ -26,10 +26,10 @@ osimage: - '{{GITREPO}}/otherpkglist/test2.otherpkglist' - '' pkgdir: - - /install/rhels7.5-alternate/ppc64le + - PKGDIR - '{{SWDIR}}/pkgdir/' pkglist: - - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist + - PKGLIST - '{{GITREPO}}/pkglist/test1.pkglist' - '{{GITREPO}}/pkglist/test2.pkglist' provision_mode: netboot 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 b6649accf..38a1d0b28 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 @@ -1,20 +1,20 @@ osimage: test.environments.osimage: basic_attributes: - arch: ppc64le - distribution: rhels7.5 - osdistro: rhels7.5-ppc64le + arch: OSARCH + distribution: OSMAJOR + osdistro: OSVERS-OSARCH osname: Linux filestosync: - {{GITREPO}}/syncfiles/synclist deprecated: comments: - - rhels7.5 + - OSMAJOR - test_environment_variables genimgoptions: permission: '755' postinstall: - - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall + - POSTINSTALL - {{GITREPO}}/postinstall/test1.postinstall rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux @@ -24,10 +24,10 @@ osimage: - {{GITREPO}}/otherpkglist/test1.otherpkglist - {{GITREPO}}/otherpkglist/test2.otherpkglist, pkgdir: - - /install/rhels7.5/ppc64le + - PKGDIR - {{SWDIR}}/pkgdir/ pkglist: - - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist + - PKGLIST - {{GITREPO}}/pkglist/test1.pkglist - {{GITREPO}}/pkglist/test2.pkglist provision_mode: netboot From ad3d2b26c2ac3e88dd4c5f2c635b3c16044ec9e1 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Fri, 2 Nov 2018 02:12:14 -0400 Subject: [PATCH 4/5] update to remove blank --- .../test.environments.osimage.update.yaml | 14 +++++++------- .../environment/test.environments.osimage.yaml | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) 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 65a19b703..6ace48a22 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 @@ -1,20 +1,20 @@ osimage: test.environments.osimage: basic_attributes: - arch: OSARCH - distribution: OSVERS - osdistro: OSVERS-OSARCH + arch: OSARCH + distribution: OSVERS + osdistro: OSVERS-OSARCH osname: Linux deprecated: comments: - - OSMAJOR + - OSMAJOR - test_environment_variables filestosync: - '{{GITREPO}}/syncfiles/synclist' genimgoptions: permission: '755' postinstall: - - POSTINSTALL + - POSTINSTALL - '{{GITREPO}}/postinstall/test1.postinstall' rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux @@ -26,10 +26,10 @@ osimage: - '{{GITREPO}}/otherpkglist/test2.otherpkglist' - '' pkgdir: - - PKGDIR + - PKGDIR - '{{SWDIR}}/pkgdir/' pkglist: - - PKGLIST + - PKGLIST - '{{GITREPO}}/pkglist/test1.pkglist' - '{{GITREPO}}/pkglist/test2.pkglist' provision_mode: netboot 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 38a1d0b28..adb23f662 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 @@ -1,20 +1,20 @@ osimage: test.environments.osimage: basic_attributes: - arch: OSARCH - distribution: OSMAJOR - osdistro: OSVERS-OSARCH + arch: OSARCH + distribution: OSMAJOR + osdistro: OSVERS-OSARCH osname: Linux filestosync: - {{GITREPO}}/syncfiles/synclist deprecated: comments: - - OSMAJOR + - OSMAJOR - test_environment_variables genimgoptions: permission: '755' postinstall: - - POSTINSTALL + - POSTINSTALL - {{GITREPO}}/postinstall/test1.postinstall rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux @@ -24,10 +24,10 @@ osimage: - {{GITREPO}}/otherpkglist/test1.otherpkglist - {{GITREPO}}/otherpkglist/test2.otherpkglist, pkgdir: - - PKGDIR + - PKGDIR - {{SWDIR}}/pkgdir/ pkglist: - - PKGLIST + - PKGLIST - {{GITREPO}}/pkglist/test1.pkglist - {{GITREPO}}/pkglist/test2.pkglist provision_mode: netboot From 8f23be188822b7a5f8a11778654d71e23456a576 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Fri, 2 Nov 2018 03:18:10 -0400 Subject: [PATCH 5/5] fix typo --- xCAT-test/autotest/testcase/xcat-inventory/cases.environment | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment index a05f6a706..2c057ec18 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment @@ -7,7 +7,7 @@ check:rc==0 cmd:makedns -n check:rc==0 -#cmd:sleep 20 +cmd:sleep 20 cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]] && [[ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]]; then getmacs -D $$CN; fi check:rc==0 cmd:makedhcp -n @@ -16,7 +16,7 @@ cmd:makedhcp -a check:rc==0 cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done check:rc==0 -#cmd:copycds $$ISO +cmd:copycds $$ISO 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