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 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/' 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' 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' 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 cmd:lsdef bogusnode -z|sort -t'=' -k1 |tee /tmp/export_import_single_ppc_by_json/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=json -t node -o bogusnode |tee /tmp/export_import_single_ppc_by_json/bogusnode_json.inv check:rc==0 cmd:scp /tmp/export_import_single_ppc_by_json/bogusnode_json.inv $$DSTMN:/tmp/export_import_single_ppc_by_json_$$DSTMN/ 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' check:rc==0 cmd: ssh $$DSTMN '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 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' 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 cmd:lsdef bogusnode -z|sort -t'=' -k1 |tee /tmp/export_import_single_ppc_by_yaml/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=yaml -t node -o bogusnode |tee /tmp/export_import_single_ppc_by_yaml/bogusnode_yaml.inv check:rc==0 cmd:scp /tmp/export_import_single_ppc_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/export_import_single_ppc_by_yaml_$$DSTMN/ 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' check:rc==0 cmd: ssh $$DSTMN '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 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' 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 cmd:lsdef bogusnode -z|sort -t'=' -k1 |tee /tmp/export_import_single_kvm_by_json/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=json -t node -o bogusnode |tee /tmp/export_import_single_kvm_by_json/bogusnode_json.inv check:rc==0 cmd:scp /tmp/export_import_single_kvm_by_json/bogusnode_json.inv $$DSTMN:/tmp/export_import_single_kvm_by_json_$$DSTMN/ 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' check:rc==0 cmd: ssh $$DSTMN '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 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' 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 cmd:lsdef bogusnode -z|sort -t'=' -k1 |tee /tmp/export_import_single_kvm_by_yaml/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=yaml -t node -o bogusnode |tee /tmp/export_import_single_kvm_by_yaml/bogusnode_yaml.inv check:rc==0 cmd:scp /tmp/export_import_single_kvm_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/export_import_single_kvm_by_yaml_$$DSTMN/ 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' check:rc==0 cmd: ssh $$DSTMN '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 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' 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 cmd:lsdef bogusnode -z|sort -t'=' -k1 |tee /tmp/export_import_single_pdu_by_json/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=json -t node -o bogusnode |tee /tmp/export_import_single_pdu_by_json/bogusnode_json.inv check:rc==0 cmd:scp /tmp/export_import_single_pdu_by_json/bogusnode_json.inv $$DSTMN:/tmp/export_import_single_pdu_by_json_$$DSTMN/ 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' check:rc==0 cmd: ssh $$DSTMN '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 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' 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 cmd:lsdef bogusnode -z|sort -t'=' -k1 |tee /tmp/export_import_single_pdu_by_yaml/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=yaml -t node -o bogusnode |tee /tmp/export_import_single_pdu_by_yaml/bogusnode_yaml.inv check:rc==0 cmd:scp /tmp/export_import_single_pdu_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/export_import_single_pdu_by_yaml_$$DSTMN/ 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' check:rc==0 cmd: ssh $$DSTMN '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 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' 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 cmd:lsdef bogusnode -z|sort -t'=' -k1 |tee /tmp/export_import_single_boston_by_yaml/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=yaml -t node -o bogusnode |tee /tmp/export_import_single_boston_by_yaml/bogusnode_yaml.inv check:rc==0 cmd:scp /tmp/export_import_single_boston_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/export_import_single_boston_by_yaml_$$DSTMN/ 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' check:rc==0 cmd: ssh $$DSTMN '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 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' 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 cmd:lsdef bogusnode -z|sort -t'=' -k1 |tee /tmp/export_import_single_boston_by_json/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=json -t node -o bogusnode |tee /tmp/export_import_single_boston_by_json/bogusnode_json.inv check:rc==0 cmd:scp /tmp/export_import_single_boston_by_json/bogusnode_json.inv $$DSTMN:/tmp/export_import_single_boston_by_json_$$DSTMN/ 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' check:rc==0 cmd: ssh $$DSTMN '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 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' 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 cmd:lsdef bogusnode -z|sort -t'=' -k1 |tee /tmp/export_import_single_witherspoon_by_yaml/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=yaml -t node -o bogusnode |tee /tmp/export_import_single_witherspoon_by_yaml/bogusnode_yaml.inv check:rc==0 cmd:scp /tmp/export_import_single_witherspoon_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/export_import_single_witherspoon_by_yaml_$$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' check:rc==0 cmd: ssh $$DSTMN '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 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' 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 cmd:lsdef bogusnode -z|sort -t'=' -k1 |tee /tmp/export_import_single_witherspoon_by_json/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=json -t node -o bogusnode |tee /tmp/export_import_single_witherspoon_by_json/bogusnode_json.inv check:rc==0 cmd:scp /tmp/export_import_single_witherspoon_by_json/bogusnode_json.inv $$DSTMN:/tmp/export_import_single_witherspoon_by_json_$$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' check:rc==0 cmd: ssh $$DSTMN '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 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' 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 cmd:lsdef bogusnode -z|sort -t'=' -k1 |tee /tmp/export_import_single_switch_by_json/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=json -t node -o bogusnode |tee /tmp/export_import_single_switch_by_json/bogusnode_json.inv check:rc==0 cmd:scp /tmp/export_import_single_switch_by_json/bogusnode_json.inv $$DSTMN:/tmp/export_import_single_switch_by_json_$$DSTMN/ 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' check:rc==0 cmd: ssh $$DSTMN '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 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' 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 cmd:lsdef bogusnode -z|sort -t'=' -k1 |tee /tmp/export_import_single_switch_by_yaml/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=yaml -t node -o bogusnode |tee /tmp/export_import_single_switch_by_yaml/bogusnode_yaml.inv check:rc==0 cmd:scp /tmp/export_import_single_switch_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/export_import_single_switch_by_yaml_$$DSTMN/ 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' check:rc==0 cmd: ssh $$DSTMN '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 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' check:rc==0 cmd:mkdef bogusnode[1-3] groups=bogusgroup mgt=openbmc cons=openbmc netboot=petitboot check:rc==0 cmd:lsdef bogusnode[1-3] -z|sort -t'=' -k1 |tee /tmp/export_import_nodes_delimited_with_comma_by_yaml/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=yaml -t node -o bogusnode1,bogusnode2,bogusnode3 |tee /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusnode_yaml.inv check:rc==0 cmd:scp /tmp/export_import_nodes_delimited_with_comma_by_yaml/bogusnode_yaml.inv $$DSTMN:/tmp/export_import_nodes_delimited_with_comma_by_yaml_$$DSTMN/ 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' 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' 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 cmd: cat /tmp/export_import_nodes_delimited_with_comma_by_yaml/dstbogusnode.stanza 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]' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' check:rc==0 cmd:mkdef bogusnode[1-3] groups=bogusgroup mgt=openbmc cons=openbmc netboot=petitboot check:rc==0 cmd:lsdef bogusnode[1-3] -z|sort -t'=' -k1 |tee /tmp/export_import_nodes_delimited_with_comma_by_json/srcbogusnode.stanza check:rc==0 cmd:xcat-inventory export --format=json -t node -o bogusnode1,bogusnode2,bogusnode3 |tee /tmp/export_import_nodes_delimited_with_comma_by_json/bogusnode_json.inv check:rc==0 cmd:scp /tmp/export_import_nodes_delimited_with_comma_by_json/bogusnode_json.inv $$DSTMN:/tmp/export_import_nodes_delimited_with_comma_by_json_$$DSTMN/ 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' 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' 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 cmd: cat /tmp/export_import_nodes_delimited_with_comma_by_json/dstbogusnode.stanza 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]' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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 check:rc==0 cmd: xcat-inventory export --format=json -t node -o bogusnode check:output=~Error: (\[.*?\]: )?cannot find node objects: bogusnode! check:rc!=0 cmd: xcat-inventory export --format=yaml -t node -o bogusnode check:output=~Error: (\[.*?\]: )?cannot find node objects: bogusnode! check:rc!=0 cmd:if [[ -e /tmp/xcat_inventory_try_to_export_nonexisted_node/bogusnode.stanza ]]; then cat /tmp/xcat_inventory_try_to_export_nonexisted_node/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:rm -rf /tmp/xcat_inventory_try_to_export_nonexisted_node check:rc==0 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 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 check:rc==0 cmd:mkdef -t node -o bogusnode groups=test check:rc==0 cmd:xcat-inventory export --format=json -t node -o bogusnode |tee /tmp/xcat_inventory_try_to_import_nonexisted_node/json check:rc==0 cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_nonexisted_node/json -t node -o bogusnode1 check:output=~Error: (\[.*?\]: )?cannot find node objects: bogusnode1! check:rc!=0 cmd:xcat-inventory export --format=yaml -t node -o bogusnode |tee /tmp/xcat_inventory_try_to_import_nonexisted_node/yaml check:rc==0 cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_nonexisted_node/yaml -t node -o bogusnode1 check:output=~Error: (\[.*?\]: )?cannot find node objects: bogusnode1! check:rc!=0 cmd:rmdef bogusnode check:rc==0 cmd:if [[ -e /tmp/xcat_inventory_try_to_import_nonexisted_node/bogusnode.stanza ]]; then cat /tmp/xcat_inventory_try_to_import_nonexisted_node/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:rm -rf /tmp/xcat_inventory_try_to_import_nonexisted_node check:rc==0 end start:xcat_inventory_try_to_export_all_type_is_node_default_format label:others,xcat_inventory 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 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/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/xcat_inventory_try_to_export_all_type_is_node_default_format/bogusnode.stanza;rmdef -t group bogusgroup; fi check:rc==0 cmd:mkdef -t group bogusgroup check:rc==0 cmd:mkdef bogusnode[1-3] groups=bogusgroup check:rc==0 cmd:lsdef -t node|tee /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db check:rc==0 cmd:lsdef -t group -i grouptype -c|grep "grouptype=static" |tee /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db 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 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 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 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 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 check:rc==0 cmd:rmdef bogusnode[1-3] check:rc==0 cmd:rmdef -t group bogusgroup check:rc==0 cmd:if [[ -e /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/bogusnode.stanza ]]; then cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/bogusgroup.stanza ]];then cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format check:rc==0 end start:xcat_inventory_try_to_export_all_type_is_node_yaml_format label:others,xcat_inventory 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 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/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/xcat_inventory_try_to_export_all_type_is_node_yaml_format/bogusnode.stanza;rmdef -t group bogusgroup; fi check:rc==0 cmd:mkdef -t group bogusgroup check:rc==0 cmd:mkdef bogusnode[1-3] groups=bogusgroup check:rc==0 cmd:lsdef -t node|tee /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/node_in_xcat_db check:rc==0 cmd: lsdef -t group -i grouptype -c|grep "grouptype=static"| tee /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/group_in_xcat_db 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 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 cmd:dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/node_in_xcat_db|wc -l);dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_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_yaml_format/export_all_node|wc -l); 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_yaml_format/group_in_xcat_db`; do grep -E " $i:" /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_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_yaml_format/node_in_xcat_db`;do grep -E " $i:" /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_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 cmd:rmdef -t group bogusgroup check:rc==0 cmd:if [[ -e /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/bogusnode.stanza ]]; then cat /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/bogusgroup.stanza ]];then cat /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/xcat_inventory_try_to_export_all_type_is_node_yaml_format check:rc==0 end start:xcat_inventory_try_to_export_all_type_is_node_json_format label:others,xcat_inventory 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 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/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/xcat_inventory_try_to_export_all_type_is_node_json_format/bogusnode.stanza;rmdef -t group bogusgroup; fi check:rc==0 cmd:mkdef -t group bogusgroup check:rc==0 cmd:mkdef bogusnode[1-3] groups=bogusgroup check:rc==0 cmd:lsdef -t node|tee /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/node_in_xcat_db check:rc==0 cmd:lsdef -t group -i grouptype -c|grep "grouptype=static" |tee /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/group_in_xcat_db 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 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 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 cmd:a=0;for i in `awk -F':' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/group_in_xcat_db`; do grep " \"$i\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_json_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_json_format/node_in_xcat_db`;do grep -E " \"$i\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_json_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 cmd:rmdef -t group bogusgroup check:rc==0 cmd:if [[ -e /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/bogusnode.stanza ]]; then cat /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/bogusgroup.stanza ]];then cat /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/xcat_inventory_try_to_export_all_type_is_node_json_format check:rc==0 end start:xcat_inventory_try_to_import_all_type_is_node_yaml_format label:others,xcat_inventory 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 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/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/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: 10_0_0_0-255_0_0_0: basic_attr: gateway: 10.0.0.103 mask: 255.0.0.0 mgtifname: eth0 mtu: '1500' net: 10.0.0.0 service: tftpserver: node: bogusgroup: device_type: server engines: console_engine: engine_type: openbmc hardware_mgt_engine: engine_info: bmc: '|\D+(\d+)|10.100.100.($1)|' bmcpassword: 0penBmc bmcusername: root engine_type: openbmc netboot_engine: engine_type: petitboot obj_info: grouptype: static obj_type: group role: compute bogusnode1: device_type: server engines: console_engine: engine_type: openbmc hardware_mgt_engine: engine_info: bmc: 10.100.100.1 bmcpassword: 0penBmc bmcusername: root engine_type: openbmc netboot_engine: engine_type: petitboot obj_info: groups: bogusgroup obj_type: node role: compute bogusnode2: device_type: server engines: console_engine: engine_type: openbmc hardware_mgt_engine: engine_info: bmc: 10.100.100.2 bmcpassword: 0penBmc bmcusername: root engine_type: openbmc netboot_engine: engine_type: petitboot obj_info: groups: bogusgroup obj_type: node role: compute bogusnode3: device_type: server engines: console_engine: engine_type: openbmc hardware_mgt_engine: engine_info: bmc: 10.100.100.3 bmcpassword: 0penBmc bmcusername: root engine_type: openbmc netboot_engine: engine_type: petitboot obj_info: groups: bogusgroup 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: bogus_image: addkcmdline: aaaa boottarget: aaa imagetype: linux provision_mode: statelite role: compute rhels7.4-ppc64le-install-compute: basic_attributes: arch: ppc64le distribution: rhels7.4 osdistro: rhels7.4-ppc64le osname: Linux imagetype: linux package_selection: otherpkgdir: /install/post/otherpkgs/rhels7.4/ppc64le pkgdir: /install/rhels7.4/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 rhels7.4-ppc64le-install-service: basic_attributes: arch: ppc64le distribution: rhels7.4 osdistro: rhels7.4-ppc64le osname: Linux imagetype: linux package_selection: otherpkgdir: /install/post/otherpkgs/rhels7.4/ppc64le otherpkglist: /opt/xcat/share/xcat/install/rh/service.rhels7.ppc64le.otherpkgs.pkglist pkgdir: /install/rhels7.4/ppc64le pkglist: /opt/xcat/share/xcat/install/rh/service.rhels7.ppc64le.pkglist provision_mode: install role: service scripts: postscripts: servicenode template: /opt/xcat/share/xcat/install/rh/service.rhels7.tmpl rhels7.4-ppc64le-netboot-compute: basic_attributes: arch: ppc64le distribution: rhels7.4 osdistro: rhels7.4-ppc64le osname: Linux genimgoptions: exlist: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.exlist postinstall: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall rootimgdir: /install/netboot/rhels7.4/ppc64le/compute imagetype: linux package_selection: otherpkgdir: /install/post/otherpkgs/rhels7.4/ppc64le pkgdir: /install/rhels7.4/ppc64le pkglist: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist provision_mode: netboot role: compute rhels7.4-ppc64le-stateful-mgmtnode: basic_attributes: arch: ppc64le distribution: rhels7.4 osdistro: rhels7.4-ppc64le osname: Linux imagetype: linux package_selection: otherpkgdir: /install/post/otherpkgs/rhels7.4/ppc64le pkgdir: /install/rhels7.4/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 rhels7.4-ppc64le-statelite-compute: basic_attributes: arch: ppc64le distribution: rhels7.4 osdistro: rhels7.4-ppc64le osname: Linux genimgoptions: exlist: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.exlist postinstall: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall rootimgdir: /install/netboot/rhels7.4/ppc64le/compute imagetype: linux package_selection: otherpkgdir: /install/post/otherpkgs/rhels7.4/ppc64le pkgdir: /install/rhels7.4/ppc64le pkglist: /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist provision_mode: statelite role: compute passwd: {} policy: '1': name: root rule: allow '1.2': name: c910f03c05k08.pok.stglabs.ibm.com 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: '1.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.3.17.10 fsptimeout: '0' installdir: /install ipmimaxp: '64' ipmiretries: '3' ipmitimeout: '2' master: 10.3.5.8 maxssh: '8' nameservers: 10.3.5.8 nodesyncfiledir: /var/xcat/node/syncfiles powerinterval: '0' ppcmaxp: '64' ppcretry: '3' ppctimeout: '0' sharedtftp: '1' sshbetweennodes: ALLGROUPS syspowerinterval: '0' tftpdir: /tftpboot timezone: America/New_York useNmapfromMN: 'no' vsftp: n xcatconfdir: /etc/xcat xcatdport: '3001' xcatiport: '3002' xcatsslversion: TLSv1" > /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/yaml.test 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 "# bogusnode1: objtype=node bmc=10.100.100.1 bmcpassword=0penBmc bmcusername=root cons=openbmc groups=bogusgroup mgt=openbmc netboot=petitboot bogusnode2: objtype=node bmc=10.100.100.2 bmcpassword=0penBmc bmcusername=root cons=openbmc groups=bogusgroup mgt=openbmc netboot=petitboot bogusnode3: objtype=node bmc=10.100.100.3 bmcpassword=0penBmc bmcusername=root cons=openbmc groups=bogusgroup mgt=openbmc netboot=petitboot" > /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_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_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 check:rc==0 cmd:tabdump site|grep 100.3.5.8 check:rc!=0 cmd:tabdump networks|grep 100_0_0_0-255_0_0_0 check:rc!=0 cmd:rmdef bogusnode[1-3] check:rc==0 cmd:if [[ -e /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/bogusnode.stanza ]]; then cat /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/bogusnode.stanza | mkdef -z -f;fi check:rc==0 cmd:if [[ -e /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/bogusgroup.stanza ]];then cat /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format check:rc==0 end start:xcat_inventory_try_to_import_all_type_is_node_json_format label:others,xcat_inventory 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 cmd:for i in 1 2 3; do lsdef bogusnode$i > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode$i -z >> /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/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/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 '{ "network": { "10_0_0_0-255_0_0_0": { "basic_attr": { "gateway": "10.0.0.103", "mask": "255.0.0.0", "mgtifname": "eth0", "mtu": "1500", "net": "10.0.0.0" }, "service": { "tftpserver": "" } } }, "node": { "bogusgroup": { "device_type": "server", "engines": { "console_engine": { "engine_type": "openbmc" }, "hardware_mgt_engine": { "engine_info": { "bmc": "|\\D+(\\d+)|10.100.100.($1)|", "bmcpassword": "0penBmc", "bmcusername": "root" }, "engine_type": "openbmc" }, "netboot_engine": { "engine_type": "petitboot" } }, "obj_info": { "grouptype": "static" }, "obj_type": "group", "role": "compute" }, "bogusnode1": { "device_type": "server", "engines": { "console_engine": { "engine_type": "openbmc" }, "hardware_mgt_engine": { "engine_info": { "bmc": "10.100.100.1", "bmcpassword": "0penBmc", "bmcusername": "root" }, "engine_type": "openbmc" }, "netboot_engine": { "engine_type": "petitboot" } }, "obj_info": { "groups": "bogusgroup" }, "obj_type": "node", "role": "compute" }, "bogusnode2": { "device_type": "server", "engines": { "console_engine": { "engine_type": "openbmc" }, "hardware_mgt_engine": { "engine_info": { "bmc": "10.100.100.2", "bmcpassword": "0penBmc", "bmcusername": "root" }, "engine_type": "openbmc" }, "netboot_engine": { "engine_type": "petitboot" } }, "obj_info": { "groups": "bogusgroup" }, "obj_type": "node", "role": "compute" }, "bogusnode3": { "device_type": "server", "engines": { "console_engine": { "engine_type": "openbmc" }, "hardware_mgt_engine": { "engine_info": { "bmc": "10.100.100.3", "bmcpassword": "0penBmc", "bmcusername": "root" }, "engine_type": "openbmc" }, "netboot_engine": { "engine_type": "petitboot" } }, "obj_info": { "groups": "bogusgroup" }, "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": { "bogus_image": { "addkcmdline": "aaaa", "boottarget": "aaa", "imagetype": "linux", "provision_mode": "statelite", "role": "compute" }, "rhels7.4-ppc64le-install-compute": { "basic_attributes": { "arch": "ppc64le", "distribution": "rhels7.4", "osdistro": "rhels7.4-ppc64le", "osname": "Linux" }, "imagetype": "linux", "package_selection": { "otherpkgdir": "/install/post/otherpkgs/rhels7.4/ppc64le", "pkgdir": "/install/rhels7.4/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" }, "rhels7.4-ppc64le-install-service": { "basic_attributes": { "arch": "ppc64le", "distribution": "rhels7.4", "osdistro": "rhels7.4-ppc64le", "osname": "Linux" }, "imagetype": "linux", "package_selection": { "otherpkgdir": "/install/post/otherpkgs/rhels7.4/ppc64le", "otherpkglist": "/opt/xcat/share/xcat/install/rh/service.rhels7.ppc64le.otherpkgs.pkglist", "pkgdir": "/install/rhels7.4/ppc64le", "pkglist": "/opt/xcat/share/xcat/install/rh/service.rhels7.ppc64le.pkglist" }, "provision_mode": "install", "role": "service", "scripts": { "postscripts": "servicenode" }, "template": "/opt/xcat/share/xcat/install/rh/service.rhels7.tmpl" }, "rhels7.4-ppc64le-netboot-compute": { "basic_attributes": { "arch": "ppc64le", "distribution": "rhels7.4", "osdistro": "rhels7.4-ppc64le", "osname": "Linux" }, "genimgoptions": { "exlist": "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.exlist", "postinstall": "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall", "rootimgdir": "/install/netboot/rhels7.4/ppc64le/compute" }, "imagetype": "linux", "package_selection": { "otherpkgdir": "/install/post/otherpkgs/rhels7.4/ppc64le", "pkgdir": "/install/rhels7.4/ppc64le", "pkglist": "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist" }, "provision_mode": "netboot", "role": "compute" }, "rhels7.4-ppc64le-stateful-mgmtnode": { "basic_attributes": { "arch": "ppc64le", "distribution": "rhels7.4", "osdistro": "rhels7.4-ppc64le", "osname": "Linux" }, "imagetype": "linux", "package_selection": { "otherpkgdir": "/install/post/otherpkgs/rhels7.4/ppc64le", "pkgdir": "/install/rhels7.4/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" }, "rhels7.4-ppc64le-statelite-compute": { "basic_attributes": { "arch": "ppc64le", "distribution": "rhels7.4", "osdistro": "rhels7.4-ppc64le", "osname": "Linux" }, "genimgoptions": { "exlist": "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.exlist", "postinstall": "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.postinstall", "rootimgdir": "/install/netboot/rhels7.4/ppc64le/compute" }, "imagetype": "linux", "package_selection": { "otherpkgdir": "/install/post/otherpkgs/rhels7.4/ppc64le", "pkgdir": "/install/rhels7.4/ppc64le", "pkglist": "/opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist" }, "provision_mode": "statelite", "role": "compute" } }, "passwd": {}, "policy": { "1": { "name": "root", "rule": "allow" }, "1.2": { "name": "c910f03c05k08.pok.stglabs.ibm.com", "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": "1.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.3.17.10", "fsptimeout": "0", "installdir": "/install", "ipmimaxp": "64", "ipmiretries": "3", "ipmitimeout": "2", "master": "10.3.5.8", "maxssh": "8", "nameservers": "10.3.5.8", "nodesyncfiledir": "/var/xcat/node/syncfiles", "powerinterval": "0", "ppcmaxp": "64", "ppcretry": "3", "ppctimeout": "0", "sharedtftp": "1", "sshbetweennodes": "ALLGROUPS", "syspowerinterval": "0", "tftpdir": "/tftpboot", "timezone": "America/New_York", "useNmapfromMN": "no", "vsftp": "n", "xcatconfdir": "/etc/xcat", "xcatdport": "3001", "xcatiport": "3002", "xcatsslversion": "TLSv1" } } }' > /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/json.test 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: objtype=node bmc=10.100.100.1 bmcpassword=0penBmc bmcusername=root cons=openbmc groups=bogusgroup mgt=openbmc netboot=petitboot bogusnode2: objtype=node bmc=10.100.100.2 bmcpassword=0penBmc bmcusername=root cons=openbmc groups=bogusgroup mgt=openbmc netboot=petitboot bogusnode3: objtype=node bmc=10.100.100.3 bmcpassword=0penBmc bmcusername=root 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 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 check:rc==0 cmd:tabdump site|grep 100.3.5.8 check:rc!=0 cmd:tabdump networks|grep 100_0_0_0-255_0_0_0 check:rc!=0 cmd:rmdef bogusnode[1-3] check:rc==0 cmd:if [[ -e /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/bogusnode.stanza ]]; then cat /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/bogusnode.stanza | mkdef -z -f;fi check:rc==0 cmd:if [[ -e /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/bogusgroup.stanza ]];then cat /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format check:rc==0 end start:export_more_nodes_import_part_nodes_json label:others,xcat_inventory 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 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_more_nodes_import_part_nodes_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_more_nodes_import_part_nodes_json/bogusnode.stanza;rmdef -t group bogusgroup; fi check:rc==0 cmd:mkdef bogusnode[1-3] groups=bogusgroup check:rc==0 cmd:#!/bin/bash echo '# bogusnode1: objtype=node groups=bogusgroup bogusnode2: objtype=node groups=bogusgroup' > /tmp/export_more_nodes_import_part_nodes_json/nodes.bogus check:rc==0 cmd:xcat-inventory export --format=json -t node -o bogusnode1,bogusnode2,bogusnode3|tee /tmp/export_more_nodes_import_part_nodes_json/nodes.export check:rc==0 cmd:rmdef bogusnode[1-3] check:rc==0 cmd:xcat-inventory import -f /tmp/export_more_nodes_import_part_nodes_json/nodes.export -t node -o bogusnode1,bogusnode2 check:rc==0 cmd:lsdef -t node bogusnode1,bogusnode2 -z |sed -e '/^\s*$/d' > /tmp/export_more_nodes_import_part_nodes_json/nodes.import check:rc==0 cmd:diff -y /tmp/export_more_nodes_import_part_nodes_json/nodes.bogus /tmp/export_more_nodes_import_part_nodes_json/nodes.import check:rc==0 cmd:lsdef -t node bogusnode3 check:output=~Error: (\[.*?\]: )?Could not find an object check:rc!=0 cmd:rmdef bogusnode[1-2] check:rc==0 cmd:if [[ -e /tmp/export_more_nodes_import_part_nodes_json/bogusnode.stanza ]]; then cat /tmp/export_more_nodes_import_part_nodes_json/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_more_nodes_import_part_nodes_json/bogusgroup.stanza ]];then cat /tmp/export_more_nodes_import_part_nodes_json/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/export_more_nodes_import_part_nodes_json check:rc==0 end start:export_more_nodes_import_part_nodes_yaml label:others,xcat_inventory 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 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_more_nodes_import_part_nodes_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_more_nodes_import_part_nodes_yaml/bogusnode.stanza;rmdef -t group bogusgroup; fi check:rc==0 cmd:mkdef bogusnode[1-3] groups=bogusgroup check:rc==0 cmd:#!/bin/bash echo '# bogusnode1: objtype=node groups=bogusgroup bogusnode2: objtype=node groups=bogusgroup' > /tmp/export_more_nodes_import_part_nodes_yaml/nodes.bogus check:rc==0 cmd:xcat-inventory export --format=yaml -t node -o bogusnode1,bogusnode2,bogusnode3|tee /tmp/export_more_nodes_import_part_nodes_yaml/nodes.export check:rc==0 cmd:rmdef bogusnode[1-3] check:rc==0 cmd:xcat-inventory import -f /tmp/export_more_nodes_import_part_nodes_yaml/nodes.export -t node -o bogusnode1,bogusnode2 check:rc==0 cmd:lsdef -t node bogusnode1,bogusnode2 -z |sed -e '/^\s*$/d' > /tmp/export_more_nodes_import_part_nodes_yaml/nodes.import check:rc==0 cmd:diff -y /tmp/export_more_nodes_import_part_nodes_yaml/nodes.bogus /tmp/export_more_nodes_import_part_nodes_yaml/nodes.import check:rc==0 cmd:lsdef -t node bogusnode3 check:output=~Error: (\[.*?\]: )?Could not find an object check:rc!=0 cmd:rmdef bogusnode[1-2] check:rc==0 cmd:if [[ -e /tmp/export_more_nodes_import_part_nodes_yaml/bogusnode.stanza ]]; then cat /tmp/export_more_nodes_import_part_nodes_yaml/bogusnode.stanza | mkdef -z;fi check:rc==0 cmd:if [[ -e /tmp/export_more_nodes_import_part_nodes_yaml/bogusgroup.stanza ]];then cat /tmp/export_more_nodes_import_part_nodes_yaml/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/export_more_nodes_import_part_nodes_yaml check:rc==0 end start:export_single_node_then_modify_yaml_then_import label:others,xcat_inventory 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/' 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' 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' 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 check:rc==0 cmd:sed -i 's/arch=ppc64/arch=ppc64le/g' /tmp/export_single_node_then_modify_yaml_then_import/srcbogusnode.stanza check:rc==0 cmd:sed -i 's/ip=10.10.10.10/ip=10.20.10.20/g' /tmp/export_single_node_then_modify_yaml_then_import/srcbogusnode.stanza check:rc==0 cmd:sed -i 's/mac=42:d6:0a:03:05:08/mac=42:d6:0a:03:05:09/g' /tmp/export_single_node_then_modify_yaml_then_import/srcbogusnode.stanza check:rc==0 cmd:sed -i 's/netboot=grub2/netboot=petitboot/g' /tmp/export_single_node_then_modify_yaml_then_import/srcbogusnode.stanza check:rc==0 cmd:a=('setuptftp' 'setupnameserver' 'setupdhcp' 'setupntp' 'setupldap' 'setupproxydhcp' 'setupipforward' 'setupconserver' 'setupnfs');for i in ${a[@]};do sed -i "s/$i=1/$i=0/g" /tmp/export_single_node_then_modify_yaml_then_import/srcbogusnode.stanza; done check:rc==0 cmd:xcat-inventory export --format=yaml -t node -o bogusnode |tee /tmp/export_single_node_then_modify_yaml_then_import/bogusnode_yaml.inv check:rc==0 cmd:sed -i 's/1111/2222/g' /tmp/export_single_node_then_modify_yaml_then_import/bogusnode_yaml.inv check:rc==0 cmd:sed -i 's/unused/used/g' /tmp/export_single_node_then_modify_yaml_then_import/bogusnode_yaml.inv check:rc==0 cmd:sed -i 's/10.10.100.9/20.10.200.9/g' /tmp/export_single_node_then_modify_yaml_then_import/bogusnode_yaml.inv check:rc==0 cmd:sed -i "s/arch: '*ppc64'*/arch: 'ppc64le'/g" /tmp/export_single_node_then_modify_yaml_then_import/bogusnode_yaml.inv check:rc==0 cmd:sed -i "s/ip: '*10.10.10.10'*/ip: '10.20.10.20'/g" /tmp/export_single_node_then_modify_yaml_then_import/bogusnode_yaml.inv check:rc==0 cmd:sed -i 's/- 42:d6:0a:03:05:08/- 42:d6:0a:03:05:09/g' /tmp/export_single_node_then_modify_yaml_then_import/bogusnode_yaml.inv check:rc==0 cmd:sed -i 's/ grub2/ petitboot/g' /tmp/export_single_node_then_modify_yaml_then_import/bogusnode_yaml.inv check:rc==0 cmd:a=('setuptftp' 'setupnameserver' 'setupdhcp' 'setupntp' 'setupldap' 'setupproxydhcp' 'setupipforward' 'setupconserver' 'setupnfs');for i in ${a[@]};do sed -i "s/$i: '*1'*/$i: '0'/g" /tmp/export_single_node_then_modify_yaml_then_import/bogusnode_yaml.inv; done check:rc==0 cmd:scp /tmp/export_single_node_then_modify_yaml_then_import/bogusnode_yaml.inv $$DSTMN:/tmp/export_single_node_then_modify_yaml_then_import_$$DSTMN/ 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' 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' 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 cmd: cat /tmp/export_single_node_then_modify_yaml_then_import/dstbogusnode.stanza 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 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/' 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' 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' 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 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 cmd:sed -i 's/ip=10.10.10.10/ip=10.20.10.20/g' /tmp/export_single_node_then_modify_json_then_import/srcbogusnode.stanza check:rc==0 cmd:sed -i 's/mac=42:d6:0a:03:05:08/mac=42:d6:0a:03:05:09/g' /tmp/export_single_node_then_modify_json_then_import/srcbogusnode.stanza check:rc==0 cmd:sed -i 's/netboot=grub2/netboot=petitboot/g' /tmp/export_single_node_then_modify_json_then_import/srcbogusnode.stanza check:rc==0 cmd:a=('setuptftp' 'setupnameserver' 'setupdhcp' 'setupntp' 'setupldap' 'setupproxydhcp' 'setupipforward' 'setupconserver' 'setupnfs');for i in ${a[@]};do sed -i "s/$i=1/$i=0/g" /tmp/export_single_node_then_modify_json_then_import/srcbogusnode.stanza; done check:rc==0 cmd:xcat-inventory export --format=json -t node -o bogusnode |tee /tmp/export_single_node_then_modify_json_then_import/bogusnode_json.inv check:rc==0 cmd:sed -i 's/1111/2222/g' /tmp/export_single_node_then_modify_json_then_import/bogusnode_json.inv check:rc==0 cmd:sed -i 's/unused/used/g' /tmp/export_single_node_then_modify_json_then_import/bogusnode_json.inv check:rc==0 cmd:sed -i 's/10.10.100.9/20.10.200.9/g' /tmp/export_single_node_then_modify_json_then_import/bogusnode_json.inv check:rc==0 cmd:sed -i 's/"arch": "ppc64"/"arch": "ppc64le"/g' /tmp/export_single_node_then_modify_json_then_import/bogusnode_json.inv check:rc==0 cmd:sed -i 's/"ip": "10.10.10.10"/"ip": "10.20.10.20"/g' /tmp/export_single_node_then_modify_json_then_import/bogusnode_json.inv check:rc==0 cmd:sed -i 's/"42:d6:0a:03:05:08"/"42:d6:0a:03:05:09"/g' /tmp/export_single_node_then_modify_json_then_import/bogusnode_json.inv check:rc==0 cmd:sed -i 's/ "grub2"/ "petitboot"/g' /tmp/export_single_node_then_modify_json_then_import/bogusnode_json.inv check:rc==0 cmd:a=('setuptftp' 'setupnameserver' 'setupdhcp' 'setupntp' 'setupldap' 'setupproxydhcp' 'setupipforward' 'setupconserver' 'setupnfs');for i in ${a[@]};do sed -i "s/\"$i\": \"1\"/\"$i\": \"0\"/g" /tmp/export_single_node_then_modify_json_then_import/bogusnode_json.inv; done check:rc==0 cmd:scp /tmp/export_single_node_then_modify_json_then_import/bogusnode_json.inv $$DSTMN:/tmp/export_single_node_then_modify_json_then_import_$$DSTMN/ 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' 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' 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 cmd: cat /tmp/export_single_node_then_modify_json_then_import/dstbogusnode.stanza 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' 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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/' 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' 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' 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 cmd: mkdef -t node -o bogusnode[1-3] groups=bogusgroup check:rc==0 cmd: lsdef -t node -o bogusnode[1-3] > /tmp/export_import_single_group_json/target_nodes_group check:rc==0 cmd: lsdef -t group -o bogusgroup >> /tmp/export_import_single_group_json/target_nodes_group check:rc==0 cmd:sed -e 's/members=.*$/members='"$(awk -F = '/members=/ { print $2 }' < /tmp/export_import_single_group_json/target_nodes_group | tr , ' ' | xargs -n 1 | sort -g | xargs -n 999 | tr ' ' ,)"'/' < /tmp/export_import_single_group_json/target_nodes_group > /tmp/export_import_single_group_json/target_nodes_group.1; cp -f /tmp/export_import_single_group_json/target_nodes_group.1 /tmp/export_import_single_group_json/target_nodes_group check:rc==0 cmd:xcat-inventory export --format=json -t node -o bogusnode1,bogusnode2,bogusnode3,bogusgroup |tee /tmp/export_import_single_group_json/export.file check:rc==0 cmd:scp /tmp/export_import_single_group_json/export.file $$DSTMN:/tmp/export_import_single_group_json_$$DSTMN/ check:rc==0 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' check:rc==0 cmd:ssh $$DSTMN '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' 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]' check:rc==0 cmd: ssh $$DSTMN '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 cmd:diff -y /tmp/export_import_single_group_json/target_nodes_group /tmp/export_import_single_group_json/import_nodes_group check:rc==0 cmd:if [[ -e /tmp/export_import_single_group_json/bogusnode.stanza ]]; then cat /tmp/export_import_single_group_json/bogusnode.stanza | mkdef -z;fi 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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/' 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' 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' 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 cmd: mkdef -t node -o bogusnode[1-3] groups=bogusgroup check:rc==0 cmd: lsdef -t node -o bogusnode[1-3] > /tmp/export_import_single_group_yaml/target_nodes_group check:rc==0 cmd: lsdef -t group -o bogusgroup >> /tmp/export_import_single_group_yaml/target_nodes_group check:rc==0 cmd:sed -e 's/members=.*$/members='"$(awk -F = '/members=/ { print $2 }' < /tmp/export_import_single_group_yaml/target_nodes_group | tr , ' ' | xargs -n 1 | sort -g | xargs -n 999 | tr ' ' ,)"'/' < /tmp/export_import_single_group_yaml/target_nodes_group > /tmp/export_import_single_group_yaml/target_nodes_group.1; cp -f /tmp/export_import_single_group_yaml/target_nodes_group.1 /tmp/export_import_single_group_yaml/target_nodes_group check:rc==0 cmd:xcat-inventory export --format=yaml -t node -o bogusnode1,bogusnode2,bogusnode3,bogusgroup |tee /tmp/export_import_single_group_yaml/export.file check:rc==0 cmd:scp /tmp/export_import_single_group_yaml/export.file $$DSTMN:/tmp/export_import_single_group_yaml_$$DSTMN/ check:rc==0 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' check:rc==0 cmd:ssh $$DSTMN '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' 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]' check:rc==0 cmd: ssh $$DSTMN '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 cmd:diff -y /tmp/export_import_single_group_yaml/target_nodes_group /tmp/export_import_single_group_yaml/import_nodes_group check:rc==0 cmd:if [[ -e /tmp/export_import_single_group_yaml/bogusnode.stanza ]]; then cat /tmp/export_import_single_group_yaml/bogusnode.stanza | mkdef -z;fi 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' 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' check:rc==0 cmd:ssh $$DSTMN '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 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_obj_type_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_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" check:rc!=0 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" 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 check:rc==0 cmd:rm -rf /tmp/import_validation_node_obj_type_bak check:rc==0 end start:import_validation_node_obj_info_groups label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_obj_info_groups_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_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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_obj_info_groups_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_obj_info_groups_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_obj_info_groups_bak check:rc==0 end start:import_validation_node_device_type label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_device_type_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_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" check:rc!=0 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" 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 cmd:if [[ -e /tmp/import_validation_node_device_type_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_device_type_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_device_type_bak check:rc==0 end start:import_validation_node_device_info_arch label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_device_info_arch_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_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" 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" 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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_device_info_arch_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_device_info_arch_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_device_info_arch_bak check:rc==0 end start:import_validation_node_security_info_snmp_securitylevel label:others,xcat_inventory 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 cmd:lsdef boguspdu > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef boguspdu -z >/tmp/import_validation_node_security_info_snmp_securitylevel_bak/boguspdu.stanza ;rmdef boguspdu;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_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" 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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_security_info_snmp_securitylevel_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_security_info_snmp_securitylevel_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_security_info_snmp_securitylevel_bak check:rc==0 end start:import_validation_node_security_info_snmp_authprotocol label:others,xcat_inventory 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 cmd:lsdef boguspdu > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef boguspdu -z >/tmp/import_validation_node_security_info_snmp_authprotocol_bak/boguspdu.stanza ;rmdef boguspdu;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_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" 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" 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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_security_info_snmp_authprotocol_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_security_info_snmp_authprotocol_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_security_info_snmp_authprotocol_bak check:rc==0 end start:import_validation_node_security_info_snmp_privacyprotocol label:others,xcat_inventory 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 cmd:lsdef bogusswitch > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusswitch -z >/tmp/import_validation_node_security_info_snmp_privacyprotocol_bak/bogusswitch.stanza ;rmdef bogusswitch;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_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" 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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_security_info_snmp_privacyprotocol_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_security_info_snmp_privacyprotocol_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_security_info_snmp_privacyprotocol_bak check:rc==0 end start:import_validation_node_security_info_remotecontrol_remoteprotocol label:others,xcat_inventory 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 cmd:lsdef bogusswitch > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusswitch -z >/tmp/import_validation_node_security_info_remotecontrol_remoteprotocol_bak/bogusswitch.stanza ;rmdef bogusswitch;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_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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_security_info_remotecontrol_remoteprotocol_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_security_info_remotecontrol_remoteprotocol_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_security_info_remotecontrol_remoteprotocol_bak check:rc==0 end start:import_validation_node_network_info_primarynic_ip label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_network_info_primarynic_ip_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_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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_network_info_primarynic_ip_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_network_info_primarynic_ip_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_network_info_primarynic_ip_bak check:rc==0 end start:import_validation_node_network_info_primarynic_mac label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_network_info_primarynic_mac_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_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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_network_info_primarynic_mac_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_network_info_primarynic_mac_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_network_info_primarynic_mac_bak check:rc==0 end start:import_validation_node_nics_network_info_nics_ips label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_nics_network_info_nics_ips_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_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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_nics_network_info_nics_ips_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_nics_network_info_nics_ips_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_nics_network_info_nics_ips_bak 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 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 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 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" 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" 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 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 check:rc==0 cmd:rm -rf /tmp/import_validation_node_network_info_primarynic_switchport_bak check:rc==0 end start:import_validation_node_engines_hardware_mgt_engine_engine_type label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_engines_hardware_mgt_engine_engine_type_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_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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_engines_hardware_mgt_engine_engine_type_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_engines_hardware_mgt_engine_engine_type_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_engines_hardware_mgt_engine_engine_type_bak check:rc==0 end start:import_validation_node_engines_netboot_engine_engine_type label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_engines_netboot_engine_engine_type_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_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" 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" 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" 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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_engines_netboot_engine_engine_type_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_engines_netboot_engine_engine_type_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_engines_netboot_engine_engine_type_bak check:rc==0 end start:import_validation_node_role label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_role_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_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" 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" check:rc!=0 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" 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 cmd:if [[ -e /tmp/import_validation_node_role_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_role_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_role_bak check:rc==0 end start:import_validation_node_role_info_setuptftp label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_role_info_setuptftp_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_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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_role_info_setuptftp_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_role_info_setuptftp_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_role_info_setuptftp_bak check:rc==0 end start:import_validation_node_role_info_setupnameserver label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_role_info_setupnameserver_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_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" 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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_role_info_setupnameserver_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_role_info_setupnameserver_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_role_info_setupnameserver_bak end start:import_validation_node_role_info_setupdhcp label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_role_info_setupdhcp_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_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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_role_info_setupdhcp_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_role_info_setupdhcp_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_role_info_setupdhcp_bak end start:import_validation_node_role_info_setupntp label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_role_info_setupntp_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_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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_role_info_setupntp_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_role_info_setupntp_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_role_info_setupntp_bak end start:import_validation_node_role_info_setupldap label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_role_info_setupldap_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_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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_role_info_setupldap_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_role_info_setupldap_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_role_info_setupldap_bak end start:import_validation_node_role_info_setupproxydhcp label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_role_info_setupproxydhcp_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_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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_role_info_setupproxydhcp_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_role_info_setupproxydhcp_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_role_info_setupproxydhcp_bak end start:import_validation_node_role_info_setupipforward label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_role_info_setupipforward_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_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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_role_info_setupipforward_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_role_info_setupipforward_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_role_info_setupipforward_bak end start:import_validation_node_role_info_setupconserver label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_role_info_setupconserver_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_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" 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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_role_info_setupconserver_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_role_info_setupconserver_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_role_info_setupconserver_bak end start:import_validation_node_role_info_setupnfs label:others,xcat_inventory 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 cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_node_role_info_setupnfs_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_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" 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" 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" 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" 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" 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 cmd:if [[ -e /tmp/import_validation_node_role_info_setupnfs_bak/bogusgroup.stanza ]]; then cat /tmp/import_validation_node_role_info_setupnfs_bak/bogusgroup.stanza |mkdef -z -f;fi check:rc==0 cmd:rm -rf /tmp/import_validation_node_role_info_setupnfs_bak end