2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00

modify xcat-inventory cases path

This commit is contained in:
xuweibj 2018-12-03 22:33:06 -05:00
parent 0c9bbb1b47
commit 39a141f70a
23 changed files with 425 additions and 434 deletions

View File

@ -1,6 +1,6 @@
start:xcat_inventory_option_h
description:This case is used to test xcat-inventory usage information
label:others,xcat_inventory
label:others,inventory_ci
cmd:xcat-inventory -h
check:ouptut=~usage: xcat-inventory
check:ouptut!~usage: xcat-inventory export
@ -25,7 +25,7 @@ end
start:xcat_inventory_option_V
description:This case is used to test xcat-inventory option V which used to get version information
label:others,xcat_inventory
label:others,inventory_ci
cmd:xcat-inventory -V
check:ouptut=~\d\.\d
check:rc==0
@ -33,7 +33,7 @@ end
start:xcat_inventory_invalid_subcmd
description:This case is used to test xcat-inventory export subcommand to handle invalid subcommand. The vaild subcommand are export and import.
label:others,xcat_inventory
label:others,inventory_ci
cmd:xcat-inventory aaa
check:output=~ Error: not a valid subcommand to run
check:output=~ usage:
@ -42,7 +42,7 @@ end
start:xcat_inventory_export_option_t_invalid_type
description:This case is used to test xcat-inventory export subcommand to handle invalid type for option t
label:others,xcat_inventory
label:others,inventory_ci
cmd:xcat-inventory export -t aaa
check:output=~Invalid object type
check:output!~Traceback (most recent call last):
@ -51,7 +51,7 @@ end
start:xcat_inventory_export_option_format_invalid_type
description:This case is used to test xcat-inventory export subcommand to handle invalid type for option format
label:others,xcat_inventory
label:others,inventory_ci
cmd:xcat-inventory export --format aaa
check:output=~Invalid exporting format: aaa
check:output!~Traceback (most recent call last):
@ -60,7 +60,7 @@ end
start:xcat_inventory_export_option_f
description:This case is used to test xcat-inventory export subcommand to handle option f
label:others,xcat_inventory
label:others,inventory_ci
cmd:dir="/tmp/xcat_inventory_export_option_f";echo ${dir}".old";if [ -d "${dir}" ];then mv ${dir} ${dir}".old"; fi; mkdir -p $dir
check:rc==0
cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/xcat_inventory_export_option_f/bogusnode.stanza ;rmdef bogusnode;fi
@ -105,7 +105,7 @@ end
start:xcat_inventory_import_option_f_invalid_file
description:This case is used to test xcat-inventory import subcommand to handle invalid file for option f
label:others,xcat_inventory
label:others,inventory_ci
cmd:mkdir -p /tmp/xcat_inventory_import_option_f_invalid_file
check:rc==0
#to handle a non-existed file
@ -114,8 +114,7 @@ check:output=~the directory does not exist or is not a directory
check:output !~Traceback
check:rc!=0
#To handle a invalid json file
cmd:#!/usr/bin/bash
echo "{
cmd:echo '{
"node": {
"bogusnode": {
"device_type": "server",
@ -126,7 +125,7 @@ echo "{
"role": "compute"
}
}
" > /tmp/xcat_inventory_import_option_f_invalid_file/invaild_json
' > /tmp/xcat_inventory_import_option_f_invalid_file/invaild_json
check:rc==0
cmd:cat /tmp/xcat_inventory_import_option_f_invalid_file/invaild_json
check:rc==0
@ -135,14 +134,13 @@ check:output =~ Error: failed to load file
check:output !~Traceback
check:rc!=0
#To handle a invalid yaml file
cmd:#!/usr/bin/bash
echo "node:
cmd:echo 'node:
device_type: server
obj_info:
groups: test
obj_type: node
role: compute
" > /tmp/xcat_inventory_import_option_f_invalid_file/invaild_yaml
' > /tmp/xcat_inventory_import_option_f_invalid_file/invaild_yaml
check:rc==0
cmd:cat /tmp/xcat_inventory_import_option_f_invalid_file/invaild_yaml
check:rc==0
@ -157,7 +155,7 @@ end
start:xcat_inventory_import_option_t_invalid_type
description:This case is used to test xcat-inventory import subcommand to handle invalid type for option t
label:others,xcat_inventory
label:others,inventory_ci
cmd:xcat-inventory import -t aaa
check:output=~Invalid object type
check:output!~Traceback (most recent call last):
@ -167,11 +165,11 @@ end
start:xcat_inventory_import_miss_option
description:This case is used to test xcat-inventory import subcommand to handle missing -t or -o option
label:others,xcat_inventory
label:others,inventory_ci
cmd:mkdir -p /tmp/export_import_nodes_delimited_with_comma_by_json
check:rc==0
cmd:#!/usr/bin/bash
echo "{
echo '{
"node": {
"test": {
"device_type": "server",
@ -182,7 +180,7 @@ echo "{
"role": "compute"
}
}
}" > /tmp/export_import_nodes_delimited_with_comma_by_json/aaa
}' > /tmp/export_import_nodes_delimited_with_comma_by_json/aaa
cmd:xcat-inventory import -f /tmp/export_import_nodes_delimited_with_comma_by_json/aaa -o aaa
check:output=~Missing object type for object
check:rc!=0

View File

