Brocade Fibre Channel Networking Community

Expand all | Collapse all

FOS 7. How to combine multiple command in one string (alicreate;zonecreate;cfgsave)?

  • 1.  FOS 7. How to combine multiple command in one string (alicreate;zonecreate;cfgsave)?

    Posted 02-06-2015 04:15 AM

    Hello friends.
    Now I haven't any Brocade equipment in my hand, but soon I will create a lot of zones on Brocade 6505.
    I wish combine in one string next command:
    alicreate "Name", "WWN"
    zonecreate "Zonename", "Alias1;Alias2; Alias3"
    cfgadd "cfg_Configname", "Zonename1; Zonename2"

     

    I wish to combine it in notepad and after just insert in Brocade CLI, like in Linux (date;ls -alh;).


    #BrocadeFibreChannelNetworkingCommunity


  • 2.  Re: FOS 7. How to combine multiple command in one string (alicreate;zonecreate;cfgsave)?

    Posted 02-08-2015 04:03 AM

    hi,

     

    Brocade FOS allowes to concatenate commands just like a linux server, so you won't have problems with that.

     

    Rgds,

    Felipon


    #BrocadeFibreChannelNetworkingCommunity


  • 3.  Re: FOS 7. How to combine multiple command in one string (alicreate;zonecreate;cfgsave)?

    Posted 02-10-2015 05:55 AM
    you can combine all the commands you like, and the way to do it is exactly the same as you suggest:

    alicreate "Name", "WWN"; zonecreate "Zonename", "Alias1;Alias2; Alias3"; cfgadd "cfg_Configname", "Zonename1; Zonename2"

    but... i had issues when copying and pasting long series of the commands like that. it looks like some further commands could be "discarded" while some recent commands are being executed. and this could crash the entire scenario. obviously, you'll not be able to create a zone with an alias which description was skipped.

    when FOS was based on vxworks, i had to use something like "expect" utility which is able to open "interactive" telnet connection and send the commands one after another, waiting for the command prompt in between.

    now when FOS is a linux, there's a much easier way to work around this. you can login as root, download the script you created with all your commands from the ftp server (the one you normally use for firmwaredownloads and configuploads) make this script executable and launch directly in the shell prompt of on the switch.
    #BrocadeFibreChannelNetworkingCommunity