Unfreezing dependencies
TRIVIAL whitespaces
STORAGEMODEL-245 catching AttributeError coming from infi.wmi and raising RescanIsNeeded

================================================================================

StorageModel / STORAGEMODEL-245
WindowsPath.get_hctl raises AttributeError and not RescanIsNeeded

Type:              Bug                               Status:        Open                       Assignee: Guy Rozendorn
Priority:          Minor                             Resolution:    Unresolved                 Reporter: Guy Rozendorn
Affects Version/s:                                   Fix Version/s: 0.2.2
Components:                                                                                    Created: 2013-12-30 10:35
Labels:                                                                                        Updated: 2013-12-30 10:35

Issue Links:

Sub-Tasks:

Description:
{noformat}
Traceback (most recent call last):
  File "C:\Jenkins\workspace\powertools\tests\integration\test_performance.py", line 76, in test_8perf
    self._execute_8perf()
  Local variables:
    'self': <test_performance.TestCase_8perf.test_8perf>
  File "C:\Jenkins\workspace\powertools\tests\integration\test_performance.py", line 73, in _execute_8perf
    run_volume_speedtest(args)
  Local variables:
    'run_volume_speedtest': <function run_volume_speedtest at 0x031D0230>
    'block_device': <MultipathBlockDevice \\?\GLOBALROOT\Device\MPIODisk0 for PHYSICALDRIVE1>
    'self': <test_performance.TestCase_8perf.test_8perf>
    'args': {'--duration': '60', '<device-or-mount>': '\\\\.\\PHYSICALDRIVE1'}
    'get_infinidat_block_devices': <function get_infinidat_block_devices at 0x022EBE30>
    'block_devices': [<MultipathBlockDevice \\?\GLOBALROOT\Device\MPIODisk0 for PHYSICALDRIVE1>]
    'block_device_path': '\\\\.\\PHYSICALDRIVE1'
  File "C:\Jenkins\workspace\powertools\src\infi\vendata\powertools\utils\__init__.py", line 76, in decorator
    return func(*args, **kwargs)
  Local variables:
    'do_rescan': <function do_rescan at 0x02CAF1F0>
    'func': <function run_volume_speedtest at 0x031D0DB0>
    'RescanIsNeeded': <class 'infi.storagemodel.errors.RescanIsNeeded'>
    'args': ({'--duration': '60', '<device-or-mount>': '\\\\.\\PHYSICALDRIVE1'},)
    'kwargs': {}
  File "C:\Jenkins\workspace\powertools\src\infi\vendata\powertools\cli\engine.py", line 107, in run_volume_speedtest
    PerformanceEngine(device_path, time_to_run=time_to_run).run()
  Local variables:
    'device': <MultipathBlockDevice \\?\GLOBALROOT\Device\MPIODisk0 for PHYSICALDRIVE1>
    'device_path': '\\\\.\\PHYSICALDRIVE1'
    'time_to_run': 60
    'PerformanceEngine': <class 'infi.vendata.powertools.volume_speedtest.engine.PerformanceEngine'>
    'arguments': {'--duration': '60', '<device-or-mount>': '\\\\.\\PHYSICALDRIVE1'}
  File "C:\Jenkins\workspace\powertools\src\infi\vendata\powertools\volume_speedtest\engine.py", line 308, in run
    self._print_path_table()
  Local variables:
    'self': <infi.vendata.powertools.volume_speedtest.engine.PerformanceEngine object at 0x0303C110>
  File "C:\Jenkins\workspace\powertools\src\infi\vendata\powertools\volume_speedtest\engine.py", line 162, in _print_path_table
    connectivity = path.get_connectivity()
  Local variables:
    'i': 0
    'path': <infi.storagemodel.windows.native_multipath.WindowsPath object at 0x0302B4F0>
    'self': <infi.vendata.powertools.volume_speedtest.engine.PerformanceEngine object at 0x0303C110>
  File "C:\Jenkins\workspace\powertools\eggs\infi.pyutils-1.0.3-py2.7.egg\infi\pyutils\lazy.py", line 85, in callee
    value = func(inst, *args, **kwargs)
  Local variables:
    'method_id': 81
    'key': 81
    'args': ()
    'inst': <infi.storagemodel.windows.native_multipath.WindowsPath object at 0x0302B4F0>
    'func': <function get_connectivity at 0x02AD67B0>
    'kwargs': {}
  File "C:\Jenkins\workspace\powertools\eggs\infi.storagemodel-0.2.1.post1.g02a5f4f-py2.7.egg\infi\storagemodel\base\multipath.py", line 246, in get_connectivity
    return ConnectivityFactory.get_by_device_with_hctl(self)
  Local variables:
    'ConnectivityFactory': <infi.storagemodel.connectivity.ConnectivityFactoryImpl object at 0x02ADB4F0>
    'self': <infi.storagemodel.windows.native_multipath.WindowsPath object at 0x0302B4F0>
  File "C:\Jenkins\workspace\powertools\eggs\infi.storagemodel-0.2.1.post1.g02a5f4f-py2.7.egg\infi\storagemodel\connectivity\__init__.py", line 57, in get_by_device_with_hctl
    hct = (device.get_hctl().get_host(),
  Local variables:
    'device': <infi.storagemodel.windows.native_multipath.WindowsPath object at 0x0302B4F0>
    'self': <infi.storagemodel.connectivity.ConnectivityFactoryImpl object at 0x02ADB4F0>
  File "C:\Jenkins\workspace\powertools\eggs\infi.pyutils-1.0.3-py2.7.egg\infi\pyutils\lazy.py", line 85, in callee
    value = func(inst, *args, **kwargs)
  Local variables:
    'method_id': 120
    'key': 120
    'args': ()
    'inst': <infi.storagemodel.windows.native_multipath.WindowsPath object at 0x0302B4F0>
    'func': <function get_hctl at 0x017B92B0>
    'kwargs': {}
  File "C:\Jenkins\workspace\powertools\eggs\infi.storagemodel-0.2.1.post1.g02a5f4f-py2.7.egg\infi\storagemodel\windows\native_multipath.py", line 136, in get_hctl
    return HCTL(scsi_address.PortNumber, scsi_address.ScsiPathId, scsi_address.TargetId, scsi_address.Lun)
  Local variables:
    'self': <infi.storagemodel.windows.native_multipath.WindowsPath object at 0x0302B4F0>
    'scsi_address': <infi.wmpio.wmi.model.ScsiAddress object at 0x02FA0ED0>
    'HCTL': <class 'infi.dtypes.hctl.HCTL'>
  File "C:\Jenkins\workspace\powertools\eggs\infi.wmpio-0.1.16-py2.7.egg\infi\wmpio\wmi\model\__init__.py", line 65, in PortNumber
    return self.get_wmi_attribute("PortNumber")
  Local variables:
    'self': <infi.wmpio.wmi.model.ScsiAddress object at 0x02FA0ED0>
  File "C:\Jenkins\workspace\powertools\eggs\infi.wmi-0.1.22-py2.7.egg\infi\wmi\__init__.py", line 27, in get_wmi_attribute
    return self._get_cached_value(attr)
  Local variables:
    'self': <infi.wmpio.wmi.model.ScsiAddress object at 0x02FA0ED0>
    'attr': 'PortNumber'
  File "C:\Jenkins\workspace\powertools\eggs\infi.wmi-0.1.22-py2.7.egg\infi\wmi\__init__.py", line 23, in _get_cached_value
    self._values[attr] = self._get_property(attr).Value
  Local variables:
    'self': <infi.wmpio.wmi.model.ScsiAddress object at 0x02FA0ED0>
    'attr': 'PortNumber'
  File "C:\Jenkins\workspace\powertools\eggs\infi.wmi-0.1.22-py2.7.egg\infi\wmi\__init__.py", line 19, in _get_property
    return self.properties.Item(attr)
  Local variables:
    'self': <infi.wmpio.wmi.model.ScsiAddress object at 0x02FA0ED0>
    'attr': 'PortNumber'
  File "C:\Jenkins\workspace\powertools\eggs\infi.wmi-0.1.22-py2.7.egg\infi\wmi\__init__.py", line 15, in properties
    self._properties = self._get_properties()
  Local variables:
    'self': <infi.wmpio.wmi.model.ScsiAddress object at 0x02FA0ED0>
  File "C:\Jenkins\workspace\powertools\eggs\infi.wmi-0.1.22-py2.7.egg\infi\wmi\__init__.py", line 10, in _get_properties
    return self._object.Properties_
  Local variables:
    'self': <infi.wmpio.wmi.model.ScsiAddress object at 0x02FA0ED0>
AttributeError: 'NoneType' object has no attribute 'Properties_'
-------------------- >> begin captured stdout << ---------------------
{noformat}

Comments:
Freezing dependencies
Finished release v0.2.2.

* release/v0.2.2:
  Freezing dependencies
  STORAGEMODEL-245 catching AttributeError coming from infi.wmi and raising RescanIsNeeded
  TRIVIAL whitespaces
  Unfreezing dependencies