From 1c4793ab776b3fa7cc06f98297c253310f7b32cd Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Tue, 13 Feb 2018 02:55:14 -0500 Subject: [PATCH 1/5] Add test cases for configration management first version --- .../testcase/xcat-inventory/cases.common | 146 ++ .../testcase/xcat-inventory/cases.node | 1787 +++++++++++++++++ .../testcase/xcat-inventory/cases.osimage | 926 +++++++++ .../testcase/xcat-inventory/cases.site | 1364 +++++++++++++ 4 files changed, 4223 insertions(+) create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/cases.common create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/cases.node create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/cases.osimage create mode 100644 xCAT-test/autotest/testcase/xcat-inventory/cases.site diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.common b/xCAT-test/autotest/testcase/xcat-inventory/cases.common new file mode 100644 index 000000000..875682e20 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.common @@ -0,0 +1,146 @@ +start:xcat_inventory_option_h +description:This case is used to test xcat-inventory usage information +cmd:xcat-inventory -h +check:ouptut=~usage: xcat-inventory +check:ouptut!~usage: xcat-inventory export +check:ouptut!~usage: xcat-inventory import +check:rc==0 +cmd:xcat-inventory help +check:ouptut=~usage: xcat-inventory +check:ouptut!~usage: xcat-inventory export +check:ouptut!~usage: xcat-inventory import +check:rc==0 +cmd:xcat-inventory help export +check:ouptut=~usage: xcat-inventory export +check:rc==0 +cmd:xcat-inventory help import +check:output=~usage: xcat-inventory import +check:rc==0 +cmd:xcat-inventory help help +check:output=~usage: xcat-inventory help +check:rc==0 +end + + +start:xcat_inventory_option_V +description:This case is used to test xcat-inventory option V which used to get version information +cmd:xcat-inventory -V +check:ouptut=~\d\.\d +check:rc==0 +end + +start:xcat_inventory_invalid_subcmd +description:This case is used to test xcat-inventory export subcommand to handle invalid subcommand. The vaild subcommand are export and import. +cmd:xcat-inventory aaa +check:output=~ xcat-inventory: error: argument : invalid choice: +check:output=~ usage: +check:rc!=0 +end + +start:xcat_inventory_export_option_t_invalid_type +description:This case is used to test xcat-inventory export subcommand to handle invalid type for option t +cmd:xcat-inventory export -t aaa +check:output=~Invalid object type +check:output!~Traceback (most recent call last): +check:rc!=0 +end + +start:xcat_inventory_export_option_format_invalid_type +description:This case is used to test xcat-inventory export subcommand to handle invalid type for option format +cmd:xcat-inventory export --format aaa +check:output=~Invalid exporting format: aaa +check:output!~Traceback (most recent call last): +check:rc!=0 +end + +#start:xcat_inventory_export_option_f_invalid_file +#description:This case is used to test xcat-inventory export subcommand to handle invalid file for option f +#cmd:xcat-inventory export -f aaa +#check:output=~The specified path does not exist +#check:output !~Traceback +#check:rc!=0 +#end + +start:xcat_inventory_import_option_f_invalid_file +description:This case is used to test xcat-inventory import subcommand to handle invalid file for option f +cmd:mkdir -p /tmp/xcat_inventory_import_option_f_invalid_file +check:rc==0 +#to handle a non-existed file +cmd:xcat-inventory import -f aaa +check:output=~The specified path does not exist +check:output !~Traceback +check:rc!=0 +#To handle a invalid json file +cmd:#!/usr/bin/bash +echo "{ + "node": { + "bogusnode": { + "device_type": "server", + "obj_info": { + "groups": "test" + }, + "obj_type": "node", + "role": "compute" + } + } +" > /tmp/xcat_inventory_import_option_f_invalid_file/invaild_json +check:rc==0 +cmd:cat /tmp/xcat_inventory_import_option_f_invalid_file/invaild_json +check:rc==0 +cmd:xcat-inventory import -f /tmp/xcat_inventory_import_option_f_invalid_file/invaild_json +check:output =~ Error: failed to load file +check:output !~Traceback +check:rc!=0 +#To handle a invalid yaml file +cmd:#!/usr/bin/bash +echo "node: + device_type: server + obj_info: + groups: test + obj_type: node + role: compute +" > /tmp/xcat_inventory_import_option_f_invalid_file/invaild_yaml +check:rc==0 +cmd:cat /tmp/xcat_inventory_import_option_f_invalid_file/invaild_yaml +check:rc==0 +cmd:xcat-inventory import -f /tmp/xcat_inventory_import_option_f_invalid_file/invaild_yaml +check:output =~ Error: failed to load file +check:output !~Traceback +check:rc!=0 +cmd:rm -rf /tmp/xcat_inventory_import_option_f_invalid_file +check:rc==0 +end + + +start:xcat_inventory_import_option_t_invalid_type +description:This case is used to test xcat-inventory import subcommand to handle invalid type for option t +cmd:xcat-inventory import -t aaa +check:output=~Invalid object type +check:output!~Traceback (most recent call last): +check:rc!=0 +end + + +start:xcat_inventory_import_miss_option +description:This case is used to test xcat-inventory import subcommand to handle missing -t or -o option +cmd:mkdir -p /tmp/export_import_nodes_delimited_with_comma_by_json +check:rc==0 +cmd:#!/usr/bin/bash +echo "{ + "node": { + "test": { + "device_type": "server", + "obj_info": { + "groups": "testgroup" + }, + "obj_type": "node", + "role": "compute" + } + } +}" > /tmp/export_import_nodes_delimited_with_comma_by_json/aaa +cmd:xcat-inventory import -f /tmp/export_import_nodes_delimited_with_comma_by_json/aaa -o aaa +check:output=~Missing object type for object +check:rc!=0 +cmd:rm -rf /tmp/export_import_nodes_delimited_with_comma_by_json +check:rc==0 +end diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.node b/xCAT-test/autotest/testcase/xcat-inventory/cases.node new file mode 100644 index 000000000..92d8d8177 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.node @@ -0,0 +1,1787 @@ +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. +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=arch 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=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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. +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=arch 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=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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. +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=arch 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=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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. +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=arch 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=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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. +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=arch authdomain=authdomain authkey=authkey authtype=authtype 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 hcp=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=privtype productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames seclevel=seclevel serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot snmpuser=snmpuser snmpversion=snmpversion storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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. +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=arch authdomain=authdomain authkey=authkey authtype=authtype 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 hcp=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=privtype productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames seclevel=seclevel serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot snmpuser=snmpuser snmpversion=snmpversion storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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. +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=arch 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 hcp=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot slotid=slotid storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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. +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=arch 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 hcp=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot slotid=slotid storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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. +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=arch 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 hcp=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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. +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=arch 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 hcp=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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. +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=arch 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=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid linkports=linkports mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=protocol provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot snmpauth=snmpauth snmppassword=snmppassword snmpprivacy=snmpprivacy snmpusername=snmpusername snmpversion=snmpversion storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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. +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=arch 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=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid linkports=linkports mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=protocol provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot snmpauth=snmpauth snmppassword=snmppassword snmpprivacy=snmpprivacy snmpusername=snmpusername snmpversion=snmpversion storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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. +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. +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 +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 objects: bogusnode! +check:rc!=0 +cmd: xcat-inventory export --format=yaml -t node -o bogusnode +check:output=~Error: cannot find 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 +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 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 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 +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));ia=$(grep " \"obj_type\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_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_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 +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 +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 +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: + openbmc_info: + bmcpassword: 0penBmc + bmcusername: root + engine_type: openbmc + netboot_engine: + engine_type: petitboot + network_info: + primarynic: + ip: '|\D+(\d+)|10.100.100.(\$1)|' + obj_info: + grouptype: static + obj_type: group + role: compute + bogusnode1: + device_type: server + obj_info: + groups: bogusgroup + obj_type: node + role: compute + bogusnode2: + device_type: server + obj_info: + groups: bogusgroup + obj_type: node + role: compute + bogusnode3: + device_type: server + 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: + 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: + cluster: + 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 + bmcpassword=0penBmc + bmcusername=root + cons=openbmc + groups=bogusgroup + ip=10.100.100.1 + mgt=openbmc + netboot=petitboot +bogusnode2: + objtype=node + bmcpassword=0penBmc + bmcusername=root + cons=openbmc + groups=bogusgroup + ip=10.100.100.2 + mgt=openbmc + netboot=petitboot +bogusnode3: + objtype=node + bmcpassword=0penBmc + bmcusername=root + cons=openbmc + groups=bogusgroup + ip=10.100.100.3 + 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 +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": { + "openbmc_info": { + "bmcpassword": "0penBmc", + "bmcusername": "root" + } + }, + "engine_type": "openbmc" + }, + "netboot_engine": { + "engine_type": "petitboot" + } + }, + "network_info": { + "primarynic": { + "ip": "|\\D+(\\d+)|10.100.100.($1)|" + } + }, + "obj_info": { + "grouptype": "static" + }, + "obj_type": "group", + "role": "compute" + }, + "bogusnode1": { + "device_type": "server", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + }, + "bogusnode2": { + "device_type": "server", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + }, + "bogusnode3": { + "device_type": "server", + "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": { + "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": { + "cluster": { + "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 + bmcpassword=0penBmc + bmcusername=root + cons=openbmc + groups=bogusgroup + ip=10.100.100.1 + mgt=openbmc + netboot=petitboot +bogusnode2: + objtype=node + bmcpassword=0penBmc + bmcusername=root + cons=openbmc + groups=bogusgroup + ip=10.100.100.2 + mgt=openbmc + netboot=petitboot +bogusnode3: + objtype=node + bmcpassword=0penBmc + bmcusername=root + cons=openbmc + groups=bogusgroup + ip=10.100.100.3 + 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 +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 +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 +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=1111 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 hcp=1111 height=1111 hidden=1111 hostcluster=1111 hostinterface=1111 hostmanager=1111 hostnames=1111 hosttype=1111 hwtype=1111 id=1111 installnic=1111 interface=1111 ip=1111 iscsipassword=1111 iscsiserver=1111 iscsitarget=1111 iscsiuserid=1111 mac=1111 memory=1111 migrationdest=1111 monserver=1111 mpa=1111 mtm=1111 nameservers=1111 netboot=1111 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=1111 setupdhcp=1111 setupftp=1111 setupipforward=1111 setupldap=1111 setupnameserver=1111 setupnfs=1111 setupnim=1111 setupntp=1111 setupproxydhcp=1111 setuptftp=1111 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: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: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. +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=1111 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 hcp=1111 height=1111 hidden=1111 hostcluster=1111 hostinterface=1111 hostmanager=1111 hostnames=1111 hosttype=1111 hwtype=1111 id=1111 installnic=1111 interface=1111 ip=1111 iscsipassword=1111 iscsiserver=1111 iscsitarget=1111 iscsiuserid=1111 mac=1111 memory=1111 migrationdest=1111 monserver=1111 mpa=1111 mtm=1111 nameservers=1111 netboot=1111 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=1111 setupdhcp=1111 setupftp=1111 setupipforward=1111 setupldap=1111 setupnameserver=1111 setupnfs=1111 setupnim=1111 setupntp=1111 setupproxydhcp=1111 setuptftp=1111 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: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: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 +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: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: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 'rmdef -t node -o bogusnode[1-3]' +check:rc==0 +cmd:ssh $$DSTMN 'rmdef -t group -o bogusgroup' +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 diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage b/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage new file mode 100644 index 000000000..e7ec504ff --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage @@ -0,0 +1,926 @@ +start:export_import_single_osimage_by_yaml +description:This case is used to test xcat-inventory export and import one linux osimage definition by yaml between 2 exact same MNs. Before running this case, make sure these two MNs have been installed same exactly, and the current MN can connect the other MN by ssh without password. This case also can be run in one MN, this is, export from currnet node then import back to currnet node, in this case, just need to set $$DSTMN= +Attribute: $$DSTMN - the ip of MN which is used to run import operation. +cmd:mkdir -p /tmp/export_import_single_osimage_by_yaml +check:rc==0 +cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_osimage_by_yaml_$$DSTMN/' +check:rc==0 +cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_yaml/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi +check:rc==0 +cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' +check:rc==0 +cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=profile provmethod=provmethod rootfstype=rootfstype rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment +check:rc==0 +cmd:lsdef -t osimage -o bogus_image -z|sort -t'=' -k1 |tee /tmp/export_import_single_osimage_by_yaml/src_bogus_osimage.stanza +check:rc==0 +cmd:xcat-inventory export --format=yaml -t osimage -o bogus_image |tee /tmp/export_import_single_osimage_by_yaml/bogus_image.yaml +check:rc==0 +cmd:scp /tmp/export_import_single_osimage_by_yaml/bogus_image.yaml $$DSTMN:/tmp/export_import_single_osimage_by_yaml_$$DSTMN/ +check:rc==0 +cmd: rmdef -t osimage -o bogus_image +check:rc==0 +cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.yaml -t osimage -o bogus_image' +check:rc==0 +cmd: ssh $$DSTMN 'lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_import_single_osimage_by_yaml_$$DSTMN/dst_bogus_image.stanza' +check:rc==0 +cmd: scp $$DSTMN:/tmp/export_import_single_osimage_by_yaml_$$DSTMN/dst_bogus_image.stanza /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza +check:rc==0 +cmd: cat /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza +check:rc==0 +cmd:diff -y /tmp/export_import_single_osimage_by_yaml/src_bogus_osimage.stanza /tmp/export_import_single_osimage_by_yaml/dst_bogus_image.stanza +check:rc==0 +cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' +check:rc==0 +cmd:if [[ -e /tmp/export_import_single_osimage_by_yaml/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_yaml/bogus_image.stanza | mkdef -z;fi +check:rc==0 +cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza | mkdef -z;fi' +check:rc==0 +cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_osimage_by_yaml_$$DSTMN/' +check:rc==0 +cmd:rm -rf /tmp/export_import_single_osimage_by_yaml +check:rc==0 +end + +start:export_import_single_osimage_by_json +description:This case is used to test xcat-inventory export and import one linux osimage definition by json between 2 exact same MNs. Before running this case, make sure these two MNs have been installed same exactly, and the current MN can connect the other MN by ssh without password. This case also can be run in one MN, this is, export from currnet node then import back to currnet node, in this case, just need to set $$DSTMN= +Attribute: $$DSTMN - the ip of MN which is used to run import operation. +cmd:mkdir -p /tmp/export_import_single_osimage_by_json +check:rc==0 +cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_single_osimage_by_json_$$DSTMN/' +check:rc==0 +cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_json/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi +check:rc==0 +cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' +check:rc==0 +cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=profile provmethod=provmethod rootfstype=rootfstype rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment +check:rc==0 +cmd:lsdef -t osimage -o bogus_image -z|sort -t'=' -k1 |tee /tmp/export_import_single_osimage_by_json/src_bogus_osimage.stanza +check:rc==0 +cmd:xcat-inventory export --format=json -t osimage -o bogus_image |tee /tmp/export_import_single_osimage_by_json/bogus_image.json +check:rc==0 +cmd:scp /tmp/export_import_single_osimage_by_json/bogus_image.json $$DSTMN:/tmp/export_import_single_osimage_by_json_$$DSTMN/ +check:rc==0 +cmd: rmdef -t osimage -o bogus_image +check:rc==0 +cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.json -t osimage -o bogus_image' +check:rc==0 +cmd: ssh $$DSTMN 'lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_import_single_osimage_by_json_$$DSTMN/dst_bogus_image.stanza' +check:rc==0 +cmd: scp $$DSTMN:/tmp/export_import_single_osimage_by_json_$$DSTMN/dst_bogus_image.stanza /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza +check:rc==0 +cmd: cat /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza +check:rc==0 +cmd:diff -y /tmp/export_import_single_osimage_by_json/src_bogus_osimage.stanza /tmp/export_import_single_osimage_by_json/dst_bogus_image.stanza +check:rc==0 +cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' +check:rc==0 +cmd:if [[ -e /tmp/export_import_single_osimage_by_json/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_json/bogus_image.stanza | mkdef -z;fi +check:rc==0 +cmd:ssh $$DSTMN 'if [[ -e /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza | mkdef -z;fi' +check:rc==0 +cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_single_osimage_by_json_$$DSTMN/' +check:rc==0 +cmd:rm -rf /tmp/export_import_single_osimage_by_json +check:rc==0 +end + + + +start:xcat_inventory_try_to_export_all_type_is_osimage_default_format +description:This case is used to test xcat-inventory export all definition which type is osimage by default format, i.e. json format. +cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format +check:rc==0 +cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi +check:rc==0 +cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=profile provmethod=provmethod rootfstype=rootfstype rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment +check:rc==0 +cmd:xcat-inventory export -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +check:rc==0 +cmd:grep ' "osimage": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +check:rc==0 +cmd:grep '"bogus_image": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +check:rc==0 +cmd: grep '"node": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +check:rc!=0 +cmd: grep '"obj_type": "node",' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +check:rc!=0 +cmd: grep '"policy": {'' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +check:rc!=0 +cmd: grep '"passwd": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +check:rc!=0 +cmd: grep '"network": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +check:rc!=0 +cmd: grep '"route": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +check:rc!=0 +cmd: grep '"site": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file +check:rc!=0 +cmd:lsdef -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db +check:rc==0 +cmd: a=0;for i in `awk -F' ' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db`; do if grep -E "\"$i\": {" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file > /dev/null; then ((a++));fi; done; do=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/osimage_in_xcat_db|wc -l);if [[ $do -eq $a ]]; then exit 0; else exit 1;fi +check:rc==0 +cmd: rmdef -t osimage -o bogus_image +check:rc==0 +cmd:if [[ -e /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/bogus_image.stanza ]]; then cat /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/bogus_image.stanza | mkdef -z;fi +check:rc==0 +cmd:rm -rf /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format +check:rc==0 +end + +start:xcat_inventory_try_to_export_all_type_is_osimage_json_format +description:This case is used to test xcat-inventory export all definition which type is osimage by json format. +cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format +check:rc==0 +cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi +check:rc==0 +cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=profile provmethod=provmethod rootfstype=rootfstype rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment +check:rc==0 +cmd:xcat-inventory export --format=json -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/export.file +check:rc==0 +cmd:grep ' "osimage": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/export.file +check:rc==0 +cmd:grep '"bogus_image": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/export.file +check:rc==0 +cmd: grep '"node": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/export.file +check:rc!=0 +cmd: grep '"obj_type": "node",' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/export.file +check:rc!=0 +cmd: grep '"policy": {'' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/export.file +check:rc!=0 +cmd: grep '"passwd": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/export.file +check:rc!=0 +cmd: grep '"network": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/export.file +check:rc!=0 +cmd: grep '"route": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/export.file +check:rc!=0 +cmd: grep '"site": {' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/export.file +check:rc!=0 +cmd:lsdef -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/osimage_in_xcat_db +check:rc==0 +cmd: a=0;for i in `awk -F' ' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/osimage_in_xcat_db`; do if grep -E "\"$i\": {" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/export.file > /dev/null; then ((a++));fi; done; do=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/osimage_in_xcat_db|wc -l);if [[ $do -eq $a ]]; then exit 0; else exit 1;fi +check:rc==0 +cmd: rmdef -t osimage -o bogus_image +check:rc==0 +cmd:if [[ -e /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/bogus_image.stanza ]]; then cat /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/bogus_image.stanza | mkdef -z;fi +check:rc==0 +cmd:rm -rf /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format +check:rc==0 +end + +start:xcat_inventory_try_to_export_all_type_is_osimage_yaml_format +description:This case is used to test xcat-inventory export all definition which type is osimage by yaml format. +cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format +check:rc==0 +cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi +check:rc==0 +cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=profile provmethod=provmethod rootfstype=rootfstype rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment +check:rc==0 +cmd:xcat-inventory export --format=yaml -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/export.file +check:rc==0 +cmd:grep -E "^osimage:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/export.file +check:rc==0 +cmd:grep -E "^\s*bogus_image:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/export.file +check:rc==0 +cmd: grep -E "^node:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/export.file +check:rc!=0 +cmd: grep -E "obj_type: node" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/export.file +check:rc!=0 +cmd: grep -E "^policy:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/export.file +check:rc!=0 +cmd: grep -E "^passwd:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/export.file +check:rc!=0 +cmd: grep -E "^network:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/export.file +check:rc!=0 +cmd: grep -E "^route:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/export.file +check:rc!=0 +cmd: grep -E "^site:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/export.file +check:rc!=0 +cmd:lsdef -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/osimage_in_xcat_db +check:rc==0 +cmd: a=0;for i in `awk -F' ' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/osimage_in_xcat_db`; do if grep -E "$i:" /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/export.file > /dev/null; then ((a++));fi; done; do=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/osimage_in_xcat_db|wc -l);if [[ $do -eq $a ]]; then exit 0; else exit 1;fi +check:rc==0 +cmd: rmdef -t osimage -o bogus_image +check:rc==0 +cmd:if [[ -e /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/bogus_image.stanza ]]; then cat /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/bogus_image.stanza | mkdef -z;fi +check:rc==0 +cmd:rm -rf /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format +check:rc==0 +end + + +start:xcat_inventory_try_to_import_all_type_is_osimage_yaml_format +description:This case is used to test xcat-inventory import all definition which type is osimage from a yaml file. +cmd:mkdir -p /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format +check:rc==0 +cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi +check:rc==0 +cmd:lsdef -t node -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_nodes_db +check:rc==0 +cmd:lsdef -t group -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_group_db +check:rc==0 +cmd:tabdump site > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_site_db +check:rc==0 +cmd:tabdump passwd > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_pw_db +check:rc==0 +cmd:tabdump policy > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_policy_db +check:rc==0 +cmd:tabdump networks > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_network_db +check:rc==0 +cmd:tabdump routes > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_route_db +check:rc==0 +cmd:lsdef -t osimage -l|sed '/^Could not find any object definitions to display/d' > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_osimage_db +check:rc==0 +cmd:#!/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 + schema_version: 1.0 + service: + tftpserver: +node: + bogusnode1: + device_type: server + engines: + console_engine: + engine_info: + cons: openbmc + engine_type: openbmc + hardware_mgt_engine: + engine_info: + bmc: 10.3.11.101 + bmcpassword: 0penBmc + bmcusername: root + engine_type: openbmc + netboot_engine: + engine_type: petitboot + power_mgt_engine: + engine_type: openbmc + network_info: + primarynic: + ip: 10.100.100.1 + obj_info: + groups: bogusgroup + obj_type: node + role: compute + schema_version: 1.0 + bogusnode2: + device_type: server + engines: + console_engine: + engine_info: + cons: openbmc + engine_type: openbmc + hardware_mgt_engine: + engine_info: + bmc: 10.3.11.102 + bmcpassword: 0penBmc + bmcusername: root + engine_type: openbmc + netboot_engine: + engine_type: petitboot + power_mgt_engine: + engine_type: openbmc + network_info: + primarynic: + ip: 10.100.100.2 + obj_info: + groups: bogusgroup + obj_type: node + role: compute + schema_version: 1.0 + bogusnode3: + device_type: server + engines: + console_engine: + engine_info: + cons: openbmc + engine_type: openbmc + hardware_mgt_engine: + engine_info: + bmc: 10.3.11.103 + bmcpassword: 0penBmc + bmcusername: root + engine_type: openbmc + netboot_engine: + engine_type: petitboot + power_mgt_engine: + engine_type: openbmc + network_info: + primarynic: + ip: 10.100.100.3 + obj_info: + groups: bogusgroup + obj_type: node + role: compute + schema_version: 1.0 + service: + device_type: server + engines: + netboot_engine: + engine_info: + postscripts: servicenode + obj_type: group + role: compute + schema_version: 1.0 + xcatdefaults: + device_type: server + engines: + netboot_engine: + engine_info: + postbootscripts: otherpkgs + postscripts: syslog,remoteshell,syncfiles + obj_type: group + role: compute + schema_version: 1.0 +osimage: + bogus_image: + addkcmdline: aaaa + boottarget: aaa + imagetype: linux + schema_version: 1.0 +passwd: {} +policy: + '1': + name: root + rule: allow + schema_version: 1.0 + '1.2': + name: c910f03c05k08.pok.stglabs.ibm.com + rule: trusted + schema_version: 1.0 + '2': + commands: getbmcconfig + rule: allow + schema_version: 1.0 + '2.1': + commands: remoteimmsetup + rule: allow + schema_version: 1.0 + '2.3': + commands: lsxcatd + rule: allow + schema_version: 1.0 + '3': + commands: nextdestiny + rule: allow + schema_version: 1.0 + '4': + commands: getdestiny + rule: allow + schema_version: 1.0 + '4.4': + commands: getpostscript + rule: allow + schema_version: 1.0 + '4.5': + commands: getcredentials + rule: allow + schema_version: 1.0 + '4.6': + commands: syncfiles + rule: allow + schema_version: 1.0 + '4.7': + commands: litefile + rule: allow + schema_version: 1.0 + '4.8': + commands: litetree + rule: allow + schema_version: 1.0 + '4.9': + commands: getadapter + rule: allow + schema_version: 1.0 +route: {} +site: + cluster: + 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' + schema_version: 1.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_osimage_yaml_format/import.file +check:rc==0 +cmd:#!/bin/bash +echo "Object name: bogus_image + addkcmdline=aaaa + boottarget=aaa + imagetype=linux">> /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_osimage_db +check:rc==0 +cmd:sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_osimage_db > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/target_osimage_sort +cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/import.file -t osimage +check:rc==0 +cmd:lsdef -t osimage -l|sort > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/import_osimage +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/target_osimage_sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/import_osimage +check:rc==0 +cmd:lsdef -t node -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_nodes_db +check:rc==0 +cmd:lsdef -t group -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_group_db +check:rc==0 +cmd:tabdump site > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_site_db +check:rc==0 +cmd:tabdump passwd > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_pw_db +check:rc==0 +cmd:tabdump policy > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_policy_db +check:rc==0 +cmd:tabdump networks > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_network_db +check:rc==0 +cmd:tabdump routes > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_route_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_nodes_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_nodes_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_group_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_group_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_site_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_site_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_pw_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_pw_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_policy_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_policy_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_network_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_network_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_route_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/after_route_db +check:rc==0 +cmd: rmdef -t osimage -o bogus_image +check:rc==0 +cmd:if [[ -e /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/bogus_image.stanza ]]; then cat /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/bogus_image.stanza | mkdef -z;fi +check:rc==0 +cmd:rm -rf /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format +check:rc==0 +end + +start:xcat_inventory_try_to_import_all_type_is_osimage_json_format +description:This case is used to test xcat-inventory import all definition which type is osimage from a json file. +cmd:mkdir -p /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format +check:rc==0 +cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi +check:rc==0 +cmd:lsdef -t node -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_nodes_db +check:rc==0 +cmd:lsdef -t group -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_group_db +check:rc==0 +cmd:tabdump site > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_site_db +check:rc==0 +cmd:tabdump passwd > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_pw_db +check:rc==0 +cmd:tabdump policy > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_policy_db +check:rc==0 +cmd:tabdump networks > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_network_db +check:rc==0 +cmd:tabdump routes > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_route_db +check:rc==0 +cmd:lsdef -t osimage -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_osimage_db +check:rc==0 +cmd:lsdef -t osimage -l|sed '/^Could not find any object definitions to display/d' > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_osimage_db +check:rc==0 +cmd:#!/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" + }, + "schema_version": 1.0, + "service": { + "tftpserver": "" + } + } + }, + "node": { + "bogusnode1": { + "device_type": "server", + "engines": { + "console_engine": { + "engine_info": { + "cons": "openbmc" + }, + "engine_type": "openbmc" + }, + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.3.11.101", + "bmcpassword": "0penBmc", + "bmcusername": "root" + }, + "engine_type": "openbmc" + }, + "netboot_engine": { + "engine_type": "petitboot" + }, + "power_mgt_engine": { + "engine_type": "openbmc" + } + }, + "network_info": { + "primarynic": { + "ip": "10.100.100.1" + } + }, + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute", + "schema_version": 1.0 + }, + "bogusnode2": { + "device_type": "server", + "engines": { + "console_engine": { + "engine_info": { + "cons": "openbmc" + }, + "engine_type": "openbmc" + }, + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.3.11.102", + "bmcpassword": "0penBmc", + "bmcusername": "root" + }, + "engine_type": "openbmc" + }, + "netboot_engine": { + "engine_type": "petitboot" + }, + "power_mgt_engine": { + "engine_type": "openbmc" + } + }, + "network_info": { + "primarynic": { + "ip": "10.100.100.2" + } + }, + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute", + "schema_version": 1.0 + }, + "bogusnode3": { + "device_type": "server", + "engines": { + "console_engine": { + "engine_info": { + "cons": "openbmc" + }, + "engine_type": "openbmc" + }, + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.3.11.103", + "bmcpassword": "0penBmc", + "bmcusername": "root" + }, + "engine_type": "openbmc" + }, + "netboot_engine": { + "engine_type": "petitboot" + }, + "power_mgt_engine": { + "engine_type": "openbmc" + } + }, + "network_info": { + "primarynic": { + "ip": "10.100.100.3" + } + }, + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute", + "schema_version": 1.0 + }, + "service": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postscripts": "servicenode" + } + } + }, + "obj_type": "group", + "role": "compute", + "schema_version": 1.0 + }, + "xcatdefaults": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postbootscripts": "otherpkgs", + "postscripts": "syslog,remoteshell,syncfiles" + } + } + }, + "obj_type": "group", + "role": "compute", + "schema_version": 1.0 + } + }, + "osimage": { + "bogus_image": { + "addkcmdline": "aaaa", + "boottarget": "aaa", + "imagetype": "linux", + "schema_version": 1.0 + } + }, + "passwd": {}, + "policy": { + "1": { + "name": "root", + "rule": "allow", + "schema_version": 1.0 + }, + "1.2": { + "name": "c910f03c05k08.pok.stglabs.ibm.com", + "rule": "trusted", + "schema_version": 1.0 + }, + "2": { + "commands": "getbmcconfig", + "rule": "allow", + "schema_version": 1.0 + }, + "2.1": { + "commands": "remoteimmsetup", + "rule": "allow", + "schema_version": 1.0 + }, + "2.3": { + "commands": "lsxcatd", + "rule": "allow", + "schema_version": 1.0 + }, + "3": { + "commands": "nextdestiny", + "rule": "allow", + "schema_version": 1.0 + }, + "4": { + "commands": "getdestiny", + "rule": "allow", + "schema_version": 1.0 + }, + "4.4": { + "commands": "getpostscript", + "rule": "allow", + "schema_version": 1.0 + }, + "4.5": { + "commands": "getcredentials", + "rule": "allow", + "schema_version": 1.0 + }, + "4.6": { + "commands": "syncfiles", + "rule": "allow", + "schema_version": 1.0 + }, + "4.7": { + "commands": "litefile", + "rule": "allow", + "schema_version": 1.0 + }, + "4.8": { + "commands": "litetree", + "rule": "allow", + "schema_version": 1.0 + }, + "4.9": { + "commands": "getadapter", + "rule": "allow", + "schema_version": 1.0 + } + }, + "route": {}, + "site": { + "cluster": { + "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", + "schema_version": 1.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_osimage_json_format/import.file +check:rc==0 +cmd:#!/bin/bash +echo "Object name: bogus_image + addkcmdline=aaaa + boottarget=aaa + imagetype=linux">> /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_osimage_db +check:rc==0 +cmd:sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_osimage_db > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/target_osimage_sort +cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/import.file -t osimage +check:rc==0 +cmd:lsdef -t osimage -l|sort > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/import_osimage +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/target_osimage_sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/import_osimage +check:rc==0 +cmd:lsdef -t node -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_nodes_db +check:rc==0 +cmd:lsdef -t group -l > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_group_db +check:rc==0 +cmd:tabdump site > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_site_db +check:rc==0 +cmd:tabdump passwd > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_pw_db +check:rc==0 +cmd:tabdump policy > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_policy_db +check:rc==0 +cmd:tabdump networks > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_network_db +check:rc==0 +cmd:tabdump routes > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_route_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_nodes_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_nodes_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_group_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_group_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_site_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_site_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_pw_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_pw_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_policy_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_policy_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_network_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_network_db +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_route_db /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/after_route_db +check:rc==0 +cmd: rmdef -t osimage -o bogus_image +check:rc==0 +cmd:if [[ -e /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/bogus_image.stanza ]]; then cat /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/bogus_image.stanza | mkdef -z;fi +check:rc==0 +cmd:rm -rf /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format +check:rc==0 +end + + + +start:export_single_osimage_then_modify_json_then_import +description:This case is used to test xcat-inventory import a osimage , then modify the export json file, then import the json file +cmd:mkdir -p /tmp/export_single_osimage_then_modify_json_then_import +check:rc==0 +cmd:ssh $$DSTMN 'mkdir -p /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/' +check:rc==0 +cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_json_then_import/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi +check:rc==0 +cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' +check:rc==0 +cmd:chdef -t osimage -o bogus_image addkcmdline=1111 boottarget=1111 cfmdir=1111 crashkernelsize=1111 description=1111 driverupdatesrc=1111 dump=1111 exlist=1111 groups=1111 imagename=1111 imagetype=linux isdeletable=1111 kerneldir=1111 kernelver=1111 kitcomponents=1111 krpmver=1111 netdrivers=1111 nodebootif=1111 osarch=1111 osdistroname=1111 osname=1111 osupdatename=1111 osvers=1111 otherifce=1111 otherpkgdir=1111 otherpkglist=1111 partitionfile=1111 permission=1111 pkgdir=1111 pkglist=1111 postbootscripts=1111 postinstall=1111 postscripts=1111 profile=1111 provmethod=1111 rootfstype=1111 rootimgdir=1111 serverrole=1111 synclists=1111 template=1111 usercomment=1111 +check:rc==0 +cmd:lsdef -t osimage -o bogus_image -z|sed 's/1111/2222/g'|sort -t'=' -k1 |tee /tmp/export_single_osimage_then_modify_json_then_import/src_bogus_osimage.stanza +check:rc==0 +cmd:xcat-inventory export --format=json -t osimage -o bogus_image |tee /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.json +check:rc==0 +cmd:sed -i 's/1111/2222/g' /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.json +check:rc==0 +cmd:scp /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.json $$DSTMN:/tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/ +check:rc==0 +cmd: rmdef -t osimage -o bogus_image +check:rc==0 +cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.json -t osimage -o bogus_image' +check:rc==0 +cmd: ssh $$DSTMN 'lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/dst_bogus_image.stanza' +check:rc==0 +cmd: scp $$DSTMN:/tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/dst_bogus_image.stanza /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image.stanza +check:rc==0 +cmd: cat /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image.stanza +check:rc==0 +cmd:diff -y /tmp/export_single_osimage_then_modify_json_then_import/src_bogus_osimage.stanza /tmp/export_single_osimage_then_modify_json_then_import/dst_bogus_image.stanza +check:rc==0 +cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' +check:rc==0 +cmd:if [[ -e /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.stanza | mkdef -z;fi +check:rc==0 +cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza | mkdef -z;fi' +check:rc==0 +cmd:ssh $$DSTMN 'rm -rf /tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/' +check:rc==0 +cmd:rm -rf /tmp/export_single_osimage_then_modify_json_then_import +check:rc==0 +end + +start:export_single_osimage_then_modify_yaml_then_import +description:This case is used to test xcat-inventory import a osimage , then modify the export yaml file, then import the yaml file +cmd:mkdir -p /tmp/export_single_osimage_then_modify_yaml_then_import +check:rc==0 +cmd:ssh $$DSTMN 'mkdir -p /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/' +check:rc==0 +cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi +check:rc==0 +cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' +check:rc==0 +cmd:chdef -t osimage -o bogus_image addkcmdline=1111 boottarget=1111 cfmdir=1111 crashkernelsize=1111 description=1111 driverupdatesrc=1111 dump=1111 exlist=1111 groups=1111 imagename=1111 imagetype=linux isdeletable=1111 kerneldir=1111 kernelver=1111 kitcomponents=1111 krpmver=1111 netdrivers=1111 nodebootif=1111 osarch=1111 osdistroname=1111 osname=1111 osupdatename=1111 osvers=1111 otherifce=1111 otherpkgdir=1111 otherpkglist=1111 partitionfile=1111 permission=1111 pkgdir=1111 pkglist=1111 postbootscripts=1111 postinstall=1111 postscripts=1111 profile=1111 provmethod=1111 rootfstype=1111 rootimgdir=1111 serverrole=1111 synclists=1111 template=1111 usercomment=1111 +check:rc==0 +cmd:lsdef -t osimage -o bogus_image -z|sed 's/1111/2222/g'|sort -t'=' -k1 |tee /tmp/export_single_osimage_then_modify_yaml_then_import/src_bogus_osimage.stanza +check:rc==0 +cmd:xcat-inventory export --format=yaml -t osimage -o bogus_image |tee /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.yaml +check:rc==0 +cmd:sed -i 's/1111/2222/g' /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.yaml +check:rc==0 +cmd:scp /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.yaml $$DSTMN:/tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/ +check:rc==0 +cmd: rmdef -t osimage -o bogus_image +check:rc==0 +cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.yaml -t osimage -o bogus_image' +check:rc==0 +cmd: ssh $$DSTMN 'lsdef -t osimage -o bogus_image -z |sort -t'=' -k1|tee /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/dst_bogus_image.stanza' +check:rc==0 +cmd: scp $$DSTMN:/tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/dst_bogus_image.stanza /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image.stanza +check:rc==0 +cmd: cat /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image.stanza +check:rc==0 +cmd:diff -y /tmp/export_single_osimage_then_modify_yaml_then_import/src_bogus_osimage.stanza /tmp/export_single_osimage_then_modify_yaml_then_import/dst_bogus_image.stanza +check:rc==0 +cmd:ssh $$DSTMN 'rmdef -t osimage -o bogus_image' +check:rc==0 +cmd:if [[ -e /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.stanza | mkdef -z;fi +check:rc==0 +cmd:ssh $$DSTMN 'if [[ -e /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza ]]; then cat /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza | mkdef -z;fi' +check:rc==0 +cmd:ssh $$DSTMN 'rm -rf /tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/' +check:rc==0 +cmd:rm -rf /tmp/export_single_osimage_then_modify_yaml_then_import +check:rc==0 +end + + diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.site b/xCAT-test/autotest/testcase/xcat-inventory/cases.site new file mode 100644 index 000000000..a1b4555e3 --- /dev/null +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.site @@ -0,0 +1,1364 @@ +start:export_import_site_by_yaml +description:This case is used to test xcat-inventory export and import site table by yaml between 2 excat same MNs. Before running this case, make sure these two MNs have been installed same excatly, and the current MN can connect the other MN by ssh without password.This case also can be run in one MN, this is, export from currnet node then import back to currnet node, in this case, just need to set $$DSTMN= +Attribute: $$DSTMN - the ip of MN which is used to run import operation. +cmd:mkdir -p /tmp/export_import_site_by_yaml +check:rc==0 +cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_site_by_yaml_$$DSTMN/' +check:rc==0 +cmd: lsdef -t site -o clustersite -z >/tmp/export_import_site_by_yaml/site.stanza +check:rc==0 +cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_import_site_by_yaml_$$DSTMN/site.stanza ' +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=0 useNFSv4onAIX=0 FQDNfirst=1 SNsyncfiledir='/var/xcat/syncfiles' auditnosyslog=0 auditskipcmds=ALL blademaxp=64 cleanupxcatpost=no consoleondemand=no databaseloc='/var/lib' db2installloc='/mntdb2' dbtracelevel=0 defserialflow=0 defserialport=0 defserialspeed=9600 dhcpinterfaces=eth0 dhcplease=43200 dhcpsetup=n disjointdhcps=1 dnshandler=ddns dnsinterfaces='xcatmn|eth1,eth2;service|bond0' dnsupdaters=dnsupdaters domain='pok.stglabs.ibm.com' enableASMI=no excludenodes=excludenodes externaldns=externaldns extntpservers=extntpservers forwarders=$mnip fsptimeout=0 genmacprefix='00:11:aa' genpasswords=genpasswords hierarchicalattrs=hierarchicalattrs httpport=80 hwctrldispatch=y installdir='/install/' installloc='hostname:/path' ipmidispatch=y ipmimaxp=64 ipmiretries=3 ipmisdrcache=no ipmitimeout=2 iscsidir='/iscsidir' managedaddressmode=dhcp master=$mnip maxssh=8 mnroutenames=mnroutenames nameservers=$mnip nmapoptions='--min-rtt-timeout' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles' ntpservers=$mnip persistkvmguests=y powerinterval=0 ppcmaxp=64 ppcretry=3 ppctimeout=0 precreatemypostscripts=1 pruneservices=1 runbootscripts=yes setinstallnic=1 sharedinstall=no sharedtftp=1 skiptables=nics skipvalidatelog=1 snmpc=snmpc sshbetweennodes=ALLGROUPS svloglocal=1 syspowerinterval=10 syspowermaxnodes=10 tftpdir='/tftprot/' tftpflags='-v' timezone='America/New_York' useNmapfromMN=no useflowcontrol=no usexhrm=no vcenterautojoin=no vmwarereconfigonpower=no vsftp=n xcatconfdir='/etc/xcat' xcatdebugmode=1 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=64 xcatmaxconnections=60 xcatsslciphers='3DES' xcatsslversion=TLSv1 +check:rc==0 +cmd:lsdef -t site -o clustersite -z|sort -t'=' -k1 |tee /tmp/export_import_site_by_yaml/srcsite.stanza +check:rc==0 +cmd:xcat-inventory export --format=yaml -t site -o clustersite |tee /tmp/export_import_site_by_yaml/export_site_yaml.inv +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/$mnip/$$DSTMN/g" /tmp/export_import_site_by_yaml/export_site_yaml.inv +check:rc==0 +cmd:cat /tmp/export_import_site_by_yaml/export_site_yaml.inv +check:rc==0 +cmd:scp /tmp/export_import_site_by_yaml/export_site_yaml.inv $$DSTMN:/tmp/export_import_site_by_yaml_$$DSTMN/ +check:rc==0 +cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_site_by_yaml_$$DSTMN/export_site_yaml.inv -t site -o clustersite' +check:rc==0 +cmd: ssh $$DSTMN 'lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_import_site_by_yaml_$$DSTMN/dstsite.stanza' +check:rc==0 +cmd: scp $$DSTMN:/tmp/export_import_site_by_yaml_$$DSTMN/dstsite.stanza /tmp/export_import_site_by_yaml/dstsite.stanza +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/$$DSTMN/$mnip/g" /tmp/export_import_site_by_yaml/dstsite.stanza +check:rc==0 +cmd: cat /tmp/export_import_site_by_yaml/dstsite.stanza +check:rc==0 +cmd:diff -y /tmp/export_import_site_by_yaml/srcsite.stanza /tmp/export_import_site_by_yaml/dstsite.stanza +check:rc==0 +cmd:cat /tmp/export_import_site_by_yaml/site.stanza | mkdef -z -f +check:rc==0 +cmd:ssh $$DSTMN 'cat /tmp/export_import_site_by_yaml_$$DSTMN/site.stanza | mkdef -z -f' +check:rc==0 +cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_site_by_yaml_$$DSTMN/' +check:rc==0 +cmd:rm -rf /tmp/export_import_site_by_yaml +check:rc==0 +end + + +start:export_import_site_by_json +description:This case is used to test xcat-inventory export and import site table by json between 2 excat same MNs. Before running this case, make sure these two MNs have been installed same excatly, and the current MN can connect the other MN by ssh without password.This case also can be run in one MN, this is, export from currnet node then import back to currnet node, in this case, just need to set $$DSTMN= +Attribute: $$DSTMN - the ip of MN which is used to run import operation. +cmd:mkdir -p /tmp/export_import_site_by_json +check:rc==0 +cmd:ssh $$DSTMN 'mkdir -p /tmp/export_import_site_by_json_$$DSTMN/' +check:rc==0 +cmd: lsdef -t site -o clustersite -z >/tmp/export_import_site_by_json/site.stanza +check:rc==0 +cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_import_site_by_json_$$DSTMN/site.stanza ' +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=0 useNFSv4onAIX=0 FQDNfirst=1 SNsyncfiledir='/var/xcat/syncfiles' auditnosyslog=0 auditskipcmds=ALL blademaxp=64 cleanupxcatpost=no consoleondemand=no databaseloc='/var/lib' db2installloc='/mntdb2' dbtracelevel=0 defserialflow=0 defserialport=0 defserialspeed=9600 dhcpinterfaces=eth0 dhcplease=43200 dhcpsetup=n disjointdhcps=1 dnshandler=ddns dnsinterfaces='xcatmn|eth1,eth2;service|bond0' dnsupdaters=dnsupdaters domain='pok.stglabs.ibm.com' enableASMI=no excludenodes=excludenodes externaldns=externaldns extntpservers=extntpservers forwarders=$mnip fsptimeout=0 genmacprefix='00:11:aa' genpasswords=genpasswords hierarchicalattrs=hierarchicalattrs httpport=80 hwctrldispatch=y installdir='/install/' installloc='hostname:/path' ipmidispatch=y ipmimaxp=64 ipmiretries=3 ipmisdrcache=no ipmitimeout=2 iscsidir='/iscsidir' managedaddressmode=dhcp master=$mnip maxssh=8 mnroutenames=mnroutenames nameservers=$mnip nmapoptions='--min-rtt-timeout' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles' ntpservers=$mnip persistkvmguests=y powerinterval=0 ppcmaxp=64 ppcretry=3 ppctimeout=0 precreatemypostscripts=1 pruneservices=1 runbootscripts=yes setinstallnic=1 sharedinstall=no sharedtftp=1 skiptables=nics skipvalidatelog=1 snmpc=snmpc sshbetweennodes=ALLGROUPS svloglocal=1 syspowerinterval=10 syspowermaxnodes=10 tftpdir='/tftprot/' tftpflags='-v' timezone='America/New_York' useNmapfromMN=no useflowcontrol=no usexhrm=no vcenterautojoin=no vmwarereconfigonpower=no vsftp=n xcatconfdir='/etc/xcat' xcatdebugmode=1 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=64 xcatmaxconnections=60 xcatsslciphers='3DES' xcatsslversion=TLSv1 +check:rc==0 +cmd:lsdef -t site -o clustersite -z|sort -t'=' -k1 |tee /tmp/export_import_site_by_json/srcsite.stanza +check:rc==0 +cmd:xcat-inventory export --format=json -t site -o clustersite |tee /tmp/export_import_site_by_json/export_site_json.inv +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/$mnip/$$DSTMN/g" /tmp/export_import_site_by_json/export_site_json.inv +check:rc==0 +cmd:cat /tmp/export_import_site_by_json/export_site_json.inv +check:rc==0 +cmd:scp /tmp/export_import_site_by_json/export_site_json.inv $$DSTMN:/tmp/export_import_site_by_json_$$DSTMN/ +check:rc==0 +cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_import_site_by_json_$$DSTMN/export_site_json.inv -t site -o clustersite' +check:rc==0 +cmd: ssh $$DSTMN 'lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_import_site_by_json_$$DSTMN/dstsite.stanza' +check:rc==0 +cmd: scp $$DSTMN:/tmp/export_import_site_by_json_$$DSTMN/dstsite.stanza /tmp/export_import_site_by_json/dstsite.stanza +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/$$DSTMN/$mnip/g" /tmp/export_import_site_by_json/dstsite.stanza +check:rc==0 +cmd: cat /tmp/export_import_site_by_json/dstsite.stanza +check:rc==0 +cmd:diff -y /tmp/export_import_site_by_json/srcsite.stanza /tmp/export_import_site_by_json/dstsite.stanza +check:rc==0 +cmd:cat /tmp/export_import_site_by_json/site.stanza | mkdef -z -f +check:rc==0 +cmd:ssh $$DSTMN 'cat /tmp/export_import_site_by_json_$$DSTMN/site.stanza | mkdef -z -f' +check:rc==0 +cmd:ssh $$DSTMN 'rm -rf /tmp/export_import_site_by_json_$$DSTMN/' +check:rc==0 +cmd:rm -rf /tmp/export_import_site_by_json +check:rc==0 +end + + +start:xcat_inventory_try_to_export_all_type_is_site_default_format +description:This case is used to test xcat-inventory export all definition which type is site to default file. I.e. json file +cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format +check:rc==0 +cmd: lsdef -t site -o clustersite -z >/tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.stanza +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=0 useNFSv4onAIX=0 FQDNfirst=1 SNsyncfiledir='/var/xcat/syncfiles' auditnosyslog=0 auditskipcmds=ALL blademaxp=64 cleanupxcatpost=no consoleondemand=no databaseloc='/var/lib' db2installloc='/mntdb2' dbtracelevel=0 defserialflow=0 defserialport=0 defserialspeed=9600 dhcpinterfaces=eth0 dhcplease=43200 dhcpsetup=n disjointdhcps=1 dnshandler=ddns dnsinterfaces='xcatmn|eth1,eth2;service|bond0' dnsupdaters=dnsupdaters domain='pok.stglabs.ibm.com' enableASMI=no excludenodes=excludenodes externaldns=externaldns extntpservers=extntpservers forwarders=$mnip fsptimeout=0 genmacprefix='00:11:aa' genpasswords=genpasswords hierarchicalattrs=hierarchicalattrs httpport=80 hwctrldispatch=y installdir='/install/' installloc='hostname:/path' ipmidispatch=y ipmimaxp=64 ipmiretries=3 ipmisdrcache=no ipmitimeout=2 iscsidir='/iscsidir' managedaddressmode=dhcp master=$mnip maxssh=8 mnroutenames=mnroutenames nameservers=$mnip nmapoptions='--min-rtt-timeout' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles' ntpservers=$mnip persistkvmguests=y powerinterval=0 ppcmaxp=64 ppcretry=3 ppctimeout=0 precreatemypostscripts=1 pruneservices=1 runbootscripts=yes setinstallnic=1 sharedinstall=no sharedtftp=1 skiptables=nics skipvalidatelog=1 snmpc=snmpc sshbetweennodes=ALLGROUPS svloglocal=1 syspowerinterval=10 syspowermaxnodes=10 tftpdir='/tftprot/' tftpflags='-v' timezone='America/New_York' useNmapfromMN=no useflowcontrol=no usexhrm=no vcenterautojoin=no vmwarereconfigonpower=no vsftp=n xcatconfdir='/etc/xcat' xcatdebugmode=1 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=64 xcatmaxconnections=60 xcatsslciphers='3DES' xcatsslversion=TLSv1 +check:rc==0 +cmd:#!/bin/bash +echo '{ + "schema_version": "1.0", + "site": { + "clustersite": { + "FQDNfirst": "1", + "SNsyncfiledir": "/var/xcat/syncfiles", + "auditnosyslog": "0", + "auditskipcmds": "ALL", + "blademaxp": "64", + "cleanupxcatpost": "no", + "consoleondemand": "no", + "databaseloc": "/var/lib", + "db2installloc": "/mntdb2", + "dbtracelevel": "0", + "defserialflow": "0", + "defserialport": "0", + "defserialspeed": "9600", + "dhcpinterfaces": "eth0", + "dhcplease": "43200", + "dhcpsetup": "n", + "disjointdhcps": "1", + "dnshandler": "ddns", + "dnsinterfaces": "xcatmn|eth1,eth2;service|bond0", + "dnsupdaters": "dnsupdaters", + "domain": "pok.stglabs.ibm.com", + "enableASMI": "no", + "excludenodes": "excludenodes", + "externaldns": "externaldns", + "extntpservers": "extntpservers", + "forwarders": "10.3.5.8", + "fsptimeout": "0", + "genmacprefix": "00:11:aa", + "genpasswords": "genpasswords", + "hierarchicalattrs": "hierarchicalattrs", + "httpport": "80", + "hwctrldispatch": "y", + "installdir": "/install/", + "installloc": "hostname:/path", + "ipmidispatch": "y", + "ipmimaxp": "64", + "ipmiretries": "3", + "ipmisdrcache": "no", + "ipmitimeout": "2", + "iscsidir": "/iscsidir", + "managedaddressmode": "dhcp", + "master": "10.3.5.8", + "maxssh": "8", + "mnroutenames": "mnroutenames", + "nameservers": "10.3.5.8", + "nmapoptions": "--min-rtt-timeout", + "nodestatus": "n", + "nodesyncfiledir": "/var/xcat/node/syncfiles", + "ntpservers": "10.3.5.8", + "persistkvmguests": "y", + "powerinterval": "0", + "ppcmaxp": "64", + "ppcretry": "3", + "ppctimeout": "0", + "precreatemypostscripts": "1", + "pruneservices": "1", + "runbootscripts": "yes", + "setinstallnic": "1", + "sharedinstall": "no", + "sharedtftp": "1", + "skiptables": "nics", + "skipvalidatelog": "1", + "snmpc": "snmpc", + "sshbetweennodes": "ALLGROUPS", + "svloglocal": "1", + "syspowerinterval": "10", + "syspowermaxnodes": "10", + "tftpdir": "/tftprot/", + "tftpflags": "-v", + "timezone": "America/New_York", + "useNFSv4onAIX": "0", + "useNmapfromMN": "no", + "useSSHonAIX": "0", + "useflowcontrol": "no", + "usexhrm": "no", + "vcenterautojoin": "no", + "vmwarereconfigonpower": "no", + "vsftp": "n", + "xcatconfdir": "/etc/xcat", + "xcatdebugmode": "1", + "xcatdport": "3001", + "xcatiport": "3002", + "xcatlport": "3003", + "xcatmaxbatchconnections": "64", + "xcatmaxconnections": "60", + "xcatsslciphers": "3DES", + "xcatsslversion": "TLSv1" + } + } +}' > /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.org +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/10.3.5.8/$mnip/g" /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.org +check:rc==0 +cmd:xcat-inventory export -t site |tee /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.export +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.org /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.export +check:rc==0 +cmd:cat /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format/site.stanza | mkdef -z -f +check:rc==0 +cmd:rm -rf /tmp/xcat_inventory_try_to_export_all_type_is_site_default_format +check:rc==0 +end + +start:xcat_inventory_try_to_export_all_type_is_site_json_format +description:This case is used to test xcat-inventory export all definition which type is site to default file. I.e. json file +cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format +check:rc==0 +cmd: lsdef -t site -o clustersite -z >/tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.stanza +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=0 useNFSv4onAIX=0 FQDNfirst=1 SNsyncfiledir='/var/xcat/syncfiles' auditnosyslog=0 auditskipcmds=ALL blademaxp=64 cleanupxcatpost=no consoleondemand=no databaseloc='/var/lib' db2installloc='/mntdb2' dbtracelevel=0 defserialflow=0 defserialport=0 defserialspeed=9600 dhcpinterfaces=eth0 dhcplease=43200 dhcpsetup=n disjointdhcps=1 dnshandler=ddns dnsinterfaces='xcatmn|eth1,eth2;service|bond0' dnsupdaters=dnsupdaters domain='pok.stglabs.ibm.com' enableASMI=no excludenodes=excludenodes externaldns=externaldns extntpservers=extntpservers forwarders=$mnip fsptimeout=0 genmacprefix='00:11:aa' genpasswords=genpasswords hierarchicalattrs=hierarchicalattrs httpport=80 hwctrldispatch=y installdir='/install/' installloc='hostname:/path' ipmidispatch=y ipmimaxp=64 ipmiretries=3 ipmisdrcache=no ipmitimeout=2 iscsidir='/iscsidir' managedaddressmode=dhcp master=$mnip maxssh=8 mnroutenames=mnroutenames nameservers=$mnip nmapoptions='--min-rtt-timeout' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles' ntpservers=$mnip persistkvmguests=y powerinterval=0 ppcmaxp=64 ppcretry=3 ppctimeout=0 precreatemypostscripts=1 pruneservices=1 runbootscripts=yes setinstallnic=1 sharedinstall=no sharedtftp=1 skiptables=nics skipvalidatelog=1 snmpc=snmpc sshbetweennodes=ALLGROUPS svloglocal=1 syspowerinterval=10 syspowermaxnodes=10 tftpdir='/tftprot/' tftpflags='-v' timezone='America/New_York' useNmapfromMN=no useflowcontrol=no usexhrm=no vcenterautojoin=no vmwarereconfigonpower=no vsftp=n xcatconfdir='/etc/xcat' xcatdebugmode=1 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=64 xcatmaxconnections=60 xcatsslciphers='3DES' xcatsslversion=TLSv1 +check:rc==0 +cmd:#!/bin/bash +echo '{ + "schema_version": "1.0", + "site": { + "clustersite": { + "FQDNfirst": "1", + "SNsyncfiledir": "/var/xcat/syncfiles", + "auditnosyslog": "0", + "auditskipcmds": "ALL", + "blademaxp": "64", + "cleanupxcatpost": "no", + "consoleondemand": "no", + "databaseloc": "/var/lib", + "db2installloc": "/mntdb2", + "dbtracelevel": "0", + "defserialflow": "0", + "defserialport": "0", + "defserialspeed": "9600", + "dhcpinterfaces": "eth0", + "dhcplease": "43200", + "dhcpsetup": "n", + "disjointdhcps": "1", + "dnshandler": "ddns", + "dnsinterfaces": "xcatmn|eth1,eth2;service|bond0", + "dnsupdaters": "dnsupdaters", + "domain": "pok.stglabs.ibm.com", + "enableASMI": "no", + "excludenodes": "excludenodes", + "externaldns": "externaldns", + "extntpservers": "extntpservers", + "forwarders": "10.3.5.8", + "fsptimeout": "0", + "genmacprefix": "00:11:aa", + "genpasswords": "genpasswords", + "hierarchicalattrs": "hierarchicalattrs", + "httpport": "80", + "hwctrldispatch": "y", + "installdir": "/install/", + "installloc": "hostname:/path", + "ipmidispatch": "y", + "ipmimaxp": "64", + "ipmiretries": "3", + "ipmisdrcache": "no", + "ipmitimeout": "2", + "iscsidir": "/iscsidir", + "managedaddressmode": "dhcp", + "master": "10.3.5.8", + "maxssh": "8", + "mnroutenames": "mnroutenames", + "nameservers": "10.3.5.8", + "nmapoptions": "--min-rtt-timeout", + "nodestatus": "n", + "nodesyncfiledir": "/var/xcat/node/syncfiles", + "ntpservers": "10.3.5.8", + "persistkvmguests": "y", + "powerinterval": "0", + "ppcmaxp": "64", + "ppcretry": "3", + "ppctimeout": "0", + "precreatemypostscripts": "1", + "pruneservices": "1", + "runbootscripts": "yes", + "setinstallnic": "1", + "sharedinstall": "no", + "sharedtftp": "1", + "skiptables": "nics", + "skipvalidatelog": "1", + "snmpc": "snmpc", + "sshbetweennodes": "ALLGROUPS", + "svloglocal": "1", + "syspowerinterval": "10", + "syspowermaxnodes": "10", + "tftpdir": "/tftprot/", + "tftpflags": "-v", + "timezone": "America/New_York", + "useNFSv4onAIX": "0", + "useNmapfromMN": "no", + "useSSHonAIX": "0", + "useflowcontrol": "no", + "usexhrm": "no", + "vcenterautojoin": "no", + "vmwarereconfigonpower": "no", + "vsftp": "n", + "xcatconfdir": "/etc/xcat", + "xcatdebugmode": "1", + "xcatdport": "3001", + "xcatiport": "3002", + "xcatlport": "3003", + "xcatmaxbatchconnections": "64", + "xcatmaxconnections": "60", + "xcatsslciphers": "3DES", + "xcatsslversion": "TLSv1" + } + } +}' > /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.org +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/10.3.5.8/$mnip/g" /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.org +check:rc==0 +cmd:xcat-inventory export --format=json -t site |tee /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.export +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.org /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.export +check:rc==0 +cmd:cat /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format/site.stanza | mkdef -z -f +check:rc==0 +cmd:rm -rf /tmp/xcat_inventory_try_to_export_all_type_is_site_json_format +check:rc==0 +end + +start:xcat_inventory_try_to_export_all_type_is_site_yaml_format +description:This case is used to test xcat-inventory export all definition which type is site to default file. I.e. json file +cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format +check:rc==0 +cmd: lsdef -t site -o clustersite -z >/tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.stanza +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=0 useNFSv4onAIX=0 FQDNfirst=1 SNsyncfiledir='/var/xcat/syncfiles' auditnosyslog=0 auditskipcmds=ALL blademaxp=64 cleanupxcatpost=no consoleondemand=no databaseloc='/var/lib' db2installloc='/mntdb2' dbtracelevel=0 defserialflow=0 defserialport=0 defserialspeed=9600 dhcpinterfaces=eth0 dhcplease=43200 dhcpsetup=n disjointdhcps=1 dnshandler=ddns dnsinterfaces='xcatmn|eth1,eth2;service|bond0' dnsupdaters=dnsupdaters domain='pok.stglabs.ibm.com' enableASMI=no excludenodes=excludenodes externaldns=externaldns extntpservers=extntpservers forwarders=$mnip fsptimeout=0 genmacprefix='00:11:aa' genpasswords=genpasswords hierarchicalattrs=hierarchicalattrs httpport=80 hwctrldispatch=y installdir='/install/' installloc='hostname:/path' ipmidispatch=y ipmimaxp=64 ipmiretries=3 ipmisdrcache=no ipmitimeout=2 iscsidir='/iscsidir' managedaddressmode=dhcp master=$mnip maxssh=8 mnroutenames=mnroutenames nameservers=$mnip nmapoptions='--min-rtt-timeout' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles' ntpservers=$mnip persistkvmguests=y powerinterval=0 ppcmaxp=64 ppcretry=3 ppctimeout=0 precreatemypostscripts=1 pruneservices=1 runbootscripts=yes setinstallnic=1 sharedinstall=no sharedtftp=1 skiptables=nics skipvalidatelog=1 snmpc=snmpc sshbetweennodes=ALLGROUPS svloglocal=1 syspowerinterval=10 syspowermaxnodes=10 tftpdir='/tftprot/' tftpflags='-v' timezone='America/New_York' useNmapfromMN=no useflowcontrol=no usexhrm=no vcenterautojoin=no vmwarereconfigonpower=no vsftp=n xcatconfdir='/etc/xcat' xcatdebugmode=1 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=64 xcatmaxconnections=60 xcatsslciphers='3DES' xcatsslversion=TLSv1 +check:rc==0 +cmd:#!/bin/bash +echo "schema_version: '1.0' +site: + clustersite: + FQDNfirst: '1' + SNsyncfiledir: /var/xcat/syncfiles + auditnosyslog: '0' + auditskipcmds: ALL + blademaxp: '64' + cleanupxcatpost: 'no' + consoleondemand: 'no' + databaseloc: /var/lib + db2installloc: /mntdb2 + dbtracelevel: '0' + defserialflow: '0' + defserialport: '0' + defserialspeed: '9600' + dhcpinterfaces: eth0 + dhcplease: '43200' + dhcpsetup: n + disjointdhcps: '1' + dnshandler: ddns + dnsinterfaces: xcatmn|eth1,eth2;service|bond0 + dnsupdaters: dnsupdaters + domain: pok.stglabs.ibm.com + enableASMI: 'no' + excludenodes: excludenodes + externaldns: externaldns + extntpservers: extntpservers + forwarders: 10.3.5.8 + fsptimeout: '0' + genmacprefix: 00:11:aa + genpasswords: genpasswords + hierarchicalattrs: hierarchicalattrs + httpport: '80' + hwctrldispatch: y + installdir: /install/ + installloc: hostname:/path + ipmidispatch: y + ipmimaxp: '64' + ipmiretries: '3' + ipmisdrcache: 'no' + ipmitimeout: '2' + iscsidir: /iscsidir + managedaddressmode: dhcp + master: 10.3.5.8 + maxssh: '8' + mnroutenames: mnroutenames + nameservers: 10.3.5.8 + nmapoptions: --min-rtt-timeout + nodestatus: n + nodesyncfiledir: /var/xcat/node/syncfiles + ntpservers: 10.3.5.8 + persistkvmguests: y + powerinterval: '0' + ppcmaxp: '64' + ppcretry: '3' + ppctimeout: '0' + precreatemypostscripts: '1' + pruneservices: '1' + runbootscripts: 'yes' + setinstallnic: '1' + sharedinstall: 'no' + sharedtftp: '1' + skiptables: nics + skipvalidatelog: '1' + snmpc: snmpc + sshbetweennodes: ALLGROUPS + svloglocal: '1' + syspowerinterval: '10' + syspowermaxnodes: '10' + tftpdir: /tftprot/ + tftpflags: -v + timezone: America/New_York + useNFSv4onAIX: '0' + useNmapfromMN: 'no' + useSSHonAIX: '0' + useflowcontrol: 'no' + usexhrm: 'no' + vcenterautojoin: 'no' + vmwarereconfigonpower: 'no' + vsftp: n + xcatconfdir: /etc/xcat + xcatdebugmode: '1' + xcatdport: '3001' + xcatiport: '3002' + xcatlport: '3003' + xcatmaxbatchconnections: '64' + xcatmaxconnections: '60' + xcatsslciphers: 3DES + xcatsslversion: TLSv1" > /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.org +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/10.3.5.8/$mnip/g" /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.org +check:rc==0 +cmd:xcat-inventory export --format=yaml -t site|sed -e '/^\s*$/d' |tee /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.export +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.org /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.export +check:rc==0 +cmd:cat /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format/site.stanza | mkdef -z -f +check:rc==0 +cmd:rm -rf /tmp/xcat_inventory_try_to_export_all_type_is_site_yaml_format +check:rc==0 +end + + +start:xcat_inventory_try_to_import_all_type_is_site_json_format +description:This case is used to test xcat-inventory impport all definition which type is site from json file. +cmd:mkdir -p /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format +check:rc==0 +cmd: lsdef -t site -o clustersite -z >/tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/site.stanza +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_site_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_site_json_format/bogusnode.stanza;rmdef -t group bogusgroup; fi +check:rc==0 +cmd:#!/usr/bin/bash +echo '{ + "network": { + "100_0_0_0-255_0_0_0": { + "basic_attr": { + "gateway": "100.0.0.103", + "mask": "255.0.0.0", + "mgtifname": "eth0", + "mtu": "1500", + "net": "100.0.0.0" + }, + "schema_version": 1.0, + "service": { + "tftpserver": "" + } + } + }, + "node": { + "bogusnode1": { + "device_type": "server", + "engines": { + "console_engine": { + "engine_info": { + "cons": "openbmc" + }, + "engine_type": "openbmc" + }, + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.3.11.101", + "bmcpassword": "0penBmc", + "bmcusername": "root" + }, + "engine_type": "openbmc" + }, + "netboot_engine": { + "engine_type": "petitboot" + }, + "power_mgt_engine": { + "engine_type": "openbmc" + } + }, + "network_info": { + "primarynic": { + "ip": "10.100.100.1" + } + }, + "obj_info": { + "groups": "testgroup" + }, + "obj_type": "node", + "role": "compute", + "schema_version": 1.0 + }, + "bogusnode2": { + "device_type": "server", + "engines": { + "console_engine": { + "engine_info": { + "cons": "openbmc" + }, + "engine_type": "openbmc" + }, + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.3.11.102", + "bmcpassword": "0penBmc", + "bmcusername": "root" + }, + "engine_type": "openbmc" + }, + "netboot_engine": { + "engine_type": "petitboot" + }, + "power_mgt_engine": { + "engine_type": "openbmc" + } + }, + "network_info": { + "primarynic": { + "ip": "10.100.100.2" + } + }, + "obj_info": { + "groups": "testgroup" + }, + "obj_type": "node", + "role": "compute", + "schema_version": 1.0 + }, + "bogusnode3": { + "device_type": "server", + "engines": { + "console_engine": { + "engine_info": { + "cons": "openbmc" + }, + "engine_type": "openbmc" + }, + "hardware_mgt_engine": { + "engine_info": { + "bmc": "10.3.11.103", + "bmcpassword": "0penBmc", + "bmcusername": "root" + }, + "engine_type": "openbmc" + }, + "netboot_engine": { + "engine_type": "petitboot" + }, + "power_mgt_engine": { + "engine_type": "openbmc" + } + }, + "network_info": { + "primarynic": { + "ip": "10.100.100.3" + } + }, + "obj_info": { + "groups": "testgroup" + }, + "obj_type": "node", + "role": "compute", + "schema_version": 1.0 + }, + "service": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postscripts": "servicenode" + } + } + }, + "obj_type": "group", + "role": "compute", + "schema_version": 1.0 + }, + "xcatdefaults": { + "device_type": "server", + "engines": { + "netboot_engine": { + "engine_info": { + "postbootscripts": "otherpkgs", + "postscripts": "syslog,remoteshell,syncfiles" + } + } + }, + "obj_type": "group", + "role": "compute", + "schema_version": 1.0 + } + }, + "osimage": {}, + "passwd": {}, + "policy": { + "1": { + "name": "root", + "rule": "allow", + "schema_version": 1.0 + }, + "1.2": { + "name": "c910f03c05k08.pok.stglabs.ibm.com", + "rule": "trusted", + "schema_version": 1.0 + }, + "2": { + "commands": "getbmcconfig", + "rule": "allow", + "schema_version": 1.0 + }, + "2.1": { + "commands": "remoteimmsetup", + "rule": "allow", + "schema_version": 1.0 + }, + "2.3": { + "commands": "lsxcatd", + "rule": "allow", + "schema_version": 1.0 + }, + "3": { + "commands": "nextdestiny", + "rule": "allow", + "schema_version": 1.0 + }, + "4": { + "commands": "getdestiny", + "rule": "allow", + "schema_version": 1.0 + }, + "4.4": { + "commands": "getpostscript", + "rule": "allow", + "schema_version": 1.0 + }, + "4.5": { + "commands": "getcredentials", + "rule": "allow", + "schema_version": 1.0 + }, + "4.6": { + "commands": "syncfiles", + "rule": "allow", + "schema_version": 1.0 + }, + "4.7": { + "commands": "litefile", + "rule": "allow", + "schema_version": 1.0 + }, + "4.8": { + "commands": "litetree", + "rule": "allow", + "schema_version": 1.0 + }, + "4.9": { + "commands": "getadapter", + "rule": "allow", + "schema_version": 1.0 + } + }, + "route": {}, + "site": { + "clustersite": { + "FQDNfirst": "1", + "SNsyncfiledir": "/var/xcat/syncfiles", + "auditnosyslog": "0", + "auditskipcmds": "ALL", + "blademaxp": "64", + "cleanupxcatpost": "no", + "consoleondemand": "no", + "databaseloc": "/var/lib", + "db2installloc": "/mntdb2", + "dbtracelevel": "0", + "defserialflow": "0", + "defserialport": "0", + "defserialspeed": "9600", + "dhcpinterfaces": "eth0", + "dhcplease": "43200", + "dhcpsetup": "n", + "disjointdhcps": "1", + "dnshandler": "ddns", + "dnsinterfaces": "xcatmn|eth1,eth2;service|bond0", + "dnsupdaters": "dnsupdaters", + "domain": "pok.stglabs.ibm.com", + "enableASMI": "no", + "excludenodes": "excludenodes", + "externaldns": "externaldns", + "extntpservers": "extntpservers", + "forwarders": "10.3.5.8", + "fsptimeout": "0", + "genmacprefix": "00:11:aa", + "genpasswords": "genpasswords", + "hierarchicalattrs": "hierarchicalattrs", + "httpport": "80", + "hwctrldispatch": "y", + "installdir": "/install/", + "installloc": "hostname:/path", + "ipmidispatch": "y", + "ipmimaxp": "64", + "ipmiretries": "3", + "ipmisdrcache": "no", + "ipmitimeout": "2", + "iscsidir": "/iscsidir", + "managedaddressmode": "dhcp", + "master": "10.3.5.8", + "maxssh": "8", + "mnroutenames": "mnroutenames", + "nameservers": "10.3.5.8", + "nmapoptions": "--min-rtt-timeout", + "nodestatus": "n", + "nodesyncfiledir": "/var/xcat/node/syncfiles", + "ntpservers": "10.3.5.8", + "persistkvmguests": "y", + "powerinterval": "0", + "ppcmaxp": "64", + "ppcretry": "3", + "ppctimeout": "0", + "precreatemypostscripts": "1", + "pruneservices": "1", + "runbootscripts": "yes", + "schema_version": 1.0, + "setinstallnic": "1", + "sharedinstall": "no", + "sharedtftp": "1", + "skiptables": "nics", + "skipvalidatelog": "1", + "snmpc": "snmpc", + "sshbetweennodes": "ALLGROUPS", + "svloglocal": "1", + "syspowerinterval": "10", + "syspowermaxnodes": "10", + "tftpdir": "/tftprot/", + "tftpflags": "-v", + "timezone": "America/New_York", + "useNFSv4onAIX": "0", + "useNmapfromMN": "no", + "useSSHonAIX": "0", + "useflowcontrol": "no", + "usexhrm": "no", + "vcenterautojoin": "no", + "vmwarereconfigonpower": "no", + "vsftp": "n", + "xcatconfdir": "/etc/xcat", + "xcatdebugmode": "1", + "xcatdport": "3001", + "xcatiport": "3002", + "xcatlport": "3003", + "xcatmaxbatchconnections": "64", + "xcatmaxconnections": "60", + "xcatsslciphers": "3DES", + "xcatsslversion": "TLSv1" + } + } +}' > /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/json.test +check:rc==0 +cmd:#!/bin/bash +echo "Object name: clustersite + FQDNfirst=1 + SNsyncfiledir=/var/xcat/syncfiles + auditnosyslog=0 + auditskipcmds=ALL + blademaxp=64 + cleanupxcatpost=no + consoleondemand=no + databaseloc=/var/lib + db2installloc=/mntdb2 + dbtracelevel=0 + defserialflow=0 + defserialport=0 + defserialspeed=9600 + dhcpinterfaces=eth0 + dhcplease=43200 + dhcpsetup=n + disjointdhcps=1 + dnshandler=ddns + dnsinterfaces=xcatmn|eth1,eth2;service|bond0 + dnsupdaters=dnsupdaters + domain=pok.stglabs.ibm.com + enableASMI=no + excludenodes=excludenodes + externaldns=externaldns + extntpservers=extntpservers + forwarders=10.3.5.8 + fsptimeout=0 + genmacprefix=00:11:aa + genpasswords=genpasswords + hierarchicalattrs=hierarchicalattrs + httpport=80 + hwctrldispatch=y + installdir=/install/ + installloc=hostname:/path + ipmidispatch=y + ipmimaxp=64 + ipmiretries=3 + ipmisdrcache=no + ipmitimeout=2 + iscsidir=/iscsidir + managedaddressmode=dhcp + master=10.3.5.8 + maxssh=8 + mnroutenames=mnroutenames + nameservers=10.3.5.8 + nmapoptions=--min-rtt-timeout + nodestatus=n + nodesyncfiledir=/var/xcat/node/syncfiles + ntpservers=10.3.5.8 + persistkvmguests=y + powerinterval=0 + ppcmaxp=64 + ppcretry=3 + ppctimeout=0 + precreatemypostscripts=1 + pruneservices=1 + runbootscripts=yes + setinstallnic=1 + sharedinstall=no + sharedtftp=1 + skiptables=nics + skipvalidatelog=1 + snmpc=snmpc + sshbetweennodes=ALLGROUPS + svloglocal=1 + syspowerinterval=10 + syspowermaxnodes=10 + tftpdir=/tftprot/ + tftpflags=-v + timezone=America/New_York + useNFSv4onAIX=0 + useNmapfromMN=no + useSSHonAIX=0 + useflowcontrol=no + usexhrm=no + vcenterautojoin=no + vmwarereconfigonpower=no + vsftp=n + xcatconfdir=/etc/xcat + xcatdebugmode=1 + xcatdport=3001 + xcatiport=3002 + xcatlport=3003 + xcatmaxbatchconnections=64 + xcatmaxconnections=60 + xcatsslciphers=3DES + xcatsslversion=TLSv1"> /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/site.org +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/10.3.5.8/$mnip/g" /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/site.org +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/10.3.5.8/$mnip/g" /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/json.test +check:rc==0 +cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/json.test -t site +check:rc==0 +cmd:lsdef -t site -o clustersite > /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/site.import +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/site.org /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/site.import +check:rc==0 +cmd:lsdef bogusgroup1 +check:output=~Error: Could not find an object +check:rc!=0 +cmd:lsdef bogusgroup2 +check:output=~Error: Could not find an object +check:rc!=0 +cmd:lsdef bogusgroup3 +check:output=~Error: Could not find an object +check:rc!=0 +cmd:tabdump networks|grep 100_0_0_0-255_0_0_0 +check:rc!=0 +cmd:if [[ -e /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/bogusnode.stanza ]]; then cat /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/bogusnode.stanza | mkdef -z;fi +check:rc==0 +cmd:if [[ -e /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/bogusgroup.stanza ]];then cat /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/bogusgroup.stanza |mkdef -z -f;fi +check:rc==0 +cmd:cat /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format/site.stanza | mkdef -z -f +check:rc==0 +cmd:rm -rf /tmp/xcat_inventory_try_to_import_all_type_is_site_json_format +check:rc==0 +end + +start:xcat_inventory_try_to_import_all_type_is_site_yaml_format +description:This case is used to test xcat-inventory impport all definition which type is site from json file. +cmd:mkdir -p /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format +check:rc==0 +cmd: lsdef -t site -o clustersite -z >/tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/site.stanza +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_site_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_site_yaml_format/bogusnode.stanza;rmdef -t group bogusgroup; fi +check:rc==0 +cmd:#!/usr/bin/bash +echo "network: + 100_0_0_0-255_0_0_0: + basic_attr: + gateway: 100.0.0.103 + mask: 255.0.0.0 + mgtifname: eth0 + mtu: '1500' + net: 100.0.0.0 + schema_version: 1.0 + service: + tftpserver: +node: + bogusnode1: + device_type: server + engines: + console_engine: + engine_info: + cons: openbmc + engine_type: openbmc + hardware_mgt_engine: + engine_info: + bmc: 10.3.11.101 + bmcpassword: 0penBmc + bmcusername: root + engine_type: openbmc + netboot_engine: + engine_type: petitboot + power_mgt_engine: + engine_type: openbmc + network_info: + primarynic: + ip: 10.100.100.1 + obj_info: + groups: testgroup + obj_type: node + role: compute + schema_version: 1.0 + bogusnode2: + device_type: server + engines: + console_engine: + engine_info: + cons: openbmc + engine_type: openbmc + hardware_mgt_engine: + engine_info: + bmc: 10.3.11.102 + bmcpassword: 0penBmc + bmcusername: root + engine_type: openbmc + netboot_engine: + engine_type: petitboot + power_mgt_engine: + engine_type: openbmc + network_info: + primarynic: + ip: 10.100.100.2 + obj_info: + groups: testgroup + obj_type: node + role: compute + schema_version: 1.0 + bogusnode3: + device_type: server + engines: + console_engine: + engine_info: + cons: openbmc + engine_type: openbmc + hardware_mgt_engine: + engine_info: + bmc: 10.3.11.103 + bmcpassword: 0penBmc + bmcusername: root + engine_type: openbmc + netboot_engine: + engine_type: petitboot + power_mgt_engine: + engine_type: openbmc + network_info: + primarynic: + ip: 10.100.100.3 + obj_info: + groups: testgroup + obj_type: node + role: compute + schema_version: 1.0 + service: + device_type: server + engines: + netboot_engine: + engine_info: + postscripts: servicenode + obj_type: group + role: compute + schema_version: 1.0 + xcatdefaults: + device_type: server + engines: + netboot_engine: + engine_info: + postbootscripts: otherpkgs + postscripts: syslog,remoteshell,syncfiles + obj_type: group + role: compute + schema_version: 1.0 +osimage: {} +passwd: {} +policy: + '1': + name: root + rule: allow + schema_version: 1.0 + '1.2': + name: c910f03c05k08.pok.stglabs.ibm.com + rule: trusted + schema_version: 1.0 + '2': + commands: getbmcconfig + rule: allow + schema_version: 1.0 + '2.1': + commands: remoteimmsetup + rule: allow + schema_version: 1.0 + '2.3': + commands: lsxcatd + rule: allow + schema_version: 1.0 + '3': + commands: nextdestiny + rule: allow + schema_version: 1.0 + '4': + commands: getdestiny + rule: allow + schema_version: 1.0 + '4.4': + commands: getpostscript + rule: allow + schema_version: 1.0 + '4.5': + commands: getcredentials + rule: allow + schema_version: 1.0 + '4.6': + commands: syncfiles + rule: allow + schema_version: 1.0 + '4.7': + commands: litefile + rule: allow + schema_version: 1.0 + '4.8': + commands: litetree + rule: allow + schema_version: 1.0 + '4.9': + commands: getadapter + rule: allow + schema_version: 1.0 +route: {} +site: + clustersite: + FQDNfirst: '1' + SNsyncfiledir: /var/xcat/syncfiles + auditnosyslog: '0' + auditskipcmds: ALL + blademaxp: '64' + cleanupxcatpost: 'no' + consoleondemand: 'no' + databaseloc: /var/lib + db2installloc: /mntdb2 + dbtracelevel: '0' + defserialflow: '0' + defserialport: '0' + defserialspeed: '9600' + dhcpinterfaces: eth0 + dhcplease: '43200' + dhcpsetup: n + disjointdhcps: '1' + dnshandler: ddns + dnsinterfaces: xcatmn|eth1,eth2;service|bond0 + dnsupdaters: dnsupdaters + domain: pok.stglabs.ibm.com + enableASMI: 'no' + excludenodes: excludenodes + externaldns: externaldns + extntpservers: extntpservers + forwarders: 10.3.5.8 + fsptimeout: '0' + genmacprefix: 00:11:aa + genpasswords: genpasswords + hierarchicalattrs: hierarchicalattrs + httpport: '80' + hwctrldispatch: y + installdir: /install/ + installloc: hostname:/path + ipmidispatch: y + ipmimaxp: '64' + ipmiretries: '3' + ipmisdrcache: 'no' + ipmitimeout: '2' + iscsidir: /iscsidir + managedaddressmode: dhcp + master: 10.3.5.8 + maxssh: '8' + mnroutenames: mnroutenames + nameservers: 10.3.5.8 + nmapoptions: --min-rtt-timeout + nodestatus: n + nodesyncfiledir: /var/xcat/node/syncfiles + ntpservers: 10.3.5.8 + persistkvmguests: y + powerinterval: '0' + ppcmaxp: '64' + ppcretry: '3' + ppctimeout: '0' + precreatemypostscripts: '1' + pruneservices: '1' + runbootscripts: 'yes' + schema_version: 1.0 + setinstallnic: '1' + sharedinstall: 'no' + sharedtftp: '1' + skiptables: nics + skipvalidatelog: '1' + snmpc: snmpc + sshbetweennodes: ALLGROUPS + svloglocal: '1' + syspowerinterval: '10' + syspowermaxnodes: '10' + tftpdir: /tftprot/ + tftpflags: -v + timezone: America/New_York + useNFSv4onAIX: '0' + useNmapfromMN: 'no' + useSSHonAIX: '0' + useflowcontrol: 'no' + usexhrm: 'no' + vcenterautojoin: 'no' + vmwarereconfigonpower: 'no' + vsftp: n + xcatconfdir: /etc/xcat + xcatdebugmode: '1' + xcatdport: '3001' + xcatiport: '3002' + xcatlport: '3003' + xcatmaxbatchconnections: '64' + xcatmaxconnections: '60' + xcatsslciphers: 3DES + xcatsslversion: TLSv1" > /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/yaml.test +check:rc==0 +cmd:#!/bin/bash +echo "Object name: clustersite + FQDNfirst=1 + SNsyncfiledir=/var/xcat/syncfiles + auditnosyslog=0 + auditskipcmds=ALL + blademaxp=64 + cleanupxcatpost=no + consoleondemand=no + databaseloc=/var/lib + db2installloc=/mntdb2 + dbtracelevel=0 + defserialflow=0 + defserialport=0 + defserialspeed=9600 + dhcpinterfaces=eth0 + dhcplease=43200 + dhcpsetup=n + disjointdhcps=1 + dnshandler=ddns + dnsinterfaces=xcatmn|eth1,eth2;service|bond0 + dnsupdaters=dnsupdaters + domain=pok.stglabs.ibm.com + enableASMI=no + excludenodes=excludenodes + externaldns=externaldns + extntpservers=extntpservers + forwarders=10.3.5.8 + fsptimeout=0 + genmacprefix=00:11:aa + genpasswords=genpasswords + hierarchicalattrs=hierarchicalattrs + httpport=80 + hwctrldispatch=y + installdir=/install/ + installloc=hostname:/path + ipmidispatch=y + ipmimaxp=64 + ipmiretries=3 + ipmisdrcache=no + ipmitimeout=2 + iscsidir=/iscsidir + managedaddressmode=dhcp + master=10.3.5.8 + maxssh=8 + mnroutenames=mnroutenames + nameservers=10.3.5.8 + nmapoptions=--min-rtt-timeout + nodestatus=n + nodesyncfiledir=/var/xcat/node/syncfiles + ntpservers=10.3.5.8 + persistkvmguests=y + powerinterval=0 + ppcmaxp=64 + ppcretry=3 + ppctimeout=0 + precreatemypostscripts=1 + pruneservices=1 + runbootscripts=yes + setinstallnic=1 + sharedinstall=no + sharedtftp=1 + skiptables=nics + skipvalidatelog=1 + snmpc=snmpc + sshbetweennodes=ALLGROUPS + svloglocal=1 + syspowerinterval=10 + syspowermaxnodes=10 + tftpdir=/tftprot/ + tftpflags=-v + timezone=America/New_York + useNFSv4onAIX=0 + useNmapfromMN=no + useSSHonAIX=0 + useflowcontrol=no + usexhrm=no + vcenterautojoin=no + vmwarereconfigonpower=no + vsftp=n + xcatconfdir=/etc/xcat + xcatdebugmode=1 + xcatdport=3001 + xcatiport=3002 + xcatlport=3003 + xcatmaxbatchconnections=64 + xcatmaxconnections=60 + xcatsslciphers=3DES + xcatsslversion=TLSv1"> /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/site.org +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/10.3.5.8/$mnip/g" /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/site.org +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/10.3.5.8/$mnip/g" /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/yaml.test +check:rc==0 +cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/yaml.test -t site +check:rc==0 +cmd:lsdef -t site -o clustersite > /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/site.import +check:rc==0 +cmd:diff -y /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/site.org /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/site.import +check:rc==0 +cmd:lsdef bogusgroup1 +check:output=~Error: Could not find an object +check:rc!=0 +cmd:lsdef bogusgroup2 +check:output=~Error: Could not find an object +check:rc!=0 +cmd:lsdef bogusgroup3 +check:output=~Error: Could not find an object +check:rc!=0 +cmd:tabdump networks|grep 100_0_0_0-255_0_0_0 +check:rc!=0 +cmd:if [[ -e /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/bogusnode.stanza ]]; then cat /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/bogusnode.stanza | mkdef -z;fi +check:rc==0 +cmd:if [[ -e /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/bogusgroup.stanza ]];then cat /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/bogusgroup.stanza |mkdef -z -f;fi +check:rc==0 +cmd:cat /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format/site.stanza | mkdef -z -f +check:rc==0 +cmd:rm -rf /tmp/xcat_inventory_try_to_import_all_type_is_site_yaml_format +check:rc==0 +end + + +start:export_site_table_then_modify_yaml_then_import +This case is used to test xcat-inventory import a site , then modify the export yaml file, then import the yaml file +Attribute: $$DSTMN - the ip of MN which is used to run import operation. +cmd:mkdir -p /tmp/export_site_table_then_modify_yaml_then_import +check:rc==0 +cmd:ssh $$DSTMN 'mkdir -p /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/' +check:rc==0 +cmd: lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_yaml_then_import/site.stanza +check:rc==0 +cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/site.stanza ' +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 cleanupxcatpost=1111 consoleondemand=1111 databaseloc='/var/lib1111' db2installloc='/mntdb1111' dbtracelevel=1111 defserialflow=1111 defserialport=1111 defserialspeed=9611111111 dhcpinterfaces=eth1111 dhcplease=43211111111 dhcpsetup=1111 disjointdhcps=1111 dnshandler=ddns1111 dnsinterfaces='xcatmn|eth1,eth2;service|bond1111' dnsupdaters=dnsupdaters1111 domain='pok1111.stglabs.ibm.com' enableASMI=1111 excludenodes=1111 externaldns=1111 extntpservers=1111 forwarders=$mnip fsptimeout=1111 genmacprefix='11111111:11:aa' genpasswords=1111 hierarchicalattrs=1111 httpport=81111 hwctrldispatch=1111 installdir='/install1111/' installloc='hostname:/path1111' ipmidispatch=1111 ipmimaxp=641111 ipmiretries=31111 ipmisdrcache=1111 ipmitimeout=21111 iscsidir='/iscsidir1111' managedaddressmode=dhcp1111 master=$mnip maxssh=81111 mnroutenames=1111 nameservers=$mnip nmapoptions='--min-rtt-timeout 1111' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles1111' ntpservers=$mnip persistkvmguests=1111 powerinterval=1111 ppcmaxp=641111 ppcretry=31111 ppctimeout=1111 precreatemypostchdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 pruneservices=1111 runbootscripts=1111 setinstallnic=1111 sharedinstall=1111 sharedtftp=1111 skiptables=nics1111 skipvalidatelog=1111 snmpc=xc1111 sshbetweennodes=ALLGROUPS1111 svloglocal=1111 syspowerinterval=11111 syspowermaxnodes=11111 tftpdir='/tftprot1111/' tftpflags='-v1111' timezone='America/New_York1111' useNmapfromMN=1111 useflowcontrol=1111 usexhrm=1111 vcenterautojoin=1111 vmwarereconfigonpower=1111 vsftp=1111 xcatconfdir='/etc/xcat1111' xcatdebugmode=1111 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=641111 xcatmaxconnections=61111 xcatsslciphers='3DES' xcatsslversion=TLSv1 +check:rc==0 +cmd:lsdef -t site -o clustersite -z|sed 's/1111/2222/g'|sort -t'=' -k1 |tee /tmp/export_site_table_then_modify_yaml_then_import/srcsite.stanza +check:rc==0 +cmd:xcat-inventory export --format=yaml -t site -o clustersite |tee /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/$mnip/$$DSTMN/g" /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv +check:rc==0 +cmd:sed -i 's/1111/2222/g' /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv +check:rc==0 +cmd:cat /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv +check:rc==0 +cmd:scp /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv $$DSTMN:/tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/ +check:rc==0 +cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/export_site_yaml.inv -t site -o clustersite' +check:rc==0 +cmd: ssh $$DSTMN 'lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/dstsite.stanza' +check:rc==0 +cmd: scp $$DSTMN:/tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/dstsite.stanza /tmp/export_site_table_then_modify_yaml_then_import/dstsite.stanza +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/$$DSTMN/$mnip/g" /tmp/export_site_table_then_modify_yaml_then_import/dstsite.stanza +check:rc==0 +cmd: cat /tmp/export_site_table_then_modify_yaml_then_import/dstsite.stanza +check:rc==0 +cmd:diff -y /tmp/export_site_table_then_modify_yaml_then_import/srcsite.stanza /tmp/export_site_table_then_modify_yaml_then_import/dstsite.stanza +check:rc==0 +cmd:cat /tmp/export_site_table_then_modify_yaml_then_import/site.stanza | mkdef -z -f +check:rc==0 +cmd:ssh $$DSTMN 'cat /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/site.stanza | mkdef -z -f' +check:rc==0 +cmd:ssh $$DSTMN 'rm -rf /tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/' +check:rc==0 +cmd:rm -rf /tmp/export_site_table_then_modify_yaml_then_import +check:rc==0 +end + +start:export_site_table_then_modify_json_then_import +This case is used to test xcat-inventory import a site , then modify the export json file, then import the json file +Attribute: $$DSTMN - the ip of MN which is used to run import operation. +cmd:mkdir -p /tmp/export_site_table_then_modify_json_then_import +check:rc==0 +cmd:ssh $$DSTMN 'mkdir -p /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/' +check:rc==0 +cmd: lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_json_then_import/site.stanza +check:rc==0 +cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_json_then_import_$$DSTMN/site.stanza ' +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 cleanupxcatpost=1111 consoleondemand=1111 databaseloc='/var/lib1111' db2installloc='/mntdb1111' dbtracelevel=1111 defserialflow=1111 defserialport=1111 defserialspeed=9611111111 dhcpinterfaces=eth1111 dhcplease=43211111111 dhcpsetup=1111 disjointdhcps=1111 dnshandler=ddns1111 dnsinterfaces='xcatmn|eth1,eth2;service|bond1111' dnsupdaters=dnsupdaters1111 domain='pok1111.stglabs.ibm.com' enableASMI=1111 excludenodes=1111 externaldns=1111 extntpservers=1111 forwarders=$mnip fsptimeout=1111 genmacprefix='11111111:11:aa' genpasswords=1111 hierarchicalattrs=1111 httpport=81111 hwctrldispatch=1111 installdir='/install1111/' installloc='hostname:/path1111' ipmidispatch=1111 ipmimaxp=641111 ipmiretries=31111 ipmisdrcache=1111 ipmitimeout=21111 iscsidir='/iscsidir1111' managedaddressmode=dhcp1111 master=$mnip maxssh=81111 mnroutenames=1111 nameservers=$mnip nmapoptions='--min-rtt-timeout 1111' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles1111' ntpservers=$mnip persistkvmguests=1111 powerinterval=1111 ppcmaxp=641111 ppcretry=31111 ppctimeout=1111 precreatemypostchdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 pruneservices=1111 runbootscripts=1111 setinstallnic=1111 sharedinstall=1111 sharedtftp=1111 skiptables=nics1111 skipvalidatelog=1111 snmpc=xc1111 sshbetweennodes=ALLGROUPS1111 svloglocal=1111 syspowerinterval=11111 syspowermaxnodes=11111 tftpdir='/tftprot1111/' tftpflags='-v1111' timezone='America/New_York1111' useNmapfromMN=1111 useflowcontrol=1111 usexhrm=1111 vcenterautojoin=1111 vmwarereconfigonpower=1111 vsftp=1111 xcatconfdir='/etc/xcat1111' xcatdebugmode=1111 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=641111 xcatmaxconnections=61111 xcatsslciphers='3DES' xcatsslversion=TLSv1 +check:rc==0 +cmd:lsdef -t site -o clustersite -z|sed 's/1111/2222/g'|sort -t'=' -k1 |tee /tmp/export_site_table_then_modify_json_then_import/srcsite.stanza +check:rc==0 +cmd:xcat-inventory export --format=json -t site -o clustersite |tee /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/$mnip/$$DSTMN/g" /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv +check:rc==0 +cmd:sed -i 's/1111/2222/g' /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv +check:rc==0 +cmd:cat /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv +check:rc==0 +cmd:scp /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv $$DSTMN:/tmp/export_site_table_then_modify_json_then_import_$$DSTMN/ +check:rc==0 +cmd: ssh $$DSTMN 'xcat-inventory import -f /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/export_site_json.inv -t site -o clustersite' +check:rc==0 +cmd: ssh $$DSTMN 'lsdef -t site -o clustersite -z |sort -t'=' -k1|tee /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/dstsite.stanza' +check:rc==0 +cmd: scp $$DSTMN:/tmp/export_site_table_then_modify_json_then_import_$$DSTMN/dstsite.stanza /tmp/export_site_table_then_modify_json_then_import/dstsite.stanza +check:rc==0 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/$$DSTMN/$mnip/g" /tmp/export_site_table_then_modify_json_then_import/dstsite.stanza +check:rc==0 +cmd: cat /tmp/export_site_table_then_modify_json_then_import/dstsite.stanza +check:rc==0 +cmd:diff -y /tmp/export_site_table_then_modify_json_then_import/srcsite.stanza /tmp/export_site_table_then_modify_json_then_import/dstsite.stanza +check:rc==0 +cmd:cat /tmp/export_site_table_then_modify_json_then_import/site.stanza | mkdef -z -f +check:rc==0 +cmd:ssh $$DSTMN 'cat /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/site.stanza | mkdef -z -f' +check:rc==0 +cmd:ssh $$DSTMN 'rm -rf /tmp/export_site_table_then_modify_json_then_import_$$DSTMN/' +check:rc==0 +cmd:rm -rf /tmp/export_site_table_then_modify_json_then_import +check:rc==0 +end + + From 8159ba222c491cf8061e970c6fbb2ba8c593c499 Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Tue, 6 Mar 2018 22:15:43 -0500 Subject: [PATCH 2/5] modify existed cases for support validation --- .../testcase/xcat-inventory/cases.common | 2 +- .../testcase/xcat-inventory/cases.node | 648 +++++++++++++++++- .../testcase/xcat-inventory/cases.osimage | 122 ++-- .../testcase/xcat-inventory/cases.site | 106 ++- 4 files changed, 736 insertions(+), 142 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.common b/xCAT-test/autotest/testcase/xcat-inventory/cases.common index 875682e20..cf257d6a3 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.common +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.common @@ -104,7 +104,7 @@ check:rc==0 cmd:cat /tmp/xcat_inventory_import_option_f_invalid_file/invaild_yaml check:rc==0 cmd:xcat-inventory import -f /tmp/xcat_inventory_import_option_f_invalid_file/invaild_yaml -check:output =~ Error: failed to load file +check:output =~ Error: check:output !~Traceback check:rc!=0 cmd:rm -rf /tmp/xcat_inventory_import_option_f_invalid_file diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.node b/xCAT-test/autotest/testcase/xcat-inventory/cases.node index 92d8d8177..35a351bb5 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.node +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.node @@ -13,7 +13,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=arch 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=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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 +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 @@ -65,7 +65,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=arch 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=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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 +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 @@ -117,7 +117,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=arch 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=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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 +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 @@ -170,7 +170,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=arch 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=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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 +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 @@ -223,7 +223,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=arch authdomain=authdomain authkey=authkey authtype=authtype 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 hcp=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=privtype productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames seclevel=seclevel serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot snmpuser=snmpuser snmpversion=snmpversion storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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 +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 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 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=snmpversion 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 @@ -275,7 +275,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=arch authdomain=authdomain authkey=authkey authtype=authtype 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 hcp=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=privtype productkey=productkey provmethod=provmethod rack=rack room=room routenames=routenames seclevel=seclevel serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot snmpuser=snmpuser snmpversion=snmpversion storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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 +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 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 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=snmpversion 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 @@ -327,7 +327,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=arch 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 hcp=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot slotid=slotid storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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 +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 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 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 @@ -378,7 +378,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=arch 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 hcp=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot slotid=slotid storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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 +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 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 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 @@ -429,7 +429,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=arch 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 hcp=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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 +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 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 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 @@ -480,7 +480,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=arch 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 hcp=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype hwtype=hwtype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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 +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 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 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 @@ -532,7 +532,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=arch 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=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid linkports=linkports mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=protocol provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot snmpauth=snmpauth snmppassword=snmppassword snmpprivacy=snmpprivacy snmpusername=snmpusername snmpversion=snmpversion storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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 +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 id=5 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=snmpprivacy snmpusername=snmpusername snmpversion=snmpversion 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 @@ -583,7 +583,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=arch 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=hcp height=height hidden=hidden hostcluster=hostcluster hostinterface=hostinterface hostmanager=hostmanager hostnames=hostnames hosttype=hosttype id=id installnic=installnic interface=interface ip=ip iscsipassword=iscsipassword iscsiserver=iscsiserver iscsitarget=iscsitarget iscsiuserid=iscsiuserid linkports=linkports mac=mac memory=memory migrationdest=migrationdest monserver=monserver mpa=mpa mtm=mtm nameservers=nameservers netboot=netboot 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=protocol provmethod=provmethod rack=rack room=room routenames=routenames serial=serial serialflow=serialflow serialport=serialport serialspeed=serialspeed servicenode=servicenode setupconserver=setupconserver setupdhcp=setupdhcp setupftp=setupftp setupipforward=setupipforward setupldap=setupldap setupnameserver=setupnameserver setupnfs=setupnfs setupnim=setupnim setupntp=setupntp setupproxydhcp=setupproxydhcp setuptftp=setuptftp sfp=sfp side=side slot=slot snmpauth=snmpauth snmppassword=snmppassword snmpprivacy=snmpprivacy snmpusername=snmpusername snmpversion=snmpversion storagcontroller=storagcontroller storagetype=storagetype supernode=supernode supportedarchs=supportedarchs supportproxydhcp=supportproxydhcp switch=switch switchinterface=switchinterface switchport=switchport 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 +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 id=5 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=snmpprivacy snmpusername=snmpusername snmpversion=snmpversion 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 @@ -790,7 +790,7 @@ cmd: grep " \"xcatdefaults\": " /tmp/xcat_inventory_try_to_export_all_type_is_no 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));ia=$(grep " \"obj_type\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node|wc -l); if [[ $da -eq $ia ]];then exit 0; else exit 1;fi +cmd:dn=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/node_in_xcat_db|wc -l);dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db |wc -l);((da=$dn+$dg+2));echo "dn=$dn dg=$dg da=$da";ia=$(grep " \"obj_type\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node|wc -l);echo "ia=$ia"; if [[ $da -eq $ia ]];then exit 0; else exit 1;fi check:rc==0 cmd:a=0;for i in `awk -F':' '{print $1}' /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db`; do grep -E " \"$i\": " /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/export_all_node; if [[ $? -eq 0 ]]; then ((a++));fi;done;dg=$(cat /tmp/xcat_inventory_try_to_export_all_type_is_node_default_format/group_in_xcat_db|wc -l);if [[ $a -eq $dg ]]; then exit 0; else exit 1;fi check:rc==0 @@ -918,15 +918,14 @@ node: engine_type: openbmc hardware_mgt_engine: engine_info: - openbmc_info: - bmcpassword: 0penBmc - bmcusername: root + bmcpassword: 0penBmc + bmcusername: root engine_type: openbmc netboot_engine: engine_type: petitboot network_info: primarynic: - ip: '|\D+(\d+)|10.100.100.(\$1)|' + ip: '|\D+(\d+)|10.100.100.($1)|' obj_info: grouptype: static obj_type: group @@ -1090,7 +1089,7 @@ policy: route: {} schema_version: '1.0' site: - cluster: + clustersite: SNsyncfiledir: /var/xcat/syncfiles auditnosyslog: '0' auditskipcmds: ALL @@ -1785,3 +1784,616 @@ check:rc==0 cmd:rm -rf /tmp/export_import_single_group_json check:rc==0 end + + +start:import_validation_json_node_obj_type +description:This case is used to test node validation function of xcat-inventory import json file. To test "obj_type" attribute +cmd:mkdir -p /tmp/import_validation_json_node_obj_type +check:rc==0 +cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_json_node_obj_type/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_json_node_obj_type/bogusgroup.stanza; rmdef -t group bogusgroup;fi +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_type": "server", + "network_info": { + "primarynic": { + "mac": [ + "11:11:11:11:11:11" + ] + } + }, + "obj_info": { + "groups": "bogusgroup" + }, + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_obj_type/node.json +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_obj_type/node.json +check:output=~Error: failed to validate schema entry +check:output=~obj_type +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_type": "server", + "network_info": { + "primarynic": { + "mac": [ + "11:11:11:11:11:11" + ] + } + }, + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "aaa", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_obj_type/node.json +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_obj_type/node.json +check:output=~Error: failed to validate schema entry +check:output=~obj_type +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_type": "server", + "network_info": { + "primarynic": { + "mac": [ + "11:11:11:11:11:11" + ] + } + }, + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_obj_type/node.json +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_obj_type/node.json +check:output=~import object successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusgroup": { + "device_type": "server", + "engines": { + "hardware_mgt_engine": { + "engine_type": "ipmi" + } + }, + "obj_info": { + "grouptype": "static" + }, + "obj_type": "group", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_obj_type/node.json +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_obj_type/node.json +check:output=~import object successfully +check:rc==0 +cmd:lsdef -t group -o bogusgroup +check:output=~Object name: bogusgroup +check:rc==0 +cmd:rmdef -t group -o bogusgroup +check:rc==0 +cmd:if [[ -e /tmp/import_validation_json_node_obj_type/bogusnode.stanza ]]; then cat /tmp/import_validation_json_node_obj_type/bogusnode.stanza | mkdef -z;fi +check:rc==0 +cmd:if [[ -e /tmp/import_validation_json_node_obj_type/bogusgroup.stanza ]]; then cat /tmp/import_validation_json_node_obj_type/bogusgroup.stanza |mkdef -z -f;fi +check:rc==0 +cmd:rm -rf /tmp/import_validation_json_node_obj_type +check:rc==0 +end + + +start:import_validation_yaml_node_obj_type +description:This case is used to test node validation function of xcat-inventory import yaml file. To test "obj_type" attribute +cmd:mkdir -p /tmp/import_validation_yaml_node_obj_type +check:rc==0 +cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_yaml_node_obj_type/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_yaml_node_obj_type/bogusgroup.stanza; rmdef -t group bogusgroup;fi +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_type: server + network_info: + primarynic: + mac: + - '11:11:11:11:11:11' + obj_info: + groups: bogusgroup + role: compute" > /tmp/import_validation_yaml_node_obj_type/node.yaml +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_obj_type/node.yaml +check:output=~Error: failed to validate schema entry +check:output=~obj_type +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_type: server + network_info: + primarynic: + mac: + - '11:11:11:11:11:11' + obj_info: + groups: bogusgroup + obj_type: aaa + role: compute" > /tmp/import_validation_yaml_node_obj_type/node.yaml +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_obj_type/node.yaml +check:output=~Error: failed to validate schema entry +check:output=~obj_type +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_type: server + network_info: + primarynic: + mac: + - '11:11:11:11:11:11' + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_obj_type/node.yaml +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_obj_type/node.yaml +check:output=~import object successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusgroup: + device_type: server + engines: + hardware_mgt_engine: + engine_type: ipmi + obj_info: + grouptype: static + obj_type: group + role: compute" > /tmp/import_validation_yaml_node_obj_type/node.yaml +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_obj_type/node.yaml +check:output=~import object successfully +check:rc==0 +cmd:lsdef -t group -o bogusgroup +check:output=~Object name: bogusgroup +check:rc==0 +cmd:rmdef -t group -o bogusgroup +check:rc==0 +cmd:if [[ -e /tmp/import_validation_yaml_node_obj_type/bogusnode.stanza ]]; then cat /tmp/import_validation_yaml_node_obj_type/bogusnode.stanza | mkdef -z;fi +check:rc==0 +cmd:if [[ -e /tmp/import_validation_yaml_node_obj_type/bogusgroup.stanza ]]; then cat /tmp/import_validation_yaml_node_obj_type/bogusgroup.stanza |mkdef -z -f;fi +check:rc==0 +cmd:rm -rf /tmp/import_validation_yaml_node_obj_type +check:rc==0 +end + + +start:import_validation_json_node_group +description:This case is used to test node validation function of xcat-inventory import json file. To test "group" attribute +cmd:mkdir -p /tmp/import_validation_json_node_group +check:rc==0 +cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_json_node_group/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_json_node_group/bogusgroup.stanza; rmdef -t group bogusgroup;fi +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_type": "server", + "network_info": { + "primarynic": { + "mac": [ + "11:11:11:11:11:11" + ] + } + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_group/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_group/node.inv +check:output=~Error: failed to validate schema entry +check:output=~group +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 +cmd:if [[ -e /tmp/import_validation_json_node_group/bogusnode.stanza ]]; then cat /tmp/import_validation_json_node_group/bogusnode.stanza | mkdef -z;fi +check:rc==0 +cmd:if [[ -e /tmp/import_validation_json_node_group/bogusgroup.stanza ]]; then cat /tmp/import_validation_json_node_group/bogusgroup.stanza |mkdef -z -f;fi +check:rc==0 +cmd:rm -rf /tmp/import_validation_json_node_group +check:rc==0 +end + +start:import_validation_yaml_node_group +description:This case is used to test node validation function of xcat-inventory import yaml file. To test "group" attribute +cmd:mkdir -p /tmp/import_validation_yaml_node_group +check:rc==0 +cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_yaml_node_group/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_yaml_node_group/bogusgroup.stanza; rmdef -t group bogusgroup;fi +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_type: server + network_info: + primarynic: + mac: + - '11:11:11:11:11:11' + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_group/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_group/node.inv +check:output=~Error: failed to validate schema entry +check:output=~group +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 +cmd:if [[ -e /tmp/import_validation_yaml_node_group/bogusnode.stanza ]]; then cat /tmp/import_validation_yaml_node_group/bogusnode.stanza | mkdef -z;fi +check:rc==0 +cmd:if [[ -e /tmp/import_validation_yaml_node_group/bogusgroup.stanza ]]; then cat /tmp/import_validation_yaml_node_group/bogusgroup.stanza |mkdef -z -f;fi +check:rc==0 +cmd:rm -rf /tmp/import_validation_yaml_node_group +check:rc==0 +end + +start:import_validation_json_node_device_type +description:This case is used to test node validation function of xcat-inventory import json file. To test "device_type" attribute +cmd:mkdir -p /tmp/import_validation_json_node_device_type +check:rc==0 +cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_json_node_device_type/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_json_node_device_type/bogusgroup.stanza; rmdef -t group bogusgroup;fi +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv +check:output=~Error: failed to validate schema entry +check:output=~devtype +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_type": "aaa", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv +check:output=~Error: failed to validate schema entry +check:output=~devtype +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_type": "server", + "network_info": { + "primarynic": { + "mac": [ + "11:11:11:11:11:11" + ] + } + }, + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv +check:output=~import object successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_type": "switch", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv +check:output=~import object successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_type": "pdu", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv +check:output=~import object successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_type": "hmc", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv +check:output=~import object successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_type": "rack", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv +check:output=~import object successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:if [[ -e /tmp/import_validation_json_node_device_type/bogusnode.stanza ]]; then cat /tmp/import_validation_json_node_device_type/bogusnode.stanza | mkdef -z;fi +check:rc==0 +cmd:if [[ -e /tmp/import_validation_json_node_device_type/bogusgroup.stanza ]]; then cat /tmp/import_validation_json_node_device_type/bogusgroup.stanza |mkdef -z -f;fi +check:rc==0 +cmd:rm -rf /tmp/import_validation_json_node_device_type +check:rc==0 +end + + +start:import_validation_yaml_node_device_type +description:This case is used to test node validation function of xcat-inventory import yaml file. To test "device_type" attribute +cmd:mkdir -p /tmp/import_validation_yaml_node_device_type +check:rc==0 +cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_yaml_node_device_type/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_yaml_node_device_type/bogusgroup.stanza; rmdef -t group bogusgroup;fi +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv +check:output=~Error: failed to validate schema entry +check:output=~devtype +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_type: aaa + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv +check:output=~Error: failed to validate schema entry +check:output=~devtype +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_type: switch + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv +check:output=~import object successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_type: pdu + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv +check:output=~import object successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_type: rack + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv +check:output=~import object successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_type: hmc + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv +check:output=~import object successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_type: server + network_info: + primarynic: + mac: + - '11:11:11:11:11:11' + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv +check:output=~import object successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:if [[ -e /tmp/import_validation_yaml_node_device_type/bogusnode.stanza ]]; then cat /tmp/import_validation_yaml_node_device_type/bogusnode.stanza | mkdef -z;fi +check:rc==0 +cmd:if [[ -e /tmp/import_validation_yaml_node_device_type/bogusgroup.stanza ]]; then cat /tmp/import_validation_yaml_node_device_type/bogusgroup.stanza |mkdef -z -f;fi +check:rc==0 +cmd:rm -rf /tmp/import_validation_yaml_node_device_type +check:rc==0 +end + diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage b/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage index e7ec504ff..a957435f8 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.osimage @@ -9,7 +9,7 @@ cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsde check:rc==0 cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_yaml_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' check:rc==0 -cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=profile provmethod=provmethod rootfstype=rootfstype rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment +cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=compute provmethod=netboot rootfstype=nfs rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment check:rc==0 cmd:lsdef -t osimage -o bogus_image -z|sort -t'=' -k1 |tee /tmp/export_import_single_osimage_by_yaml/src_bogus_osimage.stanza check:rc==0 @@ -52,7 +52,7 @@ cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsde check:rc==0 cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_import_single_osimage_by_json_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' check:rc==0 -cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=profile provmethod=provmethod rootfstype=rootfstype rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment +cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=compute provmethod=netboot rootfstype=nfs rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment check:rc==0 cmd:lsdef -t osimage -o bogus_image -z|sort -t'=' -k1 |tee /tmp/export_import_single_osimage_by_json/src_bogus_osimage.stanza check:rc==0 @@ -92,7 +92,7 @@ cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_forma check:rc==0 cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi check:rc==0 -cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=profile provmethod=provmethod rootfstype=rootfstype rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment +cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=compute provmethod=netboot rootfstype=nfs rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment check:rc==0 cmd:xcat-inventory export -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_default_format/export.file check:rc==0 @@ -132,7 +132,7 @@ cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format check:rc==0 cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi check:rc==0 -cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=profile provmethod=provmethod rootfstype=rootfstype rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment +cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=compute provmethod=netboot rootfstype=nfs rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment check:rc==0 cmd:xcat-inventory export --format=json -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_json_format/export.file check:rc==0 @@ -172,7 +172,7 @@ cmd:mkdir -p /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format check:rc==0 cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi check:rc==0 -cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=profile provmethod=provmethod rootfstype=rootfstype rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment +cmd:chdef -t osimage -o bogus_image addkcmdline=addkcmdline boottarget=boottarget cfmdir=cfmdir crashkernelsize=crashkernelsize description=description driverupdatesrc=driverupdatesrc dump=dump exlist=exlist groups=groups imagename=imagename imagetype=linux isdeletable=isdeletable kerneldir=kerneldir kernelver=kernelver kitcomponents=kitcomponents krpmver=krpmver netdrivers=netdrivers nodebootif=nodebootif osarch=osarch osdistroname=osdistroname osname=osname osupdatename=osupdatename osvers=osvers otherifce=otherifce otherpkgdir=otherpkgdir otherpkglist=otherpkglist partitionfile=partitionfile permission=permission pkgdir=pkgdir pkglist=pkglist postbootscripts=postbootscripts postinstall=postinstall postscripts=postscripts profile=compute provmethod=netboot rootfstype=nfs rootimgdir=rootimgdir serverrole=serverrole synclists=synclists template=template usercomment=usercomment check:rc==0 cmd:xcat-inventory export --format=yaml -t osimage |tee /tmp/xcat_inventory_try_to_export_all_type_is_osimage_yaml_format/export.file check:rc==0 @@ -238,7 +238,6 @@ echo "network: mgtifname: eth0 mtu: '1500' net: 10.0.0.0 - schema_version: 1.0 service: tftpserver: node: @@ -266,7 +265,6 @@ node: groups: bogusgroup obj_type: node role: compute - schema_version: 1.0 bogusnode2: device_type: server engines: @@ -291,7 +289,6 @@ node: groups: bogusgroup obj_type: node role: compute - schema_version: 1.0 bogusnode3: device_type: server engines: @@ -316,7 +313,6 @@ node: groups: bogusgroup obj_type: node role: compute - schema_version: 1.0 service: device_type: server engines: @@ -325,7 +321,6 @@ node: postscripts: servicenode obj_type: group role: compute - schema_version: 1.0 xcatdefaults: device_type: server engines: @@ -335,67 +330,54 @@ node: postscripts: syslog,remoteshell,syncfiles obj_type: group role: compute - schema_version: 1.0 osimage: bogus_image: addkcmdline: aaaa boottarget: aaa imagetype: linux - schema_version: 1.0 + provision_mode: statelite + role: compute passwd: {} policy: '1': name: root rule: allow - schema_version: 1.0 '1.2': name: c910f03c05k08.pok.stglabs.ibm.com rule: trusted - schema_version: 1.0 '2': commands: getbmcconfig rule: allow - schema_version: 1.0 '2.1': commands: remoteimmsetup rule: allow - schema_version: 1.0 '2.3': commands: lsxcatd rule: allow - schema_version: 1.0 '3': commands: nextdestiny rule: allow - schema_version: 1.0 '4': commands: getdestiny rule: allow - schema_version: 1.0 '4.4': commands: getpostscript rule: allow - schema_version: 1.0 '4.5': commands: getcredentials rule: allow - schema_version: 1.0 '4.6': commands: syncfiles rule: allow - schema_version: 1.0 '4.7': commands: litefile rule: allow - schema_version: 1.0 '4.8': commands: litetree rule: allow - schema_version: 1.0 '4.9': commands: getadapter rule: allow - schema_version: 1.0 route: {} site: cluster: @@ -424,7 +406,6 @@ site: ppcmaxp: '64' ppcretry: '3' ppctimeout: '0' - schema_version: 1.0 sharedtftp: '1' sshbetweennodes: ALLGROUPS syspowerinterval: '0' @@ -441,7 +422,9 @@ cmd:#!/bin/bash echo "Object name: bogus_image addkcmdline=aaaa boottarget=aaa - imagetype=linux">> /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_osimage_db + imagetype=linux + profile=compute + provmethod=statelite" >> /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_osimage_db check:rc==0 cmd:sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/org_osimage_db > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/target_osimage_sort cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_all_type_is_osimage_yaml_format/import.file -t osimage @@ -521,7 +504,6 @@ echo '{ "mtu": "1500", "net": "10.0.0.0" }, - "schema_version": 1.0, "service": { "tftpserver": "" } @@ -562,7 +544,6 @@ echo '{ }, "obj_type": "node", "role": "compute", - "schema_version": 1.0 }, "bogusnode2": { "device_type": "server", @@ -598,7 +579,6 @@ echo '{ }, "obj_type": "node", "role": "compute", - "schema_version": 1.0 }, "bogusnode3": { "device_type": "server", @@ -634,7 +614,6 @@ echo '{ }, "obj_type": "node", "role": "compute", - "schema_version": 1.0 }, "service": { "device_type": "server", @@ -647,7 +626,6 @@ echo '{ }, "obj_type": "group", "role": "compute", - "schema_version": 1.0 }, "xcatdefaults": { "device_type": "server", @@ -661,7 +639,6 @@ echo '{ }, "obj_type": "group", "role": "compute", - "schema_version": 1.0 } }, "osimage": { @@ -669,75 +646,63 @@ echo '{ "addkcmdline": "aaaa", "boottarget": "aaa", "imagetype": "linux", - "schema_version": 1.0 + "provision_mode": "statelite", + "role": "compute" } }, "passwd": {}, "policy": { "1": { "name": "root", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "1.2": { "name": "c910f03c05k08.pok.stglabs.ibm.com", - "rule": "trusted", - "schema_version": 1.0 + "rule": "trusted" }, "2": { "commands": "getbmcconfig", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "2.1": { "commands": "remoteimmsetup", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "2.3": { "commands": "lsxcatd", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "3": { "commands": "nextdestiny", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4": { "commands": "getdestiny", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4.4": { "commands": "getpostscript", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4.5": { "commands": "getcredentials", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4.6": { "commands": "syncfiles", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4.7": { "commands": "litefile", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4.8": { "commands": "litetree", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4.9": { "commands": "getadapter", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" } }, "route": {}, @@ -768,7 +733,6 @@ echo '{ "ppcmaxp": "64", "ppcretry": "3", "ppctimeout": "0", - "schema_version": 1.0, "sharedtftp": "1", "sshbetweennodes": "ALLGROUPS", "syspowerinterval": "0", @@ -788,7 +752,9 @@ cmd:#!/bin/bash echo "Object name: bogus_image addkcmdline=aaaa boottarget=aaa - imagetype=linux">> /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_osimage_db + imagetype=linux + profile=compute + provmethod=statelite" >> /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_osimage_db check:rc==0 cmd:sort /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/org_osimage_db > /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/target_osimage_sort cmd:xcat-inventory import -f /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/import.file -t osimage @@ -829,8 +795,8 @@ cmd: rmdef -t osimage -o bogus_image check:rc==0 cmd:if [[ -e /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/bogus_image.stanza ]]; then cat /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format/bogus_image.stanza | mkdef -z;fi check:rc==0 -cmd:rm -rf /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format -check:rc==0 +#cmd:rm -rf /tmp/xcat_inventory_try_to_import_all_type_is_osimage_json_format +#check:rc==0 end @@ -845,14 +811,26 @@ cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsde check:rc==0 cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' check:rc==0 -cmd:chdef -t osimage -o bogus_image addkcmdline=1111 boottarget=1111 cfmdir=1111 crashkernelsize=1111 description=1111 driverupdatesrc=1111 dump=1111 exlist=1111 groups=1111 imagename=1111 imagetype=linux isdeletable=1111 kerneldir=1111 kernelver=1111 kitcomponents=1111 krpmver=1111 netdrivers=1111 nodebootif=1111 osarch=1111 osdistroname=1111 osname=1111 osupdatename=1111 osvers=1111 otherifce=1111 otherpkgdir=1111 otherpkglist=1111 partitionfile=1111 permission=1111 pkgdir=1111 pkglist=1111 postbootscripts=1111 postinstall=1111 postscripts=1111 profile=1111 provmethod=1111 rootfstype=1111 rootimgdir=1111 serverrole=1111 synclists=1111 template=1111 usercomment=1111 +cmd:chdef -t osimage -o bogus_image addkcmdline=1111 boottarget=1111 cfmdir=1111 crashkernelsize=1111 description=1111 driverupdatesrc=1111 dump=1111 exlist=1111 groups=1111 imagename=1111 imagetype=linux isdeletable=1111 kerneldir=1111 kernelver=1111 kitcomponents=1111 krpmver=1111 netdrivers=1111 nodebootif=1111 osarch=1111 osdistroname=1111 osname=1111 osupdatename=1111 osvers=1111 otherifce=1111 otherpkgdir=1111 otherpkglist=1111 partitionfile=1111 permission=1111 pkgdir=1111 pkglist=1111 postbootscripts=1111 postinstall=1111 postscripts=1111 profile=compute provmethod=statelite rootfstype=nfs rootimgdir=1111 serverrole=1111 synclists=1111 template=1111 usercomment=1111 check:rc==0 cmd:lsdef -t osimage -o bogus_image -z|sed 's/1111/2222/g'|sort -t'=' -k1 |tee /tmp/export_single_osimage_then_modify_json_then_import/src_bogus_osimage.stanza check:rc==0 +cmd:sed -i 's/profile=compute/profile=service/g' /tmp/export_single_osimage_then_modify_json_then_import/src_bogus_osimage.stanza +check:rc==0 +cmd:sed -i 's/provmethod=statelite/provmethod=netboot/g' /tmp/export_single_osimage_then_modify_json_then_import/src_bogus_osimage.stanza +check:rc==0 +cmd:sed -i 's/rootfstype=nfs/rootfstype=ramdisk/g' /tmp/export_single_osimage_then_modify_json_then_import/src_bogus_osimage.stanza +check:rc==0 cmd:xcat-inventory export --format=json -t osimage -o bogus_image |tee /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.json check:rc==0 cmd:sed -i 's/1111/2222/g' /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.json check:rc==0 +cmd:sed -i 's/"role": "compute"/"role": "service"/g' /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.json +check:rc==0 +cmd:sed -i 's/"provision_mode": "statelite"/"provision_mode": "netboot"/g' /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.json +check:rc==0 +cmd:sed -i 's/"rootfstype": "nfs"/"rootfstype": "ramdisk"/g' /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.json +check:rc==0 cmd:scp /tmp/export_single_osimage_then_modify_json_then_import/bogus_image.json $$DSTMN:/tmp/export_single_osimage_then_modify_json_then_import_$$DSTMN/ check:rc==0 cmd: rmdef -t osimage -o bogus_image @@ -889,14 +867,26 @@ cmd:lsdef -t osimage -o bogus_image >/dev/null 2>&1;if [[ $? -eq 0 ]]; then lsde check:rc==0 cmd:ssh $$DSTMN 'lsdef -t osimage -o bogus_image > /dev/null 2>&1; if [[ $? -eq 0 ]]; then lsdef -t osimage -o bogus_image -z >/tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/bogus_image.stanza ;rmdef -t osimage -o bogus_image;fi' check:rc==0 -cmd:chdef -t osimage -o bogus_image addkcmdline=1111 boottarget=1111 cfmdir=1111 crashkernelsize=1111 description=1111 driverupdatesrc=1111 dump=1111 exlist=1111 groups=1111 imagename=1111 imagetype=linux isdeletable=1111 kerneldir=1111 kernelver=1111 kitcomponents=1111 krpmver=1111 netdrivers=1111 nodebootif=1111 osarch=1111 osdistroname=1111 osname=1111 osupdatename=1111 osvers=1111 otherifce=1111 otherpkgdir=1111 otherpkglist=1111 partitionfile=1111 permission=1111 pkgdir=1111 pkglist=1111 postbootscripts=1111 postinstall=1111 postscripts=1111 profile=1111 provmethod=1111 rootfstype=1111 rootimgdir=1111 serverrole=1111 synclists=1111 template=1111 usercomment=1111 +cmd:chdef -t osimage -o bogus_image addkcmdline=1111 boottarget=1111 cfmdir=1111 crashkernelsize=1111 description=1111 driverupdatesrc=1111 dump=1111 exlist=1111 groups=1111 imagename=1111 imagetype=linux isdeletable=1111 kerneldir=1111 kernelver=1111 kitcomponents=1111 krpmver=1111 netdrivers=1111 nodebootif=1111 osarch=1111 osdistroname=1111 osname=1111 osupdatename=1111 osvers=1111 otherifce=1111 otherpkgdir=1111 otherpkglist=1111 partitionfile=1111 permission=1111 pkgdir=1111 pkglist=1111 postbootscripts=1111 postinstall=1111 postscripts=1111 profile=compute provmethod=statelite rootfstype=nfs rootimgdir=1111 serverrole=1111 synclists=1111 template=1111 usercomment=1111 check:rc==0 cmd:lsdef -t osimage -o bogus_image -z|sed 's/1111/2222/g'|sort -t'=' -k1 |tee /tmp/export_single_osimage_then_modify_yaml_then_import/src_bogus_osimage.stanza check:rc==0 +cmd:sed -i 's/profile=compute/profile=service/g' /tmp/export_single_osimage_then_modify_yaml_then_import/src_bogus_osimage.stanza +check:rc==0 +cmd:sed -i 's/provmethod=statelite/provmethod=netboot/g' /tmp/export_single_osimage_then_modify_yaml_then_import/src_bogus_osimage.stanza +check:rc==0 +cmd:sed -i 's/rootfstype=nfs/rootfstype=ramdisk/g' /tmp/export_single_osimage_then_modify_yaml_then_import/src_bogus_osimage.stanza +check:rc==0 cmd:xcat-inventory export --format=yaml -t osimage -o bogus_image |tee /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.yaml check:rc==0 cmd:sed -i 's/1111/2222/g' /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.yaml check:rc==0 +cmd:sed -i "s/role: '*compute'*/role: 'service'/g" /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.yaml +check:rc==0 +cmd:sed -i "s/provision_mode: '*statelite'*/provision_mode: 'netboot'/g" /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.yaml +check:rc==0 +cmd:sed -i "s/rootfstype: '*nfs'*/rootfstype: 'ramdisk'/g" /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.yaml +check:rc==0 cmd:scp /tmp/export_single_osimage_then_modify_yaml_then_import/bogus_image.yaml $$DSTMN:/tmp/export_single_osimage_then_modify_yaml_then_import_$$DSTMN/ check:rc==0 cmd: rmdef -t osimage -o bogus_image diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.site b/xCAT-test/autotest/testcase/xcat-inventory/cases.site index a1b4555e3..e23b916a5 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.site +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.site @@ -453,7 +453,6 @@ echo '{ "mtu": "1500", "net": "100.0.0.0" }, - "schema_version": 1.0, "service": { "tftpserver": "" } @@ -494,7 +493,6 @@ echo '{ }, "obj_type": "node", "role": "compute", - "schema_version": 1.0 }, "bogusnode2": { "device_type": "server", @@ -530,7 +528,6 @@ echo '{ }, "obj_type": "node", "role": "compute", - "schema_version": 1.0 }, "bogusnode3": { "device_type": "server", @@ -566,7 +563,6 @@ echo '{ }, "obj_type": "node", "role": "compute", - "schema_version": 1.0 }, "service": { "device_type": "server", @@ -579,7 +575,6 @@ echo '{ }, "obj_type": "group", "role": "compute", - "schema_version": 1.0 }, "xcatdefaults": { "device_type": "server", @@ -593,7 +588,6 @@ echo '{ }, "obj_type": "group", "role": "compute", - "schema_version": 1.0 } }, "osimage": {}, @@ -601,68 +595,55 @@ echo '{ "policy": { "1": { "name": "root", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "1.2": { "name": "c910f03c05k08.pok.stglabs.ibm.com", - "rule": "trusted", - "schema_version": 1.0 + "rule": "trusted" }, "2": { "commands": "getbmcconfig", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "2.1": { "commands": "remoteimmsetup", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "2.3": { "commands": "lsxcatd", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "3": { "commands": "nextdestiny", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4": { "commands": "getdestiny", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4.4": { "commands": "getpostscript", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4.5": { "commands": "getcredentials", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4.6": { "commands": "syncfiles", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4.7": { "commands": "litefile", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4.8": { "commands": "litetree", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" }, "4.9": { "commands": "getadapter", - "rule": "allow", - "schema_version": 1.0 + "rule": "allow" } }, "route": {}, @@ -725,7 +706,6 @@ echo '{ "precreatemypostscripts": "1", "pruneservices": "1", "runbootscripts": "yes", - "schema_version": 1.0, "setinstallnic": "1", "sharedinstall": "no", "sharedtftp": "1", @@ -900,7 +880,6 @@ echo "network: mgtifname: eth0 mtu: '1500' net: 100.0.0.0 - schema_version: 1.0 service: tftpserver: node: @@ -928,7 +907,6 @@ node: groups: testgroup obj_type: node role: compute - schema_version: 1.0 bogusnode2: device_type: server engines: @@ -953,7 +931,6 @@ node: groups: testgroup obj_type: node role: compute - schema_version: 1.0 bogusnode3: device_type: server engines: @@ -978,7 +955,6 @@ node: groups: testgroup obj_type: node role: compute - schema_version: 1.0 service: device_type: server engines: @@ -987,7 +963,6 @@ node: postscripts: servicenode obj_type: group role: compute - schema_version: 1.0 xcatdefaults: device_type: server engines: @@ -997,62 +972,48 @@ node: postscripts: syslog,remoteshell,syncfiles obj_type: group role: compute - schema_version: 1.0 osimage: {} passwd: {} policy: '1': name: root rule: allow - schema_version: 1.0 '1.2': name: c910f03c05k08.pok.stglabs.ibm.com rule: trusted - schema_version: 1.0 '2': commands: getbmcconfig rule: allow - schema_version: 1.0 '2.1': commands: remoteimmsetup rule: allow - schema_version: 1.0 '2.3': commands: lsxcatd rule: allow - schema_version: 1.0 '3': commands: nextdestiny rule: allow - schema_version: 1.0 '4': commands: getdestiny rule: allow - schema_version: 1.0 '4.4': commands: getpostscript rule: allow - schema_version: 1.0 '4.5': commands: getcredentials rule: allow - schema_version: 1.0 '4.6': commands: syncfiles rule: allow - schema_version: 1.0 '4.7': commands: litefile rule: allow - schema_version: 1.0 '4.8': commands: litetree rule: allow - schema_version: 1.0 '4.9': commands: getadapter rule: allow - schema_version: 1.0 route: {} site: clustersite: @@ -1113,7 +1074,6 @@ site: precreatemypostscripts: '1' pruneservices: '1' runbootscripts: 'yes' - schema_version: 1.0 setinstallnic: '1' sharedinstall: 'no' sharedtftp: '1' @@ -1278,14 +1238,30 @@ cmd: lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_yaml_th check:rc==0 cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_yaml_then_import_$$DSTMN/site.stanza ' check:rc==0 -cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 cleanupxcatpost=1111 consoleondemand=1111 databaseloc='/var/lib1111' db2installloc='/mntdb1111' dbtracelevel=1111 defserialflow=1111 defserialport=1111 defserialspeed=9611111111 dhcpinterfaces=eth1111 dhcplease=43211111111 dhcpsetup=1111 disjointdhcps=1111 dnshandler=ddns1111 dnsinterfaces='xcatmn|eth1,eth2;service|bond1111' dnsupdaters=dnsupdaters1111 domain='pok1111.stglabs.ibm.com' enableASMI=1111 excludenodes=1111 externaldns=1111 extntpservers=1111 forwarders=$mnip fsptimeout=1111 genmacprefix='11111111:11:aa' genpasswords=1111 hierarchicalattrs=1111 httpport=81111 hwctrldispatch=1111 installdir='/install1111/' installloc='hostname:/path1111' ipmidispatch=1111 ipmimaxp=641111 ipmiretries=31111 ipmisdrcache=1111 ipmitimeout=21111 iscsidir='/iscsidir1111' managedaddressmode=dhcp1111 master=$mnip maxssh=81111 mnroutenames=1111 nameservers=$mnip nmapoptions='--min-rtt-timeout 1111' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles1111' ntpservers=$mnip persistkvmguests=1111 powerinterval=1111 ppcmaxp=641111 ppcretry=31111 ppctimeout=1111 precreatemypostchdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 pruneservices=1111 runbootscripts=1111 setinstallnic=1111 sharedinstall=1111 sharedtftp=1111 skiptables=nics1111 skipvalidatelog=1111 snmpc=xc1111 sshbetweennodes=ALLGROUPS1111 svloglocal=1111 syspowerinterval=11111 syspowermaxnodes=11111 tftpdir='/tftprot1111/' tftpflags='-v1111' timezone='America/New_York1111' useNmapfromMN=1111 useflowcontrol=1111 usexhrm=1111 vcenterautojoin=1111 vmwarereconfigonpower=1111 vsftp=1111 xcatconfdir='/etc/xcat1111' xcatdebugmode=1111 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=641111 xcatmaxconnections=61111 xcatsslciphers='3DES' xcatsslversion=TLSv1 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 cleanupxcatpost=1111 consoleondemand=1111 databaseloc='/var/lib1111' db2installloc='/mntdb1111' dbtracelevel=0 defserialflow=1111 defserialport=1111 defserialspeed=9611111111 dhcpinterfaces=eth1111 dhcplease=43211111111 dhcpsetup=1111 disjointdhcps=0 dnshandler=ddns1111 dnsinterfaces='xcatmn|eth1,eth2;service|bond1111' dnsupdaters=dnsupdaters1111 domain='pok1111.stglabs.ibm.com' enableASMI=1111 excludenodes=1111 externaldns=1111 extntpservers=1111 forwarders=$mnip fsptimeout=1111 genmacprefix='11111111:11:aa' genpasswords=1111 hierarchicalattrs=1111 httpport=81111 hwctrldispatch=1111 installdir='/install1111/' installloc='hostname:/path1111' ipmidispatch=1111 ipmimaxp=641111 ipmiretries=31111 ipmisdrcache=1111 ipmitimeout=21111 iscsidir='/iscsidir1111' managedaddressmode=dhcp master=$mnip maxssh=81111 mnroutenames=1111 nameservers=$mnip nmapoptions='--min-rtt-timeout 1111' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles1111' ntpservers=$mnip persistkvmguests=1111 powerinterval=1111 ppcmaxp=641111 ppcretry=31111 ppctimeout=1111 precreatemypostchdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 pruneservices=1111 runbootscripts=1111 setinstallnic=1111 sharedinstall=no sharedtftp=1111 skiptables=nics1111 skipvalidatelog=1111 snmpc=xc1111 sshbetweennodes=ALLGROUPS svloglocal=1111 syspowerinterval=11111 syspowermaxnodes=11111 tftpdir='/tftprot1111/' tftpflags='-v1111' timezone='America/New_York1111' useNmapfromMN=1111 useflowcontrol=1111 usexhrm=1111 vcenterautojoin=1111 vmwarereconfigonpower=1111 vsftp=1111 xcatconfdir='/etc/xcat1111' xcatdebugmode=0 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=641111 xcatmaxconnections=61111 xcatsslciphers='3DES' xcatsslversion=TLSv1 check:rc==0 -cmd:lsdef -t site -o clustersite -z|sed 's/1111/2222/g'|sort -t'=' -k1 |tee /tmp/export_site_table_then_modify_yaml_then_import/srcsite.stanza +cmd:lsdef -t site -o clustersite -z|sed 's/=0$/=1/g' |sort -t'=' -k1 |tee /tmp/export_site_table_then_modify_yaml_then_import/srcsite.stanza +check:rc==0 +cmd:sed -i 's/1111/2222/g' /tmp/export_site_table_then_modify_yaml_then_import/srcsite.stanza +check:rc==0 +cmd:sed -i 's/managedaddressmode=dhcp/managedaddressmode=static/g' /tmp/export_site_table_then_modify_yaml_then_import/srcsite.stanza +check:rc==0 +cmd:sed -i 's/sharedinstall=no/sharedinstall=sns/g' /tmp/export_site_table_then_modify_yaml_then_import/srcsite.stanza +check:rc==0 +cmd:sed -i 's/sshbetweennodes=ALLGROUPS/sshbetweennodes=NOGROUPS/g' /tmp/export_site_table_then_modify_yaml_then_import/srcsite.stanza check:rc==0 cmd:xcat-inventory export --format=yaml -t site -o clustersite |tee /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv check:rc==0 cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/$mnip/$$DSTMN/g" /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv check:rc==0 +cmd:sed -i "s/: '*0'*$/: '1'/g" /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv +check:rc==0 +cmd:sed -i "s/managedaddressmode: '*dhcp'*/managedaddressmode: 'static'/g" /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv +check:rc==0 +cmd:sed -i "s/sharedinstall: '*no'*/sharedinstall: 'sns'/g" /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv +check:rc==0 +cmd:sed -i "s/sshbetweennodes: '*ALLGROUPS'*/sshbetweennodes: 'NOGROUPS'/g" /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv +check:rc==0 cmd:sed -i 's/1111/2222/g' /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv check:rc==0 cmd:cat /tmp/export_site_table_then_modify_yaml_then_import/export_site_yaml.inv @@ -1325,14 +1301,30 @@ cmd: lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_json_th check:rc==0 cmd:ssh $$DSTMN 'lsdef -t site -o clustersite -z >/tmp/export_site_table_then_modify_json_then_import_$$DSTMN/site.stanza ' check:rc==0 -cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 cleanupxcatpost=1111 consoleondemand=1111 databaseloc='/var/lib1111' db2installloc='/mntdb1111' dbtracelevel=1111 defserialflow=1111 defserialport=1111 defserialspeed=9611111111 dhcpinterfaces=eth1111 dhcplease=43211111111 dhcpsetup=1111 disjointdhcps=1111 dnshandler=ddns1111 dnsinterfaces='xcatmn|eth1,eth2;service|bond1111' dnsupdaters=dnsupdaters1111 domain='pok1111.stglabs.ibm.com' enableASMI=1111 excludenodes=1111 externaldns=1111 extntpservers=1111 forwarders=$mnip fsptimeout=1111 genmacprefix='11111111:11:aa' genpasswords=1111 hierarchicalattrs=1111 httpport=81111 hwctrldispatch=1111 installdir='/install1111/' installloc='hostname:/path1111' ipmidispatch=1111 ipmimaxp=641111 ipmiretries=31111 ipmisdrcache=1111 ipmitimeout=21111 iscsidir='/iscsidir1111' managedaddressmode=dhcp1111 master=$mnip maxssh=81111 mnroutenames=1111 nameservers=$mnip nmapoptions='--min-rtt-timeout 1111' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles1111' ntpservers=$mnip persistkvmguests=1111 powerinterval=1111 ppcmaxp=641111 ppcretry=31111 ppctimeout=1111 precreatemypostchdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 pruneservices=1111 runbootscripts=1111 setinstallnic=1111 sharedinstall=1111 sharedtftp=1111 skiptables=nics1111 skipvalidatelog=1111 snmpc=xc1111 sshbetweennodes=ALLGROUPS1111 svloglocal=1111 syspowerinterval=11111 syspowermaxnodes=11111 tftpdir='/tftprot1111/' tftpflags='-v1111' timezone='America/New_York1111' useNmapfromMN=1111 useflowcontrol=1111 usexhrm=1111 vcenterautojoin=1111 vmwarereconfigonpower=1111 vsftp=1111 xcatconfdir='/etc/xcat1111' xcatdebugmode=1111 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=641111 xcatmaxconnections=61111 xcatsslciphers='3DES' xcatsslversion=TLSv1 +cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');chdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 cleanupxcatpost=1111 consoleondemand=1111 databaseloc='/var/lib1111' db2installloc='/mntdb1111' dbtracelevel=0 defserialflow=1111 defserialport=1111 defserialspeed=9611111111 dhcpinterfaces=eth1111 dhcplease=43211111111 dhcpsetup=1111 disjointdhcps=0 dnshandler=ddns1111 dnsinterfaces='xcatmn|eth1,eth2;service|bond1111' dnsupdaters=dnsupdaters1111 domain='pok1111.stglabs.ibm.com' enableASMI=1111 excludenodes=1111 externaldns=1111 extntpservers=1111 forwarders=$mnip fsptimeout=1111 genmacprefix='11111111:11:aa' genpasswords=1111 hierarchicalattrs=1111 httpport=81111 hwctrldispatch=1111 installdir='/install1111/' installloc='hostname:/path1111' ipmidispatch=1111 ipmimaxp=641111 ipmiretries=31111 ipmisdrcache=1111 ipmitimeout=21111 iscsidir='/iscsidir1111' managedaddressmode=dhcp master=$mnip maxssh=81111 mnroutenames=1111 nameservers=$mnip nmapoptions='--min-rtt-timeout 1111' nodestatus=n nodesyncfiledir='/var/xcat/node/syncfiles1111' ntpservers=$mnip persistkvmguests=1111 powerinterval=1111 ppcmaxp=641111 ppcretry=31111 ppctimeout=1111 precreatemypostchdef -t site -o clustersite useSSHonAIX=1111 useNFSv4onAIX=1111 FQDNfirst=1111 SNsyncfiledir='/var/xcat/1111' auditnosyslog=1111 auditskipcmds=ALL blademaxp=641111 pruneservices=1111 runbootscripts=1111 setinstallnic=1111 sharedinstall=no sharedtftp=1111 skiptables=nics1111 skipvalidatelog=1111 snmpc=xc1111 sshbetweennodes=ALLGROUPS svloglocal=1111 syspowerinterval=11111 syspowermaxnodes=11111 tftpdir='/tftprot1111/' tftpflags='-v1111' timezone='America/New_York1111' useNmapfromMN=1111 useflowcontrol=1111 usexhrm=1111 vcenterautojoin=1111 vmwarereconfigonpower=1111 vsftp=1111 xcatconfdir='/etc/xcat1111' xcatdebugmode=0 xcatdport=3001 xcatiport=3002 xcatlport=3003 xcatmaxbatchconnections=641111 xcatmaxconnections=61111 xcatsslciphers='3DES' xcatsslversion=TLSv1 check:rc==0 -cmd:lsdef -t site -o clustersite -z|sed 's/1111/2222/g'|sort -t'=' -k1 |tee /tmp/export_site_table_then_modify_json_then_import/srcsite.stanza +cmd:lsdef -t site -o clustersite -z|sed 's/=0$/=1/g' |sort -t'=' -k1 |tee /tmp/export_site_table_then_modify_json_then_import/srcsite.stanza +check:rc==0 +cmd:sed -i 's/1111/2222/g' /tmp/export_site_table_then_modify_json_then_import/srcsite.stanza +check:rc==0 +cmd:sed -i 's/managedaddressmode=dhcp/managedaddressmode=static/g' /tmp/export_site_table_then_modify_json_then_import/srcsite.stanza +check:rc==0 +cmd:sed -i 's/sharedinstall=no/sharedinstall=sns/g' /tmp/export_site_table_then_modify_json_then_import/srcsite.stanza +check:rc==0 +cmd:sed -i 's/sshbetweennodes=ALLGROUPS/sshbetweennodes=NOGROUPS/g' /tmp/export_site_table_then_modify_json_then_import/srcsite.stanza check:rc==0 cmd:xcat-inventory export --format=json -t site -o clustersite |tee /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv check:rc==0 cmd:mnip=$(lsdef -t site -o clustersite -i master -c|awk -F'=' '{print $2}');sed -i "s/$mnip/$$DSTMN/g" /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv check:rc==0 +cmd:sed -i 's/"0"/"1"/g' /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv +check:rc==0 +cmd:sed -i 's/"managedaddressmode": "dhcp"/"managedaddressmode": "static"/g' /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv +check:rc==0 +cmd:sed -i 's/"sharedinstall": "no"/"sharedinstall": "sns"/g' /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv +check:rc==0 +cmd:sed -i 's/"sshbetweennodes": "ALLGROUPS"/"sshbetweennodes": "NOGROUPS"/g' /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv +check:rc==0 cmd:sed -i 's/1111/2222/g' /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv check:rc==0 cmd:cat /tmp/export_site_table_then_modify_json_then_import/export_site_json.inv From f1d337ababec2ce76a6fbba4a18035c46ebbb684 Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Fri, 9 Mar 2018 00:18:29 -0500 Subject: [PATCH 3/5] update test cases for xcat-inventory new code --- .../testcase/xcat-inventory/cases.node | 251 ++++++++++++++++-- 1 file changed, 222 insertions(+), 29 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.node b/xCAT-test/autotest/testcase/xcat-inventory/cases.node index 35a351bb5..6a266624c 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.node +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.node @@ -223,7 +223,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 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 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=snmpversion 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 +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 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 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 @@ -275,7 +275,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 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 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=snmpversion 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 +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 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 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 @@ -532,7 +532,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 id=5 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=snmpprivacy snmpusername=snmpusername snmpversion=snmpversion 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 +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 id=5 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 @@ -583,7 +583,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 id=5 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=snmpprivacy snmpusername=snmpusername snmpversion=snmpversion 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 +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 id=5 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 @@ -918,32 +918,63 @@ node: 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 - network_info: - primarynic: - ip: '|\D+(\d+)|10.100.100.($1)|' 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 @@ -966,6 +997,12 @@ node: 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 @@ -1133,29 +1170,29 @@ cmd:#!/bin/bash echo "# bogusnode1: objtype=node + bmc=10.100.100.1 bmcpassword=0penBmc bmcusername=root cons=openbmc groups=bogusgroup - ip=10.100.100.1 mgt=openbmc netboot=petitboot bogusnode2: objtype=node + bmc=10.100.100.2 bmcpassword=0penBmc bmcusername=root cons=openbmc groups=bogusgroup - ip=10.100.100.2 mgt=openbmc netboot=petitboot bogusnode3: objtype=node + bmc=10.100.100.3 bmcpassword=0penBmc bmcusername=root cons=openbmc groups=bogusgroup - ip=10.100.100.3 mgt=openbmc netboot=petitboot" > /tmp/xcat_inventory_try_to_import_all_type_is_node_yaml_format/node_stanza_from_import_file check:rc==0 @@ -1211,10 +1248,9 @@ echo '{ }, "hardware_mgt_engine": { "engine_info": { - "openbmc_info": { - "bmcpassword": "0penBmc", - "bmcusername": "root" - } + "bmc": "|\\D+(\\d+)|10.100.100.($1)|", + "bmcpassword": "0penBmc", + "bmcusername": "root" }, "engine_type": "openbmc" }, @@ -1222,11 +1258,6 @@ echo '{ "engine_type": "petitboot" } }, - "network_info": { - "primarynic": { - "ip": "|\\D+(\\d+)|10.100.100.($1)|" - } - }, "obj_info": { "grouptype": "static" }, @@ -1235,6 +1266,22 @@ echo '{ }, "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" }, @@ -1243,6 +1290,22 @@ echo '{ }, "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" }, @@ -1251,6 +1314,22 @@ echo '{ }, "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" }, @@ -1284,6 +1363,13 @@ echo '{ } }, "osimage": { + "bogus_image": { + "addkcmdline": "aaaa", + "boottarget": "aaa", + "imagetype": "linux", + "provision_mode": "statelite", + "role": "compute" + }, "rhels7.4-ppc64le-install-compute": { "basic_attributes": { "arch": "ppc64le", @@ -1440,7 +1526,7 @@ echo '{ "route": {}, "schema_version": "1.0", "site": { - "cluster": { + "clustersite": { "SNsyncfiledir": "/var/xcat/syncfiles", "auditnosyslog": "0", "auditskipcmds": "ALL", @@ -1487,29 +1573,29 @@ cmd:#!/bin/bash echo "# bogusnode1: objtype=node + bmc=10.100.100.1 bmcpassword=0penBmc bmcusername=root cons=openbmc groups=bogusgroup - ip=10.100.100.1 mgt=openbmc netboot=petitboot bogusnode2: objtype=node + bmc=10.100.100.2 bmcpassword=0penBmc bmcusername=root cons=openbmc groups=bogusgroup - ip=10.100.100.2 mgt=openbmc netboot=petitboot bogusnode3: objtype=node + bmc=10.100.100.3 bmcpassword=0penBmc bmcusername=root cons=openbmc groups=bogusgroup - ip=10.100.100.3 mgt=openbmc netboot=petitboot" > /tmp/xcat_inventory_try_to_import_all_type_is_node_json_format/node_stanza_from_import_file check:rc==0 @@ -1630,9 +1716,19 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=1111 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 hcp=1111 height=1111 hidden=1111 hostcluster=1111 hostinterface=1111 hostmanager=1111 hostnames=1111 hosttype=1111 hwtype=1111 id=1111 installnic=1111 interface=1111 ip=1111 iscsipassword=1111 iscsiserver=1111 iscsitarget=1111 iscsiuserid=1111 mac=1111 memory=1111 migrationdest=1111 monserver=1111 mpa=1111 mtm=1111 nameservers=1111 netboot=1111 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=1111 setupdhcp=1111 setupftp=1111 setupipforward=1111 setupldap=1111 setupnameserver=1111 setupnfs=1111 setupnim=1111 setupntp=1111 setupproxydhcp=1111 setuptftp=1111 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: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 id=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 @@ -1641,6 +1737,18 @@ cmd:sed -i 's/unused/used/g' /tmp/export_single_node_then_modify_yaml_then_impor 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 @@ -1686,9 +1794,19 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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=1111 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 hcp=1111 height=1111 hidden=1111 hostcluster=1111 hostinterface=1111 hostmanager=1111 hostnames=1111 hosttype=1111 hwtype=1111 id=1111 installnic=1111 interface=1111 ip=1111 iscsipassword=1111 iscsiserver=1111 iscsitarget=1111 iscsiuserid=1111 mac=1111 memory=1111 migrationdest=1111 monserver=1111 mpa=1111 mtm=1111 nameservers=1111 netboot=1111 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=1111 setupdhcp=1111 setupftp=1111 setupipforward=1111 setupldap=1111 setupnameserver=1111 setupnfs=1111 setupnim=1111 setupntp=1111 setupproxydhcp=1111 setuptftp=1111 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: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 id=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 @@ -1697,6 +1815,16 @@ cmd:sed -i 's/unused/used/g' /tmp/export_single_node_then_modify_json_then_impor 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 @@ -1749,6 +1877,8 @@ cmd: lsdef -t node -o bogusnode[1-3] > /tmp/export_import_single_group_json/targ 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/ @@ -1765,16 +1895,18 @@ cmd:ssh $$DSTMN 'lsdef -t group -o bogusgroup >> /tmp/export_import_single_grou 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 'rmdef -t node -o bogusnode[1-3]' -check:rc==0 -cmd:ssh $$DSTMN 'rmdef -t group -o bogusgroup' -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' @@ -1785,6 +1917,67 @@ cmd:rm -rf /tmp/export_import_single_group_json check:rc==0 end +start:export_import_single_group_yaml +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_json_node_obj_type description:This case is used to test node validation function of xcat-inventory import json file. To test "obj_type" attribute From aedccbf49f3ef6372386d090aa27e439a2bdb6d3 Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Thu, 15 Mar 2018 05:03:25 -0400 Subject: [PATCH 4/5] add test case --- .../testcase/xcat-inventory/cases.node | 72 ++++++++++--------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.node b/xCAT-test/autotest/testcase/xcat-inventory/cases.node index 6a266624c..ef626acf5 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.node +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.node @@ -1,4 +1,4 @@ -start:export_import_single_ppc_by_json +star:texport_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. cmd:mkdir -p /tmp/export_import_single_ppc_by_json @@ -223,7 +223,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 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 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 +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 @@ -275,7 +275,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 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 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 +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 @@ -327,7 +327,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 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 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 +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 @@ -378,7 +378,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 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 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 +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 @@ -429,7 +429,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 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 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 +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 @@ -480,7 +480,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 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 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 +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 @@ -532,7 +532,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 id=5 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 +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 @@ -583,7 +583,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 id=5 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 +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 @@ -1716,7 +1716,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 id=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: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 @@ -1794,7 +1794,7 @@ cmd:ssh $$DSTMN 'lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef 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 id=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: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 @@ -2008,7 +2008,7 @@ echo '{ }' > /tmp/import_validation_json_node_obj_type/node.json check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_json_node_obj_type/node.json -check:output=~Error: failed to validate schema entry +check:output=~Error: failed to validate attribute check:output=~obj_type check:rc!=0 cmd:lsdef bogusnode @@ -2036,7 +2036,7 @@ echo '{ }' > /tmp/import_validation_json_node_obj_type/node.json check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_json_node_obj_type/node.json -check:output=~Error: failed to validate schema entry +check:output=~Error: failed to validate attribute check:output=~obj_type check:rc!=0 cmd:lsdef bogusnode @@ -2064,7 +2064,7 @@ echo '{ }' > /tmp/import_validation_json_node_obj_type/node.json check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_json_node_obj_type/node.json -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef bogusnode check:output=~Object name: bogusnode @@ -2091,7 +2091,7 @@ echo '{ }' > /tmp/import_validation_json_node_obj_type/node.json check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_json_node_obj_type/node.json -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef -t group -o bogusgroup check:output=~Object name: bogusgroup @@ -2128,7 +2128,7 @@ echo "node: role: compute" > /tmp/import_validation_yaml_node_obj_type/node.yaml check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_obj_type/node.yaml -check:output=~Error: failed to validate schema entry +check:output=~Error: failed to validate attribute check:output=~obj_type check:rc!=0 cmd:lsdef bogusnode @@ -2148,7 +2148,7 @@ echo "node: role: compute" > /tmp/import_validation_yaml_node_obj_type/node.yaml check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_obj_type/node.yaml -check:output=~Error: failed to validate schema entry +check:output=~Error: failed to validate attribute check:output=~obj_type check:rc!=0 cmd:lsdef bogusnode @@ -2168,7 +2168,7 @@ echo "node: role: compute" > /tmp/import_validation_yaml_node_obj_type/node.yaml check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_obj_type/node.yaml -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef bogusnode check:output=~Object name: bogusnode @@ -2188,7 +2188,7 @@ echo "node: role: compute" > /tmp/import_validation_yaml_node_obj_type/node.yaml check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_obj_type/node.yaml -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef -t group -o bogusgroup check:output=~Object name: bogusgroup @@ -2231,7 +2231,7 @@ echo '{ }' > /tmp/import_validation_json_node_group/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_json_node_group/node.inv -check:output=~Error: failed to validate schema entry +check:output=~Error: failed to validate attribute check:output=~group check:rc!=0 cmd:lsdef bogusnode @@ -2265,7 +2265,7 @@ echo "node: role: compute" > /tmp/import_validation_yaml_node_group/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_group/node.inv -check:output=~Error: failed to validate schema entry +check:output=~Error: failed to validate attribute check:output=~group check:rc!=0 cmd:lsdef bogusnode @@ -2301,7 +2301,7 @@ echo '{ }' > /tmp/import_validation_json_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv -check:output=~Error: failed to validate schema entry +check:output=~Error: failed to validate attribute check:output=~devtype check:rc!=0 cmd:lsdef bogusnode @@ -2322,7 +2322,7 @@ echo '{ }' > /tmp/import_validation_json_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv -check:output=~Error: failed to validate schema entry +check:output=~Error: failed to validate attribute check:output=~devtype check:rc!=0 cmd:lsdef bogusnode @@ -2350,7 +2350,7 @@ echo '{ }' > /tmp/import_validation_json_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef bogusnode check:output=~Object name: bogusnode @@ -2372,7 +2372,7 @@ echo '{ }' > /tmp/import_validation_json_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef bogusnode check:output=~Object name: bogusnode @@ -2394,7 +2394,7 @@ echo '{ }' > /tmp/import_validation_json_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef bogusnode check:output=~Object name: bogusnode @@ -2416,7 +2416,7 @@ echo '{ }' > /tmp/import_validation_json_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef bogusnode check:output=~Object name: bogusnode @@ -2438,7 +2438,7 @@ echo '{ }' > /tmp/import_validation_json_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_json_node_device_type/node.inv -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef bogusnode check:output=~Object name: bogusnode @@ -2471,7 +2471,7 @@ echo "node: role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv -check:output=~Error: failed to validate schema entry +check:output=~Error: failed to validate attribute check:output=~devtype check:rc!=0 cmd:lsdef bogusnode @@ -2487,7 +2487,7 @@ echo "node: role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv -check:output=~Error: failed to validate schema entry +check:output=~Error: failed to validate attribute check:output=~devtype check:rc!=0 cmd:lsdef bogusnode @@ -2503,7 +2503,7 @@ echo "node: role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef bogusnode check:output=~Object name: bogusnode @@ -2520,7 +2520,7 @@ echo "node: role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef bogusnode check:output=~Object name: bogusnode @@ -2537,7 +2537,7 @@ echo "node: role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef bogusnode check:output=~Object name: bogusnode @@ -2554,7 +2554,7 @@ echo "node: role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef bogusnode check:output=~Object name: bogusnode @@ -2575,7 +2575,7 @@ echo "node: role: compute" > /tmp/import_validation_yaml_node_device_type/node.inv check:rc==0 cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_device_type/node.inv -check:output=~import object successfully +check:output=~Inventory import successfully check:rc==0 cmd:lsdef bogusnode check:output=~Object name: bogusnode @@ -2590,3 +2590,5 @@ cmd:rm -rf /tmp/import_validation_yaml_node_device_type check:rc==0 end + + From 4dbd36c3dafcc4a941372cbb5402d184129fc27c Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Tue, 20 Mar 2018 05:27:16 -0400 Subject: [PATCH 5/5] add more test cases for validation --- .../testcase/xcat-inventory/cases.node | 341 ++++++++++++++++++ xCAT-test/xcattest | 6 +- 2 files changed, 346 insertions(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/xcat-inventory/cases.node b/xCAT-test/autotest/testcase/xcat-inventory/cases.node index ef626acf5..c91b9c24d 100644 --- a/xCAT-test/autotest/testcase/xcat-inventory/cases.node +++ b/xCAT-test/autotest/testcase/xcat-inventory/cases.node @@ -2591,4 +2591,345 @@ check:rc==0 end +start:import_validation_json_node_arch_type +description:This case is used to test node validation function of xcat-inventory import json file. To test "arch" attribute +cmd:mkdir -p /tmp/import_validation_json_node_arch_type +check:rc==0 +cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_json_node_arch_type/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_json_node_arch_type/bogusgroup.stanza; rmdef -t group bogusgroup;fi +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_info": { + "arch": "ppc" + }, + "device_type": "server", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_arch_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_arch_type/node.inv +check:output=~Error: failed to validate attribute +check:output=~arch +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_info": { + "arch": "ppc64" + }, + "device_type": "server", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_arch_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_arch_type/node.inv +check:output=~Inventory import successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:output=~arch=ppc64 +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_info": { + "arch": "ppc64el" + }, + "device_type": "server", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_arch_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_arch_type/node.inv +check:output=~Inventory import successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:output=~arch=ppc64el +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_info": { + "arch": "ppc64le" + }, + "device_type": "server", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_arch_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_arch_type/node.inv +check:output=~Inventory import successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:output=~arch=ppc64le +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_info": { + "arch": "x86_64" + }, + "device_type": "server", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_arch_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_arch_type/node.inv +check:output=~Inventory import successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:output=~arch=x86_64 +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo '{ + "node": { + "bogusnode": { + "device_info": { + "arch": "armv71" + }, + "device_type": "server", + "obj_info": { + "groups": "bogusgroup" + }, + "obj_type": "node", + "role": "compute" + } + }, +}' > /tmp/import_validation_json_node_arch_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_json_node_arch_type/node.inv +check:output=~Inventory import successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:output=~arch=armv71 +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:if [[ -e /tmp/import_validation_json_node_arch_type/bogusnode.stanza ]]; then cat /tmp/import_validation_json_node_arch_type/bogusnode.stanza | mkdef -z;fi +check:rc==0 +cmd:if [[ -e /tmp/import_validation_json_node_arch_type/bogusgroup.stanza ]]; then cat /tmp/import_validation_json_node_arch_type/bogusgroup.stanza |mkdef -z -f;fi +check:rc==0 +cmd:rm -rf /tmp/import_validation_json_node_arch_type +check:rc==0 +end +start:import_validation_yaml_node_arch_type +description:This case is used to test node validation function of xcat-inventory import yaml file. To test "arch" attribute +cmd:mkdir -p /tmp/import_validation_yaml_node_arch_type +check:rc==0 +cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_yaml_node_arch_type/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_yaml_node_arch_type/bogusgroup.stanza; rmdef -t group bogusgroup;fi +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_info: + arch: ppc + device_type: server + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_arch_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_arch_type/node.inv +check:output=~Error: failed to validate attribute +check:output=~arch +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_info: + arch: ppc64 + device_type: server + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_arch_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_arch_type/node.inv +check:output=~Inventory import successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:output=~arch=ppc64 +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_info: + arch: ppc64el + device_type: server + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_arch_type/node.inv +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_arch_type/node.inv +check:output=~Inventory import successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:output=~arch=ppc64el +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_info: + arch: ppc64le + device_type: server + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_arch_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_arch_type/node.inv +check:output=~Inventory import successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:output=~arch=ppc64le +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_info: + arch: x86_64 + device_type: server + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_arch_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_arch_type/node.inv +check:output=~Inventory import successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:output=~arch=x86_64 +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + device_info: + arch: armv71 + device_type: server + obj_info: + groups: bogusgroup + obj_type: node + role: compute" > /tmp/import_validation_yaml_node_arch_type/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_arch_type/node.inv +check:output=~Inventory import successfully +check:rc==0 +cmd:lsdef bogusnode +check:output=~Object name: bogusnode +check:output=~arch=armv71 +check:rc==0 +cmd:rmdef bogusnode +check:rc==0 +cmd:if [[ -e /tmp/import_validation_yaml_node_arch_type/bogusnode.stanza ]]; then cat /tmp/import_validation_yaml_node_arch_type/bogusnode.stanza | mkdef -z;fi +check:rc==0 +cmd:if [[ -e /tmp/import_validation_yaml_node_arch_type/bogusgroup.stanza ]]; then cat /tmp/import_validation_yaml_node_arch_type/bogusgroup.stanza |mkdef -z -f;fi +check:rc==0 +cmd:rm -rf /tmp/import_validation_yaml_node_arch_type +check:rc==0 +end + +start:import_validation_yaml_node_securitylevel +description:This case is used to test node validation function of xcat-inventory import yaml file. To test "securitylevel" attribute +cmd:mkdir -p /tmp/import_validation_yaml_node_securitylevel +check:rc==0 +cmd:lsdef bogusnode > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef bogusnode -z >/tmp/import_validation_yaml_node_securitylevel/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_yaml_node_securitylevel/bogusgroup.stanza; rmdef -t group bogusgroup;fi +check:rc==0 +cmd:#!/bin/bash +echo "node: + bogusnode: + deprecated: + pdunodetype: pdu + device_info: + characteristics: pdu + device_type: server + obj_info: + groups: bogusgroup + obj_type: node + role: compute + security_info: + snmp: + securitylevel: noAuthNoPriv" >/tmp/import_validation_yaml_node_securitylevel/node.inv +check:rc==0 +cmd:xcat-inventory import -f /tmp/import_validation_yaml_node_securitylevel/node.inv +check:output=~Error: failed to validate attribute +check:output=~securitylevel +check:rc!=0 +cmd:lsdef bogusnode +check:output=~Error: Could not find an object named 'bogusnode' +check:rc!=0 + +cmd:if [[ -e /tmp/import_validation_yaml_node_securitylevel/bogusnode.stanza ]]; then cat /tmp/import_validation_yaml_node_securitylevel/bogusnode.stanza | mkdef -z;fi +check:rc==0 +cmd:if [[ -e /tmp/import_validation_yaml_node_securitylevel/bogusgroup.stanza ]]; then cat /tmp/import_validation_yaml_node_securitylevel/bogusgroup.stanza |mkdef -z -f;fi +check:rc==0 +cmd:rm -rf /tmp/import_validation_yaml_node_securitylevel +check:rc==0 +end diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index dedc49867..dbb218414 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -847,7 +847,11 @@ sub load_case { return 1; } while ($line = <$fd>) { - $line =~ s/^\s+|#[^!].+|\s+$//g; + if($newcmdstart){ + $line =~ s/\s+$//g ; + }else{ + $line =~ s/^\s+|#[^!].+|\s+$//g ; + } #skip blank and comment lines next if (length($line) == 0 || ($line =~ /^\s*#/));