Test Design of xcat inventory osimage - xcat2/xcat-core GitHub Wiki
This document provides an overview of test of xcat inventory osimage. This test plan is intended for the use of xCAT FVT team.
The test is against xCAT version 2.14.1. The build of xCAT will be picked up from the xcat.org
The xcat inventory osimage design is under https://github.com/xcat2/xcat-core/wiki/the-mini-design-of-xcat-inventory-export-and-import-for-osimage
Test steps:
- Define a customized osimage defintion.
- Run "xcat-inventory export -t osimage -o rhels7.4sp1-x86_64-netboot-compute --format yaml --path //opt/inventory/site/osimage/"
- Check if the yaml file and the files directory tree is created.
[root@c910f03c05k21 osimage]# xcat-inventory export -t osimage -o rhels7.4sp1-x86_64-netboot-compute --format yaml --path //opt/inventory/site/osimage/
[root@c910f03c05k21 osimage]# cat /opt/inventory/site/osimage/rhels7.4sp1-x86_64-netboot-compute/definition.yaml
osimage:
rhels7.4sp1-x86_64-netboot-compute:
basic_attributes:
arch: x86_64
distribution: rhels7.4sp1
osdistro: rhels7.4sp1-x86_64
genimgoptions:
exlist: /opt/inventory/site/osimage/rhels7.4sp1-x86_64-netboot-compute/compute.rhels7.x86_64.exlist
postinstall: /opt/inventory/site/osimage/rhels7.4sp1-x86_64-netboot-compute/compute.rhels7.x86_64.postinstall
rootimgdir: /install/netboot/rhels7.4sp1/x86_64/compute
imagetype: linux
package_selection:
otherpkgdir: /install/post/otherpkgs/rhels7.4sp1/x86_64
otherpkglist: /opt/inventory/site/osimage/rhels7.4sp1-x86_64-netboot-compute/compute.rhels7.x86_64.otherpkglist
pkgdir: /install/rhels7.4sp1/x86_64
pkglist: /opt/inventory/site/osimage/rhels7.4sp1-x86_64-netboot-compute/compute.rhels7.x86_64.pkglist
provision_mode: netboot
role: compute
scripts:
postbootscripts: config_cuda
postscripts: confignetwork
schema_version: '1.0'
[root@c910f03c05k21 osimage]# tree /opt/inventory/site/osimage/rhels7.4sp1-x86_64-netboot-compute
/opt/inventory/site/osimage/rhels7.4sp1-x86_64-netboot-compute
├── config_cuda
├── confignetwork
├── definition.yaml
└── opt
└── inventory
└── site
└── osimage
└── rhels7.4sp1-x86_64-netboot-compute
├── compute.rhels7.x86_64.exlist
├── compute.rhels7.x86_64.otherpkglist
├── compute.rhels7.x86_64.pkglist
└── compute.rhels7.x86_64.postinstall
5 directories, 7 files
Test steps:
- Define several customized osimage defintions.
- Run "xcat-inventory export -t osimage -o rhels7.4sp1-x86_64-netboot-compute,rhels7.4sp2-x86_64-netboot-compute,rhels7.4sp3-x86_64-netboot-compute --format yaml --path //opt/inventory/site/osimage/"
- Check if the yaml file and the files directory tree is created. Any osimage yaml file and files directories should be same with Test case 1.
Test steps:
- Don't need to define customized osimage, use all osimage definition in xcat database.
- Run "xcat-inventory export -t osimage --format yaml --path //opt/inventory/site/osimage/"
- Check if the yaml file and the files directory tree is created for all osimages in xcat database. Any osimage yaml file and files directories should be same with Test case 1.
Test steps:
- First run Test case 1 to export the osimage
- Run "xcat-inventory import -t osimage -o -f
- Check if the osimage definition is created and all files are placed under correct directories.
Test steps:
- First run Test case 2 to export the osimages
- Run "xcat-inventory import -t osimage -o ,, -f
- Check if the osimages definitions are created and all files are placed under correct directories.
Test steps:
- First run Test case 3 to export the osimages
- Run "xcat-inventory import -t osimage -f
- Check if the osimages definitions are created and all files are placed under correct directories.