I am planning an installation that will add thousands of zones to a director, and I want to see if anyone has a better way of doing this than my current plan. Thousands of CLI commands are generated by the a script that also does the masking on the storage. Unlike my storage, however, Brocade directors have sessions- you have to log into the switch and enter the commands interactively. If you get disconnected, you lose all the work, unless you've run a cfgsave. If you're entering them by copy-pasting from the buildfile, if you put too many in your buffer (at least in putty), sometimes commands get corrupted or lost.
On every other machine in my environment, I can issue noninteractive commands (like "create a lun of this size on this pool", or "allocate this LUN to that hostgroup on this port") one at a time with ssh. Is there a way to do this for zoning commands in FOS 7.x? I think every time the ssh command completes all the lines I've fed it and returns me to my server's shell, the switch discards all the work that was done unless I've done a cfgsave. And cfgsave asks for operator interaction, so can't be sent along with the alicreates, zonecreates, and cfgadds.
What tools do you have ?
If you Have Brocade network advisor, you may tweak a configuration file ang generate one with your zones and import it to the fabric.
If you have a linux box, you may use a python script with ssh module and do the work, or if do not want to use python, you may simply use expect, but i prefer the python approach, because you can add more "intelligence" to the solution.
another solution, but less elegant is to use a software called autohotkey (for windows) and perform macro operations to cut and paste each zone at a time from a text file, or excel spreadsheet.
as you can see, there are many ways to do that, just choose one that fits your needs and efforts.
I'm using AIX, and perl instead of python. That said, the script you seem to be describing would be something that would do all the commands in an interactive shell? I could probably write that.
That said, zoning shouldn't require an interactive session.
@Anonymous wrote:I'm using AIX, and perl instead of python. That said, the script you seem to be describing would be something that would do all the commands in an interactive shell? I could probably write that. That said, zoning shouldn't require an interactive session.
Hi Canadian Storage Guy!
So you have the best tools in your hand!
You are right, just keep in mind that you must have an interective session opened, because if not, you will get that weird "thats not a typewriter" message from the server.