@ -1,6 +1,6 @@
start:export_import_credential
description:This case is used to test xcat-inventory support credential export and import.
label:others,xcat_inventory
label:others,inventory_ci
cmd:dir="/tmp/credential";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir
cmd:dir="/tmp/backup";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir
cmd:cp -rf /etc/xcat/ca/ca-cert.pem /etc/xcat/ca/private/ca-key.pem /etc/xcat/cert/server-cred.pem /root/.xcat/client-key.pem /tmp/backup

View File

@ -1,6 +1,6 @@
start:xcat_inventory_diff_h
description:This case is used to test xcat-inventory diff usage information
label:others,xcat_inventory
label:others,inventory_ci
cmd:xcat-inventory diff -h
check:output=~usage: xcat-inventory diff
check:rc==0
@ -11,7 +11,7 @@ end
start:xcat_inventory_diff_without_option
description:This case is used to test xcat-inventory diff without option, should be error
label:others,xcat_inventory
label:others,inventory_ci
cmd:xcat-inventory diff
check:output=~Error: No valid source type!
check:rc!=0
@ -19,31 +19,31 @@ end
start:xcat_inventory_diff_files_all
description:This case is used to test xcat-inventory diff files all, should be error
label:others,xcat_inventory
cmd:xcat-inventory diff --files /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json --all
label:others,inventory_ci
cmd:xcat-inventory diff --files /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file1.json /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json --all
check:output=~Error: '--all' must be used with '--source'!
check:rc!=0
end
start:xcat_inventory_diff_source_filename
description:This case is used to test xcat-inventory diff source filename, should be error
label:others,xcat_inventory
cmd:xcat-inventory diff --source /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json --filename test_filename
label:others,inventory_ci
cmd:xcat-inventory diff --source /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file1.json --filename test_filename
check:output=~Error: '--filename' must be used with '--files'!
check:rc!=0
end
start:xcat_inventory_diff_files_source
description:This case is used to test xcat-inventory diff files source, should be error
label:others,xcat_inventory
cmd:xcat-inventory diff --files /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json --source /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json
label:others,inventory_ci
cmd:xcat-inventory diff --files /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file1.json /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json --source /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json
check:output=~Error: '--files' and '--source' cannot be used together!
check:rc!=0
end
start:xcat_inventory_diff_filename
description:This case is used to test xcat-inventory diff filename, should be error
label:others,xcat_inventory
label:others,inventory_ci
cmd:xcat-inventory diff --filename test_filename
check:output=~Error: No valid source type!
check:rc!=0
@ -51,21 +51,21 @@ end
start:xcat_inventory_diff_no_exist_file
description:This case is used to test xcat-inventory diff files, if the given file not exist, show error message
label:others,xcat_inventory
cmd:xcat-inventory diff --files /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/noexist.file /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json
check:output=~Error: File '/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/noexist.file' does not exist, please check...
label:others,inventory_ci
cmd:xcat-inventory diff --files /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/noexist.file /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json
check:output=~Error: File '/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/noexist.file' does not exist, please check...
check:rc!=0
cmd:xcat-inventory diff --source /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/noexist.file
check:output=~Error: File '/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/noexist.file' does not exist, please check...
cmd:xcat-inventory diff --source /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/noexist.file
check:output=~Error: File '/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/noexist.file' does not exist, please check...
check:rc!=0
end
start:xcat_inventory_diff_files
description:This case is used to test xcat-inventory diff files
label:others,xcat_inventory
cmd:xcat-inventory diff --files /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json > /tmp/xcat_inventory_diff_files.result
label:others,inventory_ci
cmd:xcat-inventory diff --files /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file1.json /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json > /tmp/xcat_inventory_diff_files.result
check:rc==0
cmd:sh /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/change_name.sh /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json /tmp/tmp_diff.result
cmd:sh /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/change_name.sh /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file1.json /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json /tmp/tmp_diff.result
check:rc==0
cmd:diff /tmp/xcat_inventory_diff_files.result /tmp/tmp_diff.result
check:output=
@ -74,10 +74,10 @@ end
start:xcat_inventory_diff_files_filename
description:This case is used to test xcat-inventory diff files filename
label:others,xcat_inventory
cmd:xcat-inventory diff --files /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json --filename xcat_inventory_diff_files_filename.test > /tmp/xcat_inventory_diff_files_filename.result
label:others,inventory_ci
cmd:xcat-inventory diff --files /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file1.json /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json --filename xcat_inventory_diff_files_filename.test > /tmp/xcat_inventory_diff_files_filename.result
check:rc==0
cmd:sh /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/change_name.sh xcat_inventory_diff_files_filename.test xcat_inventory_diff_files_filename.test /tmp/tmp_diff.result
cmd:sh /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/change_name.sh xcat_inventory_diff_files_filename.test xcat_inventory_diff_files_filename.test /tmp/tmp_diff.result
check:rc==0
cmd:diff /tmp/xcat_inventory_diff_files_filename.result /tmp/tmp_diff.result
check:output=
@ -86,15 +86,15 @@ end
start:xcat_inventory_diff_source
description:This case is used to test xcat-inventory diff source
label:others,xcat_inventory
label:others,inventory_ci
cmd:rm -rf /tmp/xcat-inventory_diff_case.json
cmd:xcat-inventory export --format json -f /tmp/xcat-inventory_diff_case.json
check:rc==0
cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file1.json
cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file1.json
check:rc==0
cmd:xcat-inventory diff --source /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json > /tmp/xcat_inventory_diff_source.result
cmd:xcat-inventory diff --source /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json > /tmp/xcat_inventory_diff_source.result
check:rc==0
cmd:diff /tmp/xcat_inventory_diff_source.result /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/diff_source.result
cmd:diff /tmp/xcat_inventory_diff_source.result /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/diff_source.result
check:output=
check:rc==0
cmd:xcat-inventory import -c -f /tmp/xcat-inventory_diff_case.json

View File

@ -1,7 +1,7 @@
start:import_osimage_with_environments_in_yaml
description:this case is to verify if osimage import could support environment variables.
os:Linux
label:others,xcat_inventory,invoke_provision
label:others,inventory_ci,invoke_provision
cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
check:rc==0
@ -21,13 +21,13 @@ 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
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
cmd:lsdef -t osimage -o test.environments.osimage
@ -86,52 +86,52 @@ end
start:export_osimage_with_environments
description:this case is to verify if osimage export could support environment variables.
os:Linux
label:others,xcat_inventory
label:others,inventory_ci
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
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
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
check:rc==0
check:output=~The inventory data has been dumped to /tmp/export/test.environments.osimage.yaml
cmd:#! /bin/bash diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml /tmp/export/test.environments.osimage.yaml --ignore-blank-lines -I "^#" -I "schema_version"
cmd:#! /bin/bash diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.yaml /tmp/export/test.environments.osimage.yaml --ignore-blank-lines -I "^#" -I "schema_version"
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
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
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
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
check:rc==0
cmd:#! /bin/bash 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 "^#" -I "schema_version"
cmd:#! /bin/bash 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 "^#" -I "schema_version"
check:rc==0
cmd:dir="/tmp/export"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi
cmd: rmdef -t osimage -o test.environments.osimage

View File

@ -5,7 +5,7 @@ cmd:dir="/tmp/imagedata/";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mk
check:rc==0
cmd:dir="/tmp/imagedata/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir
check:rc==0
cmd:cp -rf /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage /tmp/imagedata
cmd:cp -rf /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage /tmp/imagedata
check:rc==0
cmd:lsdef -t osimage -o test_osimage >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o test_osimage -z >/tmp/imagedata/test_osimage.org.stanza ;rmdef -t osimage -o test_osimage;fi
check:rc==0

View File

@ -1,48 +1,48 @@
start:xcat_inventory_import_validation_network
description:This case is used to test network validation function of xcat-inventory import yaml and json file. To test "net" "mask" "dynamicrange" and "staticrange" attributes
label:others,xcat_inventory
label:others,inventory_ci
cmd:lsdef -t network -o autotestnet > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t network -o autotestnet -z >/tmp/xcat_inventory_import_validation_network_bak/autotestnet.stanza ;rmdef -t network -o autotestnet;fi
check:rc==0
cmd:mkdir -p /tmp/xcat_inventory_import_validation_network_bak
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "basic_attr.net" "200.0.0.0" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "basic_attr.net" "200.0.0.0" "/tmp/xcat_inventory_import_validation_network"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "basic_attr.net" "234abc" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "basic_attr.net" "234abc" "/tmp/xcat_inventory_import_validation_network"
check:rc!=0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "basic_attr.net" "" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "basic_attr.net" "" "/tmp/xcat_inventory_import_validation_network"
check:rc!=0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "basic_attr.net" "234.abc.456.789" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "basic_attr.net" "234.abc.456.789" "/tmp/xcat_inventory_import_validation_network"
check:rc!=0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "basic_attr.mask" "234.abc.456.789" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "basic_attr.mask" "234.abc.456.789" "/tmp/xcat_inventory_import_validation_network"
check:rc!=0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "basic_attr.mask" "" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "basic_attr.mask" "" "/tmp/xcat_inventory_import_validation_network"
check:rc!=0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "basic_attr.mask" "234.0.0.0" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "basic_attr.mask" "234.0.0.0" "/tmp/xcat_inventory_import_validation_network"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "pool.dynamicrange" "200.0.0.100-200.0.0.200" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "pool.dynamicrange" "200.0.0.100-200.0.0.200" "/tmp/xcat_inventory_import_validation_network"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "pool.dynamicrange" "200.0.0.100" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "pool.dynamicrange" "200.0.0.100" "/tmp/xcat_inventory_import_validation_network"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "pool.dynamicrange" "abc-bcd" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "pool.dynamicrange" "abc-bcd" "/tmp/xcat_inventory_import_validation_network"
check:rc!=0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "pool.staticrange" "200.0.0.100-200.0.0.200" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "pool.staticrange" "200.0.0.100-200.0.0.200" "/tmp/xcat_inventory_import_validation_network"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "pool.staticrange" "200.0.0.100" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "pool.staticrange" "200.0.0.100" "/tmp/xcat_inventory_import_validation_network"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "network" "autotestnet" "pool.staticrange" "abc-bcd" "/tmp/xcat_inventory_import_validation_network"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "network" "autotestnet" "pool.staticrange" "abc-bcd" "/tmp/xcat_inventory_import_validation_network"
check:rc!=0
cmd:if [[ -e /tmp/xcat_inventory_import_validation_network_bak/autotestnet.stanza ]]; then cat /tmp/xcat_inventory_import_validation_network_bak/autotestnet.stanza | mkdef -z; fi

View File

