diff --git a/.travis.yml b/.travis.yml index 507fd0a77..d8f18824b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ os: linux -dist: trusty +dist: xenial sudo: required before_install: -- sudo apt-get install -y git reprepro devscripts debhelper libsoap-lite-perl libdbi-perl quilt openssh-server dpkg looptools genometools software-properties-common +- sudo apt-get install -y git fakeroot reprepro devscripts debhelper libcapture-tiny-perl libjson-perl libsoap-lite-perl libdbi-perl quilt openssh-server dpkg looptools genometools software-properties-common - perl -v -- echo "yes" | sudo cpan -f -i Capture::Tiny +#- echo "yes" | sudo cpan -f -i Capture::Tiny script: - echo $TRAVIS_BUILD_ID diff --git a/Version b/Version index fbdb3b99a..d7b0d017e 100644 --- a/Version +++ b/Version @@ -1 +1 @@ -2.14.5 +2.14.6 diff --git a/_config.yml b/_config.yml new file mode 100644 index 000000000..c4192631f --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/builddep.sh b/builddep.sh index 2d7b221c1..8f66989c4 100755 --- a/builddep.sh +++ b/builddep.sh @@ -19,6 +19,13 @@ # of the FRS area. # VERBOSE=1 - Set to 1 to see more VERBOSE output +# This script should only be run on RPM based machines +# This test is not foolproof, but at least tries to detect +if [ `/bin/rpm -q -f /bin/rpm >/dev/null 2>&1; echo $?` != 0 ]; then + echo "ERROR: This script should only be executed on a RPM based Operation System." + exit 1 +fi + # you can change this if you need to USER=xcat TARGET_MACHINE=xcat.org @@ -49,6 +56,16 @@ if [ ! -d $GSA ]; then exit 1 fi +REQPKG=("rpm-sign" "createrepo") +for pkg in ${REQPKG[*]}; do + if [ `rpm -q $pkg >> /dev/null; echo $?` != 0 ]; then + echo "ERROR: $pkg is required to successfully create the xcat-deps package. Install and rerun." + exit 1 + else + echo "Checking for package=$pkg ..." + fi +done + # set grep to quiet by default GREP="grep -q" if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ]; then @@ -58,14 +75,10 @@ if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ]; then fi # this is needed only when we are transitioning the yum over to frs -# YUMREPOURL1="http://xcat.org/yum" -# YUMREPOURL2="http://xcat.org/files/yum" if [ "$FRSYUM" != 0 ]; then YUMDIR="$FRS/repos" - # YUMREPOURL="$YUMREPOURL2" else YUMDIR=htdocs - # YUMREPOURL="$YUMREPOURL1" fi cd `dirname $0` @@ -127,18 +140,6 @@ if [ "$OSNAME" != "AIX" ]; then # Modify xcat-dep.repo files to point to the correct place echo "===> Modifying the xcat-dep.repo files to point to the correct location..." - # 10/01/2015 - vkhu - # The URLs have been updated in GSA, this section is not needed at the moment - # - #if [ "$FRSYUM" != 0 ]; then - # newurl="$YUMREPOURL2" - # oldurl="$YUMREPOURL1" - #else - # newurl="$YUMREPOURL1" - # oldurl="$YUMREPOURL2" - #fi - # - #sed -i -e "s|=$oldurl|=$newurl|g" `find . -name "xcat-dep.repo" ` fi if [ "$OSNAME" == "AIX" ]; then diff --git a/docs/source/conf.py b/docs/source/conf.py index 1000fd2c2..1300b102b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -59,7 +59,7 @@ author = u'IBM Corporation' # The short X.Y version. version = '2' # The full version, including alpha/beta/rc tags. -release = '2.14.4' +release = '2.14.5' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/install_new_kernel.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/install_new_kernel.rst index f9af23d82..35b340e0b 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/install_new_kernel.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/install_new_kernel.rst @@ -4,9 +4,9 @@ Installing a New Kernel in the Diskless Image Note: This procedure assumes you are using xCAT 2.6.1 or later. -The kerneldir attribute in linuximage table can be used to assign a directory containing kernel RPMs that can be installed into diskless images. The default for kernerdir is /install/kernels. To add a new kernel, create a directory named under the kerneldir, and genimage will pick them up from there. +To add a new kernel, create a directory named under ``/install/kernels`` directory, and ``genimage`` will pick them up from there. -The following examples assume you have the kernel RPM in /tmp and is using the default value for kerneldir (/install/kernels). +The following examples assume you have the kernel RPM in ``/tmp`` and is using a new kernel in the directory ``/install/kernels/``. The RPM names below are only examples, substitute your specific level and architecture. @@ -20,6 +20,9 @@ For example, kernel-3.10.0-229.ael7b.ppc64le.rpm means kernelver=3.10.0-229.ael7 mkdir -p /install/kernels/3.10.0-229.ael7b.ppc64le cp /tmp/kernel-3.10.0-229.ael7b.ppc64le.rpm /install/kernels/3.10.0-229.ael7b.ppc64le createrepo /install/kernels/3.10.0-229.ael7b.ppc64le/ + +Append kernel directory ``/install/kernels/`` in ``pkgdir`` of specific osimage. :: + chdef -t osimage -p pkgdir=/install/kernels/3.10.0-229.ael7b.ppc64le/ Run genimage/packimage to update the image with the new kernel. @@ -45,6 +48,9 @@ The "4.6.ppc64le" is replaced with "4-ppc64le": :: cp /tmp/kernel-default-3.12.28-4.6.ppc64le.rpm /install/kernels/3.12.28-4-ppc64le/ cp /tmp/kernel-default-base-3.12.28-4.6.ppc64le.rpm /install/kernels/3.12.28-4-ppc64le/ cp /tmp/kernel-default-devel-3.12.28-4.6.ppc64le.rpm /install/kernels/3.12.28-4-ppc64le/ + +Append kernel directory ``/install/kernels/`` in ``pkgdir`` of specific osimage. :: + chdef -t osimage -p pkgdir=/install/kernels/3.12.28-4-ppc64le/ Run genimage/packimage to update the image with the new kernel. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst index 61cff2220..46213a9e5 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst @@ -6,7 +6,7 @@ The synclist file .. _The_Format_of_synclist_file_label: The Format of synclist file -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~ The synclist file contains the configuration entries that specify where the files should be synced to. In the synclist file, each line is an entry which describes the location of the source files and the destination location of files on the target node. The basic entry format looks like following: :: @@ -21,9 +21,9 @@ The ``path_of_dst_file*`` should be the full path of the destination file on tar The ``path_of_dst_directory`` should be the full path of the destination directory. Make ``sure path_of_dst_directory`` is not a existing file on target node, otherwise, the file sync with ``updatenode -r /usr/bin/scp`` or ``xdcp -r /usr/bin/scp`` will fail. -Since the synclist file is for common purpose, the target node need not be configured in it. +If no target node is specified, the files will be synced to all nodes in the cluster. See "Support nodes in synclist file" below for how to specify a noderange. -Example: the following synclist formats are supported: +The following synclist formats are supported: sync file **/etc/file2** to the file **/etc/file2** on the node (with same file name) :: @@ -52,9 +52,7 @@ sync all files in **/home/mikev** to directory **/home/mikev** on the node :: Note: Don't try to sync files to the read only directory on the target node. An example of synclist file -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Assume a user wants to sync files to a node as following, the corresponding entries should be added in a synclist file. +~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sync the file **/etc/common_hosts** to the two places on the target node: put one to the **/etc/hosts**, the other to the **/tmp/etc/hosts**. Following configuration entries should be added :: @@ -80,7 +78,7 @@ Sample synclist file :: /tmp/* -> /tmp/ /etc/testfile -> /etc/ -If the above syncfile is performed by the **updatenode/xdcp** commands, or performed in a node installation process, the following files will exist on the target node with the following contents. :: +If the above syncfile is used by the **updatenode/xdcp** commands, or used in a node installation process, the following files will exist on the target node with the following contents. :: /etc/hosts(It has the same content with /etc/common_hosts on the MN) /tmp/etc/hosts(It has the same content with /etc/common_hosts on the MN) @@ -93,18 +91,18 @@ If the above syncfile is performed by the **updatenode/xdcp** commands, or perfo Support nodes in synclist file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Note: From xCAT 2.9.2 on AIX and from xCAT 2.12 on Linux, xCAT support a new format for syncfile. The new format is :: +Starting with xCAT 2.9.2 on AIX and with xCAT 2.12 on Linux, xCAT supports a new format for syncfile. The new format is :: file -> (noderange for permitted nodes) file -The noderange would have several format. Following examples show that /etc/hosts file is synced to the nodes which is specified before the file name :: +The noderange can have several formats. Following examples show that **/etc/hosts** file is synced to the nodes which are specified before the file name :: /etc/hosts -> (node1,node2) /etc/hosts # The /etc/hosts file is synced to node1 and node2 /etc/hosts -> (node1-node4) /etc/hosts # The /etc/hosts file is synced to node1,node2,node3 and node4 /etc/hosts -> (node[1-4]) /etc/hosts # The /etc/hosts file is synced to node1, node2, node3 and node4 /etc/hosts -> (node1,node[2-3],node4) /etc/hosts # The /etc/hosts file is synced to node1, node2, node3 and node4 /etc/hosts -> (group1) /etc/hosts # The /etc/hosts file is synced to nodes in group1 - /etc/hosts -> (group1,group2) /etc/hosts # The /etc/hosts file is synced to nodes in group1 and group2 + /etc/hosts -> (group1,group2) /etc/hosts # The /etc/hosts file is synced to nodes in group1 and group2 postscript support ~~~~~~~~~~~~~~~~~~ @@ -112,13 +110,19 @@ postscript support Putting the filename.post in the **rsyncfile** to ``rsync`` to the node is required for hierarchical clusters. It is optional for non-hierarchical cluster. Advanced synclist file features -'''''''''''''''''''''''''''''''''' +''''''''''''''''''''''''''''''' -After you define the files to rsync in the syncfile, you can add an **EXECUTEALWAYS** clause in the syncfile. The **EXECUTEALWAYS** clause will list all the postscripts you would always like to run after the files are sync'd, whether or not any file is actually updated. The files in this list must be added to the list of files to rsync, if hierarchical. +**EXECUTE** -For example, your rsyncfile may look like this. -.. note:: the path to the file to EXECUTE, is the location of the *.post file on the MN**. :: +The **EXECUTE** clause is used to list all the postscripts you would like to run after the files are sync'd, only if the file is updated. The files in this list must be added to the list of files to rsync. If noderange is used in the synclistfor the file listed in the **EXECUTE** clause, the script will only be exectuted on the nodes in that noderange. +**EXECUTEALWAYS** + +The **EXECUTEALWAYS** clause is used to list all the postscripts you would like to run after the files are sync'd, whether or not any file is actually updated. The files in this list must be added to the list of files to rsync. If noderange is used in the synclist for the file listed in the **EXECUTEALWAYS** clause, the script will only be exectuted on the nodes in that noderange. + +.. note:: The path to the file to EXECUTE or EXECUTEALWAYS, is the location of the file on the MN. + +For example, your rsyncfile may look like this.:: /tmp/share/file2 -> /tmp/file2 /tmp/share/file2.post -> /tmp/file2.post (required for hierarchical clusters) @@ -126,7 +130,7 @@ For example, your rsyncfile may look like this. /tmp/share/file3.post -> /tmp/file3.post (required for hierarchical clusters) /tmp/myscript1 -> /tmp/myscript1 /tmp/myscript2 -> /tmp/myscript2 - # the below are postscripts + # Postscripts EXECUTE: /tmp/share/file2.post /tmp/share/file3.post @@ -136,7 +140,7 @@ For example, your rsyncfile may look like this. If **/tmp/file2** is updated on the node in **/tmp/file2**, then **/tmp/file2**.post is automatically run on that node. If **/tmp/file3** is updated on the node in **/tmp/filex**, then **/tmp/file3**.post is automatically run on that node. -You can add an **APPEND** clause to your syncfile. +**APPEND** The **APPEND** clause is used to append the contents of the input file to an existing file on the node. The file to be appended must already exist on the node and not be part of the synclist that contains the **APPEND** clause. @@ -147,7 +151,7 @@ For example, your synclist file may look like this: :: /tmp/share/file3 -> /tmp/filex /tmp/share/file3.post -> /tmp/file3.post /tmp/myscript -> /tmp/myscript - # the below are postscripts + # Postscripts EXECUTE: /tmp/share/file2.post /tmp/share/file3.post @@ -157,15 +161,13 @@ For example, your synclist file may look like this: :: /etc/myappenddir/appendfile -> /etc/mysetup/setup /etc/myappenddir/appendfile2 -> /etc/mysetup/setup2 -When you use the **APPEND** clause, the file (left) of the arrow is appended to the file right of the arrow. In this example, **/etc/myappenddir/appendfile** is appended to **/etc/mysetup/setup** file, which must already exist on the node. The **/opt/xcat/share/xcat/scripts/xdcpappend.sh** is used to accomplish this. +When you use the **APPEND** clause, the source file to the left of the arrow is appended to the file to the right of the arrow. In this example, **/etc/myappenddir/appendfile** is appended to **/etc/mysetup/setup** file, which must already exist on the node. The **/opt/xcat/share/xcat/scripts/xdcpappend.sh** is used to accomplish this. -The script creates a backup of the original file on the node in the directory defined by the site table nodesyncfiledir attribute, which is **/var/xcat/node/syncfiles** by default. To update the original file when using the function, you need to rsync a new original file to the node, removed the old original from the **/var/xcat/node/syncfiles/org** directory. If you want to cleanup all the files for the append function on the node, you can use the ``xdsh -c`` flag. See man page for ``xdsh``. +The script creates a backup of the original file on the node in the directory defined by the site table `nodesyncfiledir` attribute, which is **/var/xcat/node/syncfiles** by default. To update the original file when using the function, you need to rsync a new original file to the node, removed the old original from the **/var/xcat/node/syncfiles/org** directory. If you want to cleanup all the files for the append function on the node, you can use ``xdsh -c`` flag. See man page for ``xdsh``. -.. note:: no order of execution may be assumed by the order that the **EXECUTE,EXECUTEALWAYS and APPEND** clause fall in the synclist file. +**MERGE** (supported on Linux only). -You can add an **MERGE** clause to your syncfile. This is only supported on Linux. - -The **MERGE** clause is used to append the contents of the input file to either the **/etc/passwd**, **/etc/shadow** or **/etc/group** files. They are the only supported files. You must not put the **/etc/passwd**, **/etc/shadow**, **/etc/group** files in an **APPEND** clause if using a **MERGE** clause. For these three file you should use a **MERGE** clause. The **APPEND** will add the information to the end of the file. The **MERGE** will add or replace the information and insure that there are no duplicate entries in these files. +The **MERGE** clause is used to append the contents of the input file to either the **/etc/passwd**, **/etc/shadow** or **/etc/group** files. They are the only supported files. You must not put the **/etc/passwd**, **/etc/shadow**, **/etc/group** files in an **APPEND** clause if using a **MERGE** clause. For these three files you should use the **MERGE** clause. The **APPEND** will add the information to the end of the file. The **MERGE** will add or replace the information and insure that there are no duplicate entries in these files. For example, your synclist file may look like this :: @@ -174,7 +176,7 @@ For example, your synclist file may look like this :: /tmp/share/file3 -> /tmp/filex /tmp/share/file3.post -> /tmp/file3.post /tmp/myscript -> /tmp/myscript - # the below are postscripts + # Postscripts EXECUTE: /tmp/share/file2.post /tmp/share/file3.post @@ -185,20 +187,21 @@ For example, your synclist file may look like this :: /etc/mydir/mergeshadow -> /etc/shadow /etc/mydir/mergegroup -> /etc/group -When you use the **MERGE** clause, the file (left) of the arrow is merged into the file right of the arrow. It will replace any common userid's found in those files and add new userids. The **/opt/xcat/share/xcat/scripts/xdcpmerge.sh** is used to accomplish this. +When you use the **MERGE** clause, the source file to the left of the arrow is merged into the file to the right of the arrow. It will replace any common userid's found in those files and add new userids. The **/opt/xcat/share/xcat/scripts/xdcpmerge.sh** is used to accomplish this. -.. note:: no order of execution may be assumed by the order that the **EXECUTE,EXECUTEALWAYS,APPEND and MERGE** clause fall in the synclist file. +.. note:: no order of execution may be assumed by the order of **EXECUTE, EXECUTEALWAYS, APPEND and MERGE** clauses in the synclist file. .. _the_localtion_of_synclist_file_for_updatenode_label: The location of synclist file for updatenode and install process -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In the installation process or updatenode process, xCAT needs to figure out the location of the synclist file automatically, so the synclist should be put into the specified place with the proper name. +In the installation process or **updatenode** process, xCAT needs to figure out the location of the synclist file automatically, so the synclist should be put into the specified place with the proper name. -If the provisioning method for the node is an osimage name, then the path to the synclist will be read from the osimage definition synclists attribute. You can display this information by running the following command, supplying your osimage name. :: +If the provisioning method for the node is an osimage name, then the path to the synclist will be read from the osimage definition `synclists` attribute. You can display this information by running the following command, supplying your osimage name. :: lsdef -t osimage -l --netboot-compute + Object name: --netboot-compute exlist=/opt/xcat/share/xcat/netboot//compute.exlist imagetype=linux @@ -213,24 +216,25 @@ If the provisioning method for the node is an osimage name, then the path to the rootimgdir=/install/netboot///compute **synclists=/install/custom/netboot/compute.synclist** -You can set the synclist path using the following command :: +You can set the `synclist` path using the following command :: chdef -t osimage -o --netboot-compute synclists="/install/custom/netboot/compute.synclist -If the provisioning method for the node is install,or netboot then the path to the synclist should be of the following format :: +If the provisioning method for the node is `install`, or `netboot` then the path to the synclist should be in the following format :: /install/custom///...synclist + : "install", "netboot" : "rh", "centos", "fedora", "sles" - ,and are what you set for the node + , and are what you set for the node For example: -The location of synclist file for the diskful installation of with 'compute' as the profile :: +The location of synclist file for the diskful installation of RedHat 7.5 with 'compute' as the profile :: - /install/custom///..synclist + /install/custom/install/rh/compute.rhels7.5.synclist -The location of synclist file for the diskless netboot of with '' as the profile :: +The location of synclist file for the diskless netboot of SLES 12.3 with 'service' as the profile :: - /install/custom///..synclist + /install/custom/netboot/sles/service.sles12.3.synclist diff --git a/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst b/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst index 238924d21..9a0962c41 100644 --- a/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst +++ b/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst @@ -48,13 +48,13 @@ OPTIONS \ **-**\ **-range**\ - Specify one or more IP ranges acceptable to nmap. IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3), several IPs with commas (10.1.2.3,10.1.2.10), Ip range with "-" (10.1.2.0-100) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the \ **bmcdiscover**\ command may take a long time to return. + Specify one or more IP ranges acceptable to \ **nmap**\ . IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3), several IPs with commas (10.1.2.3,10.1.2.10), Ip range with "-" (10.1.2.0-100) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the \ **bmcdiscover**\ command may take a long time to return. \ **-**\ **-sn**\ - Specify one or more service nodes on which bmcdiscover will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. With this option, bmcdiscover will be dispatched to the specified SNs. Then, the nodename of the service node that 'bmcdiscover' is running on will be set to the 'servicenode' attribute of the discovered BMC node. + Specify one or more service nodes on which bmcdiscover will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. With this option, \ **bmcdiscover**\ will be dispatched to the specified SNs. Then, the nodename of the service node that \ **bmcdiscover**\ is running on will be set to the 'servicenode' attribute of the discovered BMC node. @@ -163,7 +163,7 @@ Output is similar to: conserver=sn01 -4. Discover the BMCs and write the discovered-node definitions into the xCAT database and write out the stanza foramt to the console: +4. Discover the BMCs and write the discovered node definitions into the xCAT database and write out the stanza format to the console: .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man1/lsdef.1.rst b/docs/source/guides/admin-guides/references/man1/lsdef.1.rst index e5585d61b..624fc171c 100644 --- a/docs/source/guides/admin-guides/references/man1/lsdef.1.rst +++ b/docs/source/guides/admin-guides/references/man1/lsdef.1.rst @@ -21,13 +21,13 @@ SYNOPSIS \ **lsdef**\ [\ **-h | -**\ **-help**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-i**\ \ *attr-list*\ ] -\ **lsdef**\ [\ **-V | -**\ **-verbose**\ ] [\ **-l | -**\ **-long**\ ] [\ **-s | -**\ **-short**\ ] [\ **-a | -**\ **-all**\ ] [\ **-S**\ ] -[\ **-t**\ \ *object-types*\ ] [\ **-o**\ \ *object-names*\ ] [\ **-z | -**\ **-stanza**\ ] [\ **-i**\ \ *attr-list*\ ] +\ **lsdef**\ [\ **-V | -**\ **-verbose**\ ] [\ **-a | -**\ **-all**\ ] [\ **-S**\ ] +[\ **-t**\ \ *object-types*\ ] [\ **-o**\ \ *object-names*\ ] [\ **-z | -**\ **-stanza**\ ] [\ [\ **-i**\ \ *attr-list*\] | [\ **-l | -**\ **-long**\ ] | [\ **-s | -**\ **-short**\ ]] [\ **-c | -**\ **-compress**\ ] [\ **-**\ **-osimage**\ ] [\ **-**\ **-nics**\ ] [[\ **-w**\ \ *attr*\ ==\ *val*\ ] [\ **-w**\ \ *attr*\ =~\ *val*\ ] ...] [\ *noderange*\ ] -\ **lsdef**\ [\ **-l | -**\ **-long**\ ] [\ **-a | -**\ **-all**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-z | -**\ **-stanza**\ ] -[\ **-i**\ \ *attr-list*\ ] [\ **-**\ **-template**\ [\ *template-object-name*\ ]] +\ **lsdef**\ [\ **-a | -**\ **-all**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-z | -**\ **-stanza**\ ] +[\ [\ **-i**\ \ *attr-list*\] | [\ **-l | -**\ **-long**\ ] | [\ **-s | -**\ **-short**\ ]] [\ **-**\ **-template**\ [\ *template-object-name*\ ]] *********** @@ -49,15 +49,15 @@ OPTIONS Display all definitions. For performance consideration, the auditlog and eventlog objects will not be listed. - To list auditlog or eventlog objects, use lsdef -t auditlog or lsdef -t eventlog instead. + To list auditlog or eventlog objects, use \ **lsdef -t auditlog**\ or \ **lsdef -t eventlog**\ instead. \ **-c|-**\ **-compress**\ Display information in compressed mode, each output line has format ": ". - The output can be passed to command xcoll or xdshbak for formatted output. - The -c flag must be used with -i flag. + The output can be passed to command \ **xcoll**\ or \ **xdshbak**\ for formatted output. + The \ **-c**\ flag must be used with \ **-i**\ flag. @@ -136,13 +136,18 @@ OPTIONS \ **-w**\ \ *attr==val*\ \ **-w**\ \ *attr=~val*\ ... - Use one or multiple -w flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. Use the help option to get a list of valid attributes for each object type. + Use one or multiple \ **-w**\ flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. Use the help option to get a list of valid attributes for each object type. Operator descriptions: - == Select nodes where the attribute value is exactly this value. - != Select nodes where the attribute value is not this specific value. - =~ Select nodes where the attribute value matches this regular expression. - !~ Select nodes where the attribute value does not match this regular expression. + + + .. code-block:: perl + + == Select nodes where the attribute value is exactly this value. + != Select nodes where the attribute value is not this specific value. + =~ Select nodes where the attribute value matches this regular expression. + !~ Select nodes where the attribute value does not match this regular expression. + Note: if the "val" fields includes spaces or any other characters that will be parsed by shell, the "attrval" needs to be quoted. If the operator is "!~", the "attrval" needs to be quoted using single quote. @@ -150,7 +155,7 @@ OPTIONS \ **-z|-**\ **-stanza**\ - Display output in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files. + Display output in stanza format. See the "xcatstanzafile" man page for details on using xCAT stanza files. @@ -191,8 +196,6 @@ EXAMPLES .. code-block:: perl - lsdef - OR lsdef -a @@ -350,7 +353,7 @@ EXAMPLES 15. - To list the nodes status and use xcoll to format the output. + To list the nodes status and use \ **xcoll**\ to format the output. .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man1/xcatperftest.1.rst b/docs/source/guides/admin-guides/references/man1/xcatperftest.1.rst index 8276fcbb8..aa7fccb0d 100644 --- a/docs/source/guides/admin-guides/references/man1/xcatperftest.1.rst +++ b/docs/source/guides/admin-guides/references/man1/xcatperftest.1.rst @@ -21,6 +21,8 @@ SYNOPSIS \ **xcatperftest**\ [\ **-?|-h**\ ] +[\ **PERF_DRYRUN**\ =y] \ **xcatperftest run**\ [\ *command-list-file*\ ] + [\ **PERF_DRYRUN**\ =y] [\ **PERF_NOCREATE**\ =y] \ **xcatperftest**\ [\ *command-list-file*\ ] @@ -29,23 +31,23 @@ DESCRIPTION *********** -The xcatperftest command runs commandes defined in a command list file and get their execution response time baseline for performance purpose. -The xcatperftest command is part of the xCAT package xCAT-test, and you can run it standalone or leverage it to build up your automation test cases. +The \ **xcatperftest**\ command runs commands defined in a command list file and get their execution response time baseline for performance purpose. +The \ **xcatperftest**\ command is part of the xCAT package \ **xCAT-test**\ , and you can run it standalone or leverage it to build up your automation test cases. -Any commands could be defined in the command list file, however, it is recommended that the one-time initial configuration are well prepared prior to run xcatperftest command. -For example, the network object, osdistor and osimage image objects. +Any command could be defined in the command list file, however, it is recommended that the one-time initial configuration is well prepared prior to running \ **xcatperftest**\ command. +For example, the network object, osdistro and osimage image objects. -Follow the below steps to run xcatperftest command: +Follow the steps below to run \ **xcatperftest**\ command: -1, Install xCAT-test on a xCAT management nodes. +1. Install \ **xCAT-test**\ on a xCAT management node. -2, Prepare a command list in which the commands are what you want to messure. +2. Prepare a command list with the commands you want to measure. -3, Prepare the initial configuration based on the command list to make sure all commands could be executed in techinal. +3. Prepare the initial configuration based on the command list to make sure all commands could be executed in techinal. -4, Run xcatperftest with the total fake nodes number and the above command list file. +4. Run \ **xcatperftest**\ with the total fake nodes number and the above command list file. -Node: It is suggested to run the command in background as it normally takes long time to finish all the performanc testing with large amount of fake nodes. +Node: It is suggested to run the command in background as it normally takes long time to finish all the performance testing with large amount of fake nodes. ******* @@ -60,7 +62,7 @@ OPTIONS - +\ *command-list-file*\ Specifies the command list file with full-path. xCAT supports an example command file: /opt/xcat/share/xcat/tools/autotest/perfcmds.lst @@ -88,7 +90,7 @@ COMMAND LIST FILE ***************** -The command list file is in flat text format, the testing framework will parse the file line by line, here is an example of the commannd list file: +The command list file is in flat text format, the testing framework will parse the file line by line, here is an example of the command list file: .. code-block:: perl @@ -110,13 +112,13 @@ The command list file is in flat text format, the testing framework will parse t \ **Note**\ : Each line defines one command, and the commands dependency should be handled by the line order. -If you define a node range series line (started with #SERIES#) in this file, xcatperftest will run the command for each node range defined in series line. +If you define a node range series line (started with \ **#SERIES#**\ ) in this file, xcatperftest will run the command for each node range defined in series line. \ **#SERIES#**\ To define a node range series, and the series should be an comma split incremental number sequence. \ **#STANZ#**\ It will be replaced with real stanz file path when this command line runs. -\ **#NODES#**\ It will be replaced with real node range defined in #SERIES# line when this command line runs. If no series line, the node group will be used. +\ **#NODES#**\ It will be replaced with real node range defined in \ **#SERIES#**\ line when this command line runs. If no series line, the node group will be used. \ **#PERFGRP#**\ It will be replaced with node group when this command line runs. @@ -126,7 +128,7 @@ ENVIRONMENT VARIABLE ******************** -The xcatperftest command supports be customized by some environment variables. +The \ **xcatperftest**\ command supports customization by some environment variables. \ **FAKE_NODE_PREFIX**\ @@ -148,15 +150,15 @@ It must be a string like 'A.B' and no need to be defined in 'networks' table. \ **PERF_NODETEMPL**\ -Optional, The node template name used for generating fake nodes. By default, it will be auto-detected according to the current arch. +Optional, the node template name used for generating fake nodes. By default, it will be auto-detected according to the current arch. \ **PERF_DRYRUN**\ -Optional, Indicate no real commands will be executed if the environment variable is set. +Optional, indicate no real commands will be executed if the environment variable is set. \ **PERF_NOCREATE**\ -Optional, Indicate no new fake nodes will be created if the environment variable is set. +Optional, indicate no new fake nodes will be created if the environment variable is set. ******** @@ -201,6 +203,18 @@ EXAMPLES +4. + + To run the performance testing for the commands defined in /tmp/cmd.lst in existing xCAT environment: + + + .. code-block:: perl + + xcatperftest run /tmp/cmd.lst + + + + ***** FILES diff --git a/docs/source/guides/admin-guides/references/man5/site.5.rst b/docs/source/guides/admin-guides/references/man5/site.5.rst index d58a76b2c..7a3361399 100644 --- a/docs/source/guides/admin-guides/references/man5/site.5.rst +++ b/docs/source/guides/admin-guides/references/man5/site.5.rst @@ -269,7 +269,7 @@ site Attributes: genpasswords: Automatically generate random passwords for BMCs when configuring them. - installdir: The local directory name used to hold the node deployment packages. + installdir: The local directory name used to hold the node deployment packages(obsoleted). installloc: The location from which the service nodes should mount the deployment packages in the format hostname:/path. If hostname is diff --git a/docs/source/overview/xcat2_release.rst b/docs/source/overview/xcat2_release.rst index 4c88d6396..969d36b70 100644 --- a/docs/source/overview/xcat2_release.rst +++ b/docs/source/overview/xcat2_release.rst @@ -14,6 +14,16 @@ xCAT 2.14.x |xCAT |New OS |New |New Feature | |Version | |Hardware | | +=================================+===============+=============+==================================+ +|| xCAT 2.14.5 2018/12/07 |- RHEL7.6 | |- syslog tag refine | +|| | | | | +| `2.14.5 Release Notes `_ | | |- localdisk GPT partition support | +| | | | | +| | | |- goconserver v0.3.2 | +| | | | | +| | | |- xcat-inventory 0.1.6 | ++---------------------------------+---------------+-------------+----------------------------------+ || xCAT 2.14.4 2018/10/19 |- UBT18.04.1 | | | || | | | | | `2.14.4 Release Notes {key} } = $_->{value}; } + + unless (exists($::XCATSITEVALS{'httpport'}) and ($::XCATSITEVALS{'httpport'} ne "")){ + $::XCATSITEVALS{'httpport'}="80"; + } + } diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index 6971a8d86..e561d7aed 100755 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -92,19 +92,20 @@ sub getObjectsOfType } # if this is type "group" we need to check the nodelist table - my @nodeGroupList = (); if ($type eq 'group') { my $table = "nodelist"; + my %ext_groups = (); my @TableRowArray = xCAT::DBobjUtils->getDBtable($table); - foreach (@TableRowArray) { - my @tmplist = split(',', $_->{'groups'}); - push(@nodeGroupList, @tmplist); - } - foreach my $n (@nodeGroupList) { - if (!grep(/^$n$/, @objlist)) { - push(@objlist, $n); + foreach my $r (@TableRowArray) { + my @tmplist = split(',', $r->{'groups'}); + foreach (@tmplist) { + $ext_groups{$_} = 1 unless exists($ext_groups{$_}) ; } } + foreach (@objlist) { + $ext_groups{$_} = 1 unless exists($ext_groups{$_}) ; + } + @objlist = sort keys %ext_groups; } @{ $::saveObjList{$type} } = @objlist; @@ -142,7 +143,6 @@ sub getobjattrs my $class = shift; my $ref_hash = shift; my @attrs; - # The $attrs is an optional argument if (ref $_[0]) { @attrs = @{ shift() }; @@ -164,35 +164,18 @@ sub getobjattrs # go through each object type and look up all the info for each object foreach my $objtype (keys %objtypelist) { - # only do node type for now - if ($objtype eq 'node') { - + # only do node and nodegroup type for now + if ($objtype eq 'node' || $objtype eq 'group') { # find the list of tables and corresponding attrs # - for this object type - # get the object type decription from Schema.pm - my $datatype = $xCAT::Schema::defspec{$objtype}; - foreach my $this_attr (@{ $datatype->{'attrs'} }) { - my $attr = $this_attr->{attr_name}; - if (scalar(@attrs) > 0) { # Only query specific attributes - if (!grep(/^$attr$/, @attrs)) { - next; # This attribute is not needed - } - } - - # table_attr is the attr that actually appears in the - # table which could possibly be different then the attr - # used in the node def - # ex. 'nodetype.arch' - my ($lookup_table, $table_attr) = split('\.', $this_attr->{tabentry}); - if (!grep(/^$table_attr$/, @{ $tableattrs{$lookup_table} })) { - push @{ $tableattrs{$lookup_table} }, $table_attr; - } - } + # get the object type description from Schema.pm + my %tableattrs = xCAT::DBobjUtils->gettbldesc($objtype, \@attrs); + my @objlist = @{ $objtypelist{$objtype} }; # foreach table look up the list of attrs for this # list of object names foreach my $table (keys %tableattrs) { - + next if ($table eq 'nodegroup'); #getNodesAttribs cannot handle this table now # open the table # with autocommit => 0, it does not work on Ubuntu running mysql my $thistable = xCAT::Table->new($table, -create => 1, -autocommit => 1); @@ -203,9 +186,14 @@ sub getobjattrs next; } - my @objlist = @{ $objtypelist{$objtype} }; - - my $rec = $thistable->getNodesAttribs(\@objlist, @{ $tableattrs{$table} }); + my $rec; + if ($objtype eq 'node') { + $rec = $thistable->getNodesAttribs(\@objlist, @{$tableattrs{$table}}); + } else { + my %options = (); + $options{keep_raw} = 1; + $rec = $thistable->getNodesAttribs(\@objlist, \@{$tableattrs{$table}}, %options); + } # fill in %tabhash with any values that are set foreach my $n (@objlist) { @@ -232,6 +220,62 @@ sub getobjattrs #---------------------------------------------------------------------------- +=head3 gettbldesc + + Get required table and columns from the Schema for specified definition type. + + $objtype: definition type + $attrs_ref: only get the specific attributes, + this can be useful especially for performance considerations + Arguments: + Returns: + undef - error + hash ref - $tblattrshash{tablename} = [col1, col2] + Globals: + Error: + Example: + + To get the table attributes for object type + ex. + + xCAT::DBobjUtils->gettbldesc('node', @attr); + + Comments: + +=cut + +#----------------------------------------------------------------------------- +sub gettbldesc { + my ($class, $objtype) = @_; + my @attrs; + # The $attrs is an optional argument + if (ref $_[0]) { + @attrs = @{ shift() }; + } + my %tableattrs = (); + my $datatype = $xCAT::Schema::defspec{$objtype}; + foreach my $this_attr (@{ $datatype->{'attrs'} }) { + my $attr = $this_attr->{attr_name}; + if (scalar(@attrs) > 0) { # Only query specific attributes + if (!grep(/^$attr$/, @attrs)) { + next; # This attribute is not needed + } + } + + # table_attr is the attr that actually appears in the + # table which could possibly be different then the attr + # used in the node def + # ex. 'nodetype.arch' + my ($lookup_table, $table_attr) = split('\.', $this_attr->{tabentry}); + if (!grep(/^$table_attr$/, @{ $tableattrs{$lookup_table} })) { + push @{ $tableattrs{$lookup_table} }, $table_attr; + } + } + return %tableattrs; +} + +#---------------------------------------------------------------------------- + =head3 getobjdefs Get object definitions from the DB. @@ -263,13 +307,14 @@ sub getobjattrs sub getobjdefs { my ($class, $hash_ref, $verbose, $attrs_ref, $chname_ref) = @_; - my %objhash; + my %typehash = %$hash_ref; - my %tabhash; - my @attrs; + my @attrs; # required attributes if (ref($attrs_ref)) { @attrs = @$attrs_ref; } + my %objhash; # fetched result will be stored in this hash + my %tabhash; # used to cache the some result for node/group @::foundTableList = (); @@ -283,40 +328,7 @@ sub getobjdefs return %objhash; } - # see if we need to get any objects of type 'node' - my $getnodes = 0; - foreach my $objname (keys %typehash) { - if ($typehash{$objname} eq 'node') { - $getnodes = 1; - } - } - - # if so then get node info from tables now - # still may need to look up values in some tables using - # other keys - also need to figure out what tables to take - # values from when using 'only_if' - see below - # - but this saves lots of time - if ($getnodes) { - if (scalar(@attrs) > 0) { # Only get specific attributes of the node - # find the onlyif key for the attributes - REDO: my $datatype = $xCAT::Schema::defspec{'node'}; - foreach my $this_attr (@{ $datatype->{'attrs'} }) { - my $attr = $this_attr->{attr_name}; - if (exists($this_attr->{only_if})) { - my ($onlyif_key, $onlyif_value) = split('\=', $this_attr->{only_if}); - if (!grep (/^$onlyif_key$/, @attrs)) { - push @attrs, $onlyif_key; - goto REDO; - } - } - } - %tabhash = xCAT::DBobjUtils->getobjattrs(\%typehash, \@attrs); - } else { - %tabhash = xCAT::DBobjUtils->getobjattrs(\%typehash); - } - } - - # Classify the nodes with type + # Classify the objects with type, for example, {'node' => ['cn1', 'cn2']} my %type_obj = (); foreach my $objname (keys %typehash) { push @{ $type_obj{ $typehash{$objname} } }, $objname; @@ -422,10 +434,38 @@ sub getobjdefs # get the object type decription from Schema.pm my $datatype = $xCAT::Schema::defspec{$objtype}; + # if so then get objects info from tables now + # still may need to look up values in some tables using + # other keys - also need to figure out what tables to take + # values from when using 'only_if' - see below + # - but this saves lots of time + if ($objtype eq 'node' or $objtype eq 'group') { + if (scalar(@attrs) > 0) { + # Only get specific attributes of the object + # find the onlyif key for the attributes + REDO: + foreach my $this_attr (@{$datatype->{'attrs'}}) { + my $attr = $this_attr->{attr_name}; + if (exists($this_attr->{only_if})) { + my ($onlyif_key, $onlyif_value) = split('\=', $this_attr->{only_if}); + if (!grep (/^$onlyif_key$/, @attrs)) { + push @attrs, $onlyif_key; + goto REDO; + } + } + } + %tabhash = xCAT::DBobjUtils->getobjattrs(\%typehash, \@attrs); + } + else { + %tabhash = xCAT::DBobjUtils->getobjattrs(\%typehash); + } + } + # get the key to look for, for this object type my $objkey = $datatype->{'objkey'}; # go through the list of valid attrs foreach my $this_attr (@{ $datatype->{'attrs'} }) { + my $ent; my $attr = $this_attr->{attr_name}; @@ -435,7 +475,7 @@ sub getobjdefs } # skip the attributes that does not needed for node type - if ($getnodes) { + if ($objtype eq 'node') { if (scalar(@attrs) > 0 && !grep(/^$attr$/, @attrs)) { next; } @@ -449,33 +489,33 @@ sub getobjdefs # ex. noderes.nfsdir my ($tab, $tabattr) = split('\.', $this_attr->{tabentry}); - foreach my $objname (sort @{ $type_obj{$objtype} }) { + my $check_attr = undef; + my $check_value = undef; + if (exists $this_attr->{only_if}) { + ($check_attr, $check_value) = split('\=', $this_attr->{only_if}); + } + foreach my $objname (sort @{ $type_obj{$objtype} }) { # get table lookup info from Schema.pm # !!!! some tables depend on the value of certain attrs # we need to look up attrs in the correct order or we will # not be able to determine what tables to look # in for some attrs. - if (exists($this_attr->{only_if})) { - my ($check_attr, $check_value) = split('\=', $this_attr->{only_if}); - + if (defined($check_attr) && defined($check_value)) { # if the object value is not the value we need # to match then try the next only_if value next if (!($objhash{$objname}{$check_attr} =~ /\b$check_value\b/)); } - $objhash{$objname}{'objtype'} = $objtype; - my %tabentry = (); + my %tabentry = (); # def commands need to support multiple keys in one table # the subroutine parse_access_tabentry is used for supporting multiple keys - my $rc = xCAT::DBobjUtils->parse_access_tabentry($objname, - $this_attr->{access_tabentry}, \%tabentry); + my $rc = xCAT::DBobjUtils->parse_access_tabentry($objname, $this_attr->{access_tabentry}, \%tabentry); if ($rc != 0) { my $rsp; - $rsp->{data}->[0] = -"access_tabentry \'$this_attr->{access_tabentry}\' is not valid."; + $rsp->{data}->[0] = "access_tabentry \'$this_attr->{access_tabentry}\' is not valid."; xCAT::MsgUtils->message("E", $rsp, $::callback); next; } @@ -490,7 +530,8 @@ sub getobjdefs # The %tabhash is for performance considerations my $tabspec = $xCAT::Schema::tabspec{$lookup_table}; my $nodecol = $tabspec->{'nodecol'} if defined($tabspec->{'nodecol'}); - if (($lookup_attr eq 'node' && $objtype eq 'node') || (defined($nodecol) && $objtype eq 'node' && $lookup_table ne 'ppcdirect')) { + if (($lookup_attr eq 'node' && ($objtype eq 'node' || $objtype eq 'group')) || + (defined($nodecol) && ($objtype eq 'node' || $objtype eq 'group') && $lookup_table ne 'ppcdirect')) { if (defined($tabhash{$lookup_table}{$objname}{$tabattr})) { if ($verbose == 1) { $objhash{$objname}{$attr} = "$tabhash{$lookup_table}{$objname}{$tabattr}\t(Table:$lookup_table - Key:$lookup_attr - Column:$tabattr)"; @@ -509,7 +550,6 @@ sub getobjdefs $notsearched = 1; } } - # Not in tabhash, # Need to lookup the table if ($intabhash == 0 && $notsearched == 1) { @@ -580,7 +620,8 @@ sub getDBtable # save this table info - in case this subr gets called multiple times # --nocache flag specifies not to use cahe - if (grep(/^$table$/, @::foundTableList) && !$::opt_nc) { + #if (grep(/^$table$/, @::foundTableList) && !$::opt_nc) { + if (exists $::TableHash{$table} && !$::opt_nc) { # already have this @rows = @{ $::TableHash{$table} }; @@ -600,7 +641,7 @@ sub getDBtable # keep track of the fact that we checked this table # - even if it's empty! - push(@::foundTableList, $thistable->{tabname}); + #push(@::foundTableList, $thistable->{tabname}); @{ $::TableHash{$table} } = @rows; diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index ecafd5446..4284b4ef0 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -110,7 +110,7 @@ sub execute_dcp if (!scalar(%resolved_targets)) { my $rsp = {}; - $rsp->{error}->[0] = "No hosts in node list 1"; + $rsp->{error}->[0] = "DCP: No hosts in node list 1"; xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1); return ++$result; } @@ -368,7 +368,7 @@ sub execute_dsh if (!scalar(%resolved_targets)) { my $rsp = {}; - $rsp->{error}->[0] = " No hosts in node list 2"; + $rsp->{error}->[0] = " DSH: No hosts in node list 2"; xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1); return ++$result; } @@ -6300,6 +6300,7 @@ sub run_always_rsync_postscripts my @hosts = @$hostnames; my @newoutput = (); my $dshparms; + foreach my $postsfile (@::alwayspostscripts) { my $tmppostfile = $postsfile; @@ -6310,17 +6311,34 @@ sub run_always_rsync_postscripts } foreach my $host (@hosts) { - # build xdsh queue # build host and all scripts to execute - push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host); - } - } + # EXECUTEALWAYS will only execute the syncfile in the syncfile list + foreach my $key (keys %{$$options{'destDir_srcFile'}{$host}}) { + foreach my $key1 (keys %{ $$options{'destDir_srcFile'}{$host}->{$key} }) { + my $index = 0; + my $key1_ref = $$options{'destDir_srcFile'}{$host}->{$key}->{$key1}; + if (ref $key1_ref eq 'ARRAY') { #stored as ARRAY for same_dest_name + while (my $src_file =$key1_ref->[$index] ) { + if ($src_file eq $tmppostfile) { + push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host); + } + $index++; + } + } else { #stroed as hash table for diff_dest_name + foreach my $src_file (keys %{$key1_ref}) { + if ($src_file eq $tmppostfile) { + push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host); + } + } + } #end else + } #end foreach key1 + } #end foreach key + } #end foreach host + } #end foreach postsfile # now if we have postscripts to run, run xdsh my $out; - - foreach my $ps (keys %{ $$dshparms{'postscripts'} }) { my @nodes; diff --git a/perl-xCAT/xCAT/FSPpower.pm b/perl-xCAT/xCAT/FSPpower.pm index 972c22791..9aad0c01e 100644 --- a/perl-xCAT/xCAT/FSPpower.pm +++ b/perl-xCAT/xCAT/FSPpower.pm @@ -8,7 +8,6 @@ use xCAT::PPCcli qw(SUCCESS EXPECT_ERROR RC_ERROR NR_ERROR); use xCAT::PPCpower; use xCAT::FSPUtils; use xCAT::GlobalDef; -use xCAT_monitoring::monitorctrl; #use Data::Dumper; @@ -183,6 +182,7 @@ sub powercmd_boot { } } if (%newnodestatus) { + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); } return (\@output); @@ -364,6 +364,7 @@ sub powercmd { } if (%newnodestatus) { + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); } return (\@output); diff --git a/perl-xCAT/xCAT/PPCboot.pm b/perl-xCAT/xCAT/PPCboot.pm index c29da6816..80d80f919 100644 --- a/perl-xCAT/xCAT/PPCboot.pm +++ b/perl-xCAT/xCAT/PPCboot.pm @@ -614,6 +614,7 @@ sub rnetboot { my $newstat = $::STATUS_POWERING_ON; my %newnodestatus = (); $newnodestatus{$newstat} = [$node]; + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); return ([ [ $node, "Success", $Rc ] ]); } diff --git a/perl-xCAT/xCAT/PPCpower.pm b/perl-xCAT/xCAT/PPCpower.pm index e61dbbcbf..77e73704e 100644 --- a/perl-xCAT/xCAT/PPCpower.pm +++ b/perl-xCAT/xCAT/PPCpower.pm @@ -9,7 +9,6 @@ use xCAT::MsgUtils; use xCAT::FSPpower; use xCAT::GlobalDef; -use xCAT_monitoring::monitorctrl; ########################################################################## # Parse the command line for options and operands @@ -301,6 +300,7 @@ sub powercmd_boot { } } + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); return (\@output); } @@ -423,6 +423,7 @@ sub powercmd { } } } + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); return (\@result); } diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 4967e7220..79fe7a80a 100755 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -1159,7 +1159,7 @@ passed as argument rather than by table value', " prefix (e.g. 00:11:aa)\n\n" . " genpasswords: Automatically generate random passwords for BMCs when configuring\n" . " them.\n\n" . -" installdir: The local directory name used to hold the node deployment packages.\n\n" . +" installdir: The local directory name used to hold the node deployment packages(obsoleted).\n\n" . " installloc: The location from which the service nodes should mount the \n" . " deployment packages in the format hostname:/path. If hostname is\n" . " omitted, it defaults to the management node. The path must\n" . diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 36ecc10fa..9dc46944b 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -2797,20 +2797,21 @@ sub getNodeAttribs unless (scalar keys %{ $data[0] }) { return undef; } - my $attrib; - foreach $datum (@data) { - foreach $attrib (@attribs) - { - unless (defined $datum->{$attrib}) { - - #skip undefined values, save time - next; - } - my $retval; - if (defined($retval = transRegexAttrs($node, $datum->{$attrib}))) { - $datum->{$attrib} = $retval; - } else { - delete $datum->{$attrib}; + if (!exists($options{keep_raw})){ + my $attrib; + foreach $datum (@data) { + foreach $attrib (@attribs) { + unless (defined $datum->{$attrib}) { + #skip undefined values, save time + next; + } + my $retval; + if (defined($retval = transRegexAttrs($node, $datum->{$attrib}))) { + $datum->{$attrib} = $retval; + } + else { + delete $datum->{$attrib}; + } } } } @@ -2984,6 +2985,9 @@ sub getNodeAttribs_nosub_returnany } @results = $self->getAttribs({ $nodekey => $node }, @attribs); + # return the DB without any rendering, this is for fetch attributes of group + return @results if (exists($options{keep_raw})); + my %attribsToDo; for (@attribs) { $attribsToDo{$_} = 0 @@ -4326,8 +4330,10 @@ sub delimitcol { #-------------------------------------------------------------------------------- sub buildWhereClause { my $attrvalstr = shift; # array of atrval strings + my $getkeysonly = shift; my $whereclause; # Where Clause my $firstpass = 1; + my @gotkeys = (); foreach my $m (@{$attrvalstr}) { my $attr; @@ -4368,6 +4374,9 @@ sub buildWhereClause { ($attr, $val) = split />/, $m, 2; $operator = ' > '; } else { + if (defined($getkeysonly)) { + return "Unsupported operator:$m on -w flag input"; + } xCAT::MsgUtils->message("S", "Unsupported operator:$m on -w flag input, could not build a Where Clause."); $whereclause = ""; return $whereclause; @@ -4382,7 +4391,12 @@ sub buildWhereClause { #$whereclause .="\')"; $whereclause .= "\'"; - + if (defined($getkeysonly)) { + push @gotkeys, $attr; + } + } + if (defined($getkeysonly)) { + return \@gotkeys; } return $whereclause; diff --git a/travis.pl b/travis.pl index 988fb958d..11119f160 100644 --- a/travis.pl +++ b/travis.pl @@ -271,19 +271,19 @@ sub send_back_comment{ #-------------------------------------------------------- sub build_xcat_core{ my @output; - my @cmds = ("gpg --list-keys", - "sed -i '/SignWith: /d' $ENV{'PWD'}/build-ubunturepo"); - foreach my $cmd (@cmds){ - print "[build_xcat_core] running $cmd\n"; - @output = runcmd("$cmd"); - if($::RUNCMD_RC){ - print "[build_xcat_core] $cmd ....[Failed]\n"; - send_back_comment("> **BUILD ERROR** : $cmd failed. Please click ``Details`` label in ``Merge pull request`` box for detailed information"); - return 1; - } - } + #my @cmds = ("gpg --list-keys", + # "sed -i '/SignWith: /d' $ENV{'PWD'}/build-ubunturepo"); + #foreach my $cmd (@cmds){ + # print "[build_xcat_core] running $cmd\n"; + # @output = runcmd("$cmd"); + # if($::RUNCMD_RC){ + # print "[build_xcat_core] $cmd ....[Failed]\n"; + # send_back_comment("> **BUILD ERROR** : $cmd failed. Please click ``Details`` label in ``Merge pull request`` box for detailed information"); + # return 1; + # } + #} - my $cmd = "sudo ./build-ubunturepo -c UP=0 BUILDALL=1"; + my $cmd = "sudo ./build-ubunturepo -c UP=0 BUILDALL=1 GPGSIGN=0"; @output = runcmd("$cmd"); print ">>>>>Dumper the output of '$cmd'\n"; print Dumper \@output; @@ -321,8 +321,8 @@ sub install_xcat{ my @cmds = ("cd ./../../xcat-core && sudo ./mklocalrepo.sh", "sudo chmod 777 /etc/apt/sources.list", - "sudo echo \"deb [arch=amd64] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep trusty main\" >> /etc/apt/sources.list", - "sudo echo \"deb [arch=ppc64el] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep trusty main\" >> /etc/apt/sources.list", + "sudo echo \"deb [arch=amd64 allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep xenial main\" >> /etc/apt/sources.list", + "sudo echo \"deb [arch=ppc64el allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/devel/xcat-dep xenial main\" >> /etc/apt/sources.list", "sudo wget -q -O - \"http://xcat.org/files/xcat/repos/apt/apt.key\" | sudo apt-key add -", "sudo apt-get -qq update"); my @output; @@ -339,7 +339,7 @@ sub install_xcat{ } } - my $cmd = "sudo apt-get install xcat --force-yes"; + my $cmd = "sudo apt-get install xcat --allow-remove-essential --allow-unauthenticated"; @output = runcmd("$cmd"); #print ">>>>>Dumper the output of '$cmd'\n"; #print Dumper \@output; @@ -448,7 +448,7 @@ sub check_syntax{ # Return code: #-------------------------------------------------------- sub run_fast_regression_test{ - my $cmd = "sudo apt-get install xcat-test --force-yes"; + my $cmd = "sudo apt-get install xcat-test --allow-remove-essential --allow-unauthenticated"; my @output = runcmd("$cmd"); if($::RUNCMD_RC){ print RED "[run_fast_regression_test] $cmd ....[Failed]\n"; @@ -488,43 +488,20 @@ sub run_fast_regression_test{ @output = runcmd("cat $conf_file"); print Dumper \@output; + $cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -s \"ci_test\" -l'"; + my @caseslist = runcmd("$cmd"); + if($::RUNCMD_RC){ + print RED "[run_fast_regression_test] $cmd ....[Failed]\n"; + print "[run_fast_regression_test] error dumper:\n"; + print Dumper \@caseslist; + return 1; + }else{ + print "[run_fast_regression_test] $cmd .....:\n"; + print Dumper \@caseslist; + } -# $cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -s \"mn_only-wait_fix\" -l'"; -# my @caseslist = runcmd("$cmd"); -# if($::RUNCMD_RC){ -# print RED "[run_fast_regression_test] $cmd ....[Failed]\n"; -# print "[run_fast_regression_test] error dumper:\n"; -# print Dumper \@caseslist; -# return 1; -# }else{ -# print "[run_fast_regression_test] $cmd .....:\n"; -# print Dumper \@caseslist; -# } -# -# #This is a black list for CI test -# #It is useful for debug or development -# #please ignore during common work -## { -## sub array_filter { -## my $src_array_ref = shift; -## my $filter_array_ref = shift; -## -## my @left_array; -## foreach my $item (@{$src_array_ref}) { -## my $hit = 0; -## foreach my $f (@{$filter_array_ref}) { -## $hit = 1 if ($f eq $item); -## } -## push @left_array, $item unless ($hit); -## } -## @$src_array_ref = @left_array; -## } -## -## #my @filter_cases=("testtest"); -## #array_filter(\@caseslist, \@filter_cases); -## } - my @caseslist = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -l caselist -b MN_basic.bundle'"); + #my @caseslist = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -l caselist -b MN_basic.bundle'"); my $casenum = @caseslist; my $x = 0; my @failcase; @@ -613,6 +590,17 @@ my @disk = runcmd("df -h"); print "Disk information:\n"; print Dumper \@disk; +# Hacking the netmask. Not sure if we need to recover it after finish xcattest +# Note: Here has an assumption from Travis VM: only 1 UP Ethernet interface available (CHANGEME if it not as is) +my @intfinfo = runcmd("ip -o link |grep 'link/ether'|grep 'state UP' |awk -F ':' '{print \$2}'|head -1"); +foreach my $nic (@intfinfo) { + print "Hacking the netmask length to 16 if it is 32: $nic\n"; + runcmd("ip -4 addr show $nic|grep 'inet'|grep -q '/32' && sudo ip addr add \$(hostname -I|awk '{print \$1}')/16 dev $nic"); +} +my @ipinfo = runcmd("ip addr"); +print "Networking information:\n"; +print Dumper \@ipinfo; + #Start to check the format of pull request $last_func_start = timelocal(localtime()); print GREEN "\n------ Checking Pull Request Format ------\n"; diff --git a/xCAT-client/pods/man1/bmcdiscover.1.pod b/xCAT-client/pods/man1/bmcdiscover.1.pod index 00d6d8170..41bc9be1b 100644 --- a/xCAT-client/pods/man1/bmcdiscover.1.pod +++ b/xCAT-client/pods/man1/bmcdiscover.1.pod @@ -27,11 +27,11 @@ Note: The scan method currently support is B. =item B<--range> -Specify one or more IP ranges acceptable to nmap. IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3), several IPs with commas (10.1.2.3,10.1.2.10), Ip range with "-" (10.1.2.0-100) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the B command may take a long time to return. +Specify one or more IP ranges acceptable to B. IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3), several IPs with commas (10.1.2.3,10.1.2.10), Ip range with "-" (10.1.2.0-100) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the B command may take a long time to return. =item B<--sn> -Specify one or more service nodes on which bmcdiscover will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. With this option, bmcdiscover will be dispatched to the specified SNs. Then, the nodename of the service node that 'bmcdiscover' is running on will be set to the 'servicenode' attribute of the discovered BMC node. +Specify one or more service nodes on which bmcdiscover will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. With this option, B will be dispatched to the specified SNs. Then, the nodename of the service node that B is running on will be set to the 'servicenode' attribute of the discovered BMC node. =item B<-s> @@ -101,7 +101,7 @@ Output is similar to: servicenode=sn01 conserver=sn01 -4. Discover the BMCs and write the discovered-node definitions into the xCAT database and write out the stanza foramt to the console: +4. Discover the BMCs and write the discovered node definitions into the xCAT database and write out the stanza format to the console: bmcdiscover -s nmap --range "10.4.22-23.100-254" -w -z diff --git a/xCAT-client/pods/man1/lsdef.1.pod b/xCAT-client/pods/man1/lsdef.1.pod index ac677d0f1..a1bf4e764 100644 --- a/xCAT-client/pods/man1/lsdef.1.pod +++ b/xCAT-client/pods/man1/lsdef.1.pod @@ -6,13 +6,13 @@ B - Use this command to list xCAT data object definitions. B [B<-h>|B<--help>] [B<-t> I] [B<-i> I] -B [B<-V>|B<--verbose>] [B<-l>|B<--long>] [B<-s>|B<--short>] [B<-a>|B<--all>] [B<-S>] -[B<-t> I] [B<-o> I] [B<-z>|B<--stanza>] [B<-i> I] +B [B<-V>|B<--verbose>] [B<-a>|B<--all>] [B<-S>] +[B<-t> I] [B<-o> I] [B<-z>|B<--stanza>] [B<-i> I | [B<-l>|B<--long>] | [B<-s>|B<--short>]] [B<-c>|B<--compress>] [B<--osimage>] [B<--nics>] [[B<-w> I==I] [B<-w> I=~I] ...] [I] -B [B<-l>|B<--long>] [B<-a>|B<--all>] [B<-t> I] [B<-z>|B<--stanza>] -[B<-i> I] [B<--template> [I]] +B [B<-a>|B<--all>] [B<-t> I] [B<-z>|B<--stanza>] +[B<-i> I | [B<-l>|B<--long>] | [B<-s>|B<--short>]] [B<--template> [I]] =head1 DESCRIPTION @@ -28,13 +28,13 @@ in the xCAT database and xCAT object definition templates shipped in xCAT. Display all definitions. For performance consideration, the auditlog and eventlog objects will not be listed. -To list auditlog or eventlog objects, use lsdef -t auditlog or lsdef -t eventlog instead. +To list auditlog or eventlog objects, use B or B instead. =item B<-c|--compress> Display information in compressed mode, each output line has format ": ". -The output can be passed to command xcoll or xdshbak for formatted output. -The -c flag must be used with -i flag. +The output can be passed to command B or B for formatted output. +The B<-c> flag must be used with B<-i> flag. =item B<-h|--help> @@ -87,9 +87,10 @@ Verbose mode. =item B<-w> I B<-w> I ... -Use one or multiple -w flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. Use the help option to get a list of valid attributes for each object type. +Use one or multiple B<-w> flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. Use the help option to get a list of valid attributes for each object type. Operator descriptions: + == Select nodes where the attribute value is exactly this value. != Select nodes where the attribute value is not this specific value. =~ Select nodes where the attribute value matches this regular expression. @@ -99,7 +100,7 @@ Note: if the "val" fields includes spaces or any other characters that will be p =item B<-z|--stanza> -Display output in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files. +Display output in stanza format. See the "xcatstanzafile" man page for details on using xCAT stanza files. And default is to list complete object definition, use B<-i> to specify the attribute scope. =back @@ -126,8 +127,6 @@ when defining an xCAT node. To get a list of all the objects that have been defined. - lsdef - OR lsdef -a =item 3. @@ -211,7 +210,7 @@ The hidden nodes are FSP/BPAs. =item 15. -To list the nodes status and use xcoll to format the output. +To list the nodes status and use B to format the output. lsdef -t node -i status -c | xcoll diff --git a/xCAT-openbmc-py/lib/python/agent/common/rest.py b/xCAT-openbmc-py/lib/python/agent/common/rest.py index 46a9f7b2e..2d0ec5c43 100644 --- a/xCAT-openbmc-py/lib/python/agent/common/rest.py +++ b/xCAT-openbmc-py/lib/python/agent/common/rest.py @@ -9,6 +9,7 @@ from gevent.subprocess import Popen, PIPE import requests import urllib3 urllib3.disable_warnings() +from requests.auth import AuthBase import exceptions as xcat_exception @@ -17,6 +18,7 @@ class RestSession(object): def __init__(self): self.session = requests.Session() self.cookies = None + self.auth = None def request(self, method, url, headers, data=None, timeout=30): @@ -24,6 +26,7 @@ class RestSession(object): response = self.session.request(method, url, data=data, headers=headers, + auth=self.auth, verify=False, timeout=timeout) except requests.exceptions.ConnectionError as e: @@ -60,6 +63,9 @@ class RestSession(object): if not self.cookies: self.cookies = requests.utils.dict_from_cookiejar(self.session.cookies) + if not self.auth and 'X-Auth-Token' in response.headers: + self.auth = XTokenAuth(response.headers['X-Auth-Token']) + return response def extract_server_and_port(self, message_string, format="STRING"): @@ -127,3 +133,13 @@ class RestSession(object): raise SelfServerException(error) return response + +class XTokenAuth(AuthBase): + + def __init__(self,authToken): + + self.authToken=authToken + + def __call__(self, auth): + auth.headers['X-Auth-Token']=self.authToken + return(auth) diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_bmcconfig.py b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_bmcconfig.py index b5746eeff..19b990228 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_bmcconfig.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_bmcconfig.py @@ -379,6 +379,8 @@ rmdir \"/tmp/$userid\" \n") except (SelfServerException, SelfClientException) as e: self.callback.error(e.message, node) + self.callback.info("%s: BMC password changed. Update 'bmcpasswd' for the node or the 'passwd' table with the new password." % node) + def _set_apis_values(self, key, value, **kw): node = kw['node'] obmc = openbmc.OpenBMCRest(name=node, nodeinfo=kw['nodeinfo'], messager=self.callback, @@ -430,8 +432,8 @@ rmdir \"/tmp/$userid\" \n") def _print_bmc_netinfo(self, node, ip, netmask, gateway, vlan): - self.callback.info('%s: BMC IP: %s'% (node, ip)) - self.callback.info('%s: BMC Netmask: %s' % (node, netmask)) + self.callback.info('%s: BMC IP: %s' % (node, ip)) + self.callback.info('%s: BMC Netmask: %s' % (node, netmask)) self.callback.info('%s: BMC Gateway: %s' % (node, gateway)) if vlan: self.callback.info('%s: BMC VLAN ID: %s' % (node, vlan)) @@ -440,6 +442,7 @@ rmdir \"/tmp/$userid\" \n") node = kw['node'] node_info = kw['nodeinfo'] + zeroconf = "Unknown" obmc = openbmc.OpenBMCRest(name=node, nodeinfo=node_info, messager=self.callback, debugmode=self.debugmode, verbose=self.verbose) @@ -451,7 +454,7 @@ rmdir \"/tmp/$userid\" \n") return if not netinfo: - return self.callback.error("No network information get", node) + return self.callback.error("Can not get network information", node) if 'error' in netinfo: return self.callback.info('%s: %s' % (node, netinfo['error'])) @@ -470,6 +473,7 @@ rmdir \"/tmp/$userid\" \n") origin_type = netinfo[origin_nic]['ipsrc'] origin_ip_obj = netinfo[origin_nic]['ipobj'] + zeroconf = netinfo[origin_nic]['zeroconf'] if vlan: pre_nic = nic.split('_')[0] @@ -482,6 +486,8 @@ rmdir \"/tmp/$userid\" \n") nic = pre_nic + '_' + vlan try: + # Display Zero Config information in case IP setting fails or set IP is not accessible + self.callback.info('%s: Setting BMC IP configuration... [Zero Config IP: %s]' % (node, zeroconf)) obmc.set_netinfo(nic, ip, prefix, gateway) sleep( 5 ) nic_netinfo = obmc.get_nic_netinfo(nic) @@ -490,7 +496,7 @@ rmdir \"/tmp/$userid\" \n") return if not nic_netinfo: - return self.callback.error('Did not get info for NIC %s' % nic, node) + return self.callback.error('Can not get info for NIC %s' % nic, node) set_success = False for net_id, attr in nic_netinfo.items(): @@ -500,7 +506,7 @@ rmdir \"/tmp/$userid\" \n") set_success = True if not set_success: - return self.callback.error('Config BMC IP failed', node) + return self.callback.error('Setting BMC IP configuration failed. [Zero Config IP: %s]' % zeroconf, node) try: if origin_type == 'DHCP': @@ -508,7 +514,7 @@ rmdir \"/tmp/$userid\" \n") elif origin_type == 'Static': obmc.delete_ip_object(origin_nic, origin_ip_obj) else: - self.callback.error('Get wrong Origin type %s for NIC %s IP object %s' % (origin_type, nic, origin_ip_obj), node) + self.callback.error('Got wrong origin type %s for NIC %s IP object %s' % (origin_type, nic, origin_ip_obj), node) except (SelfServerException, SelfClientException) as e: self.callback.error(e.message, node) @@ -525,7 +531,7 @@ rmdir \"/tmp/$userid\" \n") self.callback.error(e.message, node) return if not netinfo: - return self.callback.error("No network information get", node) + return self.callback.error("Can not get network information", node) defaultgateway = "n/a" bmchostname = "" if 'defaultgateway' in netinfo: diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_inventory.py b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_inventory.py index 0b454d426..dd9d15c76 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_inventory.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_inventory.py @@ -60,7 +60,7 @@ class OpenBMCInventoryTask(ParallelNodesCommand): continue firm_info.append('%s Firmware Product: %s (%s)%s' % - (firm_obj_dict[key].purpose, + (firm_obj_dict[key].purpose.upper(), firm_obj_dict[key].version, firm_obj_dict[key].active, flag)) @@ -70,7 +70,7 @@ class OpenBMCInventoryTask(ParallelNodesCommand): for extended in extendeds: firm_info.append('%s Firmware Product: ' \ '-- additional info: %s' % \ - (firm_obj_dict[key].purpose, extended)) + (firm_obj_dict[key].purpose.upper(), extended)) return firm_info diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/redfish_power.py b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/redfish_power.py new file mode 100644 index 000000000..75b6e079d --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/redfish_power.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python +############################################################################### +# IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html +############################################################################### +# -*- coding: utf-8 -*- +# +from __future__ import print_function +import gevent +import time + +from common.task import ParallelNodesCommand +from common.exceptions import SelfClientException, SelfServerException +from hwctl import redfish_client as redfish + +import logging +logger = logging.getLogger('xcatagent') + +class RedfishPowerTask(ParallelNodesCommand): + """Executor for power-related actions.""" + + def get_state(self, **kw): + + node = kw['node'] + rf = redfish.RedfishRest(name=node, nodeinfo=kw['nodeinfo'], messager=self.callback, + debugmode=self.debugmode, verbose=self.verbose) + + state = 'Unknown' + try: + rf.login() + self.callback.info('%s: %s' % (node, state)) + except (SelfServerException, SelfClientException) as e: + self.callback.error(e.message, node) + + return state diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py index 32f081d06..c244abc40 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py @@ -900,13 +900,15 @@ class OpenBMCRest(object): continue dev,match,netid = k.partition("/ipv4/") if netid: - if 'LinkLocal' in v["Origin"] or v["Address"].startswith("169.254"): - msg = "Found LinkLocal address %s for interface %s, Ignoring..." % (v["Address"], dev) - self._print_record_log(msg, 'get_netinfo') - continue nicid = dev.split('/')[-1] if nicid not in netinfo: netinfo[nicid] = {} + if 'LinkLocal' in v["Origin"] or v["Address"].startswith("169.254"): + msg = "Found LinkLocal address %s for interface %s, Ignoring..." % (v["Address"], dev) + self._print_record_log(msg, 'get_netinfo') + # Save Zero Conf information + netinfo[nicid]["zeroconf"] = v["Address"] + continue if 'ip' in netinfo[nicid]: msg = "%s: Another valid ip %s found." % (node, v["Address"]) self._print_record_log(msg, 'get_netinfo') diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py b/xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py new file mode 100644 index 000000000..9e01def8f --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py @@ -0,0 +1,129 @@ +#!/usr/bin/env python +############################################################################### +# IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html +############################################################################### +# -*- coding: utf-8 -*- +# + +import os +import requests +import json +import time + +from common import utils, rest +from common.exceptions import SelfClientException, SelfServerException + +import logging +logger = logging.getLogger('xcatagent') + +HTTP_PROTOCOL = "https://" +PROJECT_URL = "/redfish/v1" + +SESSION_URL = PROJECT_URL + "/SessionService/Sessions" + +class RedfishRest(object): + + headers = {'Content-Type': 'application/json'} + + def __init__(self, name, **kwargs): + + self.name = name + self.username = None + self.password = None + + if 'nodeinfo' in kwargs: + for key, value in kwargs['nodeinfo'].items(): + setattr(self, key, value) + if not hasattr(self, 'bmcip'): + self.bmcip = self.name + + self.verbose = kwargs.get('debugmode') + self.messager = kwargs.get('messager') + + self.session = rest.RestSession() + self.root_url = HTTP_PROTOCOL + self.bmcip + + def _print_record_log (self, msg, cmd, error_flag=False): + + if self.verbose or error_flag: + localtime = time.asctime( time.localtime(time.time()) ) + log = self.name + ': [redfish_debug] ' + cmd + ' ' + msg + if self.verbose: + self.messager.info(localtime + ' ' + log) + logger.debug(log) + + def _print_error_log (self, msg, cmd): + + self._print_record_log(msg, cmd, True) + + def _log_request (self, method, url, headers, data=None, files=None, file_path=None, cmd=''): + + header_str = ' '.join([ "%s: %s" % (k, v) for k,v in headers.items() ]) + msg = 'curl -k -X %s -H \"%s\" ' % (method, header_str) + + if cmd != 'login': + msg += '-H \"X-Auth-Token: xxxxxx\" ' + + if data: + if cmd == 'login': + data = data.replace('"Password": "%s"' % self.password, '"Password": "xxxxxx"') + data = '-d \'%s\'' % data + msg += '%s %s -v' % (url, data) + else: + msg += url + + self._print_record_log(msg, cmd) + return msg + + def request (self, method, resource, headers=None, payload=None, timeout=30, cmd=''): + + httpheaders = headers or RedfishRest.headers + url = resource + if not url.startswith(HTTP_PROTOCOL): + url = self.root_url + resource + + data = None + if payload: + data=json.dumps(payload) + + self._log_request(method, url, httpheaders, data=data, cmd=cmd) + + try: + response = self.session.request(method, url, headers=httpheaders, data=data, timeout=timeout) + return self.handle_response(response, cmd=cmd) + except SelfServerException as e: + if cmd == 'login': + e.message = "Login to BMC failed: Can't connect to {0} {1}.".format(e.host_and_port, e.detail_msg) + else: + e.message = 'BMC did not respond. ' \ + 'Validate BMC configuration and retry the command.' + self._print_error_log(e.message, cmd) + raise + except ValueError: + error = 'Received wrong format response: %s' % response + self._print_error_log(error, cmd) + raise SelfServerException(error) + + def handle_response (self, resp, cmd=''): + + data = resp.json() + code = resp.status_code + + if code != requests.codes.ok and code != requests.codes.created: + + description = ''.join(data['error']['@Message.ExtendedInfo'][0]['Message']) + error = '[%d] %s' % (code, description) + self._print_error_log(error, cmd) + raise SelfClientException(error, code) + + if cmd == 'login' and not 'X-Auth-Token' in resp.headers: + raise SelfServerException('Login Failed: Did not get Session Token from response') + + self._print_record_log('%s %s' % (code, data['Name']), cmd) + return data + + def login(self): + + payload = { "UserName": self.username, "Password": self.password } + self.request('POST', SESSION_URL, payload=payload, timeout=20, cmd='login') + diff --git a/xCAT-openbmc-py/lib/python/agent/xcatagent/base.py b/xCAT-openbmc-py/lib/python/agent/xcatagent/base.py index ca9521513..fd9a5bb6f 100644 --- a/xCAT-openbmc-py/lib/python/agent/xcatagent/base.py +++ b/xCAT-openbmc-py/lib/python/agent/xcatagent/base.py @@ -2,7 +2,8 @@ from common import utils import gevent from gevent.pool import Pool -MODULE_MAP = {"openbmc": "OpenBMCManager"} +MODULE_MAP = {"openbmc": "OpenBMCManager", + "redfish": "RedfishManager"} class BaseManager(object): def __init__(self, messager, cwd): diff --git a/xCAT-openbmc-py/lib/python/agent/xcatagent/redfish.py b/xCAT-openbmc-py/lib/python/agent/xcatagent/redfish.py new file mode 100644 index 000000000..1e37e9493 --- /dev/null +++ b/xCAT-openbmc-py/lib/python/agent/xcatagent/redfish.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python +############################################################################### +# IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html +############################################################################### +# -*- coding: utf-8 -*- +# + +import os +import gevent +import re +import sys +from docopt import docopt,DocoptExit + +from common import utils +from common import exceptions as xcat_exception +from hwctl.executor.redfish_power import RedfishPowerTask +from hwctl.power import DefaultPowerManager + +from xcatagent import base +import logging +logger = logging.getLogger('xcatagent') +try: + if not logger.handlers: + utils.enableSyslog('xcat.agent') +except: + pass + +DEBUGMODE = False +VERBOSE = False + +# global variables of rpower +POWER_REBOOT_OPTIONS = ('boot', 'reset') +POWER_SET_OPTIONS = ('on', 'off', 'bmcreboot', 'softoff') +POWER_GET_OPTIONS = ('bmcstate', 'state', 'stat', 'status') + +class RedfishManager(base.BaseManager): + def __init__(self, messager, cwd, nodes=None, envs=None): + super(RedfishManager, self).__init__(messager, cwd) + self.nodes = nodes + self.debugmode = (envs and envs.get('debugmode')) or None + #TODO, remove the global variable DEBUGMODE + global DEBUGMODE + DEBUGMODE = envs['debugmode'] + + if self.debugmode: + logger.setLevel(logging.DEBUG) + + def rpower(self, nodesinfo, args): + + # 1, parse args + rpower_usage = """ + Usage: + rpower [-V|--verbose] [boot|bmcreboot|bmcstate|off|on|reset|softoff|stat|state|status] + + Options: + -V --verbose rpower verbose mode. + """ + + try: + opts=docopt(rpower_usage, argv=args) + + self.verbose=opts.pop('--verbose') + action=[k for k,v in opts.items() if v][0] + except Exception as e: + # It will not be here as perl has validation for args + self.messager.error("Failed to parse arguments for rpower: %s" % args) + return + + # 2, validate the args + if action not in (POWER_GET_OPTIONS + POWER_SET_OPTIONS + POWER_REBOOT_OPTIONS): + self.messager.error("Not supported subcommand for rpower: %s" % action) + return + + # 3, run the subcommands + runner = RedfishPowerTask(nodesinfo, callback=self.messager, debugmode=self.debugmode, verbose=self.verbose) + DefaultPowerManager().get_power_state(runner) + diff --git a/xCAT-probe/lib/perl/probe_utils.pm b/xCAT-probe/lib/perl/probe_utils.pm index 9cfe1c319..115814943 100644 --- a/xCAT-probe/lib/perl/probe_utils.pm +++ b/xCAT-probe/lib/perl/probe_utils.pm @@ -290,16 +290,17 @@ sub is_http_ready { my $installdir = shift; my $errormsg_ref = shift; - my $http_status = `netstat -tunlp | grep -e "httpd" -e "apache" | grep "LISTEN" 2>&1`; + my $http_status = `netstat -tnlp | grep -e "httpd" -e "apache" 2>&1`; if (!$http_status) { $$errormsg_ref = "No HTTP listening status get by command 'netstat'"; return 0; - } elsif ($http_status !~ /\S*\s+\S*\s+\S*\s+\S*$httpport\s+.+/) { + } elsif ($http_status !~ /\S*\s+\S*\s+\S*\s+\S*:$httpport\s+.+/) { $$errormsg_ref = "The port defined in 'site' table HTTP is not listening"; return 0; } + my $test_file = "efibootmgr"; - my $http = "http://$mnip:$httpport/$installdir/postscripts/syslog"; + my $http = "http://$mnip:$httpport/$installdir/postscripts/$test_file"; my %httperror = ( "400" => "The request $http could not be understood by the server due to malformed syntax", "401" => "The request requires user authentication.", @@ -330,12 +331,12 @@ sub is_http_ready { $$errormsg_ref = "Prepare test environment error: $!"; return 0; } - my @outputtmp = `wget -O $tmpdir/syslog $http 2>&1`; + my @outputtmp = `wget -O $tmpdir/$test_file $http 2>&1`; my $rst = $?; $rst = $rst >> 8; - if ((!$rst) && (-e "$tmpdir/syslog")) { - unlink("$tmpdir/syslog"); + if ((!$rst) && (-e "$tmpdir/$test_file")) { + unlink("$tmpdir/$test_file"); rmdir ("$tmpdir"); return 1; } elsif ($rst == 4) { @@ -355,7 +356,7 @@ sub is_http_ready { $$errormsg_ref = "Unknown return code of wget <$returncode>."; } } - unlink("$tmpdir/syslog"); + unlink("$tmpdir/$test_file"); if(! rmdir ("$tmpdir")){ $$errormsg_ref .= " Clean test environment error(rmdir $tmpdir): $!"; } diff --git a/xCAT-probe/subcmds/osdeploy b/xCAT-probe/subcmds/osdeploy index 144f31cea..afe461baa 100755 --- a/xCAT-probe/subcmds/osdeploy +++ b/xCAT-probe/subcmds/osdeploy @@ -1169,10 +1169,11 @@ sub handle_cluster_msg { my $log_msg = $log_ref->{msg}; my @split_log = split(/\s+/, $log_msg); - if ($split_log[1] eq "Allowing") { - my $command = $split_log[2]; - my $nodes_str = $split_log[4]; - my $sub_command = $split_log[5]; + # As xcat log message will in both messages.log and cluster.log, need to filter one to avoid the duplication + if ($split_log[1] eq "xCAT:" && $split_log[2] eq "Allowing") { + my $command = $split_log[3]; + my $nodes_str = $split_log[5]; + my $sub_command = $split_log[6]; if ($command eq "rinstall" or $command eq "rnetboot" or ($command eq "rpower" and $sub_command =~ /on|boot|reset/) or ($command eq "xdsh" and $log_msg =~ /reboot|shutdown -r/)) { my @nodes = probe_utils->parse_node_range($nodes_str); @@ -1188,7 +1189,7 @@ sub handle_cluster_msg { } } } - } elsif ($log_ref->{msg} =~ /(.+)\s+status:\s+(.+)\s+statustime:/) { + } elsif ($log_ref->{msg} =~ /INFO xcat.updatestatus - (.+):\s+changing status=(.+)/) { my $nodes = $1; my $status = $2; my $record = "Node status is changed to $status"; diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 818cbf490..759110740 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -139,7 +139,14 @@ sub subvars { } $ENV{INSTALLDIR} = $installroot; + my $httpport; + $httpport = xCAT::TableUtils->get_site_attribute("httpport"); + if (!defined($httpport)) { + $httpport = "80"; + } + $ENV{HTTPPORT} = $httpport; + my $httpportsuffix=":$httpport"; #replace the env with the right value so that correct include files can be found $inc =~ s/#ENV:([^#]+)#/envvar($1)/eg; my $res; @@ -282,6 +289,7 @@ sub subvars { $inc =~ s/#INCLUDE:([^#^\n]+)#/includefile($1, 0, 0)/eg; } + #support multiple paths of osimage in rh/sles diskfull installation my @pkgdirs; if (defined($media_dir)) { @@ -295,11 +303,11 @@ sub subvars { if ($c == 0) { # After some tests, if we put the repo in pre scripts in the kickstart like for rhels6.x # the rhels5.9 will not be installed successfully. So put in kickstart directly. - $source_in_pre .= "echo 'url --url http://'\$nextserver'/$pkgdir' >> /tmp/repos"; - $source .= "url --url http://#TABLE:noderes:\$NODE:nfsserver#/$pkgdir\n"; #For rhels5.9 + $source_in_pre .= "echo 'url --url http://'\$nextserver'$httpportsuffix/$pkgdir' >> /tmp/repos"; + $source .= "url --url http://#TABLE:noderes:\$NODE:nfsserver#$httpportsuffix/$pkgdir\n"; #For rhels5.9 } else { - $source_in_pre .= "\necho 'repo --name=pkg$c --baseurl=http://'\$nextserver'/$pkgdir' >> /tmp/repos"; - $source .= "repo --name=pkg$c --baseurl=http://#TABLE:noderes:\$NODE:nfsserver#/$pkgdir\n"; #for rhels5.9 + $source_in_pre .= "\necho 'repo --name=pkg$c --baseurl=http://'\$nextserver'$httpportsuffix/$pkgdir' >> /tmp/repos"; + $source .= "repo --name=pkg$c --baseurl=http://#TABLE:noderes:\$NODE:nfsserver#$httpportsuffix/$pkgdir\n"; #for rhels5.9 } my $distrepofile="/install/postscripts/repos/$pkgdir/local-repository.tmpl"; if( -f "$distrepofile"){ @@ -309,13 +317,13 @@ sub subvars { open($repofd,"<","$distrepofile"); $repo_in_post = <$repofd>; close($repofd); - $repo_in_post =~ s#baseurl=#baseurl=http://$master/#g; + $repo_in_post =~ s#baseurl=#baseurl=http://$master$httpportsuffix/#g; $writerepo .= "\ncat >/etc/yum.repos.d/local-repository-$c.repo << 'EOF'\n"; $writerepo .="$repo_in_post\n"; $writerepo .="EOF\n"; } } elsif ($platform =~ /^(sles|suse)/) { - my $http = "http://#TABLE:noderes:\$NODE:nfsserver#$pkgdir"; + my $http = "http://#TABLE:noderes:\$NODE:nfsserver#$httpportsuffix/$pkgdir"; $source .= " $http SuSE-Linux-pkg$c @@ -323,7 +331,7 @@ sub subvars { false SuSE-Linux-pkg$c "; - $source_in_pre .= "http://'\$nextserver'$pkgdirSuSE-Linux-pkg$c/falseSuSE-Linux-pkg$c"; + $source_in_pre .= "http://'\$nextserver'$httpportsuffix$pkgdirSuSE-Linux-pkg$c/falseSuSE-Linux-pkg$c"; } elsif ($platform =~ /^sle15*/) { if ( -d "$pkgdir") { opendir(DIR,$pkgdir); @@ -339,7 +347,7 @@ sub subvars { $product_name=$subdir; } if (defined($product_name) && defined($product_dir)){ - $source .="http://XCATNEXTSERVERHOOK$pkgdir$product_name/$product_dir"; + $source .="http://XCATNEXTSERVERHOOK$httpportsuffix$pkgdir$product_name/$product_dir"; } } } @@ -383,6 +391,7 @@ sub subvars { $inc =~ s/#SHORTNAME#/$shortname/g; $inc =~ s/#GETNODEDOMAIN:([^#]+)#/get_node_domain($1)/eg; $inc =~ s/#GETPRINICMAC:([^#]+)#/xCAT::Utils::parseMacTabEntry(tabdb("mac",$1,"mac"),$1)/eg; + $inc =~ s/#COLONHTTPPORT#/$httpportsuffix/eg; if (($::XCATSITEVALS{xcatdebugmode} eq "1") or ($::XCATSITEVALS{xcatdebugmode} eq "2")) { $inc =~ s/#UNCOMMENTOENABLEDEBUGPORT#/ /g; @@ -392,7 +401,7 @@ sub subvars { $inc =~ s/#UNCOMMENTOENABLESSH#/ /g; } - my $sles_sdk_media = "http://" . $tmpl_hash->{tftpserver} . $media_dir . "/sdk1"; + my $sles_sdk_media = "http://" . $tmpl_hash->{tftpserver}.$httpportsuffix . $media_dir . "/sdk1"; $inc =~ s/#SLES_SDK_MEDIA#/$sles_sdk_media/eg; @@ -531,7 +540,7 @@ sub subvars { } } elsif ("ubuntu" eq $platform) { - my $default_script = " wget http://`cat /tmp/xcatserver`" . $ENV{INSTALLDIR} . "/autoinst/getinstdisk; chmod u+x getinstdisk; ./getinstdisk;"; + my $default_script = " wget http://`cat /tmp/xcatserver`".':'.$ENV{HTTPPORT} . $ENV{INSTALLDIR} . "/autoinst/getinstdisk; chmod u+x getinstdisk; ./getinstdisk;"; $inc =~ s/#INCLUDE_GET_INSTALL_DISK_SCRIPT#/$default_script/; } else { @@ -1117,7 +1126,7 @@ sub mirrorspec { if (!$pkgdir) { $pkgdir = $_; } else { - my $osuurl = "http://" . $masternode . $_ . " ./"; + my $osuurl = "http://" . $masternode.':'.$ENV{httpport} . $_ . " ./"; push @mirrors, $osuurl; } } diff --git a/xCAT-server/lib/xcat/monitoring/monitorctrl.pm b/xCAT-server/lib/xcat/monitoring/monitorctrl.pm index afd38801a..87aa3378d 100644 --- a/xCAT-server/lib/xcat/monitoring/monitorctrl.pm +++ b/xCAT-server/lib/xcat/monitoring/monitorctrl.pm @@ -627,7 +627,7 @@ sub getNodeStatusFromNodesetState { Arguments: status -- a hash pointer of the node status. A key is a status string. The value is an array pointer of nodes that have the same status. - for example: {alive=>["node1", "node1"], unreachable=>["node5","node100"]} + for example: {alive=>["node1", "node2"], unreachable=>["node5","node100"]} force -- 1 force the input values to be set. -- 0 make sure if the input value is the next valid value. Returns: @@ -637,7 +637,7 @@ sub getNodeStatusFromNodesetState { #-------------------------------------------------------------------------------- sub setNodeStatusAttributes { - print "monitorctrl::setNodeStatusAttributes called\n"; + #print "monitorctrl::setNodeStatusAttributes called\n"; my $temp = shift; if ($temp =~ /xCAT_monitoring::monitorctrl/) { $temp = shift; @@ -703,8 +703,12 @@ sub setNodeStatusAttributes { if (@$nodes > 0) { $updates{'status'} = $_; $updates{'statustime'} = $currtime; - my $nodestate = "@$nodes status: $updates{'status'} statustime: $updates{'statustime'}"; - xCAT::MsgUtils->message('S', "$nodestate"); + #my $nodestate = "@$nodes status: $updates{'status'} statustime: $updates{'statustime'}"; + foreach my $node (@$nodes) { + # To make the log clear, iterate for each node. This might be potential performance issue! + my $nodestate = "xcat.updatestatus - $node: changing status=$updates{'status'}"; + xCAT::MsgUtils->message('S', "$nodestate"); + } my $where_clause; my $dbname = xCAT::Utils->get_DBName(); diff --git a/xCAT-server/lib/xcat/monitoring/snmpmon.pm b/xCAT-server/lib/xcat/monitoring/snmpmon.pm index 75a8f26bb..a8e35eab9 100644 --- a/xCAT-server/lib/xcat/monitoring/snmpmon.pm +++ b/xCAT-server/lib/xcat/monitoring/snmpmon.pm @@ -759,7 +759,7 @@ sub configSwitch { my $table = xCAT::Table->new('switches', -create => 0); if ($table) { my @tmp1 = $table->getAllAttribs(('switch')); - if (defined(@tmp1) && (@tmp1 > 0)) { + if (scalar @tmp1 > 0) { foreach (@tmp1) { my @switches_tmp = noderange($_->{switch}); if (@switches_tmp == 0) { push @switches_tmp, $_->{switch}; } @@ -1360,7 +1360,7 @@ sub getNodesMonServers my $table = xCAT::Table->new('switches', -create => 0); if ($table) { my @tmp1 = $table->getAllAttribs(('switch')); - if (defined(@tmp1) && (@tmp1 > 0)) { + if (scalar @tmp1 > 0) { foreach (@tmp1) { my @switches_tmp = noderange($_->{switch}); if (@switches_tmp == 0) { push @switches_tmp, $_->{switch}; } diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 91e4a49e9..9b3a3fe34 100755 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -1709,9 +1709,11 @@ sub defmk $objTypeListsHash{$objk}{$obj} = 1; } } + my $numobjrequest = 0; OBJ: foreach my $obj (keys %::FINALATTRS) { + $numobjrequest++; my $type = $::FINALATTRS{$obj}{objtype}; # check to make sure we have type @@ -2034,16 +2036,19 @@ sub defmk if ($error) { my $rsp; - $rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT \nobject definitions."; + $rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT object definitions."; + $rsp->{numofnodes}->[0] = $numobjrequest; xCAT::MsgUtils->message("E", $rsp, $::callback); return 1; } else { my $nodenum = 0; + my $totalnumobj = 0; my $ret = 0; my @nodes_updated = (); foreach my $node (keys %::FINALATTRS) { + $totalnumobj++; if ($::FINALATTRS{$node}{updated}) { $nodenum++; push @nodes_updated, $node; @@ -2065,6 +2070,7 @@ sub defmk $rsp->{data}->[$n] = "$o"; $n++; } + $rsp->{numofnodes}->[0] = $totalnumobj; if ($n > 1) { # Some objects were created ($n was increased), report as success $rsp->{data}->[0] = "The database was updated for the following objects:"; @@ -2078,9 +2084,9 @@ sub defmk } my $rsp; $rsp->{data}->[0] = "$nodenum object definitions have been created or modified."; + $rsp->{numofnodes}->[0] = $totalnumobj; if ($nodenum > 0) { # Some objects were created, report as success - $rsp->{numofnodes}->[0] = $nodenum; xCAT::MsgUtils->message("I", $rsp, $::callback); } else { @@ -2385,9 +2391,10 @@ sub defch } my $nodewithdomain; my $invalidobjname = (); + my $numobjrequest = 0; foreach my $obj (keys %::FINALATTRS) { - + $numobjrequest++; my $isDefined = 0; my $type = $::FINALATTRS{$obj}{objtype}; my %attrhash; @@ -2919,7 +2926,8 @@ sub defch if ($error) { my $rsp; - $rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT \nobject definitions."; + $rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT object definitions."; + $rsp->{numofnodes}->[0] = $numobjrequest; xCAT::MsgUtils->message("E", $rsp, $::callback); return 1; } @@ -2928,7 +2936,9 @@ sub defch my $nodenum = 0; my $ret = 0; my @nodes_updated = (); + my $totalnumobj = 0; foreach my $node (keys %::FINALATTRS) { + $totalnumobj++; if ($::FINALATTRS{$node}{updated}) { $nodenum++; push @nodes_updated, $node; @@ -2955,6 +2965,7 @@ sub defch } else { $rsp->{data}->[0] = "No database was updated"; } + $rsp->{numofnodes}->[0] = $totalnumobj; xCAT::MsgUtils->message("I", $rsp, $::callback); } else @@ -2963,10 +2974,10 @@ sub defch if ($nodenum) { $rsp->{data}->[0] = "$nodenum object definitions have been created or modified."; - $rsp->{numofnodes}->[0] = $nodenum; } else { $rsp->{data}->[0] = "No object definitions have been created or modified."; } + $rsp->{numofnodes}->[0] = $totalnumobj; xCAT::MsgUtils->message("I", $rsp, $::callback); if (scalar(keys %newobjects) > 0) { @@ -3263,7 +3274,7 @@ sub defls # do we want just the object names or all the attr=val - if ($::opt_l || @::noderange || $::opt_o || $::opt_i || $::opt_template) + if ($::opt_l || @::noderange || $::opt_o || $::opt_i || $::opt_z || $::opt_template) { # assume we want the the details - not just the names @@ -3286,7 +3297,7 @@ sub defls # is -i then just get the ones in the list $::ATTRLIST = $::opt_i; - } elsif (@::noderange || $::opt_o) { + } elsif (@::noderange || $::opt_o || $::opt_z) { # if they gave a list of objects then they must want more # than the object names! @@ -3786,6 +3797,8 @@ sub defls my $numobjects = 0; # keep track of how many object we want to display # for each type + my $totalnumobj = 0; + foreach my $type (@::clobjtypes) { # Check if -i specifies valid attributes @@ -3904,6 +3917,7 @@ sub defls # for each object foreach my $obj (sort keys %defhash) { + $totalnumobj++; # include all the obj unless ($obj) { @@ -4157,8 +4171,15 @@ sub defls # Display the definition of objects if (defined($rsp_info->{data}) && scalar(@{ $rsp_info->{data} }) > 0) { - $rsp_info->{numofnodes}->[0] = $numobjects; + $rsp_info->{numofnodes}->[0] = $totalnumobj; xCAT::MsgUtils->message("I", $rsp_info, $::callback); + } else { + if ( $totalnumobj > 0) { + my $rsp; + $rsp->{data}->[0] = "No object definitions have been found"; + $rsp->{numofnodes}->[0] = $totalnumobj; + xCAT::MsgUtils->message("I", $rsp, $::callback); + } } return 0; @@ -4306,9 +4327,11 @@ sub defrm # the memberlist nodes must be updated. my $numobjects = 0; + my $totalnumobj = 0; my %objTypeLists; foreach my $obj (keys %objhash) { + $totalnumobj++; my $objtype = $objhash{$obj}; if (!defined($objTypeLists{$objtype})) # Do no call getObjectsOfType for the same objtype more than once. { @@ -4504,11 +4527,11 @@ sub defrm { if ($numobjects > 0) { + my $rsp; if ($::verbose) { # give results - my $rsp; $rsp->{data}->[0] = "The following objects were removed:"; xCAT::MsgUtils->message("I", $rsp, $::callback); @@ -4518,16 +4541,14 @@ sub defrm $rsp->{data}->[$n] = "$o"; $n++; } - xCAT::MsgUtils->message("I", $rsp, $::callback); } else { - my $rsp; my $nodenum = scalar(keys %objhash); $rsp->{data}->[0] = "$nodenum object definitions have been removed."; - $rsp->{numofnodes}->[0] = $nodenum; - xCAT::MsgUtils->message("I", $rsp, $::callback); } + $rsp->{numofnodes}->[0] = $totalnumobj; + xCAT::MsgUtils->message("I", $rsp, $::callback); # Give a warning message to the user to remove the children of the node. for my $tn (keys %objhash) { @@ -4541,6 +4562,7 @@ sub defrm else { my $rsp; + $rsp->{numofnodes}->[0] = $totalnumobj; $rsp->{data}->[0] = "No objects have been removed from the xCAT database."; xCAT::MsgUtils->message("I", $rsp, $::callback); } diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index 5d9798132..a16765531 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -322,22 +322,29 @@ sub bmcdiscovery_processargs { ###################################### # check if there is nmap or not ###################################### - if (-x '/usr/bin/nmap') - { + if (-x '/usr/bin/nmap') { $nmap_path = "/usr/bin/nmap"; } - elsif (-x '/usr/local/bin/nmap') - { + elsif (-x '/usr/local/bin/nmap') { $nmap_path = "/usr/local/bin/nmap"; } - else - { + else { my $rsp; push @{ $rsp->{data} }, "\tThere is no nmap in /usr/bin/ or /usr/local/bin/. \n "; xCAT::MsgUtils->message("E", $rsp, $::CALLBACK); return 1; } + ###################################### + # check if there is ipmitool-xcat or not + ###################################### + unless (-x '/opt/xcat/bin/ipmitool-xcat') { + my $rsp; + push @{ $rsp->{data} }, "\tThere is no ipmitool-xcat in /opt/xcat/bin/, make sure that package ipmitool-xcat is installed successfully.\n "; + xCAT::MsgUtils->message("E", $rsp, $::CALLBACK); + return 1; + } + if ($::opt_T) { my $msg = "The -t option is deprecated and will be ignored"; my $rsp = {}; diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 44b434e7f..cc265fabb 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -872,7 +872,7 @@ sub mkinstall { my $kcmdline = "nofb utf8 auto url=http://" . $instserver . ":$httpport/install/autoinst/" . $node; $kcmdline .= " xcatd=" . $instserver; - $kcmdline .= " mirror/http/hostname=" . $instserver; + $kcmdline .= " mirror/http/hostname=" . $instserver.":$httpport"; if ($maxmem) { $kcmdline .= " mem=$maxmem"; } @@ -973,6 +973,7 @@ sub mknetboot my $xcatdport = "3001"; my $xcatiport = "3002"; my $nodestatus = "y"; + my $httpport="80"; my @myself = xCAT::NetworkUtils->determinehostname(); my $myname = $myself[ (scalar @myself) - 1 ]; @@ -1003,6 +1004,12 @@ sub mknetboot { $nodestatus = $ref->{value}; } + ($ref) = $sitetab->getAttribs({ key => 'httpport' }, 'value'); + if ($ref and $ref->{value}) + { + $httpport = $ref->{value}; + } + } my %donetftp = (); my %oents = %{ $ostab->getNodesAttribs(\@nodes, [qw(os arch profile provmethod)]) }; diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 151133c7f..3e27ead5f 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -2677,7 +2677,7 @@ sub addnet } } #for cumulus ZTP process - push @netent, " option cumulus-provision-url \"http://$tftp.':' . $httpport/install/postscripts/cumulusztp\";\n"; + push @netent, " option cumulus-provision-url \"http://$tftp:$httpport/install/postscripts/cumulusztp\";\n"; my $ddnserver = $nameservers; $ddnserver =~ s/,.*//; @@ -2717,9 +2717,9 @@ sub addnet # $lstatements = 'if exists gpxe.bus-id { filename = \"\"; } else if exists client-architecture { filename = \"xcat/xnba.kpxe\"; } '.$lstatements; push @netent, " if option user-class-identifier = \"xNBA\" and option client-architecture = 00:00 { #x86, xCAT Network Boot Agent\n"; push @netent, " always-broadcast on;\n"; - push @netent, " filename = \"http://$tftp.':' . $httpport/tftpboot/xcat/xnba/nets/" . $net . "_" . $maskbits . "\";\n"; + push @netent, " filename = \"http://$tftp:$httpport/tftpboot/xcat/xnba/nets/" . $net . "_" . $maskbits . "\";\n"; push @netent, " } else if option user-class-identifier = \"xNBA\" and option client-architecture = 00:09 { #x86, xCAT Network Boot Agent\n"; - push @netent, " filename = \"http://$tftp.':' . $httpport/tftpboot/xcat/xnba/nets/" . $net . "_" . $maskbits . ".uefi\";\n"; + push @netent, " filename = \"http://$tftp:$httpport/tftpboot/xcat/xnba/nets/" . $net . "_" . $maskbits . ".uefi\";\n"; push @netent, " } else if option client-architecture = 00:00 { #x86\n"; push @netent, " filename \"xcat/xnba.kpxe\";\n"; push @netent, " } else if option vendor-class-identifier = \"Etherboot-5.4\" { #x86\n"; @@ -2735,10 +2735,10 @@ sub addnet push @netent, " filename \"elilo.efi\";\n"; push @netent, " } else if option client-architecture = 00:0e { #OPAL-v3\n "; - push @netent, " option conf-file = \"http://$tftp.':' . $httpport/tftpboot/pxelinux.cfg/p/" . $net . "_" . $maskbits . "\";\n"; + push @netent, " option conf-file = \"http://$tftp:$httpport/tftpboot/pxelinux.cfg/p/" . $net . "_" . $maskbits . "\";\n"; push @netent, " } else if substring (option vendor-class-identifier,0,11) = \"onie_vendor\" { #for onie on cumulus switch\n"; - push @netent, " option www-server = \"http://$tftp.':' . $httpport/install/onie/onie-installer\";\n"; + push @netent, " option www-server = \"http://$tftp:$httpport/install/onie/onie-installer\";\n"; push @netent, " } else if substring(filename,0,1) = null { #otherwise, provide yaboot if the client isn't specific\n "; push @netent, " filename \"/yaboot\";\n"; diff --git a/xCAT-server/lib/xcat/plugins/mknb.pm b/xCAT-server/lib/xcat/plugins/mknb.pm index b352f6a5f..a24ad1870 100644 --- a/xCAT-server/lib/xcat/plugins/mknb.pm +++ b/xCAT-server/lib/xcat/plugins/mknb.pm @@ -253,6 +253,10 @@ sub process_request { copy("/usr/lib/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); } elsif (-r "/usr/share/syslinux/pxelinux.0") { copy("/usr/share/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); + } elsif ("/usr/lib/PXELINUX/pxelinux.0") { + copy("/usr/lib/PXELINUX/pxelinux.0", "$tftpdir/pxelinux.0"); + } else { + copy("/opt/xcat/share/xcat/netboot/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); } if (-r "$tftpdir/pxelinux.0") { chmod(0644, "$tftpdir/pxelinux.0"); diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 97c826ab0..f8f74dc46 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -1230,7 +1230,7 @@ sub parse_args { my $option_s; GetOptions( 's' => \$option_s ); return ([ 1, "The -s option is not supported for OpenBMC." ]) if ($option_s); - if ( "resolved" ~~ @ARGV) { + if ( "resolved=" ~~ @ARGV) { return ([ 1, "$usage_errormsg $reventlog_no_id_resolved_errormsg" ]); } return ([ 1, "Only one option is supported at the same time for $command" ]); @@ -1243,7 +1243,7 @@ sub parse_args { if ($command eq "rbeacon") { unless ($subcommand =~ /^on$|^off$|^stat$/) { - return ([ 1, "Only 'on', 'off' or 'stat' are supported for OpenBMC managed nodes."]); + return ([ 1, "Only 'on', 'off' and 'stat' are supported for OpenBMC managed nodes."]); } } elsif ($command eq "rpower") { unless ($subcommand =~ /^on$|^off$|^softoff$|^reset$|^boot$|^bmcreboot$|^bmcstate$|^status$|^stat$|^state$/) { @@ -1291,6 +1291,22 @@ sub parse_args { if ($::RSPCONFIG_CONFIGURED_API_KEY ne -1) { return ([ 1, "Can not query $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{subcommand} information with other options at the same time" ]) if ($#ARGV > 1); # subcommand defined in the configured API hash, return from here, the RSPCONFIG_CONFIGURED_API_KEY is the key into the hash + if ($subcommand =~ /(\w+)=(.*)/) { + my $subcommand_key = $1; + my $subcommand_value = $2; + my $error_msg = "Invalid value '$subcommand_value' for '$subcommand_key'"; + my @valid_values = sort (keys %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} }); + if (!@valid_values) { + if ($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{type} eq "boolean") { + @valid_values = (0, 1); + } else { + return ([1, "$error_msg"]); + } + } + if (! grep { $_ eq $subcommand_value } @valid_values ) { + return ([1, "$error_msg, Valid values: " . join(",", @valid_values)]); + } + } return; } elsif ($subcommand =~ /^(\w+)=(.*)/) { @@ -1729,14 +1745,16 @@ sub parse_command_status { } else { # Everything else is invalid - xCAT::SvrUtils::sendmsg([1, "Invalid value '$subcommand_value' for '$subcommand_key'"], $callback); + my $error_msg = "Invalid value '$subcommand_value' for '$subcommand_key'"; my @valid_values = keys %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} }; if (!@valid_values) { if ($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{type} eq "boolean") { - xCAT::SvrUtils::sendmsg([1, "Valid values: 0,1"], $callback); + xCAT::SvrUtils::sendmsg([1, "$error_msg, Valid values: 0,1"], $callback); + } else { + xCAT::SvrUtils::sendmsg([1, "$error_msg"], $callback); } } else { - xCAT::SvrUtils::sendmsg([1, "Valid values: " . join(",", @valid_values)], $callback); + xCAT::SvrUtils::sendmsg([1, "$error_msg, Valid values: " . join(",", @valid_values)], $callback); } return 1; } @@ -1782,7 +1800,7 @@ sub parse_command_status { $next_status{RSPCONFIG_GET_REQUEST} = "RSPCONFIG_GET_RESPONSE"; $status_info{RSPCONFIG_SET_HOSTNAME_REQUEST}{data} = $1; - $status_info{RSPCONFIG_SET_RESPONSE}{argv} = "Hostname"; + $status_info{RSPCONFIG_SET_RESPONSE}{argv} = "BMC Hostname"; $status_info{RSPCONFIG_GET_RESPONSE}{argv} = "hostname"; return 0; } @@ -2530,7 +2548,7 @@ sub deal_with_response { $cur_url = $status_info{REVENTLOG_RESOLVED_REQUEST}{init_url}; } my $log_id = (split ('/', $cur_url))[5]; - $error = "Invalid ID=$log_id provided to be resolved. [$::RESPONSE_FORBIDDEN]"; + $error = "Invalid ID: $log_id provided to be resolved. [$::RESPONSE_FORBIDDEN]"; } else{ $error = "$::RESPONSE_FORBIDDEN - Requested endpoint does not exist or may indicate function is not yet supported by OpenBMC firmware."; } @@ -3320,7 +3338,7 @@ sub reventlog_response { } else { # Return if there are no entries with callout data - xCAT::SvrUtils::sendmsg("There are no event log entries contributing to LED fault", $callback, $node); + xCAT::SvrUtils::sendmsg([1, "No event log entries needed to be resolved"], $callback, $node); $wait_node_num--; return; } @@ -3878,7 +3896,7 @@ sub rspconfig_api_config_response { my $last_component = $attr_value[-1]; my @valid_values = values %{ $api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{attr_value} }; if ($value) { - xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . " : $last_component", $callback, $node); + xCAT::SvrUtils::sendmsg($api_config_info{$::RSPCONFIG_CONFIGURED_API_KEY}{display_name} . ": $last_component", $callback, $node); my $found = grep(/$value/, @valid_values); if ($found eq 0) { # Received data value not expected @@ -4113,7 +4131,7 @@ sub rspconfig_dump_response { if ($node_info{$node}{cur_status} eq "RSPCONFIG_DUMP_CLEAR_RESPONSE") { if ($response_info->{'message'} eq $::RESPONSE_OK) { my $dump_id = $status_info{RSPCONFIG_DUMP_CLEAR_RESPONSE}{argv}; - xCAT::MsgUtils->message("I", { data => ["[$dump_id] clear"] }, $callback) unless ($next_status{ $node_info{$node}{cur_status} }); + xCAT::MsgUtils->message("I", { data => ["$node: [$dump_id] clear"] }, $callback) unless ($next_status{ $node_info{$node}{cur_status} }); } else { my $error_msg = "Could not clear BMC diagnostics successfully (". $response_info->{'message'} . ")"; xCAT::MsgUtils->message("W", { data => ["$node: $error_msg"] }, $callback) if ($next_status{ $node_info{$node}{cur_status} }); diff --git a/xCAT-server/lib/xcat/plugins/openbmc2.pm b/xCAT-server/lib/xcat/plugins/openbmc2.pm index 9ccfac90a..a70a2f5ee 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc2.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc2.pm @@ -167,8 +167,8 @@ my %rsp_set_valid_values = ( autoreboot => "0|1", bootmode => "regular|safe|setup", powersupplyredundancy => "disabled|enabled", - powerrestorepolicy => "restore|always_on|always_off", - timesyncmethod => "ntp|manual", + powerrestorepolicy => "always_off|always_on|restore", + timesyncmethod => "manual|ntp", ); my @rspconfig_get_options = (@rsp_common_options, qw/ipsrc sshcfg gard dump/); #------------------------------------------------------- @@ -202,7 +202,7 @@ sub parse_args { if ($command eq "rbeacon") { unless ($subcommand =~ /^on$|^off$|^stat$/) { - return ([ 1, "Only 'on', 'off' or 'stat' is supported for OpenBMC managed nodes."]); + return ([ 1, "Only 'on', 'off' and 'stat' are supported for OpenBMC managed nodes."]); } } elsif ($command eq "rflash") { my ($activate, $check, $delete, $directory, $list, $upload) = (0) x 6; diff --git a/xCAT-server/lib/xcat/plugins/pxe.pm b/xCAT-server/lib/xcat/plugins/pxe.pm index 0031d9bdf..dab9cbe81 100644 --- a/xCAT-server/lib/xcat/plugins/pxe.pm +++ b/xCAT-server/lib/xcat/plugins/pxe.pm @@ -478,24 +478,19 @@ sub process_request { } #end prescripts code - if (!-r "$tftpdir/pxelinux.0") { - unless (-r "/usr/lib/syslinux/pxelinux.0" or -r "/usr/share/syslinux/pxelinux.0") { - $::PXE_callback->({ error => ["Unable to find pxelinux.0 "], errorcode => [1] }); - return; + my @pxelinuxpaths=("/usr/lib/syslinux/pxelinux.0","/usr/share/syslinux/pxelinux.0","/usr/lib/PXELINUX/pxelinux.0","/opt/xcat/share/xcat/netboot/syslinux/pxelinux.0"); + foreach $path (@pxelinuxpaths) { + if (-r "$path") { + copy("$path","$globaltftpdir/pxelinux.0"); + chmod(0644, "$globaltftpdir/pxelinux.0"); + last; } - if (-r "/usr/lib/syslinux/pxelinux.0") { - copy("/usr/lib/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); - } else { - copy("/usr/share/syslinux/pxelinux.0", "$tftpdir/pxelinux.0"); - } - chmod(0644, "$tftpdir/pxelinux.0"); } - unless (-r "$tftpdir/pxelinux.0") { - $::PXE_callback->({ errror => ["Unable to find pxelinux.0 from syslinux"], errorcode => [1] }); + unless (-r "$globaltftpdir/pxelinux.0") { + $::PXE_callback->({ errror => ["Unable to find pxelinux.0 from syslinux or pxelinux"], errorcode => [1] }); return; } - $errored = 0; my %bphash; my $inittime = 0; diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index 0d428a5d9..64f3933f8 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -732,6 +732,18 @@ sub tabdump foreach my $w (@{$OPTW}) { # get each attr=val push @attrarray, $w; } + my $keys = xCAT::Table::buildWhereClause(\@attrarray, "1"); + if (ref($keys) ne 'ARRAY') { + $cb->({ error => ["$keys"], errorcode => [1] }); + return; + } else { + foreach my $k (@$keys) { + unless (grep /$k/, @{ $xCAT::Schema::tabspec{$table}->{cols} }) { + $cb->({ error => ["No column \"$k\" in table \"$table\""], errorcode => [1] }); + return; + } + } + } @ents = $tabh->getAllAttribsWhere(\@attrarray, 'ALL'); @$recs = (); foreach my $e (@ents) { @@ -2370,6 +2382,16 @@ sub tabch { } } + my $err_found = 0; + for my $k (keys %keyhash) { + unless (grep /$k/, @{ $xCAT::Schema::tabspec{$table}->{cols} }) { + $callback->({ error => ["No column \"$k\" in table \"$table\""], errorcode => [1] }); + $err_found = 1; + } + } + if ($err_found) { + return 1; + } #splice assignment if (grep /\+=/, $temp) { diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 5ecc294de..71aa7bc75 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -509,7 +509,12 @@ sub do_installm_service { node => [$node], arg => ["$newstat"], ); - xCAT::MsgUtils->trace(0, "I", "xcatd: triggering \'updatenodestat $node $newstat\'..."); + # TODO, better to use constant here for the specified status + if ($newstat eq 'installing') { + xCAT::MsgUtils->trace(0, "I", "xcat.updatestatus - $node: provisioning detected..."); + } elsif ($newstat eq 'netbooting') { + xCAT::MsgUtils->trace(0, "I", "xcat.updatestatus - $node: provisioning detected..."); + } # node should be blocked, race condition may occur otherwise #my $pid=xCAT::Utils->xfork(); #unless ($pid) { # fork off the nodeset and potential slowness @@ -2625,6 +2630,10 @@ sub populate_site_hash { foreach (@records) { $::XCATSITEVALS{ $_->{key} } = $_->{value}; } + + unless (exists($::XCATSITEVALS{'httpport'}) and ($::XCATSITEVALS{'httpport'} ne "")){ + $::XCATSITEVALS{'httpport'}="80"; + } } sub populate_vpd_hash { diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 6cf90fb96..32298bb92 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -43,7 +43,6 @@ chmod 0755 /tmp/updateflag cd /tmp log_label="xcat.deployment" -msgutil_r "$MASTER_IP" "info" "=============deployment starting====================" "/var/log/xcat/xcat.log" "$log_label" msgutil_r "$MASTER_IP" "info" "Executing post.xcat to prepare for firstbooting ..." "/var/log/xcat/xcat.log" "$log_label" RAND=$(perl -e 'print int(rand(50)). "\n"') diff --git a/xCAT-server/share/xcat/install/scripts/pre.rh b/xCAT-server/share/xcat/install/scripts/pre.rh index eedaab849..fd84bb2b8 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.rh +++ b/xCAT-server/share/xcat/install/scripts/pre.rh @@ -2,7 +2,11 @@ export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then set -x fi - +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running Anaconda Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" if grep n8r /proc/cmdline > /dev/null 2>&1; then stty crtscts @@ -183,7 +187,7 @@ fi #also, find first available block device (sda or vda likely) #TODO: pick a likely non-SAN target if possible shopt -s nullglob - +msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label" # # The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu. # It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk @@ -204,7 +208,7 @@ else fi BOOTFSTYPE=ext3 EFIFSTYPE=vfat - +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" if [ `uname -m` = "ppc64" ]; then echo 'part None --fstype "PPC PReP Boot" --ondisk '$instdisk' --size 8' >> /tmp/partitionfile fi @@ -227,7 +231,7 @@ echo "part / --size 1 --grow --ondisk $instdisk --fstype $FSTYPE" >> /tmp/partit echo "=================The Partition Scheme================" cat /tmp/partitionfile echo "=====================================================" - +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" # The following code is to generate the repository for the installation cat /proc/cmdline diff --git a/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 b/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 index 7bea14300..09769e5e4 100755 --- a/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 +++ b/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 @@ -2,7 +2,11 @@ export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then set -x fi - +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running Anaconda Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" if grep n8r /proc/cmdline > /dev/null 2>&1; then stty crtscts @@ -38,7 +42,6 @@ sock.close() EOF - cat >/tmp/foo.py < /tmp/vgs 2>&1 +vgchange -a n xcatvg +vgremove -f xcatvg + +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" echo "ignoredisk --only-use=$instdisk" >> /tmp/partitionfile if [ `uname -m` = "ppc64" -o `uname -m` = "ppc64le" ]; then echo 'part None --fstype "PPC PReP Boot" --ondisk '$instdisk' --size 8' >> /tmp/partitionfile @@ -187,8 +197,8 @@ fi echo "part /boot --size 512 --fstype $BOOTFSTYPE --ondisk $instdisk" >> /tmp/partitionfile echo "part swap --recommended --ondisk $instdisk" >> /tmp/partitionfile echo "part pv.01 --size 1 --grow --ondisk $instdisk" >> /tmp/partitionfile -echo "volgroup system pv.01" >> /tmp/partitionfile -echo "logvol / --vgname=system --name=root --size 1 --grow --fstype $FSTYPE" >> /tmp/partitionfile +echo "volgroup xcatvg pv.01" >> /tmp/partitionfile +echo "logvol / --vgname=xcatvg --name=root --size 1 --grow --fstype $FSTYPE" >> /tmp/partitionfile #specify "bootloader" configuration in "/tmp/partitionfile" if there is no user customized partition file BOOTLOADER="bootloader " @@ -218,6 +228,7 @@ cat /tmp/partitionfile echo "=====================================================" # The following code is to generate the repository for the installation +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" cat /proc/cmdline NEXTSERVER=`cat /proc/cmdline | grep http | head -n 1` diff --git a/xCAT-server/share/xcat/install/scripts/pre.rhels8 b/xCAT-server/share/xcat/install/scripts/pre.rhels8 index eb50301b4..92ad09f34 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.rhels8 +++ b/xCAT-server/share/xcat/install/scripts/pre.rhels8 @@ -5,7 +5,11 @@ case "$XCATDEBUGMODE" in set -x ;; esac - +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running Anaconda Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" if grep -q n8r /proc/cmdline >/dev/null 2>&1 then stty crtscts @@ -148,7 +152,7 @@ esac # also, find first available block device (sda or vda likely) # TODO: pick a likely non-SAN target if possible shopt -s nullglob - +msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label" # # The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu. # It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk @@ -162,7 +166,7 @@ fi BOOTFSTYPE=ext4 FSTYPE=ext4 EFIFSTYPE=efi - +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" echo "ignoredisk --only-use=$instdisk" >>/tmp/partitionfile case "$(uname -m)" in "ppc64"|"ppc64le") @@ -210,7 +214,7 @@ fi echo "================ The Partition Scheme ===============" cat /tmp/partitionfile echo "=====================================================" - +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" # The following code is to generate the repository for the installation cat /proc/cmdline diff --git a/xCAT-server/share/xcat/install/scripts/pre.sle15 b/xCAT-server/share/xcat/install/scripts/pre.sle15 index 127742a60..733fbe66b 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.sle15 +++ b/xCAT-server/share/xcat/install/scripts/pre.sle15 @@ -9,6 +9,11 @@ #!/bin/sh { +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running AutoYaST Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" echo "Running AutoYaST Pre-Installation script..." export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" @@ -119,7 +124,7 @@ fi /tmp/foo.awk >/tmp/foo.log 2>&1 & shopt -s nullglob - +msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label" # # The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu. # It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk @@ -129,7 +134,7 @@ if [ -e "/tmp/xcat.install_disk" ]; then instdisk=`cat /tmp/xcat.install_disk` fi - +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" if [ -d /sys/firmware/efi ]; then sed -e 's!XCATPARTITIONHOOK!'$instdisk'vfat/boot/efi128mbswapauto/auto!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml else @@ -147,7 +152,7 @@ if [ -r "/tmp/partitionfile" ]; then sed -e '//{N;N;s!.*!'$con'!}' /tmp/profile/autoinst.xml > /tmp/profile/modified1.xml sed -e 's!xcattempspace! !g' /tmp/profile/modified1.xml > /tmp/profile/modified.xml fi - +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" export nextserver=`cat /proc/cmdline | grep http | awk -F'autoyast=http://' {'print \$2'} | awk -F':' {'print \$1'}` cp /tmp/profile/modified.xml /tmp/profile/modified1.xml sed -e 's!XCATNEXTSERVERHOOK!'$nextserver'!' /tmp/profile/modified1.xml > /tmp/profile/modified.xml diff --git a/xCAT-server/share/xcat/install/scripts/pre.sles b/xCAT-server/share/xcat/install/scripts/pre.sles index 94c414560..5ddc37786 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.sles +++ b/xCAT-server/share/xcat/install/scripts/pre.sles @@ -9,6 +9,11 @@ #!/bin/sh { +export MASTER_IP="#ENV:MASTER_IP#" +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib# +log_label="xcat.deployment" +msgutil_r "$MASTER_IP" "info" "============deployment starting============" "/var/log/xcat/xcat.log" "$log_label" +msgutil_r "$MASTER_IP" "info" "Running AutoYaST Pre-Installation script..." "/var/log/xcat/xcat.log" "$log_label" echo "Running AutoYaST Pre-Installation script..." export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" @@ -119,7 +124,7 @@ fi /tmp/foo.awk >/tmp/foo.log 2>&1 & shopt -s nullglob - +msgutil_r "$MASTER_IP" "info" "Detecting install disk..." "/var/log/xcat/xcat.log" "$log_label" # # The getinstdisk script is common for RHEL/SLES/PowerKVM/Ubuntu. # It will attempt to select the install disk and write the selection to /tmp/xcat.install_disk @@ -129,7 +134,7 @@ if [ -e "/tmp/xcat.install_disk" ]; then instdisk=`cat /tmp/xcat.install_disk` fi - +msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" if [ -d /sys/firmware/efi ]; then sed -e 's!XCATPARTITIONHOOK!'$instdisk'vfat/boot/efi128mbswapauto/auto!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml else @@ -147,7 +152,7 @@ if [ -r "/tmp/partitionfile" ]; then sed -e '//{N;N;s!.*!'$con'!}' /tmp/profile/autoinst.xml > /tmp/profile/modified1.xml sed -e 's!xcattempspace! !g' /tmp/profile/modified1.xml > /tmp/profile/modified.xml fi - +msgutil_r "$MASTER_IP" "info" "Generate the repository for the installation" "/var/log/xcat/xcat.log" "$log_label" export nextserver=`cat /proc/cmdline | grep http | awk -F'autoyast=http://' {'print \$2'} | awk -F':' {'print \$1'}` cp /tmp/profile/modified.xml /tmp/profile/modified1.xml sed -e 's!!#INSTALL_SOURCES_IN_PRE#!' /tmp/profile/modified1.xml > /tmp/profile/modified.xml diff --git a/xCAT-server/share/xcat/install/scripts/pre.ubuntu b/xCAT-server/share/xcat/install/scripts/pre.ubuntu index 2a64b2ae8..f528eec91 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.ubuntu +++ b/xCAT-server/share/xcat/install/scripts/pre.ubuntu @@ -5,11 +5,11 @@ fi #!/bin/sh -if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then - killall syslogd - syslogd -R #XCATVAR:XCATMASTER# -fi - +killall syslogd +syslogd -R #XCATVAR:XCATMASTER# +log_label="xcat.deployment" +logger -t $log_label -p "info" "============deployment starting============" +logger -t $log_label -p "info" "Running preseeding early_command Installation script..." if [ ! -c /dev/vcs ]; then mknod /dev/vcs c 7 0 fi @@ -187,7 +187,7 @@ base64decode() ))}\\x\${h$(( o2 / 16 ))}\${h$(( o2 % 16 ))}\"" done } - +logger -t $log_label -p "info" "Generate partition file..." if [ -d /sys/firmware/efi ]; then echo "ubuntu-efi ::" > /tmp/partitionfile echo " 512 512 1024 fat16" >> /tmp/partitionfile diff --git a/xCAT-server/share/xcat/install/scripts/pre.ubuntu.ppc64 b/xCAT-server/share/xcat/install/scripts/pre.ubuntu.ppc64 index b410b181f..84141c10b 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.ubuntu.ppc64 +++ b/xCAT-server/share/xcat/install/scripts/pre.ubuntu.ppc64 @@ -5,11 +5,10 @@ fi #!/bin/sh -if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then - killall syslogd - syslogd -R #XCATVAR:XCATMASTER# -fi - +killall syslogd +syslogd -R #XCATVAR:XCATMASTER# +logger -t $log_label -p "info" "============deployment starting============" +logger -t $log_label -p "info" "Running preseeding early_command Installation script..." if [ ! -c /dev/vcs ]; then mknod /dev/vcs c 7 0 fi @@ -201,7 +200,7 @@ base64decode() ))}\\x\${h$(( o2 / 16 ))}\${h$(( o2 % 16 ))}\"" done } - +logger -t $log_label -p "info" "Generate partition file..." if [ -d /sys/firmware/efi ]; then echo "ubuntu-efi ::" > /tmp/partitionfile echo " 512 512 1024 fat16" >> /tmp/partitionfile diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.tmpl b/xCAT-server/share/xcat/install/ubuntu/compute.tmpl index 8bc2f7538..e784e01ac 100644 --- a/xCAT-server/share/xcat/install/ubuntu/compute.tmpl +++ b/xCAT-server/share/xcat/install/ubuntu/compute.tmpl @@ -124,7 +124,7 @@ xserver-xorg xserver-xorg/config/monitor/mode-list \ d-i preseed/early_command string \ { \ echo "Running preseeding early_command Installation script..."; \ - wget http://`cat /tmp/xcatserver`/install/autoinst/#HOSTNAME#.pre; \ + wget http://`cat /tmp/xcatserver`#COLONHTTPPORT#/install/autoinst/#HOSTNAME#.pre; \ chmod u+x #HOSTNAME#.pre; \ ./#HOSTNAME#.pre; \ umount /media || true; \ @@ -135,7 +135,7 @@ d-i preseed/late_command string \ { \ cat /tmp/pre-install.log >> /target/var/log/xcat/xcat.log; \ echo "Running preseeding late_command Installation script..."; \ - wget http://`cat /tmp/xcatserver`/install/autoinst/#HOSTNAME#.post; \ + wget http://`cat /tmp/xcatserver`#COLONHTTPPORT#/install/autoinst/#HOSTNAME#.post; \ chmod u+x #HOSTNAME#.post; \ cp ./#HOSTNAME#.post /target/root/post.script; \ mount -o bind /proc /target/proc -t proc; \ diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/install.statelite b/xCAT-server/share/xcat/netboot/sles/dracut_033/install.statelite index 7c7646652..2c00d3ec8 100755 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/install.statelite +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/install.statelite @@ -1,7 +1,7 @@ #!/bin/sh echo $drivers dracut_install wget cpio gzip modprobe wc touch echo cut -dracut_install grep ifconfig hostname awk egrep grep dirname expr +dracut_install grep ifconfig hostname awk egrep grep dirname expr logger dracut_install parted mke2fs bc mkswap swapon chmod inst "$moddir/xcat-updateflag" "/tmp/updateflag" inst_hook pre-mount 5 "$moddir/xcat-premount.sh" diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-premount.sh b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-premount.sh index 9f320bb66..f9b7a5c94 100644 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-premount.sh +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-premount.sh @@ -1,6 +1,5 @@ #!/bin/sh #script to update nodelist.nodestatus during provision - XCAT="$(getarg XCAT=)" STATEMNT="$(getarg STATEMNT=)" MASTER=`echo $XCAT |awk -F: '{print $1}'` @@ -14,6 +13,7 @@ XCATIPORT="3002" fi log_label="xcat.deployment" +xcatdebugmode="$(getarg xcatdebugmode=)" [ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting====================" logger $SYSLOGHOST -t $log_label -p local4.info "Starting xcat-premount..." diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh index d8e12e290..9471787b7 100755 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcat-prepivot.sh @@ -1,8 +1,13 @@ #!/bin/sh +log_label="xcat.deployment" NEWROOT=/sysroot SERVER=${SERVER%%/*} SERVER=${SERVER%:} RWDIR=.statelite +XCAT="$(getarg XCAT=)" +xcatdebugmode="$(getarg xcatdebugmode=)" +XCATMASTER=$XCAT +MASTER=`echo $XCATMASTER |awk -F: '{print $1}'` if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other than nfs open, will u se // to detect uri in the future I guess SNAPSHOTSERVER=${STATEMNT%:*} SNAPSHOTROOT=${STATEMNT#*/} @@ -14,7 +19,8 @@ if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other SNAPSHOTSERVER= fi fi - +[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" +logger $SYSLOGHOST -t $log_label -p local4.info "Executing xcat-prepivot to set up statelite..." echo Setting up Statelite mkdir -p $NEWROOT @@ -25,15 +31,18 @@ MAXTRIES=7 ITER=0 if [ ! -e "$NEWROOT/$RWDIR" ]; then echo "" - echo "This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... " + msg="This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... " + echo "$msg" echo "" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh fi if [ ! -e "$NEWROOT/etc/init.d/statelite" ]; then echo "" - echo "$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with th e -m statelite mode" + msg="$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with th e -m statelite mode" echo "" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh fi @@ -57,15 +66,19 @@ if [ ! -z $SNAPSHOTSERVER ]; then while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Possible problems: + msg="Your are dead, rpower $ME boot to play again. + Possible problems: 1. $SNAPSHOTSERVER is not exporting $SNAPSHOTROOT ? 2. Is DNS set up? Maybe that's why I can't mount $SNAPSHOTSERVER." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh exit fi RS= $(( $RANDOM % 20 )) - echo "Trying again in $RS seconds..." + msg="Trying again in $RS seconds..." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.info "$msg" sleep $RS done @@ -76,8 +89,10 @@ if [ ! -z $SNAPSHOTSERVER ]; then while ! umount -l $NEWROOT/$RWDIR/persistent; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Cannot umount $NEWROOT/$RWDIR/persistent." + msg="Your are dead, rpower $ME boot to play again. + Cannot umount $NEWROOT/$RWDIR/persistent." + echo "$msg" + logger $SYSLOGHOST -t $log_label -p local4.error "$msg" /bin/sh exit fi @@ -91,8 +106,10 @@ if [ ! -z $SNAPSHOTSERVER ]; then while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then - echo "Your are dead, rpower $ME boot to play again." - echo "Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME." + msg="Your are dead, rpower $ME boot to play again. + Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME." + echo $msg + logger $SYSLOGHOST -t $log_label -p local4.info "$msg" /bin/sh exit fi @@ -103,8 +120,10 @@ if [ ! -z $SNAPSHOTSERVER ]; then fi # TODO: handle the dhclient/resolv.conf/ntp, etc -echo "Get to enable localdisk" +logger $SYSLOGHOST -t $log_label -p local4.info "Enabling localdisk ..." +echo "Enable localdisk ..." $NEWROOT/etc/init.d/localdisk +logger $SYSLOGHOST -t $log_label -p local4.info "Preparing mount points ..." $NEWROOT/etc/init.d/statelite READONLY=yes export READONLY @@ -175,3 +194,4 @@ fi echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/xcat.sh # force udevsettle to break > $hookdir/initqueue/work +logger $SYSLOGHOST -t $log_label -p local4.info "Exit xcat-prepivot" diff --git a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot index ceb6bbd8d..7414e5b7d 100755 --- a/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot +++ b/xCAT-server/share/xcat/netboot/sles/dracut_033/xcatroot @@ -1,11 +1,12 @@ #!/bin/sh - +log_label="xcat.deployment" NEWROOT=$3 RWDIR=.statelite -XCATMASTER=$XCAT . /lib/dracut-lib.sh +XCAT="$(getarg XCAT=)" +XCATMASTER=$XCAT rootlimit="$(getarg rootlimit=)" @@ -19,25 +20,27 @@ XCATIPORT="3002" fi xcatdebugmode="$(getarg xcatdebugmode=)" +[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER" +logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting====================" +logger $SYSLOGHOST -t $log_label -p local4.info "Executing xcatroot to prepare for netbooting (dracut_033)..." -[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "running xcatroot...." - -[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "MASTER=$MASTER XCATIPORT=$XCATIPORT" +[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "MASTER=$MASTER XCATIPORT=$XCATIPORT" if [ $NODESTATUS -ne 0 ];then -[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "nodestatus: netbooting,reporting..." -/tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting" + logger $SYSLOGHOST -t $log_label -p local4.info "Sending request to $MASTER:$XCATIPORT for changing status to netbooting..." + /tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting" fi if [ ! -z "$imgurl" ]; then if [ xhttp = x${imgurl%%:*} ]; then + logger $SYSLOGHOST -t $log_label -p local4.info "Downloading rootfs image from $imgurl..." NFS=0 FILENAME=${imgurl##*/} while [ ! -r "$FILENAME" ]; do - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "downloading $imgurl...." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "downloading $imgurl...." echo Getting $imgurl... if ! wget -nv $imgurl; then - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "downloading $imgurl failed,retrying...." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "downloading $imgurl failed,retrying...." rm -f $FILENAME sleep 27 fi @@ -68,7 +71,7 @@ if [ -r /rootimg.sfs ]; then mount --move /ro $NEWROOT/ro mount --move /rw $NEWROOT/rw elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "rootimg downloaded,setting up RAM-root tmpfs...." + logger $SYSLOGHOST -t $log_label -p local4.info "Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]..." echo Setting up RAM-root tmpfs. if [ -z $rootlimit ];then mount -t tmpfs -o mode=755 rootfs $NEWROOT @@ -77,7 +80,7 @@ elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then fi cd $NEWROOT - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Extracting root filesystem:" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Extracting root filesystem:" echo -n "Extracting root filesystem:" if [ -r /rootimg.cpio.gz ]; then if [ -x /bin/cpio ]; then @@ -93,10 +96,10 @@ elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then fi fi $NEWROOT/etc/init.d/localdisk - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Done...." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Done...." echo Done elif [ -r /rootimg.tar.gz ] || [ -r /rootimg.tar.xz ]; then - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "rootimg downloaded,setting up RAM-root tmpfs...." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "rootimg downloaded,setting up RAM-root tmpfs...." echo Setting up RAM-root tmpfs. if [ -z $rootlimit ];then mount -t tmpfs -o mode=755 rootfs $NEWROOT @@ -105,7 +108,7 @@ elif [ -r /rootimg.tar.gz ] || [ -r /rootimg.tar.xz ]; then fi cd $NEWROOT - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Extracting root filesystem:" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Extracting root filesystem:" echo -n "Extracting root filesystem:" if [ -r /rootimg.tar.gz ]; then tar --selinux --xattrs-include='*' -zxf /rootimg.tar.gz @@ -119,7 +122,7 @@ elif [ -r /rootimg.tar.gz ] || [ -r /rootimg.tar.xz ]; then fi fi $NEWROOT/etc/init.d/localdisk - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Done...." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Done...." echo Done elif [ -r /rootimg-statelite.gz ]; then echo Setting up RAM-root tmpfs for statelite mode. @@ -244,18 +247,18 @@ elif [ -r /rootimg-statelite.gz ]; then mount -n --bind /sys $NEWROOT/sys else - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "Failed to download image, panicing in 5..." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "Failed to download image, panicing in 5..." echo -n Failed to download image, panicing in 5... for i in 4 3 2 1 0; do /bin/sleep 1 - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "$i..." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "$i..." echo -n $i... done - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "You're dead. rpower nodename reset to play again." - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "* Did you packimage with -m cpio, -m squashfs, or -m nfs?" - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "* If using -m squashfs did you include aufs.ko with geninitrd? e.g.: -n tg3,squashfs,aufs,loop" - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "If using -m nfs did you export NFS and sync rootimg? And did you include the aufs and nfs modules in the proper order: e.g.: -n tg3,aufs,loop,sunrpc,lockd,nfs_acl,nfs" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "You're dead. rpower nodename reset to play again." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "* Did you packimage with -m cpio, -m squashfs, or -m nfs?" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "* If using -m squashfs did you include aufs.ko with geninitrd? e.g.: -n tg3,squashfs,aufs,loop" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "If using -m nfs did you export NFS and sync rootimg? And did you include the aufs and nfs modules in the proper order: e.g.: -n tg3,aufs,loop,sunrpc,lockd,nfs_acl,nfs" echo echo "You're dead. rpower nodename reset to play again. @@ -296,7 +299,7 @@ if [ -z $STATEMNT ]; then netif=${lf#*.} netif=${netif%.*} cp $lf "$NEWROOT/var/lib/dhclient/dhclient-$netif.leases" - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "saving $NEWROOT/var/lib/dhclient/dhclient-$netif.leases" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "saving $NEWROOT/var/lib/dhclient/dhclient-$netif.leases" done if [ ! -z "$ifname" ]; then @@ -312,10 +315,10 @@ if [ -z $STATEMNT ]; then if [ ! -z "$MACX" ] && [ ! -z "$ETHX" ]; then if [ ! -e $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX ]; then - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "creating $NEWROOT/etc/sysconfig/network-scripts/ifcfg-$ETHX" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "creating $NEWROOT/etc/sysconfig/network-scripts/ifcfg-$ETHX" touch $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX fi - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "writing $NEWROOT/etc/sysconfig/network-scripts/ifcfg-$ETHX: DEVICE=$ETHX;BOOTPROTO=dhcp;HWADDR=$MACX;ONBOOT=yes" + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "writing $NEWROOT/etc/sysconfig/network-scripts/ifcfg-$ETHX: DEVICE=$ETHX;BOOTPROTO=dhcp;HWADDR=$MACX;ONBOOT=yes" echo "DEVICE=$ETHX" > $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX echo "BOOTPROTO=dhcp" >> $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX echo "HWADDR=$MACX" >> $NEWROOT/etc/sysconfig/network/ifcfg-$ETHX @@ -323,18 +326,18 @@ if [ -z $STATEMNT ]; then fi fi -[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "saving $NEWROOT/etc/resolv.conf" +[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "saving $NEWROOT/etc/resolv.conf" cp /etc/resolv.conf "$NEWROOT/etc/" if [ -d "$NEWROOT/etc/sysconfig" -a ! -e "$NEWROOT/etc/sysconfig/selinux" ]; then - [ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "disable selinux ..." + [ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "disable selinux ..." echo "SELINUX=disabled" >> "$NEWROOT/etc/sysconfig/selinux" fi -[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "setting hostname..." +[ "$xcatdebugmode" > "0" ] && logger -t $log_label -p debug "setting hostname..." echo `hostname` > $NEWROOT/etc/hostname -[ "$xcatdebugmode" > "0" ] && logger -t xcat -p debug "exiting xcatroot..." +logger $SYSLOGHOST -t $log_label -p debug "Exiting xcatroot..." # inject new exit_if_exists echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/xcat.sh diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.pkglist index 1eb4bf416..194157acc 100644 --- a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.pkglist +++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.pkglist @@ -6,7 +6,6 @@ linux-image-generic-lts-xenial openssh-server openssh-client wget -vim ntp rsyslog rsync diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.ppc64el.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.ppc64el.pkglist index df556b887..5bf569fd1 100644 --- a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.ppc64el.pkglist +++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.ppc64el.pkglist @@ -7,7 +7,6 @@ linux-image-generic openssh-server openssh-client wget -vim ntp ntpdate rsync diff --git a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.x86_64.pkglist b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.x86_64.pkglist index df556b887..5bf569fd1 100644 --- a/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.x86_64.pkglist +++ b/xCAT-server/share/xcat/netboot/ubuntu/compute.ubuntu16.04.x86_64.pkglist @@ -7,7 +7,6 @@ linux-image-generic openssh-server openssh-client wget -vim ntp ntpdate rsync diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index a14c874e6..ab7896726 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -235,6 +235,11 @@ unless ($onlyinitrd) { my @pkgdir_internet; #Put all the http mirror in ths array, but only the first http mirror which will be used to create bootstrap my @pkgdir_local; #Put all directories except first in this array my $masternode = xCAT::TableUtils->get_site_Master(); + my $httpport="80"; + my @hports=xCAT::TableUtils->get_site_attribute("httpport"); + if ($hports[0]){ + $httpport=$hports[0]; + } $srcdir = undef; foreach my $dir (@srcdirs) { if ($dir =~ /^http.*/) { @@ -246,7 +251,7 @@ unless ($onlyinitrd) { $srcdir = $dir; find(\&isaptdir, <$dir/>); } else { #set other directory to http url - my $osuurl = "http://$masternode$dir ./"; + my $osuurl = "http://$masternode:$httpport$dir ./"; push @pkgdir_local, $osuurl; } } @@ -347,7 +352,7 @@ unless ($onlyinitrd) { open($aptconfig, ">", "$rootimg_dir/etc/apt/sources.list"); if ($srcdir) { - print $aptconfig "deb http://$masternode$srcdir $dist main\n"; + print $aptconfig "deb http://$masternode:$httpport$srcdir $dist main\n"; } foreach (@pkgdir_internet) { @@ -1023,7 +1028,7 @@ sub mkinitrd { NEWROOT="/sysroot" SHELL="/bin/sh" RWDIR=".statelite" - +log_label="xcat.deployment" # Define some colors RESET="\033[0m" @@ -1229,17 +1234,16 @@ ifconfig lo up XCATMASTER=`echo \$XCATSERVER|awk -F: '{print \$1}'` -if [ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]; then - PORT="514" - syslogd -R \$XCATMASTER:\$PORT -fi - -([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "running init script..." -([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "MASTER=\$XCATMASTER XCATIPORT=\$XCATIPORT" +PORT="514" +syslogd -R \$XCATMASTER:\$PORT +MASTER=`echo \$XCATMASTER |awk -F: '{print \$1}'` +logger -t \$log_label -p info "=============deployment starting====================" +logger -t \$log_label -p info "Executing init to prepare for netbooting" +([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t \$log_label -p debug "MASTER=\$XCATMASTER XCATIPORT=\$XCATIPORT" #update nodelist.nodestatus to "netbooting" if [ \$NODESTATUS != 'n' ]; then - ([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "nodestatus: netbooting,reporting..." + logger -t \$log_label -p info "Sending request to \$XCATMASTER:\$XCATIPORT for changing status to netbooting..." /tmp/updateflag \$XCATMASTER \$XCATIPORT "installstatus netbooting" fi @@ -1256,10 +1260,10 @@ for i in `cat /proc/cmdline`; do MAXTRIES=5 ITER=0 while [ ! -r "\$FILENAME" ]; do - ([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "downloading \$VALUE..." + logger -t \$log_label -p info "Downloading rootfs image from \$VALUE..." echo Getting \$VALUE... if ! /usr/bin/wget \$VALUE; then - ([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t xcat -p debug "downloading \$VALUE failed,retrying..." + ([ "\$xcatdebugmode" = "1" ] || [ "\$xcatdebugmode" = "2" ]) && logger -t \$log_label -p debug "downloading \$VALUE failed,retrying..." ST=`expr \$RANDOM % 5` sleep \$ST rm -f \$FILENAME @@ -1338,6 +1342,7 @@ if [ "\$STATELITE" = "1" ]; then # for statelite mode on top of the ramdisk EOMS print $inifile " if [ -r /rootimg-statelite.gz ]; then\n"; + print $inifile " logger -t \$log_label -p info \"Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]...\"\n"; print $inifile " echo Setting up RAM-root tmpfs.\n"; if ($rootlimit) { print $inifile " mount -o \"size=$rootlimit,mode=755\" -t tmpfs rootfs \$NEWROOT \n"; @@ -1463,7 +1468,7 @@ if [ -r /rootimg.sfs ]; then mount --move /rw \$NEWROOT/rw EOMS print $inifile "elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"rootimg downloaded,setting up RAM-root tmpfs...\"\n"; + print $inifile " logger -t \$log_label -p info \"Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]...\"\n"; print $inifile " echo Setting up RAM-root tmpfs.\n"; if ($rootlimit) { print $inifile " mount -o \"size=$rootlimit,mode=755\" -t tmpfs rootfs \$NEWROOT\n"; @@ -1471,7 +1476,7 @@ EOMS print $inifile " mount -o mode=755 -t tmpfs rootfs \$NEWROOT\n"; } print $inifile " cd \$NEWROOT\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Extracting root filesystem:\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"Extracting root filesystem:\"\n"; print $inifile " echo -n \"Extracting root filesystem:\"\n"; print $inifile " if [ -r /rootimg.cpio.gz ]; then\n"; print $inifile " if [ -x /bin/cpio ]; then\n"; @@ -1486,10 +1491,9 @@ EOMS print $inifile " xz -cd /rootimg.cpio.xz |cpio -idum\n"; print $inifile " fi\n"; print $inifile " fi\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Done...\"\n"; print $inifile " echo Done\n"; print $inifile "elif [ -r /rootimg.tar.gz ] || [ -r /rootimg.tar.xz ]; then\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"rootimg downloaded,setting up RAM-root tmpfs...\"\n"; + print $inifile " logger -t \$log_label -p info \"Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]...\"\n"; print $inifile " echo Setting up RAM-root tmpfs.\n"; if ($rootlimit) { @@ -1498,27 +1502,26 @@ EOMS print $inifile " mount -o mode=755 -t tmpfs rootfs \$NEWROOT\n"; } print $inifile " cd \$NEWROOT\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Extracting root filesystem:\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"Extracting root filesystem:\"\n"; print $inifile " echo -n \"Extracting root filesystem:\"\n"; print $inifile " if [ -r /rootimg.tar.gz ]; then\n"; print $inifile " /bin/tar --selinux --xattrs --xattrs-include='*' -zxf /rootimg.tar.gz\n"; print $inifile " elif [ -r /rootimg.tar.xz ]; then\n"; print $inifile " /bin/tar --selinux --xattrs --xattrs-include='*' -Jxf /rootimg.tar.xz\n"; print $inifile " fi\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Done...\"\n"; print $inifile " echo Done\n"; print $inifile "else\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"Failed to download image, panicing in 5...\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"Failed to download image, panicing in 5...\"\n"; print $inifile " echo -n Failed to download image, panicing in 5...\n"; print $inifile " for i in 4 3 2 1 0; do\n"; print $inifile " /bin/sleep 5\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"\$i...\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"\$i...\"\n"; print $inifile " echo -n \$i...\n"; print $inifile " done\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"You're dead. rpower nodename reset to play again.\"\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"* Did you packimage with -m cpio, -m squashfs, or -m nfs?\"\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"* If using -m squashfs did you include aufs.ko with geninitrd? e.g.: -n tg3,squashfs,aufs,loop\"\n"; - print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t xcat -p debug \"If using -m nfs did you export NFS and sync rootimg? And did you include the aufs and nfs modules in the proper order: e.g.: -n tg3,aufs,loop,sunrpc,lockd,nfs_acl,nfs\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"You're dead. rpower nodename reset to play again.\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"* Did you packimage with -m cpio, -m squashfs, or -m nfs?\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"* If using -m squashfs did you include aufs.ko with geninitrd? e.g.: -n tg3,squashfs,aufs,loop\"\n"; + print $inifile " ([ \"\$xcatdebugmode\" = \"1\" ] || [ \"\$xcatdebugmode\" = \"2\" ]) && logger -t \$log_label -p debug \"If using -m nfs did you export NFS and sync rootimg? And did you include the aufs and nfs modules in the proper order: e.g.: -n tg3,aufs,loop,sunrpc,lockd,nfs_acl,nfs\"\n"; print $inifile " echo\n"; print $inifile </dev/null 2>&1 && GO_XCAT_UNINSTALL_LIST=("${GO_XCAT_INSTALL_LIST[@]}" @@ -538,7 +538,7 @@ function check_package_version_rpm() else echo "${ver}" fi - done < <(rpm -q --qf '%{version}-%{release}\n' "$@" 2>/dev/null) + done < <(LC_ALL="C" rpm -q --qf '%{version}-%{release}\n' "$@" 2>/dev/null) return 0 } @@ -934,6 +934,31 @@ function add_repo_by_file_yum() cp "${tmp}" "/etc/yum.repos.d/${repo_id}.repo" } +# Dirty workaround on SLES11 SP4 +# For SLES11, set gpgcheck=0 +# +# $1 repo file +function github_issue_5503_workaround2() +{ + [[ "${GO_XCAT_LINUX_DISTRO}" = "sles" ]] || return 0 + [[ "${GO_XCAT_LINUX_VERSION}" =~ ^11(\.[0-4]){0,1}$ ]] || return 0 + local repo_file="$1" + local tmp="${TMP_DIR}/tmp_repo_file_${repo_id}.repo.$$" + cp "${repo_file}" "${tmp}" + exit_if_bad "$?" "Copy file failed \`${repo_file}' -> \`${tmp}'" + while read -r + do + case "${REPLY}" in + "gpgcheck=1") + echo "gpgcheck=0" + ;; + *) + echo "${REPLY}" + ;; + esac + done <"${tmp}" >"${repo_file}" +} + # $1 repo file # $2 repo id function add_repo_by_file_zypper() @@ -954,6 +979,8 @@ function add_repo_by_file_zypper() echo "[${repo_id}]" grep -v '^\[' "${repo_file}" } >"${tmp}" + # For SLES11, set gpgcheck=0 + github_issue_5503_workaround2 "${tmp}" remove_repo_zypper "${repo_id}" && zypper addrepo "${tmp}" >/dev/null 2>&1 } @@ -1017,7 +1044,7 @@ function extract_archive() gzip -d -c "${archive}" | tar -t -f - | grep -v "^${repo_id}/" [[ "${PIPESTATUS[0]}" -eq 0 && "${PIPESTATUS[1]}" -eq 0 && "${PIPESTATUS[2]}" -eq 1 ]] - exit_if_bad "$?" "${archive}: bad gzipped tarball" + exit_if_bad "$?" "${archive}: bad gzipped tarball" || return 1 rm -rf "${install_path}/${repo_id}" gzip -d -c "${archive}" | ( cd "${install_path}" && tar -x -f - ) ;; @@ -1085,7 +1112,7 @@ function add_repo_by_url_yum_or_zypper() name=${repo_id} baseurl=${url%/} enabled=1 - gpgcheck=0 + gpgcheck=1 gpgkey=${url%/}/repodata/repomd.xml.key EOF add_repo_by_file "${tmp}" "${repo_id}" @@ -1121,9 +1148,17 @@ function add_repo_by_url_yum_or_zypper() name=${repo_id} baseurl=file://${url%/} enabled=1 - gpgcheck=0 - gpgkey=file://${url%/}/repodata/repomd.xml.key EOF + if [ -f "${url%/}/repodata/repomd.xml.asc" ] + then + echo "gpgcheck=1" >>"${tmp}" + else + echo "gpgcheck=0" >>"${tmp}" + fi + if [ -f "${url%/}/repodata/repomd.xml.key" ] + then + echo "gpgkey=file://${url%/}/repodata/repomd.xml.key" >>"${tmp}" + fi add_repo_by_file "${tmp}" "${repo_id}" return "$?" fi @@ -1182,7 +1217,8 @@ function add_repo_by_url_apt() [[ "${url:0:1}" = "/" ]] || url="${PWD}/${url}" # directory tmp="${TMP_DIR}/tmp_repo.list" - echo "deb [arch=$(dpkg --print-architecture)] file://${url} ${codename} main" >"${tmp}" + echo "deb [$([ ! -f "${url}/dists/${codename}/Release.gpg" ] && + echo "allow-insecure=yes ")arch=$(dpkg --print-architecture)] file://${url} ${codename} main" >"${tmp}" add_repo_by_file_apt "${tmp}" "${repo_id}" return "$?" fi @@ -1522,6 +1558,26 @@ function remove_package() function_dispatch "${FUNCNAME}" "$@" } +# $1 -y +function purge_package_apt() +{ + type apt-get >/dev/null 2>&1 || return 255 + local -a yes=() + [[ "$1" = "-y" ]] && yes=("-y") && shift + apt-get --allow-unauthenticated purge "${yes[@]}" "$@" +} + +function purge_package_others() +{ + remove_package "$@" +} + +# $1 -y +function purge_package() +{ + function_dispatch "${FUNCNAME}" "$@" +} + # $1 -y function install_xcat() { @@ -1608,6 +1664,16 @@ function trash_xcat() return 0 } +function uninstall_xcat_completely() +{ + purge_package -y "${GO_XCAT_UNINSTALL_LIST[@]}" + + kill_xcat + trash_xcat + + return 0 +} + function list_xcat_packages() { GO_XCAT_CORE_PACKAGE_LIST=($(get_package_list xcat-core)) @@ -1715,7 +1781,13 @@ function test_case_000_version() local ver="" local -i ret=0 - list_xcat_packages >/dev/null || return 1 + # Call function list_xcat_packages to fill up global array + # GO_XCAT_CORE_PACKAGE_LIST + # And the output will be logged into the debug log. + # + # Missing command `repoquery' may cause list_xcat_packages fail, + # in that case, just skip this test. + list_xcat_packages while read -r do @@ -1725,6 +1797,7 @@ function test_case_000_version() (( ret += $? )) done < <(check_package_version "${GO_XCAT_CORE_PACKAGE_LIST[@]}") + [ "${ret}" -ne "0" ] && echo warn_if_bad "${ret}" "xCAT packages version mismatch" return "${ret}" @@ -1985,14 +2058,10 @@ case "${GO_XCAT_ACTION}" in "away"|"uninstall") # Remove xCAT ask_to_continue "${GO_XCAT_YES[0]}" "xCAT is going to be ${GO_XCAT_ACTION/away/trash}ed." - debug_trace uninstall_xcat -y - boo_boo_if_bad "$?" case "${GO_XCAT_ACTION}" in "away") - # Do extra cleanup - debug_trace kill_xcat - debug_trace trash_xcat + debug_trace uninstall_xcat_completely debug_logger <<-EOF @@ -2000,6 +2069,9 @@ case "${GO_XCAT_ACTION}" in EOF ;; "uninstall") + debug_trace uninstall_xcat -y + boo_boo_if_bad "$?" + debug_logger <<-EOF xCAT has been uninstalled! @@ -2069,6 +2141,8 @@ case "${GO_XCAT_ACTION}" in # xCAT has been installed and so far so good smoke_testing >/dev/null 2>&1 RET="$?" + [ "${RET}" -ne "0" ] && echo + warn_if_bad "${RET}" "xCAT smoke testing failed." fi boo_boo_if_bad "${RET}" diff --git a/xCAT-test/autotest/bundle/MN_basic.bundle b/xCAT-test/autotest/bundle/MN_basic.bundle index b093ba584..de3e09758 100644 --- a/xCAT-test/autotest/bundle/MN_basic.bundle +++ b/xCAT-test/autotest/bundle/MN_basic.bundle @@ -58,9 +58,9 @@ lsxcatd_a lsxcatd_d lsxcatd_h lsxcatd_null -makeconservercf_d -makeconservercf_noderange -makeconservercf_null +#makeconservercf_d +#makeconservercf_noderange +#makeconservercf_null #makedhcp_a_d_linux #makedhcp_a_linux #makedhcp_d_linux diff --git a/xCAT-test/autotest/bundle/non_default_http_port_test.bundle b/xCAT-test/autotest/bundle/non_default_http_port_test.bundle new file mode 100644 index 000000000..1e325b722 --- /dev/null +++ b/xCAT-test/autotest/bundle/non_default_http_port_test.bundle @@ -0,0 +1,28 @@ +setup_vm +genesis_work_with_non_default_http_80_port +change_http_listen_port_from_80_to_8898_in_mn +reg_linux_diskless_installation_flat +reg_linux_diskfull_installation_flat +updatenode_diskful_syncfiles +updatenode_diskful_syncfiles_rename +updatenode_diskful_syncfiles_dir +updatenode_syncfile_EXECUTE +updatenode_syncfile_EXECUTEALWAYS +updatenode_P_script1 +updatenode_f_incompatible_flags +updatenode_k_incompatible_flags +updatenode_diskful_syncfiles_P_script1 +updatenode_script3 +updatenode_P_script1_script2 +SN_setup_case +change_http_listen_port_from_80_to_8898_in_sn +reg_linux_diskfull_installation_hierarchy +updatenode_syncfile_APPEND +updatenode_syncfile_MERGE +updatenode_diskful_syncfiles_multi_files +updatenode_P_script2 +reg_linux_diskless_installation_hierarchy +reg_linux_statelite_installation_hierarchy_by_ramdisk +change_http_listen_port_from_8898_to_80_in_sn +change_http_listen_port_from_8898_to_80_in_mn +clean_up_env diff --git a/xCAT-test/autotest/bundle/pegas_ppc64le.bundle b/xCAT-test/autotest/bundle/pegas_ppc64le.bundle index 884d5453e..c7ae81ad6 100644 --- a/xCAT-test/autotest/bundle/pegas_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/pegas_ppc64le.bundle @@ -269,8 +269,6 @@ makentp_v makentp_h nodeset_check_warninginfo runcmdinstaller_h -runcmdinstaller_command -get_xcat_postscripts_loginfo updatenode_postscripts_loginfo xcatd_start xcatd_stop @@ -311,10 +309,6 @@ rmimage_diskless updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied -packimage_m_cpio_c_gzip -packimage_m_cpio_c_xz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method confignetwork_vlan_false @@ -322,6 +316,12 @@ confignetwork__bridge_false nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz +runcmdinstaller_command +get_xcat_postscripts_loginfo reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/rhels6.9_ppc64.bundle b/xCAT-test/autotest/bundle/rhels6.9_ppc64.bundle index c782fe9f1..b7120f1b1 100644 --- a/xCAT-test/autotest/bundle/rhels6.9_ppc64.bundle +++ b/xCAT-test/autotest/bundle/rhels6.9_ppc64.bundle @@ -17,6 +17,7 @@ updatenode_diskful_syncfiles_P_script1 updatenode_script3 updatenode_P_script1_script2 updatenode_without_flag +updatenode_without_options confignetwork_static_installnic confignetwork_secondarynic_nicnetworks_updatenode_false confignetwork_secondarynic_nicips_updatenode_false @@ -272,8 +273,6 @@ makentp_v makentp_h nodeset_check_warninginfo runcmdinstaller_h -runcmdinstaller_command -get_xcat_postscripts_loginfo updatenode_postscripts_loginfo bmcdiscover_h bmcdiscover_nmap_range @@ -312,12 +311,14 @@ updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied reg_linux_diskless_installation_flat +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method packimage_m_cpio_c_gzip packimage_m_cpio_c_xz packimage_m_tar_c_gzip packimage_m_tar_c_xz -packimage_m_invalid_archive_method -packimage_m_invalid_compress_method +runcmdinstaller_command +get_xcat_postscripts_loginfo reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/rhels6.9_x86_64.bundle b/xCAT-test/autotest/bundle/rhels6.9_x86_64.bundle index 331edf666..95a28f122 100644 --- a/xCAT-test/autotest/bundle/rhels6.9_x86_64.bundle +++ b/xCAT-test/autotest/bundle/rhels6.9_x86_64.bundle @@ -234,10 +234,6 @@ updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied reg_linux_diskless_installation_flat -packimage_m_cpio_c_gzip -packimage_m_cpio_c_xz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method confignetwork_vlan_false @@ -245,6 +241,10 @@ confignetwork__bridge_false nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/rhels7.4_ppc64.bundle b/xCAT-test/autotest/bundle/rhels7.4_ppc64.bundle index bb5016a0d..e4ed05563 100644 --- a/xCAT-test/autotest/bundle/rhels7.4_ppc64.bundle +++ b/xCAT-test/autotest/bundle/rhels7.4_ppc64.bundle @@ -17,6 +17,7 @@ updatenode_diskful_syncfiles_P_script1 updatenode_script3 updatenode_P_script1_script2 updatenode_without_flag +updatenode_without_options confignetwork_static_installnic confignetwork_secondarynic_nicnetworks_updatenode_false confignetwork_secondarynic_nicips_updatenode_false @@ -315,8 +316,6 @@ makentp_v makentp_h nodeset_check_warninginfo runcmdinstaller_h -runcmdinstaller_command -get_xcat_postscripts_loginfo updatenode_postscripts_loginfo bmcdiscover_h bmcdiscover_nmap_range @@ -356,12 +355,14 @@ updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied reg_linux_diskless_installation_flat +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method packimage_m_cpio_c_gzip packimage_m_cpio_c_xz packimage_m_tar_c_gzip packimage_m_tar_c_xz -packimage_m_invalid_archive_method -packimage_m_invalid_compress_method +runcmdinstaller_command +get_xcat_postscripts_loginfo reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle b/xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle index 1dacbd5cf..2ffd3fd2d 100644 --- a/xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/rhels7.4_ppc64le.bundle @@ -20,6 +20,7 @@ updatenode_diskful_syncfiles_P_script1 updatenode_script3 updatenode_P_script1_script2 updatenode_without_flag +updatenode_without_options confignetwork_static_installnic confignetwork_s_installnic_secondarynic_updatenode confignetwork_secondarynic_updatenode @@ -357,10 +358,6 @@ rmimage_diskless updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied -packimage_m_cpio_c_gzip -packimage_m_cpio_c_xz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method confignetwork_vlan_false @@ -368,6 +365,12 @@ confignetwork__bridge_false nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz +runcmdinstaller_command +get_xcat_postscripts_loginfo reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/rhels7.4_x86_64.bundle b/xCAT-test/autotest/bundle/rhels7.4_x86_64.bundle index 7324d4b32..463675df4 100644 --- a/xCAT-test/autotest/bundle/rhels7.4_x86_64.bundle +++ b/xCAT-test/autotest/bundle/rhels7.4_x86_64.bundle @@ -38,10 +38,6 @@ packimage_o_p_a_m packimage_imagename packimage_h packimage_v -packimage_m_cpio_c_gzip -packimage_m_cpio_c_xz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method pping_h @@ -298,6 +294,10 @@ confignetwork__bridge_false nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz reg_linux_diskless_installation_flat reg_linux_statelite_installation_flat SN_setup_case diff --git a/xCAT-test/autotest/bundle/sles11.4_ppc64.bundle b/xCAT-test/autotest/bundle/sles11.4_ppc64.bundle index d129a70cb..93a61d8e9 100644 --- a/xCAT-test/autotest/bundle/sles11.4_ppc64.bundle +++ b/xCAT-test/autotest/bundle/sles11.4_ppc64.bundle @@ -279,12 +279,12 @@ updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied reg_linux_diskless_installation_flat +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method packimage_m_cpio_c_gzip packimage_m_cpio_c_xz packimage_m_tar_c_gzip packimage_m_tar_c_xz -packimage_m_invalid_archive_method -packimage_m_invalid_compress_method reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/sles11.4_x86_64.bundle b/xCAT-test/autotest/bundle/sles11.4_x86_64.bundle index 8a5bcdd14..984deb670 100644 --- a/xCAT-test/autotest/bundle/sles11.4_x86_64.bundle +++ b/xCAT-test/autotest/bundle/sles11.4_x86_64.bundle @@ -237,15 +237,15 @@ updatenode_diskful_syncfiles_failing xdcp_nonroot_user xdsh_permission_denied reg_linux_diskless_installation_flat -packimage_m_cpio_c_gzip -packimage_m_cpio_c_xz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_xz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle b/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle index e424b8db1..72dd12d00 100644 --- a/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle @@ -34,12 +34,6 @@ packimage_o_p_a_m packimage_imagename packimage_h packimage_v -packimage_m_cpio_c_gzip -packimage_m_cpio_c_pigz -packimage_m_cpio_c_xz -packimage_m_tar_c_pigz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method pping_h @@ -254,6 +248,12 @@ xdsh_permission_denied nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_pigz +packimage_m_cpio_c_xz +packimage_m_tar_c_pigz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz sles_migration1 sles_migration2 reg_linux_statelite_installation_flat diff --git a/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle b/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle index 9fc44f715..e76d2d630 100644 --- a/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle +++ b/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle @@ -253,14 +253,14 @@ nodeset_runimg sles_migration1 sles_migration2 reg_linux_diskless_installation_flat +packimage_m_invalid_archive_method +packimage_m_invalid_compress_method packimage_m_cpio_c_gzip packimage_m_cpio_c_pigz packimage_m_cpio_c_xz packimage_m_tar_c_pigz packimage_m_tar_c_gzip packimage_m_tar_c_xz -packimage_m_invalid_archive_method -packimage_m_invalid_compress_method reg_linux_statelite_installation_flat SN_setup_case reg_linux_diskfull_installation_hierarchy diff --git a/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle b/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle index 9a8f49bf5..e75157e51 100644 --- a/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle @@ -25,12 +25,6 @@ packimage_o_p_a_m packimage_imagename packimage_h packimage_v -packimage_m_cpio_c_gzip -packimage_m_cpio_c_pigz -packimage_m_cpio_c_xz -packimage_m_tar_c_pigz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method pping_h @@ -242,6 +236,12 @@ xdsh_permission_denied nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_pigz +packimage_m_cpio_c_xz +packimage_m_tar_c_pigz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz ubuntu_migration1_p8le ubuntu_migration2_p8le diff --git a/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle b/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle index a8bee6335..5c755deab 100644 --- a/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle +++ b/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle @@ -21,12 +21,6 @@ packimage_o_p_a_m packimage_imagename packimage_h packimage_v -packimage_m_cpio_c_gzip -packimage_m_cpio_c_pigz -packimage_m_cpio_c_xz -packimage_m_tar_c_pigz -packimage_m_tar_c_gzip -packimage_m_tar_c_xz packimage_m_invalid_archive_method packimage_m_invalid_compress_method pping_h @@ -239,5 +233,11 @@ xdsh_permission_denied nodeset_shell nodeset_cmdline nodeset_runimg +packimage_m_cpio_c_gzip +packimage_m_cpio_c_pigz +packimage_m_cpio_c_xz +packimage_m_tar_c_pigz +packimage_m_tar_c_gzip +packimage_m_tar_c_xz ubuntu_migration1_vm ubuntu_migration2_vm diff --git a/xCAT-test/autotest/testcase/HA/case0 b/xCAT-test/autotest/testcase/HA/case0 index 28618f211..e1fdb14af 100644 --- a/xCAT-test/autotest/testcase/HA/case0 +++ b/xCAT-test/autotest/testcase/HA/case0 @@ -1,5 +1,6 @@ #only support redhat and postgresql start:setup_2_new_HA_MN +label:others,HA os:Linux #back up cmd:lsdef -z $$PRIMARYMN > /tmp/node.stanza @@ -149,6 +150,7 @@ cmd:if [[ -f /install/postscripts/check_node_state.bak ]] ;then mv -f /install/p end start:configure_exist_xCAT_MN_to_HA_MN +label:others,HA os:Linux #back up cmd:lsdef -z $$PRIMARYMN > /tmp/node.stanza diff --git a/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 b/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 index 403511355..7458af4dd 100644 --- a/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 +++ b/xCAT-test/autotest/testcase/UT_openbmc/supported_commands_case0 @@ -27,7 +27,7 @@ check:rc==0 check:output=~$$CN: SYSTEM SerialNumber cmd: rinv $$CN firm check:rc==0 -check:output=~$$CN: Host Firmware +check:output=~$$CN: HOST Firmware check:output=~$$CN: BMC Firmware cmd: rinv $$CN cpu check:rc==0 @@ -53,13 +53,13 @@ check:rc==0 check:output=~$$CN: Ps0 Input Voltage: cmd: rvitals $$CN wattage check:rc==0 -check:output=~$$CN: Total Power: +check:output=~$$CN: Ps0 Input Power: cmd: rvitals $$CN fanspeed check:rc==0 check:output=~$$CN: Fan cmd: rvitals $$CN power check:rc==0 -check:output=~$$CN: Total Power: +check:output=~$$CN: Ps0 Input Power: cmd: rvitals $$CN leds check:rc==0 check:output=~$$CN: LEDs Front diff --git a/xCAT-test/autotest/testcase/addkit/cases0 b/xCAT-test/autotest/testcase/addkit/cases0 index 0ee49701a..c69256c44 100644 --- a/xCAT-test/autotest/testcase/addkit/cases0 +++ b/xCAT-test/autotest/testcase/addkit/cases0 @@ -1,4 +1,5 @@ start:addkit_v +label:others,KIT cmd:addkit -v check:rc==0 check:output~=Version @@ -7,6 +8,7 @@ check:output~=compatible_frameworks end start:addkit_h +label:others,KIT cmd:addkit -h check:rc==0 check:output~=Usage @@ -14,6 +16,7 @@ check:outpur!~error end start:addkit_kit +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/addkit;buildkit create prodkit @@ -35,6 +38,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit end start:addkit_i +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/addkit;buildkit create prodkit @@ -54,6 +58,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit end start:addkit_multikit +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prod2kit @@ -87,6 +92,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prod2kit end start:addkit_p +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prodkit cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkit/prod2kit diff --git a/xCAT-test/autotest/testcase/addkitcomp/case0 b/xCAT-test/autotest/testcase/addkitcomp/case0 index aea1ed058..1265e1d4d 100644 --- a/xCAT-test/autotest/testcase/addkitcomp/case0 +++ b/xCAT-test/autotest/testcase/addkitcomp/case0 @@ -1,4 +1,5 @@ start:addkitcomp_v +label:others,KIT os:Linux cmd:addkitcomp -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:addkitcomp_h +label:others,KIT os:Linux cmd:addkitcomp -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:addkitcomp_i +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp;buildkit create mykits @@ -54,6 +57,7 @@ check:rc==0 end start:addkitcomp_f +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp;buildkit create mykits @@ -84,6 +88,7 @@ check:rc==0 end start:addkitcomp_a +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/$$KITDATA cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/$$KITDATA @@ -126,6 +131,7 @@ check:rc==0 end start:addkitcomp_noscripts +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/$$KITDATA cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/addkitcomp/$$KITDATA diff --git a/xCAT-test/autotest/testcase/bmcdiscover/cases0 b/xCAT-test/autotest/testcase/bmcdiscover/cases0 index 203b5ae2d..5cc7fc0d7 100644 --- a/xCAT-test/autotest/testcase/bmcdiscover/cases0 +++ b/xCAT-test/autotest/testcase/bmcdiscover/cases0 @@ -1,4 +1,5 @@ start:bmcdiscover_q +label:others,discovery os:linux decription:query usage for bmcdiscover cmd:bmcdiscover ? @@ -10,6 +11,7 @@ check:output=~bmcdiscover \[-v|--version\] end start:bmcdiscover_help +label:others,discovery os:linux decription:show bmcdiscover help information cmd:bmcdiscover help @@ -21,6 +23,7 @@ check:output=~bmcdiscover \[-v|--version\] end start:bmcdiscover_version +label:others,discovery os:linux description:show bmcdiscover version cmd:bmcdiscover --version @@ -29,6 +32,7 @@ check:output=~bmcdiscover - xCAT Version end start:bmcdiscover_h +label:others,discovery os:Linux decription:help cmd:bmcdiscover -h @@ -37,30 +41,35 @@ check:output=~Usage end start:bmcdiscover_nmap_range +label:others,discovery cmd:bmcdiscover -s nmap --range $$bmcrange -u $$bmcusername -p $$bmcpasswd check:rc==0 check:output=~$$bmcrange end start:bmcdiscover_v +label:others,discovery cmd:bmcdiscover -v check:rc==0 checkout:output=~xCAT Version end start:bmcdiscover_check_paswd +label:others,discovery cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p $$bmcpasswd --check check:rc==1 check:output=~is not supported end start:bmcdiscover_get_ipsource +label:others,discovery cmd:bmcdiscover -i $$bmcrange -u $$bmcusername -p $$bmcpasswd --ipsource check:rc==1 check:output=~is not supported end start:bmcdiscover_range_w +label:others,discovery cmd:bmcdiscover --range $$bmcrange -u $$bmcusername -p $$bmcpasswd -w check:rc==0 check:output=~Writing node @@ -69,6 +78,7 @@ end start:bmcdiscover_range_z +label:others,discovery cmd:bmcdiscover --range $$bmcrange -u $$bmcusername -p $$bmcpasswd -z check:rc==0 check:output=~bmc=$$bmcrange diff --git a/xCAT-test/autotest/testcase/buildkit/cases0 b/xCAT-test/autotest/testcase/buildkit/cases0 index 0855adf94..995dcdcb0 100644 --- a/xCAT-test/autotest/testcase/buildkit/cases0 +++ b/xCAT-test/autotest/testcase/buildkit/cases0 @@ -1,4 +1,5 @@ start:buildkit_v +label:others,KIT os:Linux cmd:buildkit -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:buildkit_h +label:others,KIT os:Linux cmd:buildkit -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:buildkit_create +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits @@ -44,6 +47,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits end start:buildkit_create_l +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits @@ -63,6 +67,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/mykits end start:buildkit_buildrepo_all +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -80,6 +85,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_buildrepo_all +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -97,6 +103,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_buildrepo_all +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -114,6 +121,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_buildrepo_rhels +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -131,6 +139,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_buildrepo_sles +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -148,6 +157,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_buildrepo_ubuntu +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -165,6 +175,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_cleanrepo_all +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -181,6 +192,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_cleanrepo_rhels +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -197,6 +209,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_cleanrepo_sles +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -213,6 +226,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_cleanrepo_ubuntu +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -229,6 +243,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_listrepo +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -244,6 +259,7 @@ end start:buildkit_listrepo +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -258,6 +274,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_listrepo +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -272,6 +289,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_buildtar +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -291,6 +309,7 @@ end start:buildkit_cleantar +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -312,6 +331,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_cleantar +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -333,6 +353,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_cleantar +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -354,6 +375,7 @@ cmd:cd -;rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_partialkit +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -377,6 +399,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_partialkit +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -400,6 +423,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_partialkit_ubuntu +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -423,6 +447,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_partialkit_completekit +label:others,KIT os:rhels cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -454,6 +479,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_partialkit_completekit +label:others,KIT os:sles cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit @@ -485,6 +511,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit end start:buildkit_partialkit_completekit +label:others,KIT os:ubuntu cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/buildkit/prodkit cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/buildkit;buildkit create prodkit diff --git a/xCAT-test/autotest/testcase/chdef/cases0 b/xCAT-test/autotest/testcase/chdef/cases0 index ff35b1aad..dc3c0ab03 100644 --- a/xCAT-test/autotest/testcase/chdef/cases0 +++ b/xCAT-test/autotest/testcase/chdef/cases0 @@ -273,3 +273,46 @@ check:output=~300 cmd:if [ -f /tmp/sitevalue ];then var=`cat /tmp/sitevalue`;chdef -t site clustersite dhcplease=$var;rm -rf /tmp/sitevalue;fi check:rc==0 end + +start:chdef_network_not_exist +description:This case is use to create a network, but not set net and mask. +label:mn_only,db +cmd:chdef -t network aaaaa_not_exist +check:output=~No object definitions have been created or modified +#check:rc!=0 +cmd:chdef -t network aaaaa_not_exist mtu=1500 +check:rc!=0 +check:output=~Net or mask value should not be empty +cmd:chdef -t network aaaaa_not_exist mtu=1500 net=10.0.0.0 +check:rc!=0 +check:output=~Net or mask value should not be empty +cmd:chdef -t network aaaaa_not_exist mtu=1500 mask=255.255.255.0 +check:rc!=0 +check:output=~Net or mask value should not be empty +cmd:chdef -t network aaaaa_not_exist mask=255.255.255.0 net=100.0.0.0 mtu=1500 +check:rc==0 +check:output=~1 object definitions have been created or modified +cmd:lsdef -t network aaaaa_not_exist +check:rc==0 +cmd:chdef -t network aaaaa_not_exist gateway=10.0.0.101 +check:rc==0 +cmd:lsdef -t network aaaaa_not_exist -i gateway +check:output=~10.0.0.101 +cmd:chdef -t network bbbbb_not_exist mask=255.255.255.0 net=100.0.0.0 +check:rc!=0 +check:output=~A network definition called 'aaaaa_not_exist' already exists +cmd:echo ' +bbbbb_not_exist: + objtype=network + net=150.0.0.0 +' > /tmp/bbbbb_not_exist.def +cmd:cat /tmp/bbbbb_not_exist.def |mkdef -z +check:rc!=0 +check:output=~Net or mask value should not be empty +cmd:lsdef -t network -o bbbbb_not_exist +check:rc!=0 +cmd:rmdef -t network -o aaaaa_not_exist +check:rc==0 +cmd:rm -rf /tmp/bbbbb_not_exist.def +end + diff --git a/xCAT-test/autotest/testcase/chkkitcomp/cases0 b/xCAT-test/autotest/testcase/chkkitcomp/cases0 index c7cfb6c49..2a8ea8935 100644 --- a/xCAT-test/autotest/testcase/chkkitcomp/cases0 +++ b/xCAT-test/autotest/testcase/chkkitcomp/cases0 @@ -1,4 +1,5 @@ start:chkkitcomp_v +label:others,KIT cmd:chkkitcomp -v check:rc==0 check:output~=Version @@ -7,6 +8,7 @@ check:output~=compatible_frameworks end start:chkkitcomp_h +label:others,KIT cmd:addkit -h check:rc==0 check:output~=Usage @@ -14,6 +16,7 @@ check:outpur!~error end start:chkkitcomp_V +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/chkkitcomp/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/chkkitcomp;buildkit create mykits diff --git a/xCAT-test/autotest/testcase/confignetwork/cases0 b/xCAT-test/autotest/testcase/confignetwork/cases0 index 969f7fbee..9f9c45e6e 100644 --- a/xCAT-test/autotest/testcase/confignetwork/cases0 +++ b/xCAT-test/autotest/testcase/confignetwork/cases0 @@ -1,5 +1,6 @@ start: confignetwork_s_installnic_diskful description: this case is to test confignetwork -s could configure installnic successfully in diskful provision. +label:others,network,invoke_provision cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 @@ -31,7 +32,7 @@ check:output=~64 bytes from $$CN cmd:lsdef -l $$CN | grep status check:rc==0 check:output=~booted -cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi +cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi check:rc==0 check:output=~__GETNODEATTR($$CN,ip)__ check:output!~dhcp @@ -41,6 +42,7 @@ end start:confignetwork_s_installnic_diskless description: this case is to test confignetwork -s could configure installnic successfully in diskless provision. +label:others,network,invoke_provision cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 cmd:chdef -t node -o $$CN postbootscripts="confignetwork -s" @@ -78,7 +80,7 @@ check:output=~64 bytes from $$CN cmd:lsdef -l $$CN | grep status check:rc==0 check:output=~booted -cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi +cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi check:rc==0 check:output=~__GETNODEATTR($$CN,ip)__ check:output!~dhcp @@ -89,6 +91,7 @@ end start: confignetwork_secondarynic_diskless description: this case is to test confignetwork -s could config installnic and secondarynic at the same time successfully in diskless provision. +label:others,network,invoke_provision cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 cmd:mkdef -t network -o 100_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -130,11 +133,11 @@ check:output=~64 bytes from $$CN cmd:lsdef -l $$CN | grep status check:rc==0 check:output=~booted -cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi +cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi check:rc==0 check:output=~__GETNODEATTR($$CN,ip)__ check:output!~dhcp -cmd:secondarynic=`xdsh $$CN ip addr |grep 100.1.0.100|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$secondarynic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$secondarynic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi +cmd:secondarynic=`xdsh $$CN ip addr |grep 100.1.0.100|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$secondarynic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$secondarynic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi check:rc==0 check:output=~100.1.0.100 check:output!~dhcp @@ -149,12 +152,13 @@ end start:confignetwork_s_installnic_secondarynic_updatenode description: this case is to test confignetwork -s could configure installnic and secondarynic successfully with updatenode. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC check:rc==0 @@ -162,30 +166,31 @@ cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicne check:rc==0 cmd:updatenode $$CN -P "confignetwork -s" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:output=~11.1.0.100 -cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi +cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi check:rc==0 check:output=~__GETNODEATTR($$CN,ip)__ check:output!~dhcp cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC" -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces" end start:confignetwork_secondarynic_updatenode description: this case is to test confignetwork could configure secondarynic successfully with updatenode. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1496 check:rc==0 @@ -193,28 +198,29 @@ cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicne check:rc==0 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:output=~11.1.0.100 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep mtu /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep mtu /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:output=~MTU=1496|mtu 1496 cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC" cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi cmd:xdsh $$CN "rm -rf /tmp/backupnet/" end start: confignetwork_secondarynic_nicaliases_updatenode description: this case is to test confignetwork could config secondarynic nicaliases successfully with updatenode. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:cp -f /etc/hosts /etc/hosts.bak cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -230,33 +236,34 @@ check:output=~aliases1-1 aliases1-1-1 check:output=~aliases1-2 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi check:output=~11.1.0.100 check:output!~dhcp -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi check:output=~12.1.0.100 check:output!~dhcp cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 cmd:rmdef -t network -o 12_1_0_0-255_255_0_0 cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC" cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$SECONDNIC" -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 cmd:mv -f /etc/hosts.bak /etc/hosts -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi cmd:xdsh $$CN "rm -rf /tmp/backupnet/" end start:confignetwork_secondarynic_nicextraparams_updatenode description: this case is to test confignetwork could configure secondarynic nicextraparams successfully with updatenode. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:cp -f /etc/hosts /etc/hosts.bak cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -272,28 +279,29 @@ check:output=~$$CN-$$SECONDNIC-1 check:output=~$$CN-$$SECONDNIC-2 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:output=~11.1.0.100 check:output!~dhcp -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:output=~12.1.0.100 check:output=~CONNECTED_MODE=yes|CONNECTED_MODE yes check:output!~dhcp cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 cmd:rmdef -t network -o 12_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC" cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$SECONDNIC" cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 cmd:mv -f /etc/hosts.bak /etc/hosts -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi cmd:xdsh $$CN "rm -rf /tmp/backupnet/" end start:confignetwork_secondarynic_nicnetworks_updatenode_false description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -310,6 +318,7 @@ end start:confignetwork_secondarynic_nicips_updatenode_false description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -326,6 +335,7 @@ end start:confignetwork_secondarynic_nictype_updatenode_false description: this case is to test confignetwork could return error message when there is no not enough attributes when configing secondarynic with updatenode. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -343,6 +353,7 @@ end start:confignetwork_disable_set_to_yes description: this case is to test if confignetwork could work correctly when disable is set to yes in nics table +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -353,7 +364,7 @@ cmd:chtab node=$$CN nics.disable=yes check:rc==0 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:output!~11.1.0.100 cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 check:rc==0 @@ -363,6 +374,7 @@ end start:confignetwork_disable_set_to_1 description: this case is to test if confignetwork could work correctly when disable is set to 1 in nics table +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -373,7 +385,7 @@ cmd:chtab node=$$CN nics.disable=1 check:rc==0 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:output!~11.1.0.100 cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 check:rc==0 @@ -383,6 +395,7 @@ end start:confignetwork_niccustomscripts description: this case is to test confignetwork could config secondarynic and envoke scripts to execute. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:echo "echo hello > /tmp/confignetwork_niccustomscript" > /tmp/script1 @@ -410,12 +423,13 @@ end start:confignetwork_secondarynic_thirdnic_multiplevalue_updatenode description:this case is to verify if confignetwork could config serveral nics' multiple value at the same time. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC check:rc==0 @@ -440,21 +454,21 @@ check:output=~$$CN-$$THIRDNIC-1 check:output=~$$CN-$$THIRDNIC-2 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:output=~11.1.0.100 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:output=~12.1.0.100 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi check:output=~13.1.0.200 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi check:output=~14.1.0.100 cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 cmd:rmdef -t network -o 12_1_0_0-255_255_0_0 cmd:rmdef -t network -o 13_1_0_0-255_255_0_0 cmd:rmdef -t network -o 14_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC /etc/network/interfaces.d/$$THIRDNIC:1";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC /etc/network/interfaces.d/$$THIRDNIC:1";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC" cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$SECONDNIC" @@ -463,26 +477,27 @@ cmd:xdsh $$CN "ip addr del 14.1.0.100/16 dev $$THIRDNIC" cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 cmd:mv -f /etc/hosts.bak /etc/hosts -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi cmd:xdsh $$CN "rm -rf /tmp/backupnet/" end start:confignetwork_vlan_eth0 description: this case is to verify if confignetwork could config vlan for CN.When CN has Ethernet nic eth0, user wants to confgure 2 vlans, Configure vlan eth0.6 60.5.106.9 and eth0.7 70.5.106.9 based on ethernet nic eth0 +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi -cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC check:rc==0 cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0 check:rc==0 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:output=~11.1.0.100 cmd:chdef $$CN nicips.$$SECONDNIC= nictypes.$$SECONDNIC= nicnetworks.$$SECONDNIC= check:rc==0 @@ -494,12 +509,12 @@ cmd:chdef $$CN nicnetworks.$$SECONDNIC.6="60_0_0_0-255_0_0_0" nicnetworks.$$SECO check:rc==0 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC.6"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.6"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/network/interfaces.d/$$SECONDNIC.6";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC.6"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.6"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/network/interfaces.d/$$SECONDNIC.6";else echo "Sorry,this is not supported os"; fi check:output=~60.5.106.9 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC.7"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.7"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/network/interfaces.d/$$SECONDNIC.7";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC.7"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.7"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/network/interfaces.d/$$SECONDNIC.7";else echo "Sorry,this is not supported os"; fi check:output=~70.5.106.9 cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 60_0_0_0-255_0_0_0 cmd:rmdef -t network -o 70_0_0_0-255_0_0_0 @@ -508,11 +523,11 @@ cmd:xdsh $$CN "ip addr del 70.5.106.9/8 dev $$SECONDNIC.7" cmd:xdsh $$CN "ip link del dev $$SECONDNIC.6" cmd:xdsh $$CN "ip link del dev $$SECONDNIC.7" cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC" -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC.6 /etc/sysconfig/network/ifcfg-$$SECONDNIC.7"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.6 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.7"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC.6 /etc/network/interfaces.d/$$SECONDNIC.7";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC.6 /etc/sysconfig/network/ifcfg-$$SECONDNIC.7"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.6 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.7"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC.6 /etc/network/interfaces.d/$$SECONDNIC.7";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces" check:rc==0 @@ -520,20 +535,21 @@ end start:confignetwork_vlan_false description:this case is to verify if confignetwork could process the false value when vlan nicdevice is not correctly set +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi -cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1500 check:rc==0 cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0 check:rc==0 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:output=~11.1.0.100 cmd:chdef $$CN nicips.$$SECONDNIC= nictypes.$$SECONDNIC= nicnetworks.$$SECONDNIC= check:rc==0 @@ -552,11 +568,11 @@ cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 cmd:rmdef -t network -o 60_0_0_0-255_0_0_0 cmd:rmdef -t network -o 70_0_0_0-255_0_0_0 cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC" -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces" check:rc==0 @@ -564,13 +580,14 @@ end start:confignetwork_bond_eth2_eth3 description: this case is to verify if confignetwork could config bond for CN.CN has 2 Ethernet nics, eth2 and eth3, user configures bond bond0 using ethernet nic eth2 and eth3. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi -cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC check:rc==0 cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0 @@ -589,7 +606,7 @@ cmd:chdef $$CN nicnetworks.bond0=30_5_0_0-255_255_0_0 nictypes.$$SECONDNIC=ether check:rc==0 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network/ifcfg-bond0"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network-scripts/ifcfg-bond0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network/ifcfg-bond0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network-scripts/ifcfg-bond0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi check:output=~30.5.106.9 check:rc==0 cmd:xdsh $$CN "ls /sys/class/net" @@ -597,20 +614,20 @@ check:output=~bond0 cmd:xdsh $$CN "cat /sys/class/net/bonding_masters" check:output=~bond0 cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 12_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 30_5_0_0-255_255_0_0 cmd:xdsh $$CN "ip addr del 30.5.106.9/16 dev bond0" cmd:xdsh $$CN "ip link del dev bond0" cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters" -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces" check:rc==0 @@ -618,13 +635,14 @@ end start:confignetwork_bond_false description: this case is to verify if confignetwork could process when bond is not correctly set. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi -cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC check:rc==0 cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0 @@ -650,15 +668,15 @@ check:rc!=0 cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC" cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$THIRDNIC" cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 12_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 30_5_0_0-255_255_0_0 cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces" check:rc==0 @@ -666,13 +684,14 @@ end start:confignetwork_vlan_bond description: this case is to verify if confignetwork could config bond for CN.CN has 2 Ethernet nic eth2 and eth3, user wants to bond them to bond0, then make 2 vlan bond0.2 and bond0.3 for data network. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi -cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1500 check:rc==0 cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0 @@ -693,9 +712,9 @@ cmd:chdef $$CN nicdevices.bond0.2=bond0 nicdevices.bond0.3=bond0 nicips.bond0.2= check:rc==0 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-bond0.2"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-bond0.2"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/bond0.2";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-bond0.2"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-bond0.2"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/bond0.2";else echo "Sorry,this is not supported os"; fi check:output=~30.5.106.8 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-bond0.3"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/bond0.3";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-bond0.3"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/bond0.3";else echo "Sorry,this is not supported os"; fi check:output=~40.5.106.8 cmd:xdsh $$CN "ls /sys/class/net" check:output=~bond0 @@ -704,10 +723,10 @@ check:output=~bond0.3 cmd:xdsh $$CN "cat /sys/class/net/bonding_masters" check:output=~bond0 cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 12_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 30_5_0_0-255_255_0_0 cmd:rmdef -t network -o 40_5_0_0-255_255_0_0 @@ -719,11 +738,11 @@ cmd:xdsh $$CN "ip link del dev bond0" cmd:xdsh $$CN "ip link del dev bond0.2" cmd:xdsh $$CN "ip link del dev bond0.3" cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters" -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces" check:rc==0 @@ -731,13 +750,14 @@ end start:confignetwork_2eth_bridge_br0 description:this case is to verify if confignetwork could config bridge for CN.CN has 2 Ethernet nics eth2 and eth3, user want to configure bond bond0 using eth2 and eth3, creates bridge br0 based on bond0. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi -cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC check:rc==0 cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0 @@ -756,7 +776,7 @@ cmd:chdef $$CN nicnetworks.br0=30_5_0_0-255_255_0_0 nicdevices.br0=bond0 nictype check:rc==0 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network/ifcfg-br0"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network-scripts/ifcfg-br0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network/ifcfg-br0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network-scripts/ifcfg-br0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi check:output=~30.5.106.9 check:rc==0 cmd:xdsh $$CN "ls /sys/class/net" @@ -764,10 +784,10 @@ check:output=~br0 cmd:xdsh $$CN "cat /sys/class/net/bonding_masters" check:output=~bond0 cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 12_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 30_5_0_0-255_255_0_0 cmd:xdsh $$CN "ip addr del 30.5.106.9/16 dev br0" @@ -775,23 +795,24 @@ cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC" cmd:xdsh $$CN "ip addr del 12.1.0.200/16 dev $$THIRDNIC" cmd:xdsh $$CN "ip link del dev br0" cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters" -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-br0"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-br0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-br0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-br0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces" end start:confignetwork_2eth_bridge_br22_br33 description:this case is to verify if confignetwork could config bridge for CN.CN has 2 Ethernet nics eth2 and eth3, user wants to bond them as bond0, then make vlan bond0.2 and bond0.3, using bond0.2 create bridge br22,using bond0.3 create bridge br33. Use confignetwork to configure bond bond0, create vlan bond0.2 and bond0.3, create bridge br22 and br33. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi -cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC check:rc==0 cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0 @@ -812,10 +833,10 @@ cmd:chdef $$CN nicdevices.br22=bond0.2 nicdevices.br33=bond0.3 nictypes.br22=bri check:rc==0 cmd:updatenode $$CN -P confignetwork check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-br22"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br22"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/br22";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-br22"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br22"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/br22";else echo "Sorry,this is not supported os"; fi check:output=~30.5.106.8 check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-br33"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi check:output=~40.5.106.8 check:rc==0 cmd:xdsh $$CN "ls /sys/class/net" @@ -824,10 +845,10 @@ check:output=~br33 cmd:xdsh $$CN "cat /sys/class/net/bonding_masters" check:output=~bond0 cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 12_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 30_5_0_0-255_255_0_0 cmd:xdsh $$CN "ip addr del 30.5.106.8/16 dev br22" @@ -841,23 +862,24 @@ cmd:xdsh $$CN "ip link del dev bond0" cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC" cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$THIRDNIC" cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters" -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0.2 /etc/sysconfig/network-scripts/ifcfg-bond0.3 /etc/sysconfig/network-scripts/ifcfg-br22 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0.2 /etc/sysconfig/network-scripts/ifcfg-bond0.3 /etc/sysconfig/network-scripts/ifcfg-br22 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces" end start:confignetwork_installnic_2eth_bridge_br22_br33 description:this case is to test if confignetwork could config installnic and 2 bridges at the same time +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi -cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC check:rc==0 cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0 @@ -878,14 +900,14 @@ cmd:chdef $$CN nicdevices.br22=bond0.2 nicdevices.br33=bond0.3 nictypes.br22=bri check:rc==0 cmd:updatenode $$CN -P "confignetwork -s" check:rc==0 -cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi +cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi check:rc==0 check:output=~__GETNODEATTR($$CN,ip)__ check:output!~dhcp -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-br22"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br22"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/br22";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-br22"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br22"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/br22";else echo "Sorry,this is not supported os"; fi check:output=~30.5.106.8 check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-br33"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi check:output=~40.5.106.8 check:rc==0 cmd:xdsh $$CN "ls /sys/class/net" @@ -894,10 +916,10 @@ check:output=~br33 cmd:xdsh $$CN "cat /sys/class/net/bonding_masters" check:output=~bond0 cmd:rmdef -t network -o 11_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 12_1_0_0-255_255_0_0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:rmdef -t network -o 30_5_0_0-255_255_0_0 cmd:xdsh $$CN "ip addr del 30.5.106.8/16 dev br22" @@ -910,23 +932,24 @@ cmd:xdsh $$CN "ip link del dev bond0.3" cmd:xdsh $$CN "ip link del dev bond0" cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC" cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$THIRDNIC" -cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0.2 /etc/sysconfig/network-scripts/ifcfg-bond0.3 /etc/sysconfig/network-scripts/ifcfg-br22 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0.2 /etc/sysconfig/network-scripts/ifcfg-bond0.3 /etc/sysconfig/network-scripts/ifcfg-br22 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces" end start:confignetwork__bridge_false description:this case is to test if confignetwork could process false value when the bridge is not correctly set. +label:others,network cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "rm -rf /tmp/backupnet/" cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi -cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi +cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi cmd:mkdef -t network -o 30_5_0_0-255_255_0_0 net=30.5.0.0 mask=255.255.0.0 check:rc==0 cmd:mkdef -t network -o 40_5_0_0-255_255_0_0 net=40.5.0.0 mask=255.255.0.0 @@ -946,17 +969,18 @@ cmd:xdsh $$CN "ip link del dev bond0.3" cmd:xdsh $$CN "ip link del dev bond0" cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces" end start:confignetwork_static_installnic description:Reconfigure installnic without dhclient lease file +label:others,network cmd:lsdef $$CN -z && lsdef -l $$CN -z >/tmp/CN.stanza check:rc==0 cmd:xdsh $$CN "mkdir -p /tmp/backupnet" check:rc==0 -cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:xdsh $$CN "ps -A --format pid,comm | awk '/dhclient/ { print \$1 }' | xargs -r -n 1 kill" cmd:xdsh $$CN "ps -A --format pid,comm | awk '/dhclient/ { print \$1 }' | xargs -r -n 1 kill -KILL" @@ -968,7 +992,7 @@ cmd:xdsh $$CN date check:rc==0 # Clean up cmd:test -e /tmp/CN.stanza && rmdef $$CN && mkdef -z /tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 100_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501 @@ -19,6 +20,7 @@ end start:confignics_config_multiple_ports_single_value description:confignics +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 100_1_0_0-255_255_0_0 net=100.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501 @@ -49,6 +51,7 @@ end start:confignics_config_multiple_ports_multiple_value description:confignics +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501 @@ -93,6 +96,7 @@ end start:confignics_config_multiple_port_withnichostnamesuffixes_multiple_value description:confignics +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1501 @@ -147,6 +151,7 @@ end start:confignics_config_multiple_port_withnicaliases_multiple_value description:confignics +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC @@ -200,6 +205,7 @@ end start:confignics_disable_set_to_yes description:confignics +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN ifdown $$SECONDNIC @@ -222,6 +228,7 @@ end start:confignics_disable_set_to_1 description:confignics +label:others,network,updatenode cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN ifdown $$SECONDNIC @@ -244,6 +251,7 @@ end start:confignics_s description:confignics_s +label:others,network,updatenode cmd:tabdump networks > /opt/xcat/share/xcat/tools/autotest/testcase/confignics/networks.csv check:rc==0 cmd:/opt/xcat/share/xcat/tools/autotest/testcase/confignics/mtu_set_clean S 1496 @@ -268,6 +276,7 @@ check:rc==0 end start:chdef_nicips description:nicip could be set to null +label:others,network,updatenode Attribute: $$CN-The operation object of chdef command cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/copycds/cases0 b/xCAT-test/autotest/testcase/copycds/cases0 index 7f2632131..b1d796fd5 100644 --- a/xCAT-test/autotest/testcase/copycds/cases0 +++ b/xCAT-test/autotest/testcase/copycds/cases0 @@ -1,5 +1,6 @@ start:copycds_iso os:Linux +label:others cmd:rm -rf /install/__GETNODEATTR($$CN,os)__ #cmd:umount /mnt/xcat cmd:copycds $$ISO @@ -11,6 +12,7 @@ check:rc==0 end start:lskmodules_o +label:others cmd:lskmodules -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__ check:rc==0 check:output=~.ko(.xz): @@ -19,6 +21,7 @@ end start:copycds_n os:Linux +label:others #cmd:umount /mnt/xca cmd:rm -rf /install/__GETNODEATTR($$CN,os)__ cmd:copycds -n __GETNODEATTR($$CN,os)__ $$ISO @@ -33,6 +36,7 @@ end start:copycds_a os:Linux +label:others #cmd:umount /mnt/xcat cmd:copycds -a __GETNODEATTR($$CN,arch)__ $$ISO check:rc==0 @@ -44,6 +48,7 @@ end start:copycds_n_a os:Linux +label:others #cmd:umount /mnt/xcat cmd:copycds -n __GETNODEATTR($$CN,os)__ -a __GETNODEATTR($$CN,arch)__ $$ISO check:rc==0 @@ -55,6 +60,7 @@ end start:copycds_a_err os:Linux +label:others #cmd:umount /mnt/xcat cmd:copycds -a 386 $$ISO check:output=~Error @@ -62,6 +68,7 @@ end start:copycds_n_err os:Linux +label:others #cmd:umount /mnt/xcat cmd:copycds -n aix $$ISO check:rc!=0 @@ -70,6 +77,7 @@ end start:copycds_p os:Linux +label:others #cmd:umount /mnt/xcat cmd:mkdir -p /install/tmp cmd:copycds -p /install/tmp $$ISO @@ -84,6 +92,7 @@ end start:copycds_path os:Linux +label:others #cmd:umount /mnt/xcat cmd:mkdir -p /install/tmp cmd:copycds --path /install/tmp $$ISO @@ -99,6 +108,7 @@ end start:copycds_i os:Linux +label:others cmd:copycds -i $$ISO check:rc==0 check:output=~OS Image:$$ISO @@ -109,6 +119,7 @@ end start:copycds_inspection os:Linux +label:others cmd:copycds --inspection $$ISO check:rc==0 check:output=~OS Image:$$ISO @@ -119,6 +130,7 @@ end start:copycds_o os:Linux +label:others cmd:copycds -o $$ISO check:rc==0 check:output=~Copying media to /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__ @@ -129,6 +141,7 @@ end start:copycds_noosimage os:Linux +label:others cmd:copycds --noosimage $$ISO check:rc==0 check:output=~Copying media to /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__ @@ -139,6 +152,7 @@ end start:copycds_w os:Linux +label:others cmd:copycds $$ISO check:rc==0 cmd:copycds -w $$ISO @@ -149,6 +163,7 @@ end start:copycds_w2 os:Linux +label:others cmd:rm -rf /install/__GETNODEATTR($$CN,os)__ check:rc==0 cmd:copycds -w $$ISO @@ -159,6 +174,7 @@ end start:copycds_nonoverwrite os:Linux +label:others cmd:copycds $$ISO check:rc==0 cmd:copycds --nonoverwrite $$ISO @@ -168,6 +184,7 @@ end start:copycds_nonoverwrite2 os:Linux +label:others cmd:rm -rf /install/__GETNODEATTR($$CN,os)__ check:rc==0 cmd:copycds --nonoverwrite $$ISO @@ -178,6 +195,7 @@ end start:copycds_p_newdir os:Linux +label:others cmd:if [ -e /install/newdir ];then mv /install/newdir /install/newdirbak; fi cmd:copycds $$ISO -p /install/newdir check:rc==0 @@ -191,6 +209,7 @@ end start:copycds_p_noninstalldir os:Linux +label:others cmd:if [ -e /noninstalldir ];then mv /noninstalldir /noninstaldirbak; fi cmd:copycds $$ISO -p /noninstalldir check:rc==0 diff --git a/xCAT-test/autotest/testcase/copycds/cases1 b/xCAT-test/autotest/testcase/copycds/cases1 index a814a99cc..d2ed72467 100644 --- a/xCAT-test/autotest/testcase/copycds/cases1 +++ b/xCAT-test/autotest/testcase/copycds/cases1 @@ -1,5 +1,6 @@ start:copycds_bogus_disc description: Test cases for the copycds with a bogus disc +label:others cmd:/opt/xcat/share/xcat/tools/autotest/testcase/copycds/copycds_bogus_disc check:rc==0 end diff --git a/xCAT-test/autotest/testcase/discovery/bmc_discovery_only b/xCAT-test/autotest/testcase/discovery/bmc_discovery_only index 0b871c218..3fc566434 100644 --- a/xCAT-test/autotest/testcase/discovery/bmc_discovery_only +++ b/xCAT-test/autotest/testcase/discovery/bmc_discovery_only @@ -1,5 +1,6 @@ start:bmc_discovery_only description: test the whole process of bmc discovery +label:others,discovery Attribute: $$NODE_DISCOVERY_TARGET:The machine plan to be discovered. $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE :The valid dymanic ip range which has been configured in DHCP server and can offer service. cmd:/opt/xcat/share/xcat/tools/autotest/testcase/discovery/discovery_test --discovery_target_node $$NODE_DISCOVERY_TARGET --bmc_dynamic_ip_range $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE --bmc_discovery_only check:rc==0 diff --git a/xCAT-test/autotest/testcase/discovery/mtm_based_node_discovery b/xCAT-test/autotest/testcase/discovery/mtm_based_node_discovery index 80e28fa3c..135c70b7e 100644 --- a/xCAT-test/autotest/testcase/discovery/mtm_based_node_discovery +++ b/xCAT-test/autotest/testcase/discovery/mtm_based_node_discovery @@ -1,5 +1,6 @@ start:mtms_based_node_discovery description: test the whole process of mtms_based node discovery +label:others,discovery Attribute: $$NODE_DISCOVERY_TARGET:The machine plan to be discovered. $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE :The valid dymanic ip range which has been configured in DHCP server and can offer service. cmd:/opt/xcat/share/xcat/tools/autotest/testcase/discovery/discovery_test --discovery_mode mtms --discovery_target_node $$NODE_DISCOVERY_TARGET --bmc_dynamic_ip_range $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE --osimage __GETNODEATTR($$NODE_DISCOVERY_TARGET,os)__-__GETNODEATTR($$NODE_DISCOVERY_TARGET,arch)__-install-compute check:rc==0 diff --git a/xCAT-test/autotest/testcase/discovery/switch_based_node_discovery b/xCAT-test/autotest/testcase/discovery/switch_based_node_discovery index 092e33388..a25bc0c9e 100644 --- a/xCAT-test/autotest/testcase/discovery/switch_based_node_discovery +++ b/xCAT-test/autotest/testcase/discovery/switch_based_node_discovery @@ -1,5 +1,6 @@ start:switch_based_node_discovery description: test the whole process of switch_based node discovery +label:others,discovery Attribute: $$NODE_DISCOVERY_TARGET:The machine plan to be discovered. $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE :The valid dymanic ip range which has been configured in DHCP server and can offer service. cmd:/opt/xcat/share/xcat/tools/autotest/testcase/discovery/discovery_test --discovery_mode switch --discovery_target_node $$NODE_DISCOVERY_TARGET --bmc_dynamic_ip_range $$NODE_DISCOVERY_BMC_DYNAMIC_IP_RANGE --osimage __GETNODEATTR($$NODE_DISCOVERY_TARGET,os)__-__GETNODEATTR($$NODE_DISCOVERY_TARGET,arch)__-install-compute check:rc==0 diff --git a/xCAT-test/autotest/testcase/dockercommand/cases0 b/xCAT-test/autotest/testcase/dockercommand/cases0 index 3ae9503b4..3446a4ca2 100644 --- a/xCAT-test/autotest/testcase/dockercommand/cases0 +++ b/xCAT-test/autotest/testcase/dockercommand/cases0 @@ -1,5 +1,6 @@ start:rpower_stop_docker description:stop a created docker instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -27,6 +28,7 @@ check:rc==0 end start:rpower_start_docker description:start a created docker instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -52,6 +54,7 @@ end start:rpower_state_docker description:get state of the instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -84,6 +87,7 @@ end start:rpower_restart_docker description:restart a created docker instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -114,6 +118,7 @@ end start:rpower_pause_docker decription:pause all processes in the instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -141,6 +146,7 @@ end start:rpower_unpause_docker description:unpause all processes in the instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -167,12 +173,14 @@ check:rc==0 end start:mkdocker_h description:output usage for mkdocker +label:others,docker cmd:mkdocker -h check:rc==0 check:output=~Usage: mkdocker end start:mkdocker_command description:create docker instance image should be ubuntu and command should be bash here +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -204,12 +212,14 @@ check:rc==0 end start:rmdocker_h description:output usage for rmdocker +label:others,docker cmd:rmdocker -h check:rc==0 check:output=~Usage: rmdocker end start:rmdocker_command description:remove docker instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -231,6 +241,7 @@ check:rc==0 end start:rmdocker_f_command description:force to remove docker instance +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN @@ -255,12 +266,14 @@ check:rc==0 end start:lsdocker_h_command description:output usage for lsdocker +label:others,docker cmd:lsdocker -h check:rc==0 check:output=~Usage: lsdocker end start:lsdocker_l_command description:list docker instance info +label:others,docker cmd:chdef $$DOCKERCN dockerhost=$$DOCKERHOST:2375 dockercpus=1 ip=$$DOCKERCONIP dockermemory=4096 groups=docker,all mgt=docker check:rc==0 cmd:makehosts $$DOCKERCN diff --git a/xCAT-test/autotest/testcase/genesis/cases0 b/xCAT-test/autotest/testcase/genesis/cases0 index 92796a276..5ebe97e30 100644 --- a/xCAT-test/autotest/testcase/genesis/cases0 +++ b/xCAT-test/autotest/testcase/genesis/cases0 @@ -1,4 +1,5 @@ start:nodeset_shell +label:others,genesis description: verify could log in genesis shell cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/genesis/genesistest.pl -n $$CN -g check:rc==0 @@ -10,6 +11,7 @@ cmd:cat /tmp/genesistestlog/* end start:nodeset_cmdline +label:others,genesis description:verify could run cmdline successfully cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/genesis/genesistest.pl -n $$CN -g check:rc==0 @@ -21,6 +23,7 @@ cmd:cat /tmp/genesistestlog/* end start:nodeset_runimg +label:others,genesis description:verify runimg could work cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/genesis/genesistest.pl -n $$CN -g check:rc==0 @@ -31,6 +34,7 @@ check:rc==0 cmd:cat /tmp/genesistestlog/* end start:nodeset_shell_incorrectmasterip +label:others,genesis description:very if computenode need to do nodeset shell in different net with master will success cmd:/opt/xcat/share/xcat/tools/autotest/testcase/genesis/test.sh --check xnba check:rc==0 diff --git a/xCAT-test/autotest/testcase/genimage/cases0 b/xCAT-test/autotest/testcase/genimage/cases0 index ff4c2a804..e2b023e6e 100644 --- a/xCAT-test/autotest/testcase/genimage/cases0 +++ b/xCAT-test/autotest/testcase/genimage/cases0 @@ -1,4 +1,5 @@ start:genimage_h +label:others,image os:Linux cmd:genimage -h check:output=~Usage @@ -6,6 +7,7 @@ check:rc==0 end start:genimage_help +label:others,image os:Linux cmd:genimage --help check:output=~Usage @@ -13,6 +15,7 @@ check:rc==0 end start:genimage_stateless +label:others,image os:Linux cmd:copycds $$ISO check:rc==0 @@ -25,6 +28,7 @@ cmd:mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/c end start:genimage_statelite +label:others,image os:Linux cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/geninitrd/cases0 b/xCAT-test/autotest/testcase/geninitrd/cases0 index 0f89c3253..2766519d9 100644 --- a/xCAT-test/autotest/testcase/geninitrd/cases0 +++ b/xCAT-test/autotest/testcase/geninitrd/cases0 @@ -1,4 +1,5 @@ start:geninitrd_i_n_o_p +label:others os:Linux cmd:copycds $$ISO cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute diff --git a/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk b/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk index 628424a0a..488a0b6f4 100644 --- a/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk +++ b/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk @@ -1,6 +1,7 @@ start:fresh_install_disk os:Linux description:check fresh install disk, usded for x86 multi disk only, and not check RH7.2 for RH os wwn isue. +label:others,invoke_provision,install_disk cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=100" cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=300 seek=60858" diff --git a/xCAT-test/autotest/testcase/get_install_disk/reinstall_disk b/xCAT-test/autotest/testcase/get_install_disk/reinstall_disk index 2a366e880..a894df7f7 100644 --- a/xCAT-test/autotest/testcase/get_install_disk/reinstall_disk +++ b/xCAT-test/autotest/testcase/get_install_disk/reinstall_disk @@ -1,6 +1,7 @@ start:reinstall_disk os:Linux description:check reinstall disk, usded for x86 multi disk only, and not check RH7.2 for RH os wwn isue. +label:others,invoke_provision,install_disk cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=100" cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=300 seek=60858" diff --git a/xCAT-test/autotest/testcase/getmacs/cases0 b/xCAT-test/autotest/testcase/getmacs/cases0 index 9f8589e3b..659ac4919 100644 --- a/xCAT-test/autotest/testcase/getmacs/cases0 +++ b/xCAT-test/autotest/testcase/getmacs/cases0 @@ -1,4 +1,5 @@ start:getmacs_noderange +label:others cmd:tabdump mac > /tmp/mac.csv cmd:chtab -d node=$$CN mac cmd:getmacs $$CN @@ -10,6 +11,7 @@ cmd:tabrestore /tmp/mac.csv cmd:rm /tmp/mac.csv end start:getmacs_d +label:others cmd:tabdump mac > /tmp/mac.csv cmd:chtab -d node=$$CN mac cmd:getmacs $$CN -d @@ -21,6 +23,7 @@ cmd:tabrestore /tmp/mac.csv cmd:rm /tmp/mac.csv end start:getmacs_f_D +label:others cmd:tabdump mac > /tmp/mac.csv cmd:chtab -d node=$$CN mac cmd:getmacs $$CN -f -D diff --git a/xCAT-test/autotest/testcase/go-xcat/bionic-ppc64el.sources.list b/xCAT-test/autotest/testcase/go_xcat/bionic-ppc64el.sources.list similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/bionic-ppc64el.sources.list rename to xCAT-test/autotest/testcase/go_xcat/bionic-ppc64el.sources.list diff --git a/xCAT-test/autotest/testcase/go-xcat/bionic-x86_64.sources.list b/xCAT-test/autotest/testcase/go_xcat/bionic-x86_64.sources.list similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/bionic-x86_64.sources.list rename to xCAT-test/autotest/testcase/go_xcat/bionic-x86_64.sources.list diff --git a/xCAT-test/autotest/testcase/go-xcat/case0 b/xCAT-test/autotest/testcase/go_xcat/case0 similarity index 96% rename from xCAT-test/autotest/testcase/go-xcat/case0 rename to xCAT-test/autotest/testcase/go_xcat/case0 index dbcdf0a47..7af2a8a04 100644 --- a/xCAT-test/autotest/testcase/go-xcat/case0 +++ b/xCAT-test/autotest/testcase/go_xcat/case0 @@ -1,5 +1,6 @@ start:go_xcat_local_repo_case1 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.repo install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -16,7 +17,7 @@ cmd:xdsh $$CN "cd /; tar -jxf /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /xcat-core; ./mklocalrepo.sh" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -40,6 +41,7 @@ end start:go_xcat_local_repo_case2 description:test go_xcat with the option --xcat-core=/path/to/xcat-core install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -54,7 +56,7 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/core-*-snap.tar.bz2 /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /; tar -jxf /xcat-core.tar.bz2" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -78,6 +80,7 @@ end start:go_xcat_local_repo_case3 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.tar install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -92,7 +95,7 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/core-*-snap.tar.bz2 /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /; bunzip2 /xcat-core.tar.bz2" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -116,6 +119,7 @@ end start:go_xcat_local_repo_case4 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.tar.bz2 --xcat-dep=/path/to/xcat-dep.tar.bz2 install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -130,7 +134,7 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/core-*-snap.tar.bz2 /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /xcat-dep.tar.bz2" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -154,6 +158,7 @@ end start:go_xcat_local_repo_case5 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.repo --xcat-dep=/path/to/xcat-dep.repo install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -176,7 +181,7 @@ cmd:xdsh $$CN "cd /; tar -jxf /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /xcat-core; ./mklocalrepo.sh" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -200,6 +205,7 @@ end start:go_xcat_local_repo_case6 description:test go_xcat with the option --xcat-core=/path/to/xcat-core --xcat-dep=/path/to/xcat-dep install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -218,7 +224,7 @@ cmd:xdsh $$CN "cd /; tar -jxf /xcat-dep.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /; tar -jxf /xcat-core.tar.bz2" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -242,6 +248,7 @@ end start:go_xcat_local_repo_case7 description:test go_xcat with the option --xcat-core=/path/to/xcat-core.tar.bz2 --xcat-dep=/path/to/xcat-dep.tar.bz2 install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -254,7 +261,7 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/core-*-snap.tar.bz2 /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /xcat-dep.tar.bz2" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi diff --git a/xCAT-test/autotest/testcase/go-xcat/case1 b/xCAT-test/autotest/testcase/go_xcat/case1 similarity index 96% rename from xCAT-test/autotest/testcase/go-xcat/case1 rename to xCAT-test/autotest/testcase/go_xcat/case1 index 1cfec3af9..de11a1a6a 100644 --- a/xCAT-test/autotest/testcase/go-xcat/case1 +++ b/xCAT-test/autotest/testcase/go_xcat/case1 @@ -1,5 +1,6 @@ start:go_xcat_noinput description:test go_xcat without any input parameters +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -11,7 +12,7 @@ cmd:xdsh $$CN "cd /; rm -rf /go-xcat" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -35,6 +36,7 @@ end start:go_xcat_with_x description:test go_xcat with the option -x version -y install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -45,7 +47,7 @@ cmd:xdsh $$CN "cd /; rm -rf /go-xcat" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -76,6 +78,7 @@ end start:go_xcat_with_xcat-version-1 description:test go_xcat with the option --xcat-version=devel install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -86,7 +89,7 @@ cmd:xdsh $$CN "cd /; rm -rf /go-xcat" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -110,6 +113,7 @@ end start:go_xcat_with_xcat-version-2 description:test go_xcat with the option --xcat-version=$MIGRATION2_VERSION install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -120,7 +124,7 @@ cmd:xdsh $$CN "cd /; rm -rf /go-xcat" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi diff --git a/xCAT-test/autotest/testcase/go-xcat/case2 b/xCAT-test/autotest/testcase/go_xcat/case2 similarity index 97% rename from xCAT-test/autotest/testcase/go-xcat/case2 rename to xCAT-test/autotest/testcase/go_xcat/case2 index ef1812a6f..058a19de3 100644 --- a/xCAT-test/autotest/testcase/go-xcat/case2 +++ b/xCAT-test/autotest/testcase/go_xcat/case2 @@ -1,5 +1,6 @@ start:go_xcat_online_repo_case1 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core.repo install. This case is only for rh and suse +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -30,6 +31,7 @@ end start:go_xcat_online_repo_case2 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -40,7 +42,7 @@ cmd:xdsh $$CN "cd /; rm -rf /go-xcat" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -65,6 +67,7 @@ end start:go_xcat_online_repo_case3 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core.tar.bz2 install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -75,7 +78,7 @@ cmd:xdsh $$CN "cd /; rm -rf /go-xcat" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -100,6 +103,7 @@ end start:go_xcat_online_repo_case4 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core.repo --xcat-dep=http://xcat.org/path/to/xcat-dep.repo install. This is for rh and suse. +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -130,6 +134,7 @@ end start:go_xcat_online_repo_case5 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core --xcat-dep=http://xcat.org/path/to/xcat-dep install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -141,7 +146,7 @@ check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 cmd:dir="__GETNODEATTR($$CN,os)__"; if grep SUSE /etc/*release;then os=`echo $dir |cut -c 1-6` && xdsh $$CN "cd /xcat-dep/$os/__GETNODEATTR($$CN,arch)__/; ./mklocalrepo.sh" ; elif grep "Red Hat" /etc/*release;then os=`echo $dir |cut -c 1-2` && xdsh $$CN "cd /xcat-dep/$os`echo __GETNODEATTR($$CN,os)__ | cut -c6`/__GETNODEATTR($$CN,arch)__/; ./mklocalrepo.sh"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cd /xcat-dep; ./mklocalrepo.sh"; else echo "Sorry,this is not supported os"; fi -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi @@ -164,6 +169,7 @@ end start:go_xcat_online_repo_case6 description:test go_xcat with the option --xcat-core=http://xcat.org/path/to/xcat-core.tar.bz2 --xcat-dep=http://xcat.org/path/to/xcat-dep.tar.bz2 install +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat xcat-buildkit xcat-genesis-scripts xcat-genesis-base-amd64 xcat-genesis-base-ppc64 -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -176,7 +182,7 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 cmd:cp /xcat-dep-*.tar.bz2 /install/ check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi diff --git a/xCAT-test/autotest/testcase/go-xcat/case4 b/xCAT-test/autotest/testcase/go_xcat/case4 similarity index 97% rename from xCAT-test/autotest/testcase/go-xcat/case4 rename to xCAT-test/autotest/testcase/go_xcat/case4 index 79137ac6f..c5603a64b 100644 --- a/xCAT-test/autotest/testcase/go-xcat/case4 +++ b/xCAT-test/autotest/testcase/go_xcat/case4 @@ -1,5 +1,6 @@ start:go_xcat_update_case1 description:test go_xcat with the option update +label:others,go_xcat os:Linux cmd:if xdsh $$CN "zypper -h"; then xdsh $$CN "zypper remove -y *xCAT*"; elif xdsh $$CN "yum -h";then xdsh $$CN "yum remove -y *xCAT*"; elif xdsh $$CN "apt-get -h";then xdsh $$CN "apt-get purge perl-xcat xcat-client xcat-server xcat -y"; else echo "Sorry,this is not supported os"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa |grep -i perl-xcat";fi @@ -14,7 +15,7 @@ cmd:xdsh $$CN "cd /; scp -r $$MN:/core-*-snap.tar.bz2 /xcat-core.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /xcat-dep.tar.bz2" check:rc==0 -cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi +cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "scp -r $$MN:/etc/resolv.conf /etc/resolv.conf" && xdsh $$CN "wget -O - http://xcat.org/files/xcat/repos/apt/apt.key | apt-key add -"; fi check:rc==0 cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "apt-get clean && apt-get update"; fi diff --git a/xCAT-test/autotest/testcase/go-xcat/case5 b/xCAT-test/autotest/testcase/go_xcat/case5 similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/case5 rename to xCAT-test/autotest/testcase/go_xcat/case5 diff --git a/xCAT-test/autotest/testcase/go-xcat/trusty-ppc64el.sources.list b/xCAT-test/autotest/testcase/go_xcat/trusty-ppc64el.sources.list similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/trusty-ppc64el.sources.list rename to xCAT-test/autotest/testcase/go_xcat/trusty-ppc64el.sources.list diff --git a/xCAT-test/autotest/testcase/go-xcat/trusty-x86_64.sources.list b/xCAT-test/autotest/testcase/go_xcat/trusty-x86_64.sources.list similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/trusty-x86_64.sources.list rename to xCAT-test/autotest/testcase/go_xcat/trusty-x86_64.sources.list diff --git a/xCAT-test/autotest/testcase/go-xcat/xenial-ppc64el.sources.list b/xCAT-test/autotest/testcase/go_xcat/xenial-ppc64el.sources.list similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/xenial-ppc64el.sources.list rename to xCAT-test/autotest/testcase/go_xcat/xenial-ppc64el.sources.list diff --git a/xCAT-test/autotest/testcase/go-xcat/xenial-x86_64.sources.list b/xCAT-test/autotest/testcase/go_xcat/xenial-x86_64.sources.list similarity index 100% rename from xCAT-test/autotest/testcase/go-xcat/xenial-x86_64.sources.list rename to xCAT-test/autotest/testcase/go_xcat/xenial-x86_64.sources.list diff --git a/xCAT-test/autotest/testcase/httpport/cases0 b/xCAT-test/autotest/testcase/httpport/cases0 new file mode 100644 index 000000000..1c633b2aa --- /dev/null +++ b/xCAT-test/autotest/testcase/httpport/cases0 @@ -0,0 +1,161 @@ +start:genesis_work_with_non_default_http_80_port +description: change http port from default 80 to 8898 and then make sure generate genesis (mknb) work. +label:mn_only,discovery +cmd:netstat -nlp|grep -E "apache2|httpd" +check:output =~ 80 +cmd:lsdef -t site -i httpport -c |awk -F"=" '{print $2}' +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/change_http_port.sh 80 8898 +cmd:netstat -nlp|grep -E "apache2|httpd" +check:output =~ 8898 +check:rc==0 +cmd:chdef -t site httpport=8898 +check:rc==0 +cmd:lsdef -t site -i httpport -c +check:output =~ 8898 +check:rc==0 +cmd:dir="/tftpboot/pxelinux.cfg/p";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi +cmd:mknb ppc64 +check:rc==0 +cmd: #!/bin/bash +# get all filename in specified path +path=/tftpboot/pxelinux.cfg/p/ +files=$(ls $path) +for filename in $files +do + echo "The file is $filename" + grep 8898 $path$filename + if [ $? != 0 ];then + echo "port 8898 does not exist" + exit 1; + fi + links=$(grep 8898 $path$filename|awk -F " " '{print $2}') + for link in $links + do + wget $link + if [ $? != 0 ];then + echo "wget file $link failed" + exit 1; + else + echo "wget file $link succeed" + fi + done +done +rm -rf genesis* +check:rc==0 +cmd:dir="/tftpboot/xcat/xnba/nets";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi +cmd:mknb x86_64 +check:rc==0 +cmd:#!/bin/bash +# get all filename in specified path +path=/tftpboot/xcat/xnba/nets/ +rm -rf $path*.elilo +files=$(ls $path) +mnip=$(lsdef -t site -i master -c |awk -F"=" '{print $2}') +echo "The mn ip is $mnip" +for filename in $files +do + echo "The file is $filename" + grep 8898 $path$filename + if [ $? != 0 ];then + echo "port 8898 does not exist" + exit 1; + fi + grep "next-server" $path$filename + if [ $? == 0 ];then + sed -i "s/\${next-server}/$mnip/g" $path$filename + fi + + if [ "${filename##*.}"x = "uefi"x ];then + links=$(grep 8898 $path$filename|awk -F " " '{print $2}') + else + links=$(grep 8898 $path$filename|awk -F " " '{print $4}') + fi + + for link in $links + do + wget $link + if [ $? != 0 ];then + echo "wget file $link failed" + exit 1; + else + echo "wget file $link succeed" + fi + done +done +rm -rf genesis* +rm -rf elilo* +check:rc==0 +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/change_http_port.sh 8898 80 +cmd:netstat -nlp|grep -E "apache2|httpd" +check:output =~ 80 +check:rc==0 +cmd:chdef -t site httpport=80 +check:rc==0 +cmd:lsdef -t site -i httpport -c +check:output =~ 80 +check:rc==0 +cmd:dir="/tftpboot/pxelinux.cfg/p"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi +cmd:dir="/tftpboot/xcat/xnba/nets"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi +end + +start:change_http_listen_port_from_80_to_8898_in_mn +description:This test case is used to simulate a http service which does not use default 80 port in mn. This is not a regular test case, just used to set up environment. +label:others,simulator +cmd:netstat -nlp|grep -E "apache2|httpd" +check:output =~ 80 +cmd:lsdef -t site -i httpport -c |awk -F"=" '{print $2}' +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/change_http_port.sh 80 8898 +cmd:netstat -nlp|grep -E "apache2|httpd" +check:output =~ 8898 +check:rc==0 +cmd:chdef -t site httpport=8898 +check:rc==0 +cmd:lsdef -t site -i httpport -c +check:output =~ 8898 +check:rc==0 +end + +start:change_http_listen_port_from_8898_to_80_in_mn +description:This test case is used to restore environment which has been modified by test case change_http_listen_port_from_80_to_8898_in_mn. This is not a regular test case, just used to set up environment. +label:others,simulator +cmd:netstat -nlp|grep -E "apache2|httpd" +check:output =~ 8898 +cmd:lsdef -t site -i httpport -c |awk -F"=" '{print $2}' +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/httpport/change_http_port.sh 8898 80 +cmd:netstat -nlp|grep -E "apache2|httpd" +check:output =~ 80 +check:rc==0 +cmd:chdef -t site httpport=80 +check:rc==0 +cmd:lsdef -t site -i httpport -c +check:output =~ 80 +check:rc==0 +end + +start:change_http_listen_port_from_80_to_8898_in_sn +description:This test case is used to simulate a http service which does not use default 80 port in sn. This is not a regular test case, just used to set up environment. +label:others,simulator +cmd:xdsh $$SN "netstat -nlp|grep -E 'apache2|httpd'" +check:output =~ 80 +cmd:xdsh $$SN "lsdef -t site -i httpport -c |awk -F'=' '{print $2}'" +cmd:scp /opt/xcat/share/xcat/tools/autotest/testcase/httpport/change_http_port.sh $$SN:/tmp +cmd:xdsh $$SN "ls -l /tmp/ |grep change_http_port.sh" +cmd:xdsh $$SN "chmod +x /tmp/change_http_port.sh && /tmp/change_http_port.sh 80 8898" +cmd:xdsh $$SN "netstat -nlp|grep -E 'apache2|httpd' |grep 8898" +check:output =~ 8898 +check:rc==0 +end + +start:change_http_listen_port_from_8898_to_80_in_sn +description:This test case is used to restore environment which has been modified by test case change_http_listen_port_from_80_to_8898_in_sn. This is not a regular test case, just used to set up environment. +label:others,simulator +cmd:xdsh $$SN "netstat -nlp|grep -E 'apache2|httpd'" +check:output =~ 8898 +cmd:xdsh $$SN "lsdef -t site -i httpport -c |awk -F'=' '{print $2}'" +cmd:scp /opt/xcat/share/xcat/tools/autotest/testcase/httpport/change_http_port.sh $$SN:/tmp +cmd:xdsh $$SN "ls -l /tmp/ |grep change_http_port.sh" +cmd:xdsh $$SN "chmod +x /tmp/change_http_port.sh && /tmp/change_http_port.sh 8898 80" +cmd:xdsh $$SN "netstat -nlp|grep -E 'apache2|httpd' |grep 80" +check:output =~ 80 +check:rc==0 +end diff --git a/xCAT-test/autotest/testcase/httpport/change_http_port.sh b/xCAT-test/autotest/testcase/httpport/change_http_port.sh new file mode 100755 index 000000000..4ddf8b0ff --- /dev/null +++ b/xCAT-test/autotest/testcase/httpport/change_http_port.sh @@ -0,0 +1,28 @@ +#!/bin/bash +if [ -f "/etc/httpd/conf/httpd.conf" ]; then + config="/etc/httpd/conf/httpd.conf" +elif [ -f "/etc/apache2/ports.conf" ]; then + config="/etc/apache2/ports.conf" +elif [ -f "/etc/apache2/listen.conf" ]; then + config="/etc/apache2/listen.conf" +fi +port=`awk -F' ' '/^[Ll]isten / {print $2}' $config` +echo "The original httpd port is $port in $config" + +echo "start to change httpd listen port to $2" +sed -i "s/^Listen $1/Listen $2/g" $config +echo "Restart http service" +service apache2 status > /dev/null 2>&1 +if [ "$?" -eq "0" ]; then + if [ -f "/etc/apache2/sites-enabled/000-default.conf" ]; then + sed -i "s/VirtualHost \*:$1/VirtualHost \*:$2/g" /etc/apache2/sites-enabled/000-default.conf + fi + service apache2 stop + sleep 1 + service apache2 start +else + service httpd stop + sleep 1 + service httpd start +fi +exit $? diff --git a/xCAT-test/autotest/testcase/imgexport/cases0 b/xCAT-test/autotest/testcase/imgexport/cases0 index b707553d5..246647447 100644 --- a/xCAT-test/autotest/testcase/imgexport/cases0 +++ b/xCAT-test/autotest/testcase/imgexport/cases0 @@ -1,6 +1,7 @@ start:imagexport_imagename_destination os:Linux description:imgexport __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute foo.tgz +label:others,packaging cmd:copycds $$ISO cmd:mkdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute -u profile=compute provmethod=statelite osvers=__GETNODEATTR($$CN,os)__ check:rc==0 @@ -25,6 +26,7 @@ end start:imgexport_imagename_destination_p_e os:Linux description:imgexport __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute foo.tgz -p $$CN -e /install/postscripts/testscript1 +label:others,packaging cmd:copycds $$ISO cmd:mkdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute -u profile=compute provmethod=statelite osvers=__GETNODEATTR($$CN,os)__ check:rc==0 @@ -54,6 +56,7 @@ end start:imgexport_h os:Linux description: +label:others cmd:imgexport -h check:output=~Usage|usage cmd:imgexport --help @@ -63,6 +66,7 @@ end start:imgexport_v os:Linux +label:others cmd:imgexport -v check:output=~version|Version cmd:imgexport --version diff --git a/xCAT-test/autotest/testcase/imgimport/cases0 b/xCAT-test/autotest/testcase/imgimport/cases0 index af145b820..2683d62ec 100644 --- a/xCAT-test/autotest/testcase/imgimport/cases0 +++ b/xCAT-test/autotest/testcase/imgimport/cases0 @@ -1,6 +1,7 @@ start:imgimport_h os:Linux description:imgimport -h and --help +label:others cmd:imgimport -h check:output=~usage|Usage cmd:imgimport --help @@ -11,6 +12,7 @@ end start:imgimport_v os:Linux description:imgimport -v and --version +label:others cmd:imgimport -v check:output=~version|Version cmd:imgimport --version @@ -21,6 +23,7 @@ end start:imgimport_bundlefile os:Linux description:imgimport foo.tgz +label:others,packaging cmd:copycds $$ISO cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 @@ -45,6 +48,7 @@ end start:imgimport_bundlefile_p os:Linux description:imgimport foo.tgz -p $$CN +label:others,packaging cmd:copycds $$ISO cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 @@ -69,6 +73,7 @@ end start:imgimport_bundlefile_f os:Linux description:imgimport foo.tgz -f compute_test +label:others,packaging cmd:copycds $$ISO cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute check:rc==0 diff --git a/xCAT-test/autotest/testcase/infiniband/cases0 b/xCAT-test/autotest/testcase/infiniband/cases0 index 2da6c8d92..176585f4d 100644 --- a/xCAT-test/autotest/testcase/infiniband/cases0 +++ b/xCAT-test/autotest/testcase/infiniband/cases0 @@ -1,17 +1,20 @@ start:rhel_infiniband_diskless_install description:Integration test of RHEL 7 and MLNX OFED for diskless installation. Following variables need to be set in the test configuration file, ISO, CN, MLNX, DKMS. Read comments in rhel-infiniband-diskless-install.sh for details. +label:others,IB cmd:RHEL_ISO="$$ISO" LINUX_DISTRO="GETNODEATTR($$CN, os)" COMPUTE_NODE="$$CN" MLNX_ISO="$$MLNX" DKMS_RPM="$$DKMS" /opt/xcat/share/xcat/tools/autotest/testcase/infiniband/rhel-infiniband-diskless-install.sh check:rc==0 end start:rhel_infiniband_diskfull_install description:Integration test of RHEL 7 and MLNX OFED for diskfull installation. Following variables need to be set in the test configuration file, ISO, CN, MLNX, DKMS. Read comments in rhel-infiniband-diskfull-install.sh for details. +label:others,IB cmd:RHEL_ISO="$$ISO" LINUX_DISTRO="GETNODEATTR($$CN, os)" COMPUTE_NODE="$$CN" MLNX_ISO="$$MLNX" DKMS_RPM="$$DKMS" /opt/xcat/share/xcat/tools/autotest/testcase/infiniband/rhel-infiniband-diskfull-install.sh check:rc==0 end start:confignetwork_ib_ipoib description: this case is to test confignetwork could configure the first infiniband interface, ib0, successfully with updatenode. +label:others,IB cmd:lsdef $$CN;if [ $? -eq 0 ]; then lsdef -l $$CN -z >/tmp/CN.standa ;fi check:rc==0 cmd:xdsh $$CN "mkdir -p /tmp/backupnet/" diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index 05bc1f7c7..80d030fa9 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -1,5 +1,6 @@ start:install_xCAT_on_rhels_sles description:install xCAT with go-xcat tool in a fresh environment for rhels and sles +label:xcat_install os:Linux stop:yes cmd:if grep "Red Hat" /etc/*release >/dev/null; then yum install -y yum-utils bzip2; fi @@ -24,9 +25,10 @@ end start:install_xCAT_on_ubuntu description:install xCAT with go-xcat tool in a fresh environment for ubuntu +label:xcat_install os:Linux stop:yes -cmd:arc_all=`uname -a`; code=`lsb_release -sc`;if [[ $arc_all =~ "ppc64le" ]]; then arch="ppc64el";else arch="x86_64";fi; cp "/opt/xcat/share/xcat/tools/autotest/testcase/go-xcat/$code-$arch.sources.list" "/etc/apt/sources.list" +cmd:arc_all=`uname -a`; code=`lsb_release -sc`;if [[ $arc_all =~ "ppc64le" ]]; then arch="ppc64el";else arch="x86_64";fi; cp "/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-$arch.sources.list" "/etc/apt/sources.list" cmd:apt-get clean;apt-get update check:rc==0 cmd:cp /core-*-snap.tar.bz2 /install_xCAT_xcat-core.tar.bz2 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat_postscripts_failed b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat_postscripts_failed index d61220f77..511a93fea 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat_postscripts_failed +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat_postscripts_failed @@ -2,7 +2,7 @@ start:reg_linux_diskfull_installation_flat_postscripts_failed description:This case is for postscripts failed the status will return failed during diskfull installation. attribute:$$CN-The operation object of diskfull installation. os:Linux -label:others,postscripts,invoke_provison +label:others,postscripts,invoke_provision cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:MINIISO=NUll;if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]] && [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat_postscripts_failed b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat_postscripts_failed index 0121d2249..d29e28cd0 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat_postscripts_failed +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat_postscripts_failed @@ -2,7 +2,7 @@ start:reg_linux_diskless_installation_flat_postscripts_failed description:This case is for postscripts failed the status will return failed during diskless installation. attribute:$$CN-The operation object of diskless installation. os:Linux -label:others,postscripts,invoke_provison +label:others,postscripts,invoke_provision cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/setup_vm b/xCAT-test/autotest/testcase/installation/setup_vm index 176b34546..a9613d522 100644 --- a/xCAT-test/autotest/testcase/installation/setup_vm +++ b/xCAT-test/autotest/testcase/installation/setup_vm @@ -7,8 +7,8 @@ check:rc==0 cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ]; then echo "CN node is a vm, need to repower it on"; echo "rpower $$CN on"; rpower $$CN on; else echo "CN node $$CN is a non-VM; do not need to repower on it"; fi check:rc==0 -cmd:rpower $$CN stat -check:output=~on +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ]; then rpower $$CN stat;else echo "skip";fi +check:output=~on|skip cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ]; then tabdump -w node==$$CN kvm_nodedata; fi check:rc==0 @@ -20,8 +20,8 @@ check:rc==0 cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$SN,mgt)__" != "openbmc" ];then echo "SN node $$SN is a VM, need to rpower it on"; echo "rpower $$SN on"; rpower $$SN on; fi check:rc==0 -cmd:rpower $$SN stat -check:output=~on +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" -a "__GETNODEATTR($$CN,mgt)__" != "openbmc" ]; then rpower $$SN stat;else echo "skip"; fi +check:output=~on|skip check:rc==0 cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" -a "__GETNODEATTR($$SN,mgt)__" != "openbmc" ]; then tabdump -w node==$$SN kvm_nodedata; fi diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker index e7aabd53b..c8e099502 100644 --- a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker +++ b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker @@ -1,6 +1,6 @@ start:Full_installation_flat_docker os:Linux -label:others,docker,invoke_provison +label:others,docker,invoke_provision cmd:copycds $$ISO check:rc==0 cmd:makedns -n diff --git a/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump b/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump index 01dde2833..d9e8f86c7 100644 --- a/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump +++ b/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump @@ -1,4 +1,5 @@ start:linux_diskless_kdump +label:others,kdump,invoke_provision os:Linux cmd:lsdef -z $$CN > /tmp/node.stanza cmd:lsdef -t osimage -z __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute > /tmp/osimage.stanza diff --git a/xCAT-test/autotest/testcase/lskit/case0 b/xCAT-test/autotest/testcase/lskit/case0 index ffdb9ae1f..8d9dd3485 100644 --- a/xCAT-test/autotest/testcase/lskit/case0 +++ b/xCAT-test/autotest/testcase/lskit/case0 @@ -1,4 +1,5 @@ start:lskit_v +label:others,KIT os:Linux cmd:lskit -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:lskit_h +label:others,KIT os:Linux cmd:lskit -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:lskit_F +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskit;buildkit create mykits @@ -42,6 +45,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits end start:lskit_K +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskit;buildkit create mykits @@ -65,6 +69,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits end start:lskit_R +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskit;buildkit create mykits @@ -91,6 +96,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits end start:lskit_C +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskit;buildkit create mykits diff --git a/xCAT-test/autotest/testcase/lskitcomp/case0 b/xCAT-test/autotest/testcase/lskitcomp/case0 index ae02e7753..bfd0d394c 100644 --- a/xCAT-test/autotest/testcase/lskitcomp/case0 +++ b/xCAT-test/autotest/testcase/lskitcomp/case0 @@ -1,4 +1,5 @@ start:lskitcomp_v +label:others,KIT os:Linux cmd:lskitcomp -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:lskitcomp_h +label:others,KIT os:Linux cmd:lskitcomp -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:lskitcomp_C +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp;buildkit create mykits @@ -53,6 +56,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp/mykits end start:lskitcomp_C +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp;buildkit create mykits @@ -84,6 +88,7 @@ end start:lskitcomp_S +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskitcomp;buildkit create mykits diff --git a/xCAT-test/autotest/testcase/lskitdeployparam/case0 b/xCAT-test/autotest/testcase/lskitdeployparam/case0 index 7a62f5586..44e68315d 100644 --- a/xCAT-test/autotest/testcase/lskitdeployparam/case0 +++ b/xCAT-test/autotest/testcase/lskitdeployparam/case0 @@ -1,4 +1,5 @@ start:lskitdeployparam_v +label:others,KIT os:Linux cmd:lskitdeployparam -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:lskitdeployparam_h +label:others,KIT os:Linux cmd:lskitdeployparam -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:lskitdeployparam_no_param +label:others,KIT os:Linux cmd:lskitdeployparam check:rc==1 @@ -32,6 +35,7 @@ end start:lskitdeployparam_k_1 +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskit;buildkit create mykits @@ -57,6 +61,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits end start:lskitdeployparam_c_1 +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/lskit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/lskit;buildkit create mykits diff --git a/xCAT-test/autotest/testcase/lslite/cases0 b/xCAT-test/autotest/testcase/lslite/cases0 index 2f77574e4..af6114b75 100644 --- a/xCAT-test/autotest/testcase/lslite/cases0 +++ b/xCAT-test/autotest/testcase/lslite/cases0 @@ -1,5 +1,6 @@ start:lslite_i description:lslite -i +label:others,statelite os:Linux cmd:copycds $$ISO check:rc==0 @@ -26,6 +27,7 @@ end start:lslite_noderange description:lslite noderange +label:others,statelite os:Linux cmd:mkdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute -u profile=compute provmethod=statelite osvers=__GETNODEATTR($$CN,os)__ check:rc==0 @@ -52,6 +54,7 @@ end start:lslite_h os:Linux description:lslite -h and --help +label:others,statelite cmd:lslite -h check:output=~usage|Usage cmd:lslite --help diff --git a/xCAT-test/autotest/testcase/lsvm/cases0 b/xCAT-test/autotest/testcase/lsvm/cases0 index abe42f631..b29b2fc7b 100644 --- a/xCAT-test/autotest/testcase/lsvm/cases0 +++ b/xCAT-test/autotest/testcase/lsvm/cases0 @@ -1,17 +1,130 @@ #comment out for developper will not fix it #start:lsvm_null +#label:others,hctrl_hmc #cmd:lsvm #check:rc!=0 #check:output=~Usage #end -start:lsvm_node -hcp:hmc,ivm -cmd:lsvm $$CN -check:rc==0 -check:output=~name=$$CN -end start:lsvm_err_node +label:others,hctrl_hmc cmd:lsvm testnode check:rc!=0 check:output=~Error end + +start:lsvm +description:lsvm without any flag +label:mn_only,ci_test +cmd:lsvm +check:output=~Usage +end + +start:lsvm_h +description:lsvm help information +label:mn_only,ci_test +cmd:lsvm -h +check:output=~Usage +cmd:lsvm --help +check:output=~Usage +end + +start:lsvm_a +description:lsvm -a/--all could work as design, to display all the information for the vm +label:others,hctrl_kvm +cmd:rpower $$CN on +cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done +check:ouptut=~Running|on +cmd:lsvm $$CN +check:rc==0 +check:output=~$$CN: Id:\s*\w+ +check:output=~$$CN: Host:\s*\w+ +check:output=~$$CN: OS:\s*\w+ +check:output=~$$CN: Memory:\s*\w+ +check:output=~$$CN: CPU:\s*\w+ +check:output=~$$CN: State:\s*\w+ +check:output=~$$CN: Disk\s*\w+ +cmd:lsvm $$CN -a +check:rc==0 +check:output=~$$CN: Id:\s*\w+ +check:output=~$$CN: Host:\s*\w+ +check:output=~$$CN: OS:\s*\w+ +check:output=~$$CN: Memory:\s*\w+ +check:output=~$$CN: CPU:\s*\w+ +check:output=~$$CN: State:\s*\w+ +check:output=~$$CN: Disk\s*\w+ +cmd:lsvm $$CN --all +check:rc==0 +check:output=~$$CN: Id:\s*\w+ +check:output=~$$CN: Host:\s*\w+ +check:output=~$$CN: OS:\s*\w+ +check:output=~$$CN: Memory:\s*\w+ +check:output=~$$CN: CPU:\s*\w+ +check:output=~$$CN: State:\s*\w+ +check:output=~$$CN: Disk\s*\w+ +end + +start:lsvm_noderange +description:lsvm noderagen could work as design, to display the information for all nodes in noderange +label:others,hctrl_kvm +cmd:rpower $$CN on +cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done +cmd:rpower $$CN stat +check:ouptut=~Running|on +cmd:rpower $$SN on +cmd:a=0;while ! `rpower $$SN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done +cmd:rpower $$SN stat +check:ouptut=~Running|on +cmd:lsvm $$CN,$$SN +check:rc==0 +check:output=~$$CN: Id:\s*\w+ +check:output=~$$CN: Host:\s*\w+ +check:output=~$$CN: OS:\s*\w+ +check:output=~$$CN: Memory:\s*\w+ +check:output=~$$CN: CPU:\s*\w+ +check:output=~$$CN: State:\s*\w+ +check:output=~$$CN: Disk\s*\w+ +check:output=~$$SN: Id:\s*\w+ +check:output=~$$SN: Host:\s*\w+ +check:output=~$$SN: OS:\s*\w+ +check:output=~$$SN: Memory:\s*\w+ +check:output=~$$SN: CPU:\s*\w+ +check:output=~$$SN: State:\s*\w+ +check:output=~$$SN: Disk\s*\w+ +end + +start:lsvm_kvmhost +description:lsvm could give out the kvm host information. This case should be run on a mn which has kvm host defined.In this case, $$CN should be a kvm host. +label:others,hctrl_kvm +cmd:lsvm $$CN +check:output=~$$CN +end + +start:lsvm_mixed_vm_defined_and_not +description:lsvm could give out the defined vm information.In this case, $$CN is a defined vm, vmnode is not defined in database. +label:others,hctrl_kvm +cmd:lsvm $$CN,vmnode +check:output=~Error: Invalid nodes and/or groups in noderange: vmnode +check:rc!=0 +end + +start:lsvm_mixed_vm_running_and_off +description:lsvm noderagen could work as design, to display the information for all nodes in noderange +label:others,hctrl_kvm +cmd:rpower $$CN off +cmd:a=0;while ! `rpower $$CN stat|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done +cmd:rpower $$CN stat +check:ouptut=~Not Activated|off +cmd:rpower $$SN on +cmd:a=0;while ! `rpower $$SN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done +cmd:rpower $$SN stat +check:ouptut=~Running|on +cmd:lsvm $$CN,$$SN +check:output=~$$SN: Id:\s*\w+ +check:output=~$$SN: Host:\s*\w+ +check:output=~$$SN: OS:\s*\w+ +check:output=~$$SN: Memory:\s*\w+ +check:output=~$$SN: CPU:\s*\w+ +check:output=~$$SN: State:\s*\w+ +check:output=~$$SN: Disk\s*\w+ +check:output=~$$CN: \s*Could not get any information about specified object +check:rc==0 diff --git a/xCAT-test/autotest/testcase/makeconservercf/cases0 b/xCAT-test/autotest/testcase/makeconservercf/cases0 index 26dde43f1..be7cc21b4 100644 --- a/xCAT-test/autotest/testcase/makeconservercf/cases0 +++ b/xCAT-test/autotest/testcase/makeconservercf/cases0 @@ -1,5 +1,5 @@ start:makeconservercf_null -label:ci_test +label:others,ci_test cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 @@ -11,7 +11,7 @@ cmd:rmdef -t node testnodetmp end start:makeconservercf_noderange -label:ci_test +label:others,ci_test cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 @@ -23,7 +23,7 @@ cmd:rmdef -t node testnodetmp end start:makeconservercf_d -label:ci_test +label:others,ci_test cmd:chdef -t node -o testnodetmp cons=hmc groups=all cmd:makeconservercf testnodetmp check:rc==0 diff --git a/xCAT-test/autotest/testcase/makedhcp/cases0 b/xCAT-test/autotest/testcase/makedhcp/cases0 index e4c1d685a..818ca9173 100644 --- a/xCAT-test/autotest/testcase/makedhcp/cases0 +++ b/xCAT-test/autotest/testcase/makedhcp/cases0 @@ -5,7 +5,7 @@ label:mn_only,ci_test,dhcp cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi cmd:makedhcp -n check:rc==0 -cmd:ls /etc/dhcp/dhcpd.conf || ls /etc/dhcpd.conf +cmd:cat $(ls /etc/dhcp/dhcpd.conf || ls /etc/dhcpd.conf) check:rc==0 cmd:sleep 20 cmd:ps -e | grep dhcpd @@ -34,7 +34,7 @@ end start:makedhcp_n_linux description:Create a new dhcp configuration file with a network statement for each network the dhcp daemon should listen on -label:ci_test +label:others,ci_test os:Linux cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi cmd:makedhcp -n diff --git a/xCAT-test/autotest/testcase/makeknownhosts/cases0 b/xCAT-test/autotest/testcase/makeknownhosts/cases0 index f7f7e0646..112b83166 100644 --- a/xCAT-test/autotest/testcase/makeknownhosts/cases0 +++ b/xCAT-test/autotest/testcase/makeknownhosts/cases0 @@ -1,5 +1,5 @@ start:makeknownhosts_h -label:ci_test +label:others,ci_test,hosts cmd:makeknownhosts -h check:output=~Usage cmd:makeknownhosts --help @@ -8,6 +8,7 @@ end start:makeknownhosts_node description:Make a known_hosts file under $ROOTHOME/.ssh for input noderange +label:others,hosts cmd:makeknownhosts $$CN -r cmd:makeknownhosts $$CN check:rc==0 @@ -19,6 +20,7 @@ end start:makeknownhosts_node_r description:remove known node in $ROOTHOME/.ssh +label:others,hosts cmd:makeknownhosts $$CN cmd:cat ~/.ssh/known_hosts|grep $$CN check:output=~$$CN @@ -31,6 +33,7 @@ end start:makeknownhosts_node_d description:delete known node entry from $ROOTHOME/.ssh +label:others,hosts cmd:makeknownhosts $$CN cmd:cat ~/.ssh/known_hosts|grep $$CN check:output=~$$CN @@ -45,6 +48,7 @@ end start:makeknownhosts_node_v description:verbose +label:others,hosts cmd:makeknownhosts $$CN -V check:rc==0 check:output=~$$CN diff --git a/xCAT-test/autotest/testcase/makenetworks/cases0 b/xCAT-test/autotest/testcase/makenetworks/cases0 index c43c55ed7..7a91e86d4 100644 --- a/xCAT-test/autotest/testcase/makenetworks/cases0 +++ b/xCAT-test/autotest/testcase/makenetworks/cases0 @@ -1,22 +1,22 @@ start:makenetworks_h -label:ci_test description:help +label:others,ci_test,network cmd:makenetworks -h check:rc==0 check:output=~Usage end start:makenetworks_help -label:ci_test description:help +label:others,ci_test,network cmd:makedhcp --help check:rc==0 check:output=~Usage end start:makenetworks_v -label:ci_test description:version +label:others,ci_test,network cmd:makenetworks -v check:rc==0 check:output=~Version @@ -24,6 +24,8 @@ end start:makenetworks_d os:Linux +description:makenetworks_d +label:others,network cmd:makenetworks -d > /tmp/mynetworksstanzas check:rc==0 cmd:echo -ne "auto-testnetworks:\n objtype=network\n gateway=1.2.3.0\n mask=255.255.255.0\n net=1.2.3.1\n" >> /tmp/mynetworksstanzas @@ -38,7 +40,7 @@ end start:makenetworks_d_V description:display,verbose -label:ci_test +label:others,ci_test,network cmd:makenetworks check:rc==0 cmd:makenetworks -d -V @@ -51,6 +53,7 @@ end start:makenetworks os:Linux description:makenetworks +label:others,network cmd:num=`lsdef -t network |cut -d" " -f1 |tee /tmp/testnetworks|wc -l`;for((i=1;i<=$num;i++)) do rmdef -t network `cat /tmp/testnetworks|sed -n "${i}p"`; done check:rc==0 check:output=~(definitions have been removed) @@ -67,5 +70,11 @@ cmd:rm -f /tmp/testnetworks cmd:rm -f /tmp/inetworktest1 end - - +start:makenetworks_netname_exist +os:Linux +description:test makenetworks works as design when netname exists. +label:others,network +cmd:netname=`lsdef -t network |cut -d" " -f1 |sed -n '1p'`;makenetworks $netname +check:rc==0 +check:output=~(already exists) +end diff --git a/xCAT-test/autotest/testcase/makentp/cases0 b/xCAT-test/autotest/testcase/makentp/cases0 index d88159074..28eef1e18 100644 --- a/xCAT-test/autotest/testcase/makentp/cases0 +++ b/xCAT-test/autotest/testcase/makentp/cases0 @@ -1,19 +1,22 @@ start:makentp_v -descriptiop:makentp -v +description:makentp -v +label:others,ntp cmd:makentp -v check:rc==0 check:output=~Version end start:makentp_h -descriptiop:makentp -h +description:makentp -h +label:others,ntp cmd:makentp -h check:rc==0 check:output=~Usage: makentp end start:makentp_extntpserver_null -descriptiop:test makentp with default value. extntpserver is set to blank +description:test makentp with default value. extntpserver is set to blank +label:others,ntp cmd:lsdef -t site -o clustersite -i extntpservers -c >/tmp/extntpserver check:rc==0 cmd:chtab key=extntpservers site.value="" @@ -37,7 +40,8 @@ check:rc==0 end start:makentp_extntpserver_value -descriptiop:test makentp with extntpserver is set to a specific value +description:test makentp with extntpserver is set to a specific value +label:others,ntp cmd:lsdef -t site -o clustersite -i extntpservers -c >/tmp/extntpserver check:rc==0 cmd:chtab key=extntpservers site.value="$$extntpserversip" @@ -69,7 +73,8 @@ cmd:rm -rf /tmp/extntpserver end start:updatenode_computenode_P_setupntp -descriptiop:using updatenode -P to setup ntp on compute node +description:using updatenode -P to setup ntp on compute node +label:others,ntp cmd:xdsh $$CN date -s 20000101 check:rc==0 cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "rhel" ]];then xdsh $$CN clock -w;else xdsh $$CN hwclock -w ; fi @@ -102,7 +107,8 @@ end start:makentp_initialize -descriptiop:start ntp service on management node and synchronize time with external ntp server +description:start ntp service on management node and synchronize time with external ntp server +label:others,ntp cmd:chtab key=extntpservers site.value="$$extntpserversip" check:rc==0 cmd:makentp -V diff --git a/xCAT-test/autotest/testcase/makeroutes/cases0 b/xCAT-test/autotest/testcase/makeroutes/cases0 index bc5dacf29..5ac2c51bc 100644 --- a/xCAT-test/autotest/testcase/makeroutes/cases0 +++ b/xCAT-test/autotest/testcase/makeroutes/cases0 @@ -1,16 +1,19 @@ start:makeroutes_h +label:others,network cmd:makeroutes -h check:rc==0 check:output=~Usage end start:makeroutes_v +label:others,network cmd:makeroutes -v check:rc==0 check:output=~Version end start:makeroutes_r_d_node +label:others,network cmd:chtab routename=testr routes.net=10.1.0.0 routes.mask=255.255.0.0 routes.gateway=10.1.254.254 check:rc==0 cmd: makeroutes $$CN -r testr @@ -29,6 +32,7 @@ end start:makeroutes_r_d +label:others,network cmd:chtab routename=testr routes.net=10.1.0.0 routes.mask=255.255.0.0 routes.gateway=10.1.254.254 check:rc==0 cmd: makeroutes -r testr @@ -47,6 +51,7 @@ end start:makeroutes_use_site_mnroutenames +label:others,network cmd:chtab routename=testr routes.net=10.1.0.0 routes.mask=255.255.0.0 routes.gateway=10.1.254.254 check:rc==0 cmd:chtab key=mnroutenames site.value=testr @@ -68,6 +73,7 @@ check:rc==0 end start:makeroutes_use_noderes_routenames +label:others,network cmd:chtab routename=testr routes.net=10.1.0.0 routes.mask=255.255.0.0 routes.gateway=10.1.254.254 check:rc==0 cmd:chtab node=$$CN noderes.routenames=testr diff --git a/xCAT-test/autotest/testcase/migration/redhat_migration b/xCAT-test/autotest/testcase/migration/redhat_migration index c2d43ff7b..a11f1d807 100644 --- a/xCAT-test/autotest/testcase/migration/redhat_migration +++ b/xCAT-test/autotest/testcase/migration/redhat_migration @@ -1,6 +1,7 @@ start:redhat_migration1 os:Linux description:update xCAT from $$MIGRATION1_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi check:rc==0 @@ -108,6 +109,7 @@ end start:redhat_migration2 os:Linux description:update xCAT from $$MIGRATION2_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision #stop:yes cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index af2cd1303..76acbd859 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -1,6 +1,7 @@ start:sles_migration1 os:Linux description:update xCAT from $$MIGRATION1_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi check:rc==0 cmd:if [[ "__GETNODEATTR($$SN,groups)__" =~ "service" ]];then chdef $$SN -m groups=service;echo "servicelabel" >/tmp/servicelabel;fi @@ -60,6 +61,12 @@ cmd:xdsh $$CN "/oldxcat/xcat-core/mklocalrepo.sh" check:rc==0 cmd:xdsh $$CN "cd /oldxcat/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 +# Workaround github issue #5503 +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" +cmd:xdsh $$CN "zypper refresh" +check:rc==0 cmd:xdsh $$CN "zypper sl -U;zypper --gpg-auto-import-keys search --match-exact -s screen" check:rc==0 cmd:xdsh $$CN "zypper -n install xCAT" @@ -90,7 +97,11 @@ cmd:xdsh $$CN "tar -jxvf /xcat-dep*.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 -cmd:xdsh $$CN "zypper refresh;zypper -n --gpg-auto-import-keys update --force-resolution '*xCAT*'" +# Workaround github issue #5503 +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" +cmd:xdsh $$CN "zypper refresh;zypper -n update --force-resolution '*xCAT*'" check:rc==0 cmd:xdsh $$CN "service xcatd status" check:rc==0 @@ -110,6 +121,7 @@ end start:sles_migration2 os:Linux description:update xCAT from $$MIGRATION22VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi check:rc==0 @@ -170,6 +182,12 @@ cmd:xdsh $$CN "/oldxcat/xcat-core/mklocalrepo.sh" check:rc==0 cmd:xdsh $$CN "cd /oldxcat/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 +# Workaround github issue #5503 +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" +cmd:xdsh $$CN "zypper refresh" +check:rc==0 cmd:xdsh $$CN "zypper sl -U;zypper --gpg-auto-import-keys search --match-exact -s screen" check:rc==0 cmd:xdsh $$CN "zypper -n install xCAT" @@ -200,7 +218,11 @@ cmd:xdsh $$CN "tar -jxvf /xcat-dep*.tar.bz2" check:rc==0 cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 -cmd:xdsh $$CN "zypper refresh;zypper -n --gpg-auto-import-keys update --force-resolution '*xCAT*'" +# Workaround github issue #5503 +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" +cmd:xdsh $$CN "zypper refresh;zypper -n update --force-resolution '*xCAT*'" check:rc==0 cmd:xdsh $$CN "service xcatd status" check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_p8le b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_p8le index e9d8c0876..81970abc3 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_p8le +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_p8le @@ -1,6 +1,7 @@ start:ubuntu_migration1_p8le os:Linux description:update xCAT from $$UBUNTU_MIGRATION1_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm index a060e181c..c980c0702 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration1_vm @@ -1,6 +1,7 @@ start:ubuntu_migration1_vm os:Linux description:update xCAT from $$UBUNTU_MIGRATION1_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration2_p8le b/xCAT-test/autotest/testcase/migration/ubuntu_migration2_p8le index 18e7d7db5..7fe2080ec 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration2_p8le +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration2_p8le @@ -1,6 +1,7 @@ start:ubuntu_migration2_p8le os:Linux description:update xCAT from $$UBUNTU_MIGRATION2_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/ubuntu_migration2_vm b/xCAT-test/autotest/testcase/migration/ubuntu_migration2_vm index 612a0536c..ab47fd759 100644 --- a/xCAT-test/autotest/testcase/migration/ubuntu_migration2_vm +++ b/xCAT-test/autotest/testcase/migration/ubuntu_migration2_vm @@ -1,6 +1,7 @@ start:ubuntu_migration2_vm os:Linux description:update xCAT from $$UBUNTU_MIGRATION2_VERSION to latest version, these two global parameter defined in config file +label:others,migration,invoke_provision cmd:copycds $$ISO check:rc==0 diff --git a/xCAT-test/autotest/testcase/mkdef/cases0 b/xCAT-test/autotest/testcase/mkdef/cases0 index 3b28be750..b360587d6 100644 --- a/xCAT-test/autotest/testcase/mkdef/cases0 +++ b/xCAT-test/autotest/testcase/mkdef/cases0 @@ -159,6 +159,52 @@ check:output=~gateway=1.2.3.1 cmd:rmdef -t network testnetwork end +start:mkdef_netname_exist +os:Linux +description:test mkdef works as design when netname exists. +label:mn_only,ci_test,db +cmd:netname=`lsdef -t network |cut -d" " -f1 |sed -n '1p'`;mkdef -t network -o $netname +check:rc==1 +end + +start:mkdef_netname_notexist_without_net_mask +os:Linux +description:test mkdef works as design when net and mask is not defined. +label:mn_only,ci_test,db +cmd:mkdef -t network -o testnetworkwithoutnetandmask +check:rc!=0 +check:output=~Error +cmd:mkdef -t network -o testnetworkwithoutnetandmask mtu=1500 +check:rc!=0 +check:output=~Net or mask value should not be empty +cmd:mkdef -t network -o testnetworkwithoutnetandmask net=10.0.0.0 mtu=1500 +check:rc!=0 +check:output=~Net or mask value should not be empty +cmd:mkdef -t network -o testnetworkwithoutnetandmask mask=255.0.0.0 mtu=1500 +check:rc!=0 +check:output=~Net or mask value should not be empty +cmd:mkdef -t network -o testnetworkwithoutnetandmask net=100.0.0.1 mask=255.0.0.0 mtu=1500 +check:rc==0 +check:output=~1 object definitions have been created or modified +cmd:lsdef -t network -z testnetworkwithoutnetandmask |tee /tmp/testnetworkwithoutnetandmask.stanza +check:rc==0 +cmd:cat /tmp/testnetworkwithoutnetandmask.stanza|mkdef -z +check:rc!=0 +check:output=~(already exists) +cmd:rmdef -t network testnetworkwithoutnetandmask +check:rc==0 +end + +start:mkdef_networks_if_net_mask_exists +os:Linux +description:test makenetworks works as design when net and mask exists. The network could not be created since net and mask are +the same. +label:mn_only,ci_test,db +cmd:netname=`lsdef -t network |cut -d" " -f1 |sed -n '1p'`;net=`lsdef -t network -o $netname |grep -i net |awk -F = '{print $2}'`;mask=`lsdef -t network -o $netname |grep -i mask |awk -F = '{print $2}'`;mkdef -t network -o testnetworkwithnetandmask net=$net mask=$mask +check:rc!=0 +check:output=~(already exists) +end + start:mkdef_t_o_error description:mkdef -t wrongtype label:mn_only,ci_test,db diff --git a/xCAT-test/autotest/testcase/mkvm/cases0 b/xCAT-test/autotest/testcase/mkvm/cases0 index 6b252679b..740106cc9 100644 --- a/xCAT-test/autotest/testcase/mkvm/cases0 +++ b/xCAT-test/autotest/testcase/mkvm/cases0 @@ -1,4 +1,5 @@ start:mkvm_i_l +label:others,hctrl_hmc hcp:hmc cmd:mkdef -t node -o testnode1,testnode2 mgt=hmc groups=all cmd:mkvm testnode1,testnode2 -i $$MaxLparID -l $$CN diff --git a/xCAT-test/autotest/testcase/ngpfb/cases0 b/xCAT-test/autotest/testcase/ngpfb/cases0 index fd7115da0..e3604488d 100644 --- a/xCAT-test/autotest/testcase/ngpfb/cases0 +++ b/xCAT-test/autotest/testcase/ngpfb/cases0 @@ -2,6 +2,7 @@ #this case is just supplement for some commands,after your executing,check output from log start:lsslp_cmm description:for part of ngp firebird commands +label:others,hctrl_fsp cmd:makedhcp -n check:rc==0 check:output!=Error @@ -13,6 +14,7 @@ end start:rspconfig_snmp_ssh description:rspconfig snmpcfg sshcfg +label:others,hctrl_fsp cmd:makehosts cmm check:rc==0 cmd:makedns cmm @@ -32,6 +34,7 @@ end start:rscan_cmm description:rscan cmm +label:others,hctrl_fsp cmd:rscan cmm check:rc==0 cmd:rscan cmm -z @@ -42,6 +45,7 @@ check:rc==0 end start:rspconfig_network +label:others,hctrl_fsp cmd:rspconfig $$CN network=* check:rc==0 check:output=~OK @@ -49,6 +53,7 @@ end start:rspconfig_textid description:rspconfig textid +label:others,hctrl_fsp cmd:rspconfig $$CN textid=abc123 check:rc==0 cmd:sleep 20 @@ -70,6 +75,7 @@ end start:rspconfig_hwconn description:for hwconn +label:others,hctrl_fsp cmd:rmhwconn $$CN check:rc==0 check:rc!~(state=LINE UP) @@ -92,6 +98,7 @@ end start:rpower_bladenode description:rpower +label:others,hctrl_fsp cmd:rpower $$CN off check:rc==0 cmd:sleep 50 @@ -104,6 +111,7 @@ end start:rspconfig_solcfg description:for solcfg +label:others,hctrl_fsp cmd:rspconfig cmm solcfg=enable check:rc==0 cmd:rspconfig cmm solcfg @@ -118,6 +126,7 @@ end start:getmacs_d_blade description:getmacs +label:others,hctrl_fsp cmd:makeconservercf check:rc==0 cmd:chdef $$CN getmac=blade @@ -132,6 +141,7 @@ end start:rinv_firm_fb description:check firmware level +label:others,hctrl_fsp cmd:rinv $$CN firm check:rc==0 cmd:rvitals $$CN all diff --git a/xCAT-test/autotest/testcase/nodeset/cases0 b/xCAT-test/autotest/testcase/nodeset/cases0 index f4fc5b5ed..6080691da 100644 --- a/xCAT-test/autotest/testcase/nodeset/cases0 +++ b/xCAT-test/autotest/testcase/nodeset/cases0 @@ -1,5 +1,6 @@ start:nodeset_stat os:Linux +label:others cmd:nodeset $$CN stat check:rc==0 check:output=~$$CN:\s+[discover|boot|reboot|install|netboot|shell|standby] @@ -10,6 +11,7 @@ end start:nodeset_noderange os:Linux +label:others cmd:nodeset $$CN test check:rc!=0 check:output=~Error @@ -17,6 +19,7 @@ end start:nodeset_check_yaboot_no os:rhels +label:others cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar hcp=hmc1 hwtype=lpar id=1 ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi parent=fsp1 pprofile=testnode1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=rhels7.5 netboot=yaboot @@ -33,6 +36,7 @@ end start:nodeset_check_yaboot_yes os:rhels +label:others cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar hcp=hmc1 hwtype=lpar id=1 ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi parent=fsp1 pprofile=testnode1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=rhels5.5 netboot=yaboot @@ -49,6 +53,7 @@ end start:nodeset_check_grub2_yes os:rhels +label:others cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar hcp=hmc1 hwtype=lpar id=1 ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi parent=fsp1 pprofile=testnode1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=rhels7.5 netboot=grub2 @@ -64,6 +69,7 @@ end start:nodeset_check_grub2_no os:rhels +label:others cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar hcp=hmc1 hwtype=lpar id=1 ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi parent=fsp1 pprofile=testnode1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=rhels6.8 netboot=grub2 @@ -80,6 +86,7 @@ end start:nodeset_check_grub2_ubuntu os:ubuntu +label:others cmd:mkdef -t node -o testnode1 arch=x86_64 cons=kvm groups=kvm ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=kvm monserver=10.1.1.1 nameservers=10.1.1.1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=ubuntu14.04.5 netboot=grub2 @@ -96,6 +103,7 @@ end start:nodeset_check_grub2_sles11 os:sles +label:others cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar hcp=hmc1 hwtype=lpar id=1 ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi parent=fsp1 pprofile=testnode1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=sles11.4 netboot=grub2 @@ -111,6 +119,7 @@ end start:nodeset_check_yaboot_sles11 os:sles +label:others cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar hcp=hmc1 hwtype=lpar id=1 ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi parent=fsp1 pprofile=testnode1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=sles11.4 netboot=yaboot @@ -126,6 +135,7 @@ end start:nodeset_check_grub2_sles12 os:sles +label:others cmd:mkdef -t node -o testnode1 arch=ppc64el cons=kvm groups=kvm ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=kvm monserver=10.1.1.1 nameservers=10.1.1.1 1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=sles12 netboot=grub2 @@ -141,6 +151,7 @@ end start:nodeset_check_yaboot_sles12 os:sles +label:others cmd:mkdef -t node -o testnode1 arch=ppc64el cons=kvm groups=kvm ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=kvm monserver=10.1.1.1 nameservers=10.1.1.1 1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=sles12 netboot=yaboot @@ -156,6 +167,7 @@ end start:nodeset_check_petitboot os:rhels +label:others cmd:mkdef -t node -o testnode1 arch=ppc64el cons=ipmi groups=pbmc mgt=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 check:rc==0 cmd:chdef testnode1 os=rhels7.5 netboot=petitboot @@ -169,6 +181,7 @@ cmd:noderm testnode1 end start:nodeset_check_warninginfo +label:others cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "el" || "__GETNODEATTR($$CN,arch)__" =~ "le" ]]; then bootloader=xnba; else bootloader=petitboot; fi; mkdef -t node -o testnode1 arch=ppc64el cons=ipmi groups=pbmc mgt=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 monserver=10.1.1.1 nameservers=10.1.1.1 nodetype=ppc,osi profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 netboot=$bootloader check:rc==0 cmd:lsdef testnode1 @@ -179,6 +192,7 @@ end start:nodeset_xnba description: Verify when xnba is used for OS loader, whether the configuration files under /tftpboot can be generated corrently +label:others cmd:rmdef testnode1 cmd:rm -f /tftpboot/xcat/xnba/nodes/testnode1 /tftpboot/xcat/xnba/nodes/testnode1.elilo cmd:mkdef -t node -o testnode1 arch=x86_64 cons=kvm groups=kvm ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=kvm profile=compute os=rhels6.99 @@ -220,6 +234,7 @@ end start:nodeset_grub2 description: Verify when grub2 is used for OS loader, whether the configuration files under /tftpboot can be generated corrently +label:others cmd:rmdef testnode1 cmd:rm -f /tftpboot/boot/grub2/{testnode1,grub.cfg-{01-e6-d4-d2-3a-ad-06,0[aA]0101[cC]8}} cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc profile=compute os=rhels7.99 @@ -264,6 +279,7 @@ end start:nodeset_petitboot description: Verify when petitboot is used for OS loader, whether the configuration files under /tftpboot can be generated corrently +label:others cmd:rmdef testnode1 cmd:rm -f /tftpboot/petitboot/testnode1 cmd:mkdef -t node -o testnode1 arch=ppc64le cons=bmc groups=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=ipmi profile=compute os=rhels7.99 @@ -305,6 +321,7 @@ end start:nodeset_yaboot description: Verify when yaboot is used for OS loader, whether the configuration files under /tftpboot can be generated corrently +label:others cmd:rmdef testnode1 cmd:rm -f /tftpboot/yaboot.conf-e6-d4-d2-3a-ad-06 cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc profile=compute os=rhels6.99 @@ -346,6 +363,7 @@ end start:nodeset_errorcommand description:This testcase is to very nodeset osimage errorcommand could give right output +label:others Attribute: $$CN-The operation object of nodeset command cmd:nodeset $$CN osimage= __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute check:rc==1 @@ -355,6 +373,7 @@ end start:nodeset_disjointdhcps_petitboot description: Verify the disjointdhcps feature when petitboot is used for OS loader. +label:others cmd:rmdef testnode1 cmd:rm -f /tftpboot/petitboot/testnode1 cmd:mkdef -t node -o testnode1 arch=ppc64le cons=bmc groups=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=ipmi profile=compute os=rhels7.99 @@ -454,6 +473,7 @@ end start:nodeset_switch_osimage description: This case is to verify if xcat supports nodeset osimage command for cumulus switch. This case is for bug 5126. os:Linux +label:others cmd:copycds $$CUMULUSOS |tee /tmp/cumulusimage check:rc==0 cmd:grep "The image" /tmp/cumulusimage |sed -r 's/.*\image(.*)\is.*/\1/' |tee /tmp/imagename diff --git a/xCAT-test/autotest/testcase/nodeset/cases1 b/xCAT-test/autotest/testcase/nodeset/cases1 index bcf8f6343..8667e37ae 100644 --- a/xCAT-test/autotest/testcase/nodeset/cases1 +++ b/xCAT-test/autotest/testcase/nodeset/cases1 @@ -1,52 +1,61 @@ start:nodeset_shell_grub2 +label:others description: Verify if `nodeset shell` perform well when part of nodes in a node range have problem. Use grub2 OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_shell_grub2 check:rc==0 end start:nodeset_shell_petitboot +label:others description: Verify if `nodeset shell` perform well when part of nodes in a node range have problem. Use petitboot OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_shell_petitboot check:rc==0 end start:nodeset_shell_xnba +label:others description: Verify if `nodeset shell` perform well when part of nodes in a node range have problem. Use xnba OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_shell_xnba check:rc==0 end start:nodeset_osimage_grub2 +label:others description: Verify if `nodeset osimage` perform well when part of nodes in a node range have problem. Use grub2 OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_osimage_grub2 check:rc==0 end start:nodeset_osimage_petitboot +label:others description: Verify if `nodeset osimage` perform well when part of nodes in a node range have problem. Use petitboot OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_osimage_petitboot check:rc==0 end start:nodeset_osimage_xnba +label:others description: Verify if `nodeset osimage` perform well when part of nodes in a node range have problem. Use xnba OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_osimage_xnba check:rc==0 end start:nodeset_nonexistent_osimage_grub2 +label:others description: Verify if `nodeset osimage` perform well when part of nodes in a node range have nonexistent osimage defined in its profile. Use grub2 OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_nonexistent_osimage_grub2 check:rc==0 end start:nodeset_nonexistent_osimage_petitboot +label:others description: Verify if `nodeset osimage` perform well when part of nodes in a node range have nonexistent osimage defined in its profile. Use petitboot OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_nonexistent_osimage_petitboot check:rc==0 end start:nodeset_nonexistent_osimage_xnba +label:others description: Verify if `nodeset osimage` perform well when part of nodes in a node range have nonexistent osimage defined in its profile. Use xnba OS loader cmd:/opt/xcat/share/xcat/tools/autotest/testcase/nodeset/nodeset_nonexistent_osimage_xnba check:rc==0 diff --git a/xCAT-test/autotest/testcase/nodestat/cases0 b/xCAT-test/autotest/testcase/nodestat/cases0 index 0444b9edb..3c5a62724 100644 --- a/xCAT-test/autotest/testcase/nodestat/cases0 +++ b/xCAT-test/autotest/testcase/nodestat/cases0 @@ -1,12 +1,13 @@ start:nodestat_noderange -arch:x86 +label:others +arch:x86_64 cmd:nodestat $$CN check:rc==0 check:output=~noping|sshd|install|snmp|pbs end start:nodestat_err_node -label:ci_test +label:others,ci_test cmd:nodestat testnode check:rc!=0 check:output=~Error diff --git a/xCAT-test/autotest/testcase/nodestat/cases1 b/xCAT-test/autotest/testcase/nodestat/cases1 index f9c7ce03a..d31de9e3e 100644 --- a/xCAT-test/autotest/testcase/nodestat/cases1 +++ b/xCAT-test/autotest/testcase/nodestat/cases1 @@ -1,5 +1,6 @@ start:nodestat_usage description: Test the exit code when no command line argument is passed to nodestat +label:others cmd:nodestat check:rc!=0 end diff --git a/xCAT-test/autotest/testcase/osdeploy/cases0 b/xCAT-test/autotest/testcase/osdeploy/cases0 index 53058dfae..f9fc83860 100644 --- a/xCAT-test/autotest/testcase/osdeploy/cases0 +++ b/xCAT-test/autotest/testcase/osdeploy/cases0 @@ -1,5 +1,6 @@ start:osdeploy_usage description: osdeploy check usage +label:others,xcatprobe cmd:xcatprobe osdeploy -h check:rc==0 check:output~=Usage @@ -9,6 +10,7 @@ end start:osdeploy_n description: osdeploy -n node to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:xcatprobe osdeploy -n $$CN >> /tmp/osdeploy.test & @@ -27,6 +29,7 @@ end start:osdeploy_n_r description: osdeploy -n -r node to probe osdeploy to trigger 'Replay history' mode. +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:xcatprobe osdeploy -n $$CN >> /tmp/osdeploy.test & @@ -63,6 +66,7 @@ end start:osdeploy_n_t description: osdeploy -n node -t 1m,probe osdeploy in 1min +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:xcatprobe osdeploy -n $$CN -t 1m >> /tmp/osdeploy.test & @@ -76,6 +80,7 @@ check:rc==0 end start:osdeploy_n_invalidnode description: osdeploy -n node invalid +label:others,xcatprobe cmd:test=`lsdef test_node`;if [ $test eq 0 ]; then lsdef -l test_node -z >/tmp/node.standa ;rmdef test_node;fi check:rc==0 cmd:xcatprobe osdeploy -n test_node @@ -86,6 +91,7 @@ check:rc==0 end start:osdeploy_n_p_invalid description:osdeploy -n node -p invalid parameter +label:others,xcatprobe cmd:xcatprobe osdeploy -n $$CN -p dsdf check:rc==1 check:output~=Usage: @@ -96,6 +102,7 @@ end start:osdeploy_n_r_invalid description:osdeploy -n node -r invalid parameter +label:others,xcatprobe cmd:xcatprobe osdeploy -n $$CN -r dadf check:rc==1 check:output~=Usage: @@ -106,6 +113,7 @@ end start:osdeploy_n_t_invalid description:osdeploy -n node -t invalid parameter +label:others,xcatprobe cmd:xcatprobe osdeploy -n $$CN -t dadf check:rc==1 check:output~=Usage: @@ -116,6 +124,7 @@ end start:osdeploy_n_p_origin description: osdeploy -n -p origin node to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:xcatprobe osdeploy -n $$CN -p origin >> /tmp/osdeploy.test & @@ -139,6 +148,7 @@ check:rc==0 end start:osdeploy_n_p_origin_r description: osdeploy -n node -p origin -r to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute @@ -163,6 +173,7 @@ check:rc==0 end start:osdeploy_n_p_origin_r_error description: osdeploy -n node -p origin -r 1m to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute @@ -188,6 +199,7 @@ end start:osdeploy_n_p_compact description: osdeploy -n -p compact node to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:xcatprobe osdeploy -n $$CN -p compact >> /tmp/osdeploy.test & @@ -211,6 +223,7 @@ check:rc==0 end start:osdeploy_n_p_compact_r description: osdeploy -n -p compact -r node to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 check:rc==0 @@ -235,6 +248,7 @@ check:rc==0 end start:osdeploy_n_p_compact_r_error description: osdeploy -n -p compact -r node error to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 check:rc==0 @@ -260,6 +274,7 @@ end start:osdeploy_n_p_phase description: osdeploy -n -p phase node to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:xcatprobe osdeploy -n $$CN -p phase >> /tmp/osdeploy.test & @@ -283,6 +298,7 @@ check:rc==0 end start:osdeploy_n_p_phase_r description: osdeploy -n -p phase node -r to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute @@ -308,6 +324,7 @@ end start:osdeploy_n_p_phase_r_error description: osdeploy -n -p phase node -r error to probe osdeploy +label:others,xcatprobe cmd:if [ -e /tmp/osdeploy.test ];then rm -rf /tmp/osdeploy.test*;fi check:rc==0 cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute diff --git a/xCAT-test/autotest/testcase/packimg/cases0 b/xCAT-test/autotest/testcase/packimg/cases0 index 87e636866..a8d51ba00 100644 --- a/xCAT-test/autotest/testcase/packimg/cases0 +++ b/xCAT-test/autotest/testcase/packimg/cases0 @@ -1,6 +1,7 @@ start:packimage_o_p_a_m os:Linux description: +label:others,packaging cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz /rootimg.cpio.gz.bak;fi @@ -21,6 +22,7 @@ end start:packimage_imagename os:Linux description: +label:others,packaging cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz /rootimg.cpio.gz.bak;fi cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute @@ -40,6 +42,7 @@ end start:packimage_h os:Linux description:packimage -h +label:others,packaging cmd:packimage -h check:rc==0 end @@ -47,6 +50,7 @@ end start:packimage_v os:Linux description:packimage -v +label:others,packaging cmd:packimage -v check:output=~version|Version end @@ -54,6 +58,7 @@ end start:packimage_m_cpio_c_gzip os:Linux description:test packimage -m cpio -c gzip +label:others,packaging,invoke_provision cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz /rootimg.cpio.gz.bak;fi @@ -95,6 +100,7 @@ end start:packimage_m_cpio_c_pigz os:Linux description:test packimage -m cpio -c pigz +label:others,packaging,invoke_provision #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.gz /rootimg.cpio.gz.bak;fi @@ -140,6 +146,7 @@ end start:packimage_m_cpio_c_xz os:Linux description:test packimage -m cpio -c xz +label:others,packaging,invoke_provision #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.xz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.cpio.xz /rootimg.cpio.xz.bak;fi @@ -181,6 +188,7 @@ end start:packimage_m_tar_c_pigz os:Linux description:test packimage -m tar -c pigz +label:others,packaging,invoke_provision #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz /rootimg.tar.gz.bak;fi @@ -235,6 +243,7 @@ end start:packimage_m_tar_c_gzip os:Linux description:test packimage -m tar -c gzip +label:others,packaging,invoke_provision #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.gz /rootimg.tar.gz.bak;fi @@ -285,6 +294,7 @@ end start:packimage_m_tar_c_xz os:Linux description:test packimage -m tar -c xz +label:others,packaging,invoke_provision #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.xz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.tar.xz /rootimg.tar.xz.bak;fi @@ -335,6 +345,7 @@ end start:packimage_m_invalid_archive_method os:Linux description:test packimage with invalid archive method +label:others,packaging #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute @@ -351,6 +362,7 @@ end start:packimage_m_invalid_compress_method os:Linux description:test packimage with invalid compress method +label:others,packaging #cmd:copycds $$ISO cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute diff --git a/xCAT-test/autotest/testcase/passwd/case0 b/xCAT-test/autotest/testcase/passwd/case0 index 5ba6e8dcb..8cf5869ec 100644 --- a/xCAT-test/autotest/testcase/passwd/case0 +++ b/xCAT-test/autotest/testcase/passwd/case0 @@ -1,5 +1,6 @@ start:encrypted_passwd_md5_diskfull description: this case is to test when cryptmethod=md5 in passwd table, the password is encryped with the md5 method. When compute node is diskfull provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=md5 @@ -18,6 +19,7 @@ end start:encrypted_passwd_md5_diskless description: this case is to test when cryptmethod=md5 in passwd table, the password is encryped with the md5 method. When compute node is diskless provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=md5 @@ -73,6 +75,7 @@ end start:encrypted_passwd_sha256_diskfull description: this case is to test when cryptmethod=sha256 in passwd table, the password is encryped with the sha256 method. When compute node is diskfull provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=sha256 @@ -91,6 +94,7 @@ end start:encrypted_passwd_sha256_diskless description: this case is to test when cryptmethod=sha256 in passwd table, the password is encryped with the sha256 method. When compute node is diskless provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=sha256 @@ -146,6 +150,7 @@ end start:encrypted_passwd_sha512_diskfull description: this case is to test when cryptmethod=sha512 in passwd table, the password is encryped with the sha512 method. When compute node is diskfull provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=sha512 @@ -164,6 +169,7 @@ end start:encrypted_passwd_sha512_diskless description: this case is to test when cryptmethod=sha512 in passwd table, the password is encryped with the sha512 method. When compute node is diskless provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:chtab key=system passwd.cryptmethod=sha512 @@ -220,6 +226,7 @@ end start:encrypted_passwd_openssl_diskfull description: this case is to test when password is encrypted with openssl, the password is encryped in password table. When compute node is diskfull provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:gettab key=system passwd.password > /tmp/tmppassword @@ -245,6 +252,7 @@ end start:encrypted_passwd_openssl_diskless description: this case is to test when password is encrypted with openssl, the password is encryped in password table. When compute node is diskless provisioned, users can login node with correct password. This case should be run when node is correctly defined. +label:others,security cmd:gettab key=system passwd.cryptmethod > /tmp/tmpcryptmethod check:rc==0 cmd:gettab key=system passwd.password > /tmp/tmppassword diff --git a/xCAT-test/autotest/testcase/pdu/case0 b/xCAT-test/autotest/testcase/pdu/case0 index d8fd13a25..a03ff973c 100644 --- a/xCAT-test/autotest/testcase/pdu/case0 +++ b/xCAT-test/autotest/testcase/pdu/case0 @@ -1,5 +1,6 @@ start:lsdef_pdu_object -degscription:list pdu object and it's attribute +description:list pdu object and it's attribute +label:others,PDU cmd:lsdef -h check:output=~pdu cmd:mkdef $$PDU mgt=pdu nodetype=pdu groups=pdu @@ -17,6 +18,7 @@ end start:mkdef_pdu_object description:create a pdu object and list it's attribute +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:lsdef -t pdu @@ -40,6 +42,7 @@ end start:noderm_pdu_object description:create a pdu object and use noderm to remove it +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:lsdef -t pdu @@ -59,6 +62,7 @@ end start:pdu_communication description:Verify a pdu snmp communication +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:lsdef -t pdu @@ -77,6 +81,7 @@ end start:pdu_rinv description:Verify rinv works for pdu object +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:makehosts $$PDU @@ -94,6 +99,7 @@ end start:pdu_rpower description:Verify rpower works for pdu object +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:makehosts $$PDU @@ -123,6 +129,7 @@ end start:pdu_node_operation description:Verify operate node's pdu attribute could operate pdu +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:makehosts $$PDU @@ -158,6 +165,7 @@ end start:pdu_bad_config description:test bad config with pdu +label:others,PDU cmd:mkdef $$PDU groups=pdu ip=$$PDUIP mgt=pdu nodetype=pdu check:rc==0 cmd:makehosts $$PDU diff --git a/xCAT-test/autotest/testcase/performance/case0 b/xCAT-test/autotest/testcase/performance/case0 index 58d9299b5..647c7f9bb 100644 --- a/xCAT-test/autotest/testcase/performance/case0 +++ b/xCAT-test/autotest/testcase/performance/case0 @@ -1,5 +1,6 @@ start:perftest_5000 description:Default performance testing on 5000 fake nodes +label:others,performance os:Linux cmd:which yum &>/dev/null && yum install -y bridge-utils || apt install -y bridge-utils cmd:copycds $$ISO @@ -10,6 +11,7 @@ end start:UT_perftest_5000_MN_only description:Default performance testing on 5000 fake nodes without extra configuration on MN +label:others,performance os:Linux cmd:which yum &>/dev/null && yum install -y bridge-utils || apt install -y bridge-utils check:rc==0 @@ -19,6 +21,7 @@ end start:perftest_5000_with_simulators description:Default performance testing on 5000 fake nodes +label:others,performance os:Linux ### From reg_linux_diskfull_installation_flat cmd:fdisk -l @@ -139,6 +142,7 @@ end start:UT_perftest_1000_with_simulators description: UT for performance testing with simulators on an existing environment with one compute node. +label:others,performance os:Linux # Create fake nodes diff --git a/xCAT-test/autotest/testcase/performance/simulatorctl.sh b/xCAT-test/autotest/testcase/performance/simulatorctl.sh index e2682864c..efbbe5366 100644 --- a/xCAT-test/autotest/testcase/performance/simulatorctl.sh +++ b/xCAT-test/autotest/testcase/performance/simulatorctl.sh @@ -59,11 +59,31 @@ setup_docker() #workaround as the public repo has issue to install container-selinux yum install -y http://ftp.unicamp.br/pub/ppc64el/rhel/7/docker-ppc64el/container-selinux-2.9-4.el7.noarch.rpm yum install -y docker-ce bridge-utils initscripts - service docker start - sleep 5 else echo "Error: not supported platform." + return + fi + + systemctl start docker + sleep 5 + + local x=1 + while [ $x -le 5 ] + do + echo "Waiting for docker daemon up: $x times" + systemctl is-active docker >/dev/null 2>&1 + if [[ $? -eq 0 ]]; then + x=0 + break + fi + sleep 5 + x=$(( $x + 1 )) + done + + if [[ $x -gt 0 ]]; then + echo "Error: The docker daemon is not up." + return fi # Create the bridge network for testing, and add the physical interface inside diff --git a/xCAT-test/autotest/testcase/pkg/cases0 b/xCAT-test/autotest/testcase/pkg/cases0 index 62831a853..d42438d56 100644 --- a/xCAT-test/autotest/testcase/pkg/cases0 +++ b/xCAT-test/autotest/testcase/pkg/cases0 @@ -1,5 +1,6 @@ start:del_ospkg -descreption:del ospkg +description:del ospkg +label:others,postscripts,updatenode cmd:copycds $$ISO check:rc==0 cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -s -g $$osimage -t pkglist -v __GETNODEATTR($$CN,os)__ @@ -25,7 +26,8 @@ check:rc==0 end start:add_ospkg_updatenode -descreption:add ospkg +description:add ospkg +label:others,postscripts,updatenode cmd:copycds $$ISO check:rc==0 cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -s -g $$osimage -t pkglist -v __GETNODEATTR($$CN,os)__ @@ -45,7 +47,8 @@ check:rc==0 end start:add_includeospkg_updatenode -descreption:add include ospkg list +description:add include ospkg list +label:others,postscripts,updatenode cmd:copycds $$ISO check:rc==0 cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -i -g $$osimage -t pkglist -v __GETNODEATTR($$CN,os)__ @@ -65,7 +68,8 @@ check:rc==0 end start:add_other_pkg -descreption:add other pkg +description:add other pkg +label:others,postscripts,updatenode cmd:copycds $$ISO check:rc==0 cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -s -o -g $$osimage -t otherpkgdir -v __GETNODEATTR($$CN,os)__ @@ -84,7 +88,8 @@ check:rc==0 end start:del_other_pkg -descreption:del other pkg +description:del other pkg +label:others,postscripts,updatenode cmd:copycds $$ISO check:rc==0 cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -s -o -g $$osimage -t otherpkgdir -v __GETNODEATTR($$CN,os)__ @@ -112,7 +117,8 @@ check:rc==0 end start:add_other_pkg_include -descreption:add other pkg include other list +description:add other pkg include other list +label:others,postscripts,updatenode cmd:copycds $$ISO check:rc==0 cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -i -o -g $$osimage -t otherpkgdir -v __GETNODEATTR($$CN,os)__ diff --git a/xCAT-test/autotest/testcase/pping/cases0 b/xCAT-test/autotest/testcase/pping/cases0 index b7f4c4b16..661d15197 100644 --- a/xCAT-test/autotest/testcase/pping/cases0 +++ b/xCAT-test/autotest/testcase/pping/cases0 @@ -1,4 +1,5 @@ start:pping_h +label:others,parallel_cmds cmd:pping -h check:rc==0 check:output=~Usage @@ -7,6 +8,7 @@ check:rc==0 end start:pping_v +label:others,parallel_cmds cmd:pping -v check:rc==0 check:output=~Version @@ -16,12 +18,14 @@ check:output=~Version end start:pping_node +label:others,parallel_cmds cmd:pping $$CN check:rc==0 check:output=~ping|noping end start:pping_invalidnode +label:others,parallel_cmds cmd:pping test check:rc!=0 check:output=~Warning: (\[.*?\]: )?Invalid nodes in noderange:test diff --git a/xCAT-test/autotest/testcase/ppping/cases0 b/xCAT-test/autotest/testcase/ppping/cases0 index 0ac88204d..e7df2657c 100644 --- a/xCAT-test/autotest/testcase/ppping/cases0 +++ b/xCAT-test/autotest/testcase/ppping/cases0 @@ -1,5 +1,6 @@ start:ppping_h description:get ppping help information +label:others,parallel_cmds cmd:ppping -h check:rc==0 check:output=~Usage @@ -7,6 +8,7 @@ end start:ppping_v description:Display verbose output +label:others,parallel_cmds cmd:ppping -v check:rc==0 check:output=~Version @@ -14,6 +16,7 @@ end start:ppping_node description:ppping node +label:others,parallel_cmds Attribute: $$CN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;if [[ $? -eq 1 ]]; then output=`ppping $$CN`;if [[ $? -eq 1 ]]&&[[ $output =~ "noping" ]];then exit 0;else exit 1;fi;else output=`ppping $$CN`; if [[ $? -eq 0 ]]&&[[ $output =~ "pinged all nodes successfully" ]];then exit 0;else exit 1;fi;fi check:rc==0 @@ -21,6 +24,7 @@ end start:ppping_V_node description:Display verbose output of ppping node. +label:others,parallel_cmds Attribute: $$CN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;if [[ $? -eq 1 ]]; then output=`ppping -V $$CN`;if [[ $? -eq 1 ]]&&[[ $output =~ "$$CN: noping" ]];then exit 0;else exit 1;fi;else output=`ppping -V $$CN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$CN: $$CN: ping" ]];then exit 0;else exit 1;fi;fi check:rc==0 @@ -28,6 +32,7 @@ end start:ppping_q_node description:Display minimum output of ppping node. +label:others,parallel_cmds Attribute: $$CN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;if [[ $? -eq 1 ]]; then output=`ppping -q $$CN`;if [[ $? -eq 1 ]]&&[[ $output =~ "$$CN: noping" ]];then exit 0;else exit 1;fi;else output=`ppping -q $$CN`; if [[ $? -eq 0 ]]&&[[ $output =~ "" ]];then exit 0;else exit 1;fi;fi check:rc==0 @@ -35,6 +40,7 @@ end start:ppping_d_node description:Print debug information of ppping node. +label:others,parallel_cmds Attribute: $$CN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;if [[ $? -eq 1 ]]; then output=`ppping -d $$CN`;if [[ $? -eq 1 ]]&&[[ $output =~ "start" ]]&&[[ $output =~ "stop" ]];then exit 0;else exit 1;fi;else output=`ppping -d $$CN`; if [[ $? -eq 0 ]]&&[[ $output =~ "start" ]]&&[[ $output =~ "stop" ]];then exit 0;else exit 1;fi;fi check:rc==0 @@ -42,6 +48,7 @@ end start:ppping_i_node description:A comma separated list of network interface names that should be pinged instead of the interface represented by the nodename/hostname +label:others,parallel_cmds Attribute: $$CN-The operation object of ppping command cmd:cp /etc/hosts /etc/hosts.bak check:rc==0 @@ -59,6 +66,7 @@ end start:ppping_nodes description:test the connectivity between nodes in the noderange using ping +label:others,parallel_cmds Attribute: $$CN,$$SN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;rc1=$?;ping -c 3 $$SN > /dev/null 2>&1;rc2=$?;if [[ $rc1 -eq 1 ]]&&[[ $rc2 -eq 1 ]];then output=`ppping $$CN,$$SN`;if [[ $? -eq 1 ]]&&[[ $output =~ "$$CN: noping" ]]&&[[ $output =~ "$$SN: noping" ]];then exit 0;else exit 1;fi;elif [[ $rc1 -eq 0 ]]&&[[ $rc2 -eq 1 ]]; then output=`ppping $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$SN: noping" ]]&&[[ "$$CN: $$SN: noping" ]];then exit 0;else exit 1;fi;elif [[ $rc1 -eq 1 ]]&&[[ $rc2 -eq 0 ]]; then output=`ppping $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$CN: noping" ]]&&[[ "$$SN: $$CN: noping" ]];then exit 0;else exit 1;fi;else output=`ppping $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$CN: pinged all nodes successfully" ]]&&[[ "$$SN: pinged all nodes successfully" ]];then exit 0;else exit 1;fi;fi check:rc==0 @@ -66,6 +74,7 @@ end start:ppping_V_nodes description:test the connectivity between nodes in the noderange using ping and print verbose output. +label:others,parallel_cmds Attribute: $$CN,$$SN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;rc1=$?;ping -c 3 $$SN > /dev/null 2>&1;rc2=$?;if [[ $rc1 -eq 1 ]]&&[[ $rc2 -eq 1 ]];then output=`ppping -V $$CN,$$SN`;if [[ $? -eq 1 ]]&&[[ $output =~ "$$CN: noping" ]]&&[[ $output =~ "$$SN: noping" ]];then exit 0;else exit 1;fi;elif [[ $rc1 -eq 0 ]]&&[[ $rc2 -eq 1 ]]; then output=`ppping -V $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$SN: noping" ]]&&[[ $output =~ "$$CN: $$SN: noping" ]]&&[[ $output =~ "$$CN: $$CN: ping" ]];then exit 0;else exit 1;fi;elif [[ $rc1 -eq 1 ]]&&[[ $rc2 -eq 0 ]]; then output=`ppping -V $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$CN: noping" ]]&&[[ $output =~ "$$SN: $$CN: noping" ]];then exit 0;else exit 1;fi;else output=`ppping -V $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$SN: $$CN: ping" ]]&&[[ $output =~ "$$SN: $$SN: ping" ]]&&[[ $output =~ "$$CN: $$SN: ping" ]]&&[[ $output =~ "$$CN: $$CN: ping" ]];then exit 0;else exit 1;fi;fi check:rc==0 @@ -75,6 +84,7 @@ end start:ppping_V_s_nodes description:test the connectivity between nodes in the noderange using ping and print Ping serially instead of in parallel information. +label:others,parallel_cmds Attribute: $$CN,$$SN-The operation object of ppping command cmd:ping -c 3 $$CN > /dev/null 2>&1;rc1=$?;ping -c 3 $$SN > /dev/null 2>&1;rc2=$?;if [[ $rc1 -eq 1 ]]&&[[ $rc2 -eq 1 ]];then output=`ppping -V -s $$CN,$$SN`;if [[ $? -eq 1 ]]&&[[ $output =~ "$$CN: noping" ]]&&[[ $output =~ "$$SN: noping" ]];then exit 0;else exit 1;fi;elif [[ $rc1 -eq 0 ]]&&[[ $rc2 -eq 1 ]]; then output=`ppping -V -s $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$SN: noping" ]]&&[[ $output =~ "$$CN: $$SN: noping" ]]&&[[ $output =~ "$$CN: $$CN: ping" ]];then exit 0;else exit 1;fi;elif [[ $rc1 -eq 1 ]]&&[[ $rc2 -eq 0 ]]; then output=`ppping -V -s $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$CN: noping" ]]&&[[ $output =~ "$$SN: $$CN: noping" ]];then exit 0;else exit 1;fi;else output=`ppping -V -s $$CN,$$SN`; if [[ $? -eq 0 ]]&&[[ $output =~ "$$SN: $$CN: ping" ]]&&[[ $output =~ "$$SN: $$SN: ping" ]]&&[[ $output =~ "$$CN: $$SN: ping" ]]&&[[ $output =~ "$$CN: $$CN: ping" ]];then exit 0;else exit 1;fi;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/probe/detect_dhcpd b/xCAT-test/autotest/testcase/probe/detect_dhcpd index b67ae4495..213f6ab0d 100644 --- a/xCAT-test/autotest/testcase/probe/detect_dhcpd +++ b/xCAT-test/autotest/testcase/probe/detect_dhcpd @@ -1,5 +1,6 @@ start:detect_dhcpd_work description:To test if xcatprobe detect_dhcpd works. This case must run in xcat mn +label:others,dhcp cmd:if [ -d "/tmp/detect_dhcpd_work" ]; then mv /tmp/detect_dhcpd_work /tmp/detect_dhcpd_work.bak; fi; mkdir -p /tmp/detect_dhcpd_work cmd:makedhcp -n check:rc == 0 diff --git a/xCAT-test/autotest/testcase/prsync/cases0 b/xCAT-test/autotest/testcase/prsync/cases0 index 3d2120028..de920f149 100644 --- a/xCAT-test/autotest/testcase/prsync/cases0 +++ b/xCAT-test/autotest/testcase/prsync/cases0 @@ -1,5 +1,6 @@ start:prsync_h description: prsync -h +label:others,parallel_cmds os:Linux cmd:prsync -h check:rc==0 @@ -8,6 +9,7 @@ end start:prsync_v description: prsync -v +label:others,parallel_cmds os:Linux cmd:prsync -v check:rc==0 @@ -16,6 +18,7 @@ end start:prsync_dir_node description: run prsync to copy files in dir from MN to CN +label:others,parallel_cmds os:Linux cmd: mkdir -p /tmp/pscp check:rc==0 @@ -41,6 +44,7 @@ end start:prsync_file_node description: run prsync to copy file from MN to CN +label:others,parallel_cmds os:Linux cmd: echo "prsync-test" > prsync.test check:rc==0 diff --git a/xCAT-test/autotest/testcase/pscp/cases0 b/xCAT-test/autotest/testcase/pscp/cases0 index 2d1e02b1a..e7050691e 100644 --- a/xCAT-test/autotest/testcase/pscp/cases0 +++ b/xCAT-test/autotest/testcase/pscp/cases0 @@ -1,10 +1,12 @@ start:pscp_h +label:others,parallel_cmds cmd:pscp -h check:rc==0 check:output=~Usage end start:pscp_v +label:others,parallel_cmds cmd:pscp -v check:rc==0 check:output=~Version @@ -12,6 +14,7 @@ end #copy single file start:pscp_node +label:others,parallel_cmds cmd:echo "test" > /tmp/pscp.tmp check:rc==0 cmd:pscp /tmp/pscp.tmp $$CN:/tmp/ @@ -31,6 +34,7 @@ end #copy a directory start:pscp_r_node +label:others,parallel_cmds cmd: mkdir -p /tmp/pscp check:rc==0 cmd:echo "test" > /tmp/pscp/pscp.tmp @@ -55,6 +59,7 @@ end start:pscp_i_node +label:others,parallel_cmds cmd:cp /etc/hosts /etc/hosts.bak check:rc==0 cmd:a=`cat /etc/hosts |grep ' $$CN.'|awk '{print $1}'`;b=`cat /etc/resolv.conf |grep search|awk '{print $2}'`;echo "$a $$CN-eth0.$b $$CN-eth0" >> /etc/hosts diff --git a/xCAT-test/autotest/testcase/psh/cases0 b/xCAT-test/autotest/testcase/psh/cases0 index f1ad5ad39..a015f6333 100644 --- a/xCAT-test/autotest/testcase/psh/cases0 +++ b/xCAT-test/autotest/testcase/psh/cases0 @@ -1,5 +1,6 @@ start:psh_h description: psh -h and psh -help +label:others,parallel_cmds os:Linux cmd:psh -h check:rc==0 @@ -11,6 +12,7 @@ end start:psh_v description: psh -v +label:others,parallel_cmds os:Linux cmd:psh -v check:output=~Version @@ -19,6 +21,7 @@ end start:psh_node_cmd_linux description: psh CN 'pwd' in linux +label:others,parallel_cmds os:Linux cmd:psh $$CN 'pwd' check:rc==0 @@ -28,6 +31,7 @@ end start:psh_node_cmd_aix description: psh CN 'pwd' in AIX +label:others,parallel_cmds os:Aix cmd:psh $$CN 'pwd' check:rc==0 @@ -37,6 +41,7 @@ end start:psh_l description: psh -l user CN 'uptime' in linux +label:others,parallel_cmds os:Linux cmd:psh -l root $$CN 'uptime' check:rc==0 @@ -46,6 +51,7 @@ end start:psh_i description: psh -i interface CN 'uptime' in linux +label:others,parallel_cmds os:Linux cmd:cp /etc/hosts /etc/hostsBK check:rc==0 diff --git a/xCAT-test/autotest/testcase/pythonsupport/cases0 b/xCAT-test/autotest/testcase/pythonsupport/cases0 index 37c63b03b..38a0eb05d 100644 --- a/xCAT-test/autotest/testcase/pythonsupport/cases0 +++ b/xCAT-test/autotest/testcase/pythonsupport/cases0 @@ -1,5 +1,6 @@ start:set_up_env_for_support_openbmc_in_python description:this case is used to test environment setup for supporting openbmc in python +label:others,hctrl_openbmc os:Linux hcp:openbmc,kvm cmd:mkdir -p /tmp/set_up_env_for_support_openbmc_in_python diff --git a/xCAT-test/autotest/testcase/rbeacon/cases0 b/xCAT-test/autotest/testcase/rbeacon/cases0 index e79195072..9f237fe7a 100644 --- a/xCAT-test/autotest/testcase/rbeacon/cases0 +++ b/xCAT-test/autotest/testcase/rbeacon/cases0 @@ -55,6 +55,6 @@ hcp:openbmc label:cn_bmc_ready,hctrl_openbmc cmd:rbeacon $$CN abc check:rc!=0 -check:output=~$$CN\s*:\s*Error:\s*Only \'on\', \'off\' or \'stat\' is supported +check:output=~$$CN\s*:\s*Error:\s*Only \'on\', \'off\' and \'stat\' are supported end diff --git a/xCAT-test/autotest/testcase/restapi/global/cases0 b/xCAT-test/autotest/testcase/restapi/global/cases0 index d19bf7ea6..c645170ec 100644 --- a/xCAT-test/autotest/testcase/restapi/global/cases0 +++ b/xCAT-test/autotest/testcase/restapi/global/cases0 @@ -1,5 +1,6 @@ start:globalconf_get description: globalconf_get +label:others,restapi cmd:restapitest -m GET -r /globalconf check:rc==200 cmdcheck:restapitest -o '{"clustersite":{"xcatdport":"3001"}}' -O == @@ -7,6 +8,7 @@ end start:globalconf_get_attr description: globalconf_get_attr +label:others,restapi cmd:restapitest -m GET -r /globalconf/attrs/xcatdport,xcatiport check:rc==200 cmdcheck:restapitest -o '{"clustersite":{"xcatdport":"3001"}}' -O == @@ -15,12 +17,14 @@ end start:globalconf_put description: globalconf_put +label:others,restapi cmd:restapitest -m PUT -r /globalconf/attrs/domain -d '{"domain":"cluster1.com"}' check:rc==200 end start:globalconf_put_checkresult description: globalconf_put_checkresult +label:others,restapi cmd:restapitest -m GET -r /globalconf/attrs/domain check:rc==200 cmdcheck:restapitest -o '{"clustersite":{"domain":"cluster1.com"}}' -O == @@ -28,12 +32,14 @@ end start:globalconf_delete description: globalconf_delete +label:others,restapi cmd:restapitest -m DELETE -r /globalconf/attrs/domain check:rc==200 end start:globalconf_delete_checkresult description: globalconf_delete_checkresult +label:others,restapi cmd:restapitest -m GET -r /globalconf/attrs/domain check:rc==200 cmdcheck:restapitest -o '{"clustersite":{"domain":"cluster1.com"}}' -O != diff --git a/xCAT-test/autotest/testcase/restapi/group/cases0 b/xCAT-test/autotest/testcase/restapi/group/cases0 index ea26e4d11..f6b3ae7b5 100644 --- a/xCAT-test/autotest/testcase/restapi/group/cases0 +++ b/xCAT-test/autotest/testcase/restapi/group/cases0 @@ -1,5 +1,6 @@ start:get_group_list description: get_group_list +label:others,restapi cmd:restapitest -m GET -r /groups check:rc==200 cmdcheck:restapitest -o '["all"]' -O == @@ -7,6 +8,7 @@ end start:get_group_all description: get_group_all +label:others,restapi cmd:restapitest -m GET -r /groups/all check:rc==200 cmdcheck:restapitest -o '{"all":{"members":"virtualcn2"}}' -O == @@ -14,12 +16,14 @@ end start:put_group_all description: put_group_all +label:others,restapi cmd:restapitest -m PUT -r /groups/all -d '{"mgt":"dfm","netboot":"yaboot"}' check:rc==200 end start:get_group_all_for_put description: get_group_all_for_put +label:others,restapi cmd:restapitest -m GET -r /groups/all check:rc==200 cmdcheck:restapitest -o '{"all":{"netboot":"yaboot"}}' -O == @@ -27,6 +31,7 @@ end start:get_group_all_attrs description: get_group_all_attrs +label:others,restapi cmd:restapitest -m GET -r /groups/all/attrs/mgt,netboot check:rc==200 cmdcheck:restapitest -o '{"all":{"netboot":"yaboot"}}' -O == diff --git a/xCAT-test/autotest/testcase/restapi/network/cases0 b/xCAT-test/autotest/testcase/restapi/network/cases0 index 2851f39b1..3a63bbf60 100644 --- a/xCAT-test/autotest/testcase/restapi/network/cases0 +++ b/xCAT-test/autotest/testcase/restapi/network/cases0 @@ -1,5 +1,6 @@ start:get_networks description: get_networks +label:others,restapi cmd:restapitest -m GET -r /networks check:rc==200 cmdcheck:restapitest -o '["network1"]' -O == @@ -7,12 +8,14 @@ end start:post_networks description: post_networks +label:others,restapi cmd:restapitest -m POST -r /networks check:rc==201 end start:get_networks_attr_for_post description: get_networks_attr_for_post +label:others,restapi cmd:restapitest -m GET -r /networks/network1 check:rc==200 cmdcheck:restapitest -o '{"network1":{"net":"10.1.0.0"}}' -O == @@ -20,12 +23,14 @@ end start:post_networks_attr description: post_networks_attr +label:others,restapi cmd:restapitest -m GET -r /networks/network1 -d '{"gateway":"10.1.0.1","mask":"255.255.0.0"}' check:rc==201 end start:get_networks_all_attr description: get_networks_all_attr +label:others,restapi cmd:restapitest -m GET -r /networks/network1 check:rc==200 cmdcheck:restapitest -o '{"network1":{"net":"10.1.0.0"}}' -O == @@ -33,6 +38,7 @@ end start:get_networks_attr description: get_networks_attr +label:others,restapi cmd:restapitest -m GET -r /networks/network1/attrs/net,mask check:rc==200 cmdcheck:restapitest -o '{"network1":{"net":"10.1.0.0"}}' -O == @@ -40,12 +46,14 @@ end start:put_networks_attr description: put_networks_attr +label:others,restapi cmd:restapitest -m PUT -r /networks/network1 -d '{"mgtifname":"eth0","net":"10.1.0.0"}' check:rc==200 end start:get_networks_attr_for_put description: get_networks_attr_for_put +label:others,restapi cmd:restapitest -m GET -r /networks/network1 check:rc==200 cmdcheck:restapitest -o '{"network1":{"net":"10.1.0.0"}}' -O == @@ -53,12 +61,14 @@ end start:delete_networks_attr_for_put description: delete_networks_attr_for_put +label:others,restapi cmd:restapitest -m DELETE -r /networks/network1 check:rc==200 end start:get_networks_for_delete description: get_networks_for_delete +label:others,restapi cmd:restapitest -m GET -r /networks check:rc==200 cmdcheck:restapitest -o '["network1"]' -O != diff --git a/xCAT-test/autotest/testcase/restapi/node/cases0 b/xCAT-test/autotest/testcase/restapi/node/cases0 index ba33f5831..90999064e 100644 --- a/xCAT-test/autotest/testcase/restapi/node/cases0 +++ b/xCAT-test/autotest/testcase/restapi/node/cases0 @@ -1,11 +1,13 @@ start:create_node_rest description: create a node with REST API +label:others,restapi cmd:restapitest -m POST -r /nodes/restnode -d '{"groups":"all","mgt":"dfm","netboot":"yaboot"}' -u $$username -p $$password check:rc==201 end start:create_node_rest2 description: create a node with REST API failure +label:others,restapi cmd:restapitest -m POST -r /nodes/restnode -d '{"groups":"all","mgt":"dfm","netboot":"yaboot"}' -u $$username -p $$password check:rc==147 check:output=~"errorcode":"1" @@ -13,6 +15,7 @@ end start:get_nodes_rest description: get all nodes with REST API +label:others,restapi cmd:restapitest -m GET -r /nodes -u $$username -p $$password check:rc==200 check:output=~"restnode" @@ -20,6 +23,7 @@ end start:get_node_rest description: get single node with REST API +label:others,restapi cmd:restapitest -m GET -r /nodes/restnode -u $$username -p $$password check:rc==200 check:output=~"restnode" @@ -27,12 +31,14 @@ end start:node_delete_rest description: delete node with REST API +label:others,restapi cmd:restapitest -m DELETE -r /nodes/restnode -u $$username -p $$password check:rc==200 end start:get_nodes_rest2 description: get all nodes with REST API +label:others,restapi cmd:restapitest -m GET -r /nodes -u $$username -p $$password check:rc==200 check:output!~"restnode" @@ -40,6 +46,7 @@ end start:get_node_rest2 description: get single node with REST API +label:others,restapi cmd:restapitest -m GET -r /nodes/restnode -u $$username -p $$password check:rc==147 check:output=~"errorcode":"1" @@ -47,48 +54,56 @@ end start:create_node_token_rest description: create a node with REST API using authentication token +label:others,restapi cmd:restapitest -m POST -r /nodes/restnode -d '{"groups":"all","mgt":"dfm","netboot":"yaboot"}' -u $$username -p $$password -t check:rc==201 end start:node_makehosts_rest description: makehosts for node with REST API +label:others,restapi cmd:restapitest -m POST -r /nodes/restnode/host -u $$username -p $$password check:rc==201 end start:node_makedns_rest description: makehosts for node with REST API +label:others,restapi cmd:restapitest -m POST -r /nodes/restnode/dns -u $$username -p $$password check:rc==201 end start:node_delete_dns_rest description: delete dns for node with REST API +label:others,restapi cmd:restapitest -m DELETE -r /nodes/restnode/dns -u $$username -p $$password check:rc==200 end start:node_change_attr_rest description: change node attribute with REST API +label:others,restapi cmd:restapitest -m PUT -r /nodes/restnode -d '{"mac":"00:1a:64:54:14:80"}' -u $$username -p $$password check:rc==200 end start:node_makedhcp_rest description: makedhcp for node with REST API +label:others,restapi cmd:restapitest -m POST -r /nodes/restnode/dhcp -u $$username -p $$password check:rc==201 end start:node_delete_dhcp_rest description: node_delete_dhcp +label:others,restapi cmd:restapitest -m DELETE -r /nodes/restnode/dhcp -u $$username -p $$password check:rc==200 end start:node_state_rest description: get node state with REST API +label:others,restapi cmd:restapitest -m GET -r /nodes/$$CN/nodestat -u $$username -p $$password check:rc==200 check:output=~"$$CN" @@ -97,6 +112,7 @@ end start:node_state_token_rest description: get node state with REST API using authentication token +label:others,restapi cmd:restapitest -m GET -r /nodes/$$CN/nodestat -u $$username -p $$password -t check:rc==200 check:output=~"$$CN" @@ -105,6 +121,7 @@ end start:get_node_rest_error description: get single node with REST API with invalid user or password +label:others,restapi cmd:restapitest -m GET -r /nodes/restnode -u abc -p xyz check:rc==145 check:output=~"error":"Authentication failure" diff --git a/xCAT-test/autotest/testcase/restapi/node/cases1 b/xCAT-test/autotest/testcase/restapi/node/cases1 index db848f1f2..175d86567 100644 --- a/xCAT-test/autotest/testcase/restapi/node/cases1 +++ b/xCAT-test/autotest/testcase/restapi/node/cases1 @@ -1,5 +1,6 @@ start:inventory_node_rest description: get OpenBMC node inventory with REST API +label:others,restapi hcp:openbmc cmd:restapitest -m GET -r /nodes/$$CN/inventory -u $$username -p $$password check:rc==200 @@ -8,6 +9,7 @@ end start:inventory_node_rest2 description: get IPMI node inventory with REST API +label:others,restapi hcp:ipmi cmd:restapitest -m GET -r /nodes/$$CN/inventory -u $$username -p $$password check:rc==200 @@ -16,6 +18,7 @@ end start:vitals_node_rest description: get OpenBMC node vitals with REST API +label:others,restapi hcp:openbmc cmd:restapitest -m GET -r /nodes/$$CN/vitals -u $$username -p $$password check:rc==200 @@ -24,6 +27,7 @@ end start:vitals_node_rest2 description: get IPMI node vitals with REST API +label:others,restapi hcp:ipmi cmd:restapitest -m GET -r /nodes/$$CN/vitals -u $$username -p $$password check:rc==200 @@ -32,6 +36,7 @@ end start:eventlog_node_rest description: get OpenBMC node inventory with REST API +label:others,restapi hcp:openbmc cmd:restapitest -m GET -r /nodes/$$CN/eventlog -u $$username -p $$password check:rc==200 @@ -40,6 +45,7 @@ end start:eventlog_node_rest2 description: get IPMI node eventlog with REST API +label:others,restapi hcp:ipmi cmd:restapitest -m GET -r /nodes/$$CN/eventlog -u $$username -p $$password check:rc==200 @@ -48,6 +54,7 @@ end start:beacon_node_rest description: get OpenBMC node beacon with REST API +label:others,restapi hcp:openbmc cmd:restapitest -m GET -r /nodes/$$CN/beacon -u $$username -p $$password check:rc==200 @@ -57,6 +64,7 @@ end start:beacon_set_node_rest description: set OpenBMC node beacon with REST API +label:others,restapi hcp:openbmc cmd:restapitest -m PUT -r /nodes/$$CN/beacon -d '{"action":"on"}' -u $$username -p $$password check:rc==200 @@ -64,6 +72,7 @@ end start:beacon_set_node_rest2 description: set IPMI node beacon with REST API +label:others,restapi hcp:ipmi cmd:restapitest -m PUT -r /nodes/$$CN/beacon -d '{"action":"on"}' -u $$username -p $$password check:rc==200 diff --git a/xCAT-test/autotest/testcase/restapi/osimage/cases0 b/xCAT-test/autotest/testcase/restapi/osimage/cases0 index 3335577b4..70a91c1e3 100644 --- a/xCAT-test/autotest/testcase/restapi/osimage/cases0 +++ b/xCAT-test/autotest/testcase/restapi/osimage/cases0 @@ -1,5 +1,6 @@ start:get_images_all description: get_images_all +label:others,restapi cmd:restapitest -m GET -r /osimages check:rc==200 cmdcheck:restapitest -o '["rhels6.5-x86_64-install-compute"]' -O == @@ -7,12 +8,14 @@ end start:post_images description: post_images +label:others,restapi cmd:restapitest -m POST -r /osimages -d '{"iso":"/iso/RHEL6.5-20131111.0-Server-x86_64-DVD1.iso"}' check:rc==201 end start:get_images description: get_images +label:others,restapi cmd:restapitest -m GET -r /osimages/rhels6.5-x86_64-install-compute check:rc==200 cmdcheck:restapitest -o '{"rhels6.5-x86_64-install-compute":{"provmethod":"install"}}' -O == @@ -20,12 +23,14 @@ end start:put_images_attr description: put_images_attr +label:others,restapi cmd:restapitest -m PUT -r /osimages/rhels6.5-x86_64-install-hpc -d '{"osvers":"sles11.3","osarch":"x86_64"}' check:rc==200 end start:get_images_for_put description: get_images_for_put +label:others,restapi cmd:restapitest -m GET -r /osimages/rhels6.5-x86_64-install-hpc check:rc==200 cmdcheck:restapitest -o '{"rhels6.5-x86_64-install-hpc":{"osvers":"sles11.3"}}' -O == @@ -33,12 +38,14 @@ end start:create_images description: create_images +label:others,restapi cmd:restapitest -m POST -r /osimages/rhels6.5-x86_64-install-hpc -d '{"profile":"compute","osarch":"x86_64"}' check:rc==200 end start:get_images_for_post description: get_images_for_post +label:others,restapi cmd:restapitest -m GET -r /osimages/rhels6.5-x86_64-install-hpc check:rc==200 cmdcheck:restapitest -o '{"rhels6.5-x86_64-install-hpc":{"profile":"compute"}}' -O == @@ -46,12 +53,14 @@ end start:delete_images description: delete_images +label:others,restapi cmd:restapitest -m DELETE -r /osimages/rhels6.5-x86_64-install-hpc check:rc==200 end start:get_images_all_for_delete description: get_images_all_for_delete +label:others,restapi cmd:restapitest -m GET -r /osimages check:rc==200 cmdcheck:restapitest -o '["rhels6.5-x86_64-install-hpc"]' -O != @@ -59,6 +68,7 @@ end start:get_images_attr description: get_images_attr +label:others,restapi cmd:restapitest -m GET -r /osimages/rhels6.5-x86_64-install-compute/attrs/imagetype,osarch,osname,provmethod check:rc==200 cmdcheck:restapitest -o '{"sles11.2-ppc64-install-compute":{osarch":"x86_64"}}' -O == @@ -66,24 +76,28 @@ end start:post_images_attr_genimage description: post_images_attr_genimage +label:others,restapi cmd:restapitest -m POST -r /osimages/rhels6.5-x86_64-statelite-service/instance -d '{"action":"gen"}' check:rc==200 end start:post_images_attr_packimage description: post_images_attr +label:others,restapi cmd:restapitest -m POST -r /osimages/rhels6.5-x86_64-statelite-service/instance -d '{"action":"pack"}' check:rc==200 end start:post_images_attr_exportimage description: post_images_attr +label:others,restapi cmd:restapitest -m POST -r /osimages/rhels6.5-x86_64-statelite-service/instance -d '{"action":"export"}' check:rc==200 end start:delete_images description: delete_images +label:others,restapi cmd:restapitest -m DELETE -r /osimages/rhels6.5-x86_64-statelite-service/instance check:rc==200 end diff --git a/xCAT-test/autotest/testcase/restapi/policy/cases0 b/xCAT-test/autotest/testcase/restapi/policy/cases0 index 73ae1b306..f73fcb7d4 100644 --- a/xCAT-test/autotest/testcase/restapi/policy/cases0 +++ b/xCAT-test/autotest/testcase/restapi/policy/cases0 @@ -1,5 +1,6 @@ start:get_policy_all description: get_policy_all +label:others,restapi cmd:restapitest -m GET -r /policy check:rc==200 cmdcheck:restapitest -o '["1"]' -O == @@ -7,6 +8,7 @@ end start:get_policy_attr description: get_policy_attr +label:others,restapi cmd:restapitest -m GET -r /policy/1 check:rc==200 cmdcheck:restapitest -o '{"1":{"name":"root"}}' -O == @@ -14,12 +16,14 @@ end start:put_policy_attr description: put_policy_attr +label:others,restapi cmd:restapitest -m PUT -r /policy/1 -d '{"name":"root1"}' check:rc==200 end start:get_policy_attr_for_put description: get_policy_attr_for_put +label:others,restapi cmd:restapitest -m GET -r /policy/1 check:rc==200 cmdcheck:restapitest -o '{"1":{"name":"root1"}}' -O == @@ -27,18 +31,21 @@ end start:put_policy_attr_changeback description: put_policy_attr_changeback +label:others,restapi cmd:restapitest -m PUT -r /policy/1 -d '{"name":"root"}' check:rc==200 end start:post_policy description: post_policy +label:others,restapi cmd:restapitest -m POST -r /policy/11 -d '{"name":"root1",,"commands":"rpower"}' check:rc==201 end start:get_policy_attr_for_post description: get_policy_attr_for_post +label:others,restapi cmd:restapitest -m GET -r /policy/11 check:rc==200 cmdcheck:restapitest -o '{"11":{"name":"root1"}}' -O == @@ -46,6 +53,7 @@ end start:delete_policy description: delete_policy +label:others,restapi cmd:restapitest -m DELETE -r /policy/11 check:rc==200 cmdcheck:restapitest -o '["11"]' -O != @@ -53,6 +61,7 @@ end start:get_policy_attrs description: get_policy_attrs +label:others,restapi cmd:restapitest -m GET -r /policy/1/attrs/name,rule check:rc==200 cmdcheck:restapitest -o '{"1":{"name":"root"}}' -O == diff --git a/xCAT-test/autotest/testcase/restapi/service/cases0 b/xCAT-test/autotest/testcase/restapi/service/cases0 index e9569fd69..88c491b28 100644 --- a/xCAT-test/autotest/testcase/restapi/service/cases0 +++ b/xCAT-test/autotest/testcase/restapi/service/cases0 @@ -1,29 +1,34 @@ start:post_dns description: post_dns +label:others,restapi cmd:restapitest -m POST -r /services/dns check:rc==201 end start:post_dhcp description: post_dhcp +label:others,restapi cmd:restapitest -m POST -r /services/dns check:rc==201 end start:post_host description: post_host +label:others,restapi cmd:restapitest -m POST -r /services/host check:rc==201 end start:post_host description: post_host +label:others,restapi cmd:restapitest -m POST -r /services/host check:rc==201 end start:get_slpnodes description: get_slpnodes +label:others,restapi cmd:restapitest -m GET -r /services/slpnodes check:rc==200 cmdcheck:restapitest -o '{"ngpcmm01":{"mpa":"ngpcmm01"}}' -O == @@ -31,6 +36,7 @@ end start:get_slpnodes_withst description: get_slpnodes_withst +label:others,restapi cmd:restapitest -m GET -r /services/slpnodes/FSP check:rc==200 cmdcheck:restapitest -o '{"Server--SNY014BG27A01K":{"mpa":"Server--SNY014BG27A01K"}}' -O == diff --git a/xCAT-test/autotest/testcase/restapi/table/cases0 b/xCAT-test/autotest/testcase/restapi/table/cases0 index 6a9ed807b..c8b710904 100644 --- a/xCAT-test/autotest/testcase/restapi/table/cases0 +++ b/xCAT-test/autotest/testcase/restapi/table/cases0 @@ -1,5 +1,6 @@ start:get_networks_table_rest description: get all networks table entries with REST API +label:others,restapi cmd:restapitest -m GET -r /tables/networks/rows -u $$username -p $$password check:rc==200 check:output=~netname @@ -7,6 +8,7 @@ end start:get_network_table_rest description: get all entries from invalid table name with REST API +label:others,restapi cmd:restapitest -m GET -r /tables/network/rows -u $$username -p $$password check:rc==147 check:output=~No such table @@ -14,6 +16,7 @@ end start:get_network_table_with_attr_selection_rest description: get all attribute matching networks table entries with REST API +label:others,restapi cmd:restapitest -m GET -r /tables/networks/rows/mask=255.0.0.0 -u $$username -p $$password check:rc==200 check:output=~"mask":"255.0.0.0" @@ -21,6 +24,7 @@ end start:get_network_table_with_attr_selection_error_rest description: get all attribute matching networks table entries with REST API, invalid attribute name +label:others,restapi cmd:restapitest -m GET -r /tables/networks/rows/abc=255.0.0.0 -u $$username -p $$password check:rc==147 check:output=~No table rows @@ -28,6 +32,7 @@ end start:get_network_table_with_attr_selection_error_rest2 description: get all attribute matching networks table entries with REST API, no match +label:others,restapi cmd:restapitest -m GET -r /tables/networks/rows/mask=a.b.c.d -u $$username -p $$password check:rc==147 check:output=~No table rows @@ -35,6 +40,7 @@ end start:get_network_table_with_attr_selection_rest2 description: get attribute matching networks table attributes with REST API +label:others,restapi cmd:restapitest -m GET -r /tables/networks/rows/mask=255.0.0.0/gateway -u $$username -p $$password check:rc==200 check:output=~"gateway":" @@ -42,6 +48,7 @@ end start:set_network_table_attr_with_attr_selection_rest2 description: set attribute for network table for attr seleection with REST API +label:others,restapi cmd:restapitest -m PUT -r /tables/networks/rows/mask=255.0.0.0 -d '{"comments":"REST API TEST"}' -u $$username -p $$password check:rc==200 cmd:lsdef -l -t network @@ -50,6 +57,7 @@ end start:delete_network_rest description: create a network and delele network with REST API +label:others,restapi cmd: restapitest -m POST -r /networks/network_rest -d '{"gateway":"10.1.0.1","mask":"255.255.0.0","net":"199.168.0.0"}' -u $$username -p $$password cmd: restapitest -m DELETE -r /tables/networks/rows/net=199.168.0.0 -u $$username -p $$password check:rc==200 diff --git a/xCAT-test/autotest/testcase/rmimage/case0 b/xCAT-test/autotest/testcase/rmimage/case0 index a5f1ea566..991efd372 100644 --- a/xCAT-test/autotest/testcase/rmimage/case0 +++ b/xCAT-test/autotest/testcase/rmimage/case0 @@ -1,6 +1,7 @@ start:rmimage_diskless -descriptiion:This case is to test rmimage could work correctly to remove all image files. +description:This case is to test rmimage could work correctly to remove all image files. cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute.bak;fi +label:others,packaging cmd:copycds $$ISO check:rc==0 cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute diff --git a/xCAT-test/autotest/testcase/rmkit/case0 b/xCAT-test/autotest/testcase/rmkit/case0 index b0683ed37..9cbad4994 100644 --- a/xCAT-test/autotest/testcase/rmkit/case0 +++ b/xCAT-test/autotest/testcase/rmkit/case0 @@ -1,4 +1,5 @@ start:rmkit_v +label:others,KIT os:Linux cmd:rmkit -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:rmkit_h +label:others,KIT os:Linux cmd:rmkit -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:rmkit_t_no +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/rmkit;buildkit create mykits @@ -48,6 +51,7 @@ cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkit/mykits end start:rmkit_t_yes +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/rmkit;buildkit create mykits @@ -84,6 +88,7 @@ check:rc==0 end start:rmkit_f +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/rmkit;buildkit create mykits @@ -113,6 +118,7 @@ end start:rmkit_V +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkit/mykits cmd:cd /opt/xcat/share/xcat/tools/autotest/testcase/rmkit;buildkit create mykits diff --git a/xCAT-test/autotest/testcase/rmkitcomp/case0 b/xCAT-test/autotest/testcase/rmkitcomp/case0 index 070efb702..4933bb7ce 100644 --- a/xCAT-test/autotest/testcase/rmkitcomp/case0 +++ b/xCAT-test/autotest/testcase/rmkitcomp/case0 @@ -1,4 +1,5 @@ start:rmkitcomp_v +label:others,KIT os:Linux cmd:rmkitcomp -v check:rc==0 @@ -13,6 +14,7 @@ check:output=~compatible_frameworks end start:rmkitcomp_h +label:others,KIT os:Linux cmd:rmkitcomp -h check:rc==0 @@ -23,6 +25,7 @@ check:output=~ Usage end start:rmkitcomp_noscripts +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA @@ -59,6 +62,7 @@ check:rc==0 end start:rmkitcomp_f +label:others,KIT os:Linux cmd:rm -rf /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA cmd:mkdir -p /opt/xcat/share/xcat/tools/autotest/testcase/rmkitcomp/$$KITDATA diff --git a/xCAT-test/autotest/testcase/rmvm/cases0 b/xCAT-test/autotest/testcase/rmvm/cases0 index 6f1f63f72..781947921 100644 --- a/xCAT-test/autotest/testcase/rmvm/cases0 +++ b/xCAT-test/autotest/testcase/rmvm/cases0 @@ -1,4 +1,5 @@ start:rmvm_noderange +label:others,hctrl_hmc hcp:hmc cmd:mkdef -t node -o testnode1,testnode2 mgt=hmc groups=all cmd:mkvm testnode1,testnode2 -i $$MaxLparID -l $$CN diff --git a/xCAT-test/autotest/testcase/rpower/cases0 b/xCAT-test/autotest/testcase/rpower/cases0 index cc3c0affd..8f0c0c041 100644 --- a/xCAT-test/autotest/testcase/rpower/cases0 +++ b/xCAT-test/autotest/testcase/rpower/cases0 @@ -197,3 +197,23 @@ check:output=~Error: (\[.*?\]: )?[Uu]nsupported command[:]* rpower ddd check:rc==1 end +start:rpower_off_on +description:This case is to test off and on option could work for a diskful node. This case is do task 82, for bug 4132, the node status cannot be updated on normal system reboot #4138. +Attribute: $$CN-The operation object of rpower command +label:others,hctrl_general +cmd:rpower $$CN stat +check:output=~Running|on +cmd:lsdef -l $$CN -i status +check:output=~booted +cmd:rpower $$CN off +check:rc==0 +cmd:a=0;while ! `rpower $$CN stat|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done +cmd:rpower $$CN on +check:rc==0 +cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done +cmd:rpower $$CN stat +check:output=~Running|on +cmd:a=0;while ! `lsdef -l $$CN -i status|grep "booted" >/dev/null`; do sleep 5;((a++));if [ $a -gt 50 ];then break;fi done +cmd:lsdef -l $$CN -i status|grep "booted" +check:rc==0 +end diff --git a/xCAT-test/autotest/testcase/rscan/cases0 b/xCAT-test/autotest/testcase/rscan/cases0 index 96484408e..636920a00 100644 --- a/xCAT-test/autotest/testcase/rscan/cases0 +++ b/xCAT-test/autotest/testcase/rscan/cases0 @@ -1,4 +1,5 @@ start:rscan_noderange +label:others,hctrl_hmc hcp:hmc cmd:rscan __GETNODEATTR($$CN,hcp)__ check:rc==0 @@ -7,18 +8,21 @@ check:output=~cec\s+[\w|-]+\s+\w{4}-\w{3}\s+\w{7} check:output=~hmc\s+__GETNODEATTR($$CN,hcp)__\s+\w{4}-\w{3}\s+\w{7} end start:rscan_x +label:others,hctrl_hmc hcp:hmc cmd:rscan __GETNODEATTR($$CN,hcp)__ -x check:rc==0 check:output=~[\w-]+ end start:rscan_z +label:others,hctrl_hmc hcp:hmc cmd:rscan __GETNODEATTR($$CN,hcp)__ -z check:rc==0 check:output=~hcp=__GETNODEATTR($$CN,hcp)__ end start:rscan_w +label:others,hctrl_hmc hcp:hmc cmd:lsdef -t node -l $$CN -z > /tmp/$$CN.stanza check:rc==0 @@ -39,6 +43,7 @@ cmd:cat /tmp/$$CN.stanza | mkdef -z cmd:rm -f /tmp/$$CN.stanza end start:rscan_x_w +label:others,hctrl_hmc hcp:hmc cmd:lsdef -t node -l $$CN -z > /tmp/$$CN.stanza check:rc==0 @@ -57,6 +62,7 @@ cmd:cat /tmp/$$CN.stanza | mkdef -z cmd:rm -f /tmp/$$CN.stanza end start:rscan_z_w +label:others,hctrl_hmc hcp:hmc cmd:lsdef -t node -l $$CN -z > /tmp/$$CN.stanza check:rc==0 diff --git a/xCAT-test/autotest/testcase/rspconfig/cases1 b/xCAT-test/autotest/testcase/rspconfig/cases1 index e475bcad0..deff88bb1 100644 --- a/xCAT-test/autotest/testcase/rspconfig/cases1 +++ b/xCAT-test/autotest/testcase/rspconfig/cases1 @@ -197,7 +197,7 @@ cmd:rspconfig $$CN powerrestorepolicy=restore check:output =~$$CN:\s*BMC Setting BMC PowerRestorePolicy... check:rc == 0 cmd:rspconfig $$CN powerrestorepolicy=abc -check:output =~$$CN:\s*(\[.*?\]: )?Error: Invalid value '\S*' for 'powerrestorepolicy', Valid values: restore,always_on,always_off +check:output =~$$CN:\s*Error: Invalid value '\S*' for 'powerrestorepolicy', Valid values: always_off,always_on,restore check:rc != 0 cmd:rspconfig $$CN powerrestorepolicy check:rc == 0 @@ -256,7 +256,7 @@ cmd:rspconfig $$CN timesyncmethod check:rc == 0 check:output =~$$CN:\s*BMC TimeSyncMethod:\s*Manual cmd:rspconfig $$CN timesyncmethod=abc -check:output =~$$CN:\s*(\[.*?\]: )?Error: Invalid value \S* for 'timesyncmethod', Valid values: ntp,manual +check:output =~$$CN:\s*(\[.*?\]: )?Error: Invalid value \S* for 'timesyncmethod', Valid values: manual,ntp check:rc != 0 cmd:syncmethod=`cat /tmp/timesyncmethod | awk -F ":" '{print $3}'`;newsyncmethod=`echo $syncmethod |tr 'A-Z' 'a-z'`;rspconfig $$CN timesyncmethod=$newsyncmethod check:rc == 0 @@ -290,7 +290,7 @@ cmd:rspconfig $$CN bootmode check:rc == 0 check:output =~$$CN:\s*BMC BootMode:\s*Setup cmd:rspconfig $$CN bootmode=abc -check:output =~$$CN:\s*(\[.*?\]: )?Error: Invalid value \S* for 'bootmode', Valid values: regular,safe,setup +check:output =~$$CN:\s*Error: Invalid value \S* for 'bootmode', Valid values: regular,safe,setup check:rc != 0 cmd:mode=`cat /tmp/bootmode |awk -F ":" '{print $3}'`;newmode=`echo $mode |tr 'A-Z' 'a-z'`;rspconfig $$CN bootmode=$newmode check:rc == 0 diff --git a/xCAT-test/autotest/testcase/rspconfig/rspconfig.sh b/xCAT-test/autotest/testcase/rspconfig/rspconfig.sh index e7f988b3f..8764b7735 100755 --- a/xCAT-test/autotest/testcase/rspconfig/rspconfig.sh +++ b/xCAT-test/autotest/testcase/rspconfig/rspconfig.sh @@ -177,7 +177,7 @@ function change_all if [[ $? -eq 0 ]];then BMCIP=`rspconfig $1 ip |awk -F":" '{print $3}'|sed s/[[:space:]]//g`; BMCNETMASK=`rspconfig $1 netmask |awk -F":" '{print $3}'|sed s/[[:space:]]//g`; - BMCGGATEWAY=`rspconfig $1 gateway |awk -F":" '{print $3}'|sed s/[[:space:]]//g`; + BMCGGATEWAY=`rspconfig $1 gateway |awk -F":" '{print $3}'| awk -F" " '{print $1}' |sed s/[[:space:]]//g`; output=`rspconfig $1 vlan` if [[ $output =~ "BMC VLAN ID enabled" ]];then BMCVLAN=`rspconfig $1 vlan |awk -F":" '{print $3}'|sed s/[[:space:]]//g` diff --git a/xCAT-test/autotest/testcase/rspconfig/rspconfig_ntp.sh b/xCAT-test/autotest/testcase/rspconfig/rspconfig_ntp.sh index 1525b0de4..03e44720e 100755 --- a/xCAT-test/autotest/testcase/rspconfig/rspconfig_ntp.sh +++ b/xCAT-test/autotest/testcase/rspconfig/rspconfig_ntp.sh @@ -3,7 +3,15 @@ cn=$1 mn=$2 -ntpservers=`rspconfig $cn ntpservers | awk -F":" '{print $3}' | sed 's/^ //;s/ $//'` +ipsrc=`rspconfig $cn ipsrc | grep "BMC IP Source" | awk -F":" '{print $3}' | sed 's/^ //;s/ $//'` +if [ $? -ne 0 ]; then + echo "rspconfig $cn ipsrc failed" + exit 1 +fi + +echo "BMC IP Source is $ipsrc" + +ntpservers=`rspconfig $cn ntpservers | grep "BMC NTP Servers" | awk -F":" '{print $3}' | sed 's/^ //;s/ $//'` if [ $? -ne 0 ]; then echo "rspconfig $cn ntpservers failed" exit 1 @@ -17,7 +25,23 @@ else new_ntpservers=$mn fi -output=`rspconfig $cn ntpservers=$new_ntpservers` +output=`rspconfig $cn ntpservers=$new_ntpservers 2>&1` +echo "$output" +if [ $ipsrc == "DHCP" ]; then + if [ $? -ne 1 ]; then + if [[ "$output" =~ "Error: BMC IP source is DHCP, could not set NTPServers" ]]; then + echo "Get correct output for BMC IP source is DHCP" + exit 0 + else + echo "Get output '$output' when want to set NTPServers for BMC IP source is DHCP" + exit 1 + fi + else + echo "Get wrong exit code $? when want to set NTPServers for BMC IP source is DHCP" + exit 1 + fi +fi + if [ $? -ne 0 ]; then echo "rspconfig $cn ntpservers=$new_ntpservers failed" exit 1 @@ -30,6 +54,30 @@ else exit 1 fi +output=`rspconfig $cn ntpservers 2>&1` +if [[ $output =~ "$cn: BMC NTP Servers" ]] && [[ $output =~ "$new_ntpservers" ]]; then + echo "Checked NTPServers as $new_ntpservers success" +else + echo "Checked NTPServers as $new_ntpservers failed, the output is $output" + exit 1 +fi + +echo "rpower $cn bmcreboot to check ntpservers setting..." +rpower $cn bmcreboot +if [ $? -ne 0 ]; then + echo "run rpower $cn bmcreboot failed" +else + sleep 300 +fi + +output=`rspconfig $cn ntpservers 2>&1` +if [[ $output =~ "$cn: BMC NTP Servers" ]] && [[ $output =~ "$new_ntpservers" ]]; then + echo "Verified NTPServers $new_ntpservers after BMC reboot" +else + echo "Verified NTPServers as $ntpservers failed after BMC reboot, output is $output" + exit 1 +fi + echo "To clear environment" if [ $ntpservers != "None" ]; then @@ -38,16 +86,37 @@ else original_ntpservers="" fi -output=`rspconfig $cn ntpservers=$original_ntpservers` +output=`rspconfig $cn ntpservers=$original_ntpservers 2>&1` if [ $? -ne 0 ]; then echo "rspconfig $cn ntpservers=$ntpservers failed when clearing environment" exit 1 fi - if [[ "$output" =~ "$cn: BMC NTP Servers" ]] && [[ $output =~ "$ntpservers" ]]; then echo "Setting NTPServers as $ntpservers success when clearing environment" +fi + +output=`rspconfig $cn ntpservers 2>&1` +if [[ "$output" =~ "$cn: BMC NTP Servers" ]] && [[ $output =~ "$ntpservers" ]]; then + echo "Checked NTPServers as $ntpservers success when clearing environment" +else + echo "Checked NTPServers as $ntpservers failed when clearing environment output is $output" + exit 1 +fi + +echo "rpower $cn bmcreboot to recover environment" +rpower $cn bmcreboot +if [ $? -ne 0 ]; then + echo "run rpower $cn bmcreboot failed when recover environment" + exit 1 +else + sleep 300 +fi + +output=`rspconfig $cn ntpservers 2>&1` +if [[ "$output" =~ "$cn: BMC NTP Servers" ]] && [[ $output =~ "$ntpservers" ]]; then + echo "Verified NTPServers as $ntpservers success when clearing environment after BMC reboot" exit 0 fi -echo "Setting NTPServers as $ntpservers failed when clearing environment" +echo "Verified NTPServers as $ntpservers failed when clearing environment after BMC reboot, output is $output" exit 1 diff --git a/xCAT-test/autotest/testcase/runcmdinstaller/cases0 b/xCAT-test/autotest/testcase/runcmdinstaller/cases0 index 22b3e23b1..d81df8c25 100644 --- a/xCAT-test/autotest/testcase/runcmdinstaller/cases0 +++ b/xCAT-test/autotest/testcase/runcmdinstaller/cases0 @@ -1,11 +1,13 @@ start:runcmdinstaller_h -descriptiop:runcmdinstaller -h +description:runcmdinstaller -h +label:others,postscripts cmd:runcmdinstaller -h check:rc==0 check:output=~runcmdinstaller end start:runcmdinstaller_command -descriptiop:runcmdinstaller +description:runcmdinstaller +label:others,postscripts cmd:chtab key=xcatdebugmode site.value="2" check:rc==0 cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute @@ -20,6 +22,7 @@ cmd:chtab key=xcatdebugmode site.value="0" end start:get_xcat_postscripts_loginfo description:get xcat post scripts loginfo +label:others,postscripts cmd:chtab key=xcatdebugmode site.value="1" check:rc==0 cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute @@ -34,6 +37,7 @@ cmd:chtab key=xcatdebugmode site.value="0" end start:updatenode_postscripts_loginfo description:get updatenode postsripts log info +label:others,postscripts cmd:chtab key=xcatdebugmode site.value="1" check:rc==0 cmd:chdef $$CN -p postscripts=setupntp diff --git a/xCAT-test/autotest/testcase/signal/cases0 b/xCAT-test/autotest/testcase/signal/cases0 index efd959a5e..26112a181 100644 --- a/xCAT-test/autotest/testcase/signal/cases0 +++ b/xCAT-test/autotest/testcase/signal/cases0 @@ -1,4 +1,5 @@ start:genimage_sigint +label:others cmd:/opt/xcat/share/xcat/tools/autotest/testcase/signal/test-sigint-genimage.sh check:rc==0 end diff --git a/xCAT-test/autotest/testcase/simulator/clear_simulator b/xCAT-test/autotest/testcase/simulator/clear_simulator index 03c442fd9..c1536f178 100644 --- a/xCAT-test/autotest/testcase/simulator/clear_simulator +++ b/xCAT-test/autotest/testcase/simulator/clear_simulator @@ -1,23 +1,27 @@ start:clear_openbmc_simulator description:clear evironment +label:others cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN check:rc==0 end start:clear_openbmc_simulator_multiple_100 description:clear evironment that simulate 100 OpenBMCs +label:others cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN $$bmcusername $$bmcpasswd 100 check:rc==0 end start:clear_openbmc_simulator_multiple_1000 description:clear evironment that simulate 1000 OpenBMCs +label:others cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN $$bmcusername $$bmcpasswd 1000 check:rc==0 end start:clear_openbmc_simulator_multiple_5000 description:clear evironment that simulate 5000 OpenBMCs +label:others cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -c $$MN $$CN $$bmcusername $$bmcpasswd 5000 check:rc==0 end diff --git a/xCAT-test/autotest/testcase/simulator/setup_simulator b/xCAT-test/autotest/testcase/simulator/setup_simulator index 012b60c08..ff61b0f94 100644 --- a/xCAT-test/autotest/testcase/simulator/setup_simulator +++ b/xCAT-test/autotest/testcase/simulator/setup_simulator @@ -1,47 +1,55 @@ start:setup_openbmc_simulator description:install dependent packaages, setup and start openbmc simulator +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 0 check:rc==0 end start:setup_openbmc_simulator_multiple_100 description:install dependent packaages, setup and start 100 openbmc simulator +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 100 check:rc==0 end start:setup_openbmc_simulator_multiple_1000 description:install dependent packaages, setup and start 1000 openbmc simulator +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 1000 check:rc==0 end start:setup_openbmc_simulator_multiple_5000 description:install dependent packaages, setup and start 5000 openbmc simulator +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 5000 check:rc==0 end start:setup_openbmc_simulator_multiple_1000_delay_random_1m description:install dependent packaages, setup and start 1000 openbmc simulator with random that the most delay time 1 minute +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 1000 random 1m check:rc==0 end start:setup_openbmc_simulator_multiple_5000_delay_random_1m description:install dependent packaages, setup and start 5000 openbmc simulator with random that the most delay time 1 minute +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 5000 random 1m check:rc==0 end start:setup_openbmc_simulator_multiple_1000_delay_random_1m30 description:install dependent packaages, setup and start 1000 openbmc simulator with random that the most delay time 1m30s +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 1000 random 1m30 check:rc==0 end start:setup_openbmc_simulator_multiple_1000_delay_random_30 description:install dependent packaages, setup and start 1000 openbmc simulator with random that the most delay time 30s +label:others,hctrl_openbmc cmd:/opt/xcat/share/xcat/tools/autotest/testcase/simulator/config_simulator.sh -s $$MN $$CN $$bmcusername $$bmcpasswd 1000 random 0m30 check:rc==0 end diff --git a/xCAT-test/autotest/testcase/sinv/cases0 b/xCAT-test/autotest/testcase/sinv/cases0 index 9916fb479..84e0522bb 100644 --- a/xCAT-test/autotest/testcase/sinv/cases0 +++ b/xCAT-test/autotest/testcase/sinv/cases0 @@ -1,4 +1,5 @@ start:sinv_c_p_t_r_o +label:others,parallel_cmds cmd:xdsh $$CN rpm -qa | xdshbak > /tmp/sinv.template check:rc==0 cmd:sinv $$CN -c "xdsh $$CN rpm -qa" -p /tmp/sinv.template -t 2 -r -o /tmp/sinv.output @@ -8,6 +9,7 @@ check:output=~$$CN cmd:rm -f /tmp/sinv.template /tmp/sinv.output end start:sinv_c_s_p_t_o +label:others,parallel_cmds cmd:sinv $$CN -c "xdsh $$CN rpm -qa" -s $$CN -p /tmp/sinv.template -t 2 -o /tmp/sinv.output check:rc==0 cmd:cat /tmp/sinv.output diff --git a/xCAT-test/autotest/testcase/snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode index 90344fd49..955bc1f21 100644 --- a/xCAT-test/autotest/testcase/snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/cfg_wrong_cn_in_sn_pool_tftp_sync_mode @@ -1,5 +1,6 @@ start:cfg_wrong_cn_in_sn_pool_tftp_sync_mode description:The test case is intend to test the error handling of the service node pool when a compute has misconfigured node definition +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode index 797c6b44f..c44d061e0 100644 --- a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode +++ b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode @@ -1,5 +1,6 @@ start:not_set_xcatmaster_in_sn_pool_tftp_mount_mode description: this case is to test when compute nodes' xcatmaster is not set in service node pool environment,compute node's provision files are correctly set after nodeset. +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult index 2f6c1c524..1f2a75243 100644 --- a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult +++ b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult @@ -1,5 +1,6 @@ start:not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult description: this case is to check the configuration files after nodeset for case not_set_xcatmaster_in_sn_pool_tftp_mount_mode +label:others,invoke_provision,snpool #create a test compute node, don't set it's xcatmaster, set it's service node as SN and CN cmd:mkdef -t node -o compute1 groups=compute ip=10.0.0.199 mac=4a:c8:f7:de:d0:09 profile=compute os=__GETNODEATTR($$CN,os)__ arch=__GETNODEATTR($$CN,arch)__ netboot=__GETNODEATTR($$CN,netboot)__ diff --git a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode index 805f33e21..3c2a0a051 100644 --- a/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_sync_mode @@ -1,5 +1,6 @@ start:not_set_xcatmaster_in_sn_pool_tftp_sync_mode description: this case is to test when compute nodes' xcatmaster is not set in service node pool environment, compute node's provision files are correctly set after nodeset. +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/set_disjointdhcps_in_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/set_disjointdhcps_in_sn_pool_tftp_sync_mode index 308c908b0..086a659cd 100644 --- a/xCAT-test/autotest/testcase/snpool/set_disjointdhcps_in_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/set_disjointdhcps_in_sn_pool_tftp_sync_mode @@ -1,5 +1,6 @@ start:set_disjointdhcps_in_sn_pool_tftp_sync_mode description: Verify the disjointdhcps feature when petitboot is used for OS loader. +label:others,invoke_provision,snpool,dhcp cmd:rmdef testnode1 cmd:rm -f /tftpboot/petitboot/testnode1 cmd:mkdef -t node -o testnode1 arch=ppc64le cons=bmc groups=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=ipmi profile=compute os=rhels7.99 diff --git a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode index b7a6d77c6..e0853de30 100644 --- a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode +++ b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode @@ -1,5 +1,6 @@ start:set_xcatmaster_in_sn_pool_tftp_mount_mode description: this case is to test when compute nodes' xcatmaster is set in service node pool environment,compute node's provision files are correctly set after nodeset. +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult index 75079452e..48efb039f 100644 --- a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult +++ b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult @@ -1,5 +1,6 @@ start:set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult description: this case is to check the configuration files after nodeset for case set_xcatmaster_in_sn_pool_tftp_mount_mode +label:others,invoke_provision,snpool #create a test compute node, set it's xcatmaster as SN, set it's service node as SN and CN cmd:mkdef -t node -o compute1 groups=compute ip=10.0.0.199 mac=4a:c8:f7:de:d0:09 profile=compute os=__GETNODEATTR($$CN,os)__ arch=__GETNODEATTR($$CN,arch)__ netboot=__GETNODEATTR($$CN,netboot)__ diff --git a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode index 204826de1..9131e8860 100644 --- a/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_sync_mode @@ -1,5 +1,6 @@ start:set_xcatmaster_in_sn_pool_tftp_sync_mode description: this case is to test when compute nodes' xcatmaster is set in service node pool environment,compute node's provision files are correctly set after nodeset. +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode b/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode index 5a2c2520f..06e0cd23a 100644 --- a/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode +++ b/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode @@ -1,5 +1,6 @@ start:setup_sn_pool_tftp_mount_mode description: this case is to test when sharedtftp=1 and installloc=/install are set on mn, after all service nodes are installed, /tftpboot and /install directory on all service nodes are mounted.Since test framework only support 1 sn and 1 cn parameter. This case will install CN as another service node. +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_sync_mode b/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_sync_mode index 3f088945f..12d07824d 100644 --- a/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_sync_mode +++ b/xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_sync_mode @@ -1,5 +1,6 @@ start:setup_sn_pool_tftp_sync_mode description: this case is to test when sharedtftp=0 and installloc=/install are not set on mn, after all service nodes are installed, /tftpboot and /install directory on all service nodes are separated and need to be rsynced. Since test framework only support 1 sn and 1 cn parameter. This case will install CN as another service node. +label:others,invoke_provision,snpool cmd:fdisk -l cmd:df -T #cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/switchdiscover/cases0 b/xCAT-test/autotest/testcase/switchdiscover/cases0 index 1009f74b3..b1a35926c 100644 --- a/xCAT-test/autotest/testcase/switchdiscover/cases0 +++ b/xCAT-test/autotest/testcase/switchdiscover/cases0 @@ -1,4 +1,5 @@ start:switchdiscover_h +label:others,discovery,Swtich os:Linux decription:help cmd:switchdiscover -h @@ -6,12 +7,14 @@ check:rc==0 check:output=~Usage end start:switchdiscover_range_default +label:others,discovery,Swtich cmd:switchdiscover --range $$range check:rc==0 check:output=~Discovering switches using nmap check:output=~switch end start:switchdiscover_range_default_w +label:others,discovery,Swtich cmd:lsdef -l switch -z >/tmp/switch.standa cmd:rmdef switch cmd:switchdiscover --range $$range -w @@ -29,12 +32,14 @@ cmd:rm -rf /tmp/switch.standa check:rc==0 end start:switchdiscover_range_s +label:others,discovery,Swtich cmd:switchdiscover --range $$range -s nmap check:rc==0 check:output=~Discovering switches using nmap check:output=~switch end start:switchdiscover_range_r +label:others,discovery,Swtich cmd:switchdiscover --range $$range -r check:rc==0 check:output=~Discovering switches using nmap @@ -47,6 +52,7 @@ check:output=~/usr/bin/nmap -s(n|P) -oX - $$range cmd:rm -rf switchdiscover_range_r.log end start:switchdiscover_range_x +label:others,discovery,Swtich cmd:switchdiscover --range $$range -x check:rc==0 check:output=~Discovering switches using nmap @@ -54,6 +60,7 @@ check:output=~ check:output=~switch end start:switchdiscover_range_z +label:others,discovery,Swtich cmd:switchdiscover --range $$range -z check:rc==0 check:output=~Discovering switches using nmap @@ -62,6 +69,7 @@ check:output=~groups=switch end start:switchdiscover_range_z_V +label:others,discovery,Swtich cmd:switchdiscover --range $$range -z -V check:rc==0 check:output=~Discovering switches using nmap diff --git a/xCAT-test/autotest/testcase/sysclone/cases0 b/xCAT-test/autotest/testcase/sysclone/cases0 index b18002ed1..5586768ba 100644 --- a/xCAT-test/autotest/testcase/sysclone/cases0 +++ b/xCAT-test/autotest/testcase/sysclone/cases0 @@ -1,4 +1,5 @@ start:sysclone +label:others,invoke_provision,sysclone cmd:makedns -n check:rc==0 cmd:makedhcp -n diff --git a/xCAT-test/autotest/testcase/testenv/case0 b/xCAT-test/autotest/testcase/testenv/case0 index f78099826..5a3e5d7dd 100644 --- a/xCAT-test/autotest/testcase/testenv/case0 +++ b/xCAT-test/autotest/testcase/testenv/case0 @@ -1,5 +1,6 @@ start:clean_up_env description:power off service node and compute node for next test usage +label:others cmd:rpower $$CN stat >> /tmp/cnstat cmd:if [[ ! `cat /tmp/cnstat |grep -i "Not Activated"` ]]; then rpower $$CN off;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/updatenode/cases0 b/xCAT-test/autotest/testcase/updatenode/cases0 index 44cb35ec3..f917cae2f 100644 --- a/xCAT-test/autotest/testcase/updatenode/cases0 +++ b/xCAT-test/autotest/testcase/updatenode/cases0 @@ -1,15 +1,26 @@ start:updatenode_h +label:others,updatenode cmd:updatenode -h check:rc==0 end start:updatenode_v +label:others,updatenode cmd:updatenode -v check:rc==0 check:output=~Version end +start:updatenode_without_options +description:this case is to verify defect 5142; updatenode without options causes command to crash. +label:mn_only,ci_test,updatenode +cmd:updatenode +check:rc!=0 +check:output=~Usage +end + start:updatenode_diskful_syncfiles +label:others,updatenode cmd:mkdir -p /install/custom/install/__GETNODEATTR($$CN,os)__/ check:rc==0 cmd:echo "/etc/hosts -> /etc/hosts" > /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist @@ -38,6 +49,7 @@ check:rc==0 end start:updatenode_diskful_syncfiles_rename +label:others,updatenode cmd:mkdir -p /tmp/syncfile/ check:rc==0 cmd:echo "test1" > /tmp/syncfile/test1.txt @@ -68,6 +80,7 @@ end start:updatenode_diskful_syncfiles_dir +label:others,updatenode cmd:mkdir -p /tmp/sync/ check:rc==0 cmd:echo "test1" > /tmp/sync/test1.txt @@ -97,6 +110,7 @@ end start:updatenode_diskful_syncfiles_multi_files +label:others,updatenode cmd:cp /etc/hosts /etc/common_hosts cmd:mkdir /tmp/prog1 cmd:mkdir /tmp/prog2 @@ -151,6 +165,7 @@ cmd:rm /install/custom/install/__GETNODEATTR($$CN,os)__/compute.$$OS.synclist end start:updatenode_syncfile_EXECUTE +label:others,updatenode cmd:echo "echo hello > /tmp/test" > /tmp/file.post check:rc==0 cmd:chmod a+x /tmp/file.post @@ -171,6 +186,7 @@ check:rc==0 end start:updatenode_syncfile_EXECUTEALWAYS +label:others,updatenode cmd:echo "echo hello >> /tmp/test" > /tmp/file.post check:rc==0 cmd:chmod a+x /tmp/file.post @@ -191,6 +207,7 @@ check:rc==0 end start:updatenode_syncfile_APPEND +label:others,updatenode cmd:echo "line1" > /tmp/append1 cmd:echo "line2" > /tmp/append2 cmd:scp /tmp/append1 root@$$CN:/tmp @@ -211,6 +228,7 @@ check:rc==0 end start:updatenode_syncfile_MERGE +label:others,updatenode cmd:mkdir -p /tmp/updatenode_syncfile_MERGE check:rc==0 cmd:xdsh $$CN "mkdir -p /tmp/updatenode_syncfile_MERGE" @@ -266,6 +284,7 @@ check:rc==0 end start:updatenode_P_script1 +label:others,updatenode cmd:echo "echo hello > /tmp/updatenode_P_script" > /tmp/script1 check:rc==0 cmd:chmod a+x /tmp/script1 @@ -289,6 +308,7 @@ check:rc==0 end start:updatenode_P_script2 +label:others,updatenode cmd:echo "#!/bin/bash" > /tmp/updatenode_P_script_input cmd:echo "if [ -n \$1 ]" >> /tmp/updatenode_P_script_input cmd:echo "then" >> /tmp/updatenode_P_script_input @@ -324,6 +344,7 @@ check:rc==0 end start:updatenode_f_incompatible_flags +label:others,updatenode description:check if -f flag incompatible with -S,-P or -F flags cmd:updatenode $$CN -f -S check:rc==1 @@ -337,6 +358,7 @@ check:output=~Choose either -f to sync the service nodes, or -F to sync the nod end start:updatenode_k_incompatible_flags +label:others,updatenode description:check if -k flag incompatible with -S,-P,-F or -f flags cmd:updatenode $$CN -k -S check:rc==1 @@ -353,6 +375,7 @@ check:output=~If you use the -k flag, you cannot specify the -S,-P,-f or -F flag end start:updatenode_diskful_syncfiles_P_script1 +label:others,updatenode description:check updatenode noderange -F -P script1 cmd:mkdir -p /install/custom/install/__GETNODEATTR($$CN,os)__/ check:rc==0 @@ -398,6 +421,7 @@ cmd:rm -f /install/script1 end start:updatenode_script3 +label:others,updatenode description:check updatenode noderange -P "script c" cmd:echo "#!/bin/bash" > /tmp/updatenode_P_script_input cmd:echo "if [ -n \$1 ]" >> /tmp/updatenode_P_script_input @@ -426,6 +450,7 @@ check:rc==0 end start:updatenode_P_script1_script2 +label:others,updatenode description:check updatenode noderange -P "script1 a,script2 b" cmd:echo "#!/bin/bash" > /tmp/updatenode_P1_script_input cmd:echo "if [ -n \$1 ];then" >> /tmp/updatenode_P1_script_input @@ -468,6 +493,7 @@ cmd:rm /install/postscripts/updatenode_P*_script_input end start:updatenode_without_flag +label:others,updatenode description:check updatenode without any flag cmd:updatenode $$CN check:rc==0 @@ -478,6 +504,7 @@ check:output=~Software Maintenance has completed end start:updatenode_P_syslog_V_xcatdebugmode_is_one +label:others,updatenode description:xcatdebugmode value is one, there should be execution outputs. cmd:chtab key=xcatdebugmode site.value=1 check:rc==0 @@ -488,6 +515,7 @@ check:rc==0 end start:updatenode_P_syslog_V_xcatdebugmode_is_two +label:others,updatenode description:xcatdebugmode value is two, there should be execution outputs. cmd:chtab key=xcatdebugmode site.value=2 check:rc==0 diff --git a/xCAT-test/autotest/testcase/updatenode/cases1 b/xCAT-test/autotest/testcase/updatenode/cases1 index 9b7685dc5..1f89bb71e 100644 --- a/xCAT-test/autotest/testcase/updatenode/cases1 +++ b/xCAT-test/autotest/testcase/updatenode/cases1 @@ -1,4 +1,5 @@ start:updatenode_scripts +label:others,updatenode cmd:mkdir -p /install/postscripts check:rc==0 cmd:echo "#!/bin/bash" >/install/postscripts/blah @@ -14,6 +15,7 @@ check:rc==0 end start:updatenode_scripts_timeout +label:others,updatenode cmd:mkdir -p /install/postscripts check:rc==0 cmd:echo "#!/bin/bash" >/install/postscripts/blah diff --git a/xCAT-test/autotest/testcase/updatenode/cases2 b/xCAT-test/autotest/testcase/updatenode/cases2 index 6a02c9372..7d392ab91 100644 --- a/xCAT-test/autotest/testcase/updatenode/cases2 +++ b/xCAT-test/autotest/testcase/updatenode/cases2 @@ -1,10 +1,12 @@ start:updatenode_S +label:others,updatenode cmd:updatenode $$CN -S >/tmp/updatenode.S.out cmd:grep 'Running of Software Maintenance has completed' /tmp/updatenode.S.out check:rc==0 end start:updatenode_S_gcc +label:others,updatenode cmd:lsdef $$CN -i provmethod | tail -n 1 | cut -d= -f2 | xargs lsdef -t osimage -i pkglist | tail -n 1 | cut -d= -f2 >/tmp/pkglist.filename cmd:mv `cat /tmp/pkglist.filename` `cat /tmp/pkglist.filename`.save cmd:cp `cat /tmp/pkglist.filename`.save `cat /tmp/pkglist.filename` diff --git a/xCAT-test/autotest/testcase/updatenode/cases3 b/xCAT-test/autotest/testcase/updatenode/cases3 index 6c0a50143..7b43d3d96 100644 --- a/xCAT-test/autotest/testcase/updatenode/cases3 +++ b/xCAT-test/autotest/testcase/updatenode/cases3 @@ -1,5 +1,6 @@ start:updatenode_diskful_syncfiles_failing description: Test exit code when syncfiles failing. +label:others,updatenode cmd:mkdir -p /install/custom/install/__GETNODEATTR($$CN,os)__/ check:rc==0 cmd:echo "/tmp/non-existent -> /etc/motd" > /install/custom/install/__GETNODEATTR($$CN,os)__/booboo.synclist diff --git a/xCAT-test/autotest/testcase/updatenode/cases4 b/xCAT-test/autotest/testcase/updatenode/cases4 index bf849b45c..b61ebdb6f 100644 --- a/xCAT-test/autotest/testcase/updatenode/cases4 +++ b/xCAT-test/autotest/testcase/updatenode/cases4 @@ -1,11 +1,13 @@ start:updatenode_syncfiles description: Test cases for the syncfiles feature +label:others,updatenode cmd:/opt/xcat/share/xcat/tools/autotest/testcase/updatenode/syncfiles $$CN check:rc==0 end start:updatenode_syncfiles_scp description: Test cases for the syncfiles feature with scp +label:others,updatenode cmd:/opt/xcat/share/xcat/tools/autotest/testcase/updatenode/syncfiles $$CN scp check:rc==0 end diff --git a/xCAT-test/autotest/testcase/updatenode/filesyncing_hierarchy_case b/xCAT-test/autotest/testcase/updatenode/filesyncing_hierarchy_case index 92a69c30f..826e41c85 100644 --- a/xCAT-test/autotest/testcase/updatenode/filesyncing_hierarchy_case +++ b/xCAT-test/autotest/testcase/updatenode/filesyncing_hierarchy_case @@ -1,5 +1,6 @@ start:updatenode_f_F_hierarchy description: verify the behavior of updatenode -f/-F in the hierarchy environment-- (1)the different kind of synclist entries including destination nodes (2)make sure the location of directory to hold the files/dirs to sync on SN is correct (3)check the result of updatenode -f/-F +label:others,updatenode #create environment files to hold variables accross the case cmd: MYENVFILE="/tmp/updatenode_f_F_hierarchy.envs"; rm -rf $MYENVFILE; echo "MYENVFILE=\"$MYENVFILE\"">> $MYENVFILE; chmod +x $MYENVFILE diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment b/xCAT-test/autotest/testcase/xcat-inventory/cases.environment deleted file mode 100644 index 6e25e315a..000000000 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.environment +++ /dev/null @@ -1,121 +0,0 @@ -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_provison -cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN -check:rc==0 - -cmd:makedns -n -check:rc==0 -cmd:sleep 20 -cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]] && [[ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]]; then getmacs -D $$CN; fi -check:rc==0 -cmd:makedhcp -n -check:rc==0 -cmd:makedhcp -a -check:rc==0 -cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done -check:rc==0 -cmd:copycds $$ISO -check:rc==0 - -cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi -check:rc==0 -cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir -check:output=~Importing object: test.environments.osimage -check:output=~Inventory import successfully! -check:rc==0 -cmd:lsdef -t osimage -o test.environments.osimage -check:rc==0 -cmd:genimage test.environments.osimage -check:rc==0 -cmd:packimage test.environments.osimage -check:rc==0 -cmd:rinstall $$CN osimage=test.environments.osimage -check:rc==0 -check:output=~Provision node\(s\)\: $$CN - -cmd:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi -cmd:cat /tmp/mountoutput/file.org -cmd:sleep 300 -cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 60 ];then break;fi done - -cmd:ping $$CN -c 3 -check:rc==0 -check:output=~64 bytes from $$CN -cmd:lsdef -l $$CN | grep status -check:rc==0 -check:output=~booted -cmd:xdsh $$CN date -check:rc==0 -check:output=~\d\d:\d\d:\d\d -cmd:xdsh $$CN mount -check:rc==0 -check:output=~on / type tmpfs -cmd:sleep 120 -cmd:ping $$CN -c 3 -check:rc==0 -check:output=~64 bytes from $$CN - -cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi -check:rc==0 -cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" -cmd:xdsh $$CN "cat /tmp/synclist" -check:rc==0 -cmd:xdsh $$CN "cat /tmp/test1.postinstall" -check:rc==0 -check:output=~test postisntall -cmd:xdsh $$CN "cat /tmp/test2.postinstall" -check:rc==0 -check:output=~test postisntall -cmd:xdsh $$CN "rpm -qa |grep -i conserver-xcat" -check:rc==0 -cmd:xdsh $$CN "rpm -qa |grep -i perl-Net-Telnet" -check:rc==0 -cmd:xdsh $$CN "rpm -qa |grep -i tftp" -check:rc==0 -cmd:xdsh $$CN "rpm -qa |grep -w dhcp" -check:rc==0 -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 -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:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir -check:output=~Importing object: test.environments.osimage -check:output=~Inventory import successfully! -check:rc==0 -cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environments.osimage.yaml.stanza -check:rc==0 -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: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 "^#" -check:rc==0 -cmd:rmdef -t osimage -o test.environments.osimage -check:rc==0 -cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir -check:output=~Importing object: test.environments.osimage -check:output=~Inventory import successfully! -check:rc==0 -cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environments.osimage.json.stanza -check:rc==0 -cmd:diff -y /tmp/export/test.environments.osimage.json.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza -check:rc==0 -cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.json -check:rc==0 -cmd:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json /tmp/export/test.environments.osimage.json --ignore-blank-lines -I "^#" -check:rc==0 -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 -check:rc==0 -cmd: if [ -e /tmp/test.environments.osimage.stanza ]; then cat /tmp/test.environments.osimage.stanza |mkdef -z;fi -end - - diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza deleted file mode 100644 index 903363536..000000000 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.stanza +++ /dev/null @@ -1,21 +0,0 @@ -# - -test.environments.osimage: - objtype=osimage - environvar=GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo,SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir - imagetype=linux - osarch=ppc64le - osdistroname=rhels7.5-alternate-ppc64le - osname=Linux - osvers=rhels7.5-alternate - otherpkgdir=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/ - otherpkglist=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist, - permission=755 - pkgdir=/install/rhels7.5-alternate/ppc64le,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/ - pkglist=/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist - postinstall=/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall,/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall - profile=compute - provmethod=netboot - rootimgdir=/install/custom/test.environments.osimage - synclists=/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/environment/gitrepo/syncfiles/synclist - usercomment=rhels7.5,test_environment_variables diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml b/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml deleted file mode 100644 index 82143abc4..000000000 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.yaml +++ /dev/null @@ -1,23 +0,0 @@ -osimage: - test.environments.osimage: - basic_attributes: - arch: ppc64le - distribution: rhels7.5 - osdistro: rhels7.5-ppc64le - osname: Linux - filestosync: {{GITREPO}}/syncfiles/synclist - deprecated: - comments: rhels7.5,test_environment_variables - genimgoptions: - permission: '755' - postinstall: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall,{{GITREPO}}/postinstall/test1.postinstall - rootimgdir: /install/custom/test.environments.osimage - imagetype: linux - package_selection: - otherpkgdir: {{SWDIR}}/otherpkgdir/ - otherpkglist: {{GITREPO}}/otherpkglist/test1.otherpkglist,{{GITREPO}}/otherpkglist/test2.otherpkglist, - pkgdir: /install/rhels7.5/ppc64le,{{SWDIR}}/pkgdir/ - pkglist: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist,{{GITREPO}}/pkglist/test1.pkglist,{{GITREPO}}/pkglist/test2.pkglist - provision_mode: netboot - role: compute -schema_version: '1.0' diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/osimage.json b/xCAT-test/autotest/testcase/xcat-inventory/templates/osimage.json deleted file mode 100644 index d35a00144..000000000 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/osimage.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "osimage": { - "testosimage1": { - "basic_attributes": { - "arch": "ppc64le", - "distribution": "sles12.2", - "osdistro": "sles12.2-ppc64le" - }, - "filestosync": "/install/custom/netboot/sles/compute.synclist", - "genimgoptions": { - "exlist": "/opt/xcat/share/xcat/netboot/sles/compute.sles12.ppc64le.exlist", - "postinstall": "/opt/xcat/share/xcat/netboot/sles/compute.sles12.ppc64le.postinstall", - "rootimgdir": "/install/netboot/sles12.2/ppc64le/compute", - "rootfstype": "nfs" - }, - "imagetype": "linux", - "package_selection": { - "otherpkgdir": "/install/post/otherpkgs/sles12.2/ppc64le", - "pkgdir": "/install/sles12.2/ppc64le", - "pkglist": "/opt/xcat/share/xcat/netboot/sles/compute.sles12.ppc64le.pkglist" - }, - "provision_mode": "statelite", - "role": "compute" - } - }, - "schema_version": "1.0" -} diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/osimage.yaml b/xCAT-test/autotest/testcase/xcat-inventory/templates/osimage.yaml deleted file mode 100644 index f837d42fb..000000000 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/osimage.yaml +++ /dev/null @@ -1,21 +0,0 @@ -osimage: - testosimage1: - basic_attributes: - arch: ppc64le - distribution: sles12.2 - osdistro: sles12.2-ppc64le - filestosync: /install/custom/netboot/sles/compute.synclist - genimgoptions: - exlist: /opt/xcat/share/xcat/netboot/sles/compute.sles12.ppc64le.exlist - postinstall: /opt/xcat/share/xcat/netboot/sles/compute.sles12.ppc64le.postinstall - rootimgdir: /install/netboot/sles12.2/ppc64le/compute - rootfstype: nfs - imagetype: linux - package_selection: - otherpkgdir: /install/post/otherpkgs/sles12.2/ppc64le - pkgdir: /install/sles12.2/ppc64le - pkglist: /opt/xcat/share/xcat/netboot/sles/compute.sles12.ppc64le.pkglist - provision_mode: statelite - role: compute -schema_version: '1.0' - diff --git a/xCAT-test/autotest/testcase/xcat_inventory/cases.backend b/xCAT-test/autotest/testcase/xcat_inventory/cases.backend new file mode 100644 index 000000000..b396448a4 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.backend @@ -0,0 +1,92 @@ +start:backend +description: verify xcat-inventory backend operations +label:others,inventory_ci + +cmd: rm -rf /tmp/backend_test/ +cmd:rm -rf ~/.xcatinv/inventory.cfg.bak.backend_init +check: rc==0 +cmd: [ -f ~/.xcatinv/inventory.cfg ] && mv ~/.xcatinv/inventory.cfg ~/.xcatinv/inventory.cfg.bak.backend_init +cmd: cp /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/inventory.cfg ~/.xcatinv/inventory.cfg +cmd: xcat-inventory init +check: rc==0 +check: output=~configuring backend dir +check: output=~xcat-inventory backend initialized +cmd: xcat-inventory init +check: rc==0 +check: output=~Backend has already been initialized, do nothing +cmd: cd /tmp/backend_test/git/repo && git config --local --get user.name +check: output=~ci +cmd: cd /tmp/backend_test/git/repo && git config --local --get user.email +check: output=~xcat@xcat.org +cmd: cd /tmp/backend_test/git/repo && git config --local --get diff.tool +check: output=~invdiff +cmd: cd /tmp/backend_test/git/repo && git config --local --get difftool.invdiff.cmd +check: output=~xcat-inventory diff --filename +cmd: xcat-inventory workspace-list +check: rc==0 +check: output=~master +cmd: XCATBYPASS=1 dumpxCATdb -p /tmp/backend_test/backup/db +check: rc==0 +cmd: XCATBYPASS=1 rmdef -a -f +check: rc==0 +cmd: xcat-inventory import -d /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/testcluster_backend +check: rc==0 +cmd:xcat-inventory commit -m "Rev1" Rev1 +check: rc==0 +check: output=~creating revision Rev1 in workspace +cmd:xcat-inventory revlist +check:rc==0 +check: output=~Rev1 + +cmd:xcat-inventory revlist Rev1 +check:rc==0 +check: output=~cluster.yaml +check: output=~definition.yaml +check: output=~Tagger: +cmd:chdef -t site -o clustersite xcatdebugmode=2 + +check: rc==0 +cmd:rmdef -t node -o nodetorm +check: rc==0 +cmd:mkdef -t osimage -o osimage3 --template osimage1 +check: rc==0 +cmd: xcat-inventory diff +check: rc==0 +check: output=~\+ xcatdebugmode\: \'2\' +check: output=~\+ osimage3\: +check: output=~\- nodetorm\: + +cmd: xcat-inventory commit Rev2 +check: rc==0 + +cmd: xcat-inventory checkout Rev1 +check: rc==0 +check: output=~checked out to revision Rev1 + +cmd: xcat-inventory whereami +check: rc==0 +check: output=~you are in revision \"Rev1\" of workspace \"master\" + +cmd: xcat-inventory workspace-new ws +check: rc==0 +cmd: +check: output=~workspace ws created +cmd: xcat-inventory workspace-list +check: rc==0 +check: output=~ws +cmd: xcat-inventory workspace-checkout ws +check: rc==0 +cmd: xcat-inventory workspace-delete ws +check: rc==0 +check: output=~deleted workspace ws +cmd: xcat-inventory workspace-list +check: rc==0 +check: output!=~ws + +cmd: XCATBYPASS=1 restorexCATdb -p /tmp/backend_test/backup/db +check: rc==0 +cmd: [ -f "~/.xcatinv/inventory.cfg.bak.backend_init" ] && rm -rf "~/.xcatinv/inventory.cfg" && mv "~/.xcatinv/inventory.cfg.bak.backend_init" "~/.xcatinv/inventory.cfg" +cmd: rm -rf /tmp/backend_test/ +end + + diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.common b/xCAT-test/autotest/testcase/xcat_inventory/cases.common similarity index 92% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.common rename to xCAT-test/autotest/testcase/xcat_inventory/cases.common index ac062fadc..4badc8873 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.common +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.common @@ -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 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.credential b/xCAT-test/autotest/testcase/xcat_inventory/cases.credential similarity index 98% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.credential rename to xCAT-test/autotest/testcase/xcat_inventory/cases.credential index fb4014c7e..d8f9517a9 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.credential +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.credential @@ -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 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.diff b/xCAT-test/autotest/testcase/xcat_inventory/cases.diff similarity index 68% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.diff rename to xCAT-test/autotest/testcase/xcat_inventory/cases.diff index 8e3f93c7e..be75bb066 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.diff +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.diff @@ -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,61 +11,61 @@ 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:output=~Backend not initialized, please initialize the backend with check:rc!=0 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:output=~Backend not initialized, please initialize the backend with check:rc!=0 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 diff --git a/xCAT-test/autotest/testcase/xcat_inventory/cases.environment b/xCAT-test/autotest/testcase/xcat_inventory/cases.environment new file mode 100644 index 000000000..cd4652763 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.environment @@ -0,0 +1,142 @@ +start:import_osimage_with_environments_in_yaml +description:this case is to verify if osimage import could support environment variables. +os:Linux +label:others,invoke_provision +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 + +cmd:makedns -n +check:rc==0 +cmd:sleep 20 +cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]] && [[ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]]; then getmacs -D $$CN; fi +check:rc==0 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? -ne 0 ] && exit 1;echo $output|grep $$CN 2>/dev/null && exit 0;a=$[$a+1];sleep 1;done +check:rc==0 +cmd:copycds $$ISO +check:rc==0 + +cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi +check:rc==0 +cmd:osarch=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osarch|awk -F'=' '{print $2}');sed -i "s/OSARCH/$osarch/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.yaml +cmd:osvers=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSVERS/$osvers/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.yaml +cmd:pkgdir=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkgdir|awk -F'=' '{print $2}');sed -i "s!PKGDIR!$pkgdir!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.yaml +cmd:pkglist=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkglist|awk -F'=' '{print $2}');sed -i "s!PKGLIST!$pkglist!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.yaml +cmd:postinstall=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w postinstall|awk -F'=' '{print $2}');sed -i "s!POSTINSTALL!$postinstall!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.yaml +cmd:osmajor=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSMAJOR/$osmajor/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.yaml +cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.yaml -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/swdir +check:output=~Inventory import successfully! +check:rc==0 +cmd:lsdef -t osimage -o test.environments.osimage +check:rc==0 +cmd:genimage test.environments.osimage +check:rc==0 +cmd:packimage test.environments.osimage +check:rc==0 +cmd:rinstall $$CN osimage=test.environments.osimage +check:rc==0 +check:output=~Provision node\(s\)\: $$CN + +cmd:if [[ -f /var/lib/dhcp/db/dhcpd.leases ]]; then cat /var/lib/dhcp/db/dhcpd.leases; elif [[ -f /var/lib/dhcpd/dhcpd.leases ]];then cat /var/lib/dhcpd/dhcpd.leases;elif [[ -f /var/lib/dhcp/dhcpd.leases ]];then cat /var/lib/dhcp/dhcpd.leases; fi +cmd:cat /tmp/mountoutput/file.org +cmd:sleep 300 +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 60 ];then break;fi done + +cmd:ping $$CN -c 3 +check:rc==0 +check:output=~64 bytes from $$CN +cmd:lsdef -l $$CN | grep status +check:rc==0 +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:xdsh $$CN mount +check:rc==0 +check:output=~on / type tmpfs +cmd:sleep 120 +cmd:ping $$CN -c 3 +check:rc==0 +check:output=~64 bytes from $$CN + +cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi +check:rc==0 +cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" +cmd:xdsh $$CN "cat /tmp/synclist" +check:rc==0 +cmd:xdsh $$CN "cat /tmp/test1.postinstall" +check:rc==0 +check:output=~test postisntall +cmd:xdsh $$CN "cat /tmp/test2.postinstall" +check:rc==0 +check:output=~test postisntall +cmd:xdsh $$CN "rpm -qa |grep -i conserver-xcat" +check:rc==0 +cmd:xdsh $$CN "rpm -qa |grep -i perl-Net-Telnet" +check:rc==0 +cmd:xdsh $$CN "rpm -qa |grep -i tftp" +check:rc==0 +cmd:xdsh $$CN "rpm -qa |grep -w dhcp" +check:rc==0 +end + +start:export_osimage_with_environments +description:this case is to verify if osimage export could support environment variables. +os:Linux +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 +check:output=~Inventory import successfully! +check:rc==0 +cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environments.osimage.yaml.stanza +check:rc==0 +cmd:osarch=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osarch|awk -F'=' '{print $2}');sed -i "s/OSARCH/$osarch/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza +cmd:osvers=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSVERS/$osvers/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza +cmd:pkgdir=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkgdir|awk -F'=' '{print $2}');sed -i "s!PKGDIR!$pkgdir!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza +cmd:pkglist=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkglist|awk -F'=' '{print $2}');sed -i "s!PKGLIST!$pkglist!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza +cmd:postinstall=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w postinstall|awk -F'=' '{print $2}');sed -i "s!POSTINSTALL!$postinstall!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza +cmd:osmajor=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSMAJOR/$osmajor/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza +cmd:diff -y /tmp/export/test.environments.osimage.yaml.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza +check:rc==0 +cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.yaml --format yaml +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" +check:rc==0 +cmd:rmdef -t osimage -o test.environments.osimage +check:rc==0 +cmd:osarch=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osarch|awk -F'=' '{print $2}');sed -i "s/OSARCH/$osarch/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json +cmd:osvers=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSVERS/$osvers/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json +cmd:pkgdir=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkgdir|awk -F'=' '{print $2}');sed -i "s!PKGDIR!$pkgdir!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json +cmd:pkglist=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w pkglist|awk -F'=' '{print $2}');sed -i "s!PKGLIST!$pkglist!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json +cmd:postinstall=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep -w postinstall|awk -F'=' '{print $2}');sed -i "s!POSTINSTALL!$postinstall!g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json +cmd:osmajor=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep osvers|awk -F'=' '{print $2}');sed -i "s/OSMAJOR/$osmajor/g" /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json +cmd:xcat-inventory import -f /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json -e GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/gitrepo -e SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/swdir +check:output=~Inventory import successfully! +check:rc==0 +cmd:lsdef -t osimage -o test.environments.osimage -z >> /tmp/export/test.environments.osimage.json.stanza +check:rc==0 +cmd:diff -y /tmp/export/test.environments.osimage.json.stanza /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza +check:rc==0 +cmd:xcat-inventory export -t osimage -o test.environments.osimage -f /tmp/export/test.environments.osimage.json +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" +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 +check:rc==0 +cmd: if [ -e /tmp/test.environments.osimage.stanza ]; then cat /tmp/test.environments.osimage.stanza |mkdef -z;fi +end + + diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.include b/xCAT-test/autotest/testcase/xcat_inventory/cases.include similarity index 94% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.include rename to xCAT-test/autotest/testcase/xcat_inventory/cases.include index e1c85460f..1cf22cb10 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.include +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.include @@ -1,11 +1,11 @@ start:export_import_osimage_with_INCLUDE_in_file description:This case is used to test xcat-inventory export and import one linux osimage definition which has INCLUDE in the attribute's specified files. The attributes are pkglist, otherpkglist,exlist,synclists,template,postinstall and partitionfile. -label:others,xcat_inventory +label:others,inventory_ci cmd:dir="/tmp/imagedata/";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir 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 @@ -28,7 +28,6 @@ check:rc==0 cmd:rm -rf /tmp/imagedata/test_osimage cmd:xcat-inventory import -t osimage -d /tmp/imagedata/export check:rc==0 -check:output=~Importing object: test_osimage check:output=~Inventory import successfully! check:output=~The object test_osimage has been imported cmd:lsdef -t osimage -o test_osimage diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.network b/xCAT-test/autotest/testcase/xcat_inventory/cases.network similarity index 74% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.network rename to xCAT-test/autotest/testcase/xcat_inventory/cases.network index a3ce0b1cc..22632878f 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.network +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.network @@ -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 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.nics b/xCAT-test/autotest/testcase/xcat_inventory/cases.nics similarity index 77% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.nics rename to xCAT-test/autotest/testcase/xcat_inventory/cases.nics index ca205dce8..12ddbbe87 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.nics +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.nics @@ -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:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/nics.yaml /tmp/export/nics.yaml --ignore-blank-lines -I "^#" +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:diff -y /opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/templates/nics.json /tmp/export/nics.json --ignore-blank-lines -I "^#" +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 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.node b/xCAT-test/autotest/testcase/xcat_inventory/cases.node similarity index 81% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.node rename to xCAT-test/autotest/testcase/xcat_inventory/cases.node index f4c66a182..27c1bf40c 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.node +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.node @@ -1,18 +1,18 @@ start:export_import_single_ppc_by_json description:This case is used to test xcat-inventory export and import one ppc definition by json between 2 exact same MNs. This case can cover hmc,lpar. 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= 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_ppc_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_ppc_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_ppc_by_json_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_ppc_by_json/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_ppc_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=hmc nodetype=ppc,osi addkcmdline=addkcmdline arch=ppc64 authdomain=authdomain cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac hcp=HMC height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=5 installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou parent=parent password=password pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power pprofile=pprofile prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment username=username vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -24,9 +24,9 @@ cmd:scp /tmp/export_import_single_ppc_by_json/bogusnode_json.inv $$DSTMN:/tmp/ex check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_ppc_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t"=" -k1|tee /tmp/export_import_single_ppc_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_ppc_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_ppc_by_json/dstbogusnode.stanza check:rc==0 @@ -34,17 +34,17 @@ cmd: cat /tmp/export_import_single_ppc_by_json/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_ppc_by_json/srcbogusnode.stanza /tmp/export_import_single_ppc_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_ppc_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_ppc_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_ppc_by_json/bogusgroup.stanza ]]; then cat /tmp/export_import_single_ppc_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_ppc_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_ppc_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_ppc_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_ppc_by_json check:rc==0 @@ -54,18 +54,18 @@ end start:export_import_single_ppc_by_yaml description:This case is used to test xcat-inventory export and import one ppc definition by yaml between 2 exact same MNs. This case can cover hmc,lpar. 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 run in one MN, this is, export from currnet node then import back to currnet node, in this case, just need to set $$DSTMN= 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_ppc_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_ppc_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_ppc_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_ppc_by_yaml/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_ppc_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=hmc nodetype=ppc,osi addkcmdline=addkcmdline arch=ppc64 authdomain=authdomain cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac hcp=HMC height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=5 installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou parent=parent password=password pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power pprofile=pprofile prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment username=username vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -77,9 +77,9 @@ cmd:scp /tmp/export_import_single_ppc_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/ex check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_ppc_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t"=" -k1|tee /tmp/export_import_single_ppc_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_ppc_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_ppc_by_yaml/dstbogusnode.stanza check:rc==0 @@ -87,17 +87,17 @@ cmd: cat /tmp/export_import_single_ppc_by_yaml/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_ppc_by_yaml/srcbogusnode.stanza /tmp/export_import_single_ppc_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_ppc_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_ppc_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_ppc_by_yaml/bogusgroup.stanza ]]; then cat /tmp/export_import_single_ppc_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_ppc_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_ppc_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_ppc_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_ppc_by_yaml check:rc==0 @@ -107,18 +107,18 @@ end start:export_import_single_kvm_by_json description:This case is used to test xcat-inventory export and import one kvm 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= 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_kvm_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_kvm_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_kvm_by_json_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_kvm_by_json/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_kvm_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=kvm addkcmdline=addkcmdline arch=ppc64le authdomain=authdomain cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=5 installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmcpus=vmcpus vmhost=vmhost vmmanager=vmmanager vmmaster=vmmaster vmmemory=vmmemory vmnicnicmodel=vmnicnicmodel vmnics=vmnics vmothersetting=vmothersetting vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -130,9 +130,9 @@ cmd:scp /tmp/export_import_single_kvm_by_json/bogusnode_json.inv $$DSTMN:/tmp/ex check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_kvm_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_kvm_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_kvm_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_kvm_by_json/dstbogusnode.stanza check:rc==0 @@ -140,17 +140,17 @@ cmd: cat /tmp/export_import_single_kvm_by_json/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_kvm_by_json/srcbogusnode.stanza /tmp/export_import_single_kvm_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_kvm_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_kvm_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_kvm_by_json/bogusgroup.stanza ]]; then cat /tmp/export_import_single_kvm_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_kvm_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_kvm_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_kvm_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_kvm_by_json check:rc==0 @@ -161,18 +161,18 @@ end start:export_import_single_kvm_by_yaml description:This case is used to test xcat-inventory export and import one kvm 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= 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_kvm_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_kvm_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_kvm_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_kvm_by_yaml/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_kvm_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=kvm addkcmdline=addkcmdline arch=ppc64le authdomain=authdomain cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=5 installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmcpus=vmcpus vmhost=vmhost vmmanager=vmmanager vmmaster=vmmaster vmmemory=vmmemory vmnicnicmodel=vmnicnicmodel vmnics=vmnics vmothersetting=vmothersetting vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -184,9 +184,9 @@ cmd:scp /tmp/export_import_single_kvm_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/ex check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_kvm_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t"=" -k1|tee /tmp/export_import_single_kvm_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_kvm_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_kvm_by_yaml/dstbogusnode.stanza check:rc==0 @@ -194,17 +194,17 @@ cmd: cat /tmp/export_import_single_kvm_by_yaml/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_kvm_by_yaml/srcbogusnode.stanza /tmp/export_import_single_kvm_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_kvm_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_kvm_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_kvm_by_yaml/bogusgroup.stanza ]]; then cat /tmp/export_import_single_kvm_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_kvm_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_kvm_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_kvm_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_kvm_by_yaml check:rc==0 @@ -215,18 +215,18 @@ end start:export_import_single_pdu_by_json description:This case is used to test xcat-inventory export and import one pdu 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= 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_pdu_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_pdu_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_pdu_by_json_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_pdu_by_json/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_pdu_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=pdu nodetype=pdu addkcmdline=addkcmdline arch=ppc64 authdomain=authdomain authkey=authkey authtype=MD5 cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping community=community cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou outlet=outlet password=password pdu=pdu pdutype=pdutype postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn privkey=privkey privtype=AES productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames seclevel=noAuthNoPriv serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot snmpuser=snmpuser snmpversion=SNMPv1 storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment username=username vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -238,9 +238,9 @@ cmd:scp /tmp/export_import_single_pdu_by_json/bogusnode_json.inv $$DSTMN:/tmp/ex check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_pdu_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_pdu_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_pdu_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_pdu_by_json/dstbogusnode.stanza check:rc==0 @@ -248,17 +248,17 @@ cmd: cat /tmp/export_import_single_pdu_by_json/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_pdu_by_json/srcbogusnode.stanza /tmp/export_import_single_pdu_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_pdu_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_pdu_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_pdu_by_json/bogusgroup.stanza ]]; then cat /tmp/export_import_single_pdu_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_pdu_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_pdu_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_pdu_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_pdu_by_json check:rc==0 @@ -268,18 +268,18 @@ end start:export_import_single_pdu_by_yaml description:This case is used to test xcat-inventory export and import one pdu 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= 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_pdu_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_pdu_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_pdu_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_pdu_by_yaml/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_pdu_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=pdu nodetype=pdu addkcmdline=addkcmdline arch=ppc64 authdomain=authdomain authkey=authkey authtype=MD5 cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping community=community cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou outlet=outlet password=password pdu=pdu pdutype=pdutype postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn privkey=privkey privtype=AES productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames seclevel=noAuthNoPriv serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot snmpuser=snmpuser snmpversion=SNMPv1 storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment username=username vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -291,9 +291,9 @@ cmd:scp /tmp/export_import_single_pdu_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/ex check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_pdu_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t"=" -k1|tee /tmp/export_import_single_pdu_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_pdu_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_pdu_by_yaml/dstbogusnode.stanza check:rc==0 @@ -301,17 +301,17 @@ cmd: cat /tmp/export_import_single_pdu_by_yaml/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_pdu_by_yaml/srcbogusnode.stanza /tmp/export_import_single_pdu_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_pdu_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_pdu_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_pdu_by_yaml/bogusgroup.stanza ]]; then cat /tmp/export_import_single_pdu_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_pdu_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_pdu_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_pdu_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_pdu_by_yaml check:rc==0 @@ -321,18 +321,18 @@ end start:export_import_single_boston_by_yaml description:This case is used to test xcat-inventory export and import one boston node definition by yaml between 2 exact same MNs. This case can also cover p8 physical node, x86 physical node. 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= 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_boston_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_boston_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_boston_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_boston_by_yaml/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_boston_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=ipmi addkcmdline=addkcmdline arch=ppc64le authdomain=authdomain bmc=bmc bmcpassword=bmcpassword bmcport=bmcport bmcusername=bmcusername bmcvlantag=bmcvlantag cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot slotid=slotid storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -344,9 +344,9 @@ cmd:scp /tmp/export_import_single_boston_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_boston_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t"=" -k1|tee /tmp/export_import_single_boston_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_boston_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_boston_by_yaml/dstbogusnode.stanza check:rc==0 @@ -354,17 +354,17 @@ cmd: cat /tmp/export_import_single_boston_by_yaml/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_boston_by_yaml/srcbogusnode.stanza /tmp/export_import_single_boston_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_boston_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_boston_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_boston_by_yaml/bogusgroup.stanza ]]; then cat /tmp/export_import_single_boston_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_boston_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_boston_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_boston_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_boston_by_yaml check:rc==0 @@ -373,18 +373,18 @@ end start:export_import_single_boston_by_json description:This case is used to test xcat-inventory export and import one boston node definition by json between 2 exact same MNs. This case can also cover p8 physical node, x86 physical node. 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= 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_boston_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_boston_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_boston_by_json_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_boston_by_json/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_boston_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_boston_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_boston_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=ipmi addkcmdline=addkcmdline arch=ppc64le authdomain=authdomain bmc=bmc bmcpassword=bmcpassword bmcport=bmcport bmcusername=bmcusername bmcvlantag=bmcvlantag cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot slotid=slotid storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -396,9 +396,9 @@ cmd:scp /tmp/export_import_single_boston_by_json/bogusnode_json.inv $$DSTMN:/tmp check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_boston_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t"=" -k1|tee /tmp/export_import_single_boston_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_boston_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_boston_by_json/dstbogusnode.stanza check:rc==0 @@ -406,17 +406,17 @@ cmd: cat /tmp/export_import_single_boston_by_json/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_boston_by_json/srcbogusnode.stanza /tmp/export_import_single_boston_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_boston_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_boston_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_boston_by_json/bogusgroup.stanza ]]; then cat /tmp/export_import_single_boston_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_boston_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_boston_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_boston_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_boston_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_boston_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_boston_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_boston_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_boston_by_json check:rc==0 @@ -425,18 +425,18 @@ end start:export_import_single_witherspoon_by_yaml description:This case is used to test xcat-inventory export and import one witherspoon node 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= 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_witherspoon_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_witherspoon_by_yaml/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_witherspoon_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=openbmc nodetype=mp addkcmdline=addkcmdline arch=ppc64le authdomain=authdomain bmc=bmc bmcpassword=bmcpassword bmcusername=bmcusername bmcvlantag=bmcvlantag cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand consport=consport cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -448,9 +448,9 @@ cmd:scp /tmp/export_import_single_witherspoon_by_yaml/bogusnode_yaml.inv $$DSTMN check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t"=" -k1|tee /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_witherspoon_by_yaml/dstbogusnode.stanza check:rc==0 @@ -458,17 +458,17 @@ cmd: cat /tmp/export_import_single_witherspoon_by_yaml/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_witherspoon_by_yaml/srcbogusnode.stanza /tmp/export_import_single_witherspoon_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_witherspoon_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_witherspoon_by_yaml/bogusgroup.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_witherspoon_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_witherspoon_by_yaml check:rc==0 @@ -477,18 +477,18 @@ end start:export_import_single_witherspoon_by_json description:This case is used to test xcat-inventory export and import one witherspoon node 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= 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_witherspoon_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_witherspoon_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_witherspoon_by_json_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_witherspoon_by_json/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_witherspoon_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=openbmc nodetype=mp addkcmdline=addkcmdline arch=ppc64le authdomain=authdomain bmc=bmc bmcpassword=bmcpassword bmcusername=bmcusername bmcvlantag=bmcvlantag cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand consport=consport cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -500,9 +500,9 @@ cmd:scp /tmp/export_import_single_witherspoon_by_json/bogusnode_json.inv $$DSTMN check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_witherspoon_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_witherspoon_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_witherspoon_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_witherspoon_by_json/dstbogusnode.stanza check:rc==0 @@ -510,17 +510,17 @@ cmd: cat /tmp/export_import_single_witherspoon_by_json/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_witherspoon_by_json/srcbogusnode.stanza /tmp/export_import_single_witherspoon_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_witherspoon_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_witherspoon_by_json/bogusgroup.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_witherspoon_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_witherspoon_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_witherspoon_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_witherspoon_by_json check:rc==0 @@ -530,18 +530,18 @@ end start:export_import_single_switch_by_json description:This case is used to test xcat-inventory export and import one switch node 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= 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_switch_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_switch_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_switch_by_json_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_switch_by_json/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_switch_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_switch_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_switch_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=switch nodetype=switch addkcmdline=addkcmdline arch=ppc64 authdomain=authdomain cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid linkports=linkports mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou password=password pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey protocol=ssh provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot snmpauth=SHA snmppassword=snmppassword snmpprivacy=DES snmpusername=snmpusername snmpversion=SNMPv1 storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchtype=switchtype switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment username=username vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -553,9 +553,9 @@ cmd:scp /tmp/export_import_single_switch_by_json/bogusnode_json.inv $$DSTMN:/tmp check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_switch_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_switch_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_switch_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_switch_by_json/dstbogusnode.stanza check:rc==0 @@ -563,17 +563,17 @@ cmd: cat /tmp/export_import_single_switch_by_json/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_switch_by_json/srcbogusnode.stanza /tmp/export_import_single_switch_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_switch_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_switch_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_switch_by_json/bogusgroup.stanza ]]; then cat /tmp/export_import_single_switch_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_switch_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_switch_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_switch_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_switch_by_json_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_switch_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_switch_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_switch_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_switch_by_json check:rc==0 @@ -582,18 +582,18 @@ end start:export_import_single_switch_by_yaml description:This case is used to test xcat-inventory export and import one switch node 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= 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_switch_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_switch_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_switch_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_switch_by_yaml/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_switch_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=switch nodetype=switch addkcmdline=addkcmdline arch=ppc64 authdomain=authdomain cfgmgr=cfgmgr cfgmgtroles=cfgmgtroles cfgserver=cfgserver chain=chain chassis=chassis cmdmapping=cmdmapping cons=cons conserver=conserver consoleondemand=consoleondemand cpucount=cpucount cputype=cputype dhcpinterfaces=dhcpinterfaces disksize=disksize domainadminpassword=domainadminpassword domainadminuser=domainadminuser domaintype=domaintype getmac=getmac height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype installnic=installnic interface=interface ip=10.10.10.10 iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid linkports=linkports mac=42:d6:0a:03:05:08 memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=grub2 nfsdir=nfsdir nfsserver=nfsserver nimserver=nimserver node=node ondiscover=ondiscover osvolume=osvolume otherinterfaces=otherinterfaces ou=ou password=password pdu=pdu postbootscripts=postbootscripts postscripts=postscripts power=power prescripts-begin=prescripts-begin prescripts-end=prescripts-end primarynic=primarynic primarysn=primarysn productkey=productkey protocol=ssh provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=0 setupdhcp=0 setupftp=setupftp setupipforward=0 setupldap=0 setupnameserver=0 setupnfs=0 setupnim=setupnim setupntp=0 setupproxydhcp=0 setuptftp=0 sfp=sfp side=side slot=slot snmpauth=SHA snmppassword=snmppassword snmpprivacy=DES snmpusername=snmpusername snmpversion=SNMPv1 storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=50 switchtype=switchtype switchvlan=switchvlan syslog=syslog termport=termport termserver=termserver tftpdir=tftpdir tftpserver=tftpserver unit=unit usercomment=usercomment username=username vmbeacon=vmbeacon vmbootorder=vmbootorder vmcfgstore=vmcfgstore vmcluster=vmcluster vmmanager=vmmanager vmmaster=vmmaster vmnicnicmodel=vmnicnicmodel vmphyslots=vmphyslots vmstorage=vmstorage vmstoragecache=vmstoragecache vmstorageformat=vmstorageformat vmstoragemodel=vmstoragemodel vmtextconsole=vmtextconsole vmvirtflags=vmvirtflags vmvncport=vmvncport xcatmaster=xcatmaster zonename=zonename nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused check:rc==0 @@ -605,9 +605,9 @@ cmd:scp /tmp/export_import_single_switch_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_switch_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_import_single_switch_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_switch_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_single_switch_by_yaml/dstbogusnode.stanza check:rc==0 @@ -615,17 +615,17 @@ cmd: cat /tmp/export_import_single_switch_by_yaml/dstbogusnode.stanza check:rc==0 cmd:diff -y /tmp/export_import_single_switch_by_yaml/srcbogusnode.stanza /tmp/export_import_single_switch_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_import_single_switch_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_switch_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_single_switch_by_yaml/bogusgroup.stanza ]]; then cat /tmp/export_import_single_switch_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_import_single_switch_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_switch_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_switch_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_switch_by_yaml check:rc==0 @@ -635,18 +635,18 @@ end start:export_import_nodes_delimited_with_comma_by_yaml description:This case is used to test xcat-inventory export and import the definition of nodes delimited with comma 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= 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_nodes_delimited_with_comma_by_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/' check:rc==0 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusnode.stanza ;rmdef bogusnode$i;fi; done check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef bogusnode[1-3] groups=bogusgroup mgt=openbmc cons=openbmc netboot=petitboot check:rc==0 @@ -658,9 +658,9 @@ cmd:scp /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusnode_yaml.inv check:rc==0 cmd:rmdef bogusnode[1-3] check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode1,bogusnode2,bogusnode3' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode1,bogusnode2,bogusnode3' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode[1-3] -z|sort -t'=' -k1 |tee /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode[1-3] -z|sort -t'=' -k1 |tee /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/dstbogusnode.stanza /tmp/export_import_nodes_delimited_with_comma_by_yaml/dstbogusnode.stanza check:rc==0 @@ -668,17 +668,17 @@ cmd: cat /tmp/export_import_nodes_delimited_with_comma_by_yaml/dstbogusnode.stan check:rc==0 cmd:diff -y /tmp/export_import_nodes_delimited_with_comma_by_yaml/srcbogusnode.stanza /tmp/export_import_nodes_delimited_with_comma_by_yaml/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode[1-3]' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode[1-3]' check:rc==0 cmd:if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusgroup.stanza ]];then cat /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_nodes_delimited_with_comma_by_yaml check:rc==0 @@ -687,18 +687,18 @@ end start:export_import_nodes_delimited_with_comma_by_json description:This case is used to test xcat-inventory export and import the definition of nodes delimited with comma 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= 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_nodes_delimited_with_comma_by_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/' check:rc==0 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_nodes_delimited_with_comma_by_json/bogusnode.stanza ;rmdef bogusnode$i;fi; done check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_nodes_delimited_with_comma_by_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef bogusnode[1-3] groups=bogusgroup mgt=openbmc cons=openbmc netboot=petitboot check:rc==0 @@ -710,9 +710,9 @@ cmd:scp /tmp/export_import_nodes_delimited_with_comma_by_json/bogusnode_json.inv check:rc==0 cmd:rmdef bogusnode[1-3] check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode1,bogusnode2,bogusnode3' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode_json.inv -t node -o bogusnode1,bogusnode2,bogusnode3' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode[1-3] -z|sort -t'=' -k1 |tee /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode[1-3] -z|sort -t'=' -k1 |tee /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/dstbogusnode.stanza /tmp/export_import_nodes_delimited_with_comma_by_json/dstbogusnode.stanza check:rc==0 @@ -720,17 +720,17 @@ cmd: cat /tmp/export_import_nodes_delimited_with_comma_by_json/dstbogusnode.stan check:rc==0 cmd:diff -y /tmp/export_import_nodes_delimited_with_comma_by_json/srcbogusnode.stanza /tmp/export_import_nodes_delimited_with_comma_by_json/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode[1-3]' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode[1-3]' check:rc==0 cmd:if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_json/bogusnode.stanza ]]; then cat /tmp/export_import_nodes_delimited_with_comma_by_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_json/bogusgroup.stanza ]];then cat /tmp/export_import_nodes_delimited_with_comma_by_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_nodes_delimited_with_comma_by_json check:rc==0 @@ -739,7 +739,7 @@ end start:xcat_inventory_try_to_export_nonexisted_node description:This case is used to test xcat-inventory export a nonexisted node -label:others,xcat_inventory +label:others,inventory_ci cmd:mkdir -p /tmp/xcat_inventory_try_to_export_nonexisted_node check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/xcat_inventory_try_to_export_nonexisted_node/bogusnode.stanza ;rmdef bogusnode;fi @@ -758,7 +758,7 @@ end start:xcat_inventory_try_to_import_nonexisted_node description:This case is used to test xcat-inventory import a nonexisted node -label:others,xcat_inventory +label:others,inventory_ci cmd:mkdir -p /tmp/xcat_inventory_try_to_import_nonexisted_node check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/xcat_inventory_try_to_import_nonexisted_node/bogusnode.stanza ;rmdef bogusnode;fi @@ -784,7 +784,7 @@ check:rc==0 end start:xcat_inventory_try_to_export_all_type_is_node_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 node by default format. I.e, do not specify the format of export. cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format check:rc==0 @@ -803,15 +803,15 @@ check:rc==0 #To test if "xcat-inventory export -t node" works correctly cmd:xcat-inventory export -t node |tee /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node check:rc==0 -cmd: grep " \"xcatdefaults\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi +cmd: grep "xcatdefaults:" /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi check:rc==0 -cmd: grep " \"service\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi +cmd: grep "service:" /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi check:rc==0 -cmd:dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db|wc -l);dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db |wc -l);((da=$dn+$dg+2));echo "dn=$dn dg=$dg da=$da";ia=$(grep " \"obj_type\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node|wc -l);echo "ia=$ia"; if [[ $da -eq $ia ]];then exit 0; else exit 1;fi +cmd:dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db|wc -l);dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db |wc -l);((da=$dn+$dg+2));echo "dn=$dn dg=$dg da=$da";ia=$(grep "obj_type:" /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node|wc -l);echo "ia=$ia"; if [[ $da -eq $ia ]];then exit 0; else exit 1;fi check:rc==0 -cmd:a=0;for i in `awk -F':' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db`; do grep -E " \"$i\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db|wc -l);if [[ $a -eq $dg ]]; then exit 0; else exit 1;fi +cmd:a=0;for i in `awk -F':' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db`; do grep -E " $i:" /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db|wc -l);if [[ $a -eq $dg ]]; then exit 0; else exit 1;fi check:rc==0 -cmd:a=0;for i in `awk -F' ' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db`;do grep -E " \"$i\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db |wc -l); if [[ $dn -eq $a ]]; then exit 0; else exit 1;fi +cmd:a=0;for i in `awk -F' ' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db`;do grep -E " $i:" /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db |wc -l); if [[ $dn -eq $a ]]; then exit 0; else exit 1;fi check:rc==0 cmd:rmdef bogusnode[1-3] check:rc==0 @@ -827,7 +827,7 @@ end start:xcat_inventory_try_to_export_all_type_is_node_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 node by yaml format. cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format check:rc==0 @@ -846,7 +846,7 @@ check:rc==0 #To test if "xcat-inventory export --format=yaml -t node |tee /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/export_all_node cmd:xcat-inventory export --format=yaml -t node |tee /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/export_all_node check:rc==0 -cmd: grep " xcatdefaults:" /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi +cmd: grep "xcatdefaults:" /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi check:rc==0 cmd: grep " service:" /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi check:rc==0 @@ -870,7 +870,7 @@ end start:xcat_inventory_try_to_export_all_type_is_node_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 node by json format. cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format check:rc==0 @@ -888,9 +888,9 @@ cmd:lsdef -t group -i grouptype -c|grep "grouptype=static" |tee /tmp/xcat_inven check:rc==0 cmd:xcat-inventory export --format=json -t node |tee /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node check:rc==0 -cmd: grep " \"xcatdefaults\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi +cmd: grep "xcatdefaults" /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi check:rc==0 -cmd: grep " \"service\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi +cmd: grep "service" /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node > /dev/null 2>&1; if [[ $? -eq 0 ]]; then exit 0; else exit 1;fi check:rc==0 cmd:dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/node_in_xcat_db|wc -l);dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/group_in_xcat_db |wc -l);((da=$dn+$dg+2));ia=$(grep " \"obj_type\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node|wc -l); if [[ $da -eq $ia ]];then exit 0; else exit 1;fi check:rc==0 @@ -911,7 +911,7 @@ check:rc==0 end start:xcat_inventory_try_to_import_all_type_is_node_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 node from a yaml file. cmd:mkdir -p /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format check:rc==0 @@ -919,8 +919,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_node_yaml_format/bogusnode.stanza;rmdef -t group bogusgroup; fi check:rc==0 -cmd:#!/usr/bin/bash -echo "network: +cmd:echo "network: 10_0_0_0-255_0_0_0: basic_attr: gateway: 10.0.0.103 @@ -1186,8 +1185,7 @@ site: check:rc==0 cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/yaml.test -t node check:rc==0 -cmd:#!/bin/bash -echo "# +cmd:echo "# bogusnode1: objtype=node bmc=10.100.100.1 @@ -1218,7 +1216,8 @@ bogusnode3: check:rc==0 cmd:lsdef bogusnode[1-3] -z | sed -e '/^\s*$/d' > /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/node_stanza_after_import check:rc==0 -cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/node_stanza_from_import_file /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/node_stanza_after_import +cmd:#!/bin/bash +diff -y --ignore-blank-lines --ignore-matching-lines="^#" /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/node_stanza_from_import_file /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/node_stanza_after_import check:rc==0 cmd:tabdump site|grep 100.3.5.8 check:rc!=0 @@ -1236,7 +1235,7 @@ end start:xcat_inventory_try_to_import_all_type_is_node_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 node from a yaml file. cmd:mkdir -p /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format check:rc==0 @@ -1244,8 +1243,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_node_json_format/bogusnode.stanza;rmdef -t group bogusgroup; fi check:rc==0 -cmd:#!/usr/bin/bash -echo '{ +cmd:echo '{ "network": { "10_0_0_0-255_0_0_0": { "basic_attr": { @@ -1590,9 +1588,7 @@ echo '{ check:rc==0 cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/json.test -t node check:rc==0 -cmd:#!/bin/bash -echo "# -bogusnode1: +cmd:echo 'bogusnode1: objtype=node bmc=10.100.100.1 bmcpassword=0penBmc @@ -1618,11 +1614,13 @@ bogusnode3: cons=openbmc groups=bogusgroup mgt=openbmc - netboot=petitboot" > /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/node_stanza_from_import_file + netboot=petitboot' > /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/node_stanza_from_import_file check:rc==0 cmd:lsdef bogusnode[1-3] -z | sed -e '/^\s*$/d' > /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/node_stanza_after_import check:rc==0 -cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/node_stanza_from_import_file /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/node_stanza_after_import +cmd:cat /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/node_stanza_after_import +cmd:#!/bin/bash +diff -y --ignore-blank-lines --ignore-matching-lines="^#" /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/node_stanza_from_import_file /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/node_stanza_after_import check:rc==0 cmd:tabdump site|grep 100.3.5.8 check:rc!=0 @@ -1639,7 +1637,7 @@ check:rc==0 end start:export_more_nodes_import_part_nodes_json -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test xcat-inventory import all definition which type is node from a yaml file. cmd:mkdir -p /tmp/export_more_nodes_import_part_nodes_json check:rc==0 @@ -1682,7 +1680,7 @@ check:rc==0 end start:export_more_nodes_import_part_nodes_yaml -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test xcat-inventory import all definition which type is node from a yaml file. cmd:mkdir -p /tmp/export_more_nodes_import_part_nodes_yaml check:rc==0 @@ -1725,20 +1723,20 @@ check:rc==0 end start:export_single_node_then_modify_yaml_then_import -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test xcat-inventory import a node , then modify the export yaml file, then import the yaml file Attribute: $$DSTMN - the ip of MN which is used to run import operation. cmd:mkdir -p /tmp/export_single_node_then_modify_yaml_then_import check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_single_node_then_modify_yaml_then_import/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_single_node_then_modify_yaml_then_import/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=openbmc nodetype=mp addkcmdline=1111 arch=ppc64 authdomain=1111 bmc=1111 bmcpassword=1111 bmcusername=1111 bmcvlantag=1111 cfgmgr=1111 cfgmgtroles=1111 cfgserver=1111 chain=1111 chassis=1111 cmdmapping=1111 cons=1111 conserver=1111 consoleondemand=1111 consport=1111 cpucount=1111 cputype=1111 dhcpinterfaces=1111 disksize=1111 domainadminpassword=1111 domainadminuser=1111 domaintype=1111 getmac=1111 height=1111 hidden=1111 hostcluster=1111 hostinterface=1111 hostmanager=1111 hostnames=1111 hosttype=1111 hwtype=1111 installnic=1111 interface=1111 ip=10.10.10.10 iscsipassword=1111 iscsiserver=1111 iscsitarget=1111 iscsiuserid=1111 mac=42:d6:0a:03:05:08 memory=1111 migrationdest=1111 monserver=1111 mpa=1111 mtm=1111 nameservers=1111 netboot=grub2 nfsdir=1111 nfsserver=1111 nimserver=1111 node=1111 ondiscover=1111 osvolume=1111 otherinterfaces=1111 ou=1111 pdu=1111 postbootscripts=1111 postscripts=1111 power=1111 prescripts-begin=1111 prescripts-end=1111 primarynic=1111 primarysn=1111 productkey=1111 provmethod=1111 rack=1111 room=1111 routenames=1111 serial=1111 serialflow=1111 serialport=1111 serialspeed=1111 servicenode=1111 setupconserver=1 setupdhcp=1 setupftp=1111 setupipforward=1 setupldap=1 setupnameserver=1 setupnfs=1 setupnim=1111 setupntp=1 setupproxydhcp=1 setuptftp=1 sfp=1111 side=1111 slot=1111 storagcontroller=1111 storagetype=1111 supernode=1111 supportedarchs=1111 supportproxydhcp=1111 switch=1111 switchinterface=1111 switchport=1111 switchvlan=1111 syslog=1111 termport=1111 termserver=1111 tftpdir=1111 tftpserver=1111 unit=1111 usercomment=1111 vmbeacon=1111 vmbootorder=1111 vmcfgstore=1111 vmcluster=1111 vmmanager=1111 vmmaster=1111 vmnicnicmodel=1111 vmphyslots=1111 vmstorage=1111 vmstoragecache=1111 vmstorageformat=1111 vmstoragemodel=1111 vmtextconsole=1111 vmvirtflags=1111 vmvncport=1111 xcatmaster=1111 zonename=1111 nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused cmd:lsdef bogusnode -z|sed 's/1111/2222/g'|sed 's/unused/used/g'|sed 's/10.10.100.9/20.10.200.9/g'|sort -t'=' -k1 |tee /tmp/export_single_node_then_modify_yaml_then_import/srcbogusnode.stanza @@ -1777,9 +1775,9 @@ cmd:scp /tmp/export_single_node_then_modify_yaml_then_import/bogusnode_yaml.inv check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode_yaml.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t"=" -k1|tee /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/dstbogusnode.stanza /tmp/export_single_node_then_modify_yaml_then_import/dstbogusnode.stanza check:rc==0 @@ -1787,17 +1785,17 @@ cmd: cat /tmp/export_single_node_then_modify_yaml_then_import/dstbogusnode.stanz check:rc==0 cmd:diff -y /tmp/export_single_node_then_modify_yaml_then_import/srcbogusnode.stanza /tmp/export_single_node_then_modify_yaml_then_import/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_single_node_then_modify_yaml_then_import/bogusnode.stanza ]]; then cat /tmp/export_single_node_then_modify_yaml_then_import/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_single_node_then_modify_yaml_then_import/bogusgroup.stanza ]]; then cat /tmp/export_single_node_then_modify_yaml_then_import/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_single_node_then_modify_yaml_then_import check:rc==0 @@ -1806,21 +1804,21 @@ end start:export_single_node_then_modify_json_then_import description:This case is used to test xcat-inventory import a node , 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_single_node_then_modify_json_then_import check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/' check:rc==0 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_single_node_then_modify_json_then_import/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_single_node_then_modify_json_then_import/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode.stanza ;rmdef bogusnode;fi' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t node -o bogusnode groups=bogusgroup mgt=openbmc nodetype=mp addkcmdline=1111 arch=ppc64 authdomain=1111 bmc=1111 bmcpassword=1111 bmcusername=1111 bmcvlantag=1111 cfgmgr=1111 cfgmgtroles=1111 cfgserver=1111 chain=1111 chassis=1111 cmdmapping=1111 cons=1111 conserver=1111 consoleondemand=1111 consport=1111 cpucount=1111 cputype=1111 dhcpinterfaces=1111 disksize=1111 domainadminpassword=1111 domainadminuser=1111 domaintype=1111 getmac=1111 height=1111 hidden=1111 hostcluster=1111 hostinterface=1111 hostmanager=1111 hostnames=1111 hosttype=1111 hwtype=1111 installnic=1111 interface=1111 ip=10.10.10.10 iscsipassword=1111 iscsiserver=1111 iscsitarget=1111 iscsiuserid=1111 mac=42:d6:0a:03:05:08 memory=1111 migrationdest=1111 monserver=1111 mpa=1111 mtm=1111 nameservers=1111 netboot=grub2 nfsdir=1111 nfsserver=1111 nimserver=1111 node=1111 ondiscover=1111 osvolume=1111 otherinterfaces=1111 ou=1111 pdu=1111 postbootscripts=1111 postscripts=1111 power=1111 prescripts-begin=1111 prescripts-end=1111 primarynic=1111 primarysn=1111 productkey=1111 provmethod=1111 rack=1111 room=1111 routenames=1111 serial=1111 serialflow=1111 serialport=1111 serialspeed=1111 servicenode=1111 setupconserver=1 setupdhcp=1 setupftp=1111 setupipforward=1 setupldap=1 setupnameserver=1 setupnfs=1 setupnim=1111 setupntp=1 setupproxydhcp=1 setuptftp=1 sfp=1111 side=1111 slot=1111 storagcontroller=1111 storagetype=1111 supernode=1111 supportedarchs=1111 supportproxydhcp=1111 switch=1111 switchinterface=1111 switchport=1111 switchvlan=1111 syslog=1111 termport=1111 termserver=1111 tftpdir=1111 tftpserver=1111 unit=1111 usercomment=1111 vmbeacon=1111 vmbootorder=1111 vmcfgstore=1111 vmcluster=1111 vmmanager=1111 vmmaster=1111 vmnicnicmodel=1111 vmphyslots=1111 vmstorage=1111 vmstoragecache=1111 vmstorageformat=1111 vmstoragemodel=1111 vmtextconsole=1111 vmvirtflags=1111 vmvncport=1111 xcatmaster=1111 zonename=1111 nicaliases.eth0="moe larry curly" nicaliases.eth1="tom|jerry" niccustomscripts.eth0="configeth eth0" niccustomscripts.ib0="configib ib0" nicdevices.bond0="eth0|eth2" nicdevices.br0=bond0 nicextraparams.eth0="MTU=1500" nicextraparams.ib0="MTU=65520 CONNECTED_MODE=yes" nichostnameprefixes.eth0="eth0-" nichostnameprefixes.ib0="ib-" nichostnamesuffixes.eth0="-eth0" nichostnamesuffixes.ib0="-ib0" nicips.ib0=10.10.100.9 nicips.enP48p1s0f0=129.40.234.11 nicips.ib1=10.11.100.9 nicnetworks.enP5p1s0f1.4=xcat_bmc nicnetworks.enP48p1s0f1=xcat_util nicnetworks.ib0=IB00 nicnetworks.enP48p1s0f0=pub_yellow nicnetworks.ib3=IB03 nicnetworks.ib2=IB02 nicnetworks.enP5p1s0f1=xcat_compute nicnetworks.ib1=IB01 nicnetworks.enP5p1s0f1.5=xcat_infra nicnetworks.enP5p1s0f1.6=xcat_pdu nicsadapter.enP3p3s0f1="mac=98:be:94:59:fa:cd linkstate=DOWN" nicsadapter.enP3p3s0f2="mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face" nictypes.enP5p1s0f1.4=unused nictypes.enP48p1s0f1=unused nictypes.ib0=Infiniband nictypes.enP48p1s0f0=Ethernet nictypes.ib3=unused nictypes.ib2=unused nictypes.enP5p1s0f1=unused nictypes.ib1=Infiniband nictypes.enP5p1s0f1.5=unused nictypes.enP5p1s0f1.6=unused -cmd:lsdef bogusnode -z|sed 's/1111/2222/g'|sed 's/unused/used/g'|sed 's/10.10.100.9/20.10.200.9/g'|sort -t'=' -k1 |tee /tmp/export_single_node_then_modify_json_then_import/srcbogusnode.stanza +cmd:lsdef bogusnode -z|sed 's/1111/2222/g'|sed 's/unused/used/g'|sed 's/10.10.100.9/20.10.200.9/g'|sort -t"=" -k1 |tee /tmp/export_single_node_then_modify_json_then_import/srcbogusnode.stanza check:rc==0 cmd:sed -i 's/arch=ppc64/arch=ppc64le/g' /tmp/export_single_node_then_modify_json_then_import/srcbogusnode.stanza check:rc==0 @@ -1854,9 +1852,9 @@ cmd:scp /tmp/export_single_node_then_modify_json_then_import/bogusnode_json.inv check:rc==0 cmd:rmdef bogusnode check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode_json.inv -t node -o bogusnode' check:rc==0 -cmd: ssh $$DSTMN 'lsdef bogusnode -z |sort -t'=' -k1|tee /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/dstbogusnode.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef bogusnode -z |sort -t"=" -k1|tee /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/dstbogusnode.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_single_node_then_modify_json_then_import_$$DSTMN/dstbogusnode.stanza /tmp/export_single_node_then_modify_json_then_import/dstbogusnode.stanza check:rc==0 @@ -1864,36 +1862,36 @@ cmd: cat /tmp/export_single_node_then_modify_json_then_import/dstbogusnode.stanz check:rc==0 cmd:diff -y /tmp/export_single_node_then_modify_json_then_import/srcbogusnode.stanza /tmp/export_single_node_then_modify_json_then_import/dstbogusnode.stanza check:rc==0 -cmd:ssh $$DSTMN 'rmdef bogusnode' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef bogusnode' check:rc==0 cmd:if [[ -e /tmp/export_single_node_then_modify_json_then_import/bogusnode.stanza ]]; then cat /tmp/export_single_node_then_modify_json_then_import/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_single_node_then_modify_json_then_import/bogusgroup.stanza ]]; then cat /tmp/export_single_node_then_modify_json_then_import/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusgroup.stanza ]]; then cat /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_single_node_then_modify_json_then_import_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_single_node_then_modify_json_then_import check:rc==0 end start:export_import_single_group_json -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test xcat-inventory export and import the definition of group cmd:mkdir -p /tmp/export_import_single_group_json check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_group_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_group_json_$$DSTMN/' check:rc==0 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_single_group_json/bogusnode.stanza ;rmdef bogusnode$i;fi; done check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_group_json/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_single_group_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_single_group_json_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_group_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_group_json_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t group -o bogusgroup mgt=openbmc cons=openbmc netboot=petitboot ip='|\D+(\d+)|10.100.100.($1)|' bmcusername=root bmcpassword=0penBmc check:rc==0 @@ -1913,17 +1911,17 @@ cmd:rmdef -t node -o bogusnode[1-3] check:rc==0 cmd:rmdef -t group -o bogusgroup check:rc==0 -cmd:ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_group_json_$$DSTMN/export.file -t node -o bogusnode1,bogusnode2,bogusnode3,bogusgroup' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_group_json_$$DSTMN/export.file -t node -o bogusnode1,bogusnode2,bogusnode3,bogusgroup' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t node -o bogusnode[1-3] > /tmp/export_import_single_group_json_$$DSTMN/import_nodes_group' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t node -o bogusnode[1-3] > /tmp/export_import_single_group_json_$$DSTMN/import_nodes_group' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group -o bogusgroup >> /tmp/export_import_single_group_json_$$DSTMN/import_nodes_group' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group -o bogusgroup >> /tmp/export_import_single_group_json_$$DSTMN/import_nodes_group' check:rc==0 cmd:scp $$DSTMN:/tmp/export_import_single_group_json_$$DSTMN/import_nodes_group /tmp/export_import_single_group_json/import_nodes_group check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t node -o bogusnode[1-3]' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t node -o bogusnode[1-3]' check:rc==0 -cmd: ssh $$DSTMN 'rmdef -t group -o bogusgroup' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t group -o bogusgroup' check:rc==0 cmd:sed -e 's/members=.*$/members='"$(awk -F = '/members=/ { print $2 }' < /tmp/export_import_single_group_json/import_nodes_group | tr , ' ' | xargs -n 1 | sort -g | xargs -n 999 | tr ' ' ,)"'/' < /tmp/export_import_single_group_json/import_nodes_group > /tmp/export_import_single_group_json/import_nodes_group.1; cp -rf /tmp/export_import_single_group_json/import_nodes_group.1 /tmp/export_import_single_group_json/import_nodes_group check:rc==0 @@ -1933,30 +1931,30 @@ cmd:if [[ -e /tmp/export_import_single_group_json/bogusnode.stanza ]]; then cat check:rc==0 cmd:if [[ -e /tmp/export_import_single_group_json/bogusgroup.stanza ]];then cat /tmp/export_import_single_group_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_group_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_group_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_group_json_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_group_json_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_group_json_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_single_group_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_group_json_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_single_group_json_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_group_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_group_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_group_json check:rc==0 end start:export_import_single_group_yaml -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test xcat-inventory export and import the definition of group cmd:mkdir -p /tmp/export_import_single_group_yaml check:rc==0 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_group_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_group_yaml_$$DSTMN/' check:rc==0 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_single_group_yaml/bogusnode.stanza ;rmdef bogusnode$i;fi; done check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_group_yaml/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:ssh $$DSTMN 'for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_single_group_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/export_import_single_group_yaml_$$DSTMN/bogusnode.stanza ;rmdef bogusnode$i;fi; done' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_group_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/export_import_single_group_yaml_$$DSTMN/bogusgroup.stanza; rmdef -t group bogusgroup;fi' check:rc==0 cmd:mkdef -t group -o bogusgroup mgt=openbmc cons=openbmc netboot=petitboot ip='|\D+(\d+)|10.100.100.($1)|' bmcusername=root bmcpassword=0penBmc check:rc==0 @@ -1976,17 +1974,17 @@ cmd:rmdef -t node -o bogusnode[1-3] check:rc==0 cmd:rmdef -t group -o bogusgroup check:rc==0 -cmd:ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_group_yaml_$$DSTMN/export.file -t node -o bogusnode1,bogusnode2,bogusnode3,bogusgroup' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_group_yaml_$$DSTMN/export.file -t node -o bogusnode1,bogusnode2,bogusnode3,bogusgroup' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t node -o bogusnode[1-3] > /tmp/export_import_single_group_yaml_$$DSTMN/import_nodes_group' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t node -o bogusnode[1-3] > /tmp/export_import_single_group_yaml_$$DSTMN/import_nodes_group' check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t group -o bogusgroup >> /tmp/export_import_single_group_yaml_$$DSTMN/import_nodes_group' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t group -o bogusgroup >> /tmp/export_import_single_group_yaml_$$DSTMN/import_nodes_group' check:rc==0 cmd:scp $$DSTMN:/tmp/export_import_single_group_yaml_$$DSTMN/import_nodes_group /tmp/export_import_single_group_yaml/import_nodes_group check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t node -o bogusnode[1-3]' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t node -o bogusnode[1-3]' check:rc==0 -cmd: ssh $$DSTMN 'rmdef -t group -o bogusgroup' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t group -o bogusgroup' check:rc==0 cmd:sed -e 's/members=.*$/members='"$(awk -F = '/members=/ { print $2 }' < /tmp/export_import_single_group_yaml/import_nodes_group | tr , ' ' | xargs -n 1 | sort -g | xargs -n 999 | tr ' ' ,)"'/' < /tmp/export_import_single_group_yaml/import_nodes_group > /tmp/export_import_single_group_yaml/import_nodes_group.1; cp -rf /tmp/export_import_single_group_yaml/import_nodes_group.1 /tmp/export_import_single_group_yaml/import_nodes_group check:rc==0 @@ -1996,18 +1994,18 @@ cmd:if [[ -e /tmp/export_import_single_group_yaml/bogusnode.stanza ]]; then cat check:rc==0 cmd:if [[ -e /tmp/export_import_single_group_yaml/bogusgroup.stanza ]];then cat /tmp/export_import_single_group_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_group_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_group_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_group_yaml_$$DSTMN/bogusnode.stanza ]]; then cat /tmp/export_import_single_group_yaml_$$DSTMN/bogusnode.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_group_yaml_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_single_group_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_group_yaml_$$DSTMN/bogusgroup.stanza ]];then cat /tmp/export_import_single_group_yaml_$$DSTMN/bogusgroup.stanza |mkdef -z -f;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_group_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_group_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_group_yaml check:rc==0 end start:import_validation_node_obj_type -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "obj_type" attribute cmd:mkdir -p /tmp/import_validation_node_obj_type_bak check:rc==0 @@ -2015,14 +2013,14 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_obj_type_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "obj_type" "" "import_validation_node_obj_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "obj_type" "" "import_validation_node_obj_type" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "obj_type" "aaa" "import_validation_node_obj_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "obj_type" "aaa" "import_validation_node_obj_type" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "obj_type" "node" "import_validation_node_obj_type" -check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "obj_type" "group" "import_validation_node_obj_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "obj_type" "node" "import_validation_node_obj_type" check:rc==0 +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "obj_type" "group" "import_validation_node_obj_type" +check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_obj_type_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_obj_type_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/import_validation_node_obj_type_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_obj_type_bak/bogusgroup.stanza |mkdef -z -f;fi @@ -2032,7 +2030,7 @@ check:rc==0 end start:import_validation_node_obj_info_groups -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "obj_info.groups" attribute cmd:mkdir -p /tmp/import_validation_node_obj_info_groups_bak check:rc==0 @@ -2040,9 +2038,9 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_obj_info_groups_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "obj_info.groups" "" "import_validation_node_obj_info_groups" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "obj_info.groups" "" "import_validation_node_obj_info_groups" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "obj_info.groups" "aaa" "import_validation_node_obj_info_groups" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "obj_info.groups" "aaa" "import_validation_node_obj_info_groups" check:rc==0 cmd:if [[ -e /tmp/import_validation_node_obj_info_groups_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_obj_info_groups_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2053,7 +2051,7 @@ check:rc==0 end start:import_validation_node_device_type -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "device_type" attribute cmd:mkdir -p /tmp/import_validation_node_device_type_bak check:rc==0 @@ -2061,19 +2059,19 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_device_type_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_type" "" "import_validation_node_device_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_type" "" "import_validation_node_device_type" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_type" "aaa" "import_validation_node_device_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_type" "aaa" "import_validation_node_device_type" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_type" "switch" "import_validation_node_device_type" -check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_type" "pdu" "import_validation_node_device_type" -check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_type" "rack" "import_validation_node_device_type" -check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_type" "hmc" "import_validation_node_device_type" -check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_type" "server" "import_validation_node_device_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_type" "switch" "import_validation_node_device_type" +check:rc!=0 +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_type" "pdu" "import_validation_node_device_type" +check:rc!=0 +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_type" "rack" "import_validation_node_device_type" +check:rc!=0 +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_type" "hmc" "import_validation_node_device_type" +check:rc!=0 +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_type" "server" "import_validation_node_device_type" check:rc==0 cmd:if [[ -e /tmp/import_validation_node_device_type_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_device_type_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2084,7 +2082,7 @@ check:rc==0 end start:import_validation_node_device_info_arch -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "device_info.arch" attribute cmd:mkdir -p /tmp/import_validation_node_device_info_arch_bak check:rc==0 @@ -2092,19 +2090,19 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_device_info_arch_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_info.arch" "" "import_validation_node_device_info_arch" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_info.arch" "" "import_validation_node_device_info_arch" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_info.arch" "aaa" "import_validation_node_device_info_arch" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_info.arch" "aaa" "import_validation_node_device_info_arch" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_info.arch" "ppc64" "import_validation_node_device_info_arch" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_info.arch" "ppc64" "import_validation_node_device_info_arch" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_info.arch" "ppc64el" "import_validation_node_device_info_arch" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_info.arch" "ppc64el" "import_validation_node_device_info_arch" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_info.arch" "ppc64le" "import_validation_node_device_info_arch" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_info.arch" "ppc64le" "import_validation_node_device_info_arch" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_info.arch" "x86_64" "import_validation_node_device_info_arch" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_info.arch" "x86_64" "import_validation_node_device_info_arch" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "device_info.arch" "armv7l" "import_validation_node_device_info_arch" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "device_info.arch" "armv7l" "import_validation_node_device_info_arch" check:rc==0 cmd:if [[ -e /tmp/import_validation_node_device_info_arch_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_device_info_arch_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2115,7 +2113,7 @@ check:rc==0 end start:import_validation_node_security_info_snmp_securitylevel -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "security_info.snmp.securitylevel" attribute cmd:mkdir -p /tmp/import_validation_node_security_info_snmp_securitylevel_bak check:rc==0 @@ -2123,17 +2121,17 @@ cmd:lsdef boguspdu > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef boguspdu -z >/ check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_security_info_snmp_securitylevel_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.securitylevel" "" "/tmp/import_validation_node_security_info_snmp_securitylevel" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.securitylevel" "" "/tmp/import_validation_node_security_info_snmp_securitylevel" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.securitylevel" "noAuthNoPriv" "/tmp/import_validation_node_security_info_snmp_securitylevel" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.securitylevel" "noAuthNoPriv" "/tmp/import_validation_node_security_info_snmp_securitylevel" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.securitylevel" "authNoPriv" "/tmp/import_validation_node_security_info_snmp_securitylevel" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.securitylevel" "authNoPriv" "/tmp/import_validation_node_security_info_snmp_securitylevel" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.securitylevel" "authPriv" "/tmp/import_validation_node_security_info_snmp_securitylevel" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.securitylevel" "authPriv" "/tmp/import_validation_node_security_info_snmp_securitylevel" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.securitylevel" "aaaaa" "/tmp/import_validation_node_security_info_snmp_securitylevel" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.securitylevel" "aaaaa" "/tmp/import_validation_node_security_info_snmp_securitylevel" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.securitylevel" "noauthnopriv" "/tmp/import_validation_node_security_info_snmp_securitylevel" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.securitylevel" "noauthnopriv" "/tmp/import_validation_node_security_info_snmp_securitylevel" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_security_info_snmp_securitylevel_bak/boguspdu.stanza ]]; then cat /tmp/import_validation_node_security_info_snmp_securitylevel_bak/boguspdu.stanza | mkdef -z;fi check:rc==0 @@ -2144,7 +2142,7 @@ check:rc==0 end start:import_validation_node_security_info_snmp_authprotocol -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "security_info.snmp.authprotocol" attribute cmd:mkdir -p /tmp/import_validation_node_security_info_snmp_authprotocol_bak check:rc==0 @@ -2152,19 +2150,19 @@ cmd:lsdef boguspdu > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef boguspdu -z >/ check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_security_info_snmp_authprotocol_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "" "/tmp/import_validation_node_security_info_snmp_authprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "" "/tmp/import_validation_node_security_info_snmp_authprotocol" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "MD5" "/tmp/import_validation_node_security_info_snmp_authprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "MD5" "/tmp/import_validation_node_security_info_snmp_authprotocol" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "SHA" "/tmp/import_validation_node_security_info_snmp_authprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "SHA" "/tmp/import_validation_node_security_info_snmp_authprotocol" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "aaaa" "/tmp/import_validation_node_security_info_snmp_authprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "aaaa" "/tmp/import_validation_node_security_info_snmp_authprotocol" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "md5" "/tmp/import_validation_node_security_info_snmp_authprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "md5" "/tmp/import_validation_node_security_info_snmp_authprotocol" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "sha" "/tmp/import_validation_node_security_info_snmp_authprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "sha" "/tmp/import_validation_node_security_info_snmp_authprotocol" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "SHA256" "/tmp/import_validation_node_security_info_snmp_authprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "boguspdu" "security_info.snmp.authprotocol" "SHA256" "/tmp/import_validation_node_security_info_snmp_authprotocol" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_security_info_snmp_authprotocol_bak/boguspdu.stanza ]]; then cat /tmp/import_validation_node_security_info_snmp_authprotocol_bak/boguspdu.stanza | mkdef -z;fi check:rc==0 @@ -2176,7 +2174,7 @@ end start:import_validation_node_security_info_snmp_privacyprotocol -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "security_info.snmp.privacyprotocol" attribute cmd:mkdir -p /tmp/import_validation_node_security_info_snmp_privacyprotocol_bak check:rc==0 @@ -2184,17 +2182,17 @@ cmd:lsdef bogusswitch > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusswitch check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_security_info_snmp_privacyprotocol_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusswitch" "security_info.snmp.privacyprotocol" "AES" "/tmp/import_validation_node_security_info_snmp_privacyprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusswitch" "security_info.snmp.privacyprotocol" "AES" "/tmp/import_validation_node_security_info_snmp_privacyprotocol" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusswitch" "security_info.snmp.privacyprotocol" "DES" "/tmp/import_validation_node_security_info_snmp_privacyprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusswitch" "security_info.snmp.privacyprotocol" "DES" "/tmp/import_validation_node_security_info_snmp_privacyprotocol" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusswitch" "security_info.snmp.privacyprotocol" "authNoPriv" "/tmp/import_validation_node_security_info_snmp_privacyprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusswitch" "security_info.snmp.privacyprotocol" "authNoPriv" "/tmp/import_validation_node_security_info_snmp_privacyprotocol" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusswitch" "security_info.snmp.privacyprotocol" "" "/tmp/import_validation_node_security_info_snmp_privacyprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusswitch" "security_info.snmp.privacyprotocol" "" "/tmp/import_validation_node_security_info_snmp_privacyprotocol" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusswitch" "security_info.snmp.privacyprotocol" "authnopriv" "/tmp/import_validation_node_security_info_snmp_privacyprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusswitch" "security_info.snmp.privacyprotocol" "authnopriv" "/tmp/import_validation_node_security_info_snmp_privacyprotocol" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusswitch" "security_info.snmp.privacyprotocol" "aaaa" "/tmp/import_validation_node_security_info_snmp_privacyprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusswitch" "security_info.snmp.privacyprotocol" "aaaa" "/tmp/import_validation_node_security_info_snmp_privacyprotocol" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_security_info_snmp_privacyprotocol_bak/bogusswitch.stanza ]]; then cat /tmp/import_validation_node_security_info_snmp_privacyprotocol_bak/bogusswitch.stanza | mkdef -z;fi check:rc==0 @@ -2206,7 +2204,7 @@ end start:import_validation_node_security_info_remotecontrol_remoteprotocol -label:others,xcat_inventory +label:others,inventory_ci descrremoteprotocoltion:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "security_info.remotecontrol.remoteprotocol" attribute cmd:mkdir -p /tmp/import_validation_node_security_info_remotecontrol_remoteprotocol_bak check:rc==0 @@ -2214,15 +2212,15 @@ cmd:lsdef bogusswitch > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusswitch check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_security_info_remotecontrol_remoteprotocol_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusswitch" "security_info.remotecontrol.remoteprotocol" "telnet" "/tmp/import_validation_node_security_info_remotecontrol_remoteprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusswitch" "security_info.remotecontrol.remoteprotocol" "telnet" "/tmp/import_validation_node_security_info_remotecontrol_remoteprotocol" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusswitch" "security_info.remotecontrol.remoteprotocol" "ssh" "/tmp/import_validation_node_security_info_remotecontrol_remoteprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusswitch" "security_info.remotecontrol.remoteprotocol" "ssh" "/tmp/import_validation_node_security_info_remotecontrol_remoteprotocol" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusswitch" "security_info.remotecontrol.remoteprotocol" "" "/tmp/import_validation_node_security_info_remotecontrol_remoteprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusswitch" "security_info.remotecontrol.remoteprotocol" "" "/tmp/import_validation_node_security_info_remotecontrol_remoteprotocol" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusswitch" "security_info.remotecontrol.remoteprotocol" "SSH" "/tmp/import_validation_node_security_info_remotecontrol_remoteprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusswitch" "security_info.remotecontrol.remoteprotocol" "SSH" "/tmp/import_validation_node_security_info_remotecontrol_remoteprotocol" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusswitch" "security_info.remotecontrol.remoteprotocol" "aaa" "/tmp/import_validation_node_security_info_remotecontrol_remoteprotocol" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusswitch" "security_info.remotecontrol.remoteprotocol" "aaa" "/tmp/import_validation_node_security_info_remotecontrol_remoteprotocol" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_security_info_remotecontrol_remoteprotocol_bak/bogusswitch.stanza ]]; then cat /tmp/import_validation_node_security_info_remotecontrol_remoteprotocol_bak/bogusswitch.stanza | mkdef -z;fi check:rc==0 @@ -2233,7 +2231,7 @@ check:rc==0 end start:import_validation_node_network_info_primarynic_ip -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "network_info.primarynic.ip" attribute cmd:mkdir -p /tmp/import_validation_node_network_info_primarynic_ip_bak check:rc==0 @@ -2241,15 +2239,15 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_network_info_primarynic_ip_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.primarynic.ip" "" "/tmp/import_validation_node_network_info_primarynic_ip" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.primarynic.ip" "" "/tmp/import_validation_node_network_info_primarynic_ip" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.primarynic.ip" "100.100.100.100" "/tmp/import_validation_node_network_info_primarynic_ip" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.primarynic.ip" "100.100.100.100" "/tmp/import_validation_node_network_info_primarynic_ip" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.primarynic.ip" "100.100.100.a" "/tmp/import_validation_node_network_info_primarynic_ip" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.primarynic.ip" "100.100.100.a" "/tmp/import_validation_node_network_info_primarynic_ip" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.primarynic.ip" "100.100" "/tmp/import_validation_node_network_info_primarynic_ip" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.primarynic.ip" "100.100" "/tmp/import_validation_node_network_info_primarynic_ip" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.primarynic.ip" "fe80::40d6:aff:fe03:508" "/tmp/import_validation_node_network_info_primarynic_ip" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.primarynic.ip" "fe80::40d6:aff:fe03:508" "/tmp/import_validation_node_network_info_primarynic_ip" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_network_info_primarynic_ip_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_network_info_primarynic_ip_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2260,7 +2258,7 @@ check:rc==0 end start:import_validation_node_network_info_primarynic_mac -label:others,xcat_inventory +label:others,inventory_ci descrmaction:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "network_info.primarynic.mac" attribute cmd:mkdir -p /tmp/import_validation_node_network_info_primarynic_mac_bak check:rc==0 @@ -2268,13 +2266,13 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_network_info_primarynic_mac_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.primarynic.mac" "" "/tmp/import_validation_node_network_info_primarynic_mac" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.primarynic.mac" "" "/tmp/import_validation_node_network_info_primarynic_mac" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.primarynic.mac" "42:d6:0a:03:05:08" "/tmp/import_validation_node_network_info_primarynic_mac" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.primarynic.mac" "42:d6:0a:03:05:08" "/tmp/import_validation_node_network_info_primarynic_mac" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.primarynic.mac" "42:6:a:03:05:08" "/tmp/import_validation_node_network_info_primarynic_mac" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.primarynic.mac" "42:6:a:03:05:08" "/tmp/import_validation_node_network_info_primarynic_mac" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.primarynic.mac" "42:d6:0a:03:05:08:05:08" "/tmp/import_validation_node_network_info_primarynic_mac" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.primarynic.mac" "42:d6:0a:03:05:08:05:08" "/tmp/import_validation_node_network_info_primarynic_mac" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_network_info_primarynic_mac_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_network_info_primarynic_mac_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2285,7 +2283,7 @@ check:rc==0 end start:import_validation_node_nics_network_info_nics_ips -label:others,xcat_inventory +label:others,inventory_ci descrnics_network_info_nics_ipstion:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "network_info.nics.ips" attribute cmd:mkdir -p /tmp/import_validation_node_nics_network_info_nics_ips_bak check:rc==0 @@ -2293,15 +2291,15 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_nics_network_info_nics_ips_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.nics.eth0.ips" "" "/tmp/import_validation_node_nics_network_info_nics_ips" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.nics.eth0.ips" "" "/tmp/import_validation_node_nics_network_info_nics_ips" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.nics.eth0.ips" "['192.168.30.101','192.168.30.102']" "/tmp/import_validation_node_nics_network_info_nics_ips" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.nics.eth0.ips" "['192.168.30.101','192.168.30.102']" "/tmp/import_validation_node_nics_network_info_nics_ips" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.nics.eth0.ips" "|\D+(\d+)|30.0.0.($1%100)|" "/tmp/import_validation_node_nics_network_info_nics_ips" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.nics.eth0.ips" "|\D+(\d+)|30.0.0.($1%100)|" "/tmp/import_validation_node_nics_network_info_nics_ips" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.nics.eth0.ips" "10.10" "/tmp/import_validation_node_nics_network_info_nics_ips" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.nics.eth0.ips" "10.10" "/tmp/import_validation_node_nics_network_info_nics_ips" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.nics.eth0.ips" "aa" "/tmp/import_validation_node_nics_network_info_nics_ips" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.nics.eth0.ips" "aa" "/tmp/import_validation_node_nics_network_info_nics_ips" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_nics_network_info_nics_ips_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_nics_network_info_nics_ips_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2312,32 +2310,32 @@ check:rc==0 end -start:import_validation_node_network_info_primarynic_switchport -label:others,xcat_inventory -descrswitchporttion:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "network_info.primarynic.switchport" attribute -cmd:mkdir -p /tmp/import_validation_node_network_info_primarynic_switchport_bak +start:import_validation_node_network_info_connections_switchport +label:others,inventory_ci +descrswitchporttion:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "network_info.connections.switchport" attribute +cmd:mkdir -p /tmp/import_validation_node_network_info_connections_switchport_bak check:rc==0 -cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_network_info_primarynic_switchport_bak/bogusnode.stanza ;rmdef bogusnode;fi +cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_network_info_connections_switchport_bak/bogusnode.stanza ;rmdef bogusnode;fi check:rc==0 -cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_network_info_primarynic_switchport_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi +cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_network_info_connections_switchport_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.primarynic.switchport" "" "/tmp/import_validation_node_network_info_primarynic_switchport" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.connections.switchport" "" "/tmp/import_validation_node_network_info_connections_switchport" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.primarynic.switchport" "70" "/tmp/import_validation_node_network_info_primarynic_switchport" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.connections.switchport" "70" "/tmp/import_validation_node_network_info_connections_switchport" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "network_info.primarynic.switchport" "a90" "/tmp/import_validation_node_network_info_primarynic_switchport" -check:rc!=0 -cmd:if [[ -e /tmp/import_validation_node_network_info_primarynic_switchport_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_network_info_primarynic_switchport_bak/bogusnode.stanza | mkdef -z;fi +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "network_info.connections.switchport" "a90" "/tmp/import_validation_node_network_info_connections_switchport" check:rc==0 -cmd:if [[ -e /tmp/import_validation_node_network_info_primarynic_switchport_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_network_info_primarynic_switchport_bak/bogusgroup.stanza |mkdef -z -f;fi +cmd:if [[ -e /tmp/import_validation_node_network_info_connections_switchport_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_network_info_connections_switchport_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 -cmd:rm -rf /tmp/import_validation_node_network_info_primarynic_switchport_bak +cmd:if [[ -e /tmp/import_validation_node_network_info_connections_switchport_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_network_info_connections_switchport_bak/bogusgroup.stanza |mkdef -z -f;fi +check:rc==0 +cmd:rm -rf /tmp/import_validation_node_network_info_connections_switchport_bak check:rc==0 end start:import_validation_node_engines_hardware_mgt_engine_engine_type -label:others,xcat_inventory +label:others,inventory_ci descrengine_typetion:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "engines.hardware_mgt_engine.engine_type" attribute cmd:mkdir -p /tmp/import_validation_node_engines_hardware_mgt_engine_engine_type_bak check:rc==0 @@ -2345,31 +2343,31 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_engines_hardware_mgt_engine_engine_type_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "openbmc" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "openbmc" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "ipmi" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "ipmi" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "hmc" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "hmc" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "fsp" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "fsp" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "kvm" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "kvm" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "mp" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "mp" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "bpa" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "bpa" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "ivm" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "ivm" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "blade" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "blade" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "HMC" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "HMC" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "OpenBMC" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "OpenBMC" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "aaa" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.hardware_mgt_engine.engine_type" "aaa" "/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_engines_hardware_mgt_engine_engine_type_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_engines_hardware_mgt_engine_engine_type_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2382,7 +2380,7 @@ end start:import_validation_node_engines_netboot_engine_engine_type -label:others,xcat_inventory +label:others,inventory_ci descrengine_typetion:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "engines.netboot_engine.engine_type" attribute cmd:mkdir -p /tmp/import_validation_node_engines_netboot_engine_engine_type_bak check:rc==0 @@ -2390,21 +2388,21 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_engines_netboot_engine_engine_type_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "" "/tmp/import_validation_node_engines_netboot_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "" "/tmp/import_validation_node_engines_netboot_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "pxe" "/tmp/import_validation_node_engines_netboot_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "pxe" "/tmp/import_validation_node_engines_netboot_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "xnba" "/tmp/import_validation_node_engines_netboot_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "xnba" "/tmp/import_validation_node_engines_netboot_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "grub2" "/tmp/import_validation_node_engines_netboot_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "grub2" "/tmp/import_validation_node_engines_netboot_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "yaboot" "/tmp/import_validation_node_engines_netboot_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "yaboot" "/tmp/import_validation_node_engines_netboot_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "petitboot" "/tmp/import_validation_node_engines_netboot_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "petitboot" "/tmp/import_validation_node_engines_netboot_engine_engine_type" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "Grub2" "/tmp/import_validation_node_engines_netboot_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "Grub2" "/tmp/import_validation_node_engines_netboot_engine_engine_type" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "aaa" "/tmp/import_validation_node_engines_netboot_engine_engine_type" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "engines.netboot_engine.engine_type" "aaa" "/tmp/import_validation_node_engines_netboot_engine_engine_type" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_engines_netboot_engine_engine_type_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_engines_netboot_engine_engine_type_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2416,7 +2414,7 @@ end start:import_validation_node_role -label:others,xcat_inventory +label:others,inventory_ci descrroletion:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "role" attribute cmd:mkdir -p /tmp/import_validation_node_role_bak check:rc==0 @@ -2424,15 +2422,15 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_role_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role" "compute" "/tmp/import_validation_node_role" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role" "compute" "/tmp/import_validation_node_role" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role" "service" "/tmp/import_validation_node_role" -check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role" "" "/tmp/import_validation_node_role" +#cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role" "service" "/tmp/import_validation_node_role" +#check:rc!=0 +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role" "" "/tmp/import_validation_node_role" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role" "Compute" "/tmp/import_validation_node_role" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role" "Compute" "/tmp/import_validation_node_role" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role" "aa" "/tmp/import_validation_node_role" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role" "aa" "/tmp/import_validation_node_role" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_role_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_role_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2443,7 +2441,7 @@ check:rc==0 end start:import_validation_node_role_info_setuptftp -label:others,xcat_inventory +label:others,inventory_ci descrsetuptftption:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "role_info.setuptftp" attribute cmd:mkdir -p /tmp/import_validation_node_role_info_setuptftp_bak check:rc==0 @@ -2451,15 +2449,15 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_role_info_setuptftp_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setuptftp" "" "/tmp/import_validation_node_role_info_setuptftp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setuptftp" "" "/tmp/import_validation_node_role_info_setuptftp" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setuptftp" "0" "/tmp/import_validation_node_role_info_setuptftp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setuptftp" "0" "/tmp/import_validation_node_role_info_setuptftp" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setuptftp" "1" "/tmp/import_validation_node_role_info_setuptftp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setuptftp" "1" "/tmp/import_validation_node_role_info_setuptftp" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setuptftp" "aa" "/tmp/import_validation_node_role_info_setuptftp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setuptftp" "aa" "/tmp/import_validation_node_role_info_setuptftp" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setuptftp" "10" "/tmp/import_validation_node_role_info_setuptftp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setuptftp" "10" "/tmp/import_validation_node_role_info_setuptftp" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_role_info_setuptftp_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_role_info_setuptftp_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2470,7 +2468,7 @@ check:rc==0 end start:import_validation_node_role_info_setupnameserver -label:others,xcat_inventory +label:others,inventory_ci descrsetupnameservertion:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "role_info.setupnameserver" attribute cmd:mkdir -p /tmp/import_validation_node_role_info_setupnameserver_bak check:rc==0 @@ -2478,17 +2476,17 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_role_info_setupnameserver_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupnameserver" "" "/tmp/import_validation_node_role_info_setupnameserver" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupnameserver" "" "/tmp/import_validation_node_role_info_setupnameserver" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupnameserver" "0" "/tmp/import_validation_node_role_info_setupnameserver" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupnameserver" "0" "/tmp/import_validation_node_role_info_setupnameserver" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupnameserver" "1" "/tmp/import_validation_node_role_info_setupnameserver" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupnameserver" "1" "/tmp/import_validation_node_role_info_setupnameserver" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupnameserver" "2" "/tmp/import_validation_node_role_info_setupnameserver" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupnameserver" "2" "/tmp/import_validation_node_role_info_setupnameserver" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupnameserver" "3" "/tmp/import_validation_node_role_info_setupnameserver" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupnameserver" "3" "/tmp/import_validation_node_role_info_setupnameserver" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupnameserver" "a" "/tmp/import_validation_node_role_info_setupnameserver" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupnameserver" "a" "/tmp/import_validation_node_role_info_setupnameserver" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_role_info_setupnameserver_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_role_info_setupnameserver_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2499,7 +2497,7 @@ end start:import_validation_node_role_info_setupdhcp -label:others,xcat_inventory +label:others,inventory_ci descrsetupdhcption:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "role_info.setupdhcp" attribute cmd:mkdir -p /tmp/import_validation_node_role_info_setupdhcp_bak check:rc==0 @@ -2507,15 +2505,15 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_role_info_setupdhcp_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupdhcp" "" "/tmp/import_validation_node_role_info_setupdhcp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupdhcp" "" "/tmp/import_validation_node_role_info_setupdhcp" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupdhcp" "0" "/tmp/import_validation_node_role_info_setupdhcp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupdhcp" "0" "/tmp/import_validation_node_role_info_setupdhcp" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupdhcp" "1" "/tmp/import_validation_node_role_info_setupdhcp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupdhcp" "1" "/tmp/import_validation_node_role_info_setupdhcp" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupdhcp" "2" "/tmp/import_validation_node_role_info_setupdhcp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupdhcp" "2" "/tmp/import_validation_node_role_info_setupdhcp" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupdhcp" "a" "/tmp/import_validation_node_role_info_setupdhcp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupdhcp" "a" "/tmp/import_validation_node_role_info_setupdhcp" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_role_info_setupdhcp_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_role_info_setupdhcp_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2525,7 +2523,7 @@ cmd:rm -rf /tmp/import_validation_node_role_info_setupdhcp_bak end start:import_validation_node_role_info_setupntp -label:others,xcat_inventory +label:others,inventory_ci descrsetupntption:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "role_info.setupntp" attribute cmd:mkdir -p /tmp/import_validation_node_role_info_setupntp_bak check:rc==0 @@ -2533,15 +2531,15 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_role_info_setupntp_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupntp" "" "/tmp/import_validation_node_role_info_setupntp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupntp" "" "/tmp/import_validation_node_role_info_setupntp" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupntp" "0" "/tmp/import_validation_node_role_info_setupntp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupntp" "0" "/tmp/import_validation_node_role_info_setupntp" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupntp" "1" "/tmp/import_validation_node_role_info_setupntp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupntp" "1" "/tmp/import_validation_node_role_info_setupntp" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupntp" "2" "/tmp/import_validation_node_role_info_setupntp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupntp" "2" "/tmp/import_validation_node_role_info_setupntp" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupntp" "a" "/tmp/import_validation_node_role_info_setupntp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupntp" "a" "/tmp/import_validation_node_role_info_setupntp" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_role_info_setupntp_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_role_info_setupntp_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2551,7 +2549,7 @@ cmd:rm -rf /tmp/import_validation_node_role_info_setupntp_bak end start:import_validation_node_role_info_setupldap -label:others,xcat_inventory +label:others,inventory_ci descrsetupldaption:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "role_info.setupldap" attribute cmd:mkdir -p /tmp/import_validation_node_role_info_setupldap_bak check:rc==0 @@ -2559,15 +2557,15 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_role_info_setupldap_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupldap" "" "/tmp/import_validation_node_role_info_setupldap" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupldap" "" "/tmp/import_validation_node_role_info_setupldap" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupldap" "0" "/tmp/import_validation_node_role_info_setupldap" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupldap" "0" "/tmp/import_validation_node_role_info_setupldap" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupldap" "1" "/tmp/import_validation_node_role_info_setupldap" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupldap" "1" "/tmp/import_validation_node_role_info_setupldap" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupldap" "2" "/tmp/import_validation_node_role_info_setupldap" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupldap" "2" "/tmp/import_validation_node_role_info_setupldap" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupldap" "a" "/tmp/import_validation_node_role_info_setupldap" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupldap" "a" "/tmp/import_validation_node_role_info_setupldap" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_role_info_setupldap_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_role_info_setupldap_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2577,7 +2575,7 @@ cmd:rm -rf /tmp/import_validation_node_role_info_setupldap_bak end start:import_validation_node_role_info_setupproxydhcp -label:others,xcat_inventory +label:others,inventory_ci descrsetupproxydhcption:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "role_info.setupproxydhcp" attribute cmd:mkdir -p /tmp/import_validation_node_role_info_setupproxydhcp_bak check:rc==0 @@ -2585,15 +2583,15 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_role_info_setupproxydhcp_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupproxydhcp" "" "/tmp/import_validation_node_role_info_setupproxydhcp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupproxydhcp" "" "/tmp/import_validation_node_role_info_setupproxydhcp" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupproxydhcp" "0" "/tmp/import_validation_node_role_info_setupproxydhcp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupproxydhcp" "0" "/tmp/import_validation_node_role_info_setupproxydhcp" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupproxydhcp" "1" "/tmp/import_validation_node_role_info_setupproxydhcp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupproxydhcp" "1" "/tmp/import_validation_node_role_info_setupproxydhcp" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupproxydhcp" "2" "/tmp/import_validation_node_role_info_setupproxydhcp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupproxydhcp" "2" "/tmp/import_validation_node_role_info_setupproxydhcp" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupproxydhcp" "a" "/tmp/import_validation_node_role_info_setupproxydhcp" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupproxydhcp" "a" "/tmp/import_validation_node_role_info_setupproxydhcp" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_role_info_setupproxydhcp_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_role_info_setupproxydhcp_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2603,7 +2601,7 @@ cmd:rm -rf /tmp/import_validation_node_role_info_setupproxydhcp_bak end start:import_validation_node_role_info_setupipforward -label:others,xcat_inventory +label:others,inventory_ci descrsetupipforwardtion:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "role_info.setupipforward" attribute cmd:mkdir -p /tmp/import_validation_node_role_info_setupipforward_bak check:rc==0 @@ -2611,15 +2609,15 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_role_info_setupipforward_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupipforward" "" "/tmp/import_validation_node_role_info_setupipforward" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupipforward" "" "/tmp/import_validation_node_role_info_setupipforward" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupipforward" "0" "/tmp/import_validation_node_role_info_setupipforward" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupipforward" "0" "/tmp/import_validation_node_role_info_setupipforward" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupipforward" "1" "/tmp/import_validation_node_role_info_setupipforward" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupipforward" "1" "/tmp/import_validation_node_role_info_setupipforward" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupipforward" "2" "/tmp/import_validation_node_role_info_setupipforward" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupipforward" "2" "/tmp/import_validation_node_role_info_setupipforward" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupipforward" "a" "/tmp/import_validation_node_role_info_setupipforward" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupipforward" "a" "/tmp/import_validation_node_role_info_setupipforward" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_role_info_setupipforward_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_role_info_setupipforward_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2629,7 +2627,7 @@ cmd:rm -rf /tmp/import_validation_node_role_info_setupipforward_bak end start:import_validation_node_role_info_setupconserver -label:others,xcat_inventory +label:others,inventory_ci descrsetupnfstion:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "role_info.setupconserver" attribute cmd:mkdir -p /tmp/import_validation_node_role_info_setupconserver_bak check:rc==0 @@ -2637,17 +2635,17 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_role_info_setupconserver_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupconserver" "" "/tmp/import_validation_node_role_info_setupconserver" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupconserver" "" "/tmp/import_validation_node_role_info_setupconserver" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupconserver" "0" "/tmp/import_validation_node_role_info_setupconserver" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupconserver" "0" "/tmp/import_validation_node_role_info_setupconserver" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupconserver" "1" "/tmp/import_validation_node_role_info_setupconserver" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupconserver" "1" "/tmp/import_validation_node_role_info_setupconserver" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupconserver" "2" "/tmp/import_validation_node_role_info_setupconserver" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupconserver" "2" "/tmp/import_validation_node_role_info_setupconserver" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupconserver" "3" "/tmp/import_validation_node_role_info_setupconserver" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupconserver" "3" "/tmp/import_validation_node_role_info_setupconserver" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupconserver" "a" "/tmp/import_validation_node_role_info_setupconserver" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupconserver" "a" "/tmp/import_validation_node_role_info_setupconserver" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_role_info_setupconserver_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_role_info_setupconserver_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 @@ -2659,7 +2657,7 @@ end start:import_validation_node_role_info_setupnfs -label:others,xcat_inventory +label:others,inventory_ci descrsetupconservertion:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "role_info.setupnfs" attribute cmd:mkdir -p /tmp/import_validation_node_role_info_setupnfs_bak check:rc==0 @@ -2667,15 +2665,15 @@ cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z check:rc==0 cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t group bogusgroup -z > /tmp/import_validation_node_role_info_setupnfs_bak/bogusgroup.stanza; rmdef -t group bogusgroup;fi check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupnfs" "" "/tmp/import_validation_node_role_info_setupnfs" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupnfs" "" "/tmp/import_validation_node_role_info_setupnfs" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupnfs" "0" "/tmp/import_validation_node_role_info_setupnfs" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupnfs" "0" "/tmp/import_validation_node_role_info_setupnfs" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupnfs" "1" "/tmp/import_validation_node_role_info_setupnfs" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupnfs" "1" "/tmp/import_validation_node_role_info_setupnfs" check:rc==0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupnfs" "2" "/tmp/import_validation_node_role_info_setupnfs" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupnfs" "2" "/tmp/import_validation_node_role_info_setupnfs" check:rc!=0 -cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat-inventory/validatehelper "node" "bogusnode" "role_info.setupnfs" "a" "/tmp/import_validation_node_role_info_setupnfs" +cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role_info.setupnfs" "a" "/tmp/import_validation_node_role_info_setupnfs" check:rc!=0 cmd:if [[ -e /tmp/import_validation_node_role_info_setupnfs_bak/bogusnode.stanza ]]; then cat /tmp/import_validation_node_role_info_setupnfs_bak/bogusnode.stanza | mkdef -z;fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage b/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage similarity index 91% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.osimage rename to xCAT-test/autotest/testcase/xcat_inventory/cases.osimage index 953649020..84347595a 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage @@ -1,14 +1,14 @@ 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= 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 'mkdir -p /tmp/export_import_single_osimage_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_osimage_by_yaml_$$DSTMN/' check:rc==0 cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_yaml/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' check:rc==0 cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=compute provmethod=netboot rootfstype=nfs rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment check:rc==0 @@ -20,23 +20,23 @@ cmd:scp /tmp/export_import_single_osimage_by_yaml/bogus_image.yaml $$DSTMN:/tmp/ check:rc==0 cmd: rmdef -t osimage -o bogus_image check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.yaml -t osimage -o bogus_image' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.yaml -t osimage -o bogus_image' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_import_single_osimage_by_yaml_$$DSTMN/dst_bogus_image.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_import_single_osimage_by_yaml_$$DSTMN/dst_bogus_image.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_osimage_by_yaml_$$DSTMN/dst_bogus_image.stanza /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza check:rc==0 cmd: cat /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza check:rc==0 -cmd:diff -y /tmp/export_import_single_osimage_by_yaml/src_bogus_osimage.stanza /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza +cmd:diff -y /tmp/export_import_single_osimage_by_yaml/src_bogus_osimage.stanza /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza -I "environvar" check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t osimage -o bogus_image' check:rc==0 cmd:if [[ -e /tmp/export_import_single_osimage_by_yaml/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_yaml/bogus_image.stanza | mkdef -z;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_osimage_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_osimage_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_osimage_by_yaml check:rc==0 @@ -45,14 +45,14 @@ 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= 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 'mkdir -p /tmp/export_import_single_osimage_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_single_osimage_by_json_$$DSTMN/' check:rc==0 cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_json/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' check:rc==0 cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=compute provmethod=netboot rootfstype=nfs rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment check:rc==0 @@ -64,23 +64,23 @@ cmd:scp /tmp/export_import_single_osimage_by_json/bogus_image.json $$DSTMN:/tmp/ check:rc==0 cmd: rmdef -t osimage -o bogus_image check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.json -t osimage -o bogus_image' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.json -t osimage -o bogus_image' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_import_single_osimage_by_json_$$DSTMN/dst_bogus_image.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_import_single_osimage_by_json_$$DSTMN/dst_bogus_image.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_single_osimage_by_json_$$DSTMN/dst_bogus_image.stanza /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza check:rc==0 cmd: cat /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza check:rc==0 -cmd:diff -y /tmp/export_import_single_osimage_by_json/src_bogus_osimage.stanza /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza +cmd:diff -y /tmp/export_import_single_osimage_by_json/src_bogus_osimage.stanza /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza -I "environvar" check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t osimage -o bogus_image' check:rc==0 cmd:if [[ -e /tmp/export_import_single_osimage_by_json/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_json/bogus_image.stanza | mkdef -z;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_osimage_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_single_osimage_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_single_osimage_by_json check:rc==0 @@ -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 @@ -99,27 +99,27 @@ cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarge check:rc==0 cmd:xcat-inventory export -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc==0 -cmd:grep ' "osimage": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd:grep "osimage:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc==0 -cmd:grep '"bogus_image": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd:grep "bogus_image:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc==0 -cmd: grep '"node": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep -w "node:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 -cmd: grep '"obj_type": "node",' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep "obj_type: node" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 -cmd: grep '"policy": {'' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep "policy:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 -cmd: grep '"passwd": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep "passwd:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 -cmd: grep '"network": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep "network:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 -cmd: grep '"route": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep "route:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 -cmd: grep '"site": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +cmd: grep "site:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc!=0 cmd:lsdef -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db check:rc==0 -cmd: a=0;for i in `awk -F' ' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db`; do if grep -E "\"$i\": {" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file > /dev/null; then ((a++));fi; done; do=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db|wc -l);if [[ $do -eq $a ]]; then exit 0; else exit 1;fi +cmd: a=0;for i in `awk -F' ' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db`; do if grep -E "$i:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file > /dev/null; then ((a++));fi; done; do=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db|wc -l);if [[ $do -eq $a ]]; then exit 0; else exit 1;fi check:rc==0 cmd: rmdef -t osimage -o bogus_image 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 @@ -437,7 +437,7 @@ cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_all_type_is_osima check:rc==0 cmd:lsdef -t osimage -l|sort > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/import_osimage check:rc==0 -cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/target_osimage_sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/import_osimage +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/target_osimage_sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/import_osimage -I "environvar=OBJNAME=bogus_image" check:rc==0 cmd:lsdef -t node -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_nodes_db 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 @@ -768,7 +768,7 @@ cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_all_type_is_osima check:rc==0 cmd:lsdef -t osimage -l|sort > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/import_osimage check:rc==0 -cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/target_osimage_sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/import_osimage +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/target_osimage_sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/import_osimage -I "environvar=OBJNAME=bogus_image" check:rc==0 cmd:lsdef -t node -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_nodes_db check:rc==0 @@ -809,15 +809,15 @@ 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 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/' check:rc==0 cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_json_then_import/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' check:rc==0 cmd:chdef -t osimage -o bogus_image addkcmdline=1111 boottarget=1111 cfmdir=1111 crashkernelsize=1111 description=1111 driverupdatesrc=1111 dump=1111 exlist=1111 groups=1111 imagename=1111 imagetype=linux isdeletable=1111 kerneldir=1111 kernelver=1111 kitcomponents=1111 krpmver=1111 netdrivers=1111 nodebootif=1111 osarch=1111 osdistroname=1111 osname=1111 osupdatename=1111 osvers=1111 otherifce=1111 otherpkgdir=1111 otherpkglist=1111 partitionfile=1111 permission=1111 pkgdir=1111 pkglist=1111 postbootscripts=1111 postinstall=1111 postscripts=1111 profile=compute provmethod=statelite rootfstype=nfs rootimgdir=1111 serverrole=1111 synclists=1111 template=1111 usercomment=1111 check:rc==0 @@ -843,38 +843,38 @@ cmd:scp /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.json check:rc==0 cmd: rmdef -t osimage -o bogus_image check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.json -t osimage -o bogus_image' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.json -t osimage -o bogus_image' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/dst_bogus_image.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/dst_bogus_image.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/dst_bogus_image.stanza /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image.stanza check:rc==0 cmd: cat /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image.stanza check:rc==0 -cmd:diff -y /tmp/export_single_osimage_then_modify_json_then_import/src_bogus_osimage.stanza /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image.stanza +cmd:diff -y /tmp/export_single_osimage_then_modify_json_then_import/src_bogus_osimage.stanza /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image.stanza -I "environvar=OBJNAME=bogus_image" check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t osimage -o bogus_image' check:rc==0 cmd:if [[ -e /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.stanza | mkdef -z;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_single_osimage_then_modify_json_then_import 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 -cmd:ssh $$DSTMN 'mkdir -p /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/' check:rc==0 cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' check:rc==0 cmd:chdef -t osimage -o bogus_image addkcmdline=1111 boottarget=1111 cfmdir=1111 crashkernelsize=1111 description=1111 driverupdatesrc=1111 dump=1111 exlist=1111 groups=1111 imagename=1111 imagetype=linux isdeletable=1111 kerneldir=1111 kernelver=1111 kitcomponents=1111 krpmver=1111 netdrivers=1111 nodebootif=1111 osarch=1111 osdistroname=1111 osname=1111 osupdatename=1111 osvers=1111 otherifce=1111 otherpkgdir=1111 otherpkglist=1111 partitionfile=1111 permission=1111 pkgdir=1111 pkglist=1111 postbootscripts=1111 postinstall=1111 postscripts=1111 profile=compute provmethod=statelite rootfstype=nfs rootimgdir=1111 serverrole=1111 synclists=1111 template=1111 usercomment=1111 check:rc==0 @@ -900,23 +900,23 @@ cmd:scp /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.yaml check:rc==0 cmd: rmdef -t osimage -o bogus_image check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.yaml -t osimage -o bogus_image' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.yaml -t osimage -o bogus_image' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/dst_bogus_image.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/dst_bogus_image.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/dst_bogus_image.stanza /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image.stanza check:rc==0 cmd: cat /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image.stanza check:rc==0 -cmd:diff -y /tmp/export_single_osimage_then_modify_yaml_then_import/src_bogus_osimage.stanza /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image.stanza +cmd:diff -y /tmp/export_single_osimage_then_modify_yaml_then_import/src_bogus_osimage.stanza /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image.stanza -I "environvar=OBJNAME=bogus_image" check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rmdef -t osimage -o bogus_image' check:rc==0 cmd:if [[ -e /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.stanza | mkdef -z;fi check:rc==0 -cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza | mkdef -z;fi' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;if [[ -e /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza | mkdef -z;fi' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/' check:rc==0 cmd:rm -rf /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 @@ -995,7 +995,7 @@ cmd:file="/tmp/partitionfile"; rm -rf $file; if [ -d ${file}".bak" ];then mv ${f end start:export_import_multiple_osimages_by_dir -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test xcat-inventory export and import several linux osimages definition by dir. cmd:if [ -e /tmp/otherpkglist ]; then cp -f /tmp/otherpkglist /tmp/otherpkglist.bak; fi cmd:echo "test" >> /tmp/otherpkglist @@ -1071,6 +1071,7 @@ check:rc==0 cmd: rmdef -t osimage -o test_myimage1,test_myimage2 check:rc==0 cmd:rm -rf /tmp/otherpkglist /tmp/synclists /tmp/postinstall /tmp/exlist /tmp/partitionfile /tmp/pkglist /tmp/template +cmd: tree /opt/inventory/site cmd:xcat-inventory import -t osimage -o test_myimage1,test_myimage2 -d /opt/inventory/site check:rc==0 check:output=~The object test_myimage1 has been imported @@ -1127,15 +1128,15 @@ cmd:file="/opt/xcat/share/xcat/install/rh/template"; rm -rf $file; if [ -d ${fil end start:export_import_all_osimages_by_dir -label:others,xcat_inventory +label:others,inventory_ci description:This case is used to test xcat-inventory export and import all linux osimage definition by files. cmd:lsdef -t osimage -z | tee /tmp/osimage.list check:rc==0 #backup all osimage cmd:if [ -e /tmp/osimages ]; then cp -f /tmp/osimages /tmp/osimages.bak ; else mkdir -p /tmp/osimages; fi -cmd:imgdir='/tmp/osimages';for img in $(lsdef -t osimage -s|awk -F' ' '{print $1}'); do lsdef -t osimage -o $img -z > $imgdir/${img}.stanza;done +cmd:imgdir='/tmp/osimages';for img in $(lsdef -t osimage -s|grep '(osimage)'|awk -F' ' '{print $1}'); do lsdef -t osimage -o $img -z > $imgdir/${img}.stanza;done check:rc==0 -cmd:for img in $(lsdef -t osimage -s|awk -F' ' '{print $1}');do rmdef -t osimage -o $img;done +cmd:for img in $(lsdef -t osimage -s|grep '(osimage)'|awk -F' ' '{print $1}');do rmdef -t osimage -o $img;done check:rc==0 cmd:if [ -e /tmp/otherpkglist ]; then cp -f /tmp/otherpkglist /tmp/otherpkglist.bak; fi cmd:echo "test" >> /tmp/otherpkglist @@ -1208,12 +1209,8 @@ check:rc==0 cmd:rm -rf /tmp/otherpkglist /tmp/synclists /tmp/postinstall /tmp/exlist /tmp/pkglist /tmp/template /tmp/partitionfile cmd:xcat-inventory import -t osimage -d /opt/inventory/site check:rc==0 -check:output=~Importing object: test_myimage1 check:output=~Inventory import successfully! -check:output=~The object test_myimage1 has been imported -check:output=~Importing object: test_myimage2 check:output=~Inventory import successfully! -check:output=~The object test_myimage2 has been imported cmd:lsdef -t osimage -o test_myimage1,test_myimage2 check:rc==0 cmd:otherpkglist=`lsdef -t osimage -o test_myimage1 |grep otherpkglist|awk -F= '{print $2}'`;diff -y $otherpkglist /opt/inventory/site/osimage/test_myimage1$otherpkglist @@ -1249,7 +1246,6 @@ check:rc==0 cmd: if [ -e /tmp/test_myimage1.stanza ]; then cat /tmp/test_myimage1.stanza |mkdef -z;fi cmd: if [ -e /tmp/test_myimage2.stanza ]; then cat /tmp/test_myimage2.stanza |mkdef -z;fi cmd:dir="/opt/inventory/site/osimage"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi -cmd:dir="/opt/inventory/site/osimage"; rm -rf $dir; if [ -d ${dir}".bak" ];then mv ${dir}".bak" $dir; fi cmd:file="/tmp/otherpkglist"; rm -rf $file; if [ -d ${file}".bak" ];then mv ${file}".bak" $file; fi cmd:file="/tmp/synclists"; rm -rf $file; if [ -d ${file}".bak" ];then mv ${file}".bak" $file; fi cmd:file="/tmp/postinstall"; rm -rf $file; if [ -d ${file}".bak" ];then mv ${file}".bak" $file; fi @@ -1269,13 +1265,12 @@ cmd:if [ -e /tmp/osimages.bak ]; then mv -f /tmp/osimages.bak /tmp/osimages; fi end start:export_import_osimages_by_dir_with_c -label:others,xcat_inventory +label:others,inventory_ci 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 +cmd:imgdir='/tmp/export';for img in $(lsdef -t osimage -s|grep '(osimage)'|awk -F' ' '{print $1}'); do lsdef -t osimage -o $img -z > $imgdir/${img}.stanza;done check:rc==0 -cmd:for img in $(lsdef -t osimage -s|awk -F' ' '{print $1}');do rmdef -t osimage -o $img;done +cmd:for img in $(lsdef -t osimage -s|grep '(osimage)'|awk -F' ' '{print $1}');do rmdef -t osimage -o $img;done check:rc==0 cmd:chdef -t osimage -o test_myimage1,test_myimage2,test_myimage3 imagetype=linux provmethod=install check:rc==0 @@ -1285,10 +1280,8 @@ check:output=~The osimage objects has been exported to directory /tmp/export cmd:ls -lFR /tmp/export cmd: xcat-inventory import -t osimage -d /tmp/export -c check:rc==0 -check:output=~Importing object: test_myimage1 check:output=~Inventory import successfully! check:output=~The object test_myimage1 has been imported -check:output=~Importing object: test_myimage2 check:output=~Inventory import successfully! check:output=~The object test_myimage2 has been imported cmd:lsdef -t osimage -o test_myimage1,test_myimage2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.import_from_osimage_dir b/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage.import_from_osimage_dir similarity index 87% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.import_from_osimage_dir rename to xCAT-test/autotest/testcase/xcat_inventory/cases.osimage.import_from_osimage_dir index 07969ab3e..896842ef8 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.import_from_osimage_dir +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage.import_from_osimage_dir @@ -1,6 +1,6 @@ start:export_import_an_osimage_directory description: import an osimage diretory with `xcat-inventroy import -d ` -label:others,xcat_inventory +label:others,inventory_ci #backup any existing test_myimage cmd:mkdir -p /tmp/export_import_an_osimage_directory/backup check:rc==0 @@ -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 +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 ` -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 +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 +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 -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 +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 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.validation b/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage.validation similarity index 72% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.validation rename to xCAT-test/autotest/testcase/xcat_inventory/cases.osimage.validation index 334ca2ae3..17eb0803e 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage.validation +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.osimage.validation @@ -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 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.passwd b/xCAT-test/autotest/testcase/xcat_inventory/cases.passwd similarity index 77% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.passwd rename to xCAT-test/autotest/testcase/xcat_inventory/cases.passwd index 14d06445f..7361de49a 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.passwd +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.passwd @@ -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 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.route b/xCAT-test/autotest/testcase/xcat_inventory/cases.route similarity index 78% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.route rename to xCAT-test/autotest/testcase/xcat_inventory/cases.route index cb0157fff..e5ea12365 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.route +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.route @@ -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 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.site b/xCAT-test/autotest/testcase/xcat_inventory/cases.site similarity index 88% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.site rename to xCAT-test/autotest/testcase/xcat_inventory/cases.site index 9d1dc6d35..d70cb2bac 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.site +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.site @@ -1,14 +1,14 @@ 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= 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 'mkdir -p /tmp/export_import_site_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_site_by_yaml_$$DSTMN/' check:rc==0 cmd: lsdef -t site -o clustersite -z >/tmp/export_import_site_by_yaml/site.stanza check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_import_site_by_yaml_$$DSTMN/site.stanza ' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z >/tmp/export_import_site_by_yaml_$$DSTMN/site.stanza ' check:rc==0 cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=0 useNFSv4onAIX=0 FQDNfirst=1 SNsyncfiledir='/var/xcat/syncfiles' auditnosyslog=0 auditskipcmds=ALL blademaxp=64 cleanupxcatpost=no consoleondemand=no databaseloc='/var/lib' db2installloc='/mntdb2' dbtracelevel=0 defserialflow=0 defserialport=0 defserialspeed=9600 dhcpinterfaces=eth0 dhcplease=43200 dhcpsetup=n disjointdhcps=1 dnshandler=ddns dnsinterfaces='xcatmn|eth1,eth2;service|bond0' dnsupdaters=dnsupdaters domain='pok.stglabs.ibm.com' enableASMI=no excludenodes=excludenodes externaldns=externaldns extntpservers=extntpservers forwarders=$mnip fsptimeout=0 genmacprefix='00:11:aa' genpasswords=genpasswords hierarchicalattrs=hierarchicalattrs httpport=80 hwctrldispatch=y installdir='/install/' installloc='hostname:/path' ipmidispatch=y ipmimaxp=64 ipmiretries=3 ipmisdrcache=no ipmitimeout=2 iscsidir='/iscsidir' managedaddressmode=dhcp master=$mnip maxssh=8 mnroutenames=mnroutenames nameservers=$mnip nmapoptions='--min-rtt-timeout' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles' ntpservers=$mnip persistkvmguests=y powerinterval=0 ppcmaxp=64 ppcretry=3 ppctimeout=0 precreatemypostscripts=1 pruneservices=1 runbootscripts=yes setinstallnic=1 sharedinstall=no sharedtftp=1 skiptables=nics skipvalidatelog=1 snmpc=snmpc sshbetweennodes=ALLGROUPS svloglocal=1 syspowerinterval=10 syspowermaxnodes=10 tftpdir='/tftprot/' tftpflags='-v' timezone='America/New_York' useNmapfromMN=no useflowcontrol=no usexhrm=no vcenterautojoin=no vmwarereconfigonpower=no vsftp=n xcatconfdir='/etc/xcat' xcatdebugmode=1 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=64 xcatmaxconnections=60 xcatsslciphers='3DES' xcatsslversion=TLSv1 check:rc==0 @@ -22,9 +22,9 @@ cmd:cat /tmp/export_import_site_by_yaml/export_site_yaml.inv check:rc==0 cmd:scp /tmp/export_import_site_by_yaml/export_site_yaml.inv $$DSTMN:/tmp/export_import_site_by_yaml_$$DSTMN/ check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_site_by_yaml_$$DSTMN/export_site_yaml.inv -t site -o clustersite' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_site_by_yaml_$$DSTMN/export_site_yaml.inv -t site -o clustersite' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_import_site_by_yaml_$$DSTMN/dstsite.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_import_site_by_yaml_$$DSTMN/dstsite.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_site_by_yaml_$$DSTMN/dstsite.stanza /tmp/export_import_site_by_yaml/dstsite.stanza check:rc==0 @@ -36,9 +36,9 @@ cmd:diff -y --ignore-blank-lines /tmp/export_import_site_by_yaml/srcsite.stanza check:rc==0 cmd:cat /tmp/export_import_site_by_yaml/site.stanza | mkdef -z -f check:rc==0 -cmd:ssh $$DSTMN 'cat /tmp/export_import_site_by_yaml_$$DSTMN/site.stanza | mkdef -z -f' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;cat /tmp/export_import_site_by_yaml_$$DSTMN/site.stanza | mkdef -z -f' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_site_by_yaml_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_site_by_yaml_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_site_by_yaml check:rc==0 @@ -48,14 +48,14 @@ 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= 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 'mkdir -p /tmp/export_import_site_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_import_site_by_json_$$DSTMN/' check:rc==0 cmd: lsdef -t site -o clustersite -z >/tmp/export_import_site_by_json/site.stanza check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_import_site_by_json_$$DSTMN/site.stanza ' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z >/tmp/export_import_site_by_json_$$DSTMN/site.stanza ' check:rc==0 cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=0 useNFSv4onAIX=0 FQDNfirst=1 SNsyncfiledir='/var/xcat/syncfiles' auditnosyslog=0 auditskipcmds=ALL blademaxp=64 cleanupxcatpost=no consoleondemand=no databaseloc='/var/lib' db2installloc='/mntdb2' dbtracelevel=0 defserialflow=0 defserialport=0 defserialspeed=9600 dhcpinterfaces=eth0 dhcplease=43200 dhcpsetup=n disjointdhcps=1 dnshandler=ddns dnsinterfaces='xcatmn|eth1,eth2;service|bond0' dnsupdaters=dnsupdaters domain='pok.stglabs.ibm.com' enableASMI=no excludenodes=excludenodes externaldns=externaldns extntpservers=extntpservers forwarders=$mnip fsptimeout=0 genmacprefix='00:11:aa' genpasswords=genpasswords hierarchicalattrs=hierarchicalattrs httpport=80 hwctrldispatch=y installdir='/install/' installloc='hostname:/path' ipmidispatch=y ipmimaxp=64 ipmiretries=3 ipmisdrcache=no ipmitimeout=2 iscsidir='/iscsidir' managedaddressmode=dhcp master=$mnip maxssh=8 mnroutenames=mnroutenames nameservers=$mnip nmapoptions='--min-rtt-timeout' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles' ntpservers=$mnip persistkvmguests=y powerinterval=0 ppcmaxp=64 ppcretry=3 ppctimeout=0 precreatemypostscripts=1 pruneservices=1 runbootscripts=yes setinstallnic=1 sharedinstall=no sharedtftp=1 skiptables=nics skipvalidatelog=1 snmpc=snmpc sshbetweennodes=ALLGROUPS svloglocal=1 syspowerinterval=10 syspowermaxnodes=10 tftpdir='/tftprot/' tftpflags='-v' timezone='America/New_York' useNmapfromMN=no useflowcontrol=no usexhrm=no vcenterautojoin=no vmwarereconfigonpower=no vsftp=n xcatconfdir='/etc/xcat' xcatdebugmode=1 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=64 xcatmaxconnections=60 xcatsslciphers='3DES' xcatsslversion=TLSv1 check:rc==0 @@ -69,9 +69,9 @@ cmd:cat /tmp/export_import_site_by_json/export_site_json.inv check:rc==0 cmd:scp /tmp/export_import_site_by_json/export_site_json.inv $$DSTMN:/tmp/export_import_site_by_json_$$DSTMN/ check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_site_by_json_$$DSTMN/export_site_json.inv -t site -o clustersite' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_import_site_by_json_$$DSTMN/export_site_json.inv -t site -o clustersite' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_import_site_by_json_$$DSTMN/dstsite.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_import_site_by_json_$$DSTMN/dstsite.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_import_site_by_json_$$DSTMN/dstsite.stanza /tmp/export_import_site_by_json/dstsite.stanza check:rc==0 @@ -83,9 +83,9 @@ cmd:diff -y --ignore-blank-lines /tmp/export_import_site_by_json/srcsite.stanza check:rc==0 cmd:cat /tmp/export_import_site_by_json/site.stanza | mkdef -z -f check:rc==0 -cmd:ssh $$DSTMN 'cat /tmp/export_import_site_by_json_$$DSTMN/site.stanza | mkdef -z -f' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;cat /tmp/export_import_site_by_json_$$DSTMN/site.stanza | mkdef -z -f' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_site_by_json_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_import_site_by_json_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_import_site_by_json check:rc==0 @@ -93,7 +93,7 @@ end start:xcat_inventory_try_to_export_all_type_is_site_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 site to default file. I.e. json file cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format check:rc==0 @@ -101,102 +101,99 @@ cmd: lsdef -t site -o clustersite -z >/tmp/xcat_inventory_try_to_export_all_type check:rc==0 cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=0 useNFSv4onAIX=0 FQDNfirst=1 SNsyncfiledir='/var/xcat/syncfiles' auditnosyslog=0 auditskipcmds=ALL blademaxp=64 cleanupxcatpost=no consoleondemand=no databaseloc='/var/lib' db2installloc='/mntdb2' dbtracelevel=0 defserialflow=0 defserialport=0 defserialspeed=9600 dhcpinterfaces=eth0 dhcplease=43200 dhcpsetup=n disjointdhcps=1 dnshandler=ddns dnsinterfaces='xcatmn|eth1,eth2;service|bond0' dnsupdaters=dnsupdaters domain='pok.stglabs.ibm.com' enableASMI=no excludenodes=excludenodes externaldns=externaldns extntpservers=extntpservers forwarders=$mnip fsptimeout=0 genmacprefix='00:11:aa' genpasswords=genpasswords hierarchicalattrs=hierarchicalattrs httpport=80 hwctrldispatch=y installdir='/install/' installloc='hostname:/path' ipmidispatch=y ipmimaxp=64 ipmiretries=3 ipmisdrcache=no ipmitimeout=2 iscsidir='/iscsidir' managedaddressmode=dhcp master=$mnip maxssh=8 mnroutenames=mnroutenames nameservers=$mnip nmapoptions='--min-rtt-timeout' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles' ntpservers=$mnip persistkvmguests=y powerinterval=0 ppcmaxp=64 ppcretry=3 ppctimeout=0 precreatemypostscripts=1 pruneservices=1 runbootscripts=yes setinstallnic=1 sharedinstall=no sharedtftp=1 skiptables=nics skipvalidatelog=1 snmpc=snmpc sshbetweennodes=ALLGROUPS svloglocal=1 syspowerinterval=10 syspowermaxnodes=10 tftpdir='/tftprot/' tftpflags='-v' timezone='America/New_York' useNmapfromMN=no useflowcontrol=no usexhrm=no vcenterautojoin=no vmwarereconfigonpower=no vsftp=n xcatconfdir='/etc/xcat' xcatdebugmode=1 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=64 xcatmaxconnections=60 xcatsslciphers='3DES' xcatsslversion=TLSv1 check:rc==0 -cmd:#!/bin/bash -echo '{ - "schema_version": "1.0", - "site": { - "clustersite": { - "FQDNfirst": "1", - "SNsyncfiledir": "/var/xcat/syncfiles", - "auditnosyslog": "0", - "auditskipcmds": "ALL", - "blademaxp": "64", - "cleanupxcatpost": "no", - "consoleondemand": "no", - "databaseloc": "/var/lib", - "db2installloc": "/mntdb2", - "dbtracelevel": "0", - "defserialflow": "0", - "defserialport": "0", - "defserialspeed": "9600", - "dhcpinterfaces": "eth0", - "dhcplease": "43200", - "dhcpsetup": "n", - "disjointdhcps": "1", - "dnshandler": "ddns", - "dnsinterfaces": "xcatmn|eth1,eth2;service|bond0", - "dnsupdaters": "dnsupdaters", - "domain": "pok.stglabs.ibm.com", - "enableASMI": "no", - "excludenodes": "excludenodes", - "externaldns": "externaldns", - "extntpservers": "extntpservers", - "forwarders": "10.3.5.8", - "fsptimeout": "0", - "genmacprefix": "00:11:aa", - "genpasswords": "genpasswords", - "hierarchicalattrs": "hierarchicalattrs", - "httpport": "80", - "hwctrldispatch": "y", - "installdir": "/install/", - "installloc": "hostname:/path", - "ipmidispatch": "y", - "ipmimaxp": "64", - "ipmiretries": "3", - "ipmisdrcache": "no", - "ipmitimeout": "2", - "iscsidir": "/iscsidir", - "managedaddressmode": "dhcp", - "master": "10.3.5.8", - "maxssh": "8", - "mnroutenames": "mnroutenames", - "nameservers": "10.3.5.8", - "nmapoptions": "--min-rtt-timeout", - "nodestatus": "n", - "nodesyncfiledir": "/var/xcat/node/syncfiles", - "ntpservers": "10.3.5.8", - "persistkvmguests": "y", - "powerinterval": "0", - "ppcmaxp": "64", - "ppcretry": "3", - "ppctimeout": "0", - "precreatemypostscripts": "1", - "pruneservices": "1", - "runbootscripts": "yes", - "setinstallnic": "1", - "sharedinstall": "no", - "sharedtftp": "1", - "skiptables": "nics", - "skipvalidatelog": "1", - "snmpc": "snmpc", - "sshbetweennodes": "ALLGROUPS", - "svloglocal": "1", - "syspowerinterval": "10", - "syspowermaxnodes": "10", - "tftpdir": "/tftprot/", - "tftpflags": "-v", - "timezone": "America/New_York", - "useNFSv4onAIX": "0", - "useNmapfromMN": "no", - "useSSHonAIX": "0", - "useflowcontrol": "no", - "usexhrm": "no", - "vcenterautojoin": "no", - "vmwarereconfigonpower": "no", - "vsftp": "n", - "xcatconfdir": "/etc/xcat", - "xcatdebugmode": "1", - "xcatdport": "3001", - "xcatiport": "3002", - "xcatlport": "3003", - "xcatmaxbatchconnections": "64", - "xcatmaxconnections": "60", - "xcatsslciphers": "3DES", - "xcatsslversion": "TLSv1" - } - } -}' > /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.org -cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/10.3.5.8/$mnip/g" /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.org +cmd:echo " +schema_version: '2.0' +site: + clustersite: + FQDNfirst: '1' + SNsyncfiledir: /var/xcat/syncfiles + auditnosyslog: '0' + auditskipcmds: ALL + blademaxp: '64' + cleanupxcatpost: 'no' + consoleondemand: 'no' + databaseloc: /var/lib + db2installloc: /mntdb2 + dbtracelevel: '0' + defserialflow: '0' + defserialport: '0' + defserialspeed: '9600' + dhcpinterfaces: eth0 + dhcplease: '43200' + dhcpsetup: n + disjointdhcps: '1' + dnshandler: ddns + dnsinterfaces: xcatmn|eth1,eth2;service|bond0 + dnsupdaters: dnsupdaters + domain: pok.stglabs.ibm.com + enableASMI: 'no' + excludenodes: excludenodes + externaldns: externaldns + extntpservers: extntpservers + forwarders: 10.3.1.13 + fsptimeout: '0' + genmacprefix: 00:11:aa + genpasswords: genpasswords + hierarchicalattrs: hierarchicalattrs + httpport: '80' + hwctrldispatch: y + installdir: /install/ + installloc: hostname:/path + ipmidispatch: y + ipmimaxp: '64' + ipmiretries: '3' + ipmisdrcache: 'no' + ipmitimeout: '2' + iscsidir: /iscsidir + managedaddressmode: dhcp + master: 10.3.1.13 + maxssh: '8' + mnroutenames: mnroutenames + nameservers: 10.3.1.13 + nmapoptions: --min-rtt-timeout + nodestatus: n + nodesyncfiledir: /var/xcat/node/syncfiles + ntpservers: 10.3.1.13 + persistkvmguests: y + powerinterval: '0' + ppcmaxp: '64' + ppcretry: '3' + ppctimeout: '0' + precreatemypostscripts: '1' + pruneservices: '1' + runbootscripts: 'yes' + setinstallnic: '1' + sharedinstall: 'no' + sharedtftp: '1' + skiptables: nics + skipvalidatelog: '1' + snmpc: snmpc + sshbetweennodes: ALLGROUPS + svloglocal: '1' + syspowerinterval: '10' + syspowermaxnodes: '10' + tftpdir: /tftprot/ + tftpflags: -v + timezone: America/New_York + useNFSv4onAIX: '0' + useNmapfromMN: 'no' + useSSHonAIX: '0' + useflowcontrol: 'no' + usexhrm: 'no' + vcenterautojoin: 'no' + vmwarereconfigonpower: 'no' + vsftp: n + xcatconfdir: /etc/xcat + xcatdebugmode: '1' + xcatdport: '3001' + xcatiport: '3002' + xcatlport: '3003' + xcatmaxbatchconnections: '64' + xcatmaxconnections: '60' + xcatsslciphers: 3DES + xcatsslversion: TLSv1 +" > /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.org +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/10.3.1.13/$mnip/g" /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.org check:rc==0 cmd:xcat-inventory export -t site |tee /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.export check:rc==0 @@ -210,7 +207,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 @@ -318,7 +315,7 @@ check:rc==0 cmd:xcat-inventory export --format=json -t site |tee /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.export check:rc==0 cmd:#!/bin/bash -diff -y --ignore-blank-lines --ignore-matching-lines="^#" /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.org /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.export +diff -y --ignore-blank-lines --ignore-matching-lines="^#" --ignore-matching-lines="schema_version" /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.org /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.export check:rc==0 cmd:cat /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.stanza | mkdef -z -f check:rc==0 @@ -327,7 +324,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 @@ -431,7 +428,7 @@ check:rc==0 cmd:xcat-inventory export --format=yaml -t site|sed -e '/^\s*$/d' |tee /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.export check:rc==0 cmd:#!/bin/bash -diff -y --ignore-blank-lines --ignore-matching-lines="^#" /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.org /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.export +diff -y --ignore-blank-lines --ignore-matching-lines="^#" --ignore-matching-lines="schema_version" /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.org /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.export check:rc==0 cmd:cat /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.stanza | mkdef -z -f check:rc==0 @@ -441,7 +438,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 @@ -451,8 +448,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": { @@ -749,8 +745,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 @@ -872,7 +867,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 @@ -882,8 +877,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 @@ -1116,8 +1110,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 @@ -1215,7 +1208,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 @@ -1242,14 +1235,14 @@ 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 'mkdir -p /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/' check:rc==0 cmd: lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_yaml_then_import/site.stanza check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/site.stanza ' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/site.stanza ' check:rc==0 cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 cleanupxcatpost=1111 consoleondemand=1111 databaseloc='/var/lib1111' db2installloc='/mntdb1111' dbtracelevel=0 defserialflow=1111 defserialport=1111 defserialspeed=9611111111 dhcpinterfaces=eth1111 dhcplease=43211111111 dhcpsetup=1111 disjointdhcps=0 dnshandler=ddns1111 dnsinterfaces='xcatmn|eth1,eth2;service|bond1111' dnsupdaters=dnsupdaters1111 domain='pok1111.stglabs.ibm.com' enableASMI=1111 excludenodes=1111 externaldns=1111 extntpservers=1111 forwarders=$mnip fsptimeout=1111 genmacprefix='11111111:11:aa' genpasswords=1111 hierarchicalattrs=1111 httpport=81111 hwctrldispatch=1111 installdir='/install1111/' installloc='hostname:/path1111' ipmidispatch=1111 ipmimaxp=641111 ipmiretries=31111 ipmisdrcache=1111 ipmitimeout=21111 iscsidir='/iscsidir1111' managedaddressmode=dhcp master=$mnip maxssh=81111 mnroutenames=1111 nameservers=$mnip nmapoptions='--min-rtt-timeout 1111' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles1111' ntpservers=$mnip persistkvmguests=1111 powerinterval=1111 ppcmaxp=641111 ppcretry=31111 ppctimeout=1111 precreatemypostchdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 pruneservices=1111 runbootscripts=1111 setinstallnic=1111 sharedinstall=no sharedtftp=1111 skiptables=nics1111 skipvalidatelog=1111 snmpc=xc1111 sshbetweennodes=ALLGROUPS svloglocal=1111 syspowerinterval=11111 syspowermaxnodes=11111 tftpdir='/tftprot1111/' tftpflags='-v1111' timezone='America/New_York1111' useNmapfromMN=1111 useflowcontrol=1111 usexhrm=1111 vcenterautojoin=1111 vmwarereconfigonpower=1111 vsftp=1111 xcatconfdir='/etc/xcat1111' xcatdebugmode=0 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=641111 xcatmaxconnections=61111 xcatsslciphers='3DES' xcatsslversion=TLSv1 check:rc==0 @@ -1281,9 +1274,9 @@ cmd:cat /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv check:rc==0 cmd:scp /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv $$DSTMN:/tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/ check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/export_site_yaml.inv -t site -o clustersite' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/export_site_yaml.inv -t site -o clustersite' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/dstsite.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/dstsite.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/dstsite.stanza /tmp/export_site_table_then_modify_yaml_then_import/dstsite.stanza check:rc==0 @@ -1295,9 +1288,9 @@ cmd:diff -y --ignore-blank-lines /tmp/export_site_table_then_modify_yaml_then_i check:rc==0 cmd:cat /tmp/export_site_table_then_modify_yaml_then_import/site.stanza | mkdef -z -f check:rc==0 -cmd:ssh $$DSTMN 'cat /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/site.stanza | mkdef -z -f' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;cat /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/site.stanza | mkdef -z -f' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_site_table_then_modify_yaml_then_import check:rc==0 @@ -1306,14 +1299,14 @@ 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 'mkdir -p /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;mkdir -p /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/' check:rc==0 cmd: lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_json_then_import/site.stanza check:rc==0 -cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_json_then_import_$$DSTMN/site.stanza ' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_json_then_import_$$DSTMN/site.stanza ' check:rc==0 cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 cleanupxcatpost=1111 consoleondemand=1111 databaseloc='/var/lib1111' db2installloc='/mntdb1111' dbtracelevel=0 defserialflow=1111 defserialport=1111 defserialspeed=9611111111 dhcpinterfaces=eth1111 dhcplease=43211111111 dhcpsetup=1111 disjointdhcps=0 dnshandler=ddns1111 dnsinterfaces='xcatmn|eth1,eth2;service|bond1111' dnsupdaters=dnsupdaters1111 domain='pok1111.stglabs.ibm.com' enableASMI=1111 excludenodes=1111 externaldns=1111 extntpservers=1111 forwarders=$mnip fsptimeout=1111 genmacprefix='11111111:11:aa' genpasswords=1111 hierarchicalattrs=1111 httpport=81111 hwctrldispatch=1111 installdir='/install1111/' installloc='hostname:/path1111' ipmidispatch=1111 ipmimaxp=641111 ipmiretries=31111 ipmisdrcache=1111 ipmitimeout=21111 iscsidir='/iscsidir1111' managedaddressmode=dhcp master=$mnip maxssh=81111 mnroutenames=1111 nameservers=$mnip nmapoptions='--min-rtt-timeout 1111' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles1111' ntpservers=$mnip persistkvmguests=1111 powerinterval=1111 ppcmaxp=641111 ppcretry=31111 ppctimeout=1111 precreatemypostchdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 pruneservices=1111 runbootscripts=1111 setinstallnic=1111 sharedinstall=no sharedtftp=1111 skiptables=nics1111 skipvalidatelog=1111 snmpc=xc1111 sshbetweennodes=ALLGROUPS svloglocal=1111 syspowerinterval=11111 syspowermaxnodes=11111 tftpdir='/tftprot1111/' tftpflags='-v1111' timezone='America/New_York1111' useNmapfromMN=1111 useflowcontrol=1111 usexhrm=1111 vcenterautojoin=1111 vmwarereconfigonpower=1111 vsftp=1111 xcatconfdir='/etc/xcat1111' xcatdebugmode=0 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=641111 xcatmaxconnections=61111 xcatsslciphers='3DES' xcatsslversion=TLSv1 check:rc==0 @@ -1345,9 +1338,9 @@ cmd:cat /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv check:rc==0 cmd:scp /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv $$DSTMN:/tmp/export_site_table_then_modify_json_then_import_$$DSTMN/ check:rc==0 -cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/export_site_json.inv -t site -o clustersite' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;xcat-inventory import -f /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/export_site_json.inv -t site -o clustersite' check:rc==0 -cmd: ssh $$DSTMN 'lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/dstsite.stanza' +cmd: ssh $$DSTMN ' source /etc/profile.d/xcat.sh;lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/dstsite.stanza' check:rc==0 cmd: scp $$DSTMN:/tmp/export_site_table_then_modify_json_then_import_$$DSTMN/dstsite.stanza /tmp/export_site_table_then_modify_json_then_import/dstsite.stanza check:rc==0 @@ -1359,9 +1352,9 @@ cmd:diff -y --ignore-blank-lines /tmp/export_site_table_then_modify_json_then_i check:rc==0 cmd:cat /tmp/export_site_table_then_modify_json_then_import/site.stanza | mkdef -z -f check:rc==0 -cmd:ssh $$DSTMN 'cat /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/site.stanza | mkdef -z -f' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;cat /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/site.stanza | mkdef -z -f' check:rc==0 -cmd:ssh $$DSTMN 'rm -rf /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/' +cmd:ssh $$DSTMN ' source /etc/profile.d/xcat.sh;rm -rf /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/' check:rc==0 cmd:rm -rf /tmp/export_site_table_then_modify_json_then_import check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.site.validation b/xCAT-test/autotest/testcase/xcat_inventory/cases.site.validation similarity index 67% rename from xCAT-test/autotest/testcase/xcat-inventory/cases.site.validation rename to xCAT-test/autotest/testcase/xcat_inventory/cases.site.validation index dd49edf01..17d7ea95a 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.site.validation +++ b/xCAT-test/autotest/testcase/xcat_inventory/cases.site.validation @@ -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 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/diff/change_name.sh b/xCAT-test/autotest/testcase/xcat_inventory/diff/change_name.sh similarity index 75% rename from xCAT-test/autotest/testcase/xcat-inventory/diff/change_name.sh rename to xCAT-test/autotest/testcase/xcat_inventory/diff/change_name.sh index b37eb278f..41c071b07 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/diff/change_name.sh +++ b/xCAT-test/autotest/testcase/xcat_inventory/diff/change_name.sh @@ -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 $?" diff --git a/xCAT-test/autotest/testcase/xcat-inventory/diff/diff_files.result b/xCAT-test/autotest/testcase/xcat_inventory/diff/diff_files.result similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/diff/diff_files.result rename to xCAT-test/autotest/testcase/xcat_inventory/diff/diff_files.result diff --git a/xCAT-test/autotest/testcase/xcat-inventory/diff/diff_source.result b/xCAT-test/autotest/testcase/xcat_inventory/diff/diff_source.result similarity index 96% rename from xCAT-test/autotest/testcase/xcat-inventory/diff/diff_source.result rename to xCAT-test/autotest/testcase/xcat_inventory/diff/diff_source.result index 45f78d822..26c91c726 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/diff/diff_source.result +++ b/xCAT-test/autotest/testcase/xcat_inventory/diff/diff_source.result @@ -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": { diff --git a/xCAT-test/autotest/testcase/xcat-inventory/diff/xcat-inventory_diff_file1.json b/xCAT-test/autotest/testcase/xcat_inventory/diff/xcat-inventory_diff_file1.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/diff/xcat-inventory_diff_file1.json rename to xCAT-test/autotest/testcase/xcat_inventory/diff/xcat-inventory_diff_file1.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/diff/xcat-inventory_diff_file2.json b/xCAT-test/autotest/testcase/xcat_inventory/diff/xcat-inventory_diff_file2.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/diff/xcat-inventory_diff_file2.json rename to xCAT-test/autotest/testcase/xcat_inventory/diff/xcat-inventory_diff_file2.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/cluster.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/cluster.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/cluster.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/cluster.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/definition.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/definition.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/definition.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/definition.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/test_myimage.stanza diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/exlist b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/exlist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/exlist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/exlist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/otherpkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/otherpkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/otherpkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/otherpkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/partitionfile b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/partitionfile similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/partitionfile rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/partitionfile diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/postinstall b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/postinstall similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/postinstall rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/postinstall diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/synclists b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/synclists similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/synclists rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage/tmp/test_myimage/synclists diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/definition.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/definition.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/definition.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/definition.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/test_myimage2.stanza diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/exlist b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/exlist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/exlist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/exlist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/otherpkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/otherpkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/otherpkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/otherpkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/partitionfile b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/partitionfile similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/partitionfile rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/partitionfile diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/postinstall b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/postinstall similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/postinstall rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/postinstall diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/synclists b/xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/synclists similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/synclists rename to xCAT-test/autotest/testcase/xcat_inventory/templates/cluster_invdir/osimage/test_myimage2/tmp/test_myimage2/synclists diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/change_name.sh b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/change_name.sh new file mode 100644 index 000000000..41c071b07 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/change_name.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +file1=$1 +file2=$2 +tmp_diff_file=$3 +rm -rf $tmp_diff_file +echo "copy /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/diff.result to $tmp_diff_file and modify compare file name in $tmp_diff_file" +cp /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/diff.result $tmp_diff_file +echo "copy command exit code $?" +sed -i "s|#FILE1#|$file1|g" $tmp_diff_file +echo "sed command exit code $?" +sed -i "s|#FILE2#|$file2|g" $tmp_diff_file +echo "sed command exit code $?" diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff.result b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff.result new file mode 100644 index 000000000..a4a54c114 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff.result @@ -0,0 +1,87 @@ + +====================BEGIN===================== + + +--- #FILE1# ++++ #FILE2# +{ + "node": { + "node1": { + "obj_info": { +- "groups": "ipmi" ++ "groups": "all" + }, + "engines": { + "hardware_mgt_engine": { +- "engine_type": "ipmi" + "engine_info": { +- "bmcusername": "ADMIN" + }, ++ "engine_type": "openbmc" + } + } + }, +- "node3": { +- "obj_info": { +- "groups": "openbmc" +- }, +- "role": "compute", +- "device_type": "server", +- "engines": { +- "hardware_mgt_engine": { +- "engine_info": { +- "bmc": "10.1.1.2", +- "bmcusername": "ADMIN" +- }, +- "engine_type": "openbmc" +- } +- }, +- "obj_type": "node" +- } + "node2": { + "network_info": { + "primarynic": { + "mac": [ +- "42:73:0a:03:11:0a!*NOIP*", ++ "42:6e:0a:03:11:0b" + ] + } + } + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "package_selection": { + "pkgdir": [ ++ "/install/rhels7.5-alternate/ppc64le/test" + ], + "otherpkgdir": [ +- "/install/post/otherpkgs/rhels7.5-alternate/ppc64le", ++ "/install/post/otherpkgs/rhels7.5-alternate/ppc64" + ] + } + } + }, + "site": { + "clustersite": { +- "xcatdebugmode": "1", +- "domain": "test.com", +- "master": "10.1.1.2", +- "forwarders": "10.0.0.1" ++ "xcatdebugmode": "0", ++ "domain": "cluster.com", ++ "master": "10.1.1.1" + } + }, + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { +- "mgtifname": "eth1" ++ "mgtifname": "eth0" + } + } + } +} + +====================END===================== + diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff_files.result b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff_files.result new file mode 100644 index 000000000..a4a54c114 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff_files.result @@ -0,0 +1,87 @@ + +====================BEGIN===================== + + +--- #FILE1# ++++ #FILE2# +{ + "node": { + "node1": { + "obj_info": { +- "groups": "ipmi" ++ "groups": "all" + }, + "engines": { + "hardware_mgt_engine": { +- "engine_type": "ipmi" + "engine_info": { +- "bmcusername": "ADMIN" + }, ++ "engine_type": "openbmc" + } + } + }, +- "node3": { +- "obj_info": { +- "groups": "openbmc" +- }, +- "role": "compute", +- "device_type": "server", +- "engines": { +- "hardware_mgt_engine": { +- "engine_info": { +- "bmc": "10.1.1.2", +- "bmcusername": "ADMIN" +- }, +- "engine_type": "openbmc" +- } +- }, +- "obj_type": "node" +- } + "node2": { + "network_info": { + "primarynic": { + "mac": [ +- "42:73:0a:03:11:0a!*NOIP*", ++ "42:6e:0a:03:11:0b" + ] + } + } + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "package_selection": { + "pkgdir": [ ++ "/install/rhels7.5-alternate/ppc64le/test" + ], + "otherpkgdir": [ +- "/install/post/otherpkgs/rhels7.5-alternate/ppc64le", ++ "/install/post/otherpkgs/rhels7.5-alternate/ppc64" + ] + } + } + }, + "site": { + "clustersite": { +- "xcatdebugmode": "1", +- "domain": "test.com", +- "master": "10.1.1.2", +- "forwarders": "10.0.0.1" ++ "xcatdebugmode": "0", ++ "domain": "cluster.com", ++ "master": "10.1.1.1" + } + }, + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { +- "mgtifname": "eth1" ++ "mgtifname": "eth0" + } + } + } +} + +====================END===================== + diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff_source.result b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff_source.result new file mode 100644 index 000000000..26c91c726 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/diff_source.result @@ -0,0 +1,70 @@ + +====================BEGIN===================== + + +--- xCAT DB ++++ /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json +{ + "node": { + "node1": { + "obj_info": { +- "groups": "ipmi" ++ "groups": "all" + }, + "engines": { + "hardware_mgt_engine": { +- "engine_type": "ipmi" + "engine_info": { +- "bmcusername": "ADMIN" + }, ++ "engine_type": "openbmc" + } + } + }, + "node2": { + "network_info": { + "primarynic": { + "mac": [ +- "42:73:0a:03:11:0a!*NOIP*", ++ "42:6e:0a:03:11:0b" + ] + } + } + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "package_selection": { + "pkgdir": [ ++ "/install/rhels7.5-alternate/ppc64le/test" + ], + "otherpkgdir": [ +- "/install/post/otherpkgs/rhels7.5-alternate/ppc64le", ++ "/install/post/otherpkgs/rhels7.5-alternate/ppc64" + ] + } + } + }, + "site": { + "clustersite": { +- "xcatdebugmode": "1", +- "domain": "test.com", +- "master": "10.1.1.2", +- "forwarders": "10.0.0.1" ++ "xcatdebugmode": "0", ++ "domain": "cluster.com", ++ "master": "10.1.1.1" + } + }, + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { +- "mgtifname": "eth1" ++ "mgtifname": "eth0" + } + } + } +} + +====================END===================== + diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file1.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file1.json new file mode 100644 index 000000000..2e0d332bf --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file1.json @@ -0,0 +1,191 @@ +{ + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { + "gateway": "", + "mask": "255.0.0.0", + "mgtifname": "eth1", + "mtu": "1500", + "net": "10.0.0.0" + }, + "service": { + "tftpserver": "" + } + } + }, + "node": { + "node1": { + "device_type": "server", + "engines": { + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.1.1.1", + "bmcusername": "ADMIN", + }, + "engine_type": "ipmi" + } + }, + "obj_info": { + "groups": "ipmi" + }, + "obj_type": "node", + "role": "compute" + }, + "node2": { + "device_info": { + "arch": "ppc64le", + "uuid": "7d6ca5da-9485-11e8-821f-426e0a03110a" + }, + "device_type": "server", + "engines": { + "console_engine": { + "engine_info": { + "consoleenabled": "1", + "serialport": "0", + "serialspeed": "115200" + } + }, + "hardware_mgt_engine": { + "engine_info": { + "id": "10", + "vmcpus": "2", + "vmhost": "node_host", + "vmmemory": "6144", + "vmnics": "brenP3p9s0f0,brenP3p9s0f1", + "vmstorage": "phy:/dev/mapper/vdiskvg01-vdisk01n10" + }, + "engine_type": "kvm" + }, + "netboot_engine": { + "engine_info": { + "osimage": "rhels7.5-ppc64le-install-compute" + }, + "engine_type": "grub2" + } + }, + "network_info": { + "primarynic": { + "mac": [ + "42:6e:0a:03:11:0a", + "42:73:0a:03:11:0a!*NOIP*" + ] + } + }, + "obj_info": { + "groups": "all" + }, + "obj_type": "node", + "role": "compute" + }, + "node3": { + "device_type": "server", + "engines": { + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.1.1.2", + "bmcusername": "ADMIN", + }, + "engine_type": "openbmc" + } + }, + "obj_info": { + "groups": "openbmc" + }, + "obj_type": "node", + "role": "compute" + }, + "service": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postscripts": "servicenode" + } + } + }, + "obj_type": "group", + "role": "compute" + }, + "xcatdefaults": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postbootscripts": "otherpkgs", + "postscripts": "syslog,remoteshell,syncfiles" + } + } + }, + "obj_type": "group", + "role": "compute" + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "basic_attributes": { + "arch": "ppc64le", + "distribution": "rhels7.5-alternate", + "osdistro": "rhels7.5-alternate-ppc64le", + "osname": "Linux" + }, + "imagetype": "linux", + "package_selection": { + "otherpkgdir": [ + "/install/post/otherpkgs/rhels7.5-alternate/ppc64le" + ], + "pkgdir": [ + "/install/rhels7.5-alternate/ppc64le" + ], + "pkglist": [ + "/opt/xcat/share/xcat/install/rh/compute.rhels7.pkglist" + ] + }, + "provision_mode": "install", + "role": "compute", + "template": "/opt/xcat/share/xcat/install/rh/compute.rhels7.tmpl" + }, + }, + "schema_version": "2.0", + "site": { + "clustersite": { + "SNsyncfiledir": "/var/xcat/syncfiles", + "auditnosyslog": "0", + "auditskipcmds": "ALL", + "blademaxp": "64", + "cleanupxcatpost": "no", + "consoleondemand": "no", + "databaseloc": "/var/lib", + "db2installloc": "/mntdb2", + "dhcplease": "43200", + "dnshandler": "ddns", + "domain": "test.com", + "enableASMI": "no", + "forwarders": "10.0.0.1", + "fsptimeout": "0", + "installdir": "/install", + "ipmimaxp": "64", + "ipmiretries": "3", + "ipmitimeout": "2", + "master": "10.1.1.2", + "maxssh": "8", + "nameservers": "10.1.1.1", + "nodesyncfiledir": "/var/xcat/node/syncfiles", + "powerinterval": "0", + "ppcmaxp": "64", + "ppcretry": "3", + "ppctimeout": "0", + "sharedtftp": "1", + "sshbetweennodes": "ALLGROUPS", + "syspowerinterval": "0", + "tftpdir": "/tftpboot", + "timezone": "US/Eastern", + "useNmapfromMN": "no", + "vsftp": "n", + "xcatconfdir": "/etc/xcat", + "xcatdebugmode": "1", + "xcatdport": "3001", + "xcatiport": "3002", + "xcatsslversion": "TLSv1" + } + } +} diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json new file mode 100644 index 000000000..53d4a7058 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/diff/xcat-inventory_diff_file2.json @@ -0,0 +1,173 @@ +{ + "network": { + "10_0_0_0-255_0_0_0": { + "basic_attr": { + "gateway": "", + "mask": "255.0.0.0", + "mgtifname": "eth0", + "mtu": "1500", + "net": "10.0.0.0" + }, + "service": { + "tftpserver": "" + } + } + }, + "node": { + "node1": { + "device_type": "server", + "engines": { + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.1.1.1", + }, + "engine_type": "openbmc" + } + }, + "obj_info": { + "groups": "all" + }, + "obj_type": "node", + "role": "compute" + }, + "node2": { + "device_info": { + "arch": "ppc64le", + "uuid": "7d6ca5da-9485-11e8-821f-426e0a03110a" + }, + "device_type": "server", + "engines": { + "console_engine": { + "engine_info": { + "consoleenabled": "1", + "serialport": "0", + "serialspeed": "115200" + } + }, + "hardware_mgt_engine": { + "engine_info": { + "id": "10", + "vmcpus": "2", + "vmhost": "node_host", + "vmmemory": "6144", + "vmnics": "brenP3p9s0f0,brenP3p9s0f1", + "vmstorage": "phy:/dev/mapper/vdiskvg01-vdisk01n10" + }, + "engine_type": "kvm" + }, + "netboot_engine": { + "engine_info": { + "osimage": "rhels7.5-ppc64le-install-compute" + }, + "engine_type": "grub2" + } + }, + "network_info": { + "primarynic": { + "mac": [ + "42:6e:0a:03:11:0a", + "42:6e:0a:03:11:0b" + ] + } + }, + "obj_info": { + "groups": "all" + }, + "obj_type": "node", + "role": "compute" + }, + "service": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postscripts": "servicenode" + } + } + }, + "obj_type": "group", + "role": "compute" + }, + "xcatdefaults": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postbootscripts": "otherpkgs", + "postscripts": "syslog,remoteshell,syncfiles" + } + } + }, + "obj_type": "group", + "role": "compute" + } + }, + "osimage": { + "rhels7.5-alternate-ppc64le-install-compute": { + "basic_attributes": { + "arch": "ppc64le", + "distribution": "rhels7.5-alternate", + "osdistro": "rhels7.5-alternate-ppc64le", + "osname": "Linux" + }, + "imagetype": "linux", + "package_selection": { + "otherpkgdir": [ + "/install/post/otherpkgs/rhels7.5-alternate/ppc64" + ], + "pkgdir": [ + "/install/rhels7.5-alternate/ppc64le", + "/install/rhels7.5-alternate/ppc64le/test" + ], + "pkglist": [ + "/opt/xcat/share/xcat/install/rh/compute.rhels7.pkglist" + ] + }, + "provision_mode": "install", + "role": "compute", + "template": "/opt/xcat/share/xcat/install/rh/compute.rhels7.tmpl" + }, + }, + "schema_version": "2.0", + "site": { + "clustersite": { + "SNsyncfiledir": "/var/xcat/syncfiles", + "auditnosyslog": "0", + "auditskipcmds": "ALL", + "blademaxp": "64", + "cleanupxcatpost": "no", + "consoleondemand": "no", + "databaseloc": "/var/lib", + "db2installloc": "/mntdb2", + "dhcplease": "43200", + "dnshandler": "ddns", + "domain": "cluster.com", + "enableASMI": "no", + "fsptimeout": "0", + "installdir": "/install", + "ipmimaxp": "64", + "ipmiretries": "3", + "ipmitimeout": "2", + "master": "10.1.1.1", + "maxssh": "8", + "nameservers": "10.1.1.1", + "nodesyncfiledir": "/var/xcat/node/syncfiles", + "powerinterval": "0", + "ppcmaxp": "64", + "ppcretry": "3", + "ppctimeout": "0", + "sharedtftp": "1", + "sshbetweennodes": "ALLGROUPS", + "syspowerinterval": "0", + "tftpdir": "/tftpboot", + "timezone": "US/Eastern", + "useNmapfromMN": "no", + "vsftp": "n", + "xcatconfdir": "/etc/xcat", + "xcatdebugmode": "0", + "xcatdport": "3001", + "xcatiport": "3002", + "xcatsslversion": "TLSv1" + } + } +} diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/otherpkglist/test1.otherpkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/otherpkglist/test2.otherpkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/pkglist/test1.pkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test1.pkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/pkglist/test1.pkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/pkglist/test2.pkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/pkglist/test2.pkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/pkglist/test2.pkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/postinstall/test1.postinstall similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test1.postinstall rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/postinstall/test1.postinstall diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test2.postinstall b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/postinstall/test2.postinstall similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/postinstall/test2.postinstall rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/postinstall/test2.postinstall diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/syncfiles/synclist b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/syncfiles/synclist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/gitrepo/syncfiles/synclist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/gitrepo/syncfiles/synclist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/conserver-xcat-8.2.1-1.ppc64le.rpm diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/perl-Net-Telnet-3.03-19.el7.noarch.rpm b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/perl-Net-Telnet-3.03-19.el7.noarch.rpm similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/perl-Net-Telnet-3.03-19.el7.noarch.rpm rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/perl-Net-Telnet-3.03-19.el7.noarch.rpm diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/2f8132e926de0ada34da23f1a63713a9e6761fa5a5171ab309a2aef1d4f6efe3-filelists.xml.gz diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/771b092d010ec878233b66dc1dba2ab81b614c5a9ea473f9f5f6da76997276c1-other.sqlite.bz2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/8a1f4155ca9e8784d0a41e5a9b5b715af7f096945143e6be4f69489eb59a4aa8-primary.xml.gz diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/98590d4faf7b8f997493a85d6fcbb6aa2ede7a9b30078ecc06d5710c0520dc56-primary.sqlite.bz2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede-other.xml.gz b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede-other.xml.gz similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede-other.xml.gz rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/bd36e0c2e540280fd45799e9f755a72f63b394ce110227f7d48f999a86d90ede-other.xml.gz diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/e3cf2fc42c62b0328effe9e44a4ab1296905ae92f845dd773b0550c7f191e3f8-filelists.sqlite.bz2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/repomd.xml b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/repomd.xml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/otherpkgdir/repodata/repomd.xml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/otherpkgdir/repodata/repomd.xml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/dhcp-4.2.5-68.el7.ppc64le.rpm diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931-filelists.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931-filelists.sqlite.bz2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931-filelists.sqlite.bz2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/2a9abe54b23615850e70c41456bd49ff3994eae972ea2347d46b43de8cf48931-filelists.sqlite.bz2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/4160c0db6523d465541345245e8463eacd03e5f823e5ba319d0ddbed4b2a2397-filelists.xml.gz diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/75c2df3e4d5ca66a0c105562f4d0cea1c0c1203bb1f59a73e373b5cebcf03d65-primary.xml.gz diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/811daeb0fde54384fec22af72ecdcdd2d4d8060ad5227802c0c02bb73dd72ce1-other.sqlite.bz2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b-other.xml.gz b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b-other.xml.gz similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b-other.xml.gz rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/9fcfad63d06bdaba2be3507fbb1cd080db5f7423ec46cf25221fb1193e35611b-other.xml.gz diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373-primary.sqlite.bz2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373-primary.sqlite.bz2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373-primary.sqlite.bz2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/e4f965fd5f4b914c4e89d54b8784394b7760e051dd788e791d259673af365373-primary.sqlite.bz2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/repomd.xml b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/repomd.xml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/repodata/repomd.xml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/repodata/repomd.xml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/swdir/pkgdir/tftp-5.2-22.el7.ppc64le.rpm diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza new file mode 100644 index 000000000..20e46bbc1 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.stanza @@ -0,0 +1,21 @@ +# + +test.environments.osimage: + objtype=osimage + environvar=GITREPO=/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/gitrepo,OBJNAME=test.environments.osimage,SWDIR=/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/swdir + imagetype=linux + osarch=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, + 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 + profile=compute + provmethod=netboot + rootimgdir=/install/custom/test.environments.osimage + synclists=/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/environment/gitrepo/syncfiles/synclist + usercomment=OSMAJOR,test_environment_variables diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json similarity index 66% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json index 68752808b..92b5fa341 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.json +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.json @@ -2,13 +2,16 @@ "osimage": { "test.environments.osimage": { "basic_attributes": { - "arch": "ppc64le", - "distribution": "rhels7.5-alternate", - "osdistro": "rhels7.5-alternate-ppc64le", + "arch": "OSARCH", + "distribution": "OSVERS", + "osdistro": "OSVERS-OSARCH", "osname": "Linux" }, "deprecated": { - "comments": "rhels7.5,test_environment_variables" + "comments": [ + "OSMAJOR", + "test_environment_variables" + ] }, "filestosync": [ "{{GITREPO}}/syncfiles/synclist" @@ -16,10 +19,10 @@ "genimgoptions": { "permission": "755", "postinstall": [ - "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall", + "POSTINSTALL", "{{GITREPO}}/postinstall/test1.postinstall" ], - "rootimgdir": "/install/custom/test.environments.osimage" + "rootimgdir": "/install/custom/{{OBJNAME}}" }, "imagetype": "linux", "package_selection": { @@ -32,11 +35,11 @@ "" ], "pkgdir": [ - "/install/rhels7.5-alternate/ppc64le", + "PKGDIR", "{{SWDIR}}/pkgdir/" ], "pkglist": [ - "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist", + "PKGLIST", "{{GITREPO}}/pkglist/test1.pkglist", "{{GITREPO}}/pkglist/test2.pkglist" ] @@ -47,4 +50,4 @@ }, "schema_version": "1.0" } -#Version 2.14.2 (git commit 09f0772835afdc0f962c9e7fe8cef862e9505ad7, built Tue Jun 19 01:58:56 EDT 2018) +#Version 2.14.4 (git commit 722709b61e63feb7f6d3ee787afa8113eefbe27e, built Wed Sep 26 06:17:57 EDT 2018) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.yaml similarity index 63% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.yaml index c4f10968e..6ace48a22 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/environment/test.environments.osimage.update.yaml +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.update.yaml @@ -1,20 +1,22 @@ osimage: test.environments.osimage: basic_attributes: - arch: ppc64le - distribution: rhels7.5-alternate - osdistro: rhels7.5-alternate-ppc64le + arch: OSARCH + distribution: OSVERS + osdistro: OSVERS-OSARCH osname: Linux deprecated: - comments: rhels7.5,test_environment_variables + comments: + - OSMAJOR + - test_environment_variables filestosync: - '{{GITREPO}}/syncfiles/synclist' genimgoptions: permission: '755' postinstall: - - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall + - POSTINSTALL - '{{GITREPO}}/postinstall/test1.postinstall' - rootimgdir: /install/custom/test.environments.osimage + rootimgdir: /install/custom/{{OBJNAME}} imagetype: linux package_selection: otherpkgdir: @@ -24,10 +26,10 @@ osimage: - '{{GITREPO}}/otherpkglist/test2.otherpkglist' - '' pkgdir: - - /install/rhels7.5-alternate/ppc64le + - PKGDIR - '{{SWDIR}}/pkgdir/' pkglist: - - /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist + - PKGLIST - '{{GITREPO}}/pkglist/test1.pkglist' - '{{GITREPO}}/pkglist/test2.pkglist' provision_mode: netboot diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.yaml new file mode 100644 index 000000000..adb23f662 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/environment/test.environments.osimage.yaml @@ -0,0 +1,35 @@ +osimage: + test.environments.osimage: + basic_attributes: + arch: OSARCH + distribution: OSMAJOR + osdistro: OSVERS-OSARCH + osname: Linux + filestosync: + - {{GITREPO}}/syncfiles/synclist + deprecated: + comments: + - OSMAJOR + - test_environment_variables + genimgoptions: + permission: '755' + postinstall: + - POSTINSTALL + - {{GITREPO}}/postinstall/test1.postinstall + rootimgdir: /install/custom/{{OBJNAME}} + imagetype: linux + package_selection: + otherpkgdir: {{SWDIR}}/otherpkgdir/ + otherpkglist: + - {{GITREPO}}/otherpkglist/test1.otherpkglist + - {{GITREPO}}/otherpkglist/test2.otherpkglist, + pkgdir: + - PKGDIR + - {{SWDIR}}/pkgdir/ + pkglist: + - PKGLIST + - {{GITREPO}}/pkglist/test1.pkglist + - {{GITREPO}}/pkglist/test2.pkglist + provision_mode: netboot + role: compute +schema_version: '1.0' diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/exlist b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/exlist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/exlist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/exlist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file1.1 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file1.1 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file1.1 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file1.1 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.1 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file2.1 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.1 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file2.1 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file2.2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file2.2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.3 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file2.3 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file2.3 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file2.3 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.1 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file3.1 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.1 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file3.1 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file3.2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file3.2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.3 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file3.3 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file3.3 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file3.3 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.1 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file4.1 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.1 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file4.1 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.2 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file4.2 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.2 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file4.2 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.3 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file4.3 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file4.3 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file4.3 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file5 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file5 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file5 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file5 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file6 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file6 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file6 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file6 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file7 b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file7 similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/file7 rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/file7 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/otherpkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/otherpkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/otherpkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/otherpkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/partitionfile b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/partitionfile similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/partitionfile rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/partitionfile diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/pkglist b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/pkglist similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/pkglist rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/pkglist diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/postinstall b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/postinstall similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/postinstall rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/postinstall diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/synclists b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/synclists similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/synclists rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/synclists diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/template.tmpl b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/template.tmpl similarity index 52% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/template.tmpl rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/template.tmpl index 75bca79e0..bde0260dd 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/template.tmpl +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/template.tmpl @@ -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# diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/test_osimage.stanza b/xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/test_osimage.stanza similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/imagedata/test_osimage/test_osimage.stanza rename to xCAT-test/autotest/testcase/xcat_inventory/templates/imagedata/test_osimage/test_osimage.stanza diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/inventory.cfg b/xCAT-test/autotest/testcase/xcat_inventory/templates/inventory.cfg new file mode 100644 index 000000000..08030efd0 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/inventory.cfg @@ -0,0 +1,8 @@ +[backend] +type = 'git' +user = ci +workspace="master" + +[InfraRepo] +local_repo='/tmp/backend_test/git/repo' +working_dir=. diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/network.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/network.json similarity index 93% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/network.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/network.json index 263b936b6..43fcd4f8e 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/network.json +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/network.json @@ -12,5 +12,5 @@ } } }, - "schema_version": "1.0" + "schema_version": "2.0" } diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/network.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/network.yaml similarity index 90% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/network.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/network.yaml index 88e4114d4..e95c8b872 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/network.yaml +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/network.yaml @@ -7,5 +7,4 @@ network: pool: dynamicrange: 123.0.0.100-123.0.0.200 staticrange: 123.0.0.201-123.0.0.222 -schema_version: '1.0' - +schema_version: '2.0' diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/nics.csv b/xCAT-test/autotest/testcase/xcat_inventory/templates/nics.csv similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/nics.csv rename to xCAT-test/autotest/testcase/xcat_inventory/templates/nics.csv diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/nics.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/nics.json similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/nics.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/nics.json diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/nics.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/nics.yaml similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/nics.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/nics.yaml diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/node.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/node.json similarity index 97% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/node.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/node.json index f0a8df835..145198cd7 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/node.json +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/node.json @@ -22,8 +22,8 @@ "noderesnimserver": "nimserver", "noderesprimarynic": "primarynic", "noderesproxydhcp": "supportproxydhcp", - "servicenodeftpserver": "setupftp", - "servicenodenimserver": "setupnim", +# "servicenodeftpserver": "setupftp", +# "servicenodenimserver": "setupnim", "storagecontroller": "storagcontroller", "storageosvolume": "osvolume", "storagetype": "storagetype", @@ -114,6 +114,12 @@ } }, "network_info": { + "connections": { + "interface": "switchinterface", + "switch": "switch", + "switchport": "50", + "vlan": "switchvlan" + }, "nics": { "bond0": { "nicdevices": [ @@ -200,11 +206,11 @@ "hostnameprefixe": [ "eth0-" ], - "ips": [ - "1.1.1.1" - ], "hostnamesuffixes": [ "-eth0" + ], + "ips": [ + "1.1.1.1" ] }, "eth1": { @@ -270,17 +276,14 @@ "ip": "10.10.10.10", "mac": [ "42:d6:0a:03:05:08" - ], - "switch": "switch", - "switchinterface": "switchinterface", - "switchport": "50", - "switchvlan": "switchvlan" + ] }, "routenames": "routenames" }, "obj_info": { "description": "usercomment", - "groups": "bogusgroup" + "groups": "bogusgroup", + "grouptype": "static" }, "obj_type": "node", "position_info": { @@ -313,7 +316,9 @@ "xcatmaster": "xcatmaster" }, "security_info": { - "productkey": "productkey", + "productkey": { + "key": "productkey" + }, "zonename": "zonename" } }, @@ -428,6 +433,12 @@ } }, "network_info": { + "connections": { + "interface": "switchinterface", + "switch": "switch", + "switchport": "50", + "vlan": "switchvlan" + }, "nics": { "bond0": { "nicdevices": [ @@ -581,11 +592,7 @@ "ip": "10.10.10.10", "mac": [ "42:d6:0a:03:05:08" - ], - "switch": "switch", - "switchinterface": "switchinterface", - "switchport": "50", - "switchvlan": "switchvlan" + ] }, "routenames": "routenames" }, @@ -624,7 +631,9 @@ "xcatmaster": "xcatmaster" }, "security_info": { - "productkey": "productkey", + "productkey": { + "key": "productkey" + }, "remotecontrol": { "password": "password", "username": "username" @@ -751,6 +760,12 @@ } }, "network_info": { + "connections": { + "interface": "switchinterface", + "switch": "switch", + "switchport": "50", + "vlan": "switchvlan" + }, "linkports": "linkports", "nics": { "bond0": { @@ -905,11 +920,7 @@ "ip": "10.10.10.10", "mac": [ "42:d6:0a:03:05:08" - ], - "switch": "switch", - "switchinterface": "switchinterface", - "switchport": "50", - "switchvlan": "switchvlan" + ] }, "routenames": "routenames" }, @@ -948,7 +959,9 @@ "xcatmaster": "xcatmaster" }, "security_info": { - "productkey": "productkey", + "productkey": { + "key": "productkey" + }, "remotecontrol": { "password": "password", "remoteprotocol": "ssh", @@ -966,5 +979,5 @@ } } }, - "schema_version": "1.0" + "schema_version": "2.0" } diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/node.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/node.yaml similarity index 97% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/node.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/node.yaml index 172759d41..4c8b4382c 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/node.yaml +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/node.yaml @@ -21,8 +21,8 @@ node: noderesnimserver: nimserver noderesprimarynic: primarynic noderesproxydhcp: supportproxydhcp - servicenodeftpserver: setupftp - servicenodenimserver: setupnim +# servicenodeftpserver: setupftp +# servicenodenimserver: setupnim storagecontroller: storagcontroller storageosvolume: osvolume storagetype: storagetype @@ -101,6 +101,11 @@ node: pdu: pdu engine_type: power network_info: + connections: + interface: switchinterface + switch: switch + switchport: '50' + vlan: switchvlan nics: bond0: nicdevices: @@ -202,14 +207,11 @@ node: ip: 10.10.10.10 mac: - 42:d6:0a:03:05:08 - switch: switch - switchinterface: switchinterface - switchport: '50' - switchvlan: switchvlan routenames: routenames obj_info: description: usercomment groups: bogusgroup + grouptype: static obj_type: node position_info: chassis: chassis @@ -239,7 +241,8 @@ node: tftpserver: tftpserver xcatmaster: xcatmaster security_info: - productkey: productkey + productkey: + key: productkey zonename: zonename boguspdu: deprecated: @@ -340,6 +343,11 @@ node: pdu: pdu engine_type: power network_info: + connections: + interface: switchinterface + switch: switch + switchport: '50' + vlan: switchvlan nics: bond0: nicdevices: @@ -439,14 +447,11 @@ node: ip: 10.10.10.10 mac: - 42:d6:0a:03:05:08 - switch: switch - switchinterface: switchinterface - switchport: '50' - switchvlan: switchvlan routenames: routenames obj_info: description: usercomment groups: bogusgroup + grouptype: static obj_type: node position_info: chassis: chassis @@ -476,7 +481,8 @@ node: tftpserver: tftpserver xcatmaster: xcatmaster security_info: - productkey: productkey + productkey: + key: productkey remotecontrol: password: password username: username @@ -587,6 +593,11 @@ node: pdu: pdu engine_type: power network_info: + connections: + interface: switchinterface + switch: switch + switchport: '50' + vlan: switchvlan linkports: linkports nics: bond0: @@ -687,14 +698,11 @@ node: ip: 10.10.10.10 mac: - 42:d6:0a:03:05:08 - switch: switch - switchinterface: switchinterface - switchport: '50' - switchvlan: switchvlan routenames: routenames obj_info: description: usercomment groups: bogusgroup + grouptype: static obj_type: node position_info: chassis: chassis @@ -724,7 +732,8 @@ node: tftpserver: tftpserver xcatmaster: xcatmaster security_info: - productkey: productkey + productkey: + key: productkey remotecontrol: password: password remoteprotocol: ssh @@ -737,5 +746,4 @@ node: username: snmpusername version: SNMPv1 zonename: zonename -schema_version: '1.0' - +schema_version: '2.0' diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.json new file mode 100644 index 000000000..285eb92b1 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.json @@ -0,0 +1,40 @@ +{ + "osimage": { + "testosimage1": { + "basic_attributes": { + "arch": "ppc64le", + "distribution": "sles12.2", + "osdistro": "sles12.2-ppc64le" + }, + "filestosync": [ + "/install/custom/netboot/sles/compute.synclist" + ], + "genimgoptions": { + "exlist": [ + "/opt/xcat/share/xcat/netboot/sles/compute.sles12.ppc64le.exlist" + ], + "postinstall": [ + "/opt/xcat/share/xcat/netboot/sles/compute.sles12.ppc64le.postinstall" + ], + "rootfstype": "nfs", + "rootimgdir": "/install/netboot/sles12.2/ppc64le/compute" + }, + "imagetype": "linux", + "package_selection": { + "otherpkgdir": [ + "/install/post/otherpkgs/sles12.2/ppc64le" + ], + "pkgdir": [ + "/install/sles12.2/ppc64le" + ], + "pkglist": [ + "/opt/xcat/share/xcat/netboot/sles/compute.sles12.ppc64le.pkglist" + ] + }, + "provision_mode": "statelite", + "role": "compute" + } + }, + "schema_version": "2.0" +} +#Version 2.14.5 (git commit e9d8db94e349c383a6686ecfd853536abe7a8c2b, built Wed Nov 21 06:17:14 EST 2018) diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.yaml new file mode 100644 index 000000000..a7287aede --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/osimage.yaml @@ -0,0 +1,28 @@ +osimage: + testosimage1: + basic_attributes: + arch: ppc64le + distribution: sles12.2 + osdistro: sles12.2-ppc64le + filestosync: + - /install/custom/netboot/sles/compute.synclist + genimgoptions: + exlist: + - /opt/xcat/share/xcat/netboot/sles/compute.sles12.ppc64le.exlist + postinstall: + - /opt/xcat/share/xcat/netboot/sles/compute.sles12.ppc64le.postinstall + rootfstype: nfs + rootimgdir: /install/netboot/sles12.2/ppc64le/compute + imagetype: linux + package_selection: + otherpkgdir: + - /install/post/otherpkgs/sles12.2/ppc64le + pkgdir: + - /install/sles12.2/ppc64le + pkglist: + - /opt/xcat/share/xcat/netboot/sles/compute.sles12.ppc64le.pkglist + provision_mode: statelite + role: compute +schema_version: '2.0' + +#Version 2.14.5 (git commit e9d8db94e349c383a6686ecfd853536abe7a8c2b, built Wed Nov 21 06:17:14 EST 2018) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/passwd.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/passwd.json similarity index 85% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/passwd.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/passwd.json index ca7f4bb78..73dcb1f71 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/passwd.json +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/passwd.json @@ -6,5 +6,5 @@ "username": "root" } }, - "schema_version": "1.0" + "schema_version": "2.0" } diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/passwd.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/passwd.yaml similarity index 78% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/passwd.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/passwd.yaml index 1225761cb..fca26c76e 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/passwd.yaml +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/passwd.yaml @@ -3,5 +3,4 @@ passwd: cryptmethod: md5 password: cluster username: root -schema_version: '1.0' - +schema_version: '2.0' diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/route.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/route.json similarity index 89% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/route.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/route.json index aa2b9febe..c66955e38 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/route.json +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/route.json @@ -8,5 +8,5 @@ "usercomment": "hello world" } }, - "schema_version": "1.0" + "schema_version": "2.0" } diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/route.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/route.yaml similarity index 84% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/route.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/route.yaml index 5afda5a8d..a75a99bca 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/route.yaml +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/route.yaml @@ -5,5 +5,4 @@ route: mask: 255.0.0.0 net: 100.0.0.0 usercomment: hello world -schema_version: '1.0' - +schema_version: '2.0' diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/site.json b/xCAT-test/autotest/testcase/xcat_inventory/templates/site.json similarity index 93% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/site.json rename to xCAT-test/autotest/testcase/xcat_inventory/templates/site.json index 6f86279a4..473983a25 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/site.json +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/site.json @@ -1,13 +1,13 @@ { - "schema_version": "1.0", + "schema_version": "2.0", "site": { "clustersite": { "dbtracelevel": "1", "dhcplease": "10240", "disjointdhcps": "0", "httpport": "80", - "sharedinstall": "no", "managedaddressmode": "dhcp", + "sharedinstall": "no", "sshbetweennodes": "ALLGROUPS", "xcatdebugmode": "0", "xcatdport": "3001", diff --git a/xCAT-test/autotest/testcase/xcat-inventory/templates/site.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/site.yaml similarity index 71% rename from xCAT-test/autotest/testcase/xcat-inventory/templates/site.yaml rename to xCAT-test/autotest/testcase/xcat_inventory/templates/site.yaml index 6a1e219a5..e58fc942e 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/templates/site.yaml +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/site.yaml @@ -1,15 +1,14 @@ -schema_version: '1.0' +schema_version: '2.0' site: clustersite: dbtracelevel: '1' dhcplease: '10240' disjointdhcps: '0' httpport: '80' + managedaddressmode: dhcp sharedinstall: 'no' - managedaddressmode: 'dhcp' - sshbetweennodes: 'ALLGROUPS' + sshbetweennodes: ALLGROUPS xcatdebugmode: '0' xcatdport: '3001' xcatiport: '3002' xcatlport: '3003' - diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/cluster.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/cluster.yaml new file mode 100644 index 000000000..7b9b261b6 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/cluster.yaml @@ -0,0 +1,124 @@ +network: + prov: + basic_attr: + gateway: 10.6.7.1 + mask: 255.0.0.0 + net: 10.6.7.0 +node: + nodetorm: + device_type: server + obj_info: + groups: all + obj_type: node + role: compute + node2: + device_type: server + obj_info: + groups: all + obj_type: node + role: compute + xcatdefaults: + device_type: server + engines: + netboot_engine: + engine_info: + postbootscripts: otherpkgs + postscripts: syslog,remoteshell,syncfiles + obj_type: group + role: compute +passwd: + ipmi: + password: admin + username: ADMIN + omapi: + password: MnJKd01IWGtzYUNoY3FWZ29mRkdFcFhkbnBRNlBtYmg= + username: xcat_key + switch: + password: admin + username: root + system: + password: cluster + username: root +policy: + '1': + name: root + rule: allow + '1.2': + name: xcatmn + rule: trusted + '2': + commands: getbmcconfig + rule: allow + '2.1': + commands: remoteimmsetup + rule: allow + '2.3': + commands: lsxcatd + rule: allow + '3': + commands: nextdestiny + rule: allow + '4': + commands: getdestiny + rule: allow + '4.4': + commands: getpostscript + rule: allow + '4.5': + commands: getcredentials + rule: allow + '4.6': + commands: syncfiles + rule: allow + '4.7': + commands: litefile + rule: allow + '4.8': + commands: litetree + rule: allow + '4.9': + commands: getadapter + rule: allow +route: {} +schema_version: '2.0' +site: + clustersite: + SNsyncfiledir: /var/xcat/syncfiles + auditnosyslog: '0' + auditskipcmds: ALL + blademaxp: '64' + cleanupxcatpost: 'no' + consoleondemand: 'no' + databaseloc: /var/lib + db2installloc: /mntdb2 + dhcplease: '43200' + dnshandler: ddns + enableASMI: 'no' + forwarders: 10.6.29.1,10.0.0.101 + fsptimeout: '0' + installdir: /install + ipmimaxp: '64' + ipmiretries: '3' + ipmitimeout: '2' + master: 10.6.7.1 + maxssh: '8' + nameservers: 10.6.7.1 + nodesyncfiledir: /var/xcat/node/syncfiles + powerinterval: '0' + ppcmaxp: '64' + ppcretry: '3' + ppctimeout: '0' + sharedtftp: '1' + sshbetweennodes: ALLGROUPS + syspowerinterval: '0' + tftpdir: /tftpboot + timezone: Universal + useNmapfromMN: 'no' + vsftp: n + xcatconfdir: /etc/xcat + xcatdport: '3001' + xcatiport: '3002' + xcatsslversion: TLSv1 +zone: {} + +#Version 2.14.5 (git commit fc0fb3fca198aa298a114f6124749275e7d81f8c, built Thu Dec 6 22:20:43 EST 2018) diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/credential/credential/definition.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/credential/credential/definition.yaml new file mode 100644 index 000000000..897ec8a2e --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/credential/credential/definition.yaml @@ -0,0 +1,11 @@ +credential: + credential: + CA: + certificate: /etc/xcat/ca/ca-cert.pem + private_key: /etc/xcat/ca/private/ca-key.pem + client: + root: /root/.xcat/client-cred.pem + server: /etc/xcat/cert/server-cred.pem +schema_version: '2.0' + +#Version 2.14.5 (git commit fc0fb3fca198aa298a114f6124749275e7d81f8c, built Thu Dec 6 22:20:43 EST 2018) \ No newline at end of file diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/osimage/osimage1/definition.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/osimage/osimage1/definition.yaml new file mode 100644 index 000000000..7bb948f46 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/osimage/osimage1/definition.yaml @@ -0,0 +1,9 @@ +osimage: + osimage1: + basic_attributes: + distribution: rh8 + imagetype: linux + provision_mode: netboot +schema_version: '2.0' + +#Version 2.14.5 (git commit fc0fb3fca198aa298a114f6124749275e7d81f8c, built Thu Dec 6 22:20:43 EST 2018) \ No newline at end of file diff --git a/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/osimage/osimage2/definition.yaml b/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/osimage/osimage2/definition.yaml new file mode 100644 index 000000000..10d0b09a1 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat_inventory/templates/testcluster_backend/osimage/osimage2/definition.yaml @@ -0,0 +1,9 @@ +osimage: + osimage2: + basic_attributes: + distribution: sles15 + imagetype: linux + provision_mode: netboot +schema_version: '2.0' + +#Version 2.14.5 (git commit fc0fb3fca198aa298a114f6124749275e7d81f8c, built Thu Dec 6 22:20:43 EST 2018) \ No newline at end of file diff --git a/xCAT-test/autotest/testcase/xcat-inventory/validatehelper b/xCAT-test/autotest/testcase/xcat_inventory/validatehelper similarity index 100% rename from xCAT-test/autotest/testcase/xcat-inventory/validatehelper rename to xCAT-test/autotest/testcase/xcat_inventory/validatehelper diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful index b7bff8f0b..603d19fa0 100644 --- a/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful +++ b/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful @@ -1,6 +1,7 @@ start:reg_set_xcatdebugmode_off_rhels_diskful_flat os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 @@ -57,6 +58,7 @@ end start:reg_set_xcatdebugmode_value_one_rhels_diskful_flat os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 @@ -144,6 +146,7 @@ end start:reg_set_xcatdebugmode_value_two_rhels_diskful_flat os:linux description:site.xcatdebugmode value is 2, , the following logs will be shown and ssh is supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 @@ -231,6 +234,7 @@ end start:set_xcatdebugmode_off_rhels_diskful_flat_p8_le os:Linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:chtab key=xcatdebugmode site.value="0" check:rc==0 @@ -283,6 +287,7 @@ end start:set_xcatdebugmode_value_one_rhels_diskful_flat_p8_le os:Linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 @@ -372,6 +377,7 @@ end start:set_xcatdebugmode_value_two_rhels_diskful_flat_p8_le os:Linux description:site.xcatdebugmode value is 2, the following logs will be shown and ssh is supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful index 4191e6c51..f8033badc 100644 --- a/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful +++ b/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful @@ -1,6 +1,7 @@ start:reg_set_xcatdebugmode_off_sles_diskful_flat os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN @@ -67,6 +68,7 @@ end start:reg_set_xcatdebugmode_value_one_sles_diskful_flat os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 @@ -160,6 +162,7 @@ end start:set_xcatdebugmode_off_sles_diskful_flat_p8_le os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:chtab key=xcatdebugmode site.value="0" check:rc==0 @@ -221,6 +224,7 @@ end start:set_xcatdebugmode_value_one_sles_diskful_flat_p8_le os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful index bef44b866..70d8cc3a9 100644 --- a/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful +++ b/xCAT-test/autotest/testcase/xcatdebugmode/ubuntu_xcatdebugmode_diskful @@ -1,6 +1,7 @@ start:set_xcatdebugmode_off_ubuntule_diskful os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:chtab key=xcatdebugmode site.value="0" check:rc==0 cmd:copycds $$ISO @@ -44,6 +45,7 @@ end start:set_xcatdebugmode_off_ubuntux_vm_diskful os:linux description:site.xcatdebugmode value is 0, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:makedns -n check:rc==0 cmd:sleep 60 @@ -86,6 +88,7 @@ end start:set_xcatdebugmode_value_one_ubuntule_diskful os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 cmd:chtab key=xcatdebugmode site.value="1" @@ -157,6 +160,7 @@ end start:set_xcatdebugmode_value_one_ubuntux_vm_diskful os:linux description:site.xcatdebugmode value is 1, the following logs will be shown and ssh is not supported. +label:flat_cn_diskful,invoke_provision,xcatdebugmode cmd:echo " " > /var/log/xcat/computes.log check:rc==0 diff --git a/xCAT-test/autotest/testcase/xdshbak/cases0 b/xCAT-test/autotest/testcase/xdshbak/cases0 index d956d6d86..1cbc6aa9b 100644 --- a/xCAT-test/autotest/testcase/xdshbak/cases0 +++ b/xCAT-test/autotest/testcase/xdshbak/cases0 @@ -1,26 +1,31 @@ start:xdshbak_h +label:others,parallel_cmds cmd:xdshbak -h check:rc==0 check:output=~Usage end start:xdshbak_display +label:others,parallel_cmds cmd:xdsh $$CN cat /etc/hosts | xdshbak check:rc==0 check:output=~HOST:$$CN end start:xdshbak_c +label:others,parallel_cmds cmd:xdsh $$CN pwd |xdshbak -c check:rc==0 end start:xdshbak_q +label:others,parallel_cmds cmd:xdsh $$CN ls / |xdshbak -q check:rc==0 end start:xdshbak_x +label:others,parallel_cmds cmd:xdsh $$CN cat /etc/passwd|xdshbak -c check:rc==0 end diff --git a/xCAT-test/pods/man1/xcatperftest.1.pod b/xCAT-test/pods/man1/xcatperftest.1.pod index 19bea2307..774fc5bb0 100644 --- a/xCAT-test/pods/man1/xcatperftest.1.pod +++ b/xCAT-test/pods/man1/xcatperftest.1.pod @@ -6,28 +6,30 @@ B - Run xCAT command performance baseline testing on fake nodes. B [B<-?|-h>] +[B=y] B [I] + [B=y] [B=y] B [I] =head1 DESCRIPTION -The xcatperftest command runs commandes defined in a command list file and get their execution response time baseline for performance purpose. -The xcatperftest command is part of the xCAT package xCAT-test, and you can run it standalone or leverage it to build up your automation test cases. +The B command runs commands defined in a command list file and get their execution response time baseline for performance purpose. +The B command is part of the xCAT package B, and you can run it standalone or leverage it to build up your automation test cases. -Any commands could be defined in the command list file, however, it is recommended that the one-time initial configuration are well prepared prior to run xcatperftest command. -For example, the network object, osdistor and osimage image objects. +Any command could be defined in the command list file, however, it is recommended that the one-time initial configuration is well prepared prior to running B command. +For example, the network object, osdistro and osimage image objects. -Follow the below steps to run xcatperftest command: +Follow the steps below to run B command: -1, Install xCAT-test on a xCAT management nodes. +1. Install B on a xCAT management node. -2, Prepare a command list in which the commands are what you want to messure. +2. Prepare a command list with the commands you want to measure. -3, Prepare the initial configuration based on the command list to make sure all commands could be executed in techinal. +3. Prepare the initial configuration based on the command list to make sure all commands could be executed in techinal. -4, Run xcatperftest with the total fake nodes number and the above command list file. +4. Run B with the total fake nodes number and the above command list file. -Node: It is suggested to run the command in background as it normally takes long time to finish all the performanc testing with large amount of fake nodes. +Node: It is suggested to run the command in background as it normally takes long time to finish all the performance testing with large amount of fake nodes. =head1 OPTIONS @@ -37,7 +39,7 @@ Node: It is suggested to run the command in background as it normally takes long Display usage message. -=item +=item I Specifies the command list file with full-path. xCAT supports an example command file: /opt/xcat/share/xcat/tools/autotest/perfcmds.lst @@ -56,7 +58,7 @@ Total number of fake nodes will be defined during the testing. =head1 COMMAND LIST FILE -The command list file is in flat text format, the testing framework will parse the file line by line, here is an example of the commannd list file: +The command list file is in flat text format, the testing framework will parse the file line by line, here is an example of the command list file: #SERIES# 1,50,100,250,500,1000,2500,5000 mkdef -z -f < #STANZ# @@ -75,19 +77,19 @@ The command list file is in flat text format, the testing framework will parse t B: Each line defines one command, and the commands dependency should be handled by the line order. -If you define a node range series line (started with #SERIES#) in this file, xcatperftest will run the command for each node range defined in series line. +If you define a node range series line (started with B<#SERIES#>) in this file, xcatperftest will run the command for each node range defined in series line. B<#SERIES#> To define a node range series, and the series should be an comma split incremental number sequence. B<#STANZ#> It will be replaced with real stanz file path when this command line runs. -B<#NODES#> It will be replaced with real node range defined in #SERIES# line when this command line runs. If no series line, the node group will be used. +B<#NODES#> It will be replaced with real node range defined in B<#SERIES#> line when this command line runs. If no series line, the node group will be used. B<#PERFGRP#> It will be replaced with node group when this command line runs. =head1 ENVIRONMENT VARIABLE -The xcatperftest command supports be customized by some environment variables. +The B command supports customization by some environment variables. B @@ -110,15 +112,15 @@ It must be a string like 'A.B' and no need to be defined in 'networks' table. B -Optional, The node template name used for generating fake nodes. By default, it will be auto-detected according to the current arch. +Optional, the node template name used for generating fake nodes. By default, it will be auto-detected according to the current arch. B -Optional, Indicate no real commands will be executed if the environment variable is set. +Optional, indicate no real commands will be executed if the environment variable is set. B -Optional, Indicate no new fake nodes will be created if the environment variable is set. +Optional, indicate no new fake nodes will be created if the environment variable is set. =head1 EXAMPLES @@ -142,6 +144,12 @@ To run the performance testing for the commands defined in /opt/xcat/share/xcat/ PERF_NOCREATE=y xcatperftest 5000 /opt/xcat/share/xcat/tools/autotest/perfcmds.lst +=item 4. + +To run the performance testing for the commands defined in /tmp/cmd.lst in existing xCAT environment: + + xcatperftest run /tmp/cmd.lst + =back =head1 FILES diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 4923db1c4..500f33b08 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -71,7 +71,7 @@ my $restore = 0; my $quiet = 0; my $search_expression = undef; -my %label_map; +my @total_label_set=(); my %case_label_map; my @label_order = (["xcat_install"], ["mn_only"], @@ -169,11 +169,17 @@ if ($rst) { } if($search_expression){ - $rst = scan_existed_labels(\%case_label_map, \%label_map, \$error); + $rst = scan_existed_labels(\%case_label_map, \@total_label_set, \$error); if($rst) { log_this($running_log_fd, "$error"); to_exit(1); } + if($xcatdebug){ + print "------The total labels are:---------\n"; + print Dumper \@total_label_set; + print "------The case and its labels:-------\n"; + print Dumper \%case_label_map + } } $rst = calculate_cases_to_be_run(\@cases_to_be_run, \$error); @@ -247,19 +253,22 @@ if (defined $list) { to_exit(1); } } elsif ($list eq "labelinfo"){ - $rst = scan_existed_labels(\%case_label_map, \%label_map, \$error); + $rst = scan_existed_labels(\%case_label_map, \@total_label_set, \$error); + if($xcatdebug){ + print "------The total labels are:---------\n"; + print Dumper \@total_label_set; + print "------The case and its labels:-------\n"; + print Dumper \%case_label_map + } my %label_conut; my %case_label_str_map; foreach my $case (keys %case_label_map){ - if($case_label_map{$case}{label_str}){ - $case_label_str_map{$case} = $case_label_map{$case}{label_str}; - my @labels = split(",", $case_label_map{$case}{label_str}); - foreach my $label (@labels){ - if(!exists $label_conut{$label}){ - $label_conut{$label}=1; - }else{ - $label_conut{$label}+=1; - } + $case_label_str_map{$case} = join (",", @{$case_label_map{$case}{labels}}); + foreach my $label (@{$case_label_map{$case}{labels}}){ + if(!exists $label_conut{$label}){ + $label_conut{$label}=1; + }else{ + $label_conut{$label}+=1; } } } @@ -268,7 +277,7 @@ if (defined $list) { log_this($running_log_fd, "The labels of cases:"); log_this($running_log_fd, "-------------------------------"); print_table(\%case_label_str_map); - my $label_total_num=keys %label_conut; + my $label_total_num=@total_label_set; log_this($running_log_fd, "\n-------------------------------"); log_this($running_log_fd, "There are $label_total_num different labels"); log_this($running_log_fd, "The number of cases of each label:"); @@ -276,9 +285,20 @@ if (defined $list) { print_table(\%label_conut); log_this($running_log_fd, "-------------------------------"); my $total_case = keys %case_label_map; - my $case_with_label_num = keys %case_label_str_map; - log_this($running_log_fd, "There are $total_case cases totaly, there are $case_with_label_num cases with label."); - + my @cases_without_manual_labels=(); + foreach my $case ( keys %case_label_map){ + if(! exists ($case_label_map{$case}{manual_labels})){ + push @cases_without_manual_labels, $case; + } + } + my $case_without_manual_label_num = @cases_without_manual_labels; + log_this($running_log_fd, "There are $total_case cases totaly, there are $case_without_manual_label_num cases without manual label."); + log_this($running_log_fd, "-------------------------------"); + log_this($running_log_fd, "The cases without manual label are:"); + log_this($running_log_fd, "-------------------------------"); + foreach my $case (sort @cases_without_manual_labels){ + print "$case\n"; + } } to_exit(0); @@ -1914,7 +1934,7 @@ sub gettablevalue sub print_table { my $msg_ref = shift; - my $desiredwidth = 120; + my $desiredwidth = 160; my $screenwidth = (`tput cols` + 0); my $finallen = ($screenwidth > $desiredwidth ? $desiredwidth : $screenwidth); @@ -1995,85 +2015,51 @@ sub filter_case_by_label { my $rest_cases_to_be_run_ref = shift; my $error_ref = shift; - my @filters = (); - my $rst = parse_filters(\@filters, $error_ref); - if($rst){ - return 1; - } - #print Dumper \@filters; - my @targetcases = (); foreach my $case (keys %{$case_label_map_ref}) { if(@$cases_to_be_run_ref){ - next unless(grep { /^$case$/ } @$cases_to_be_run_ref); + next unless(inarray($cases_to_be_run_ref, $case)); } - foreach my $f (@filters) { - my $hit = 1; - foreach my $c (@$f) { - if (($c > 0) and (($case_label_map_ref->{$case}->{label} & $c) == 0)) { - $hit = 0; - last; - } elsif (($c < 0) and (($case_label_map_ref->{$case}->{label} & ($c * -1)) != 0)) { - $hit = 0; - last; + my $match_filter=0; + my @exps = split('\|', $search_expression); + foreach my $e (@exps) { + $e =~ s/\+/ /g; + $e =~ s/\-/ -/g; + my $match_sub_filter = 1; + my @tags = split(' ', $e); + foreach my $t (@tags) { + if ($t =~ /^-(.+)/) { + $match_sub_filter = 0 if (inarray ($case_label_map_ref->{$case}->{labels}, $1)); + }else{ + $match_sub_filter = 0 unless (inarray ($case_label_map_ref->{$case}->{labels}, $t)); } + last unless ($match_sub_filter); } - push @targetcases, $case if ($hit and !(grep { /^$case$/ } @targetcases)); - } - } + if ($match_sub_filter){ + $match_filter =1; + last; + } + } + push @targetcases, $case if ($match_filter); + } #print Dumper \@targetcases; + #order cases which matches filters by Vertical Dimension Labels for (my $i = 0 ; $i <= $#label_order ; $i++) { foreach my $l (@{ $label_order[$i] }) { foreach my $c (@targetcases) { - push @{$rest_cases_to_be_run_ref}, $c if (defined ($label_map{$l}) && (($case_label_map_ref->{$c}->{label} & $label_map{$l}) != 0)); + push @{$rest_cases_to_be_run_ref}, $c if (inarray($case_label_map_ref->{$c}->{labels}, $l)); } } } return 0; } -sub parse_filters{ - my $filters_ref=shift; - my $error_ref=shift; - - my $index = 0; - my @undefined_labels; - my @exps = split('\|', $search_expression); - foreach my $e (@exps) { - $e =~ s/\+/ /g; - $e =~ s/\-/ -/g; - my @tags = split(' ', $e); - foreach my $t (@tags) { - if ($t =~ /^-(.+)/) { - my $tmpt = $1; - unless (grep { /^$tmpt$/ } keys(%label_map)) { - push @undefined_labels, $tmpt; - next; - } - push @{ $filters_ref->[$index] }, ($label_map{$tmpt} * -1); - } else { - unless (grep { /^$t$/ } keys(%label_map)) { - push @undefined_labels, $t; - next; - } - push @{ $filters_ref->[$index] }, $label_map{$t}; - } - } - $index += 1; - } - -# if (@undefined_labels) { -# $$error_ref = "Label \"" . join(",", @undefined_labels) . "\" are not exist. Existed labels are: " . join(" ", keys(%label_map)); -# return 1; -# } - return 0; -} sub scan_existed_labels { my $case_label_map_ref = shift; - my $label_map_ref = shift; + my $total_label_set_ref = shift; my $error_ref = shift; my $label_value = 1; @@ -2084,6 +2070,8 @@ sub scan_existed_labels { foreach my $file (@files) { my @output = runcmd("grep -E \"^start:|^hcp:|^os:|^arch:|^label:\" $file"); my $current_case_name = ""; + my $cmd_cases_belong_to = calculate_case_belong_to_which_cmd($file); + #print "cmd_cases_belong_to = $cmd_cases_belong_to\n"; foreach my $line (@output) { $line =~ s/^\s+|#[^!].+|\s+$//g; @@ -2093,45 +2081,85 @@ sub scan_existed_labels { my @labels = (); if ($line =~ /^start\s*:\s*(.*)/) { $current_case_name = $1; - $case_label_map_ref->{$current_case_name}->{label} = 0; - $case_label_map_ref->{$current_case_name}->{label_str} = ""; + if ($cmd_cases_belong_to){ + $case_label_map_ref->{$current_case_name}->{labels} = [$cmd_cases_belong_to]; + push @$total_label_set_ref, $cmd_cases_belong_to unless(inarray($total_label_set_ref, $cmd_cases_belong_to)); + }else{ + $case_label_map_ref->{$current_case_name}->{labels} = []; + } } elsif ($line =~ /^os\s*:\s*(\w[\w\, ]+)/) { my @oss = split(",", $1); foreach my $os (@oss) { $os =~ s/^\s+|\s+$//g; - push @labels, "os=$os"; + my $label_str = lc("os=$os"); + push @{$case_label_map_ref->{$current_case_name}->{labels}}, $label_str unless(inarray($case_label_map_ref->{$current_case_name}->{labels}, $label_str)); + push @$total_label_set_ref, $label_str unless(inarray($total_label_set_ref, $label_str)); } + } elsif ($line =~ /^arch\s*:\s*(\w[\w\, ]+)/) { my @archs = split(",", $1); foreach my $arch (@archs) { $arch =~ s/^\s+|\s+$//g; - push @labels, "arch=$arch"; + my $label_str = lc("arch=$arch"); + push @{$case_label_map_ref->{$current_case_name}->{labels}}, $label_str unless(inarray($case_label_map_ref->{$current_case_name}->{labels}, $label_str)); + push @$total_label_set_ref, $label_str unless(inarray($total_label_set_ref, $label_str)); } } elsif ($line =~ /^hcp\s*:\s*(\w[\w\, ]+)/) { my @hcps = split(",", $1); foreach my $hcp (@hcps) { $hcp =~ s/^\s+|\s+$//g; - push @labels, "hcp=$hcp"; + my $label_str = lc("hcp=$hcp"); + push @{$case_label_map_ref->{$current_case_name}->{labels}}, $label_str unless(inarray($case_label_map_ref->{$current_case_name}->{labels}, $label_str)); + push @$total_label_set_ref, $label_str unless(inarray($total_label_set_ref, $label_str)); + } } elsif ($line =~ /^label\s*:\s*(.+)/) { my @tmp = split(",", $1); - foreach my $l (@tmp){ - $l =~ s/^\s+|\s+$//g; - push @labels, $l; - } - } - - if($current_case_name){ - foreach my $t (@labels) { - unless (exists $label_map_ref->{$t}) { - $label_map_ref->{$t} = $label_value; - $label_value *= 2; - } - $case_label_map_ref->{$current_case_name}->{label} |= $label_map_ref->{$t}; - $case_label_map_ref->{$current_case_name}->{label_str} .= "$t,"; + foreach my $label_str (@tmp){ + $label_str =~ s/^\s+|\s+$//g; + push @{$case_label_map_ref->{$current_case_name}->{labels}}, $label_str unless(inarray($case_label_map_ref->{$current_case_name}->{labels}, $label_str)); + push @{$case_label_map_ref->{$current_case_name}->{manual_labels}},$label_str unless(inarray($case_label_map_ref->{$current_case_name}->{manual_labels}, $label_str)); + push @$total_label_set_ref, $label_str unless(inarray($total_label_set_ref, $label_str)); } } } + } return 0; } + +sub calculate_case_belong_to_which_cmd { + my $file_path = shift; + my $command = undef; + + $file_path =~ s|[\/]{2,}|\/|g; + if ($file_path =~ /\/autotest\/testcase/) { + my @path_str = split("/", $file_path); + #print Dumper \@path_str; + my $index = 0; + foreach my $str (@path_str) { + if ($str =~ "autotest") { + $index += 1; + last; + } + $index += 1; + } + #print "index=$index\n"; + $command = lc($path_str[ $index + 1 ]); + } + return $command; +} + +sub inarray{ + my $array = shift; + my $element = shift; + my $hit = 0; + + foreach my $e (@$array){ + if (lc("$e") eq lc("$element")){ + $hit = 1; + last; + } + } + return $hit; +} diff --git a/xCAT/postscripts/addsiteyum b/xCAT/postscripts/addsiteyum index 69e11ee69..d7232dabc 100755 --- a/xCAT/postscripts/addsiteyum +++ b/xCAT/postscripts/addsiteyum @@ -1,7 +1,12 @@ #!/bin/bash +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi cd `dirname $0` if [ ! -d repos/$OSVER/$ARCH ]; then - logger -t xcat -p local4.err "addsiteyum: repos/$OSVER/$ARCH is not a directory" + logger -t $log_label -p local4.err "addsiteyum: repos/$OSVER/$ARCH is not a directory" exit -1; fi for i in repos/$OSVER/$ARCH/* diff --git a/xCAT/postscripts/configbond b/xCAT/postscripts/configbond index 659561d32..8b340428d 100755 --- a/xCAT/postscripts/configbond +++ b/xCAT/postscripts/configbond @@ -40,6 +40,12 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then . $str_dir_name/xcatlib.sh fi +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + # Subroutine to display message and pass it to syslog # Usage: showmsg "message to putput" ["error"] function showmsg() { @@ -47,9 +53,9 @@ function showmsg() { error=$2 if [ -n "$error" ]; then - $(logger -t xcat -p local4.err $msg) + $(logger -t $log_label -p local4.err $msg) else - $(logger -t xcat -p local4.info $msg) + $(logger -t $log_label -p local4.info $msg) fi echo $msg diff --git a/xCAT/postscripts/configib b/xCAT/postscripts/configib index 0deac3f8d..eb3d56f1b 100755 --- a/xCAT/postscripts/configib +++ b/xCAT/postscripts/configib @@ -23,6 +23,12 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then . $str_dir_name/xcatlib.sh fi +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + #This is the number of ports for each ib adpator. portnum=1 if [ -n "$NIC_IBAPORTS" ]; then @@ -86,7 +92,7 @@ then if [ $? -ne 0 ] then echo "Not found the driver dameon: rdma or openibd" - logger -p local4.info -t xcat "Not found the driver dameon: rdma or openibd" + logger -p local4.info -t $log_label "Not found the driver dameon: rdma or openibd" exit fi fi @@ -153,7 +159,7 @@ then OS_name="ubuntu" else echo "Unsupported to config IB on this OS!" - logger -p local4.info -t xcat "Unsupported to config IB on this OS!" + logger -p local4.info -t $log_label "Unsupported to config IB on this OS!" exit fi @@ -269,7 +275,7 @@ do if [ -z "$nicnets" ]; then echo "No network defined for $nic" - logger -p local4.info -t xcat "No network defined for $nic" + logger -p local4.info -t $log_label "No network defined for $nic" continue fi @@ -342,7 +348,7 @@ do # Setup goodnics list if [ "$found" == "0" ]; then echo "Cannot find network $nicnet for $nic" - logger -p local4.info -t xcat "Cannot find network $nicnet for $nic" + logger -p local4.info -t $log_label "Cannot find network $nicnet for $nic" continue else if [ -z "$goodnics" ]; then @@ -605,7 +611,7 @@ netmask $netmask" >> /etc/network/interfaces else echo "Unsupported operating system" - logger -p local4.err -t xcat "Unsupported operating system" + logger -p local4.err -t $log_label "Unsupported operating system" fi elif [ $PLTFRM == "AIX" ]; then @@ -617,7 +623,7 @@ netmask $netmask" >> /etc/network/interfaces if [ $? -ne 0 ] then echo "$mltnum is not available." - logger -p local4.info -t xcat "$mltnum is not available." + logger -p local4.info -t $log_label "$mltnum is not available." continue fi @@ -680,7 +686,7 @@ then #/sbin/service $ib_driver restart if [ "$restart_ib_driver" = "1" ]; then echo "restart $ib_driver service" - logger -p local4.info -t xcat "restart $ib_driver service" + logger -p local4.info -t $log_label "restart $ib_driver service" restartservice $ib_driver fi for nic in `echo "$goodnics" | tr "," "\n"|sort -u` diff --git a/xCAT/postscripts/configinterface b/xCAT/postscripts/configinterface index cc75ea143..1ec8d0d8b 100755 --- a/xCAT/postscripts/configinterface +++ b/xCAT/postscripts/configinterface @@ -9,29 +9,57 @@ fi xcat_intf="/etc/network/interfaces.d/xCAT.intf" -MASTER=$(cat /var/lib/dhcp/dhclient.eth0.leases|sed -n 's/.*cumulus-provision-url.*http:\/\+\([^\/]\+\)\/.*/\1/p'|tail -1) -if [ -z "$MASTER" ]; then - echo "xCAT Master unset! Cannot download interface description" - exit 2 +if [ -f /xcatpost/mypostscript ]; then + MASTER=`grep '^MASTER_IP=' /xcatpost/mypostscript |cut -d= -f2|sed s/\'//g` fi +if [ -z "$MASTER" ]; then + MASTER=$(cat /var/lib/dhcp/dhclient.eth0.leases|sed -n 's/.*cumulus-provision-url.*http:\/\+\([^\/]\+\)\/.*/\1/p'|tail -1) + if [ -z "$MASTER" ]; then + echo "xCAT Master unset! Cannot download interface description" + exit 2 + fi +fi + +#Validate if this IP is reachable +ping $MASTER -c 1 >/dev/null +if [ $? -ne 0 ]; then + echo "ERROR: The xCAT Master ip address $MASTER is not reachable"; + exit 1; +fi + +ORIGFILE=/tmp/xCAT.intf.orig TMPINT=/tmp/xCAT.intf -rm $TMPINT 2>/dev/null +rm -f $TMPINT 2>/dev/null UPDATED=0 +DOWNLOADED=0 for name in $NODE ${GROUP//,/ } default; do curl -s -o $TMPINT -f http://${MASTER}/install/custom/sw_os/cumulus/interface/$name if [ -f $TMPINT ]; then + DOWNLOADED=1 if ! diff $TMPINT $xcat_intf > /dev/null; then - mv $TMPINT $xcat_intf + rm -f $ORIGFILE + cp $xcat_intf $ORIGFILE + mv -f $TMPINT $xcat_intf UPDATED=1 + echo "New interface file downloaded, keep old one to $ORIGFILE"; fi break fi done +if [ $DOWNLOADED -eq 1 ] && [ $UPDATED -eq 0 ]; then + echo "New interface file downloaded to $TMPINT, same as $xcat_intf file"; +fi + +if [ $DOWNLOADED -eq 0 ] && [ -f $xcat_intf ]; then + echo "NO new interface file downloaded, keep same $xcat_intf file"; +fi + if [ ! -f $xcat_intf ]; then UPDATED=1 + echo "NO new interface file downloaded, create a default $xcat_intf file"; echo "#This is sample interface file provided by xCAT" > $xcat_intf echo "# bridge-vlan-aware: set to yes to indicate that the bridge is VLAN-aware. " >> $xcat_intf diff --git a/xCAT/postscripts/confignics b/xCAT/postscripts/confignics index f5b6a228a..4718fbee9 100755 --- a/xCAT/postscripts/confignics +++ b/xCAT/postscripts/confignics @@ -18,6 +18,13 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then str_dir_name=`dirname $0` . $str_dir_name/xcatlib.sh fi + +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + error_code=0 #the nics' information contain: #1. ip address @@ -74,6 +81,10 @@ function findnetwork(){ eval str_temp=\$NETWORKS_LINE$num_i str_net=`echo $str_temp | awk -F'net=' '{print $2}' | awk -F'|' '{print $1}'` str_mask=`echo $str_temp | awk -F'mask=' '{print $2}' | awk -F'|' '{print $1}' | sed 's:^/::'` + if [ ! $str_mask ]; then + num_i=$((num_i+1)) + continue + fi echo $str_net | grep ':' > /dev/null if [ $? -ne 0 ];then if [ $flag_v6 -eq 0 ];then @@ -100,8 +111,7 @@ function findnetwork(){ fi num_i=$((num_i+1)) done - - echo "Error: Can not find the corresponding network defination for ip address: $str_ip ." + echo "Error: Can not find a valid network defination for ip address: $str_ip , make sure netname,net and mask are correct in networks table." error_code=1 } @@ -137,7 +147,7 @@ str_inst_nic='' str_ib_nics='' str_os_type=`uname | tr 'A-Z' 'a-z'` if [ "$str_os_type" = "aix" ];then - logger -t xcat -p local4.err "confignics: aix does not support in this build" + logger -t $log_label -p local4.err "confignics: aix does not support in this build" echo "confignics: aix does not support in this build" exit 1 fi @@ -166,7 +176,7 @@ then then if [ $bool_cfg_inst_nic -eq 1 -o $bool_remove -eq 1 -o ! -z "$num_iba_ports" ] then - logger -t xcat -p local4.info "confignics --script could Not be used with other options" + logger -t $log_label -p local4.info "confignics --script could Not be used with other options" echo "confignics --script could Not be used with other options" exit 1 fi @@ -175,7 +185,7 @@ then fi fi -logger -t xcat -p local4.info "confignics is called: config install nic:$bool_cfg_inst_nic, remove: $bool_remove, iba ports: $num_iba_ports" +logger -t $log_label -p local4.info "confignics is called: config install nic:$bool_cfg_inst_nic, remove: $bool_remove, iba ports: $num_iba_ports" echo "confignics on $NODE: config install nic:$bool_cfg_inst_nic, remove: $bool_remove, iba ports: $num_iba_ports" str_temp='' @@ -211,10 +221,10 @@ bool_exit_flag=0 #check the required attributes if [ -z "$NICIPS" ];then if [ $bool_cfg_inst_nic -eq 1 ];then - logger -t xcat -p local4.info "confignics: configure the install nic. " + logger -t $log_label -p local4.info "confignics: configure the install nic. " echo "confignics on $NODE:configure the install nic. " else - logger -t xcat -p local4.info "confignics: nicips attribute is not defined. " + logger -t $log_label -p local4.info "confignics: nicips attribute is not defined. " echo "confignics on $NODE: nicips attribute is not defined. " exit 1 fi @@ -275,7 +285,7 @@ if [ $bool_remove -eq 1 ];then continue fi - logger -t xcat -p local4.info "confignics: remove nic $str_temp_nic" + logger -t $log_label -p local4.info "confignics: remove nic $str_temp_nic" echo "confignics on $NODE: remove nic $str_temp_nic" configeth -r $str_temp_nic if [ $? -ne 0 ]; then @@ -305,13 +315,13 @@ do # don't run customized script for installnic if not specify the -s continue fi - logger -t xcat -p local4.info "confignics: processing custom scripts: ${array_temp[1]} for interface $key" + logger -t $log_label -p local4.info "confignics: processing custom scripts: ${array_temp[1]} for interface $key" echo "confignics on $NODE: processing custom scripts: ${array_temp[1]} for interface $key" ${array_temp[1]} else if [ "$key" = "$str_inst_nic" ];then if [ $bool_cfg_inst_nic -eq 1 ];then - logger -t xcat -p local4.info "confignics: call 'configeth $str_inst_nic'" + logger -t $log_label -p local4.info "confignics: call 'configeth $str_inst_nic'" echo "confignics on $NODE: call 'configeth -s $str_inst_nic" configeth -s $str_inst_nic if [ $? -ne 0 ]; then @@ -327,22 +337,20 @@ do elif [ `echo $key | grep -E 'ib[0-9]+'` ];then str_nic_type="infiniband" else - logger -t xcat -p local4.info "confignics: unknown nic type for $key: $str_value ." + logger -t $log_label -p local4.info "confignics: unknown nic type for $key: $str_value ." echo "confignics on $NODE: unknown nic type for $key: $str_value ." error_code=1 continue fi - str_network=$(checknetwork ${array_temp[0]}) echo "$str_network" | grep -i 'error' > /dev/null if [ $? -eq 0 ];then - logger -t xcat -p local4.info "$str_network" + logger -t $log_label -p local4.info "$str_network" echo "confignics on $NODE: $str_network" continue fi - if [ "$str_nic_type" = "ethernet" ];then - logger -t xcat -p local4.info "confignics: call 'configeth $key ${array_temp[0]} $str_network'" + logger -t $log_label -p local4.info "confignics: call 'configeth $key ${array_temp[0]} $str_network'" echo "confignics on $NODE: call 'configeth $key ${array_temp[0]} $str_network'" configeth $key ${array_temp[0]} $str_network if [ $? -ne 0 ]; then @@ -355,19 +363,19 @@ do str_ib_nics=$key fi else - logger -t xcat -p local4.info "confignics: unknown type $str_nic_type for NIC: $key" + logger -t $log_label -p local4.info "confignics: unknown type $str_nic_type for NIC: $key" echo "confignics on $NODE: unknown type $str_nic_type for NIC: $key" error_code=1 fi fi done if [ -n "$str_ib_nics" ];then - logger -t xcat -p local4.info "confignics: executed script: configib for nics: $str_ib_nics, ports: $num_iba_ports" + logger -t $log_label -p local4.info "confignics: executed script: configib for nics: $str_ib_nics, ports: $num_iba_ports" echo "confignics on $NODE: executed script: configib for nics: $str_ib_nics, ports: $num_iba_ports" NIC_IBNICS=$str_ib_nics NIC_IBAPORTS=$num_iba_ports configib else if [ $bool_remove -eq 1 ];then - logger -t xcat -p local4.info "confignics: executed script: 'configib -u' to remove all ib nics and configuration files" + logger -t $log_label -p local4.info "confignics: executed script: 'configib -u' to remove all ib nics and configuration files" echo "confignics on $NODE: executed script: 'configib -r' to remove all ib nics and configuration files" configib if [ $? -ne 0 ]; then diff --git a/xCAT/postscripts/enablecapi b/xCAT/postscripts/enablecapi index 923adacc3..64a67158b 100644 --- a/xCAT/postscripts/enablecapi +++ b/xCAT/postscripts/enablecapi @@ -5,6 +5,12 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then . $str_dir_name/xcatlib.sh fi +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + #--------------------------------------------------------------------------- #=head1 enablecapi #=head2 enable CAPI and tunnel Atomics for compute nodes @@ -16,7 +22,7 @@ fi function logerr { echo "$@" - logger -t xcat -p local4.err $@ + logger -t $log_label -p local4.err $@ } diff --git a/xCAT/postscripts/mkhyperv b/xCAT/postscripts/mkhyperv index c015a299e..358ec2190 100755 --- a/xCAT/postscripts/mkhyperv +++ b/xCAT/postscripts/mkhyperv @@ -69,6 +69,11 @@ cat < /etc/init.d/kvm # kvm init script - stripped off bridge code, but still 'Takes care # # description: The KVM is a kernel level Virtual Machine Monitor. +if [ -n "\$LOGLABEL" ]; then + log_label=\$LOGLABEL +else + log_label="xcat" +fi start () { grep -q GenuineIntel /proc/cpuinfo && /sbin/modprobe kvm-intel grep -q AuthenticAMD /proc/cpuinfo && /sbin/modprobe kvm-amd @@ -77,17 +82,17 @@ stop () { grep -q GenuineIntel /proc/cpuinfo && /sbin/modprobe -r kvm-intel grep -q AuthenticAMD /proc/cpuinfo && /sbin/modprobe -r kvm-amd } -logger -t xcat -p local4.info "KVM $1" +logger -t \$log_label -p local4.info "KVM $1" case "\$1" in start) echo -n $"Starting KVM: " - logger -t xcat -p local4.info "Starting KVM:" + logger -t \$log_label -p local4.info "Starting KVM:" start echo ;; stop) echo -n $"Shutting down KVM: " - logger -t xcat -p local4.info "Shutting down KVM:" + logger -t \$log_label -p local4.info "Shutting down KVM:" stop echo ;; @@ -96,9 +101,9 @@ case "\$1" in ;; *) echo "Unknown command: \$1" >&2 - logger -t xcat -p local4.info "Unknown command: \$1" + logger -t \$log_label -p local4.info "Unknown command: \$1" echo "Valid commands are: start, stop, status" >&2 - logger -t xcat -p local4.info "Valid commands are: start, stop, status" + logger -t \$log_label -p local4.info "Valid commands are: start, stop, status" exit 1 esac EOF @@ -117,6 +122,11 @@ cat < /etc/init.d/iscsiconnect # # chkconfig: 345 10 75 # description: iscsi script to discover and connect to targets on boot +if [ -n "\$log_label" ]; then + log_label=\$log_label +else + log_label="xcat" +fi connect_targets() { iscsiadm -m discovery -t st -p $ISCSITARGET @@ -126,7 +136,7 @@ disconnect_targets() { iscsiadm -m node --logout } -logger -t xcat -p local4.info "iscsi $1" +logger -t \$log_label -p local4.info "iscsi $1" case "\$1" in start) connect_targets @@ -139,9 +149,9 @@ case "\$1" in ;; *) echo "Unknown command: \$1" >&2 - logger -t xcat -p local4.info "Unknown command: \$1" + logger -t \$log_label -p local4.info "Unknown command: \$1" echo "Valid commands are: start, stop, status" >&2 - logger -t xcat -p local4.info "Valid commands are: start, stop, status" + logger -t \$log_label -p local4.info "Valid commands are: start, stop, status" exit 1 esac EOF diff --git a/xCAT/postscripts/mkresolvconf b/xCAT/postscripts/mkresolvconf index f89476d86..04c224546 100755 --- a/xCAT/postscripts/mkresolvconf +++ b/xCAT/postscripts/mkresolvconf @@ -20,9 +20,15 @@ domain=$DOMAIN # this is the domain name used in this cluster nameservers=$NAMESERVERS # nameservers defined in the site table node=$NODE +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi + if [ -n "$master" ] && [ -n "$domain" ]; then - #logger -t xcat "Created /etc/resolv.conf file on $node." + #logger -t $log_label "Created /etc/resolv.conf file on $node." cp $conf_file $conf_file_bak > /dev/null 2>&1 echo "search $domain" >$conf_file if [[ "$nameservers" != "" ]]; then @@ -35,7 +41,7 @@ if [ -n "$master" ] && [ -n "$domain" ]; then fi else - logger -t xcat -p local4.err "Could not create resolv.conf on $node." + logger -t $log_label -p local4.err "Could not create resolv.conf on $node." exit 1 fi diff --git a/xCAT/postscripts/mountinstall b/xCAT/postscripts/mountinstall index df213cb7c..5219152d4 100755 --- a/xCAT/postscripts/mountinstall +++ b/xCAT/postscripts/mountinstall @@ -27,6 +27,11 @@ if [ -z "$INSTALLDIR" ]; then INSTALLDIR="/install" fi +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi mount | grep "$MASTER:$INSTALLDIR on /install" if [ $? -eq 0 ] @@ -42,7 +47,7 @@ mount $MASTER:$INSTALLDIR /install if [ $? -ne 0 ] then errmsg="Failed to run mount $MASTER:$INSTALLDIR /install" - logger -t xcat -p local4.err $errmsg + logger -t $log_label -p local4.err $errmsg echo $errmsg exit 1 fi diff --git a/xCAT/postscripts/nicutils.sh b/xCAT/postscripts/nicutils.sh index 8e1fa0551..74e6131ce 100755 --- a/xCAT/postscripts/nicutils.sh +++ b/xCAT/postscripts/nicutils.sh @@ -573,18 +573,16 @@ function create_persistent_ifcfg { attrs=${attrs}${attrs:+,}"${name}=${value}" i=$((i+1)) done - # record manual and auto attributes first # since input attributes might overwrite them. # - # record input attributes later. They will overwrite + # record extra attributes later. They will overwrite # previous generated attributes if duplicate. [ -f $fcfg ] && mv -f $fcfg `dirname $fcfg`/.`basename $fcfg`.bak - echo "$attrs,$inattrs" \ | $sed -e 's/,/\n/g' | grep -v "^$" \ + echo "$inattrs,$attrs" \ | $sed -e 's/,/\n/g' | grep -v "^$" \ | $sed -e 's/=/="/' -e 's/ *$/"/' \ | uniq_per_key -t'=' -k1 >$fcfg local rc=$? - # log for debug echo "['ifcfg-${ifname}']" >&2 cat $fcfg | $sed -e 's/^/ >> /g' | log_lines info diff --git a/xCAT/postscripts/odbcsetup b/xCAT/postscripts/odbcsetup index 142d6ac92..b8eed004d 100755 --- a/xCAT/postscripts/odbcsetup +++ b/xCAT/postscripts/odbcsetup @@ -33,7 +33,10 @@ use xCAT::Utils; use xCAT::MsgUtils; # MAIN - +my $log_label=$ENV{'LOGLABEL'}; +if (!$log_label) { + $log_label="xcat" +} my $rc = 0; my $cmd; @@ -54,7 +57,7 @@ my $dbname = xCAT::Utils->get_DBName; if ($dbname eq "DB2") { $msg = "odbcsetup:Setting up ODBC for DB2"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; &setupdb2odbc; } @@ -63,19 +66,19 @@ else if ($dbname eq "MYSQL") { $msg = "odbcsetup:Setting up ODBC for MYSQL"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; &setupmysqlodbc; } else { if ($dbname eq "PG") { $msg = "odbcsetup:Setting up ODBC for PostgreSQL"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; &setupPGodbc; } else { $msg = "odbcsetup:cfgloc file does not contain MySQL, DB2 or PG, will not setup ODBC."; - `logger -t xcat -p local4.err $msg`; + `logger -t $log_label -p local4.err $msg`; exit 1; } } @@ -114,12 +117,12 @@ sub setupdb2odbc $cmd = "$::XCATROOT/bin/db2sqlsetup -o -C"; } $msg = "odbcsetup: Running Client ODBC setup. \"$cmd\"\n"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; $rc = &runcmd($cmd); $msg = "odbcsetup: Client ODBC setup finished.\n"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; return $rc; @@ -137,12 +140,12 @@ sub setupmysqlodbc my $cmd; $cmd = "$::XCATROOT/bin/mysqlsetup -o"; $msg = "odbcsetup: Running Client ODBC setup. \"$cmd\"\n"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; $rc = &runcmd($cmd); $msg = "odbcsetup: Client ODBC setup finished.\n"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; return $rc; @@ -161,12 +164,12 @@ sub setupPGodbc my $cmd; $cmd = "$::XCATROOT/bin/pgsqlsetup -o"; $msg = "odbcsetup: Running Client ODBC setup. \"$cmd\"\n"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; $rc = &runcmd($cmd); $msg = "odbcsetup: Client ODBC setup finished.\n"; - `logger -t xcat -p local4.info $msg`; + `logger -t $log_label -p local4.info $msg`; return $rc; @@ -194,7 +197,7 @@ sub runcmd { my $msg = "odbcsetup:\"$cmd\" returned rc=$rc \"$::outref\"\n"; print $msg; - `logger -t xcat -p local4.err $msg`; + `logger -t $log_label -p local4.err $msg`; return 1; } } diff --git a/xCAT/postscripts/ospkgs b/xCAT/postscripts/ospkgs index f3dfea148..ea5e414e9 100755 --- a/xCAT/postscripts/ospkgs +++ b/xCAT/postscripts/ospkgs @@ -250,7 +250,7 @@ do OSPKGDIR="$OSPKGDIR" if [ $mounted -eq 0 ]; then #OSPKGDIR="$OSPKGDIR" - ospkgdir="$NFSSERVER$dir" + ospkgdir="${NFSSERVER}:${HTTPPORT}$dir" else ospkgdir="$dir" fi @@ -632,7 +632,7 @@ elif ( pmatch "$OSVER" "sle*" ); then for sdk_src in $SDKDIR; do bname=`basename $sdk_src` if [ $mounted -eq 0 ]; then - sdk_src="http://$NFSSERVER/$sdk_src" + sdk_src="http://$NFSSERVER:$HTTPPORT/$sdk_src" else sdk_src="file://$sdk_src" fi diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index 8865990b7..abb4b3219 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -290,7 +290,7 @@ fi #when it is not set, we need to figure it out here if [ -z "$OTHERPKGDIR" ]; then if [ $mounted -eq 0 ]; then - OTHERPKGDIR="$NFSSERVER$INSTALLDIR/post/otherpkgs/$OSVER/$ARCH" + OTHERPKGDIR="${NFSSERVER}:${HTTPPORT}$INSTALLDIR/post/otherpkgs/$OSVER/$ARCH" else OTHERPKGDIR="$INSTALLDIR/post/otherpkgs/$OSVER/$ARCH" fi @@ -300,7 +300,7 @@ if [ -z "$OTHERPKGDIR" ]; then fi else if [ $mounted -eq 0 ]; then - OTHERPKGDIR=${NFSSERVER}${OTHERPKGDIR} + OTHERPKGDIR=${NFSSERVER}:${HTTPPORT}${OTHERPKGDIR} fi fi @@ -331,7 +331,7 @@ fi OSPKGDIR="$OSPKGDIR" if [ $mounted -eq 0 ]; then #OSPKGDIR="$OSPKGDIR" - ospkgdir="$NFSSERVER$dir" + ospkgdir="${NFSSERVER}:${HTTPPORT}$dir" else ospkgdir="$dir" fi @@ -523,7 +523,7 @@ if ( ! ( pmatch "$OSVER" "sles10*" ) && [ $haszypper -eq 1 ] ); then for sdk_src in $SDKDIR; do bname=`basename $sdk_src` if [ $mounted -eq 0 ]; then - sdk_src="http://$NFSSERVER/$sdk_src" + sdk_src="http://${NFSSERVER}:${HTTPPORT}/$sdk_src" else sdk_src="file://$sdk_src" fi diff --git a/xCAT/postscripts/redirectps b/xCAT/postscripts/redirectps index 4263037b1..2f9f6c1f9 100755 --- a/xCAT/postscripts/redirectps +++ b/xCAT/postscripts/redirectps @@ -7,10 +7,13 @@ # which is specified through nfsserver attribute # ##################################################### - +my $log_label=$ENV{'LOGLABEL'}; +if (!$log_label) { + $log_label="xcat" +} if (!$ENV{'NFSSERVER'}) { -`logger -t xcat -p local4.err "environment variable does not exist, exiting..."`; +`logger -t $log_label -p local4.err "environment variable does not exist, exiting..."`; exit -1; } @@ -80,13 +83,13 @@ sub runcmd $rc = $? >> 8; if ($rc > 0) { -`logger -t xcat -p local4.err "runcmd $cmd failed, error message is:"`; +`logger -t $log_label -p local4.err "runcmd $cmd failed, error message is:"`; my $errmsg; foreach my $err (@::outref) { $errmsg .= $err; } - `logger -t xcat -p local4.err "$errmsg"`; + `logger -t $log_label -p local4.err "$errmsg"`; exit -1; } } diff --git a/xCAT/postscripts/routeop b/xCAT/postscripts/routeop index eda755fa4..fbded3f97 100755 --- a/xCAT/postscripts/routeop +++ b/xCAT/postscripts/routeop @@ -33,7 +33,11 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then . /xcatpost/xcatlib.sh fi fi - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi op=$1 net=$2 @@ -806,7 +810,7 @@ if [ "$op" = "add" ]; then result=`$cmd 2>&1` code=$? if [ $code -ne 0 ]; then - logger -t xcat -p local4.err "$cmd\nerror code=$code, result=$result." + logger -t $log_label -p local4.err "$cmd\nerror code=$code, result=$result." echo " error code=$code, result=$result." if [ -f "/etc/debian_version" ];then exit 1; @@ -856,7 +860,7 @@ elif [ "$op" = "delete" ]; then result=`$cmd 2>&1` code=$? if [ $code -ne 0 ]; then - logger -t xcat -p local4.err "$cmd\nerror code=$code, result=$result." + logger -t $log_label -p local4.err "$cmd\nerror code=$code, result=$result." echo " error code=$code, result=$result." fi else @@ -909,7 +913,7 @@ elif [ "$op" = "replace" ]; then result=`$cmd 2>&1` code=$? if [ $code -ne 0 ]; then - logger -t xcat -p local4.err "Error: $cmd [error code=$code, result=$result]" + logger -t $log_label -p local4.err "Error: $cmd [error code=$code, result=$result]" echo "Error: $cmd [error code=$code, result=$result]" exit 1; fi diff --git a/xCAT/postscripts/serialconsole b/xCAT/postscripts/serialconsole index d1b3a0b31..72c589e40 100755 --- a/xCAT/postscripts/serialconsole +++ b/xCAT/postscripts/serialconsole @@ -1,10 +1,15 @@ # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi GRUB="" for i in /boot/grub/grub.conf /boot/grub/menu.lst do if [ -r "$i" ] then - logger -t xcat -p local4.info "Install: got GRUB at $i" + logger -t $log_label -p local4.info "Install: got GRUB at $i" GRUB=$i GRUBDIR=$(dirname $GRUB) GRUBFILE=$(basename $GRUB) @@ -14,7 +19,7 @@ done if [ -n "$GRUB" ] then - logger -t xcat -p local4.info "Install: the GRUB dir is $GRUBDIR" + logger -t $log_label -p local4.info "Install: the GRUB dir is $GRUBDIR" cd $GRUBDIR perl -pi -e 's/^gfxmenu/#gfxmenu/' $GRUBFILE perl -pi -e 's/^color/#color/' $GRUBFILE diff --git a/xCAT/postscripts/setbootfromdisk b/xCAT/postscripts/setbootfromdisk index 60539988b..fe5267030 100755 --- a/xCAT/postscripts/setbootfromdisk +++ b/xCAT/postscripts/setbootfromdisk @@ -10,7 +10,11 @@ # on Redhat-family OSes with POWER system # #----------------------------------------------------------------------------- - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi OS=`uname` if [[ $OS = "Linux" ]]; then if [[ $OSVER = fedora* ]] || [[ $OSVER = rhels5* ]] || [[ $OSVER = rhel6* ]] || [[ $OSVER=rhels6* ]] || [[ -f /etc/fedora-release ]] || [[ -f /etc/redhat-release ]]; then @@ -36,13 +40,13 @@ if [[ $OS = "Linux" ]]; then then if echo $MPATH | grep "sdd" then - logger -t xcat -p local4.info setbootfromdisk: Setting sda sdb sdc sdd to be the default bootup device + logger -t $log_label -p local4.info setbootfromdisk: Setting sda sdb sdc sdd to be the default bootup device echo "setbootfromdisk: setting up sda sdb sdc sdd to be the default bootup device" bootlist -m normal sda sdb sdc sdd exit 0 fi fi - logger -t xcat -p local4.info setbootfromdisk: Setting sda sdb to be the default bootup device + logger -t $log_label -p local4.info setbootfromdisk: Setting sda sdb to be the default bootup device echo "setbootfromdisk: setting up sda sdb to be the default bootup device for software raid" bootlist -m normal sda sdb exit 0 @@ -67,13 +71,13 @@ if [[ $OS = "Linux" ]]; then then if echo $i | grep "sda" then - logger -t xcat -p local4.info setbootfromdisk: Setting sda sdb to be the default bootup device + logger -t $log_label -p local4.info setbootfromdisk: Setting sda sdb to be the default bootup device echo "setbootfromdisk: setting up sda sdb to be the default bootup device" bootlist -m normal sda sdb exit 0 elif echo $i | grep "sdc" then - logger -t xcat -p local4.info setbootfromdisk: Setting sdc sdd to be the default bootup device + logger -t $log_label -p local4.info setbootfromdisk: Setting sdc sdd to be the default bootup device echo "setbootfromdisk: setting up sdc sdd to be the default bootup device" bootlist -m normal sdc sdd exit 0 @@ -84,7 +88,7 @@ if [[ $OS = "Linux" ]]; then if echo $MPATH | grep "sdb" then - logger -t xcat -p local4.info setbootfromdisk: Setting sda sdb to be the default bootup device + logger -t $log_label -p local4.info setbootfromdisk: Setting sda sdb to be the default bootup device echo "setbootfromdisk: setting up sda sdb to be the default bootup device" bootlist -m normal sda sdb exit 0 @@ -92,15 +96,15 @@ if [[ $OS = "Linux" ]]; then fi if [[ -z $BOOTDEVICE ]]; then - logger -t xcat -p local4.err setbootfromdisk: cannot find the booting device + logger -t $log_label -p local4.err setbootfromdisk: cannot find the booting device else - logger -t xcat -p local4.info setbootfromdisk: Setting $BOOTDEVICE to be the default bootup device + logger -t $log_label -p local4.info setbootfromdisk: Setting $BOOTDEVICE to be the default bootup device echo "setbootfromdisk: setting up $BOOTDEVICE as the default bootup device" bootlist -m normal $BOOTDEVICE exit 0 fi else - logger -t xcat -p local4.err Could not find /usr/sbin/bootlist + logger -t $log_label -p local4.err Could not find /usr/sbin/bootlist echo "setbootfromdisk: could not find /usr/sbin/bootlist" exit -1 fi diff --git a/xCAT/postscripts/setbootfromnet b/xCAT/postscripts/setbootfromnet index 5de3fae93..32e879439 100755 --- a/xCAT/postscripts/setbootfromnet +++ b/xCAT/postscripts/setbootfromnet @@ -15,12 +15,16 @@ #----------------------------------------------------------------------------- NODE_NAME=$NODE GATE_WAY=$GATEWAY - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi OS=`uname` if [ -z $MASTER ]; then msg="$0: The environment variable MASTER is null, pls check.\n" echo $msg - logger -t xcat -p local4.err "$msg" + logger -t $log_label -p local4.err "$msg" exit 1 fi @@ -38,7 +42,7 @@ else if [ $SRET -ne 0 ]; then msg="$0: The returned value is not correct, server_ip=$SERVER_IP\n" echo $msg - logger -t xcat -p local4.err "$msg" + logger -t $log_label -p local4.err "$msg" exit 1 fi fi @@ -58,13 +62,13 @@ if [ ! -z $NODE_NAME ]; then else msg="$0: The environment variable NODE is null, pls check.\n" echo $msg - logger -t xcat -p local4.err "$msg" + logger -t $log_label -p local4.err "$msg" exit 1 fi if [[ $RET -ne 0 ]] || [[ $NRET -ne 0 ]]; then msg="$0: The returned value is not correct, client_ip=$client_ip, nic=$nic\n" - logger -t xcat -p local4.info "$msg" + logger -t $log_label -p local4.info "$msg" exit 1 fi @@ -77,7 +81,7 @@ if [ ! -z $NIC ]; then else msg="$0: The network interface NIC on the host $CLIENT_IP is not retrieved, pls check.\n" echo $msg - logger -t xcat -p local4.info "$msg" + logger -t $log_label -p local4.info "$msg" exit 1 fi diff --git a/xCAT/postscripts/setiscsiparms.awk b/xCAT/postscripts/setiscsiparms.awk index b9eb5c6a8..22cd0f385 100755 --- a/xCAT/postscripts/setiscsiparms.awk +++ b/xCAT/postscripts/setiscsiparms.awk @@ -6,13 +6,16 @@ BEGIN { initrd = ARGV[4] kcmd = ARGV[5] ns = "/inet/tcp/0/" ARGV[1] "/" xcatdport - + log_label=ENVIRON["LOGLABEL"] + if(!log_label){ + log_label="xcat" + } while(1) { if((ns |& getline) > 0) - print $0 | "logger -t xcat -p local4.info" + print $0 | "logger -t "log_label" -p local4.info" else { print "Retrying iSCSI paramater config script" - print "Retrying iSCSI paramater config script" | "logger -t xcat -p local4.info" + print "Retrying iSCSI paramater config script" | "logger -t "log_label" -p local4.info" close(ns) system("sleep 1") } diff --git a/xCAT/postscripts/setupLDAP b/xCAT/postscripts/setupLDAP index 6728c482a..f843de7e1 100755 --- a/xCAT/postscripts/setupLDAP +++ b/xCAT/postscripts/setupLDAP @@ -5,11 +5,15 @@ # setup LDAP client configuration on the compute nodes # #--------------------------------------------------------------------------- - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi if [ -r /etc/ldap.conf -a -r /etc/resolv.conf ] then echo -n " LDAP: " - logger -t xcat -p local4.info " LDAP: " + logger -t $log_label -p local4.info " LDAP: " DC=$( cat /etc/resolv.conf | \ egrep '(domain|search)' | \ diff --git a/xCAT/postscripts/setupesx b/xCAT/postscripts/setupesx index 3efdd00d1..81b94f4d0 100755 --- a/xCAT/postscripts/setupesx +++ b/xCAT/postscripts/setupesx @@ -2,13 +2,17 @@ # example on how to set up ESX. We setup ssh and also add a basic # VLAN configuration - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then str_dir_name=`dirname $0` . $str_dir_name/xcatlib.sh fi -logger -t xcat -p local4.info setupesx +logger -t $log_label -p local4.info setupesx # Enable SSH access to root and exchange keys sed -e 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config > /etc/ssh/sshd_config.new @@ -18,7 +22,7 @@ restartservice ssh if [ -r /etc/ssh/sshd_config ] then - logger -t xcat -p local4.info "Install: setup /etc/ssh/sshd_config" + logger -t $log_label -p local4.info "Install: setup /etc/ssh/sshd_config" cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIG sed -i 's/^X11Forwarding .*$/X11Forwarding yes/' /etc/ssh/sshd_config sed -i 's/^KeyRegenerationInterval .*$/KeyRegenerationInterval 0/' /etc/ssh/sshd_config @@ -34,7 +38,7 @@ fi if [ -d /xcatpost/_ssh ] then - logger -t xcat -p local4.info "Install: setup root .ssh" + logger -t $log_label -p local4.info "Install: setup root .ssh" cd /xcatpost/_ssh mkdir -p /root/.ssh cp -f * /root/.ssh @@ -66,7 +70,7 @@ esxcfg-firewall -e ntpClient esxcfg-firewall -o 123,udp,out,ntpServer esxcfg-firewall -o 514,udp,out,syslog esxcfg-firewall -l -logger -t xcat -p local4.info "Install: restart syslog" +logger -t $log_label -p local4.info "Install: restart syslog" #service syslog restart restartservice syslog diff --git a/xCAT/postscripts/setupnfsv4replication b/xCAT/postscripts/setupnfsv4replication index 40c1e631c..7aea3c07c 100755 --- a/xCAT/postscripts/setupnfsv4replication +++ b/xCAT/postscripts/setupnfsv4replication @@ -7,7 +7,10 @@ # It only works on AIX for now # ##################################################### - +my $log_label=$ENV{'LOGLABEL'}; +if (!$log_label) { + $log_label="xcat" +} # Change these two parameters according to your requirements $::NFSRETRIES = 3; $::NFSTIMEO = 50; @@ -57,13 +60,13 @@ sub runcmd $rc = $? >> 8; if ($rc > 0) { -`logger -t xcat -p local4.err "runcmd $cmd failed, error message is:"`; +`logger -t $log_label -p local4.err "runcmd $cmd failed, error message is:"`; my $errmsg; foreach my $err (@::outref) { $errmsg .= $err; } - `logger -t xcat -p local4.err "$errmsg"`; + `logger -t $log_label -p local4.err "$errmsg"`; exit; } diff --git a/xCAT/postscripts/setupntp b/xCAT/postscripts/setupntp index 22dbca662..75809581a 100755 --- a/xCAT/postscripts/setupntp +++ b/xCAT/postscripts/setupntp @@ -14,7 +14,11 @@ PATH="/usr/sbin:/usr/bin:/sbin:/bin" export PATH - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi # # warn_if_bad Put out warning message(s) if $1 has bad RC. # @@ -33,7 +37,7 @@ function warn_if_bad() # Broken shift - logger -t xcat -p local4.info "${script}: $@" >/dev/null 2>&1 + logger -t $log_label -p local4.info "${script}: $@" >/dev/null 2>&1 echo "${script}: $@" >&2 return "${rc}" } @@ -130,7 +134,7 @@ check_executes chronyd >/dev/null 2>&1 || USE_NTPD="yes" if [ -n "${USE_NTPD}" ] then # Call setupntp.traditional, and pass the parsed ntp servers - logger -t xcat -p local4.info "Will call setupntp.traditional" + logger -t $log_label -p local4.info "Will call setupntp.traditional" export NTPSERVERS="$(IFS=','; echo "${NTP_SERVERS[*]:-pool.ntp.org}")" exec "${0%/*}/setupntp.traditional" exit 255 @@ -161,7 +165,7 @@ timedatectl set-local-rtc 0 warn_if_bad "$?" "Failed to configure the system to maintain the RTC in universal time" # Synchronize and set the system clock once -logger -t xcat -p local4.info "Syncing the clock ..." +logger -t $log_label -p local4.info "Syncing the clock ..." chronyd -f /dev/null -q "$( if [ "${#NTP_SERVERS[@]}" -gt "0" ] then @@ -235,7 +239,7 @@ DRIFT_FILE="$( LOG_DIR="/var/log/chrony" -logger -t xcat -p local4.info "Install: Setup NTP - chrony" +logger -t $log_label -p local4.info "Install: Setup NTP - chrony" cp "${CHRONY_CONF}" "${CHRONY_CONF}.xcatsave" cat >"${CHRONY_CONF}" </dev/null || systemctl reload-or-restart chronyd.service 2>/dev/null exit_if_bad "$?" "Failed to start chrony service" -logger -t xcat -p local4.info "NTP setup accomplished!" +logger -t $log_label -p local4.info "NTP setup accomplished!" exit 0 diff --git a/xCAT/postscripts/setupntp.traditional b/xCAT/postscripts/setupntp.traditional index 959ab905f..788f4d191 100755 --- a/xCAT/postscripts/setupntp.traditional +++ b/xCAT/postscripts/setupntp.traditional @@ -10,10 +10,14 @@ if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then str_dir_name=`dirname $0` . $str_dir_name/xcatlib.sh fi - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi # if on the Management Node if [ -e /etc/xCATMN ]; then - logger -t xcat -p local4.info "setupntp: This postscript does not support running on the management node. Please run makentp command. exiting" + logger -t $log_label -p local4.info "setupntp: This postscript does not support running on the management node. Please run makentp command. exiting" exit 0 fi @@ -43,7 +47,7 @@ is_lsb_cumulus () return $? } -logger -t xcat "Install: Setup NTP" +logger -t $log_label "Install: Setup NTP" # Use the ntpservers defined in the site table, if they exist. # If the value of ntpservers is use the service node or # the management node as the ntp server. @@ -117,12 +121,12 @@ if [ $OS_TYPE = Linux ]; then fi msg='syncing the clock ...' - logger -t xcat $msg + logger -t $log_label $msg echo $msg if ! timeout 120 ntpd -gq > /dev/null 2>&1 ; then if ! ntpdate -t5 $master > /dev/null 2>&1; then msg='WARNING: NTP Sync Failed before timeout. ntp server will try to sync...' - logger -t xcat $msg + logger -t $log_label $msg echo $msg fi fi @@ -193,12 +197,12 @@ broadcastclient restrict 127.0.0.1" >>$conf_file stopsrc -s xntpd - logger -t xcat "ntpdate -t5 $master " + logger -t $log_label "ntpdate -t5 $master " ntpdate -t5 $master if [ "$?" != "0" ] then echo " ntpdate -t5 $master failed " - logger -t xcat "ntpdate -t5 $master failed" + logger -t $log_label "ntpdate -t5 $master failed" fi /usr/sbin/chrctcp -S -a xntpd fi diff --git a/xCAT/postscripts/setuppostbootscripts b/xCAT/postscripts/setuppostbootscripts index 582781dbc..4e7846d8c 100755 --- a/xCAT/postscripts/setuppostbootscripts +++ b/xCAT/postscripts/setuppostbootscripts @@ -10,13 +10,17 @@ # postscripts.postbootscripts will be run when the node reboots. #=cut #------------------------------------------------------------------------------- - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi #only works for diskful nodes if [ "$NODESETSTATE" = "netboot" -o \ "$NODESETSTATE" = "statelite" -o \ "$NODESETSTATE" = "diskless" -o \ "$NODESETSTATE" = "dataless" ]; then - logger -t xcat -p local4.info "setuppostbootscripts: Nothing to do for stateless and statelite nodes." + logger -t $log_label -p local4.info "setuppostbootscripts: Nothing to do for stateless and statelite nodes." exit 0 fi @@ -34,7 +38,7 @@ fi if [ -f $infofile ]; then value=`grep "RUNBOOTSCRIPTS=$RUNBOOTSCRIPTS" $infofile` if [[ -n $value ]]; then # match - logger -t xcat -p local4.info "setuppostbootscripts: xcatinfo uptodate, nothing to do." + logger -t $log_label -p local4.info "setuppostbootscripts: xcatinfo uptodate, nothing to do." exit 0 fi fi diff --git a/xCAT/postscripts/setupscratch b/xCAT/postscripts/setupscratch index 49c3bed3f..244e65847 100755 --- a/xCAT/postscripts/setupscratch +++ b/xCAT/postscripts/setupscratch @@ -8,7 +8,11 @@ # #==================================================================== ME="setupscratch" - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi mydir="/scratch" umount $mydir @@ -17,13 +21,13 @@ then if grep sda1 /proc/partitions >/dev/null 2>&1 then echo Autodetected existing /dev/sda1 - logger -t xcat -p local4.info $ME Autodetected existing /dev/sda1 + logger -t $log_label -p local4.info $ME Autodetected existing /dev/sda1 echo Checking filesystem /dev/sda1 - logger -t xcat -p local4.info $ME Checking filesystem /dev/sda1 + logger -t $log_label -p local4.info $ME Checking filesystem /dev/sda1 fsck -y /dev/sda1 mkdir -p $mydir echo mounting existing /dev/sda1 to $mydir - logger -t xcat -p local4.info $ME mounting existing /dev/sda1 to $mydir + logger -t $log_label -p local4.info $ME mounting existing /dev/sda1 to $mydir if mount /dev/sda1 $mydir then echo @@ -32,14 +36,14 @@ then exit 0 else echo mounting /dev/sda1 to $mydir failed - logger -t xcat -p local4.warning $ME mounting /dev/sda1 to $mydir failed + logger -t $log_label -p local4.warning $ME mounting /dev/sda1 to $mydir failed fi fi fi echo Creating Partition -logger -t xcat -p local4.info $ME Creating Partition +logger -t $log_label -p local4.info $ME Creating Partition parted -s /dev/sda mklabel gpt parted -s -- /dev/sda mkpart primary ext3 0 -0 if grep sda1 /proc/partitions >/dev/null 2>&1 @@ -47,7 +51,7 @@ then sleep 5 else echo failed to create partition, exiting $ME - logger -t xcat -p local4.err $ME failed to create partition, exiting $ME + logger -t $log_label -p local4.err $ME failed to create partition, exiting $ME echo echo Failed! echo @@ -55,11 +59,11 @@ else fi echo Creating new ext3 filesystem: /dev/sda1 -logger -t xcat -p local4.info $ME Creating new ext3 filesystem: /dev/sda1 +logger -t $log_label -p local4.info $ME Creating new ext3 filesystem: /dev/sda1 mke2fs -j /dev/sda1 mkdir -p $mydir echo mounting new /dev/sda1 to $mydir -logger -t xcat -p local4.info $ME mounting new /dev/sda1 to $mydir +logger -t $log_label -p local4.info $ME mounting new /dev/sda1 to $mydir mount /dev/sda1 $mydir echo echo Done! diff --git a/xCAT/postscripts/sudoer b/xCAT/postscripts/sudoer index 03c873965..45f90b1bb 100755 --- a/xCAT/postscripts/sudoer +++ b/xCAT/postscripts/sudoer @@ -7,7 +7,11 @@ # #------------------------------------------------------------------------------ - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then str_dir_name=`dirname $0` @@ -59,7 +63,7 @@ chown $SUDOER:users $HOME/.ssh/authorized_keys # Restart the SSHD for syncfiles postscript to do the sync work -logger -t xcat -p local4.info "Restarting SSHD" +logger -t $log_label -p local4.info "Restarting SSHD" #if [ -f "/etc/debian_version" ];then # service ssh restart #else diff --git a/xCAT/postscripts/umountpost b/xCAT/postscripts/umountpost index e7eb58671..e23e926b8 100755 --- a/xCAT/postscripts/umountpost +++ b/xCAT/postscripts/umountpost @@ -2,9 +2,13 @@ # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html #(C)IBM Corp # - +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi result=`umount /post 2>&1` returncode=$? -logger -t xcat -p local4.info $result +logger -t $log_label -p local4.info $result exit $returncode diff --git a/xCAT/postscripts/unlocktftpdir.awk b/xCAT/postscripts/unlocktftpdir.awk index f5371d165..2057092b9 100755 --- a/xCAT/postscripts/unlocktftpdir.awk +++ b/xCAT/postscripts/unlocktftpdir.awk @@ -4,13 +4,16 @@ BEGIN { xcatdport = ARGV[2] ns = "/inet/tcp/0/" ARGV[1] "/" xcatdport - + log_label=ENVIRON["LOGLABEL"] + if(!log_label){ + log_label="xcat" + } while(1) { if((ns |& getline) > 0) - print $0 | "logger -t xcat -p local4.info " + print $0 | "logger -t "log_label" -p local4.info " else { print "Retrying unlock of tftp directory" - print "$0: Retrying unlock of tftp directory" | "logger -t xcat -p local4.info " + print "$0: Retrying unlock of tftp directory" | "logger -t "log_label" -p local4.info " close(ns) system("sleep 5") } diff --git a/xCAT/postscripts/xcatclient b/xCAT/postscripts/xcatclient index af699f7ff..7571f3777 100755 --- a/xCAT/postscripts/xcatclient +++ b/xCAT/postscripts/xcatclient @@ -8,18 +8,23 @@ # The -d flag was implemented when the call to the routine was moved # from the postscript table into the servicenode postscript. # +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi if [ ! $1 ]; then - logger -t xcat -p local4.err "xcatclient call without -d, doing nothing." + logger -t $log_label -p local4.err "xcatclient call without -d, doing nothing." exit 0 fi if [ $1 != "-d" ]; then - logger -t xcat -p local4.err "xcatclient call without -d, doing nothing." + logger -t $log_label -p local4.err "xcatclient call without -d, doing nothing." exit 0 fi -logger -t xcat -p local4.info "xcatclient call with -d. getting credentials and cfgloc " +logger -t $log_label -p local4.info "xcatclient call with -d. getting credentials and cfgloc " if [ ! -x /usr/bin/openssl ]; then #Unless we have openssl stup - logger -t xcat -p local4.err "$0: /usr/bin/openssl is not executable" + logger -t $log_label -p local4.err "$0: /usr/bin/openssl is not executable" exit -1 fi USEOPENSSLFORXCAT=1 #Declare 2.3 style SSL @@ -44,7 +49,7 @@ export USEOPENSSLFORXCAT done else ERR_MSG=`sed -n 's%.*\(.*\).*%\1%p' /tmp/xcat_client_cred` - logger -t xcat -p local4.err xcat_client_cred Error: $ERR_MSG + logger -t $log_label -p local4.err xcat_client_cred Error: $ERR_MSG RETURNVAL=-1 fi rm /tmp/xcat_client_cred diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 7147d2fb7..38ac8ca6a 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -380,7 +380,6 @@ if [ "$MODE" = "4" ]; then # for statelite mode else echo "XCATSERVER=$XCATSERVER" >> /opt/xcat/xcatinfo fi - break elif [ "$KEY" = "XCATHTTPPORT" ]; then HTTPPORT=`echo $i | awk -F= '{print $2}'` grep 'HTTPPORT' /opt/xcat/xcatinfo > /dev/null 2>&1 @@ -389,8 +388,6 @@ if [ "$MODE" = "4" ]; then # for statelite mode else echo "HTTPPORT=$HTTPPORT" >> /opt/xcat/xcatinfo fi - break - fi done diff --git a/xCAT/postscripts/xcatlib.sh b/xCAT/postscripts/xcatlib.sh index afa5bcf87..e1c688402 100755 --- a/xCAT/postscripts/xcatlib.sh +++ b/xCAT/postscripts/xcatlib.sh @@ -107,7 +107,7 @@ function v4prefix2mask(){ local num_index=1 local str_temp='' local str_mask='' - + [ ! $a ] && a=0 while [[ $num_index -le 4 ]] do if [ $a -ge 8 ];then @@ -733,7 +733,7 @@ function parse_nic_extra_params() { do token2="${params_temp[$k]}" array_extra_param_names[$k]=`echo "$token2" | cut -d'=' -f 1` - array_extra_param_values[$k]=`echo "$token2" | cut -d'=' -f 2` + array_extra_param_values[$k]=`echo "$token2" | cut -d'=' -f 2-` k=$((k+1)) done } diff --git a/xCAT/postscripts/xcatpostinit b/xCAT/postscripts/xcatpostinit index 2085cd5ef..7a61d4e98 100755 --- a/xCAT/postscripts/xcatpostinit +++ b/xCAT/postscripts/xcatpostinit @@ -19,8 +19,12 @@ if [ -x /etc/rc.d/init.d/functions ]; then . /etc/rc.d/init.d/functions fi - -logger -t xcat -p local4.info "$0: action is $1" +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat.deployment" +fi +logger -t $log_label -p local4.info "$0: action is $1" case $1 in restart) $0 stop @@ -28,11 +32,11 @@ restart) ;; status) echo -n "xcatpostinit runs only at boot, runs additional post scripts" - logger -t xcat -p local4.info "xcatpostinit runs only at boot, runs additional post scripts" + logger -t $log_label -p local4.info "xcatpostinit runs only at boot, runs additional post scripts" ;; stop) echo -n "nothing to stop " - logger -t xcat -p local4.info "nothing to stop" + logger -t $log_label -p local4.info "nothing to stop" ;; start) # Node is stateless by default @@ -59,10 +63,10 @@ start) # Run $SCRIPT according to node type if [ $STATELITE -ne 0 ]; then - logger -t xcat -p local4.info "Call $SCRIPT for statelite mode" + logger -t $log_label -p local4.info "Call $SCRIPT for statelite mode" "$SCRIPT" 4 else - logger -t xcat -p local4.info "Call $SCRIPT for stateless mode" + logger -t $log_label -p local4.info "Call $SCRIPT for stateless mode" "$SCRIPT" fi ;; diff --git a/xCAT/postscripts/xcatpostinit1.service.yast2 b/xCAT/postscripts/xcatpostinit1.service.yast2 index ca6494ac1..274444bcd 100644 --- a/xCAT/postscripts/xcatpostinit1.service.yast2 +++ b/xCAT/postscripts/xcatpostinit1.service.yast2 @@ -6,6 +6,7 @@ After=network.target rsyslog.service YaST2-Firstboot.service Type=oneshot ExecStart=/opt/xcat/xcatpostinit1 start ExecStop=/opt/xcat/xcatpostinit1 stop +StandardOutput=null RemainAfterExit=yes [Install] diff --git a/xCAT/postscripts/xcatserver b/xCAT/postscripts/xcatserver index 636007cbd..a277fbd2e 100755 --- a/xCAT/postscripts/xcatserver +++ b/xCAT/postscripts/xcatserver @@ -7,24 +7,29 @@ # The -d flag was implemented when the call to the routine was moved # from the postscript table into the servicenode postscript. # +if [ -n "$LOGLABEL" ]; then + log_label=$LOGLABEL +else + log_label="xcat" +fi if [ ! $1 ]; then - logger -t xcat -p local4.err "xcatserver call without -d, doing nothing." + logger -t $log_label -p local4.err "xcatserver call without -d, doing nothing." #echo "xcatserver call without -d, doing nothing." #echo $1 exit 0 fi if [ $1 != "-d" ]; then - logger -t xcat -p local4.err "xcatserver call without -d, doing nothing." + logger -t $log_label -p local4.err "xcatserver call without -d, doing nothing." #echo "xcatserver call without -d, doing nothing." #echo $1 exit 0 fi -logger -t xcat -p local4.info "xcatserver call with -d. getting credentials and cfgloc " +logger -t $log_label -p local4.info "xcatserver call with -d. getting credentials and cfgloc " #echo "xcatserver call with -d, getting credentials and cfgloc." #echo $1 if [ ! -x /usr/bin/openssl ]; then - logger -t xcat -p local4.err "$0: /usr/bin/openssl is not executable" + logger -t $log_label -p local4.err "$0: /usr/bin/openssl is not executable" exit -1 fi USEOPENSSLFORXCAT=1 @@ -47,12 +52,12 @@ sleep 1 mkdir -p /etc/xcat/cert if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "xcatserver: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "xcatserver: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "xcatserver:xcatflowrequest received response return=$rc" + logger -t $log_label -p local4.info "xcatserver:xcatflowrequest received response return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi @@ -64,7 +69,7 @@ getcredentials.awk xcat_server_cred | grep -v '<'|sed -e 's/</' /etc/xcat/cert/server-cred.pem if [ $? -ne 0 ]; then #the message received is the data - logger -t xcat -p local4.info "xcatserver: getting server-cred.pem" + logger -t $log_label -p local4.info "xcatserver: getting server-cred.pem" MAX_RETRIES=10 RETRY=0 MYCONT=`cat /etc/xcat/cert/server-cred.pem` @@ -84,12 +89,12 @@ if [ $? -ne 0 ]; then fi if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "xcatserver: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "xcatserver: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "xcatserver:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "xcatserver:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi @@ -103,7 +108,7 @@ if [ $? -ne 0 ]; then else # error from first getcredential call #the message received is an error from credentials.pm, so parse it ERR_MSG=`sed -n 's%.*\(.*\).*%\1%p' /etc/xcat/cert/server-cred.pem` - logger -t xcat -p local4.err xcatserver: $ERR_MSG + logger -t $log_label -p local4.err xcatserver: $ERR_MSG rm /etc/xcat/cert/server-cred.pem fi @@ -111,12 +116,12 @@ fi if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "xcatserver: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "xcatserver: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "xcatserver:xcatflowrequest received response return=$rc" + logger -t $log_label -p local4.info "xcatserver:xcatflowrequest received response return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi @@ -127,7 +132,7 @@ getcredentials.awk xcat_cfgloc | grep -v '<'|sed -e 's/<//' - grep -E '' /etc/xcat/cfgloc if [ $? -ne 0 ]; then #the message received is the data - logger -t xcat -p local4.info "xcatserver: getting cfgloc" + logger -t $log_label -p local4.info "xcatserver: getting cfgloc" MAX_RETRIES=10 RETRY=0 MYCONT=`cat /etc/xcat/cfgloc` @@ -147,12 +152,12 @@ if [ $? -ne 0 ]; then fi if [ $useflowcontrol = "1" ]; then #first contact daemon xcatflowrequest 3001 - logger -t xcat -p local4.info "xcatserver: sending xcatflowrequest $master 3001" + logger -t $log_label -p local4.info "xcatserver: sending xcatflowrequest $master 3001" /$xcatpost/xcatflowrequest $master 3001 rc=$? - logger -t xcat -p local4.info "xcatserver:xcatflowrequest return=$rc" + logger -t $log_label -p local4.info "xcatserver:xcatflowrequest return=$rc" if [ $rc -ne 0 ]; then - logger -t xcat -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" + logger -t $log_label -p local4.info "xcatserver: error from xcatflowrequest, will not use flow control" useflowcontrol=0 fi fi @@ -178,7 +183,7 @@ if [ $? -ne 0 ]; then else # error from first getcredentials call #the message received is an error from credentials.pm, so parse it ERR_MSG=`sed -n 's%.*\(.*\).*%\1%p' /etc/xcat/cfgloc` - logger -t xcat -p local4.err xcatserver: $ERR_MSG + logger -t $log_label -p local4.err xcatserver: $ERR_MSG rm /etc/xcat/cfgloc fi