2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-13 01:40:26 +00:00

Merge branch 'master' into rsetboot_rf

This commit is contained in:
xuweibj
2019-01-09 09:10:32 +08:00
29 changed files with 741 additions and 317 deletions

View File

@ -189,7 +189,7 @@ xCAT includes a script, ``cuda_power9_setup`` as example, to help user handle th
Diskful osimage
^^^^^^^^^^^^^^^
For diskful deployment, there is no need to change the osimage definition. Instead, add this postscript to your compute node postbootscrtips list. ::
For diskful deployment, there is no need to change the osimage definition. Instead, add this postscript to your compute node postscripts list. ::
chdef p9compute -p postscripts=cuda_power9_setup

View File

@ -21,13 +21,13 @@ SYNOPSIS
\ **lsdef**\ [\ **-h | -**\ **-help**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-i**\ \ *attr-list*\ ]
\ **lsdef**\ [\ **-V | -**\ **-verbose**\ ] [\ **-l | -**\ **-long**\ ] [\ **-s | -**\ **-short**\ ] [\ **-a | -**\ **-all**\ ] [\ **-S**\ ]
[\ **-t**\ \ *object-types*\ ] [\ **-o**\ \ *object-names*\ ] [\ **-z | -**\ **-stanza**\ ] [\ **-i**\ \ *attr-list*\ ]
\ **lsdef**\ [\ **-V | -**\ **-verbose**\ ] [\ **-a | -**\ **-all**\ ] [\ **-S**\ ]
[\ **-t**\ \ *object-types*\ ] [\ **-o**\ \ *object-names*\ ] [\ **-z | -**\ **-stanza**\ ] [\ [\ **-i**\ \ *attr-list*\] | [\ **-l | -**\ **-long**\ ] | [\ **-s | -**\ **-short**\ ]]
[\ **-c | -**\ **-compress**\ ] [\ **-**\ **-osimage**\ ] [\ **-**\ **-nics**\ ] [[\ **-w**\ \ *attr*\ ==\ *val*\ ]
[\ **-w**\ \ *attr*\ =~\ *val*\ ] ...] [\ *noderange*\ ]
\ **lsdef**\ [\ **-l | -**\ **-long**\ ] [\ **-a | -**\ **-all**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-z | -**\ **-stanza**\ ]
[\ **-i**\ \ *attr-list*\ ] [\ **-**\ **-template**\ [\ *template-object-name*\ ]]
\ **lsdef**\ [\ **-a | -**\ **-all**\ ] [\ **-t**\ \ *object-types*\ ] [\ **-z | -**\ **-stanza**\ ]
[\ [\ **-i**\ \ *attr-list*\] | [\ **-l | -**\ **-long**\ ] | [\ **-s | -**\ **-short**\ ]] [\ **-**\ **-template**\ [\ *template-object-name*\ ]]
***********
@ -49,15 +49,15 @@ OPTIONS
Display all definitions.
For performance consideration, the auditlog and eventlog objects will not be listed.
To list auditlog or eventlog objects, use lsdef -t auditlog or lsdef -t eventlog instead.
To list auditlog or eventlog objects, use \ **lsdef -t auditlog**\ or \ **lsdef -t eventlog**\ instead.
\ **-c|-**\ **-compress**\
Display information in compressed mode, each output line has format "<object name>: <data>".
The output can be passed to command xcoll or xdshbak for formatted output.
The -c flag must be used with -i flag.
The output can be passed to command \ **xcoll**\ or \ **xdshbak**\ for formatted output.
The \ **-c**\ flag must be used with \ **-i**\ flag.
@ -136,13 +136,18 @@ OPTIONS
\ **-w**\ \ *attr==val*\ \ **-w**\ \ *attr=~val*\ ...
Use one or multiple -w flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. Use the help option to get a list of valid attributes for each object type.
Use one or multiple \ **-w**\ flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. Use the help option to get a list of valid attributes for each object type.
Operator descriptions:
== Select nodes where the attribute value is exactly this value.
!= Select nodes where the attribute value is not this specific value.
=~ Select nodes where the attribute value matches this regular expression.
!~ Select nodes where the attribute value does not match this regular expression.
.. code-block:: perl
== Select nodes where the attribute value is exactly this value.
!= Select nodes where the attribute value is not this specific value.
=~ Select nodes where the attribute value matches this regular expression.
!~ Select nodes where the attribute value does not match this regular expression.
Note: if the "val" fields includes spaces or any other characters that will be parsed by shell, the "attr<operator>val" needs to be quoted. If the operator is "!~", the "attr<operator>val" needs to be quoted using single quote.
@ -150,7 +155,7 @@ OPTIONS
\ **-z|-**\ **-stanza**\
Display output in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files.
Display output in stanza format. See the "xcatstanzafile" man page for details on using xCAT stanza files.
@ -191,8 +196,6 @@ EXAMPLES
.. code-block:: perl
lsdef
OR
lsdef -a
@ -350,7 +353,7 @@ EXAMPLES
15.
To list the nodes status and use xcoll to format the output.
To list the nodes status and use \ **xcoll**\ to format the output.
.. code-block:: perl

View File

