Various NetApp drivers were treating the lun_id as a string
rather than an int. This was causing attempts to mount NetApp
volumes to Hyper-V nodes to fail as they were checking an integer
type against a unicode type which would fail.
This change casts result_lun to an integer after the value has
gone through the ssh injection attack check. This way Hyper-V
is able to verify if the found LUN is the target LUN, enabling
mounting of NetApp volumes to Hyper-V.
This change also refactors initialize_connection into some helper
methods so as to enable simpler unit testing of the patchset.
Closes-bug: 1372808
Change-Id: I308b3b2dff315ec33451fb45a30ecd53d5d4c353
(cherry picked from commit:2d0204ff3ca3a7d42fac5722d577e18edd34ea83)
Reviewed: https:/ /review. openstack. org/143597 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=ae717b16c1b 38ca3ffbbd5f01a 7648682f41d54b
Committed: https:/
Submitter: Jenkins
Branch: stable/juno
commit ae717b16c1b38ca 3ffbbd5f01a7648 682f41d54b
Author: Rushil Chugh <email address hidden>
Date: Fri Dec 19 01:03:13 2014 -0500
Ensure that lun_id is an int for NetApp Drivers
Various NetApp drivers were treating the lun_id as a string
rather than an int. This was causing attempts to mount NetApp
volumes to Hyper-V nodes to fail as they were checking an integer
type against a unicode type which would fail.
This change casts result_lun to an integer after the value has
gone through the ssh injection attack check. This way Hyper-V
is able to verify if the found LUN is the target LUN, enabling
mounting of NetApp volumes to Hyper-V.
This change also refactors initialize_ connection into some helper
methods so as to enable simpler unit testing of the patchset.
Closes-bug: 1372808
Change-Id: I308b3b2dff315e c33451fb45a30ec d53d5d4c353 2d0204ff3ca3a7d 42fac5722d577e1 8edd34ea83)
(cherry picked from commit: