Skip timestamp check if 'capabilities' is none
fix bug: #1131011 Change-Id: I6266560627d03d95862a7f2c85ac63e2e9daef6b
This commit is contained in:
committed by
Zhiteng Huang
parent
e1815e8673
commit
8169eb6683
@@ -116,10 +116,10 @@ class HostState(object):
|
||||
|
||||
def update_from_volume_capability(self, capability):
|
||||
"""Update information about a host from its volume_node info."""
|
||||
if self.updated and self.updated > capability['timestamp']:
|
||||
return
|
||||
|
||||
if capability:
|
||||
if self.updated and self.updated > capability['timestamp']:
|
||||
return
|
||||
|
||||
self.volume_backend = capability.get('volume_backend_name', None)
|
||||
self.vendor_name = capability.get('vendor_name', None)
|
||||
self.driver_version = capability.get('driver_version', None)
|
||||
|
||||
Reference in New Issue
Block a user