I need help on configuring the brocade switch,I am able to execute simple commands to check the config,but I fail when their is some interactive options,like I have to save the config on the switch by passing yes or y to save it
the code is here below
$logger->info("create zone on the switch $ip using zonecreate"); ($out,$err) = $ssh->capture2("zonecreate \"test1\", \"20:00:00:11:0d:3 +4: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;
switch commands should execute as follows
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 ...
Iam having issue in executing the above commands
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 zonec +reate remote find command failed: child exited with code 1 at ./switchconfig +.pl line 113, <$fh> line 4.
In reply to issue with code to save config on brocade switch by janasec
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |