'Make sure volumes connected to hosts are flagged as unsafe.'

def test_get_manageable_volumes_connected_vol(self):

    mapped_sdc = deepcopy(MANAGEABLE_SCALEIO_VOLS)
    mapped_sdc[0]['mappedSdcInfo'] = ['host1']
    mapped_sdc[1]['mappedSdcInfo'] = ['host1', 'host2']
    expected_refs = deepcopy(MANAGEABLE_SCALEIO_VOL_REFS)
    for x in range(len(mapped_sdc)):
        sdc = mapped_sdc[x]['mappedSdcInfo']
        if (sdc and (len(sdc) > 0)):
            expected_refs[x]['safe_to_manage'] = False
            expected_refs[x]['reason_not_safe'] = ('Volume    mapped    to    %d    host(s).' % len(sdc))
    self._test_get_manageable_things(expected_refs=expected_refs, scaleio_objects=mapped_sdc)