@ -110,7 +110,7 @@ sub execute_dcp
if (!scalar(%resolved_targets))
{
my $rsp = {};
$rsp->{error}->[0] = "No hosts in node list 1";
$rsp->{error}->[0] = "DCP: No hosts in node list 1";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1);
return ++$result;
}
@ -368,7 +368,7 @@ sub execute_dsh
if (!scalar(%resolved_targets))
{
my $rsp = {};
$rsp->{error}->[0] = " No hosts in node list 2";
$rsp->{error}->[0] = " DSH: No hosts in node list 2";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK, 1);
return ++$result;
}
@ -6300,6 +6300,7 @@ sub run_always_rsync_postscripts
my @hosts = @$hostnames;
my @newoutput = ();
my $dshparms;
foreach my $postsfile (@::alwayspostscripts) {
my $tmppostfile = $postsfile;
@ -6310,28 +6311,34 @@ sub run_always_rsync_postscripts
}
foreach my $host (@hosts) {
# build xdsh queue
# build host and all scripts to execute
# EXECUTEALWAYS will only execute the syncfile in the syncfile list
foreach my $key (keys %{$$options{'destDir_srcFile'}{$host}}) {
foreach my $key1 (keys %{ $$options{'destDir_srcFile'}{$host}{$key} }) {
my $index = 0;
while (my $src_file = $$options{'destDir_srcFile'}{$host}{$key}{$key1}->[$index]) {
if ($src_file eq $tmppostfile) {
push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host);
}
$index++;
}
}
}
}
}
foreach my $key1 (keys %{ $$options{'destDir_srcFile'}{$host}->{$key} }) {
my $index = 0;
my $key1_ref = $$options{'destDir_srcFile'}{$host}->{$key}->{$key1};
if (ref $key1_ref eq 'ARRAY') { #stored as ARRAY for same_dest_name
while (my $src_file =$key1_ref->[$index] ) {
if ($src_file eq $tmppostfile) {
push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host);
}
$index++;
}
} else { #stroed as hash table for diff_dest_name
foreach my $src_file (keys %{$key1_ref}) {
if ($src_file eq $tmppostfile) {
push(@{ $dshparms->{'postscripts'}{$postsfile} }, $host);
}
}
} #end else
} #end foreach key1
} #end foreach key
} #end foreach host
} #end foreach postsfile
# now if we have postscripts to run, run xdsh
my $out;
foreach my $ps (keys %{ $$dshparms{'postscripts'} }) {
my @nodes;

View File

@ -6,13 +6,13 @@ B<lsdef> - Use this command to list xCAT data object definitions.
B<lsdef> [B<-h>|B<--help>] [B<-t> I<object-types>] [B<-i> I<attr-list>]
B<lsdef> [B<-V>|B<--verbose>] [B<-l>|B<--long>] [B<-s>|B<--short>] [B<-a>|B<--all>] [B<-S>]
[B<-t> I<object-types>] [B<-o> I<object-names>] [B<-z>|B<--stanza>] [B<-i> I<attr-list>]
B<lsdef> [B<-V>|B<--verbose>] [B<-a>|B<--all>] [B<-S>]
[B<-t> I<object-types>] [B<-o> I<object-names>] [B<-z>|B<--stanza>] [B<-i> I<attr-list> | [B<-l>|B<--long>] | [B<-s>|B<--short>]]
[B<-c>|B<--compress>] [B<--osimage>] [B<--nics>] [[B<-w> I<attr>==I<val>]
[B<-w> I<attr>=~I<val>] ...] [I<noderange>]
B<lsdef> [B<-l>|B<--long>] [B<-a>|B<--all>] [B<-t> I<object-types>] [B<-z>|B<--stanza>]
[B<-i> I<attr-list>] [B<--template> [I<template-object-name>]]
B<lsdef> [B<-a>|B<--all>] [B<-t> I<object-types>] [B<-z>|B<--stanza>]
[B<-i> I<attr-list> | [B<-l>|B<--long>] | [B<-s>|B<--short>]] [B<--template> [I<template-object-name>]]
=head1 DESCRIPTION
@ -28,13 +28,13 @@ in the xCAT database and xCAT object definition templates shipped in xCAT.
Display all definitions.
For performance consideration, the auditlog and eventlog objects will not be listed.
To list auditlog or eventlog objects, use lsdef -t auditlog or lsdef -t eventlog instead.
To list auditlog or eventlog objects, use B<lsdef -t auditlog> or B<lsdef -t eventlog> instead.
=item B<-c|--compress>
Display information in compressed mode, each output line has format "<object name>: <data>".
The output can be passed to command xcoll or xdshbak for formatted output.
The -c flag must be used with -i flag.
The output can be passed to command B<xcoll> or B<xdshbak> for formatted output.
The B<-c> flag must be used with B<-i> flag.
=item B<-h|--help>
@ -87,9 +87,10 @@ Verbose mode.
=item B<-w> I<attr==val> B<-w> I<attr=~val> ...
Use one or multiple -w flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. Use the help option to get a list of valid attributes for each object type.
Use one or multiple B<-w> flags to specify the selection string that can be used to select objects. The operators ==, !=, =~ and !~ are available. Use the help option to get a list of valid attributes for each object type.
Operator descriptions:
== Select nodes where the attribute value is exactly this value.
!= Select nodes where the attribute value is not this specific value.
=~ Select nodes where the attribute value matches this regular expression.
@ -99,7 +100,7 @@ Note: if the "val" fields includes spaces or any other characters that will be p
=item B<-z|--stanza>
Display output in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files.
Display output in stanza format. See the "xcatstanzafile" man page for details on using xCAT stanza files. And default is to list complete object definition, use B<-i> to specify the attribute scope.
=back
@ -126,8 +127,6 @@ when defining an xCAT node.
To get a list of all the objects that have been defined.
lsdef
OR
lsdef -a
=item 3.
@ -211,7 +210,7 @@ The hidden nodes are FSP/BPAs.
=item 15.
To list the nodes status and use xcoll to format the output.
To list the nodes status and use B<xcoll> to format the output.
lsdef -t node -i status -c | xcoll

View File

@ -37,12 +37,13 @@ system_reset_string = '#ComputerSystem.Reset'
reset_type_string = 'ResetType@Redfish.AllowableValues'
BOOTSOURCE_SET_STATE = {
"cd" : "Cd",
"def" : "None",
"floppy": "Floppy",
"hd" : 'Hdd',
"net" : "Pxe",
"setup" : "BiosSetup",
"cd" : "Cd",
"def" : "None",
"default": "None",
"floppy" : "Floppy",
"hd" : "Hdd",
"net" : "Pxe",
"setup" : "BiosSetup",
}
BOOTSOURCE_GET_STATE = {
@ -285,3 +286,4 @@ class RedfishRest(object):
boot_enable = 'Disabled'
data = {'Boot': {'BootSourceOverrideEnabled': boot_enable, "BootSourceOverrideTarget": target_data} }
return self.request('PATCH', target_url, payload=data, cmd='set_boot_state')

View File

@ -33,6 +33,77 @@ my %module_type = (
"redfish" => "Redfish",
);
#-------------------------------------------------------
=head3 parse_node_info
Parse the node information: bmc, bmcip, username, password
=cut
#-------------------------------------------------------
sub parse_node_info {
my $noderange = shift;
my $module = shift;
my $node_info_ref = shift;
my $callback = shift;
my $rst = 0;
my $passwd_table = xCAT::Table->new('passwd');
my $passwd_hash = $passwd_table->getAttribs({ 'key' => $module }, qw(username password));
my $openbmc_table = xCAT::Table->new('openbmc');
my $openbmc_hash = $openbmc_table->getNodesAttribs(\@$noderange, ['bmc', 'username', 'password']);
foreach my $node (@$noderange) {
if (defined($openbmc_hash->{$node}->[0])) {
if ($openbmc_hash->{$node}->[0]->{'bmc'}) {
$node_info_ref->{$node}->{bmc} = $openbmc_hash->{$node}->[0]->{'bmc'};
$node_info_ref->{$node}->{bmcip} = xCAT::NetworkUtils::getNodeIPaddress($openbmc_hash->{$node}->[0]->{'bmc'});
}
unless($node_info_ref->{$node}->{bmc}) {
xCAT::SvrUtils::sendmsg("Error: Unable to get attribute bmc", $callback, $node);
delete $node_info_ref->{$node};
$rst = 1;
next;
}
unless($node_info_ref->{$node}->{bmcip}) {
xCAT::SvrUtils::sendmsg("Error: Unable to resolve ip address for bmc: $node_info_ref->{$node}->{bmc}", $callback, $node);
delete $node_info_ref->{$node};
$rst = 1;
next;
}
if ($openbmc_hash->{$node}->[0]->{'username'}) {
$node_info_ref->{$node}->{username} = $openbmc_hash->{$node}->[0]->{'username'};
} elsif ($passwd_hash and $passwd_hash->{username}) {
$node_info_ref->{$node}->{username} = $passwd_hash->{username};
} else {
xCAT::SvrUtils::sendmsg("Error: Unable to get attribute username", $callback, $node);
delete $node_info_ref->{$node};
$rst = 1;
next;
}
if ($openbmc_hash->{$node}->[0]->{'password'}) {
$node_info_ref->{$node}->{password} = $openbmc_hash->{$node}->[0]->{'password'};
} elsif ($passwd_hash and $passwd_hash->{password}) {
$node_info_ref->{$node}->{password} = $passwd_hash->{password};
} else {
xCAT::SvrUtils::sendmsg("Error: Unable to get attribute password", $callback, $node);
delete $node_info_ref->{$node};
$rst = 1;
next;
}
} else {
xCAT::SvrUtils::sendmsg("Error: Unable to get information from openbmc table", $callback, $node);
$rst = 1;
next;
}
}
return $rst;
}
sub acquire_lock {
my $ppid = shift;
$ppid = shift if (($ppid) && ($ppid =~ /AGENT/));

View File

@ -3274,7 +3274,7 @@ sub defls
# do we want just the object names or all the attr=val
if ($::opt_l || @::noderange || $::opt_o || $::opt_i || $::opt_template)
if ($::opt_l || @::noderange || $::opt_o || $::opt_i || $::opt_z || $::opt_template)
{
# assume we want the the details - not just the names
@ -3297,7 +3297,7 @@ sub defls
# is -i then just get the ones in the list
$::ATTRLIST = $::opt_i;
} elsif (@::noderange || $::opt_o) {
} elsif (@::noderange || $::opt_o || $::opt_z) {
# if they gave a list of objects then they must want more
# than the object names!

View File

@ -141,7 +141,7 @@ sub process_request {
}
my $noderange = $request->{node};
my $check = parse_node_info($noderange);
my $check = xCAT::AGENT::parse_node_info($noderange, "openbmc", \%node_info, $callback);
if (&refactor_args($request)) {
xCAT::MsgUtils->message("E", { data => ["Failed to refactor arguments"] }, $callback);
return;
@ -418,74 +418,6 @@ sub parse_args {
#-------------------------------------------------------
=head3 parse_node_info
Parse the node information: bmc, bmcip, username, password
=cut
#-------------------------------------------------------
sub parse_node_info {
my $noderange = shift;
my $rst = 0;
my $passwd_table = xCAT::Table->new('passwd');
my $passwd_hash = $passwd_table->getAttribs({ 'key' => 'openbmc' }, qw(username password));
my $openbmc_table = xCAT::Table->new('openbmc');
my $openbmc_hash = $openbmc_table->getNodesAttribs(\@$noderange, ['bmc', 'username', 'password']);
foreach my $node (@$noderange) {
if (defined($openbmc_hash->{$node}->[0])) {
if ($openbmc_hash->{$node}->[0]->{'bmc'}) {
$node_info{$node}{bmc} = $openbmc_hash->{$node}->[0]->{'bmc'};
$node_info{$node}{bmcip} = xCAT::NetworkUtils::getNodeIPaddress($openbmc_hash->{$node}->[0]->{'bmc'});
}
unless($node_info{$node}{bmc}) {
xCAT::SvrUtils::sendmsg("Error: Unable to get attribute bmc", $callback, $node);
delete $node_info{$node};
$rst = 1;
next;
}
unless($node_info{$node}{bmcip}) {
xCAT::SvrUtils::sendmsg("Error: Unable to resolve ip address for bmc: $node_info{$node}{bmc}", $callback, $node);
delete $node_info{$node};
$rst = 1;
next;
}
if ($openbmc_hash->{$node}->[0]->{'username'}) {
$node_info{$node}{username} = $openbmc_hash->{$node}->[0]->{'username'};
} elsif ($passwd_hash and $passwd_hash->{username}) {
$node_info{$node}{username} = $passwd_hash->{username};
} else {
xCAT::SvrUtils::sendmsg("Error: Unable to get attribute username", $callback, $node);
delete $node_info{$node};
$rst = 1;
next;
}
if ($openbmc_hash->{$node}->[0]->{'password'}) {
$node_info{$node}{password} = $openbmc_hash->{$node}->[0]->{'password'};
} elsif ($passwd_hash and $passwd_hash->{password}) {
$node_info{$node}{password} = $passwd_hash->{password};
} else {
xCAT::SvrUtils::sendmsg("Error: Unable to get attribute password", $callback, $node);
delete $node_info{$node};
$rst = 1;
next;
}
} else {
xCAT::SvrUtils::sendmsg("Error: Unable to get information from openbmc table", $callback, $node);
$rst = 1;
next;
}
}
return $rst;
}
#-------------------------------------------------------
=head3 refactor_args
refractor args to be easily dealt by python client

View File

@ -117,7 +117,7 @@ sub process_request {
}
my $noderange = $request->{node};
my $check = parse_node_info($noderange);
my $check = xCAT::AGENT::parse_node_info($noderange, "redfish", \%node_info, $callback);
$callback->({ errorcode => [$check] }) if ($check);
return unless(%node_info);
@ -178,73 +178,4 @@ sub parse_args {
}
}
#-------------------------------------------------------
=head3 parse_node_info
Parse the node information: bmc, bmcip, username, password
=cut
#-------------------------------------------------------
sub parse_node_info {
my $noderange = shift;
my $rst = 0;
my $passwd_table = xCAT::Table->new('passwd');
my $passwd_hash = $passwd_table->getAttribs({ 'key' => 'redfish' }, qw(username password));
my $my_table = xCAT::Table->new('openbmc');
my $my_hash = $my_table->getNodesAttribs(\@$noderange, ['bmc', 'username', 'password']);
foreach my $node (@$noderange) {
if (defined($my_hash->{$node}->[0])) {
if ($my_hash->{$node}->[0]->{'bmc'}) {
$node_info{$node}{bmc} = $my_hash->{$node}->[0]->{'bmc'};
$node_info{$node}{bmcip} = xCAT::NetworkUtils::getNodeIPaddress($my_hash->{$node}->[0]->{'bmc'});
}
unless($node_info{$node}{bmc}) {
xCAT::SvrUtils::sendmsg("Error: Unable to get attribute bmc", $callback, $node);
delete $node_info{$node};
$rst = 1;
next;
}
unless($node_info{$node}{bmcip}) {
xCAT::SvrUtils::sendmsg("Error: Unable to resolve ip address for bmc: $node_info{$node}{bmc}", $callback, $node);
delete $node_info{$node};
$rst = 1;
next;
}
if ($my_hash->{$node}->[0]->{'username'}) {
$node_info{$node}{username} = $my_hash->{$node}->[0]->{'username'};
} elsif ($passwd_hash and $passwd_hash->{username}) {
$node_info{$node}{username} = $passwd_hash->{username};
} else {
xCAT::SvrUtils::sendmsg("Error: Unable to get attribute username", $callback, $node);
delete $node_info{$node};
$rst = 1;
next;
}
if ($my_hash->{$node}->[0]->{'password'}) {
$node_info{$node}{password} = $my_hash->{$node}->[0]->{'password'};
} elsif ($passwd_hash and $passwd_hash->{password}) {
$node_info{$node}{password} = $passwd_hash->{password};
} else {
xCAT::SvrUtils::sendmsg("Error: Unable to get attribute password", $callback, $node);
delete $node_info{$node};
$rst = 1;
next;
}
} else {
xCAT::SvrUtils::sendmsg("Error: Unable to get information from openbmc table", $callback, $node);
$rst = 1;
next;
}
}
return $rst;
}
1;

View File

@ -273,3 +273,46 @@ check:output=~300
cmd:if [ -f /tmp/sitevalue ];then var=`cat /tmp/sitevalue`;chdef -t site clustersite dhcplease=$var;rm -rf /tmp/sitevalue;fi
check:rc==0
end
start:chdef_network_not_exist
description:This case is use to create a network, but not set net and mask.
label:mn_only,db
cmd:chdef -t network aaaaa_not_exist
check:output=~No object definitions have been created or modified
#check:rc!=0
cmd:chdef -t network aaaaa_not_exist mtu=1500
check:rc!=0
check:output=~Net or mask value should not be empty
cmd:chdef -t network aaaaa_not_exist mtu=1500 net=10.0.0.0
check:rc!=0
check:output=~Net or mask value should not be empty
cmd:chdef -t network aaaaa_not_exist mtu=1500 mask=255.255.255.0
check:rc!=0
check:output=~Net or mask value should not be empty
cmd:chdef -t network aaaaa_not_exist mask=255.255.255.0 net=100.0.0.0 mtu=1500
check:rc==0
check:output=~1 object definitions have been created or modified
cmd:lsdef -t network aaaaa_not_exist
check:rc==0
cmd:chdef -t network aaaaa_not_exist gateway=10.0.0.101
check:rc==0
cmd:lsdef -t network aaaaa_not_exist -i gateway
check:output=~10.0.0.101
cmd:chdef -t network bbbbb_not_exist mask=255.255.255.0 net=100.0.0.0
check:rc!=0
check:output=~A network definition called 'aaaaa_not_exist' already exists
cmd:echo '
bbbbb_not_exist:
objtype=network
net=150.0.0.0
' > /tmp/bbbbb_not_exist.def
cmd:cat /tmp/bbbbb_not_exist.def |mkdef -z
check:rc!=0
check:output=~Net or mask value should not be empty
cmd:lsdef -t network -o bbbbb_not_exist
check:rc!=0
cmd:rmdef -t network -o aaaaa_not_exist
check:rc==0
cmd:rm -rf /tmp/bbbbb_not_exist.def
end

View File

@ -32,7 +32,7 @@ check:output=~64 bytes from $$CN
cmd:lsdef -l $$CN | grep status
check:rc==0
check:output=~booted
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep __GETNODEATTR($$CN,ip)__ /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
check:rc==0
check:output=~__GETNODEATTR($$CN,ip)__
check:output!~dhcp
@ -80,7 +80,7 @@ check:output=~64 bytes from $$CN
cmd:lsdef -l $$CN | grep status
check:rc==0
check:output=~booted
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
check:rc==0
check:output=~__GETNODEATTR($$CN,ip)__
check:output!~dhcp
@ -133,11 +133,11 @@ check:output=~64 bytes from $$CN
cmd:lsdef -l $$CN | grep status
check:rc==0
check:output=~booted
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
check:rc==0
check:output=~__GETNODEATTR($$CN,ip)__
check:output!~dhcp
cmd:secondarynic=`xdsh $$CN ip addr |grep 100.1.0.100|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$secondarynic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$secondarynic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
cmd:secondarynic=`xdsh $$CN ip addr |grep 100.1.0.100|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$secondarynic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$secondarynic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces";else echo "Sorry,this is not supported os"; fi
check:rc==0
check:output=~100.1.0.100
check:output!~dhcp
@ -158,7 +158,7 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
check:rc==0
@ -166,19 +166,19 @@ cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicne
check:rc==0
cmd:updatenode $$CN -P "confignetwork -s"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~11.1.0.100
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
check:rc==0
check:output=~__GETNODEATTR($$CN,ip)__
check:output!~dhcp
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
end
@ -190,7 +190,7 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1496
check:rc==0
@ -198,17 +198,17 @@ cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicne
check:rc==0
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~11.1.0.100
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep mtu /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep MTU /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep mtu /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~MTU=1496|mtu 1496
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
end
@ -220,7 +220,7 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:cp -f /etc/hosts /etc/hosts.bak
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
@ -236,22 +236,22 @@ check:output=~aliases1-1 aliases1-1-1
check:output=~aliases1-2
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
check:output=~11.1.0.100
check:output!~dhcp
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
check:output=~12.1.0.100
check:output!~dhcp
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$SECONDNIC"
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:mv -f /etc/hosts.bak /etc/hosts
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
end
@ -263,7 +263,7 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:cp -f /etc/hosts /etc/hosts.bak
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
@ -279,23 +279,23 @@ check:output=~$$CN-$$SECONDNIC-1
check:output=~$$CN-$$SECONDNIC-2
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~11.1.0.100
check:output!~dhcp
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~12.1.0.100
check:output=~CONNECTED_MODE=yes|CONNECTED_MODE yes
check:output!~dhcp
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -f /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$SECONDNIC"
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:mv -f /etc/hosts.bak /etc/hosts
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
end
@ -364,7 +364,7 @@ cmd:chtab node=$$CN nics.disable=yes
check:rc==0
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:output!~11.1.0.100
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
check:rc==0
@ -385,7 +385,7 @@ cmd:chtab node=$$CN nics.disable=1
check:rc==0
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:output!~11.1.0.100
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
check:rc==0
@ -429,7 +429,7 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
check:rc==0
@ -454,21 +454,21 @@ check:output=~$$CN-$$THIRDNIC-1
check:output=~$$CN-$$THIRDNIC-2
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~11.1.0.100
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 12.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~12.1.0.100
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 13.1.0.200 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~13.1.0.200
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 14.1.0.100 /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~14.1.0.100
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
cmd:rmdef -t network -o 13_1_0_0-255_255_0_0
cmd:rmdef -t network -o 14_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC /etc/network/interfaces.d/$$SECONDNIC:1";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC /etc/network/interfaces.d/$$THIRDNIC:1";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC:1"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC /etc/network/interfaces.d/$$THIRDNIC:1";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$SECONDNIC"
@ -477,7 +477,7 @@ cmd:xdsh $$CN "ip addr del 14.1.0.100/16 dev $$THIRDNIC"
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:mv -f /etc/hosts.bak /etc/hosts
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/";else echo "Sorry,this is not supported os"; fi
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
end
@ -489,15 +489,15 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
check:rc==0
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
check:rc==0
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~11.1.0.100
cmd:chdef $$CN nicips.$$SECONDNIC= nictypes.$$SECONDNIC= nicnetworks.$$SECONDNIC=
check:rc==0
@ -509,12 +509,12 @@ cmd:chdef $$CN nicnetworks.$$SECONDNIC.6="60_0_0_0-255_0_0_0" nicnetworks.$$SECO
check:rc==0
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC.6"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.6"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/network/interfaces.d/$$SECONDNIC.6";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC.6"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.6"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 60.5.106.9 /etc/network/interfaces.d/$$SECONDNIC.6";else echo "Sorry,this is not supported os"; fi
check:output=~60.5.106.9
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC.7"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.7"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/network/interfaces.d/$$SECONDNIC.7";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/sysconfig/network/ifcfg-$$SECONDNIC.7"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.7"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 70.5.106.9 /etc/network/interfaces.d/$$SECONDNIC.7";else echo "Sorry,this is not supported os"; fi
check:output=~70.5.106.9
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 60_0_0_0-255_0_0_0
cmd:rmdef -t network -o 70_0_0_0-255_0_0_0
@ -523,11 +523,11 @@ cmd:xdsh $$CN "ip addr del 70.5.106.9/8 dev $$SECONDNIC.7"
cmd:xdsh $$CN "ip link del dev $$SECONDNIC.6"
cmd:xdsh $$CN "ip link del dev $$SECONDNIC.7"
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC.6 /etc/sysconfig/network/ifcfg-$$SECONDNIC.7"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.6 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.7"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC.6 /etc/network/interfaces.d/$$SECONDNIC.7";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC.6 /etc/sysconfig/network/ifcfg-$$SECONDNIC.7"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.6 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC.7"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC.6 /etc/network/interfaces.d/$$SECONDNIC.7";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
check:rc==0
@ -541,15 +541,15 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1500
check:rc==0
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
check:rc==0
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 11.1.0.100 /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:output=~11.1.0.100
cmd:chdef $$CN nicips.$$SECONDNIC= nictypes.$$SECONDNIC= nicnetworks.$$SECONDNIC=
check:rc==0
@ -568,11 +568,11 @@ cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:rmdef -t network -o 60_0_0_0-255_0_0_0
cmd:rmdef -t network -o 70_0_0_0-255_0_0_0
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
check:rc==0
@ -586,8 +586,8 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
check:rc==0
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
@ -606,7 +606,7 @@ cmd:chdef $$CN nicnetworks.bond0=30_5_0_0-255_255_0_0 nictypes.$$SECONDNIC=ether
check:rc==0
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network/ifcfg-bond0"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network-scripts/ifcfg-bond0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network/ifcfg-bond0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network-scripts/ifcfg-bond0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi
check:output=~30.5.106.9
check:rc==0
cmd:xdsh $$CN "ls /sys/class/net"
@ -614,20 +614,20 @@ check:output=~bond0
cmd:xdsh $$CN "cat /sys/class/net/bonding_masters"
check:output=~bond0
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 30_5_0_0-255_255_0_0
cmd:xdsh $$CN "ip addr del 30.5.106.9/16 dev bond0"
cmd:xdsh $$CN "ip link del dev bond0"
cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters"
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
check:rc==0
@ -641,8 +641,8 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
check:rc==0
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
@ -668,15 +668,15 @@ check:rc!=0
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$THIRDNIC"
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 30_5_0_0-255_255_0_0
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
check:rc==0
@ -690,8 +690,8 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC mtu=1500
check:rc==0
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
@ -712,9 +712,9 @@ cmd:chdef $$CN nicdevices.bond0.2=bond0 nicdevices.bond0.3=bond0 nicips.bond0.2=
check:rc==0
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-bond0.2"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-bond0.2"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/bond0.2";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-bond0.2"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-bond0.2"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/bond0.2";else echo "Sorry,this is not supported os"; fi
check:output=~30.5.106.8
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-bond0.3"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/bond0.3";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-bond0.3"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/bond0.3";else echo "Sorry,this is not supported os"; fi
check:output=~40.5.106.8
cmd:xdsh $$CN "ls /sys/class/net"
check:output=~bond0
@ -723,10 +723,10 @@ check:output=~bond0.3
cmd:xdsh $$CN "cat /sys/class/net/bonding_masters"
check:output=~bond0
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 30_5_0_0-255_255_0_0
cmd:rmdef -t network -o 40_5_0_0-255_255_0_0
@ -738,11 +738,11 @@ cmd:xdsh $$CN "ip link del dev bond0"
cmd:xdsh $$CN "ip link del dev bond0.2"
cmd:xdsh $$CN "ip link del dev bond0.3"
cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters"
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
check:rc==0
@ -756,8 +756,8 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
check:rc==0
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
@ -776,7 +776,7 @@ cmd:chdef $$CN nicnetworks.br0=30_5_0_0-255_255_0_0 nicdevices.br0=bond0 nictype
check:rc==0
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network/ifcfg-br0"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network-scripts/ifcfg-br0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network/ifcfg-br0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/sysconfig/network-scripts/ifcfg-br0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.9 /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi
check:output=~30.5.106.9
check:rc==0
cmd:xdsh $$CN "ls /sys/class/net"
@ -784,10 +784,10 @@ check:output=~br0
cmd:xdsh $$CN "cat /sys/class/net/bonding_masters"
check:output=~bond0
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 30_5_0_0-255_255_0_0
cmd:xdsh $$CN "ip addr del 30.5.106.9/16 dev br0"
@ -795,11 +795,11 @@ cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
cmd:xdsh $$CN "ip addr del 12.1.0.200/16 dev $$THIRDNIC"
cmd:xdsh $$CN "ip link del dev br0"
cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters"
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-br0"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-br0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-br0"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-br0"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/br0";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
end
@ -811,8 +811,8 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
check:rc==0
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
@ -833,10 +833,10 @@ cmd:chdef $$CN nicdevices.br22=bond0.2 nicdevices.br33=bond0.3 nictypes.br22=bri
check:rc==0
cmd:updatenode $$CN -P confignetwork
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-br22"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br22"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/br22";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-br22"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br22"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/br22";else echo "Sorry,this is not supported os"; fi
check:output=~30.5.106.8
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-br33"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
check:output=~40.5.106.8
check:rc==0
cmd:xdsh $$CN "ls /sys/class/net"
@ -845,10 +845,10 @@ check:output=~br33
cmd:xdsh $$CN "cat /sys/class/net/bonding_masters"
check:output=~bond0
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 30_5_0_0-255_255_0_0
cmd:xdsh $$CN "ip addr del 30.5.106.8/16 dev br22"
@ -862,11 +862,11 @@ cmd:xdsh $$CN "ip link del dev bond0"
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$THIRDNIC"
cmd:xdsh $$CN "echo -bond0 > /sys/class/net/bonding_masters"
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0.2 /etc/sysconfig/network-scripts/ifcfg-bond0.3 /etc/sysconfig/network-scripts/ifcfg-br22 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0.2 /etc/sysconfig/network-scripts/ifcfg-bond0.3 /etc/sysconfig/network-scripts/ifcfg-br22 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
end
@ -878,8 +878,8 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:mkdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0 mgtifname=$$SECONDNIC
check:rc==0
cmd:chdef $$CN nicips.$$SECONDNIC=11.1.0.100 nictypes.$$SECONDNIC=Ethernet nicnetworks.$$SECONDNIC=11_1_0_0-255_255_0_0
@ -900,14 +900,14 @@ cmd:chdef $$CN nicdevices.br22=bond0.2 nicdevices.br33=bond0.3 nictypes.br22=bri
check:rc==0
cmd:updatenode $$CN -P "confignetwork -s"
check:rc==0
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
cmd:installnic=`xdsh $$CN ip addr |grep __GETNODEATTR($$CN,ip)__|awk -F " " '{print $NF}'`; if grep SUSE /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network/ifcfg-$installnic"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cat /etc/sysconfig/network-scripts/ifcfg-$installnic"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cat /etc/network/interfaces.d/*";else echo "Sorry,this is not supported os"; fi
check:rc==0
check:output=~__GETNODEATTR($$CN,ip)__
check:output!~dhcp
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-br22"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br22"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/br22";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network/ifcfg-br22"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br22"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 30.5.106.8 /etc/network/interfaces.d/br22";else echo "Sorry,this is not supported os"; fi
check:output=~30.5.106.8
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-br33"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "grep 40.5.106.8 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
check:output=~40.5.106.8
check:rc==0
cmd:xdsh $$CN "ls /sys/class/net"
@ -916,10 +916,10 @@ check:output=~br33
cmd:xdsh $$CN "cat /sys/class/net/bonding_masters"
check:output=~bond0
cmd:rmdef -t network -o 11_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$SECONDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$SECONDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$SECONDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 12_1_0_0-255_255_0_0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-$$THIRDNIC"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-$$THIRDNIC"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/$$THIRDNIC";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:rmdef -t network -o 30_5_0_0-255_255_0_0
cmd:xdsh $$CN "ip addr del 30.5.106.8/16 dev br22"
@ -932,11 +932,11 @@ cmd:xdsh $$CN "ip link del dev bond0.3"
cmd:xdsh $$CN "ip link del dev bond0"
cmd:xdsh $$CN "ip addr del 11.1.0.100/16 dev $$SECONDNIC"
cmd:xdsh $$CN "ip addr del 12.1.0.100/16 dev $$THIRDNIC"
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0.2 /etc/sysconfig/network-scripts/ifcfg-bond0.3 /etc/sysconfig/network-scripts/ifcfg-br22 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2 /etc/sysconfig/network/ifcfg-bond0.3 /etc/sysconfig/network/ifcfg-br22 /etc/sysconfig/network/ifcfg-br33"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "rm -rf /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond0.2 /etc/sysconfig/network-scripts/ifcfg-bond0.3 /etc/sysconfig/network-scripts/ifcfg-br22 /etc/sysconfig/network-scripts/ifcfg-br33"; elif grep Ubuntu /etc/*release;then xdsh $$CN "rm -rf /etc/network/interfaces.d/bond0 /etc/network/interfaces.d/bond0.2 /etc/network/interfaces.d/bond0.3 /etc/network/interfaces.d/br22 /etc/network/interfaces.d/br33";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
end
@ -948,8 +948,8 @@ check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/backupnet/"
cmd:xdsh $$CN "mkdir -p /tmp/backupnet/"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep "Red Hat" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/";else echo "Sorry,this is not supported os"; fi
cmd:if grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "yum -y install bridge-utils";fi
cmd:mkdef -t network -o 30_5_0_0-255_255_0_0 net=30.5.0.0 mask=255.255.0.0
check:rc==0
cmd:mkdef -t network -o 40_5_0_0-255_255_0_0 net=40.5.0.0 mask=255.255.0.0
@ -969,7 +969,7 @@ cmd:xdsh $$CN "ip link del dev bond0.3"
cmd:xdsh $$CN "ip link del dev bond0"
cmd:if [ -e /tmp/CN.standa ]; then rmdef $$CN; cat /tmp/CN.standa | mkdef -z; rm -rf /tmp/CN.standa; fi
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
end
@ -980,7 +980,7 @@ cmd:lsdef $$CN -z && lsdef -l $$CN -z >/tmp/CN.stanza
check:rc==0
cmd:xdsh $$CN "mkdir -p /tmp/backupnet"
check:rc==0
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network/ifcfg-* /tmp/backupnet/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /etc/sysconfig/network-scripts/ifcfg-* /tmp/backupnet/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /etc/network/interfaces.d/* /tmp/backupnet/;cp -f /etc/network/interfaces /tmp";else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:xdsh $$CN "ps -A --format pid,comm | awk '/dhclient/ { print \$1 }' | xargs -r -n 1 kill"
cmd:xdsh $$CN "ps -A --format pid,comm | awk '/dhclient/ { print \$1 }' | xargs -r -n 1 kill -KILL"
@ -992,7 +992,7 @@ cmd:xdsh $$CN date
check:rc==0
# Clean up
cmd:test -e /tmp/CN.stanza && rmdef $$CN && mkdef -z </tmp/CN.stanza; rm -rf /tmp/CN.stanza
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep "Red Hat" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network/"; elif grep -E "Red Hat|CentOS" /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/sysconfig/network-scripts/"; elif grep Ubuntu /etc/*release;then xdsh $$CN "cp -f /tmp/backupnet/* /etc/network/interfaces.d/;cp -f /tmp/interfaces /etc/network/";else echo "Sorry,this is not supported os"; fi
cmd:xdsh $$CN "rm -rf /tmp/backupnet/ /tmp/interfaces"
cmd:xdsh $$CN "if [ -f /etc/init.d/network ] ; then /etc/init.d/network restart ; elif [ -f /etc/init.d/networking ] ; then /etc/init.d/networking restart ; fi"
end

View File

@ -5,16 +5,126 @@
#check:rc!=0
#check:output=~Usage
#end
start:lsvm_node
label:others,hctrl_hmc
hcp:hmc,ivm
cmd:lsvm $$CN
check:rc==0
check:output=~name=$$CN
end
start:lsvm_err_node
label:others,hctrl_hmc
cmd:lsvm testnode
check:rc!=0
check:output=~Error
end
start:lsvm
description:lsvm without any flag
label:mn_only,ci_test
cmd:lsvm
check:output=~Usage
end
start:lsvm_h
description:lsvm help information
label:mn_only,ci_test
cmd:lsvm -h
check:output=~Usage
cmd:lsvm --help
check:output=~Usage
end
start:lsvm_a
description:lsvm -a/--all could work as design, to display all the information for the vm
label:others,hctrl_kvm
cmd:rpower $$CN on
cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
check:ouptut=~Running|on
cmd:lsvm $$CN
check:rc==0
check:output=~$$CN: Id:\s*\w+
check:output=~$$CN: Host:\s*\w+
check:output=~$$CN: OS:\s*\w+
check:output=~$$CN: Memory:\s*\w+
check:output=~$$CN: CPU:\s*\w+
check:output=~$$CN: State:\s*\w+
check:output=~$$CN: Disk\s*\w+
cmd:lsvm $$CN -a
check:rc==0
check:output=~$$CN: Id:\s*\w+
check:output=~$$CN: Host:\s*\w+
check:output=~$$CN: OS:\s*\w+
check:output=~$$CN: Memory:\s*\w+
check:output=~$$CN: CPU:\s*\w+
check:output=~$$CN: State:\s*\w+
check:output=~$$CN: Disk\s*\w+
cmd:lsvm $$CN --all
check:rc==0
check:output=~$$CN: Id:\s*\w+
check:output=~$$CN: Host:\s*\w+
check:output=~$$CN: OS:\s*\w+
check:output=~$$CN: Memory:\s*\w+
check:output=~$$CN: CPU:\s*\w+
check:output=~$$CN: State:\s*\w+
check:output=~$$CN: Disk\s*\w+
end
start:lsvm_noderange
description:lsvm noderagen could work as design, to display the information for all nodes in noderange
label:others,hctrl_kvm
cmd:rpower $$CN on
cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
cmd:rpower $$CN stat
check:ouptut=~Running|on
cmd:rpower $$SN on
cmd:a=0;while ! `rpower $$SN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
cmd:rpower $$SN stat
check:ouptut=~Running|on
cmd:lsvm $$CN,$$SN
check:rc==0
check:output=~$$CN: Id:\s*\w+
check:output=~$$CN: Host:\s*\w+
check:output=~$$CN: OS:\s*\w+
check:output=~$$CN: Memory:\s*\w+
check:output=~$$CN: CPU:\s*\w+
check:output=~$$CN: State:\s*\w+
check:output=~$$CN: Disk\s*\w+
check:output=~$$SN: Id:\s*\w+
check:output=~$$SN: Host:\s*\w+
check:output=~$$SN: OS:\s*\w+
check:output=~$$SN: Memory:\s*\w+
check:output=~$$SN: CPU:\s*\w+
check:output=~$$SN: State:\s*\w+
check:output=~$$SN: Disk\s*\w+
end
start:lsvm_kvmhost
description:lsvm could give out the kvm host information. This case should be run on a mn which has kvm host defined.In this case, $$CN should be a kvm host.
label:others,hctrl_kvm
cmd:lsvm $$CN
check:output=~$$CN
end
start:lsvm_mixed_vm_defined_and_not
description:lsvm could give out the defined vm information.In this case, $$CN is a defined vm, vmnode is not defined in database.
label:others,hctrl_kvm
cmd:lsvm $$CN,vmnode
check:output=~Error: Invalid nodes and/or groups in noderange: vmnode
check:rc!=0
end
start:lsvm_mixed_vm_running_and_off
description:lsvm noderagen could work as design, to display the information for all nodes in noderange
label:others,hctrl_kvm
cmd:rpower $$CN off
cmd:a=0;while ! `rpower $$CN stat|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
cmd:rpower $$CN stat
check:ouptut=~Not Activated|off
cmd:rpower $$SN on
cmd:a=0;while ! `rpower $$SN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
cmd:rpower $$SN stat
check:ouptut=~Running|on
cmd:lsvm $$CN,$$SN
check:output=~$$SN: Id:\s*\w+
check:output=~$$SN: Host:\s*\w+
check:output=~$$SN: OS:\s*\w+
check:output=~$$SN: Memory:\s*\w+
check:output=~$$SN: CPU:\s*\w+
check:output=~$$SN: State:\s*\w+
check:output=~$$SN: Disk\s*\w+
check:output=~$$CN: \s*Could not get any information about specified object
check:rc==0

View File

@ -70,5 +70,11 @@ cmd:rm -f /tmp/testnetworks
cmd:rm -f /tmp/inetworktest1
end
start:makenetworks_netname_exist
os:Linux
description:test makenetworks works as design when netname exists.
label:others,network
cmd:netname=`lsdef -t network |cut -d" " -f1 |sed -n '1p'`;makenetworks $netname
check:rc==0
check:output=~(already exists)
end

View File

@ -159,6 +159,52 @@ check:output=~gateway=1.2.3.1
cmd:rmdef -t network testnetwork
end
start:mkdef_netname_exist
os:Linux
description:test mkdef works as design when netname exists.
label:mn_only,ci_test,db
cmd:netname=`lsdef -t network |cut -d" " -f1 |sed -n '1p'`;mkdef -t network -o $netname
check:rc==1
end
start:mkdef_netname_notexist_without_net_mask
os:Linux
description:test mkdef works as design when net and mask is not defined.
label:mn_only,ci_test,db
cmd:mkdef -t network -o testnetworkwithoutnetandmask
check:rc!=0
check:output=~Error
cmd:mkdef -t network -o testnetworkwithoutnetandmask mtu=1500
check:rc!=0
check:output=~Net or mask value should not be empty
cmd:mkdef -t network -o testnetworkwithoutnetandmask net=10.0.0.0 mtu=1500
check:rc!=0
check:output=~Net or mask value should not be empty
cmd:mkdef -t network -o testnetworkwithoutnetandmask mask=255.0.0.0 mtu=1500
check:rc!=0
check:output=~Net or mask value should not be empty
cmd:mkdef -t network -o testnetworkwithoutnetandmask net=100.0.0.1 mask=255.0.0.0 mtu=1500
check:rc==0
check:output=~1 object definitions have been created or modified
cmd:lsdef -t network -z testnetworkwithoutnetandmask |tee /tmp/testnetworkwithoutnetandmask.stanza
check:rc==0
cmd:cat /tmp/testnetworkwithoutnetandmask.stanza|mkdef -z
check:rc!=0
check:output=~(already exists)
cmd:rmdef -t network testnetworkwithoutnetandmask
check:rc==0
end
start:mkdef_networks_if_net_mask_exists
os:Linux
description:test makenetworks works as design when net and mask exists. The network could not be created since net and mask are
the same.
label:mn_only,ci_test,db
cmd:netname=`lsdef -t network |cut -d" " -f1 |sed -n '1p'`;net=`lsdef -t network -o $netname |grep -i net |awk -F = '{print $2}'`;mask=`lsdef -t network -o $netname |grep -i mask |awk -F = '{print $2}'`;mkdef -t network -o testnetworkwithnetandmask net=$net mask=$mask
check:rc!=0
check:output=~(already exists)
end
start:mkdef_t_o_error
description:mkdef -t wrongtype
label:mn_only,ci_test,db

View File

@ -197,3 +197,23 @@ check:output=~Error: (\[.*?\]: )?[Uu]nsupported command[:]* rpower ddd
check:rc==1
end
start:rpower_off_on
description:This case is to test off and on option could work for a diskful node. This case is do task 82, for bug 4132, the node status cannot be updated on normal system reboot #4138.
Attribute: $$CN-The operation object of rpower command
label:others,hctrl_general
cmd:rpower $$CN stat
check:output=~Running|on
cmd:lsdef -l $$CN -i status
check:output=~booted
cmd:rpower $$CN off
check:rc==0
cmd:a=0;while ! `rpower $$CN stat|grep "Not Activated\|off" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
cmd:rpower $$CN on
check:rc==0
cmd:a=0;while ! `rpower $$CN stat|grep "Running\|on" >/dev/null`; do sleep 5;((a++));if [ $a -gt 11 ];then break;fi done
cmd:rpower $$CN stat
check:output=~Running|on
cmd:a=0;while ! `lsdef -l $$CN -i status|grep "booted" >/dev/null`; do sleep 5;((a++));if [ $a -gt 50 ];then break;fi done
cmd:lsdef -l $$CN -i status|grep "booted"
check:rc==0
end

View File

@ -0,0 +1,92 @@
start:backend
description: verify xcat-inventory backend operations
label:others,inventory_ci
cmd: rm -rf /tmp/backend_test/
cmd:rm -rf ~/.xcatinv/inventory.cfg.bak.backend_init
check: rc==0
cmd: [ -f ~/.xcatinv/inventory.cfg ] && mv ~/.xcatinv/inventory.cfg ~/.xcatinv/inventory.cfg.bak.backend_init
cmd: cp /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/inventory.cfg ~/.xcatinv/inventory.cfg
cmd: xcat-inventory init
check: rc==0
check: output=~configuring backend dir
check: output=~xcat-inventory backend initialized
cmd: xcat-inventory init
check: rc==0
check: output=~Backend has already been initialized, do nothing
cmd: cd /tmp/backend_test/git/repo && git config --local --get user.name
check: output=~ci
cmd: cd /tmp/backend_test/git/repo && git config --local --get user.email
check: output=~xcat@xcat.org
cmd: cd /tmp/backend_test/git/repo && git config --local --get diff.tool
check: output=~invdiff
cmd: cd /tmp/backend_test/git/repo && git config --local --get difftool.invdiff.cmd
check: output=~xcat-inventory diff --filename
cmd: xcat-inventory workspace-list
check: rc==0
check: output=~master
cmd: XCATBYPASS=1 dumpxCATdb -p /tmp/backend_test/backup/db
check: rc==0
cmd: XCATBYPASS=1 rmdef -a -f
check: rc==0
cmd: xcat-inventory import -d /opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/templates/testcluster_backend
check: rc==0
cmd:xcat-inventory commit -m "Rev1" Rev1
check: rc==0
check: output=~creating revision Rev1 in workspace
cmd:xcat-inventory revlist
check:rc==0
check: output=~Rev1
cmd:xcat-inventory revlist Rev1
check:rc==0
check: output=~cluster.yaml
check: output=~definition.yaml
check: output=~Tagger:
cmd:chdef -t site -o clustersite xcatdebugmode=2
check: rc==0
cmd:rmdef -t node -o nodetorm
check: rc==0
cmd:mkdef -t osimage -o osimage3 --template osimage1
check: rc==0
cmd: xcat-inventory diff
check: rc==0
check: output=~\+ xcatdebugmode\: \'2\'
check: output=~\+ osimage3\:
check: output=~\- nodetorm\:
cmd: xcat-inventory commit Rev2
check: rc==0
cmd: xcat-inventory checkout Rev1
check: rc==0
check: output=~checked out to revision Rev1
cmd: xcat-inventory whereami
check: rc==0
check: output=~you are in revision \"Rev1\" of workspace \"master\"
cmd: xcat-inventory workspace-new ws
check: rc==0
cmd:
check: output=~workspace ws created
cmd: xcat-inventory workspace-list
check: rc==0
check: output=~ws
cmd: xcat-inventory workspace-checkout ws
check: rc==0
cmd: xcat-inventory workspace-delete ws
check: rc==0
check: output=~deleted workspace ws
cmd: xcat-inventory workspace-list
check: rc==0
check: output!=~ws
cmd: XCATBYPASS=1 restorexCATdb -p /tmp/backend_test/backup/db
check: rc==0
cmd: [ -f "~/.xcatinv/inventory.cfg.bak.backend_init" ] && rm -rf "~/.xcatinv/inventory.cfg" && mv "~/.xcatinv/inventory.cfg.bak.backend_init" "~/.xcatinv/inventory.cfg"
cmd: rm -rf /tmp/backend_test/
end

View File

@ -1,7 +1,7 @@
start:import_osimage_with_environments_in_yaml
description:this case is to verify if osimage import could support environment variables.
os:Linux
label:others,inventory_ci,invoke_provision
label:others,invoke_provision
cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
check:rc==0

View File

@ -1,6 +1,6 @@
start:export_import_osimage_with_INCLUDE_in_file
description:This case is used to test xcat-inventory export and import one linux osimage definition which has INCLUDE in the attribute's specified files. The attributes are pkglist, otherpkglist,exlist,synclists,template,postinstall and partitionfile.
label:others,xcat_inventory
label:others,inventory_ci
cmd:dir="/tmp/imagedata/";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir
check:rc==0
cmd:dir="/tmp/imagedata/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir

View File

@ -2051,7 +2051,7 @@ check:rc==0
end
start:import_validation_node_device_type
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "device_type" attribute
cmd:mkdir -p /tmp/import_validation_node_device_type_bak
check:rc==0
@ -2414,7 +2414,7 @@ end
start:import_validation_node_role
label:others,xcat_inventory
label:others,inventory_ci
descrroletion:This case is used to test node validation function of xcat-inventory import yaml and json file. To test "role" attribute
cmd:mkdir -p /tmp/import_validation_node_role_bak
check:rc==0
@ -2424,8 +2424,8 @@ cmd:lsdef -t group bogusgroup > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef -t
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role" "compute" "/tmp/import_validation_node_role"
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role" "service" "/tmp/import_validation_node_role"
check:rc!=0
#cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role" "service" "/tmp/import_validation_node_role"
#check:rc!=0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role" "" "/tmp/import_validation_node_role"
check:rc!=0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/xcat_inventory/validatehelper "node" "bogusnode" "role" "Compute" "/tmp/import_validation_node_role"

View File

@ -995,7 +995,7 @@ cmd:file="/tmp/partitionfile"; rm -rf $file; if [ -d ${file}".bak" ];then mv ${f
end
start:export_import_multiple_osimages_by_dir
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory export and import several linux osimages definition by dir.
cmd:if [ -e /tmp/otherpkglist ]; then cp -f /tmp/otherpkglist /tmp/otherpkglist.bak; fi
cmd:echo "test" >> /tmp/otherpkglist
@ -1071,6 +1071,7 @@ check:rc==0
cmd: rmdef -t osimage -o test_myimage1,test_myimage2
check:rc==0
cmd:rm -rf /tmp/otherpkglist /tmp/synclists /tmp/postinstall /tmp/exlist /tmp/partitionfile /tmp/pkglist /tmp/template
cmd: tree /opt/inventory/site
cmd:xcat-inventory import -t osimage -o test_myimage1,test_myimage2 -d /opt/inventory/site
check:rc==0
check:output=~The object test_myimage1 has been imported
@ -1127,15 +1128,15 @@ cmd:file="/opt/xcat/share/xcat/install/rh/template"; rm -rf $file; if [ -d ${fil
end
start:export_import_all_osimages_by_dir
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory export and import all linux osimage definition by files.
cmd:lsdef -t osimage -z | tee /tmp/osimage.list
check:rc==0
#backup all osimage
cmd:if [ -e /tmp/osimages ]; then cp -f /tmp/osimages /tmp/osimages.bak ; else mkdir -p /tmp/osimages; fi
cmd:imgdir='/tmp/osimages';for img in $(lsdef -t osimage -s|awk -F' ' '{print $1}'); do lsdef -t osimage -o $img -z > $imgdir/${img}.stanza;done
cmd:imgdir='/tmp/osimages';for img in $(lsdef -t osimage -s|grep '(osimage)'|awk -F' ' '{print $1}'); do lsdef -t osimage -o $img -z > $imgdir/${img}.stanza;done
check:rc==0
cmd:for img in $(lsdef -t osimage -s|awk -F' ' '{print $1}');do rmdef -t osimage -o $img;done
cmd:for img in $(lsdef -t osimage -s|grep '(osimage)'|awk -F' ' '{print $1}');do rmdef -t osimage -o $img;done
check:rc==0
cmd:if [ -e /tmp/otherpkglist ]; then cp -f /tmp/otherpkglist /tmp/otherpkglist.bak; fi
cmd:echo "test" >> /tmp/otherpkglist
@ -1264,12 +1265,12 @@ cmd:if [ -e /tmp/osimages.bak ]; then mv -f /tmp/osimages.bak /tmp/osimages; fi
end
start:export_import_osimages_by_dir_with_c
label:others,xcat_inventory
label:others,inventory_ci
description:This case is used to test xcat-inventory export and import linux osimage definition witch -c option.
cmd:dir="/tmp/export";if [ -e "${dir}" ];then mv ${dir} ${dir}".bak"; fi; mkdir -p $dir
cmd:imgdir='/tmp/export';for img in $(lsdef -t osimage -s|awk -F' ' '{print $1}'); do lsdef -t osimage -o $img -z > $imgdir/${img}.stanza;done
cmd:imgdir='/tmp/export';for img in $(lsdef -t osimage -s|grep '(osimage)'|awk -F' ' '{print $1}'); do lsdef -t osimage -o $img -z > $imgdir/${img}.stanza;done
check:rc==0
cmd:for img in $(lsdef -t osimage -s|awk -F' ' '{print $1}');do rmdef -t osimage -o $img;done
cmd:for img in $(lsdef -t osimage -s|grep '(osimage)'|awk -F' ' '{print $1}');do rmdef -t osimage -o $img;done
check:rc==0
cmd:chdef -t osimage -o test_myimage1,test_myimage2,test_myimage3 imagetype=linux provmethod=install
check:rc==0

View File

@ -1,6 +1,6 @@
start:export_import_an_osimage_directory
description: import an osimage diretory with `xcat-inventroy import -d <osimage directory>`
label:others,xcat_inventory
label:others,inventory_ci
#backup any existing test_myimage
cmd:mkdir -p /tmp/export_import_an_osimage_directory/backup
check:rc==0

View File

@ -0,0 +1,8 @@
[backend]
type = 'git'
user = ci
workspace="master"
[InfraRepo]
local_repo='/tmp/backend_test/git/repo'
working_dir=.

View File

@ -22,8 +22,8 @@
"noderesnimserver": "nimserver",
"noderesprimarynic": "primarynic",
"noderesproxydhcp": "supportproxydhcp",
"servicenodeftpserver": "setupftp",
"servicenodenimserver": "setupnim",
# "servicenodeftpserver": "setupftp",
# "servicenodenimserver": "setupnim",
"storagecontroller": "storagcontroller",
"storageosvolume": "osvolume",
"storagetype": "storagetype",

View File

@ -21,8 +21,8 @@ node:
noderesnimserver: nimserver
noderesprimarynic: primarynic
noderesproxydhcp: supportproxydhcp
servicenodeftpserver: setupftp
servicenodenimserver: setupnim
# servicenodeftpserver: setupftp
# servicenodenimserver: setupnim
storagecontroller: storagcontroller
storageosvolume: osvolume
storagetype: storagetype

View File

@ -0,0 +1,124 @@
network:
prov:
basic_attr:
gateway: 10.6.7.1
mask: 255.0.0.0
net: 10.6.7.0
node:
nodetorm:
device_type: server
obj_info:
groups: all
obj_type: node
role: compute
node2:
device_type: server
obj_info:
groups: all
obj_type: node
role: compute
xcatdefaults:
device_type: server
engines:
netboot_engine:
engine_info:
postbootscripts: otherpkgs
postscripts: syslog,remoteshell,syncfiles
obj_type: group
role: compute
passwd:
ipmi:
password: admin
username: ADMIN
omapi:
password: MnJKd01IWGtzYUNoY3FWZ29mRkdFcFhkbnBRNlBtYmg=
username: xcat_key
switch:
password: admin
username: root
system:
password: cluster
username: root
policy:
'1':
name: root
rule: allow
'1.2':
name: xcatmn
rule: trusted
'2':
commands: getbmcconfig
rule: allow
'2.1':
commands: remoteimmsetup
rule: allow
'2.3':
commands: lsxcatd
rule: allow
'3':
commands: nextdestiny
rule: allow
'4':
commands: getdestiny
rule: allow
'4.4':
commands: getpostscript
rule: allow
'4.5':
commands: getcredentials
rule: allow
'4.6':
commands: syncfiles
rule: allow
'4.7':
commands: litefile
rule: allow
'4.8':
commands: litetree
rule: allow
'4.9':
commands: getadapter
rule: allow
route: {}
schema_version: '2.0'
site:
clustersite:
SNsyncfiledir: /var/xcat/syncfiles
auditnosyslog: '0'
auditskipcmds: ALL
blademaxp: '64'
cleanupxcatpost: 'no'
consoleondemand: 'no'
databaseloc: /var/lib
db2installloc: /mntdb2
dhcplease: '43200'
dnshandler: ddns
enableASMI: 'no'
forwarders: 10.6.29.1,10.0.0.101
fsptimeout: '0'
installdir: /install
ipmimaxp: '64'
ipmiretries: '3'
ipmitimeout: '2'
master: 10.6.7.1
maxssh: '8'
nameservers: 10.6.7.1
nodesyncfiledir: /var/xcat/node/syncfiles
powerinterval: '0'
ppcmaxp: '64'
ppcretry: '3'
ppctimeout: '0'
sharedtftp: '1'
sshbetweennodes: ALLGROUPS
syspowerinterval: '0'
tftpdir: /tftpboot
timezone: Universal
useNmapfromMN: 'no'
vsftp: n
xcatconfdir: /etc/xcat
xcatdport: '3001'
xcatiport: '3002'
xcatsslversion: TLSv1
zone: {}
#Version 2.14.5 (git commit fc0fb3fca198aa298a114f6124749275e7d81f8c, built Thu Dec 6 22:20:43 EST 2018)

View File

@ -0,0 +1,11 @@
credential:
credential:
CA:
certificate: /etc/xcat/ca/ca-cert.pem
private_key: /etc/xcat/ca/private/ca-key.pem
client:
root: /root/.xcat/client-cred.pem
server: /etc/xcat/cert/server-cred.pem
schema_version: '2.0'
#Version 2.14.5 (git commit fc0fb3fca198aa298a114f6124749275e7d81f8c, built Thu Dec 6 22:20:43 EST 2018)

View File

@ -0,0 +1,9 @@
osimage:
osimage1:
basic_attributes:
distribution: rh8
imagetype: linux
provision_mode: netboot
schema_version: '2.0'
#Version 2.14.5 (git commit fc0fb3fca198aa298a114f6124749275e7d81f8c, built Thu Dec 6 22:20:43 EST 2018)

View File

@ -0,0 +1,9 @@
osimage:
osimage2:
basic_attributes:
distribution: sles15
imagetype: linux
provision_mode: netboot
schema_version: '2.0'
#Version 2.14.5 (git commit fc0fb3fca198aa298a114f6124749275e7d81f8c, built Thu Dec 6 22:20:43 EST 2018)

View File

@ -10,7 +10,7 @@ check:output=~Active: active \(running\)|xcatd service is running
cmd:ps axjf |grep -v grep |grep "xcatd:" | tee /tmp/xcatd_start/original_xcatd_processes_status
check:rc==0
cmd:cat /tmp/xcatd_start/original_xcatd_processes_status |wc -l
check:output=~6
#check:output=~6
cmd:service xcatd stop
check:rc==0
cmd:sleep 3