Export cinder volumes only if the status is 'in-use'
Export cinder volumes only if the status is 'in-use'

Currently, cinder volumes are exported both 'in-use' and 'available'
after restarting cinder-volume service.
This behavior was introduced following commit.

  commit ffefe18334a9456250e1b6ff88b7b47fb366f374
  Author: Zhiteng Huang <zhithuang@ebaysf.com>
  Date: Sat Aug 23 18:32:57 2014 +0000

If the volumes are attached to nova instances, they should be exported
via tgtd after restarting cinder-volume.
But the volumes which are not attached to instances must not be exported
because everyone can connect these volumes.

This patch changes volume export behavior that exports a volume only if
the volume status is 'in-use'.

Change-Id: I4c598c240b9290c81bd8001e5a0720c8c329aeb9
Signed-off-by: Mitsuhiro Tanino <109b7a6ea55e8de32c1b9247cf119d1ef919f6ce@hds.com>
Closes-bug: #1381106
(cherry picked from commit e2f28b967910625432be0eab6a851adf53ac58ea)

ge0rgi/cinder,dims/cinder,apporc/cinder,manojhirway/ExistingImagesOnNFS,NetApp/cinder,tlakshman26/cinder-https-changes,tlakshman26/cinder-bug-fix-volume-conversion-full,tlakshman26/cinder-new-branch,scottdangelo/RemoveVolumeMangerLocks,nexusriot/cinder,CloudServer/cinder,nexusriot/cinder,petrutlucian94/cinder,saeki-masaki/cinder,bswartz/cinder,scottdangelo/RemoveVolumeMangerLocks,Paul-Ezell/cinder-1,saeki-masaki/cinder,Hybrid-Cloud/cinder,leilihh/cinder,phenoxim/cinder,redhat-openstack/cinder,dims/cinder,petrutlucian94/cinder,potsmaster/cinder,eharney/cinder,winndows/cinder,manojhirway/ExistingImagesOnNFS,CloudServer/cinder,openstack/cinder,cloudbase/cinder,cloudbase/cinder,mahak/cinder,tlakshman26/cinder-new-branch,Paul-Ezell/cinder-1,JioCloud/cinder,scality/cinder,Nexenta/cinder,leilihh/cinder,apporc/cinder,winndows/cinder,sasukeh/cinder,j-griffith/cinder,tlakshman26/cinder-https-changes,potsmaster/cinder,j-griffith/cinder,Datera/cinder,duhzecca/cinder,sasukeh/cinder,bswartz/cinder,duhzecca/cinder,Hybrid-Cloud/cinder,takeshineshiro/cinder,eharney/cinder,alex8866/cinder,JioCloud/cinder,redhat-openstack/cinder,mahak/cinder,nikesh-mahalka/cinder,nikesh-mahalka/cinder,takeshineshiro/cinder,scality/cinder,openstack/cinder,NetApp/cinder,alex8866/cinder,phenoxim/cinder,Datera/cinder,Nexenta/cinder,tlakshman26/cinder-bug-fix-volume-conversion-full