@ -1,19 +1,19 @@
start:export_import_nics_with_regex
description:This case is used to test xcat-inventory export and import could support regex for xcat attributes.
label:others,xcat_inventory
label:others,inventory_ci
cmd:dir="/tmp/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir
cmd:tabdump nics |tee /tmp/export/nics.cvs
check:rc==0
cmd:tabrestore /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/nics.csv
cmd:tabrestore /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/nics.csv
check:rc==0
cmd:xcat-inventory export -t node -o testnodes -f /tmp/export/nics.yaml --format yaml
check:rc==0
check:output=~The inventory data has been dumped to /tmp/export/nics.yaml
cmd:#! /bin/bash diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/nics.yaml /tmp/export/nics.yaml --ignore-blank-lines -I "^#" -I "schema_version"
cmd:#! /bin/bash diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/nics.yaml /tmp/export/nics.yaml --ignore-blank-lines -I "^#" -I "schema_version"
check:rc==0
cmd:xcat-inventory export -t node -o testnodes -f /tmp/export/nics.json --format json
check:rc==0
cmd:#! /bin/bash diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/nics.json /tmp/export/nics.json --ignore-blank-lines -I "^#" -I "schema_version"
cmd:#! /bin/bash diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/nics.json /tmp/export/nics.json --ignore-blank-lines -I "^#" -I "schema_version"
check:rc==0
cmd:tabch -d node="testnodes" nics
check:rc==0
@ -24,7 +24,7 @@ check:output=~start to import "node" type objects
check:output=~ preprocessing "node" type objects
check:output=~ writting "node" type objects
check:output=~Inventory import successfully!
cmd:tabdump nics |tee /tmp/export/nics.yaml.cvs;diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/nics.csv /tmp/export/nics.yaml.cvs
cmd:tabdump nics |tee /tmp/export/nics.yaml.cvs;diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/nics.csv /tmp/export/nics.yaml.cvs
check:rc==0
cmd:tabch -d node="testnodes" nics
check:rc==0
@ -35,7 +35,7 @@ check:output=~start to import "node" type objects
check:output=~ preprocessing "node" type objects
check:output=~ writting "node" type objects
check:output=~Inventory import successfully!
cmd:tabdump nics |tee /tmp/export/nics.json.cvs;diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/nics.csv /tmp/export/nics.json.cvs
cmd:tabdump nics |tee /tmp/export/nics.json.cvs;diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/nics.csv /tmp/export/nics.json.cvs
check:rc==0
cmd:tabch -d node="testnodes" nics
check:rc==0

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
start:export_import_single_osimage_by_yaml
description:This case is used to test xcat-inventory export and import one linux osimage definition by yaml between 2 exact same MNs. Before running this case, make sure these two MNs have been installed same exactly, and the current MN can connect the other MN by ssh without password. This case also can be run in one MN, this is, export from currnet node then import back to currnet node, in this case, just need to set $$DSTMN=<currnet node ip>
Attribute: $$DSTMN - the ip of MN which is used to run import operation.
label:others,xcat_inventory
label:others,inventory_ci
cmd:mkdir -p /tmp/export_import_single_osimage_by_yaml
check:rc==0
cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_osimage_by_yaml_$$DSTMN/'
@ -45,7 +45,7 @@ end
start:export_import_single_osimage_by_json
description:This case is used to test xcat-inventory export and import one linux osimage definition by json between 2 exact same MNs. Before running this case, make sure these two MNs have been installed same exactly, and the current MN can connect the other MN by ssh without password. This case also can be run in one MN, this is, export from currnet node then import back to currnet node, in this case, just need to set $$DSTMN=<currnet node ip>
Attribute: $$DSTMN - the ip of MN which is used to run import operation.
label:others,xcat_inventory
label:others,inventory_ci
cmd:mkdir -p /tmp/export_import_single_osimage_by_json
check:rc==0
cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_osimage_by_json_$$DSTMN/'
@ -89,7 +89,7 @@ end
start:xcat_inventory_try_to_export_all_type_is_osimage_default_format
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory export all definition which type is osimage by default format, i.e. json format.
cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format
check:rc==0
@ -130,7 +130,7 @@ check:rc==0
end
start:xcat_inventory_try_to_export_all_type_is_osimage_json_format
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory export all definition which type is osimage by json format.
cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format
check:rc==0
@ -171,7 +171,7 @@ check:rc==0
end
start:xcat_inventory_try_to_export_all_type_is_osimage_yaml_format
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory export all definition which type is osimage by yaml format.
cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format
check:rc==0
@ -213,7 +213,7 @@ end
start:xcat_inventory_try_to_import_all_type_is_osimage_yaml_format
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory import all definition which type is osimage from a yaml file.
cmd:mkdir -p /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format
check:rc==0
@ -476,7 +476,7 @@ check:rc==0
end
start:xcat_inventory_try_to_import_all_type_is_osimage_json_format
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory import all definition which type is osimage from a json file.
cmd:mkdir -p /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format
check:rc==0
@ -809,7 +809,7 @@ end
start:export_single_osimage_then_modify_json_then_import
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory import a osimage , then modify the export json file, then import the json file
cmd:mkdir -p /tmp/export_single_osimage_then_modify_json_then_import
check:rc==0
@ -866,7 +866,7 @@ check:rc==0
end
start:export_single_osimage_then_modify_yaml_then_import
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory import a osimage , then modify the export yaml file, then import the yaml file
cmd:mkdir -p /tmp/export_single_osimage_then_modify_yaml_then_import
check:rc==0
@ -924,7 +924,7 @@ end
start:export_import_single_osimage_by_dir
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory export and import one linux osimage definition by files.
cmd:if [ -e /tmp/otherpkglist ]; then cp -f /tmp/otherpkglist /tmp/otherpkglist.bak; fi
cmd:echo "test" >> /tmp/otherpkglist
@ -1266,7 +1266,6 @@ end
start:export_import_osimages_by_dir_with_c
label:others,xcat_inventory
description:This case is used to test xcat-inventory export and import linux osimage definition witch -c option.
label:others,xcat_inventory
cmd:dir="/tmp/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir
cmd:imgdir='/tmp/export';for img in $(lsdef -t osimage -s|awk -F' ' '{print $1}'); do lsdef -t osimage -o $img -z > $imgdir/${img}.stanza;done
check:rc==0

View File

@ -13,16 +13,16 @@ check:rc!=0
cmd:dir="/tmp/test_myimage";if [ -d "${dir}" ];then mv ${dir} ${dir}".old"; fi
#import test_myimage
cmd: xcat-inventory import -d /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage
cmd: xcat-inventory import -d /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage
check:rc==0
#check whether the osimage definition is created
cmd: lsdef -t osimage -o test_myimage -z |tee /tmp/export_import_an_osimage_directory/test_myimage.stanza
check:rc==0
cmd: diff /tmp/export_import_an_osimage_directory/test_myimage.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza -I "environvar"
cmd: diff /tmp/export_import_an_osimage_directory/test_myimage.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza -I "environvar"
check: rc==0
#check whether the customized osimage files are imported
cmd: diff -r /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/ /tmp/test_myimage/
cmd: diff -r /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/ /tmp/test_myimage/
check:rc==0
#cleanup
@ -39,7 +39,7 @@ end
start:export_import_multiple_osimages_from_osimage_directory
description: import multiple osimage diretories with `xcat-inventroy import -d <osimage directory>`
label:others,xcat_inventory
label:others,inventory_ci
#backup any existing test_myimage,test_myimage2
cmd:mkdir -p /tmp/export_import_multiple_osimages_from_osimage_directory/backup
check:rc==0
@ -56,7 +56,7 @@ cmd:dir="/tmp/test_myimage";if [ -d "${dir}" ];then mv ${dir} ${dir}".old"; fi
cmd:dir="/tmp/test_myimage2";if [ -d "${dir}" ];then mv ${dir} ${dir}".old"; fi
#import osimages
cmd: xcat-inventory import -d /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/
cmd: xcat-inventory import -d /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/
check:rc==0
#check whether the osimage definition is created
@ -64,14 +64,14 @@ cmd: lsdef -t osimage -o test_myimage -z | tee /tmp/export_import_multiple_osima
check:rc==0
cmd: lsdef -t osimage -o test_myimage2 -z | tee /tmp/export_import_multiple_osimages_from_osimage_directory/test_myimage2.stanza
check:rc==0
cmd: diff /tmp/export_import_multiple_osimages_from_osimage_directory/test_myimage.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza -I "environvar"
cmd: diff /tmp/export_import_multiple_osimages_from_osimage_directory/test_myimage.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza -I "environvar"
check: rc==0
cmd: diff /tmp/export_import_multiple_osimages_from_osimage_directory/test_myimage2.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza -I "environvar"
cmd: diff /tmp/export_import_multiple_osimages_from_osimage_directory/test_myimage2.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza -I "environvar"
check: rc==0
#check whether the customized osimage files are imported
cmd: diff -r /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/ /tmp/test_myimage/
cmd: diff -r /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/ /tmp/test_myimage/
check:rc==0
cmd: diff -r /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/ /tmp/test_myimage2/
cmd: diff -r /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/ /tmp/test_myimage2/
check:rc==0
#cleanup
@ -93,7 +93,7 @@ end
start:export_import_specified_from_osimage_directory
description: import specified osimage from osimage diretory with `xcat-inventroy import -d <osimage directory> -t osimage -o`
label:others,xcat_inventory
label:others,inventory_ci
#backup any existing test_myimage
cmd:mkdir -p /tmp/export_import_specified_from_osimage_directory/backup
check:rc==0
@ -106,16 +106,16 @@ check:rc!=0
cmd:dir="/tmp/test_myimage";if [ -d "${dir}" ];then mv ${dir} ${dir}".old"; fi
#import test_myimage
cmd: xcat-inventory import -d /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/ -t osimage -o test_myimage
cmd: xcat-inventory import -d /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/ -t osimage -o test_myimage
check:rc==0
#check whether the osimage definition is created
cmd: lsdef -t osimage -o test_myimage -z |tee /tmp/export_import_specified_from_osimage_directory/test_myimage.stanza
check:rc==0
cmd: diff /tmp/export_import_specified_from_osimage_directory/test_myimage.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza -I "environvar"
cmd: diff /tmp/export_import_specified_from_osimage_directory/test_myimage.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza -I "environvar"
check: rc==0
#check whether the customized osimage files are imported
cmd: diff -r /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/ /tmp/test_myimage/
cmd: diff -r /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/ /tmp/test_myimage/
check:rc==0
#cleanup

View File

@ -1,50 +1,50 @@
start: xcat_inventory_import_validation_osimage
description: verify the validation mechanisom while importing osimage object
label:others,xcat_inventory
label:others,inventory_ci
cmd: rm -rf /tmp/xcat_inventory_import_validation_osimage
cmd: mkdir -p /tmp/xcat_inventory_import_validation_osimage
cmd: mkdir -p /tmp/xcat_inventory_import_validation_osimage/trash/
cmd: mkdir -p /tmp/xcat_inventory_import_validation_osimage/backup/
cmd: lsdef -t osimage -o testosimage1 -z 2>/dev/null >/tmp/xcat_inventory_import_validation_osimage/backup/testosimage1.stanza
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "role" "compute" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "role" "compute" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "role" "service" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "role" "service" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "role" "invalid" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "role" "invalid" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "role" "" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "role" "" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "imagetype" "windows" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "imagetype" "windows" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "imagetype" "linux" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "imagetype" "linux" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "imagetype" "invalid" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "imagetype" "invalid" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "imagetype" "" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "imagetype" "" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "provision_mode" "statelite" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "provision_mode" "statelite" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "provision_mode" "install" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "provision_mode" "install" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "provision_mode" "netboot" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "provision_mode" "netboot" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "provision_mode" "invalid" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "provision_mode" "invalid" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "provision_mode" "" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "provision_mode" "" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "genimgoptions.rootfstype" "nfs" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "genimgoptions.rootfstype" "nfs" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "genimgoptions.rootfstype" "ramdisk" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "genimgoptions.rootfstype" "ramdisk" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "genimgoptions.rootfstype" "invalid" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "genimgoptions.rootfstype" "invalid" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "osimage" "testosimage1" "genimgoptions.rootfstype" "" "/tmp/xcat_inventory_import_validation_osimage/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "osimage" "testosimage1" "genimgoptions.rootfstype" "" "/tmp/xcat_inventory_import_validation_osimage/trash/"
check: rc==0
cmd: cat /tmp/xcat_inventory_import_validation_osimage/backup/testosimage1.stanza 2>/dev/null |mkdef -z -f

View File

@ -1,27 +1,27 @@
start:xcat_inventory_import_validation_passwd
description:This case is used to test passwd validation function of xcat-inventory import yaml and json file. To test "cryptmethod" attribute
label:others,xcat_inventory
label:others,inventory_ci
cmd:tabdump -w 'key==autotest' passwd |grep autotest > /dev/null 2>&1;if [[ $? -eq 0 ]]; then xcat-inventory export -t passwd -o autotest >/tmp/xcat_inventory_import_validation_passwd_bak/autotest ;tabch -d 'key==autotest' passwd;fi
check:rc==0
cmd:mkdir -p /tmp/xcat_inventory_import_validation_passwd_bak
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "passwd" "autotest" "cryptmethod" "" "/tmp/xcat_inventory_import_validation_passwd"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "passwd" "autotest" "cryptmethod" "" "/tmp/xcat_inventory_import_validation_passwd"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "passwd" "autotest" "cryptmethod" "md5" "/tmp/xcat_inventory_import_validation_passwd"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "passwd" "autotest" "cryptmethod" "md5" "/tmp/xcat_inventory_import_validation_passwd"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "passwd" "autotest" "cryptmethod" "sha256" "/tmp/xcat_inventory_import_validation_passwd"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "passwd" "autotest" "cryptmethod" "sha256" "/tmp/xcat_inventory_import_validation_passwd"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "passwd" "autotest" "cryptmethod" "sha512" "/tmp/xcat_inventory_import_validation_passwd"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "passwd" "autotest" "cryptmethod" "sha512" "/tmp/xcat_inventory_import_validation_passwd"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "passwd" "autotest" "cryptmethod" "a.a" "/tmp/xcat_inventory_import_validation_passwd"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "passwd" "autotest" "cryptmethod" "a.a" "/tmp/xcat_inventory_import_validation_passwd"
check:rc!=0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "passwd" "autotest" "cryptmethod" "MD5" "/tmp/xcat_inventory_import_validation_passwd"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "passwd" "autotest" "cryptmethod" "MD5" "/tmp/xcat_inventory_import_validation_passwd"
check:rc!=0
cmd:if [[ -e /tmp/xcat_inventory_import_validation_passwd_bak/autotest ]]; then xcat-inventory import -f /tmp/xcat_inventory_import_validation_passwd_bak/autotest; fi

View File

@ -1,24 +1,24 @@
start:xcat_inventory_import_validation_route
description:This case is used to test route validation function of xcat-inventory import yaml and json file. To test "net" and "mask" attributes
label:others,xcat_inventory
label:others,inventory_ci
cmd:mkdir -p /tmp/xcat_inventory_import_validation_route_bak
check:rc==0
cmd:lsdef -t route -o autotestnet > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t route -o autotestnet -z >/tmp/xcat_inventory_import_validation_route_bak/autotestnet.stanza ;rmdef -t route -o autotestnet;fi
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "route" "autotestnet" "net" "200.0.0.0" "/tmp/xcat_inventory_import_validation_route"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "route" "autotestnet" "net" "200.0.0.0" "/tmp/xcat_inventory_import_validation_route"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "route" "autotestnet" "net" "200.0" "/tmp/xcat_inventory_import_validation_route"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "route" "autotestnet" "net" "200.0" "/tmp/xcat_inventory_import_validation_route"
check:rc!=0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "route" "autotestnet" "net" "" "/tmp/xcat_inventory_import_validation_route"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "route" "autotestnet" "net" "" "/tmp/xcat_inventory_import_validation_route"
check:rc!=0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "route" "autotestnet" "net" "default" "/tmp/xcat_inventory_import_validation_route"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "route" "autotestnet" "net" "default" "/tmp/xcat_inventory_import_validation_route"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "route" "autotestnet" "net" "abc.345.123.202" "/tmp/xcat_inventory_import_validation_route"
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "route" "autotestnet" "net" "abc.345.123.202" "/tmp/xcat_inventory_import_validation_route"
check:rc!=0
cmd:if [[ -e /tmp/xcat_inventory_import_validation_route_bak/autotestnet.stanza ]]; then cat /tmp/xcat_inventory_import_validation_route_bak/autotestnet.stanza | mkdef -z;fi

