$logger->info("create zone on the switch $ip using zonecreate");
($out,$err) = $ssh->capture2("zonecreate \"test1\", \"20:00:00:11:0d:34:56:00\"");
$ssh->error and
die "remote find command failed: $!" . $ssh->error;
($out,$err)=$ssh->capture2("zoneshow");
($out,$err) = $ssh->capture2("cfgadd \"FC_DVT\", \"test1\"");
$ssh->error and
die "remote find command failed: $!" . $ssh->error;
($out,$err) = $ssh->capture2("{stdin_data =>yes},cfgsave");
$ssh->error and
die "remote find command failed: $!" . $ssh->error;
####
DS_6505B:admin> zonecreate "test1","20:00:00:11:0d:34:56:00"
DS_6505B:admin> cfgadd "FC_DVT","test1"
DS_6505B:admin> cfgsave
WARNING!!!
The changes you are attempting to save will render the
Effective configuration and the Defined configuration
inconsistent. The inconsistency will result in different
Effective Zoning configurations for switches in the fabric if
a zone merge or HA failover happens. To avoid inconsistency
it is recommended to commit the configurations using the
'cfgenable' command.
Do you want to proceed with saving the Defined
zoning configuration only? (yes, y, no, n): [no] y
Updating flash ...
DS_6505B:admin> cfgenable FC_DVT
You are about to enable a new zoning configuration.
This action will replace the old zoning configuration with the
current configuration selected. If the update includes changes
to one or more traffic isolation zones, the update may result in
localized disruption to traffic on ports associated with
the traffic isolation zone changes
Do you want to enable 'FC_DVT' configuration (yes, y, no, n): [no] y
zone config "FC_DVT" is in effect
Updating flash ...
####
the error i get when i run is like this,
2015/07/28 04:10:31 zoneshow successful
2015/07/28 04:10:34 create zone on the switch 10.227.0.216 using zonecreate
remote find command failed: child exited with code 1 at ./switchconfig.pl line 113, <$fh> line 4.