We have the driver broken into 2 files:
hp_3par_common.py and
hp_3par_iscsi.py
The reason we do this is because we have a fibre channel driver
that will be submitted shortly after this is committed. The
fibre channel driver and the iscsi driver share a lot of the same
code that talks to the 3PAR array for provisioning. So,
it made sense not to have duplicate code. The fibre channel driver
will be dependent on the fibre channel support I am actively working
on for nova/cinder grizzly release.
The driver uses a 2 mechanisms to talk to the 3PAR array:
1) a python REST client (hp3parclient) that lives in the pypi
repository here:
http://pypi.python.org/pypi/hp3parclient
2) SSH. We had to pull in some of the ssh code from the base san
driver to help fix an issue with executing commands on the 3PAR
array. The 3PAR has the ability to turn on CSV output for command
results, which makes this easier to parse. Unfortunately, there
is no way to turn CSV mode on permanently for all ssh requests.
So, we have to turn on the CSV output for every single ssh command
issued. Since we use ssh as well, we require the san_* options
to be set.
We use a dual mechianism because the REST API that ships with the 3.1.2
firmware doesn't support all of the capabilities a cinder driver needs
to export volumes.
When a newer version of the firmware comes out that supports host
management on the 3PAR array, then we will get rid of the SSH code.