View File

@ -1,7 +1,7 @@
start:export_import_site_by_yaml
description:This case is used to test xcat-inventory export and import site table by yaml between 2 excat same MNs. Before running this case, make sure these two MNs have been installed same excatly, and the current MN can connect the other MN by ssh without password.This case also can be run in one MN, this is, export from currnet node then import back to currnet node, in this case, just need to set $$DSTMN=<currnet node ip>
Attribute: $$DSTMN - the ip of MN which is used to run import operation.
label:others,xcat_inventory
label:others,inventory_ci
cmd:mkdir -p /tmp/export_import_site_by_yaml
check:rc==0
cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_site_by_yaml_$$DSTMN/'
@ -48,7 +48,7 @@ end
start:export_import_site_by_json
description:This case is used to test xcat-inventory export and import site table by json between 2 excat same MNs. Before running this case, make sure these two MNs have been installed same excatly, and the current MN can connect the other MN by ssh without password.This case also can be run in one MN, this is, export from currnet node then import back to currnet node, in this case, just need to set $$DSTMN=<currnet node ip>
Attribute: $$DSTMN - the ip of MN which is used to run import operation.
label:others,xcat_inventory
label:others,inventory_ci
cmd:mkdir -p /tmp/export_import_site_by_json
check:rc==0
cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_site_by_json_$$DSTMN/'
@ -208,7 +208,7 @@ check:rc==0
end
start:xcat_inventory_try_to_export_all_type_is_site_json_format
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory export all definition which type is site to default file. I.e. json file
cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format
check:rc==0
@ -325,7 +325,7 @@ check:rc==0
end
start:xcat_inventory_try_to_export_all_type_is_site_yaml_format
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory export all definition which type is site to default file. I.e. json file
cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format
check:rc==0
@ -439,7 +439,7 @@ end
start:xcat_inventory_try_to_import_all_type_is_site_json_format
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory impport all definition which type is site from json file.
cmd:mkdir -p /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format
check:rc==0
@ -449,8 +449,7 @@ cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; the
check:rc==0
cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z >> /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/bogusnode.stanza;rmdef -t group bogusgroup; fi
check:rc==0
cmd:#!/usr/bin/bash
echo '{
cmd:echo '{
"network": {
"100_0_0_0-255_0_0_0": {
"basic_attr": {
@ -747,8 +746,7 @@ echo '{
}
}' > /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/json.test
check:rc==0
cmd:#!/bin/bash
echo "Object name: clustersite
cmd:echo "Object name: clustersite
FQDNfirst=1
SNsyncfiledir=/var/xcat/syncfiles
auditnosyslog=0
@ -870,7 +868,7 @@ check:rc==0
end
start:xcat_inventory_try_to_import_all_type_is_site_yaml_format
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory impport all definition which type is site from json file.
cmd:mkdir -p /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format
check:rc==0
@ -880,8 +878,7 @@ cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; the
check:rc==0
cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z >> /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/bogusnode.stanza;rmdef -t group bogusgroup; fi
check:rc==0
cmd:#!/usr/bin/bash
echo "network:
cmd:echo "network:
100_0_0_0-255_0_0_0:
basic_attr:
gateway: 100.0.0.103
@ -1114,8 +1111,7 @@ site:
xcatsslciphers: 3DES
xcatsslversion: TLSv1" > /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/yaml.test
check:rc==0
cmd:#!/bin/bash
echo "Object name: clustersite
cmd:echo "Object name: clustersite
FQDNfirst=1
SNsyncfiledir=/var/xcat/syncfiles
auditnosyslog=0
@ -1213,7 +1209,7 @@ check:rc==0
cmd:lsdef -t site -o clustersite > /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/site.import
check:rc==0
cmd:#!/bin/bash
diff -y --ignore-blank-lines --ignore-matching-lines="^#" /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/site.org /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/site.import
diff -y --ignore-blank-lines --ignore-matching-lines="^#" /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/site.org /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/site.import
check:rc==0
cmd:lsdef bogusgroup1
check:output=~Error: (\[.*?\]: )?Could not find an object
@ -1240,7 +1236,7 @@ end
start:export_site_table_then_modify_yaml_then_import
This case is used to test xcat-inventory import a site , then modify the export yaml file, then import the yaml file
Attribute: $$DSTMN - the ip of MN which is used to run import operation.
label:others,xcat_inventory
label:others,inventory_ci
cmd:mkdir -p /tmp/export_site_table_then_modify_yaml_then_import
check:rc==0
cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/'
@ -1304,7 +1300,7 @@ end
start:export_site_table_then_modify_json_then_import
This case is used to test xcat-inventory import a site , then modify the export json file, then import the json file
Attribute: $$DSTMN - the ip of MN which is used to run import operation.
label:others,xcat_inventory
label:others,inventory_ci
cmd:mkdir -p /tmp/export_site_table_then_modify_json_then_import
check:rc==0
cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/'

View File

@ -1,124 +1,124 @@
start: xcat_inventory_import_validation_site
description: verify the validation mechanisom while importing site object
label:others,xcat_inventory
label:others,inventory_ci
cmd: rm -rf /tmp/xcat_inventory_import_validation_site
cmd: mkdir -p /tmp/xcat_inventory_import_validation_site
cmd: mkdir -p /tmp/xcat_inventory_import_validation_site/trash/
cmd: mkdir -p /tmp/xcat_inventory_import_validation_site/backup/
cmd: lsdef -t site -o clustersite -z 2>/dev/null >/tmp/xcat_inventory_import_validation_site/backup/clustersite.stanza
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "dbtracelevel" "0" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "dbtracelevel" "0" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "dbtracelevel" "1" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "dbtracelevel" "1" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "dbtracelevel" "2" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "dbtracelevel" "2" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "dbtracelevel" "3" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "dbtracelevel" "3" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "dbtracelevel" "4" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "dbtracelevel" "4" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "dbtracelevel" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "dbtracelevel" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "dbtracelevel" "" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "dbtracelevel" "" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "dhcplease" "" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "dhcplease" "" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "dhcplease" "10240" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "dhcplease" "10240" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "dhcplease" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "dhcplease" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "disjointdhcps" "0" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "disjointdhcps" "0" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "disjointdhcps" "1" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "disjointdhcps" "1" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "disjointdhcps" "" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "disjointdhcps" "" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "disjointdhcps" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "disjointdhcps" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "httpport" "" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "httpport" "" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "httpport" "80" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "httpport" "80" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "httpport" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "httpport" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "managedaddressmode" "" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "managedaddressmode" "" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "managedaddressmode" "static" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "managedaddressmode" "static" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "managedaddressmode" "dhcp" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "managedaddressmode" "dhcp" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "managedaddressmode" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "managedaddressmode" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "sharedinstall" "" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "sharedinstall" "" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "sharedinstall" "no" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "sharedinstall" "no" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "sharedinstall" "sns" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "sharedinstall" "sns" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "sharedinstall" "all" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "sharedinstall" "all" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "sharedinstall" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "sharedinstall" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "sshbetweennodes" "" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "sshbetweennodes" "" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "sshbetweennodes" "ALLGROUPS" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "sshbetweennodes" "ALLGROUPS" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "sshbetweennodes" "NOGROUPS" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "sshbetweennodes" "NOGROUPS" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "sshbetweennodes" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "sshbetweennodes" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatdebugmode" "" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatdebugmode" "" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatdebugmode" "0" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatdebugmode" "0" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatdebugmode" "1" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatdebugmode" "1" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatdebugmode" "2" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatdebugmode" "2" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatdebugmode" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatdebugmode" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatdport" "" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatdport" "" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatdport" "3001" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatdport" "3001" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatdport" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatdport" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatdport" "3002" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatdport" "3002" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatiport" "" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatiport" "" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatiport" "3001" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatiport" "3001" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatiport" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatiport" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatiport" "3002" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatiport" "3002" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatlport" "" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatlport" "" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatlport" "3001" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatlport" "3001" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatlport" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatlport" "invalid" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc!=0
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "site" "clustersite" "xcatlport" "3003" "/tmp/xcat_inventory_import_validation_site/trash/"
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "site" "clustersite" "xcatlport" "3003" "/tmp/xcat_inventory_import_validation_site/trash/"
check: rc==0
cmd: cat /tmp/xcat_inventory_import_validation_site/backup/clustersite.stanza 2>/dev/null |mkdef -z -f

View File

@ -4,8 +4,8 @@ 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 /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 $?"

View File

@ -3,7 +3,7 @@
--- xCAT DB
+++ /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json
+++ /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json
{
"node": {
"node1": {

View File

@ -4,8 +4,8 @@ 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 /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 $?"

View File

@ -3,7 +3,7 @@
--- xCAT DB
+++ /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/diff/xcat-inventory_diff_file2.json
+++ /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json
{
"node": {
"node1": {

View File

@ -145,7 +145,7 @@
"template": "/opt/xcat/share/xcat/install/rh/compute.rhels7.tmpl"
},
},
"schema_version": "latest",
"schema_version": "2.0",
"site": {
"clustersite": {
"SNsyncfiledir": "/var/xcat/syncfiles",

View File

@ -128,7 +128,7 @@
"template": "/opt/xcat/share/xcat/install/rh/compute.rhels7.tmpl"
},
},
"schema_version": "latest",
"schema_version": "2.0",
"site": {
"clustersite": {
"SNsyncfiledir": "/var/xcat/syncfiles",

View File

@ -2,20 +2,20 @@
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
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=OSARCH
osdistroname=OSVERS-OSARCH
osname=Linux
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,
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=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
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
synclists=/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/gitrepo/syncfiles/synclist
usercomment=OSMAJOR,test_environment_variables

View File

@ -1,2 +1,2 @@
#Test file for template
#INCLUDE: /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file7#
#INCLUDE: /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file7#