disy/jSCSI — pull request #2 by igeekinc (2012-04-02 11:05:12+00:00)
Title: Updates for multiple Targets

Hi Sebastian,

These are the changes I made to handle multiple targets. I got a little aggressive in the refactoring. I renamed "Target.java" to be "TargetServer.java" and made a new Target.java class for the iSCSI targets. I removed the static references to Target(now TargetServer) and TargetConfiguration.

I added some code to TargetServer to allow on-the-fly addition/removal of iSCSI targets. It still needs to check to see if there are any active connections before allowing you to remove a target.

I had to change the schema to allow for multiple targets. I'm not super familiar with schemas and I couldn't figure out a way to have it allow multiple Target nodes and require a Port and AllowSloppyNegotiation at the same level, so I split it into a TargetList and GlobalConfiguration node.

Cheers,
Dave